Fix compile-cplus-types.c build errors
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2
3 * compile/compile-cplus-types.c
4 (compile_cplus_instance::leave_scope): Take the address of scope
5 object.
6 (compile_cplus_instance::convert_qualified_base): Compare quals
7 to 0.
8
9 2018-08-30 Keith Seitz <keiths@redhat.com>
10
11 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
12 Use "%s" and host_address_to_string instead of "%p" in printf.
13
14 2018-08-29 Keith Seitz <keiths@redhat.com>
15
16 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
17 and compile-cplus-types.c.
18 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
19 * c-lang.c (cplus_language_defn): Set C++ compile functions.
20 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
21 Declare.
22 * compile/compile-c-support.c: Include compile-cplus.h.
23 (load_libcompile): Templatize.
24 (get_compile_context): "New" function.
25 (c_get_compile_context): Use get_compile_context.
26 (cplus_get_compile_context): New function.
27 (cplus_push_user_expression, cplus_pop_user_expression)
28 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
29 (cplus_compute_program): Define new structs/functions.
30 * compile/compile-cplus-symmbols.c: New file.
31 * compile/compile-cplus-types.c: New file.
32 * compile/compile-cplus.h: New file.
33 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
34 Declare.
35 * compile/compile-object-load.c (get_out_value_type): Use
36 strncmp_iw when comparing symbol names.
37 (compile_object_load): Add mst_bss and mst_data.
38 * compile/compile.c (_initialize_compile): Remove
39 -Wno-implicit-function-declaration from `compile_args'.
40 * compile/gcc-cp-plugin.h: New file.
41 * NEWS: Mention C++ compile support and new debug options.
42
43 2018-08-29 Keith Seitz <keiths@redhat.com>
44
45 * linespec.c (collect_info::add_symbol): Make virtual.
46 (struct symbol_searcher_collect_info): New struct.
47 (symbol_searcher::find_all_symbols): New method.
48 * symtab.h (class symbol_searcher): New class.
49
50 2018-08-29 Keith Seitz <keiths@redhat.com>
51
52 * linespec.c (struct linespec) <function_symbols, label_symbols>:
53 Change to vector of block_symbol. Update all users.
54 (struct collect_info) <symbols>: Likewise.
55 (collect_info::add_symbol): Take block_symbol as argument.
56 Update all callers.
57 (decode_compound_collector) <m_symbols>: Change type to vector
58 of block_symbol. Update all users.
59 (decode_compound_collector::operator ()): Change parameter type
60 to block_symbol.
61 (find_method, find_function_symbols, find_linespec_symbols)
62 (find_label_symbols_in_block, find_label_symbols): Change symbol
63 vectors to block_symbol vectors.
64 * symtab.h (symbol_found_callback_ftype): Change parameter type to
65 block_symbol.
66
67 2018-08-29 Keith Seitz <keiths@redhat.com>
68
69 * linespec.c (symbolp): Remove typedef and VEC definitions.
70 (bound_minimal_symbol_d): Likewise.
71
72 2018-08-29 Keith Seitz <keiths@redhat.com>
73
74 * linespec.c (decode_compound_collector::decode_compound_collector):
75 Remove initialization for `m_symtabs'.
76 (decode_compound_collector::release_symbols): Change return type
77 to std::vector. Update all callers.
78 (class decode_compound_collector) <m_symbols>: Change type to
79 std::vector.
80 (lookup_prefix_sym): Change return type to std::vector. Update all
81 callers.
82 (compare_symbols): Remove.
83 (std_compare_symbols): Rename to `compare_symbols'.
84 (find_method): Change `sym_classes' parameter to std::vector.
85 Update all callers. Use std::sort to sort sym_classes.
86 (find_linespec_symbols): Remove cleanup.
87
88 2018-08-29 Keith Seitz <keiths@redhat.com>
89
90 * linespec.c (struct linespec) <minimal_symbols>: Change type to
91 std::vector. Update all users.
92 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
93 (struct collect_info) <minimal_symbols>: Likewise.
94 (compare_msymbols): Return bool. Change parameters to const
95 bound_minimal_symbol references.
96 (find_method, find_function_symbols, find_linespec_symbols): Change
97 `minsyms' parameter to std::vector. Update all callers.
98
99 2018-08-29 Keith Seitz <keiths@redhat.com>
100
101 * linespec.c (struct linespec) <label_symbols>: Change type to
102 std::vector. Update all users.
103 (find_label_symbols_in_block): Change `result' parameter to
104 std::vector. Update all callers.
105 (find_label_symbols): Return std::vector. Update all callers.
106
107 2018-08-29 Keith Seitz <keiths@redhat.com>
108
109 * linespec.c (struct linespec) <function_symbols>: Change type to
110 std::vector. Update all users.
111 (struct collect_info) <function_symbols>: Likewise.
112 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
113 (std_compare_symbols): New function.
114 (find_method, find_function_symbols, find_linespec_symbols)
115 (find_label_symbols_in_block): Change `symbols' parameter to
116 std::vector. Update all callers.
117 (find_label_symbols): Likewise for `function_symbols' and
118 `label_funcs_ret'.
119
120 2018-08-29 Keith Seitz <keiths@redhat.com>
121
122 * linespec.c (symtab_vector_up): Define.
123 (struct linespec) <file_symtabs>: Change type to std::vector *.
124 Update all uses.
125 (struct collect_info) <file_symtabs>: Likewise.
126 (collect_symtabs_from_filename): Return symtab_vector_up.
127 Update all callers.
128 (decode_objc): Remove cleanup.
129 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
130 (symtab_collector::release_symtabs): Return symtab_vector_up.
131 Update all callers.
132 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
133 Update all users.
134 (collect_symtabs_from_filename, symtabs_from_filename): Return
135 symtab_vector_up. Update all callers.
136
137 2018-08-29 Tom Tromey <tom@tromey.com>
138
139 * csky-tdep.c (csky_analyze_prologue): Use
140 core_addr_to_string_nz.
141
142 2018-08-29 Tom Tromey <tom@tromey.com>
143
144 * windows-nat.c (struct xlate_exception) <them>: Change type to
145 DWORD.
146 (xlate): Fix formatting. Remove last entry.
147 (struct xlate_exception, xlate): Comment out.
148 (windows_nat_target::resume): Use ranged for.
149
150 2018-08-29 Jim Wilson <jimw@sifive.com>
151
152 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
153 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
154 of NT_PRFPREG.
155 (riscv_linux_nat_target::store_registers): Likewise.
156
157 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
158
159 PR gdb/23555
160 PR gdb/23558
161 * gnulib/aclocal.m4: Regenerate.
162 * gnulib/config.in: Regenerate.
163 * gnulib/configure: Regenerate.
164 * gnulib/import/Makefile.am: Update.
165 * gnulib/import/Makefile.in: Update.
166 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
167 * gnulib/import/_Noreturn.h: ... this.
168 * gnulib/import/alloca.in.h: Update.
169 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
170 * gnulib/import/arg-nonnull.h: ... this.
171 * gnulib/import/assure.h: Update.
172 * gnulib/import/at-func.c: Update.
173 * gnulib/import/basename-lgpl.c: Update.
174 * gnulib/import/extra/snippet/c++defs.h: Rename to...
175 * gnulib/import/c++defs.h: ... this.
176 * gnulib/import/canonicalize-lgpl.c: Update.
177 * gnulib/import/cdefs.h: Update.
178 * gnulib/import/chdir-long.c: Update.
179 * gnulib/import/chdir-long.h: Update.
180 * gnulib/import/cloexec.c: Update.
181 * gnulib/import/cloexec.h: Update.
182 * gnulib/import/close.c: Update.
183 * gnulib/import/closedir.c: Update.
184 * gnulib/import/config.charset: Update.
185 * gnulib/import/dirent-private.h: Update.
186 * gnulib/import/dirent.in.h: Update.
187 * gnulib/import/dirfd.c: Update.
188 * gnulib/import/dirname-lgpl.c: Update.
189 * gnulib/import/dirname.h: Update.
190 * gnulib/import/dosname.h: Update.
191 * gnulib/import/dup-safer-flag.c: Update.
192 * gnulib/import/dup-safer.c: Update.
193 * gnulib/import/dup.c: Update.
194 * gnulib/import/dup2.c: Update.
195 * gnulib/import/errno.in.h: Update.
196 * gnulib/import/error.c: Update.
197 * gnulib/import/error.h: Update.
198 * gnulib/import/exitfail.c: Update.
199 * gnulib/import/exitfail.h: Update.
200 * gnulib/import/extra/update-copyright: Update.
201 * gnulib/import/fchdir.c: Update.
202 * gnulib/import/fcntl.c: Update.
203 * gnulib/import/fcntl.in.h: Update.
204 * gnulib/import/fd-hook.c: Update.
205 * gnulib/import/fd-hook.h: Update.
206 * gnulib/import/fd-safer-flag.c: Update.
207 * gnulib/import/fd-safer.c: Update.
208 * gnulib/import/fdopendir.c: Update.
209 * gnulib/import/filename.h: Update.
210 * gnulib/import/filenamecat-lgpl.c: Update.
211 * gnulib/import/filenamecat.h: Update.
212 * gnulib/import/flexmember.h: Update.
213 * gnulib/import/float+.h: Update.
214 * gnulib/import/float.c: Update.
215 * gnulib/import/float.in.h: Update.
216 * gnulib/import/fnmatch.c: Update.
217 * gnulib/import/fnmatch.in.h: Update.
218 * gnulib/import/fnmatch_loop.c: Update.
219 * gnulib/import/fpucw.h: Update.
220 * gnulib/import/frexp.c: Update.
221 * gnulib/import/frexpl.c: Update.
222 * gnulib/import/fstat.c: Update.
223 * gnulib/import/fstatat.c: Update.
224 * gnulib/import/getcwd-lgpl.c: Update.
225 * gnulib/import/getcwd.c: Update.
226 * gnulib/import/getdtablesize.c: Update.
227 * gnulib/import/getlogin_r.c: Update.
228 * gnulib/import/getprogname.c: Update.
229 * gnulib/import/getprogname.h: Update.
230 * gnulib/import/gettext.h: Update.
231 * gnulib/import/gettimeofday.c: Update.
232 * gnulib/import/glob-libc.h: Update.
233 * gnulib/import/glob.c: Update.
234 * gnulib/import/glob.in.h: Update.
235 * gnulib/import/glob_internal.h: Update.
236 * gnulib/import/glob_pattern_p.c: Update.
237 * gnulib/import/globfree.c: Update.
238 * gnulib/import/hard-locale.c: Update.
239 * gnulib/import/hard-locale.h: Update.
240 * gnulib/import/intprops.h: Update.
241 * gnulib/import/inttypes.in.h: Update.
242 * gnulib/import/isnan.c: Update.
243 * gnulib/import/isnand-nolibm.h: Update.
244 * gnulib/import/isnand.c: Update.
245 * gnulib/import/isnanl-nolibm.h: Update.
246 * gnulib/import/isnanl.c: Update.
247 * gnulib/import/itold.c: Update.
248 * gnulib/import/libc-config.h: Update.
249 * gnulib/import/limits.in.h: Update.
250 * gnulib/import/localcharset.c: Update.
251 * gnulib/import/localcharset.h: Update.
252 * gnulib/import/localtime-buffer.c: Update.
253 * gnulib/import/localtime-buffer.h: Update.
254 * gnulib/import/lstat.c: Update.
255 * gnulib/import/m4/00gnulib.m4: Update.
256 * gnulib/import/m4/__inline.m4: Update.
257 * gnulib/import/m4/absolute-header.m4: Update.
258 * gnulib/import/m4/alloca.m4: Update.
259 * gnulib/import/m4/builtin-expect.m4: Update.
260 * gnulib/import/m4/canonicalize.m4: Update.
261 * gnulib/import/m4/chdir-long.m4: Update.
262 * gnulib/import/m4/close.m4: Update.
263 * gnulib/import/m4/closedir.m4: Update.
264 * gnulib/import/m4/configmake.m4: Update.
265 * gnulib/import/m4/d-ino.m4: Update.
266 * gnulib/import/m4/d-type.m4: Update.
267 * gnulib/import/m4/dirent_h.m4: Update.
268 * gnulib/import/m4/dirfd.m4: Update.
269 * gnulib/import/m4/dirname.m4: Update.
270 * gnulib/import/m4/double-slash-root.m4: Update.
271 * gnulib/import/m4/dup.m4: Update.
272 * gnulib/import/m4/dup2.m4: Update.
273 * gnulib/import/m4/eealloc.m4: Update.
274 * gnulib/import/m4/environ.m4: Update.
275 * gnulib/import/m4/errno_h.m4: Update.
276 * gnulib/import/m4/error.m4: Update.
277 * gnulib/import/m4/exponentd.m4: Update.
278 * gnulib/import/m4/exponentl.m4: Update.
279 * gnulib/import/m4/extensions.m4: Update.
280 * gnulib/import/m4/extern-inline.m4: Update.
281 * gnulib/import/m4/fchdir.m4: Update.
282 * gnulib/import/m4/fcntl-o.m4: Update.
283 * gnulib/import/m4/fcntl.m4: Update.
284 * gnulib/import/m4/fcntl_h.m4: Update.
285 * gnulib/import/m4/fdopendir.m4: Update.
286 * gnulib/import/m4/filenamecat.m4: Update.
287 * gnulib/import/m4/flexmember.m4: Update.
288 * gnulib/import/m4/float_h.m4: Update.
289 * gnulib/import/m4/fnmatch.m4: Update.
290 * gnulib/import/m4/fnmatch_h.m4: Update.
291 * gnulib/import/m4/fpieee.m4: Update.
292 * gnulib/import/m4/frexp.m4: Update.
293 * gnulib/import/m4/frexpl.m4: Update.
294 * gnulib/import/m4/fstat.m4: Update.
295 * gnulib/import/m4/fstatat.m4: Update.
296 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
297 * gnulib/import/m4/getcwd-path-max.m4: Update.
298 * gnulib/import/m4/getcwd.m4: Update.
299 * gnulib/import/m4/getdtablesize.m4: Update.
300 * gnulib/import/m4/getlogin.m4: Update.
301 * gnulib/import/m4/getlogin_r.m4: Update.
302 * gnulib/import/m4/getpagesize.m4: Update.
303 * gnulib/import/m4/getprogname.m4: Update.
304 * gnulib/import/m4/gettimeofday.m4: Update.
305 * gnulib/import/m4/glibc21.m4: Update.
306 * gnulib/import/m4/glob.m4: Update.
307 * gnulib/import/m4/glob_h.m4: Update.
308 * gnulib/import/m4/gnulib-cache.m4: Update.
309 * gnulib/import/m4/gnulib-common.m4: Update.
310 * gnulib/import/m4/gnulib-comp.m4: Update.
311 * gnulib/import/m4/gnulib-tool.m4: Update.
312 * gnulib/import/m4/hard-locale.m4: Update.
313 * gnulib/import/m4/include_next.m4: Update.
314 * gnulib/import/m4/inttypes-pri.m4: Update.
315 * gnulib/import/m4/inttypes.m4: Update.
316 * gnulib/import/m4/isnand.m4: Update.
317 * gnulib/import/m4/isnanl.m4: Update.
318 * gnulib/import/m4/largefile.m4: Update.
319 * gnulib/import/m4/limits-h.m4: Update.
320 * gnulib/import/m4/localcharset.m4: Update.
321 * gnulib/import/m4/locale-fr.m4: Update.
322 * gnulib/import/m4/locale-ja.m4: Update.
323 * gnulib/import/m4/locale-zh.m4: Update.
324 * gnulib/import/m4/localtime-buffer.m4: Update.
325 * gnulib/import/m4/longlong.m4: Update.
326 * gnulib/import/m4/lstat.m4: Update.
327 * gnulib/import/m4/malloc.m4: Update.
328 * gnulib/import/m4/malloca.m4: Update.
329 * gnulib/import/m4/math_h.m4: Update.
330 * gnulib/import/m4/mbrtowc.m4: Update.
331 * gnulib/import/m4/mbsinit.m4: Update.
332 * gnulib/import/m4/mbsrtowcs.m4: Update.
333 * gnulib/import/m4/mbstate_t.m4: Update.
334 * gnulib/import/m4/memchr.m4: Update.
335 * gnulib/import/m4/memmem.m4: Update.
336 * gnulib/import/m4/mempcpy.m4: Update.
337 * gnulib/import/m4/memrchr.m4: Update.
338 * gnulib/import/m4/mkdir.m4: Update.
339 * gnulib/import/m4/mkstemp.m4: Update.
340 * gnulib/import/m4/mmap-anon.m4: Update.
341 * gnulib/import/m4/mode_t.m4: Update.
342 * gnulib/import/m4/msvc-inval.m4: Update.
343 * gnulib/import/m4/msvc-nothrow.m4: Update.
344 * gnulib/import/m4/multiarch.m4: Update.
345 * gnulib/import/m4/nocrash.m4: Update.
346 * gnulib/import/m4/off_t.m4: Update.
347 * gnulib/import/m4/onceonly.m4: Update.
348 * gnulib/import/m4/open-cloexec.m4: Update.
349 * gnulib/import/m4/open.m4: Update.
350 * gnulib/import/m4/openat.m4: Update.
351 * gnulib/import/m4/opendir.m4: Update.
352 * gnulib/import/m4/pathmax.m4: Update.
353 * gnulib/import/m4/rawmemchr.m4: Update.
354 * gnulib/import/m4/readdir.m4: Update.
355 * gnulib/import/m4/readlink.m4: Update.
356 * gnulib/import/m4/realloc.m4: Update.
357 * gnulib/import/m4/rename.m4: Update.
358 * gnulib/import/m4/rewinddir.m4: Update.
359 * gnulib/import/m4/rmdir.m4: Update.
360 * gnulib/import/m4/save-cwd.m4: Update.
361 * gnulib/import/m4/secure_getenv.m4: Update.
362 * gnulib/import/m4/setenv.m4: Update.
363 * gnulib/import/m4/signal_h.m4: Update.
364 * gnulib/import/m4/ssize_t.m4: Update.
365 * gnulib/import/m4/stat-time.m4: Update.
366 * gnulib/import/m4/stat.m4: Update.
367 * gnulib/import/m4/std-gnu11.m4: Update.
368 * gnulib/import/m4/stdbool.m4: Update.
369 * gnulib/import/m4/stddef_h.m4: Update.
370 * gnulib/import/m4/stdint.m4: Update.
371 * gnulib/import/m4/stdio_h.m4: Update.
372 * gnulib/import/m4/stdlib_h.m4: Update.
373 * gnulib/import/m4/strchrnul.m4: Update.
374 * gnulib/import/m4/strdup.m4: Update.
375 * gnulib/import/m4/strerror.m4: Update.
376 * gnulib/import/m4/string_h.m4: Update.
377 * gnulib/import/m4/strstr.m4: Update.
378 * gnulib/import/m4/strtok_r.m4: Update.
379 * gnulib/import/m4/sys_socket_h.m4: Update.
380 * gnulib/import/m4/sys_stat_h.m4: Update.
381 * gnulib/import/m4/sys_time_h.m4: Update.
382 * gnulib/import/m4/sys_types_h.m4: Update.
383 * gnulib/import/m4/tempname.m4: Update.
384 * gnulib/import/m4/time_h.m4: Update.
385 * gnulib/import/m4/unistd-safer.m4: Update.
386 * gnulib/import/m4/unistd_h.m4: Update.
387 * gnulib/import/m4/warn-on-use.m4: Update.
388 * gnulib/import/m4/wchar_h.m4: Update.
389 * gnulib/import/m4/wchar_t.m4: Update.
390 * gnulib/import/m4/wctype_h.m4: Update.
391 * gnulib/import/m4/wint_t.m4: Update.
392 * gnulib/import/malloc.c: Update.
393 * gnulib/import/malloc/scratch_buffer.h: Update.
394 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
395 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
396 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
397 * gnulib/import/malloca.c: Update.
398 * gnulib/import/malloca.h: Update.
399 * gnulib/import/malloca.valgrind: Update.
400 * gnulib/import/math.in.h: Update.
401 * gnulib/import/mbrtowc.c: Update.
402 * gnulib/import/mbsinit.c: Update.
403 * gnulib/import/mbsrtowcs-impl.h: Update.
404 * gnulib/import/mbsrtowcs-state.c: Update.
405 * gnulib/import/mbsrtowcs.c: Update.
406 * gnulib/import/memchr.c: Update.
407 * gnulib/import/memmem.c: Update.
408 * gnulib/import/mempcpy.c: Update.
409 * gnulib/import/memrchr.c: Update.
410 * gnulib/import/mkdir.c: Update.
411 * gnulib/import/mkstemp.c: Update.
412 * gnulib/import/msvc-inval.c: Update.
413 * gnulib/import/msvc-inval.h: Update.
414 * gnulib/import/msvc-nothrow.c: Update.
415 * gnulib/import/msvc-nothrow.h: Update.
416 * gnulib/import/open.c: Update.
417 * gnulib/import/openat-die.c: Update.
418 * gnulib/import/openat-priv.h: Update.
419 * gnulib/import/openat-proc.c: Update.
420 * gnulib/import/openat.c: Update.
421 * gnulib/import/openat.h: Update.
422 * gnulib/import/opendir.c: Update.
423 * gnulib/import/pathmax.h: Update.
424 * gnulib/import/pipe-safer.c: Update.
425 * gnulib/import/rawmemchr.c: Update.
426 * gnulib/import/readdir.c: Update.
427 * gnulib/import/readlink.c: Update.
428 * gnulib/import/realloc.c: Update.
429 * gnulib/import/ref-add.sin: Update.
430 * gnulib/import/ref-del.sin: Update.
431 * gnulib/import/rename.c: Update.
432 * gnulib/import/rewinddir.c: Update.
433 * gnulib/import/rmdir.c: Update.
434 * gnulib/import/same-inode.h: Update.
435 * gnulib/import/save-cwd.c: Update.
436 * gnulib/import/save-cwd.h: Update.
437 * gnulib/import/scratch_buffer.h: Update.
438 * gnulib/import/secure_getenv.c: Update.
439 * gnulib/import/setenv.c: Update.
440 * gnulib/import/signal.in.h: Update.
441 * gnulib/import/stat-time.c: Update.
442 * gnulib/import/stat-time.h: Update.
443 * gnulib/import/stat-w32.c: Update.
444 * gnulib/import/stat-w32.h: Update.
445 * gnulib/import/stat.c: Update.
446 * gnulib/import/stdbool.in.h: Update.
447 * gnulib/import/stddef.in.h: Update.
448 * gnulib/import/stdint.in.h: Update.
449 * gnulib/import/stdio.in.h: Update.
450 * gnulib/import/stdlib.in.h: Update.
451 * gnulib/import/str-two-way.h: Update.
452 * gnulib/import/strchrnul.c: Update.
453 * gnulib/import/strdup.c: Update.
454 * gnulib/import/streq.h: Update.
455 * gnulib/import/strerror-override.c: Update.
456 * gnulib/import/strerror-override.h: Update.
457 * gnulib/import/strerror.c: Update.
458 * gnulib/import/string.in.h: Update.
459 * gnulib/import/stripslash.c: Update.
460 * gnulib/import/strnlen1.c: Update.
461 * gnulib/import/strnlen1.h: Update.
462 * gnulib/import/strstr.c: Update.
463 * gnulib/import/strtok_r.c: Update.
464 * gnulib/import/sys_stat.in.h: Update.
465 * gnulib/import/sys_time.in.h: Update.
466 * gnulib/import/sys_types.in.h: Update.
467 * gnulib/import/tempname.c: Update.
468 * gnulib/import/tempname.h: Update.
469 * gnulib/import/time.in.h: Update.
470 * gnulib/import/unistd--.h: Update.
471 * gnulib/import/unistd-safer.h: Update.
472 * gnulib/import/unistd.in.h: Update.
473 * gnulib/import/unsetenv.c: Update.
474 * gnulib/import/verify.h: Update.
475 * gnulib/import/extra/snippet/warn-on-use.h: Update.
476 * gnulib/import/wchar.in.h: Update.
477 * gnulib/import/wctype.in.h: Update.
478 * gnulib/import/xalloc-oversized.h: Update.
479 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
480 "53e2c179f26a890fa6685af4b6c1397ee370433b".
481
482 2018-08-16 Gary Benson <gbenson@redhat.com>
483
484 PR gdb/13000:
485 * gdb/main.c (captured_main_1): Exit with nonzero status
486 in batch mode if the last command to be executed failed.
487 * NEWS: Mention the above.
488
489 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
490
491 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
492 end of warning message.
493
494 2018-08-29 Alan Hayward <alan.hayward@arm.com>
495
496 PR gdb/22943:
497 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
498 (aarch64_extract_return_value): Use
499 aapcs_is_vfp_call_or_return_candidate.
500 (aarch64_return_in_memory): Likewise.
501 (aarch64_store_return_value): Likewise.
502
503 2018-08-29 Alan Hayward <alan.hayward@arm.com>
504
505 * aarch64-tdep.c
506 (aapcs_is_vfp_call_or_return_candidate): Make static
507 (pass_in_v_or_stack): Remove function.
508 (pass_in_v_vfp_candidate): New function.
509 (aarch64_push_dummy_call): Check for float register candidates.
510
511 2018-08-29 Alan Hayward <alan.hayward@arm.com>
512
513 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
514 (aapcs_is_vfp_call_or_return_candidate_1): New function.
515 (aapcs_is_vfp_call_or_return_candidate): Likewise.
516
517 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
518
519 PR build/23399
520 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
521 (struct ipa_sym_addresses): Rename to...
522 (struct ipa_sym_addresses_common): ... this.
523 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
524
525 2018-08-28 Tom Tromey <tom@tromey.com>
526
527 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
528 (token_fifo): Now a std::vector.
529 (yylex, c_parse): Update.
530 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
531 (token_fifo): Now a std::vector.
532 (yylex, d_parse): Update.
533 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
534 (token_fifo): Now a std::vector.
535 (yylex, go_parse): Update.
536
537 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
538
539 * parser-defs.h (struct type_stack) <elements>: Change type to
540 std::vector<union type_stack_elt>.
541 <depth, size>: Remove.
542 * parse.c (parse_exp_in_context_1): Adjust.
543 (type_stack_reserve): Remove.
544 (check_type_stack_depth): Remove.
545 (insert_into_type_stack): Adjust to std::vector.
546 (insert_type): Likewise.
547 (push_type): Likewise.
548 (push_type_int): Likewise.
549 (insert_type_address_space): Likewise.
550 (pop_type): Likewise.
551 (pop_type_int): Likewise.
552 (pop_typelist): Likewise.
553 (pop_type_stack): Likewise.
554 (append_type_stack): Likewise.
555 (push_type_stack): Likewise.
556 (get_type_stack): Likewise.
557 (type_stack_cleanup): Likewise.
558 (push_typelist): Likewise.
559 (follow_types): Likewise.
560 (_initialize_parse): Likewise.
561
562 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
563
564 * NEWS: Mention csky target.
565
566 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
567 Hafiz Abid Qadeer <abidh@codesourcery.com>
568 Don Breazeal <donb@codesourcery.com>
569
570 * csky-linux-tdep.c: New file.
571 * csky-tdep.c: Likewise.
572 * csky-tdep.h: Likewise.
573 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
574 csky-tdep.o.
575 (HFILES_NO_SRCDIR): Add csky-tdep.h.
576 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
577 * configure.tgt: Add csky support.
578
579 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
580
581 * python/py-framefilter.c (py_print_frame): Print frame architecture
582 when printing on an MI output.
583
584 2018-08-27 Tom Tromey <tom@tromey.com>
585
586 PR build/23087:
587 * configure: Rebuild.
588 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
589
590 2018-08-27 Tom Tromey <tom@tromey.com>
591
592 * aarch64-linux-tdep.c
593 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
594 casts to int.
595
596 2018-08-27 Tom Tromey <tom@tromey.com>
597
598 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
599 unsigned.
600 (ppc64_standard_linkage1, ppc64_standard_linkage2)
601 (ppc64_standard_linkage3, ppc64_standard_linkage4)
602 (ppc64_standard_linkage5, ppc64_standard_linkage6)
603 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
604 unsigned.
605
606 2018-08-27 Tom Tromey <tom@tromey.com>
607
608 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
609 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
610
611 2018-08-27 Tom Tromey <tom@tromey.com>
612
613 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
614 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
615 ULONGEST_MAX.
616 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
617 ULONGEST_MAX.
618 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
619 ULONGEST_MAX.
620 * sparc-linux-tdep.c (sparc32_linux_sigframe)
621 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
622 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
623 ULONGEST_MAX.
624 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
625 (ppc64_linux_sigaction_tramp_frame)
626 (ppc32_linux_sighandler_tramp_frame)
627 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
628 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
629 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
630 * mn10300-linux-tdep.c (am33_linux_sigframe)
631 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
632 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
633 * mips-linux-tdep.c (mips_linux_o32_sigframe)
634 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
635 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
636 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
637 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
638 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
639 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
640 * microblaze-linux-tdep.c
641 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
642 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
643 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
644 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
645 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
646 * common/common-types.h (ULONGEST_MAX): New define.
647 (CORE_ADDR_MAX): Fix formatting.
648 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
649 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
650 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
651 (arm_linux_rt_sigreturn_tramp_frame)
652 (arm_eabi_linux_sigreturn_tramp_frame)
653 (arm_eabi_linux_rt_sigreturn_tramp_frame)
654 (thumb2_eabi_linux_sigreturn_tramp_frame)
655 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
656 (arm_linux_restart_syscall_tramp_frame)
657 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
658 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
659 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
660 ULONGEST_MAX.
661 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
662
663 2018-08-27 Tom Tromey <tom@tromey.com>
664
665 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
666 CORE_ADDR_MAX.
667 * mips-tdep.c (mips_deal_with_atomic_sequence)
668 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
669 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
670 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
671 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
672 CORE_ADDR_MAX.
673 * aarch64-tdep.c (aarch64_software_single_step): Use
674 CORE_ADDR_MAX.
675
676 2018-08-27 Tom Tromey <tom@tromey.com>
677
678 * linespec.c (complete_linespec_component): Add cast to "char".
679 * completer.c (completion_tracker::build_completion_result): Add
680 cast to "char".
681
682 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
683
684 * solist.h (struct solist, struct target_so_ops): Fix
685 indentation.
686
687 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
688
689 * ada-tasks.c (ada_task_info_s): Remove typedef.
690 (DEF_VEC_O(ada_task_info_s)): Remove.
691 (struct ada_tasks_inferior_data): Initialize fields.
692 <task_list>: Make an std::vector.
693 (get_ada_tasks_inferior_data): Allocate with new.
694 (ada_get_task_number): Adjust.
695 (get_task_number_from_id): Likewise.
696 (valid_task_id): Likewise.
697 (ada_get_task_info_from_ptid): Likewise.
698 (iterate_over_live_ada_tasks): Likewise.
699 (add_ada_task): Likewise.
700 (read_known_tasks): Likewise.
701 (ada_build_task_list): Likewise.
702 (print_ada_task_info): Likewise.
703 (info_task): Likewise.
704 (task_command_1): Likewise.
705
706 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * ada-lang.c (add_angle_brackets): Return std::string.
709
710 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
711
712 * python/py-threadevent.c (py_get_event_thread): Initialize
713 pythread.
714
715 2018-08-24 Pedro Alves <palves@redhat.com>
716
717 * python/py-bpevent.c (create_breakpoint_event_object): Use
718 copy-initialization.
719 * python/py-continueevent.c (emit_continue_event): Use
720 copy-initialization.
721 * python/py-exitedevent.c (create_exited_event_object): Return a
722 gdbpy_ref<>.
723 (emit_exited_event): Use copy-initialization.
724 * python/py-inferior.c (python_new_inferior)
725 (python_inferior_deleted, add_thread_object): Use
726 copy-initialization.
727 * python/py-infevents.c (create_inferior_call_event_object)
728 (create_register_changed_event_object)
729 (create_memory_changed_event_object): Return a gdbpy_ref<>.
730 (emit_inferior_call_event, emit_memory_changed_event)
731 (emit_register_changed_event): Use copy-initialization.
732 * python/py-newobjfileevent.c (create_new_objfile_event_object):
733 Return a gdbpy_ref<>.
734 (emit_new_objfile_event): Use copy-initialization.
735 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
736 (emit_clear_objfiles_event): Use copy-initialization.
737 * python/py-signalevent.c (create_signal_event_object): Use
738 copy-initialization.
739 * python/py-threadevent.c (create_thread_event_object): Use
740 copy-initialization.
741
742 2018-08-24 Pedro Alves <palves@redhat.com>
743 Simon Marchi <simon.marchi@ericsson.com>
744
745 PR gdb/23379
746 * python/py-continueevent.c: Include "gdbthread.h".
747 (create_continue_event_object): Add intro comment. Add 'ptid'
748 parameter. Use it to find thread to pass to
749 create_thread_event_object.
750 (emit_continue_event): Pass PTID down to
751 create_continue_event_object.
752 * python/py-event.h (py_get_event_thread): Declare.
753 (create_thread_event_object): Remove default from 'thread'
754 parameter.
755 * python/py-stopevent.c (create_stop_event_object): Use
756 py_get_event_thread.
757 * python/py-threadevent.c (get_event_thread): Rename to ...
758 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
759 and use it to find the thread.
760 (create_thread_event_object): Assert that THREAD isn't null.
761 Don't find the event thread here.
762
763 2018-08-23 Kevin Buettner <kevinb@redhat.com>
764
765 * block.h (blockrange, blockranges): New struct declarations.
766 (struct block): Add new field named `ranges'.
767 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
768 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
769 macros for accessing ranges in struct block.
770 (make_blockranges): New declaration.
771 block.c (make_blockranges): New function.
772 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
773 for block.
774 * symtab.h (find_pc_partial_function): Add new parameter `block'.
775 * blockframe.c (cache_pc_function_block): New static global.
776 (clear_pc_function_cache): Clear cache_pc_function_block.
777 (find_pc_partial_function): Move comment to symtab.h. Add
778 support for non-contiguous blocks.
779 * cli/cli-cmds.c (block.h): Include.
780 (print_disassembly): Handle printing of non-contiguous blocks.
781 (disassemble_current_function): Likewise.
782 (disassemble_command): Likewise.
783
784 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
785 BLOCK_START.
786 * blockframe.c (get_pc_function_start): Likewise.
787 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
788 (gcc_symbol_address): Likewise.
789 * compile/compile-object-run.c (compile_object_run): Likewise.
790 * compile/compile.c (get_expr_block_and_pc): Likewise.
791 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
792 (func_addr_to_tail_call_list): Likewise.
793 * findvar.c (default_read_var_value): Likewise.
794 * inline-frame.c (inline_frame_this_id): Likewise.
795 (skip-inline_frames): Likewise.
796 * infcmd.c (until_next_command): Likewise.
797 * linespec.c (convert_linespec_to_sals): Likewise.
798 * parse.c (parse_exp_in_context_1): Likewise.
799 * printcmd.c (build_address_symbolic): likewise.
800 (info_address_command): Likewise.
801 symtab.c (find_function_start_sal): Likewise.
802 (skip_prologue_sal): Likewise.
803 (find_function_alias_target): Likewise.
804 (find_gnu_ifunc): Likewise.
805 * stack.c (find_frame_funname): Likewise.
806 * symtab.c (fixup_symbol_section): Likewise.
807 (find_function_start_sal): Likewise.
808 (skip_prologue_sal): Likewsie.
809 (find_function_alias_target): Likewise.
810 (find_gnu_ifunc): Likewise.
811 * tracepoint.c (info_scope_command): Likewise.
812 * value.c (value_fn_field): Likewise.
813
814 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
815 in place of find_pc_partial_function.
816 * blockframe.c (find_function_entry_range_from_pc): New function.
817 * symtab.h (find_function_entry_range_from_pc): Declare and document.
818 * objfiles.c (objfile_relocate1): Relocate start and end addresses
819 for each range in a block.
820
821
822 2018-08-23 Xavier Roirand <roirand@adacore.com>
823
824 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
825 incrementation.
826
827 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
828
829 * solib-svr4.c (read_program_headers_from_bfd): Return
830 gdb::optional<gdb::byte_vector>.
831 (svr4_exec_displacement): Adjust.
832
833 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
834
835 * solib-svr4.c (read_program_header): Return
836 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
837 (find_program_interpreter): Return
838 gdb::optional<gdb::byte_vector>.
839 (scan_dyntag_auxv): Adjust.
840 (enable_break): Adjust.
841 (svr4_exec_displacement): Adjust.
842
843 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
844
845 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
846 * inf-child.c (inf_child_target::terminal_save_inferior): New.
847
848 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
849
850 * guile/scm-string.c (gdbscm_scm_from_printf): Use
851 string_vprintf.
852 * guile/scm-utils.c (gdbscm_printf): Likewise.
853 * serial.c (serial_printf): Likewise.
854 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
855
856 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
857
858 * stack.c (print_frame): Print frame architecture when printing on
859 an MI output.
860 * NEWS: Mention new "arch" attribute in frame output.
861
862 2018-08-21 Alan Hayward <alan.hayward@arm.com>
863
864 * arch/aarch64.h (aarch64_regnum): Update comment.
865
866 2018-08-21 Alan Hayward <alan.hayward@arm.com>
867
868 * NEWS: Add SVE to 8.2 section.
869
870 2018-08-21 Pedro Alves <palves@redhat.com>
871
872 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
873 out from gdbscm_parse_function_args.
874 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
875 gdbscm_parse_function_args_1.
876
877 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
878
879 PR gdb/17816
880 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
881 operator.
882
883 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
884
885 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
886
887 2018-08-19 Michael Spang <spang@google.com>
888
889 PR gdb/11786
890 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
891 for PT_TLS segments.
892
893 2018-08-18 Kevin Buettner <kevinb@redhat.com>
894
895 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
896 dwarf_variable_value.
897 * dwarf2-frame.c (class dwarf_expr_executor):
898 Add override for dwarf_variable_value.
899 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
900 (class symbol_needs_eval_context): Likewise.
901 (indirect_synthetic_pointer): Add forward declaration.
902 (sect_variable_value): New function.
903 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
904 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
905 for DW_OP_GNU_variable_value.
906
907 2018-08-16 Tom Tromey <tom@tromey.com>
908
909 * top.c (read_command_file): Update.
910 (command_line_input): Remove "repeat" argument.
911 * ada-lang.c (get_selections): Update.
912 * linespec.c (decode_line_2): Update.
913 * defs.h (command_line_input): Remove argument.
914 * cli/cli-script.c (read_next_line): Update.
915 * python/py-gdb-readline.c: Update.
916
917 2018-08-17 Tom Tromey <tom@tromey.com>
918
919 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
920 command_line_input.
921
922 2018-08-15 Tom Tromey <tom@tromey.com>
923
924 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
925
926 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
927
928 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
929 If used, use find_pc_partial_function to find address range
930 to disassemble.
931 * mi/mi-main.c (mi_cmd_list_features): Report
932 "data-disassemble-a-option" feature.
933 * NEWS: Mention new -data-disassemble option -a.
934
935 2018-08-13 Tom Tromey <tom@tromey.com>
936
937 * common/common-defs.h (_FORTIFY_SOURCE): Define.
938
939 2018-08-13 Alan Hayward <alan.hayward@arm.com>
940
941 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
942 (aarch64_linux_collect_sve_regset): Likewise.
943 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
944 * regcache.h (regcache_map_entry_size): New function.
945
946 2018-08-13 Alan Hayward <alan.hayward@arm.com>
947
948 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
949 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
950 (SVE_HEADER_VL_LENGTH): Likewise.
951 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
952 (SVE_HEADER_FLAGS_LENGTH): Likewise.
953 (SVE_HEADER_RESERVED_LENGTH): Likewise.
954 (SVE_HEADER_SIZE_OFFSET): Likewise.
955 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
956 (SVE_HEADER_VL_OFFSET): Likewise.
957 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
958 (SVE_HEADER_FLAGS_OFFSET): Likewise.
959 (SVE_HEADER_RESERVED_OFFSET): Likewise.
960 (SVE_HEADER_SIZE): Likewise.
961 (aarch64_linux_core_read_vq): Add function.
962 (aarch64_linux_core_read_description): Check for SVE section.
963
964 2018-08-13 Alan Hayward <alan.hayward@arm.com>
965
966 * aarch64-fbsd-tdep.c
967 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
968 collect_size.
969 * aarch64-linux-tdep.c
970 (aarch64_linux_iterate_over_regset_sections): Likewise.
971 * alpha-linux-tdep.c
972 (alpha_linux_iterate_over_regset_sections):
973 * alpha-nbsd-tdep.c
974 (alphanbsd_iterate_over_regset_sections): Likewise.
975 * amd64-fbsd-tdep.c
976 (amd64fbsd_iterate_over_regset_sections): Likewise.
977 * amd64-linux-tdep.c
978 (amd64_linux_iterate_over_regset_sections): Likewise.
979 * arm-bsd-tdep.c
980 (armbsd_iterate_over_regset_sections): Likewise.
981 * arm-fbsd-tdep.c
982 (arm_fbsd_iterate_over_regset_sections): Likewise.
983 * arm-linux-tdep.c
984 (arm_linux_iterate_over_regset_sections): Likewise.
985 * corelow.c (get_core_registers_cb): Likewise.
986 (core_target::fetch_registers): Likewise.
987 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
988 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
989 * gdbarch.h (void): Regenerate.
990 * gdbarch.sh: Add supply_size and collect_size.
991 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
992 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
993 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
994 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
995 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
996 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
997 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
998 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
999 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1000 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1001 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1002 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1003 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1004 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1005 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1006 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1007 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1008 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1009 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1010 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1011 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1012 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1013 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1014 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1015 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1016 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1017 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1018 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1019 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1020 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1021
1022 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1023
1024 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1025 with string_printf.
1026
1027 2018-08-10 Keith Seitz <keiths@redhat.com>
1028
1029 * compile/compile-c-support.c (add_code_header, add_code_footer):
1030 Move into policy class.
1031 (c_push_user_expression, pop_user_expression_nop)
1032 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1033 (compile_program): New host class.
1034 (c_compile_program): New typedef.
1035 (c_compute_porgram): Use c_compile_program.
1036
1037 2018-08-10 Keith Seitz <keiths@redhat.com>
1038
1039 * compile/compile-internal.h (compile_instance::~compile_instance):
1040 Remove calls to htab_delete.
1041 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1042 * compile.c (compile_instance::compile_instance): Initialize
1043 htab unique pointers.
1044 (compile_instance::get_cached_type, compile_instance::insert_type)
1045 (compile_instance::error_symbol_once): Update for unique_ptr.
1046
1047 2018-08-10 Keith Seitz <keiths@redhat.com>
1048
1049 * compile/compile-c-symbols.c (struct symbol_error)
1050 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1051 (compile_instance::insert_symbol_error)
1052 (compile_instance::error_symbol_once): Move to ...
1053 * compile/compile.c: ... here.
1054
1055 2018-08-10 Keith Seitz <keiths@redhat.com>
1056
1057 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1058 instead of `new_compile_instance'.
1059 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1060 Update description.
1061 If the symbol error map is not initialized, create it.
1062 (generate_c_for_for_one_symbol): Do not check/initialize
1063 the symbol error map.
1064 * compile/compile-c-types.c (compile_c_instance): Make a class.
1065 Update all callers.
1066 (compile_instance::compile_instance): Initialize the type cache.
1067 (get_cached_type): New function.
1068 (insert_type): Update description.
1069 (compile_c_instance::m_default_cflags): Define.
1070 (convert_type): Update description. Use get_cached_type.
1071 (delete_instance): Moved to destructor.
1072 (new_compile_instance): Moved to constructor.
1073 * compile/compile-c.h (compile_c_instance): Make class inheriting
1074 from compile_instance.
1075 <base>: Remove field.
1076 <type_map, symbol_err_map>: Move to base class.
1077 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1078 * compile/compile-internal.h (compile_instance): Make class.
1079 <type_map_t, symbol_err_map_t>: Define.
1080 <fe>: Rename to `m_gcc_fe'.
1081 <scope, block, gcc_target_options>: Add `m_' prefix.
1082 <m_type_map, m_symbol_err_map>: New fields, moved from
1083 compile_c_instance.
1084 <destroy>: Remove.
1085 (convert_type, new_compile_instance): Remove.
1086 * compile/compile.c (cleanup_compile_instance): Remove.
1087 (compile_to_object): Use unique_ptr to eliminate cleanups.
1088 (compile_instance::set_print_callback, compile_instance::version)
1089 (compile_instance::set_verbose)
1090 (compile_instance::set_driver_filename)
1091 (compile_instance::set_triplet_regexp)
1092 (compile_instance::set_arguments)
1093 (compile_instance::set_source_file)
1094 (compile_instance::compile): Define.
1095
1096 2018-08-10 Keith Seitz <keiths@redhat.com>
1097
1098 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1099 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1100 gcc-c-fe.def to define C plugin.
1101 (delete_instance): Delete `c_plugin'.
1102 (new_compile_instance): Initialize `c_plugin'.
1103 * compile/compile-c.h: Include gcc_c_plugin.h.
1104 (struct compile_c_instance) <c_plugin>: New member.
1105 * gcc-c-plugin.h: New file.
1106 Update all callers with API change.
1107
1108 2018-08-10 Keith Seitz <keiths@redhat.com>
1109
1110 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1111 (HFILES_NO_SRCDIR): ... to here.
1112 Add compile-internal.h and compile-c.h.
1113 * compile/compile-c-support.c: Include compile-c.h.
1114 * compile/compile-c-symbols.c: Include compile-c.h.
1115 (generate_c_for_variable_locations): Update comment.
1116 * compile/compile-c-types.c: Include compile-c.h.
1117 * compile/compile-c.h: New file -- moved C language declarations
1118 from other files here.
1119 * compile/compile-internal.h: Do not include hashtab.h or
1120 common/enum-flags.h.
1121 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1122 (gcc_convert_symbol, gcc_symbol_address)
1123 (generate_c_for_variable_locations, c_get_mode_for_size)
1124 (c_get_range_decl_name): Definitions moved to compile-c.h.
1125 * compile/compile-loc2c.c: Include compile-c.h.
1126
1127 2018-08-10 Keith Seitz <keiths@redhat.com>
1128
1129 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1130 (c_symbol_substitution_name): ... this.
1131 Update all callers.
1132
1133 2018-08-10 Keith Seitz <keiths@redhat.com>
1134
1135 * compile/compile-c-support.c (c_compute_program): Use
1136 unique_xmalloc_ptr to eliminate cleanup.
1137 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1138 Return a unique_xmalloc_ptr and eliminate cleanup.
1139 * compile/compile-internal.h (generate_c_for_variable_locations):
1140 Return unique_xmalloc_ptr and update description.
1141
1142 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1143
1144 * corelow.c (core_target::get_core_register_section): Rename
1145 min_size to section_min_size.
1146
1147 2018-08-09 Jim Wilson <jimw@sifive.com>
1148
1149 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1150 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1151 * NEWS: Mention new GNU/Linux RISC-V target.
1152 * configure.host: Add riscv*-*-linux*.
1153 * configure.nat: Add riscv*.
1154 * configure.tgt: Add riscv*-*-linux*.
1155 * riscv-linux-nat.c: New file.
1156 * riscv-linux-tdep.c: New file.
1157
1158 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1159
1160 * infrun.c (resume): Make static, add forward declaration.
1161 (proceed): Update header comment.
1162 * infrun.h (resume): Delete declaration.
1163
1164 2018-08-09 Tom Tromey <tom@tromey.com>
1165
1166 * riscv-tdep.h: Minor formatting fixes.
1167
1168 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1171 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1172 (test_mkdir_recursive): Likewise.
1173 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1174
1175 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1176
1177 * valarith.c (value_subscripted_rvalue): If an array is not in
1178 memory, and we don't know the upper bound, then we can't know that
1179 the requested element exists or not.
1180
1181 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1184 (target_options_to_string): Add comment.
1185
1186 2018-08-08 Tom Tromey <tom@tromey.com>
1187
1188 * unittests/scoped_mmap-selftests.c: Check result of "write".
1189
1190 2018-08-08 Jim Wilson <jimw@sifive.com>
1191
1192 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1193 (decode_register_index_short): New.
1194 (decode_j_type_insn, decode_cj_type_insn): New.
1195 (decode_b_type_insn, decode_cb_type_insn): New.
1196 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1197 local xlen. Check xlen when decoding ambiguous compressed insns. In
1198 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1199 is_c_sw_insn instead of is_sw_insn.
1200 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1201 (riscv_software_single_step): New.
1202 * riscv-tdep.h (riscv_software_single_step): Declare.
1203
1204 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1205 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1206
1207 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1208
1209 PR gdb/18050:
1210 * target.c (dispose_inferior): Don't dispose of inferiors that are
1211 already killed.
1212
1213 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1214
1215 * remote.c (remote_target::download_tracepoint): Change char* to
1216 const char*.
1217
1218 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1219
1220 * target.h (target_options_to_string): Return an std::string.
1221 * target.c (str_comma_list_concat_elem): Return void, use
1222 std::string.
1223 (do_option): Likewise.
1224 (target_options_to_string): Return an std::string.
1225 * linux-nat.c (linux_nat_target::wait): Adjust.
1226 * target-debug.h (target_debug_print_options): Adjust.
1227
1228 2018-08-07 Tom Tromey <tom@tromey.com>
1229
1230 * Makefile.in (CPPFLAGS): New variable.
1231 (INTERNAL_CPPFLAGS): Use it.
1232
1233 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1234
1235 * NEWS: Mention the index cache.
1236
1237 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1238
1239 * common/pathstuff.h (get_standard_cache_dir): New.
1240 * common/pathstuff.c (get_standard_cache_dir): New.
1241 * build-id.h (build_id_to_string): New.
1242 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1243 DEBUG_STR_SUFFIX): Move to here.
1244 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1245 DEBUG_STR_SUFFIX): Move from there.
1246 (write_psymtabs_to_index): Make non-static, add basename
1247 parameter. Write to temporary files, rename when done.
1248 (save_gdb_index_command): Adjust call to
1249 write_psymtabs_to_index.
1250 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1251 field.
1252 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1253 (get_gdb_index_contents_from_cache): New.
1254 (get_gdb_index_contents_from_cache_dwz): New.
1255 (dwarf2_initialize_objfile): Read index from cache.
1256 (dwarf2_build_psymtabs): Save to index.
1257 * dwarf-index-cache.h: New file.
1258 * dwarf-index-cache.c: New file.
1259 * dwarf-index-write.h: New file.
1260
1261 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1262
1263 * gnulib/aclocal.m4: Re-generate.
1264 * gnulib/config.in: Re-generate.
1265 * gnulib/configure: Re-generate.
1266 * gnulib/import/Makefile.am: Re-generate.
1267 * gnulib/import/Makefile.in: Re-generate.
1268 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1269 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1270 * gnulib/import/m4/mkdir.m4: New file.
1271 * gnulib/import/mkdir.c: New file.
1272 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1273 module.
1274
1275 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1278 * common/scoped_mmap.c: New file.
1279 * common/scoped_mmap.h (destroy): New method.
1280 (~scoped_mmap, reset): Use destroy.
1281 (scoped_mmap): New move constructor.
1282 (mmap_file): New declaration.
1283 * unittests/scoped_mmap-selftests.c (test_normal,
1284 test_invalid_filename, run_tests): New functions.
1285 (_initialize_scoped_mmap_selftests): Register selftest.
1286
1287 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1290 (read_gdb_index_from_buffer): ... this. Remove section
1291 parameter, add buffer parameter.
1292 (get_gdb_index_contents_ftype,
1293 get_gdb_index_contents_dwz_ftype): New typedefs.
1294 (dwarf2_read_gdb_index): Add callback parameters to get the
1295 index contents.
1296 (get_gdb_index_contents_from_section): New.
1297 (dwarf2_initialize_objfile): Update call to
1298 dwarf2_read_gdb_index.
1299
1300 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1303 (gdb_open_cloexec): Likewise.
1304 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1305 (commandline_from_pid): Likewise.
1306 (linux_xfer_osdata_threads): Likewise.
1307 (linux_xfer_osdata_fds): Likewise.
1308 * ada-lang.c (is_package_name): Likewise.
1309 * auxv.c (procfs_xfer_auxv): Likewise.
1310 * breakpoint.c (print_one_breakpoint_location): Use
1311 uiout::field_fmt.
1312 (print_one_catch_solib): Use string_printf.
1313 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1314 (add_pe_forwarded_sym): Likewise.
1315 * dwarf2read.c (create_type_unit_group): Likewise.
1316 (build_error_marker_type): Likewise.
1317 * infcall.c (get_function_name): Likewise.
1318 * valprint.c (print_converted_chars_to_obstack): Likewise.
1319 * xtensa-tdep.c (xtensa_register_type): Likewise.
1320
1321 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * remote.c (remote_target::download_tracepoint): Fix format
1324 string errors.
1325
1326 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1327
1328 * tracefile.c: Include common/byte-vector.h.
1329 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1330 with trace_regblock_size if needed. Update uses of buf.
1331
1332 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1333
1334 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1335 std::vector<unsigned char>.
1336 * tracepoint.c (collection_list::collection_list): Remove
1337 m_regs_mask initializer from initializer list. Resize
1338 m_regs_mask using the largest remote register number.
1339 (collection_list::add_remote_register): Remove size check on
1340 m_regs_mask. Use at to access element.
1341 (collection_list::stringify): Change type of temp_buf to
1342 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1343 stringify the register mask. Use pack_hex_byte for the register
1344 mask.
1345
1346 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1347
1348 * tracepoint.h (class collection_list) <add_register>: Remove.
1349 <add_remote_register, add_ax_registers, add_local_register>:
1350 Declare.
1351 <add_memrange>: Add scope parameter.
1352 * tracepoint.c (encode_actions_1): Likewise.
1353 (collection_list::add_register): Rename to ...
1354 (collection_list::add_remote_register): ... this. Update
1355 comment.
1356 (collection_list::add_ax_registers, add_local_register): New
1357 methods.
1358 (collection_list::add_memrange): Add scope parameter. Call
1359 add_local_register instead of add_register.
1360 (finalize_tracepoint_aexpr): New function.
1361 (collection_list::collect_symbol): Update calls to add_memrange.
1362 Call add_local_register instead of add_register. Call
1363 add_ax_registers. Call finalize_tracepoint_aexpr.
1364 (encode_actions_1): Get remote regnos for $reg action. Call
1365 add_remote_register, add_ax_registers, and add_local_register.
1366 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1367 (validate_actionline): Call finalize_tracepoint_aexpr.
1368
1369 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1370
1371 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1372 Replace array buf with gdb::char_vector buf, of size
1373 get_remote_packet_size (). Replace references to buf and
1374 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1375 and xsnprintf with snprintf. Raise errors if the buffer is too
1376 small.
1377
1378 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1379
1380 * remote.c (remote_target::download_tracepoint): Fix the has_more
1381 predicate in the QTDP action list iteration.
1382
1383 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1384
1385 * remote.c (remote_target::download_tracepoint): Fix indentation
1386 in for block.
1387
1388 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1389
1390 * proc-api.c (_initialize_proc_api): Remove c, unused.
1391 * procfs.c (procfs_init_inferior): Remove signals, unused.
1392 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1393 unused.
1394
1395 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1396 Andrew Burgess <andrew.burgess@embecosm.com>
1397
1398 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1399 'W_STOPCODE (0)' as this could be ambiguous.
1400
1401 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1402
1403 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1404 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1405 "ai_socktype").
1406
1407 2018-08-02 Tom Tromey <tom@tromey.com>
1408
1409 PR symtab/16842.
1410 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1411 symbols.
1412 (process_structure_scope): Likewise.
1413
1414 2018-08-02 Xavier Roirand <roirand@adacore.com>
1415
1416 PR gdb/22629:
1417 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1418 kill inferior.
1419
1420 2018-08-02 Tom Tromey <tom@tromey.com>
1421
1422 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1423 (darwin_suspend_inferior, darwin_resume_inferior)
1424 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1425 (darwin_check_new_threads): Check result of get_darwin_inferior.
1426
1427 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1428
1429 GDB 8.1.1 released.
1430
1431 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1432
1433 * varobj.c (varobj_get_path_expr_parent): Report an error if
1434 parent is a dynamic varobj.
1435
1436 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1437
1438 * gnulib/aclocal.m4: Re-generate.
1439 * gnulib/config.in: Re-generate.
1440 * gnulib/configure: Re-generate.
1441 * gnulib/import/Makefile.in: Re-generate.
1442 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1443 * gnulib/import/m4/onceonly.m4: Re-generate.
1444
1445 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1446
1447 * target-descriptions.c (struct xml_test_tdesc): New.
1448 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1449 (record_xml_tdesc): Update.
1450 (maintenance_check_xml_descriptions): Update.
1451 * target-descriptions.h (record_xml_tdesc): Update comment.
1452
1453 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1454
1455 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1456 checking array bounds are defined.
1457
1458 2018-07-30 Tom Tromey <tom@tromey.com>
1459
1460 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1461 irreflexivity violation.
1462
1463 2018-07-30 Tom Tromey <tom@tromey.com>
1464
1465 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1466 * value.c (unpack_long): Remove lint code.
1467 * valops.c (value_ind): Remove lint code.
1468 * valarith.c (value_x_binop, value_x_unop, value_equal)
1469 (value_pos): Remove lint code.
1470
1471 2018-07-28 Tom de Vries <tdevries@suse.de>
1472
1473 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1474 with undefined upper bound as <optimized out>.
1475
1476 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1477
1478 * gcore.in: Rename variable "name" to "prefix". Expand
1479 "usage" text.
1480
1481 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1482
1483 * windows-nat.c (windows_nat_target::create_inferior): Update to
1484 call close() in global namespace.
1485
1486 2018-07-26 Tom Tromey <tom@tromey.com>
1487
1488 * dwarf-index-write.c (add_address_entry): Don't add objfile
1489 offsets.
1490 * dbxread.c (find_stab_function): Rename from
1491 find_stab_function_addr. Return a bound_minimal_symbol.
1492 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1493 Don't add objfile offsets.
1494 (end_psymtab): Use raw_text_low, raw_text_high,
1495 MSYMBOL_VALUE_RAW_ADDRESS.
1496 (read_ofile_symtab): Update.
1497 (process_one_symbol): Update.
1498 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1499 offsets.
1500 (dw2_relocate): Remove.
1501 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1502 searching addrmap.
1503 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1504 Update.
1505 (process_psymtab_comp_unit_reader, add_partial_symbol)
1506 (add_partial_subprogram, dwarf2_ranges_read): Update.
1507 (load_partial_dies): Update.
1508 (add_address_entry): Don't add objfile offsets.
1509 (dwarf2_build_include_psymtabs): Update.
1510 (create_addrmap_from_aranges): Don't add objfile offsets.
1511 (dw2_find_pc_sect_compunit_symtab): Update.
1512 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1513 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1514 Update.
1515 (parse_partial_symbols): Don't add objfile offsets. Use
1516 raw_text_low, raw_text_high. Update.
1517 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1518 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1519 or call 'relocate' quick function. Clear psymbol_map.
1520 * psympriv.h (struct partial_symbol) <address>: Add section
1521 offset.
1522 <set_unrelocated_address>: Rename from set_address.
1523 <raw_text_low, raw_text_high>: New methods.
1524 <text_low, text_high>: Add objfile parameter.
1525 (add_psymbol_to_bcache): Add 'section' parameter. Call
1526 set_unrelocated_address.
1527 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1528 (find_pc_psymbol): Update.
1529 (fixup_psymbol_section, relocate_psymtabs): Remove.
1530 (dump_psymtab, psym_functions): Update.
1531 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1532 parameter.
1533 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1534 (start_psymtab_common): Update.
1535 * symfile-debug.c (debug_qf_relocate): Remove.
1536 (debug_sym_quick_functions): Update.
1537 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1538 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1539 Update.
1540
1541 2018-07-26 Tom Tromey <tromey@redhat.com>
1542
1543 * dbxread.c (end_psymtab): Use text_high_valid and
1544 text_low_valid.
1545 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1546 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1547 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1548 Update comment.
1549 <text_low_valid, text_high_valid>: New fields.
1550 <set_text_low, set_text_high>: Update.
1551 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1552
1553 2018-07-26 Tom Tromey <tom@tromey.com>
1554
1555 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1556 Update.
1557 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1558 textlow and texthigh fields.
1559 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1560 Update.
1561 * mdebugread.c (parse_lines, parse_partial_symbols)
1562 (psymtab_to_symtab_1): Update.
1563 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1564 Rename fields. Update comment. Now private.
1565 <text_low, text_high, set_text_low, set_text_high>: New methods.
1566 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1567 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1568 (start_psymtab_common, maintenance_info_psymtabs)
1569 (maintenance_check_psymtabs): Update.
1570 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1571 texthigh fields.
1572 (scan_xcoff_symtab): Update.
1573
1574 2018-07-26 Tom Tromey <tromey@redhat.com>
1575
1576 * psympriv.h (struct partial_symbol) <unrelocated_address,
1577 address, set_address>: New methods.
1578 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1579 (fixup_psymbol_section, relocate_psymtabs): Update.
1580 (print_partial_symbols): Add 'objfile' parameter. Update.
1581 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1582 Update.
1583
1584 2018-07-26 Tom Tromey <tom@tromey.com>
1585
1586 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1587 (debug_names::write_psymbols): Update.
1588 * psympriv.h (struct partial_symbol): Derive from
1589 general_symbol_info.
1590 <obj_section>: New method.
1591 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1592 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1593 (find_pc_sect_psymbol, fixup_psymbol_section)
1594 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1595 (print_partial_symbols, recursively_search_psymtabs)
1596 (compare_psymbols, psymbol_hash, psymbol_compare)
1597 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1598 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1599
1600 2018-07-26 Tom Tromey <tromey@redhat.com>
1601
1602 * dbxread.c (end_psymtab): Remove dead code.
1603
1604 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1605
1606 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1607 DWARF unwinders are disabled.
1608 * dwarf2-frame.c: Add dwarf2read.h include.
1609 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1610 disabled.
1611 (dwarf2_frame_unwinders_enabled_p): Define.
1612 (show_dwarf_unwinders_enabled_p): New function.
1613 (_initialize_dwarf2_frame): Register switch to control DWARF
1614 unwinder use.
1615 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1616 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1617 (show_dwarf_cmdlist): Remove static keyword.
1618 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1619 (show_dwarf_cmdlist): Declare.
1620 * NEWS: Document new feature.
1621
1622 2018-07-26 Tom de Vries <tdevries@suse.de>
1623
1624 PR breakpoints/23366
1625 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1626
1627 2018-07-26 Tom de Vries <tdevries@suse.de>
1628
1629 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1630 DW_AT_count can't be translated to a dynamic prop.
1631
1632 2018-07-25 Tom de Vries <tdevries@suse.de>
1633
1634 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1635 try/catch.
1636
1637 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1638
1639 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1640
1641 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1642
1643 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1644
1645 2018-07-24 Keith Seitz <keiths@redhat.comt
1646
1647 PR symtab/23010
1648 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1649 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1650 instead of add_symbol_to_list.
1651 (read_file_scope): Call prepare_one_comp_unit before reading
1652 any other DIEs.
1653
1654 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1655
1656 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1657
1658 2018-07-24 Tom Tromey <tom@tromey.com>
1659
1660 * utils.c (malloc, realloc, free): Don't declare.
1661 * configure, config.in: Rebuild.
1662 * configure.ac: Don't check for declarations of free, malloc, or
1663 realloc.
1664
1665 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1666
1667 * aarch64-linux-nat.c
1668 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1669 variable.
1670 * arm-linux-nat.c (fetch_regs): Likewise.
1671 (store_regs): Likewise.
1672 (fetch_vfp_regs): Likewise.
1673 (store_vfp_regs): Likewise.
1674 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1675 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1676 (arm_linux_nat_target::insert_watchpoint): Likewise.
1677 (arm_linux_nat_target::remove_watchpoint): Likewise.
1678 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1679 Likewise.
1680 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1681 Likewise.
1682 * ppc-linux-nat.c (fetch_register): Likewise.
1683 (fetch_all_gp_regs): Likewise.
1684 (fetch_ppc_registers): Likewise.
1685 (store_all_gp_regs): Likewise.
1686 (store_ppc_registers): Likewise.
1687 (hwdebug_insert_point): Likewise.
1688 (can_use_watchpoint_cond_accel): Likewise.
1689 * remote-sim.c (gdb_os_write_stdout): Likewise.
1690
1691 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1692 Tom Tromey <tom@tromey.com>
1693
1694 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1695 test for it.
1696 * configure: Rebuild.
1697
1698 2018-07-22 Tom Tromey <tom@tromey.com>
1699
1700 * regformats/regdat.sh: Define xmltarget_${name} inside
1701 #ifndef IN_PROCESS_AGENT.
1702
1703 2018-07-22 Tom Tromey <tom@tromey.com>
1704
1705 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1706
1707 2018-07-22 Tom Tromey <tom@tromey.com>
1708
1709 * symfile.c (reread_symbols): Notify iter, not objfile.
1710
1711 2018-07-22 Tom Tromey <tom@tromey.com>
1712
1713 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1714 Use arch_ops.
1715 (ravenscar_thread_target::prepare_to_store): Likewise.
1716
1717 2018-07-22 Tom Tromey <tom@tromey.com>
1718
1719 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1720 unused variable. Call value_fetch_lazy when needed.
1721 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1722 Remove unused variable. Call value_fetch_lazy when needed.
1723
1724 2018-07-22 Tom Tromey <tom@tromey.com>
1725
1726 * m32c-tdep.c (mark_dma): Return void.
1727 (make_regs): Remove unused declarations.
1728
1729 2018-07-22 Tom Tromey <tom@tromey.com>
1730
1731 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1732 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1733 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1734 bkscm_get_valid_block_smob_arg_unsafe for effect.
1735
1736 2018-07-22 Tom Tromey <tom@tromey.com>
1737
1738 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1739 value_type.
1740
1741 2018-07-22 Tom Tromey <tom@tromey.com>
1742
1743 * windows-nat.c (saved_context): Conditionally define.
1744 * remote.c (remote_target::remote_btrace_maybe_reopen):
1745 Conditionally declare "warned".
1746 * inflow.c (sigquit_ours): Conditionally define.
1747 (new_tty): Move "tty" declaration inside #if.
1748 * guile/guile.c (guile_datadir): Conditionally define.
1749 * charset.c (set_be_le_names): Move some declarations inside #if.
1750 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1751 #if.
1752 (parse_xml_btrace_conf): Likewise.
1753
1754 2018-07-22 Tom Tromey <tom@tromey.com>
1755
1756 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1757
1758 2018-07-22 Tom Tromey <tom@tromey.com>
1759
1760 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1761 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1762 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1763 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1764 * stack.c (frame_apply_level_command): Remove unused variable.
1765 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1766 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1767 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1768 unused variable.
1769 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1770 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1771 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1772 variable.
1773 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1774 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1775 variable.
1776 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1777 Remove unused variable.
1778 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1779 variable.
1780 * common/tdesc.c (print_xml_feature::visit): Remove unused
1781 variable.
1782 * compile/compile-object-load.c (store_regs): Remove unused
1783 variables.
1784 * complaints.c (clear_complaints): Remove unused variable.
1785 * corelow.c (core_target_open): Remove unused variable.
1786 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1787 variable.
1788 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1789 variable.
1790 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1791 variable.
1792 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1793 variable.
1794 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1795 variable.
1796 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1797 variable.
1798 * ia64-tdep.c (examine_prologue): Remove unused variable.
1799 * infcall.c (run_inferior_call): Remove unused variable.
1800 * inferior.c (exit_inferior): Remove unused variable.
1801 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1802 * linespec.c (decode_line_2): Remove unused variable.
1803 * linux-nat.c (super_close): Remove.
1804 * linux-tdep.c (linux_info_proc): Remove unused variable.
1805 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1806 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1807 Remove unused variable.
1808 * parse.c (find_minsym_type_and_address): Remove unused variable.
1809 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1810 variable.
1811 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1812 variable.
1813 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1814 variables.
1815 * record-btrace.c (record_btrace_target::store_registers): Remove
1816 unused variable.
1817 (cmd_show_record_btrace_cpu): Remove unused variable.
1818 * riscv-tdep.c (riscv_register_reggroup_p)
1819 (riscv_push_dummy_call, riscv_return_value): Remove unused
1820 variable.
1821 * rust-exp.y (literal): Remove unused variable.
1822 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1823 unused variable.
1824 <STRUCTOP_ANONYMOUS>: Likewise.
1825 * s390-linux-tdep.c (s390_linux_init_abi_31)
1826 (s390_linux_init_abi_64): Remove unused variable.
1827 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1828 (file_select_thread, net_windows_open, _initialize_ser_windows):
1829 Remove unused variables.
1830 * symtab.c (find_pc_sect_line): Remove unused variable.
1831 * target-memory.c (compute_garbled_blocks): Remove unused
1832 variable.
1833 (target_write_memory_blocks): Remove unused variable.
1834 * target.c (target_stack::unpush): Remove unused variables.
1835 * tracepoint.c (start_tracing, all_tracepoint_actions)
1836 (merge_uploaded_trace_state_variables)
1837 (print_one_static_tracepoint_marker): Remove unused variable.
1838 * unittests/basic_string_view/element_access/char/1.cc (test01):
1839 Remove unused variable.
1840 * windows-nat.c (windows_continue, windows_add_all_dlls)
1841 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1842 Remove unused variables.
1843
1844 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1845
1846 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1847 attr_profile in HAVE_ELF.
1848 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1849 HAVE_ELF.
1850
1851 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * frame.c (frame_register_unwind): Change parameter name.
1854 (frame_unwind_register): Likewise.
1855 (frame_unwind_register_value): Likewise.
1856 (frame_unwind_register_signed): Likewise.
1857 (frame_unwind_register_unsigned): Likewise.
1858 * frame.h (frame_register_unwind): Likewise.
1859 (frame_unwind_register): Likewise.
1860 (frame_unwind_register_value): Likewise.
1861 (frame_unwind_register_signed): Likewise.
1862 (frame_unwind_register_unsigned): Likewise.
1863 (frame_unwind_arch): Likewise.
1864
1865 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1866
1867 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1868 ISA maintenance.
1869
1870 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1871
1872 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1873 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1874 hand.
1875
1876 2018-07-20 Keith Seitz <keiths@redhat.com>
1877
1878 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1879 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1880 m_compunit_symtab, m_language>: Add "m_" prefix.
1881 Update all uses.
1882 * buildsym.c: Update all uses.
1883
1884 2018-07-20 Tom Tromey <tom@tromey.com>
1885
1886 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1887 * buildsym.h (record_line_ftype): Remove typedef.
1888
1889 2018-07-20 Tom Tromey <tom@tromey.com>
1890
1891 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1892 (end_expandable_symtab): Likewise.
1893 (end_symtab_get_static_block): Likewise.
1894 (end_symtab_from_static_block): Likewise.
1895 * buildsym-legacy.c (augment_type_symtab): Remove.
1896 (end_expandable_symtab): Remove.
1897 (end_symtab_get_static_block): Remove.
1898 (end_symtab_from_static_block): Remove.
1899
1900 2018-07-20 Tom Tromey <tom@tromey.com>
1901
1902 * dwarf2read.c: Include buildsym.h.
1903 (struct dwarf2_cu) <builder>: New method.
1904 (fixup_go_packaging): Update.
1905 (process_full_comp_unit, process_full_type_unit): Update. Don't
1906 use scoped_free_pendings.
1907 (using_directives): Add "cu" parameter, remove "language".
1908 (read_import_statement, setup_type_unit_groups, )
1909 (read_func_scope, read_lexical_block_scope)
1910 (dwarf2_record_block_ranges, read_namespace): Update.
1911 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1912 (lnp_state_machine::handle_end_sequence): Update.
1913 (class lnp_state_machine) <m_cu>: New member.
1914 <m_record_line_callback>: Remove.
1915 <m_currently_recording_lines>: New member.
1916 (lnp_state_machine::handle_set_file): Update.
1917 (noop_record_line): Remove.
1918 (dwarf_record_line_p): Add cu parameter.
1919 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1920 (lnp_state_machine::record_line)
1921 (lnp_state_machine::lnp_state_machine)
1922 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1923 (dwarf_decode_lines): Update.
1924 (dwarf2_start_subfile): Add cu parameter.
1925 (dwarf2_start_symtab, new_symbol): Update.
1926 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1927 Remove dwarf2_per_objfile parameter.
1928 (dwarf_decode_macros): Update.
1929
1930 2018-07-20 Tom Tromey <tom@tromey.com>
1931
1932 * stabsread.c (define_symbol): Update.
1933 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1934 * dwarf2read.c (new_symbol): Update.
1935 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1936 * cp-namespace.c: Include buildsym.h.
1937 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1938 * buildsym-legacy.c (get_buildsym_compunit): New function.
1939
1940 2018-07-20 Tom Tromey <tom@tromey.com>
1941
1942 * xcoffread.c: Include buildsym-legacy.h.
1943 * windows-nat.c: Include buildsym-legacy.h.
1944 * stabsread.c: Include buildsym-legacy.h.
1945 * mdebugread.c: Include buildsym-legacy.h.
1946 * buildsym-legacy.h: New file.
1947 * buildsym-legacy.c: New file, from buildsym.c.
1948 * go32-nat.c: Include buildsym-legacy.h.
1949 * dwarf2read.c: Include buildsym-legacy.h.
1950 * dbxread.c: Include buildsym-legacy.h.
1951 * cp-namespace.c: Include buildsym-legacy.h.
1952 * coffread.c: Include buildsym-legacy.h.
1953 * buildsym.h: Move some contents to buildsym-legacy.h.
1954 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1955 buildsym-legacy.c.
1956 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1957
1958 2018-07-20 Tom Tromey <tom@tromey.com>
1959
1960 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1961 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1962 (buildsym_compunit::buildsym_compunit)
1963 (buildsym_compunit::~buildsym_compunit)
1964 (buildsym_compunit::get_macro_table): Define.
1965
1966 2018-07-20 Tom Tromey <tom@tromey.com>
1967
1968 * buildsym.c (reset_symtab_globals): Remove.
1969 (buildsym_compunit::end_symtab_from_static_block): Update.
1970 (buildsym_compunit::augment_type_symtab): Update.
1971 (end_symtab_from_static_block): Call free_buildsym_compunit.
1972 (augment_type_symtab, end_symtab, end_expandable_symtab):
1973 Likewise.
1974
1975 2018-07-20 Tom Tromey <tom@tromey.com>
1976
1977 * arch-utils.c: Do not include buildsym.h.
1978 * mipsread.c: Do not include buildsym.h.
1979 * machoread.c: Do not include buildsym.h.
1980 * elfread.c: Do not include buildsym.h.
1981
1982 2018-07-20 Tom Tromey <tom@tromey.com>
1983
1984 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1985 initialization.
1986 (buildsym_compunit): Add new constructor.
1987 (struct buildsym_compunit) <get_last_source_file, finish_block,
1988 record_block_range, start_subfile, patch_subfile_names,
1989 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1990 set_last_source_start_addr, get_last_source_start_addr,
1991 get_local_using_directives, set_local_using_directives,
1992 get_global_using_directives, outermost_context_p,
1993 get_current_context_stack, get_context_stack_depth,
1994 get_current_subfile, get_local_symbols, get_file_symbols,
1995 get_global_symbols, record_debugformat, record_producer,
1996 push_context, pop_context, end_symtab_get_static_block,
1997 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1998 New public methods.
1999 <record_pending_block, finish_block_internal, make_blockvector,
2000 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2001 private methods.
2002 Update all users.
2003
2004 2018-05-22 Tom Tromey <tom@tromey.com>
2005
2006 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2007 parameter.
2008 (finish_block_internal): Update.
2009
2010 2018-07-20 Tom Tromey <tom@tromey.com>
2011
2012 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2013 parameter.
2014 (finish_block_internal): Update.
2015
2016 2018-07-20 Tom Tromey <tom@tromey.com>
2017
2018 * buildsym.h (EXTERN): Don't define or undef.
2019 * buildsym.c (EXTERN): Don't define.
2020
2021 2018-07-20 Tom Tromey <tom@tromey.com>
2022
2023 * buildsym.c: Remove TODO comment.
2024
2025 2018-07-20 Tom Tromey <tom@tromey.com>
2026
2027 * coffread.c (coff_symtab_read): Update.
2028 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2029 (xcoff_new_init): Update.
2030 * mipsread.c (mipscoff_new_init): Update.
2031 * mdebugread.c (mdebug_build_psymtabs): Update.
2032 * elfread.c (elf_new_init): Update.
2033 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2034 Update.
2035 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2036 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2037 (stabsect_build_psymtabs): Update.
2038 * buildsym.h (buildsym_init): Don't declare.
2039 * buildsym.c: Update comment.
2040 (prepare_for_building): Remove.
2041 (start_symtab, restart_symtab): Update.
2042 (reset_symtab_globals): Update comment.
2043 (buildsym_init): Remove.
2044
2045 2018-07-20 Tom Tromey <tom@tromey.com>
2046
2047 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2048 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2049 (read_enum_type, common_block_start, common_block_end)
2050 (cleanup_undefined_types_1, finish_global_stabs): Update.
2051 * mdebugread.c (psymtab_to_symtab_1): Update.
2052 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2053 (read_lexical_block_scope, new_symbol): Update.
2054 * dbxread.c (process_one_symbol): Update.
2055 * coffread.c (coff_symtab_read, process_coff_symbol)
2056 (coff_read_enum_type): Update.
2057 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2058 declare.
2059 (get_local_symbols, get_file_symbols, get_global_symbols): New
2060 functions.
2061 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2062 m_global_symbols.
2063 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2064 (~scoped_free_pendings): Update.
2065 (finish_block, prepare_for_building, reset_symtab_globals)
2066 (end_symtab_get_static_block, end_symtab_with_blockvector)
2067 (augment_type_symtab, push_context): Update.
2068 (get_local_symbols, get_file_symbols, get_global_symbols): New
2069 functions.
2070 (buildsym_init): Update.
2071
2072 2018-07-20 Tom Tromey <tom@tromey.com>
2073
2074 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2075 (process_full_type_unit): Likewise.
2076 (dwarf2_start_symtab): Set list_in_scope.
2077
2078 2018-07-20 Tom Tromey <tom@tromey.com>
2079
2080 * dwarf2read.c (process_psymtab_comp_unit_reader)
2081 (build_type_psymtabs_reader): Do not set list_in_scope.
2082
2083 2018-07-20 Tom Tromey <tom@tromey.com>
2084
2085 * buildsym.c (free_pendings): Remove.
2086 (add_symbol_to_list, scoped_free_pendings)
2087 (finish_block_internal, buildsym_init): Update.
2088
2089 2018-07-20 Tom Tromey <tom@tromey.com>
2090
2091 * xcoffread.c (read_xcoff_symtab): Update.
2092 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2093 Update.
2094 * dbxread.c (process_one_symbol): Update.
2095 * coffread.c (coff_symtab_read): Update.
2096 * buildsym.h (finish_block): Update.
2097 * buildsym.c (finish_block): Remove "listhead" argument.
2098 (end_symtab_get_static_block): Update.
2099
2100 2018-07-20 Tom Tromey <tom@tromey.com>
2101
2102 * buildsym.h (class scoped_free_pendings): Remove constructor.
2103 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2104 method.
2105 <m_pending_block_obstack, m_pending_blocks>: New members.
2106 (pending_block_obstack, pending_blocks): Remove.
2107 (scoped_free_pendings::scoped_free_pendings): Default.
2108 (~scoped_free_pendings): Update.
2109 (free_pending_blocks): Remove.
2110 (finish_block_internal, record_pending_block, make_blockvector)
2111 (end_symtab_get_static_block, augment_type_symtab, push_context)
2112 (buildsym_init): Update.
2113
2114 2018-07-20 Tom Tromey <tom@tromey.com>
2115
2116 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2117 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2118 members.
2119 (pending_addrmap, pending_addrmap_obstack)
2120 (pending_addrmap_interesting): Remove.
2121 (scoped_free_pendings, record_block_range, make_blockvector)
2122 (prepare_for_building, reset_symtab_globals, buildsym_init):
2123 Update.
2124
2125 2018-07-20 Tom Tromey <tom@tromey.com>
2126
2127 * xcoffread.c (process_linenos): Update.
2128 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2129 * mdebugread.c (psymtab_to_symtab_1): Update.
2130 * dwarf2read.c (setup_type_unit_groups)
2131 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2132 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2133 * dbxread.c (process_one_symbol): Update.
2134 * coffread.c (coff_symtab_read, enter_linenos)
2135 (process_coff_symbol): Update.
2136 * buildsym.h (current_subfile): Don't declare.
2137 (get_current_subfile): Declare.
2138 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2139 member.
2140 (start_subfile, free_buildsym_compunit, push_subfile)
2141 (prepare_for_building, start_symtab): Update.
2142 (get_current_subfile): New function.
2143
2144 2018-07-20 Tom Tromey <tom@tromey.com>
2145
2146 * coffread.c (coff_symtab_read): Update.
2147 * xcoffread.c (read_xcoff_symtab): Update.
2148 * dwarf2read.c (new_symbol): Update.
2149 (read_func_scope, read_lexical_block_scope): Update.
2150 * dbxread.c (process_one_symbol): Update.
2151 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2152 (outermost_context_p): Remove macro.
2153 (outermost_context_p, get_current_context_stack)
2154 (get_context_stack_depth): Declare.
2155 (pop_context): Return struct context_stack.
2156 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2157 member.
2158 (context_stack_size): Remove.
2159 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2160 (prepare_for_building, end_symtab_get_static_block)
2161 (augment_type_symtab, push_context): Update.
2162 (pop_context): Return struct context_stack.
2163 (outermost_context_p, get_current_context_stack)
2164 (get_context_stack_depth): New functions.
2165 (buildsym_init): Update.
2166
2167 2018-07-20 Tom Tromey <tom@tromey.com>
2168
2169 * rust-exp.y: Now a pure parser. Update all rules.
2170 (%union): Move earlier.
2171 (current_parser, work_obstack): Remove globals.
2172 (rust_parser, ~rust_parser): Update.
2173 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2174 lex_character, lex_number, lex_string, lex_identifier,
2175 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2176 convert_name, convert_params_to_expression,
2177 convert_ast_to_expression, ast_basic_type, ast_operation,
2178 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2179 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2180 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2181 ast_array_type, ast_slice_type, ast_reference_type,
2182 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2183 (rust_parse): Update.
2184 (rustyyerror, rustyylex): Add parser parameter.
2185 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2186 (rust_lex_stringish_test, rust_lex_test_sequence)
2187 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2188 (rust_lex_test_push_back, rust_lex_tests): Update.
2189
2190 2018-07-19 Pedro Alves <palves@redhat.com>
2191
2192 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2193 gdb::unique_xmalloc_ptr.
2194 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2195 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2196 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2197 copy-initialization.
2198 * guile/scm-pretty-print.c (ppscm_print_children): Use
2199 gdb::unique_xmalloc_ptr instead of cleanups.
2200 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2201 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2202 gdb::unique_xmalloc_ptr.
2203 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2204 Adjust to use gdb::unique_xmalloc_ptr.
2205 * guile/scm-utils.c (extract_arg): Adjust.
2206 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2207 gdb::unique_xmalloc_ptr instead of a cleanup.
2208
2209 2018-07-19 Tom Tromey <tom@tromey.com>
2210
2211 * utils.c (do_value_free_to_mark)
2212 (make_cleanup_value_free_to_mark): Remove.
2213 * utils.h (make_cleanup_value_free_to_mark): Remove.
2214
2215 2018-07-19 Pedro Alves <palves@redhat.com>
2216
2217 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2218 forwarding reference.
2219
2220 2018-07-18 Pedro Alves <palves@redhat.com>
2221
2222 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2223 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2224 cleanup.
2225
2226 2018-07-18 Pedro Alves <palves@redhat.com>
2227
2228 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2229 exceptions.
2230 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2231 (gdbscm_wrap): New.
2232 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2233 directly instead of a cleanup.
2234 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2235 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2236 (vlscm_binop_gdbthrow): New, factored out from ...
2237 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2238 (vlscm_rich_compare): Use gdbscm_wrap.
2239 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2240 instead of a cleanup.
2241 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2242 cleanup.
2243 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2244 Use xfree directly instead of a cleanup.
2245 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2246 Adjust to use gdbscm_wrap and scoped_value_mark.
2247 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2248 (gdbscm_value_address, gdbscm_value_dereference)
2249 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2250 scoped_value_mark.
2251 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2252 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2253 scoped_value_mark.
2254 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2255 gdbscm_wrap and scoped_value_mark.
2256 (gdbscm_value_to_string): Use xfree directly instead of a
2257 cleanup. Move 'buffer' unique_ptr to TRY scope.
2258 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2259 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2260 scoped_value_mark.
2261 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2262 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2263 scoped_value_mark.
2264 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2265 gdbscm_wrap.
2266
2267 2018-07-18 Tom de Vries <tdevries@suse.de>
2268
2269 * findvar.c (default_read_var_value): Also resolve dynamic type for
2270 LOC_OPTIMIZED_OUT vars.
2271
2272 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2273
2274 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2275 decoding.
2276
2277 2018-07-17 Tom Tromey <tom@tromey.com>
2278
2279 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2280 (compute_enum_list, pascm_set_param_value_x)
2281 (gdbscm_parameter_value): Update.
2282 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2283 (gdbscm_scm_to_host_string): Update.
2284 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2285 Update.
2286 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2287 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2288 * guile/scm-string.c (gdbscm_scm_to_string): Return
2289 unique_xmalloc_ptr.
2290 (gdbscm_scm_to_host_string): Likewise.
2291
2292 2018-07-17 Tom Tromey <tom@tromey.com>
2293
2294 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2295 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2296 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2297 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2298 unique_xmalloc_ptr.
2299
2300 2018-07-17 Tom Tromey <tom@tromey.com>
2301
2302 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2303 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2304 Update.
2305 * guile/scm-cmd.c (cmdscm_function): Update.
2306 * guile/scm-pretty-print.c
2307 (ppscm_print_exception_unless_memory_error): Update.
2308 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2309 Return unique_xmalloc_ptr.
2310
2311 2018-07-17 Tom Tromey <tom@tromey.com>
2312
2313 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2314 Use string_printf.
2315
2316 2018-07-17 Jim Wilson <jimw@sifive.com>
2317
2318 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2319 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2320 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2321 unecessary braces after EF_RISCV_RVC test. Delete call to
2322 set_gdbarch_decr_pc_after_break.
2323
2324 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2325 RISCV_LAST_FP_REGNUM + 1.
2326 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2327
2328 2018-07-17 Tom Tromey <tom@tromey.com>
2329
2330 * configure.ac: Remove --disable-gdbcli.
2331 * configure: Rebuild.
2332 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2333 (SUBDIR_CLI_CFLAGS): Remove.
2334 (SFILES): Use SUBDIR_CLI_SRCS.
2335 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2336
2337 2018-07-17 Tom Tromey <tom@tromey.com>
2338
2339 PR gdb/18624:
2340 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2341
2342 2018-07-16 Jim Wilson <jimw@sifive.com>
2343
2344 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2345
2346 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2347
2348 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2349 variable.
2350 (libunwind_frame_sniffer): Likewise.
2351 (libunwind_frame_prev_register): Likewise.
2352 (libunwind_sigtramp_frame_sniffer): Likewise.
2353 * ia64-tdep.c (ia64_access_reg): Likewise.
2354 (ia64_access_rse_reg): Likewise.
2355 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2356 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2357
2358 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2359
2360 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2361
2362 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2363
2364 * remote-sim.c (gdbsim_target::close,
2365 gdbsim_target::mourn_inferior): Remove unused variables.
2366
2367 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2368
2369 * ia64-tdep.c (ktab_buf): New global.
2370 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2371 (get_kernel_table): Adjust.
2372
2373 2018-07-16 Tom Tromey <tom@tromey.com>
2374
2375 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2376 * dwarf2read.c (using_directives, new_symbol): Use
2377 outermost_context_p.
2378 * dbxread.c (process_one_symbol): Use outermost_context_p.
2379 * coffread.c (coff_symtab_read): Use outermost_context_p.
2380
2381 2018-07-16 Tom Tromey <tom@tromey.com>
2382
2383 * dwarf2read.c (using_directives, read_func_scope)
2384 (read_lexical_block_scope): Update.
2385 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2386 * buildsym.h (local_using_directives, global_using_directives):
2387 Don't declare.
2388 (get_local_using_directives, set_local_using_directives)
2389 (get_global_using_directives): Declare.
2390 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2391 m_global_using_directives>: New members.
2392 (finish_block_internal, prepare_for_building)
2393 (reset_symtab_globals, end_symtab_get_static_block)
2394 (push_context): Update.
2395 (get_local_using_directives, set_local_using_directives)
2396 (get_global_using_directives): New functions.
2397 (buildsym_init): Update.
2398
2399 2018-07-16 Tom Tromey <tom@tromey.com>
2400
2401 * xcoffread.c (xcoff_initial_scan): Don't call
2402 free_pending_blocks.
2403 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2404 * buildsym.h (class scoped_free_pendings): Add constructor.
2405 (free_pending_blocks): Don't declare.
2406 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2407 (free_pending_blocks): Now static.
2408
2409 2018-07-16 Tom Tromey <tom@tromey.com>
2410
2411 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2412 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2413 member.
2414 (struct subfile_stack): Remove.
2415 (subfile_stack): Remove.
2416 (push_subfile, pop_subfile, buildsym_init): Update.
2417
2418 2018-07-16 Tom Tromey <tom@tromey.com>
2419
2420 * buildsym.c (push_subfile): Use gdb_assert.
2421 (pop_subfile): Use gdb_assert.
2422
2423 2018-07-16 Tom Tromey <tom@tromey.com>
2424
2425 * buildsym.h (merge_symbol_lists): Remove.
2426 * buildsym.c (merge_symbol_lists): Remove.
2427
2428 2018-07-16 Tom Tromey <tom@tromey.com>
2429
2430 * stabsread.c (scan_file_globals): Update comment.
2431 * stabsread.h (scan_file_globals): Move from buildsym.h.
2432 * buildsym.h (scan_file_globals): Move to stabsread.h.
2433
2434 2018-07-16 Tom Tromey <tom@tromey.com>
2435
2436 * xcoffread.c (xcoff_new_init): Update.
2437 * mipsread.c (mipscoff_new_init): Update.
2438 * mdebugread.c (mdebug_build_psymtabs): Update.
2439 * elfread.c (elf_new_init): Update.
2440 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2441 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2442 * buildsym.h (buildsym_new_init): Don't declare.
2443 * buildsym.c (buildsym_new_init): Remove.
2444
2445 2018-07-16 Tom Tromey <tom@tromey.com>
2446
2447 * stabsread.h (within_function): Move from buildsym.h.
2448 * stabsread.c (start_stabs): Clear within_function.
2449 * coffread.c (coff_start_symtab): Clear within_function.
2450 * buildsym.h (within_function): Move to stabsread.h.
2451 * buildsym.c (prepare_for_building): Update.
2452
2453 2018-07-16 Tom Tromey <tom@tromey.com>
2454
2455 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2456 * dwarf2read.c (dwarf2_start_symtab): Don't set
2457 processing_gcc_compilation.
2458 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2459
2460 2018-07-16 Tom Tromey <tom@tromey.com>
2461
2462 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2463 (next_symbol_text_func): Move from buildsym.h.
2464 * stabsread.c (hashname): Move from buildsym.c.
2465 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2466 (next_symbol_text_func, hashname): Move to stabsread.h.
2467 * buildsym.c: Don't include bcache.h
2468 (hashname): Move to stasbread.c.
2469
2470 2018-07-16 Tom Tromey <tom@tromey.com>
2471
2472 * buildsym.h (context_stack_size): Don't declare.
2473 * buildsym.c (context_stack_size): New global.
2474
2475 2018-07-16 Tom Tromey <tom@tromey.com>
2476
2477 * dbxread.c (processing_acc_compilation): New global.
2478 * buildsym.h (processing_acc_compilation): Don't declare.
2479
2480 2018-07-16 Tom Tromey <tom@tromey.com>
2481
2482 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2483 * dbxread.c (read_ofile_symtab): Update.
2484 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2485 * buildsym.h (last_source_start_addr): Remove.
2486 (set_last_source_start_addr, get_last_source_start_addr):
2487 Declare.
2488 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2489 parameter.
2490 (struct buildsym_compunit) <m_last_source_start_addr>: New
2491 member.
2492 (prepare_for_building): Remove start_addr parameter.
2493 (start_symtab, restart_symtab, end_symtab_get_static_block)
2494 (end_symtab_with_blockvector): Update.
2495 (set_last_source_start_addr, get_last_source_start_addr): New
2496 functions.
2497
2498 2018-07-16 Tom Tromey <tom@tromey.com>
2499
2500 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2501 member.
2502 (have_line_numbers): Remove.
2503 (record_line, prepare_for_building, end_symtab_get_static_block)
2504 (augment_type_symtab): Update.
2505
2506 2018-07-16 Tom Tromey <tom@tromey.com>
2507
2508 * buildsym.c (~buildsym_compunit): Free the macro table.
2509 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2510 methods.
2511 <m_pending_macros>: New member.
2512 (pending_macros): Remove.
2513 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2514 (reset_symtab_globals, end_symtab_get_static_block)
2515 (end_symtab_with_blockvector, augment_type_symtab)
2516 (buildsym_init): Update.
2517
2518 2018-07-16 Tom Tromey <tom@tromey.com>
2519
2520 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2521 parameter.
2522 (buildsym_compunit::set_last_source_file): New method.
2523 <m_last_source_file>: New member.
2524 (prepare_for_building): Remove "name" parameter.
2525 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2526 (last_source_file): Remove.
2527 (set_last_source_file, get_last_source_file): Update.
2528
2529 2018-07-16 Tom Tromey <tom@tromey.com>
2530
2531 * buildsym.c (prepare_for_building): Add assert.
2532
2533 2018-07-16 Tom Tromey <tom@tromey.com>
2534
2535 * buildsym.c (~buildsym_compunit): Update.
2536 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2537 (start_subfile, patch_subfile_names)
2538 (end_symtab_with_blockvector): Update.
2539
2540 2018-07-16 Tom Tromey <tom@tromey.com>
2541
2542 * buildsym.c (struct buildsym_compunit): Add constructor,
2543 destructor, initializers.
2544 (start_buildsym_compunit): Remove.
2545 (free_buildsym_compunit): Use "delete".
2546 (start_symtab, restart_symtab): Use "new".
2547
2548 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2549
2550 * symfile.c (set_objfile_default_section_offset): Remove struct
2551 keyword.
2552
2553 2018-07-14 Stafford Horne <shorne@gmail.com>
2554
2555 * (Responsible Maintainers): Add myself as or1k maintainer.
2556
2557 2018-07-13 Tom Tromey <tom@tromey.com>
2558
2559 * symfile.c (set_objfile_default_section_offset): Use extra braces
2560 around initializer.
2561
2562 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2563
2564 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2565 non-branching basr.
2566
2567 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2568
2569 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2570 unittests/cli-utils-selftests.c
2571 * unittests/cli-utils-selftests.c: New file.
2572
2573 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2574
2575 * NEWS: Mention new commands. Mention change to 'thread apply'.
2576
2577 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2578
2579 * thread.c (thr_try_catch_cmd): New function.
2580 (thread_apply_all_command): Handle qcs flags.
2581 (thread_apply_command): Handle qcs flags.
2582 (taas_command): New function.
2583 (tfaas_command): New function.
2584 (_initialize_thread): Update to setup the new commands 'taas
2585 and 'tfaas'. Change doc string for 'thread apply'.
2586
2587 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2588
2589 * stack.c: (trailing_outermost_frame): New function, mostly
2590 extracted from backtrace_command_1.
2591 (leading_innermost_frame): New function.
2592 (backtrace_command_1): Update to call trailing_outermost_frame.
2593 (frame_apply_command_count): New function.
2594 (frame_apply_level_command): New function.
2595 (frame_apply_all_command): New function.
2596 (frame_apply_command): New function.
2597 (faas_command): New function.
2598 (frame_cmd_list): New variable.
2599 (_initialize_stack): Update to setup the new commands 'frame apply'
2600 and 'faas'.
2601
2602 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2603
2604 * cli-utils.c (number_or_range_parser::get_number): Only handle
2605 numbers or convenience var as numbers.
2606 (parse_flags): New function.
2607 (parse_flags_qcs): New function.
2608 (number_or_range_parser::finished): Ensure parsing end is detected
2609 before end of string.
2610 * cli-utils.h (parse_flags): New function.
2611 (parse_flags_qcs): New function.
2612 (number_or_range_parser): Remove m_finished bool.
2613 (number_or_range_parser::skip_range): Set m_in_range to false.
2614
2615 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2616
2617 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2618 on Windows.
2619
2620 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2621 Jan Kratochvil <jan.kratochvil@redhat.com>
2622 Paul Fertser <fercerpav@gmail.com>
2623 Tsutomu Seki <sekiriki@gmail.com>
2624 Pedro Alves <palves@redhat.com>
2625
2626 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2627 'unittests/parse-connection-spec-selftests.c'.
2628 (COMMON_SFILES): Add 'common/netstuff.c'.
2629 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2630 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2631 * common/netstuff.c: New file.
2632 * common/netstuff.h: New file.
2633 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2634 (wait_for_connect): Update comment. New parameter
2635 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2636 Use 'sock' directly instead of 'scb->fd'.
2637 (try_connect): New function, with code from 'net_open'.
2638 (net_open): Rewrite main loop to deal with multiple
2639 sockets/addresses. Handle IPv6-style hostnames; implement
2640 support for IPv6 connections.
2641 * unittests/parse-connection-spec-selftests.c: New file.
2642
2643 2018-07-11 Pedro Alves <palves@redhat.com>
2644
2645 PR gdb/23377
2646 * remote.c (remote_target::remote_detach_pid): Call
2647 set_current_process.
2648
2649 2018-07-11 Pedro Alves <palves@redhat.com>
2650
2651 * h8300-tdep.c (h8300_gdbarch_init): Remove
2652 set_gdbarch_ecoff_reg_to_regnum calls.
2653
2654 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2655
2656 PR c++/23373
2657 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2658 offsets/sizes for static members of a class/struct.
2659
2660 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2661
2662 * target-descriptions.c (tdesc_register_bitsize): Rename.
2663 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2664 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2665 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2666
2667 2018-07-10 Tom Tromey <tom@tromey.com>
2668
2669 * breakpoint.c (moribund_locations): Now static and a
2670 std::vector.
2671 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2672 (build_bpstat_chain, update_global_location_list)
2673 (breakpoint_retire_moribund): Update.
2674 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2675 VEC.
2676
2677 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2678
2679 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2680 (riscv_register_reggroup_p): Use new function, remove unneeded
2681 parenthesis.
2682 (riscv_push_dummy_call): Extend assert to compare against xlen or
2683 flen based on register type.
2684
2685 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2686
2687 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2688
2689 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2690
2691 * remote.c (show_hardware_watchpoint_limit): New function.
2692 (show_hardware_watchpoint_length_limit): New function.
2693 (show_hardware_breakpoint_limit): New function.
2694 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2695 where appropriate, update help text.
2696
2697 2018-07-09 Tom Tromey <tom@tromey.com>
2698
2699 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2700 (CLIBS): Don't mention NAT_CLIBS.
2701
2702 2018-07-09 Tom Tromey <tom@tromey.com>
2703
2704 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2705 (LIBGDB_OBS, clean mostlyclean): Update.
2706 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2707
2708 2018-07-09 Tom Tromey <tom@tromey.com>
2709
2710 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2711 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2712 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2713
2714 2018-07-09 Tom Tromey <tom@tromey.com>
2715
2716 * Makefile.in (ALLDEPFILES): Remove exec.c.
2717 (COMMON_OBS): Remove exec.o.
2718 (COMMON_SFILES): Add exec.c.
2719
2720 2018-07-09 Tom Tromey <tom@tromey.com>
2721
2722 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2723
2724 2018-07-09 Tom Tromey <tom@tromey.com>
2725
2726 * Makefile.in (clean mostlyclean): Remove stamp-version.
2727 (version.c): Depend on stamp-version.
2728 (stamp-version): New rule, from version.c rule.
2729
2730 2018-07-09 Tom Tromey <tom@tromey.com>
2731
2732 * Makefile.in (init.c): Depend on stamp-init.
2733 (stamp-init): New rule, from init.c rule.
2734 (clean mostlyclean): Remove stamp-init.
2735
2736 2018-07-09 Tom Tromey <tom@tromey.com>
2737
2738 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2739 SUBDIR_GCC_COMPILE_SRCS.
2740
2741 2018-07-09 Tom Tromey <tom@tromey.com>
2742
2743 * Makefile.in (init.c): Remove some unused sed rules.
2744
2745 2018-07-09 Tom Tromey <tom@tromey.com>
2746
2747 * Makefile.in (TSOBS): Remove.
2748 (INIT_FILES): Update.
2749 (LIBGDB_OBS): Update.
2750 (COMMON_SFILES): Add inflow.c.
2751 (SFILES): Remove inflow.c.
2752
2753 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2754
2755 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2756
2757 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2758
2759 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2760 get_saveloc_name, is_signal_frame_name, step_name,
2761 init_remote_name, create_addr_space_name,
2762 destroy_addr_space_name, search_unwind_table_name,
2763 find_dyn_list_name): Constify.
2764
2765 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2766
2767 * darwin-nat.c (darwin_pthread_kill): New function.
2768 (darwin_resume_thread): Use darwin_pthread_kill.
2769
2770 2018-07-05 Tom de Vries <tdevries@suse.de>
2771
2772 * macroexp.c (macro_buffer) <operator=>: New member function.
2773
2774 2018-07-04 Tom Tromey <tom@tromey.com>
2775
2776 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2777
2778 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2779
2780 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2781 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2782 * maint.c: Likewise.
2783 * top.c: Likewise.
2784
2785 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2786
2787 * NEWS: Create a new section for the next release branch.
2788 Rename the section of the current branch, now that it has
2789 been cut.
2790
2791 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2792
2793 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2794 * version.in: Bump version to 8.2.50.DATE-git.
2795
2796 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2797 Pedro Alves <palves@redhat.com>
2798
2799 * linux-nat.c (linux_init_ptrace): Rename to ...
2800 (linux_init_ptrace_procfs): ... this. Call
2801 linux_proc_init_warnings.
2802 (linux_nat_target::post_attach)
2803 (linux_nat_target::post_startup_inferior): Adjust.
2804 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2805 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2806
2807 2018-07-04 Tom de Vries <tdevries@suse.de>
2808
2809 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2810 check ...
2811 (read_comp_unit_head): ... here.
2812
2813 2018-07-03 Tom Tromey <tom@tromey.com>
2814
2815 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2816 (stop_tracing, tstatus_command)
2817 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2818 (print_one_static_tracepoint_marker): Update.
2819 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2820 std::vector.
2821 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2822 VEC.
2823 (all_tracepoints, static_tracepoints_here): Return std::vector.
2824
2825 2018-07-03 Tom Tromey <tom@tromey.com>
2826
2827 * common/ptid.c (ptid_equal): Remove.
2828 * common/ptid.h (ptid_equal): Don't declare.
2829 * ada-tasks.c: Update.
2830 * breakpoint.c: Update.
2831 * common/agent.c: Update.
2832 * corelow.c: Update.
2833 * darwin-nat-info.c: Update.
2834 * darwin-nat.c: Update.
2835 * dcache.c: Update.
2836 * dtrace-probe.c: Update.
2837 * dummy-frame.c: Update.
2838 * fbsd-nat.c: Update.
2839 * frame.c: Update.
2840 * gdbthread.h: Update.
2841 * gnu-nat.c: Update.
2842 * go32-nat.c: Update.
2843 * inf-loop.c: Update.
2844 * inf-ptrace.c: Update.
2845 * infcall.c: Update.
2846 * infcmd.c: Update.
2847 * inflow.c: Update.
2848 * infrun.c: Update.
2849 * linux-fork.c: Update.
2850 * linux-nat.c: Update.
2851 * linux-thread-db.c: Update.
2852 * mi/mi-cmd-var.c: Update.
2853 * mi/mi-interp.c: Update.
2854 * mi/mi-main.c: Update.
2855 * nto-procfs.c: Update.
2856 * ppc-linux-tdep.c: Update.
2857 * procfs.c: Update.
2858 * python/py-inferior.c: Update.
2859 * python/py-record-btrace.c: Update.
2860 * python/py-record.c: Update.
2861 * ravenscar-thread.c: Update.
2862 * regcache.c: Update.
2863 * remote-sim.c: Update.
2864 * remote.c: Update.
2865 * sol-thread.c: Update.
2866 * solib.c: Update.
2867 * target.c: Update.
2868 * tui/tui-stack.c: Update.
2869 * varobj.c: Update.
2870 * windows-nat.c: Update.
2871 * windows-tdep.c: Update.
2872
2873 2018-07-03 Tom Tromey <tom@tromey.com>
2874
2875 * common/ptid.c (ptid_match): Remove.
2876 * common/ptid.h (ptid_match): Don't declare.
2877 * fbsd-nat.c: Update.
2878 * infcmd.c: Update.
2879 * infrun.c: Update.
2880 * linux-nat.c: Update.
2881 * record-btrace.c: Update.
2882 * regcache.c: Update.
2883 * remote.c: Update.
2884
2885 2018-07-03 Tom Tromey <tom@tromey.com>
2886
2887 * common/ptid.c (ptid_tid_p): Remove.
2888 * common/ptid.h (ptid_tid_p): Don't declare.
2889 * sol-thread.c: Update.
2890
2891 2018-07-03 Tom Tromey <tom@tromey.com>
2892
2893 * common/ptid.c (ptid_lwp_p): Remove.
2894 * common/ptid.h (ptid_lwp_p): Don't declare.
2895 * fbsd-nat.c: Update.
2896 * linux-nat.c: Update.
2897 * nat/linux-procfs.c: Update.
2898 * nat/x86-linux-dregs.c: Update.
2899 * sol-thread.c: Update.
2900
2901 2018-07-03 Tom Tromey <tom@tromey.com>
2902
2903 * common/ptid.c (ptid_is_pid): Remove.
2904 * common/ptid.h (ptid_is_pid): Don't declare.
2905 * infrun.c: Update.
2906 * linux-nat.c: Update.
2907 * mi/mi-interp.c: Update.
2908 * remote.c: Update.
2909 * thread.c: Update.
2910
2911 2018-07-03 Tom Tromey <tom@tromey.com>
2912
2913 * common/ptid.c (ptid_get_tid): Remove.
2914 * common/ptid.h (ptid_get_tid): Don't declare.
2915 * ada-tasks.c: Update.
2916 * aix-thread.c: Update.
2917 * bsd-uthread.c: Update.
2918 * darwin-nat.c: Update.
2919 * fbsd-nat.c: Update.
2920 * i386-darwin-nat.c: Update.
2921 * infrun.c: Update.
2922 * linux-tdep.c: Update.
2923 * nto-procfs.c: Update.
2924 * ppc-ravenscar-thread.c: Update.
2925 * python/py-infthread.c: Update.
2926 * ravenscar-thread.c: Update.
2927 * sol-thread.c: Update.
2928 * sparc-ravenscar-thread.c: Update.
2929 * windows-nat.c: Update.
2930
2931 2018-07-03 Tom Tromey <tom@tromey.com>
2932
2933 * common/ptid.c (ptid_get_lwp): Remove.
2934 * common/ptid.h (ptid_get_lwp): Don't declare.
2935 * aarch64-linux-nat.c: Update.
2936 * ada-tasks.c: Update.
2937 * aix-thread.c: Update.
2938 * amd64-linux-nat.c: Update.
2939 * arm-linux-nat.c: Update.
2940 * corelow.c: Update.
2941 * fbsd-nat.c: Update.
2942 * fbsd-tdep.c: Update.
2943 * gnu-nat.c: Update.
2944 * i386-cygwin-tdep.c: Update.
2945 * i386-gnu-nat.c: Update.
2946 * i386-linux-nat.c: Update.
2947 * ia64-linux-nat.c: Update.
2948 * inf-ptrace.c: Update.
2949 * infrun.c: Update.
2950 * linux-fork.c: Update.
2951 * linux-nat.c: Update.
2952 * linux-tdep.c: Update.
2953 * linux-thread-db.c: Update.
2954 * mips-linux-nat.c: Update.
2955 * nat/aarch64-linux-hw-point.c: Update.
2956 * nat/aarch64-linux.c: Update.
2957 * nat/linux-btrace.c: Update.
2958 * nat/linux-osdata.c: Update.
2959 * nat/linux-procfs.c: Update.
2960 * nat/x86-linux-dregs.c: Update.
2961 * obsd-nat.c: Update.
2962 * ppc-fbsd-nat.c: Update.
2963 * ppc-linux-nat.c: Update.
2964 * procfs.c: Update.
2965 * python/py-infthread.c: Update.
2966 * ravenscar-thread.c: Update.
2967 * remote.c: Update.
2968 * s390-linux-nat.c: Update.
2969 * sol-thread.c: Update.
2970 * sol2-tdep.c: Update.
2971 * spu-linux-nat.c: Update.
2972 * x86-linux-nat.c: Update.
2973 * xtensa-linux-nat.c: Update.
2974
2975 2018-07-03 Tom Tromey <tom@tromey.com>
2976
2977 * common/ptid.c (ptid_get_pid): Remove.
2978 * common/ptid.h (ptid_get_pid): Don't declare.
2979 * aarch64-linux-nat.c: Update.
2980 * ada-lang.c: Update.
2981 * aix-thread.c: Update.
2982 * alpha-bsd-nat.c: Update.
2983 * amd64-fbsd-nat.c: Update.
2984 * amd64-linux-nat.c: Update.
2985 * arm-linux-nat.c: Update.
2986 * arm-nbsd-nat.c: Update.
2987 * auxv.c: Update.
2988 * break-catch-syscall.c: Update.
2989 * breakpoint.c: Update.
2990 * bsd-uthread.c: Update.
2991 * corelow.c: Update.
2992 * ctf.c: Update.
2993 * darwin-nat.c: Update.
2994 * fbsd-nat.c: Update.
2995 * fbsd-tdep.c: Update.
2996 * gcore.c: Update.
2997 * gnu-nat.c: Update.
2998 * hppa-nbsd-nat.c: Update.
2999 * hppa-obsd-nat.c: Update.
3000 * i386-fbsd-nat.c: Update.
3001 * ia64-linux-nat.c: Update.
3002 * inf-ptrace.c: Update.
3003 * infcmd.c: Update.
3004 * inferior.c: Update.
3005 * inferior.h: Update.
3006 * inflow.c: Update.
3007 * infrun.c: Update.
3008 * linux-fork.c: Update.
3009 * linux-nat.c: Update.
3010 * linux-tdep.c: Update.
3011 * linux-thread-db.c: Update.
3012 * m68k-bsd-nat.c: Update.
3013 * mi/mi-interp.c: Update.
3014 * mi/mi-main.c: Update.
3015 * mips-linux-nat.c: Update.
3016 * mips-nbsd-nat.c: Update.
3017 * mips64-obsd-nat.c: Update.
3018 * nat/aarch64-linux-hw-point.c: Update.
3019 * nat/aarch64-linux.c: Update.
3020 * nat/linux-btrace.c: Update.
3021 * nat/linux-osdata.c: Update.
3022 * nat/linux-procfs.c: Update.
3023 * nat/x86-linux-dregs.c: Update.
3024 * nto-procfs.c: Update.
3025 * obsd-nat.c: Update.
3026 * ppc-linux-nat.c: Update.
3027 * ppc-nbsd-nat.c: Update.
3028 * ppc-obsd-nat.c: Update.
3029 * proc-service.c: Update.
3030 * procfs.c: Update.
3031 * python/py-inferior.c: Update.
3032 * python/py-infthread.c: Update.
3033 * ravenscar-thread.c: Update.
3034 * record.c: Update.
3035 * remote-sim.c: Update.
3036 * remote.c: Update.
3037 * rs6000-nat.c: Update.
3038 * s390-linux-nat.c: Update.
3039 * sh-nbsd-nat.c: Update.
3040 * sol-thread.c: Update.
3041 * sparc-nat.c: Update.
3042 * sparc64-tdep.c: Update.
3043 * spu-linux-nat.c: Update.
3044 * spu-tdep.c: Update.
3045 * target-debug.h: Update.
3046 * target.c: Update.
3047 * thread.c: Update.
3048 * tid-parse.c: Update.
3049 * tracefile-tfile.c: Update.
3050 * vax-bsd-nat.c: Update.
3051 * windows-nat.c: Update.
3052 * x86-linux-nat.c: Update.
3053 * x86-nat.c: Update.
3054
3055 2018-07-03 Tom Tromey <tom@tromey.com>
3056
3057 * common/ptid.c (pid_to_ptid): Remove.
3058 * common/ptid.h (pid_to_ptid): Don't declare.
3059 * aix-thread.c: Update.
3060 * arm-linux-nat.c: Update.
3061 * common/ptid.c: Update.
3062 * common/ptid.h: Update.
3063 * corelow.c: Update.
3064 * ctf.c: Update.
3065 * darwin-nat.c: Update.
3066 * fbsd-nat.c: Update.
3067 * fork-child.c: Update.
3068 * gnu-nat.c: Update.
3069 * go32-nat.c: Update.
3070 * inf-ptrace.c: Update.
3071 * infcmd.c: Update.
3072 * inferior.c: Update.
3073 * infrun.c: Update.
3074 * linux-fork.c: Update.
3075 * linux-nat.c: Update.
3076 * nat/aarch64-linux-hw-point.c: Update.
3077 * nat/fork-inferior.c: Update.
3078 * nat/x86-linux-dregs.c: Update.
3079 * nto-procfs.c: Update.
3080 * obsd-nat.c: Update.
3081 * procfs.c: Update.
3082 * progspace.c: Update.
3083 * remote.c: Update.
3084 * rs6000-nat.c: Update.
3085 * s390-linux-nat.c: Update.
3086 * sol-thread.c: Update.
3087 * spu-linux-nat.c: Update.
3088 * target.c: Update.
3089 * top.c: Update.
3090 * tracefile-tfile.c: Update.
3091 * windows-nat.c: Update.
3092
3093 2018-07-03 Tom Tromey <tom@tromey.com>
3094
3095 * common/ptid.h (ptid_build): Don't declare.
3096 * common/ptid.c (ptid_build): Remove.
3097 * aix-thread.c: Update.
3098 * bsd-kvm.c: Update.
3099 * bsd-uthread.c: Update.
3100 * common/agent.c: Update.
3101 * common/ptid.c: Update.
3102 * common/ptid.h: Update.
3103 * corelow.c: Update.
3104 * darwin-nat.c: Update.
3105 * fbsd-nat.c: Update.
3106 * gnu-nat.c: Update.
3107 * linux-fork.c: Update.
3108 * linux-nat.c: Update.
3109 * linux-thread-db.c: Update.
3110 * nat/linux-osdata.c: Update.
3111 * nat/linux-procfs.c: Update.
3112 * nto-procfs.c: Update.
3113 * obsd-nat.c: Update.
3114 * proc-service.c: Update.
3115 * procfs.c: Update.
3116 * ravenscar-thread.c: Update.
3117 * remote-sim.c: Update.
3118 * remote.c: Update.
3119 * sol-thread.c: Update.
3120 * target.c: Update.
3121 * windows-nat.c: Update.
3122
3123 2018-07-03 Tom Tromey <tom@tromey.com>
3124
3125 * infrun.c (follow_exec): Use exit_inferior_silent.
3126 * inferior.c (exit_inferior_num_silent): Remove.
3127 * inferior.h (exit_inferior_num_silent): Don't declare.
3128
3129 2018-07-03 Tom Tromey <tom@tromey.com>
3130
3131 PR cli/23340:
3132 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3133 inferior_ptid on error.
3134
3135 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3136 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 PR tdep/8282
3139 * disasm.h (gdb_disassembler): Add
3140 `m_disassembler_options_holder'. member
3141 * disasm.c (get_all_disassembler_options): New function.
3142 (gdb_disassembler::gdb_disassembler): Use it.
3143 (gdb_buffered_insn_length_init_dis): Likewise.
3144 (gdb_buffered_insn_length): Adjust accordingly.
3145 (set_disassembler_options): Handle options with arguments.
3146 (show_disassembler_options_sfunc): Likewise. Add a leading new
3147 line if showing options with descriptions.
3148 (disassembler_options_completer): Adapt to using the
3149 `disasm_options_and_args_t' structure.
3150 * mips-tdep.c (mips_disassembler_options): New variable.
3151 (mips_disassembler_options_o32): Likewise.
3152 (mips_disassembler_options_n32): Likewise.
3153 (mips_disassembler_options_n64): Likewise.
3154 (gdb_print_insn_mips): Don't set `disassembler_options'.
3155 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3156 functions.
3157 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3158 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3159 `gdbarch_disassembler_options_implicit' and
3160 `gdbarch_valid_disassembler_options'.
3161 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3162 `disasm_options_and_args_t' structure.
3163 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3164 method.
3165 (valid_disassembler_options): Switch from `disasm_options_t' to
3166 the `disasm_options_and_args_t' structure.
3167 * NEWS: Document `set disassembler-options' support for the MIPS
3168 target.
3169 * gdbarch.h: Regenerate.
3170 * gdbarch.c: Regenerate.
3171
3172 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3173
3174 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3175
3176 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3177
3178 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3179 parameter in call to amd64_target_description.
3180 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3181 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3182 (amd64fbsd_init_abi): Likewise.
3183 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3184 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3185 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3186 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3187
3188 2018-06-29 Pedro Alves <palves@redhat.com>
3189
3190 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3191 "segments" parameter.
3192 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3193 (_initialize_amd64_tdep): Update call to
3194 amd64_create_target_description.
3195 (amd64_target_description): Add "segments" parameter. Adjust
3196 the implementation to use it.
3197 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3198 call to amd64_create_target_description.
3199 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3200 * gdb/arch/amd64.h (amd64_create_target_description): Add
3201 "segments" register.
3202 * gdb/arch/amd64.c (amd64_create_target_description): Add
3203 "segments" parameter. Call create_feature_i386_64bit_segments
3204 only if SEGMENTS is true.
3205 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3206 call to amd64_create_target_description.
3207
3208 2018-06-29 Pedro Alves <palves@redhat.com>
3209
3210 * thread.c (thread_target_id_str): New, factored out from ...
3211 (print_thread_info_1): ... here. Use it to compute the max
3212 "Target Id" column width.
3213
3214 2018-06-29 Pedro Alves <palves@redhat.com>
3215
3216 * remote.c (remote_target::extra_thread_info): Delete
3217 'display_buf' and 'n' locals. from the cache, regardless of
3218 packet mechanims is in use. Use cache for qThreadExtra and qP
3219 methods too.
3220
3221 2018-06-29 Pedro Alves <palves@redhat.com>
3222
3223 * blockframe.c (find_pc_sect_containing_function): New function.
3224 * breakpoint.c (print_breakpoint_location): Don't call
3225 find_pc_sect_function.
3226 * linespec.c (create_sals_line_offset): Record the location's
3227 symbol in the sal.
3228 * linespec.c (convert_address_location_to_sals): Fill in sal's
3229 symbol with find_pc_sect_containing_function.
3230 * symtab.c (find_function_start_sal): Rename to ...
3231 (find_function_start_sal_1): ... this.
3232 (find_function_start_sal): Reimplement as wrapper around
3233 find_function_start_sal_1, and use
3234 find_pc_sect_containing_function to fill in the sal's symbol.
3235 (find_function_start_sal(symbol*, bool)): Adjust.
3236 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3237 comments.
3238 (find_pc_sect_containing_function): Declare.
3239
3240 2018-06-29 Pedro Alves <palves@redhat.com>
3241
3242 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3243 true if the the location has no symbol.
3244
3245 2018-06-28 Tom Tromey <tom@tromey.com>
3246
3247 * NEWS: Mention --enable-codesign.
3248 * silent-rules.mk (ECHO_SIGN): New variable.
3249 * configure.ac: Add --enable-codesign.
3250 * configure: Rebuild.
3251 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3252 (gdb$(EXEEXT)): Optionally invoke codesign.
3253
3254 2018-06-28 Pedro Alves <palves@redhat.com>
3255
3256 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3257 comments.
3258 (switch_to_thread_no_regs): Adjust comment.
3259 * infcmd.c (stop_pc): Delete.
3260 (post_create_inferior, info_program_command): Replace references
3261 to stop_pc with references to thread_info->suspend.stop_pc.
3262 * inferior.h (stop_pc): Delete declaration.
3263 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3264 (handle_inferior_event_1, handle_signal_stop)
3265 (process_event_stop_test, keep_going_stepped_thread)
3266 (handle_step_into_function, handle_step_into_function_backward)
3267 (print_stop_location): Replace references to stop_pc with
3268 references to thread_info->suspend.stop_pc.
3269 (struct infcall_suspend_state) <stop_pc>: Delete field.
3270 (save_infcall_suspend_state, restore_infcall_suspend_state):
3271 Remove references to inf_stat->stop_pc.
3272 * linux-fork.c (fork_load_infrun_state): Likewise.
3273 * record-btrace.c (record_btrace_set_replay): Likewise.
3274 * record-full.c (record_full_goto_entry): Likewise.
3275 * remote.c (print_one_stopped_thread): Likewise.
3276 * target.c (target_resume): Extend comment.
3277 * thread.c (set_executing_thread): New.
3278 (set_executing): Use it.
3279 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3280 Remove references to stop_pc.
3281
3282 2018-06-28 Pedro Alves <palves@redhat.com>
3283
3284 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3285 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3286
3287 2018-06-28 Tom Tromey <tom@tromey.com>
3288
3289 * coffread.c (coff_symfile_finish): Update.
3290 * xcoffread.c (xcoff_symfile_finish): Update.
3291 * elfread.c (elf_symfile_finish): Update.
3292 * symfile.h (dwarf2_free_objfile): Don't declare.
3293 * dwarf2read.c (_initialize_dwarf2_read): Use
3294 register_objfile_data_with_cleanup.
3295 (dwarf2_free_objfile): Now static. Change signature.
3296
3297 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3298
3299 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3300 option "-o" to add-symbol-file-load to add an offset to each
3301 section's load address.
3302 * symfile.c (set_objfile_default_section_offset): New function.
3303
3304 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3305
3306 * symfile.c (add_symbol_file_command): Make sure that sections
3307 with the same name are sorted in the same order.
3308
3309 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3310
3311 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3312 require the second argument. If omitted, load sections at the
3313 addresses specified in the file.
3314
3315 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3316
3317 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3318 (_initialize_symfile): Add option "-o" to symbol-file to add an
3319 offset to each section of the symbol file.
3320
3321 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3322
3323 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3324
3325 2018-06-27 Tom Tromey <tom@tromey.com>
3326
3327 * stack.c (_initialize_stack): Update "func" help text.
3328
3329 2018-06-27 Tom Tromey <tom@tromey.com>
3330
3331 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3332 std::vector.
3333 (unwind_infopy_str, pyuw_create_unwind_info)
3334 (unwind_infopy_add_saved_register, pyuw_sniffer)
3335 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3336 Update.
3337 (struct saved_reg): Add constructor.
3338 <value>: Now a gdbpy_ref<>.
3339
3340 2018-06-27 Tom Tromey <tom@tromey.com>
3341
3342 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3343
3344 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3345
3346 * gdb-gdb.py.in: Format using autopep8.
3347
3348 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3349
3350 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3351 (type_lookup_function): Recognize CORE_ADDR values.
3352
3353 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3354
3355 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3356 print tag_name.
3357
3358 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3359
3360 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3361 <__lt__>: Add.
3362
3363 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * gdb-gdb.py: Move to...
3366 * gdb-gdb.py.in: ... here.
3367 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3368 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3369 dependencies.
3370 (distclean): Remove gdb-gdb.py when cleaning.
3371 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3372 * configure: Re-generate.
3373
3374 2018-06-27 Pedro Alves <palves@redhat.com>
3375
3376 * proc-service.c (get_ps_regcache): New.
3377 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3378 (ps_lsetfpregs): Use it.
3379
3380 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3381
3382 PR gdb/21695
3383 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3384 (dwarf_decode_lines_1): Adjust.
3385
3386 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3387
3388 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3389 override.
3390 <info_proc>: Likewise.
3391
3392 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3393
3394 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3395 to windows_fetch_one_register, and only handle the case of
3396 fetching one register. Move the code that reloads the context
3397 and iterates over all registers if R is negative to...
3398 (windows_nat_target::fetch_registers): ... here.
3399 (do_windows_store_inferior_registers): Rename to
3400 windows_store_one_register, and only handle the case of storing
3401 one register. Move the code that handles the case where r is
3402 negative to...
3403 (windows_nat_target::store_registers) ... here.
3404
3405 2018-06-26 Tom Tromey <tom@tromey.com>
3406
3407 PR rust/22574:
3408 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3409 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3410 Update.
3411 (rust_internal_print_type): Add podata parameter.
3412 (rust_print_type): Update.
3413
3414 2018-06-26 Tom Tromey <tom@tromey.com>
3415
3416 * typeprint.h (struct print_offset_data) <update, finish,
3417 maybe_print_hole>: New methods.
3418 <indentation>: New constant.
3419 * typeprint.c (print_offset_data::indentation): Define.
3420 (print_offset_data::maybe_print_hole, print_offset_data::update)
3421 (print_offset_data::finish): Move from c-typeprint.c and rename.
3422 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3423 (print_spaces_filtered_with_print_options): Update.
3424 (c_print_type_union_field_offset, maybe_print_hole)
3425 (c_print_type_struct_field_offset): Move to typeprint.c and
3426 rename.
3427 (c_type_print_base_struct_union): Update.
3428
3429 2018-06-25 Pedro Alves <palves@redhat.com>
3430
3431 * gdbthread.h (thread_info_ref, delete_thread)
3432 (delete_thread_silent, first_thread_of_inferior)
3433 (any_thread_of_inferior, switch_to_thread)
3434 (enable_thread_stack_temporaries)
3435 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3436 (get_last_thread_stack_temporary)
3437 (value_in_thread_stack_temporaries, can_access_registers_thread):
3438 Spell out "struct thread_info" instead of just "thread_info".
3439 * inferior.h (notice_new_inferior): Likewise.
3440
3441 2018-06-25 Pedro Alves <palves@redhat.com>
3442
3443 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3444 pass thread_info pointer to delete_thread.
3445 (windows_nat_target::detach): Pass inferior pointer to
3446 detach_inferior.
3447 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3448 delete_thread.
3449 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3450 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3451 and pass a thread_info pointer to delete_thread.
3452 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3453 pass thread_info pointer to delete_thread.
3454 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3455 delete_thread_silent call.
3456 * procfs.c (procfs_target::detach): Pass inferior pointer to
3457 detach_inferior.
3458 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3459 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3460 delete_thread_silent call.
3461 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3462 pass thread_info pointer to delete_thread.
3463 (windows_nat_target::detach): Pass inferior pointer to
3464 delete_inferior.
3465
3466 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3467
3468 * regcache.c (readable_regcache::read_part): Fix asserts.
3469 (reg_buffer::raw_collect_part): New function.
3470 (regcache::write_part): Fix asserts.
3471 (reg_buffer::raw_supply_part): New function.
3472 (regcache::transfer_regset_register): New helper function.
3473 (regcache::transfer_regset): Call new functions.
3474 (regcache_supply_regset): Use gdb_byte*.
3475 (regcache::supply_regset): Likewise.
3476 (regcache_collect_regset): Likewise.
3477 (regcache::collect_regset): Likewise.
3478 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3479 (reg_buffer::raw_supply_part): Likewise.
3480 (regcache::transfer_regset_register): Likewise.
3481 (regcache::transfer_regset): Use gdb_byte*.
3482
3483 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3484
3485 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3486
3487 2018-06-21 Pedro Alves <palves@redhat.com>
3488
3489 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3490 instead of a ptid_t. All callers adjusted.
3491 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3492 adjusted.
3493 (print_ada_task_info, display_current_task_id, task_command_1):
3494 Adjust.
3495 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3496 inferior_thread.
3497 (breakpoint_kind): Adjust.
3498 (remove_breakpoints_pid): Rename to ...
3499 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3500 pointer. All callers adjusted.
3501 (bpstat_clear_actions): Use inferior_thread.
3502 (get_bpstat_thread): New.
3503 (bpstat_do_actions): Use it.
3504 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3505 to take a thread_info pointer. All callers adjusted.
3506 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3507 (breakpoint_re_set_thread): Use inferior_thread.
3508 * breakpoint.h (struct inferior): Forward declare.
3509 (bpstat_stop_status): Update.
3510 (remove_breakpoints_pid): Delete.
3511 (remove_breakpoints_inf): New.
3512 * bsd-uthread.c (bsd_uthread_target::wait)
3513 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3514 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3515 (maint_btrace_packet_history_cmd)
3516 (maint_btrace_clear_packet_history_cmd): Adjust.
3517 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3518 inferior_thread.
3519 * cli/cli-interp.c: Include "inferior.h".
3520 * common/refcounted-object.h (struct
3521 refcounted_object_ref_policy): New.
3522 * compile/compile-object-load.c: Include gdbthread.h.
3523 (store_regs): Use inferior_thread.
3524 * corelow.c (core_target::close): Use current_inferior.
3525 (core_target_open): Adjust to use first_thread_of_inferior and use
3526 the current inferior.
3527 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3528 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3529 <thread>: ... this new field. All references adjusted.
3530 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3531 Take a thread_info pointer instead of a ptid_t.
3532 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3533 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3534 thread_info pointer instead of a ptid_t.
3535 * elfread.c: Include "inferior.h".
3536 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3537 Use inferior_thread.
3538 * eval.c (evaluate_subexp): Likewise.
3539 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3540 inferior_thread.
3541 * gdb_proc_service.h (struct thread_info): Forward declare.
3542 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3543 <thread>: ... this new field. All references adjusted.
3544 * gdbarch.h, gdbarch.c: Regenerate.
3545 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3546 'thread' parameter. All implementations and callers adjusted.
3547 * gdbthread.h (thread_info) <set_running>: New method.
3548 (delete_thread, delete_thread_silent): Take a thread_info pointer
3549 instead of a ptid.
3550 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3551 (first_thread_of_process): Delete, replaced by ...
3552 (first_thread_of_inferior): ... this new function. All callers
3553 adjusted.
3554 (any_live_thread_of_process): Delete, replaced by ...
3555 (any_live_thread_of_inferior): ... this new function. All callers
3556 adjusted.
3557 (switch_to_thread, switch_to_no_thread): Declare.
3558 (is_executing): Delete.
3559 (enable_thread_stack_temporaries): Update comment.
3560 <enable_thread_stack_temporaries>: Take a thread_info pointer
3561 instead of a ptid_t. Incref the thread.
3562 <~enable_thread_stack_temporaries>: Decref the thread.
3563 <m_ptid>: Delete
3564 <m_thr>: New.
3565 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3566 (get_last_thread_stack_temporary)
3567 (value_in_thread_stack_temporaries, can_access_registers_thread):
3568 Take a thread_info pointer instead of a ptid_t. All callers
3569 adjusted.
3570 * infcall.c (get_call_return_value): Use inferior_thread.
3571 (run_inferior_call): Work with thread pointers instead of ptid_t.
3572 (call_function_by_hand_dummy): Work with thread pointers instead
3573 of ptid_t. Use thread_info_ref.
3574 * infcmd.c (proceed_thread_callback): Access thread's state
3575 directly.
3576 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3577 access thread's state directly.
3578 (continue_command): Use inferior_thread.
3579 (info_program_command): Use find_thread_ptid and access thread
3580 state directly.
3581 (proceed_after_attach_callback): Use thread state directly.
3582 (notice_new_inferior): Take a thread_info pointer instead of a
3583 ptid_t. All callers adjusted.
3584 (exit_inferior): Take an inferior pointer instead of a pid. All
3585 callers adjusted.
3586 (exit_inferior_silent): New.
3587 (detach_inferior): Delete.
3588 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3589 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3590 (detach_inferior_command, kill_inferior_command): Use
3591 find_inferior_id instead of valid_gdb_inferior_id and
3592 gdb_inferior_id_to_pid.
3593 (inferior_command): Use inferior and thread pointers.
3594 * inferior.h (struct thread_info): Forward declare.
3595 (notice_new_inferior): Take a thread_info pointer instead of a
3596 ptid_t. All callers adjusted.
3597 (detach_inferior): Delete declaration.
3598 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3599 instead of a pid. All callers adjusted.
3600 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3601 (valid_gdb_inferior_id): Delete.
3602 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3603 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3604 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3605 ...
3606 <inf>: ... this new field.
3607 <step_ptid>: Delete, replaced by ...
3608 <step_thread>: ... this new field.
3609 (get_displaced_stepping_state): Take an inferior pointer instead
3610 of a pid. All callers adjusted.
3611 (displaced_step_in_progress_any_inferior): Adjust.
3612 (displaced_step_in_progress_thread): Take a thread pointer instead
3613 of a ptid_t. All callers adjusted.
3614 (displaced_step_in_progress, add_displaced_stepping_state): Take
3615 an inferior pointer instead of a pid. All callers adjusted.
3616 (get_displaced_step_closure_by_addr): Adjust.
3617 (remove_displaced_stepping_state): Take an inferior pointer
3618 instead of a pid. All callers adjusted.
3619 (displaced_step_prepare_throw, displaced_step_prepare)
3620 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3621 All callers adjusted.
3622 (start_step_over): Adjust.
3623 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3624 displaced step queue.
3625 (do_target_resume): Adjust.
3626 (fetch_inferior_event): Use inferior_thread.
3627 (context_switch, get_inferior_stop_soon): Take an
3628 execution_control_state pointer instead of a ptid_t. All callers
3629 adjusted.
3630 (switch_to_thread_cleanup): Delete.
3631 (stop_all_threads): Use scoped_restore_current_thread.
3632 * inline-frame.c: Include "gdbthread.h".
3633 (inline_state) <inline_state>: Take a thread pointer instead of a
3634 ptid_t. All callers adjusted.
3635 <ptid>: Delete, replaced by ...
3636 <thread>: ... this new field.
3637 (find_inline_frame_state): Take a thread pointer instead of a
3638 ptid_t. All callers adjusted.
3639 (skip_inline_frames, step_into_inline_frame)
3640 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3641 pointer instead of a ptid_t. All callers adjusted.
3642 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3643 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3644 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3645 pointers directly.
3646 * linux-nat.c (get_detach_signal): Likewise.
3647 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3648 (thread_db_notice_clone): Adjust.
3649 (thread_db_find_new_threads_silently)
3650 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3651 a thread pointer instead of a ptid_t. All callers adjusted.
3652 * mi/mi-cmd-var.c: Include "inferior.h".
3653 (mi_cmd_var_update_iter): Update to use thread pointers.
3654 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3655 inferior directly.
3656 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3657 out to ...
3658 (mi_output_running): ... this new function.
3659 (mi_on_resume_1): Adjust to use it.
3660 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3661 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3662 directly.
3663 (interrupt_thread_callback): : Adjust to use thread and inferior
3664 pointers.
3665 * proc-service.c: Include "gdbthread.h".
3666 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3667 * progspace-and-thread.c: Include "inferior.h".
3668 * progspace.c: Include "inferior.h".
3669 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3670 hold a reference to an inferior_object.
3671 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3672 inferior_thread.
3673 * python/py-inferior.c (struct inferior_object): Give the type a
3674 tag name instead of a typedef.
3675 (python_on_normal_stop): No need to check if the current thread is
3676 listed.
3677 (inferior_to_inferior_object): Change return type to
3678 inferior_object. All callers adjusted.
3679 (find_thread_object): Delete, bits factored out to ...
3680 (thread_to_thread_object): ... this new function.
3681 * python/py-infthread.c (create_thread_object): Use
3682 inferior_to_inferior_object.
3683 (thpy_is_stopped): Use thread pointer directly.
3684 (gdbpy_selected_thread): Use inferior_thread.
3685 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3686 field, replaced with ...
3687 <thread>: ... this new field. All users adjusted.
3688 (btpy_insn_or_gap_new): Drop const.
3689 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3690 callers adjusted.
3691 * python/py-record.c: Include "gdbthread.h".
3692 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3693 a ptid_t. All callers adjusted.
3694 (gdbpy_current_recording): Use inferior_thread.
3695 * python/py-record.h (recpy_record_object) <ptid>: Delete
3696 field, replaced with ...
3697 <thread>: ... this new field. All users adjusted.
3698 (recpy_element_object) <ptid>: Delete
3699 field, replaced with ...
3700 <thread>: ... this new field. All users adjusted.
3701 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3702 a ptid_t. All callers adjusted.
3703 * python/py-threadevent.c: Include "gdbthread.h".
3704 (get_event_thread): Use thread_to_thread_object.
3705 * python/python-internal.h (struct inferior_object): Forward
3706 declare.
3707 (find_thread_object, find_inferior_object): Delete declarations.
3708 (thread_to_thread_object, inferior_to_inferior_object): New
3709 declarations.
3710 * record-btrace.c: Include "inferior.h".
3711 (require_btrace_thread): Use inferior_thread.
3712 (record_btrace_frame_sniffer)
3713 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3714 (get_thread_current_frame): Use scoped_restore_current_thread and
3715 switch_to_thread.
3716 (get_thread_current_frame): Use thread pointer directly.
3717 (record_btrace_replay_at_breakpoint): Use thread's inferior
3718 pointer directly.
3719 * record-full.c: Include "inferior.h".
3720 * regcache.c: Include "gdbthread.h".
3721 (get_thread_arch_regcache): Use the inferior's address space
3722 directly.
3723 (get_thread_regcache, registers_changed_thread): New.
3724 * regcache.h (get_thread_regcache(thread_info *thread)): New
3725 overload.
3726 (registers_changed_thread): New.
3727 (remote_target) <remote_detach_1>: Swap order of parameters.
3728 (remote_add_thread): <remote_add_thread>: Return the new thread.
3729 (get_remote_thread_info(ptid_t)): New overload.
3730 (remote_target::remote_notice_new_inferior): Use thread pointers
3731 directly.
3732 (remote_target::process_initial_stop_replies): Use
3733 thread_info::set_running.
3734 (remote_target::remote_detach_1, remote_target::detach)
3735 (extended_remote_target::detach): Adjust.
3736 * stack.c (frame_show_address): Use inferior_thread.
3737 * target-debug.h (target_debug_print_thread_info_pp): New.
3738 * target-delegates.c: Regenerate.
3739 * target.c (default_thread_address_space): Delete.
3740 (memory_xfer_partial_1): Use current_inferior.
3741 (target_detach): Use current_inferior.
3742 (target_thread_address_space): Delete.
3743 (generic_mourn_inferior): Use current_inferior.
3744 * target.h (struct target_ops) <thread_address_space>: Delete.
3745 (target_thread_address_space): Delete.
3746 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3747 pointers directly.
3748 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3749 thread pointer instead of a ptid_t. Adjust all callers.
3750 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3751 (first_thread_of_process): Delete, replaced by ...
3752 (first_thread_of_inferior): ... this new function. All callers
3753 adjusted.
3754 (any_thread_of_process): Rename to ...
3755 (any_thread_of_inferior): ... this, and take an inferior pointer.
3756 (any_live_thread_of_process): Rename to ...
3757 (any_live_thread_of_inferior): ... this, and take an inferior
3758 pointer.
3759 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3760 (value_in_thread_stack_temporaries)
3761 (get_last_thread_stack_temporary): Take a thread pointer instead
3762 of a ptid_t. Adjust all callers.
3763 (thread_info::set_running): New.
3764 (validate_registers_access): Use inferior_thread.
3765 (can_access_registers_ptid): Rename to ...
3766 (can_access_registers_thread): ... this, and take a thread
3767 pointer.
3768 (print_thread_info_1): Adjust to compare thread pointers instead
3769 of ptids.
3770 (switch_to_no_thread, switch_to_thread): Make extern.
3771 (scoped_restore_current_thread::~scoped_restore_current_thread):
3772 Use m_thread pointer directly.
3773 (scoped_restore_current_thread::scoped_restore_current_thread):
3774 Use inferior_thread.
3775 (thread_command): Use thread pointer directly.
3776 (thread_num_make_value_helper): Use inferior_thread.
3777 * top.c (execute_command): Use inferior_thread.
3778 * tui/tui-interp.c: Include "inferior.h".
3779 * varobj.c (varobj_create): Use inferior_thread.
3780 (value_of_root_1): Use find_thread_global_id instead of
3781 global_thread_id_to_ptid.
3782
3783 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3784
3785 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3786 possible.
3787 (regcache::write_part): Likewise.
3788 (readable_regcache::cooked_read_part): Update comment.
3789 (readable_regcache::cooked_write_part): Likewise.
3790 * regcache.h: (readable_regcache::read_part): Likewise.
3791 (regcache::write_part): Likewise.
3792
3793 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3794 Dirk Schubert <dirk.schubert@arm.com>
3795
3796 * aarch64-linux-nat.c (post_attach): New.
3797 (aarch64_linux_nat_target::post_attach): Override post_attach to
3798 record the number of hardware debug registers.
3799
3800 2018-06-20 Tom Tromey <tom@tromey.com>
3801
3802 * python/py-param.c (add_setshow_generic): Make parameters const.
3803 (parmpy_init): Update.
3804
3805 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3806
3807 * regcache.h (regcache_cooked_read_ftype): Rename to...
3808 (register_read_ftype): ...this, change type to function_view.
3809 (class reg_buffer) <save>: Remove src parameter.
3810 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3811 parameter non-const in first overload. Remove src parameter in
3812 second overload.
3813 * regcache.c (do_cooked_read): Remove.
3814 (readonly_detached_regcache::readonly_detached_regcache): Make
3815 parameter non-const, adjust call to other constructor.
3816 (reg_buffer::save): Remove src parameter.
3817 * frame.c (do_frame_register_read): Remove.
3818 (frame_save_as_regcache): Use lambda function.
3819 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3820 parameter to ppu2spu_data *.
3821 (ppu2spu_sniffer): Use lambda function.
3822
3823 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3824
3825 * record-full.c (record_full_target::insert_breakpoint): Remove
3826 "struct" keyword, add const.
3827
3828 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3829
3830 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3831 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3832 * configure.ac: Remove AC_PREREQ, add missing quoting.
3833 * gnulib/configure.ac: Modernize usage of
3834 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3835 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3836 (AUTOMAKE_VERSION): Bump to 1.15.1.
3837 * configure: Re-generate.
3838 * config.in: Re-generate.
3839 * aclocal.m4: Re-generate.
3840 * gnulib/aclocal.m4: Re-generate.
3841 * gnulib/config.in: Re-generate.
3842 * gnulib/configure: Re-generate.
3843 * gnulib/import/Makefile.in: Re-generate.
3844
3845 2018-06-19 Pedro Alves <palves@redhat.com>
3846
3847 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3848 (lookup_minimal_symbol_by_pc_section): ... here with
3849 gdb_assert_not_reached added.
3850
3851 2018-06-19 Pedro Alves <palves@redhat.com>
3852
3853 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3854 parameter with a block parameter. Compare location's block symbol
3855 with the frame's block instead of addresses.
3856 (skip_inline_frames): Pass the current block instead of the
3857 frame's address. Break out as soon as we determine the frame
3858 should not be skipped.
3859
3860 2018-06-18 Tom Tromey <tom@tromey.com>
3861
3862 * solib-aix.c (solib_aix_get_section_offsets): Return
3863 unique_xmalloc_ptr.
3864 (solib_aix_solib_create_inferior_hook): Update.
3865
3866 2018-06-18 Tom Tromey <tom@tromey.com>
3867
3868 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3869
3870 2018-06-18 Tom Tromey <tom@tromey.com>
3871
3872 * solib-frv.c (frv_relocate_main_executable): Use
3873 unique_xmalloc_ptr.
3874 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3875 unique_xmalloc_ptr.
3876
3877 2018-06-18 Tom Tromey <tom@tromey.com>
3878
3879 * objfiles.h (inhibit_section_map_updates): Update.
3880 (resume_section_map_updates, resume_section_map_updates_cleanup):
3881 Remove.
3882 * solib-svr4.c (svr4_handle_solib_event): Update.
3883 * objfiles.c (inhibit_section_map_updates): Return
3884 scoped_restore_tmpl<int>.
3885 (resume_section_map_updates, resume_section_map_updates_cleanup):
3886 Remove.
3887
3888 2018-06-18 Tom Tromey <tom@tromey.com>
3889
3890 * valprint.h (read_string): Update.
3891 * valprint.c (read_string): Change type of "buffer".
3892 (val_print_string): Update.
3893 * python/py-value.c (valpy_string): Update.
3894 * language.h (struct language_defn) <la_get_string>: Change
3895 type of "buffer".
3896 (default_get_string, c_get_string): Update.
3897 * language.c (default_get_string): Change type of "buffer".
3898 * guile/scm-value.c (gdbscm_value_to_string): Update.
3899 * c-lang.c (c_get_string): Change type of "buffer".
3900
3901 2018-06-18 Tom Tromey <tom@tromey.com>
3902
3903 * ser-mingw.c (struct pipe_state_destroyer): New.
3904 (pipe_state_up): New typedef.
3905 (cleanup_pipe_state): Remove.
3906 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3907
3908 2018-06-18 Tom Tromey <tom@tromey.com>
3909
3910 * rust-lang.h (rust_yyerror): Don't declare.
3911 * rust-lang.c (rust_language_defn): Update.
3912 * rust-exp.y (yyerror): Now static.
3913 * parse.c (parse_exp_in_context_1): Update.
3914 * p-lang.h (p_yyerror): Don't declare.
3915 * p-lang.c (p_language_defn): Update.
3916 * p-exp.y (yyerror): Now static.
3917 * opencl-lang.c (opencl_language_defn): Update.
3918 * objc-lang.c (objc_language_defn): Update.
3919 * m2-lang.h (m2_yyerror): Don't declare.
3920 * m2-lang.c (m2_language_defn): Update.
3921 * m2-exp.y (yyerror): Now static.
3922 * language.h (struct language_defn) <la_error>: Remove.
3923 * language.c (unk_lang_error): Remove.
3924 (unknown_language_defn, auto_language_defn): Remove.
3925 * go-lang.h (go_yyerror): Don't declare.
3926 * go-lang.c (go_language_defn): Update.
3927 * go-exp.y (yyerror): Now static.
3928 * f-lang.h (f_yyerror): Don't declare.
3929 * f-lang.c (f_language_defn): Update.
3930 * f-exp.y (yyerror): Now static.
3931 * d-lang.h (d_yyerror): Don't declare.
3932 * d-lang.c (d_language_defn): Update.
3933 * d-exp.y (yyerror): Now static.
3934 * c-lang.h (c_yyerror): Don't declare.
3935 * c-lang.c (c_language_defn, cplus_language_defn)
3936 (asm_language_defn, minimal_language_defn): Update.
3937 * c-exp.y (yyerror): Now static.
3938 * ada-lang.h (ada_yyerror): Don't declare.
3939 * ada-lang.c (ada_language_defn): Update.
3940 * ada-exp.y (yyerror): Now static.
3941
3942 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3943
3944 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3945 (store_sveregs_to_thread): Likewise.
3946 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3947 (aarch64_linux_store_inferior_registers): Likewise.
3948 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3949 function.
3950 (aarch64_sve_regs_copy_to_regcache): Likewise.
3951 (aarch64_sve_regs_copy_from_regcache): Likewise.
3952 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3953 declaration.
3954 (aarch64_sve_regs_copy_to_regcache): Likewise.
3955 (aarch64_sve_regs_copy_from_regcache): Likewise.
3956 (sve_context): Structure from Linux headers.
3957 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3958 (SVE_SIG_ZREG_SIZE): Likewise.
3959 (SVE_SIG_PREG_SIZE): Likewise.
3960 (SVE_SIG_FFR_SIZE): Likewise.
3961 (SVE_SIG_REGS_OFFSET): Likewise.
3962 (SVE_SIG_ZREGS_OFFSET): Likewise.
3963 (SVE_SIG_ZREG_OFFSET): Likewise.
3964 (SVE_SIG_ZREGS_SIZE): Likewise.
3965 (SVE_SIG_PREGS_OFFSET): Likewise.
3966 (SVE_SIG_PREG_OFFSET): Likewise.
3967 (SVE_SIG_PREGS_SIZE): Likewise.
3968 (SVE_SIG_FFR_OFFSET): Likewise.
3969 (SVE_SIG_REGS_SIZE): Likewise.
3970 (SVE_SIG_CONTEXT_SIZE): Likewise.
3971 (SVE_PT_REGS_MASK): Likewise.
3972 (SVE_PT_REGS_FPSIMD): Likewise.
3973 (SVE_PT_REGS_SVE): Likewise.
3974 (SVE_PT_VL_INHERIT): Likewise.
3975 (SVE_PT_VL_ONEXEC): Likewise.
3976 (SVE_PT_REGS_OFFSET): Likewise.
3977 (SVE_PT_FPSIMD_OFFSET): Likewise.
3978 (SVE_PT_FPSIMD_SIZE): Likewise.
3979 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3980 (SVE_PT_SVE_PREG_SIZE): Likewise.
3981 (SVE_PT_SVE_FFR_SIZE): Likewise.
3982 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3983 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3984 (__SVE_SIG_TO_PT): Likewise.
3985 (SVE_PT_SVE_OFFSET): Likewise.
3986 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3987 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3988 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3989 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3990 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3991 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3992 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3993 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3994 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3995 (SVE_PT_SVE_SIZE): Likewise.
3996 (SVE_PT_SIZE): Likewise.
3997 (HAS_SVE_STATE): New define.
3998
3999 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4000
4001 * nat/aarch64-sve-linux-sigcontext.h: New file.
4002 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4003 new files.
4004 (SVE_VQ_MIN): Likewise.
4005 (SVE_VQ_MAX): Likewise.
4006 (SVE_VL_MIN): Likewise.
4007 (SVE_VL_MAX): Likewise.
4008 (SVE_NUM_ZREGS): Likewise.
4009 (SVE_NUM_PREGS): Likewise.
4010 (sve_vl_valid): Likewise.
4011 (struct user_sve_header): Likewise.
4012
4013 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4014 Richard Bunt <Richard.Bunt@arm.com>
4015
4016 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4017 was requested by GDB.
4018
4019 2018-06-15 Tom de Vries <tdevries@suse.de>
4020
4021 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4022
4023 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4024
4025 * gnulib/update-gnulib.sh: Print expected versions of
4026 autoconf/aclocal.
4027
4028 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4029
4030 * arch-utils.c (default_type_align): Use type_length_units.
4031 * gdbtypes.c (type_align): Use type_length_units.
4032
4033 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4034
4035 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4036 of 'define' command.
4037
4038 2018-06-14 Tom de Vries <tdevries@suse.de>
4039
4040 PR cli/22573
4041 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4042 get_no_prettyformat_print_options.
4043
4044 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4045
4046 * sparc-nat.h: Include target.h.
4047 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4048 <fetch_registers>: Remove this argument in function call.
4049 <store_registers>: Remove this argument in function call, remove
4050 extra semicolon.
4051 <low_forget_process>: Call sparc64_forget_process instead of
4052 sparc_forget_process.
4053
4054 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4055
4056 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4057 (procfs_target::make_corefile_notes): Adjust to new
4058 target_read_alloc return type.
4059
4060 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4061 Stephen Roberts <stephen.roberts@arm.com>
4062
4063 PR gdb/22882
4064 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4065 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4066 Move should_notify_stop local into more inner scope.
4067
4068 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4069 Stephen Roberts <stephen.roberts@arm.com>
4070
4071 PR gdb/22882
4072 * infrun.c (resume_1): Add call to mark_async_event_handler.
4073
4074 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4075
4076 * infrun.c (do_target_wait): Change old version of $pc printed.
4077
4078 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4079
4080 * dwarf2read.c (read_index_from_section): Rename to...
4081 (read_gdb_index_from_section): ... this, update all callers.
4082 (dwarf2_read_index): Rename to...
4083 (dwarf2_read_gdb_index): ... this, update all callers.
4084
4085 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4086
4087 * gdb/hppa-linux-nat.c
4088 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4089 hppa_linux_nat_target::fetch_registers.
4090
4091 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4092
4093 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4094 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4095 (AARCH64_DWARF_SVE_FFR): Likewise.
4096 (AARCH64_DWARF_SVE_P0): Likewise.
4097 (AARCH64_DWARF_SVE_Z0): Likewise.
4098
4099 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4100
4101 * common/common-regcache.h (raw_compare): New function.
4102 * regcache.c (regcache::raw_compare): Likewise.
4103 * regcache.h (regcache::raw_compare): New declaration.
4104
4105 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4106
4107 * common/common-regcache.h (reg_buffer_common): New structure.
4108 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4109 (reg_buffer::raw_supply): Likewise.
4110 (reg_buffer::raw_supply_integer): Likewise.
4111 (reg_buffer::raw_supply_zeroed): Likewise.
4112 (reg_buffer::raw_collect): Likewise.
4113 (reg_buffer::raw_collect_integer): Likewise.
4114 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4115 (reg_buffer::raw_supply): Likewise.
4116 (reg_buffer::raw_supply_integer): Likewise.
4117 (reg_buffer::raw_supply_zeroed): Likewise.
4118 (reg_buffer::raw_collect): Likewise.
4119 (reg_buffer::raw_collect_integer): Likewise.
4120
4121 2018-06-10 Tom Tromey <tom@tromey.com>
4122
4123 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4124 (class remote_state) <stop_reply_queue>: Now std::vector.
4125 (remote_state::~remote_state)
4126 (remote_target::stop_reply_queue_length): Update.
4127 (struct queue_iter_param, remove_child_of_pending_fork)
4128 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4129 (check_pending_event_prevents_wildcard_vcont_callback)
4130 (remove_stop_reply_for_inferior)
4131 (remove_stop_reply_of_remote_state)
4132 (remote_notif_remove_once_on_match)
4133 (stop_reply_match_ptid_and_ws)
4134 (remote_kill_child_of_pending_fork): Remove.
4135 (remote_target::remove_new_fork_children)
4136 (remote_target::check_pending_events_prevent_wildcard_vcont)
4137 (remote_target::discard_pending_stop_replies)
4138 (remote_target::discard_pending_stop_replies_in_queue)
4139 (remote_target::remote_notif_remove_queued_reply)
4140 (remote_target::queued_stop_reply)
4141 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4142 (remote_target::wait, remote_target::kill_new_fork_children)
4143 (remote_target::async): Update.
4144
4145 2018-06-10 Tom Tromey <tom@tromey.com>
4146
4147 * record-full.c (record_full_arch_list_cleanups): Remove.
4148 (record_full_message): Use try/catch.
4149 (record_full_wait_cleanups): Remove.
4150 (record_full_wait_1): Use try/catch.
4151 (record_full_restore): Likewise.
4152
4153 2018-06-10 Tom Tromey <tom@tromey.com>
4154
4155 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4156 declare VEC. Add constructor.
4157 <in_target_beneath>: Now bool.
4158 (record_full_breakpoints): Now a std::vector, static.
4159 (record_full_sync_record_breakpoints)
4160 (record_full_init_record_breakpoints)
4161 (record_full_target::insert_breakpoint)
4162 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4163
4164 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4165
4166 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4167 * serial.c (serial_interface_lookup): Remove struct keyword.
4168
4169 2018-06-10 Tom Tromey <tom@tromey.com>
4170
4171 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4172 method.
4173 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4174 a method.
4175 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4176 method.
4177 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4178 "beneath" as a method.
4179 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4180 Use "beneath" as a method.
4181
4182 2018-06-10 Tom Tromey <tom@tromey.com>
4183
4184 * tracefile.c (struct trace_file_writer_deleter): New.
4185 <operator()>: Rename from trace_file_writer_xfree.
4186 (trace_file_writer_up): New typedef.
4187 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4188
4189 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4190
4191 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4192 <m_registers, m_register_status>: Change type to
4193 std::unique_ptr.
4194 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4195 XCNEWVEC.
4196
4197 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4198
4199 * common/common-regcache.h (enum register_status): Add
4200 underlying type "signed char".
4201 * regcache.h (reg_buffer) <m_register_status>: Change type to
4202 register_status *.
4203 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4204 register_status instead of signed char.
4205 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4206 (reg_buffer::get_register_status): Remove cast.
4207 (readable_regcache::raw_read): Remove cast.
4208 (readable_regcache::cooked_read): Remove cast.
4209
4210 2018-06-09 Tom Tromey <tom@tromey.com>
4211
4212 * source.c (reverse_search_command, forward_search_command): Use
4213 scoped_fd.
4214
4215 2018-06-09 Tom Tromey <tom@tromey.com>
4216
4217 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4218 (serial_ops_list): Now static, std::vector.
4219 (serial_interface_lookup, serial_add_interface): Update.
4220
4221 2018-06-09 Tom Tromey <tom@tromey.com>
4222
4223 * dwarf2read.c (process_cu_includes): Update.
4224 (process_full_comp_unit): Update.
4225 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4226 std::vector.
4227
4228 2018-06-08 Paul Koning <paul_koning@dell.com>
4229
4230 PR gdb/23252
4231
4232 * python/python.c (do_start_initialization):
4233 Avoid call to internal Python API.
4234 (init__gdb_module): New function.
4235
4236 2018-06-08 Gary Benson <gbenson@redhat.com>
4237
4238 * linux-thread-db.c (valprint.h): New include.
4239 (struct check_thread_db_info): New structure.
4240 (check_thread_db_on_load, tdb_testinfo): New static globals.
4241 (check_thread_db, check_thread_db_callback): New functions.
4242 (try_thread_db_load_1): Run integrity checks if requested.
4243 (maintenance_check_libthread_db): New function.
4244 (_initialize_thread_db): Register "maint check libthread-db"
4245 and "maint set/show check-libthread-db".
4246 * NEWS: Mention the above new commands.
4247
4248 2018-06-08 Tom Tromey <tom@tromey.com>
4249
4250 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4251 now a method.
4252
4253 2018-06-08 Tom Tromey <tom@tromey.com>
4254
4255 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4256
4257 2018-06-08 Tom Tromey <tom@tromey.com>
4258
4259 * common/btrace-common.h (struct btrace_data): Add constructor,
4260 destructor, move assignment operator.
4261 <empty, clear, fini>: New methods.
4262 <format>: Initialize.
4263 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4264 (btrace_data_empty): Don't declare.
4265 * common/btrace-common.c (btrace_data_init): Remove.
4266 (btrace_data::fini): Rename from btrace_data_fini.
4267 (btrace_data::empty): Rename from btrace_data_empty.
4268 (btrace_data::clear): Rename from btrace_data_clear. Return
4269 bool.
4270 * btrace.h (make_cleanup_btrace_data): Don't declare.
4271 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4272 (parse_xml_btrace): Update.
4273 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4274 (maint_btrace_clear_packet_history_cmd): Update.
4275
4276 2018-06-07 Pedro Alves <palves@redhat.com>
4277
4278 * target.h (target_ops) <beneath>: Now a method. All references
4279 updated.
4280 (class target_stack): New.
4281 * target.c (g_target_stack): New.
4282 (g_current_top_target): Delete.
4283 (current_top_target): Get the top target out of g_target_stack.
4284 (target_stack::push, target_stack::unpush): New.
4285 (push_target, unpush_target): Reimplement.
4286 (target_is_pushed): Reimplement in terms of g_target_stack.
4287 (target_ops::beneath, target_stack::find_beneath): New.
4288
4289 2018-06-07 Pedro Alves <palves@redhat.com>
4290
4291 * target.h (find_target_beneath): Delete declaration.
4292 * target.c (find_target_beneath): Delete definition.
4293 * aix-thread.c: All callers of find_target_beneath adjusted to
4294 call target_ops::beneath instead.
4295 * bsd-uthread.c: Likewise.
4296 * linux-thread-db.c: Likewise.
4297 * ravenscar-thread.c: Likewise.
4298 * sol-thread.c: Likewise.
4299 * spu-multiarch.c: Likewise.
4300
4301 2018-06-07 Pedro Alves <palves@redhat.com>
4302
4303 * target.h (target_ops) <beneath>: Now a method. All references
4304 updated.
4305 (target_ops) <m_beneath>: New.
4306 * target.c (target_ops::beneath): New.
4307 * corelow.c: Adjust all references to target_ops::beneath.
4308 * linux-thread-db.c: Likewise.
4309 * make-target-delegates: Likewise.
4310 * record-btrace.c: Likewise.
4311 * record-full.c: Likewise.
4312 * remote.c: Likewise.
4313 * target.c: Likewise.
4314 * target-delegates.c: Regenerate.
4315
4316 2018-06-07 Pedro Alves <palves@redhat.com>
4317
4318 * target.h (target_stack): Delete.
4319 (current_top_target): Declare function.
4320 * target.c (target_stack): Delete.
4321 (g_current_top_target): New.
4322 (current_top_target): New function.
4323 * auxv.c: Use current_top_target instead of target_stack
4324 throughout.
4325 * avr-tdep.c: Likewise.
4326 * breakpoint.c: Likewise.
4327 * corefile.c: Likewise.
4328 * elfread.c: Likewise.
4329 * eval.c: Likewise.
4330 * exceptions.c: Likewise.
4331 * frame.c: Likewise.
4332 * gdbarch-selftests.c: Likewise.
4333 * gnu-v3-abi.c: Likewise.
4334 * ia64-tdep.c: Likewise.
4335 * ia64-vms-tdep.c: Likewise.
4336 * infcall.c: Likewise.
4337 * infcmd.c: Likewise.
4338 * infrun.c: Likewise.
4339 * linespec.c: Likewise.
4340 * linux-tdep.c: Likewise.
4341 * minsyms.c: Likewise.
4342 * ppc-linux-nat.c: Likewise.
4343 * ppc-linux-tdep.c: Likewise.
4344 * procfs.c: Likewise.
4345 * regcache.c: Likewise.
4346 * remote.c: Likewise.
4347 * rs6000-tdep.c: Likewise.
4348 * s390-linux-nat.c: Likewise.
4349 * s390-tdep.c: Likewise.
4350 * solib-aix.c: Likewise.
4351 * solib-darwin.c: Likewise.
4352 * solib-dsbt.c: Likewise.
4353 * solib-spu.c: Likewise.
4354 * solib-svr4.c: Likewise.
4355 * solib-target.c: Likewise.
4356 * sparc-tdep.c: Likewise.
4357 * sparc64-tdep.c: Likewise.
4358 * spu-tdep.c: Likewise.
4359 * symfile.c: Likewise.
4360 * symtab.c: Likewise.
4361 * target-descriptions.c: Likewise.
4362 * target-memory.c: Likewise.
4363 * target.c: Likewise.
4364 * target.h: Likewise.
4365 * tracefile-tfile.c: Likewise.
4366 * tracepoint.c: Likewise.
4367 * valops.c: Likewise.
4368 * valprint.c: Likewise.
4369 * value.c: Likewise.
4370 * windows-tdep.c: Likewise.
4371 * mi/mi-main.c: Likewise.
4372
4373 2018-06-07 Tom Tromey <tom@tromey.com>
4374
4375 * valprint.h (build_address_symbolic): Declare.
4376 * printcmd.c (print_address_symbolic): Update.
4377 (build_address_symbolic): Change "name" and "filename" to
4378 std::string.
4379 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4380 Update.
4381 * defs.h (build_address_symbolic): Remove declaration.
4382
4383 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4384
4385 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4386 (aarch64_vnv_type): Add function.
4387 (aarch64_pseudo_register_name): Add V regs for SVE.
4388 (aarch64_pseudo_register_type): Likewise.
4389 (aarch64_pseudo_register_reggroup_p): Likewise.
4390 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4391 (aarch64_pseudo_read_value): Add V regs for SVE.
4392 (aarch64_pseudo_write_2): Use V0 offset for SVE
4393 (aarch64_pseudo_write): Add V regs for SVE.
4394 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4395
4396 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4397
4398 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4399 (sve_vl_from_vq): Likewise.
4400
4401 2018-06-05 Tom Tromey <tom@tromey.com>
4402
4403 * cli/cli-cmds.c (show_version): Update.
4404 * top.c (print_gdb_version): Add "interactive" parameter.
4405 Update.
4406 * main.c (captured_main_1): Update.
4407 * top.h (print_gdb_version): Add "interactive" parameter and a
4408 comment.
4409
4410 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4411
4412 * common/enum-flags.h: Add trailing semicolon to example in
4413 comment.
4414
4415 2018-06-05 Tom Tromey <tom@tromey.com>
4416
4417 PR cli/12326:
4418 * NEWS: Add entry about pager.
4419 * utils.c (pagination_disabled_for_command): New global.
4420 (prompt_for_continue): Allow "c" response to prompt.
4421 (reinitialize_more_filter): Clear
4422 pagination_disabled_for_command.
4423 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4424
4425 2018-06-04 Tom Tromey <tom@tromey.com>
4426
4427 * ada-lang.h (ada_lookup_symbol_list): Update.
4428 * ada-lang.c (resolve_subexp): Update.
4429 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4430 parameter.
4431 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4432 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4433 results parameter to std::vector.
4434 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4435 Update.
4436 * ada-exp.y (block_lookup): Update.
4437 (select_possible_type_sym): Change type of syms. Remove nsyms
4438 parameter.
4439 (write_var_or_type, write_name_assoc): Update.
4440
4441 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4442
4443 * windows-nat.c (windows_nat_target::xfer_partial): Return
4444 TARGET_XFER_E_IO if we need to delegate to the target beneath
4445 but BENEATH is NULL.
4446
4447 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4448
4449 * Makefile.in (config.status): Add configure.nat as a
4450 dependency.
4451
4452 2018-06-04 Tom Tromey <tom@tromey.com>
4453
4454 * cp-name-parser.y (cpname_state): Add method declarations.
4455 (HANDLE_QUAL): Update.
4456 (cpname_state::d_grab, cpname_state::fill_comp)
4457 (cpname_state::make_operator, cpname_state::make_dtor)
4458 (cpname_state::make_builtin_type, cpname_state::make_name)
4459 (cpname_state::d_qualify, cpname_state::d_int_type)
4460 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4461 (%union): Move earlier.
4462
4463 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4464
4465 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4466
4467 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4468
4469 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4470 (aarch64_pseudo_write_1): Likewise.
4471 (aarch64_pseudo_read_value): Use helper.
4472 (aarch64_pseudo_write): Likewise.
4473
4474 2018-06-04 Pedro Alves <palves@redhat.com>
4475
4476 * darwin-nat.c (darwin_ops): Delete.
4477 (darwin_attach_pid): Use get_native_target.
4478
4479 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4480
4481 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4482 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4483
4484 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4485
4486 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4487 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4488 (aarch64_gdbarch_init): Check for SVE.
4489 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4490
4491 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4492
4493 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4494 * aarch64-tdep.h (aarch64_read_description): Likewise.
4495 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4496 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4497 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4498 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4499 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4500
4501 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4502
4503 * value.c (value_fetch_lazy_bitfield): New.
4504 (value_fetch_lazy_memory): New.
4505 (value_fetch_lazy_register): New.
4506 (value_fetch_lazy): Factor out to smaller functions.
4507
4508 2018-06-01 Tom Tromey <tom@tromey.com>
4509
4510 * cp-name-parser.y (backslashable, represented): Now const.
4511
4512 2018-06-01 Tom Tromey <tom@tromey.com>
4513
4514 * cp-name-parser.y: Include parser-defs.h.
4515 (parser_fprintf): Remove declaration.
4516
4517 2018-06-01 Tom Tromey <tom@tromey.com>
4518
4519 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4520 %parse-param.
4521 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4522 (global_result): Remove globals.
4523 (struct cpname_state): New.
4524 (yyparse): Don't declare.
4525 (yylex, yyerror): Move declarations after %union.
4526 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4527 (make_name): Add state parameter.
4528 Update all callers.
4529 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4530 parameter.
4531 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4532 Update.
4533 (yylex): Add lvalp, state parameters.
4534 (yyerror): Add state parameter.
4535 (cp_demangled_name_to_comp): Update.
4536
4537 2018-06-01 Tom Tromey <tom@tromey.com>
4538
4539 * cp-name-parser.y (parser_fprintf): Declare.
4540 (GDB_YY_REMAP_PREFIX): Define.
4541 Include yy-remap.h. Don't redefine yy* identifiers.
4542
4543 2018-06-01 Tom Tromey <tom@tromey.com>
4544
4545 * python/py-type.c (typy_legacy_template_argument): Update.
4546 * cp-support.h (cp_demangled_name_to_comp): Update.
4547 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4548 parameter to be a "std::string *".
4549 (main): Update.
4550
4551 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4552
4553 * ada-lex.l: Include "diagnostics.h" instead of
4554 "common/diagnostics.h".
4555 * unittests/environ-selftests.c: Likewise.
4556 * common/diagnostics.h: Moved to ../include.
4557
4558 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4559
4560 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4561 to language_mode_manual while calling breakpoint_re_set_one.
4562
4563 2018-06-01 Tom Tromey <tom@tromey.com>
4564
4565 * valops.c (value_cast_structs, destructor_name_p): Update.
4566 * symtab.c (gdb_mangle_name): Update.
4567 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4568 Update.
4569 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4570 (pascal_object_print_value_fields, pascal_object_print_value):
4571 Update.
4572 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4573 * linespec.c (find_methods): Update.
4574 * gdbtypes.h (type_name_no_tag): Remove.
4575 (type_name_or_error): Rename from type_name_no_tag_or_error.
4576 * gdbtypes.c (type_name_no_tag): Remove.
4577 (type_name_or_error): Rename from type_name_no_tag_or_error.
4578 (lookup_struct_elt_type, check_typedef): Update.
4579 * expprint.c (print_subexp_standard): Update.
4580 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4581 * d-namespace.c (d_lookup_nested_symbol): Update.
4582 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4583 (cp_print_class_member): Update.
4584 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4585 * completer.c (add_struct_fields): Update.
4586 * c-typeprint.c (cp_type_print_derivation_info)
4587 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4588 Update.
4589 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4590 (ada_prefer_type, ada_is_exception_sym): Update.
4591
4592 2018-06-01 Tom Tromey <tom@tromey.com>
4593
4594 * valops.c (enum_constant_from_type, value_namespace_elt)
4595 (value_maybe_namespace_elt): Update.
4596 * valarith.c (find_size_for_pointer_math): Update.
4597 * target-descriptions.c (make_gdb_type): Update.
4598 * symmisc.c (print_symbol): Update.
4599 * stabsread.c (define_symbol, read_type)
4600 (complain_about_struct_wipeout, add_undefined_type)
4601 (cleanup_undefined_types_1): Update.
4602 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4603 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4604 (rust_internal_print_type, rust_composite_type)
4605 (rust_evaluate_funcall, rust_evaluate_subexp)
4606 (rust_inclusive_range_type_p): Update.
4607 * python/py-type.c (typy_get_tag): Update.
4608 * p-typeprint.c (pascal_type_print_base): Update.
4609 * mdebugread.c (parse_symbol, parse_type): Update.
4610 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4611 Update.
4612 * guile/scm-type.c (gdbscm_type_tag): Update.
4613 * go-lang.c (sixg_string_p): Update.
4614 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4615 Update.
4616 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4617 (TYPE_TAG_NAME): Remove.
4618 * gdbtypes.c (type_name_no_tag): Simplify.
4619 (check_typedef, check_types_equal, recursive_dump_type)
4620 (copy_type_recursive, arch_composite_type): Update.
4621 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4622 in summary mode when needed.
4623 * eval.c (evaluate_funcall): Update.
4624 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4625 (process_structure_scope, read_enumeration_type)
4626 (read_namespace_type, read_module_type, determine_prefix): Update.
4627 * cp-support.c (inspect_type): Update.
4628 * coffread.c (process_coff_symbol, decode_base_type): Update.
4629 * c-varobj.c (c_is_path_expr_parent): Update.
4630 * c-typeprint.c (c_type_print_base_struct_union): Update.
4631 (c_type_print_base_1): Update. Print struct/class/union/enum in
4632 summary when using C language.
4633 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4634 (gen_maybe_namespace_elt): Update.
4635 * ada-lang.c (ada_type_name): Simplify.
4636 (empty_record, ada_template_to_fixed_record_type_1)
4637 (template_to_static_fixed_type)
4638 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4639
4640 2018-06-01 Tom Tromey <tom@tromey.com>
4641
4642 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4643 c_print_type.
4644 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4645 (c_print_type): Update.
4646 (c_print_type): New overload.
4647 (c_type_print_varspec_prefix, c_type_print_args)
4648 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4649 (c_type_print_base_struct_union, c_type_print_base_1)
4650 (cp_type_print_method_args): Add "language" parameter.
4651 (c_type_print_base): Update.
4652 * c-lang.h (c_print_type): Add new overload.
4653
4654 2018-06-01 Tom Tromey <tom@tromey.com>
4655
4656 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4657 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4658
4659 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4660
4661 * aarch64-tdep.c (aarch64_sve_register_names): New const
4662 var.
4663 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4664 (AARCH64_SVE_Z_REGS_NUM): New define.
4665 (AARCH64_SVE_P_REGS_NUM): Likewise.
4666 (AARCH64_SVE_NUM_REGS): Likewise.
4667
4668 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4669
4670 * nat/linux-ptrace.h [__alpha__]
4671 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4672 definitions.
4673
4674 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4675
4676 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4677 the endianness selected.
4678 * NEWS: Document `set endian auto' mode operation update.
4679
4680 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4681
4682 * Makefile.in: Add new header.
4683 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4684 (sve_vl_from_vg): Likewise.
4685 (sve_vq_from_vl): Likewise.
4686 (sve_vl_from_vq): Likewise.
4687 (sve_vq_from_vg): Likewise.
4688 (sve_vg_from_vq): Likewise.
4689 * configure.nat: Add new c file.
4690 * nat/aarch64-sve-linux-ptrace.c: New file.
4691 * nat/aarch64-sve-linux-ptrace.h: New file.
4692
4693 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4694
4695 * aarch64-linux-nat.c (aarch64_linux_read_description):
4696 Add parmeter zero.
4697 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4698 Likewise.
4699 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4700 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4701 (aarch64_gdbarch_init): Add parmeter zero.
4702 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4703 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4704 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4705 parmeter.
4706 * doc/gdb.texinfo: Describe SVE feature
4707 * features/aarch64-sve.c: New file.
4708
4709 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4710
4711 PR gdb/23210
4712 * gdbarch.sh (significant_addr_bit): Default to zero when
4713 not set by target architecture.
4714 * gdbarch.c: Re-generated.
4715 * utils.c (address_significant): Update.
4716
4717 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4718
4719 * stack.c (func_command): Remove trailing newline in call to error.
4720
4721 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4722
4723 * regcache.h (regcache_raw_collect): Remove, update callers to
4724 use regcache::raw_collect.
4725 * regcache.c (regcache_raw_collect): Remove.
4726
4727 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4728
4729 * regcache.h (regcache_raw_supply): Remove, update callers to
4730 use detached_regcache::raw_supply.
4731 * regcache.c (regcache_raw_supply): Remove.
4732
4733 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4734
4735 * regcache.h (regcache_cooked_write_part): Remove, update
4736 callers to use regcache::cooked_write_part.
4737 * regcache.c (regcache_cooked_write_part): Remove.
4738
4739 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4740
4741 * regcache.h (regcache_cooked_read_part): Remove, update callers
4742 to use readable_regcache::cooked_read_part.
4743 * regcache.c (regcache_cooked_read_part): Remove.
4744
4745 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4746
4747 * regcache.h (regcache_cooked_read_value): Remove, update
4748 callers to use readable_regcache::cooked_read_value.
4749 * regcache.c (regcache_cooked_read_value): Remove.
4750
4751 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4752
4753 * regcache.h (regcache_cooked_write): Remove, update callers to
4754 use regcache::cooked_write.
4755 * regcache.c (regcache_cooked_write): Remove.
4756
4757 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4758
4759 * regcache.h (regcache_invalidate): Remove, update callers to
4760 use detached_regcache::invalidate instead.
4761 * regcache.c (regcache_invalidate): Remove.
4762
4763 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 * regcache.h (regcache_raw_write_part): Remove, update callers
4766 to use regcache::raw_write_part instead.
4767 * regcache.c (regcache_raw_write_part): Remove.
4768
4769 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4770
4771 * regcache.h (regcache_raw_read_part): Remove, update callers to
4772 use readable_regcache::raw_read_part instead.
4773 * regcache.c (regcache_raw_read_part): Remove.
4774
4775 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4776
4777 * regcache.h (regcache_cooked_read): Remove, update callers to
4778 use readable_regcache::cooked_read instead.
4779 * regcache.c (regcache_cooked_read): Remove.
4780
4781 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4782
4783 * regcache.h (regcache_raw_write): Remove, update callers to use
4784 regcache::raw_write instead.
4785 * regcache.c (regcache_raw_write): Remove.
4786
4787 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4788
4789 * regcache.h (regcache_raw_read): Remove, update callers to use
4790 readable_regcache::raw_read instead.
4791 * regcache.c (regcache_raw_read): Remove.
4792
4793 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4794
4795 * regcache.h (regcache_raw_update): Remove, update callers to
4796 use readable_regcache::raw_update instead.
4797 * regcache.c (regcache_raw_update): Remove.
4798
4799 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4800
4801 * regcache.h (regcache_register_status): Remove, update callers
4802 to use reg_buffer::get_register_status directly instead.
4803 * regcache.c (regcache_register_status): Remove.
4804
4805 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4806
4807 * regcache.h (regcache_get_ptid): Remove, update all callers to
4808 call regcache::ptid instead.
4809 * regcache.c (regcache_get_ptid): Remove.
4810
4811 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4812
4813 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4814
4815 2018-05-30 Pedro Alves <palves@redhat.com>
4816
4817 * common/common-exceptions.h (exception_rethrow): Use
4818 ATTRIBUTE_NORETURN.
4819
4820 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4821
4822 * breakpoint.c (print_solib_event, check_status_catch_solib):
4823 Remove struct keyword in range-based for loops.
4824 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4825 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4826 Likewise.
4827 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4828 Likewise.
4829 * symfile.c (addr_info_make_relative): Likewise.
4830 * thread.c (value_in_thread_stack_temporaries): Likewise.
4831
4832 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4833
4834 PR gdb/16841
4835 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4836 aggregate type to get its real type before accessing it.
4837
4838 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4839
4840 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4841 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4842 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4843 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4844 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4845 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4846 * printcmd.c (info_address_command): Likewise.
4847
4848 2018-05-29 Tom Tromey <tom@tromey.com>
4849
4850 * windows-nat.c (handle_exception): Update fall-through comment.
4851
4852 2018-05-29 Tom Tromey <tom@tromey.com>
4853
4854 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4855 (struct program_space) <added_solibs>: Now a std::vector.
4856 * breakpoint.c (print_solib_event): Update.
4857 (check_status_catch_solib): Update.
4858 * progspace.c (clear_program_space_solib_cache): Update.
4859 * solib.c (update_solib_list): Update.
4860
4861 2018-05-29 Tom Tromey <tom@tromey.com>
4862
4863 * python/py-type.c (typy_richcompare): Update.
4864 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4865 * gdbtypes.h (types_deeply_equal): Return bool.
4866 (types_equal): Likewise.
4867 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4868 declare VEC.
4869 (check_types_equal): Change worklist to std::vector. Return
4870 bool.
4871 (struct type_equality_entry): Add constructor.
4872 (compare_maybe_null_strings): Return bool.
4873 (check_types_worklist): Return bool. Change worklist to
4874 std::vector.
4875 (types_deeply_equal): Use std::vector.
4876 (types_equal): Return bool.
4877 (compare_maybe_null_strings): Simplify.
4878
4879 2018-05-29 Tom Tromey <tom@tromey.com>
4880
4881 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4882
4883 2018-05-29 Tom Tromey <tom@tromey.com>
4884
4885 * objc-lang.h: Don't include cp-support.h.
4886 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4887 declare VEC.
4888
4889 2018-05-27 Tom Tromey <tom@tromey.com>
4890
4891 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4892
4893 2018-05-25 Tom Tromey <tom@tromey.com>
4894
4895 * value.c (value::location): Initialize.
4896
4897 2018-05-25 Tom Tromey <tom@tromey.com>
4898
4899 * dbxread.c (init_bincl_list): Remove.
4900 (bincl_list): Now a std::vector.
4901 (bincls_allocated, next_bincl): Remove.
4902 (free_bincl_list, do_free_bincl_list_cleanup)
4903 (make_cleanup_free_bincl_list): Remove.
4904 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4905 unique_xmalloc_ptr.
4906 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4907 (struct header_file_location): Add constructor.
4908 (add_bincl_to_list): Remove.
4909
4910 2018-05-25 Tom Tromey <tom@tromey.com>
4911
4912 * tui/tui.c (tui_enable): Update.
4913 * mi/mi-interp.c (mi_interp::init): Update.
4914 * interps.h (class interp) <name>: New method.
4915 <m_name>: Rename from name.
4916 (~scoped_restore_interp): Update.
4917 * interps.c (interp::interp): Update.
4918 (interp_add, interp_set, interp_lookup_existing)
4919 (current_interp_named_p): Update.
4920
4921 2018-05-25 Tom Tromey <tom@tromey.com>
4922
4923 * interps.c (interp_name): Remove.
4924 * mi/mi-interp.c (mi_interp::init): Update.
4925 * interps.h (interp_name): Remove.
4926 (~scoped_restore_interp): Update.
4927 * tui/tui.c (tui_enable): Update.
4928
4929 2018-05-25 Tom Tromey <tom@tromey.com>
4930
4931 * utils.c (fputs_maybe_filtered): Update.
4932 * linespec.c (decode_line_full): Update.
4933 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4934 (mi_print_breakpoint_for_event, mi_solib_loaded)
4935 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4936 (mi_user_selected_context_changed): Update.
4937 * mi/mi-main.c (mi_execute_command): Update.
4938 * cli/cli-script.c (execute_control_command): Update.
4939 * python/python.c (execute_gdb_command): Update.
4940 * solib.c (info_sharedlibrary_command): Update.
4941 * interps.c (interp_ui_out): Remove.
4942 * interps.h (interp_ui_out): Remove.
4943
4944 2018-05-25 Tom Tromey <tom@tromey.com>
4945
4946 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4947 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4948 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4949
4950 2018-05-25 Tom Tromey <tom@tromey.com>
4951
4952 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4953 * interps.c (interp_exec): Use scoped_restore.
4954
4955 2018-05-25 Tom Tromey <tom@tromey.com>
4956
4957 * remote.c (remote_target::remote_file_get): Use
4958 gdb::byte_vector.
4959 (remote_target::remote_file_put): Likewise.
4960
4961 2018-05-25 Tom Tromey <tom@tromey.com>
4962
4963 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4964 a std::string.
4965 (get_pe_section_index, add_pe_exported_sym): Update.
4966 (read_pe_exported_syms): Use gdb::def_vector.
4967
4968 2018-05-25 Tom Tromey <tom@tromey.com>
4969
4970 * frame.c (remove_prev_frame): Remove.
4971 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4972
4973 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4974
4975 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4976 Remove prototypes.
4977 * mips-linux-nat.c (supply_fpregset): Always call
4978 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4979 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4980 `mips_fill_fpregset'.
4981 * mips-linux-tdep.c (mips_supply_fpregset)
4982 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4983 (mips_fill_fpregset_wrapper): Remove functions.
4984 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4985 (mips_linux_fpregset): Remove variable.
4986 (mips_linux_iterate_over_regset_sections): Use
4987 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4988 (mips_linux_o32_sigframe_init): Remove comment.
4989
4990 2018-05-25 Pedro Alves <palves@redhat.com>
4991
4992 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4993 (struct readahead_cache, struct packet_reg, struct
4994 remote_arch_state, class remote_state): Move higher up in the
4995 file.
4996 (remote_target::m_remote_state): Now an object instead of a pointer.
4997 (remote_target::get_remote_state): Adjust.
4998
4999 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5000
5001 * stack.c (select_and_print_frame): Delete.
5002 (struct function_bounds): Move struct within function.
5003 (func_command): Most content moved into new function
5004 find_frame_for_function, use new function, print result, add
5005 function comment.
5006 (find_frame_for_function): New function, now returns a result.
5007
5008 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5009
5010 * stack.c (iterate_over_block_arg_vars): Fix comment.
5011 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5012
5013 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5014
5015 PR gdb/23203
5016 * frame.c
5017 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5018 Define.
5019 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5020 Define.
5021 * frame.h (class scoped_restore_selected_frame): New class.
5022 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5023 of any exception, use scoped_restore_selected_frame to restore the
5024 frame instead.
5025
5026 2018-05-24 Pedro Alves <palves@redhat.com>
5027
5028 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5029 override.
5030
5031 2018-05-23 Tom Tromey <tom@tromey.com>
5032
5033 * complaints.c (struct complaints): Remove.
5034 (symfile_complaint_book): Remove.
5035 (series): New global.
5036 (complaint_internal): Update.
5037 (clear_complaints): Update.
5038
5039 2018-05-23 Tom Tromey <tom@tromey.com>
5040
5041 * complaints.c (counters): New global.
5042 (struct complain): Remove.
5043 (struct complaints) <root>: Remove.
5044 (complaint_sentinel): Remove.
5045 (symfile_complaint_book): Update.
5046 (find_complaint) Remove.
5047 (complaint_internal, clear_complaints): Update.
5048
5049 2018-05-23 Tom Tromey <tom@tromey.com>
5050
5051 * complaints.c (struct complain) <file, line>: Remove.
5052 (find_complaint): Remove file, line parameters.
5053 (complaint_internal): Update.
5054
5055 2018-05-23 Tom Tromey <tom@tromey.com>
5056
5057 * complaints.c (vcomplaint): Remove.
5058 (complaint_internal) Merge in contents of vcomplaint.
5059
5060 2018-05-23 Tom Tromey <tom@tromey.com>
5061
5062 * complaints.c (struct complaints) <explanation>: Remove.
5063 (symfile_explanations): Remove.
5064 (symfile_complaint_book): Update.
5065 (vcomplaint): Update.
5066 (struct explanation): Remove.
5067
5068 2018-05-23 Tom Tromey <tom@tromey.com>
5069
5070 * complaints.c (symfile_complaints): Remove.
5071 (complaint_internal): Remove "complaints" parameter.
5072 (clear_complaints, vcomplaint): Remove "c" parameter.
5073 (get_complaints): Remove.
5074 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5075 (dwarf2_debug_line_missing_file_complaint)
5076 (dwarf2_debug_line_missing_end_sequence_complaint)
5077 (dwarf2_complex_location_expr_complaint)
5078 (dwarf2_const_value_length_mismatch_complaint)
5079 (dwarf2_section_buffer_overflow_complaint)
5080 (dwarf2_macro_malformed_definition_complaint)
5081 (dwarf2_invalid_attrib_class_complaint)
5082 (create_addrmap_from_index, dw2_symtab_iter_next)
5083 (dw2_expand_marked_cus)
5084 (dw2_debug_names_iterator::find_vec_in_debug_names)
5085 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5086 (create_debug_type_hash_table, init_cutu_and_read_dies)
5087 (partial_die_parent_scope, add_partial_enumeration)
5088 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5089 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5090 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5091 (create_cus_hash_table, create_dwp_hash_table)
5092 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5093 (dwarf2_rnglists_process, dwarf2_ranges_process)
5094 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5095 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5096 (handle_struct_member_die, process_structure_scope)
5097 (read_array_type, read_common_block, read_module_type)
5098 (read_tag_pointer_type, read_typedef, read_base_type)
5099 (read_subrange_type, load_partial_dies, partial_die_info::read)
5100 (partial_die_info::read, partial_die_info::read)
5101 (partial_die_info::read, read_checked_initial_length_and_offset)
5102 (dwarf2_string_attr, read_formatted_entries)
5103 (dwarf_decode_line_header)
5104 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5105 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5106 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5107 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5108 (get_signatured_type, get_DW_AT_signature_type)
5109 (decode_locdesc, file_file_name, consume_improper_spaces)
5110 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5111 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5112 (dwarf2_symbol_mark_computed, set_die_type)
5113 (read_attribute_value): Update.
5114 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5115 Update.
5116 * dbxread.c (unknown_symtype_complaint)
5117 (lbrac_mismatch_complaint, repeated_header_complaint)
5118 (set_namestring, function_outside_compilation_unit_complaint)
5119 (read_dbx_symtab, process_one_symbol): Update.
5120 * gdbtypes.c (stub_noname_complaint): Update.
5121 * windows-nat.c (handle_unload_dll): Update.
5122 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5123 (decode_base_type): Update.
5124 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5125 (eb_complaint, record_include_begin, record_include_end)
5126 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5127 (process_xcoff_symbol, read_symbol)
5128 (function_outside_compilation_unit_complaint)
5129 (scan_xcoff_symtab): Update.
5130 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5131 * buildsym.c (finish_block_internal, make_blockvector)
5132 (end_symtab_get_static_block, augment_type_symtab): Update.
5133 * dtrace-probe.c (dtrace_process_dof)
5134 (dtrace_static_probe_ops::get_probes): Update.
5135 * complaints.h (struct complaint): Don't declare.
5136 (symfile_complaints): Remove.
5137 (complaint_internal): Remove "complaints" parameter.
5138 (complaint): Likewise.
5139 (clear_complaints): Likewise.
5140 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5141 (reread_symbols): Update.
5142 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5143 (dwarf2_frame_cache, decode_frame_entry): Update.
5144 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5145 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5146 (info_selectors_command): Update.
5147 * macrotab.c (macro_include, check_for_redefinition)
5148 (macro_undef): Update.
5149 * objfiles.c (filter_overlapping_sections): Update.
5150 * stabsread.c (invalid_cpp_abbrev_complaint)
5151 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5152 (define_symbol, error_type, read_type, rs6000_builtin_type)
5153 (stabs_method_name_from_physname, read_member_functions)
5154 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5155 (attach_fields_to_type, complain_about_struct_wipeout)
5156 (read_range_type, read_args, common_block_start)
5157 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5158 Update.
5159 * mdebugread.c (index_complaint, unknown_ext_complaint)
5160 (basic_type_complaint, bad_tag_guess_complaint)
5161 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5162 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5163 (parse_procedure, parse_lines)
5164 (function_outside_compilation_unit_complaint)
5165 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5166 (bad_tag_guess_complaint, reg_value_complaint): Update.
5167 * cp-support.c (demangled_name_complaint): Update.
5168 * macroscope.c (sal_macro_scope): Update.
5169 * dwarf-index-write.c (class debug_names): Update.
5170
5171 2018-05-23 Tom Tromey <tom@tromey.com>
5172
5173 * complaints.c (clear_complaints): Remove "noisy" parameter.
5174 * complaints.h (clear_complaints): Update.
5175 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5176 (reread_symbols): Update.
5177
5178 2018-05-23 Tom Tromey <tom@tromey.com>
5179
5180 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5181 SUBSEQUENT_MESSAGE.
5182 (vcomplaint, clear_complaints): Update.
5183 (symfile_explanations): Remove some messages.
5184
5185 2018-05-23 Tom Tromey <tom@tromey.com>
5186
5187 * complaints.c (internal_complaint): Remove.
5188 * complaints.h (internal_complaint): Remove.
5189
5190 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5191
5192 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5193
5194 2018-05-22 Pedro Alves <palves@redhat.com>
5195
5196 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5197 (remote_fileio_badfd, remote_fileio_return_errno)
5198 (remote_fileio_return_success, remote_fileio_func_open)
5199 (remote_fileio_func_open, remote_fileio_func_close)
5200 (remote_fileio_func_read, remote_fileio_func_write)
5201 (remote_fileio_func_lseek, remote_fileio_func_rename)
5202 (remote_fileio_func_unlink, remote_fileio_func_stat)
5203 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5204 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5205 remote_target parameter.
5206 (remote_fio_func_map) <func>: Add remote_target parameter.
5207 (do_remote_fileio_request, remote_fileio_request):
5208 * remote-fileio.h (remote_fileio_request):
5209 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5210 remote_target parameter.
5211 (remote_notif_process, handle_notification): Adjust to pass down
5212 the remote.
5213 (remote_notif_state_allocate): Add remote_target parameter. Save
5214 it.
5215 * remote-notif.h (struct remote_target): Forward declare.
5216 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5217 remote_target parameter.
5218 (struct remote_notif_state) <remote>: New field.
5219 (remote_notif_ack, remote_notif_parse): Add remote_target
5220 parameter.
5221 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5222 remote_target parameter.
5223 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5224 (threads_listing_context, rmt_thread_action, protocol_feature)
5225 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5226 (packet_result, struct threads_listing_context, remote_state):
5227 Move definitions and declarations higher up.
5228 (remote_target) <~remote_target>: Declare.
5229 (remote_download_command_source, remote_file_put, remote_file_get)
5230 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5231 (remote_hostio_pread_vFile, remote_hostio_send_command)
5232 (remote_hostio_set_filesystem, remote_hostio_open)
5233 (remote_hostio_close, remote_hostio_unlink, remote_state)
5234 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5235 (get_memory_write_packet_size, get_memory_read_packet_size)
5236 (append_pending_thread_resumptions, remote_detach_1)
5237 (append_resumption, remote_resume_with_vcont)
5238 (add_current_inferior_and_thread, wait_ns, wait_as)
5239 (process_stop_reply, remote_notice_new_inferior)
5240 (process_initial_stop_replies, remote_add_thread)
5241 (btrace_sync_conf, remote_btrace_maybe_reopen)
5242 (remove_new_fork_children, kill_new_fork_children)
5243 (discard_pending_stop_replies, stop_reply_queue_length)
5244 (check_pending_events_prevent_wildcard_vcont)
5245 (discard_pending_stop_replies_in_queue, stop_reply)
5246 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5247 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5248 (remote_interrupt_as, remote_interrupt_ns)
5249 (remote_get_noisy_reply, remote_query_attached)
5250 (remote_add_inferior, remote_current_thread, get_current_thread)
5251 (set_thread, set_general_thread, set_continue_thread)
5252 (set_general_process, write_ptid)
5253 (remote_unpack_thread_info_response, remote_get_threadinfo)
5254 (parse_threadlist_response, remote_get_threadlist)
5255 (remote_threadlist_iterator, remote_get_threads_with_ql)
5256 (remote_get_threads_with_qxfer)
5257 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5258 (get_offsets, remote_check_symbols, remote_supported_packet)
5259 (remote_query_supported, remote_packet_size)
5260 (remote_serial_quit_handler, remote_detach_pid)
5261 (remote_vcont_probe, remote_resume_with_hc)
5262 (send_interrupt_sequence, interrupt_query)
5263 (remote_notif_get_pending_events, fetch_register_using_p)
5264 (send_g_packet, process_g_packet, fetch_registers_using_g)
5265 (store_register_using_P, store_registers_using_G)
5266 (set_remote_traceframe, check_binary_download)
5267 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5268 (remote_xfer_live_readonly_partial, remote_read_bytes)
5269 (remote_send_printf, remote_flash_write, readchar)
5270 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5271 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5272 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5273 (extended_remote_disable_randomization, extended_remote_run)
5274 (send_environment_packet, extended_remote_environment_support)
5275 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5276 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5277 (packet_command): Now methods of ...
5278 (remote_target): ... this class.
5279 (m_remote_state) <remote_target>: New field.
5280 (struct remote_state) <stop_reply_queue,
5281 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5282 fields.
5283 (remote_state::remote_state): Allocate stop_reply_queue.
5284 (remote_state): Delete global.
5285 (get_remote_state_raw): Delete.
5286 (remote_target::get_remote_state): Allocate m_remote_state on
5287 demand.
5288 (get_current_remote_target): New.
5289 (remote_ops, extended_remote_ops): Delete.
5290 (wait_forever_enabled_p, remote_async_inferior_event_token):
5291 Delete, moved to struct remote_state.
5292 (remote_target::close): Delete self. Destruction bits split to
5293 ...
5294 (remote_target::~remote_target): ... this.
5295 (show_memory_packet_size): Adjust to use
5296 get_current_remote_target.
5297 (struct protocol_feature) <func>: Add remote_target parameter.
5298 All callers adjusted.
5299 (curr_quit_handler_target): New.
5300 (remote_serial_quit_handler): Reimplement.
5301 (remote_target::open_1): Adjust to use get_current_remote_target.
5302 Heap-allocate remote_target/extended_remote_target instances.
5303 (vcont_builder::vcont_builder): Add remote_target parameter, and
5304 save it in m_remote. All callers adjusted.
5305 (vcont_builder::m_remote): New field.
5306 (vcont_builder::restart, vcont_builder::flush)
5307 (vcont_builder::push_action): Use it.
5308 (remote_target::commit_resume): Use it.
5309 (struct queue_iter_param) <remote>: New field.
5310 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5311 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5312 (check_pending_event_prevents_wildcard_vcont_callback)
5313 (remote_target::check_pending_events_prevent_wildcard_vcont)
5314 (remote_target::discard_pending_stop_replies)
5315 (remote_target::discard_pending_stop_replies_in_queue)
5316 (remote_target::remote_notif_remove_queued_reply): Fill in
5317 'remote' field.
5318 (remote_notif_get_pending_events): New.
5319 (remote_target::readchar, remote_target::remote_serial_write):
5320 Save/restore curr_quit_handler_target.
5321 (putpkt): New.
5322 (kill_new_fork_children): Fill in 'remote' field.
5323 (packet_command): Use get_current_remote_target, defer to
5324 remote_target method of same name.
5325 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5326 parameter, and save it in m_remote. All callers adjusted.
5327 (scoped_remote_fd::release): Use m_remote.
5328 (scoped_remote_fd::m_remote): New field.
5329 (remote_file_put, remote_file_get, remote_file_delete): Use
5330 get_current_remote_target, defer to remote_target method of same
5331 name.
5332 (remote_btrace_reset): Add remote_state paremeter. Update all
5333 callers.
5334 (remote_async_inferior_event_handler). Pass down 'data'.
5335 (remote_new_objfile): Use get_current_remote_target.
5336 (remote_target::vcont_r_supported): New.
5337 (set_range_stepping): Use get_current_remote_target and
5338 remote_target::vcont_r_supported.
5339 (_initialize_remote): Don't allocate 'remote_state' and
5340 'stop_reply_queue' globals.
5341 * remote.h (struct remote_target): Forward declare.
5342 (getpkt, putpkt, remote_notif_get_pending_events): Add
5343 'remote_target' parameter.
5344
5345 2018-05-22 Pedro Alves <palves@redhat.com>
5346
5347 * remote.c (vcont_builder): Now a class. Make all data members
5348 private.
5349 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5350 Declare methods.
5351 (vcont_builder_restart): Rename to ...
5352 (vcont_builder::restart): ... this.
5353 (vcont_builder_flush): Rename to ...
5354 (vcont_builder::flush): ... this.
5355 (vcont_builder_push_action): Rename to ...
5356 (vcont_builder::push_action): ... this.
5357 (remote_target::commit_resume): Adjust.
5358
5359 2018-05-22 Pedro Alves <palves@redhat.com>
5360
5361 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5362 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5363 (get_fixed_memory_packet_size): New.
5364 (get_memory_packet_size): Use it.
5365 (set_memory_packet_size): Don't override the config size with
5366 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5367 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5368 Don't refer to get_memory_packet_size if not connected to a remote
5369 target. Show "(default)" if configured size is 0.
5370
5371 2018-05-22 Pedro Alves <palves@redhat.com>
5372
5373 * remote.c (remote_target::mourn_inferior): Move
5374 discard_pending_stop_replies call here from ...
5375 (_initialize_remote): ... here.
5376
5377 2018-05-22 Pedro Alves <palves@redhat.com>
5378
5379 * remote.c (compare_section_command): Remove set_general_process
5380 call.
5381
5382 2018-05-22 Pedro Alves <palves@redhat.com>
5383
5384 * remote.c (struct packet_reg, struct remote_arch_state):
5385 Move higher up in the file.
5386 (remote_state) <m_arch_states>: Store remote_arch_state values
5387 instead of remote_arch_state pointers.
5388 (remote_state::get_remote_arch_state): Adjust.
5389
5390 2018-05-22 Pedro Alves <palves@redhat.com>
5391
5392 * remote.c: Include <unordered_map>.
5393 (remote_state): Now a class.
5394 (remote_state) <get_remote_arch_state>: Declare method.
5395 <get_remote_arch_state>: New field.
5396 (remote_arch_state) <remote_arch_state>: Declare ctor.
5397 <regs>: Now a unique_ptr.
5398 (remote_gdbarch_data_handle): Delete.
5399 (get_remote_arch_state): Delete.
5400 (remote_state::get_remote_arch_state): New.
5401 (get_remote_state): Adjust to call remote_state's
5402 get_remote_arch_state method.
5403 (init_remote_state): Delete, bits factored out to ...
5404 (remote_arch_state::remote_arch_state): ... this new method.
5405 (get_remote_packet_size, get_memory_packet_size)
5406 (process_g_packet, remote_target::fetch_registers)
5407 (remote_target::prepare_to_store, store_registers_using_G)
5408 (remote_target::store_registers, remote_target::get_trace_status):
5409 Adjust to call remote_state's method.
5410 (_initialize_remote): Remove reference to
5411 remote_gdbarch_data_handle.
5412
5413 2018-05-22 Pedro Alves <palves@redhat.com>
5414
5415 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5416 pread>: New method declarations.
5417 (remote_target::open_1): Adjust.
5418 (readahead_cache_invalidate): Rename to ...
5419 (readahead_cache::invalidate): ... this, and adjust to be a class
5420 method.
5421 (readahead_cache_invalidate_fd): Rename to ...
5422 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5423 class method.
5424 (remote_hostio_pwrite): Adjust.
5425 (remote_hostio_pread_from_cache): Rename to ...
5426 (readahead_cache::pread): ... this, and adjust to be a class
5427 method.
5428 (remote_hostio_close): Adjust.
5429
5430 2018-05-22 Pedro Alves <palves@redhat.com>
5431
5432 * remote.c (remote_hostio_close_cleanup): Delete.
5433 (class scoped_remote_fd): New.
5434 (remote_file_put, remote_file_get): Use it.
5435
5436 2018-05-22 Pedro Alves <palves@redhat.com>
5437
5438 (struct vCont_action_support): Use bool and initialize all fields.
5439 (struct readahead_cache): Initialize all fields.
5440 (remote_state): Use bool and initialize all fields.
5441 (remote_state::remote_state, remote_state::~remote_state): New.
5442 (new_remote_state): Delete.
5443 (_initialize_remote): Use new to allocate remote_state.
5444
5445 2018-05-22 Pedro Alves <palves@redhat.com>
5446 張俊芝 <zjz@zjz.name>
5447
5448 PR gdb/22973
5449 * c-exp.y: Include "c-support.h".
5450 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5451 of tolower. Use c_ident_is_alpha to scan names.
5452 * c-lang.c: Include "c-support.h".
5453 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5454 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5455 * c-support.h: New file, with bits factored out from ...
5456 * cp-name-parser.y: ... this file.
5457 Include "c-support.h".
5458 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5459 c-support.h and renamed.
5460 (symbol_end, yylex): Adjust.
5461
5462 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5463
5464 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5465 parameter type to CORE_ADDR.
5466 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5467 parameter type in declaration to CORE_ADDR.
5468 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5469 target_auxv_search to get AT_HWCAP and use the result to get the
5470 target description.
5471 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5472 to CORE_ADDR. Remove the cast of the return value to unsigned
5473 long. Fix error predicate of target_auxv_search.
5474 (ppc_linux_nat_target::read_description): Change the type of the
5475 hwcap variable to CORE_ADDR.
5476
5477 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5478
5479 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5480 if the size of fpscr is larger than 32 bits.
5481
5482 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5483
5484 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5485 (ppc32_linux_vsxregmap): New global.
5486 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5487 regcache_supply_regset, and regcache_collect_regset.
5488 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5489 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5490 (fetch_vsx_register, store_vsx_register): Remove.
5491 (fetch_vsx_registers): Add regno parameter. Get regset using
5492 ppc_linux_vsxregset. Use regset to supply registers.
5493 (store_vsx_registers): Add regno parameter. Get regset using
5494 ppc_linux_vsxregset. Use regset to collect registers.
5495 (fetch_register): Call fetch_vsx_registers instead of
5496 fetch_vsx_register.
5497 (store_register): Call store_vsx_registers instead of
5498 store_vsx_register.
5499 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5500 new regno parameter.
5501 (store_ppc_registers): Call store_vsx_registers with -1 for the
5502 new regno parameter.
5503 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5504 (ppc_collect_vsxregset): Remove.
5505
5506 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5507
5508 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5509 offset fields.
5510 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5511 for vector register offset fields.
5512 (ppc64_fbsd_reg_offsets): Likewise.
5513 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5514 to vector register offset fields.
5515 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5516 to vector register offset fields.
5517 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5518 vector register offset fields.
5519 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5520 initializers for vector register offset fields.
5521 (rs6000_aix64_reg_offsets): Likewise.
5522 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5523 (ppc_supply_vrregset): Remove.
5524 (ppc_collect_vrregset): Remove.
5525 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5526 (ppc_linux_vrregset) : New function.
5527 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5528 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5529 (ppc32_linux_vrregset): Remove.
5530 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5531 and use result instead of ppc32_linux_vrregset.
5532 (ppc32_linux_reg_offsets): Remove initializers for vector register
5533 offset fields.
5534 (ppc64_linux_reg_offsets): Likewise.
5535 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5536 * ppc-linux-nat.c: Include regset.h.
5537 (gdb_vrregset_t): Adjust comment to account for little-endian
5538 mode.
5539 (supply_vrregset, fill_vrregset): Remove.
5540 (fetch_altivec_register, store_altivec_register): Remove.
5541 (fetch_altivec_registers): Add regno parameter. Get regset using
5542 ppc_linux_vrregset. Use regset to supply registers.
5543 (store_altivec_registers): Add regno parameter. Get regset using
5544 ppc_linux_vrregset. Use regset to collect registers.
5545 (fetch_register): Call fetch_altivec_registers instead of
5546 fetch_altivec_register.
5547 (store_register): Call store_altivec_registers instead of
5548 store_altivec_register.
5549 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5550 the new regno parameter.
5551 (store_ppc_registers): Call store_altivec_registers with -1 for
5552 the new regno parameter.
5553
5554 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5555
5556 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5557 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5558 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5559 (gdb_vrregset_t): Change array type size to
5560 PPC_LINUX_SIZEOF_VRREGSET.
5561 (gdb_vsxregset_t): Change array type size to
5562 PPC_LINUX_SIZEOF_VSXREGSET.
5563 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5564 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5565 PPC_LINUX_SIZEOF_VSXREGSET.
5566
5567 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5568
5569 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5570 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5571 nat/ppc-linux.c.
5572 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5573 ppc_linux_target_wordsize with tid.
5574 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5575 wordsize with tid.
5576 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5577 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5578 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5579 tid parameter. Remove static specifier.
5580 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5581 (ppc_linux_target_wordsize): New declaration.
5582
5583 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5584
5585 * arch/ppc-linux-common.c: New file.
5586 * arch/ppc-linux-common.h: New file.
5587 * arch/ppc-linux-tdesc.h: New file.
5588 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5589 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5590 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5591 arch/ppc-linux-tdesc.h.
5592 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5593 arch/ppc-linux-tdesc.h.
5594 (ppc_linux_nat_target::read_description): Remove target
5595 description matching code. Fill a ppc_linux_features struct and
5596 call ppc_linux_match_description with it. Move comment about ISA
5597 2.05 to ppc-linux-common.c.
5598 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5599 arch/ppc-linux-tdesc.h.
5600 (ppc_linux_core_read_description): Remove target description
5601 matching code. Fill a ppc_linux_features struct and call
5602 ppc_linux_match_description with it.
5603 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5604 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5605 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5606 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5607 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5608 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5609 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5610 (tdesc_powerpc_e500l): Remove.
5611
5612 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5613
5614 * ada-lang.c (catch_assert_command): Pass empty string instead
5615 of NULL for excep_string argument.
5616
5617 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5618
5619 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5620 the width of the requested register exceeds the width of the
5621 `ptrace' data type.
5622
5623 2018-05-21 Tom Tromey <tom@tromey.com>
5624
5625 * printcmd.c (output_command): Remove.
5626 (output_command_const): Rename to output_command.
5627 * valprint.h (output_command): Rename from output_command_const.
5628 * tracepoint.c (trace_dump_actions): Call output_command.
5629
5630 2018-05-21 Tom Tromey <tom@tromey.com>
5631
5632 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5633 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5634 * ada-lang.h (create_ada_exception_catchpoint): Update.
5635 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5636 std::string.
5637 (create_excep_cond_exprs, ~ada_catchpoint)
5638 (should_stop_exception, print_one_exception)
5639 (print_mention_exception, print_recreate_exception): Update.
5640 (ada_get_next_arg): Remove.
5641 (catch_ada_exception_command_split): Use std::string. Change type
5642 of "excep_string", "cond_string".
5643 (catch_ada_exception_command): Update.
5644 (create_ada_exception_catchpoint): Change type of excep_string.
5645 (ada_exception_sal): Remove excep_string parameter.
5646 (~ada_catchpoint): Remove.
5647
5648 2018-05-21 Tom Tromey <tom@tromey.com>
5649
5650 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5651 cleanup.
5652
5653 2018-05-21 Tom Tromey <tom@tromey.com>
5654
5655 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5656 Return unique_xmalloc_ptr.
5657 (print_it_exception): Update.
5658
5659 2018-05-21 Tom Tromey <tom@tromey.com>
5660
5661 * tracepoint.c (trace_dump_actions): Use std::string.
5662
5663 2018-05-21 Tom Tromey <tom@tromey.com>
5664
5665 * symfile.c (reread_symbols): Use std::string for original_name.
5666
5667 2018-05-21 Tom Tromey <tom@tromey.com>
5668
5669 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5670 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5671 constructor.
5672
5673 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5674
5675 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5676 instance to...
5677 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5678 * objfiles.c (get_objfile_bfd_data): Allocate
5679 objfile_per_bfd_storage with obstack_new when allocating on
5680 obstack.
5681
5682 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5683
5684 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5685 OBSTACK_ZALLOC.
5686 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5687 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5688 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5689 (add_pending): Likewise.
5690 (parse_symbol): Likewise.
5691 (parse_partial_symbols): Likewise.
5692 (psymtab_to_symtab_1): Likewise.
5693 (new_psymtab): Likewise.
5694 (elfmdebug_build_psymtabs): Likewise.
5695 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5696 * objfiles.c (get_objfile_bfd_data): Likewise.
5697 (objfile_register_static_link): Likewise.
5698 * psymtab.c (allocate_psymtab): Likewise.
5699 * stabsread.c (read_member_functions): Likewise.
5700 * xcoffread.c (xcoff_end_psymtab): Likewise.
5701
5702 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5703
5704 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5705 compiler supports std::is_trivially_constructible.
5706 * common/poison.h: Include obstack.h.
5707 (IsMallocable): Define to is_trivially_constructible if the
5708 compiler supports it, define to true_type otherwise.
5709 (xobnew): New.
5710 (XOBNEW): Redefine.
5711 (xobnewvec): New.
5712 (XOBNEWVEC): Redefine.
5713 * gdb_obstack.h (obstack_zalloc): New.
5714 (OBSTACK_ZALLOC): Redefine.
5715 (obstack_calloc): New.
5716 (OBSTACK_CALLOC): Redefine.
5717 (obstack_new): New.
5718 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5719 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5720 gdbarch.c.
5721 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5722 obstack_calloc/obstack_zalloc.
5723 (gdbarch_obstack_zalloc): Remove.
5724 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5725
5726 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5727
5728 * stack.c (backtrace_command_1): Remove useless variable int i.
5729
5730 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5731
5732 * stack.c (print_frame_info): Fix comment.
5733
5734 2018-05-18 Tom Tromey <tom@tromey.com>
5735
5736 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5737 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5738 (~dwarf2_per_objfile): Update
5739 (dwarf2_get_dwz_file): Use new.
5740 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5741 unique_ptr.
5742
5743 2018-05-18 Tom Tromey <tom@tromey.com>
5744
5745 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5746 unique_ptr.
5747 * dwarf2read.c (struct dwp_file): Add constructor and
5748 initializers.
5749 (open_and_init_dwp_file): Return a unique_ptr.
5750 (dwarf2_per_objfile, create_dwp_hash_table)
5751 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5752 (lookup_dwo_unit_in_dwp): Update.
5753 (open_and_init_dwp_file, get_dwp_file): Update.
5754
5755 2018-05-18 Tom Tromey <tom@tromey.com>
5756
5757 * dwarf2read.c (dwarf2_per_objfile): Update.
5758 (struct mapped_index): Add initializers.
5759 (dwarf2_read_index): Use new.
5760 (dw2_symtab_iter_init): Update.
5761 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5762 unique_ptr.
5763
5764 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5765
5766 * dwarf2read.c (mapped_index) <total_size>: Remove.
5767
5768 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5769
5770 * unittests/format_pieces-selftests.c (test_format_specifier):
5771 Add ARI comments.
5772
5773 2018-05-18 Tom Tromey <tom@tromey.com>
5774
5775 * c-typeprint.c (maybe_print_hole): New function.
5776 (c_print_type_struct_field_offset): Update.
5777 (c_type_print_base_struct_union): Call maybe_print_hole.
5778
5779 2018-05-17 Keith Seitz <keiths@redhat.com>
5780
5781 * breakpoint.c (build_bpstat_chain): New function, moved from
5782 bpstat_stop_status.
5783 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5784 If no stop chain is passed, call build_bpstat_chain to build it.
5785 * breakpoint.h (build_bpstat_chain): Declare.
5786 (bpstat_stop_status): Move documentation here from breakpoint.c.
5787 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5788 build the stop chain and pass it to skip_inline_frames.
5789 Pass this stop chain to bpstat_stop_status.
5790 * inline-frame.c: Include breakpoint.h.
5791 (stopped_by_user_bp_inline_frame): New function.
5792 (skip_inline_frames): Add parameter `stop_chain'.
5793 Move documention to inline-frame.h.
5794 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5795 whether the frame should be elided.
5796 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5797 Add moved documentation and update for new parameter.
5798
5799 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5800
5801 PR cli/14975
5802 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5803 unittests/format_pieces-selftests.c.
5804 * common/format.h (format_piece) <operator==>: New.
5805 (format_pieces) <operator[]>: Remove.
5806 * common/format.c (format_pieces::format_pieces): Handle \e.
5807 * unittests/format_pieces-selftests.c: New.
5808
5809 2018-05-17 Tom Tromey <tom@tromey.com>
5810
5811 PR symtab/23010:
5812 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5813 (dw2_instantiate_symtab): Add skip_partial parameter.
5814 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5815 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5816 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5817 (dw2_expand_symtabs_matching_one)
5818 (dw2_find_pc_sect_compunit_symtab)
5819 (dw2_debug_names_lookup_symbol)
5820 (dw2_debug_names_expand_symtabs_for_function): Update.
5821 (init_cutu_and_read_dies): Add skip_partial parameter.
5822 (process_psymtab_comp_unit, build_type_psymtabs_1)
5823 (process_skeletonless_type_unit, load_partial_comp_unit)
5824 (psymtab_to_symtab_1): Update.
5825 (load_full_comp_unit): Add skip_partial parameter.
5826 (process_imported_unit_die, dwarf2_read_addr_index)
5827 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5828 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5829 (read_signatured_type): Update.
5830
5831 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5832
5833 * value.c (release_value): Remove unused variable.
5834 (record_latest_value): Likewise.
5835 (access_value_history): Likewise.
5836 (preserve_values): Likewise.
5837
5838 2018-05-17 Tom Tromey <tom@tromey.com>
5839
5840 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5841 Initialize.
5842
5843 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5844
5845 PR gdb/22286
5846 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5847 Also handle registers whose width is not a multiple of
5848 PTRACE_TYPE_RET.
5849 (linux_nat_trad_target::store_register): Likewise.
5850
5851 2018-05-16 Tom Tromey <tom@tromey.com>
5852
5853 * gdbcore.h (core_bfd): Redefine.
5854 * corelow.c (core_target::close): Update.
5855 (core_target_open): Update.
5856 * progspace.h (struct program_space) <cbfd>: Now a
5857 gdb_bfd_ref_ptr.
5858
5859 2018-05-16 Tom Tromey <tom@tromey.com>
5860
5861 PR cli/19551:
5862 * symfile-add-flags.h (enum symfile_add_flags)
5863 <SYMFILE_NOT_FILENAME>: New constant.
5864 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5865 objfile name from BFD.
5866 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5867 * minidebug.c (find_separate_debug_file_in_section): Put
5868 ".gnu_debugdata" into BFD's file name.
5869
5870 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5871
5872 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5873 Remove.
5874
5875 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5876
5877 PR binutils/21446
5878 * aarch64-tdep.c (aarch64_analyze_prologue,
5879 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5880 Indicate not interested in errors.
5881
5882 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5883
5884 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5885 Supply the MIPS_ZERO_REGNUM register.
5886
5887 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5888
5889 * mips-tdep.c (mask_address_var): Make variable static.
5890
5891 2018-05-14 Tom Tromey <tom@tromey.com>
5892
5893 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5894
5895 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5896
5897 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5898 FXSAVE_ADDR for the mxcsr register.
5899
5900 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5901
5902 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5903
5904 2018-05-11 Pedro Alves <palves@redhat.com>
5905
5906 * corelow.c (core_target) <core_target>: No longer inline.
5907 Initialize m_core_gdbarch, m_core_vec and build the section table
5908 here.
5909 <~core_target>: New.
5910 <core_gdbarch, get_core_register_section>: New methods.
5911 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5912 factored out from ...
5913 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5914 (core_ops): Delete.
5915 (sniff_core_bfd): Add gdbarch parameter.
5916 (core_close): Delete, merged into ...
5917 (core_target::close): ... here. Delete self.
5918 (core_close_cleanup): Delete.
5919 (core_target_open): Allocate a core_target on the heap. Use a
5920 unique_ptr instead of a cleanup. Bits moved into the core_target
5921 ctor. Adjust to use core_target methods instead of globals.
5922 (get_core_register_section): Rename to ...
5923 (core_target::get_core_register_section): ... this and adjust.
5924 (struct get_core_registers_cb_data): New.
5925 (get_core_registers_cb): Use it. Use bool.
5926 (core_target::fetch_registers, core_target::files_info)
5927 (core_target::xfer_partial, core_target::read_description)
5928 (core_target::pid_to, core_target::thread_name): Adjust to
5929 reference class fields instead of globals.
5930 * target.h (struct target_ops_deleter, target_ops_up): New.
5931
5932 2018-05-11 Pedro Alves <palves@redhat.com>
5933
5934 * corefile.c (core_file_command): Move to corelow.c.
5935 * corelow.c (the_core_target): Delete.
5936 (core_file_command): Moved from corefile.c. Check exec_bfd
5937 instead of the_core_target. Use target_detach instead of calling
5938 into the_core_target directly.
5939 (maybe_say_no_core_file_now): New.
5940 (core_target::detach): Use it.
5941 (_initialize_corelow): Remove references to the_core_target.
5942 * gdbcore.h (the_core_target): Delete.
5943
5944 2018-05-11 Tom Tromey <tromey@redhat.com>
5945 Pedro Alves <palves@redhat.com>
5946
5947 * corefile.c (core_bfd): Remove.
5948 * gdbcore.h (core_bfd): Now a macro.
5949 * progspace.h (struct program_space) <cbfd>: New field.
5950
5951 2018-05-11 Tom Tromey <tom@tromey.com>
5952
5953 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5954 gdb::def_vector.
5955
5956 2018-05-10 Tom Tromey <tom@tromey.com>
5957
5958 * configure: Rebuild.
5959 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5960
5961 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5962
5963 PR server/23158:
5964 * regformats/regdat.sh: Adjust script, following the addition
5965 of the new expedite_regs parameter to init_target_desc.
5966
5967 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5968
5969 PR gdb/23127
5970 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5971 set_gdbarch_significant_addr_bit.
5972 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5973 set_gdbarch_significant_addr_bit.
5974 * utils.c (address_significant): Update to sign extend addr.
5975
5976 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5977
5978 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5979 (xtensa_linux_init_abi): Limit tdep->num_regs by
5980 tdep->num_nopriv_regs.
5981 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5982 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5983 not initialized.
5984
5985 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5986
5987 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5988
5989 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5990
5991 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5992 (I387_MXCSR_INIT_VAL): New constant.
5993 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5994 buffer if it was supplied by the inferior.
5995 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5996 (i387_xsave_get_clear_bv): New function.
5997 (i387_supply_xsave): Only read x87 control registers from the
5998 xsave buffer if the feature is enabled, and the state will have
5999 been written, otherwise, provide a suitable default.
6000 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6001 including x87 control registers. Update control registers if they
6002 have changed from the default value, and mark features as enabled
6003 as required.
6004 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6005
6006 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6007
6008 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6009
6010 2018-05-07 Tom Tromey <tom@tromey.com>
6011
6012 * configure: Rebuild.
6013 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6014
6015 2018-05-07 Tom Tromey <tom@tromey.com>
6016
6017 PR tdep/20362:
6018 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6019 bit. Use correct value for VDIV.
6020
6021 2018-05-04 Tom Tromey <tom@tromey.com>
6022
6023 * configure: Rebuild.
6024 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6025
6026 2018-05-04 Tom Tromey <tom@tromey.com>
6027
6028 * linux-record.c (record_linux_system_call) <case
6029 RECORD_SYS_RECVFROM>: Add "break".
6030
6031 2018-05-04 Tom Tromey <tom@tromey.com>
6032
6033 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6034 Add missing "break".
6035 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6036 Add missing "break".
6037
6038 2018-05-04 Tom Tromey <tom@tromey.com>
6039
6040 * rs6000-tdep.c (ppc_process_record_op4)
6041 (ppc_process_record_op63): Add fall-through comment.
6042
6043 2018-05-04 Tom Tromey <tom@tromey.com>
6044
6045 * i386-tdep.c (i386_process_record): Add fall-through comment.
6046
6047 2018-05-04 Tom Tromey <tom@tromey.com>
6048
6049 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6050 comment.
6051
6052 2018-05-04 Tom Tromey <tom@tromey.com>
6053
6054 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6055 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6056 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6057 comment.
6058 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6059 comment.
6060 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6061 comment.
6062
6063 2018-05-04 Tom Tromey <tom@tromey.com>
6064
6065 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6066
6067 2018-05-04 Tom Tromey <tom@tromey.com>
6068
6069 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6070 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6071 * symfile.c (section_is_mapped): Fix fall-through comment.
6072 * stabsread.c (define_symbol, read_member_functions): Fix
6073 fall-through comment.
6074 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6075 comment.
6076 * remote.c (remote_wait_as): Fix fall-through comment.
6077 * p-exp.y (yylex): Fix fall-through comment.
6078 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6079 comment.
6080 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6081 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6082 * jv-exp.y (yylex): Fix fall-through comment.
6083 * go-exp.y (lex_one_token): Fix fall-through comment.
6084 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6085 fall-through comment.
6086 * f-exp.y (yylex): Fix fall-through comment.
6087 * dwarf2read.c (process_die): Fix fall-through comments.
6088 * dbxread.c (process_one_symbol): Fix fall-through comment.
6089 * d-exp.y (lex_one_token): Fix fall-through comment.
6090 * cp-name-parser.y (yylex): Fix fall-through comment.
6091 * coffread.c (coff_symtab_read): Fix fall-through comment.
6092 * c-exp.y (lex_one_token): Fix fall-through comment.
6093 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6094 comment.
6095 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6096 comment.
6097
6098 2018-05-04 Tom Tromey <tom@tromey.com>
6099
6100 PR python/22730:
6101 * NEWS: Mention gdb.execute change.
6102 * gdbcmd.h (execute_control_command): Don't declare.
6103 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6104 execute_control_commands, execute_control_commands_to_string.
6105 * cli/cli-script.h (execute_control_commands)
6106 (execute_control_commands_to_string): Declare.
6107 (execute_control_command): Add from_tty parameter.
6108 * cli/cli-script.c (execute_control_commands)
6109 (execute_control_commands_to_string): New functions.
6110 (execute_user_command): Use execute_control_commands.
6111 (execute_control_command_1): Add "from_tty" parameter. Update.
6112 (execute_control_command): Likewise.
6113
6114 2018-05-04 Tom Tromey <tom@tromey.com>
6115
6116 PR python/22731:
6117 * NEWS: Mention that breakpoint commands are writable.
6118 * python/py-breakpoint.c (bppy_set_commands): New function.
6119 (breakpoint_object_getset) <"commands">: Use it.
6120
6121 2018-05-04 Tom Tromey <tom@tromey.com>
6122
6123 * tracepoint.c (actions_command): Update.
6124 * mi/mi-cmd-break.c (mi_command_line_array)
6125 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6126 (mi_read_next_line): Remove.
6127 (mi_cmd_break_commands): Update.
6128 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6129 function_view.
6130 * cli/cli-script.c (get_command_line): Update.
6131 (process_next_line): Use function_view. Constify.
6132 (recurse_read_control_structure, read_command_lines)
6133 (read_command_lines_1): Change argument types to function_view.
6134 (do_define_command, document_command): Update.
6135 * breakpoint.h (check_tracepoint_command): Don't declare.
6136 * breakpoint.c (check_tracepoint_command): Remove.
6137 (commands_command_1, create_tracepoint_from_upload): Update.
6138
6139 2018-05-04 Tom Tromey <tom@tromey.com>
6140
6141 PR gdb/11750:
6142 * cli/cli-script.h (enum command_control_type) <define_control>:
6143 New constant.
6144 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6145 (build_command_line, execute_control_command_1)
6146 (process_next_line): Likewise.
6147 (do_define_command): New function, extracted from define_command.
6148 (define_command): Use it.
6149
6150 2018-05-04 Tom Tromey <tom@tromey.com>
6151
6152 * tracepoint.c (actions_command): Update.
6153 * cli/cli-script.h (read_command_lines): Update.
6154 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6155 (MAX_TMPBUF): Remove define.
6156 (define_command): Use string_printf.
6157 (document_command): Likewise.
6158 * breakpoint.c (commands_command_1): Update.
6159
6160 2018-05-04 Tom Tromey <tom@tromey.com>
6161
6162 * top.c (execute_command): Update.
6163 * cli/cli-script.h (print_command_lines): Now varargs.
6164 * cli/cli-script.c (print_command_lines): Now varargs.
6165 (execute_control_command_1) <case while_control, case if_control>:
6166 Update.
6167
6168 2018-05-04 Tom Tromey <tom@tromey.com>
6169
6170 * tracepoint.c (all_tracepoint_actions): Rename from
6171 all_tracepoint_actions_and_cleanup. Change return type.
6172 (actions_command, encode_actions_1, encode_actions)
6173 (trace_dump_actions, tdump_command): Update.
6174 * remote.c (remote_download_command_source): Update.
6175 * python/python.c (gdbpy_eval_from_control_command)
6176 (python_command, python_interactive_command): Update.
6177 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6178 * guile/guile.c (guile_command)
6179 (gdbscm_eval_from_control_command, guile_command): Update.
6180 * compile/compile.c (compile_code_command)
6181 (compile_print_command, compile_to_object): Update.
6182 * cli/cli-script.h (struct command_lines_deleter): New.
6183 (counted_command_line): New typedef.
6184 (struct command_line): Add constructor, destructor.
6185 <body_list>: Remove.
6186 <body_list_0, body_list_1>: New members.
6187 (command_line_up): Remove typedef.
6188 (read_command_lines, read_command_lines_1, get_command_line):
6189 Update.
6190 (copy_command_lines): Don't declare.
6191 * cli/cli-script.c (build_command_line): Use "new".
6192 (get_command_line): Return counted_command_line.
6193 (print_command_lines, execute_user_command)
6194 (execute_control_command_1, while_command, if_command): Update.
6195 (realloc_body_list): Remove.
6196 (process_next_line, recurse_read_control_structure): Update.
6197 (read_command_lines, read_command_lines_1): Return counted_command_line.
6198 (free_command_lines): Use "delete".
6199 (copy_command_lines): Remove.
6200 (define_command, document_command, show_user_1): Update.
6201 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6202 a counted_command_line.
6203 * breakpoint.h (counted_command_line): Remove typedef.
6204 (breakpoint_set_commands): Update.
6205 * breakpoint.c (check_no_tracepoint_commands)
6206 (validate_commands_for_breakpoint): Update.
6207 (breakpoint_set_commands): Change commands to be a
6208 counted_command_line.
6209 (commands_command_1, update_dprintf_command_list)
6210 (create_tracepoint_from_upload): Update.
6211
6212 2018-05-04 Tom Tromey <tom@tromey.com>
6213
6214 * cli/cli-decode.h (cmd_list_element): New constructor.
6215 (~cmd_list_element): New destructor.
6216 (struct cmd_list_element): Add initializers.
6217 * cli/cli-decode.c (do_add_cmd): Use "new".
6218 (delete_cmd): Use "delete".
6219
6220 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6221 Pedro Alves <palves@redhat.com>
6222
6223 PR breakpoints/19806 and support for PR external/20207.
6224 * NEWS: Mention Aarch64 watchpoint improvements.
6225 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6226 watchpoints and PR external/20207 watchpoints.
6227 * nat/aarch64-linux-hw-point.c
6228 (kernel_supports_any_contiguous_range): New.
6229 (aarch64_watchpoint_offset): New.
6230 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6231 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6232 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6233 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6234 next_addr_orig_p. Support PR external/20207 watchpoints.
6235 (aarch64_downgrade_regs): New.
6236 (aarch64_dr_state_insert_one_point): New parameters offset and
6237 addr_orig.
6238 (aarch64_dr_state_remove_one_point): Likewise.
6239 (aarch64_handle_breakpoint): Update caller.
6240 (aarch64_handle_aligned_watchpoint): Likewise.
6241 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6242 aligned_offset.
6243 (aarch64_linux_set_debug_regs): Remove const from state. Call
6244 aarch64_downgrade_regs.
6245 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6246 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6247 (DR_CONTROL_MASK): ... this.
6248 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6249 (unsigned int aarch64_watchpoint_offset): New prototype.
6250 (aarch64_linux_set_debug_regs): Remove const from state.
6251 * utils.c (align_up, align_down): Move to ...
6252 * common/common-utils.c (align_up, align_down): ... here.
6253 * utils.h (align_up, align_down): Move to ...
6254 * common/common-utils.h (align_up, align_down): ... here.
6255
6256 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6257
6258 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6259 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6260 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6261 Re-implement to match the ABI as summarized in GCC's
6262 gcc/config/sparc/sparc.c. All callers updated.
6263 (sparc32_store_arguments): Remove assertion.
6264
6265 2018-05-04 Tom Tromey <tom@tromey.com>
6266
6267 * printcmd.c: Don't include tui.h.
6268 (decode_format): Use skip_spaces.
6269
6270 2018-05-04 Tom Tromey <tom@tromey.com>
6271
6272 PR gdb/22619:
6273 * printcmd.c (last_count): New global.
6274 (x_command): Use saved count when repeating.
6275
6276 2018-05-04 Tom Tromey <tom@tromey.com>
6277
6278 * nto-procfs.c (do_closedir_cleanup): Remove.
6279 (procfs_pidlist): Use gdb_dir_up.
6280 * procfs.c (do_closedir_cleanup): Remove.
6281 (proc_update_threads): Use gdb_dir_up.
6282 * common/filestuff.h (struct gdb_dir_deleter): New.
6283 (gdb_dir_up): New typedef.
6284
6285 2018-05-04 Tom Tromey <tom@tromey.com>
6286
6287 * ada-lang.c (print_mention_exception): Use std::string.
6288
6289 2018-05-04 Tom Tromey <tom@tromey.com>
6290
6291 * ada-lang.c (create_excep_cond_exprs): Update.
6292 (ada_exception_catchpoint_cond_string): Use std::string.
6293
6294 2018-05-04 Tom Tromey <tom@tromey.com>
6295
6296 * ada-lang.c (xget_renaming_scope): Return std::string.
6297 (old_renaming_is_invisible): Update.
6298
6299 2018-05-04 Tom Tromey <tom@tromey.com>
6300
6301 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6302 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6303
6304 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6305
6306 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6307
6308 2018-05-04 Tom Tromey <tom@tromey.com>
6309
6310 * remote.c (remote_query_supported_append): Change type.
6311 (remote_check_symbols): Update.
6312
6313 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6314
6315 PR gdb/11420
6316 * configure.ac: Prepend libpython.
6317 * python/python-config.py: Likewise.
6318 * configure: Regenerate.
6319
6320 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6321
6322 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6323
6324 2018-05-03 Pedro Alves <palves@redhat.com>
6325
6326 * s390-linux-nat.c
6327 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6328 override. Write 'true' instead of '1'.
6329 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6330 declaration.
6331
6332 2018-05-02 Pedro Alves <palves@redhat.com>
6333
6334 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6335 add_inf_child_target.
6336 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6337 add_inf_child_target.
6338 * aix-thread.c (aix_thread_target_info): New.
6339 (aix_thread_target) <shortname, longname, doc>: Delete.
6340 <info>: New.
6341 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6342 add_inf_child_target.
6343 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6344 add_inf_child_target.
6345 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6346 add_inf_child_target.
6347 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6348 add_inf_child_target.
6349 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6350 add_inf_child_target.
6351 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6352 add_inf_child_target.
6353 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6354 add_inf_child_target.
6355 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6356 add_inf_child_target.
6357 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6358 add_inf_child_target.
6359 * bfd-target.c (target_bfd_target_info): New.
6360 (target_bfd) <shortname, longname, doc>: Delete.
6361 <info>: New.
6362 * bsd-kvm.c (bsd_kvm_target_info): New.
6363 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6364 <info>: New.
6365 (bsd_kvm_target::open): Rename to ...
6366 (bsd_kvm_target_open): ... this. Adjust.
6367 * bsd-uthread.c (bsd_uthread_target_info): New.
6368 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6369 <info>: New.
6370 * corefile.c (core_file_command): Adjust.
6371 * corelow.c (core_target_info): New.
6372 (core_target) <shortname, longname, doc>: Delete.
6373 <info>: New.
6374 (core_target::open): Rename to ...
6375 (core_target_open): ... this. Adjust.
6376 * ctf.c (ctf_target_info): New.
6377 (ctf_target) <shortname, longname, doc>: Delete.
6378 <info>: New.
6379 (ctf_target::open): Rename to ...
6380 (ctf_target_open): ... this.
6381 (_initialize_ctf): Adjust.
6382 * exec.c (exec_target_info): New.
6383 (exec_target) <shortname, longname, doc>: Delete.
6384 <info>: New.
6385 (exec_target::open): Rename to ...
6386 (exec_target_open): ... this.
6387 * gdbcore.h (core_target_open): Declare.
6388 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6389 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6390 add_inf_child_target.
6391 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6392 add_inf_child_target.
6393 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6394 add_inf_child_target.
6395 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6396 add_inf_child_target.
6397 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6398 add_inf_child_target.
6399 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6400 add_inf_child_target.
6401 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6402 add_inf_child_target.
6403 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6404 add_inf_child_target.
6405 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6406 add_inf_child_target.
6407 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6408 add_inf_child_target.
6409 * inf-child.c (inf_child_target_info): New.
6410 (inf_child_target::info): New.
6411 (inf_child_open_target): Remove 'target' parameter. Use
6412 get_native_target instead.
6413 (inf_child_target::open): Delete.
6414 (add_inf_child_target): New.
6415 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6416 Delete.
6417 <info>: New.
6418 (add_inf_child_target): Declare.
6419 (inf_child_open_target): Declare.
6420 * linux-thread-db.c (thread_db_target_info): New.
6421 (thread_db_target) <shortname, longname, doc>: Delete.
6422 <info>: New.
6423 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6424 add_inf_child_target.
6425 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6426 add_inf_child_target.
6427 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6428 add_inf_child_target.
6429 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6430 add_inf_child_target.
6431 * make-target-delegates (print_class): Adjust.
6432 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6433 add_inf_child_target.
6434 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6435 add_inf_child_target.
6436 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6437 add_inf_child_target.
6438 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6439 add_inf_child_target.
6440 * nto-procfs.c (nto_native_target_info): New.
6441 (nto_procfs_target_native) <shortname, longname, doc>:
6442 Delete.
6443 <info>: New.
6444 (nto_procfs_target_info): New.
6445 (nto_procfs_target_procfs) <shortname, longname, doc>:
6446 Delete.
6447 <info>: New.
6448 (init_procfs_targets): Adjust.
6449 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6450 add_inf_child_target.
6451 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6452 add_inf_child_target.
6453 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6454 add_inf_child_target.
6455 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6456 add_inf_child_target.
6457 * ravenscar-thread.c (ravenscar_target_info): New.
6458 (ravenscar_thread_target) <shortname, longname, doc>:
6459 Delete.
6460 <info>: New.
6461 * record-btrace.c (record_btrace_target_info):
6462 (record_btrace_target) <shortname, longname, doc>: Delete.
6463 <info>: New.
6464 (record_btrace_target::open): Rename to ...
6465 (record_btrace_target_open): ... this. Adjust.
6466 * record-full.c (record_longname, record_doc): New.
6467 (record_full_base_target) <shortname, longname, doc>: Delete.
6468 <info>: New.
6469 (record_full_target_info): New.
6470 (record_full_target): <shortname>: Delete.
6471 <info>: New.
6472 (record_full_core_open_1, record_full_open_1): Update comments.
6473 (record_full_base_target::open): Rename to ...
6474 (record_full_open): ... this.
6475 (cmd_record_full_restore): Update.
6476 (_initialize_record_full): Update.
6477 * remote-sim.c (remote_sim_target_info): New.
6478 (gdbsim_target) <shortname, longname, doc>: Delete.
6479 <info>: New.
6480 (gdbsim_target::open): Rename to ...
6481 (gdbsim_target_open): ... this.
6482 (_initialize_remote_sim): Adjust.
6483 * remote.c (remote_doc): New.
6484 (remote_target_info): New.
6485 (remote_target) <shortname, longname, doc>: Delete.
6486 <info>: New.
6487 (extended_remote_target_info): New.
6488 (extended_remote_target) <shortname, longname, doc>: Delete.
6489 <info>: New.
6490 (remote_target::open_1): Make static. Adjust.
6491 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6492 * s390-linux-nat.c (_initialize_s390_nat): Use
6493 add_inf_child_target.
6494 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6495 add_inf_child_target.
6496 * sol-thread.c (thread_db_target_info): New.
6497 (sol_thread_target) <shortname, longname, doc>: Delete.
6498 <info>: New.
6499 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6500 add_inf_child_target.
6501 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6502 add_inf_child_target.
6503 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6504 add_inf_child_target.
6505 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6506 add_inf_child_target.
6507 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6508 add_inf_child_target.
6509 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6510 add_inf_child_target.
6511 * spu-linux-nat.c (_initialize_spu_nat): Use
6512 add_inf_child_target.
6513 * spu-multiarch.c (spu_multiarch_target_info): New.
6514 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6515 <info>: New.
6516 * target-delegates.c: Regenerate.
6517 * target.c: Include <unordered_map>.
6518 (target_ops_p): Delete.
6519 (DEF_VEC_P(target_ops_p)): Delete.
6520 (target_factories): New.
6521 (test_target_info): New.
6522 (test_target_ops::info): New.
6523 (open_target): Adjust to use target_factories.
6524 (add_target_with_completer): Rename to ...
6525 (add_target): ... this. Change prototype. Register target_info
6526 and open callback in target_factories. Register target_info in
6527 command context instead of target_ops.
6528 (add_target): Delete old implementation.
6529 (add_deprecated_target_alias): Change prototype. Adjust.
6530 (the_native_target): New.
6531 (set_native_target, get_native_target): New.
6532 (find_default_run_target): Use the_native_target.
6533 (find_attach_target, find_run_target): Simplify.
6534 (target_ops::open): Delete.
6535 (dummy_target_info): New.
6536 (dummy_target::shortname, dummy_target::longname)
6537 (dummy_target::doc): Delete.
6538 (dummy_target::info): New.
6539 (debug_target::shortname, debug_target::longname)
6540 (debug_target::doc): Delete.
6541 (debug_target::info): New.
6542 * target.h (struct target_info): New.
6543 (target_ops::~target_ops): Add comment.
6544 (target_ops::info): New.
6545 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6546 longer virtual. Implement in terms of target_info.
6547 (set_native_target, get_native_target): Declare.
6548 (target_open_ftype): New.
6549 (add_target, add_target_with_completer)
6550 (add_deprecated_target_alias): Change prototype.
6551 (test_target) <shortname, longname, doc>: Delete.
6552 <info>: New.
6553 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6554 add_inf_child_target.
6555 * tracefile-tfile.c (tfile_target_info): New.
6556 (tfile_target) <shortname, longname, doc>: Delete.
6557 <info>: New.
6558 (tfile_target::open): Rename to ...
6559 (tfile_target_open): ... this.
6560 (_initialize_tracefile_tfile): Adjust.
6561 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6562 add_inf_child_target.
6563 * windows-nat.c (_initialize_windows_nat): Use
6564 add_inf_child_target.
6565 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6566 add_inf_child_target.
6567
6568 2018-05-02 Pedro Alves <palves@redhat.com>
6569
6570 * linux-nat.h (linux_nat_target) <low_new_thread,
6571 low_delete_thread, low_new_fork, low_forget_process,
6572 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6573 New virtual methods.
6574 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6575 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6576 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6577 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6578 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6579 Delete.
6580 * linux-fork.c (delete_fork): Adjust to call low method.
6581 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6582 (linux_nat_new_fork, linux_nat_forget_process_hook)
6583 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6584 (linux_nat_status_is_event):
6585 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6586 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6587 to call low method.
6588 (sigtrap_is_event): Rename to ...
6589 (linux_nat_target::low_status_is_event): ... this.
6590 (linux_nat_set_status_is_event): Delete.
6591 (save_stop_reason, linux_nat_wait_1)
6592 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6593 low methods.
6594 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6595 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6596 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6597 (linux_nat_set_prepare_to_resume): Delete.
6598 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6599 low virtual methods.
6600 * amd64-linux-nat.c: Likewise.
6601 * arm-linux-nat.c: Likewise.
6602 * i386-linux-nat.c: Likewise.
6603 * ia64-linux-nat.c: Likewise.
6604 * mips-linux-nat.c: Likewise.
6605 * ppc-linux-nat.c: Likewise.
6606 * s390-linux-nat.c: Likewise.
6607 * sparc64-linux-nat.c: Likewise.
6608 * x86-linux-nat.c: Likewise.
6609 * x86-linux-nat.h: Include "nat/x86-linux.h".
6610 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6611 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6612 Override methods.
6613
6614 2018-05-02 Pedro Alves <palves@redhat.com>
6615
6616 * target.h (target_ops)
6617 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6618 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6619 stopped_by_watchpoint, have_continuable_watchpoint,
6620 stopped_data_address, watchpoint_addr_within_range,
6621 can_accel_watchpoint_condition, can_run, thread_alive,
6622 has_all_memory, has_memory, has_stack, has_registers,
6623 has_execution, can_async_p, is_async_p, supports_non_stop,
6624 always_non_stop_p, can_execute_reverse, supports_multi_process,
6625 supports_enable_disable_tracepoint,
6626 supports_disable_randomization, supports_string_tracing,
6627 supports_evaluation_of_breakpoint_conditions,
6628 can_run_breakpoint_commands, filesystem_is_local,
6629 can_download_tracepoint, get_trace_state_variable_value,
6630 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6631 record_is_replaying, record_will_replay,
6632 augmented_libraries_svr4_read>: Adjust to return bool.
6633 * aarch64-linux-nat.c: All implementations adjusted.
6634 * aix-thread.c: All implementations adjusted.
6635 * arm-linux-nat.c: All implementations adjusted.
6636 * breakpoint.c: All implementations adjusted.
6637 * bsd-kvm.c: All implementations adjusted.
6638 * bsd-uthread.c: All implementations adjusted.
6639 * corelow.c: All implementations adjusted.
6640 * ctf.c: All implementations adjusted.
6641 * darwin-nat.c: All implementations adjusted.
6642 * darwin-nat.h: All implementations adjusted.
6643 * exec.c: All implementations adjusted.
6644 * fbsd-nat.c: All implementations adjusted.
6645 * fbsd-nat.h: All implementations adjusted.
6646 * gnu-nat.c: All implementations adjusted.
6647 * gnu-nat.h: All implementations adjusted.
6648 * go32-nat.c: All implementations adjusted.
6649 * ia64-linux-nat.c: All implementations adjusted.
6650 * inf-child.c: All implementations adjusted.
6651 * inf-child.h: All implementations adjusted.
6652 * inf-ptrace.c: All implementations adjusted.
6653 * inf-ptrace.h: All implementations adjusted.
6654 * linux-nat.c: All implementations adjusted.
6655 * linux-nat.h: All implementations adjusted.
6656 * mips-linux-nat.c: All implementations adjusted.
6657 * nto-procfs.c: All implementations adjusted.
6658 * ppc-linux-nat.c: All implementations adjusted.
6659 * procfs.c: All implementations adjusted.
6660 * ravenscar-thread.c: All implementations adjusted.
6661 * record-btrace.c: All implementations adjusted.
6662 * record-full.c: All implementations adjusted.
6663 * remote-sim.c: All implementations adjusted.
6664 * remote.c: All implementations adjusted.
6665 * s390-linux-nat.c: All implementations adjusted.
6666 * sol-thread.c: All implementations adjusted.
6667 * spu-multiarch.c: All implementations adjusted.
6668 * target-delegates.c: All implementations adjusted.
6669 * target.c: All implementations adjusted.
6670 * target.h: All implementations adjusted.
6671 * tracefile-tfile.c: All implementations adjusted.
6672 * tracefile.c: All implementations adjusted.
6673 * tracefile.h: All implementations adjusted.
6674 * windows-nat.c: All implementations adjusted.
6675 * x86-linux-nat.h: All implementations adjusted.
6676 * x86-nat.h: All implementations adjusted.
6677
6678 2018-05-02 Pedro Alves <palves@redhat.com>
6679
6680 * make-target-delegates (scan_target_h): Don't trim lines here.
6681 Replace sequences of tabs and/or whitespace with a single
6682 whitespace.
6683 (top level, parsing methods): Trim each line before processing it
6684 here.
6685
6686 2018-05-02 Pedro Alves <palves@redhat.com>
6687 John Baldwin <jhb@freebsd.org>
6688
6689 * target.h (enum strata) <debug_stratum>: New.
6690 (struct target_ops) <all delegation methods>: Replace by C++
6691 virtual methods, and drop "to_" prefix. All references updated
6692 throughout.
6693 <to_shortname, to_longname, to_doc, to_data,
6694 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6695 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6696 virtual methods. All references updated throughout.
6697 <can_attach, supports_terminal_ours, can_create_inferior,
6698 get_thread_control_capabilities, attach_no_wait>: New
6699 virtual methods.
6700 <insert_breakpoint, remove_breakpoint>: Now
6701 TARGET_DEFAULT_NORETURN methods.
6702 <info_proc>: Now returns bool.
6703 <to_magic>: Delete.
6704 (OPS_MAGIC): Delete.
6705 (current_target): Delete. All references replaced by references
6706 to ...
6707 (target_stack): ... this. New.
6708 (target_shortname, target_longname): Adjust.
6709 (target_can_run): Now a function declaration.
6710 (default_child_has_all_memory, default_child_has_memory)
6711 (default_child_has_stack, default_child_has_registers)
6712 (default_child_has_execution): Remove target_ops parameter.
6713 (complete_target_initialization): Delete.
6714 (memory_breakpoint_target): New template class.
6715 (test_target_ops): Refactor as a C++ class with virtual methods.
6716 * make-target-delegates (NAME_PART): Tighten.
6717 (POINTER_PART, CP_SYMBOL): New.
6718 (SIMPLE_RETURN_PART): Reimplement.
6719 (VEC_RETURN_PART): Expect less.
6720 (RETURN_PART, VIRTUAL_PART): New.
6721 (METHOD): Adjust to C++ virtual methods.
6722 (scan_target_h): Remove reference to C99.
6723 (dname): Output "target_ops::" prefix.
6724 (write_function_header): Adjust to output a C++ class method.
6725 (write_declaration): New.
6726 (write_delegator): Adjust to output a C++ class method.
6727 (tdname): Output "dummy_target::" prefix.
6728 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6729 method.
6730 (tdefault_names, debug_names): Delete.
6731 (return_types, tdefaults, styles, argtypes_array): New.
6732 (top level): All methods are delegators.
6733 (print_class): New.
6734 (top level): Print dummy_target and debug_target classes.
6735 * target-delegates.c: Regenerate.
6736 * target-debug.h (target_debug_print_enum_info_proc_what)
6737 (target_debug_print_thread_control_capabilities)
6738 (target_debug_print_thread_info_p): New.
6739 * target.c (dummy_target): Delete.
6740 (the_dummy_target, the_debug_target): New.
6741 (target_stack): Now extern.
6742 (set_targetdebug): Push/unpush debug target.
6743 (default_child_has_all_memory, default_child_has_memory)
6744 (default_child_has_stack, default_child_has_registers)
6745 (default_child_has_execution): Remove target_ops parameter.
6746 (complete_target_initialization): Delete.
6747 (add_target_with_completer): No longer call
6748 complete_target_initialization.
6749 (target_supports_terminal_ours): Use regular delegation.
6750 (update_current_target): Delete.
6751 (push_target): No longer check magic number. Don't call
6752 update_current_target.
6753 (unpush_target): Don't call update_current_target.
6754 (target_is_pushed): No longer check magic number.
6755 (target_require_runnable): Skip for all stratums over
6756 process_stratum.
6757 (target_ops::info_proc): New.
6758 (target_info_proc): Use find_target_at and
6759 find_default_run_target.
6760 (target_supports_disable_randomization): Use regular delegation.
6761 (target_get_osdata): Use find_target_at.
6762 (target_ops::open, target_ops::close, target_ops::can_attach)
6763 (target_ops::attach, target_ops::can_create_inferior)
6764 (target_ops::create_inferior, target_ops::can_run)
6765 (target_can_run): New.
6766 (default_fileio_target): Use regular delegation.
6767 (target_ops::fileio_open, target_ops::fileio_pwrite)
6768 (target_ops::fileio_pread, target_ops::fileio_fstat)
6769 (target_ops::fileio_close, target_ops::fileio_unlink)
6770 (target_ops::fileio_readlink): New.
6771 (target_fileio_open_1, target_fileio_unlink)
6772 (target_fileio_readlink): Always call the target method. Handle
6773 FILEIO_ENOSYS.
6774 (return_zero, return_zero_has_execution): Delete.
6775 (init_dummy_target): Delete.
6776 (dummy_target::dummy_target, dummy_target::shortname)
6777 (dummy_target::longname, dummy_target::doc)
6778 (debug_target::debug_target, debug_target::shortname)
6779 (debug_target::longname, debug_target::doc): New.
6780 (target_supports_delete_record): Use regular delegation.
6781 (setup_target_debug): Delete.
6782 (maintenance_print_target_stack): Skip debug_stratum.
6783 (initialize_targets): Instantiate the_dummy_target and
6784 the_debug_target.
6785 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6786 use target_stack.
6787 (target_auxv_search, fprint_target_auxv): Adjust.
6788 (info_auxv_command): Adjust to use target_stack.
6789 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6790 * exceptions.c (print_flush): Handle a NULL target_stack.
6791 * regcache.c (target_ops_no_register): Refactor as class with
6792 virtual methods.
6793
6794 * exec.c (exec_target): New class.
6795 (exec_ops): Now an exec_target.
6796 (exec_open, exec_close_1, exec_get_section_table)
6797 (exec_xfer_partial, exec_files_info, exec_has_memory)
6798 (exec_make_note_section): Refactor as exec_target methods.
6799 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6800 Delete.
6801 (exec_target::find_memory_regions): New.
6802 (_initialize_exec): Don't call init_exec_ops.
6803 * gdbcore.h (exec_file_clear): Delete.
6804
6805 * corefile.c (core_target): Delete.
6806 (core_file_command): Adjust.
6807 * corelow.c (core_target): New class.
6808 (the_core_target): New.
6809 (core_close): Remove target_ops parameter.
6810 (core_close_cleanup): Adjust.
6811 (core_target::close): New.
6812 (core_open, core_detach, get_core_registers, core_files_info)
6813 (core_xfer_partial, core_thread_alive, core_read_description)
6814 (core_pid_to_str, core_thread_name, core_has_memory)
6815 (core_has_stack, core_has_registers, core_info_proc): Rework as
6816 core_target methods.
6817 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6818 (_initialize_corelow): Initialize the_core_target.
6819 * gdbcore.h (core_target): Delete.
6820 (the_core_target): New.
6821
6822 * ctf.c: (ctf_target): New class.
6823 (ctf_ops): Now a ctf_target.
6824 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6825 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6826 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6827 methods.
6828 (init_ctf_ops): Delete.
6829 (_initialize_ctf): Don't call it.
6830 * tracefile-tfile.c (tfile_target): New class.
6831 (tfile_ops): Now a tfile_target.
6832 (tfile_open, tfile_close, tfile_files_info)
6833 (tfile_get_tracepoint_status, tfile_trace_find)
6834 (tfile_fetch_registers, tfile_xfer_partial)
6835 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6836 Refactor as tfile_target methods.
6837 (tfile_xfer_partial_features): Remove target_ops parameter.
6838 (init_tfile_ops): Delete.
6839 (_initialize_tracefile_tfile): Don't call it.
6840 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6841 (tracefile_has_stack, tracefile_has_registers)
6842 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6843 tracefile_target methods.
6844 (init_tracefile_ops): Delete.
6845 (tracefile_target::tracefile_target): New.
6846 * tracefile.h: Include "target.h".
6847 (tracefile_target): New class.
6848 (init_tracefile_ops): Delete.
6849
6850 * spu-multiarch.c (spu_multiarch_target): New class.
6851 (spu_ops): Now a spu_multiarch_target.
6852 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6853 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6854 (spu_search_memory, spu_mourn_inferior): Refactor as
6855 spu_multiarch_target methods.
6856 (init_spu_ops): Delete.
6857 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6858 complete_target_initialization.
6859
6860 * ravenscar-thread.c (ravenscar_thread_target): New class.
6861 (ravenscar_ops): Now a ravenscar_thread_target.
6862 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6863 (ravenscar_thread_alive, ravenscar_pid_to_str)
6864 (ravenscar_fetch_registers, ravenscar_store_registers)
6865 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6866 (ravenscar_stopped_by_hw_breakpoint)
6867 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6868 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6869 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6870 methods.
6871 (init_ravenscar_thread_ops): Delete.
6872 (_initialize_ravenscar): Remove references to
6873 init_ravenscar_thread_ops and complete_target_initialization.
6874
6875 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6876 (bsd_uthread_target): New class.
6877 (bsd_uthread_ops): Now a bsd_uthread_target.
6878 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6879 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6880 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6881 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6882 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6883 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6884 (bsd_uthread_target): Delete function.
6885 (_initialize_bsd_uthread): Remove reference to
6886 complete_target_initialization.
6887
6888 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6889 (target_bfd): ... this new class.
6890 (target_bfd_xfer_partial, target_bfd_get_section_table)
6891 (target_bfd_close): Refactor as target_bfd methods.
6892 (target_bfd::~target_bfd): New.
6893 (target_bfd_reopen): Adjust.
6894 (target_bfd::close): New.
6895
6896 * record-btrace.c (record_btrace_target): New class.
6897 (record_btrace_ops): Now a record_btrace_target.
6898 (record_btrace_open, record_btrace_stop_recording)
6899 (record_btrace_disconnect, record_btrace_close)
6900 (record_btrace_async, record_btrace_info)
6901 (record_btrace_insn_history, record_btrace_insn_history_range)
6902 (record_btrace_insn_history_from, record_btrace_call_history)
6903 (record_btrace_call_history_range)
6904 (record_btrace_call_history_from, record_btrace_record_method)
6905 (record_btrace_is_replaying, record_btrace_will_replay)
6906 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6907 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6908 (record_btrace_store_registers, record_btrace_prepare_to_store)
6909 (record_btrace_to_get_unwinder)
6910 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6911 (record_btrace_commit_resume, record_btrace_wait)
6912 (record_btrace_stop, record_btrace_can_execute_reverse)
6913 (record_btrace_stopped_by_sw_breakpoint)
6914 (record_btrace_supports_stopped_by_sw_breakpoint)
6915 (record_btrace_stopped_by_hw_breakpoint)
6916 (record_btrace_supports_stopped_by_hw_breakpoint)
6917 (record_btrace_update_thread_list, record_btrace_thread_alive)
6918 (record_btrace_goto_begin, record_btrace_goto_end)
6919 (record_btrace_goto, record_btrace_stop_replaying_all)
6920 (record_btrace_execution_direction)
6921 (record_btrace_prepare_to_generate_core)
6922 (record_btrace_done_generating_core): Refactor as
6923 record_btrace_target methods.
6924 (init_record_btrace_ops): Delete.
6925 (_initialize_record_btrace): Remove reference to
6926 init_record_btrace_ops.
6927 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6928 the execution_direction global.
6929 (record_full_base_target, record_full_target)
6930 (record_full_core_target): New classes.
6931 (record_full_ops): Now a record_full_target.
6932 (record_full_core_ops): Now a record_full_core_target.
6933 (record_full_target::detach, record_full_target::disconnect)
6934 (record_full_core_target::disconnect)
6935 (record_full_target::mourn_inferior, record_full_target::kill):
6936 New.
6937 (record_full_open, record_full_close, record_full_async): Refactor
6938 as methods of the record_full_base_target class.
6939 (record_full_resume, record_full_commit_resume): Refactor
6940 as methods of the record_full_target class.
6941 (record_full_wait, record_full_stopped_by_watchpoint)
6942 (record_full_stopped_data_address)
6943 (record_full_stopped_by_sw_breakpoint)
6944 (record_full_supports_stopped_by_sw_breakpoint)
6945 (record_full_stopped_by_hw_breakpoint)
6946 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6947 methods of the record_full_base_target class.
6948 (record_full_store_registers, record_full_xfer_partial)
6949 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6950 Refactor as methods of the record_full_target class.
6951 (record_full_can_execute_reverse, record_full_get_bookmark)
6952 (record_full_goto_bookmark, record_full_execution_direction)
6953 (record_full_record_method, record_full_info, record_full_delete)
6954 (record_full_is_replaying, record_full_will_replay)
6955 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6956 (record_full_stop_replaying): Refactor as methods of the
6957 record_full_base_target class.
6958 (record_full_core_resume, record_full_core_kill)
6959 (record_full_core_fetch_registers)
6960 (record_full_core_prepare_to_store)
6961 (record_full_core_store_registers, record_full_core_xfer_partial)
6962 (record_full_core_insert_breakpoint)
6963 (record_full_core_remove_breakpoint)
6964 (record_full_core_has_execution): Refactor
6965 as methods of the record_full_core_target class.
6966 (record_full_base_target::supports_delete_record): New.
6967 (init_record_full_ops): Delete.
6968 (init_record_full_core_ops): Delete.
6969 (record_full_save): Refactor as method of the
6970 record_full_base_target class.
6971 (_initialize_record_full): Remove references to
6972 init_record_full_ops and init_record_full_core_ops.
6973
6974 * remote.c (remote_target, extended_remote_target): New classes.
6975 (remote_ops): Now a remote_target.
6976 (extended_remote_ops): Now an extended_remote_target.
6977 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6978 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6979 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6980 (remote_pass_signals, remote_set_syscall_catchpoint)
6981 (remote_program_signals, )
6982 (remote_thread_always_alive): Remove target_ops parameter.
6983 (remote_thread_alive, remote_thread_name)
6984 (remote_update_thread_list, remote_threads_extra_info)
6985 (remote_static_tracepoint_marker_at)
6986 (remote_static_tracepoint_markers_by_strid)
6987 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6988 (remote_open): Refactor as methods of remote_target.
6989 (extended_remote_open, extended_remote_detach)
6990 (extended_remote_attach, extended_remote_post_attach):
6991 (extended_remote_supports_disable_randomization)
6992 (extended_remote_create_inferior): : Refactor as method of
6993 extended_remote_target.
6994 (remote_set_permissions, remote_open_1, remote_detach)
6995 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6996 (remote_resume, remote_commit_resume, remote_stop)
6997 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6998 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6999 (remote_prepare_to_store, remote_store_registers)
7000 (remote_flash_erase, remote_flash_done, remote_files_info)
7001 (remote_kill, remote_mourn, remote_insert_breakpoint)
7002 (remote_remove_breakpoint, remote_insert_watchpoint)
7003 (remote_watchpoint_addr_within_range)
7004 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7005 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7006 (remote_supports_stopped_by_sw_breakpoint)
7007 (remote_stopped_by_hw_breakpoint)
7008 (remote_supports_stopped_by_hw_breakpoint)
7009 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7010 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7011 (remote_verify_memory): Refactor as methods of remote_target.
7012 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7013 parameter.
7014 (remote_xfer_partial, remote_get_memory_xfer_limit)
7015 (remote_search_memory, remote_rcmd, remote_memory_map)
7016 (remote_pid_to_str, remote_get_thread_local_address)
7017 (remote_get_tib_address, remote_read_description): Refactor as
7018 methods of remote_target.
7019 (remote_target::fileio_open, remote_target::fileio_pwrite)
7020 (remote_target::fileio_pread, remote_target::fileio_close): New.
7021 (remote_hostio_readlink, remote_hostio_fstat)
7022 (remote_filesystem_is_local, remote_can_execute_reverse)
7023 (remote_supports_non_stop, remote_supports_disable_randomization)
7024 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7025 (remote_supports_enable_disable_tracepoint)
7026 (remote_supports_string_tracing)
7027 (remote_can_run_breakpoint_commands, remote_trace_init)
7028 (remote_download_tracepoint, remote_can_download_tracepoint)
7029 (remote_download_trace_state_variable, remote_enable_tracepoint)
7030 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7031 (remote_trace_start, remote_get_trace_status)
7032 (remote_get_tracepoint_status, remote_trace_stop)
7033 (remote_trace_find, remote_get_trace_state_variable_value)
7034 (remote_save_trace_data, remote_get_raw_trace_data)
7035 (remote_set_disconnected_tracing, remote_core_of_thread)
7036 (remote_set_circular_trace_buffer, remote_traceframe_info)
7037 (remote_get_min_fast_tracepoint_insn_len)
7038 (remote_set_trace_buffer_size, remote_set_trace_notes)
7039 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7040 (remote_disable_btrace, remote_teardown_btrace)
7041 (remote_read_btrace, remote_btrace_conf)
7042 (remote_augmented_libraries_svr4_read, remote_load)
7043 (remote_pid_to_exec_file, remote_can_do_single_step)
7044 (remote_execution_direction, remote_thread_handle_to_thread_info):
7045 Refactor as methods of remote_target.
7046 (init_remote_ops, init_extended_remote_ops): Delete.
7047 (remote_can_async_p, remote_is_async_p, remote_async)
7048 (remote_thread_events, remote_upload_tracepoints)
7049 (remote_upload_trace_state_variables): Refactor as methods of
7050 remote_target.
7051 (_initialize_remote): Remove references to init_remote_ops and
7052 init_extended_remote_ops.
7053
7054 * remote-sim.c (gdbsim_target): New class.
7055 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7056 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7057 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7058 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7059 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7060 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7061 Refactor as methods of gdbsim_target.
7062 (gdbsim_ops): Now a gdbsim_target.
7063 (init_gdbsim_ops): Delete.
7064 (gdbsim_cntrl_c): Adjust.
7065 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7066
7067 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7068 (the_amd64_linux_nat_target): New.
7069 (amd64_linux_fetch_inferior_registers)
7070 (amd64_linux_store_inferior_registers): Refactor as methods of
7071 amd64_linux_nat_target.
7072 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7073 * i386-linux-nat.c: Don't include "linux-nat.h".
7074 (i386_linux_nat_target): New class.
7075 (the_i386_linux_nat_target): New.
7076 (i386_linux_fetch_inferior_registers)
7077 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7078 as methods of i386_linux_nat_target.
7079 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7080 * inf-child.c (inf_child_ops): Delete.
7081 (inf_child_fetch_inferior_registers)
7082 (inf_child_store_inferior_registers): Delete.
7083 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7084 methods of inf_child_target.
7085 (inf_child_target::supports_terminal_ours)
7086 (inf_child_target::terminal_init)
7087 (inf_child_target::terminal_inferior)
7088 (inf_child_target::terminal_ours_for_output)
7089 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7090 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7091 New.
7092 (inf_child_open, inf_child_disconnect, inf_child_close)
7093 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7094 (inf_child_post_startup_inferior, inf_child_can_run)
7095 (inf_child_pid_to_exec_file): Refactor as methods of
7096 inf_child_target.
7097 (inf_child_follow_fork): Delete.
7098 (inf_child_target::can_create_inferior)
7099 (inf_child_target::can_attach): New.
7100 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7101 (inf_child_target::has_stack, inf_child_target::has_registers)
7102 (inf_child_target::has_execution): New.
7103 (inf_child_fileio_open, inf_child_fileio_pwrite)
7104 (inf_child_fileio_pread, inf_child_fileio_fstat)
7105 (inf_child_fileio_close, inf_child_fileio_unlink)
7106 (inf_child_fileio_readlink, inf_child_use_agent)
7107 (inf_child_can_use_agent): Refactor as methods of
7108 inf_child_target.
7109 (return_zero, inf_child_target): Delete.
7110 (inf_child_target::inf_child_target): New.
7111 * inf-child.h: Include "target.h".
7112 (inf_child_target): Delete function prototype.
7113 (inf_child_target): New class.
7114 (inf_child_open_target, inf_child_mourn_inferior)
7115 (inf_child_maybe_unpush_target): Delete.
7116 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7117 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7118 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7119 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7120 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7121 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7122 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7123 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7124 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7125 methods of inf_ptrace_target.
7126 (inf_ptrace_target): Delete function.
7127 * inf-ptrace.h: Include "inf-child.h".
7128 (inf_ptrace_target): Delete function declaration.
7129 (inf_ptrace_target): New class.
7130 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7131 * linux-nat.c (linux_target): New.
7132 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7133 (linux_nat_target::~linux_nat_target): New.
7134 (linux_child_post_attach, linux_child_post_startup_inferior)
7135 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7136 (linux_child_remove_fork_catchpoint)
7137 (linux_child_insert_vfork_catchpoint)
7138 (linux_child_remove_vfork_catchpoint)
7139 (linux_child_insert_exec_catchpoint)
7140 (linux_child_remove_exec_catchpoint)
7141 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7142 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7143 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7144 (linux_nat_stopped_data_address)
7145 (linux_nat_stopped_by_sw_breakpoint)
7146 (linux_nat_supports_stopped_by_sw_breakpoint)
7147 (linux_nat_stopped_by_hw_breakpoint)
7148 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7149 (linux_nat_kill, linux_nat_mourn_inferior)
7150 (linux_nat_xfer_partial, linux_nat_thread_alive)
7151 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7152 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7153 (linux_child_static_tracepoint_markers_by_strid)
7154 (linux_nat_is_async_p, linux_nat_can_async_p)
7155 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7156 (linux_nat_supports_multi_process)
7157 (linux_nat_supports_disable_randomization, linux_nat_async)
7158 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7159 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7160 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7161 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7162 methods of linux_nat_target.
7163 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7164 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7165 parameter.
7166 (check_stopped_by_watchpoint): Adjust.
7167 (linux_xfer_partial): Delete.
7168 (linux_target_install_ops, linux_target, linux_nat_add_target):
7169 Delete.
7170 (linux_nat_target::linux_nat_target): New.
7171 * linux-nat.h: Include "inf-ptrace.h".
7172 (linux_nat_target): New.
7173 (linux_target, linux_target_install_ops, linux_nat_add_target):
7174 Delete function declarations.
7175 (linux_target): Declare global.
7176 * linux-thread-db.c (thread_db_target): New.
7177 (thread_db_target::thread_db_target): New.
7178 (thread_db_ops): Delete.
7179 (the_thread_db_target): New.
7180 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7181 (thread_db_update_thread_list, thread_db_pid_to_str)
7182 (thread_db_extra_thread_info)
7183 (thread_db_thread_handle_to_thread_info)
7184 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7185 (thread_db_resume): Refactor as methods of thread_db_target.
7186 (init_thread_db_ops): Delete.
7187 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7188 * x86-linux-nat.c: Don't include "linux-nat.h".
7189 (super_post_startup_inferior): Delete.
7190 (x86_linux_nat_target::~x86_linux_nat_target): New.
7191 (x86_linux_child_post_startup_inferior)
7192 (x86_linux_read_description, x86_linux_enable_btrace)
7193 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7194 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7195 methods of x86_linux_nat_target.
7196 (x86_linux_create_target): Delete. Bits folded ...
7197 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7198 pointer.
7199 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7200 (x86_linux_nat_target): New class.
7201 (x86_linux_create_target): Delete.
7202 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7203 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7204 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7205 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7206 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7207 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7208 make extern.
7209 (x86_use_watchpoints): Delete.
7210 * x86-nat.h: Include "breakpoint.h" and "target.h".
7211 (x86_use_watchpoints): Delete.
7212 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7213 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7214 (x86_insert_watchpoint, x86_remove_watchpoint)
7215 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7216 (x86_stopped_by_hw_breakpoint): New declarations.
7217 (x86_nat_target): New template class.
7218
7219 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7220 (the_ppc_linux_nat_target): New.
7221 (ppc_linux_fetch_inferior_registers)
7222 (ppc_linux_can_use_hw_breakpoint)
7223 (ppc_linux_region_ok_for_hw_watchpoint)
7224 (ppc_linux_ranged_break_num_registers)
7225 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7226 (ppc_linux_insert_mask_watchpoint)
7227 (ppc_linux_remove_mask_watchpoint)
7228 (ppc_linux_can_accel_watchpoint_condition)
7229 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7230 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7231 (ppc_linux_watchpoint_addr_within_range)
7232 (ppc_linux_masked_watch_num_registers)
7233 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7234 (ppc_linux_read_description): Refactor as methods of
7235 ppc_linux_nat_target.
7236 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7237
7238 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7239 (procfs_target): New class.
7240 (the_procfs_target): New.
7241 (procfs_target): Delete function.
7242 (procfs_auxv_parse, procfs_attach, procfs_detach)
7243 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7244 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7245 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7246 (procfs_create_inferior, procfs_update_thread_list)
7247 (procfs_thread_alive, procfs_pid_to_str)
7248 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7249 (procfs_stopped_data_address, procfs_insert_watchpoint)
7250 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7251 (proc_find_memory_regions, procfs_info_proc)
7252 (procfs_make_note_section): Refactor as methods of procfs_target.
7253 (_initialize_procfs): Adjust.
7254 * sol-thread.c (sol_thread_target): New class.
7255 (sol_thread_ops): Now a sol_thread_target.
7256 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7257 (sol_thread_fetch_registers, sol_thread_store_registers)
7258 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7259 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7260 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7261 (init_sol_thread_ops): Delete.
7262 (_initialize_sol_thread): Adjust. Remove references to
7263 init_sol_thread_ops and complete_target_initialization.
7264
7265 * windows-nat.c (windows_nat_target): New class.
7266 (windows_fetch_inferior_registers)
7267 (windows_store_inferior_registers, windows_resume, windows_wait)
7268 (windows_attach, windows_detach, windows_pid_to_exec_file)
7269 (windows_files_info, windows_create_inferior)
7270 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7271 (windows_close, windows_pid_to_str, windows_xfer_partial)
7272 (windows_get_tib_address, windows_get_ada_task_ptid)
7273 (windows_thread_name, windows_thread_alive): Refactor as
7274 windows_nat_target methods.
7275 (do_initial_windows_stuff): Adjust.
7276 (windows_target): Delete function.
7277 (_initialize_windows_nat): Adjust.
7278
7279 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7280 (darwin_mourn_inferior, darwin_kill_inferior)
7281 (darwin_create_inferior, darwin_attach, darwin_detach)
7282 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7283 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7284 (darwin_supports_multi_process): Refactor as darwin_nat_target
7285 methods.
7286 (darwin_resume_to, darwin_files_info): Delete.
7287 (_initialize_darwin_inferior): Rename to ...
7288 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7289 * darwin-nat.h: Include "inf-child.h".
7290 (darwin_nat_target): New class.
7291 (darwin_complete_target): Delete.
7292 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7293 (darwin_target): New.
7294 (i386_darwin_fetch_inferior_registers)
7295 (i386_darwin_store_inferior_registers): Refactor as methods of
7296 darwin_nat_target.
7297 (darwin_complete_target): Delete, with ...
7298 (_initialize_i386_darwin_nat): ... bits factored out here.
7299
7300 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7301 (the_alpha_linux_nat_target): New.
7302 (alpha_linux_register_u_offset): Refactor as
7303 alpha_linux_nat_target method.
7304 (_initialize_alpha_linux_nat): Adjust.
7305 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7306 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7307 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7308 methods of linux_nat_trad_target.
7309 (linux_trad_target): Delete.
7310 * linux-nat-trad.h (linux_trad_target): Delete function.
7311 (linux_nat_trad_target): New class.
7312 * mips-linux-nat.c (mips_linux_nat_target): New class.
7313 (super_fetch_registers, super_store_registers, super_close):
7314 Delete.
7315 (the_mips_linux_nat_target): New.
7316 (mips64_linux_regsets_fetch_registers)
7317 (mips64_linux_regsets_store_registers)
7318 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7319 (mips_linux_register_u_offset, mips_linux_read_description)
7320 (mips_linux_can_use_hw_breakpoint)
7321 (mips_linux_stopped_by_watchpoint)
7322 (mips_linux_stopped_data_address)
7323 (mips_linux_region_ok_for_hw_watchpoint)
7324 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7325 (mips_linux_close): Refactor as methods of mips_linux_nat.
7326 (_initialize_mips_linux_nat): Adjust to C++ification.
7327
7328 * aix-thread.c (aix_thread_target): New class.
7329 (aix_thread_ops): Now an aix_thread_target.
7330 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7331 (aix_thread_fetch_registers, aix_thread_store_registers)
7332 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7333 (aix_thread_thread_alive, aix_thread_pid_to_str)
7334 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7335 Refactor as methods of aix_thread_target.
7336 (init_aix_thread_ops): Delete.
7337 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7338 and complete_target_initialization.
7339 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7340 (rs6000_nat_target): New class.
7341 (the_rs6000_nat_target): New.
7342 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7343 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7344 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7345 (super_create_inferior): Delete.
7346 (_initialize_rs6000_nat): Adjust to C++ification.
7347
7348 * arm-linux-nat.c (arm_linux_nat_target): New class.
7349 (the_arm_linux_nat_target): New.
7350 (arm_linux_fetch_inferior_registers)
7351 (arm_linux_store_inferior_registers, arm_linux_read_description)
7352 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7353 (arm_linux_remove_hw_breakpoint)
7354 (arm_linux_region_ok_for_hw_watchpoint)
7355 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7356 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7357 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7358 arm_linux_nat_target.
7359 (_initialize_arm_linux_nat): Adjust to C++ification.
7360
7361 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7362 (the_aarch64_linux_nat_target): New.
7363 (aarch64_linux_fetch_inferior_registers)
7364 (aarch64_linux_store_inferior_registers)
7365 (aarch64_linux_child_post_startup_inferior)
7366 (aarch64_linux_read_description)
7367 (aarch64_linux_can_use_hw_breakpoint)
7368 (aarch64_linux_insert_hw_breakpoint)
7369 (aarch64_linux_remove_hw_breakpoint)
7370 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7371 (aarch64_linux_region_ok_for_hw_watchpoint)
7372 (aarch64_linux_stopped_data_address)
7373 (aarch64_linux_stopped_by_watchpoint)
7374 (aarch64_linux_watchpoint_addr_within_range)
7375 (aarch64_linux_can_do_single_step): Refactor as methods of
7376 aarch64_linux_nat_target.
7377 (super_post_startup_inferior): Delete.
7378 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7379
7380 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7381 (the_hppa_linux_nat_target): New.
7382 (hppa_linux_fetch_inferior_registers)
7383 (hppa_linux_store_inferior_registers): Refactor as methods of
7384 hppa_linux_nat_target.
7385 (_initialize_hppa_linux_nat): Adjust to C++ification.
7386
7387 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7388 (the_ia64_linux_nat_target): New.
7389 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7390 (ia64_linux_stopped_data_address)
7391 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7392 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7393 ia64_linux_nat_target methods.
7394 (super_xfer_partial): Delete.
7395 (_initialize_ia64_linux_nat): Adjust to C++ification.
7396
7397 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7398 (the_m32r_linux_nat_target): New.
7399 (m32r_linux_fetch_inferior_registers)
7400 (m32r_linux_store_inferior_registers): Refactor as
7401 m32r_linux_nat_target methods.
7402 (_initialize_m32r_linux_nat): Adjust to C++ification.
7403
7404 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7405 (the_m68k_linux_nat_target): New.
7406 (m68k_linux_fetch_inferior_registers)
7407 (m68k_linux_store_inferior_registers): Refactor as
7408 m68k_linux_nat_target methods.
7409 (_initialize_m68k_linux_nat): Adjust to C++ification.
7410
7411 * s390-linux-nat.c (s390_linux_nat_target): New class.
7412 (the_s390_linux_nat_target): New.
7413 (s390_linux_fetch_inferior_registers)
7414 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7415 (s390_insert_watchpoint, s390_remove_watchpoint)
7416 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7417 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7418 (s390_auxv_parse, s390_read_description): Refactor as methods of
7419 s390_linux_nat_target.
7420 (_initialize_s390_nat): Adjust to C++ification.
7421
7422 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7423 (the_sparc_linux_nat_target): New.
7424 (_initialize_sparc_linux_nat): Adjust to C++ification.
7425 * sparc-nat.c (sparc_fetch_inferior_registers)
7426 (sparc_store_inferior_registers): Remove target_ops parameter.
7427 * sparc-nat.h (sparc_fetch_inferior_registers)
7428 (sparc_store_inferior_registers): Remove target_ops parameter.
7429 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7430 (the_sparc64_linux_nat_target): New.
7431 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7432
7433 * spu-linux-nat.c (spu_linux_nat_target): New class.
7434 (the_spu_linux_nat_target): New.
7435 (spu_child_post_startup_inferior, spu_child_post_attach)
7436 (spu_child_wait, spu_fetch_inferior_registers)
7437 (spu_store_inferior_registers, spu_xfer_partial)
7438 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7439 methods.
7440 (_initialize_spu_nat): Adjust to C++ification.
7441
7442 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7443 (the_tilegx_linux_nat_target): New.
7444 (fetch_inferior_registers, store_inferior_registers):
7445 Refactor as methods.
7446 (_initialize_tile_linux_nat): Adjust to C++ification.
7447
7448 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7449 (the_xtensa_linux_nat_target): New.
7450 (xtensa_linux_fetch_inferior_registers)
7451 (xtensa_linux_store_inferior_registers): Refactor as
7452 xtensa_linux_nat_target methods.
7453 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7454
7455 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7456 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7457 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7458 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7459 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7460 (fbsd_stopped_by_sw_breakpoint)
7461 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7462 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7463 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7464 (fbsd_post_startup_inferior, fbsd_post_attach)
7465 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7466 (fbsd_set_syscall_catchpoint)
7467 (super_xfer_partial, super_resume, super_wait)
7468 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7469 (fbsd_handle_debug_trap): Remove target_ops parameter.
7470 (fbsd_nat_add_target): Delete.
7471 * fbsd-nat.h: Include "inf-ptrace.h".
7472 (fbsd_nat_add_target): Delete.
7473 (USE_SIGTRAP_SIGINFO): Define.
7474 (fbsd_nat_target): New class.
7475
7476 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7477 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7478 (amd64bsd_target): Delete.
7479 * amd64-bsd-nat.h: New file.
7480 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7481 "x86-bsd-nat.h".
7482 (amd64_fbsd_nat_target): New class.
7483 (the_amd64_fbsd_nat_target): New.
7484 (amd64fbsd_read_description): Refactor as method of
7485 amd64_fbsd_nat_target.
7486 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7487 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7488 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7489 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7490 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7491 (i386bsd_target): Delete.
7492 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7493 (i386bsd_fetch_inferior_registers)
7494 (i386bsd_store_inferior_registers): Declare.
7495 (i386_bsd_nat_target): New class.
7496 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7497 (the_i386_fbsd_nat_target): New.
7498 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7499 i386_fbsd_nat_target methods.
7500 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7501 (_initialize_i386fbsd_nat): Adjust to C++ification.
7502 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7503 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7504 (_initialize_x86_bsd_nat): Adjust to C++ification.
7505 * x86-bsd-nat.h: Include "x86-nat.h".
7506 (x86bsd_target): Delete declaration.
7507 (x86bsd_nat_target): New class.
7508
7509 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7510 (the_aarch64_fbsd_nat_target): New.
7511 (aarch64_fbsd_fetch_inferior_registers)
7512 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7513 aarch64_fbsd_nat_target.
7514 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7515 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7516 (the_alpha_bsd_nat_target): New.
7517 (alphabsd_fetch_inferior_registers)
7518 (alphabsd_store_inferior_registers): Refactor as
7519 alpha_bsd_nat_target methods.
7520 (_initialize_alphabsd_nat): Refactor as methods of
7521 alpha_bsd_nat_target.
7522 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7523 (the_amd64_nbsd_nat_target): New.
7524 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7525 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7526 (the_amd64_obsd_nat_target): New.
7527 (_initialize_amd64obsd_nat): Adjust to C++ification.
7528 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7529 (the_arm_fbsd_nat_target): New.
7530 (arm_fbsd_fetch_inferior_registers)
7531 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7532 (_initialize_arm_fbsd_nat): Refactor as methods of
7533 arm_fbsd_nat_target.
7534 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7535 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7536 (the_arm_netbsd_nat_target): New.
7537 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7538 arm_netbsd_nat_target.
7539 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7540 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7541 (the_hppa_nbsd_nat_target): New.
7542 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7543 hppa_nbsd_nat_target methods.
7544 (_initialize_hppanbsd_nat): Adjust to C++ification.
7545 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7546 (the_hppa_obsd_nat_target): New.
7547 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7548 methods of hppa_obsd_nat_target.
7549 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7550 add_target.
7551 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7552 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7553 add_target.
7554 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7555 (_initialize_i386obsd_nat): Use add_target.
7556 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7557 (the_m68k_bsd_nat_target): New.
7558 (m68kbsd_fetch_inferior_registers)
7559 (m68kbsd_store_inferior_registers): Refactor as methods of
7560 m68k_bsd_nat_target.
7561 (_initialize_m68kbsd_nat): Adjust to C++ification.
7562 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7563 (the_mips_fbsd_nat_target): New.
7564 (mips_fbsd_fetch_inferior_registers)
7565 (mips_fbsd_store_inferior_registers): Refactor as methods of
7566 mips_fbsd_nat_target.
7567 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7568 add_target.
7569 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7570 (the_mips_nbsd_nat_target): New.
7571 (mipsnbsd_fetch_inferior_registers)
7572 (mipsnbsd_store_inferior_registers): Refactor as methods of
7573 mips_nbsd_nat_target.
7574 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7575 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7576 (the_mips64_obsd_nat_target): New.
7577 (mips64obsd_fetch_inferior_registers)
7578 (mips64obsd_store_inferior_registers): Refactor as methods of
7579 mips64_obsd_nat_target.
7580 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7581 add_target.
7582 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7583 nbsd_nat_target.
7584 * nbsd-nat.h: Include "inf-ptrace.h".
7585 (nbsd_nat_target): New class.
7586 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7587 (obsd_wait): Refactor as methods of obsd_nat_target.
7588 (obsd_add_target): Delete.
7589 * obsd-nat.h: Include "inf-ptrace.h".
7590 (obsd_nat_target): New class.
7591 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7592 (the_ppc_fbsd_nat_target): New.
7593 (ppcfbsd_fetch_inferior_registers)
7594 (ppcfbsd_store_inferior_registers): Refactor as methods of
7595 ppc_fbsd_nat_target.
7596 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7597 add_target.
7598 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7599 (the_ppc_nbsd_nat_target): New.
7600 (ppcnbsd_fetch_inferior_registers)
7601 (ppcnbsd_store_inferior_registers): Refactor as methods of
7602 ppc_nbsd_nat_target.
7603 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7604 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7605 (the_ppc_obsd_nat_target): New.
7606 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7607 methods of ppc_obsd_nat_target.
7608 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7609 add_target.
7610 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7611 (the_sh_nbsd_nat_target): New.
7612 (shnbsd_fetch_inferior_registers)
7613 (shnbsd_store_inferior_registers): Refactor as methods of
7614 sh_nbsd_nat_target.
7615 (_initialize_shnbsd_nat): Adjust to C++ification.
7616 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7617 (inf_ptrace_xfer_partial): Delete.
7618 (sparc_xfer_partial, sparc_target): Delete.
7619 * sparc-nat.h (sparc_fetch_inferior_registers)
7620 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7621 (sparc_target): Delete function declaration.
7622 (sparc_target): New template class.
7623 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7624 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7625 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7626 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7627 add_target.
7628 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7629 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7630 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7631 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7632 add_target.
7633 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7634 (the_vax_bsd_nat_target): New.
7635 (vaxbsd_fetch_inferior_registers)
7636 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7637 methods.
7638 (_initialize_vaxbsd_nat): Adjust to C++ification.
7639
7640 * bsd-kvm.c (bsd_kvm_target): New class.
7641 (bsd_kvm_ops): Now a bsd_kvm_target.
7642 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7643 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7644 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7645 bsd_kvm_target.
7646 (bsd_kvm_return_one): Delete.
7647 (bsd_kvm_add_target): Adjust to C++ification.
7648
7649 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7650 (nto_procfs_target_procfs): New classes.
7651 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7652 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7653 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7654 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7655 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7656 (procfs_remove_hw_breakpoint, procfs_resume)
7657 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7658 (procfs_kill_inferior, procfs_store_registers)
7659 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7660 as methods of nto_procfs_target.
7661 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7662 (nto_native_ops): Delete.
7663 (procfs_open, procfs_native_open): Delete.
7664 (nto_native_ops): Now an nto_procfs_target_native.
7665 (init_procfs_targets): Adjust to C++ification.
7666 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7667 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7668 Refactor as methods of nto_procfs_target.
7669
7670 * go32-nat.c (go32_nat_target): New class.
7671 (the_go32_nat_target): New.
7672 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7673 (go32_store_registers, go32_xfer_partial, go32_files_info)
7674 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7675 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7676 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7677 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7678 (go32_target): Delete.
7679 (_initialize_go32_nat): Adjust to C++ification.
7680
7681 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7682 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7683 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7684 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7685 gnu_nat_target.
7686 (gnu_target): Delete.
7687 * gnu-nat.h (gnu_target): Delete.
7688 (gnu_nat_target): New class.
7689 * i386-gnu-nat.c (gnu_base_target): New.
7690 (i386_gnu_nat_target): New class.
7691 (the_i386_gnu_nat_target): New.
7692 (_initialize_i386gnu_nat): Adjust to C++ification.
7693
7694 2018-05-02 Pedro Alves <palves@redhat.com>
7695
7696 * bfd-target.c (target_bfd_xclose): Rename to ...
7697 (target_bfd_close): ... this.
7698 (target_bfd_reopen): Adjust.
7699 * target.c (target_close): Remove references to to_xclose.
7700 * target.h (target_ops::to_xclose): Delete.
7701 (target_ops::to_close): Update comments.
7702
7703 2018-05-02 Pedro Alves <palves@redhat.com>
7704
7705 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7706 "linux-nat.h".
7707 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7708 * inf-ptrace.c (inf_ptrace_register_u_offset)
7709 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7710 (inf_ptrace_store_register, inf_ptrace_store_registers)
7711 (inf_ptrace_trad_target): Move to ...
7712 * linux-nat-trad.c: ... this new file.
7713 * linux-nat-trad.h: New file.
7714 * linux-nat.c (linux_target_install_ops): Make extern.
7715 (linux_trad_target): Delete.
7716 * linux-nat.h (linux_trad_target): Delete declaration.
7717 (linux_target_install_ops): Declare.
7718 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7719 "linux-nat.h".
7720
7721 2018-05-02 Pedro Alves <palves@redhat.com>
7722
7723 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7724 procfs_target/add_target here.
7725 * procfs.c (procfs_target): Make static.
7726 (_initialize_procfs): Call add_target here.
7727 * procfs.h (struct target_ops): Remove forward declaration.
7728 (procfs_target): Remove declaration.
7729 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7730
7731 2018-05-02 Pedro Alves <palves@redhat.com>
7732
7733 * procfs.c (procfs_stopped_by_watchpoint)
7734 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7735 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7736 Forward declare.
7737 (procfs_use_watchpoints): Delete, move contents...
7738 (procfs_target): ... here.
7739 * procfs.h (procfs_use_watchpoints): Delete declaration.
7740 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7741 procfs_use_watchpoints.
7742 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7743 procfs_use_watchpoints.
7744
7745 2018-05-02 Tom Tromey <tom@tromey.com>
7746
7747 PR python/20084:
7748 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7749 and var_zuinteger_unlimited.
7750 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7751 and PARAM_ZUINTEGER_UNLIMITED.
7752 (set_parameter_value): Handle var_zuinteger and
7753 var_zuinteger_unlimited.
7754 (add_setshow_generic): Likewise.
7755 (parmpy_init): Likewise.
7756
7757 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7758
7759 PR rust/23124
7760 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7761 pointer is not null before dereferencing it.
7762
7763 2018-04-30 Tom Tromey <tom@tromey.com>
7764
7765 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7766 is_mi_like_p.
7767
7768 2018-04-30 Tom Tromey <tom@tromey.com>
7769
7770 * breakpoint.c (mention): Remove use of is_mi_like_p.
7771 (print_mention_ranged_breakpoint): Likewise.
7772 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7773 of is_mi_like_p.
7774
7775 2018-04-30 Tom Tromey <tom@tromey.com>
7776
7777 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7778
7779 2018-04-30 Tom Tromey <tom@tromey.com>
7780
7781 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7782 (info_spu_event_command): Remove some uses of is_mi_like_p.
7783
7784 2018-04-30 Tom Tromey <tom@tromey.com>
7785
7786 * python/py-framefilter.c (py_print_single_arg)
7787 (enumerate_locals, py_print_args, py_print_frame): Remove some
7788 uses of is_mi_like_p.
7789
7790 2018-04-30 Tom Tromey <tom@tromey.com>
7791
7792 * ui-out.c: Update.
7793 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7794 * ui-out.h (ui_out::is_mi_like_p): Now const.
7795 (ui_out::do_is_mi_like_p): Now const.
7796 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7797
7798 2018-04-30 Tom Tromey <tom@tromey.com>
7799
7800 * varobj.c (varobj_set_visualizer): Use new_reference.
7801 * python/python.c (gdbpy_decode_line): Use new_reference.
7802 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7803 new_reference.
7804
7805 2018-04-30 Tom Tromey <tom@tromey.com>
7806
7807 * varobj.c (install_new_value): Use new_reference.
7808 * value.h (value_incref): Return void. Swap intro comment with
7809 value_decref.
7810 * value.c (set_value_parent): Use new_reference.
7811 (value_incref): Return void. Update intro comment.
7812 (release_value): Use new_reference.
7813 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7814
7815 2018-04-30 Tom Tromey <tom@tromey.com>
7816
7817 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7818 * gdb_bfd.h (new_bfd_ref): Remove.
7819 (gdb_bfd_open): Update comment.
7820 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7821 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7822 (gdb_bfd_fdopenr): Use new_reference.
7823 * exec.c (exec_file_attach): Use new_reference.
7824
7825 2018-04-30 Tom Tromey <tom@tromey.com>
7826
7827 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7828 method.
7829
7830 2018-04-30 Tom Tromey <tom@tromey.com>
7831
7832 * jit.c (jit_read_code_entry): Use type_align.
7833 * i386-tdep.c (i386_gdbarch_init): Don't call
7834 set_gdbarch_long_long_align_bit.
7835 * gdbarch.sh: Remove long_long_align_bit.
7836 * gdbarch.c, gdbarch.h: Rebuild.
7837 * arc-tdep.c (arc_type_align): New function.
7838 (arc_gdbarch_init): Use arc_type_align. Don't call
7839 set_gdbarch_long_long_align_bit.
7840
7841 2018-04-30 Tom Tromey <tom@tromey.com>
7842
7843 * rust-lang.c (rust_type_alignment): Remove.
7844 (rust_composite_type): Use type_align.
7845
7846 2018-04-30 Tom Tromey <tom@tromey.com>
7847
7848 * NEWS: Mention Type.align.
7849 * python/py-type.c (typy_get_alignof): New function.
7850 (type_object_getset): Add "alignof".
7851
7852 2018-04-30 Tom Tromey <tom@tromey.com>
7853
7854 PR exp/17095:
7855 * NEWS: Update.
7856 * std-operator.def (UNOP_ALIGNOF): New operator.
7857 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7858 New.
7859 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7860 * c-lang.c (c_op_print_tab): Add alignof.
7861 * c-exp.y (ALIGNOF): New token.
7862 (exp): Add "ALIGNOF" production.
7863 (ident_tokens): Add _Alignof and alignof.
7864
7865 2018-04-30 Tom Tromey <tom@tromey.com>
7866
7867 * i386-tdep.c (i386_type_align): New function.
7868 (i386_gdbarch_init): Update.
7869 * gdbarch.sh (type_align): New method.
7870 * gdbarch.c, gdbarch.h: Rebuild.
7871 * arch-utils.h (default_type_align): Declare.
7872 * arch-utils.c (default_type_align): New function.
7873 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7874 (struct type) <align_log2>: New field.
7875 <instance_flags>: Now a bitfield.
7876 (TYPE_RAW_ALIGN): New macro.
7877 (type_align, type_raw_align, set_type_align): Declare.
7878 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7879 functions.
7880 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7881 (get_alignment, maybe_set_alignment): New functions.
7882 (read_structure_type, read_enumeration_type, read_array_type)
7883 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7884 (read_subrange_type, read_base_type): Set type alignment.
7885
7886 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7887
7888 * dwarf2read.c (read_index_from_section): Use bool.
7889
7890 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7891
7892 PR gdb/22950
7893 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7894 with #ifdef.
7895
7896 2018-04-29 John Reiser <jreiser@BitWagon.com>
7897
7898 PR build/22873
7899 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7900 last step, and do it atomically.
7901
7902 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7903
7904 * compile/compile-c-types.c (convert_int, convert_float):
7905 Update for C FE v1.
7906
7907 2018-04-27 Tom Tromey <tom@tromey.com>
7908
7909 PR rust/22545:
7910 * rust-lang.c (rust_inclusive_range_type_p): New function.
7911 (rust_range): Handle inclusive ranges.
7912 (rust_compute_range): Likewise.
7913 * rust-exp.y (struct rust_op) <inclusive>: New field.
7914 (DOTDOTEQ): New constant.
7915 (range_expr): Add "..=" productions.
7916 (operator_tokens): Add "..=" token.
7917 (ast_range): Add "inclusive" parameter.
7918 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7919 ranges.
7920 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7921 bounds values.
7922 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7923 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7924 Update comments.
7925 * expprint.c (print_subexp_standard): Handle new bounds values.
7926 (dump_subexp_body_standard): Likewise.
7927
7928 2018-04-27 Tom Tromey <tom@tromey.com>
7929
7930 * configure: Rebuild.
7931 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7932 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7933 "OVERRIDE".
7934 (class symbol_needs_eval_context): Likewise.
7935 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7936 (mock_mapped_index::symbol_name_at): Use "override". Remove
7937 "virtual".
7938 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7939 "override".
7940 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7941 * aarch64-tdep.c (instruction_reader::read): Use "override".
7942 (instruction_reader_test::read): Likewise.
7943 * arm-tdep.c (instruction_reader::read): Use "override".
7944 (instruction_reader_thumb::read): Likewise.
7945
7946 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7947
7948 PR remote/9665
7949 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7950 instead of remote_send.
7951 (remote_send): Remove.
7952
7953 2018-04-26 Pedro Alves <palves@redhat.com>
7954
7955 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7956 find_function_start_sal instead of find_pc_line.
7957
7958 2018-04-26 Pedro Alves <palves@redhat.com>
7959
7960 * breakpoint.c (set_breakpoint_location_function): Handle
7961 mst_data_gnu_ifunc.
7962 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7963 * elfread.c (elf_symtab_read): Give data symbols with
7964 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7965 (elf_rel_plt_read): Update comment.
7966 * linespec.c (convert_linespec_to_sals): Handle
7967 mst_data_gnu_ifunc.
7968 (minsym_found): Handle mst_data_gnu_ifunc.
7969 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7970 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7971 * parse.c (find_minsym_type_and_address): Handle
7972 mst_data_gnu_ifunc.
7973 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7974 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7975 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7976 comment.
7977 <mst_data_gnu_ifunc>: New enumerator.
7978
7979 2018-04-26 Pedro Alves <palves@redhat.com>
7980
7981 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7982 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7983 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7984 Handle it.
7985 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7986 (lookup_minimal_symbol_by_pc): Adjust.
7987 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7988 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7989 * minsyms.h (lookup_msym_prefer): New enum.
7990 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7991 parameter by a lookup_msym_prefer parameter.
7992
7993 2018-04-26 Pedro Alves <palves@redhat.com>
7994
7995 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7996 ends in "@plt" instead of looking at the symbol's section.
7997
7998 2018-04-26 Pedro Alves <palves@redhat.com>
7999
8000 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8001 all references.
8002 (find_pc_partial_function_gnu_ifunc): Rename to ...
8003 (find_pc_partial_function): ... this, and remove references to
8004 'is_gnu_ifunc_p'.
8005 (find_pc_partial_function): Delete old implementation.
8006 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8007
8008 2018-04-26 Pedro Alves <palves@redhat.com>
8009
8010 * linespec.c (struct bound_minimal_symbol_search_key): New.
8011 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8012 skip first line if we found a GNU ifunc minimal symbol by name.
8013 (compare_msymbols): Change parameters to work with a destructured
8014 lhs minsym.
8015 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8016 functions.
8017
8018 2018-04-26 Pedro Alves <palves@redhat.com>
8019
8020 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8021 ifunc targets here. Instead, if we have an ifunc minsym, use its
8022 address/name.
8023 (add_location_to_breakpoint): Store the minsym and the objfile in
8024 the breakpoint location.
8025 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8026 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8027 Record the minsym in the sal.
8028 * symtab.h (symtab_and_line) <msymbol>: New field.
8029
8030 2018-04-26 Pedro Alves <palves@redhat.com>
8031
8032 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8033 unless we actually resolved the ifunc.
8034
8035 2018-04-26 Pedro Alves <palves@redhat.com>
8036
8037 * c-exp.y (variable production): Prefer ifunc minsyms over
8038 regular function symbols.
8039 * symtab.c (find_gnu_ifunc): New function.
8040 * minsyms.h (lookup_msym_prefer): New enum.
8041 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8042 parameter by a lookup_msym_prefer parameter.
8043 * symtab.h (find_gnu_ifunc): New declaration.
8044
8045 2018-04-26 Pedro Alves <palves@redhat.com>
8046
8047 * blockframe.c (find_gnu_ifunc_target_type): New function.
8048 (find_function_type): New.
8049 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8050 return a value with a memory address.
8051 (eval_call): For calls to GNU ifunc functions, try to find the
8052 type of the target function from the type that the resolver
8053 returns.
8054 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8055 symbols.
8056 * infcall.c (find_function_return_type): Delete.
8057 (find_function_addr): Add 'function_type' parameter. For calls to
8058 GNU ifunc functions, try to find the type of the target function
8059 from the type that the resolver returns, and return it via
8060 FUNCTION_TYPE.
8061 (call_function_by_hand_dummy): Adjust to use the function type
8062 returned by find_function_addr.
8063 (find_function_addr): Add 'function_type' parameter and move
8064 description here.
8065 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8066 declarations.
8067
8068 2018-04-26 Pedro Alves <palves@redhat.com>
8069
8070 * c-exp.y (variable production): Skip finding an alias for ifunc
8071 symbols.
8072
8073 2018-04-26 Pedro Alves <palves@redhat.com>
8074
8075 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8076
8077 2018-04-25 Pedro Alves <palves@redhat.com>
8078
8079 * infcmd.c (kill_command): Print the pid as string, not the whole
8080 thread's ptid. Add comment. s/has been killed/killed/ in output
8081 message.
8082 * remote.c (remote_detach_1): Print the pid as string, not the
8083 whole thread's ptid.
8084
8085 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8086 Sergio Durigan Junior <sergiodj@redhat.com>
8087 Pedro Alves <palves@redhat.com>
8088
8089 * infcmd.c (kill_command): Print message when inferior has
8090 been killed.
8091 * inferior.c (print_inferior_events): Remove 'static'. Set as
8092 '1'.
8093 (add_inferior): Improve message printed when
8094 'print_inferior_events' is on.
8095 (exit_inferior): Remove message printed when
8096 'print_inferior_events' is on.
8097 (detach_inferior): Improve message printed when
8098 'print_inferior_events' is on.
8099 (initialize_inferiors): Use 'add_inferior_silent' to set
8100 'current_inferior_'.
8101 * inferior.h (print_inferior_events): Declare here as
8102 'extern'.
8103 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8104 '[Detaching...]' messages when 'print_inferior_events' is on.
8105 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8106 as prefix/suffix for messages. Remove periods. Fix erroneous
8107 'Detaching after fork from child...', replace it by '... from
8108 parent...'.
8109 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8110 prefix/suffix when printing 'Detaching...' messages. Print
8111 them when 'print_inferior_events' is on.
8112 * remote.c (remote_detach_1): Print message when detaching
8113 from inferior and '!is_fork_parent'.
8114
8115 2018-04-24 Tom Tromey <tom@tromey.com>
8116
8117 * cli-out.h: Reindent.
8118
8119 2018-04-24 Tom Tromey <tom@tromey.com>
8120
8121 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8122 (cli_ui_out::do_field_string): Use fputs_filtered.
8123 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8124
8125 2018-04-23 Tom Tromey <tom@tromey.com>
8126
8127 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8128 gdb::unique_xmalloc_ptr.
8129
8130 2018-04-23 Tom Tromey <tom@tromey.com>
8131
8132 * configure: Rebuild.
8133
8134 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8135
8136 PR gdb/23095
8137 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8138 prepare_for_testing. Set normal_bp to r_debug_state if target
8139 is bsd.
8140
8141 2018-04-21 Pedro Alves <palves@redhat.com>
8142 Rajendra SY <rajendra.sy@gmail.com>
8143
8144 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8145 * remote.c (extended_remote_attach): In all-stop mode, mark the
8146 thread as executing.
8147
8148 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8149
8150 * thread.c (thread_apply_all_command): Fix comment.
8151 (thread_command): Fix comment.
8152
8153 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8154
8155 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8156 parameter.
8157 * features/aarch64-core.c (create_feature_aarch64_core):
8158 Regenerate.
8159 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8160 Likewise.
8161 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8162 Likewise.
8163 * features/i386/32bit-avx512.c
8164 (create_feature_i386_32bit_avx512): Likewise.
8165 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8166 Likewise.
8167 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8168 Likewise.
8169 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8170 Likewise.
8171 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8172 Likewise.
8173 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8174 Likewise.
8175 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8176 Likewise.
8177 * features/i386/64bit-avx512.c
8178 (create_feature_i386_64bit_avx512): Likewise.
8179 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8180 Likewise.
8181 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8182 Likewise.
8183 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8184 Likewise.
8185 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8186 Likewise.
8187 * features/i386/64bit-segments.c
8188 (create_feature_i386_64bit_segments): Likewise.
8189 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8190 Likewise.
8191 * features/i386/x32-core.c
8192 (create_feature_i386_x32_core): Likewise.
8193 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8194 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8195 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8196 * target-descriptions.c: In generated code, don't pass xml
8197 filename.
8198
8199 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8200
8201 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8202 (print_xml_feature::visit_post): Likewise.
8203 (print_xml_feature::visit): Likewise.
8204 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8205 (print_xml_feature): Add new class.
8206 * regformats/regdat.sh: Null xmltarget on feature targets.
8207 * target-descriptions.c (struct target_desc): Add xmltarget.
8208 (maintenance_check_tdesc_xml_convert): Add unittest function.
8209 (tdesc_get_features_xml): Add function to get xml.
8210 (maintenance_check_xml_descriptions): Test xml generation.
8211 * xml-tdesc.c (string_read_description_xml): Add function.
8212 * xml-tdesc.h (string_read_description_xml): Add declaration.
8213
8214 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8215
8216 * features/Makefile: Add feature marker to targets with new style
8217 target descriptions.
8218 * regformats/aarch64.dat: Regenerate.
8219 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8220 * regformats/i386/amd64-avx-linux.dat: Likewise.
8221 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8222 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8223 * regformats/i386/amd64-linux.dat: Likewise.
8224 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8225 * regformats/i386/amd64.dat: Likewise.
8226 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8227 * regformats/i386/i386-avx-linux.dat: Likewise.
8228 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8229 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8230 * regformats/i386/i386-linux.dat: Likewise.
8231 * regformats/i386/i386-mmx-linux.dat: Likewise.
8232 * regformats/i386/i386-mpx-linux.dat: Likewise.
8233 * regformats/i386/i386.dat: Likewise.
8234 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8235 * regformats/i386/x32-avx-linux.dat: Likewise.
8236 * regformats/i386/x32-linux.dat: Likewise.
8237 * regformats/tic6x-c62x-linux.dat: Likewise.
8238 * regformats/tic6x-c64x-linux.dat: Likewise.
8239 * regformats/tic6x-c64xp-linux.dat: Likewise.
8240 * regformats/regdat.sh: Parse feature marker.
8241
8242 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8243
8244 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8245 (tdesc_osabi_name): Likewise.
8246 * target-descriptions.c (tdesc_architecture_name): Add new
8247 function.
8248 (tdesc_osabi_name): Likewise.
8249
8250 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8251
8252 * common/tdesc.c (tdesc_predefined_type): Move to here.
8253 (tdesc_named_type): Likewise.
8254 (tdesc_create_vector): Likewise.
8255 (tdesc_create_struct): Likewise.
8256 (tdesc_set_struct_size): Likewise.
8257 (tdesc_create_union): Likewise.
8258 (tdesc_create_flags): Likewise.
8259 (tdesc_create_enum): Likewise.
8260 (tdesc_add_field): Likewise.
8261 (tdesc_add_typed_bitfield): Likewise.
8262 (tdesc_add_bitfield): Likewise.
8263 (tdesc_add_flag): Likewise.
8264 (tdesc_add_enum_value): Likewise.
8265 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8266 (struct tdesc_type_vector): Likewise.
8267 (struct tdesc_type_field): Likewise.
8268 (struct tdesc_type_with_fields): Likewise.
8269 (tdesc_create_enum): Add declaration.
8270 (tdesc_add_typed_bitfield): Likewise.
8271 (tdesc_add_enum_value): Likewise.
8272 * target-descriptions.c (tdesc_type_field): Move from here.
8273 (tdesc_type_builtin): Likewise.
8274 (tdesc_type_vector): Likewise.
8275 (tdesc_type_with_fields): Likewise.
8276 (tdesc_predefined_types): Likewise.
8277 (tdesc_named_type): Likewise.
8278 (tdesc_create_vector): Likewise.
8279 (tdesc_create_struct): Likewise.
8280 (tdesc_set_struct_size): Likewise.
8281 (tdesc_create_union): Likewise.
8282 (tdesc_create_flags): Likewise.
8283 (tdesc_create_enum): Likewise.
8284 (tdesc_add_field): Likewise.
8285 (tdesc_add_typed_bitfield): Likewise.
8286 (tdesc_add_bitfield): Likewise.
8287 (tdesc_add_flag): Likewise.
8288 (tdesc_add_enum_value): Likewise.
8289 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8290 (tdesc_add_typed_bitfield): Likewise.
8291 (tdesc_add_enum_value): Likewise.
8292
8293 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8294
8295 * common/tdesc.c (tdesc_feature::accept): Move to here.
8296 (tdesc_feature::operator==): Likewise.
8297 (tdesc_create_reg): Likewise.
8298 * common/tdesc.h (tdesc_type_kind): Likewise.
8299 (struct tdesc_type): Likewise.
8300 (struct tdesc_feature): Likewise.
8301 * regformats/regdat.sh: Create a feature.
8302 * target-descriptions.c (tdesc_type_kind): Move from here.
8303 (tdesc_type): Likewise.
8304 (tdesc_type_up): Likewise.
8305 (tdesc_feature): Likewise.
8306 (tdesc_create_reg): Likewise.
8307
8308 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8309
8310 * Makefile.in: Add arch/tdesc.c
8311 * common/tdesc.c: New file.
8312 * common/tdesc.h (tdesc_element_visitor): Move to here.
8313 (tdesc_element): Likewise.
8314 (tdesc_reg): Likewise.
8315 (tdesc_reg_up): Likewise.
8316 * regformats/regdef.h (reg): Add offset to constructors.
8317 * target-descriptions.c (tdesc_element_visitor): Move from here.
8318 (tdesc_element): Likewise.
8319 (tdesc_reg): Likewise.
8320 (tdesc_reg_up): Likewise.
8321
8322 2018-04-17 Tom Tromey <tom@tromey.com>
8323
8324 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8325 discriminant field.
8326
8327 2018-04-17 Tom Tromey <tom@tromey.com>
8328
8329 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8330
8331 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8332
8333 * symtab.c (print_symbol_info): Skip printing filename and line
8334 number when `last' is NULL.
8335 (symtab_symbol_info): Use empty string instead of NULL for first
8336 invocation of print_symbol_info.
8337 (rbreak_command): Pass NULL to `last' parameter of
8338 print_symbol_info.
8339
8340 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8341
8342 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8343 instead of nullptr.
8344
8345 2018-04-16 Pedro Alves <palves@redhat.com>
8346
8347 * MAINTAINERS (sh): Remove.
8348 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8349 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8350 (ALLDEPFILES): Remove sh64-tdep.c.
8351 * NEWS: Mentions that support for SH-5/SH64 is removed.
8352 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8353 (sh*-*-openbsd*): Ditto.
8354 (sh64-*-elf*): Remove.
8355 (sh*): Remove.
8356 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8357 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8358 * sh-tdep.c: No longer include "sh64-tdep.h".
8359 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8360 * sh64-tdep.c, sh64-tdep.h: Remove files.
8361
8362 2018-04-16 Pedro Alves <palves@redhat.com>
8363
8364 * MAINTAINERS: Remove m88k.
8365 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8366 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8367 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8368 * NEWS: Mention that support for m88k was removed.
8369 * configure.host (m88*-*-*): Remove support.
8370 * configure.nat (m88k-*-*): Remove support.
8371 * configure.tgt (m88*-*-openbsd*): Remove.
8372 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8373
8374 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8375
8376 * configure.tgt (x86_tobjs): New variable.
8377 (amd64_tobjs, i386_tobjs): Use it.
8378
8379 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8380
8381 * symtab.c (print_symbol_info): Precede the symbol definition by
8382 the line number when available.
8383 * NEWS: Advertise this enhancement.
8384
8385 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8386
8387 * NEWS (New options): announce set/show record btrace cpu.
8388 * btrace.c: Include record-btrace.h.
8389 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8390 the vendor is unknown.
8391 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8392 Maybe overwrite the btrace configuration's cpu.
8393 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8394 (btrace_fetch): Add cpu parameter. Update callers.
8395 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8396 Maybe overwrite the btrace configuration's cpu. Skip enabling
8397 errata workarounds if the vendor is unknown.
8398 * python/py-record-btrace.c: Include record-btrace.h.
8399 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8400 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8401 * record-btrace.c (record_btrace_cpu_state_kind): New.
8402 (record_btrace_cpu): New.
8403 (set_record_btrace_cpu_cmdlist): New.
8404 (record_btrace_get_cpu): New.
8405 (require_btrace_thread, record_btrace_info)
8406 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8407 (cmd_set_record_btrace_cpu_none): New.
8408 (cmd_set_record_btrace_cpu_auto): New.
8409 (cmd_set_record_btrace_cpu): New.
8410 (cmd_show_record_btrace_cpu): New.
8411 (_initialize_record_btrace): Initialize set/show record btrace cpu
8412 commands.
8413 * record-btrace.h (record_btrace_get_cpu): New.
8414
8415 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8416
8417 * record.c (set_record_command): Fix typo in message.
8418
8419 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8420
8421 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8422
8423 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8424
8425 * infrun.c (process_event_stop_test): Call
8426 gdbarch_in_indirect_branch_thunk.
8427 * gdbarch.sh (in_indirect_branch_thunk): New.
8428 * gdbarch.c: Regenerated.
8429 * gdbarch.h: Regenerated.
8430 * x86-tdep.h: New.
8431 * x86-tdep.c: New.
8432 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8433 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8434 (ALLDEPFILES): Add x86-tdep.c.
8435 * arch-utils.h (default_in_indirect_branch_thunk): New.
8436 * arch-utils.c (default_in_indirect_branch_thunk): New.
8437 * i386-tdep: Include x86-tdep.h.
8438 (i386_in_indirect_branch_thunk): New.
8439 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8440 function.
8441 * amd64-tdep: Include x86-tdep.h.
8442 (amd64_in_indirect_branch_thunk): New.
8443 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8444
8445 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8446
8447 PR gdb/23053
8448 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8449 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8450 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8451 regression.
8452
8453 2018-04-12 Tom Tromey <tom@tromey.com>
8454
8455 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8456 (rust_evaluate_subexp): Likewise.
8457
8458 2018-04-12 Pedro Alves <palves@redhat.com>
8459
8460 * procfs.c (procfs_detach): Make forward declaration's prototype
8461 match definition's protototype.
8462 (proc_get_LDT_entry): Remove stale do_cleanups call.
8463
8464 2018-04-12 Pedro Alves <palves@redhat.com>
8465
8466 * target.h (target_ops::to_has_exited): Delete.
8467 (target_has_exited): Delete.
8468 * target-delegates.c: Regenerate.
8469
8470 2018-04-11 Pedro Alves <palves@redhat.com>
8471
8472 * target.c (fileio_fh_t::t): Add comment.
8473 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8474 (target_fileio_close): Handle a NULL target.
8475 (invalidate_fileio_fh): New.
8476 (target_close): Call it.
8477 * remote.c (remote_hostio_send_command): No longer check whether
8478 remote_desc is open.
8479
8480 2018-04-11 Pedro Alves <palves@redhat.com>
8481
8482 * target.c (fileio_fh_t): Make it a named struct instead of a
8483 typedef.
8484 (fileio_fh_t::is_closed): New method.
8485 (DEF_VEC_O (fileio_fh_t)): Remove.
8486 (fileio_fhandles): Now a std::vector.
8487 (is_closed_fileio_fh): Delete.
8488 (acquire_fileio_fd): Adjust. Rename parameters.
8489 (release_fileio_fd): Adjust.
8490 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8491 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8492 (target_fileio_close): Adjust.
8493
8494 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8495
8496 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8497 index.
8498
8499 2018-04-10 Pedro Alves <palves@redhat.com>
8500
8501 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8502 (scoped_finish_thread_state): New class.
8503 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8504 cleanup.
8505 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8506 (fetch_inferior_event, normal_stop): Likewise.
8507 * thread.c (finish_thread_state_cleanup): Delete.
8508
8509 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8510 Pedro Alves <palves@redhat.com>
8511
8512 * value.c: Include "selftest.h" and "common/array-view.h".
8513 (struct range) <operator ==>: New.
8514 (test_ranges_contain): New.
8515 (check_ranges_vector): New.
8516 (test_insert_into_bit_range_vector): New.
8517 (_initialize_values): Register selftests.
8518 * common/array-view.h (operator==, operator!=): New.
8519
8520 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8521
8522 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8523 an iterator.
8524 * inline-frame.c: Include <algorithm>.
8525 (struct inline_state): Add constructor.
8526 (inline_state_s): Remove.
8527 (DEF_VEC_O(inline_state_s)): Remove.
8528 (inline_states): Change type to std::vector.
8529 (find_inline_frame_state): Adjust to std::vector.
8530 (allocate_inline_frame_state): Remove.
8531 (clear_inline_frame_state): Adjust to std::vector.
8532 (skip_inline_frames): Adjust to std::vector.
8533
8534 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8535
8536 * tracepoint.h (struct trace_state_variable): Add constructor.
8537 <name>: Change type to std::string.
8538 * tracepoint.c (tsv_s): Remove.
8539 (DEF_VEC_O(tsv_s)): Remove.
8540 (tvariables): Change to std::vector.
8541 (create_trace_state_variable): Adjust to std::vector.
8542 (find_trace_state_variable): Likewise.
8543 (find_trace_state_variable_by_number): Likewise.
8544 (delete_trace_state_variable): Likewise.
8545 (trace_variable_command): Adjust to std::string.
8546 (delete_trace_variable_command): Likewise.
8547 (tvariables_info_1): Adjust to std::vector.
8548 (save_trace_state_variables): Likewise.
8549 (start_tracing): Likewise.
8550 (merge_uploaded_trace_state_variables): Adjust to std::vector
8551 and std::string.
8552 * target.h (struct target_ops)
8553 <to_download_trace_state_variable>: Pass reference to
8554 trace_state_variable.
8555 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8556 * target-delegates.c: Re-generate.
8557 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8558 (mi_tsv_deleted): Likewise.
8559 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8560 * remote.c (remote_download_trace_state_variable): Change
8561 pointer to reference and adjust.
8562 * make-target-delegates (parse_argtypes): Handle references.
8563 (write_function_header): Likewise.
8564 (munge_type): Likewise.
8565
8566 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8567
8568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8569 string_view-selftests.c.
8570 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8571 testsuite.
8572 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8573 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8574 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8575 * unittests/basic_string_view/element_access/char/1.cc:
8576 Likewise.
8577 * unittests/basic_string_view/element_access/char/empty.cc:
8578 Likewise.
8579 * unittests/basic_string_view/element_access/char/front_back.cc:
8580 Likewise.
8581 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8582 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8583 Likewise.
8584 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8585 Likewise.
8586 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8587 Likewise.
8588 * unittests/basic_string_view/operations/compare/char/1.cc:
8589 Likewise.
8590 * unittests/basic_string_view/operations/compare/char/13650.cc:
8591 Likewise.
8592 * unittests/basic_string_view/operations/copy/char/1.cc:
8593 Likewise.
8594 * unittests/basic_string_view/operations/data/char/1.cc:
8595 Likewise.
8596 * unittests/basic_string_view/operations/find/char/1.cc:
8597 Likewise.
8598 * unittests/basic_string_view/operations/find/char/2.cc:
8599 Likewise.
8600 * unittests/basic_string_view/operations/find/char/3.cc:
8601 Likewise.
8602 * unittests/basic_string_view/operations/find/char/4.cc:
8603 Likewise.
8604 * unittests/basic_string_view/operations/rfind/char/1.cc:
8605 Likewise.
8606 * unittests/basic_string_view/operations/rfind/char/2.cc:
8607 Likewise.
8608 * unittests/basic_string_view/operations/rfind/char/3.cc:
8609 Likewise.
8610 * unittests/basic_string_view/operations/substr/char/1.cc:
8611 Likewise.
8612 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8613 * unittests/string_view-selftests.c: New file.
8614
8615 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8616
8617 * unittests/basic_string_view/capacity/1.cc: New file.
8618 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8619 * unittests/basic_string_view/cons/char/1.cc: New file.
8620 * unittests/basic_string_view/cons/char/2.cc: New file.
8621 * unittests/basic_string_view/cons/char/3.cc: New file.
8622 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8623 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8624 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8625 * unittests/basic_string_view/element_access/char/1.cc: New file.
8626 * unittests/basic_string_view/element_access/char/2.cc: New file.
8627 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8628 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8629 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8630 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8631 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8632 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8633 * unittests/basic_string_view/include.cc: New file.
8634 * unittests/basic_string_view/inserters/char/1.cc: New file.
8635 * unittests/basic_string_view/inserters/char/2.cc: New file.
8636 * unittests/basic_string_view/inserters/char/3.cc: New file.
8637 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8638 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8639 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8640 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8641 * unittests/basic_string_view/literals/types.cc: New file.
8642 * unittests/basic_string_view/literals/values.cc: New file.
8643 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8644 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8645 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8646 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8647 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8648 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8649 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8650 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8651 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8652 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8653 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8654 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8655 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8656 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8657 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8658 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8659 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8660 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8661 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8662 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8663 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8664 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8665 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8666 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8667 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8668 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8669 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8670 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8671 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8672 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8673 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8674 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8675 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8676 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8677 * unittests/basic_string_view/operators/char/2.cc: New file.
8678 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8679 * unittests/basic_string_view/range_access/char/1.cc: New file.
8680 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8681 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8682 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8683 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8684 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8685 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8686 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8687 * unittests/basic_string_view/typedefs.cc: New file.
8688 * unittests/basic_string_view/types/1.cc: New file.
8689
8690 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8691
8692 * common/gdb_string_view.h: Remove libstdc++ implementation
8693 details, adjust to gdb reality.
8694 * common/gdb_string_view.tcc: Likewise.
8695 * cli/cli-script.c (struct string_view): Remove.
8696 (user_args) <m_args>: Change element type to gdb::string_view.
8697 (user_args::insert_args): Adjust.
8698
8699 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8700
8701 * common/gdb_string_view.h: New file.
8702 * common/gdb_string_view.tcc: New file.
8703
8704 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8705
8706 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8707 * configure: Re-generate.
8708
8709 2018-04-09 Pedro Alves <palves@redhat.com>
8710
8711 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8712 (set_target_gdbarch): Call
8713 gdb::observers::architecture_changed.notify instead of
8714 observer_notify_architecture_changed.
8715
8716 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8717
8718 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8719 (do_restore_current_traceframe_cleanup): Remove.
8720 (restore_current_traceframe_cleanup_dtor): Remove.
8721 (make_cleanup_restore_current_traceframe): Remove.
8722 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8723 New.
8724 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8725 * infrun.c (fetch_inferior_event): Use
8726 scoped_restore_current_traceframe.
8727
8728 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8729
8730 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8731 Remove.
8732 <n_allocated_type_units>: Remove.
8733 <all_type_units>: Change to std::vector.
8734 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8735 to std::vector change.
8736 (dwarf2_per_objfile::get_cutu): Likewise.
8737 (dwarf2_per_objfile::get_tu): Likewise.
8738 (create_signatured_type_table_from_index): Likewise.
8739 (create_signatured_type_table_from_debug_names): Likewise.
8740 (dw2_symtab_iter_next): Likewise.
8741 (dw2_print_stats): Likewise.
8742 (dw2_expand_all_symtabs): Likewise.
8743 (dw2_expand_marked_cus): Likewise.
8744 (dw2_debug_names_iterator::next): Likewise.
8745 (dwarf2_initialize_objfile): Likewise.
8746 (add_signatured_type_cu_to_table): Likewise.
8747 (create_all_type_units): Likewise.
8748 (add_type_unit): Likewise.
8749 (struct tu_abbrev_offset): Add constructor.
8750 (build_type_psymtabs_1): Adjust to std::vector change.
8751 (print_tu_stats): Likewise.
8752 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8753 (write_debug_names): Likewise.
8754
8755 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8756
8757 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8758 Make an std::vector.
8759 <n_comp_units>: Remove.
8760 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8761 to std::vector change.
8762 (dwarf2_per_objfile::get_cutu): Likewise.
8763 (dwarf2_per_objfile::get_cu): Likewise.
8764 (create_cus_from_index): Likewise.
8765 (create_addrmap_from_index): Likewise.
8766 (create_addrmap_from_aranges): Likewise.
8767 (dwarf2_read_index): Likewise.
8768 (dw2_find_last_source_symtab): Likewise.
8769 (dw2_map_symtabs_matching_filename): Likewise.
8770 (dw2_symtab_iter_next): Likewise.
8771 (dw2_print_stats): Likewise.
8772 (dw2_expand_all_symtabs): Likewise.
8773 (dw2_expand_symtabs_with_fullname): Likewise.
8774 (dw2_expand_marked_cus): Likewise.
8775 (dw2_map_symbol_filenames): Likewise.
8776 (create_cus_from_debug_names): Likewise.
8777 (dwarf2_read_debug_names): Likewise.
8778 (dw2_debug_names_iterator::next): Likewise.
8779 (dwarf2_initialize_objfile): Likewise.
8780 (set_partial_user): Likewise.
8781 (dwarf2_build_psymtabs_hard): Likewise.
8782 (read_comp_units_from_section): Remove arguments, adjust to
8783 std::vector change.
8784 (create_all_comp_units): Adjust to std::vector and
8785 read_comp_units_from_section changes.
8786 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8787 change.
8788 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8789 (psyms_seen_size): Likewise.
8790 (write_gdbindex): Likewise.
8791 (write_debug_names): Likewise.
8792
8793 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8794
8795 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8796 with dwarf2_per_objfile.
8797 (create_cus_from_index): Likewise.
8798 (create_signatured_type_table_from_index): Likewise.
8799 (dwarf2_read_index): Likewise.
8800 (dwarf2_initialize_objfile): Likewise.
8801 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8802 per_cu rather than get_dwarf2_per_objfile.
8803
8804 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8805
8806 * dwarf2read.h (struct signatured_type): Forward declare.
8807 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8808 New methods.
8809 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8810 (dw2_get_cutu): ...this.
8811 (dwarf2_per_objfile::get_cu): Rename from...
8812 (dw2_get_cu): ...this.
8813 (dwarf2_per_objfile::get_tu): New.
8814 (create_addrmap_from_index): Adjust.
8815 (create_addrmap_from_aranges): Adjust.
8816 (dw2_find_last_source_symtab): Adjust.
8817 (dw2_map_symtabs_matching_filename): Adjust.
8818 (dw2_symtab_iter_next): Adjust.
8819 (dw2_print_stats): Adjust.
8820 (dw2_expand_all_symtabs): Adjust.
8821 (dw2_expand_symtabs_with_fullname): Adjust.
8822 (dw2_expand_marked_cus): Adjust.
8823 (dw_expand_symtabs_matching_file_matcher): Adjust.
8824 (dw2_map_symbol_filenames): Adjust.
8825 (dw2_debug_names_iterator::next): Adjust.
8826 (dwarf2_initialize_objfile): Adjust.
8827 (set_partial_user): Adjust.
8828 (dwarf2_build_psymtabs_hard): Adjust.
8829
8830 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8831
8832 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8833 Remove unused variables.
8834 (dw2_map_symtabs_matching_filename): Likewise.
8835 (dwarf2_record_block_ranges): Likewise.
8836 (dwarf2_read_addr_index): Likewise.
8837 (follow_die_offset): Likewise.
8838
8839 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8840
8841 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8842 to symbol_file_add_main.
8843
8844 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8845
8846 PR mi/22299
8847 * mi/mi-console.c (do_fputc_async_safe): New.
8848 (mi_console_file::write_async_safe): New.
8849 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8850 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8851 New.
8852 * ui-file.c (ui_file::putstrn): Adjust call to
8853 fputstrn_unfiltered.
8854 * utils.c (printchar): Replace do_fputs and do_fprintf
8855 parameters by do_fputc.
8856 (fputstr_filtered): Adjust call to printchar.
8857 (fputstr_unfiltered): Likewise.
8858 (fputstrn_filtered): Likewise.
8859 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8860 printchar.
8861 * utils.h (do_fputc_ftype): New typedef.
8862 (fputstrn_unfiltered): Add do_fputc parameter.
8863
8864 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8865
8866 * regformats/i386/i386-avx.dat: Remove.
8867
8868 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8869
8870 PR gdb/22979
8871 * amd64-tdep.c (amd64_none_init_abi): New function.
8872 (amd64_x32_none_init_abi): New function.
8873 (_initialize_amd64_tdep): Register handlers for x86-64 and
8874 x64_32 with GDB_OSABI_NONE.
8875 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8876 GDB_OSABI_NONE osabi.
8877
8878 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8879
8880 PR gdb/22980
8881 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8882 GDB_OSABI_NONE.
8883 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8884 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8885
8886 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8887
8888 * common/byte-vector.h (char_vector): New type.
8889 * target.h (target_read_alloc): Return
8890 gdb::optional<byte_vector>.
8891 (target_read_stralloc): Return gdb::optional<char_vector>.
8892 (target_get_osdata): Return gdb::optional<char_vector>.
8893 * target.c (target_read_alloc_1): Templatize. Replacement
8894 manual memory management with vector.
8895 (target_read_alloc): Change return type, adjust.
8896 (target_read_stralloc): Change return type, adjust.
8897 (target_get_osdata): Change return type, adjust.
8898 * auxv.c (struct auxv_info) <length>: Remove.
8899 <data>: Change type to gdb::optional<byte_vector>.
8900 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8901 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8902 (target_auxv_search): Adjust.
8903 (fprint_target_auxv): Adjust.
8904 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8905 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8906 (linux_make_corefile_notes): Adjust.
8907 * osdata.c (get_osdata): Adjust.
8908 * remote.c (remote_get_threads_with_qxfer): Adjust.
8909 (remote_memory_map): Adjust.
8910 (remote_traceframe_info): Adjust.
8911 (btrace_read_config): Adjust.
8912 (remote_read_btrace): Adjust.
8913 (remote_pid_to_exec_file): Adjust.
8914 * solib-aix.c (solib_aix_get_library_list): Adjust.
8915 * solib-dsbt.c (decode_loadmap): Don't free buf.
8916 (dsbt_get_initial_loadmaps): Adjust.
8917 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8918 * solib-target.c (solib_target_current_sos): Adjust.
8919 * tracepoint.c (sdata_make_value): Adjust.
8920 * xml-support.c (xinclude_start_include): Adjust.
8921 (xml_fetch_content_from_file): Adjust.
8922 * xml-support.h (xml_fetch_another): Change return type.
8923 (xml_fetch_content_from_file): Change return type.
8924 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8925 * xml-tdesc.c (file_read_description_xml): Adjust.
8926 (fetch_available_features_from_target): Change return type.
8927 (target_fetch_description_xml): Adjust.
8928 (target_read_description_xml): Adjust.
8929
8930 2018-04-06 Tom Tromey <tom@tromey.com>
8931
8932 * value.c (~value): Update.
8933 (struct value) <contents>: Now unique_xmalloc_ptr.
8934 (value_contents_bits_eq, allocate_value_contents)
8935 (value_contents_raw, value_contents_all_raw)
8936 (value_contents_for_printing, value_contents_for_printing_const)
8937 (set_value_enclosing_type): Update.
8938
8939 2018-04-06 Tom Tromey <tom@tromey.com>
8940
8941 * value.c (range_s): Remove typedef, VEC.
8942 (struct range): Add operator<.
8943 (range_lessthan): Remove.
8944 (ranges_contain): Change type.
8945 (~value): Update.
8946 (struct value) <unavailable, optimized_out>: Now std::vector.
8947 (value_entirely_available)
8948 (value_entirely_covered_by_range_vector)
8949 (value_entirely_unavailable, value_entirely_optimized_out):
8950 Update.
8951 (insert_into_bit_range_vector): Change argument type.
8952 (find_first_range_overlap): Likewise.
8953 (struct ranges_and_idx, value_contents_bits_eq)
8954 (require_not_optimized_out, require_available): Update.
8955 (ranges_copy_adjusted): Change argument types.
8956 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8957
8958 2018-04-06 Tom Tromey <tom@tromey.com>
8959
8960 * value.c (~value): Update.
8961 (struct value) <parent>: Now a value_ref_ptr.
8962 (value_parent, set_value_parent, value_address, value_copy):
8963 Update.
8964
8965 2018-04-06 Tom Tromey <tom@tromey.com>
8966
8967 * value.c (struct value): Add constructor, destructor, and member
8968 initializers.
8969 (allocate_value_lazy, value_decref): Update.
8970
8971 2018-04-06 Tom Tromey <tom@tromey.com>
8972
8973 * value.c (struct value) <released, next>: Remove.
8974 (all_values): Now a std::vector.
8975 (allocate_value_lazy): Update.
8976 (value_next): Remove.
8977 (value_mark, value_free_to_mark, release_value)
8978 (value_release_to_mark): Update.
8979
8980 2018-04-06 Tom Tromey <tom@tromey.com>
8981
8982 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8983 (free_value_chain): Remove.
8984 * value.c (free_value_chain): Remove.
8985 (value_release_to_mark): Return a std::vector.
8986 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8987 std::vector.
8988 (check_condition): Update.
8989 * eval.c (fetch_subexp_value): Change "val_chain" to a
8990 std::vector.
8991 * breakpoint.c (update_watchpoint): Update.
8992 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8993
8994 2018-04-06 Tom Tromey <tom@tromey.com>
8995
8996 * value.h (free_all_values): Remove.
8997 * value.c (free_all_values): Remove.
8998
8999 2018-04-06 Tom Tromey <tom@tromey.com>
9000
9001 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9002 (value_history_chain, value_history_count): Remove.
9003 (value_history): New global.
9004 (record_latest_value, access_value_history, show_values)
9005 (preserve_values): Update.
9006
9007 2018-04-06 Tom Tromey <tom@tromey.com>
9008
9009 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9010 * varobj.c (varobj_set_display_format, varobj_set_value)
9011 (install_default_visualizer, construct_visualizer)
9012 (install_new_value, ~varobj, varobj_get_value_type)
9013 (my_value_of_variable, varobj_editable_p): Update.
9014 * c-varobj.c (c_describe_child, c_value_of_variable)
9015 (cplus_number_of_children, cplus_describe_child): Update.
9016 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9017 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9018 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9019
9020 2018-04-06 Tom Tromey <tom@tromey.com>
9021
9022 * printcmd.c (last_examine_address): Change type to
9023 value_ref_ptr.
9024 (do_examine, x_command): Update.
9025
9026 2018-04-06 Tom Tromey <tom@tromey.com>
9027
9028 * value.c (release_value): Update.
9029 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9030 (struct bpstats) <val>: Now a value_ref_ptr.
9031 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9032 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9033 (~watchpoint, print_it_watchpoint, watch_command_1)
9034 (invalidate_bp_value_on_memory_change): Update.
9035
9036 2018-04-06 Tom Tromey <tom@tromey.com>
9037
9038 * varobj.c (varobj_clear_saved_item)
9039 (update_dynamic_varobj_children, install_new_value, ~varobj):
9040 Update.
9041 * value.h (value_incref): Move declaration earlier.
9042 (value_decref): Rename from value_free.
9043 (struct value_ref_policy): New.
9044 (value_ref_ptr): New typedef.
9045 (struct value_deleter): Remove.
9046 (gdb_value_up): Remove typedef.
9047 (release_value): Change return type.
9048 (release_value_or_incref): Remove.
9049 * value.c (set_value_parent): Update.
9050 (value_incref): Change return type.
9051 (value_decref): Rename from value_free.
9052 (value_free_to_mark, free_all_values, free_value_chain): Update.
9053 (release_value): Return value_ref_ptr.
9054 (release_value_or_incref): Remove.
9055 (record_latest_value, set_internalvar, clear_internalvar):
9056 Update.
9057 * stack.c (info_frame_command): Don't call value_free.
9058 * python/py-value.c (valpy_dealloc, valpy_new)
9059 (value_to_value_object): Update.
9060 * printcmd.c (do_examine): Update.
9061 * opencl-lang.c (lval_func_free_closure): Update.
9062 * mi/mi-main.c (register_changed_p): Don't call value_free.
9063 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9064 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9065 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9066 value_free.
9067 * guile/scm-value.c (vlscm_free_value_smob)
9068 (vlscm_scm_from_value): Update.
9069 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9070 (frame_unwind_register_unsigned, get_frame_register_bytes)
9071 (put_frame_register_bytes): Don't call value_free.
9072 * findvar.c (address_from_register): Don't call value_free.
9073 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9074 * dwarf2loc.c (entry_data_value_free_closure)
9075 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9076 (dwarf2_evaluate_loc_desc_full): Update.
9077 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9078 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9079 (~watchpoint, watch_command_1)
9080 (invalidate_bp_value_on_memory_change): Update.
9081 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9082
9083 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9084
9085 PR gdb/23022
9086 * warning.m4: Add -Wno-error=deprecated-register.
9087 * configure: Re-generate.
9088
9089 2018-04-05 Tom Tromey <tom@tromey.com>
9090
9091 * linespec.h: Remove include of "vec.h".
9092
9093 2018-04-05 Tom Tromey <tom@tromey.com>
9094
9095 * linespec.c (typep): Remove typedef.
9096 (find_methods, find_superclass_methods): Take a std::vector.
9097 (find_method): Use std::vector.
9098
9099 2018-04-05 Tom Tromey <tom@tromey.com>
9100
9101 * utils.c (compare_strings): Remove.
9102 * utils.h (compare_strings): Remove.
9103 * objc-lang.h (find_imps): Update.
9104 * objc-lang.c (find_methods): Take a std::vector.
9105 (uniquify_strings, find_imps): Likewise.
9106 * linespec.c (find_methods): Take a std::vector.
9107 (decode_objc): Use std::vector.
9108 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9109 a std::vector.
9110 (find_method, find_function_symbols): Use std::vector.
9111
9112 2018-04-05 Tom Tromey <tom@tromey.com>
9113
9114 * completer.c (completion_tracker::completion_tracker): Remove
9115 cast.
9116 (completion_tracker::discard_completions): Likewise.
9117 * breakpoint.c (ambiguous_names_p): Remove cast.
9118 * ada-lang.c (_initialize_ada_language): Remove cast.
9119 * utils.h (streq): Update.
9120 (streq_hash): Add new declaration.
9121 * utils.c (streq): Return bool.
9122 (streq_hash): New function.
9123
9124 2018-04-05 Tom Tromey <tom@tromey.com>
9125
9126 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9127 Remove a string copy.
9128
9129 2018-04-05 Tom Tromey <tom@tromey.com>
9130
9131 * linespec.c (filter_results): Use std::vector.
9132 (decode_line_2, decode_line_full): Update.
9133
9134 2018-04-05 Tom Tromey <tom@tromey.com>
9135
9136 * linespec.c (canonical_to_fullform): Return std::string.
9137 (filter_results): Update.
9138 (struct decode_line_2_item): Add constructor.
9139 <fullform, displayform>: Now std::string.
9140 (decode_line_2_compare_items): Now a std::sort comparator.
9141 (decode_line_2): Update.
9142
9143 2018-04-05 Tom Tromey <tom@tromey.com>
9144
9145 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9146 (unexpected_linespec_error): Update.
9147 (linespec_parse_basic, parse_linespec): Update.
9148
9149 2018-04-05 Tom Tromey <tom@tromey.com>
9150
9151 * linespec.c (linespec_parse_basic): Reindent.
9152
9153 2018-04-05 Tom Tromey <tom@tromey.com>
9154
9155 * minsyms.h (iterate_over_minimal_symbols): Update.
9156 * minsyms.c (iterate_over_minimal_symbols): Take a
9157 gdb::function_view.
9158 * linespec.c (struct collect_minsyms): Remove.
9159 (compare_msyms): Now a std::sort comparator.
9160 (add_minsym): Add parameters.
9161 (search_minsyms_for_name): Update. Use std::vector.
9162
9163 2018-04-03 Tom Tromey <tom@tromey.com>
9164
9165 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9166 gdb::byte_vector.
9167
9168 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9169
9170 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9171
9172 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9173
9174 PR gdb/16959
9175 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9176 printing static type.
9177
9178 2018-04-01 Tom Tromey <tom@tromey.com>
9179
9180 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9181 (rs6000_xfer_shared_libraries): Update.
9182
9183 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9184
9185 * common/gdb_vecs.h (char_ptr): Remove.
9186 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9187
9188 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9189
9190 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9191 with std::vector.
9192 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9193
9194 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9195
9196 * tracepoint.h (struct uploaded_tp): Initialize fields.
9197 <actions, step_actions, cmd_strings>: Change type to
9198 std::vector<char *>.
9199 * tracepoint.c (get_uploaded_tp): Allocate with new.
9200 (free_uploaded_tps): Free with delete.
9201 (parse_tracepoint_definition): Adjust to std::vector change.
9202 * breakpoint.c (read_uploaded_action): Likewise.
9203 (create_tracepoint_from_upload): Likewise.
9204 * ctf.c (ctf_write_uploaded_tp): Likewise.
9205 (SET_ARRAY_FIELD): Likewise.
9206 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9207
9208 2018-03-30 Tom Tromey <tom@tromey.com>
9209
9210 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9211 std::unique_ptr.
9212 (svr4_keep_data_in_core): Update.
9213 (svr4_read_so_list): Update.
9214
9215 2018-03-30 Tom Tromey <tom@tromey.com>
9216
9217 * windows-nat.c (handle_output_debug_string, handle_exception):
9218 Update.
9219 * target.h (target_read_string): Update.
9220 * target.c (target_read_string): Change "string" to
9221 unique_xmalloc_ptr.
9222 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9223 Update.
9224 * solib-frv.c (frv_current_sos): Update.
9225 * solib-dsbt.c (dsbt_current_sos): Update.
9226 * solib-darwin.c (darwin_current_sos): Update.
9227 * linux-thread-db.c (inferior_has_bug): Update.
9228 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9229 Update. Remove alloca.
9230 * ada-lang.c (ada_main_name): Update.
9231
9232 2018-03-30 Tom Tromey <tom@tromey.com>
9233
9234 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9235 (struct dwo_file_deleter): New.
9236 (dwo_file_up): New typedef.
9237 (open_and_init_dwo_file): Use dwo_file_up.
9238 (free_dwo_file_cleanup): Remove.
9239
9240 2018-03-30 Tom Tromey <tom@tromey.com>
9241
9242 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9243 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9244
9245 2018-03-30 Tom Tromey <tom@tromey.com>
9246
9247 * dwarf2read.c (class free_cached_comp_units): New class.
9248 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9249 (free_cached_comp_units): Remove function.
9250
9251 2018-03-30 Tom Tromey <tom@tromey.com>
9252
9253 * utils.h (make_cleanup_unpush_target): Remove.
9254 * inf-ptrace.c (struct target_unpusher): New.
9255 (target_unpush_up) New typedef.
9256 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9257 target_unpush_up.
9258 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9259
9260 2018-03-27 Tom Tromey <tom@tromey.com>
9261
9262 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9263
9264 2018-03-27 Pedro Alves <palves@redhat.com>
9265 Tom Tromey <tom@tromey.com>
9266
9267 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9268 destructor. Now a class.
9269 (gdb_readline_wrapper_cleanup): Remove function.
9270 (gdb_readline_wrapper): Remove cleanups.
9271
9272 2018-03-27 Tom Tromey <tom@tromey.com>
9273
9274 * typeprint.h (struct type_print_options) <local_typedefs,
9275 global_typedefs>: Remove "struct" keyword.
9276 (class typedef_hash_table): New class.
9277 (recursively_update_typedef_hash, add_template_parameters)
9278 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9279 (find_typedef_in_hash): Don't declare.
9280 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9281 (typedef_hash_table::recursively_update): Rename from
9282 recursively_update_typedef_hash. Now a member.
9283 (typedef_hash_table::add_template_parameters): Rename from
9284 add_template_parameters. Now a member.
9285 (typedef_hash_table::typedef_hash_table): Now a constructor;
9286 rename from create_typedef_hash.
9287 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9288 rename from free_typedef_hash.
9289 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9290 (do_free_global_table): Remove.
9291 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9292 from copy_type_recursive.
9293 (create_global_typedef_table): Remove.
9294 (typedef_hash_table::find_global_typedef): Now a member of
9295 typedef_hash_table.
9296 (typedef_hash_table::find_typedef): Rename from
9297 find_typedef_in_hash; now a member.
9298 (whatis_exp): Update.
9299 * extension.h (struct ext_lang_type_printers): Add constructor and
9300 destructor.
9301 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9302 declare.
9303 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9304 Now a constructor; rename from start_ext_lang_type_printers.
9305 (ext_lang_type_printers): Now a destructor; rename from
9306 free_ext_lang_type_printers.
9307 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9308 Update.
9309 (c_type_print_base_struct_union): Update. Remove cleanups.
9310
9311 2018-03-27 Tom Tromey <tom@tromey.com>
9312
9313 * dwarf-index-write.c: Include <cmath>.
9314
9315 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9316
9317 * NEWS: Add entry describing new "set|show varsize-limit" command.
9318 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9319 command.
9320 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9321 "set variable".
9322
9323 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9324
9325 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9326 dwarf-index-write.c
9327 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9328 * dwarf-index-common.c: New file.
9329 * dwarf-index-common.h: New file.
9330 * dwarf-index-write.c: New file.
9331 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9332 (struct dwarf2_section_info): Move from here.
9333 (dwarf2_section_info_def): Likewise.
9334 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9335 (offset_type): Likewise.
9336 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9337 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9338 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9339 (byte_swap): Likewise.
9340 (MAYBE_SWAP): Likewise.
9341 (dwarf2_per_cu_ptr): Likewise.
9342 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9343 (struct tu_stats): Likewise.
9344 (struct dwarf2_per_objfile): Likewise.
9345 (struct dwarf2_per_cu_data): Likewise.
9346 (struct signatured_type): Likewise.
9347 (sig_type_ptr): Likewise.
9348 (DEF_VEC_P (sig_type_ptr)): Likewise.
9349 (INDEX4_SUFFIX): Likewise.
9350 (INDEX5_SUFFIX): Likewise.
9351 (DEBUG_STR_SUFFIX): Likewise.
9352 (dwarf2_read_section): Make non-static.
9353 (mapped_index_string_hash): Move from here.
9354 (dwarf5_djb_hash): Likewise.
9355 (file_write): Likewise.
9356 (class data_buf): Likewise.
9357 (struct symtab_index_entry): Likewise.
9358 (struct mapped_symtab): Likewise.
9359 (find_slot): Likewise.
9360 (hash_expand): Likewise.
9361 (add_index_entry): Likewise.
9362 (uniquify_cu_indices): Likewise.
9363 (class c_str_view): Likewise.
9364 (class c_str_view_hasher): Likewise.
9365 (class vector_hasher): Likewise.
9366 (write_hash_table): Likewise.
9367 (psym_index_map): Likewise.
9368 (struct addrmap_index_data): Likewise.
9369 (add_address_entry): Likewise.
9370 (add_address_entry_worker): Likewise.
9371 (write_address_map): Likewise.
9372 (symbol_kind): Likewise.
9373 (write_psymbols): Likewise.
9374 (struct signatured_type_index_data): Likewise.
9375 (write_one_signatured_type): Likewise.
9376 (recursively_count_psymbols): Likewise.
9377 (recursively_write_psymbols): Likewise.
9378 (class debug_names): Likewise.
9379 (check_dwarf64_offsets): Likewise.
9380 (psyms_seen_size): Likewise.
9381 (write_gdbindex): Likewise.
9382 (write_debug_names): Likewise.
9383 (assert_file_size): Likewise.
9384 (write_psymtabs_to_index): Likewise.
9385 (save_gdb_index_command): Likewise.
9386 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9387 command.
9388 * dwarf2read.h: New file.
9389
9390 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9391
9392 PR gdb/22670
9393 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9394 symbol name if the CU's language stores symbol names in linkage
9395 format.
9396 * language.h (struct language_defn)
9397 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9398 all instances of this struct.
9399
9400 2018-03-26 Tom Tromey <tom@tromey.com>
9401
9402 * stack.c (backtrace_command_1): Remove verbose code.
9403
9404 2018-03-26 Tom Tromey <tom@tromey.com>
9405
9406 * python/py-framefilter.c (py_print_type): Don't catch
9407 exceptions. Return void.
9408 (py_print_value): Likewise.
9409 (py_print_single_arg): Likewise.
9410 (enumerate_args): Don't catch exceptions.
9411 (py_print_args): Likewise.
9412 (py_print_frame): Likewise.
9413 (gdbpy_apply_frame_filter): Catch exceptions here.
9414
9415 2018-03-26 Tom Tromey <tom@tromey.com>
9416
9417 * stack.c (_initialize_stack): Remove trailing newlines from help
9418 text. Add "Usage" line to "backtrace" help.
9419
9420 2018-03-26 Tom Tromey <tom@tromey.com>
9421
9422 PR python/16486:
9423 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9424
9425 2018-03-26 Tom Tromey <tom@tromey.com>
9426
9427 * python/py-framefilter.c (py_print_single_arg): Return
9428 EXT_LANG_BT_ERROR from catch.
9429
9430 2018-03-26 Tom Tromey <tom@tromey.com>
9431
9432 PR backtrace/15584:
9433 * stack.c (backtrace_command_1): Move some code into no-filters
9434 "if".
9435
9436 2018-03-26 Tom Tromey <tom@tromey.com>
9437
9438 * python/py-framefilter.c (throw_quit_or_print_exception): New
9439 function.
9440 (gdbpy_apply_frame_filter): Use it.
9441
9442 2018-03-26 Tom Tromey <tom@tromey.com>
9443
9444 PR cli/17716:
9445 * python/py-framefilter.c (py_print_type, py_print_value)
9446 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9447 RETURN_MASK_ERROR.
9448
9449 2018-03-26 Tom Tromey <tom@tromey.com>
9450
9451 * python/py-framefilter.c (enumerate_args): Use
9452 gdb::unique_xmalloc_ptr.
9453
9454 2018-03-26 Tom Tromey <tom@tromey.com>
9455
9456 * python/py-framefilter.c (py_print_frame): Return
9457 EXT_LANG_BT_OK.
9458 (gdbpy_apply_frame_filter): Update comment.
9459 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9460 Remove.
9461 <EXT_LANG_BT_NO_FILTERS>: Change value.
9462
9463 2018-03-26 Tom Tromey <tom@tromey.com>
9464
9465 PR backtrace/15582:
9466 * stack.c (backtrace_command): Parse "hide" argument.
9467 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9468 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9469 constant.
9470
9471 2018-03-26 Tom Tromey <tom@tromey.com>
9472
9473 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9474 add "flags".
9475 (backtrace_command): Remove "fulltrace", add "flags".
9476
9477 2018-03-26 Tom Tromey <tom@tromey.com>
9478
9479 * stack.c (backtrace_command): Rewrite command line parsing.
9480
9481 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9482
9483 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9484
9485 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9486
9487 * filename-seen-cache.h: Add include guard.
9488
9489 2018-03-26 Keith Seitz <keiths@redhat.com>
9490
9491 * symfile.c (place_section): Remove "struct" from section_addr_info
9492 in comment.
9493 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9494 "struct" keyword from section_addr_info.
9495
9496 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9497
9498 * regformats/regdef.h (reg): Add constructors.
9499
9500 2018-03-25 Pedro Alves <palves@redhat.com>
9501
9502 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9503 if then/else bodies in var_func_name extraction.
9504
9505 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9506
9507 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9508 lookup_minimal_symbol() to find symbol entry.
9509 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9510
9511 2018-03-23 Keith Seitz <keiths@redhat.com>
9512
9513 PR c++/22968
9514 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9515 nested type definitions for C++, too.
9516
9517 2018-03-23 Tom Tromey <tom@tromey.com>
9518
9519 * machoread.c (struct oso_el): Add a constructor. Don't define as
9520 a typedef.
9521 (macho_register_oso): Remove.
9522 (macho_symtab_read): Take a std::vector.
9523 (oso_el_compare_name): Now a std::sort comparator.
9524 (macho_symfile_read_all_oso): Take a std::vector.
9525 (macho_symfile_read): Use std::vector. Remove cleanups.
9526
9527 2018-03-22 Tom Tromey <tom@tromey.com>
9528
9529 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9530 (record_full_goto_bookmark): Use std::string.
9531
9532 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9533
9534 PR tdep/18295
9535 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9536 a single mask.
9537
9538 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9539
9540 * rs6000-tdep.c (store_insn_p): New function.
9541 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9542 and cr_reg to their unshifted values. Use store_insn_p to
9543 match LR saves using either R1 or fdata->alloca_reg. Use
9544 store_insn_p to match CR saves. Set alloca_reg_offset
9545 when alloca_reg and framep are set. Remove lr_reg shift
9546 when assigning to fdata->lr_register.
9547
9548 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9549
9550 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9551 command line args instead of emitting a warning.
9552
9553 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9554
9555 * tracepoint.h (struct static_tracepoint_marker): Initialize
9556 fields, define default constructor, move constructor and move
9557 assignment, disable the rest.
9558 <str_id, extra>: Make std::string.
9559 (release_static_tracepoint_marker): Remove.
9560 (free_current_marker): Remove.
9561 * tracepoint.c (free_current_marker): Remove.
9562 (parse_static_tracepoint_marker_definition): Adjust to
9563 std::string, use new hex2str overload.
9564 (release_static_tracepoint_marker): Remove.
9565 (print_one_static_tracepoint_marker): Get marker by reference
9566 and adjust to std::string.
9567 (info_static_tracepoint_markers_command): Adjust to std::vector
9568 changes
9569 * target.h (static_tracepoint_marker_p): Remove typedef.
9570 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9571 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9572 bool.
9573 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9574 * target-debug.h
9575 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9576 (target_debug_print_std_vector_static_tracepoint_marker): New.
9577 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9578 to...
9579 (target_debug_print_static_tracepoint_marker_p): ... this.
9580 * target-delegates.c: Re-generate.
9581 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9582 Make std::string.
9583 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9584 (decode_static_tracepoint_spec): Adjust to std::vector.
9585 (tracepoint_print_one_detail): Adjust to std::string.
9586 (strace_marker_decode_location): Adjust to std::string.
9587 (update_static_tracepoint): Adjust to std::string, remove call
9588 to release_static_tracepoint_marker.
9589 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9590 Adjust to std::vector.
9591 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9592 (remote_static_tracepoint_markers_by_strid): Adjust to
9593 std::vector.
9594 * common/rsp-low.h (hex2str): New overload with explicit count
9595 of bytes.
9596 * common/rsp-low.c (hex2str): New overload with explicit count
9597 of bytes.
9598 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9599 (_initialize_rsp_low_selftests): Add test_hex2str test.
9600 * unittests/tracepoint-selftests.c
9601 (test_parse_static_tracepoint_marker_definition): Adjust to
9602 std::string.
9603
9604 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9605
9606 * tracepoint.c (parse_static_tracepoint_marker_definition):
9607 Consider case where the definition is followed by more
9608 definitions.
9609 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9610 tracepoint-selftests.c.
9611 * unittests/tracepoint-selftests.c: New.
9612
9613 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9614
9615 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9616 Carvalho.
9617
9618 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9619
9620 * symtab.c (find_pc_sect_line): fixed indentation.
9621
9622 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9623
9624 * symtab.c (find_pc_sect_line): now uses binary search.
9625
9626 2018-03-19 Tom Tromey <tom@tromey.com>
9627
9628 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9629 "IDENT" production.
9630
9631 2018-03-19 Pedro Alves <palves@redhat.com>
9632 Tom Tromey <tom@tromey.com>
9633
9634 * unittests/observable-selftests.c: New file.
9635 * common/observable.h: New file.
9636 * observable.h: New file.
9637 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9638 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9639 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9640 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9641 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9642 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9643 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9644 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9645 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9646 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9647 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9648 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9649 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9650 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9651 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9652 tui/tui-interp.c, valops.c: Update all users.
9653 * tui/tui-hooks.c (tui_bp_created_observer)
9654 (tui_bp_deleted_observer, tui_bp_modified_observer)
9655 (tui_inferior_exit_observer, tui_before_prompt_observer)
9656 (tui_normal_stop_observer, tui_register_changed_observer):
9657 Remove.
9658 (tui_observers_token): New global.
9659 (attach_or_detach, tui_attach_detach_observers): New functions.
9660 (tui_install_hooks, tui_remove_hooks): Use
9661 tui_attach_detach_observers.
9662 * record-btrace.c (record_btrace_thread_observer): Remove.
9663 (record_btrace_thread_observer_token): New global.
9664 * observer.sh: Remove.
9665 * observer.c: Rename to observable.c.
9666 * observable.c (namespace gdb_observers): Define new objects.
9667 (observer_debug): Move into gdb_observers namespace.
9668 (struct observer, struct observer_list, xalloc_observer_list_node)
9669 (xfree_observer_list_node, generic_observer_attach)
9670 (generic_observer_detach, generic_observer_notify): Remove.
9671 (_initialize_observer): Update.
9672 Don't include observer.inc.
9673 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9674 (clean mostlyclean): Likewise.
9675 (observer.h, observer.inc): Remove targets.
9676 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9677 (COMMON_SFILES): Use observable.c, not observer.c.
9678 * .gitignore: Remove observer.h.
9679
9680 2018-03-18 Tom Tromey <tom@tromey.com>
9681
9682 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9683 gdb::def_vector.
9684 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9685
9686 2018-03-17 Tom Tromey <tom@tromey.com>
9687
9688 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9689
9690 2018-03-17 Tom Tromey <tom@tromey.com>
9691
9692 * target.c (class scoped_target_fd): New.
9693 (target_fileio_close_cleanup): Remove.
9694 (target_fileio_read_alloc_1): Use scoped_target_fd.
9695
9696 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9697
9698 * silent-rules.mk: New.
9699 * Makefile.in: Include silent-rules.mk
9700 (srcdir, VPATH, top_srcdir): Move up.
9701 (COMPILE): Add ECHO_CXX.
9702 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9703 (init.c): Add ECHO_INIT_C.
9704 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9705 (version.c): Add ECHO_GEN.
9706 (printcmd.o): Add ECHO_CXX.
9707 (target-float.o): Add ECHO_CXX.
9708 (ada-exp.o): Add ECHO_CXX.
9709 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9710 (insight$(EXEEXT)): Add ECHO_CXXLD.
9711 * gnulib/configure.ac: Add AM_SILENT_RULES.
9712 * gnulib/aclocal.m4: Re-generate.
9713 * gnulib/configure: Re-generate.
9714 * gnulib/import/Makefile.in: Re-generate.
9715
9716 2018-03-16 Tom Tromey <tom@tromey.com>
9717
9718 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9719 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9720 * utils.c (do_free_section_addr_info)
9721 (make_cleanup_free_section_addr_info): Remove.
9722 * symfile.h (struct other_sections): Add constructor.
9723 (struct section_addr_info): Remove.
9724 (section_addr_info): New typedef.
9725 (struct sym_fns) <sym_offsets>: Change type of parameter.
9726 (build_section_addr_info_from_objfile)
9727 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9728 (default_symfile_offsets, symbol_file_add)
9729 (symbol_file_add_from_bfd)
9730 (build_section_addr_info_from_section_table): Update.
9731 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9732 * symfile.c (alloc_section_addr_info): Remove.
9733 (build_section_addr_info_from_section_table): Change return type.
9734 Update.
9735 (build_section_addr_info_from_bfd)
9736 (build_section_addr_info_from_objfile): Likewise.
9737 (free_section_addr_info): Remove.
9738 (relative_addr_info_to_section_offsets): Change type of "addrs".
9739 (addrs_section_compar): Now a std::sort comparator.
9740 (addrs_section_sort): Change return type.
9741 (addr_info_make_relative): Change type of "addrs". Update.
9742 (default_symfile_offsets, syms_from_objfile_1)
9743 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9744 (symbol_file_add_separate): Update.
9745 (symbol_file_add): Change type of "addrs". Update.
9746 (add_symbol_file_command): Update. Remove cleanups.
9747 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9748 cleanups.
9749 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9750 * solib.c (solib_read_symbols): Update.
9751 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9752 * machoread.c (macho_symfile_offsets): Update.
9753 * jit.c (jit_bfd_try_read_symtab): Update.
9754
9755 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9756
9757 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9758 unittests/utils-selftests.c.
9759 * unittests/utils-selftests.c: New file.
9760
9761 2018-03-14 Tom Tromey <tom@tromey.com>
9762
9763 PR cli/14977:
9764 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9765 for NULL.
9766
9767 2018-03-14 Tom Tromey <tom@tromey.com>
9768
9769 PR cli/19918:
9770 * printcmd.c (printf_pointer): Allow "-" in format.
9771
9772 2018-03-14 Tom Tromey <tom@tromey.com>
9773
9774 * printcmd.c (_initialize_printcmd): Add usage to printf.
9775
9776 2018-03-14 Yao Qi <qiyao@sourceware.org>
9777
9778 * MAINTAINERS: Update my email address.
9779
9780 2018-03-13 Tom Tromey <tom@tromey.com>
9781
9782 * machoread.c (macho_check_dsym): Change filenamep to a
9783 std::string*.
9784 (macho_symfile_read): Update.
9785 * symfile.c (load_command): Use std::string.
9786
9787 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9788
9789 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9790 to error message string.
9791 (riscv_register_name): Use xsnprintf instead of sprintf.
9792 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9793 internal_error.
9794 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9795 error.
9796 (riscv_push_dummy_call): Likewise.
9797
9798 2018-03-12 Tom Tromey <tom@tromey.com>
9799
9800 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9801 Use gdb::byte_vector.
9802 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9803
9804 2018-03-12 Yao Qi <yao.qi@linaro.org>
9805
9806 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9807 parameter type to readable_regcache.
9808 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9809 the declaration.
9810
9811 2018-03-11 Tom Tromey <tom@tromey.com>
9812
9813 * dwarf2read.c (struct nextfield): Add initializers.
9814 (struct nextfnfield): Remove.
9815 (struct fnfieldlist): Add initializers. Remove "length" and
9816 "head", use std::vector.
9817 (struct decl_field_list): Remove.
9818 (struct field_info): Add initializers.
9819 <fields, baseclasses>: Now std::vector.
9820 <nbaseclasses, nfnfields, typedef_field_list_count,
9821 nested_types_list_count>: Remove.
9822 (dwarf2_add_field, dwarf2_add_type_defn)
9823 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9824 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9825 (process_structure_scope): Update.
9826
9827 2018-03-11 Tom Tromey <tom@tromey.com>
9828
9829 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9830 for use by std::sort.
9831 (build_type_psymtabs_1): Use std::vector.
9832
9833 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9834
9835 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9836 and LIBMPFR in the printed configuration.
9837
9838 2018-03-08 Tom Tromey <tom@tromey.com>
9839
9840 * source.c (get_filename_and_charpos): Use scoped_fd.
9841 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9842 (procfs_pidlist): Likewise.
9843 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9844 (iterate_over_mappings): Likewise.
9845
9846 2018-03-08 Tom Tromey <tom@tromey.com>
9847
9848 * infcall.c (struct call_return_meta_info)
9849 <stack_temporaries_enabled>: Remove.
9850 (get_call_return_value, call_function_by_hand_dummy): Update.
9851 * thread.c (disable_thread_stack_temporaries): Remove.
9852 (enable_thread_stack_temporaries): Remove.
9853 (thread_stack_temporaries_enabled_p): Return bool.
9854 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9855 (get_last_thread_stack_temporary): Update.
9856 * eval.c (evaluate_subexp): Update.
9857 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9858 class, not a function.
9859 (value_ptr, value_vec): Remove typedefs.
9860 (class thread_info) <stack_temporaries_enabled>: Now bool.
9861 <stack_temporaries>: Now a std::vector.
9862 (thread_stack_temporaries_enabled_p)
9863 (value_in_thread_stack_temporaries): Return bool.
9864
9865 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9866
9867 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9868 (getpkt_or_notif_sane_1): Likewise.
9869
9870 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9871
9872 * build-id.c (build_id_to_debug_bfd): Use std::string.
9873
9874 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9875
9876 * build-id.c (find_separate_debug_file_by_buildid): Return
9877 std::string.
9878 * build-id.h (find_separate_debug_file_by_buildid): Return
9879 std::string.
9880 * coffread.c (coff_symfile_read): Adjust to std::string.
9881 * elfread.c (elf_symfile_read): Adjust to std::string.
9882 * symfile.c (separate_debug_file_exists): Change parameter to
9883 std::string.
9884 (find_separate_debug_file): Return std::string.
9885 (find_separate_debug_file_by_debuglink): Return std::string.
9886 * symfile.h (find_separate_debug_file_by_debuglink): Return
9887 std::string.
9888
9889 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9890
9891 * common/xml-utils.c (xml_escape_text): Move code to...
9892 (xml_escape_text_append): ... this new function.
9893 * common/xml-utils.h (xml_escape_text_append): New declaration.
9894 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9895 New function.
9896 (_initialize_xml_utils): register test_xml_escape_text_append as
9897 a selftest.
9898
9899 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9900
9901 * defs.h: Remove MAX_REGISTER_SIZE.
9902 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9903 asserts.
9904 * python/py-unwind.c (pyuw_sniffer): Likewise.
9905
9906 2018-03-07 Tom Tromey <tom@tromey.com>
9907
9908 * linux-tdep.c (linux_info_proc): Update.
9909 * target.h (struct target_ops) <to_fileio_readlink>: Return
9910 optional<string>.
9911 (target_fileio_readlink): Return optional<string>.
9912 * remote.c (remote_hostio_readlink): Return optional<string>.
9913 * inf-child.c (inf_child_fileio_readlink): Return
9914 optional<string>.
9915 * target.c (target_fileio_readlink): Return optional<string>.
9916
9917 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9918
9919 * regcache.c (cooked_read_test): Add riscv to the list of
9920 architectures that have a save_reggroup.
9921
9922 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9923
9924 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9925 value is not a dynamic class object.
9926
9927 2018-03-06 Tom Tromey <tom@tromey.com>
9928
9929 * rust-exp.y: Formatting fixes.
9930
9931 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9932
9933 * riscv-tdep.c (riscv_register_name): Remove target description
9934 support.
9935 (riscv_gdbarch_init): Remove target description check.
9936
9937 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9938
9939 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9940 comment.
9941 * riscv-tdep.h: Likewise.
9942
9943 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9944
9945 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9946 (riscv_pseudo_register_write): Delete.
9947 (riscv_gdbarch_init): Remove all use of pseudo registers.
9948
9949 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9950
9951 * record-btrace.c (btrace_print_lines): Replace cleanup
9952 parameter with RAII equivalents.
9953 (btrace_insn_history): Replace cleanup with RAII equivalents.
9954 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9955 make_cleanup_ui_out_tuple_begin_end): Remove.
9956 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9957 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9958 make_cleanup_ui_out_list_begin_end): Remove.
9959
9960 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9961
9962 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9963 parameter types to std::vector. Use bool.
9964 (record_btrace_wait): Replace VEC(tp_t) with
9965 std::vector<thread_info *>.
9966 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9967
9968 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9969
9970 * record-btrace.c (record_btrace_disable_callback): Remove.
9971 (struct scoped_btrace_disable): New.
9972 (record_btrace_open): Use scoped_btrace_disable.
9973
9974 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9975
9976 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9977 reading values from registers.
9978
9979 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9980
9981 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9982 where appropriate.
9983
9984 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9985
9986 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9987 change parameter type. Use GDB's print functions, and use
9988 core_addr_to_string where appropriate.
9989 (riscv_push_dummy_call): Use core_addr_to_string where
9990 appropriate, update call to riscv_print_arg_location, and reindent
9991 a few lines.
9992 (riscv_return_value): Update call to riscv_print_arg_location.
9993
9994 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9995 Tim Newsome <tim@sifive.com>
9996 Albert Ou <a0u@eecs.berkeley.edu>
9997 Darius Rad <darius@bluespec.com>
9998
9999 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10000 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10001 (ALLDEPFILES): Add riscv-tdep.c
10002 * configure.tgt: Add riscv support.
10003 * riscv-tdep.c: New file.
10004 * riscv-tdep.h: New file.
10005 * NEWS: Mention new target.
10006 * MAINTAINERS: Add entry for riscv.
10007
10008 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10009
10010 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10011 fields within aggregates.
10012
10013 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10014
10015 * record-btrace.c (btrace_print_lines): Change type of flags to
10016 gdb_disassembly_flags.
10017
10018 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10019
10020 * fbsd-nat.c: Include "inf-ptrace.h".
10021 (USE_SIGTRAP_SIGINFO): Conditionally define.
10022 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10023 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10024 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10025 function.
10026 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10027 Likewise.
10028 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10029 Likewise.
10030 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10031 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10032 "supports_stopped_by_hw_breakpoint" target methods.
10033
10034 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10035
10036 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10037 * fbsd-nat.c (debug_fbsd_nat): New variable.
10038 (show_fbsd_nat_debug): New function.
10039 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10040 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10041
10042 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10043
10044 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10045 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10046 prototype.
10047 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10048 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10049 method.
10050
10051 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10052
10053 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10054 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10055
10056 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10057
10058 * charset.c (struct charset_vector): New.
10059 (charsets): Change type to charset_vector.
10060 (find_charset_names): Adjust.
10061 (add_one): Adjust.
10062 (_initialize_charset): Adjust.
10063
10064 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10065
10066 * progspace.h (struct program_space) <deleted_solibs>: Change
10067 type to std::vector<std::string>.
10068 * progspace.c (clear_program_space_solib_cache): Adjust.
10069 * breakpoint.c (print_solib_event): Adjust.
10070 (check_status_catch_solib): Adjust.
10071 * solib.c (update_solib_list): Adjust.
10072 * ui-out.h (class ui_out) <field_string>: New overload.
10073 * ui-out.c (ui_out::field_string): New overload.
10074
10075 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10076
10077 * progspace.h (struct program_space): Add constructor and
10078 destructor, initialize fields.
10079 (add_program_space): Remove.
10080 * progspace.c (add_program_space): Rename to...
10081 (program_space::program_space): ... this.
10082 (release_program_space): Rename to...
10083 (program_space::~program_space): ... this.
10084 (delete_program_space): Use delete to delete program_space.
10085 (initialize_progspace): Use new to allocate program_space.
10086 * inferior.c (add_inferior_with_spaces): Likewise.
10087 (clone_inferior_command): Likewise.
10088 * infrun.c (follow_fork_inferior): Likewise.
10089 (handle_vfork_child_exec_or_exit): Likewise.
10090
10091 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10092
10093 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10094 (delim_string_to_char_ptr_vec): Return std::vector of
10095 gdb::unique_xmalloc_ptr.
10096 (dirnames_to_char_ptr_vec_append): Take std::vector of
10097 gdb::unique_xmalloc_ptr.
10098 (dirnames_to_char_ptr_vec): Return std::vector of
10099 gdb::unique_xmalloc_ptr.
10100 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10101 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10102 (delim_string_to_char_ptr_vec): Return an std::vector of
10103 gdb::unique_xmalloc_ptr, adjust the code.
10104 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10105 gdb::unique_xmalloc_ptr, adjust the code.
10106 (dirnames_to_char_ptr_vec): Return an std::vector of
10107 gdb::unique_xmalloc_ptr, adjust the code.
10108 * auto-load.c (auto_load_safe_path_vec): Change type to
10109 std::vector of gdb::unique_xmalloc_ptr.
10110 (auto_load_expand_dir_vars): Return an std::vector of
10111 gdb::unique_xmalloc_ptr, adjust the code.
10112 (auto_load_safe_path_vec_update): Adjust.
10113 (filename_is_in_auto_load_safe_path_vec): Adjust.
10114 (auto_load_objfile_script_1): Adjust.
10115 * build-id.c (build_id_to_debug_bfd): Adjust.
10116 * linux-thread-db.c (thread_db_load_search): Adjust.
10117 * source.c (add_path): Adjust.
10118 (openp): Adjust.
10119 * symfile.c (find_separate_debug_file): Adjust.
10120 * utils.c (do_free_char_ptr_vec): Remove.
10121 (make_cleanup_free_char_ptr_vec): Remove.
10122
10123 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10124
10125 PR gdb/22907
10126 * common/pathstuff.c: Conditionally include "<windows.h>".
10127
10128 2018-03-01 Georg Sauthoff <mail@georg.so>
10129
10130 PR gdb/22888
10131 * gcore.in: Quote variables and switch interpreter to bash.
10132
10133 2018-03-01 Tom Tromey <tom@tromey.com>
10134
10135 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10136 assertion. Add assertion for discriminant_index.
10137 (quirk_rust_enum): Use correct base type name in univariant case.
10138
10139 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10140
10141 * record.c (get_call_history_modifiers): Return a
10142 record_print_flags.
10143 (cmd_record_call_history): Adjust.
10144 * record-btrace.c (record_btrace_call_history): Adjust.
10145 (record_btrace_call_history_range): Adjust.
10146 (record_btrace_call_history_from): Adjust.
10147 * target-debug.h (target_debug_print_record_print_flags): New.
10148 * target-delegates.c: Re-generate.
10149 * target.c (target_call_history): Change flags type.
10150 (target_call_history_from): Likewise.
10151 (target_call_history_range): Likewise.
10152 * target.h (struct target_ops) <target_call_history>: Likewise.
10153 (target_call_history_from): Likewise.
10154 (target_call_history_range): Likewise.
10155
10156 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10157 Simon Marchi <simon.marchi@polymtl.ca>
10158
10159 * common/common-utils.c: Include "sys/stat.h".
10160 (is_regular_file): Move here from "source.c"; change return
10161 type to "bool".
10162 * common/common-utils.h (is_regular_file): New prototype.
10163 * common/pathstuff.c (contains_dir_separator): New function.
10164 * common/pathstuff.h (contains_dir_separator): New prototype.
10165 * source.c: Don't include "sys/stat.h".
10166 (is_regular_file): Move to "common/common-utils.c".
10167
10168 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10169
10170 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10171 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10172 * auto-load.c: Include "common/pathstuff.h".
10173 * common/common-def.h (current_directory): Move here.
10174 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10175 function.
10176 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10177 prototype.
10178 * common/pathstuff.c: New file.
10179 * common/pathstuff.h: New file.
10180 * compile/compile.c: Include "common/pathstuff.h".
10181 * defs.h (current_directory): Move to "common/common-defs.h".
10182 * dwarf2read.c: Include "common/pathstuff.h".
10183 * exec.c: Likewise.
10184 * guile/scm-safe-call.c: Likewise.
10185 * linux-thread-db.c: Likewise.
10186 * main.c: Likewise.
10187 * nto-tdep.c: Likewise.
10188 * objfiles.c: Likewise.
10189 * source.c: Likewise.
10190 * symtab.c: Likewise.
10191 * utils.c: Include "common/pathstuff.h".
10192 (gdb_realpath): Move to "common/pathstuff.c".
10193 (gdb_realpath_keepfile): Likewise.
10194 (gdb_abspath): Likewise.
10195 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10196 (gdb_realpath_keepfile): Likewise.
10197 (gdb_abspath): Likewise.
10198
10199 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10200
10201 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10202 wildcard process pid for super_resume for kernels with a
10203 specific bug.
10204
10205 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10206
10207 * compile/compile.c (get_args): Add additional comments
10208 explaining function.
10209
10210 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10211 Tom Tromey <tom@tromey.com>
10212
10213 * target.h (memory_write_request_s): Remove typedef. Don't define
10214 VEC.
10215 (target_write_memory_blocks): Change argument to std::vector.
10216 (struct memory_write_request): Add constructor.
10217 * target-memory.c (compare_block_starting_address): Return bool.
10218 Change argument types.
10219 (claim_memory): Change arguments to use std::vector.
10220 (split_regular_and_flash_blocks, blocks_to_erase)
10221 (compute_garbled_blocks): Likewise.
10222 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10223 (target_write_memory_blocks): Change argument to std::vector.
10224 * symfile.c (struct load_section_data): Add constructor and
10225 destructor. Use std::vector for "requests".
10226 (struct load_progress_data): Add initializers.
10227 (load_section_callback): Update. Use "new".
10228 (clear_memory_write_data): Remove.
10229 (generic_load): Update.
10230
10231 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10232
10233 * arch/aarch64.h: Use common/tdesc.h.
10234
10235 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10236
10237 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10238 architecture with a 64-bit ABI.
10239
10240 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10241
10242 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10243 ahead of target description loading.
10244
10245 2018-02-26 Tom Tromey <tom@tromey.com>
10246
10247 * stack.c (backtrace_command_1): Update.
10248 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10249 of "flags".
10250 * python/py-framefilter.c (py_print_frame)
10251 (gdbpy_apply_frame_filter): Change type of "flags".
10252 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10253 of "flags".
10254 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10255 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10256 * extension.h (enum frame_filter_flag): Rename from
10257 frame_filter_flags.
10258 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10259 (apply_ext_lang_frame_filter): Change type of "flags".
10260 * extension.c (apply_ext_lang_frame_filter): Change type of
10261 "flags".
10262 * extension-priv.h (struct extension_language_ops)
10263 <apply_frame_filter>: Change type of "flags".
10264
10265 2018-02-26 Tom Tromey <tom@tromey.com>
10266
10267 PR python/16497:
10268 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10269 off-by-one in py_end computation.
10270 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10271 PRINT_MORE_FRAMES.
10272 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10273 constant.
10274
10275 2018-02-26 Tom Tromey <tom@tromey.com>
10276
10277 * dwarf2read.c (struct variant_field): New.
10278 (struct nextfield) <variant>: New field.
10279 (dwarf2_add_field): Handle DW_TAG_variant_part.
10280 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10281 discriminated union.
10282 (read_structure_type): Handle DW_TAG_variant_part.
10283 (handle_struct_member_die): New function, extracted from
10284 process_structure_scope. Handle DW_TAG_variant.
10285 (process_structure_scope): Handle discriminated unions. Call
10286 handle_struct_member_die.
10287
10288 2018-02-26 Tom Tromey <tom@tromey.com>
10289
10290 * rust-lang.h (rust_last_path_segment): Declare.
10291 * rust-lang.c (rust_last_path_segment): Now public. Change
10292 contract.
10293 (struct disr_info): Remove.
10294 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10295 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10296 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10297 (rust_enum_p, rust_enum_variant): New function.
10298 (rust_underscore_fields): Remove "offset" parameter.
10299 (rust_print_enum): New function.
10300 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10301 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10302 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10303 enums.
10304 (rust_internal_print_type): New function, from rust_print_type.
10305 Remove enum code.
10306 (rust_print_type): Call rust_internal_print_type.
10307 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10308 Update enum handling.
10309 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10310 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10311 (rust_union_quirks): New functions.
10312 (process_full_comp_unit, process_full_type_unit): Call
10313 rust_union_quirks.
10314 (process_structure_scope): Update rust_unions if necessary.
10315
10316 2018-02-26 Tom Tromey <tom@tromey.com>
10317
10318 * value.h (value_union_variant): Declare.
10319 * valops.c (value_union_variant): New function.
10320 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10321 (struct discriminant_info): New.
10322 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10323 enumerator.
10324 (struct main_type) <flag_discriminated_union>: New field.
10325
10326 2018-02-26 Tom Tromey <tom@tromey.com>
10327
10328 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10329 unittests/unpack-selftests.c.
10330 * unittests/unpack-selftests.c: New file.
10331 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10332
10333 2018-02-26 Yao Qi <yao.qi@linaro.org>
10334
10335 * dwarf2read.c (struct partial_die_info) <read>: New method.
10336 (read_partial_die): Remove the declaration.
10337 (load_partial_dies): Update.
10338 (partial_die_info::partial_die_info):
10339 (read_partial_die): Change it to partial_die_info::read.
10340
10341 2018-02-26 Yao Qi <yao.qi@linaro.org>
10342
10343 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10344 (fixup_partial_die): Remove declaration.
10345 (scan_partial_symbols): Update.
10346 (partial_die_parent_scope): Likewise.
10347 (partial_die_full_name): Likewise.
10348 (fixup_partial_die): Change it to partial_die_info::fixup.
10349
10350 2018-02-26 Yao Qi <yao.qi@linaro.org>
10351
10352 * dwarf2read.c (read_partial_die): Update the declaration.
10353 (load_partial_dies): Caller update.
10354 (read_partial_die): Remove one argument abbrev_len.
10355
10356 2018-02-26 Yao Qi <yao.qi@linaro.org>
10357
10358 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10359 assignment operator.
10360 (load_partial_dies): Use ctor and copy ctor.
10361 (read_partial_die): Update.
10362 (dwarf2_cu::find_partial_die): Use ctor.
10363
10364 2018-02-26 Yao Qi <yao.qi@linaro.org>
10365
10366 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10367 (find_partial_die_in_comp_unit): Change it to
10368 dwarf2_cu::find_partial_die.
10369 (find_partial_die): Update.
10370
10371 2018-02-26 Yao Qi <yao.qi@linaro.org>
10372
10373 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10374 is NULL.
10375
10376 2018-02-26 Yao Qi <yao.qi@linaro.org>
10377
10378 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10379
10380 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10381
10382 * arch/amd64.h: Use common/tdesc.h.
10383 * arch/i386.c: Likewise.
10384 * arch/i386.h: Likewise.
10385 * arch/tic6x.c: Likewise.
10386 * arch/tdesc.h: Move file from here...
10387 * common/tdesc.h: ...to here.
10388 * features/aarch64-core.c: Regenerate.
10389 * features/aarch64-fpu.c: Regenerate.
10390 * features/i386/32bit-avx.c: Regenerate.
10391 * features/i386/32bit-avx512.c: Regenerate.
10392 * features/i386/32bit-core.c: Regenerate.
10393 * features/i386/32bit-linux.c: Regenerate.
10394 * features/i386/32bit-mpx.c: Regenerate.
10395 * features/i386/32bit-pkeys.c: Regenerate.
10396 * features/i386/32bit-sse.c: Regenerate.
10397 * features/i386/64bit-avx.c: Regenerate.
10398 * features/i386/64bit-avx512.c: Regenerate.
10399 * features/i386/64bit-core.c: Regenerate.
10400 * features/i386/64bit-linux.c: Regenerate.
10401 * features/i386/64bit-mpx.c: Regenerate.
10402 * features/i386/64bit-pkeys.c: Regenerate.
10403 * features/i386/64bit-segments.c: Regenerate.
10404 * features/i386/64bit-sse.c: Regenerate.
10405 * features/i386/x32-core.c: Regenerate.
10406 * features/tic6x-c6xp.c: Regenerate.
10407 * features/tic6x-core.c: Regenerate.
10408 * features/tic6x-gp.c: Regenerate.
10409 * target-descriptions.c: Use common/tdesc.h.
10410 * target-descriptions.h: Likewise.
10411
10412 2018-02-24 Tom Tromey <tom@tromey.com>
10413
10414 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10415 (try_thread_db_load_from_dir, thread_db_load_search): Use
10416 std::string.
10417 (info_auto_load_libthread_db_compare): Return bool. Change
10418 argument types.
10419 (info_auto_load_libthread_db): Use std::vector, std::string.
10420 Remove cleanups.
10421
10422 2018-02-24 Tom Tromey <tom@tromey.com>
10423
10424 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10425 std::string.
10426 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10427 std::string*.
10428 * gdbarch.c: Rebuild.
10429 * gdbarch.h: Rebuild.
10430 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10431 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10432 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10433 std::string*.
10434
10435 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10436
10437 * gdbtypes.h (sect_offset): Change type to uint64_t.
10438 (sect_offset_str): New function.
10439 * dwarf2read.c (create_addrmap_from_aranges): Use
10440 sect_offset_str.
10441 (error_check_comp_unit_head): Likewise.
10442 (create_debug_type_hash_table): Likewise.
10443 (read_cutu_die_from_dwo): Likewise.
10444 (init_cutu_and_read_dies): Likewise.
10445 (init_cutu_and_read_dies_no_follow): Likewise.
10446 (process_psymtab_comp_unit_reader): Likewise.
10447 (partial_die_parent_scope): Likewise.
10448 (peek_die_abbrev): Likewise.
10449 (process_queue): Likewise.
10450 (dwarf2_physname): Likewise.
10451 (read_namespace_alias): Likewise.
10452 (read_import_statement): Likewise.
10453 (create_dwo_cu_reader): Likewise.
10454 (create_cus_hash_table): Likewise.
10455 (lookup_dwo_cutu): Likewise.
10456 (inherit_abstract_dies): Likewise.
10457 (read_func_scope): Likewise.
10458 (read_call_site_scope): Likewise.
10459 (dwarf2_add_member_fn): Likewise.
10460 (read_common_block): Likewise.
10461 (read_module_type): Likewise.
10462 (read_typedef): Likewise.
10463 (read_subrange_type): Likewise.
10464 (load_partial_dies): Likewise.
10465 (read_partial_die): Likewise.
10466 (find_partial_die): Likewise.
10467 (read_str_index): Likewise.
10468 (dwarf2_string_attr): Likewise.
10469 (build_error_marker_type): Likewise.
10470 (lookup_die_type): Likewise.
10471 (dump_die_shallow): Likewise.
10472 (follow_die_ref): Likewise.
10473 (dwarf2_fetch_die_loc_sect_off): Likewise.
10474 (dwarf2_fetch_constant_bytes): Likewise.
10475 (follow_die_sig): Likewise.
10476 (get_signatured_type): Likewise.
10477 (get_DW_AT_signature_type): Likewise.
10478 (dwarf2_find_containing_comp_unit): Likewise.
10479 (set_die_type): Likewise.
10480
10481 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10482
10483 * arch/aarch64.c: Include "common-defs.h".
10484 * arch/amd64.c: Likewise.
10485 * arch/i386.c: Likewise.
10486
10487 2018-02-21 Tom Tromey <tom@tromey.com>
10488
10489 * value.h: (extract_field_op): Update.
10490 * eval.c (extract_field_op): Return a const char *.
10491 * expression.h (parse_expression_for_completion): Update.
10492 * completer.c (complete_expression): Update.
10493 (add_struct_fields): Make fieldname const.
10494 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10495 (mark_completion_tag, parse_exp_in_context_1): Update.
10496 (parse_expression_for_completion): Change "name" to
10497 unique_xmalloc_ptr*.
10498
10499 2018-02-21 Tom Tromey <tom@tromey.com>
10500
10501 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10502
10503 2018-02-21 Yao Qi <yao.qi@linaro.org>
10504
10505 * avr-tdep.c (avr_read_pc): Change parameter type to
10506 readable_regcache.
10507 * gdbarch.sh (read_pc): Likewise.
10508 * gdbarch.c: Re-generated.
10509 * gdbarch.h: Re-generated.
10510 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10511 readable_regcache.
10512 * ia64-tdep.c (ia64_read_pc): Likewise.
10513 * mips-tdep.c (mips_read_pc): Likewise.
10514 * spu-tdep.c (spu_read_pc): Likewise.
10515
10516 2018-02-21 Yao Qi <yao.qi@linaro.org>
10517
10518 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10519 * regcache-dump.c: New file.
10520 * regcache.c: Move register_dump to regcache-dump.c.
10521 (maintenance_print_registers): Likewise.
10522 (maintenance_print_raw_registers): Likewise.
10523 (maintenance_print_cooked_registers): Likewise.
10524 (maintenance_print_register_groups): Likewise.
10525 (maintenance_print_remote_registers): Likewise.
10526 (_initialize_regcache): Likewise.
10527 * regcache.h (register_dump): Moved from regcache.c.
10528
10529 2018-02-21 Yao Qi <yao.qi@linaro.org>
10530
10531 * regcache.c (regcache::regcache): Update.
10532 (regcache::invalidate): Move it to detached_regcache::invalidate.
10533 (get_thread_arch_aspace_regcache): Update.
10534 (regcache::raw_update): Update.
10535 (regcache::cooked_read): Remove some code.
10536 (regcache::cooked_read_value): Likewise.
10537 (regcache::raw_write): Remove assert on m_readonly_p.
10538 (regcache::raw_supply_integer): Move it to
10539 detached_regcache::raw_supply_integer.
10540 (regcache::raw_supply_zeroed): Likewise.
10541 * regcache.h (detached_regcache) <raw_supply_integer>: New
10542 declaration.
10543 <raw_supply_zeroed, invalidate>: Likewise.
10544 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10545 <invalidate>: Likewise.
10546 <m_readonly_p>: Removed.
10547
10548 2018-02-21 Yao Qi <yao.qi@linaro.org>
10549
10550 * infcmd.c (get_return_value): Let stop_regs point to
10551 get_current_regcache.
10552 * regcache.c (regcache::regcache): Remove.
10553 (register_dump_reg_buffer): New class.
10554 (regcache_print): Adjust.
10555 * regcache.h (regcache): Remove constructors.
10556
10557 2018-02-21 Yao Qi <yao.qi@linaro.org>
10558
10559 * regcache.c (class register_dump): New class.
10560 (register_dump_regcache, register_dump_none): New class.
10561 (register_dump_remote, register_dump_groups): New class.
10562 (regcache_print): Update.
10563 * regcache.h (regcache_dump_what): Move it to regcache.c.
10564 (regcache) <dump>: Remove.
10565
10566 2018-02-21 Yao Qi <yao.qi@linaro.org>
10567
10568 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10569 reg_buffer_rw *.
10570 (jit_unwind_reg_set_impl): Call raw_supply.
10571 (jit_frame_sniffer): Use reg_buffer_rw.
10572 * record-full.c (record_full_core_regbuf): Change its type.
10573 (record_full_core_open_1): Use reg_buffer_rw.
10574 (record_full_close): Likewise.
10575 (record_full_core_fetch_registers): Use regcache->raw_supply.
10576 (record_full_core_store_registers): Likewise.
10577 * regcache.c (regcache::get_register_status): Move it to
10578 reg_buffer.
10579 (regcache_raw_set_cached_value): Remove.
10580 (regcache::raw_set_cached_value): Remove.
10581 (regcache::raw_write): Call raw_supply.
10582 (regcache::raw_supply): Move it to reg_buffer_rw.
10583 * regcache.h (regcache_raw_set_cached_value): Remove.
10584 (reg_buffer_rw): New class.
10585
10586 2018-02-21 Yao Qi <yao.qi@linaro.org>
10587
10588 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10589 readonly_detached_regcache.
10590 (dummy_frame_prev_register): Use regcache->cooked_read.
10591 * frame.c (frame_save_as_regcache): Change return type.
10592 (frame_pop): Update.
10593 * frame.h (frame_save_as_regcache): Update declaration.
10594 * inferior.h (get_infcall_suspend_state_regcache): Update
10595 declaration.
10596 * infrun.c (infcall_suspend_state) <registers>: use
10597 readonly_detached_regcache.
10598 (save_infcall_suspend_state): Don't use regcache_dup.
10599 (get_infcall_suspend_state_regcache): Change return type.
10600 * linux-fork.c (struct fork_info) <savedregs>: Change to
10601 readonly_detached_regcache.
10602 <pc>: New field.
10603 (fork_save_infrun_state): Don't use regcache_dup.
10604 (info_checkpoints_command): Adjust.
10605 * mi/mi-main.c (register_changed_p): Update declaration.
10606 (mi_cmd_data_list_changed_registers): Use
10607 readonly_detached_regcache.
10608 (register_changed_p): Change parameter type to
10609 readonly_detached_regcache.
10610 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10611 readonly_detached_regcache.
10612 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10613 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10614 New.
10615 (regcache::save): Move it to reg_buffer.
10616 (regcache::restore): Change parameter type.
10617 (regcache_dup): Remove.
10618 * regcache.h (reg_buffer) <save>: New method.
10619 (readonly_detached_regcache): New class.
10620 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10621 readonly_detached_regcache.
10622 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10623
10624 2018-02-21 Yao Qi <yao.qi@linaro.org>
10625
10626 * frame.c (frame_save_as_regcache): Use regcache method save.
10627 (frame_pop): Use regcache method restore.
10628 * infrun.c (restore_infcall_suspend_state): Likewise.
10629 * linux-fork.c (fork_load_infrun_state): Likewise.
10630 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10631 save.
10632 * regcache.c (regcache_save): Remove.
10633 (regcache::restore): More asserts.
10634 (regcache_cpy): Remove.
10635 * regcache.h (regcache_save): Remove the declaration.
10636 (regcache::restore): Move from private to public.
10637 Remove the friend declaration of regcache_cpy.
10638 (regcache_cpy): Remove declaration.
10639
10640 2018-02-21 Yao Qi <yao.qi@linaro.org>
10641
10642 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10643 parameter type to 'readable_regcache *'.
10644 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10645 * arm-tdep.c (arm_neon_quad_read): Likewise.
10646 (arm_pseudo_read): Likewise.
10647 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10648 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10649 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10650 * gdbarch.c: Re-generated.
10651 * gdbarch.h: Re-generated.
10652 * gdbarch.sh (pseudo_register_read): Change parameter type to
10653 'readable_regcache *'.
10654 (pseudo_register_read_value): Likewise.
10655 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10656 (h8300_pseudo_register_read): Likewise.
10657 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10658 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10659 (i386_pseudo_register_read_into_value): Likewise.
10660 (i386_pseudo_register_read_value): Likewise.
10661 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10662 declaration.
10663 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10664 * m32c-tdep.c (m32c_raw_read): Likewise.
10665 (m32c_read_flg): Likewise.
10666 (m32c_banked_register): Likewise.
10667 (m32c_banked_read): Likewise.
10668 (m32c_sb_read): Likewise.
10669 (m32c_part_read): Likewise.
10670 (m32c_cat_read): Likewise.
10671 (m32c_r3r2r1r0_read): Likewise.
10672 (m32c_pseudo_register_read): Likewise.
10673 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10674 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10675 (mep_pseudo_cr64_read): Likewise.
10676 (mep_pseudo_register_read): Likewise.
10677 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10678 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10679 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10680 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10681 (regcache::cooked_read): Likewise.
10682 (regcache::cooked_read_value): Likewise.
10683 (regcache_cooked_read_signed):
10684 (regcache::cooked_read): Likewise.
10685 * regcache.h (readable_regcache): New class.
10686 (regcache): Inherit readable_regcache. Move some methods to
10687 readable_regcache.
10688 * rl78-tdep.c (rl78_pseudo_register_read): Change
10689 parameter type to 'readable_regcache *'.
10690 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10691 (e500_pseudo_register_read): Change parameter type to
10692 'readable_regcache *'.
10693 (dfp_pseudo_register_read): Likewise.
10694 (vsx_pseudo_register_read): Likewise.
10695 (efpr_pseudo_register_read): Likewise.
10696 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10697 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10698 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10699 (sh64_pseudo_register_read): Likewise.
10700 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10701 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10702 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10703 (spu_pseudo_register_read): Likewise.
10704 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10705 (xtensa_pseudo_register_read): Likewise.
10706
10707 2018-02-21 Yao Qi <yao.qi@linaro.org>
10708
10709 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10710 (regcache::arch): Move it to reg_buffer::arch.
10711 (regcache::register_buffer): Likewise.
10712 (regcache::assert_regnum): Likewise.
10713 (regcache::num_raw_registers): Likewise.
10714 * regcache.h (reg_buffer): New class.
10715 (regcache): Inherit reg_buffer.
10716
10717 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10718
10719 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10720 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10721
10722 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10723
10724 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10725
10726 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10727
10728 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10729 (SFILES): Remove common/*.c files.
10730 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10731 * common/common.host: Add common reference.
10732 * configure.ac: Likewise.
10733 * configure: Regenerate.
10734
10735 2018-02-16 Yao Qi <yao.qi@linaro.org>
10736
10737 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10738 (block_initialize_namespace): Use new.
10739 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10740 (dwarf2_free_objfile): Use delete.
10741 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10742 (copy_type_recursive): Use new.
10743 * gdb_obstack.h (allocate_on_obstack): New.
10744
10745 2018-02-15 Yao Qi <yao.qi@linaro.org>
10746
10747 PR gdb/22849
10748 * inferior.c (exit_inferior_1): Reset inf->control.
10749
10750 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10751
10752 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10753 declaration.
10754
10755 2018-02-14 Pedro Alves <palves@redhat.com>
10756
10757 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10758 frame_cleanup_after_sniffer on exception.
10759
10760 2018-02-14 Tom Tromey <tom@tromey.com>
10761
10762 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10763 const.
10764 (solib_bfd_open): Make pathname const.
10765 * solib.c (solib_bfd_open): Make pathname const.
10766 * solib-spu.c (spu_bfd_fopen): Make name const.
10767 (spu_bfd_open): Make pathname const.
10768 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10769 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10770
10771 2018-02-14 Tom Tromey <tom@tromey.com>
10772
10773 * symfile.c (symfile_bfd_open): Update.
10774 * source.h (openp, source_full_path_of, find_and_open_source):
10775 Change argument type to unique_xmalloc_ptr.
10776 * source.c (openp): Take a unique_xmalloc_ptr.
10777 (source_full_path_of, find_and_open_source): Likewise.
10778 (open_source_file, symtab_to_fullname): Update.
10779 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10780 unique_xmalloc_ptr.
10781 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10782 (exec_file_find): Update.
10783 * psymtab.c (psymtab_to_fullname): Update.
10784 * nto-tdep.h (nto_find_and_open_solib): Update.
10785 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10786 unique_xmalloc_ptr.
10787 * exec.c (exec_file_attach): Update.
10788 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10789 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10790
10791 2018-02-14 Tom Tromey <tom@tromey.com>
10792
10793 * solib.c: Include source.h.
10794 * nto-tdep.c: Include source.h.
10795 * mi/mi-cmd-env.c: Include source.h.
10796 * infcmd.c: Include source.h.
10797 * exec.c: Include source.h.
10798 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10799 (add_path, directory_switch, source_path, init_source_path): Move
10800 declarations...
10801 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10802 (add_path, directory_switch, source_path, init_source_path):
10803 ...here.
10804
10805 2018-02-14 Tom Tromey <tom@tromey.com>
10806
10807 * solist.h (exec_file_find, solib_find): Return
10808 unique_xmalloc_ptr.
10809 (solib_bfd_fopen): Take a const char *.
10810 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10811 (exec_file_find, solib_find): Likewise.
10812 (solib_bfd_fopen): Do not take ownership of "pathname".
10813 (solib_bfd_open): Use unique_xmalloc_ptr.
10814 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10815 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10816 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10817 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10818
10819 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10820
10821 * ada-lang.c (name_match_type_from_name): Remove reference to
10822 ada_name_for_lookup in function's documentation.
10823 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10824
10825 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10826
10827 * defs.h (enum openp_flags): New enum.
10828 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10829 Move to enum openp_flags.
10830 (openp_flags): New enum flags.
10831 (openp): Change parameter type to openp_flags.
10832 * source.c (openp): Change parameter type to openp_flags.
10833 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10834 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10835
10836 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10837
10838 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10839 per-command.
10840
10841 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10842
10843 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10844 into...
10845 (class dwarf2_queue_guard): ...the destructor of this new class.
10846 (dw2_do_instantiate_symtab): Create instance of the new class
10847 dwarf2_queue_guard, remove cleanup.
10848
10849 2018-02-09 Tom Tromey <tom@tromey.com>
10850
10851 * source.c (find_source_lines): Don't reference past the end of
10852 the vector.
10853
10854 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10855
10856 * remote.c (remote_btrace_maybe_reopen): Change error message.
10857 * btrace.c (btrace_enable): Likewise.
10858 (parse_xml_btrace): Likewise.
10859 (parse_xml_btrace_conf): Likewise.
10860
10861 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10862
10863 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10864 (linux_enable_pt, linux_enable_bts): Call
10865 diagnose_perf_event_open_fail.
10866
10867 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10868
10869 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10870 Remove parameter and change return type. Update callers. Move it.
10871 (linux_enable_bts, linux_enable_pt): Improve error message.
10872 (linux_enable_pt): Remove zero buffer size check.
10873 (linux_enable_btrace): Improve error messages. Remove NULL return
10874 check.
10875
10876 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10877
10878 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10879 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10880 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10881 (linux_supports_pt, linux_supports_btrace): Remove.
10882 (linux_enable_bts): Call cpu_supports_bts.
10883 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10884 * remote.c (remote_supports_btrace): Remove.
10885 (init_remote_ops): Remove remote_supports_btrace.
10886 * target-delegates.c: Regenerated.
10887 * target.c (target_supports_btrace): Remove.
10888 * target.h (target_ops) <to_supports_btrace>: Remove
10889 (target_supports_btrace): Remove.
10890 * x86-linux-nat.c (x86_linux_create_target): Remove
10891 linux_supports_btrace.
10892
10893 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10894
10895 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10896 btrace failed.
10897 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10898 exception and use message in own exception.
10899
10900 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10901
10902 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10903 (perf_event_pt_event_type): Use gdb_file_up.
10904 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10905 scoped_fd, and scoped_mmap.
10906
10907 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10908
10909 * common/scoped_mmap.h: New.
10910 * unittests/scoped_mmap-selftest.c: New.
10911 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10912 unittests/scoped_mmap-selftest.c.
10913
10914 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10915
10916 * common/scoped_fd.h: New.
10917 * unittests/scoped_fd-selftest.c: New.
10918 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10919 unittests/scoped_fd-selftest.c.
10920
10921 2018-02-09 Tom Tromey <tom@tromey.com>
10922
10923 * auto-load.c (auto_load_section_scripts): Use
10924 gdb::unique_xmalloc_ptr.
10925
10926 2018-02-09 Tom Tromey <tom@tromey.com>
10927
10928 * auto-load.c (execute_script_contents): Use std::string.
10929
10930 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10931
10932 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10933 Python function, rather than a new command.
10934
10935 2018-02-08 Tom Tromey <tom@tromey.com>
10936
10937 * solib.c (solib_find_1): Use std::string.
10938 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10939
10940 2018-02-08 Tom Tromey <tom@tromey.com>
10941
10942 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10943
10944 2018-02-08 Tom Tromey <tom@tromey.com>
10945
10946 * source.c (find_source_lines): Use gdb::def_vector.
10947
10948 2018-02-08 Tom Tromey <tom@tromey.com>
10949
10950 * macrocmd.c (struct temporary_macro_definition): New.
10951 (macro_define_command): Use temporary_macro_definition. Remove
10952 cleanups.
10953 (free_macro_definition_ptr): Remove.
10954
10955 2018-02-08 Tom Tromey <tom@tromey.com>
10956
10957 * macroexp.c (maybe_expand): Use std::string.
10958
10959 2018-02-08 Tom Tromey <tom@tromey.com>
10960
10961 * macroexp.c (struct macro_buffer): Add initializers for some
10962 members.
10963 (init_buffer, init_shared_buffer, free_buffer)
10964 (free_buffer_return_text): Remove.
10965 (macro_buffer): New constructors.
10966 (~macro_buffer): New destructor.
10967 (macro_buffer::set_shared): New method.
10968 (macro_buffer::resize_buffer, macro_buffer::appendc)
10969 (macro_buffer::appendmem): Now methods, not free functions.
10970 (set_token, append_tokens_without_splicing, stringify)
10971 (macro_stringify): Update.
10972 (gather_arguments): Change return type. Remove argc_p argument,
10973 add args_ptr argument. Use std::vector.
10974 (substitute_args): Remove argc argument. Accept std::vector.
10975 (expand): Update. Use std::vector.
10976 (scan, macro_expand, macro_expand_next): Update.
10977
10978 2018-02-08 Tom Tromey <tom@tromey.com>
10979
10980 * symtab.c (default_collect_symbol_completion_matches_break_on):
10981 Use unique_xmalloc_ptr.
10982 * macroscope.h: (sal_macro_scope, user_macro_scope)
10983 (default_macro_scope): Return unique_xmalloc_ptr.
10984 * macroscope.c (sal_macro_scope, user_macro_scope)
10985 (default_macro_scope): Return unique_xmalloc_ptr.
10986 * macroexp.h (macro_expand, macro_expand_once): Return
10987 unique_xmalloc_ptr.
10988 * macroexp.c (macro_expand, macro_expand_once): Return
10989 unique_xmalloc_ptr.
10990 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10991 (info_macro_command, info_macros_command): Use
10992 unique_xmalloc_ptr.
10993 * compile/compile-c-support.c (write_macro_definitions): Use
10994 unique_xmalloc_ptr.
10995 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10996
10997 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10998
10999 * value.c (value_static_field): Assign field type instead of
11000 containing type when returning an optimized out value.
11001
11002 2018-02-06 Yao Qi <yao.qi@linaro.org>
11003
11004 * ft32-tdep.c (ft32_read_pc): Remove.
11005 (ft32_write_pc): Remove.
11006 (ft32_gdbarch_init): Update.
11007 * m32r-tdep.c (m32r_read_pc): Remove.
11008 (m32r_gdbarch_init): Update.
11009 * mep-tdep.c (mep_read_pc): Remove.
11010 (mep_gdbarch_init): Update.
11011 * microblaze-tdep.c (microblaze_write_pc): Remove.
11012 (microblaze_gdbarch_init): Update.
11013 * mn10300-tdep.c (mn10300_read_pc): Remove.
11014 (mn10300_write_pc): Remove.
11015 (mn10300_gdbarch_init): Update.
11016 * moxie-tdep.c (moxie_read_pc): Remove.
11017 (moxie_write_pc): Remove.
11018 (moxie_gdbarch_init): Update.
11019
11020 2018-02-06 Yao Qi <yao.qi@linaro.org>
11021
11022 * expprint.c (print_subexp_standard): Handle
11023 OP_F77_UNDETERMINED_ARGLIST.
11024 (dump_subexp_body_standard): Likewise.
11025
11026 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11027
11028 * target-descriptions.c (tdesc_element_visitor) Add empty
11029 implementations.
11030 (tdesc_type): Move make_gdb_type from here.
11031 (tdesc_type_builtin): Likewise.
11032 (tdesc_type_vector): Likewise.
11033 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11034 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11035 (make_gdb_type_union): Likewise.
11036 (make_gdb_type_flags): Likewise.
11037 (make_gdb_type_enum): Likewise.
11038 (make_gdb_type): New function.
11039 (tdesc_register_type): Use static make_gdb_type.
11040
11041 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11042
11043 * infcmd.c (default_print_one_register_info): Align natural-format
11044 column values consistently one under another.
11045 (pad_to_column): New function.
11046
11047 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11048
11049 * dwarf2read.c (dwarf2_physname): Move commment.
11050
11051 2018-02-01 Leszek Swirski <leszeks@google.com>
11052
11053 * varobj.c (varobj_formatted_print_options): Allow recursive
11054 pretty printing if pretty printing is enabled.
11055
11056 2018-02-01 Leszek Swirski <leszeks@google.com>
11057
11058 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11059 names after a structop as a filename.
11060
11061 2018-02-01 Yao Qi <yao.qi@linaro.org>
11062
11063 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11064 (arm_record_coproc_data_proc): Likewise.
11065
11066 2018-02-01 Yao Qi <yao.qi@linaro.org>
11067
11068 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11069
11070 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11071
11072 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11073 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11074
11075 2018-01-31 Pedro Alves <palves@redhat.com>
11076
11077 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11078 * inflow.c (child_terminal_save_inferior): Wrap reference to
11079 tcgetpgrp in HAVE_TERMIOS_H.
11080 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11081 _WIN32.
11082 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11083 always iterate over all inferiors.
11084 (gdbsim_cntrl_c): Adjust.
11085 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11086
11087 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11088
11089 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11090 index type is objfile-owned if the element type is as well.
11091
11092 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11093
11094 GDB 8.1 released.
11095
11096 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11097
11098 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11099 "features/s390x-linux64.c".
11100 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11101 s390_linux32 and s390x_linux64.
11102 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11103 default tdesc.
11104 * s390-tdep.c: Include "features/s390-linux32.c" and
11105 "features/s390x-linux64.c".
11106 (s390_tdesc_valid): Add check for tdesc_has_registers.
11107 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11108 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11109 tdesc_s390x_linux64.
11110 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11111 tdesc_s390x_linux64 to...
11112 * s390-tdep.h: ...here.
11113
11114 2018-01-30 Pedro Alves <palves@redhat.com>
11115
11116 PR gdb/13211
11117 * config.in, configure: Regenerate.
11118 * configure.ac: Check for getpgid.
11119 * go32-nat.c (go32_pass_ctrlc): New.
11120 (go32_target): Install it.
11121 * inf-child.c (inf_child_target): Install
11122 child_terminal_save_inferior, child_pass_ctrlc and
11123 child_interrupt.
11124 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11125 (inf_ptrace_target): No longer install it.
11126 * infcmd.c (interrupt_target_1): Adjust.
11127 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11128 (child_interrupt): Declare.
11129 (inferior::terminal_state): New.
11130 * inflow.c (struct terminal_info): Update comments.
11131 (inferior_process_group): Delete.
11132 (terminal_is_ours): Delete.
11133 (gdb_tty_state): New.
11134 (child_terminal_init): Adjust.
11135 (is_gdb_terminal, sharing_input_terminal_1)
11136 (sharing_input_terminal): New functions.
11137 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11138 Set the process's actual process group in the foreground if
11139 possible. Handle is_ours_for_output/is_ours distinction. Don't
11140 mark terminal as the inferior's if not sharing GDB's terminal.
11141 Don't check attach_flag.
11142 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11143 pass down a target_terminal_state.
11144 (child_terminal_save_inferior): New, factored out from ...
11145 (child_terminal_ours_1): ... this. Handle
11146 target_terminal_state::is_ours_for_output.
11147 (child_interrupt, child_pass_ctrlc): New.
11148 (inflow_inferior_exit): Clear the inferior's terminal_state.
11149 (copy_terminal_info): Copy the inferior's terminal state.
11150 (_initialize_inflow): Remove reference to terminal_is_ours.
11151 * inflow.h (inferior_process_group): Delete.
11152 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11153 * procfs.c (procfs_target): Don't install procfs_interrupt.
11154 (procfs_interrupt): Delete.
11155 * remote.c (remote_serial_quit_handler): Adjust.
11156 (remote_interrupt): Remove ptid parameter. Adjust.
11157 * target-delegates.c: Regenerate.
11158 * target.c: Include "terminal.h".
11159 (target_terminal::terminal_state): Rename to ...
11160 (target_terminal::m_terminal_state): ... this.
11161 (target_terminal::init): Adjust.
11162 (target_terminal::inferior): Adjust to per-inferior
11163 terminal_state.
11164 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11165 (target_terminal::ours, target_terminal::ours_for_output): Use
11166 target_terminal_is_ours_kind.
11167 (target_interrupt): Remove ptid parameter. Adjust.
11168 (default_target_pass_ctrlc): Adjust.
11169 * target.h (target_ops::to_terminal_save_inferior): New field.
11170 (target_ops::to_interrupt): Remove ptid_t parameter.
11171 (target_interrupt): Remove ptid_t parameter. Update comment.
11172 (target_pass_ctrlc): Update comment.
11173 * target/target.h (target_terminal_state): New scoped enum,
11174 factored out of ...
11175 (target_terminal::terminal_state): ... here.
11176 (target_terminal::inferior): Update comments.
11177 (target_terminal::restore_inferior): New.
11178 (target_terminal::is_inferior, target_terminal::is_ours)
11179 (target_terminal::is_ours_for_output): Adjust.
11180 (target_terminal::scoped_restore_terminal_state): Adjust to
11181 rename, and call restore_inferior() instead of inferior().
11182 (target_terminal::scoped_restore_terminal_state::m_state): Change
11183 type.
11184 (target_terminal::terminal_state): Rename to ...
11185 (target_terminal::m_terminal_state): ... this and change type.
11186
11187 2018-01-30 Pedro Alves <palves@redhat.com>
11188
11189 * linux-nat.c (wait_for_signal): New function.
11190 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11191 directly.
11192 (async_terminal_is_ours)
11193 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11194 (linux_nat_add_target): Don't override
11195 to_terminal_inferior/to_terminal_ours.
11196
11197 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11198
11199 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11200
11201 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11202
11203 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11204 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11205 dwarf2_per_objfile_free here.
11206 (dwarf2_per_objfile_free): Remove.
11207 (_initialize_dwarf2_read): Don't register
11208 dwarf2_per_objfile_free as a registry cleanup.
11209
11210 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11211
11212 Avoid compilation errors in MinGW native builds
11213
11214 The error is triggered by including python-internal.h, and the
11215 error message is:
11216
11217 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11218 from build-gnulib/import/math.h:27,
11219 from d:/usr/Python26/include/pyport.h:235,
11220 from d:/usr/Python26/include/Python.h:58,
11221 from python/python-internal.h:94,
11222 from python/py-arch.c:24:
11223 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11224 using ::hypot;
11225 ^~~~~
11226
11227 This happens because Python headers define 'hypot' to expand t
11228 '_hypot' in the Windows builds.
11229 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11230 'hypoth'. This avoids a compilation error.
11231
11232 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11233
11234 * MAINTAINERS (Write After Approval): Fix ordering.
11235
11236 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11237
11238 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11239
11240 2018-01-26 Alan Modra <amodra@gmail.com>
11241
11242 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11243 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11244 Remove nop. Make const. Comment.
11245 (powerpc32_plt_stub_so_2): New.
11246 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11247 Correct count. Update uses.
11248 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11249 Move common code reading PLT entry word. Correct
11250 powerpc32_plt_stub PLT address calculation.
11251 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11252 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11253 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11254 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11255 (ppc64_standard_linkage8): Likewise.
11256 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11257 Correct insns description.
11258 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11259
11260 2018-01-24 Pedro Alves <palves@redhat.com>
11261
11262 GCC PR libstdc++/83906
11263 * gdbtypes.c (operator==(const dynamic_prop &,
11264 const dynamic_prop &)): New.
11265 (operator==(const range_bounds &, const range_bounds &)): New.
11266 (check_types_equal): Use them instead of memcmp.
11267 * gdbtypes.h (operator==(const dynamic_prop &,
11268 const dynamic_prop &)): Declare.
11269 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11270 (operator==(const range_bounds &, const range_bounds &)): Declare.
11271 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11272
11273 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11274
11275 * s390-linux-tdep.c (s390_record_address_mask)
11276 (s390_record_calc_disp_common, s390_record_calc_disp)
11277 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11278 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11279 (s390_process_record): Move to s390-tdep.c.
11280 (s390_linux_init_abi_any): Adjust.
11281 * s390-tdep.c (s390_record_address_mask)
11282 (s390_record_calc_disp_common, s390_record_calc_disp)
11283 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11284 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11285 (s390_process_record): Moved from s390-linux-tdep.c
11286 (s390_gdbarch_init): Adjust.
11287
11288 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11289
11290 * s390-linux-nat.c (s390-tdep.h): New include.
11291 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11292 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11293 (ALLDEPFILES): Add s390-tdep.c.
11294 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11295 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11296 * s390-tdep.h: ...this. New file.
11297 * s390-linux-tdep.c (s390-tdep.h): New include.
11298 (_initialize_s390_tdep): Rename to...
11299 (_initialize_s390_linux_tdep): ...this and adjust.
11300 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11301 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11302 s390-tdep.h.
11303 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11304 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11305 (s390_is_partial_instruction, s390_software_single_step)
11306 (is_non_branch_ril, s390_displaced_step_copy_insn)
11307 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11308 (s390_prologue_data, s390_addr, s390_store, s390_load)
11309 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11310 (s390_register_call_saved, s390_guess_tracepoint_registers)
11311 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11312 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11313 (s390_pseudo_register_name, s390_pseudo_register_type)
11314 (s390_pseudo_register_read, s390_pseudo_register_write)
11315 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11316 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11317 (s390_addr_bits_remove, s390_address_class_type_flags)
11318 (s390_address_class_type_flags_to_name)
11319 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11320 (s390_function_arg_float, s390_function_arg_vector)
11321 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11322 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11323 (s390_frame_align, s390_register_return_value, s390_return_value)
11324 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11325 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11326 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11327 (s390_trad_frame_prev_register, s390_unwind_cache)
11328 (s390_prologue_frame_unwind_cache)
11329 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11330 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11331 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11332 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11333 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11334 (s390_frame_base_address, s390_local_base_address)
11335 (s390_frame_base, s390_gcc_target_options)
11336 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11337 (s390_validate_reg_range, s390_tdesc_valid)
11338 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11339 * s390-tdep.c: ...this. New file.
11340
11341 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11342
11343 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11344 (s390_process_record, s390_gdbarch_tdep_alloc)
11345 (s390_linux_init_abi_any): Use/set new hook.
11346
11347 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11348
11349 * s390-linux-tdep.c (osabi.h): New include.
11350 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11351 (s390_linux_init_abi_any): New functions.
11352 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11353
11354 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11355
11356 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11357 tdesc_has_registers check
11358
11359 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11360
11361 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11362 (s390_validate_reg_range): New macro.
11363 (s390_gdbarch_init): Adjust.
11364
11365 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11366
11367 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11368 (s390_gdbarch_tdep_alloc): Adjust.
11369 (s390_gdbarch_init): Adjust.
11370
11371 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11372
11373 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11374 <have_tdb>: Change type to bool.
11375 (s390_gdbarch_tdep_alloc): Adjust.
11376 (s390_gdbarch_init): Adjust.
11377
11378 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11379
11380 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11381 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11382 (s390_gdbarch_tdep_alloc): New function.
11383 (s390_gdbarch_init): Allocate tdep at start and use its fields
11384 instead of separate variables.
11385
11386 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11387
11388 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11389 when looking for cached gdbarch and add comment for remaining.
11390
11391 2018-01-22 Pedro Alves <palves@redhat.com>
11392 Sergio Durigan Junior <sergiodj@redhat.com>
11393
11394 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11395 case.
11396
11397 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11398
11399 * MAINTAINERS: Update my company e-mail address.
11400
11401 2018-01-22 Yao Qi <yao.qi@linaro.org>
11402
11403 * regcache.c (cooked_write_test): New function.
11404 (_initialize_regcache): Register the test.
11405
11406 2018-01-22 Yao Qi <yao.qi@linaro.org>
11407
11408 * ia64-tdep.c (ia64_pseudo_register_read): Call
11409 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11410 * m32c-tdep.c (m32c_cat_read): Likewise.
11411 (m32c_r3r2r1r0_read): Likewise.
11412 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11413 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11414
11415 2018-01-22 Yao Qi <yao.qi@linaro.org>
11416
11417 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11418 method raw_read instead of regcache_raw_read.
11419 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11420 * arm-tdep.c (arm_neon_quad_read): Likewise.
11421 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11422 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11423 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11424 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11425 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11426 (i386_pseudo_register_read_into_value): Likewise.
11427 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11428 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11429 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11430 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11431 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11432 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11433 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11434 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11435 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11436
11437 2018-01-22 Yao Qi <yao.qi@linaro.org>
11438
11439 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11440 * configure.tgt: Remove target mt.
11441 * mt-tdep.c: Remove.
11442 * regcache.c (cooked_read_test): Remove the check for mt.
11443
11444 2018-01-22 Yao Qi <yao.qi@linaro.org>
11445
11446 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11447 instead of gdbarch_pseudo_register_read_value.
11448
11449 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11450
11451 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11452 language is Ada.
11453
11454 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11455
11456 * linespec.c (create_sals_line_offset): Remove code that preserved
11457 the symtab_and_line's line number.
11458
11459 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11460
11461 * varobj.c (varobj_create): Don't set valid_block when creating a
11462 floating varobj.
11463
11464 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11465
11466 * varobj.c (varobj_create): Remove out of date comment.
11467
11468 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11469
11470 PR mi/20395
11471 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11472 updating innermost block.
11473 * parse.c (innermost_block_tracker::update): Take extra type
11474 parameter, and check types match before updating innermost block.
11475 (write_dollar_variable): Update innermost block for registers.
11476 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11477 (innermost_block_tracker::innermost_block_tracker): Initialise
11478 m_types member.
11479 (innermost_block_tracker::reset): Take type parameter.
11480 (innermost_block_tracker::update): Take type parameter, and pass
11481 type through as needed.
11482 (innermost_block_tracker::m_types): New member.
11483 * varobj.c (varobj_create): Pass type when reseting innermost
11484 block.
11485
11486 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11487
11488 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11489 * ada-lang.c (resolve_subexp): Likewise.
11490 * breakpoint.c (set_breakpoint_condition) Likewise.
11491 (watch_command_1) Likewise.
11492 * c-exp.y (variable): Likewise.
11493 * d-exp.y (PrimaryExpression): Likewise.
11494 * f-exp.y (variable): Likewise.
11495 * go-exp.y (variable): Likewise.
11496 * m2-exp.y (variable): Likewise.
11497 * objfiles.c (objfile::~objfile): Likewise.
11498 * p-exp.y (variable): Likewise.
11499 * parse.c (innermost_block): Change type.
11500 * parser-defs.h (class innermost_block_tracker): New.
11501 (innermost_block): Change to innermost_block_tracker.
11502 * printcmd.c (display_command): Switch to innermost_block API.
11503 (do_one_display): Likewise.
11504 * rust-exp.y (do_one_display): Likewise.
11505 * symfile.c (clear_symtab_users): Likewise.
11506 * varobj.c (varobj_create): Switch to innermost_block API, replace
11507 use of innermost_block with block stored on varobj object.
11508
11509 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11510
11511 * expression.h (innermost_block): Remove declaration.
11512 * varobj.c: Add 'parser-defs.h' include.
11513
11514 2018-01-19 Tom Tromey <tom@tromey.com>
11515
11516 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11517 symbols in the static and global blocks.
11518
11519 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11520
11521 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11522 gdb_ptrace.h, and move including gdb_wait.h ...
11523 * nat/linux-ptrace.h: ... to here.
11524
11525 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11526
11527 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11528 inf_ptrace_detach_success.
11529 (inf_ptrace_detach_success): Add inferior parameter, use it
11530 instead of inferior_ptid, pass it to detach_inferior.
11531 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11532 parameter.
11533 * inferior.c (detach_inferior): Add overload that takes an
11534 inferior object.
11535 * inferior.h (detach_inferior): Likewise.
11536 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11537 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11538 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11539
11540 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11541
11542 * target.h (struct target_ops) <to_detach>: Add inferior
11543 parameter.
11544 (target_detach): Likewise.
11545 * target.c (dispose_inferior): Pass inferior down.
11546 (target_detach): Pass inferior down. Assert that it is equal to
11547 the current inferior.
11548 * aix-thread.c (aix_thread_detach): Pass inferior down.
11549 * corefile.c (core_file_command): Pass current_inferior() down.
11550 * corelow.c (core_detach): Add inferior parameter.
11551 * darwin-nat.c (darwin_detach): Likewise.
11552 * gnu-nat.c (gnu_detach): Likewise.
11553 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11554 * infcmd.c (detach_command): Pass current_inferior() down to
11555 target_detach.
11556 * infrun.c (follow_fork_inferior): Pass parent_inf to
11557 target_detach.
11558 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11559 target_detach.
11560 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11561 * linux-thread-db.c (thread_db_detach): Likewise.
11562 * nto-procfs.c (procfs_detach): Likewise.
11563 * procfs.c (procfs_detach): Likewise.
11564 * record.c (record_detach): Likewise.
11565 * record.h (struct inferior): Forward-declare.
11566 (record_detach): Add inferior parameter.
11567 * remote-sim.c (gdbsim_detach): Likewise.
11568 * remote.c (remote_detach_1): Likewise.
11569 (remote_detach): Likewise.
11570 (extended_remote_detach): Likewise.
11571 * sol-thread.c (sol_thread_detach): Likewise.
11572 * target-debug.h (target_debug_print_inferior_p): New macro.
11573 * target-delegates.c: Re-generate.
11574 * top.c (kill_or_detach): Pass inferior down to target_detach.
11575 * windows-nat.c (windows_detach): Add inferior parameter.
11576
11577 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11578
11579 * target.h (struct target_ops) <to_detach>: Remove args
11580 parameter.
11581 (target_detach): Likewise.
11582 * target.c (dispose_inferior): Adjust.
11583 (target_detach): Remove args parameter, adjust.
11584 * aix-thread.c (aix_thread_detach): Adjust.
11585 * corefile.c (core_file_command): Adjust.
11586 * corelow.c (core_detach): Adjust.
11587 * darwin-nat.c (darwin_detach): Adjust.
11588 * gnu-nat.c (gnu_detach): Adjust.
11589 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11590 * infcmd.c (detach_command): Adjust
11591 * infrun.c (follow_fork_inferior): Adjust.
11592 (handle_vfork_child_exec_or_exit): Adjust.
11593 * linux-fork.c (linux_fork_detach): Remove args parameter.
11594 * linux-fork.h (linux_fork_detach): Likewise.
11595 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11596 * linux-thread-db.c (thread_db_detach): Likewise.
11597 * nto-procfs.c (procfs_detach): Likewise.
11598 * procfs.c (procfs_detach): Likewise.
11599 (do_detach): Remove signo parameter.
11600 * record.c (record_detach): Remove args parameter.
11601 * record.h (record_detach): Likewise.
11602 * remote-sim.c (gdbsim_detach): Likewise.
11603 * remote.c (remote_detach_1): Likewise.
11604 (remote_detach): Likewise.
11605 (extended_remote_detach): Likewise.
11606 * sol-thread.c (sol_thread_detach): Likewise.
11607 * target-delegates.c: Re-generate.
11608 * top.c (struct qt_args) <args>: Remove field.
11609 (kill_or_detach): Don't pass args.
11610 (quit_force): Don't set args.
11611 * windows-nat.c (windows_detach): Remove args parameter.
11612
11613 2018-01-19 Yao Qi <yao.qi@linaro.org>
11614
11615 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11616 (arm_linux_init_abi): Install it.
11617
11618 2018-01-19 Yao Qi <yao.qi@linaro.org>
11619
11620 * osabi.c (gdb_osabi_names): Extend the regexp for
11621 arm-linux-gnueabihf.
11622
11623 2018-01-18 Yao Qi <yao.qi@linaro.org>
11624
11625 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11626 m_abbrevs.
11627 (abbrev_table::add_abbrev): Update.
11628 (abbrev_table::lookup_abbrev): Update.
11629
11630 2018-01-18 Yao Qi <yao.qi@linaro.org>
11631
11632 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11633
11634 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11635
11636 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11637 to "std::string".
11638
11639 2018-01-17 Tom Tromey <tom@tromey.com>
11640
11641 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11642
11643 2018-01-17 Tom Tromey <tom@tromey.com>
11644
11645 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11646 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11647 (create_array_type_with_stride): Update.
11648 * dwarf2read.c (set_die_type): Update.
11649
11650 2018-01-17 Tom Tromey <tom@tromey.com>
11651
11652 * dwarf2read.c (delayed_method_info): Remove typedef.
11653 (dwarf2_cu::method_info): Now a std::vector.
11654 (add_to_method_list): Update.
11655 (free_delayed_list): Remove.
11656 (compute_delayed_physnames): Update.
11657 (process_full_comp_unit, process_full_type_unit): Clear the method
11658 list. Remove cleanups.
11659 (psymtab_include_file_name): Add name_holder parameter. Use
11660 unique_xmalloc_ptr.
11661 (dwarf_decode_lines): Update.
11662
11663 2018-01-17 Tom Tromey <tom@tromey.com>
11664 Simon Marchi <simon.marchi@ericsson.com>
11665
11666 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11667 (dwarf2_per_objfile::free_cached_comp_units)
11668 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11669 (init_cutu_and_read_dies_no_follow): Update.
11670 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11671 (dwarf2_cu::~dwarf2_cu): New.
11672 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11673 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11674
11675 2018-01-17 Tom Tromey <tom@tromey.com>
11676 Simon Marchi <simon.marchi@ericsson.com>
11677
11678 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11679 (struct die_reader_specs) <abbrev_table>: New member.
11680 (struct abbrev_table): Add constructor.
11681 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11682 <abbrev_obstack>: Now an auto_obstack.
11683 (abbrev_table_up): New typedef.
11684 (init_cu_die_reader): Add abbrev_table parameter.
11685 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11686 Add result_dwo_abbrev_table.
11687 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11688 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11689 Update.
11690 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11691 parameter.
11692 (skip_children): Update.
11693 (abbrev_table::alloc_abbrev): Rename from
11694 abbrev_table_alloc_abbrev.
11695 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11696 (abbrev_table::lookup_abbrev): Rename from
11697 abbrev_table_lookup_abbrev.
11698 (abbrev_table_read_table): Return abbrev_table_up.
11699 (abbrev_table_free, abbrev_table_free_cleanup)
11700 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11701 (load_partial_dies): Update.
11702
11703 2018-01-17 Tom Tromey <tom@tromey.com>
11704
11705 * dwarf2read.c (dwarf2_compute_name): Update comment.
11706 (read_func_scope, read_variable): Update.
11707 (new_symbol): Remove.
11708 (new_symbol_full): Rename to new_symbol.
11709
11710 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11711
11712 PR gdb/16577
11713 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11714 a warning instead of throwing an error, set section size to 0 and return
11715 NULL.
11716 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11717
11718 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11719
11720 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11721 std::string.
11722 (linux_ptrace_attach_fail_reason_string): Likewise.
11723 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11724 Likewise.
11725 (linux_ptrace_attach_fail_reason_string): Likewise.
11726 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11727
11728 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11729
11730 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11731
11732 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11733
11734 PR gdb/21559
11735 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11736 checking for fs_base/gs_base fields in struct user_regs_struct.
11737 * configure: Regenerate.
11738
11739 2018-01-17 Yao Qi <yao.qi@linaro.org>
11740
11741 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11742 function.
11743 (aarch64_linux_init_abi): Install it to gdbarch hook
11744 gcc_target_options.
11745
11746 2018-01-15 Pedro Alves <palves@redhat.com>
11747
11748 * common/signals-state-save-restore.c
11749 (save_original_signals_state): Fix typos.
11750
11751 2017-01-12 Tom Tromey <tom@tromey.com>
11752 Sergio Durigan Junior <sergiodj@redhat.com>
11753
11754 * Makefile.in (install-only): Install gdb-add-index.
11755
11756 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11757
11758 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11759
11760 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11761
11762 * infrun.c (keep_going_pass_signal): Clear step-over info when
11763 insert_breakpoints fails.
11764
11765 2018-01-11 Pedro Alves <palves@redhat.com>
11766
11767 PR gdb/22583
11768 * infrun.c (resume): Rename to ...
11769 (resume_1): ... this.
11770 (resume): Reimplement as wrapper around resume_1.
11771
11772 2018-01-11 Pedro Alves <palves@redhat.com>
11773
11774 PR remote/22597
11775 * remote.c (remote_parse_stop_reply): Default to the last-set
11776 general thread instead of to 'magic_null_ptid'.
11777
11778 2018-01-10 Pedro Alves <palves@redhat.com>
11779
11780 * language.h (language_get_symbol_name_matcher): Rename ...
11781 (get_symbol_name_matcher): ... this.
11782 * language.c (language_get_symbol_name_matcher): Ditto.
11783 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11784 callers adjusted.
11785
11786 2018-01-10 Pedro Alves <palves@redhat.com>
11787
11788 PR gdb/22670
11789 * dwarf2read.c
11790 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11791 Adjust to use language_get_symbol_name_matcher instead of
11792 language_defn::la_get_symbol_name_matcher.
11793 * language.c (language_get_symbol_name_matcher): If in Ada mode
11794 and the lookup name is a verbatim match, return Ada's matcher.
11795 * language.h (language_get_symbol_name_matcher): Adjust comment.
11796 (ada_lookup_name_info::verbatim_p):: New method.
11797
11798 2018-01-10 Pedro Alves <palves@redhat.com>
11799
11800 PR gdb/22670
11801 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11802 minsym's language is language_auto or language_cplus, pass down
11803 language_ada instead.
11804 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11805
11806 2018-01-10 Pedro Alves <palves@redhat.com>
11807
11808 PR gdb/22670
11809 * minsyms.c (linkage_name_str): New function.
11810 (iterate_over_minimal_symbols): Use it.
11811
11812 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11813
11814 * NEWS: Document that 'info proc' now works on FreeBSD.
11815
11816 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11817
11818 * configure.ac: Check for kinfo_getfile in libutil.
11819 * configure: Regenerate.
11820 * config.in: Regenerate.
11821 * fbsd-nat.c: Include "fbsd-tdep.h".
11822 (fbsd_fetch_cmdline): New.
11823 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11824 rather than calling error.
11825 (fbsd_info_proc): New.
11826 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11827 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11828 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11829
11830 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11831
11832 * fbsd-nat.c (struct free_deleter): Remove.
11833 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11834
11835 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11836
11837 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11838 NULL for an empty pathname.
11839
11840 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11841
11842 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11843 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11844 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11845 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11846 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11847 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11848 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11849 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11850 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11851 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11852 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11853 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11854 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11855 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11856 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11857
11858 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11859
11860 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11861 (gnu_xfer_auxv): New function.
11862 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11863 TARGET_OBJECT_AUXV.
11864
11865 2018-01-08 Yao Qi <yao.qi@linaro.org>
11866 Simon Marchi <simon.marchi@ericsson.com>
11867
11868 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11869 common/selftest.c.
11870 (COMMON_OBS): Remove selftest.o.
11871 * configure.ac: Append selftest-arch.c and common/selftest.c to
11872 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11873 * configure: Re-generated.
11874 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11875 GDB_SELF_TEST.
11876 (maintenance_info_selftests): Likewise.
11877
11878 2018-01-08 Xavier Roirand <roirand@adacore.com>
11879
11880 * ada-valprint.c (val_print_packed_array_elements): Use
11881 proper number of elements when printing an array indexed
11882 by an enumeration type.
11883
11884 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11885
11886 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11887 (dw2_get_file_names_reader): Adjust.
11888 (lookup_dwo_signatured_type): Adjust.
11889 (lookup_dwp_signatured_type): Adjust.
11890 (lookup_signatured_type): Adjust.
11891 (create_type_unit_group): Adjust.
11892 (get_type_unit_group): Adjust.
11893 (process_psymtab_comp_unit_reader): Adjust.
11894 (build_type_psymtabs_reader): Adjust.
11895 (scan_partial_symbols): Adjust.
11896 (add_partial_symbol): Adjust.
11897 (add_partial_subprogram): Adjust.
11898 (peek_die_abbrev): Adjust.
11899 (fixup_go_packaging): Adjust.
11900 (process_imported_unit_die): Adjust.
11901 (dwarf2_compute_name): Adjust.
11902 (dwarf2_physname): Adjust.
11903 (read_import_statement): Adjust.
11904 (handle_DW_AT_stmt_list): Adjust.
11905 (read_file_scope): Adjust.
11906 (read_func_scope): Adjust.
11907 (read_lexical_block_scope): Adjust.
11908 (read_call_site_scope): Adjust.
11909 (read_variable): Adjust.
11910 (dwarf2_rnglists_process): Adjust.
11911 (dwarf2_ranges_process): Adjust.
11912 (dwarf2_ranges_read): Adjust.
11913 (dwarf2_get_pc_bounds): Adjust.
11914 (dwarf2_record_block_ranges): Adjust.
11915 (dwarf2_add_field): Adjust.
11916 (dwarf2_add_member_fn): Adjust.
11917 (read_structure_type): Adjust.
11918 (process_structure_scope): Adjust.
11919 (read_enumeration_type): Adjust.
11920 (read_array_type): Adjust.
11921 (mark_common_block_symbol_computed): Adjust.
11922 (read_common_block): Adjust.
11923 (read_namespace_type): Adjust.
11924 (read_namespace): Adjust.
11925 (read_module_type): Adjust.
11926 (read_tag_pointer_type): Adjust.
11927 (read_tag_ptr_to_member_type): Adjust.
11928 (read_tag_string_type): Adjust.
11929 (read_subroutine_type): Adjust.
11930 (read_typedef): Adjust.
11931 (read_base_type): Adjust.
11932 (attr_to_dynamic_prop): Adjust.
11933 (read_subrange_type): Adjust.
11934 (read_unspecified_type): Adjust.
11935 (dwarf2_read_abbrevs): Adjust.
11936 (load_partial_dies): Adjust.
11937 (read_partial_die): Adjust.
11938 (find_partial_die): Adjust.
11939 (guess_partial_die_structure_name): Adjust.
11940 (fixup_partial_die): Adjust.
11941 (read_attribute_value): Adjust.
11942 (read_addr_index): Adjust.
11943 (read_addr_index_from_leb128): Adjust.
11944 (read_str_index): Adjust.
11945 (dwarf2_string_attr): Adjust.
11946 (get_debug_line_section): Adjust.
11947 (dwarf_decode_line_header): Adjust.
11948 (lnp_state_machine::check_line_address): Adjust.
11949 (dwarf_decode_lines_1): Adjust.
11950 (dwarf_decode_lines): Adjust.
11951 (dwarf2_start_symtab): Adjust.
11952 (var_decode_location): Adjust.
11953 (new_symbol_full): Adjust.
11954 (dwarf2_const_value_data): Adjust.
11955 (dwarf2_const_value_attr): Adjust.
11956 (dwarf2_const_value): Adjust.
11957 (die_type): Adjust.
11958 (die_containing_type): Adjust.
11959 (build_error_marker_type): Adjust.
11960 (lookup_die_type): Adjust.
11961 (guess_full_die_structure_name): Adjust.
11962 (anonymous_struct_prefix): Adjust.
11963 (determine_prefix): Adjust.
11964 (dwarf2_name): Adjust.
11965 (follow_die_ref_or_sig): Adjust.
11966 (follow_die_offset): Adjust.
11967 (follow_die_ref): Adjust.
11968 (follow_die_sig_1): Adjust.
11969 (follow_die_sig): Adjust.
11970 (get_signatured_type): Adjust.
11971 (get_DW_AT_signature_type): Adjust.
11972 (decode_locdesc): Adjust.
11973 (dwarf_decode_macros): Adjust.
11974 (cu_debug_loc_section): Adjust.
11975 (fill_in_loclist_baton): Adjust.
11976 (dwarf2_symbol_mark_computed): Adjust.
11977 (init_one_comp_unit): Don't assign
11978 dwarf2_cu::dwarf2_per_objfile.
11979 (set_die_type): Adjust.
11980
11981 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11982
11983 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11984 <dwarf2_per_objfile>: New field.
11985 (dwarf2_per_objfile): Remove global.
11986 (get_dwarf2_per_objfile): New function.
11987 (set_dwarf2_per_objfile): New function.
11988 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11989 dwarf2_per_objfile.
11990 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11991 (read_abbrev_offset): Likewise.
11992 (read_indirect_string): Likewise.
11993 (read_indirect_line_string): Likewise.
11994 (read_indirect_string_at_offset): Likewise.
11995 (read_indirect_string_from_dwz): Likewise.
11996 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11997 dwarf2_per_objfile.
11998 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11999 (create_all_comp_units): Change objfile parameter to
12000 dwarf2_per_objfile.
12001 (create_all_type_units): Likewise.
12002 (process_queue): Add dwarf2_per_objfile parameter.
12003 (read_and_check_comp_unit_head): Likewise.
12004 (lookup_dwo_unit_in_dwp): Likewise.
12005 (get_dwp_file): Likewise.
12006 (process_cu_includes): Likewise.
12007 (struct free_dwo_file_cleanup_data): New struct.
12008 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12009 set_dwarf2_per_objfile.
12010 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12011 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12012 context, adjust calls.
12013 (dw2_instantiate_symtab): Likewise.
12014 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12015 (dw2_get_cu): Likewise.
12016 (create_cu_from_index_list): Change objfile parameter to
12017 dwarf2_per_objfile.
12018 (create_cus_from_index_list): Get dwarf2_per_objfile from
12019 context, adjust calls.
12020 (create_cus_from_index): Likewise.
12021 (create_signatured_type_table_from_index): Change objfile
12022 parameter to dwarf2_per_objfile.
12023 (create_signatured_type_table_from_debug_names): Change objfile
12024 parameter to dwarf2_per_objfile.
12025 (create_addrmap_from_index): Likewise.
12026 (create_addrmap_from_aranges): Likewise.
12027 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12028 (dw2_setup): Remove.
12029 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12030 context.
12031 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12032 get_dwarf2_per_objfile.
12033 (dw2_forget_cached_source_info): Likewise.
12034 (dw2_map_symtabs_matching_filename): Likewise.
12035 (struct dw2_symtab_iterator) <index>: Remove.
12036 <dwarf2_per_objfile>: New field.
12037 (dw2_symtab_iter_init): Replace index parameter with
12038 dwarf2_per_objfile.
12039 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12040 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12041 (dw2_print_stats): Likewise.
12042 (dw2_dump): Likewise.
12043 (dw2_expand_symtabs_for_function): Likewise.
12044 (dw2_expand_all_symtabs): Likewise.
12045 (dw2_expand_symtabs_with_fullname): Likewise.
12046 (dw2_expand_marked_cus): Replace index and objfile parameters
12047 with dwarf2_per_objfile.
12048 (dw_expand_symtabs_matching_file_matcher): Add
12049 dwarf2_per_objfile parameter and adjust calls.
12050 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12051 adjust calls.
12052 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12053 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12054 adjust calls.
12055 (create_cus_from_debug_names_list): Replace objfile parameter
12056 with dwarf2_per_objfile and adjust calls.
12057 (create_cus_from_debug_names): Likewise.
12058 (dwarf2_read_debug_names): Likewise.
12059 (mapped_debug_names::namei_to_name): Adjust call.
12060 (dw2_debug_names_iterator::next): Likewise.
12061 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12062 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12063 (dw2_debug_names_dump): Likewise.
12064 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12065 (dw2_debug_names_expand_symtabs_matching): Likewise.
12066 (dwarf2_initialize_objfile): Likewise.
12067 (dwarf2_build_psymtabs): Likewise.
12068 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12069 this_cu.
12070 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12071 (read_and_check_comp_unit_head): Likewise.
12072 (read_abbrev_offset): Likewise.
12073 (create_debug_type_hash_table): Likewise.
12074 (create_debug_types_hash_table): Likewise.
12075 (create_all_type_units): Replace objfile parameter with
12076 dwarf2_per_objfile.
12077 (add_type_unit): Add dwarf2_per_objfile parameter.
12078 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12079 with dwarf2_per_objfile.
12080 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12081 (lookup_dwp_signatured_type): Likewise.
12082 (lookup_signatured_type): Likewise.
12083 (read_cutu_die_from_dwo): Likewise.
12084 (init_tu_and_read_dwo_dies): Likewise.
12085 (init_cutu_and_read_dies): Likewise.
12086 (init_cutu_and_read_dies_no_follow): Likewise.
12087 (allocate_type_unit_groups_table): Add objfile parameter.
12088 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12089 (get_type_unit_group): Likewise.
12090 (process_psymtab_comp_unit): Update call.
12091 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12092 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12093 (print_tu_stats): Likewise.
12094 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12095 in void* parameter.
12096 (build_type_psymtabs): Change objfile parameter to
12097 dwarf2_per_objfile.
12098 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12099 passed in void* parameter.
12100 (process_skeletonless_type_units): Change objfile parameter to
12101 dwarf2_per_objfile.
12102 (set_partial_user): Likewise.
12103 (dwarf2_build_psymtabs_hard): Likewise.
12104 (read_comp_units_from_section): Likewise.
12105 (create_all_comp_units): Likewise.
12106 (scan_partial_symbols): Update calls.
12107 (add_partial_symbol): Likewise.
12108 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12109 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12110 (process_queue): Add dwarf2_per_objfile parameter.
12111 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12112 (compute_compunit_symtab_includes): Likewise.
12113 (process_cu_includes): Add dwarf2_per_objfile parameter.
12114 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12115 (process_full_type_unit): Likewise.
12116 (process_imported_unit_die): Update call.
12117 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12118 (read_file_scope): Likewise.
12119 (allocate_dwo_file_hash_table): Add objfile parameter.
12120 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12121 (create_cus_hash_table): Likewise.
12122 (create_dwp_hash_table): Likewise.
12123 (create_dwo_unit_in_dwp_v1): Likewise.
12124 (create_dwp_v2_section): Likewise.
12125 (create_dwo_unit_in_dwp_v2): Likewise.
12126 (lookup_dwo_unit_in_dwp): Likewise.
12127 (try_open_dwop_file): Likewise.
12128 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12129 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12130 cleanup to include a reference to dwarf2_per_objfile.
12131 (open_dwp_file): Add dwarf2_per_objfile parameter.
12132 (open_and_init_dwp_file): Likewise.
12133 (get_dwp_file): Likewise.
12134 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12135 (queue_and_load_all_dwo_tus): Update call.
12136 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12137 data.
12138 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12139 (dwarf2_ranges_process): Likewise.
12140 (dwarf2_get_pc_bounds): Likewise.
12141 (mark_common_block_symbol_computed): Likewise.
12142 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12143 (dwarf2_read_abbrevs): Update call.
12144 (read_partial_die): Use dwarf2_per_objfile from cu.
12145 (find_partial_die): Likewise.
12146 (fixup_partial_die): Likewise.
12147 (read_attribute_value): Likewise.
12148 (read_indirect_string_at_offset_from): Add objfile parameter.
12149 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12150 parameter.
12151 (read_indirect_string_from_dwz): Add objfile parameter.
12152 (read_indirect_string): Add objfile parameter.
12153 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12154 (read_addr_index): Use dwarf2_per_objfile from cu.
12155 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12156 call dw2_setup.
12157 (read_str_index): Use dwarf2_per_objfile from cu.
12158 (get_debug_line_section): Likewise.
12159 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12160 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12161 (new_symbol_full): Use dwarf2_per_objfile from cu.
12162 (build_error_marker_type): Likewise.
12163 (lookup_die_type): Likewise.
12164 (determine_prefix): Likewise.
12165 (follow_die_offset): Likewise.
12166 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12167 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12168 (dwarf2_fetch_die_type_sect_off): Likewise.
12169 (dwarf2_get_die_type): Likewise.
12170 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12171 (get_signatured_type): Likewise.
12172 (get_DW_AT_signature_type): Likewise.
12173 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12174 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12175 (cu_debug_loc_section): Likewise.
12176 (fill_in_loclist_baton): Likewise.
12177 (dwarf2_symbol_mark_computed): Likewise.
12178 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12179 dwarf2_per_objfile.
12180 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12181 parameter.
12182 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12183 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12184 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12185 (set_die_type): Use dwarf2_free_objfile from cu.
12186 (get_die_type_at_offset): Likewise.
12187 (dwarf2_per_objfile_free): Don't assign global variable.
12188 (debug_names) <constructor>: Add dwarf2_per_objfile
12189 parameter, update m_debugstrlookup construction.
12190 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12191 parameter.
12192 <m_dwarf2_per_objfile>: New field.
12193 <lookup>: Use m_dwarf2_per_objfile.
12194 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12195 (psyms_seen_size): Likewise.
12196 (write_gdbindex): Replace objfile parameter with
12197 dwarf2_per_objfile.
12198 (write_debug_names): Likewise.
12199 (write_psymtabs_to_index): Likewise.
12200 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12201 calls.
12202
12203 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12204
12205 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12206 <dwarf2_per_objfile>: New field.
12207 (struct dwarf2_per_cu_data) <objfile>: Remove.
12208 <dwarf2_per_objfile>: New field.
12209 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12210 of objfile.
12211 (create_signatured_type_table_from_index): Likewise.
12212 (create_debug_type_hash_table): Likewise.
12213 (fill_in_sig_entry_from_dwo_entry): Likewise.
12214 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12215 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12216 objfile.
12217 (create_partial_symtab): Access objfile through
12218 dwarf2_per_objfile.
12219 (process_psymtab_comp_unit_reader): Likewise.
12220 (read_comp_units_from_section): Likewise.
12221 (scan_partial_symbols): Likewise.
12222 (add_partial_symbol): Likewise.
12223 (add_partial_subprogram): Likewise.
12224 (peek_die_abbrev): Likewise.
12225 (fixup_go_packaging): Likewise.
12226 (process_full_comp_unit): Likewise.
12227 (process_full_type_unit): Likewise.
12228 (process_imported_unit_die): Likewise.
12229 (dwarf2_compute_name): Likewise.
12230 (dwarf2_physname): Likewise.
12231 (read_import_statement): Likewise.
12232 (create_cus_hash_table): Assign dwarf2_physname instead of
12233 objfile.
12234 (read_func_scope): Access objfile through dwarf2_per_objfile.
12235 (read_lexical_block_scope): Likewise.
12236 (read_call_site_scope): Likewise.
12237 (read_variable): Likewise.
12238 (dwarf2_rnglists_process): Likewise.
12239 (dwarf2_ranges_process): Likewise.
12240 (dwarf2_ranges_read): Likewise.
12241 (dwarf2_record_block_ranges): Likewise.
12242 (dwarf2_add_field): Likewise.
12243 (dwarf2_add_member_fn): Likewise.
12244 (read_structure_type): Likewise.
12245 (process_structure_scope): Likewise.
12246 (read_enumeration_type): Likewise.
12247 (read_array_type): Likewise.
12248 (read_common_block): Likewise.
12249 (read_namespace_type): Likewise.
12250 (read_namespace): Likewise.
12251 (read_module_type): Likewise.
12252 (read_tag_pointer_type): Likewise.
12253 (read_tag_ptr_to_member_type): Likewise.
12254 (read_tag_string_type): Likewise.
12255 (read_subroutine_type): Likewise.
12256 (read_typedef): Likewise.
12257 (read_base_type): Likewise.
12258 (attr_to_dynamic_prop): Likewise.
12259 (read_subrange_type): Likewise.
12260 (read_unspecified_type): Likewise.
12261 (load_partial_dies): Likewise.
12262 (read_partial_die): Likewise.
12263 (find_partial_die): Likewise.
12264 (guess_partial_die_structure_name): Likewise.
12265 (fixup_partial_die): Likewise.
12266 (read_attribute_value): Likewise.
12267 (read_addr_index_from_leb128): Likewise.
12268 (dwarf2_read_addr_index): Likewise.
12269 (dwarf2_string_attr): Likewise.
12270 (lnp_state_machine::check_line_address): Likewise.
12271 (dwarf_decode_lines_1): Likewise.
12272 (dwarf_decode_lines): Likewise.
12273 (dwarf2_start_symtab): Likewise.
12274 (var_decode_location): Likewise.
12275 (new_symbol_full): Likewise.
12276 (dwarf2_const_value_data): Likewise.
12277 (dwarf2_const_value_attr): Likewise.
12278 (dwarf2_const_value): Likewise.
12279 (die_type): Likewise.
12280 (die_containing_type): Likewise.
12281 (lookup_die_type): Likewise.
12282 (guess_full_die_structure_name): Likewise.
12283 (anonymous_struct_prefix): Likewise.
12284 (dwarf2_name): Likewise.
12285 (follow_die_ref_or_sig): Likewise.
12286 (follow_die_offset): Likewise.
12287 (follow_die_ref): Likewise.
12288 (dwarf2_fetch_die_loc_sect_off): Likewise.
12289 (dwarf2_fetch_constant_bytes): Likewise.
12290 (dwarf2_fetch_die_type_sect_off): Likewise.
12291 (dwarf2_get_die_type): Likewise.
12292 (follow_die_sig): Likewise.
12293 (decode_locdesc): Likewise.
12294 (dwarf2_per_cu_objfile): Likewise.
12295 (dwarf2_per_cu_text_offset): Likewise.
12296 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12297 objfile.
12298 (set_die_type): Access objfile through
12299 dwarf2_per_objfile.
12300
12301 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12302
12303 * valprint.c (converted_character_d): Remove typedef.
12304 (DEF_VEC_O (converted_character_d)): Remove.
12305 (count_next_character): Use std::vector.
12306 (print_converted_chars_to_obstack): Likewise.
12307 (generic_printstr): Likewise.
12308
12309 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12310
12311 * xml-support.h (struct gdb_xml_value): Add constructor.
12312 <value>: Change type to unique_xmalloc_ptr.
12313 (gdb_xml_value_s): Remove typedef.
12314 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12315 (gdb_xml_element_start_handler): Change parameter type to
12316 std::vector.
12317 (xml_find_attribute): Likewise.
12318 * xml-support.c (xml_find_attribute): Change parameter type to
12319 std::vector and adjust.
12320 (gdb_xml_values_cleanup): Remove.
12321 (gdb_xml_parser::start_element): Adjust to std::vector.
12322 (xinclude_start_include): Change paraeter type to std::vector
12323 and adjust.
12324 * btrace.c (check_xml_btrace_version): Likewise.
12325 (parse_xml_btrace_block): Likewise.
12326 (parse_xml_btrace_pt_config_cpu): Likewise.
12327 (parse_xml_btrace_pt): Likewise.
12328 (parse_xml_btrace_conf_bts): Likewise.
12329 (parse_xml_btrace_conf_pt): Likewise.
12330 * memory-map.c (memory_map_start_memory): Likewise.
12331 (memory_map_start_property): Likewise.
12332 * osdata.c (osdata_start_osdata): Likewise.
12333 (osdata_start_item): Likewise.
12334 (osdata_start_column): Likewise.
12335 * remote.c (start_thread): Likewise.
12336 * solib-aix.c (library_list_start_library): Likewise.
12337 (library_list_start_list): Likewise.
12338 * solib-svr4.c (library_list_start_library): Likewise.
12339 (svr4_library_list_start_list): Likewise.
12340 * solib-target.c (library_list_start_segment): Likewise.
12341 (library_list_start_section): Likewise.
12342 (library_list_start_library): Likewise.
12343 (library_list_start_list): Likewise.
12344 * tracepoint.c (traceframe_info_start_memory): Likewise.
12345 (traceframe_info_start_tvar): Likewise.
12346 * xml-syscall.c (syscall_start_syscall): Likewise.
12347 * xml-tdesc.c (tdesc_start_target): Likewise.
12348 (tdesc_start_feature): Likewise.
12349 (tdesc_start_reg): Likewise.
12350 (tdesc_start_union): Likewise.
12351 (tdesc_start_struct): Likewise.
12352 (tdesc_start_flags): Likewise.
12353 (tdesc_start_enum): Likewise.
12354 (tdesc_start_field): Likewise.
12355 (tdesc_start_enum_value): Likewise.
12356 (tdesc_start_vector): Likewise.
12357
12358 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12359
12360 * extension.h (struct xmethod_worker) <clone>: Remove.
12361 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12362 Remove.
12363 (python_xmethod_worker::clone): Remove.
12364 * valops.c (find_overload_match): Use std::move instead of
12365 clone.
12366
12367 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12368
12369 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12370 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12371 <free_xmethod_worker_data>: Remove.
12372 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12373 <get_xmethod_arg_types>: Remove.
12374 <get_xmethod_result_type>: Remove.
12375 <invoke_xmethod>: Remove.
12376 * extension.c (new_xmethod_worker): Remove.
12377 (clone_xmethod_worker): Remove.
12378 (get_matching_xmethod_workers): Return void, pass std::vector by
12379 pointer.
12380 (get_xmethod_arg_types): Rename to...
12381 (xmethod_worker::get_arg_types): ... this, and adjust.
12382 (get_xmethod_result_type): Rename to...
12383 (xmethod_worker::get_result_type): ... this, and adjust.
12384 (invoke_xmethod): Remove.
12385 (free_xmethod_worker): Remove.
12386 (free_xmethod_worker_vec): Remove.
12387 * extension.h (enum ext_lang_rc): Move here from
12388 extension-priv.h.
12389 (struct xmethod_worker): Add constructor and destructor.
12390 <data>: Remove.
12391 <value>: Remove.
12392 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12393 virtual pure methods.
12394 <get_arg_types, get_result_type>: New methods.
12395 (xmethod_worker_ptr): Remove typedef.
12396 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12397 (xmethod_worker_vec): Remove typedef.
12398 (xmethod_worker_up): New typedef.
12399 (invoke_xmethod): Remove.
12400 (clone_xmethod_worker): Remove.
12401 (free_xmethod_worker): Remove.
12402 (free_xmethod_worker_vec): Remove.
12403 (get_xmethod_arg_types): Remove.
12404 (get_xmethod_result_type): Remove.
12405 * valops.c (find_method_list): Use std::vector, don't use
12406 intermediate vector.
12407 (value_find_oload_method_list): Use std::vector.
12408 (find_overload_match): Use std::vector.
12409 (find_oload_champ): Use std::vector.
12410 * value.c (value_free): Use operator delete.
12411 (value_of_xmethod): Rename to...
12412 (value_from_xmethod): ... this. Don't assign
12413 xmethod_worker::value, take rvalue-reference.
12414 (result_type_of_xmethod): Adjust.
12415 (call_xmethod): Adjust.
12416 * value.h: Include extension.h.
12417 (struct xmethod_worker): Don't forward-declare.
12418 (value_of_xmethod): Rename to...
12419 (value_from_xmethod): ... this, take rvalue-reference.
12420 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12421 (struct python_xmethod_worker): ... this, add constructor and
12422 destructor.
12423 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12424 (gdbpy_free_xmethod_worker_data): Rename to...
12425 (python_xmethod_worker::~python_xmethod_worker): ... this and
12426 adjust.
12427 (gdbpy_clone_xmethod_worker_data): Rename to...
12428 (python_xmethod_worker::clone): ... this and adjust.
12429 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12430 temporary vector.
12431 (gdbpy_get_xmethod_arg_types): Rename to...
12432 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12433 (gdbpy_get_xmethod_result_type): Rename to...
12434 (python_xmethod_worker::do_get_result_type): ... this and
12435 adjust.
12436 (gdbpy_invoke_xmethod): Rename to...
12437 (python_xmethod_worker::invoke): ... this and adjust.
12438 (new_python_xmethod_worker): Rename to...
12439 (python_xmethod_worker::python_xmethod_worker): ... this and
12440 adjust.
12441 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12442 Remove.
12443 (gdbpy_free_xmethod_worker_data): Remove.
12444 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12445 (gdbpy_get_xmethod_arg_types): Remove.
12446 (gdbpy_get_xmethod_result_type): Remove.
12447 (gdbpy_invoke_xmethod): Remove.
12448 * python/python.c (python_extension_ops): Remove obsolete
12449 callbacks.
12450
12451 2018-01-05 Pedro Alves <palves@redhat.com>
12452
12453 PR gdb/18653
12454 * common/signals-state-save-restore.c
12455 (save_original_signals_state): New parameter 'quiet'. Warn if we
12456 find a custom handler preinstalled, instead of internal erroring.
12457 But only warn if !quiet.
12458 * common/signals-state-save-restore.h
12459 (save_original_signals_state): New parameter 'quiet'.
12460 * main.c (captured_main_1): Move save_original_signals_state call
12461 after option handling, and pass QUIET.
12462
12463 2018-01-05 Pedro Alves <palves@redhat.com>
12464
12465 * spu-tdep.c (spu_catch_start): Pass
12466 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12467
12468 2018-01-05 Pedro Alves <palves@redhat.com>
12469
12470 PR gdb/22670
12471 * ada-lang.c (literal_symbol_name_matcher): New function.
12472 (ada_get_symbol_name_matcher): Use it for
12473 symbol_name_match_type::SEARCH_NAME.
12474 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12475 it down instead of assuming symbol_name_match_type::FULL.
12476 * block.h (block_lookup_symbol): New parameter 'match_type'.
12477 * c-valprint.c (print_unpacked_pointer): Use
12478 lookup_symbol_search_name instead of lookup_symbol.
12479 * compile/compile-object-load.c (get_out_value_type): Pass down
12480 symbol_name_match_type::SEARCH_NAME.
12481 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12482 symbol_name_match_type::FULL.
12483 * cp-support.c (cp_get_symbol_name_matcher): Handle
12484 symbol_name_match_type::SEARCH_NAME.
12485 * infrun.c (insert_exception_resume_breakpoint): Use
12486 lookup_symbol_search_name.
12487 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12488 * psymtab.c (maintenance_check_psymtabs): Use
12489 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12490 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12491 SYMBOL_SEARCH_NAME.
12492 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12493 if symbol_name_match_type::SEARCH_NAME.
12494 (lookup_symbol_in_language): Pass down
12495 symbol_name_match_type::FULL.
12496 (lookup_symbol_search_name): New.
12497 (lookup_language_this): Pass down
12498 symbol_name_match_type::SEARCH_NAME.
12499 (lookup_symbol_aux, lookup_local_symbol): New parameter
12500 'match_type'. Pass it down.
12501 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12502 (lookup_symbol_search_name): New declaration.
12503 (lookup_symbol_in_block): New 'match_type' parameter.
12504
12505 2018-01-05 Pedro Alves <palves@redhat.com>
12506
12507 PR gdb/22670
12508 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12509 ada_lookup_symbol.
12510 (ada_lookup_symbol): Reimplement in terms of
12511 ada_lookup_symbol_list, bits factored out from
12512 ada_lookup_encoded_symbol.
12513
12514 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12515
12516 * ada-exp.y (write_object_renaming): When subscripting an array
12517 using a symbol as the index, pass the block in call to
12518 ada_lookup_encoded_symbol when looking that symbol up.
12519
12520 2018-01-05 Jerome Guitton <guitton@adacore.com>
12521
12522 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12523 TYPE_INDEX_TYPE.
12524
12525 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12526
12527 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12528 the case where VALUE_LVAL (val0) is not lval_memory.
12529
12530 2018-01-05 Xavier Roirand <roirand@adacore.com>
12531
12532 * ada-valprint.c (print_optional_low_bound): Handle
12533 character-indexed array printing like boolean-indexed array
12534 printing.
12535
12536 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12537
12538 * NEWS: Create a new section for the next release branch.
12539 Rename the section of the current branch, now that it has
12540 been cut.
12541
12542 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12543
12544 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12545 * version.in: Bump version to 8.1.50.DATE-git.
12546
12547 2018-01-03 Xavier Roirand <roirand@adacore.com>
12548
12549 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12550 Add field.
12551 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12552 Add field.
12553 (default_exception_support_info) <catch_handlers_sym>: Add field.
12554 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12555 (ada_exception_name_addr_1): Add "catch handlers" handling.
12556 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12557 Update all callers.
12558 (create_excep_cond_exprs) <ex>: Add parameter.
12559 (re_set_exception): Update create_excep_cond_exprs call.
12560 (print_it_exception, print_one_exception, print_mention_exception)
12561 (print_recreate_exception): Add "catch handler" handling.
12562 (allocate_location_catch_handlers, re_set_catch_handlers)
12563 (check_status_catch_handlers, print_it_catch_handlers)
12564 (print_one_catch_handlers, print_mention_catch_handlers)
12565 (print_recreate_catch_handlers): New function.
12566 (catch_handlers_breakpoint_ops): New variable.
12567 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12568 Add parameter. Add "catch handler" handling.
12569 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12570 Add "catch handler" handling.
12571 (ada_exception_catchpoint_cond_string): Add "catch handler"
12572 handling.
12573 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12574 call.
12575 (catch_ada_handlers_command): New function.
12576 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12577 operations structure.
12578 (_initialize_ada_language): Add "catch handlers" command entry.
12579 * NEWS: Document "catch handlers" feature.
12580
12581 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12582
12583 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12584 account when creating the array type of the slice.
12585 (ada_value_slice): Likewise.
12586
12587 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12588
12589 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12590 New enum value.
12591 (create_array_type_with_stride): Add byte_stride_prop parameter.
12592 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12593 New parameter. Update all callers in this file.
12594 (array_type_has_dynamic_stride): New function.
12595 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12596 of arrays with dynamic byte strides.
12597 * dwarf2read.c (read_array_type): Add support for dynamic
12598 DW_AT_byte_stride attributes.
12599
12600 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12601
12602 * dwarf2read.c (read_unspecified_type): Treat
12603 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12604
12605 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12606
12607 Update copyright year range in all GDB files.
12608
12609 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12610
12611 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12612 and gdb/testsuite/gdb.base/step-line.c.
12613
12614 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12615
12616 * copyright.py (main): Dump the contents of
12617 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12618 even if BY_HAND is empty.
12619
12620 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12621
12622 * top.c (print_gdb_version): Update Copyright year in version
12623 message.
12624
12625 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12626
12627 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12628
12629 For older changes see ChangeLog-2017.
12630 \f
12631 Local Variables:
12632 mode: change-log
12633 left-margin: 8
12634 fill-column: 74
12635 version-control: never
12636 coding: utf-8
12637 End:
This page took 0.29634 seconds and 5 git commands to generate.