Change `minimal_symbols' to std::vector in linespec.c structures
[external/binutils.git] / gdb / ChangeLog
1 2018-08-29  Keith Seitz  <keiths@redhat.com>
2
3         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4         std::vector.  Update all users.
5         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
6         (struct collect_info) <minimal_symbols>: Likewise.
7         (compare_msymbols): Return bool.  Change parameters to const
8         bound_minimal_symbol references.
9         (find_method, find_function_symbols, find_linespec_symbols): Change
10         `minsyms' parameter to std::vector.  Update all callers.
11
12 2018-08-29  Keith Seitz  <keiths@redhat.com>
13
14         * linespec.c (struct linespec) <label_symbols>: Change type to
15         std::vector.  Update all users.
16         (find_label_symbols_in_block): Change `result' parameter to
17         std::vector.  Update all callers.
18         (find_label_symbols): Return std::vector.  Update all callers.
19
20 2018-08-29  Keith Seitz  <keiths@redhat.com>
21
22         * linespec.c (struct linespec) <function_symbols>: Change type to
23         std::vector.  Update all users.
24         (struct collect_info) <function_symbols>: Likewise.
25         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
26         (std_compare_symbols): New function.
27         (find_method, find_function_symbols, find_linespec_symbols)
28         (find_label_symbols_in_block): Change `symbols' parameter to
29         std::vector.  Update all callers.
30         (find_label_symbols): Likewise for `function_symbols' and
31         `label_funcs_ret'.
32
33 2018-08-29  Keith Seitz  <keiths@redhat.com>
34
35         * linespec.c (symtab_vector_up): Define.
36         (struct linespec) <file_symtabs>: Change type to std::vector *.
37         Update all uses.
38         (struct collect_info) <file_symtabs>: Likewise.
39         (collect_symtabs_from_filename): Return symtab_vector_up.
40         Update all callers.
41         (decode_objc): Remove cleanup.
42         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
43         (symtab_collector::release_symtabs): Return symtab_vector_up.
44         Update all callers.
45         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
46         Update all users.
47         (collect_symtabs_from_filename, symtabs_from_filename): Return
48         symtab_vector_up.  Update all callers.
49
50 2018-08-29  Tom Tromey  <tom@tromey.com>
51
52         * csky-tdep.c (csky_analyze_prologue): Use
53         core_addr_to_string_nz.
54
55 2018-08-29  Tom Tromey  <tom@tromey.com>
56
57         * windows-nat.c (struct xlate_exception) <them>: Change type to
58         DWORD.
59         (xlate): Fix formatting.  Remove last entry.
60         (struct xlate_exception, xlate): Comment out.
61         (windows_nat_target::resume): Use ranged for.
62
63 2018-08-29  Jim Wilson  <jimw@sifive.com>
64
65         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
66         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
67         of NT_PRFPREG.
68         (riscv_linux_nat_target::store_registers): Likewise.
69
70 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
71
72         PR gdb/23555
73         PR gdb/23558
74         * gnulib/aclocal.m4: Regenerate.
75         * gnulib/config.in: Regenerate.
76         * gnulib/configure: Regenerate.
77         * gnulib/import/Makefile.am: Update.
78         * gnulib/import/Makefile.in: Update.
79         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
80         * gnulib/import/_Noreturn.h: ... this.
81         * gnulib/import/alloca.in.h: Update.
82         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
83         * gnulib/import/arg-nonnull.h: ... this.
84         * gnulib/import/assure.h: Update.
85         * gnulib/import/at-func.c: Update.
86         * gnulib/import/basename-lgpl.c: Update.
87         * gnulib/import/extra/snippet/c++defs.h: Rename to...
88         * gnulib/import/c++defs.h: ... this.
89         * gnulib/import/canonicalize-lgpl.c: Update.
90         * gnulib/import/cdefs.h: Update.
91         * gnulib/import/chdir-long.c: Update.
92         * gnulib/import/chdir-long.h: Update.
93         * gnulib/import/cloexec.c: Update.
94         * gnulib/import/cloexec.h: Update.
95         * gnulib/import/close.c: Update.
96         * gnulib/import/closedir.c: Update.
97         * gnulib/import/config.charset: Update.
98         * gnulib/import/dirent-private.h: Update.
99         * gnulib/import/dirent.in.h: Update.
100         * gnulib/import/dirfd.c: Update.
101         * gnulib/import/dirname-lgpl.c: Update.
102         * gnulib/import/dirname.h: Update.
103         * gnulib/import/dosname.h: Update.
104         * gnulib/import/dup-safer-flag.c: Update.
105         * gnulib/import/dup-safer.c: Update.
106         * gnulib/import/dup.c: Update.
107         * gnulib/import/dup2.c: Update.
108         * gnulib/import/errno.in.h: Update.
109         * gnulib/import/error.c: Update.
110         * gnulib/import/error.h: Update.
111         * gnulib/import/exitfail.c: Update.
112         * gnulib/import/exitfail.h: Update.
113         * gnulib/import/extra/update-copyright: Update.
114         * gnulib/import/fchdir.c: Update.
115         * gnulib/import/fcntl.c: Update.
116         * gnulib/import/fcntl.in.h: Update.
117         * gnulib/import/fd-hook.c: Update.
118         * gnulib/import/fd-hook.h: Update.
119         * gnulib/import/fd-safer-flag.c: Update.
120         * gnulib/import/fd-safer.c: Update.
121         * gnulib/import/fdopendir.c: Update.
122         * gnulib/import/filename.h: Update.
123         * gnulib/import/filenamecat-lgpl.c: Update.
124         * gnulib/import/filenamecat.h: Update.
125         * gnulib/import/flexmember.h: Update.
126         * gnulib/import/float+.h: Update.
127         * gnulib/import/float.c: Update.
128         * gnulib/import/float.in.h: Update.
129         * gnulib/import/fnmatch.c: Update.
130         * gnulib/import/fnmatch.in.h: Update.
131         * gnulib/import/fnmatch_loop.c: Update.
132         * gnulib/import/fpucw.h: Update.
133         * gnulib/import/frexp.c: Update.
134         * gnulib/import/frexpl.c: Update.
135         * gnulib/import/fstat.c: Update.
136         * gnulib/import/fstatat.c: Update.
137         * gnulib/import/getcwd-lgpl.c: Update.
138         * gnulib/import/getcwd.c: Update.
139         * gnulib/import/getdtablesize.c: Update.
140         * gnulib/import/getlogin_r.c: Update.
141         * gnulib/import/getprogname.c: Update.
142         * gnulib/import/getprogname.h: Update.
143         * gnulib/import/gettext.h: Update.
144         * gnulib/import/gettimeofday.c: Update.
145         * gnulib/import/glob-libc.h: Update.
146         * gnulib/import/glob.c: Update.
147         * gnulib/import/glob.in.h: Update.
148         * gnulib/import/glob_internal.h: Update.
149         * gnulib/import/glob_pattern_p.c: Update.
150         * gnulib/import/globfree.c: Update.
151         * gnulib/import/hard-locale.c: Update.
152         * gnulib/import/hard-locale.h: Update.
153         * gnulib/import/intprops.h: Update.
154         * gnulib/import/inttypes.in.h: Update.
155         * gnulib/import/isnan.c: Update.
156         * gnulib/import/isnand-nolibm.h: Update.
157         * gnulib/import/isnand.c: Update.
158         * gnulib/import/isnanl-nolibm.h: Update.
159         * gnulib/import/isnanl.c: Update.
160         * gnulib/import/itold.c: Update.
161         * gnulib/import/libc-config.h: Update.
162         * gnulib/import/limits.in.h: Update.
163         * gnulib/import/localcharset.c: Update.
164         * gnulib/import/localcharset.h: Update.
165         * gnulib/import/localtime-buffer.c: Update.
166         * gnulib/import/localtime-buffer.h: Update.
167         * gnulib/import/lstat.c: Update.
168         * gnulib/import/m4/00gnulib.m4: Update.
169         * gnulib/import/m4/__inline.m4: Update.
170         * gnulib/import/m4/absolute-header.m4: Update.
171         * gnulib/import/m4/alloca.m4: Update.
172         * gnulib/import/m4/builtin-expect.m4: Update.
173         * gnulib/import/m4/canonicalize.m4: Update.
174         * gnulib/import/m4/chdir-long.m4: Update.
175         * gnulib/import/m4/close.m4: Update.
176         * gnulib/import/m4/closedir.m4: Update.
177         * gnulib/import/m4/configmake.m4: Update.
178         * gnulib/import/m4/d-ino.m4: Update.
179         * gnulib/import/m4/d-type.m4: Update.
180         * gnulib/import/m4/dirent_h.m4: Update.
181         * gnulib/import/m4/dirfd.m4: Update.
182         * gnulib/import/m4/dirname.m4: Update.
183         * gnulib/import/m4/double-slash-root.m4: Update.
184         * gnulib/import/m4/dup.m4: Update.
185         * gnulib/import/m4/dup2.m4: Update.
186         * gnulib/import/m4/eealloc.m4: Update.
187         * gnulib/import/m4/environ.m4: Update.
188         * gnulib/import/m4/errno_h.m4: Update.
189         * gnulib/import/m4/error.m4: Update.
190         * gnulib/import/m4/exponentd.m4: Update.
191         * gnulib/import/m4/exponentl.m4: Update.
192         * gnulib/import/m4/extensions.m4: Update.
193         * gnulib/import/m4/extern-inline.m4: Update.
194         * gnulib/import/m4/fchdir.m4: Update.
195         * gnulib/import/m4/fcntl-o.m4: Update.
196         * gnulib/import/m4/fcntl.m4: Update.
197         * gnulib/import/m4/fcntl_h.m4: Update.
198         * gnulib/import/m4/fdopendir.m4: Update.
199         * gnulib/import/m4/filenamecat.m4: Update.
200         * gnulib/import/m4/flexmember.m4: Update.
201         * gnulib/import/m4/float_h.m4: Update.
202         * gnulib/import/m4/fnmatch.m4: Update.
203         * gnulib/import/m4/fnmatch_h.m4: Update.
204         * gnulib/import/m4/fpieee.m4: Update.
205         * gnulib/import/m4/frexp.m4: Update.
206         * gnulib/import/m4/frexpl.m4: Update.
207         * gnulib/import/m4/fstat.m4: Update.
208         * gnulib/import/m4/fstatat.m4: Update.
209         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
210         * gnulib/import/m4/getcwd-path-max.m4: Update.
211         * gnulib/import/m4/getcwd.m4: Update.
212         * gnulib/import/m4/getdtablesize.m4: Update.
213         * gnulib/import/m4/getlogin.m4: Update.
214         * gnulib/import/m4/getlogin_r.m4: Update.
215         * gnulib/import/m4/getpagesize.m4: Update.
216         * gnulib/import/m4/getprogname.m4: Update.
217         * gnulib/import/m4/gettimeofday.m4: Update.
218         * gnulib/import/m4/glibc21.m4: Update.
219         * gnulib/import/m4/glob.m4: Update.
220         * gnulib/import/m4/glob_h.m4: Update.
221         * gnulib/import/m4/gnulib-cache.m4: Update.
222         * gnulib/import/m4/gnulib-common.m4: Update.
223         * gnulib/import/m4/gnulib-comp.m4: Update.
224         * gnulib/import/m4/gnulib-tool.m4: Update.
225         * gnulib/import/m4/hard-locale.m4: Update.
226         * gnulib/import/m4/include_next.m4: Update.
227         * gnulib/import/m4/inttypes-pri.m4: Update.
228         * gnulib/import/m4/inttypes.m4: Update.
229         * gnulib/import/m4/isnand.m4: Update.
230         * gnulib/import/m4/isnanl.m4: Update.
231         * gnulib/import/m4/largefile.m4: Update.
232         * gnulib/import/m4/limits-h.m4: Update.
233         * gnulib/import/m4/localcharset.m4: Update.
234         * gnulib/import/m4/locale-fr.m4: Update.
235         * gnulib/import/m4/locale-ja.m4: Update.
236         * gnulib/import/m4/locale-zh.m4: Update.
237         * gnulib/import/m4/localtime-buffer.m4: Update.
238         * gnulib/import/m4/longlong.m4: Update.
239         * gnulib/import/m4/lstat.m4: Update.
240         * gnulib/import/m4/malloc.m4: Update.
241         * gnulib/import/m4/malloca.m4: Update.
242         * gnulib/import/m4/math_h.m4: Update.
243         * gnulib/import/m4/mbrtowc.m4: Update.
244         * gnulib/import/m4/mbsinit.m4: Update.
245         * gnulib/import/m4/mbsrtowcs.m4: Update.
246         * gnulib/import/m4/mbstate_t.m4: Update.
247         * gnulib/import/m4/memchr.m4: Update.
248         * gnulib/import/m4/memmem.m4: Update.
249         * gnulib/import/m4/mempcpy.m4: Update.
250         * gnulib/import/m4/memrchr.m4: Update.
251         * gnulib/import/m4/mkdir.m4: Update.
252         * gnulib/import/m4/mkstemp.m4: Update.
253         * gnulib/import/m4/mmap-anon.m4: Update.
254         * gnulib/import/m4/mode_t.m4: Update.
255         * gnulib/import/m4/msvc-inval.m4: Update.
256         * gnulib/import/m4/msvc-nothrow.m4: Update.
257         * gnulib/import/m4/multiarch.m4: Update.
258         * gnulib/import/m4/nocrash.m4: Update.
259         * gnulib/import/m4/off_t.m4: Update.
260         * gnulib/import/m4/onceonly.m4: Update.
261         * gnulib/import/m4/open-cloexec.m4: Update.
262         * gnulib/import/m4/open.m4: Update.
263         * gnulib/import/m4/openat.m4: Update.
264         * gnulib/import/m4/opendir.m4: Update.
265         * gnulib/import/m4/pathmax.m4: Update.
266         * gnulib/import/m4/rawmemchr.m4: Update.
267         * gnulib/import/m4/readdir.m4: Update.
268         * gnulib/import/m4/readlink.m4: Update.
269         * gnulib/import/m4/realloc.m4: Update.
270         * gnulib/import/m4/rename.m4: Update.
271         * gnulib/import/m4/rewinddir.m4: Update.
272         * gnulib/import/m4/rmdir.m4: Update.
273         * gnulib/import/m4/save-cwd.m4: Update.
274         * gnulib/import/m4/secure_getenv.m4: Update.
275         * gnulib/import/m4/setenv.m4: Update.
276         * gnulib/import/m4/signal_h.m4: Update.
277         * gnulib/import/m4/ssize_t.m4: Update.
278         * gnulib/import/m4/stat-time.m4: Update.
279         * gnulib/import/m4/stat.m4: Update.
280         * gnulib/import/m4/std-gnu11.m4: Update.
281         * gnulib/import/m4/stdbool.m4: Update.
282         * gnulib/import/m4/stddef_h.m4: Update.
283         * gnulib/import/m4/stdint.m4: Update.
284         * gnulib/import/m4/stdio_h.m4: Update.
285         * gnulib/import/m4/stdlib_h.m4: Update.
286         * gnulib/import/m4/strchrnul.m4: Update.
287         * gnulib/import/m4/strdup.m4: Update.
288         * gnulib/import/m4/strerror.m4: Update.
289         * gnulib/import/m4/string_h.m4: Update.
290         * gnulib/import/m4/strstr.m4: Update.
291         * gnulib/import/m4/strtok_r.m4: Update.
292         * gnulib/import/m4/sys_socket_h.m4: Update.
293         * gnulib/import/m4/sys_stat_h.m4: Update.
294         * gnulib/import/m4/sys_time_h.m4: Update.
295         * gnulib/import/m4/sys_types_h.m4: Update.
296         * gnulib/import/m4/tempname.m4: Update.
297         * gnulib/import/m4/time_h.m4: Update.
298         * gnulib/import/m4/unistd-safer.m4: Update.
299         * gnulib/import/m4/unistd_h.m4: Update.
300         * gnulib/import/m4/warn-on-use.m4: Update.
301         * gnulib/import/m4/wchar_h.m4: Update.
302         * gnulib/import/m4/wchar_t.m4: Update.
303         * gnulib/import/m4/wctype_h.m4: Update.
304         * gnulib/import/m4/wint_t.m4: Update.
305         * gnulib/import/malloc.c: Update.
306         * gnulib/import/malloc/scratch_buffer.h: Update.
307         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
308         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
309         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
310         * gnulib/import/malloca.c: Update.
311         * gnulib/import/malloca.h: Update.
312         * gnulib/import/malloca.valgrind: Update.
313         * gnulib/import/math.in.h: Update.
314         * gnulib/import/mbrtowc.c: Update.
315         * gnulib/import/mbsinit.c: Update.
316         * gnulib/import/mbsrtowcs-impl.h: Update.
317         * gnulib/import/mbsrtowcs-state.c: Update.
318         * gnulib/import/mbsrtowcs.c: Update.
319         * gnulib/import/memchr.c: Update.
320         * gnulib/import/memmem.c: Update.
321         * gnulib/import/mempcpy.c: Update.
322         * gnulib/import/memrchr.c: Update.
323         * gnulib/import/mkdir.c: Update.
324         * gnulib/import/mkstemp.c: Update.
325         * gnulib/import/msvc-inval.c: Update.
326         * gnulib/import/msvc-inval.h: Update.
327         * gnulib/import/msvc-nothrow.c: Update.
328         * gnulib/import/msvc-nothrow.h: Update.
329         * gnulib/import/open.c: Update.
330         * gnulib/import/openat-die.c: Update.
331         * gnulib/import/openat-priv.h: Update.
332         * gnulib/import/openat-proc.c: Update.
333         * gnulib/import/openat.c: Update.
334         * gnulib/import/openat.h: Update.
335         * gnulib/import/opendir.c: Update.
336         * gnulib/import/pathmax.h: Update.
337         * gnulib/import/pipe-safer.c: Update.
338         * gnulib/import/rawmemchr.c: Update.
339         * gnulib/import/readdir.c: Update.
340         * gnulib/import/readlink.c: Update.
341         * gnulib/import/realloc.c: Update.
342         * gnulib/import/ref-add.sin: Update.
343         * gnulib/import/ref-del.sin: Update.
344         * gnulib/import/rename.c: Update.
345         * gnulib/import/rewinddir.c: Update.
346         * gnulib/import/rmdir.c: Update.
347         * gnulib/import/same-inode.h: Update.
348         * gnulib/import/save-cwd.c: Update.
349         * gnulib/import/save-cwd.h: Update.
350         * gnulib/import/scratch_buffer.h: Update.
351         * gnulib/import/secure_getenv.c: Update.
352         * gnulib/import/setenv.c: Update.
353         * gnulib/import/signal.in.h: Update.
354         * gnulib/import/stat-time.c: Update.
355         * gnulib/import/stat-time.h: Update.
356         * gnulib/import/stat-w32.c: Update.
357         * gnulib/import/stat-w32.h: Update.
358         * gnulib/import/stat.c: Update.
359         * gnulib/import/stdbool.in.h: Update.
360         * gnulib/import/stddef.in.h: Update.
361         * gnulib/import/stdint.in.h: Update.
362         * gnulib/import/stdio.in.h: Update.
363         * gnulib/import/stdlib.in.h: Update.
364         * gnulib/import/str-two-way.h: Update.
365         * gnulib/import/strchrnul.c: Update.
366         * gnulib/import/strdup.c: Update.
367         * gnulib/import/streq.h: Update.
368         * gnulib/import/strerror-override.c: Update.
369         * gnulib/import/strerror-override.h: Update.
370         * gnulib/import/strerror.c: Update.
371         * gnulib/import/string.in.h: Update.
372         * gnulib/import/stripslash.c: Update.
373         * gnulib/import/strnlen1.c: Update.
374         * gnulib/import/strnlen1.h: Update.
375         * gnulib/import/strstr.c: Update.
376         * gnulib/import/strtok_r.c: Update.
377         * gnulib/import/sys_stat.in.h: Update.
378         * gnulib/import/sys_time.in.h: Update.
379         * gnulib/import/sys_types.in.h: Update.
380         * gnulib/import/tempname.c: Update.
381         * gnulib/import/tempname.h: Update.
382         * gnulib/import/time.in.h: Update.
383         * gnulib/import/unistd--.h: Update.
384         * gnulib/import/unistd-safer.h: Update.
385         * gnulib/import/unistd.in.h: Update.
386         * gnulib/import/unsetenv.c: Update.
387         * gnulib/import/verify.h: Update.
388         * gnulib/import/extra/snippet/warn-on-use.h: Update.
389         * gnulib/import/wchar.in.h: Update.
390         * gnulib/import/wctype.in.h: Update.
391         * gnulib/import/xalloc-oversized.h: Update.
392         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
393         "53e2c179f26a890fa6685af4b6c1397ee370433b".
394
395 2018-08-16  Gary Benson <gbenson@redhat.com>
396
397         PR gdb/13000:
398         * gdb/main.c (captured_main_1): Exit with nonzero status
399         in batch mode if the last command to be executed failed.
400         * NEWS: Mention the above.
401
402 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
403
404         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
405         end of warning message.
406
407 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
408
409         PR gdb/22943:
410         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
411         (aarch64_extract_return_value): Use
412         aapcs_is_vfp_call_or_return_candidate.
413         (aarch64_return_in_memory): Likewise.
414         (aarch64_store_return_value): Likewise.
415
416 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
417
418         * aarch64-tdep.c
419         (aapcs_is_vfp_call_or_return_candidate): Make static
420         (pass_in_v_or_stack): Remove function.
421         (pass_in_v_vfp_candidate): New function.
422         (aarch64_push_dummy_call): Check for float register candidates.
423
424 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
425
426         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
427         (aapcs_is_vfp_call_or_return_candidate_1): New function.
428         (aapcs_is_vfp_call_or_return_candidate): Likewise.
429
430 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
431
432         PR build/23399
433         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
434         (struct ipa_sym_addresses): Rename to...
435         (struct ipa_sym_addresses_common): ... this.
436         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
437
438 2018-08-28  Tom Tromey  <tom@tromey.com>
439
440         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
441         (token_fifo): Now a std::vector.
442         (yylex, c_parse): Update.
443         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
444         (token_fifo): Now a std::vector.
445         (yylex, d_parse): Update.
446         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
447         (token_fifo): Now a std::vector.
448         (yylex, go_parse): Update.
449
450 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
451
452         * parser-defs.h (struct type_stack) <elements>: Change type to
453         std::vector<union type_stack_elt>.
454         <depth, size>: Remove.
455         * parse.c (parse_exp_in_context_1): Adjust.
456         (type_stack_reserve): Remove.
457         (check_type_stack_depth): Remove.
458         (insert_into_type_stack): Adjust to std::vector.
459         (insert_type): Likewise.
460         (push_type): Likewise.
461         (push_type_int): Likewise.
462         (insert_type_address_space): Likewise.
463         (pop_type): Likewise.
464         (pop_type_int): Likewise.
465         (pop_typelist): Likewise.
466         (pop_type_stack): Likewise.
467         (append_type_stack): Likewise.
468         (push_type_stack): Likewise.
469         (get_type_stack): Likewise.
470         (type_stack_cleanup): Likewise.
471         (push_typelist): Likewise.
472         (follow_types): Likewise.
473         (_initialize_parse): Likewise.
474
475 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
476
477         * NEWS: Mention csky target.
478
479 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
480             Hafiz Abid Qadeer  <abidh@codesourcery.com>
481             Don Breazeal  <donb@codesourcery.com>
482
483         * csky-linux-tdep.c: New file.
484         * csky-tdep.c: Likewise.
485         * csky-tdep.h: Likewise.
486         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
487         csky-tdep.o.
488         (HFILES_NO_SRCDIR): Add csky-tdep.h.
489         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
490         * configure.tgt: Add csky support.
491
492 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
493
494         * python/py-framefilter.c (py_print_frame): Print frame architecture
495         when printing on an MI output.
496
497 2018-08-27  Tom Tromey  <tom@tromey.com>
498
499         PR build/23087:
500         * configure: Rebuild.
501         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
502
503 2018-08-27  Tom Tromey  <tom@tromey.com>
504
505         * aarch64-linux-tdep.c
506         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
507         casts to int.
508
509 2018-08-27  Tom Tromey  <tom@tromey.com>
510
511         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
512         unsigned.
513         (ppc64_standard_linkage1, ppc64_standard_linkage2)
514         (ppc64_standard_linkage3, ppc64_standard_linkage4)
515         (ppc64_standard_linkage5, ppc64_standard_linkage6)
516         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
517         unsigned.
518
519 2018-08-27  Tom Tromey  <tom@tromey.com>
520
521         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
522         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
523
524 2018-08-27  Tom Tromey  <tom@tromey.com>
525
526         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
527         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
528         ULONGEST_MAX.
529         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
530         ULONGEST_MAX.
531         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
532         ULONGEST_MAX.
533         * sparc-linux-tdep.c (sparc32_linux_sigframe)
534         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
535         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
536         ULONGEST_MAX.
537         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
538         (ppc64_linux_sigaction_tramp_frame)
539         (ppc32_linux_sighandler_tramp_frame)
540         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
541         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
542         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
543         * mn10300-linux-tdep.c (am33_linux_sigframe)
544         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
545         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
546         * mips-linux-tdep.c (mips_linux_o32_sigframe)
547         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
548         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
549         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
550         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
551         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
552         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
553         * microblaze-linux-tdep.c
554         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
555         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
556         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
557         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
558         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
559         * common/common-types.h (ULONGEST_MAX): New define.
560         (CORE_ADDR_MAX): Fix formatting.
561         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
562         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
563         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
564         (arm_linux_rt_sigreturn_tramp_frame)
565         (arm_eabi_linux_sigreturn_tramp_frame)
566         (arm_eabi_linux_rt_sigreturn_tramp_frame)
567         (thumb2_eabi_linux_sigreturn_tramp_frame)
568         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
569         (arm_linux_restart_syscall_tramp_frame)
570         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
571         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
572         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
573         ULONGEST_MAX.
574         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
575
576 2018-08-27  Tom Tromey  <tom@tromey.com>
577
578         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
579         CORE_ADDR_MAX.
580         * mips-tdep.c (mips_deal_with_atomic_sequence)
581         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
582         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
583         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
584         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
585         CORE_ADDR_MAX.
586         * aarch64-tdep.c (aarch64_software_single_step): Use
587         CORE_ADDR_MAX.
588
589 2018-08-27  Tom Tromey  <tom@tromey.com>
590
591         * linespec.c (complete_linespec_component): Add cast to "char".
592         * completer.c (completion_tracker::build_completion_result): Add
593         cast to "char".
594
595 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
596
597         * solist.h (struct solist, struct target_so_ops): Fix
598         indentation.
599
600 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
601
602         * ada-tasks.c (ada_task_info_s): Remove typedef.
603         (DEF_VEC_O(ada_task_info_s)): Remove.
604         (struct ada_tasks_inferior_data): Initialize fields.
605         <task_list>: Make an std::vector.
606         (get_ada_tasks_inferior_data): Allocate with new.
607         (ada_get_task_number): Adjust.
608         (get_task_number_from_id): Likewise.
609         (valid_task_id): Likewise.
610         (ada_get_task_info_from_ptid): Likewise.
611         (iterate_over_live_ada_tasks): Likewise.
612         (add_ada_task): Likewise.
613         (read_known_tasks): Likewise.
614         (ada_build_task_list): Likewise.
615         (print_ada_task_info): Likewise.
616         (info_task): Likewise.
617         (task_command_1): Likewise.
618
619 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
620
621         * ada-lang.c (add_angle_brackets): Return std::string.
622
623 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
624
625         * python/py-threadevent.c (py_get_event_thread): Initialize
626         pythread.
627
628 2018-08-24  Pedro Alves  <palves@redhat.com>
629
630         * python/py-bpevent.c (create_breakpoint_event_object): Use
631         copy-initialization.
632         * python/py-continueevent.c (emit_continue_event): Use
633         copy-initialization.
634         * python/py-exitedevent.c (create_exited_event_object): Return a
635         gdbpy_ref<>.
636         (emit_exited_event): Use copy-initialization.
637         * python/py-inferior.c (python_new_inferior)
638         (python_inferior_deleted, add_thread_object): Use
639         copy-initialization.
640         * python/py-infevents.c (create_inferior_call_event_object)
641         (create_register_changed_event_object)
642         (create_memory_changed_event_object): Return a gdbpy_ref<>.
643         (emit_inferior_call_event, emit_memory_changed_event)
644         (emit_register_changed_event): Use copy-initialization.
645         * python/py-newobjfileevent.c (create_new_objfile_event_object):
646         Return a gdbpy_ref<>.
647         (emit_new_objfile_event): Use copy-initialization.
648         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
649         (emit_clear_objfiles_event): Use copy-initialization.
650         * python/py-signalevent.c (create_signal_event_object): Use
651         copy-initialization.
652         * python/py-threadevent.c (create_thread_event_object): Use
653         copy-initialization.
654
655 2018-08-24  Pedro Alves  <palves@redhat.com>
656             Simon Marchi  <simon.marchi@ericsson.com>
657
658         PR gdb/23379
659         * python/py-continueevent.c: Include "gdbthread.h".
660         (create_continue_event_object): Add intro comment.  Add 'ptid'
661         parameter.  Use it to find thread to pass to
662         create_thread_event_object.
663         (emit_continue_event): Pass PTID down to
664         create_continue_event_object.
665         * python/py-event.h (py_get_event_thread): Declare.
666         (create_thread_event_object): Remove default from 'thread'
667         parameter.
668         * python/py-stopevent.c (create_stop_event_object): Use
669         py_get_event_thread.
670         * python/py-threadevent.c (get_event_thread): Rename to ...
671         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
672         and use it to find the thread.
673         (create_thread_event_object): Assert that THREAD isn't null.
674         Don't find the event thread here.
675
676 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
677
678         * block.h (blockrange, blockranges): New struct declarations.
679         (struct block): Add new field named `ranges'.
680         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
681         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
682         macros for accessing ranges in struct block.
683         (make_blockranges): New declaration.
684         block.c (make_blockranges): New function.
685         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
686         for block.
687         * symtab.h (find_pc_partial_function): Add new parameter `block'.
688         * blockframe.c (cache_pc_function_block): New static global.
689         (clear_pc_function_cache): Clear cache_pc_function_block.
690         (find_pc_partial_function): Move comment to symtab.h.  Add
691         support for non-contiguous blocks.
692         * cli/cli-cmds.c (block.h): Include.
693         (print_disassembly): Handle printing of non-contiguous blocks.
694         (disassemble_current_function): Likewise.
695         (disassemble_command): Likewise.
696
697         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
698         BLOCK_START.
699         * blockframe.c (get_pc_function_start): Likewise.
700         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
701         (gcc_symbol_address): Likewise.
702         * compile/compile-object-run.c (compile_object_run): Likewise.
703         * compile/compile.c (get_expr_block_and_pc): Likewise.
704         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
705         (func_addr_to_tail_call_list): Likewise.
706         * findvar.c (default_read_var_value): Likewise.
707         * inline-frame.c (inline_frame_this_id): Likewise.
708         (skip-inline_frames): Likewise.
709         * infcmd.c (until_next_command): Likewise.
710         * linespec.c (convert_linespec_to_sals): Likewise.
711         * parse.c (parse_exp_in_context_1): Likewise.
712         * printcmd.c (build_address_symbolic): likewise.
713         (info_address_command): Likewise.
714         symtab.c (find_function_start_sal): Likewise.
715         (skip_prologue_sal): Likewise.
716         (find_function_alias_target): Likewise.
717         (find_gnu_ifunc): Likewise.
718         * stack.c (find_frame_funname): Likewise.
719         * symtab.c (fixup_symbol_section): Likewise.
720         (find_function_start_sal): Likewise.
721         (skip_prologue_sal): Likewsie.
722         (find_function_alias_target): Likewise.
723         (find_gnu_ifunc): Likewise.
724         * tracepoint.c (info_scope_command): Likewise.
725         * value.c (value_fn_field): Likewise.
726
727         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
728         in place of find_pc_partial_function.
729         * blockframe.c (find_function_entry_range_from_pc): New function.
730         * symtab.h (find_function_entry_range_from_pc): Declare and document.
731         * objfiles.c (objfile_relocate1): Relocate start and end addresses
732         for each range in a block.
733
734
735 2018-08-23  Xavier Roirand  <roirand@adacore.com>
736
737         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
738         incrementation.
739
740 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
741
742         * solib-svr4.c (read_program_headers_from_bfd): Return
743         gdb::optional<gdb::byte_vector>.
744         (svr4_exec_displacement): Adjust.
745
746 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
747
748         * solib-svr4.c (read_program_header): Return
749         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
750         (find_program_interpreter): Return
751         gdb::optional<gdb::byte_vector>.
752         (scan_dyntag_auxv): Adjust.
753         (enable_break): Adjust.
754         (svr4_exec_displacement): Adjust.
755
756 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
757
758         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
759         * inf-child.c (inf_child_target::terminal_save_inferior): New.
760
761 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
762
763         * guile/scm-string.c (gdbscm_scm_from_printf): Use
764         string_vprintf.
765         * guile/scm-utils.c (gdbscm_printf): Likewise.
766         * serial.c (serial_printf): Likewise.
767         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
768
769 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
770
771         * stack.c (print_frame): Print frame architecture when printing on
772         an MI output.
773         * NEWS: Mention new "arch" attribute in frame output.
774
775 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
776
777         * arch/aarch64.h (aarch64_regnum): Update comment.
778
779 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
780
781         * NEWS: Add SVE to 8.2 section.
782
783 2018-08-21  Pedro Alves  <palves@redhat.com>
784
785         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
786         out from gdbscm_parse_function_args.
787         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
788         gdbscm_parse_function_args_1.
789
790 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
791
792         PR gdb/17816
793         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
794         operator.
795
796 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
797
798         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
799
800 2018-08-19  Michael Spang  <spang@google.com>
801
802         PR gdb/11786
803         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
804         for PT_TLS segments.
805
806 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
807
808         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
809         dwarf_variable_value.
810         * dwarf2-frame.c (class dwarf_expr_executor):
811         Add override for dwarf_variable_value.
812         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
813         (class symbol_needs_eval_context): Likewise.
814         (indirect_synthetic_pointer): Add forward declaration.
815         (sect_variable_value): New function.
816         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
817         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
818         for DW_OP_GNU_variable_value.
819
820 2018-08-16  Tom Tromey  <tom@tromey.com>
821
822         * top.c (read_command_file): Update.
823         (command_line_input): Remove "repeat" argument.
824         * ada-lang.c (get_selections): Update.
825         * linespec.c (decode_line_2): Update.
826         * defs.h (command_line_input): Remove argument.
827         * cli/cli-script.c (read_next_line): Update.
828         * python/py-gdb-readline.c: Update.
829
830 2018-08-17  Tom Tromey  <tom@tromey.com>
831
832         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
833         command_line_input.
834
835 2018-08-15  Tom Tromey  <tom@tromey.com>
836
837         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
838
839 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
840
841         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
842         If used, use find_pc_partial_function to find address range
843         to disassemble.
844         * mi/mi-main.c (mi_cmd_list_features): Report
845         "data-disassemble-a-option" feature.
846         * NEWS: Mention new -data-disassemble option -a.
847
848 2018-08-13  Tom Tromey  <tom@tromey.com>
849
850         * common/common-defs.h (_FORTIFY_SOURCE): Define.
851
852 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
853
854         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
855         (aarch64_linux_collect_sve_regset): Likewise.
856         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
857         * regcache.h (regcache_map_entry_size): New function.
858
859 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
860
861         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
862         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
863         (SVE_HEADER_VL_LENGTH): Likewise.
864         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
865         (SVE_HEADER_FLAGS_LENGTH): Likewise.
866         (SVE_HEADER_RESERVED_LENGTH): Likewise.
867         (SVE_HEADER_SIZE_OFFSET): Likewise.
868         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
869         (SVE_HEADER_VL_OFFSET): Likewise.
870         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
871         (SVE_HEADER_FLAGS_OFFSET): Likewise.
872         (SVE_HEADER_RESERVED_OFFSET): Likewise.
873         (SVE_HEADER_SIZE): Likewise.
874         (aarch64_linux_core_read_vq): Add function.
875         (aarch64_linux_core_read_description): Check for SVE section.
876
877 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
878
879         * aarch64-fbsd-tdep.c
880         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
881         collect_size.
882         * aarch64-linux-tdep.c
883         (aarch64_linux_iterate_over_regset_sections): Likewise.
884         * alpha-linux-tdep.c
885         (alpha_linux_iterate_over_regset_sections):
886         * alpha-nbsd-tdep.c
887         (alphanbsd_iterate_over_regset_sections): Likewise.
888         * amd64-fbsd-tdep.c
889         (amd64fbsd_iterate_over_regset_sections): Likewise.
890         * amd64-linux-tdep.c
891         (amd64_linux_iterate_over_regset_sections): Likewise.
892         * arm-bsd-tdep.c
893         (armbsd_iterate_over_regset_sections): Likewise.
894         * arm-fbsd-tdep.c
895         (arm_fbsd_iterate_over_regset_sections): Likewise.
896         * arm-linux-tdep.c
897         (arm_linux_iterate_over_regset_sections): Likewise.
898         * corelow.c (get_core_registers_cb): Likewise.
899         (core_target::fetch_registers): Likewise.
900         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
901         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
902         * gdbarch.h (void): Regenerate.
903         * gdbarch.sh: Add supply_size and collect_size.
904         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
905         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
906         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
907         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
908         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
909         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
910         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
911         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
912         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
913         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
914         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
915         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
916         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
917         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
918         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
919         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
920         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
921         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
922         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
923         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
924         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
925         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
926         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
927         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
928         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
929         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
930         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
931         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
932         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
933         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
934
935 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
936
937         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
938         with string_printf.
939
940 2018-08-10  Keith Seitz  <keiths@redhat.com>
941
942         * compile/compile-c-support.c (add_code_header, add_code_footer):
943         Move into policy class.
944         (c_push_user_expression, pop_user_expression_nop)
945         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
946         (compile_program): New host class.
947         (c_compile_program): New typedef.
948         (c_compute_porgram): Use c_compile_program.
949
950 2018-08-10  Keith Seitz  <keiths@redhat.com>
951
952         * compile/compile-internal.h (compile_instance::~compile_instance):
953         Remove calls to htab_delete.
954         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
955         * compile.c (compile_instance::compile_instance): Initialize
956         htab unique pointers.
957         (compile_instance::get_cached_type, compile_instance::insert_type)
958         (compile_instance::error_symbol_once): Update for unique_ptr.
959
960 2018-08-10  Keith Seitz  <keiths@redhat.com>
961
962         * compile/compile-c-symbols.c (struct symbol_error)
963         (hash_symbol_error, eq_symbol_error, del_symbol_error)
964         (compile_instance::insert_symbol_error)
965         (compile_instance::error_symbol_once): Move to ...
966         * compile/compile.c: ... here.
967
968 2018-08-10  Keith Seitz  <keiths@redhat.com>
969
970         * compile/compile-c-support.c (c_get_compile_context): Use `new'
971         instead of `new_compile_instance'.
972         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
973         Update description.
974         If the symbol error map is not initialized, create it.
975         (generate_c_for_for_one_symbol): Do not check/initialize
976         the symbol error map.
977         * compile/compile-c-types.c (compile_c_instance): Make a class.
978         Update all callers.
979         (compile_instance::compile_instance): Initialize the type cache.
980         (get_cached_type): New function.
981         (insert_type): Update description.
982         (compile_c_instance::m_default_cflags): Define.
983         (convert_type): Update description.  Use get_cached_type.
984         (delete_instance): Moved to destructor.
985         (new_compile_instance): Moved to constructor.
986         * compile/compile-c.h (compile_c_instance): Make class inheriting
987         from compile_instance.
988         <base>: Remove field.
989         <type_map, symbol_err_map>: Move to base class.
990         <c_plugin>: Rename to `m_plugin' and remove pointer type.
991         * compile/compile-internal.h (compile_instance): Make class.
992         <type_map_t, symbol_err_map_t>: Define.
993         <fe>: Rename to `m_gcc_fe'.
994         <scope, block, gcc_target_options>: Add `m_' prefix.
995         <m_type_map, m_symbol_err_map>: New fields, moved from
996         compile_c_instance.
997         <destroy>: Remove.
998         (convert_type, new_compile_instance): Remove.
999         * compile/compile.c (cleanup_compile_instance): Remove.
1000         (compile_to_object): Use unique_ptr to eliminate cleanups.
1001         (compile_instance::set_print_callback, compile_instance::version)
1002         (compile_instance::set_verbose)
1003         (compile_instance::set_driver_filename)
1004         (compile_instance::set_triplet_regexp)
1005         (compile_instance::set_arguments)
1006         (compile_instance::set_source_file)
1007         (compile_instance::compile): Define.
1008
1009 2018-08-10  Keith Seitz  <keiths@redhat.com>
1010
1011         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1012         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1013         gcc-c-fe.def to define C plugin.
1014         (delete_instance): Delete `c_plugin'.
1015         (new_compile_instance): Initialize `c_plugin'.
1016         * compile/compile-c.h: Include gcc_c_plugin.h.
1017         (struct compile_c_instance) <c_plugin>: New member.
1018         * gcc-c-plugin.h: New file.
1019         Update all callers with API change.
1020
1021 2018-08-10  Keith Seitz  <keiths@redhat.com>
1022
1023         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1024         (HFILES_NO_SRCDIR): ... to here.
1025         Add compile-internal.h and compile-c.h.
1026         * compile/compile-c-support.c: Include compile-c.h.
1027         * compile/compile-c-symbols.c: Include compile-c.h.
1028         (generate_c_for_variable_locations): Update comment.
1029         * compile/compile-c-types.c: Include compile-c.h.
1030         * compile/compile-c.h: New file -- moved C language declarations
1031         from other files here.
1032         * compile/compile-internal.h: Do not include hashtab.h or
1033         common/enum-flags.h.
1034         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1035         (gcc_convert_symbol, gcc_symbol_address)
1036         (generate_c_for_variable_locations, c_get_mode_for_size)
1037         (c_get_range_decl_name): Definitions moved to compile-c.h.
1038         * compile/compile-loc2c.c: Include compile-c.h.
1039
1040 2018-08-10  Keith Seitz  <keiths@redhat.com>
1041
1042         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1043         (c_symbol_substitution_name): ... this.
1044         Update all callers.
1045
1046 2018-08-10  Keith Seitz  <keiths@redhat.com>
1047
1048         * compile/compile-c-support.c (c_compute_program): Use
1049         unique_xmalloc_ptr to eliminate cleanup.
1050         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1051         Return a unique_xmalloc_ptr and eliminate cleanup.
1052         * compile/compile-internal.h (generate_c_for_variable_locations):
1053         Return unique_xmalloc_ptr and update description.
1054
1055 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1056
1057         * corelow.c (core_target::get_core_register_section): Rename
1058         min_size to section_min_size.
1059
1060 2018-08-09  Jim Wilson  <jimw@sifive.com>
1061
1062         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1063         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1064         * NEWS: Mention new GNU/Linux RISC-V target.
1065         * configure.host: Add riscv*-*-linux*.
1066         * configure.nat: Add riscv*.
1067         * configure.tgt: Add riscv*-*-linux*.
1068         * riscv-linux-nat.c: New file.
1069         * riscv-linux-tdep.c: New file.
1070
1071 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1072
1073         * infrun.c (resume): Make static, add forward declaration.
1074         (proceed): Update header comment.
1075         * infrun.h (resume): Delete declaration.
1076
1077 2018-08-09  Tom Tromey  <tom@tromey.com>
1078
1079         * riscv-tdep.h: Minor formatting fixes.
1080
1081 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1082
1083         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1084         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1085         (test_mkdir_recursive): Likewise.
1086         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1087
1088 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1089
1090         * valarith.c (value_subscripted_rvalue): If an array is not in
1091         memory, and we don't know the upper bound, then we can't know that
1092         the requested element exists or not.
1093
1094 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1095
1096         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1097         (target_options_to_string): Add comment.
1098
1099 2018-08-08  Tom Tromey  <tom@tromey.com>
1100
1101         * unittests/scoped_mmap-selftests.c: Check result of "write".
1102
1103 2018-08-08  Jim Wilson  <jimw@sifive.com>
1104
1105         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1106         (decode_register_index_short): New.
1107         (decode_j_type_insn, decode_cj_type_insn): New.
1108         (decode_b_type_insn, decode_cb_type_insn): New.
1109         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1110         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1111         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1112         is_c_sw_insn instead of is_sw_insn.
1113         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1114         (riscv_software_single_step): New.
1115         * riscv-tdep.h (riscv_software_single_step): Declare.
1116
1117         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1118         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1119
1120 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1121
1122         PR gdb/18050:
1123         * target.c (dispose_inferior): Don't dispose of inferiors that are
1124         already killed.
1125
1126 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1127
1128         * remote.c (remote_target::download_tracepoint): Change char* to
1129         const char*.
1130
1131 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1132
1133         * target.h (target_options_to_string): Return an std::string.
1134         * target.c (str_comma_list_concat_elem): Return void, use
1135         std::string.
1136         (do_option): Likewise.
1137         (target_options_to_string): Return an std::string.
1138         * linux-nat.c (linux_nat_target::wait): Adjust.
1139         * target-debug.h (target_debug_print_options): Adjust.
1140
1141 2018-08-07  Tom Tromey  <tom@tromey.com>
1142
1143         * Makefile.in (CPPFLAGS): New variable.
1144         (INTERNAL_CPPFLAGS): Use it.
1145
1146 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1147
1148         * NEWS: Mention the index cache.
1149
1150 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1151
1152         * common/pathstuff.h (get_standard_cache_dir): New.
1153         * common/pathstuff.c (get_standard_cache_dir): New.
1154         * build-id.h (build_id_to_string): New.
1155         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1156         DEBUG_STR_SUFFIX): Move to here.
1157         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1158         DEBUG_STR_SUFFIX): Move from there.
1159         (write_psymtabs_to_index): Make non-static, add basename
1160         parameter.  Write to temporary files, rename when done.
1161         (save_gdb_index_command): Adjust call to
1162         write_psymtabs_to_index.
1163         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1164         field.
1165         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1166         (get_gdb_index_contents_from_cache): New.
1167         (get_gdb_index_contents_from_cache_dwz): New.
1168         (dwarf2_initialize_objfile): Read index from cache.
1169         (dwarf2_build_psymtabs): Save to index.
1170         * dwarf-index-cache.h: New file.
1171         * dwarf-index-cache.c: New file.
1172         * dwarf-index-write.h: New file.
1173
1174 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1175
1176         * gnulib/aclocal.m4: Re-generate.
1177         * gnulib/config.in: Re-generate.
1178         * gnulib/configure: Re-generate.
1179         * gnulib/import/Makefile.am: Re-generate.
1180         * gnulib/import/Makefile.in: Re-generate.
1181         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1182         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1183         * gnulib/import/m4/mkdir.m4: New file.
1184         * gnulib/import/mkdir.c: New file.
1185         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1186         module.
1187
1188 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1189
1190         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1191         * common/scoped_mmap.c: New file.
1192         * common/scoped_mmap.h (destroy): New method.
1193         (~scoped_mmap, reset): Use destroy.
1194         (scoped_mmap): New move constructor.
1195         (mmap_file): New declaration.
1196         * unittests/scoped_mmap-selftests.c (test_normal,
1197         test_invalid_filename, run_tests): New functions.
1198         (_initialize_scoped_mmap_selftests): Register selftest.
1199
1200 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1201
1202         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1203         (read_gdb_index_from_buffer): ... this.  Remove section
1204         parameter, add buffer parameter.
1205         (get_gdb_index_contents_ftype,
1206         get_gdb_index_contents_dwz_ftype): New typedefs.
1207         (dwarf2_read_gdb_index): Add callback parameters to get the
1208         index contents.
1209         (get_gdb_index_contents_from_section): New.
1210         (dwarf2_initialize_objfile): Update call to
1211         dwarf2_read_gdb_index.
1212
1213 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1214
1215         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1216         (gdb_open_cloexec): Likewise.
1217         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1218         (commandline_from_pid): Likewise.
1219         (linux_xfer_osdata_threads): Likewise.
1220         (linux_xfer_osdata_fds): Likewise.
1221         * ada-lang.c (is_package_name): Likewise.
1222         * auxv.c (procfs_xfer_auxv): Likewise.
1223         * breakpoint.c (print_one_breakpoint_location): Use
1224         uiout::field_fmt.
1225         (print_one_catch_solib): Use string_printf.
1226         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1227         (add_pe_forwarded_sym): Likewise.
1228         * dwarf2read.c (create_type_unit_group): Likewise.
1229         (build_error_marker_type): Likewise.
1230         * infcall.c (get_function_name): Likewise.
1231         * valprint.c (print_converted_chars_to_obstack): Likewise.
1232         * xtensa-tdep.c (xtensa_register_type): Likewise.
1233
1234 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1235
1236         * remote.c (remote_target::download_tracepoint): Fix format
1237         string errors.
1238
1239 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1240
1241         * tracefile.c: Include common/byte-vector.h.
1242         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1243         with trace_regblock_size if needed.  Update uses of buf.
1244
1245 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1246
1247         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1248         std::vector<unsigned char>.
1249         * tracepoint.c (collection_list::collection_list): Remove
1250         m_regs_mask initializer from initializer list.  Resize
1251         m_regs_mask using the largest remote register number.
1252         (collection_list::add_remote_register): Remove size check on
1253         m_regs_mask.  Use at to access element.
1254         (collection_list::stringify): Change type of temp_buf to
1255         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1256         stringify the register mask.  Use pack_hex_byte for the register
1257         mask.
1258
1259 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1260
1261         * tracepoint.h (class collection_list) <add_register>: Remove.
1262         <add_remote_register, add_ax_registers, add_local_register>:
1263         Declare.
1264         <add_memrange>: Add scope parameter.
1265         * tracepoint.c (encode_actions_1): Likewise.
1266         (collection_list::add_register): Rename to ...
1267         (collection_list::add_remote_register): ... this.  Update
1268         comment.
1269         (collection_list::add_ax_registers, add_local_register): New
1270         methods.
1271         (collection_list::add_memrange): Add scope parameter.  Call
1272         add_local_register instead of add_register.
1273         (finalize_tracepoint_aexpr): New function.
1274         (collection_list::collect_symbol): Update calls to add_memrange.
1275         Call add_local_register instead of add_register.  Call
1276         add_ax_registers.  Call finalize_tracepoint_aexpr.
1277         (encode_actions_1): Get remote regnos for $reg action.  Call
1278         add_remote_register, add_ax_registers, and add_local_register.
1279         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1280         (validate_actionline): Call finalize_tracepoint_aexpr.
1281
1282 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1283
1284         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1285         Replace array buf with gdb::char_vector buf, of size
1286         get_remote_packet_size ().  Replace references to buf and
1287         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1288         and xsnprintf with snprintf.  Raise errors if the buffer is too
1289         small.
1290
1291 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1292
1293         * remote.c (remote_target::download_tracepoint): Fix the has_more
1294         predicate in the QTDP action list iteration.
1295
1296 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1297
1298         * remote.c (remote_target::download_tracepoint): Fix indentation
1299         in for block.
1300
1301 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1302
1303         * proc-api.c (_initialize_proc_api): Remove c, unused.
1304         * procfs.c (procfs_init_inferior): Remove signals, unused.
1305         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1306         unused.
1307
1308 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1309             Andrew Burgess  <andrew.burgess@embecosm.com>
1310
1311         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1312         'W_STOPCODE (0)' as this could be ambiguous.
1313
1314 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1315
1316         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1317         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1318         "ai_socktype").
1319
1320 2018-08-02  Tom Tromey  <tom@tromey.com>
1321
1322         PR symtab/16842.
1323         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1324         symbols.
1325         (process_structure_scope): Likewise.
1326
1327 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1328
1329         PR gdb/22629:
1330         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1331         kill inferior.
1332
1333 2018-08-02  Tom Tromey  <tom@tromey.com>
1334
1335         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1336         (darwin_suspend_inferior, darwin_resume_inferior)
1337         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1338         (darwin_check_new_threads): Check result of get_darwin_inferior.
1339
1340 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1341
1342         GDB 8.1.1 released.
1343
1344 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1345
1346         * varobj.c (varobj_get_path_expr_parent): Report an error if
1347         parent is a dynamic varobj.
1348
1349 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1350
1351         * gnulib/aclocal.m4: Re-generate.
1352         * gnulib/config.in: Re-generate.
1353         * gnulib/configure: Re-generate.
1354         * gnulib/import/Makefile.in: Re-generate.
1355         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1356         * gnulib/import/m4/onceonly.m4: Re-generate.
1357
1358 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1359
1360         * target-descriptions.c (struct xml_test_tdesc): New.
1361         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1362         (record_xml_tdesc): Update.
1363         (maintenance_check_xml_descriptions): Update.
1364         * target-descriptions.h (record_xml_tdesc): Update comment.
1365
1366 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1367
1368         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1369         checking array bounds are defined.
1370
1371 2018-07-30  Tom Tromey  <tom@tromey.com>
1372
1373         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1374         irreflexivity violation.
1375
1376 2018-07-30  Tom Tromey  <tom@tromey.com>
1377
1378         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1379         * value.c (unpack_long): Remove lint code.
1380         * valops.c (value_ind): Remove lint code.
1381         * valarith.c (value_x_binop, value_x_unop, value_equal)
1382         (value_pos): Remove lint code.
1383
1384 2018-07-28  Tom de Vries  <tdevries@suse.de>
1385
1386         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1387         with undefined upper bound as <optimized out>.
1388
1389 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1390
1391         * gcore.in: Rename variable "name" to "prefix".  Expand
1392         "usage" text.
1393
1394 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1395
1396         * windows-nat.c (windows_nat_target::create_inferior): Update to
1397         call close() in global namespace.
1398
1399 2018-07-26  Tom Tromey  <tom@tromey.com>
1400
1401         * dwarf-index-write.c (add_address_entry): Don't add objfile
1402         offsets.
1403         * dbxread.c (find_stab_function): Rename from
1404         find_stab_function_addr.  Return a bound_minimal_symbol.
1405         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1406         Don't add objfile offsets.
1407         (end_psymtab): Use raw_text_low, raw_text_high,
1408         MSYMBOL_VALUE_RAW_ADDRESS.
1409         (read_ofile_symtab): Update.
1410         (process_one_symbol): Update.
1411         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1412         offsets.
1413         (dw2_relocate): Remove.
1414         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1415         searching addrmap.
1416         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1417         Update.
1418         (process_psymtab_comp_unit_reader, add_partial_symbol)
1419         (add_partial_subprogram, dwarf2_ranges_read): Update.
1420         (load_partial_dies): Update.
1421         (add_address_entry): Don't add objfile offsets.
1422         (dwarf2_build_include_psymtabs): Update.
1423         (create_addrmap_from_aranges): Don't add objfile offsets.
1424         (dw2_find_pc_sect_compunit_symtab): Update.
1425         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1426         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1427         Update.
1428         (parse_partial_symbols): Don't add objfile offsets.  Use
1429         raw_text_low, raw_text_high.  Update.
1430         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1431         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1432         or call 'relocate' quick function.  Clear psymbol_map.
1433         * psympriv.h (struct partial_symbol) <address>: Add section
1434         offset.
1435         <set_unrelocated_address>: Rename from set_address.
1436         <raw_text_low, raw_text_high>: New methods.
1437         <text_low, text_high>: Add objfile parameter.
1438         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1439         set_unrelocated_address.
1440         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1441         (find_pc_psymbol): Update.
1442         (fixup_psymbol_section, relocate_psymtabs): Remove.
1443         (dump_psymtab, psym_functions): Update.
1444         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1445         parameter.
1446         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1447         (start_psymtab_common): Update.
1448         * symfile-debug.c (debug_qf_relocate): Remove.
1449         (debug_sym_quick_functions): Update.
1450         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1451         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1452         Update.
1453
1454 2018-07-26  Tom Tromey  <tromey@redhat.com>
1455
1456         * dbxread.c (end_psymtab): Use text_high_valid and
1457         text_low_valid.
1458         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1459         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1460         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1461         Update comment.
1462         <text_low_valid, text_high_valid>: New fields.
1463         <set_text_low, set_text_high>: Update.
1464         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1465
1466 2018-07-26  Tom Tromey  <tom@tromey.com>
1467
1468         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1469         Update.
1470         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1471         textlow and texthigh fields.
1472         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1473         Update.
1474         * mdebugread.c (parse_lines, parse_partial_symbols)
1475         (psymtab_to_symtab_1): Update.
1476         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1477         Rename fields.  Update comment.  Now private.
1478         <text_low, text_high, set_text_low, set_text_high>: New methods.
1479         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1480         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1481         (start_psymtab_common, maintenance_info_psymtabs)
1482         (maintenance_check_psymtabs): Update.
1483         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1484         texthigh fields.
1485         (scan_xcoff_symtab): Update.
1486
1487 2018-07-26  Tom Tromey  <tromey@redhat.com>
1488
1489         * psympriv.h (struct partial_symbol) <unrelocated_address,
1490         address, set_address>: New methods.
1491         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1492         (fixup_psymbol_section, relocate_psymtabs): Update.
1493         (print_partial_symbols): Add 'objfile' parameter.  Update.
1494         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1495         Update.
1496
1497 2018-07-26  Tom Tromey  <tom@tromey.com>
1498
1499         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1500         (debug_names::write_psymbols): Update.
1501         * psympriv.h (struct partial_symbol): Derive from
1502         general_symbol_info.
1503         <obj_section>: New method.
1504         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1505         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1506         (find_pc_sect_psymbol, fixup_psymbol_section)
1507         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1508         (print_partial_symbols, recursively_search_psymtabs)
1509         (compare_psymbols, psymbol_hash, psymbol_compare)
1510         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1511         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1512
1513 2018-07-26  Tom Tromey  <tromey@redhat.com>
1514
1515         * dbxread.c (end_psymtab): Remove dead code.
1516
1517 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1518
1519         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1520         DWARF unwinders are disabled.
1521         * dwarf2-frame.c: Add dwarf2read.h include.
1522         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1523         disabled.
1524         (dwarf2_frame_unwinders_enabled_p): Define.
1525         (show_dwarf_unwinders_enabled_p): New function.
1526         (_initialize_dwarf2_frame): Register switch to control DWARF
1527         unwinder use.
1528         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1529         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1530         (show_dwarf_cmdlist): Remove static keyword.
1531         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1532         (show_dwarf_cmdlist): Declare.
1533         * NEWS: Document new feature.
1534
1535 2018-07-26  Tom de Vries  <tdevries@suse.de>
1536
1537         PR breakpoints/23366
1538         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1539
1540 2018-07-26  Tom de Vries  <tdevries@suse.de>
1541
1542         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1543         DW_AT_count can't be translated to a dynamic prop.
1544
1545 2018-07-25  Tom de Vries  <tdevries@suse.de>
1546
1547         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1548         try/catch.
1549
1550 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1551
1552         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1553
1554 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1555
1556         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1557
1558 2018-07-24  Keith Seitz  <keiths@redhat.comt
1559
1560         PR symtab/23010
1561         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1562         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1563         instead of add_symbol_to_list.
1564         (read_file_scope): Call prepare_one_comp_unit before reading
1565         any other DIEs.
1566
1567 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1568
1569         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1570
1571 2018-07-24  Tom Tromey  <tom@tromey.com>
1572
1573         * utils.c (malloc, realloc, free): Don't declare.
1574         * configure, config.in: Rebuild.
1575         * configure.ac: Don't check for declarations of free, malloc, or
1576         realloc.
1577
1578 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1579
1580         * aarch64-linux-nat.c
1581         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1582         variable.
1583         * arm-linux-nat.c (fetch_regs): Likewise.
1584         (store_regs): Likewise.
1585         (fetch_vfp_regs): Likewise.
1586         (store_vfp_regs): Likewise.
1587         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1588         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1589         (arm_linux_nat_target::insert_watchpoint): Likewise.
1590         (arm_linux_nat_target::remove_watchpoint): Likewise.
1591         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1592         Likewise.
1593         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1594         Likewise.
1595         * ppc-linux-nat.c (fetch_register): Likewise.
1596         (fetch_all_gp_regs): Likewise.
1597         (fetch_ppc_registers): Likewise.
1598         (store_all_gp_regs): Likewise.
1599         (store_ppc_registers): Likewise.
1600         (hwdebug_insert_point): Likewise.
1601         (can_use_watchpoint_cond_accel): Likewise.
1602         * remote-sim.c (gdb_os_write_stdout): Likewise.
1603
1604 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1605             Tom Tromey  <tom@tromey.com>
1606
1607         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1608         test for it.
1609         * configure: Rebuild.
1610
1611 2018-07-22  Tom Tromey  <tom@tromey.com>
1612
1613         * regformats/regdat.sh: Define xmltarget_${name} inside
1614         #ifndef IN_PROCESS_AGENT.
1615
1616 2018-07-22  Tom Tromey  <tom@tromey.com>
1617
1618         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1619
1620 2018-07-22  Tom Tromey  <tom@tromey.com>
1621
1622         * symfile.c (reread_symbols): Notify iter, not objfile.
1623
1624 2018-07-22  Tom Tromey  <tom@tromey.com>
1625
1626         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1627         Use arch_ops.
1628         (ravenscar_thread_target::prepare_to_store): Likewise.
1629
1630 2018-07-22  Tom Tromey  <tom@tromey.com>
1631
1632         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1633         unused variable.  Call value_fetch_lazy when needed.
1634         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1635         Remove unused variable.  Call value_fetch_lazy when needed.
1636
1637 2018-07-22  Tom Tromey  <tom@tromey.com>
1638
1639         * m32c-tdep.c (mark_dma): Return void.
1640         (make_regs): Remove unused declarations.
1641
1642 2018-07-22  Tom Tromey  <tom@tromey.com>
1643
1644         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1645         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1646         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1647         bkscm_get_valid_block_smob_arg_unsafe for effect.
1648
1649 2018-07-22  Tom Tromey  <tom@tromey.com>
1650
1651         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1652         value_type.
1653
1654 2018-07-22  Tom Tromey  <tom@tromey.com>
1655
1656         * windows-nat.c (saved_context): Conditionally define.
1657         * remote.c (remote_target::remote_btrace_maybe_reopen):
1658         Conditionally declare "warned".
1659         * inflow.c (sigquit_ours): Conditionally define.
1660         (new_tty): Move "tty" declaration inside #if.
1661         * guile/guile.c (guile_datadir): Conditionally define.
1662         * charset.c (set_be_le_names): Move some declarations inside #if.
1663         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1664         #if.
1665         (parse_xml_btrace_conf): Likewise.
1666
1667 2018-07-22  Tom Tromey  <tom@tromey.com>
1668
1669         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1670
1671 2018-07-22  Tom Tromey  <tom@tromey.com>
1672
1673         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1674         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1675         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1676         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1677         * stack.c (frame_apply_level_command): Remove unused variable.
1678         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1679         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1680         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1681         unused variable.
1682         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1683         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1684         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1685         variable.
1686         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1687         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1688         variable.
1689         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1690         Remove unused variable.
1691         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1692         variable.
1693         * common/tdesc.c (print_xml_feature::visit): Remove unused
1694         variable.
1695         * compile/compile-object-load.c (store_regs): Remove unused
1696         variables.
1697         * complaints.c (clear_complaints): Remove unused variable.
1698         * corelow.c (core_target_open): Remove unused variable.
1699         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1700         variable.
1701         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1702         variable.
1703         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1704         variable.
1705         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1706         variable.
1707         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1708         variable.
1709         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1710         variable.
1711         * ia64-tdep.c (examine_prologue): Remove unused variable.
1712         * infcall.c (run_inferior_call): Remove unused variable.
1713         * inferior.c (exit_inferior): Remove unused variable.
1714         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1715         * linespec.c (decode_line_2): Remove unused variable.
1716         * linux-nat.c (super_close): Remove.
1717         * linux-tdep.c (linux_info_proc): Remove unused variable.
1718         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1719         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1720         Remove unused variable.
1721         * parse.c (find_minsym_type_and_address): Remove unused variable.
1722         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1723         variable.
1724         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1725         variable.
1726         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1727         variables.
1728         * record-btrace.c (record_btrace_target::store_registers): Remove
1729         unused variable.
1730         (cmd_show_record_btrace_cpu): Remove unused variable.
1731         * riscv-tdep.c (riscv_register_reggroup_p)
1732         (riscv_push_dummy_call, riscv_return_value): Remove unused
1733         variable.
1734         * rust-exp.y (literal): Remove unused variable.
1735         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1736         unused variable.
1737         <STRUCTOP_ANONYMOUS>: Likewise.
1738         * s390-linux-tdep.c (s390_linux_init_abi_31)
1739         (s390_linux_init_abi_64): Remove unused variable.
1740         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1741         (file_select_thread, net_windows_open, _initialize_ser_windows):
1742         Remove unused variables.
1743         * symtab.c (find_pc_sect_line): Remove unused variable.
1744         * target-memory.c (compute_garbled_blocks): Remove unused
1745         variable.
1746         (target_write_memory_blocks): Remove unused variable.
1747         * target.c (target_stack::unpush): Remove unused variables.
1748         * tracepoint.c (start_tracing, all_tracepoint_actions)
1749         (merge_uploaded_trace_state_variables)
1750         (print_one_static_tracepoint_marker): Remove unused variable.
1751         * unittests/basic_string_view/element_access/char/1.cc (test01):
1752         Remove unused variable.
1753         * windows-nat.c (windows_continue, windows_add_all_dlls)
1754         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1755         Remove unused variables.
1756
1757 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1758
1759         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1760         attr_profile in HAVE_ELF.
1761         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1762         HAVE_ELF.
1763
1764 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1765
1766         * frame.c (frame_register_unwind): Change parameter name.
1767         (frame_unwind_register): Likewise.
1768         (frame_unwind_register_value): Likewise.
1769         (frame_unwind_register_signed): Likewise.
1770         (frame_unwind_register_unsigned): Likewise.
1771         * frame.h (frame_register_unwind): Likewise.
1772         (frame_unwind_register): Likewise.
1773         (frame_unwind_register_value): Likewise.
1774         (frame_unwind_register_signed): Likewise.
1775         (frame_unwind_register_unsigned): Likewise.
1776         (frame_unwind_arch): Likewise.
1777
1778 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1779
1780         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1781         ISA maintenance.
1782
1783 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1784
1785         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1786         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1787         hand.
1788
1789 2018-07-20  Keith Seitz  <keiths@redhat.com>
1790
1791         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1792         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1793         m_compunit_symtab, m_language>: Add "m_" prefix.
1794         Update all uses.
1795         * buildsym.c: Update all uses.
1796
1797 2018-07-20  Tom Tromey  <tom@tromey.com>
1798
1799         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1800         * buildsym.h (record_line_ftype): Remove typedef.
1801
1802 2018-07-20  Tom Tromey  <tom@tromey.com>
1803
1804         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1805         (end_expandable_symtab): Likewise.
1806         (end_symtab_get_static_block): Likewise.
1807         (end_symtab_from_static_block): Likewise.
1808         * buildsym-legacy.c (augment_type_symtab): Remove.
1809         (end_expandable_symtab): Remove.
1810         (end_symtab_get_static_block): Remove.
1811         (end_symtab_from_static_block): Remove.
1812
1813 2018-07-20  Tom Tromey  <tom@tromey.com>
1814
1815         * dwarf2read.c: Include buildsym.h.
1816         (struct dwarf2_cu) <builder>: New method.
1817         (fixup_go_packaging): Update.
1818         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1819         use scoped_free_pendings.
1820         (using_directives): Add "cu" parameter, remove "language".
1821         (read_import_statement, setup_type_unit_groups, )
1822         (read_func_scope, read_lexical_block_scope)
1823         (dwarf2_record_block_ranges, read_namespace): Update.
1824         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1825         (lnp_state_machine::handle_end_sequence): Update.
1826         (class lnp_state_machine) <m_cu>: New member.
1827         <m_record_line_callback>: Remove.
1828         <m_currently_recording_lines>: New member.
1829         (lnp_state_machine::handle_set_file): Update.
1830         (noop_record_line): Remove.
1831         (dwarf_record_line_p): Add cu parameter.
1832         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1833         (lnp_state_machine::record_line)
1834         (lnp_state_machine::lnp_state_machine)
1835         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1836         (dwarf_decode_lines): Update.
1837         (dwarf2_start_subfile): Add cu parameter.
1838         (dwarf2_start_symtab, new_symbol): Update.
1839         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1840         Remove dwarf2_per_objfile parameter.
1841         (dwarf_decode_macros): Update.
1842
1843 2018-07-20  Tom Tromey  <tom@tromey.com>
1844
1845         * stabsread.c (define_symbol): Update.
1846         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1847         * dwarf2read.c (new_symbol): Update.
1848         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1849         * cp-namespace.c: Include buildsym.h.
1850         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1851         * buildsym-legacy.c (get_buildsym_compunit): New function.
1852
1853 2018-07-20  Tom Tromey  <tom@tromey.com>
1854
1855         * xcoffread.c: Include buildsym-legacy.h.
1856         * windows-nat.c: Include buildsym-legacy.h.
1857         * stabsread.c: Include buildsym-legacy.h.
1858         * mdebugread.c: Include buildsym-legacy.h.
1859         * buildsym-legacy.h: New file.
1860         * buildsym-legacy.c: New file, from buildsym.c.
1861         * go32-nat.c: Include buildsym-legacy.h.
1862         * dwarf2read.c: Include buildsym-legacy.h.
1863         * dbxread.c: Include buildsym-legacy.h.
1864         * cp-namespace.c: Include buildsym-legacy.h.
1865         * coffread.c: Include buildsym-legacy.h.
1866         * buildsym.h: Move some contents to buildsym-legacy.h.
1867         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1868         buildsym-legacy.c.
1869         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1870
1871 2018-07-20  Tom Tromey  <tom@tromey.com>
1872
1873         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1874         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1875         (buildsym_compunit::buildsym_compunit)
1876         (buildsym_compunit::~buildsym_compunit)
1877         (buildsym_compunit::get_macro_table): Define.
1878
1879 2018-07-20  Tom Tromey  <tom@tromey.com>
1880
1881         * buildsym.c (reset_symtab_globals): Remove.
1882         (buildsym_compunit::end_symtab_from_static_block): Update.
1883         (buildsym_compunit::augment_type_symtab): Update.
1884         (end_symtab_from_static_block): Call free_buildsym_compunit.
1885         (augment_type_symtab, end_symtab, end_expandable_symtab):
1886         Likewise.
1887
1888 2018-07-20  Tom Tromey  <tom@tromey.com>
1889
1890         * arch-utils.c: Do not include buildsym.h.
1891         * mipsread.c: Do not include buildsym.h.
1892         * machoread.c: Do not include buildsym.h.
1893         * elfread.c: Do not include buildsym.h.
1894
1895 2018-07-20  Tom Tromey  <tom@tromey.com>
1896
1897         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1898         initialization.
1899         (buildsym_compunit): Add new constructor.
1900         (struct buildsym_compunit) <get_last_source_file, finish_block,
1901         record_block_range, start_subfile, patch_subfile_names,
1902         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1903         set_last_source_start_addr, get_last_source_start_addr,
1904         get_local_using_directives, set_local_using_directives,
1905         get_global_using_directives, outermost_context_p,
1906         get_current_context_stack, get_context_stack_depth,
1907         get_current_subfile, get_local_symbols, get_file_symbols,
1908         get_global_symbols, record_debugformat, record_producer,
1909         push_context, pop_context, end_symtab_get_static_block,
1910         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1911         New public methods.
1912         <record_pending_block, finish_block_internal, make_blockvector,
1913         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1914         private methods.
1915         Update all users.
1916
1917 2018-05-22  Tom Tromey  <tom@tromey.com>
1918
1919         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1920         parameter.
1921         (finish_block_internal): Update.
1922
1923 2018-07-20  Tom Tromey  <tom@tromey.com>
1924
1925         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1926         parameter.
1927         (finish_block_internal): Update.
1928
1929 2018-07-20  Tom Tromey  <tom@tromey.com>
1930
1931         * buildsym.h (EXTERN): Don't define or undef.
1932         * buildsym.c (EXTERN): Don't define.
1933
1934 2018-07-20  Tom Tromey  <tom@tromey.com>
1935
1936         * buildsym.c: Remove TODO comment.
1937
1938 2018-07-20  Tom Tromey  <tom@tromey.com>
1939
1940         * coffread.c (coff_symtab_read): Update.
1941         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1942         (xcoff_new_init): Update.
1943         * mipsread.c (mipscoff_new_init): Update.
1944         * mdebugread.c (mdebug_build_psymtabs): Update.
1945         * elfread.c (elf_new_init): Update.
1946         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1947         Update.
1948         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1949         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1950         (stabsect_build_psymtabs): Update.
1951         * buildsym.h (buildsym_init): Don't declare.
1952         * buildsym.c: Update comment.
1953         (prepare_for_building): Remove.
1954         (start_symtab, restart_symtab): Update.
1955         (reset_symtab_globals): Update comment.
1956         (buildsym_init): Remove.
1957
1958 2018-07-20  Tom Tromey  <tom@tromey.com>
1959
1960         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1961         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1962         (read_enum_type, common_block_start, common_block_end)
1963         (cleanup_undefined_types_1, finish_global_stabs): Update.
1964         * mdebugread.c (psymtab_to_symtab_1): Update.
1965         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1966         (read_lexical_block_scope, new_symbol): Update.
1967         * dbxread.c (process_one_symbol): Update.
1968         * coffread.c (coff_symtab_read, process_coff_symbol)
1969         (coff_read_enum_type): Update.
1970         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1971         declare.
1972         (get_local_symbols, get_file_symbols, get_global_symbols): New
1973         functions.
1974         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1975         m_global_symbols.
1976         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1977         (~scoped_free_pendings): Update.
1978         (finish_block, prepare_for_building, reset_symtab_globals)
1979         (end_symtab_get_static_block, end_symtab_with_blockvector)
1980         (augment_type_symtab, push_context): Update.
1981         (get_local_symbols, get_file_symbols, get_global_symbols): New
1982         functions.
1983         (buildsym_init): Update.
1984
1985 2018-07-20  Tom Tromey  <tom@tromey.com>
1986
1987         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1988         (process_full_type_unit): Likewise.
1989         (dwarf2_start_symtab): Set list_in_scope.
1990
1991 2018-07-20  Tom Tromey  <tom@tromey.com>
1992
1993         * dwarf2read.c (process_psymtab_comp_unit_reader)
1994         (build_type_psymtabs_reader): Do not set list_in_scope.
1995
1996 2018-07-20  Tom Tromey  <tom@tromey.com>
1997
1998         * buildsym.c (free_pendings): Remove.
1999         (add_symbol_to_list, scoped_free_pendings)
2000         (finish_block_internal, buildsym_init): Update.
2001
2002 2018-07-20  Tom Tromey  <tom@tromey.com>
2003
2004         * xcoffread.c (read_xcoff_symtab): Update.
2005         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2006         Update.
2007         * dbxread.c (process_one_symbol): Update.
2008         * coffread.c (coff_symtab_read): Update.
2009         * buildsym.h (finish_block): Update.
2010         * buildsym.c (finish_block): Remove "listhead" argument.
2011         (end_symtab_get_static_block): Update.
2012
2013 2018-07-20  Tom Tromey  <tom@tromey.com>
2014
2015         * buildsym.h (class scoped_free_pendings): Remove constructor.
2016         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2017         method.
2018         <m_pending_block_obstack, m_pending_blocks>: New members.
2019         (pending_block_obstack, pending_blocks): Remove.
2020         (scoped_free_pendings::scoped_free_pendings): Default.
2021         (~scoped_free_pendings): Update.
2022         (free_pending_blocks): Remove.
2023         (finish_block_internal, record_pending_block, make_blockvector)
2024         (end_symtab_get_static_block, augment_type_symtab, push_context)
2025         (buildsym_init): Update.
2026
2027 2018-07-20  Tom Tromey  <tom@tromey.com>
2028
2029         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2030         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2031         members.
2032         (pending_addrmap, pending_addrmap_obstack)
2033         (pending_addrmap_interesting): Remove.
2034         (scoped_free_pendings, record_block_range, make_blockvector)
2035         (prepare_for_building, reset_symtab_globals, buildsym_init):
2036         Update.
2037
2038 2018-07-20  Tom Tromey  <tom@tromey.com>
2039
2040         * xcoffread.c (process_linenos): Update.
2041         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2042         * mdebugread.c (psymtab_to_symtab_1): Update.
2043         * dwarf2read.c (setup_type_unit_groups)
2044         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2045         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2046         * dbxread.c (process_one_symbol): Update.
2047         * coffread.c (coff_symtab_read, enter_linenos)
2048         (process_coff_symbol): Update.
2049         * buildsym.h (current_subfile): Don't declare.
2050         (get_current_subfile): Declare.
2051         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2052         member.
2053         (start_subfile, free_buildsym_compunit, push_subfile)
2054         (prepare_for_building, start_symtab): Update.
2055         (get_current_subfile): New function.
2056
2057 2018-07-20  Tom Tromey  <tom@tromey.com>
2058
2059         * coffread.c (coff_symtab_read): Update.
2060         * xcoffread.c (read_xcoff_symtab): Update.
2061         * dwarf2read.c (new_symbol): Update.
2062         (read_func_scope, read_lexical_block_scope): Update.
2063         * dbxread.c (process_one_symbol): Update.
2064         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2065         (outermost_context_p): Remove macro.
2066         (outermost_context_p, get_current_context_stack)
2067         (get_context_stack_depth): Declare.
2068         (pop_context): Return struct context_stack.
2069         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2070         member.
2071         (context_stack_size): Remove.
2072         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2073         (prepare_for_building, end_symtab_get_static_block)
2074         (augment_type_symtab, push_context): Update.
2075         (pop_context): Return struct context_stack.
2076         (outermost_context_p, get_current_context_stack)
2077         (get_context_stack_depth): New functions.
2078         (buildsym_init): Update.
2079
2080 2018-07-20  Tom Tromey  <tom@tromey.com>
2081
2082         * rust-exp.y: Now a pure parser.  Update all rules.
2083         (%union): Move earlier.
2084         (current_parser, work_obstack): Remove globals.
2085         (rust_parser, ~rust_parser): Update.
2086         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2087         lex_character, lex_number, lex_string, lex_identifier,
2088         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2089         convert_name, convert_params_to_expression,
2090         convert_ast_to_expression, ast_basic_type, ast_operation,
2091         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2092         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2093         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2094         ast_array_type, ast_slice_type, ast_reference_type,
2095         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2096         (rust_parse): Update.
2097         (rustyyerror, rustyylex): Add parser parameter.
2098         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2099         (rust_lex_stringish_test, rust_lex_test_sequence)
2100         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2101         (rust_lex_test_push_back, rust_lex_tests): Update.
2102
2103 2018-07-19  Pedro Alves  <palves@redhat.com>
2104
2105         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2106         gdb::unique_xmalloc_ptr.
2107         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2108         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2109         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2110         copy-initialization.
2111         * guile/scm-pretty-print.c (ppscm_print_children): Use
2112         gdb::unique_xmalloc_ptr instead of cleanups.
2113         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2114         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2115         gdb::unique_xmalloc_ptr.
2116         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2117         Adjust to use gdb::unique_xmalloc_ptr.
2118         * guile/scm-utils.c (extract_arg): Adjust.
2119         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2120         gdb::unique_xmalloc_ptr instead of a cleanup.
2121
2122 2018-07-19  Tom Tromey  <tom@tromey.com>
2123
2124         * utils.c (do_value_free_to_mark)
2125         (make_cleanup_value_free_to_mark): Remove.
2126         * utils.h (make_cleanup_value_free_to_mark): Remove.
2127
2128 2018-07-19  Pedro Alves  <palves@redhat.com>
2129
2130         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2131         forwarding reference.
2132
2133 2018-07-18  Pedro Alves  <palves@redhat.com>
2134
2135         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2136         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2137         cleanup.
2138
2139 2018-07-18  Pedro Alves  <palves@redhat.com>
2140
2141         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2142         exceptions.
2143         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2144         (gdbscm_wrap): New.
2145         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2146         directly instead of a cleanup.
2147         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2148         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2149         (vlscm_binop_gdbthrow): New, factored out from ...
2150         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2151         (vlscm_rich_compare): Use gdbscm_wrap.
2152         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2153         instead of a cleanup.
2154         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2155         cleanup.
2156         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2157         Use xfree directly instead of a cleanup.
2158         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2159         Adjust to use gdbscm_wrap and scoped_value_mark.
2160         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2161         (gdbscm_value_address, gdbscm_value_dereference)
2162         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2163         scoped_value_mark.
2164         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2165         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2166         scoped_value_mark.
2167         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2168         gdbscm_wrap and scoped_value_mark.
2169         (gdbscm_value_to_string): Use xfree directly instead of a
2170         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2171         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2172         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2173         scoped_value_mark.
2174         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2175         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2176         scoped_value_mark.
2177         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2178         gdbscm_wrap.
2179
2180 2018-07-18  Tom de Vries  <tdevries@suse.de>
2181
2182         * findvar.c (default_read_var_value): Also resolve dynamic type for
2183         LOC_OPTIMIZED_OUT vars.
2184
2185 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2186
2187         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2188         decoding.
2189
2190 2018-07-17  Tom Tromey  <tom@tromey.com>
2191
2192         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2193         (compute_enum_list, pascm_set_param_value_x)
2194         (gdbscm_parameter_value): Update.
2195         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2196         (gdbscm_scm_to_host_string): Update.
2197         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2198         Update.
2199         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2200         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2201         * guile/scm-string.c (gdbscm_scm_to_string): Return
2202         unique_xmalloc_ptr.
2203         (gdbscm_scm_to_host_string): Likewise.
2204
2205 2018-07-17  Tom Tromey  <tom@tromey.com>
2206
2207         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2208         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2209         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2210         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2211         unique_xmalloc_ptr.
2212
2213 2018-07-17  Tom Tromey  <tom@tromey.com>
2214
2215         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2216         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2217         Update.
2218         * guile/scm-cmd.c (cmdscm_function): Update.
2219         * guile/scm-pretty-print.c
2220         (ppscm_print_exception_unless_memory_error): Update.
2221         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2222         Return unique_xmalloc_ptr.
2223
2224 2018-07-17  Tom Tromey  <tom@tromey.com>
2225
2226         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2227         Use string_printf.
2228
2229 2018-07-17  Jim Wilson  <jimw@sifive.com>
2230
2231         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2232         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2233         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2234         unecessary braces after EF_RISCV_RVC test.  Delete call to
2235         set_gdbarch_decr_pc_after_break.
2236
2237         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2238         RISCV_LAST_FP_REGNUM + 1.
2239         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2240
2241 2018-07-17  Tom Tromey  <tom@tromey.com>
2242
2243         * configure.ac: Remove --disable-gdbcli.
2244         * configure: Rebuild.
2245         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2246         (SUBDIR_CLI_CFLAGS): Remove.
2247         (SFILES): Use SUBDIR_CLI_SRCS.
2248         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2249
2250 2018-07-17  Tom Tromey  <tom@tromey.com>
2251
2252         PR gdb/18624:
2253         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2254
2255 2018-07-16  Jim Wilson  <jimw@sifive.com>
2256
2257         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2258
2259 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2260
2261         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2262         variable.
2263         (libunwind_frame_sniffer): Likewise.
2264         (libunwind_frame_prev_register): Likewise.
2265         (libunwind_sigtramp_frame_sniffer): Likewise.
2266         * ia64-tdep.c (ia64_access_reg): Likewise.
2267         (ia64_access_rse_reg): Likewise.
2268         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2269         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2270
2271 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2272
2273         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2274
2275 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2276
2277         * remote-sim.c (gdbsim_target::close,
2278         gdbsim_target::mourn_inferior): Remove unused variables.
2279
2280 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2281
2282         * ia64-tdep.c (ktab_buf): New global.
2283         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2284         (get_kernel_table): Adjust.
2285
2286 2018-07-16  Tom Tromey  <tom@tromey.com>
2287
2288         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2289         * dwarf2read.c (using_directives, new_symbol): Use
2290         outermost_context_p.
2291         * dbxread.c (process_one_symbol): Use outermost_context_p.
2292         * coffread.c (coff_symtab_read): Use outermost_context_p.
2293
2294 2018-07-16  Tom Tromey  <tom@tromey.com>
2295
2296         * dwarf2read.c (using_directives, read_func_scope)
2297         (read_lexical_block_scope): Update.
2298         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2299         * buildsym.h (local_using_directives, global_using_directives):
2300         Don't declare.
2301         (get_local_using_directives, set_local_using_directives)
2302         (get_global_using_directives): Declare.
2303         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2304         m_global_using_directives>: New members.
2305         (finish_block_internal, prepare_for_building)
2306         (reset_symtab_globals, end_symtab_get_static_block)
2307         (push_context): Update.
2308         (get_local_using_directives, set_local_using_directives)
2309         (get_global_using_directives): New functions.
2310         (buildsym_init): Update.
2311
2312 2018-07-16  Tom Tromey  <tom@tromey.com>
2313
2314         * xcoffread.c (xcoff_initial_scan): Don't call
2315         free_pending_blocks.
2316         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2317         * buildsym.h (class scoped_free_pendings): Add constructor.
2318         (free_pending_blocks): Don't declare.
2319         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2320         (free_pending_blocks): Now static.
2321
2322 2018-07-16  Tom Tromey  <tom@tromey.com>
2323
2324         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2325         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2326         member.
2327         (struct subfile_stack): Remove.
2328         (subfile_stack): Remove.
2329         (push_subfile, pop_subfile, buildsym_init): Update.
2330
2331 2018-07-16  Tom Tromey  <tom@tromey.com>
2332
2333         * buildsym.c (push_subfile): Use gdb_assert.
2334         (pop_subfile): Use gdb_assert.
2335
2336 2018-07-16  Tom Tromey  <tom@tromey.com>
2337
2338         * buildsym.h (merge_symbol_lists): Remove.
2339         * buildsym.c (merge_symbol_lists): Remove.
2340
2341 2018-07-16  Tom Tromey  <tom@tromey.com>
2342
2343         * stabsread.c (scan_file_globals): Update comment.
2344         * stabsread.h (scan_file_globals): Move from buildsym.h.
2345         * buildsym.h (scan_file_globals): Move to stabsread.h.
2346
2347 2018-07-16  Tom Tromey  <tom@tromey.com>
2348
2349         * xcoffread.c (xcoff_new_init): Update.
2350         * mipsread.c (mipscoff_new_init): Update.
2351         * mdebugread.c (mdebug_build_psymtabs): Update.
2352         * elfread.c (elf_new_init): Update.
2353         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2354         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2355         * buildsym.h (buildsym_new_init): Don't declare.
2356         * buildsym.c (buildsym_new_init): Remove.
2357
2358 2018-07-16  Tom Tromey  <tom@tromey.com>
2359
2360         * stabsread.h (within_function): Move from buildsym.h.
2361         * stabsread.c (start_stabs): Clear within_function.
2362         * coffread.c (coff_start_symtab): Clear within_function.
2363         * buildsym.h (within_function): Move to stabsread.h.
2364         * buildsym.c (prepare_for_building): Update.
2365
2366 2018-07-16  Tom Tromey  <tom@tromey.com>
2367
2368         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2369         * dwarf2read.c (dwarf2_start_symtab): Don't set
2370         processing_gcc_compilation.
2371         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2372
2373 2018-07-16  Tom Tromey  <tom@tromey.com>
2374
2375         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2376         (next_symbol_text_func): Move from buildsym.h.
2377         * stabsread.c (hashname): Move from buildsym.c.
2378         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2379         (next_symbol_text_func, hashname): Move to stabsread.h.
2380         * buildsym.c: Don't include bcache.h
2381         (hashname): Move to stasbread.c.
2382
2383 2018-07-16  Tom Tromey  <tom@tromey.com>
2384
2385         * buildsym.h (context_stack_size): Don't declare.
2386         * buildsym.c (context_stack_size): New global.
2387
2388 2018-07-16  Tom Tromey  <tom@tromey.com>
2389
2390         * dbxread.c (processing_acc_compilation): New global.
2391         * buildsym.h (processing_acc_compilation): Don't declare.
2392
2393 2018-07-16  Tom Tromey  <tom@tromey.com>
2394
2395         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2396         * dbxread.c (read_ofile_symtab): Update.
2397         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2398         * buildsym.h (last_source_start_addr): Remove.
2399         (set_last_source_start_addr, get_last_source_start_addr):
2400         Declare.
2401         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2402         parameter.
2403         (struct buildsym_compunit) <m_last_source_start_addr>: New
2404         member.
2405         (prepare_for_building): Remove start_addr parameter.
2406         (start_symtab, restart_symtab, end_symtab_get_static_block)
2407         (end_symtab_with_blockvector): Update.
2408         (set_last_source_start_addr, get_last_source_start_addr): New
2409         functions.
2410
2411 2018-07-16  Tom Tromey  <tom@tromey.com>
2412
2413         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2414         member.
2415         (have_line_numbers): Remove.
2416         (record_line, prepare_for_building, end_symtab_get_static_block)
2417         (augment_type_symtab): Update.
2418
2419 2018-07-16  Tom Tromey  <tom@tromey.com>
2420
2421         * buildsym.c (~buildsym_compunit): Free the macro table.
2422         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2423         methods.
2424         <m_pending_macros>: New member.
2425         (pending_macros): Remove.
2426         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2427         (reset_symtab_globals, end_symtab_get_static_block)
2428         (end_symtab_with_blockvector, augment_type_symtab)
2429         (buildsym_init): Update.
2430
2431 2018-07-16  Tom Tromey  <tom@tromey.com>
2432
2433         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2434         parameter.
2435         (buildsym_compunit::set_last_source_file): New method.
2436         <m_last_source_file>: New member.
2437         (prepare_for_building): Remove "name" parameter.
2438         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2439         (last_source_file): Remove.
2440         (set_last_source_file, get_last_source_file): Update.
2441
2442 2018-07-16  Tom Tromey  <tom@tromey.com>
2443
2444         * buildsym.c (prepare_for_building): Add assert.
2445
2446 2018-07-16  Tom Tromey  <tom@tromey.com>
2447
2448         * buildsym.c (~buildsym_compunit): Update.
2449         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2450         (start_subfile, patch_subfile_names)
2451         (end_symtab_with_blockvector): Update.
2452
2453 2018-07-16  Tom Tromey  <tom@tromey.com>
2454
2455         * buildsym.c (struct buildsym_compunit): Add constructor,
2456         destructor, initializers.
2457         (start_buildsym_compunit): Remove.
2458         (free_buildsym_compunit): Use "delete".
2459         (start_symtab, restart_symtab): Use "new".
2460
2461 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2462
2463         * symfile.c (set_objfile_default_section_offset): Remove struct
2464         keyword.
2465
2466 2018-07-14  Stafford Horne  <shorne@gmail.com>
2467
2468         * (Responsible Maintainers): Add myself as or1k maintainer.
2469
2470 2018-07-13  Tom Tromey  <tom@tromey.com>
2471
2472         * symfile.c (set_objfile_default_section_offset): Use extra braces
2473         around initializer.
2474
2475 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2476
2477         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2478         non-branching basr.
2479
2480 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2481
2482         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2483         unittests/cli-utils-selftests.c
2484         * unittests/cli-utils-selftests.c: New file.
2485
2486 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2487
2488         * NEWS: Mention new commands. Mention change to 'thread apply'.
2489
2490 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2491
2492         * thread.c (thr_try_catch_cmd): New function.
2493         (thread_apply_all_command): Handle qcs flags.
2494         (thread_apply_command): Handle qcs flags.
2495         (taas_command): New function.
2496         (tfaas_command): New function.
2497         (_initialize_thread): Update to setup the new commands 'taas
2498         and 'tfaas'. Change doc string for 'thread apply'.
2499
2500 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2501
2502         * stack.c: (trailing_outermost_frame): New function, mostly
2503         extracted from backtrace_command_1.
2504         (leading_innermost_frame): New function.
2505         (backtrace_command_1): Update to call trailing_outermost_frame.
2506         (frame_apply_command_count): New function.
2507         (frame_apply_level_command): New function.
2508         (frame_apply_all_command): New function.
2509         (frame_apply_command): New function.
2510         (faas_command): New function.
2511         (frame_cmd_list): New variable.
2512         (_initialize_stack): Update to setup the new commands 'frame apply'
2513         and 'faas'.
2514
2515 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2516
2517         * cli-utils.c (number_or_range_parser::get_number): Only handle
2518         numbers or convenience var as numbers.
2519         (parse_flags): New function.
2520         (parse_flags_qcs): New function.
2521         (number_or_range_parser::finished): Ensure parsing end is detected
2522         before end of string.
2523         * cli-utils.h (parse_flags): New function.
2524         (parse_flags_qcs): New function.
2525         (number_or_range_parser): Remove m_finished bool.
2526         (number_or_range_parser::skip_range): Set m_in_range to false.
2527
2528 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2529
2530         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2531         on Windows.
2532
2533 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2534             Jan Kratochvil  <jan.kratochvil@redhat.com>
2535             Paul Fertser  <fercerpav@gmail.com>
2536             Tsutomu Seki  <sekiriki@gmail.com>
2537             Pedro Alves  <palves@redhat.com>
2538
2539         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2540         'unittests/parse-connection-spec-selftests.c'.
2541         (COMMON_SFILES): Add 'common/netstuff.c'.
2542         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2543         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2544         * common/netstuff.c: New file.
2545         * common/netstuff.h: New file.
2546         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2547         (wait_for_connect): Update comment.  New parameter
2548         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2549         Use 'sock' directly instead of 'scb->fd'.
2550         (try_connect): New function, with code from 'net_open'.
2551         (net_open): Rewrite main loop to deal with multiple
2552         sockets/addresses.  Handle IPv6-style hostnames; implement
2553         support for IPv6 connections.
2554         * unittests/parse-connection-spec-selftests.c: New file.
2555
2556 2018-07-11  Pedro Alves  <palves@redhat.com>
2557
2558         PR gdb/23377
2559         * remote.c (remote_target::remote_detach_pid): Call
2560         set_current_process.
2561
2562 2018-07-11  Pedro Alves  <palves@redhat.com>
2563
2564         * h8300-tdep.c (h8300_gdbarch_init): Remove
2565         set_gdbarch_ecoff_reg_to_regnum calls.
2566
2567 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2568
2569         PR c++/23373
2570         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2571         offsets/sizes for static members of a class/struct.
2572
2573 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2574
2575         * target-descriptions.c (tdesc_register_bitsize): Rename.
2576         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2577         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2578         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2579
2580 2018-07-10  Tom Tromey  <tom@tromey.com>
2581
2582         * breakpoint.c (moribund_locations): Now static and a
2583         std::vector.
2584         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2585         (build_bpstat_chain, update_global_location_list)
2586         (breakpoint_retire_moribund): Update.
2587         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2588         VEC.
2589
2590 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2591
2592         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2593         (riscv_register_reggroup_p): Use new function, remove unneeded
2594         parenthesis.
2595         (riscv_push_dummy_call): Extend assert to compare against xlen or
2596         flen based on register type.
2597
2598 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2599
2600         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2601
2602 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2603
2604         * remote.c (show_hardware_watchpoint_limit): New function.
2605         (show_hardware_watchpoint_length_limit): New function.
2606         (show_hardware_breakpoint_limit): New function.
2607         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2608         where appropriate, update help text.
2609
2610 2018-07-09  Tom Tromey  <tom@tromey.com>
2611
2612         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2613         (CLIBS): Don't mention NAT_CLIBS.
2614
2615 2018-07-09  Tom Tromey  <tom@tromey.com>
2616
2617         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2618         (LIBGDB_OBS, clean mostlyclean): Update.
2619         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2620
2621 2018-07-09  Tom Tromey  <tom@tromey.com>
2622
2623         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2624         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2625         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2626
2627 2018-07-09  Tom Tromey  <tom@tromey.com>
2628
2629         * Makefile.in (ALLDEPFILES): Remove exec.c.
2630         (COMMON_OBS): Remove exec.o.
2631         (COMMON_SFILES): Add exec.c.
2632
2633 2018-07-09  Tom Tromey  <tom@tromey.com>
2634
2635         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2636
2637 2018-07-09  Tom Tromey  <tom@tromey.com>
2638
2639         * Makefile.in (clean mostlyclean): Remove stamp-version.
2640         (version.c): Depend on stamp-version.
2641         (stamp-version): New rule, from version.c rule.
2642
2643 2018-07-09  Tom Tromey  <tom@tromey.com>
2644
2645         * Makefile.in (init.c): Depend on stamp-init.
2646         (stamp-init): New rule, from init.c rule.
2647         (clean mostlyclean): Remove stamp-init.
2648
2649 2018-07-09  Tom Tromey  <tom@tromey.com>
2650
2651         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2652         SUBDIR_GCC_COMPILE_SRCS.
2653
2654 2018-07-09  Tom Tromey  <tom@tromey.com>
2655
2656         * Makefile.in (init.c): Remove some unused sed rules.
2657
2658 2018-07-09  Tom Tromey  <tom@tromey.com>
2659
2660         * Makefile.in (TSOBS): Remove.
2661         (INIT_FILES): Update.
2662         (LIBGDB_OBS): Update.
2663         (COMMON_SFILES): Add inflow.c.
2664         (SFILES): Remove inflow.c.
2665
2666 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2667
2668         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2669
2670 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2671
2672         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2673         get_saveloc_name, is_signal_frame_name, step_name,
2674         init_remote_name, create_addr_space_name,
2675         destroy_addr_space_name, search_unwind_table_name,
2676         find_dyn_list_name): Constify.
2677
2678 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2679
2680         * darwin-nat.c (darwin_pthread_kill): New function.
2681         (darwin_resume_thread): Use darwin_pthread_kill.
2682
2683 2018-07-05  Tom de Vries  <tdevries@suse.de>
2684
2685         * macroexp.c (macro_buffer) <operator=>: New member function.
2686
2687 2018-07-04  Tom Tromey  <tom@tromey.com>
2688
2689         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2690
2691 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2692
2693         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2694         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2695         * maint.c: Likewise.
2696         * top.c: Likewise.
2697
2698 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2699
2700         * NEWS: Create a new section for the next release branch.
2701         Rename the section of the current branch, now that it has
2702         been cut.
2703
2704 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2705
2706         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2707         * version.in: Bump version to 8.2.50.DATE-git.
2708
2709 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2710             Pedro Alves  <palves@redhat.com>
2711
2712         * linux-nat.c (linux_init_ptrace): Rename to ...
2713         (linux_init_ptrace_procfs): ... this.  Call
2714         linux_proc_init_warnings.
2715         (linux_nat_target::post_attach)
2716         (linux_nat_target::post_startup_inferior): Adjust.
2717         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2718         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2719
2720 2018-07-04  Tom de Vries  <tdevries@suse.de>
2721
2722         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2723         check ...
2724         (read_comp_unit_head): ... here.
2725
2726 2018-07-03  Tom Tromey  <tom@tromey.com>
2727
2728         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2729         (stop_tracing, tstatus_command)
2730         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2731         (print_one_static_tracepoint_marker): Update.
2732         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2733         std::vector.
2734         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2735         VEC.
2736         (all_tracepoints, static_tracepoints_here): Return std::vector.
2737
2738 2018-07-03  Tom Tromey  <tom@tromey.com>
2739
2740         * common/ptid.c (ptid_equal): Remove.
2741         * common/ptid.h (ptid_equal): Don't declare.
2742         * ada-tasks.c: Update.
2743         * breakpoint.c: Update.
2744         * common/agent.c: Update.
2745         * corelow.c: Update.
2746         * darwin-nat-info.c: Update.
2747         * darwin-nat.c: Update.
2748         * dcache.c: Update.
2749         * dtrace-probe.c: Update.
2750         * dummy-frame.c: Update.
2751         * fbsd-nat.c: Update.
2752         * frame.c: Update.
2753         * gdbthread.h: Update.
2754         * gnu-nat.c: Update.
2755         * go32-nat.c: Update.
2756         * inf-loop.c: Update.
2757         * inf-ptrace.c: Update.
2758         * infcall.c: Update.
2759         * infcmd.c: Update.
2760         * inflow.c: Update.
2761         * infrun.c: Update.
2762         * linux-fork.c: Update.
2763         * linux-nat.c: Update.
2764         * linux-thread-db.c: Update.
2765         * mi/mi-cmd-var.c: Update.
2766         * mi/mi-interp.c: Update.
2767         * mi/mi-main.c: Update.
2768         * nto-procfs.c: Update.
2769         * ppc-linux-tdep.c: Update.
2770         * procfs.c: Update.
2771         * python/py-inferior.c: Update.
2772         * python/py-record-btrace.c: Update.
2773         * python/py-record.c: Update.
2774         * ravenscar-thread.c: Update.
2775         * regcache.c: Update.
2776         * remote-sim.c: Update.
2777         * remote.c: Update.
2778         * sol-thread.c: Update.
2779         * solib.c: Update.
2780         * target.c: Update.
2781         * tui/tui-stack.c: Update.
2782         * varobj.c: Update.
2783         * windows-nat.c: Update.
2784         * windows-tdep.c: Update.
2785
2786 2018-07-03  Tom Tromey  <tom@tromey.com>
2787
2788         * common/ptid.c (ptid_match): Remove.
2789         * common/ptid.h (ptid_match): Don't declare.
2790         * fbsd-nat.c: Update.
2791         * infcmd.c: Update.
2792         * infrun.c: Update.
2793         * linux-nat.c: Update.
2794         * record-btrace.c: Update.
2795         * regcache.c: Update.
2796         * remote.c: Update.
2797
2798 2018-07-03  Tom Tromey  <tom@tromey.com>
2799
2800         * common/ptid.c (ptid_tid_p): Remove.
2801         * common/ptid.h (ptid_tid_p): Don't declare.
2802         * sol-thread.c: Update.
2803
2804 2018-07-03  Tom Tromey  <tom@tromey.com>
2805
2806         * common/ptid.c (ptid_lwp_p): Remove.
2807         * common/ptid.h (ptid_lwp_p): Don't declare.
2808         * fbsd-nat.c: Update.
2809         * linux-nat.c: Update.
2810         * nat/linux-procfs.c: Update.
2811         * nat/x86-linux-dregs.c: Update.
2812         * sol-thread.c: Update.
2813
2814 2018-07-03  Tom Tromey  <tom@tromey.com>
2815
2816         * common/ptid.c (ptid_is_pid): Remove.
2817         * common/ptid.h (ptid_is_pid): Don't declare.
2818         * infrun.c: Update.
2819         * linux-nat.c: Update.
2820         * mi/mi-interp.c: Update.
2821         * remote.c: Update.
2822         * thread.c: Update.
2823
2824 2018-07-03  Tom Tromey  <tom@tromey.com>
2825
2826         * common/ptid.c (ptid_get_tid): Remove.
2827         * common/ptid.h (ptid_get_tid): Don't declare.
2828         * ada-tasks.c: Update.
2829         * aix-thread.c: Update.
2830         * bsd-uthread.c: Update.
2831         * darwin-nat.c: Update.
2832         * fbsd-nat.c: Update.
2833         * i386-darwin-nat.c: Update.
2834         * infrun.c: Update.
2835         * linux-tdep.c: Update.
2836         * nto-procfs.c: Update.
2837         * ppc-ravenscar-thread.c: Update.
2838         * python/py-infthread.c: Update.
2839         * ravenscar-thread.c: Update.
2840         * sol-thread.c: Update.
2841         * sparc-ravenscar-thread.c: Update.
2842         * windows-nat.c: Update.
2843
2844 2018-07-03  Tom Tromey  <tom@tromey.com>
2845
2846         * common/ptid.c (ptid_get_lwp): Remove.
2847         * common/ptid.h (ptid_get_lwp): Don't declare.
2848         * aarch64-linux-nat.c: Update.
2849         * ada-tasks.c: Update.
2850         * aix-thread.c: Update.
2851         * amd64-linux-nat.c: Update.
2852         * arm-linux-nat.c: Update.
2853         * corelow.c: Update.
2854         * fbsd-nat.c: Update.
2855         * fbsd-tdep.c: Update.
2856         * gnu-nat.c: Update.
2857         * i386-cygwin-tdep.c: Update.
2858         * i386-gnu-nat.c: Update.
2859         * i386-linux-nat.c: Update.
2860         * ia64-linux-nat.c: Update.
2861         * inf-ptrace.c: Update.
2862         * infrun.c: Update.
2863         * linux-fork.c: Update.
2864         * linux-nat.c: Update.
2865         * linux-tdep.c: Update.
2866         * linux-thread-db.c: Update.
2867         * mips-linux-nat.c: Update.
2868         * nat/aarch64-linux-hw-point.c: Update.
2869         * nat/aarch64-linux.c: Update.
2870         * nat/linux-btrace.c: Update.
2871         * nat/linux-osdata.c: Update.
2872         * nat/linux-procfs.c: Update.
2873         * nat/x86-linux-dregs.c: Update.
2874         * obsd-nat.c: Update.
2875         * ppc-fbsd-nat.c: Update.
2876         * ppc-linux-nat.c: Update.
2877         * procfs.c: Update.
2878         * python/py-infthread.c: Update.
2879         * ravenscar-thread.c: Update.
2880         * remote.c: Update.
2881         * s390-linux-nat.c: Update.
2882         * sol-thread.c: Update.
2883         * sol2-tdep.c: Update.
2884         * spu-linux-nat.c: Update.
2885         * x86-linux-nat.c: Update.
2886         * xtensa-linux-nat.c: Update.
2887
2888 2018-07-03  Tom Tromey  <tom@tromey.com>
2889
2890         * common/ptid.c (ptid_get_pid): Remove.
2891         * common/ptid.h (ptid_get_pid): Don't declare.
2892         * aarch64-linux-nat.c: Update.
2893         * ada-lang.c: Update.
2894         * aix-thread.c: Update.
2895         * alpha-bsd-nat.c: Update.
2896         * amd64-fbsd-nat.c: Update.
2897         * amd64-linux-nat.c: Update.
2898         * arm-linux-nat.c: Update.
2899         * arm-nbsd-nat.c: Update.
2900         * auxv.c: Update.
2901         * break-catch-syscall.c: Update.
2902         * breakpoint.c: Update.
2903         * bsd-uthread.c: Update.
2904         * corelow.c: Update.
2905         * ctf.c: Update.
2906         * darwin-nat.c: Update.
2907         * fbsd-nat.c: Update.
2908         * fbsd-tdep.c: Update.
2909         * gcore.c: Update.
2910         * gnu-nat.c: Update.
2911         * hppa-nbsd-nat.c: Update.
2912         * hppa-obsd-nat.c: Update.
2913         * i386-fbsd-nat.c: Update.
2914         * ia64-linux-nat.c: Update.
2915         * inf-ptrace.c: Update.
2916         * infcmd.c: Update.
2917         * inferior.c: Update.
2918         * inferior.h: Update.
2919         * inflow.c: Update.
2920         * infrun.c: Update.
2921         * linux-fork.c: Update.
2922         * linux-nat.c: Update.
2923         * linux-tdep.c: Update.
2924         * linux-thread-db.c: Update.
2925         * m68k-bsd-nat.c: Update.
2926         * mi/mi-interp.c: Update.
2927         * mi/mi-main.c: Update.
2928         * mips-linux-nat.c: Update.
2929         * mips-nbsd-nat.c: Update.
2930         * mips64-obsd-nat.c: Update.
2931         * nat/aarch64-linux-hw-point.c: Update.
2932         * nat/aarch64-linux.c: Update.
2933         * nat/linux-btrace.c: Update.
2934         * nat/linux-osdata.c: Update.
2935         * nat/linux-procfs.c: Update.
2936         * nat/x86-linux-dregs.c: Update.
2937         * nto-procfs.c: Update.
2938         * obsd-nat.c: Update.
2939         * ppc-linux-nat.c: Update.
2940         * ppc-nbsd-nat.c: Update.
2941         * ppc-obsd-nat.c: Update.
2942         * proc-service.c: Update.
2943         * procfs.c: Update.
2944         * python/py-inferior.c: Update.
2945         * python/py-infthread.c: Update.
2946         * ravenscar-thread.c: Update.
2947         * record.c: Update.
2948         * remote-sim.c: Update.
2949         * remote.c: Update.
2950         * rs6000-nat.c: Update.
2951         * s390-linux-nat.c: Update.
2952         * sh-nbsd-nat.c: Update.
2953         * sol-thread.c: Update.
2954         * sparc-nat.c: Update.
2955         * sparc64-tdep.c: Update.
2956         * spu-linux-nat.c: Update.
2957         * spu-tdep.c: Update.
2958         * target-debug.h: Update.
2959         * target.c: Update.
2960         * thread.c: Update.
2961         * tid-parse.c: Update.
2962         * tracefile-tfile.c: Update.
2963         * vax-bsd-nat.c: Update.
2964         * windows-nat.c: Update.
2965         * x86-linux-nat.c: Update.
2966         * x86-nat.c: Update.
2967
2968 2018-07-03  Tom Tromey  <tom@tromey.com>
2969
2970         * common/ptid.c (pid_to_ptid): Remove.
2971         * common/ptid.h (pid_to_ptid): Don't declare.
2972         * aix-thread.c: Update.
2973         * arm-linux-nat.c: Update.
2974         * common/ptid.c: Update.
2975         * common/ptid.h: Update.
2976         * corelow.c: Update.
2977         * ctf.c: Update.
2978         * darwin-nat.c: Update.
2979         * fbsd-nat.c: Update.
2980         * fork-child.c: Update.
2981         * gnu-nat.c: Update.
2982         * go32-nat.c: Update.
2983         * inf-ptrace.c: Update.
2984         * infcmd.c: Update.
2985         * inferior.c: Update.
2986         * infrun.c: Update.
2987         * linux-fork.c: Update.
2988         * linux-nat.c: Update.
2989         * nat/aarch64-linux-hw-point.c: Update.
2990         * nat/fork-inferior.c: Update.
2991         * nat/x86-linux-dregs.c: Update.
2992         * nto-procfs.c: Update.
2993         * obsd-nat.c: Update.
2994         * procfs.c: Update.
2995         * progspace.c: Update.
2996         * remote.c: Update.
2997         * rs6000-nat.c: Update.
2998         * s390-linux-nat.c: Update.
2999         * sol-thread.c: Update.
3000         * spu-linux-nat.c: Update.
3001         * target.c: Update.
3002         * top.c: Update.
3003         * tracefile-tfile.c: Update.
3004         * windows-nat.c: Update.
3005
3006 2018-07-03  Tom Tromey  <tom@tromey.com>
3007
3008         * common/ptid.h (ptid_build): Don't declare.
3009         * common/ptid.c (ptid_build): Remove.
3010         * aix-thread.c: Update.
3011         * bsd-kvm.c: Update.
3012         * bsd-uthread.c: Update.
3013         * common/agent.c: Update.
3014         * common/ptid.c: Update.
3015         * common/ptid.h: Update.
3016         * corelow.c: Update.
3017         * darwin-nat.c: Update.
3018         * fbsd-nat.c: Update.
3019         * gnu-nat.c: Update.
3020         * linux-fork.c: Update.
3021         * linux-nat.c: Update.
3022         * linux-thread-db.c: Update.
3023         * nat/linux-osdata.c: Update.
3024         * nat/linux-procfs.c: Update.
3025         * nto-procfs.c: Update.
3026         * obsd-nat.c: Update.
3027         * proc-service.c: Update.
3028         * procfs.c: Update.
3029         * ravenscar-thread.c: Update.
3030         * remote-sim.c: Update.
3031         * remote.c: Update.
3032         * sol-thread.c: Update.
3033         * target.c: Update.
3034         * windows-nat.c: Update.
3035
3036 2018-07-03  Tom Tromey  <tom@tromey.com>
3037
3038         * infrun.c (follow_exec): Use exit_inferior_silent.
3039         * inferior.c (exit_inferior_num_silent): Remove.
3040         * inferior.h (exit_inferior_num_silent): Don't declare.
3041
3042 2018-07-03  Tom Tromey  <tom@tromey.com>
3043
3044         PR cli/23340:
3045         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3046         inferior_ptid on error.
3047
3048 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3049             Simon Marchi  <simon.marchi@polymtl.ca>
3050
3051         PR tdep/8282
3052         * disasm.h (gdb_disassembler): Add
3053         `m_disassembler_options_holder'. member
3054         * disasm.c (get_all_disassembler_options): New function.
3055         (gdb_disassembler::gdb_disassembler): Use it.
3056         (gdb_buffered_insn_length_init_dis): Likewise.
3057         (gdb_buffered_insn_length): Adjust accordingly.
3058         (set_disassembler_options): Handle options with arguments.
3059         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3060         line if showing options with descriptions.
3061         (disassembler_options_completer): Adapt to using the
3062         `disasm_options_and_args_t' structure.
3063         * mips-tdep.c (mips_disassembler_options): New variable.
3064         (mips_disassembler_options_o32): Likewise.
3065         (mips_disassembler_options_n32): Likewise.
3066         (mips_disassembler_options_n64): Likewise.
3067         (gdb_print_insn_mips): Don't set `disassembler_options'.
3068         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3069         functions.
3070         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3071         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3072         `gdbarch_disassembler_options_implicit' and
3073         `gdbarch_valid_disassembler_options'.
3074         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3075         `disasm_options_and_args_t' structure.
3076         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3077         method.
3078         (valid_disassembler_options): Switch from `disasm_options_t' to
3079         the `disasm_options_and_args_t' structure.
3080         * NEWS: Document `set disassembler-options' support for the MIPS
3081         target.
3082         * gdbarch.h: Regenerate.
3083         * gdbarch.c: Regenerate.
3084
3085 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3086
3087         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3088
3089 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3090
3091         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3092         parameter in call to amd64_target_description.
3093         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3094         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3095         (amd64fbsd_init_abi): Likewise.
3096         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3097         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3098         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3099         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3100
3101 2018-06-29  Pedro Alves  <palves@redhat.com>
3102
3103         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3104         "segments" parameter.
3105         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3106         (_initialize_amd64_tdep): Update call to
3107         amd64_create_target_description.
3108         (amd64_target_description): Add "segments" parameter.  Adjust
3109         the implementation to use it.
3110         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3111         call to amd64_create_target_description.
3112         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3113         * gdb/arch/amd64.h (amd64_create_target_description): Add
3114         "segments" register.
3115         * gdb/arch/amd64.c (amd64_create_target_description): Add
3116         "segments" parameter.  Call create_feature_i386_64bit_segments
3117         only if SEGMENTS is true.
3118         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3119         call to amd64_create_target_description.
3120
3121 2018-06-29  Pedro Alves  <palves@redhat.com>
3122
3123         * thread.c (thread_target_id_str): New, factored out from ...
3124         (print_thread_info_1): ... here.  Use it to compute the max
3125         "Target Id" column width.
3126
3127 2018-06-29  Pedro Alves  <palves@redhat.com>
3128
3129         * remote.c (remote_target::extra_thread_info): Delete
3130         'display_buf' and 'n' locals.  from the cache, regardless of
3131         packet mechanims is in use.  Use cache for qThreadExtra and qP
3132         methods too.
3133
3134 2018-06-29  Pedro Alves  <palves@redhat.com>
3135
3136         * blockframe.c (find_pc_sect_containing_function): New function.
3137         * breakpoint.c (print_breakpoint_location): Don't call
3138         find_pc_sect_function.
3139         * linespec.c (create_sals_line_offset): Record the location's
3140         symbol in the sal.
3141         * linespec.c (convert_address_location_to_sals): Fill in sal's
3142         symbol with find_pc_sect_containing_function.
3143         * symtab.c (find_function_start_sal): Rename to ...
3144         (find_function_start_sal_1): ... this.
3145         (find_function_start_sal): Reimplement as wrapper around
3146         find_function_start_sal_1, and use
3147         find_pc_sect_containing_function to fill in the sal's symbol.
3148         (find_function_start_sal(symbol*, bool)): Adjust.
3149         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3150         comments.
3151         (find_pc_sect_containing_function): Declare.
3152
3153 2018-06-29  Pedro Alves  <palves@redhat.com>
3154
3155         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3156         true if the the location has no symbol.
3157
3158 2018-06-28  Tom Tromey  <tom@tromey.com>
3159
3160         * NEWS: Mention --enable-codesign.
3161         * silent-rules.mk (ECHO_SIGN): New variable.
3162         * configure.ac: Add --enable-codesign.
3163         * configure: Rebuild.
3164         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3165         (gdb$(EXEEXT)): Optionally invoke codesign.
3166
3167 2018-06-28  Pedro Alves  <palves@redhat.com>
3168
3169         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3170         comments.
3171         (switch_to_thread_no_regs): Adjust comment.
3172         * infcmd.c (stop_pc): Delete.
3173         (post_create_inferior, info_program_command): Replace references
3174         to stop_pc with references to thread_info->suspend.stop_pc.
3175         * inferior.h (stop_pc): Delete declaration.
3176         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3177         (handle_inferior_event_1, handle_signal_stop)
3178         (process_event_stop_test, keep_going_stepped_thread)
3179         (handle_step_into_function, handle_step_into_function_backward)
3180         (print_stop_location): Replace references to stop_pc with
3181         references to thread_info->suspend.stop_pc.
3182         (struct infcall_suspend_state) <stop_pc>: Delete field.
3183         (save_infcall_suspend_state, restore_infcall_suspend_state):
3184         Remove references to inf_stat->stop_pc.
3185         * linux-fork.c (fork_load_infrun_state): Likewise.
3186         * record-btrace.c (record_btrace_set_replay): Likewise.
3187         * record-full.c (record_full_goto_entry): Likewise.
3188         * remote.c (print_one_stopped_thread): Likewise.
3189         * target.c (target_resume): Extend comment.
3190         * thread.c (set_executing_thread): New.
3191         (set_executing): Use it.
3192         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3193         Remove references to stop_pc.
3194
3195 2018-06-28  Pedro Alves  <palves@redhat.com>
3196
3197         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3198         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3199
3200 2018-06-28  Tom Tromey  <tom@tromey.com>
3201
3202         * coffread.c (coff_symfile_finish): Update.
3203         * xcoffread.c (xcoff_symfile_finish): Update.
3204         * elfread.c (elf_symfile_finish): Update.
3205         * symfile.h (dwarf2_free_objfile): Don't declare.
3206         * dwarf2read.c (_initialize_dwarf2_read): Use
3207         register_objfile_data_with_cleanup.
3208         (dwarf2_free_objfile): Now static.  Change signature.
3209
3210 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3211
3212         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3213         option "-o" to add-symbol-file-load to add an offset to each
3214         section's load address.
3215         * symfile.c (set_objfile_default_section_offset): New function.
3216
3217 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3218
3219         * symfile.c (add_symbol_file_command): Make sure that sections
3220         with the same name are sorted in the same order.
3221
3222 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3223
3224         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3225         require the second argument.  If omitted, load sections at the
3226         addresses specified in the file.
3227
3228 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3229
3230         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3231         (_initialize_symfile): Add option "-o" to symbol-file to add an
3232         offset to each section of the symbol file.
3233
3234 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3235
3236         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3237
3238 2018-06-27  Tom Tromey  <tom@tromey.com>
3239
3240         * stack.c (_initialize_stack): Update "func" help text.
3241
3242 2018-06-27  Tom Tromey  <tom@tromey.com>
3243
3244         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3245         std::vector.
3246         (unwind_infopy_str, pyuw_create_unwind_info)
3247         (unwind_infopy_add_saved_register, pyuw_sniffer)
3248         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3249         Update.
3250         (struct saved_reg): Add constructor.
3251         <value>: Now a gdbpy_ref<>.
3252
3253 2018-06-27  Tom Tromey  <tom@tromey.com>
3254
3255         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3256
3257 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3258
3259         * gdb-gdb.py.in: Format using autopep8.
3260
3261 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3262
3263         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3264         (type_lookup_function): Recognize CORE_ADDR values.
3265
3266 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3267
3268         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3269         print tag_name.
3270
3271 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3272
3273         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3274         <__lt__>: Add.
3275
3276 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3277
3278         * gdb-gdb.py: Move to...
3279         * gdb-gdb.py.in: ... here.
3280         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3281         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3282         dependencies.
3283         (distclean): Remove gdb-gdb.py when cleaning.
3284         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3285         * configure: Re-generate.
3286
3287 2018-06-27  Pedro Alves  <palves@redhat.com>
3288
3289         * proc-service.c (get_ps_regcache): New.
3290         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3291         (ps_lsetfpregs): Use it.
3292
3293 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3294
3295         PR gdb/21695
3296         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3297         (dwarf_decode_lines_1): Adjust.
3298
3299 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3300
3301         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3302         override.
3303         <info_proc>: Likewise.
3304
3305 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3306
3307         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3308         to windows_fetch_one_register, and only handle the case of
3309         fetching one register.  Move the code that reloads the context
3310         and iterates over all registers if R is negative to...
3311         (windows_nat_target::fetch_registers): ... here.
3312         (do_windows_store_inferior_registers): Rename to
3313         windows_store_one_register, and only handle the case of storing
3314         one register.  Move the code that handles the case where r is
3315         negative to...
3316         (windows_nat_target::store_registers) ... here.
3317
3318 2018-06-26  Tom Tromey  <tom@tromey.com>
3319
3320         PR rust/22574:
3321         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3322         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3323         Update.
3324         (rust_internal_print_type): Add podata parameter.
3325         (rust_print_type): Update.
3326
3327 2018-06-26  Tom Tromey  <tom@tromey.com>
3328
3329         * typeprint.h (struct print_offset_data) <update, finish,
3330         maybe_print_hole>: New methods.
3331         <indentation>: New constant.
3332         * typeprint.c (print_offset_data::indentation): Define.
3333         (print_offset_data::maybe_print_hole, print_offset_data::update)
3334         (print_offset_data::finish): Move from c-typeprint.c and rename.
3335         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3336         (print_spaces_filtered_with_print_options): Update.
3337         (c_print_type_union_field_offset, maybe_print_hole)
3338         (c_print_type_struct_field_offset): Move to typeprint.c and
3339         rename.
3340         (c_type_print_base_struct_union): Update.
3341
3342 2018-06-25  Pedro Alves  <palves@redhat.com>
3343
3344         * gdbthread.h (thread_info_ref, delete_thread)
3345         (delete_thread_silent, first_thread_of_inferior)
3346         (any_thread_of_inferior, switch_to_thread)
3347         (enable_thread_stack_temporaries)
3348         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3349         (get_last_thread_stack_temporary)
3350         (value_in_thread_stack_temporaries, can_access_registers_thread):
3351         Spell out "struct thread_info" instead of just "thread_info".
3352         * inferior.h (notice_new_inferior): Likewise.
3353
3354 2018-06-25  Pedro Alves  <palves@redhat.com>
3355
3356         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3357         pass thread_info pointer to delete_thread.
3358         (windows_nat_target::detach): Pass inferior pointer to
3359         detach_inferior.
3360         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3361         delete_thread.
3362         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3363         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3364         and pass a thread_info pointer to delete_thread.
3365         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3366         pass thread_info pointer to delete_thread.
3367         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3368         delete_thread_silent call.
3369         * procfs.c (procfs_target::detach): Pass inferior pointer to
3370         detach_inferior.
3371         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3372         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3373         delete_thread_silent call.
3374         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3375         pass thread_info pointer to delete_thread.
3376         (windows_nat_target::detach): Pass inferior pointer to
3377         delete_inferior.
3378
3379 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3380
3381         * regcache.c (readable_regcache::read_part): Fix asserts.
3382         (reg_buffer::raw_collect_part): New function.
3383         (regcache::write_part): Fix asserts.
3384         (reg_buffer::raw_supply_part): New function.
3385         (regcache::transfer_regset_register): New helper function.
3386         (regcache::transfer_regset): Call new functions.
3387         (regcache_supply_regset): Use gdb_byte*.
3388         (regcache::supply_regset): Likewise.
3389         (regcache_collect_regset): Likewise.
3390         (regcache::collect_regset): Likewise.
3391         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3392         (reg_buffer::raw_supply_part): Likewise.
3393         (regcache::transfer_regset_register): Likewise.
3394         (regcache::transfer_regset): Use gdb_byte*.
3395
3396 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3397
3398         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3399
3400 2018-06-21  Pedro Alves  <palves@redhat.com>
3401
3402         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3403         instead of a ptid_t.  All callers adjusted.
3404         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3405         adjusted.
3406         (print_ada_task_info, display_current_task_id, task_command_1):
3407         Adjust.
3408         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3409         inferior_thread.
3410         (breakpoint_kind): Adjust.
3411         (remove_breakpoints_pid): Rename to ...
3412         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3413         pointer.  All callers adjusted.
3414         (bpstat_clear_actions): Use inferior_thread.
3415         (get_bpstat_thread): New.
3416         (bpstat_do_actions): Use it.
3417         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3418         to take a thread_info pointer.  All callers adjusted.
3419         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3420         (breakpoint_re_set_thread): Use inferior_thread.
3421         * breakpoint.h (struct inferior): Forward declare.
3422         (bpstat_stop_status): Update.
3423         (remove_breakpoints_pid): Delete.
3424         (remove_breakpoints_inf): New.
3425         * bsd-uthread.c (bsd_uthread_target::wait)
3426         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3427         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3428         (maint_btrace_packet_history_cmd)
3429         (maint_btrace_clear_packet_history_cmd): Adjust.
3430         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3431         inferior_thread.
3432         * cli/cli-interp.c: Include "inferior.h".
3433         * common/refcounted-object.h (struct
3434         refcounted_object_ref_policy): New.
3435         * compile/compile-object-load.c: Include gdbthread.h.
3436         (store_regs): Use inferior_thread.
3437         * corelow.c (core_target::close): Use current_inferior.
3438         (core_target_open): Adjust to use first_thread_of_inferior and use
3439         the current inferior.
3440         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3441         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3442         <thread>: ... this new field.  All references adjusted.
3443         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3444         Take a thread_info pointer instead of a ptid_t.
3445         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3446         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3447         thread_info pointer instead of a ptid_t.
3448         * elfread.c: Include "inferior.h".
3449         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3450         Use inferior_thread.
3451         * eval.c (evaluate_subexp): Likewise.
3452         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3453         inferior_thread.
3454         * gdb_proc_service.h (struct thread_info): Forward declare.
3455         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3456         <thread>: ... this new field.  All references adjusted.
3457         * gdbarch.h, gdbarch.c: Regenerate.
3458         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3459         'thread' parameter.  All implementations and callers adjusted.
3460         * gdbthread.h (thread_info) <set_running>: New method.
3461         (delete_thread, delete_thread_silent): Take a thread_info pointer
3462         instead of a ptid.
3463         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3464         (first_thread_of_process): Delete, replaced by ...
3465         (first_thread_of_inferior): ... this new function.  All callers
3466         adjusted.
3467         (any_live_thread_of_process): Delete, replaced by ...
3468         (any_live_thread_of_inferior): ... this new function.  All callers
3469         adjusted.
3470         (switch_to_thread, switch_to_no_thread): Declare.
3471         (is_executing): Delete.
3472         (enable_thread_stack_temporaries): Update comment.
3473         <enable_thread_stack_temporaries>: Take a thread_info pointer
3474         instead of a ptid_t.  Incref the thread.
3475         <~enable_thread_stack_temporaries>: Decref the thread.
3476         <m_ptid>: Delete
3477         <m_thr>: New.
3478         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3479         (get_last_thread_stack_temporary)
3480         (value_in_thread_stack_temporaries, can_access_registers_thread):
3481         Take a thread_info pointer instead of a ptid_t.  All callers
3482         adjusted.
3483         * infcall.c (get_call_return_value): Use inferior_thread.
3484         (run_inferior_call): Work with thread pointers instead of ptid_t.
3485         (call_function_by_hand_dummy): Work with thread pointers instead
3486         of ptid_t.  Use thread_info_ref.
3487         * infcmd.c (proceed_thread_callback): Access thread's state
3488         directly.
3489         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3490         access thread's state directly.
3491         (continue_command): Use inferior_thread.
3492         (info_program_command): Use find_thread_ptid and access thread
3493         state directly.
3494         (proceed_after_attach_callback): Use thread state directly.
3495         (notice_new_inferior): Take a thread_info pointer instead of a
3496         ptid_t.  All callers adjusted.
3497         (exit_inferior): Take an inferior pointer instead of a pid.  All
3498         callers adjusted.
3499         (exit_inferior_silent): New.
3500         (detach_inferior): Delete.
3501         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3502         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3503         (detach_inferior_command, kill_inferior_command): Use
3504         find_inferior_id instead of valid_gdb_inferior_id and
3505         gdb_inferior_id_to_pid.
3506         (inferior_command): Use inferior and thread pointers.
3507         * inferior.h (struct thread_info): Forward declare.
3508         (notice_new_inferior): Take a thread_info pointer instead of a
3509         ptid_t.  All callers adjusted.
3510         (detach_inferior): Delete declaration.
3511         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3512         instead of a pid.  All callers adjusted.
3513         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3514         (valid_gdb_inferior_id): Delete.
3515         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3516         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3517         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3518         ...
3519         <inf>: ... this new field.
3520         <step_ptid>: Delete, replaced by ...
3521         <step_thread>: ... this new field.
3522         (get_displaced_stepping_state): Take an inferior pointer instead
3523         of a pid.  All callers adjusted.
3524         (displaced_step_in_progress_any_inferior): Adjust.
3525         (displaced_step_in_progress_thread): Take a thread pointer instead
3526         of a ptid_t.  All callers adjusted.
3527         (displaced_step_in_progress, add_displaced_stepping_state): Take
3528         an inferior pointer instead of a pid.  All callers adjusted.
3529         (get_displaced_step_closure_by_addr): Adjust.
3530         (remove_displaced_stepping_state): Take an inferior pointer
3531         instead of a pid.  All callers adjusted.
3532         (displaced_step_prepare_throw, displaced_step_prepare)
3533         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3534         All callers adjusted.
3535         (start_step_over): Adjust.
3536         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3537         displaced step queue.
3538         (do_target_resume): Adjust.
3539         (fetch_inferior_event): Use inferior_thread.
3540         (context_switch, get_inferior_stop_soon): Take an
3541         execution_control_state pointer instead of a ptid_t.  All callers
3542         adjusted.
3543         (switch_to_thread_cleanup): Delete.
3544         (stop_all_threads): Use scoped_restore_current_thread.
3545         * inline-frame.c: Include "gdbthread.h".
3546         (inline_state) <inline_state>: Take a thread pointer instead of a
3547         ptid_t.  All callers adjusted.
3548         <ptid>: Delete, replaced by ...
3549         <thread>: ... this new field.
3550         (find_inline_frame_state): Take a thread pointer instead of a
3551         ptid_t.  All callers adjusted.
3552         (skip_inline_frames, step_into_inline_frame)
3553         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3554         pointer instead of a ptid_t.  All callers adjusted.
3555         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3556         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3557         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3558         pointers directly.
3559         * linux-nat.c (get_detach_signal): Likewise.
3560         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3561         (thread_db_notice_clone): Adjust.
3562         (thread_db_find_new_threads_silently)
3563         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3564         a thread pointer instead of a ptid_t.  All callers adjusted.
3565         * mi/mi-cmd-var.c: Include "inferior.h".
3566         (mi_cmd_var_update_iter): Update to use thread pointers.
3567         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3568         inferior directly.
3569         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3570         out to ...
3571         (mi_output_running): ... this new function.
3572         (mi_on_resume_1): Adjust to use it.
3573         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3574         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3575         directly.
3576         (interrupt_thread_callback): : Adjust to use thread and inferior
3577         pointers.
3578         * proc-service.c: Include "gdbthread.h".
3579         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3580         * progspace-and-thread.c: Include "inferior.h".
3581         * progspace.c: Include "inferior.h".
3582         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3583         hold a reference to an inferior_object.
3584         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3585         inferior_thread.
3586         * python/py-inferior.c (struct inferior_object): Give the type a
3587         tag name instead of a typedef.
3588         (python_on_normal_stop): No need to check if the current thread is
3589         listed.
3590         (inferior_to_inferior_object): Change return type to
3591         inferior_object.  All callers adjusted.
3592         (find_thread_object): Delete, bits factored out to ...
3593         (thread_to_thread_object): ... this new function.
3594         * python/py-infthread.c (create_thread_object): Use
3595         inferior_to_inferior_object.
3596         (thpy_is_stopped): Use thread pointer directly.
3597         (gdbpy_selected_thread): Use inferior_thread.
3598         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3599         field, replaced with ...
3600         <thread>: ... this new field.  All users adjusted.
3601         (btpy_insn_or_gap_new): Drop const.
3602         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3603         callers adjusted.
3604         * python/py-record.c: Include "gdbthread.h".
3605         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3606         a ptid_t.  All callers adjusted.
3607         (gdbpy_current_recording): Use inferior_thread.
3608         * python/py-record.h (recpy_record_object) <ptid>: Delete
3609         field, replaced with ...
3610         <thread>: ... this new field.  All users adjusted.
3611         (recpy_element_object) <ptid>: Delete
3612         field, replaced with ...
3613         <thread>: ... this new field.  All users adjusted.
3614         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3615         a ptid_t.  All callers adjusted.
3616         * python/py-threadevent.c: Include "gdbthread.h".
3617         (get_event_thread): Use thread_to_thread_object.
3618         * python/python-internal.h (struct inferior_object): Forward
3619         declare.
3620         (find_thread_object, find_inferior_object): Delete declarations.
3621         (thread_to_thread_object, inferior_to_inferior_object): New
3622         declarations.
3623         * record-btrace.c: Include "inferior.h".
3624         (require_btrace_thread): Use inferior_thread.
3625         (record_btrace_frame_sniffer)
3626         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3627         (get_thread_current_frame): Use scoped_restore_current_thread and
3628         switch_to_thread.
3629         (get_thread_current_frame): Use thread pointer directly.
3630         (record_btrace_replay_at_breakpoint): Use thread's inferior
3631         pointer directly.
3632         * record-full.c: Include "inferior.h".
3633         * regcache.c: Include "gdbthread.h".
3634         (get_thread_arch_regcache): Use the inferior's address space
3635         directly.
3636         (get_thread_regcache, registers_changed_thread): New.
3637         * regcache.h (get_thread_regcache(thread_info *thread)): New
3638         overload.
3639         (registers_changed_thread): New.
3640         (remote_target) <remote_detach_1>: Swap order of parameters.
3641         (remote_add_thread): <remote_add_thread>: Return the new thread.
3642         (get_remote_thread_info(ptid_t)): New overload.
3643         (remote_target::remote_notice_new_inferior): Use thread pointers
3644         directly.
3645         (remote_target::process_initial_stop_replies): Use
3646         thread_info::set_running.
3647         (remote_target::remote_detach_1, remote_target::detach)
3648         (extended_remote_target::detach): Adjust.
3649         * stack.c (frame_show_address): Use inferior_thread.
3650         * target-debug.h (target_debug_print_thread_info_pp): New.
3651         * target-delegates.c: Regenerate.
3652         * target.c (default_thread_address_space): Delete.
3653         (memory_xfer_partial_1): Use current_inferior.
3654         (target_detach): Use current_inferior.
3655         (target_thread_address_space): Delete.
3656         (generic_mourn_inferior): Use current_inferior.
3657         * target.h (struct target_ops) <thread_address_space>: Delete.
3658         (target_thread_address_space): Delete.
3659         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3660         pointers directly.
3661         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3662         thread pointer instead of a ptid_t.  Adjust all callers.
3663         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3664         (first_thread_of_process): Delete, replaced by ...
3665         (first_thread_of_inferior): ... this new function.  All callers
3666         adjusted.
3667         (any_thread_of_process): Rename to ...
3668         (any_thread_of_inferior): ... this, and take an inferior pointer.
3669         (any_live_thread_of_process): Rename to ...
3670         (any_live_thread_of_inferior): ... this, and take an inferior
3671         pointer.
3672         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3673         (value_in_thread_stack_temporaries)
3674         (get_last_thread_stack_temporary): Take a thread pointer instead
3675         of a ptid_t.  Adjust all callers.
3676         (thread_info::set_running): New.
3677         (validate_registers_access): Use inferior_thread.
3678         (can_access_registers_ptid): Rename to ...
3679         (can_access_registers_thread): ... this, and take a thread
3680         pointer.
3681         (print_thread_info_1): Adjust to compare thread pointers instead
3682         of ptids.
3683         (switch_to_no_thread, switch_to_thread): Make extern.
3684         (scoped_restore_current_thread::~scoped_restore_current_thread):
3685         Use m_thread pointer directly.
3686         (scoped_restore_current_thread::scoped_restore_current_thread):
3687         Use inferior_thread.
3688         (thread_command): Use thread pointer directly.
3689         (thread_num_make_value_helper): Use inferior_thread.
3690         * top.c (execute_command): Use inferior_thread.
3691         * tui/tui-interp.c: Include "inferior.h".
3692         * varobj.c (varobj_create): Use inferior_thread.
3693         (value_of_root_1): Use find_thread_global_id instead of
3694         global_thread_id_to_ptid.
3695
3696 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3697
3698         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3699         possible.
3700         (regcache::write_part): Likewise.
3701         (readable_regcache::cooked_read_part): Update comment.
3702         (readable_regcache::cooked_write_part): Likewise.
3703         * regcache.h: (readable_regcache::read_part): Likewise.
3704         (regcache::write_part): Likewise.
3705
3706 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3707             Dirk Schubert  <dirk.schubert@arm.com>
3708
3709         * aarch64-linux-nat.c (post_attach): New.
3710         (aarch64_linux_nat_target::post_attach): Override post_attach to
3711         record the number of hardware debug registers.
3712
3713 2018-06-20  Tom Tromey  <tom@tromey.com>
3714
3715         * python/py-param.c (add_setshow_generic): Make parameters const.
3716         (parmpy_init): Update.
3717
3718 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3719
3720         * regcache.h (regcache_cooked_read_ftype): Rename to...
3721         (register_read_ftype): ...this, change type to function_view.
3722         (class reg_buffer) <save>: Remove src parameter.
3723         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3724         parameter non-const in first overload.  Remove src parameter in
3725         second overload.
3726         * regcache.c (do_cooked_read): Remove.
3727         (readonly_detached_regcache::readonly_detached_regcache): Make
3728         parameter non-const, adjust call to other constructor.
3729         (reg_buffer::save): Remove src parameter.
3730         * frame.c (do_frame_register_read): Remove.
3731         (frame_save_as_regcache): Use lambda function.
3732         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3733         parameter to ppu2spu_data *.
3734         (ppu2spu_sniffer): Use lambda function.
3735
3736 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3737
3738         * record-full.c (record_full_target::insert_breakpoint): Remove
3739         "struct" keyword, add const.
3740
3741 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3742
3743         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3744         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3745         * configure.ac: Remove AC_PREREQ, add missing quoting.
3746         * gnulib/configure.ac: Modernize usage of
3747         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3748         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3749         (AUTOMAKE_VERSION): Bump to 1.15.1.
3750         * configure: Re-generate.
3751         * config.in: Re-generate.
3752         * aclocal.m4: Re-generate.
3753         * gnulib/aclocal.m4: Re-generate.
3754         * gnulib/config.in: Re-generate.
3755         * gnulib/configure: Re-generate.
3756         * gnulib/import/Makefile.in: Re-generate.
3757
3758 2018-06-19  Pedro Alves  <palves@redhat.com>
3759
3760         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3761         (lookup_minimal_symbol_by_pc_section): ... here with
3762         gdb_assert_not_reached added.
3763
3764 2018-06-19  Pedro Alves  <palves@redhat.com>
3765
3766         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3767         parameter with a block parameter.  Compare location's block symbol
3768         with the frame's block instead of addresses.
3769         (skip_inline_frames): Pass the current block instead of the
3770         frame's address.  Break out as soon as we determine the frame
3771         should not be skipped.
3772
3773 2018-06-18  Tom Tromey  <tom@tromey.com>
3774
3775         * solib-aix.c (solib_aix_get_section_offsets): Return
3776         unique_xmalloc_ptr.
3777         (solib_aix_solib_create_inferior_hook): Update.
3778
3779 2018-06-18  Tom Tromey  <tom@tromey.com>
3780
3781         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3782
3783 2018-06-18  Tom Tromey  <tom@tromey.com>
3784
3785         * solib-frv.c (frv_relocate_main_executable): Use
3786         unique_xmalloc_ptr.
3787         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3788         unique_xmalloc_ptr.
3789
3790 2018-06-18  Tom Tromey  <tom@tromey.com>
3791
3792         * objfiles.h (inhibit_section_map_updates): Update.
3793         (resume_section_map_updates, resume_section_map_updates_cleanup):
3794         Remove.
3795         * solib-svr4.c (svr4_handle_solib_event): Update.
3796         * objfiles.c (inhibit_section_map_updates): Return
3797         scoped_restore_tmpl<int>.
3798         (resume_section_map_updates, resume_section_map_updates_cleanup):
3799         Remove.
3800
3801 2018-06-18  Tom Tromey  <tom@tromey.com>
3802
3803         * valprint.h (read_string): Update.
3804         * valprint.c (read_string): Change type of "buffer".
3805         (val_print_string): Update.
3806         * python/py-value.c (valpy_string): Update.
3807         * language.h (struct language_defn) <la_get_string>: Change
3808         type of "buffer".
3809         (default_get_string, c_get_string): Update.
3810         * language.c (default_get_string): Change type of "buffer".
3811         * guile/scm-value.c (gdbscm_value_to_string): Update.
3812         * c-lang.c (c_get_string): Change type of "buffer".
3813
3814 2018-06-18  Tom Tromey  <tom@tromey.com>
3815
3816         * ser-mingw.c (struct pipe_state_destroyer): New.
3817         (pipe_state_up): New typedef.
3818         (cleanup_pipe_state): Remove.
3819         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3820
3821 2018-06-18  Tom Tromey  <tom@tromey.com>
3822
3823         * rust-lang.h (rust_yyerror): Don't declare.
3824         * rust-lang.c (rust_language_defn): Update.
3825         * rust-exp.y (yyerror): Now static.
3826         * parse.c (parse_exp_in_context_1): Update.
3827         * p-lang.h (p_yyerror): Don't declare.
3828         * p-lang.c (p_language_defn): Update.
3829         * p-exp.y (yyerror): Now static.
3830         * opencl-lang.c (opencl_language_defn): Update.
3831         * objc-lang.c (objc_language_defn): Update.
3832         * m2-lang.h (m2_yyerror): Don't declare.
3833         * m2-lang.c (m2_language_defn): Update.
3834         * m2-exp.y (yyerror): Now static.
3835         * language.h (struct language_defn) <la_error>: Remove.
3836         * language.c (unk_lang_error): Remove.
3837         (unknown_language_defn, auto_language_defn): Remove.
3838         * go-lang.h (go_yyerror): Don't declare.
3839         * go-lang.c (go_language_defn): Update.
3840         * go-exp.y (yyerror): Now static.
3841         * f-lang.h (f_yyerror): Don't declare.
3842         * f-lang.c (f_language_defn): Update.
3843         * f-exp.y (yyerror): Now static.
3844         * d-lang.h (d_yyerror): Don't declare.
3845         * d-lang.c (d_language_defn): Update.
3846         * d-exp.y (yyerror): Now static.
3847         * c-lang.h (c_yyerror): Don't declare.
3848         * c-lang.c (c_language_defn, cplus_language_defn)
3849         (asm_language_defn, minimal_language_defn): Update.
3850         * c-exp.y (yyerror): Now static.
3851         * ada-lang.h (ada_yyerror): Don't declare.
3852         * ada-lang.c (ada_language_defn): Update.
3853         * ada-exp.y (yyerror): Now static.
3854
3855 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3856
3857         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3858         (store_sveregs_to_thread): Likewise.
3859         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3860         (aarch64_linux_store_inferior_registers): Likewise.
3861         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3862         function.
3863         (aarch64_sve_regs_copy_to_regcache): Likewise.
3864         (aarch64_sve_regs_copy_from_regcache): Likewise.
3865         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3866         declaration.
3867         (aarch64_sve_regs_copy_to_regcache): Likewise.
3868         (aarch64_sve_regs_copy_from_regcache): Likewise.
3869         (sve_context): Structure from Linux headers.
3870         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3871         (SVE_SIG_ZREG_SIZE): Likewise.
3872         (SVE_SIG_PREG_SIZE): Likewise.
3873         (SVE_SIG_FFR_SIZE): Likewise.
3874         (SVE_SIG_REGS_OFFSET): Likewise.
3875         (SVE_SIG_ZREGS_OFFSET): Likewise.
3876         (SVE_SIG_ZREG_OFFSET): Likewise.
3877         (SVE_SIG_ZREGS_SIZE): Likewise.
3878         (SVE_SIG_PREGS_OFFSET): Likewise.
3879         (SVE_SIG_PREG_OFFSET): Likewise.
3880         (SVE_SIG_PREGS_SIZE): Likewise.
3881         (SVE_SIG_FFR_OFFSET): Likewise.
3882         (SVE_SIG_REGS_SIZE): Likewise.
3883         (SVE_SIG_CONTEXT_SIZE): Likewise.
3884         (SVE_PT_REGS_MASK): Likewise.
3885         (SVE_PT_REGS_FPSIMD): Likewise.
3886         (SVE_PT_REGS_SVE): Likewise.
3887         (SVE_PT_VL_INHERIT): Likewise.
3888         (SVE_PT_VL_ONEXEC): Likewise.
3889         (SVE_PT_REGS_OFFSET): Likewise.
3890         (SVE_PT_FPSIMD_OFFSET): Likewise.
3891         (SVE_PT_FPSIMD_SIZE): Likewise.
3892         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3893         (SVE_PT_SVE_PREG_SIZE): Likewise.
3894         (SVE_PT_SVE_FFR_SIZE): Likewise.
3895         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3896         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3897         (__SVE_SIG_TO_PT): Likewise.
3898         (SVE_PT_SVE_OFFSET): Likewise.
3899         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3900         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3901         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3902         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3903         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3904         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3905         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3906         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3907         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3908         (SVE_PT_SVE_SIZE): Likewise.
3909         (SVE_PT_SIZE): Likewise.
3910         (HAS_SVE_STATE): New define.
3911
3912 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3913
3914         * nat/aarch64-sve-linux-sigcontext.h: New file.
3915         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3916         new files.
3917         (SVE_VQ_MIN): Likewise.
3918         (SVE_VQ_MAX): Likewise.
3919         (SVE_VL_MIN): Likewise.
3920         (SVE_VL_MAX): Likewise.
3921         (SVE_NUM_ZREGS): Likewise.
3922         (SVE_NUM_PREGS): Likewise.
3923         (sve_vl_valid): Likewise.
3924         (struct user_sve_header): Likewise.
3925
3926 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
3927             Richard Bunt <Richard.Bunt@arm.com>
3928
3929         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3930         was requested by GDB.
3931
3932 2018-06-15  Tom de Vries  <tdevries@suse.de>
3933
3934         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3935
3936 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
3937
3938         * gnulib/update-gnulib.sh: Print expected versions of
3939         autoconf/aclocal.
3940
3941 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
3942
3943         * arch-utils.c (default_type_align): Use type_length_units.
3944         * gdbtypes.c (type_align): Use type_length_units.
3945
3946 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3947
3948         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3949         of 'define' command.
3950
3951 2018-06-14  Tom de Vries  <tdevries@suse.de>
3952
3953         PR cli/22573
3954         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3955         get_no_prettyformat_print_options.
3956
3957 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3958
3959         * sparc-nat.h: Include target.h.
3960         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3961         <fetch_registers>: Remove this argument in function call.
3962         <store_registers>: Remove this argument in function call, remove
3963         extra semicolon.
3964         <low_forget_process>: Call sparc64_forget_process instead of
3965         sparc_forget_process.
3966
3967 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3968
3969         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3970         (procfs_target::make_corefile_notes): Adjust to new
3971         target_read_alloc return type.
3972
3973 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3974             Stephen Roberts  <stephen.roberts@arm.com>
3975
3976         PR gdb/22882
3977         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3978         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3979         Move should_notify_stop local into more inner scope.
3980
3981 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3982             Stephen Roberts  <stephen.roberts@arm.com>
3983
3984         PR gdb/22882
3985         * infrun.c (resume_1): Add call to mark_async_event_handler.
3986
3987 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3988
3989         * infrun.c (do_target_wait): Change old version of $pc printed.
3990
3991 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3992
3993         * dwarf2read.c (read_index_from_section): Rename to...
3994         (read_gdb_index_from_section): ... this, update all callers.
3995         (dwarf2_read_index): Rename to...
3996         (dwarf2_read_gdb_index): ... this, update all callers.
3997
3998 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
3999
4000         * gdb/hppa-linux-nat.c
4001         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4002         hppa_linux_nat_target::fetch_registers.
4003
4004 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4005
4006         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4007         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4008         (AARCH64_DWARF_SVE_FFR): Likewise.
4009         (AARCH64_DWARF_SVE_P0): Likewise.
4010         (AARCH64_DWARF_SVE_Z0): Likewise.
4011
4012 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4013
4014         * common/common-regcache.h (raw_compare): New function.
4015         * regcache.c (regcache::raw_compare): Likewise.
4016         * regcache.h (regcache::raw_compare): New declaration.
4017
4018 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4019
4020         * common/common-regcache.h (reg_buffer_common): New structure.
4021         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4022         (reg_buffer::raw_supply): Likewise.
4023         (reg_buffer::raw_supply_integer): Likewise.
4024         (reg_buffer::raw_supply_zeroed): Likewise.
4025         (reg_buffer::raw_collect): Likewise.
4026         (reg_buffer::raw_collect_integer): Likewise.
4027         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4028         (reg_buffer::raw_supply): Likewise.
4029         (reg_buffer::raw_supply_integer): Likewise.
4030         (reg_buffer::raw_supply_zeroed): Likewise.
4031         (reg_buffer::raw_collect): Likewise.
4032         (reg_buffer::raw_collect_integer): Likewise.
4033
4034 2018-06-10  Tom Tromey  <tom@tromey.com>
4035
4036         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4037         (class remote_state) <stop_reply_queue>: Now std::vector.
4038         (remote_state::~remote_state)
4039         (remote_target::stop_reply_queue_length): Update.
4040         (struct queue_iter_param, remove_child_of_pending_fork)
4041         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4042         (check_pending_event_prevents_wildcard_vcont_callback)
4043         (remove_stop_reply_for_inferior)
4044         (remove_stop_reply_of_remote_state)
4045         (remote_notif_remove_once_on_match)
4046         (stop_reply_match_ptid_and_ws)
4047         (remote_kill_child_of_pending_fork): Remove.
4048         (remote_target::remove_new_fork_children)
4049         (remote_target::check_pending_events_prevent_wildcard_vcont)
4050         (remote_target::discard_pending_stop_replies)
4051         (remote_target::discard_pending_stop_replies_in_queue)
4052         (remote_target::remote_notif_remove_queued_reply)
4053         (remote_target::queued_stop_reply)
4054         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4055         (remote_target::wait, remote_target::kill_new_fork_children)
4056         (remote_target::async): Update.
4057
4058 2018-06-10  Tom Tromey  <tom@tromey.com>
4059
4060         * record-full.c (record_full_arch_list_cleanups): Remove.
4061         (record_full_message): Use try/catch.
4062         (record_full_wait_cleanups): Remove.
4063         (record_full_wait_1): Use try/catch.
4064         (record_full_restore): Likewise.
4065
4066 2018-06-10  Tom Tromey  <tom@tromey.com>
4067
4068         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4069         declare VEC.  Add constructor.
4070         <in_target_beneath>: Now bool.
4071         (record_full_breakpoints): Now a std::vector, static.
4072         (record_full_sync_record_breakpoints)
4073         (record_full_init_record_breakpoints)
4074         (record_full_target::insert_breakpoint)
4075         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4076
4077 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4078
4079         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4080         * serial.c (serial_interface_lookup): Remove struct keyword.
4081
4082 2018-06-10  Tom Tromey  <tom@tromey.com>
4083
4084         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4085         method.
4086         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4087         a method.
4088         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4089         method.
4090         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4091         "beneath" as a method.
4092         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4093         Use "beneath" as a method.
4094
4095 2018-06-10  Tom Tromey  <tom@tromey.com>
4096
4097         * tracefile.c (struct trace_file_writer_deleter): New.
4098         <operator()>: Rename from trace_file_writer_xfree.
4099         (trace_file_writer_up): New typedef.
4100         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4101
4102 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4103
4104         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4105         <m_registers, m_register_status>: Change type to
4106         std::unique_ptr.
4107         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4108         XCNEWVEC.
4109
4110 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4111
4112         * common/common-regcache.h (enum register_status): Add
4113         underlying type "signed char".
4114         * regcache.h (reg_buffer) <m_register_status>: Change type to
4115         register_status *.
4116         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4117         register_status instead of signed char.
4118         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4119         (reg_buffer::get_register_status): Remove cast.
4120         (readable_regcache::raw_read): Remove cast.
4121         (readable_regcache::cooked_read): Remove cast.
4122
4123 2018-06-09  Tom Tromey  <tom@tromey.com>
4124
4125         * source.c (reverse_search_command, forward_search_command): Use
4126         scoped_fd.
4127
4128 2018-06-09  Tom Tromey  <tom@tromey.com>
4129
4130         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4131         (serial_ops_list): Now static, std::vector.
4132         (serial_interface_lookup, serial_add_interface): Update.
4133
4134 2018-06-09  Tom Tromey  <tom@tromey.com>
4135
4136         * dwarf2read.c (process_cu_includes): Update.
4137         (process_full_comp_unit): Update.
4138         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4139         std::vector.
4140
4141 2018-06-08  Paul Koning  <paul_koning@dell.com>
4142
4143         PR gdb/23252
4144
4145         * python/python.c (do_start_initialization):
4146         Avoid call to internal Python API.
4147         (init__gdb_module): New function.
4148
4149 2018-06-08  Gary Benson <gbenson@redhat.com>
4150
4151         * linux-thread-db.c (valprint.h): New include.
4152         (struct check_thread_db_info): New structure.
4153         (check_thread_db_on_load, tdb_testinfo): New static globals.
4154         (check_thread_db, check_thread_db_callback): New functions.
4155         (try_thread_db_load_1): Run integrity checks if requested.
4156         (maintenance_check_libthread_db): New function.
4157         (_initialize_thread_db): Register "maint check libthread-db"
4158         and "maint set/show check-libthread-db".
4159         * NEWS: Mention the above new commands.
4160
4161 2018-06-08  Tom Tromey  <tom@tromey.com>
4162
4163         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4164         now a method.
4165
4166 2018-06-08  Tom Tromey  <tom@tromey.com>
4167
4168         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4169
4170 2018-06-08  Tom Tromey  <tom@tromey.com>
4171
4172         * common/btrace-common.h (struct btrace_data): Add constructor,
4173         destructor, move assignment operator.
4174         <empty, clear, fini>: New methods.
4175         <format>: Initialize.
4176         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4177         (btrace_data_empty): Don't declare.
4178         * common/btrace-common.c (btrace_data_init): Remove.
4179         (btrace_data::fini): Rename from btrace_data_fini.
4180         (btrace_data::empty): Rename from btrace_data_empty.
4181         (btrace_data::clear): Rename from btrace_data_clear.  Return
4182         bool.
4183         * btrace.h (make_cleanup_btrace_data): Don't declare.
4184         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4185         (parse_xml_btrace): Update.
4186         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4187         (maint_btrace_clear_packet_history_cmd): Update.
4188
4189 2018-06-07  Pedro Alves  <palves@redhat.com>
4190
4191         * target.h (target_ops) <beneath>: Now a method.  All references
4192         updated.
4193         (class target_stack): New.
4194         * target.c (g_target_stack): New.
4195         (g_current_top_target): Delete.
4196         (current_top_target): Get the top target out of g_target_stack.
4197         (target_stack::push, target_stack::unpush): New.
4198         (push_target, unpush_target): Reimplement.
4199         (target_is_pushed): Reimplement in terms of g_target_stack.
4200         (target_ops::beneath, target_stack::find_beneath): New.
4201
4202 2018-06-07  Pedro Alves  <palves@redhat.com>
4203
4204         * target.h (find_target_beneath): Delete declaration.
4205         * target.c (find_target_beneath): Delete definition.
4206         * aix-thread.c: All callers of find_target_beneath adjusted to
4207         call target_ops::beneath instead.
4208         * bsd-uthread.c: Likewise.
4209         * linux-thread-db.c: Likewise.
4210         * ravenscar-thread.c: Likewise.
4211         * sol-thread.c: Likewise.
4212         * spu-multiarch.c: Likewise.
4213
4214 2018-06-07  Pedro Alves  <palves@redhat.com>
4215
4216         * target.h (target_ops) <beneath>: Now a method.  All references
4217         updated.
4218         (target_ops) <m_beneath>: New.
4219         * target.c (target_ops::beneath): New.
4220         * corelow.c: Adjust all references to target_ops::beneath.
4221         * linux-thread-db.c: Likewise.
4222         * make-target-delegates: Likewise.
4223         * record-btrace.c: Likewise.
4224         * record-full.c: Likewise.
4225         * remote.c: Likewise.
4226         * target.c: Likewise.
4227         * target-delegates.c: Regenerate.
4228
4229 2018-06-07  Pedro Alves  <palves@redhat.com>
4230
4231         * target.h (target_stack): Delete.
4232         (current_top_target): Declare function.
4233         * target.c (target_stack): Delete.
4234         (g_current_top_target): New.
4235         (current_top_target): New function.
4236         * auxv.c: Use current_top_target instead of target_stack
4237         throughout.
4238         * avr-tdep.c: Likewise.
4239         * breakpoint.c: Likewise.
4240         * corefile.c: Likewise.
4241         * elfread.c: Likewise.
4242         * eval.c: Likewise.
4243         * exceptions.c: Likewise.
4244         * frame.c: Likewise.
4245         * gdbarch-selftests.c: Likewise.
4246         * gnu-v3-abi.c: Likewise.
4247         * ia64-tdep.c: Likewise.
4248         * ia64-vms-tdep.c: Likewise.
4249         * infcall.c: Likewise.
4250         * infcmd.c: Likewise.
4251         * infrun.c: Likewise.
4252         * linespec.c: Likewise.
4253         * linux-tdep.c: Likewise.
4254         * minsyms.c: Likewise.
4255         * ppc-linux-nat.c: Likewise.
4256         * ppc-linux-tdep.c: Likewise.
4257         * procfs.c: Likewise.
4258         * regcache.c: Likewise.
4259         * remote.c: Likewise.
4260         * rs6000-tdep.c: Likewise.
4261         * s390-linux-nat.c: Likewise.
4262         * s390-tdep.c: Likewise.
4263         * solib-aix.c: Likewise.
4264         * solib-darwin.c: Likewise.
4265         * solib-dsbt.c: Likewise.
4266         * solib-spu.c: Likewise.
4267         * solib-svr4.c: Likewise.
4268         * solib-target.c: Likewise.
4269         * sparc-tdep.c: Likewise.
4270         * sparc64-tdep.c: Likewise.
4271         * spu-tdep.c: Likewise.
4272         * symfile.c: Likewise.
4273         * symtab.c: Likewise.
4274         * target-descriptions.c: Likewise.
4275         * target-memory.c: Likewise.
4276         * target.c: Likewise.
4277         * target.h: Likewise.
4278         * tracefile-tfile.c: Likewise.
4279         * tracepoint.c: Likewise.
4280         * valops.c: Likewise.
4281         * valprint.c: Likewise.
4282         * value.c: Likewise.
4283         * windows-tdep.c: Likewise.
4284         * mi/mi-main.c: Likewise.
4285
4286 2018-06-07  Tom Tromey  <tom@tromey.com>
4287
4288         * valprint.h (build_address_symbolic): Declare.
4289         * printcmd.c (print_address_symbolic): Update.
4290         (build_address_symbolic): Change "name" and "filename" to
4291         std::string.
4292         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4293         Update.
4294         * defs.h (build_address_symbolic): Remove declaration.
4295
4296 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4297
4298         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4299         (aarch64_vnv_type): Add function.
4300         (aarch64_pseudo_register_name): Add V regs for SVE.
4301         (aarch64_pseudo_register_type): Likewise.
4302         (aarch64_pseudo_register_reggroup_p): Likewise.
4303         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4304         (aarch64_pseudo_read_value): Add V regs for SVE.
4305         (aarch64_pseudo_write_2): Use V0 offset for SVE
4306         (aarch64_pseudo_write): Add V regs for SVE.
4307         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4308
4309 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4310
4311         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4312         (sve_vl_from_vq): Likewise.
4313
4314 2018-06-05  Tom Tromey  <tom@tromey.com>
4315
4316         * cli/cli-cmds.c (show_version): Update.
4317         * top.c (print_gdb_version): Add "interactive" parameter.
4318         Update.
4319         * main.c (captured_main_1): Update.
4320         * top.h (print_gdb_version): Add "interactive" parameter and a
4321         comment.
4322
4323 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4324
4325         * common/enum-flags.h: Add trailing semicolon to example in
4326         comment.
4327
4328 2018-06-05  Tom Tromey  <tom@tromey.com>
4329
4330         PR cli/12326:
4331         * NEWS: Add entry about pager.
4332         * utils.c (pagination_disabled_for_command): New global.
4333         (prompt_for_continue): Allow "c" response to prompt.
4334         (reinitialize_more_filter): Clear
4335         pagination_disabled_for_command.
4336         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4337
4338 2018-06-04  Tom Tromey  <tom@tromey.com>
4339
4340         * ada-lang.h (ada_lookup_symbol_list): Update.
4341         * ada-lang.c (resolve_subexp): Update.
4342         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4343         parameter.
4344         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4345         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4346         results parameter to std::vector.
4347         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4348         Update.
4349         * ada-exp.y (block_lookup): Update.
4350         (select_possible_type_sym): Change type of syms.  Remove nsyms
4351         parameter.
4352         (write_var_or_type, write_name_assoc): Update.
4353
4354 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4355
4356         * windows-nat.c (windows_nat_target::xfer_partial): Return
4357         TARGET_XFER_E_IO if we need to delegate to the target beneath
4358         but BENEATH is NULL.
4359
4360 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4361
4362         * Makefile.in (config.status): Add configure.nat as a
4363         dependency.
4364
4365 2018-06-04  Tom Tromey  <tom@tromey.com>
4366
4367         * cp-name-parser.y (cpname_state): Add method declarations.
4368         (HANDLE_QUAL): Update.
4369         (cpname_state::d_grab, cpname_state::fill_comp)
4370         (cpname_state::make_operator, cpname_state::make_dtor)
4371         (cpname_state::make_builtin_type, cpname_state::make_name)
4372         (cpname_state::d_qualify, cpname_state::d_int_type)
4373         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4374         (%union): Move earlier.
4375
4376 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4377
4378         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4379
4380 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4381
4382         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4383         (aarch64_pseudo_write_1): Likewise.
4384         (aarch64_pseudo_read_value): Use helper.
4385         (aarch64_pseudo_write): Likewise.
4386
4387 2018-06-04  Pedro Alves  <palves@redhat.com>
4388
4389         * darwin-nat.c (darwin_ops): Delete.
4390         (darwin_attach_pid): Use get_native_target.
4391
4392 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4393
4394         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4395         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4396
4397 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4398
4399         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4400         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4401         (aarch64_gdbarch_init): Check for SVE.
4402         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4403
4404 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4405
4406         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4407         * aarch64-tdep.h (aarch64_read_description): Likewise.
4408         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4409         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4410         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4411         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4412         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4413
4414 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4415
4416         * value.c (value_fetch_lazy_bitfield): New.
4417         (value_fetch_lazy_memory): New.
4418         (value_fetch_lazy_register): New.
4419         (value_fetch_lazy): Factor out to smaller functions.
4420
4421 2018-06-01  Tom Tromey  <tom@tromey.com>
4422
4423         * cp-name-parser.y (backslashable, represented): Now const.
4424
4425 2018-06-01  Tom Tromey  <tom@tromey.com>
4426
4427         * cp-name-parser.y: Include parser-defs.h.
4428         (parser_fprintf): Remove declaration.
4429
4430 2018-06-01  Tom Tromey  <tom@tromey.com>
4431
4432         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4433         %parse-param.
4434         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4435         (global_result): Remove globals.
4436         (struct cpname_state): New.
4437         (yyparse): Don't declare.
4438         (yylex, yyerror): Move declarations after %union.
4439         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4440         (make_name): Add state parameter.
4441         Update all callers.
4442         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4443         parameter.
4444         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4445         Update.
4446         (yylex): Add lvalp, state parameters.
4447         (yyerror): Add state parameter.
4448         (cp_demangled_name_to_comp): Update.
4449
4450 2018-06-01  Tom Tromey  <tom@tromey.com>
4451
4452         * cp-name-parser.y (parser_fprintf): Declare.
4453         (GDB_YY_REMAP_PREFIX): Define.
4454         Include yy-remap.h.  Don't redefine yy* identifiers.
4455
4456 2018-06-01  Tom Tromey  <tom@tromey.com>
4457
4458         * python/py-type.c (typy_legacy_template_argument): Update.
4459         * cp-support.h (cp_demangled_name_to_comp): Update.
4460         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4461         parameter to be a "std::string *".
4462         (main): Update.
4463
4464 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4465
4466         * ada-lex.l: Include "diagnostics.h" instead of
4467         "common/diagnostics.h".
4468         * unittests/environ-selftests.c: Likewise.
4469         * common/diagnostics.h: Moved to ../include.
4470
4471 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4472
4473         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4474         to language_mode_manual while calling breakpoint_re_set_one.
4475
4476 2018-06-01  Tom Tromey  <tom@tromey.com>
4477
4478         * valops.c (value_cast_structs, destructor_name_p): Update.
4479         * symtab.c (gdb_mangle_name): Update.
4480         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4481         Update.
4482         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4483         (pascal_object_print_value_fields, pascal_object_print_value):
4484         Update.
4485         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4486         * linespec.c (find_methods): Update.
4487         * gdbtypes.h (type_name_no_tag): Remove.
4488         (type_name_or_error): Rename from type_name_no_tag_or_error.
4489         * gdbtypes.c (type_name_no_tag): Remove.
4490         (type_name_or_error): Rename from type_name_no_tag_or_error.
4491         (lookup_struct_elt_type, check_typedef): Update.
4492         * expprint.c (print_subexp_standard): Update.
4493         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4494         * d-namespace.c (d_lookup_nested_symbol): Update.
4495         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4496         (cp_print_class_member): Update.
4497         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4498         * completer.c (add_struct_fields): Update.
4499         * c-typeprint.c (cp_type_print_derivation_info)
4500         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4501         Update.
4502         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4503         (ada_prefer_type, ada_is_exception_sym): Update.
4504
4505 2018-06-01  Tom Tromey  <tom@tromey.com>
4506
4507         * valops.c (enum_constant_from_type, value_namespace_elt)
4508         (value_maybe_namespace_elt): Update.
4509         * valarith.c (find_size_for_pointer_math): Update.
4510         * target-descriptions.c (make_gdb_type): Update.
4511         * symmisc.c (print_symbol): Update.
4512         * stabsread.c (define_symbol, read_type)
4513         (complain_about_struct_wipeout, add_undefined_type)
4514         (cleanup_undefined_types_1): Update.
4515         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4516         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4517         (rust_internal_print_type, rust_composite_type)
4518         (rust_evaluate_funcall, rust_evaluate_subexp)
4519         (rust_inclusive_range_type_p): Update.
4520         * python/py-type.c (typy_get_tag): Update.
4521         * p-typeprint.c (pascal_type_print_base): Update.
4522         * mdebugread.c (parse_symbol, parse_type): Update.
4523         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4524         Update.
4525         * guile/scm-type.c (gdbscm_type_tag): Update.
4526         * go-lang.c (sixg_string_p): Update.
4527         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4528         Update.
4529         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4530         (TYPE_TAG_NAME): Remove.
4531         * gdbtypes.c (type_name_no_tag): Simplify.
4532         (check_typedef, check_types_equal, recursive_dump_type)
4533         (copy_type_recursive, arch_composite_type): Update.
4534         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4535         in summary mode when needed.
4536         * eval.c (evaluate_funcall): Update.
4537         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4538         (process_structure_scope, read_enumeration_type)
4539         (read_namespace_type, read_module_type, determine_prefix): Update.
4540         * cp-support.c (inspect_type): Update.
4541         * coffread.c (process_coff_symbol, decode_base_type): Update.
4542         * c-varobj.c (c_is_path_expr_parent): Update.
4543         * c-typeprint.c (c_type_print_base_struct_union): Update.
4544         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4545         summary when using C language.
4546         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4547         (gen_maybe_namespace_elt): Update.
4548         * ada-lang.c (ada_type_name): Simplify.
4549         (empty_record, ada_template_to_fixed_record_type_1)
4550         (template_to_static_fixed_type)
4551         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4552
4553 2018-06-01  Tom Tromey  <tom@tromey.com>
4554
4555         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4556         c_print_type.
4557         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4558         (c_print_type): Update.
4559         (c_print_type): New overload.
4560         (c_type_print_varspec_prefix, c_type_print_args)
4561         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4562         (c_type_print_base_struct_union, c_type_print_base_1)
4563         (cp_type_print_method_args): Add "language" parameter.
4564         (c_type_print_base): Update.
4565         * c-lang.h (c_print_type): Add new overload.
4566
4567 2018-06-01  Tom Tromey  <tom@tromey.com>
4568
4569         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4570         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4571
4572 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4573
4574         * aarch64-tdep.c (aarch64_sve_register_names): New const
4575         var.
4576         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4577         (AARCH64_SVE_Z_REGS_NUM): New define.
4578         (AARCH64_SVE_P_REGS_NUM): Likewise.
4579         (AARCH64_SVE_NUM_REGS): Likewise.
4580
4581 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4582
4583         * nat/linux-ptrace.h [__alpha__]
4584         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4585         definitions.
4586
4587 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4588
4589         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4590         the endianness selected.
4591         * NEWS: Document `set endian auto' mode operation update.
4592
4593 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4594
4595         * Makefile.in: Add new header.
4596         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4597         (sve_vl_from_vg): Likewise.
4598         (sve_vq_from_vl): Likewise.
4599         (sve_vl_from_vq): Likewise.
4600         (sve_vq_from_vg): Likewise.
4601         (sve_vg_from_vq): Likewise.
4602         * configure.nat: Add new c file.
4603         * nat/aarch64-sve-linux-ptrace.c: New file.
4604         * nat/aarch64-sve-linux-ptrace.h: New file.
4605
4606 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4607
4608         * aarch64-linux-nat.c (aarch64_linux_read_description):
4609         Add parmeter zero.
4610         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4611         Likewise.
4612         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4613         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4614         (aarch64_gdbarch_init): Add parmeter zero.
4615         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4616         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4617         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4618         parmeter.
4619         * doc/gdb.texinfo: Describe SVE feature
4620         * features/aarch64-sve.c: New file.
4621
4622 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4623
4624         PR gdb/23210
4625         * gdbarch.sh (significant_addr_bit): Default to zero when
4626         not set by target architecture.
4627         * gdbarch.c: Re-generated.
4628         * utils.c (address_significant): Update.
4629
4630 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4631
4632         * stack.c (func_command): Remove trailing newline in call to error.
4633
4634 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4635
4636         * regcache.h (regcache_raw_collect): Remove, update callers to
4637         use regcache::raw_collect.
4638         * regcache.c (regcache_raw_collect): Remove.
4639
4640 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4641
4642         * regcache.h (regcache_raw_supply): Remove, update callers to
4643         use detached_regcache::raw_supply.
4644         * regcache.c (regcache_raw_supply): Remove.
4645
4646 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4647
4648         * regcache.h (regcache_cooked_write_part): Remove, update
4649         callers to use regcache::cooked_write_part.
4650         * regcache.c (regcache_cooked_write_part): Remove.
4651
4652 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4653
4654         * regcache.h (regcache_cooked_read_part): Remove, update callers
4655         to use readable_regcache::cooked_read_part.
4656         * regcache.c (regcache_cooked_read_part): Remove.
4657
4658 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4659
4660         * regcache.h (regcache_cooked_read_value): Remove, update
4661         callers to use readable_regcache::cooked_read_value.
4662         * regcache.c (regcache_cooked_read_value): Remove.
4663
4664 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4665
4666         * regcache.h (regcache_cooked_write): Remove, update callers to
4667         use regcache::cooked_write.
4668         * regcache.c (regcache_cooked_write): Remove.
4669
4670 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4671
4672         * regcache.h (regcache_invalidate): Remove, update callers to
4673         use detached_regcache::invalidate instead.
4674         * regcache.c (regcache_invalidate): Remove.
4675
4676 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4677
4678         * regcache.h (regcache_raw_write_part): Remove, update callers
4679         to use regcache::raw_write_part instead.
4680         * regcache.c (regcache_raw_write_part): Remove.
4681
4682 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4683
4684         * regcache.h (regcache_raw_read_part): Remove, update callers to
4685         use readable_regcache::raw_read_part instead.
4686         * regcache.c (regcache_raw_read_part): Remove.
4687
4688 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4689
4690         * regcache.h (regcache_cooked_read): Remove, update callers to
4691         use readable_regcache::cooked_read instead.
4692         * regcache.c (regcache_cooked_read): Remove.
4693
4694 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4695
4696         * regcache.h (regcache_raw_write): Remove, update callers to use
4697         regcache::raw_write instead.
4698         * regcache.c (regcache_raw_write): Remove.
4699
4700 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4701
4702         * regcache.h (regcache_raw_read): Remove, update callers to use
4703         readable_regcache::raw_read instead.
4704         * regcache.c (regcache_raw_read): Remove.
4705
4706 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4707
4708         * regcache.h (regcache_raw_update): Remove, update callers to
4709         use readable_regcache::raw_update instead.
4710         * regcache.c (regcache_raw_update): Remove.
4711
4712 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4713
4714         * regcache.h (regcache_register_status): Remove, update callers
4715         to use reg_buffer::get_register_status directly instead.
4716         * regcache.c (regcache_register_status): Remove.
4717
4718 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4719
4720         * regcache.h (regcache_get_ptid): Remove, update all callers to
4721         call regcache::ptid instead.
4722         * regcache.c (regcache_get_ptid): Remove.
4723
4724 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4725
4726         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4727
4728 2018-05-30  Pedro Alves  <palves@redhat.com>
4729
4730         * common/common-exceptions.h (exception_rethrow): Use
4731         ATTRIBUTE_NORETURN.
4732
4733 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4734
4735         * breakpoint.c (print_solib_event, check_status_catch_solib):
4736         Remove struct keyword in range-based for loops.
4737         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4738         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4739         Likewise.
4740         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4741         Likewise.
4742         * symfile.c (addr_info_make_relative): Likewise.
4743         * thread.c (value_in_thread_stack_temporaries): Likewise.
4744
4745 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4746
4747         PR gdb/16841
4748         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4749         aggregate type to get its real type before accessing it.
4750
4751 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4752
4753         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4754         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4755         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4756         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4757         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4758         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4759         * printcmd.c (info_address_command): Likewise.
4760
4761 2018-05-29  Tom Tromey  <tom@tromey.com>
4762
4763         * windows-nat.c (handle_exception): Update fall-through comment.
4764
4765 2018-05-29  Tom Tromey  <tom@tromey.com>
4766
4767         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4768         (struct program_space) <added_solibs>: Now a std::vector.
4769         * breakpoint.c (print_solib_event): Update.
4770         (check_status_catch_solib): Update.
4771         * progspace.c (clear_program_space_solib_cache): Update.
4772         * solib.c (update_solib_list): Update.
4773
4774 2018-05-29  Tom Tromey  <tom@tromey.com>
4775
4776         * python/py-type.c (typy_richcompare): Update.
4777         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4778         * gdbtypes.h (types_deeply_equal): Return bool.
4779         (types_equal): Likewise.
4780         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4781         declare VEC.
4782         (check_types_equal): Change worklist to std::vector.  Return
4783         bool.
4784         (struct type_equality_entry): Add constructor.
4785         (compare_maybe_null_strings): Return bool.
4786         (check_types_worklist): Return bool.  Change worklist to
4787         std::vector.
4788         (types_deeply_equal): Use std::vector.
4789         (types_equal): Return bool.
4790         (compare_maybe_null_strings): Simplify.
4791
4792 2018-05-29  Tom Tromey  <tom@tromey.com>
4793
4794         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4795
4796 2018-05-29  Tom Tromey  <tom@tromey.com>
4797
4798         * objc-lang.h: Don't include cp-support.h.
4799         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4800         declare VEC.
4801
4802 2018-05-27  Tom Tromey  <tom@tromey.com>
4803
4804         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4805
4806 2018-05-25  Tom Tromey  <tom@tromey.com>
4807
4808         * value.c (value::location): Initialize.
4809
4810 2018-05-25  Tom Tromey  <tom@tromey.com>
4811
4812         * dbxread.c (init_bincl_list): Remove.
4813         (bincl_list): Now a std::vector.
4814         (bincls_allocated, next_bincl): Remove.
4815         (free_bincl_list, do_free_bincl_list_cleanup)
4816         (make_cleanup_free_bincl_list): Remove.
4817         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4818         unique_xmalloc_ptr.
4819         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4820         (struct header_file_location): Add constructor.
4821         (add_bincl_to_list): Remove.
4822
4823 2018-05-25  Tom Tromey  <tom@tromey.com>
4824
4825         * tui/tui.c (tui_enable): Update.
4826         * mi/mi-interp.c (mi_interp::init): Update.
4827         * interps.h (class interp) <name>: New method.
4828         <m_name>: Rename from name.
4829         (~scoped_restore_interp): Update.
4830         * interps.c (interp::interp): Update.
4831         (interp_add, interp_set, interp_lookup_existing)
4832         (current_interp_named_p): Update.
4833
4834 2018-05-25  Tom Tromey  <tom@tromey.com>
4835
4836         * interps.c (interp_name): Remove.
4837         * mi/mi-interp.c (mi_interp::init): Update.
4838         * interps.h (interp_name): Remove.
4839         (~scoped_restore_interp): Update.
4840         * tui/tui.c (tui_enable): Update.
4841
4842 2018-05-25  Tom Tromey  <tom@tromey.com>
4843
4844         * utils.c (fputs_maybe_filtered): Update.
4845         * linespec.c (decode_line_full): Update.
4846         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4847         (mi_print_breakpoint_for_event, mi_solib_loaded)
4848         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4849         (mi_user_selected_context_changed): Update.
4850         * mi/mi-main.c (mi_execute_command): Update.
4851         * cli/cli-script.c (execute_control_command): Update.
4852         * python/python.c (execute_gdb_command): Update.
4853         * solib.c (info_sharedlibrary_command): Update.
4854         * interps.c (interp_ui_out): Remove.
4855         * interps.h (interp_ui_out): Remove.
4856
4857 2018-05-25  Tom Tromey  <tom@tromey.com>
4858
4859         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4860         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4861         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4862
4863 2018-05-25  Tom Tromey  <tom@tromey.com>
4864
4865         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4866         * interps.c (interp_exec): Use scoped_restore.
4867
4868 2018-05-25  Tom Tromey  <tom@tromey.com>
4869
4870         * remote.c (remote_target::remote_file_get): Use
4871         gdb::byte_vector.
4872         (remote_target::remote_file_put): Likewise.
4873
4874 2018-05-25  Tom Tromey  <tom@tromey.com>
4875
4876         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4877         a std::string.
4878         (get_pe_section_index, add_pe_exported_sym): Update.
4879         (read_pe_exported_syms): Use gdb::def_vector.
4880
4881 2018-05-25  Tom Tromey  <tom@tromey.com>
4882
4883         * frame.c (remove_prev_frame): Remove.
4884         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4885
4886 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4887
4888         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4889         Remove prototypes.
4890         * mips-linux-nat.c (supply_fpregset): Always call
4891         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4892         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4893         `mips_fill_fpregset'.
4894         * mips-linux-tdep.c (mips_supply_fpregset)
4895         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4896         (mips_fill_fpregset_wrapper): Remove functions.
4897         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4898         (mips_linux_fpregset): Remove variable.
4899         (mips_linux_iterate_over_regset_sections): Use
4900         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4901         (mips_linux_o32_sigframe_init): Remove comment.
4902
4903 2018-05-25  Pedro Alves  <palves@redhat.com>
4904
4905         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4906         (struct readahead_cache, struct packet_reg, struct
4907         remote_arch_state, class remote_state): Move higher up in the
4908         file.
4909         (remote_target::m_remote_state): Now an object instead of a pointer.
4910         (remote_target::get_remote_state): Adjust.
4911
4912 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4913
4914         * stack.c (select_and_print_frame): Delete.
4915         (struct function_bounds): Move struct within function.
4916         (func_command): Most content moved into new function
4917         find_frame_for_function, use new function, print result, add
4918         function comment.
4919         (find_frame_for_function): New function, now returns a result.
4920
4921 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4922
4923         * stack.c (iterate_over_block_arg_vars): Fix comment.
4924         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4925
4926 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4927
4928         PR gdb/23203
4929         * frame.c
4930         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4931         Define.
4932         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4933         Define.
4934         * frame.h (class scoped_restore_selected_frame): New class.
4935         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4936         of any exception, use scoped_restore_selected_frame to restore the
4937         frame instead.
4938
4939 2018-05-24  Pedro Alves  <palves@redhat.com>
4940
4941         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4942         override.
4943
4944 2018-05-23  Tom Tromey  <tom@tromey.com>
4945
4946         * complaints.c (struct complaints): Remove.
4947         (symfile_complaint_book): Remove.
4948         (series): New global.
4949         (complaint_internal): Update.
4950         (clear_complaints): Update.
4951
4952 2018-05-23  Tom Tromey  <tom@tromey.com>
4953
4954         * complaints.c (counters): New global.
4955         (struct complain): Remove.
4956         (struct complaints) <root>: Remove.
4957         (complaint_sentinel): Remove.
4958         (symfile_complaint_book): Update.
4959         (find_complaint) Remove.
4960         (complaint_internal, clear_complaints): Update.
4961
4962 2018-05-23  Tom Tromey  <tom@tromey.com>
4963
4964         * complaints.c (struct complain) <file, line>: Remove.
4965         (find_complaint): Remove file, line parameters.
4966         (complaint_internal): Update.
4967
4968 2018-05-23  Tom Tromey  <tom@tromey.com>
4969
4970         * complaints.c (vcomplaint): Remove.
4971         (complaint_internal) Merge in contents of vcomplaint.
4972
4973 2018-05-23  Tom Tromey  <tom@tromey.com>
4974
4975         * complaints.c (struct complaints) <explanation>: Remove.
4976         (symfile_explanations): Remove.
4977         (symfile_complaint_book): Update.
4978         (vcomplaint): Update.
4979         (struct explanation): Remove.
4980
4981 2018-05-23  Tom Tromey  <tom@tromey.com>
4982
4983         * complaints.c (symfile_complaints): Remove.
4984         (complaint_internal): Remove "complaints" parameter.
4985         (clear_complaints, vcomplaint): Remove "c" parameter.
4986         (get_complaints): Remove.
4987         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4988         (dwarf2_debug_line_missing_file_complaint)
4989         (dwarf2_debug_line_missing_end_sequence_complaint)
4990         (dwarf2_complex_location_expr_complaint)
4991         (dwarf2_const_value_length_mismatch_complaint)
4992         (dwarf2_section_buffer_overflow_complaint)
4993         (dwarf2_macro_malformed_definition_complaint)
4994         (dwarf2_invalid_attrib_class_complaint)
4995         (create_addrmap_from_index, dw2_symtab_iter_next)
4996         (dw2_expand_marked_cus)
4997         (dw2_debug_names_iterator::find_vec_in_debug_names)
4998         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4999         (create_debug_type_hash_table, init_cutu_and_read_dies)
5000         (partial_die_parent_scope, add_partial_enumeration)
5001         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5002         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5003         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5004         (create_cus_hash_table, create_dwp_hash_table)
5005         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5006         (dwarf2_rnglists_process, dwarf2_ranges_process)
5007         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5008         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5009         (handle_struct_member_die, process_structure_scope)
5010         (read_array_type, read_common_block, read_module_type)
5011         (read_tag_pointer_type, read_typedef, read_base_type)
5012         (read_subrange_type, load_partial_dies, partial_die_info::read)
5013         (partial_die_info::read, partial_die_info::read)
5014         (partial_die_info::read, read_checked_initial_length_and_offset)
5015         (dwarf2_string_attr, read_formatted_entries)
5016         (dwarf_decode_line_header)
5017         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5018         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5019         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5020         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5021         (get_signatured_type, get_DW_AT_signature_type)
5022         (decode_locdesc, file_file_name, consume_improper_spaces)
5023         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5024         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5025         (dwarf2_symbol_mark_computed, set_die_type)
5026         (read_attribute_value): Update.
5027         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5028         Update.
5029         * dbxread.c (unknown_symtype_complaint)
5030         (lbrac_mismatch_complaint, repeated_header_complaint)
5031         (set_namestring, function_outside_compilation_unit_complaint)
5032         (read_dbx_symtab, process_one_symbol): Update.
5033         * gdbtypes.c (stub_noname_complaint): Update.
5034         * windows-nat.c (handle_unload_dll): Update.
5035         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5036         (decode_base_type): Update.
5037         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5038         (eb_complaint, record_include_begin, record_include_end)
5039         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5040         (process_xcoff_symbol, read_symbol)
5041         (function_outside_compilation_unit_complaint)
5042         (scan_xcoff_symtab): Update.
5043         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5044         * buildsym.c (finish_block_internal, make_blockvector)
5045         (end_symtab_get_static_block, augment_type_symtab): Update.
5046         * dtrace-probe.c (dtrace_process_dof)
5047         (dtrace_static_probe_ops::get_probes): Update.
5048         * complaints.h (struct complaint): Don't declare.
5049         (symfile_complaints): Remove.
5050         (complaint_internal): Remove "complaints" parameter.
5051         (complaint): Likewise.
5052         (clear_complaints): Likewise.
5053         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5054         (reread_symbols): Update.
5055         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5056         (dwarf2_frame_cache, decode_frame_entry): Update.
5057         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5058         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5059         (info_selectors_command): Update.
5060         * macrotab.c (macro_include, check_for_redefinition)
5061         (macro_undef): Update.
5062         * objfiles.c (filter_overlapping_sections): Update.
5063         * stabsread.c (invalid_cpp_abbrev_complaint)
5064         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5065         (define_symbol, error_type, read_type, rs6000_builtin_type)
5066         (stabs_method_name_from_physname, read_member_functions)
5067         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5068         (attach_fields_to_type, complain_about_struct_wipeout)
5069         (read_range_type, read_args, common_block_start)
5070         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5071         Update.
5072         * mdebugread.c (index_complaint, unknown_ext_complaint)
5073         (basic_type_complaint, bad_tag_guess_complaint)
5074         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5075         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5076         (parse_procedure, parse_lines)
5077         (function_outside_compilation_unit_complaint)
5078         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5079         (bad_tag_guess_complaint, reg_value_complaint): Update.
5080         * cp-support.c (demangled_name_complaint): Update.
5081         * macroscope.c (sal_macro_scope): Update.
5082         * dwarf-index-write.c (class debug_names): Update.
5083
5084 2018-05-23  Tom Tromey  <tom@tromey.com>
5085
5086         * complaints.c (clear_complaints): Remove "noisy" parameter.
5087         * complaints.h (clear_complaints): Update.
5088         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5089         (reread_symbols): Update.
5090
5091 2018-05-23  Tom Tromey  <tom@tromey.com>
5092
5093         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5094         SUBSEQUENT_MESSAGE.
5095         (vcomplaint, clear_complaints): Update.
5096         (symfile_explanations): Remove some messages.
5097
5098 2018-05-23  Tom Tromey  <tom@tromey.com>
5099
5100         * complaints.c (internal_complaint): Remove.
5101         * complaints.h (internal_complaint): Remove.
5102
5103 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5104
5105         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5106
5107 2018-05-22  Pedro Alves  <palves@redhat.com>
5108
5109         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5110         (remote_fileio_badfd, remote_fileio_return_errno)
5111         (remote_fileio_return_success, remote_fileio_func_open)
5112         (remote_fileio_func_open, remote_fileio_func_close)
5113         (remote_fileio_func_read, remote_fileio_func_write)
5114         (remote_fileio_func_lseek, remote_fileio_func_rename)
5115         (remote_fileio_func_unlink, remote_fileio_func_stat)
5116         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5117         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5118         remote_target parameter.
5119         (remote_fio_func_map) <func>: Add remote_target parameter.
5120         (do_remote_fileio_request, remote_fileio_request):
5121         * remote-fileio.h (remote_fileio_request):
5122         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5123         remote_target parameter.
5124         (remote_notif_process, handle_notification): Adjust to pass down
5125         the remote.
5126         (remote_notif_state_allocate): Add remote_target parameter.  Save
5127         it.
5128         * remote-notif.h (struct remote_target): Forward declare.
5129         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5130         remote_target parameter.
5131         (struct remote_notif_state) <remote>: New field.
5132         (remote_notif_ack, remote_notif_parse): Add remote_target
5133         parameter.
5134         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5135         remote_target parameter.
5136         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5137         (threads_listing_context, rmt_thread_action, protocol_feature)
5138         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5139         (packet_result, struct threads_listing_context, remote_state):
5140         Move definitions and declarations higher up.
5141         (remote_target) <~remote_target>: Declare.
5142         (remote_download_command_source, remote_file_put, remote_file_get)
5143         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5144         (remote_hostio_pread_vFile, remote_hostio_send_command)
5145         (remote_hostio_set_filesystem, remote_hostio_open)
5146         (remote_hostio_close, remote_hostio_unlink, remote_state)
5147         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5148         (get_memory_write_packet_size, get_memory_read_packet_size)
5149         (append_pending_thread_resumptions, remote_detach_1)
5150         (append_resumption, remote_resume_with_vcont)
5151         (add_current_inferior_and_thread, wait_ns, wait_as)
5152         (process_stop_reply, remote_notice_new_inferior)
5153         (process_initial_stop_replies, remote_add_thread)
5154         (btrace_sync_conf, remote_btrace_maybe_reopen)
5155         (remove_new_fork_children, kill_new_fork_children)
5156         (discard_pending_stop_replies, stop_reply_queue_length)
5157         (check_pending_events_prevent_wildcard_vcont)
5158         (discard_pending_stop_replies_in_queue, stop_reply)
5159         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5160         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5161         (remote_interrupt_as, remote_interrupt_ns)
5162         (remote_get_noisy_reply, remote_query_attached)
5163         (remote_add_inferior, remote_current_thread, get_current_thread)
5164         (set_thread, set_general_thread, set_continue_thread)
5165         (set_general_process, write_ptid)
5166         (remote_unpack_thread_info_response, remote_get_threadinfo)
5167         (parse_threadlist_response, remote_get_threadlist)
5168         (remote_threadlist_iterator, remote_get_threads_with_ql)
5169         (remote_get_threads_with_qxfer)
5170         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5171         (get_offsets, remote_check_symbols, remote_supported_packet)
5172         (remote_query_supported, remote_packet_size)
5173         (remote_serial_quit_handler, remote_detach_pid)
5174         (remote_vcont_probe, remote_resume_with_hc)
5175         (send_interrupt_sequence, interrupt_query)
5176         (remote_notif_get_pending_events, fetch_register_using_p)
5177         (send_g_packet, process_g_packet, fetch_registers_using_g)
5178         (store_register_using_P, store_registers_using_G)
5179         (set_remote_traceframe, check_binary_download)
5180         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5181         (remote_xfer_live_readonly_partial, remote_read_bytes)
5182         (remote_send_printf, remote_flash_write, readchar)
5183         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5184         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5185         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5186         (extended_remote_disable_randomization, extended_remote_run)
5187         (send_environment_packet, extended_remote_environment_support)
5188         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5189         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5190         (packet_command): Now methods of ...
5191         (remote_target): ... this class.
5192         (m_remote_state) <remote_target>: New field.
5193         (struct remote_state) <stop_reply_queue,
5194         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5195         fields.
5196         (remote_state::remote_state): Allocate stop_reply_queue.
5197         (remote_state): Delete global.
5198         (get_remote_state_raw): Delete.
5199         (remote_target::get_remote_state): Allocate m_remote_state on
5200         demand.
5201         (get_current_remote_target): New.
5202         (remote_ops, extended_remote_ops): Delete.
5203         (wait_forever_enabled_p, remote_async_inferior_event_token):
5204         Delete, moved to struct remote_state.
5205         (remote_target::close): Delete self.  Destruction bits split to
5206         ...
5207         (remote_target::~remote_target): ... this.
5208         (show_memory_packet_size): Adjust to use
5209         get_current_remote_target.
5210         (struct protocol_feature) <func>: Add remote_target parameter.
5211         All callers adjusted.
5212         (curr_quit_handler_target): New.
5213         (remote_serial_quit_handler): Reimplement.
5214         (remote_target::open_1): Adjust to use get_current_remote_target.
5215         Heap-allocate remote_target/extended_remote_target instances.
5216         (vcont_builder::vcont_builder): Add remote_target parameter, and
5217         save it in m_remote.  All callers adjusted.
5218         (vcont_builder::m_remote): New field.
5219         (vcont_builder::restart, vcont_builder::flush)
5220         (vcont_builder::push_action): Use it.
5221         (remote_target::commit_resume): Use it.
5222         (struct queue_iter_param) <remote>: New field.
5223         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5224         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5225         (check_pending_event_prevents_wildcard_vcont_callback)
5226         (remote_target::check_pending_events_prevent_wildcard_vcont)
5227         (remote_target::discard_pending_stop_replies)
5228         (remote_target::discard_pending_stop_replies_in_queue)
5229         (remote_target::remote_notif_remove_queued_reply): Fill in
5230         'remote' field.
5231         (remote_notif_get_pending_events): New.
5232         (remote_target::readchar, remote_target::remote_serial_write):
5233         Save/restore curr_quit_handler_target.
5234         (putpkt): New.
5235         (kill_new_fork_children): Fill in 'remote' field.
5236         (packet_command): Use get_current_remote_target, defer to
5237         remote_target method of same name.
5238         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5239         parameter, and save it in m_remote.  All callers adjusted.
5240         (scoped_remote_fd::release): Use m_remote.
5241         (scoped_remote_fd::m_remote): New field.
5242         (remote_file_put, remote_file_get, remote_file_delete): Use
5243         get_current_remote_target, defer to remote_target method of same
5244         name.
5245         (remote_btrace_reset): Add remote_state paremeter.  Update all
5246         callers.
5247         (remote_async_inferior_event_handler). Pass down 'data'.
5248         (remote_new_objfile): Use get_current_remote_target.
5249         (remote_target::vcont_r_supported): New.
5250         (set_range_stepping): Use get_current_remote_target and
5251         remote_target::vcont_r_supported.
5252         (_initialize_remote): Don't allocate 'remote_state' and
5253         'stop_reply_queue' globals.
5254         * remote.h (struct remote_target): Forward declare.
5255         (getpkt, putpkt, remote_notif_get_pending_events): Add
5256         'remote_target' parameter.
5257
5258 2018-05-22  Pedro Alves  <palves@redhat.com>
5259
5260         * remote.c (vcont_builder): Now a class.  Make all data members
5261         private.
5262         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5263         Declare methods.
5264         (vcont_builder_restart): Rename to ...
5265         (vcont_builder::restart): ... this.
5266         (vcont_builder_flush): Rename to ...
5267         (vcont_builder::flush): ... this.
5268         (vcont_builder_push_action): Rename to ...
5269         (vcont_builder::push_action): ... this.
5270         (remote_target::commit_resume): Adjust.
5271
5272 2018-05-22  Pedro Alves  <palves@redhat.com>
5273
5274         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5275         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5276         (get_fixed_memory_packet_size): New.
5277         (get_memory_packet_size): Use it.
5278         (set_memory_packet_size): Don't override the config size with
5279         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5280         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5281         Don't refer to get_memory_packet_size if not connected to a remote
5282         target.  Show "(default)" if configured size is 0.
5283
5284 2018-05-22  Pedro Alves  <palves@redhat.com>
5285
5286         * remote.c (remote_target::mourn_inferior): Move
5287         discard_pending_stop_replies call here from ...
5288         (_initialize_remote): ... here.
5289
5290 2018-05-22  Pedro Alves  <palves@redhat.com>
5291
5292         * remote.c (compare_section_command): Remove set_general_process
5293         call.
5294
5295 2018-05-22  Pedro Alves  <palves@redhat.com>
5296
5297         * remote.c (struct packet_reg, struct remote_arch_state):
5298         Move higher up in the file.
5299         (remote_state) <m_arch_states>: Store remote_arch_state values
5300         instead of remote_arch_state pointers.
5301         (remote_state::get_remote_arch_state): Adjust.
5302
5303 2018-05-22  Pedro Alves  <palves@redhat.com>
5304
5305         * remote.c: Include <unordered_map>.
5306         (remote_state): Now a class.
5307         (remote_state) <get_remote_arch_state>: Declare method.
5308         <get_remote_arch_state>: New field.
5309         (remote_arch_state) <remote_arch_state>: Declare ctor.
5310         <regs>: Now a unique_ptr.
5311         (remote_gdbarch_data_handle): Delete.
5312         (get_remote_arch_state): Delete.
5313         (remote_state::get_remote_arch_state): New.
5314         (get_remote_state): Adjust to call remote_state's
5315         get_remote_arch_state method.
5316         (init_remote_state): Delete, bits factored out to ...
5317         (remote_arch_state::remote_arch_state): ... this new method.
5318         (get_remote_packet_size, get_memory_packet_size)
5319         (process_g_packet, remote_target::fetch_registers)
5320         (remote_target::prepare_to_store, store_registers_using_G)
5321         (remote_target::store_registers, remote_target::get_trace_status):
5322         Adjust to call remote_state's method.
5323         (_initialize_remote): Remove reference to
5324         remote_gdbarch_data_handle.
5325
5326 2018-05-22  Pedro Alves  <palves@redhat.com>
5327
5328         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5329         pread>: New method declarations.
5330         (remote_target::open_1): Adjust.
5331         (readahead_cache_invalidate): Rename to ...
5332         (readahead_cache::invalidate): ... this, and adjust to be a class
5333         method.
5334         (readahead_cache_invalidate_fd): Rename to ...
5335         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5336         class method.
5337         (remote_hostio_pwrite): Adjust.
5338         (remote_hostio_pread_from_cache): Rename to ...
5339         (readahead_cache::pread): ... this, and adjust to be a class
5340         method.
5341         (remote_hostio_close): Adjust.
5342
5343 2018-05-22  Pedro Alves  <palves@redhat.com>
5344
5345         * remote.c (remote_hostio_close_cleanup): Delete.
5346         (class scoped_remote_fd): New.
5347         (remote_file_put, remote_file_get): Use it.
5348
5349 2018-05-22  Pedro Alves  <palves@redhat.com>
5350
5351         (struct vCont_action_support): Use bool and initialize all fields.
5352         (struct readahead_cache): Initialize all fields.
5353         (remote_state): Use bool and initialize all fields.
5354         (remote_state::remote_state, remote_state::~remote_state): New.
5355         (new_remote_state): Delete.
5356         (_initialize_remote): Use new to allocate remote_state.
5357
5358 2018-05-22  Pedro Alves  <palves@redhat.com>
5359             張俊芝  <zjz@zjz.name>
5360
5361         PR gdb/22973
5362         * c-exp.y: Include "c-support.h".
5363         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5364         of tolower.  Use c_ident_is_alpha to scan names.
5365         * c-lang.c: Include "c-support.h".
5366         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5367         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5368         * c-support.h: New file, with bits factored out from ...
5369         * cp-name-parser.y: ... this file.
5370         Include "c-support.h".
5371         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5372         c-support.h and renamed.
5373         (symbol_end, yylex): Adjust.
5374
5375 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5376
5377         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5378         parameter type to CORE_ADDR.
5379         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5380         parameter type in declaration to CORE_ADDR.
5381         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5382         target_auxv_search to get AT_HWCAP and use the result to get the
5383         target description.
5384         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5385         to CORE_ADDR. Remove the cast of the return value to unsigned
5386         long. Fix error predicate of target_auxv_search.
5387         (ppc_linux_nat_target::read_description): Change the type of the
5388         hwcap variable to CORE_ADDR.
5389
5390 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5391
5392         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5393         if the size of fpscr is larger than 32 bits.
5394
5395 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5396
5397         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5398         (ppc32_linux_vsxregmap): New global.
5399         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5400         regcache_supply_regset, and regcache_collect_regset.
5401         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5402         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5403         (fetch_vsx_register, store_vsx_register): Remove.
5404         (fetch_vsx_registers): Add regno parameter. Get regset using
5405         ppc_linux_vsxregset. Use regset to supply registers.
5406         (store_vsx_registers): Add regno parameter. Get regset using
5407         ppc_linux_vsxregset. Use regset to collect registers.
5408         (fetch_register): Call fetch_vsx_registers instead of
5409         fetch_vsx_register.
5410         (store_register): Call store_vsx_registers instead of
5411         store_vsx_register.
5412         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5413         new regno parameter.
5414         (store_ppc_registers): Call store_vsx_registers with -1 for the
5415         new regno parameter.
5416         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5417         (ppc_collect_vsxregset): Remove.
5418
5419 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5420
5421         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5422         offset fields.
5423         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5424         for vector register offset fields.
5425         (ppc64_fbsd_reg_offsets): Likewise.
5426         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5427         to vector register offset fields.
5428         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5429         to vector register offset fields.
5430         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5431         vector register offset fields.
5432         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5433         initializers for vector register offset fields.
5434         (rs6000_aix64_reg_offsets): Likewise.
5435         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5436         (ppc_supply_vrregset): Remove.
5437         (ppc_collect_vrregset): Remove.
5438         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5439         (ppc_linux_vrregset) : New function.
5440         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5441         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5442         (ppc32_linux_vrregset): Remove.
5443         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5444         and use result instead of ppc32_linux_vrregset.
5445         (ppc32_linux_reg_offsets): Remove initializers for vector register
5446         offset fields.
5447         (ppc64_linux_reg_offsets): Likewise.
5448         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5449         * ppc-linux-nat.c: Include regset.h.
5450         (gdb_vrregset_t): Adjust comment to account for little-endian
5451         mode.
5452         (supply_vrregset, fill_vrregset): Remove.
5453         (fetch_altivec_register, store_altivec_register): Remove.
5454         (fetch_altivec_registers): Add regno parameter. Get regset using
5455         ppc_linux_vrregset. Use regset to supply registers.
5456         (store_altivec_registers): Add regno parameter. Get regset using
5457         ppc_linux_vrregset. Use regset to collect registers.
5458         (fetch_register): Call fetch_altivec_registers instead of
5459         fetch_altivec_register.
5460         (store_register): Call store_altivec_registers instead of
5461         store_altivec_register.
5462         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5463         the new regno parameter.
5464         (store_ppc_registers): Call store_altivec_registers with -1 for
5465         the new regno parameter.
5466
5467 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5468
5469         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5470         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5471         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5472         (gdb_vrregset_t): Change array type size to
5473         PPC_LINUX_SIZEOF_VRREGSET.
5474         (gdb_vsxregset_t): Change array type size to
5475         PPC_LINUX_SIZEOF_VSXREGSET.
5476         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5477         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5478         PPC_LINUX_SIZEOF_VSXREGSET.
5479
5480 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5481
5482         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5483         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5484         nat/ppc-linux.c.
5485         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5486         ppc_linux_target_wordsize with tid.
5487         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5488         wordsize with tid.
5489         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5490         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5491         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5492         tid parameter. Remove static specifier.
5493         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5494         (ppc_linux_target_wordsize): New declaration.
5495
5496 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5497
5498         * arch/ppc-linux-common.c: New file.
5499         * arch/ppc-linux-common.h: New file.
5500         * arch/ppc-linux-tdesc.h: New file.
5501         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5502         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5503         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5504         arch/ppc-linux-tdesc.h.
5505         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5506         arch/ppc-linux-tdesc.h.
5507         (ppc_linux_nat_target::read_description): Remove target
5508         description matching code. Fill a ppc_linux_features struct and
5509         call ppc_linux_match_description with it. Move comment about ISA
5510         2.05 to ppc-linux-common.c.
5511         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5512         arch/ppc-linux-tdesc.h.
5513         (ppc_linux_core_read_description): Remove target description
5514         matching code. Fill a ppc_linux_features struct and call
5515         ppc_linux_match_description with it.
5516         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5517         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5518         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5519         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5520         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5521         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5522         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5523         (tdesc_powerpc_e500l): Remove.
5524
5525 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5526
5527         * ada-lang.c (catch_assert_command): Pass empty string instead
5528         of NULL for excep_string argument.
5529
5530 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5531
5532         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5533         the width of the requested register exceeds the width of the
5534         `ptrace' data type.
5535
5536 2018-05-21  Tom Tromey  <tom@tromey.com>
5537
5538         * printcmd.c (output_command): Remove.
5539         (output_command_const): Rename to output_command.
5540         * valprint.h (output_command): Rename from output_command_const.
5541         * tracepoint.c (trace_dump_actions): Call output_command.
5542
5543 2018-05-21  Tom Tromey  <tom@tromey.com>
5544
5545         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5546         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5547         * ada-lang.h (create_ada_exception_catchpoint): Update.
5548         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5549         std::string.
5550         (create_excep_cond_exprs, ~ada_catchpoint)
5551         (should_stop_exception, print_one_exception)
5552         (print_mention_exception, print_recreate_exception): Update.
5553         (ada_get_next_arg): Remove.
5554         (catch_ada_exception_command_split): Use std::string.  Change type
5555         of "excep_string", "cond_string".
5556         (catch_ada_exception_command): Update.
5557         (create_ada_exception_catchpoint): Change type of excep_string.
5558         (ada_exception_sal): Remove excep_string parameter.
5559         (~ada_catchpoint): Remove.
5560
5561 2018-05-21  Tom Tromey  <tom@tromey.com>
5562
5563         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5564         cleanup.
5565
5566 2018-05-21  Tom Tromey  <tom@tromey.com>
5567
5568         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5569         Return unique_xmalloc_ptr.
5570         (print_it_exception): Update.
5571
5572 2018-05-21  Tom Tromey  <tom@tromey.com>
5573
5574         * tracepoint.c (trace_dump_actions): Use std::string.
5575
5576 2018-05-21  Tom Tromey  <tom@tromey.com>
5577
5578         * symfile.c (reread_symbols): Use std::string for original_name.
5579
5580 2018-05-21  Tom Tromey  <tom@tromey.com>
5581
5582         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5583         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5584         constructor.
5585
5586 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5587
5588         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5589         instance to...
5590         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5591         * objfiles.c (get_objfile_bfd_data): Allocate
5592         objfile_per_bfd_storage with obstack_new when allocating on
5593         obstack.
5594
5595 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5596
5597         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5598         OBSTACK_ZALLOC.
5599         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5600         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5601         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5602         (add_pending): Likewise.
5603         (parse_symbol): Likewise.
5604         (parse_partial_symbols): Likewise.
5605         (psymtab_to_symtab_1): Likewise.
5606         (new_psymtab): Likewise.
5607         (elfmdebug_build_psymtabs): Likewise.
5608         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5609         * objfiles.c (get_objfile_bfd_data): Likewise.
5610         (objfile_register_static_link): Likewise.
5611         * psymtab.c (allocate_psymtab): Likewise.
5612         * stabsread.c (read_member_functions): Likewise.
5613         * xcoffread.c (xcoff_end_psymtab): Likewise.
5614
5615 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5616
5617         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5618         compiler supports std::is_trivially_constructible.
5619         * common/poison.h: Include obstack.h.
5620         (IsMallocable): Define to is_trivially_constructible if the
5621         compiler supports it, define to true_type otherwise.
5622         (xobnew): New.
5623         (XOBNEW): Redefine.
5624         (xobnewvec): New.
5625         (XOBNEWVEC): Redefine.
5626         * gdb_obstack.h (obstack_zalloc): New.
5627         (OBSTACK_ZALLOC): Redefine.
5628         (obstack_calloc): New.
5629         (OBSTACK_CALLOC): Redefine.
5630         (obstack_new): New.
5631         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5632         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5633         gdbarch.c.
5634         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5635         obstack_calloc/obstack_zalloc.
5636         (gdbarch_obstack_zalloc): Remove.
5637         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5638
5639 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5640
5641         * stack.c (backtrace_command_1): Remove useless variable int i.
5642
5643 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5644
5645         * stack.c (print_frame_info): Fix comment.
5646
5647 2018-05-18  Tom Tromey  <tom@tromey.com>
5648
5649         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5650         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5651         (~dwarf2_per_objfile): Update
5652         (dwarf2_get_dwz_file): Use new.
5653         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5654         unique_ptr.
5655
5656 2018-05-18  Tom Tromey  <tom@tromey.com>
5657
5658         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5659         unique_ptr.
5660         * dwarf2read.c (struct dwp_file): Add constructor and
5661         initializers.
5662         (open_and_init_dwp_file): Return a unique_ptr.
5663         (dwarf2_per_objfile, create_dwp_hash_table)
5664         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5665         (lookup_dwo_unit_in_dwp): Update.
5666         (open_and_init_dwp_file, get_dwp_file): Update.
5667
5668 2018-05-18  Tom Tromey  <tom@tromey.com>
5669
5670         * dwarf2read.c (dwarf2_per_objfile): Update.
5671         (struct mapped_index): Add initializers.
5672         (dwarf2_read_index): Use new.
5673         (dw2_symtab_iter_init): Update.
5674         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5675         unique_ptr.
5676
5677 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5678
5679         * dwarf2read.c (mapped_index) <total_size>: Remove.
5680
5681 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5682
5683         * unittests/format_pieces-selftests.c (test_format_specifier):
5684         Add ARI comments.
5685
5686 2018-05-18  Tom Tromey  <tom@tromey.com>
5687
5688         * c-typeprint.c (maybe_print_hole): New function.
5689         (c_print_type_struct_field_offset): Update.
5690         (c_type_print_base_struct_union): Call maybe_print_hole.
5691
5692 2018-05-17  Keith Seitz  <keiths@redhat.com>
5693
5694         * breakpoint.c (build_bpstat_chain): New function, moved from
5695         bpstat_stop_status.
5696         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5697         If no stop chain is passed, call build_bpstat_chain to build it.
5698         * breakpoint.h (build_bpstat_chain): Declare.
5699         (bpstat_stop_status): Move documentation here from breakpoint.c.
5700         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5701         build the stop chain and pass it to skip_inline_frames.
5702         Pass this stop chain to bpstat_stop_status.
5703         * inline-frame.c: Include breakpoint.h.
5704         (stopped_by_user_bp_inline_frame): New function.
5705         (skip_inline_frames): Add parameter `stop_chain'.
5706         Move documention to inline-frame.h.
5707         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5708         whether the frame should be elided.
5709         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5710         Add moved documentation and update for new parameter.
5711
5712 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5713
5714         PR cli/14975
5715         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5716         unittests/format_pieces-selftests.c.
5717         * common/format.h (format_piece) <operator==>: New.
5718         (format_pieces) <operator[]>: Remove.
5719         * common/format.c (format_pieces::format_pieces): Handle \e.
5720         * unittests/format_pieces-selftests.c: New.
5721
5722 2018-05-17  Tom Tromey  <tom@tromey.com>
5723
5724         PR symtab/23010:
5725         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5726         (dw2_instantiate_symtab): Add skip_partial parameter.
5727         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5728         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5729         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5730         (dw2_expand_symtabs_matching_one)
5731         (dw2_find_pc_sect_compunit_symtab)
5732         (dw2_debug_names_lookup_symbol)
5733         (dw2_debug_names_expand_symtabs_for_function): Update.
5734         (init_cutu_and_read_dies): Add skip_partial parameter.
5735         (process_psymtab_comp_unit, build_type_psymtabs_1)
5736         (process_skeletonless_type_unit, load_partial_comp_unit)
5737         (psymtab_to_symtab_1): Update.
5738         (load_full_comp_unit): Add skip_partial parameter.
5739         (process_imported_unit_die, dwarf2_read_addr_index)
5740         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5741         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5742         (read_signatured_type): Update.
5743
5744 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5745
5746         * value.c (release_value): Remove unused variable.
5747         (record_latest_value): Likewise.
5748         (access_value_history): Likewise.
5749         (preserve_values): Likewise.
5750
5751 2018-05-17  Tom Tromey  <tom@tromey.com>
5752
5753         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5754         Initialize.
5755
5756 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5757
5758         PR gdb/22286
5759         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5760         Also handle registers whose width is not a multiple of
5761         PTRACE_TYPE_RET.
5762         (linux_nat_trad_target::store_register): Likewise.
5763
5764 2018-05-16  Tom Tromey  <tom@tromey.com>
5765
5766         * gdbcore.h (core_bfd): Redefine.
5767         * corelow.c (core_target::close): Update.
5768         (core_target_open): Update.
5769         * progspace.h (struct program_space) <cbfd>: Now a
5770         gdb_bfd_ref_ptr.
5771
5772 2018-05-16  Tom Tromey  <tom@tromey.com>
5773
5774         PR cli/19551:
5775         * symfile-add-flags.h (enum symfile_add_flags)
5776         <SYMFILE_NOT_FILENAME>: New constant.
5777         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5778         objfile name from BFD.
5779         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5780         * minidebug.c (find_separate_debug_file_in_section): Put
5781         ".gnu_debugdata" into BFD's file name.
5782
5783 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5784
5785         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5786         Remove.
5787
5788 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5789
5790         PR binutils/21446
5791         * aarch64-tdep.c (aarch64_analyze_prologue,
5792         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5793         Indicate not interested in errors.
5794
5795 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5796
5797         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5798         Supply the MIPS_ZERO_REGNUM register.
5799
5800 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5801
5802         * mips-tdep.c (mask_address_var): Make variable static.
5803
5804 2018-05-14  Tom Tromey  <tom@tromey.com>
5805
5806         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5807
5808 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5809
5810         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5811         FXSAVE_ADDR for the mxcsr register.
5812
5813 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5814
5815         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5816
5817 2018-05-11  Pedro Alves  <palves@redhat.com>
5818
5819         * corelow.c (core_target) <core_target>: No longer inline.
5820         Initialize m_core_gdbarch, m_core_vec and build the section table
5821         here.
5822         <~core_target>: New.
5823         <core_gdbarch, get_core_register_section>: New methods.
5824         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5825         factored out from ...
5826         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5827         (core_ops): Delete.
5828         (sniff_core_bfd): Add gdbarch parameter.
5829         (core_close): Delete, merged into ...
5830         (core_target::close): ... here.  Delete self.
5831         (core_close_cleanup): Delete.
5832         (core_target_open): Allocate a core_target on the heap.  Use a
5833         unique_ptr instead of a cleanup.  Bits moved into the core_target
5834         ctor.  Adjust to use core_target methods instead of globals.
5835         (get_core_register_section): Rename to ...
5836         (core_target::get_core_register_section): ... this and adjust.
5837         (struct get_core_registers_cb_data): New.
5838         (get_core_registers_cb): Use it.  Use bool.
5839         (core_target::fetch_registers, core_target::files_info)
5840         (core_target::xfer_partial, core_target::read_description)
5841         (core_target::pid_to, core_target::thread_name): Adjust to
5842         reference class fields instead of globals.
5843         * target.h (struct target_ops_deleter, target_ops_up): New.
5844
5845 2018-05-11  Pedro Alves  <palves@redhat.com>
5846
5847         * corefile.c (core_file_command): Move to corelow.c.
5848         * corelow.c (the_core_target): Delete.
5849         (core_file_command): Moved from corefile.c.  Check exec_bfd
5850         instead of the_core_target.  Use target_detach instead of calling
5851         into the_core_target directly.
5852         (maybe_say_no_core_file_now): New.
5853         (core_target::detach): Use it.
5854         (_initialize_corelow): Remove references to the_core_target.
5855         * gdbcore.h (the_core_target): Delete.
5856
5857 2018-05-11  Tom Tromey  <tromey@redhat.com>
5858             Pedro Alves  <palves@redhat.com>
5859
5860         * corefile.c (core_bfd): Remove.
5861         * gdbcore.h (core_bfd): Now a macro.
5862         * progspace.h (struct program_space) <cbfd>: New field.
5863
5864 2018-05-11  Tom Tromey  <tom@tromey.com>
5865
5866         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5867         gdb::def_vector.
5868
5869 2018-05-10  Tom Tromey  <tom@tromey.com>
5870
5871         * configure: Rebuild.
5872         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5873
5874 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5875
5876         PR server/23158:
5877         * regformats/regdat.sh: Adjust script, following the addition
5878         of the new expedite_regs parameter to init_target_desc.
5879
5880 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5881     
5882         PR gdb/23127
5883         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5884         set_gdbarch_significant_addr_bit.
5885         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5886         set_gdbarch_significant_addr_bit.
5887         * utils.c (address_significant): Update to sign extend addr.
5888
5889 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5890
5891         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5892         (xtensa_linux_init_abi): Limit tdep->num_regs by
5893         tdep->num_nopriv_regs.
5894         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5895         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5896         not initialized.
5897
5898 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5899
5900         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5901
5902 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5903
5904         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5905         (I387_MXCSR_INIT_VAL): New constant.
5906         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5907         buffer if it was supplied by the inferior.
5908         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5909         (i387_xsave_get_clear_bv): New function.
5910         (i387_supply_xsave): Only read x87 control registers from the
5911         xsave buffer if the feature is enabled, and the state will have
5912         been written, otherwise, provide a suitable default.
5913         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5914         including x87 control registers.  Update control registers if they
5915         have changed from the default value, and mark features as enabled
5916         as required.
5917         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5918
5919 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5920
5921         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5922
5923 2018-05-07  Tom Tromey  <tom@tromey.com>
5924
5925         * configure: Rebuild.
5926         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5927
5928 2018-05-07  Tom Tromey  <tom@tromey.com>
5929
5930         PR tdep/20362:
5931         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5932         bit.  Use correct value for VDIV.
5933
5934 2018-05-04  Tom Tromey  <tom@tromey.com>
5935
5936         * configure: Rebuild.
5937         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5938
5939 2018-05-04  Tom Tromey  <tom@tromey.com>
5940
5941         * linux-record.c (record_linux_system_call) <case
5942         RECORD_SYS_RECVFROM>: Add "break".
5943
5944 2018-05-04  Tom Tromey  <tom@tromey.com>
5945
5946         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5947         Add missing "break".
5948         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5949         Add missing "break".
5950
5951 2018-05-04  Tom Tromey  <tom@tromey.com>
5952
5953         * rs6000-tdep.c (ppc_process_record_op4)
5954         (ppc_process_record_op63): Add fall-through comment.
5955
5956 2018-05-04  Tom Tromey  <tom@tromey.com>
5957
5958         * i386-tdep.c (i386_process_record): Add fall-through comment.
5959
5960 2018-05-04  Tom Tromey  <tom@tromey.com>
5961
5962         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5963         comment.
5964
5965 2018-05-04  Tom Tromey  <tom@tromey.com>
5966
5967         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5968         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5969         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5970         comment.
5971         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5972         comment.
5973         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5974         comment.
5975
5976 2018-05-04  Tom Tromey  <tom@tromey.com>
5977
5978         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5979
5980 2018-05-04  Tom Tromey  <tom@tromey.com>
5981
5982         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5983         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5984         * symfile.c (section_is_mapped): Fix fall-through comment.
5985         * stabsread.c (define_symbol, read_member_functions): Fix
5986         fall-through comment.
5987         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5988         comment.
5989         * remote.c (remote_wait_as): Fix fall-through comment.
5990         * p-exp.y (yylex): Fix fall-through comment.
5991         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5992         comment.
5993         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5994         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5995         * jv-exp.y (yylex): Fix fall-through comment.
5996         * go-exp.y (lex_one_token): Fix fall-through comment.
5997         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5998         fall-through comment.
5999         * f-exp.y (yylex): Fix fall-through comment.
6000         * dwarf2read.c (process_die): Fix fall-through comments.
6001         * dbxread.c (process_one_symbol): Fix fall-through comment.
6002         * d-exp.y (lex_one_token): Fix fall-through comment.
6003         * cp-name-parser.y (yylex): Fix fall-through comment.
6004         * coffread.c (coff_symtab_read): Fix fall-through comment.
6005         * c-exp.y (lex_one_token): Fix fall-through comment.
6006         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6007         comment.
6008         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6009         comment.
6010
6011 2018-05-04  Tom Tromey  <tom@tromey.com>
6012
6013         PR python/22730:
6014         * NEWS: Mention gdb.execute change.
6015         * gdbcmd.h (execute_control_command): Don't declare.
6016         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6017         execute_control_commands, execute_control_commands_to_string.
6018         * cli/cli-script.h (execute_control_commands)
6019         (execute_control_commands_to_string): Declare.
6020         (execute_control_command): Add from_tty parameter.
6021         * cli/cli-script.c (execute_control_commands)
6022         (execute_control_commands_to_string): New functions.
6023         (execute_user_command): Use execute_control_commands.
6024         (execute_control_command_1): Add "from_tty" parameter.  Update.
6025         (execute_control_command): Likewise.
6026
6027 2018-05-04  Tom Tromey  <tom@tromey.com>
6028
6029         PR python/22731:
6030         * NEWS: Mention that breakpoint commands are writable.
6031         * python/py-breakpoint.c (bppy_set_commands): New function.
6032         (breakpoint_object_getset) <"commands">: Use it.
6033
6034 2018-05-04  Tom Tromey  <tom@tromey.com>
6035
6036         * tracepoint.c (actions_command): Update.
6037         * mi/mi-cmd-break.c (mi_command_line_array)
6038         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6039         (mi_read_next_line): Remove.
6040         (mi_cmd_break_commands): Update.
6041         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6042         function_view.
6043         * cli/cli-script.c (get_command_line): Update.
6044         (process_next_line): Use function_view.  Constify.
6045         (recurse_read_control_structure, read_command_lines)
6046         (read_command_lines_1): Change argument types to function_view.
6047         (do_define_command, document_command): Update.
6048         * breakpoint.h (check_tracepoint_command): Don't declare.
6049         * breakpoint.c (check_tracepoint_command): Remove.
6050         (commands_command_1, create_tracepoint_from_upload): Update.
6051
6052 2018-05-04  Tom Tromey  <tom@tromey.com>
6053
6054         PR gdb/11750:
6055         * cli/cli-script.h (enum command_control_type) <define_control>:
6056         New constant.
6057         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6058         (build_command_line, execute_control_command_1)
6059         (process_next_line): Likewise.
6060         (do_define_command): New function, extracted from define_command.
6061         (define_command): Use it.
6062
6063 2018-05-04  Tom Tromey  <tom@tromey.com>
6064
6065         * tracepoint.c (actions_command): Update.
6066         * cli/cli-script.h (read_command_lines): Update.
6067         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6068         (MAX_TMPBUF): Remove define.
6069         (define_command): Use string_printf.
6070         (document_command): Likewise.
6071         * breakpoint.c (commands_command_1): Update.
6072
6073 2018-05-04  Tom Tromey  <tom@tromey.com>
6074
6075         * top.c (execute_command): Update.
6076         * cli/cli-script.h (print_command_lines): Now varargs.
6077         * cli/cli-script.c (print_command_lines): Now varargs.
6078         (execute_control_command_1) <case while_control, case if_control>:
6079         Update.
6080
6081 2018-05-04  Tom Tromey  <tom@tromey.com>
6082
6083         * tracepoint.c (all_tracepoint_actions): Rename from
6084         all_tracepoint_actions_and_cleanup.  Change return type.
6085         (actions_command, encode_actions_1, encode_actions)
6086         (trace_dump_actions, tdump_command): Update.
6087         * remote.c (remote_download_command_source): Update.
6088         * python/python.c (gdbpy_eval_from_control_command)
6089         (python_command, python_interactive_command): Update.
6090         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6091         * guile/guile.c (guile_command)
6092         (gdbscm_eval_from_control_command, guile_command): Update.
6093         * compile/compile.c (compile_code_command)
6094         (compile_print_command, compile_to_object): Update.
6095         * cli/cli-script.h (struct command_lines_deleter): New.
6096         (counted_command_line): New typedef.
6097         (struct command_line): Add constructor, destructor.
6098         <body_list>: Remove.
6099         <body_list_0, body_list_1>: New members.
6100         (command_line_up): Remove typedef.
6101         (read_command_lines, read_command_lines_1, get_command_line):
6102         Update.
6103         (copy_command_lines): Don't declare.
6104         * cli/cli-script.c (build_command_line): Use "new".
6105         (get_command_line): Return counted_command_line.
6106         (print_command_lines, execute_user_command)
6107         (execute_control_command_1, while_command, if_command): Update.
6108         (realloc_body_list): Remove.
6109         (process_next_line, recurse_read_control_structure): Update.
6110         (read_command_lines, read_command_lines_1): Return counted_command_line.
6111         (free_command_lines): Use "delete".
6112         (copy_command_lines): Remove.
6113         (define_command, document_command, show_user_1): Update.
6114         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6115         a counted_command_line.
6116         * breakpoint.h (counted_command_line): Remove typedef.
6117         (breakpoint_set_commands): Update.
6118         * breakpoint.c (check_no_tracepoint_commands)
6119         (validate_commands_for_breakpoint): Update.
6120         (breakpoint_set_commands): Change commands to be a
6121         counted_command_line.
6122         (commands_command_1, update_dprintf_command_list)
6123         (create_tracepoint_from_upload): Update.
6124
6125 2018-05-04  Tom Tromey  <tom@tromey.com>
6126
6127         * cli/cli-decode.h (cmd_list_element): New constructor.
6128         (~cmd_list_element): New destructor.
6129         (struct cmd_list_element): Add initializers.
6130         * cli/cli-decode.c (do_add_cmd): Use "new".
6131         (delete_cmd): Use "delete".
6132
6133 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6134             Pedro Alves <palves@redhat.com>
6135
6136         PR breakpoints/19806 and support for PR external/20207.
6137         * NEWS: Mention Aarch64 watchpoint improvements.
6138         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6139         watchpoints and PR external/20207 watchpoints.
6140         * nat/aarch64-linux-hw-point.c
6141         (kernel_supports_any_contiguous_range): New.
6142         (aarch64_watchpoint_offset): New.
6143         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6144         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6145         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6146         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6147         next_addr_orig_p.  Support PR external/20207 watchpoints.
6148         (aarch64_downgrade_regs): New.
6149         (aarch64_dr_state_insert_one_point): New parameters offset and
6150         addr_orig.
6151         (aarch64_dr_state_remove_one_point): Likewise.
6152         (aarch64_handle_breakpoint): Update caller.
6153         (aarch64_handle_aligned_watchpoint): Likewise.
6154         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6155         aligned_offset.
6156         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6157         aarch64_downgrade_regs.
6158         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6159         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6160         (DR_CONTROL_MASK): ... this.
6161         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6162         (unsigned int aarch64_watchpoint_offset): New prototype.
6163         (aarch64_linux_set_debug_regs): Remove const from state.
6164         * utils.c (align_up, align_down): Move to ...
6165         * common/common-utils.c (align_up, align_down): ... here.
6166         * utils.h (align_up, align_down): Move to ...
6167         * common/common-utils.h (align_up, align_down): ... here.
6168
6169 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6170
6171         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6172         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6173         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6174         Re-implement to match the ABI as summarized in GCC's
6175         gcc/config/sparc/sparc.c.  All callers updated.
6176         (sparc32_store_arguments): Remove assertion.
6177
6178 2018-05-04  Tom Tromey  <tom@tromey.com>
6179
6180         * printcmd.c: Don't include tui.h.
6181         (decode_format): Use skip_spaces.
6182
6183 2018-05-04  Tom Tromey  <tom@tromey.com>
6184
6185         PR gdb/22619:
6186         * printcmd.c (last_count): New global.
6187         (x_command): Use saved count when repeating.
6188
6189 2018-05-04  Tom Tromey  <tom@tromey.com>
6190
6191         * nto-procfs.c (do_closedir_cleanup): Remove.
6192         (procfs_pidlist): Use gdb_dir_up.
6193         * procfs.c (do_closedir_cleanup): Remove.
6194         (proc_update_threads): Use gdb_dir_up.
6195         * common/filestuff.h (struct gdb_dir_deleter): New.
6196         (gdb_dir_up): New typedef.
6197
6198 2018-05-04  Tom Tromey  <tom@tromey.com>
6199
6200         * ada-lang.c (print_mention_exception): Use std::string.
6201
6202 2018-05-04  Tom Tromey  <tom@tromey.com>
6203
6204         * ada-lang.c (create_excep_cond_exprs): Update.
6205         (ada_exception_catchpoint_cond_string): Use std::string.
6206
6207 2018-05-04  Tom Tromey  <tom@tromey.com>
6208
6209         * ada-lang.c (xget_renaming_scope): Return std::string.
6210         (old_renaming_is_invisible): Update.
6211
6212 2018-05-04  Tom Tromey  <tom@tromey.com>
6213
6214         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6215         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6216
6217 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6218
6219         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6220
6221 2018-05-04  Tom Tromey  <tom@tromey.com>
6222
6223         * remote.c (remote_query_supported_append): Change type.
6224         (remote_check_symbols): Update.
6225
6226 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6227
6228         PR gdb/11420
6229         * configure.ac: Prepend libpython.
6230         * python/python-config.py: Likewise.
6231         * configure: Regenerate.
6232
6233 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6234
6235         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6236
6237 2018-05-03  Pedro Alves  <palves@redhat.com>
6238
6239         * s390-linux-nat.c
6240         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6241         override.  Write 'true' instead of '1'.
6242         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6243         declaration.
6244
6245 2018-05-02  Pedro Alves  <palves@redhat.com>
6246
6247         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6248         add_inf_child_target.
6249         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6250         add_inf_child_target.
6251         * aix-thread.c (aix_thread_target_info): New.
6252         (aix_thread_target) <shortname, longname, doc>: Delete.
6253         <info>: New.
6254         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6255         add_inf_child_target.
6256         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6257         add_inf_child_target.
6258         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6259         add_inf_child_target.
6260         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6261         add_inf_child_target.
6262         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6263         add_inf_child_target.
6264         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6265         add_inf_child_target.
6266         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6267         add_inf_child_target.
6268         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6269         add_inf_child_target.
6270         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6271         add_inf_child_target.
6272         * bfd-target.c (target_bfd_target_info): New.
6273         (target_bfd) <shortname, longname, doc>: Delete.
6274         <info>: New.
6275         * bsd-kvm.c (bsd_kvm_target_info): New.
6276         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6277         <info>: New.
6278         (bsd_kvm_target::open): Rename to ...
6279         (bsd_kvm_target_open): ... this.  Adjust.
6280         * bsd-uthread.c (bsd_uthread_target_info): New.
6281         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6282         <info>: New.
6283         * corefile.c (core_file_command): Adjust.
6284         * corelow.c (core_target_info): New.
6285         (core_target) <shortname, longname, doc>: Delete.
6286         <info>: New.
6287         (core_target::open): Rename to ...
6288         (core_target_open): ... this.  Adjust.
6289         * ctf.c (ctf_target_info): New.
6290         (ctf_target) <shortname, longname, doc>: Delete.
6291         <info>: New.
6292         (ctf_target::open): Rename to ...
6293         (ctf_target_open): ... this.
6294         (_initialize_ctf): Adjust.
6295         * exec.c (exec_target_info): New.
6296         (exec_target) <shortname, longname, doc>: Delete.
6297         <info>: New.
6298         (exec_target::open): Rename to ...
6299         (exec_target_open): ... this.
6300         * gdbcore.h (core_target_open): Declare.
6301         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6302         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6303         add_inf_child_target.
6304         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6305         add_inf_child_target.
6306         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6307         add_inf_child_target.
6308         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6309         add_inf_child_target.
6310         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6311         add_inf_child_target.
6312         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6313         add_inf_child_target.
6314         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6315         add_inf_child_target.
6316         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6317         add_inf_child_target.
6318         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6319         add_inf_child_target.
6320         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6321         add_inf_child_target.
6322         * inf-child.c (inf_child_target_info): New.
6323         (inf_child_target::info): New.
6324         (inf_child_open_target): Remove 'target' parameter.  Use
6325         get_native_target instead.
6326         (inf_child_target::open): Delete.
6327         (add_inf_child_target): New.
6328         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6329         Delete.
6330         <info>: New.
6331         (add_inf_child_target): Declare.
6332         (inf_child_open_target): Declare.
6333         * linux-thread-db.c (thread_db_target_info): New.
6334         (thread_db_target) <shortname, longname, doc>: Delete.
6335         <info>: New.
6336         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6337         add_inf_child_target.
6338         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6339         add_inf_child_target.
6340         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6341         add_inf_child_target.
6342         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6343         add_inf_child_target.
6344         * make-target-delegates (print_class): Adjust.
6345         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6346         add_inf_child_target.
6347         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6348         add_inf_child_target.
6349         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6350         add_inf_child_target.
6351         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6352         add_inf_child_target.
6353         * nto-procfs.c (nto_native_target_info): New.
6354         (nto_procfs_target_native) <shortname, longname, doc>:
6355         Delete.
6356         <info>: New.
6357         (nto_procfs_target_info): New.
6358         (nto_procfs_target_procfs) <shortname, longname, doc>:
6359         Delete.
6360         <info>: New.
6361         (init_procfs_targets): Adjust.
6362         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6363         add_inf_child_target.
6364         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6365         add_inf_child_target.
6366         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6367         add_inf_child_target.
6368         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6369         add_inf_child_target.
6370         * ravenscar-thread.c (ravenscar_target_info): New.
6371         (ravenscar_thread_target) <shortname, longname, doc>:
6372         Delete.
6373         <info>: New.
6374         * record-btrace.c (record_btrace_target_info):
6375         (record_btrace_target) <shortname, longname, doc>: Delete.
6376         <info>: New.
6377         (record_btrace_target::open): Rename to ...
6378         (record_btrace_target_open): ... this.  Adjust.
6379         * record-full.c (record_longname, record_doc): New.
6380         (record_full_base_target) <shortname, longname, doc>: Delete.
6381         <info>: New.
6382         (record_full_target_info): New.
6383         (record_full_target): <shortname>: Delete.
6384         <info>: New.
6385         (record_full_core_open_1, record_full_open_1): Update comments.
6386         (record_full_base_target::open): Rename to ...
6387         (record_full_open): ... this.
6388         (cmd_record_full_restore): Update.
6389         (_initialize_record_full): Update.
6390         * remote-sim.c (remote_sim_target_info): New.
6391         (gdbsim_target) <shortname, longname, doc>: Delete.
6392         <info>: New.
6393         (gdbsim_target::open): Rename to ...
6394         (gdbsim_target_open): ... this.
6395         (_initialize_remote_sim): Adjust.
6396         * remote.c (remote_doc): New.
6397         (remote_target_info): New.
6398         (remote_target) <shortname, longname, doc>: Delete.
6399         <info>: New.
6400         (extended_remote_target_info): New.
6401         (extended_remote_target) <shortname, longname, doc>: Delete.
6402         <info>: New.
6403         (remote_target::open_1): Make static.  Adjust.
6404         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6405         * s390-linux-nat.c (_initialize_s390_nat): Use
6406         add_inf_child_target.
6407         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6408         add_inf_child_target.
6409         * sol-thread.c (thread_db_target_info): New.
6410         (sol_thread_target) <shortname, longname, doc>: Delete.
6411         <info>: New.
6412         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6413         add_inf_child_target.
6414         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6415         add_inf_child_target.
6416         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6417         add_inf_child_target.
6418         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6419         add_inf_child_target.
6420         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6421         add_inf_child_target.
6422         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6423         add_inf_child_target.
6424         * spu-linux-nat.c (_initialize_spu_nat): Use
6425         add_inf_child_target.
6426         * spu-multiarch.c (spu_multiarch_target_info): New.
6427         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6428         <info>: New.
6429         * target-delegates.c: Regenerate.
6430         * target.c: Include <unordered_map>.
6431         (target_ops_p): Delete.
6432         (DEF_VEC_P(target_ops_p)): Delete.
6433         (target_factories): New.
6434         (test_target_info): New.
6435         (test_target_ops::info): New.
6436         (open_target): Adjust to use target_factories.
6437         (add_target_with_completer): Rename to ...
6438         (add_target): ... this.  Change prototype.  Register target_info
6439         and open callback in target_factories.  Register target_info in
6440         command context instead of target_ops.
6441         (add_target): Delete old implementation.
6442         (add_deprecated_target_alias): Change prototype.  Adjust.
6443         (the_native_target): New.
6444         (set_native_target, get_native_target): New.
6445         (find_default_run_target): Use the_native_target.
6446         (find_attach_target, find_run_target): Simplify.
6447         (target_ops::open): Delete.
6448         (dummy_target_info): New.
6449         (dummy_target::shortname, dummy_target::longname)
6450         (dummy_target::doc): Delete.
6451         (dummy_target::info): New.
6452         (debug_target::shortname, debug_target::longname)
6453         (debug_target::doc): Delete.
6454         (debug_target::info): New.
6455         * target.h (struct target_info): New.
6456         (target_ops::~target_ops): Add comment.
6457         (target_ops::info): New.
6458         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6459         longer virtual.  Implement in terms of target_info.
6460         (set_native_target, get_native_target): Declare.
6461         (target_open_ftype): New.
6462         (add_target, add_target_with_completer)
6463         (add_deprecated_target_alias): Change prototype.
6464         (test_target) <shortname, longname, doc>: Delete.
6465         <info>: New.
6466         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6467         add_inf_child_target.
6468         * tracefile-tfile.c (tfile_target_info): New.
6469         (tfile_target) <shortname, longname, doc>: Delete.
6470         <info>: New.
6471         (tfile_target::open): Rename to ...
6472         (tfile_target_open): ... this.
6473         (_initialize_tracefile_tfile): Adjust.
6474         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6475         add_inf_child_target.
6476         * windows-nat.c (_initialize_windows_nat): Use
6477         add_inf_child_target.
6478         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6479         add_inf_child_target.
6480
6481 2018-05-02  Pedro Alves  <palves@redhat.com>
6482
6483         * linux-nat.h (linux_nat_target) <low_new_thread,
6484         low_delete_thread, low_new_fork, low_forget_process,
6485         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6486         New virtual methods.
6487         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6488         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6489         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6490         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6491         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6492         Delete.
6493         * linux-fork.c (delete_fork): Adjust to call low method.
6494         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6495         (linux_nat_new_fork, linux_nat_forget_process_hook)
6496         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6497         (linux_nat_status_is_event):
6498         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6499         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6500         to call low method.
6501         (sigtrap_is_event): Rename to ...
6502         (linux_nat_target::low_status_is_event): ... this.
6503         (linux_nat_set_status_is_event): Delete.
6504         (save_stop_reason, linux_nat_wait_1)
6505         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6506         low methods.
6507         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6508         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6509         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6510         (linux_nat_set_prepare_to_resume): Delete.
6511         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6512         low virtual methods.
6513         * amd64-linux-nat.c: Likewise.
6514         * arm-linux-nat.c: Likewise.
6515         * i386-linux-nat.c: Likewise.
6516         * ia64-linux-nat.c: Likewise.
6517         * mips-linux-nat.c: Likewise.
6518         * ppc-linux-nat.c: Likewise.
6519         * s390-linux-nat.c: Likewise.
6520         * sparc64-linux-nat.c: Likewise.
6521         * x86-linux-nat.c: Likewise.
6522         * x86-linux-nat.h: Include "nat/x86-linux.h".
6523         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6524         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6525         Override methods.
6526
6527 2018-05-02  Pedro Alves  <palves@redhat.com>
6528
6529         * target.h (target_ops)
6530         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6531         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6532         stopped_by_watchpoint, have_continuable_watchpoint,
6533         stopped_data_address, watchpoint_addr_within_range,
6534         can_accel_watchpoint_condition, can_run, thread_alive,
6535         has_all_memory, has_memory, has_stack, has_registers,
6536         has_execution, can_async_p, is_async_p, supports_non_stop,
6537         always_non_stop_p, can_execute_reverse, supports_multi_process,
6538         supports_enable_disable_tracepoint,
6539         supports_disable_randomization, supports_string_tracing,
6540         supports_evaluation_of_breakpoint_conditions,
6541         can_run_breakpoint_commands, filesystem_is_local,
6542         can_download_tracepoint, get_trace_state_variable_value,
6543         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6544         record_is_replaying, record_will_replay,
6545         augmented_libraries_svr4_read>: Adjust to return bool.
6546         * aarch64-linux-nat.c: All implementations adjusted.
6547         * aix-thread.c: All implementations adjusted.
6548         * arm-linux-nat.c: All implementations adjusted.
6549         * breakpoint.c: All implementations adjusted.
6550         * bsd-kvm.c: All implementations adjusted.
6551         * bsd-uthread.c: All implementations adjusted.
6552         * corelow.c: All implementations adjusted.
6553         * ctf.c: All implementations adjusted.
6554         * darwin-nat.c: All implementations adjusted.
6555         * darwin-nat.h: All implementations adjusted.
6556         * exec.c: All implementations adjusted.
6557         * fbsd-nat.c: All implementations adjusted.
6558         * fbsd-nat.h: All implementations adjusted.
6559         * gnu-nat.c: All implementations adjusted.
6560         * gnu-nat.h: All implementations adjusted.
6561         * go32-nat.c: All implementations adjusted.
6562         * ia64-linux-nat.c: All implementations adjusted.
6563         * inf-child.c: All implementations adjusted.
6564         * inf-child.h: All implementations adjusted.
6565         * inf-ptrace.c: All implementations adjusted.
6566         * inf-ptrace.h: All implementations adjusted.
6567         * linux-nat.c: All implementations adjusted.
6568         * linux-nat.h: All implementations adjusted.
6569         * mips-linux-nat.c: All implementations adjusted.
6570         * nto-procfs.c: All implementations adjusted.
6571         * ppc-linux-nat.c: All implementations adjusted.
6572         * procfs.c: All implementations adjusted.
6573         * ravenscar-thread.c: All implementations adjusted.
6574         * record-btrace.c: All implementations adjusted.
6575         * record-full.c: All implementations adjusted.
6576         * remote-sim.c: All implementations adjusted.
6577         * remote.c: All implementations adjusted.
6578         * s390-linux-nat.c: All implementations adjusted.
6579         * sol-thread.c: All implementations adjusted.
6580         * spu-multiarch.c: All implementations adjusted.
6581         * target-delegates.c: All implementations adjusted.
6582         * target.c: All implementations adjusted.
6583         * target.h: All implementations adjusted.
6584         * tracefile-tfile.c: All implementations adjusted.
6585         * tracefile.c: All implementations adjusted.
6586         * tracefile.h: All implementations adjusted.
6587         * windows-nat.c: All implementations adjusted.
6588         * x86-linux-nat.h: All implementations adjusted.
6589         * x86-nat.h: All implementations adjusted.
6590
6591 2018-05-02  Pedro Alves  <palves@redhat.com>
6592
6593         * make-target-delegates (scan_target_h): Don't trim lines here.
6594         Replace sequences of tabs and/or whitespace with a single
6595         whitespace.
6596         (top level, parsing methods): Trim each line before processing it
6597         here.
6598
6599 2018-05-02  Pedro Alves  <palves@redhat.com>
6600             John Baldwin  <jhb@freebsd.org>
6601
6602         * target.h (enum strata) <debug_stratum>: New.
6603         (struct target_ops) <all delegation methods>: Replace by C++
6604         virtual methods, and drop "to_" prefix.  All references updated
6605         throughout.
6606         <to_shortname, to_longname, to_doc, to_data,
6607         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6608         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6609         virtual methods.  All references updated throughout.
6610         <can_attach, supports_terminal_ours, can_create_inferior,
6611         get_thread_control_capabilities, attach_no_wait>: New
6612         virtual methods.
6613         <insert_breakpoint, remove_breakpoint>: Now
6614         TARGET_DEFAULT_NORETURN methods.
6615         <info_proc>: Now returns bool.
6616         <to_magic>: Delete.
6617         (OPS_MAGIC): Delete.
6618         (current_target): Delete.  All references replaced by references
6619         to ...
6620         (target_stack): ... this.  New.
6621         (target_shortname, target_longname): Adjust.
6622         (target_can_run): Now a function declaration.
6623         (default_child_has_all_memory, default_child_has_memory)
6624         (default_child_has_stack, default_child_has_registers)
6625         (default_child_has_execution): Remove target_ops parameter.
6626         (complete_target_initialization): Delete.
6627         (memory_breakpoint_target): New template class.
6628         (test_target_ops): Refactor as a C++ class with virtual methods.
6629         * make-target-delegates (NAME_PART): Tighten.
6630         (POINTER_PART, CP_SYMBOL): New.
6631         (SIMPLE_RETURN_PART): Reimplement.
6632         (VEC_RETURN_PART): Expect less.
6633         (RETURN_PART, VIRTUAL_PART): New.
6634         (METHOD): Adjust to C++ virtual methods.
6635         (scan_target_h): Remove reference to C99.
6636         (dname): Output "target_ops::" prefix.
6637         (write_function_header): Adjust to output a C++ class method.
6638         (write_declaration): New.
6639         (write_delegator): Adjust to output a C++ class method.
6640         (tdname): Output "dummy_target::" prefix.
6641         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6642         method.
6643         (tdefault_names, debug_names): Delete.
6644         (return_types, tdefaults, styles, argtypes_array): New.
6645         (top level): All methods are delegators.
6646         (print_class): New.
6647         (top level): Print dummy_target and debug_target classes.
6648         * target-delegates.c: Regenerate.
6649         * target-debug.h (target_debug_print_enum_info_proc_what)
6650         (target_debug_print_thread_control_capabilities)
6651         (target_debug_print_thread_info_p): New.
6652         * target.c (dummy_target): Delete.
6653         (the_dummy_target, the_debug_target): New.
6654         (target_stack): Now extern.
6655         (set_targetdebug): Push/unpush debug target.
6656         (default_child_has_all_memory, default_child_has_memory)
6657         (default_child_has_stack, default_child_has_registers)
6658         (default_child_has_execution): Remove target_ops parameter.
6659         (complete_target_initialization): Delete.
6660         (add_target_with_completer): No longer call
6661         complete_target_initialization.
6662         (target_supports_terminal_ours): Use regular delegation.
6663         (update_current_target): Delete.
6664         (push_target): No longer check magic number.  Don't call
6665         update_current_target.
6666         (unpush_target): Don't call update_current_target.
6667         (target_is_pushed): No longer check magic number.
6668         (target_require_runnable): Skip for all stratums over
6669         process_stratum.
6670         (target_ops::info_proc): New.
6671         (target_info_proc): Use find_target_at and
6672         find_default_run_target.
6673         (target_supports_disable_randomization): Use regular delegation.
6674         (target_get_osdata): Use find_target_at.
6675         (target_ops::open, target_ops::close, target_ops::can_attach)
6676         (target_ops::attach, target_ops::can_create_inferior)
6677         (target_ops::create_inferior, target_ops::can_run)
6678         (target_can_run): New.
6679         (default_fileio_target): Use regular delegation.
6680         (target_ops::fileio_open, target_ops::fileio_pwrite)
6681         (target_ops::fileio_pread, target_ops::fileio_fstat)
6682         (target_ops::fileio_close, target_ops::fileio_unlink)
6683         (target_ops::fileio_readlink): New.
6684         (target_fileio_open_1, target_fileio_unlink)
6685         (target_fileio_readlink): Always call the target method.  Handle
6686         FILEIO_ENOSYS.
6687         (return_zero, return_zero_has_execution): Delete.
6688         (init_dummy_target): Delete.
6689         (dummy_target::dummy_target, dummy_target::shortname)
6690         (dummy_target::longname, dummy_target::doc)
6691         (debug_target::debug_target, debug_target::shortname)
6692         (debug_target::longname, debug_target::doc): New.
6693         (target_supports_delete_record): Use regular delegation.
6694         (setup_target_debug): Delete.
6695         (maintenance_print_target_stack): Skip debug_stratum.
6696         (initialize_targets): Instantiate the_dummy_target and
6697         the_debug_target.
6698         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6699         use target_stack.
6700         (target_auxv_search, fprint_target_auxv): Adjust.
6701         (info_auxv_command): Adjust to use target_stack.
6702         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6703         * exceptions.c (print_flush): Handle a NULL target_stack.
6704         * regcache.c (target_ops_no_register): Refactor as class with
6705         virtual methods.
6706
6707         * exec.c (exec_target): New class.
6708         (exec_ops): Now an exec_target.
6709         (exec_open, exec_close_1, exec_get_section_table)
6710         (exec_xfer_partial, exec_files_info, exec_has_memory)
6711         (exec_make_note_section): Refactor as exec_target methods.
6712         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6713         Delete.
6714         (exec_target::find_memory_regions): New.
6715         (_initialize_exec): Don't call init_exec_ops.
6716         * gdbcore.h (exec_file_clear): Delete.
6717
6718         * corefile.c (core_target): Delete.
6719         (core_file_command): Adjust.
6720         * corelow.c (core_target): New class.
6721         (the_core_target): New.
6722         (core_close): Remove target_ops parameter.
6723         (core_close_cleanup): Adjust.
6724         (core_target::close): New.
6725         (core_open, core_detach, get_core_registers, core_files_info)
6726         (core_xfer_partial, core_thread_alive, core_read_description)
6727         (core_pid_to_str, core_thread_name, core_has_memory)
6728         (core_has_stack, core_has_registers, core_info_proc): Rework as
6729         core_target methods.
6730         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6731         (_initialize_corelow): Initialize the_core_target.
6732         * gdbcore.h (core_target): Delete.
6733         (the_core_target): New.
6734
6735         * ctf.c: (ctf_target): New class.
6736         (ctf_ops): Now a ctf_target.
6737         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6738         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6739         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6740         methods.
6741         (init_ctf_ops): Delete.
6742         (_initialize_ctf): Don't call it.
6743         * tracefile-tfile.c (tfile_target): New class.
6744         (tfile_ops): Now a tfile_target.
6745         (tfile_open, tfile_close, tfile_files_info)
6746         (tfile_get_tracepoint_status, tfile_trace_find)
6747         (tfile_fetch_registers, tfile_xfer_partial)
6748         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6749         Refactor as tfile_target methods.
6750         (tfile_xfer_partial_features): Remove target_ops parameter.
6751         (init_tfile_ops): Delete.
6752         (_initialize_tracefile_tfile): Don't call it.
6753         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6754         (tracefile_has_stack, tracefile_has_registers)
6755         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6756         tracefile_target methods.
6757         (init_tracefile_ops): Delete.
6758         (tracefile_target::tracefile_target): New.
6759         * tracefile.h: Include "target.h".
6760         (tracefile_target): New class.
6761         (init_tracefile_ops): Delete.
6762
6763         * spu-multiarch.c (spu_multiarch_target): New class.
6764         (spu_ops): Now a spu_multiarch_target.
6765         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6766         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6767         (spu_search_memory, spu_mourn_inferior): Refactor as
6768         spu_multiarch_target methods.
6769         (init_spu_ops): Delete.
6770         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6771         complete_target_initialization.
6772
6773         * ravenscar-thread.c (ravenscar_thread_target): New class.
6774         (ravenscar_ops): Now a ravenscar_thread_target.
6775         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6776         (ravenscar_thread_alive, ravenscar_pid_to_str)
6777         (ravenscar_fetch_registers, ravenscar_store_registers)
6778         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6779         (ravenscar_stopped_by_hw_breakpoint)
6780         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6781         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6782         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6783         methods.
6784         (init_ravenscar_thread_ops): Delete.
6785         (_initialize_ravenscar): Remove references to
6786         init_ravenscar_thread_ops and complete_target_initialization.
6787
6788         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6789         (bsd_uthread_target): New class.
6790         (bsd_uthread_ops): Now a bsd_uthread_target.
6791         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6792         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6793         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6794         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6795         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6796         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6797         (bsd_uthread_target): Delete function.
6798         (_initialize_bsd_uthread): Remove reference to
6799         complete_target_initialization.
6800
6801         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6802         (target_bfd): ... this new class.
6803         (target_bfd_xfer_partial, target_bfd_get_section_table)
6804         (target_bfd_close): Refactor as target_bfd methods.
6805         (target_bfd::~target_bfd): New.
6806         (target_bfd_reopen): Adjust.
6807         (target_bfd::close): New.
6808
6809         * record-btrace.c (record_btrace_target): New class.
6810         (record_btrace_ops): Now a record_btrace_target.
6811         (record_btrace_open, record_btrace_stop_recording)
6812         (record_btrace_disconnect, record_btrace_close)
6813         (record_btrace_async, record_btrace_info)
6814         (record_btrace_insn_history, record_btrace_insn_history_range)
6815         (record_btrace_insn_history_from, record_btrace_call_history)
6816         (record_btrace_call_history_range)
6817         (record_btrace_call_history_from, record_btrace_record_method)
6818         (record_btrace_is_replaying, record_btrace_will_replay)
6819         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6820         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6821         (record_btrace_store_registers, record_btrace_prepare_to_store)
6822         (record_btrace_to_get_unwinder)
6823         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6824         (record_btrace_commit_resume, record_btrace_wait)
6825         (record_btrace_stop, record_btrace_can_execute_reverse)
6826         (record_btrace_stopped_by_sw_breakpoint)
6827         (record_btrace_supports_stopped_by_sw_breakpoint)
6828         (record_btrace_stopped_by_hw_breakpoint)
6829         (record_btrace_supports_stopped_by_hw_breakpoint)
6830         (record_btrace_update_thread_list, record_btrace_thread_alive)
6831         (record_btrace_goto_begin, record_btrace_goto_end)
6832         (record_btrace_goto, record_btrace_stop_replaying_all)
6833         (record_btrace_execution_direction)
6834         (record_btrace_prepare_to_generate_core)
6835         (record_btrace_done_generating_core): Refactor as
6836         record_btrace_target methods.
6837         (init_record_btrace_ops): Delete.
6838         (_initialize_record_btrace): Remove reference to
6839         init_record_btrace_ops.
6840         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6841         the execution_direction global.
6842         (record_full_base_target, record_full_target)
6843         (record_full_core_target): New classes.
6844         (record_full_ops): Now a record_full_target.
6845         (record_full_core_ops): Now a record_full_core_target.
6846         (record_full_target::detach, record_full_target::disconnect)
6847         (record_full_core_target::disconnect)
6848         (record_full_target::mourn_inferior, record_full_target::kill):
6849         New.
6850         (record_full_open, record_full_close, record_full_async): Refactor
6851         as methods of the record_full_base_target class.
6852         (record_full_resume, record_full_commit_resume): Refactor
6853         as methods of the record_full_target class.
6854         (record_full_wait, record_full_stopped_by_watchpoint)
6855         (record_full_stopped_data_address)
6856         (record_full_stopped_by_sw_breakpoint)
6857         (record_full_supports_stopped_by_sw_breakpoint)
6858         (record_full_stopped_by_hw_breakpoint)
6859         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6860         methods of the record_full_base_target class.
6861         (record_full_store_registers, record_full_xfer_partial)
6862         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6863         Refactor as methods of the record_full_target class.
6864         (record_full_can_execute_reverse, record_full_get_bookmark)
6865         (record_full_goto_bookmark, record_full_execution_direction)
6866         (record_full_record_method, record_full_info, record_full_delete)
6867         (record_full_is_replaying, record_full_will_replay)
6868         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6869         (record_full_stop_replaying): Refactor as methods of the
6870         record_full_base_target class.
6871         (record_full_core_resume, record_full_core_kill)
6872         (record_full_core_fetch_registers)
6873         (record_full_core_prepare_to_store)
6874         (record_full_core_store_registers, record_full_core_xfer_partial)
6875         (record_full_core_insert_breakpoint)
6876         (record_full_core_remove_breakpoint)
6877         (record_full_core_has_execution): Refactor
6878         as methods of the record_full_core_target class.
6879         (record_full_base_target::supports_delete_record): New.
6880         (init_record_full_ops): Delete.
6881         (init_record_full_core_ops): Delete.
6882         (record_full_save): Refactor as method of the
6883         record_full_base_target class.
6884         (_initialize_record_full): Remove references to
6885         init_record_full_ops and init_record_full_core_ops.
6886
6887         * remote.c (remote_target, extended_remote_target): New classes.
6888         (remote_ops): Now a remote_target.
6889         (extended_remote_ops): Now an extended_remote_target.
6890         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6891         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6892         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6893         (remote_pass_signals, remote_set_syscall_catchpoint)
6894         (remote_program_signals, )
6895         (remote_thread_always_alive): Remove target_ops parameter.
6896         (remote_thread_alive, remote_thread_name)
6897         (remote_update_thread_list, remote_threads_extra_info)
6898         (remote_static_tracepoint_marker_at)
6899         (remote_static_tracepoint_markers_by_strid)
6900         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6901         (remote_open): Refactor as methods of remote_target.
6902         (extended_remote_open, extended_remote_detach)
6903         (extended_remote_attach, extended_remote_post_attach):
6904         (extended_remote_supports_disable_randomization)
6905         (extended_remote_create_inferior): : Refactor as method of
6906         extended_remote_target.
6907         (remote_set_permissions, remote_open_1, remote_detach)
6908         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6909         (remote_resume, remote_commit_resume, remote_stop)
6910         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6911         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6912         (remote_prepare_to_store, remote_store_registers)
6913         (remote_flash_erase, remote_flash_done, remote_files_info)
6914         (remote_kill, remote_mourn, remote_insert_breakpoint)
6915         (remote_remove_breakpoint, remote_insert_watchpoint)
6916         (remote_watchpoint_addr_within_range)
6917         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6918         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6919         (remote_supports_stopped_by_sw_breakpoint)
6920         (remote_stopped_by_hw_breakpoint)
6921         (remote_supports_stopped_by_hw_breakpoint)
6922         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6923         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6924         (remote_verify_memory): Refactor as methods of remote_target.
6925         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6926         parameter.
6927         (remote_xfer_partial, remote_get_memory_xfer_limit)
6928         (remote_search_memory, remote_rcmd, remote_memory_map)
6929         (remote_pid_to_str, remote_get_thread_local_address)
6930         (remote_get_tib_address, remote_read_description): Refactor as
6931         methods of remote_target.
6932         (remote_target::fileio_open, remote_target::fileio_pwrite)
6933         (remote_target::fileio_pread, remote_target::fileio_close): New.
6934         (remote_hostio_readlink, remote_hostio_fstat)
6935         (remote_filesystem_is_local, remote_can_execute_reverse)
6936         (remote_supports_non_stop, remote_supports_disable_randomization)
6937         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6938         (remote_supports_enable_disable_tracepoint)
6939         (remote_supports_string_tracing)
6940         (remote_can_run_breakpoint_commands, remote_trace_init)
6941         (remote_download_tracepoint, remote_can_download_tracepoint)
6942         (remote_download_trace_state_variable, remote_enable_tracepoint)
6943         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6944         (remote_trace_start, remote_get_trace_status)
6945         (remote_get_tracepoint_status, remote_trace_stop)
6946         (remote_trace_find, remote_get_trace_state_variable_value)
6947         (remote_save_trace_data, remote_get_raw_trace_data)
6948         (remote_set_disconnected_tracing, remote_core_of_thread)
6949         (remote_set_circular_trace_buffer, remote_traceframe_info)
6950         (remote_get_min_fast_tracepoint_insn_len)
6951         (remote_set_trace_buffer_size, remote_set_trace_notes)
6952         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6953         (remote_disable_btrace, remote_teardown_btrace)
6954         (remote_read_btrace, remote_btrace_conf)
6955         (remote_augmented_libraries_svr4_read, remote_load)
6956         (remote_pid_to_exec_file, remote_can_do_single_step)
6957         (remote_execution_direction, remote_thread_handle_to_thread_info):
6958         Refactor as methods of remote_target.
6959         (init_remote_ops, init_extended_remote_ops): Delete.
6960         (remote_can_async_p, remote_is_async_p, remote_async)
6961         (remote_thread_events, remote_upload_tracepoints)
6962         (remote_upload_trace_state_variables): Refactor as methods of
6963         remote_target.
6964         (_initialize_remote): Remove references to init_remote_ops and
6965         init_extended_remote_ops.
6966
6967         * remote-sim.c (gdbsim_target): New class.
6968         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6969         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6970         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6971         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6972         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6973         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6974         Refactor as methods of gdbsim_target.
6975         (gdbsim_ops): Now a gdbsim_target.
6976         (init_gdbsim_ops): Delete.
6977         (gdbsim_cntrl_c): Adjust.
6978         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6979
6980         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6981         (the_amd64_linux_nat_target): New.
6982         (amd64_linux_fetch_inferior_registers)
6983         (amd64_linux_store_inferior_registers): Refactor as methods of
6984         amd64_linux_nat_target.
6985         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6986         * i386-linux-nat.c: Don't include "linux-nat.h".
6987         (i386_linux_nat_target): New class.
6988         (the_i386_linux_nat_target): New.
6989         (i386_linux_fetch_inferior_registers)
6990         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6991         as methods of i386_linux_nat_target.
6992         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6993         * inf-child.c (inf_child_ops): Delete.
6994         (inf_child_fetch_inferior_registers)
6995         (inf_child_store_inferior_registers): Delete.
6996         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6997         methods of inf_child_target.
6998         (inf_child_target::supports_terminal_ours)
6999         (inf_child_target::terminal_init)
7000         (inf_child_target::terminal_inferior)
7001         (inf_child_target::terminal_ours_for_output)
7002         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7003         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7004         New.
7005         (inf_child_open, inf_child_disconnect, inf_child_close)
7006         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7007         (inf_child_post_startup_inferior, inf_child_can_run)
7008         (inf_child_pid_to_exec_file): Refactor as methods of
7009         inf_child_target.
7010         (inf_child_follow_fork): Delete.
7011         (inf_child_target::can_create_inferior)
7012         (inf_child_target::can_attach): New.
7013         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7014         (inf_child_target::has_stack, inf_child_target::has_registers)
7015         (inf_child_target::has_execution): New.
7016         (inf_child_fileio_open, inf_child_fileio_pwrite)
7017         (inf_child_fileio_pread, inf_child_fileio_fstat)
7018         (inf_child_fileio_close, inf_child_fileio_unlink)
7019         (inf_child_fileio_readlink, inf_child_use_agent)
7020         (inf_child_can_use_agent): Refactor as methods of
7021         inf_child_target.
7022         (return_zero, inf_child_target): Delete.
7023         (inf_child_target::inf_child_target): New.
7024         * inf-child.h: Include "target.h".
7025         (inf_child_target): Delete function prototype.
7026         (inf_child_target): New class.
7027         (inf_child_open_target, inf_child_mourn_inferior)
7028         (inf_child_maybe_unpush_target): Delete.
7029         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7030         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7031         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7032         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7033         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7034         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7035         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7036         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7037         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7038         methods of inf_ptrace_target.
7039         (inf_ptrace_target): Delete function.
7040         * inf-ptrace.h: Include "inf-child.h".
7041         (inf_ptrace_target): Delete function declaration.
7042         (inf_ptrace_target): New class.
7043         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7044         * linux-nat.c (linux_target): New.
7045         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7046         (linux_nat_target::~linux_nat_target): New.
7047         (linux_child_post_attach, linux_child_post_startup_inferior)
7048         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7049         (linux_child_remove_fork_catchpoint)
7050         (linux_child_insert_vfork_catchpoint)
7051         (linux_child_remove_vfork_catchpoint)
7052         (linux_child_insert_exec_catchpoint)
7053         (linux_child_remove_exec_catchpoint)
7054         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7055         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7056         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7057         (linux_nat_stopped_data_address)
7058         (linux_nat_stopped_by_sw_breakpoint)
7059         (linux_nat_supports_stopped_by_sw_breakpoint)
7060         (linux_nat_stopped_by_hw_breakpoint)
7061         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7062         (linux_nat_kill, linux_nat_mourn_inferior)
7063         (linux_nat_xfer_partial, linux_nat_thread_alive)
7064         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7065         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7066         (linux_child_static_tracepoint_markers_by_strid)
7067         (linux_nat_is_async_p, linux_nat_can_async_p)
7068         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7069         (linux_nat_supports_multi_process)
7070         (linux_nat_supports_disable_randomization, linux_nat_async)
7071         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7072         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7073         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7074         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7075         methods of linux_nat_target.
7076         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7077         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7078         parameter.
7079         (check_stopped_by_watchpoint): Adjust.
7080         (linux_xfer_partial): Delete.
7081         (linux_target_install_ops, linux_target, linux_nat_add_target):
7082         Delete.
7083         (linux_nat_target::linux_nat_target): New.
7084         * linux-nat.h: Include "inf-ptrace.h".
7085         (linux_nat_target): New.
7086         (linux_target, linux_target_install_ops, linux_nat_add_target):
7087         Delete function declarations.
7088         (linux_target): Declare global.
7089         * linux-thread-db.c (thread_db_target): New.
7090         (thread_db_target::thread_db_target): New.
7091         (thread_db_ops): Delete.
7092         (the_thread_db_target): New.
7093         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7094         (thread_db_update_thread_list, thread_db_pid_to_str)
7095         (thread_db_extra_thread_info)
7096         (thread_db_thread_handle_to_thread_info)
7097         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7098         (thread_db_resume): Refactor as methods of thread_db_target.
7099         (init_thread_db_ops): Delete.
7100         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7101         * x86-linux-nat.c: Don't include "linux-nat.h".
7102         (super_post_startup_inferior): Delete.
7103         (x86_linux_nat_target::~x86_linux_nat_target): New.
7104         (x86_linux_child_post_startup_inferior)
7105         (x86_linux_read_description, x86_linux_enable_btrace)
7106         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7107         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7108         methods of x86_linux_nat_target.
7109         (x86_linux_create_target): Delete.  Bits folded ...
7110         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7111         pointer.
7112         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7113         (x86_linux_nat_target): New class.
7114         (x86_linux_create_target): Delete.
7115         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7116         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7117         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7118         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7119         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7120         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7121         make extern.
7122         (x86_use_watchpoints): Delete.
7123         * x86-nat.h: Include "breakpoint.h" and "target.h".
7124         (x86_use_watchpoints): Delete.
7125         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7126         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7127         (x86_insert_watchpoint, x86_remove_watchpoint)
7128         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7129         (x86_stopped_by_hw_breakpoint): New declarations.
7130         (x86_nat_target): New template class.
7131
7132         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7133         (the_ppc_linux_nat_target): New.
7134         (ppc_linux_fetch_inferior_registers)
7135         (ppc_linux_can_use_hw_breakpoint)
7136         (ppc_linux_region_ok_for_hw_watchpoint)
7137         (ppc_linux_ranged_break_num_registers)
7138         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7139         (ppc_linux_insert_mask_watchpoint)
7140         (ppc_linux_remove_mask_watchpoint)
7141         (ppc_linux_can_accel_watchpoint_condition)
7142         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7143         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7144         (ppc_linux_watchpoint_addr_within_range)
7145         (ppc_linux_masked_watch_num_registers)
7146         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7147         (ppc_linux_read_description): Refactor as methods of
7148         ppc_linux_nat_target.
7149         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7150
7151         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7152         (procfs_target): New class.
7153         (the_procfs_target): New.
7154         (procfs_target): Delete function.
7155         (procfs_auxv_parse, procfs_attach, procfs_detach)
7156         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7157         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7158         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7159         (procfs_create_inferior, procfs_update_thread_list)
7160         (procfs_thread_alive, procfs_pid_to_str)
7161         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7162         (procfs_stopped_data_address, procfs_insert_watchpoint)
7163         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7164         (proc_find_memory_regions, procfs_info_proc)
7165         (procfs_make_note_section): Refactor as methods of procfs_target.
7166         (_initialize_procfs): Adjust.
7167         * sol-thread.c (sol_thread_target): New class.
7168         (sol_thread_ops): Now a sol_thread_target.
7169         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7170         (sol_thread_fetch_registers, sol_thread_store_registers)
7171         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7172         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7173         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7174         (init_sol_thread_ops): Delete.
7175         (_initialize_sol_thread): Adjust.  Remove references to
7176         init_sol_thread_ops and complete_target_initialization.
7177
7178         * windows-nat.c (windows_nat_target): New class.
7179         (windows_fetch_inferior_registers)
7180         (windows_store_inferior_registers, windows_resume, windows_wait)
7181         (windows_attach, windows_detach, windows_pid_to_exec_file)
7182         (windows_files_info, windows_create_inferior)
7183         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7184         (windows_close, windows_pid_to_str, windows_xfer_partial)
7185         (windows_get_tib_address, windows_get_ada_task_ptid)
7186         (windows_thread_name, windows_thread_alive): Refactor as
7187         windows_nat_target methods.
7188         (do_initial_windows_stuff): Adjust.
7189         (windows_target): Delete function.
7190         (_initialize_windows_nat): Adjust.
7191
7192         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7193         (darwin_mourn_inferior, darwin_kill_inferior)
7194         (darwin_create_inferior, darwin_attach, darwin_detach)
7195         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7196         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7197         (darwin_supports_multi_process): Refactor as darwin_nat_target
7198         methods.
7199         (darwin_resume_to, darwin_files_info): Delete.
7200         (_initialize_darwin_inferior): Rename to ...
7201         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7202         * darwin-nat.h: Include "inf-child.h".
7203         (darwin_nat_target): New class.
7204         (darwin_complete_target): Delete.
7205         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7206         (darwin_target): New.
7207         (i386_darwin_fetch_inferior_registers)
7208         (i386_darwin_store_inferior_registers): Refactor as methods of
7209         darwin_nat_target.
7210         (darwin_complete_target): Delete, with ...
7211         (_initialize_i386_darwin_nat): ... bits factored out here.
7212
7213         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7214         (the_alpha_linux_nat_target): New.
7215         (alpha_linux_register_u_offset): Refactor as
7216         alpha_linux_nat_target method.
7217         (_initialize_alpha_linux_nat): Adjust.
7218         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7219         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7220         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7221         methods of linux_nat_trad_target.
7222         (linux_trad_target): Delete.
7223         * linux-nat-trad.h (linux_trad_target): Delete function.
7224         (linux_nat_trad_target): New class.
7225         * mips-linux-nat.c (mips_linux_nat_target): New class.
7226         (super_fetch_registers, super_store_registers, super_close):
7227         Delete.
7228         (the_mips_linux_nat_target): New.
7229         (mips64_linux_regsets_fetch_registers)
7230         (mips64_linux_regsets_store_registers)
7231         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7232         (mips_linux_register_u_offset, mips_linux_read_description)
7233         (mips_linux_can_use_hw_breakpoint)
7234         (mips_linux_stopped_by_watchpoint)
7235         (mips_linux_stopped_data_address)
7236         (mips_linux_region_ok_for_hw_watchpoint)
7237         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7238         (mips_linux_close): Refactor as methods of mips_linux_nat.
7239         (_initialize_mips_linux_nat): Adjust to C++ification.
7240
7241         * aix-thread.c (aix_thread_target): New class.
7242         (aix_thread_ops): Now an aix_thread_target.
7243         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7244         (aix_thread_fetch_registers, aix_thread_store_registers)
7245         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7246         (aix_thread_thread_alive, aix_thread_pid_to_str)
7247         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7248         Refactor as methods of aix_thread_target.
7249         (init_aix_thread_ops): Delete.
7250         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7251         and complete_target_initialization.
7252         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7253         (rs6000_nat_target): New class.
7254         (the_rs6000_nat_target): New.
7255         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7256         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7257         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7258         (super_create_inferior): Delete.
7259         (_initialize_rs6000_nat): Adjust to C++ification.
7260
7261         * arm-linux-nat.c (arm_linux_nat_target): New class.
7262         (the_arm_linux_nat_target): New.
7263         (arm_linux_fetch_inferior_registers)
7264         (arm_linux_store_inferior_registers, arm_linux_read_description)
7265         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7266         (arm_linux_remove_hw_breakpoint)
7267         (arm_linux_region_ok_for_hw_watchpoint)
7268         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7269         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7270         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7271         arm_linux_nat_target.
7272         (_initialize_arm_linux_nat): Adjust to C++ification.
7273
7274         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7275         (the_aarch64_linux_nat_target): New.
7276         (aarch64_linux_fetch_inferior_registers)
7277         (aarch64_linux_store_inferior_registers)
7278         (aarch64_linux_child_post_startup_inferior)
7279         (aarch64_linux_read_description)
7280         (aarch64_linux_can_use_hw_breakpoint)
7281         (aarch64_linux_insert_hw_breakpoint)
7282         (aarch64_linux_remove_hw_breakpoint)
7283         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7284         (aarch64_linux_region_ok_for_hw_watchpoint)
7285         (aarch64_linux_stopped_data_address)
7286         (aarch64_linux_stopped_by_watchpoint)
7287         (aarch64_linux_watchpoint_addr_within_range)
7288         (aarch64_linux_can_do_single_step): Refactor as methods of
7289         aarch64_linux_nat_target.
7290         (super_post_startup_inferior): Delete.
7291         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7292
7293         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7294         (the_hppa_linux_nat_target): New.
7295         (hppa_linux_fetch_inferior_registers)
7296         (hppa_linux_store_inferior_registers): Refactor as methods of
7297         hppa_linux_nat_target.
7298         (_initialize_hppa_linux_nat): Adjust to C++ification.
7299
7300         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7301         (the_ia64_linux_nat_target): New.
7302         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7303         (ia64_linux_stopped_data_address)
7304         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7305         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7306         ia64_linux_nat_target methods.
7307         (super_xfer_partial): Delete.
7308         (_initialize_ia64_linux_nat): Adjust to C++ification.
7309
7310         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7311         (the_m32r_linux_nat_target): New.
7312         (m32r_linux_fetch_inferior_registers)
7313         (m32r_linux_store_inferior_registers): Refactor as
7314         m32r_linux_nat_target methods.
7315         (_initialize_m32r_linux_nat): Adjust to C++ification.
7316
7317         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7318         (the_m68k_linux_nat_target): New.
7319         (m68k_linux_fetch_inferior_registers)
7320         (m68k_linux_store_inferior_registers): Refactor as
7321         m68k_linux_nat_target methods.
7322         (_initialize_m68k_linux_nat): Adjust to C++ification.
7323
7324         * s390-linux-nat.c (s390_linux_nat_target): New class.
7325         (the_s390_linux_nat_target): New.
7326         (s390_linux_fetch_inferior_registers)
7327         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7328         (s390_insert_watchpoint, s390_remove_watchpoint)
7329         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7330         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7331         (s390_auxv_parse, s390_read_description): Refactor as methods of
7332         s390_linux_nat_target.
7333         (_initialize_s390_nat): Adjust to C++ification.
7334
7335         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7336         (the_sparc_linux_nat_target): New.
7337         (_initialize_sparc_linux_nat): Adjust to C++ification.
7338         * sparc-nat.c (sparc_fetch_inferior_registers)
7339         (sparc_store_inferior_registers): Remove target_ops parameter.
7340         * sparc-nat.h (sparc_fetch_inferior_registers)
7341         (sparc_store_inferior_registers): Remove target_ops parameter.
7342         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7343         (the_sparc64_linux_nat_target): New.
7344         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7345
7346         * spu-linux-nat.c (spu_linux_nat_target): New class.
7347         (the_spu_linux_nat_target): New.
7348         (spu_child_post_startup_inferior, spu_child_post_attach)
7349         (spu_child_wait, spu_fetch_inferior_registers)
7350         (spu_store_inferior_registers, spu_xfer_partial)
7351         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7352         methods.
7353         (_initialize_spu_nat): Adjust to C++ification.
7354
7355         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7356         (the_tilegx_linux_nat_target): New.
7357         (fetch_inferior_registers, store_inferior_registers):
7358         Refactor as methods.
7359         (_initialize_tile_linux_nat): Adjust to C++ification.
7360
7361         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7362         (the_xtensa_linux_nat_target): New.
7363         (xtensa_linux_fetch_inferior_registers)
7364         (xtensa_linux_store_inferior_registers): Refactor as
7365         xtensa_linux_nat_target methods.
7366         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7367
7368         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7369         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7370         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7371         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7372         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7373         (fbsd_stopped_by_sw_breakpoint)
7374         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7375         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7376         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7377         (fbsd_post_startup_inferior, fbsd_post_attach)
7378         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7379         (fbsd_set_syscall_catchpoint)
7380         (super_xfer_partial, super_resume, super_wait)
7381         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7382         (fbsd_handle_debug_trap): Remove target_ops parameter.
7383         (fbsd_nat_add_target): Delete.
7384         * fbsd-nat.h: Include "inf-ptrace.h".
7385         (fbsd_nat_add_target): Delete.
7386         (USE_SIGTRAP_SIGINFO): Define.
7387         (fbsd_nat_target): New class.
7388
7389         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7390         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7391         (amd64bsd_target): Delete.
7392         * amd64-bsd-nat.h: New file.
7393         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7394         "x86-bsd-nat.h".
7395         (amd64_fbsd_nat_target): New class.
7396         (the_amd64_fbsd_nat_target): New.
7397         (amd64fbsd_read_description): Refactor as method of
7398         amd64_fbsd_nat_target.
7399         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7400         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7401         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7402         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7403         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7404         (i386bsd_target): Delete.
7405         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7406         (i386bsd_fetch_inferior_registers)
7407         (i386bsd_store_inferior_registers): Declare.
7408         (i386_bsd_nat_target): New class.
7409         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7410         (the_i386_fbsd_nat_target): New.
7411         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7412         i386_fbsd_nat_target methods.
7413         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7414         (_initialize_i386fbsd_nat): Adjust to C++ification.
7415         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7416         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7417         (_initialize_x86_bsd_nat): Adjust to C++ification.
7418         * x86-bsd-nat.h: Include "x86-nat.h".
7419         (x86bsd_target): Delete declaration.
7420         (x86bsd_nat_target): New class.
7421
7422         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7423         (the_aarch64_fbsd_nat_target): New.
7424         (aarch64_fbsd_fetch_inferior_registers)
7425         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7426         aarch64_fbsd_nat_target.
7427         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7428         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7429         (the_alpha_bsd_nat_target): New.
7430         (alphabsd_fetch_inferior_registers)
7431         (alphabsd_store_inferior_registers): Refactor as
7432         alpha_bsd_nat_target methods.
7433         (_initialize_alphabsd_nat): Refactor as methods of
7434         alpha_bsd_nat_target.
7435         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7436         (the_amd64_nbsd_nat_target): New.
7437         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7438         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7439         (the_amd64_obsd_nat_target): New.
7440         (_initialize_amd64obsd_nat): Adjust to C++ification.
7441         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7442         (the_arm_fbsd_nat_target): New.
7443         (arm_fbsd_fetch_inferior_registers)
7444         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7445         (_initialize_arm_fbsd_nat): Refactor as methods of
7446         arm_fbsd_nat_target.
7447         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7448         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7449         (the_arm_netbsd_nat_target): New.
7450         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7451         arm_netbsd_nat_target.
7452         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7453         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7454         (the_hppa_nbsd_nat_target): New.
7455         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7456         hppa_nbsd_nat_target methods.
7457         (_initialize_hppanbsd_nat): Adjust to C++ification.
7458         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7459         (the_hppa_obsd_nat_target): New.
7460         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7461         methods of hppa_obsd_nat_target.
7462         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7463         add_target.
7464         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7465         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7466         add_target.
7467         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7468         (_initialize_i386obsd_nat): Use add_target.
7469         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7470         (the_m68k_bsd_nat_target): New.
7471         (m68kbsd_fetch_inferior_registers)
7472         (m68kbsd_store_inferior_registers): Refactor as methods of
7473         m68k_bsd_nat_target.
7474         (_initialize_m68kbsd_nat): Adjust to C++ification.
7475         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7476         (the_mips_fbsd_nat_target): New.
7477         (mips_fbsd_fetch_inferior_registers)
7478         (mips_fbsd_store_inferior_registers): Refactor as methods of
7479         mips_fbsd_nat_target.
7480         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7481         add_target.
7482         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7483         (the_mips_nbsd_nat_target): New.
7484         (mipsnbsd_fetch_inferior_registers)
7485         (mipsnbsd_store_inferior_registers): Refactor as methods of
7486         mips_nbsd_nat_target.
7487         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7488         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7489         (the_mips64_obsd_nat_target): New.
7490         (mips64obsd_fetch_inferior_registers)
7491         (mips64obsd_store_inferior_registers): Refactor as methods of
7492         mips64_obsd_nat_target.
7493         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7494         add_target.
7495         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7496         nbsd_nat_target.
7497         * nbsd-nat.h: Include "inf-ptrace.h".
7498         (nbsd_nat_target): New class.
7499         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7500         (obsd_wait): Refactor as methods of obsd_nat_target.
7501         (obsd_add_target): Delete.
7502         * obsd-nat.h: Include "inf-ptrace.h".
7503         (obsd_nat_target): New class.
7504         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7505         (the_ppc_fbsd_nat_target): New.
7506         (ppcfbsd_fetch_inferior_registers)
7507         (ppcfbsd_store_inferior_registers): Refactor as methods of
7508         ppc_fbsd_nat_target.
7509         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7510         add_target.
7511         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7512         (the_ppc_nbsd_nat_target): New.
7513         (ppcnbsd_fetch_inferior_registers)
7514         (ppcnbsd_store_inferior_registers): Refactor as methods of
7515         ppc_nbsd_nat_target.
7516         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7517         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7518         (the_ppc_obsd_nat_target): New.
7519         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7520         methods of ppc_obsd_nat_target.
7521         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7522         add_target.
7523         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7524         (the_sh_nbsd_nat_target): New.
7525         (shnbsd_fetch_inferior_registers)
7526         (shnbsd_store_inferior_registers): Refactor as methods of
7527         sh_nbsd_nat_target.
7528         (_initialize_shnbsd_nat): Adjust to C++ification.
7529         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7530         (inf_ptrace_xfer_partial): Delete.
7531         (sparc_xfer_partial, sparc_target): Delete.
7532         * sparc-nat.h (sparc_fetch_inferior_registers)
7533         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7534         (sparc_target): Delete function declaration.
7535         (sparc_target): New template class.
7536         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7537         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7538         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7539         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7540         add_target.
7541         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7542         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7543         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7544         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7545         add_target.
7546         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7547         (the_vax_bsd_nat_target): New.
7548         (vaxbsd_fetch_inferior_registers)
7549         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7550         methods.
7551         (_initialize_vaxbsd_nat): Adjust to C++ification.
7552
7553         * bsd-kvm.c (bsd_kvm_target): New class.
7554         (bsd_kvm_ops): Now a bsd_kvm_target.
7555         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7556         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7557         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7558         bsd_kvm_target.
7559         (bsd_kvm_return_one): Delete.
7560         (bsd_kvm_add_target): Adjust to C++ification.
7561
7562         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7563         (nto_procfs_target_procfs): New classes.
7564         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7565         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7566         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7567         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7568         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7569         (procfs_remove_hw_breakpoint, procfs_resume)
7570         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7571         (procfs_kill_inferior, procfs_store_registers)
7572         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7573         as methods of nto_procfs_target.
7574         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7575         (nto_native_ops): Delete.
7576         (procfs_open, procfs_native_open): Delete.
7577         (nto_native_ops): Now an nto_procfs_target_native.
7578         (init_procfs_targets): Adjust to C++ification.
7579         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7580         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7581         Refactor as methods of nto_procfs_target.
7582
7583         * go32-nat.c (go32_nat_target): New class.
7584         (the_go32_nat_target): New.
7585         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7586         (go32_store_registers, go32_xfer_partial, go32_files_info)
7587         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7588         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7589         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7590         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7591         (go32_target): Delete.
7592         (_initialize_go32_nat): Adjust to C++ification.
7593
7594         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7595         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7596         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7597         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7598         gnu_nat_target.
7599         (gnu_target): Delete.
7600         * gnu-nat.h (gnu_target): Delete.
7601         (gnu_nat_target): New class.
7602         * i386-gnu-nat.c (gnu_base_target): New.
7603         (i386_gnu_nat_target): New class.
7604         (the_i386_gnu_nat_target): New.
7605         (_initialize_i386gnu_nat): Adjust to C++ification.
7606
7607 2018-05-02  Pedro Alves  <palves@redhat.com>
7608
7609         * bfd-target.c (target_bfd_xclose): Rename to ...
7610         (target_bfd_close): ... this.
7611         (target_bfd_reopen): Adjust.
7612         * target.c (target_close): Remove references to to_xclose.
7613         * target.h (target_ops::to_xclose): Delete.
7614         (target_ops::to_close): Update comments.
7615
7616 2018-05-02  Pedro Alves  <palves@redhat.com>
7617
7618         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7619         "linux-nat.h".
7620         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7621         * inf-ptrace.c (inf_ptrace_register_u_offset)
7622         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7623         (inf_ptrace_store_register, inf_ptrace_store_registers)
7624         (inf_ptrace_trad_target): Move to ...
7625         * linux-nat-trad.c: ... this new file.
7626         * linux-nat-trad.h: New file.
7627         * linux-nat.c (linux_target_install_ops): Make extern.
7628         (linux_trad_target): Delete.
7629         * linux-nat.h (linux_trad_target): Delete declaration.
7630         (linux_target_install_ops): Declare.
7631         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7632         "linux-nat.h".
7633
7634 2018-05-02  Pedro Alves  <palves@redhat.com>
7635
7636         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7637         procfs_target/add_target here.
7638         * procfs.c (procfs_target): Make static.
7639         (_initialize_procfs): Call add_target here.
7640         * procfs.h (struct target_ops): Remove forward declaration.
7641         (procfs_target): Remove declaration.
7642         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7643
7644 2018-05-02  Pedro Alves  <palves@redhat.com>
7645
7646         * procfs.c (procfs_stopped_by_watchpoint)
7647         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7648         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7649         Forward declare.
7650         (procfs_use_watchpoints): Delete, move contents...
7651         (procfs_target): ... here.
7652         * procfs.h (procfs_use_watchpoints): Delete declaration.
7653         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7654         procfs_use_watchpoints.
7655         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7656         procfs_use_watchpoints.
7657
7658 2018-05-02  Tom Tromey  <tom@tromey.com>
7659
7660         PR python/20084:
7661         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7662         and var_zuinteger_unlimited.
7663         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7664         and PARAM_ZUINTEGER_UNLIMITED.
7665         (set_parameter_value): Handle var_zuinteger and
7666         var_zuinteger_unlimited.
7667         (add_setshow_generic): Likewise.
7668         (parmpy_init): Likewise.
7669
7670 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7671
7672         PR rust/23124
7673         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7674         pointer is not null before dereferencing it.
7675
7676 2018-04-30  Tom Tromey  <tom@tromey.com>
7677
7678         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7679         is_mi_like_p.
7680
7681 2018-04-30  Tom Tromey  <tom@tromey.com>
7682
7683         * breakpoint.c (mention): Remove use of is_mi_like_p.
7684         (print_mention_ranged_breakpoint): Likewise.
7685         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7686         of is_mi_like_p.
7687
7688 2018-04-30  Tom Tromey  <tom@tromey.com>
7689
7690         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7691
7692 2018-04-30  Tom Tromey  <tom@tromey.com>
7693
7694         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7695         (info_spu_event_command): Remove some uses of is_mi_like_p.
7696
7697 2018-04-30  Tom Tromey  <tom@tromey.com>
7698
7699         * python/py-framefilter.c (py_print_single_arg)
7700         (enumerate_locals, py_print_args, py_print_frame): Remove some
7701         uses of is_mi_like_p.
7702
7703 2018-04-30  Tom Tromey  <tom@tromey.com>
7704
7705         * ui-out.c: Update.
7706         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7707         * ui-out.h (ui_out::is_mi_like_p): Now const.
7708         (ui_out::do_is_mi_like_p): Now const.
7709         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7710
7711 2018-04-30  Tom Tromey  <tom@tromey.com>
7712
7713         * varobj.c (varobj_set_visualizer): Use new_reference.
7714         * python/python.c (gdbpy_decode_line): Use new_reference.
7715         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7716         new_reference.
7717
7718 2018-04-30  Tom Tromey  <tom@tromey.com>
7719
7720         * varobj.c (install_new_value): Use new_reference.
7721         * value.h (value_incref): Return void.  Swap intro comment with
7722         value_decref.
7723         * value.c (set_value_parent): Use new_reference.
7724         (value_incref): Return void.  Update intro comment.
7725         (release_value): Use new_reference.
7726         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7727
7728 2018-04-30  Tom Tromey  <tom@tromey.com>
7729
7730         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7731         * gdb_bfd.h (new_bfd_ref): Remove.
7732         (gdb_bfd_open): Update comment.
7733         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7734         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7735         (gdb_bfd_fdopenr): Use new_reference.
7736         * exec.c (exec_file_attach): Use new_reference.
7737
7738 2018-04-30  Tom Tromey  <tom@tromey.com>
7739
7740         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7741         method.
7742
7743 2018-04-30  Tom Tromey  <tom@tromey.com>
7744
7745         * jit.c (jit_read_code_entry): Use type_align.
7746         * i386-tdep.c (i386_gdbarch_init): Don't call
7747         set_gdbarch_long_long_align_bit.
7748         * gdbarch.sh: Remove long_long_align_bit.
7749         * gdbarch.c, gdbarch.h: Rebuild.
7750         * arc-tdep.c (arc_type_align): New function.
7751         (arc_gdbarch_init): Use arc_type_align.  Don't call
7752         set_gdbarch_long_long_align_bit.
7753
7754 2018-04-30  Tom Tromey  <tom@tromey.com>
7755
7756         * rust-lang.c (rust_type_alignment): Remove.
7757         (rust_composite_type): Use type_align.
7758
7759 2018-04-30  Tom Tromey  <tom@tromey.com>
7760
7761         * NEWS: Mention Type.align.
7762         * python/py-type.c (typy_get_alignof): New function.
7763         (type_object_getset): Add "alignof".
7764
7765 2018-04-30  Tom Tromey  <tom@tromey.com>
7766
7767         PR exp/17095:
7768         * NEWS: Update.
7769         * std-operator.def (UNOP_ALIGNOF): New operator.
7770         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7771         New.
7772         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7773         * c-lang.c (c_op_print_tab): Add alignof.
7774         * c-exp.y (ALIGNOF): New token.
7775         (exp): Add "ALIGNOF" production.
7776         (ident_tokens): Add _Alignof and alignof.
7777
7778 2018-04-30  Tom Tromey  <tom@tromey.com>
7779
7780         * i386-tdep.c (i386_type_align): New function.
7781         (i386_gdbarch_init): Update.
7782         * gdbarch.sh (type_align): New method.
7783         * gdbarch.c, gdbarch.h: Rebuild.
7784         * arch-utils.h (default_type_align): Declare.
7785         * arch-utils.c (default_type_align): New function.
7786         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7787         (struct type) <align_log2>: New field.
7788         <instance_flags>: Now a bitfield.
7789         (TYPE_RAW_ALIGN): New macro.
7790         (type_align, type_raw_align, set_type_align): Declare.
7791         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7792         functions.
7793         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7794         (get_alignment, maybe_set_alignment): New functions.
7795         (read_structure_type, read_enumeration_type, read_array_type)
7796         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7797         (read_subrange_type, read_base_type): Set type alignment.
7798
7799 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7800
7801         * dwarf2read.c (read_index_from_section): Use bool.
7802
7803 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7804
7805         PR gdb/22950
7806         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7807         with #ifdef.
7808
7809 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7810
7811         PR build/22873
7812         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7813         last step, and do it atomically.
7814
7815 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7816
7817         * compile/compile-c-types.c (convert_int, convert_float):
7818         Update for C FE v1.
7819
7820 2018-04-27  Tom Tromey  <tom@tromey.com>
7821
7822         PR rust/22545:
7823         * rust-lang.c (rust_inclusive_range_type_p): New function.
7824         (rust_range): Handle inclusive ranges.
7825         (rust_compute_range): Likewise.
7826         * rust-exp.y (struct rust_op) <inclusive>: New field.
7827         (DOTDOTEQ): New constant.
7828         (range_expr): Add "..=" productions.
7829         (operator_tokens): Add "..=" token.
7830         (ast_range): Add "inclusive" parameter.
7831         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7832         ranges.
7833         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7834         bounds values.
7835         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7836         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7837         Update comments.
7838         * expprint.c (print_subexp_standard): Handle new bounds values.
7839         (dump_subexp_body_standard): Likewise.
7840
7841 2018-04-27  Tom Tromey  <tom@tromey.com>
7842
7843         * configure: Rebuild.
7844         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7845         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7846         "OVERRIDE".
7847         (class symbol_needs_eval_context): Likewise.
7848         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7849         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7850         "virtual".
7851         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7852         "override".
7853         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7854         * aarch64-tdep.c (instruction_reader::read): Use "override".
7855         (instruction_reader_test::read): Likewise.
7856         * arm-tdep.c (instruction_reader::read): Use "override".
7857         (instruction_reader_thumb::read): Likewise.
7858
7859 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7860
7861         PR remote/9665
7862         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7863         instead of remote_send.
7864         (remote_send): Remove.
7865
7866 2018-04-26  Pedro Alves  <palves@redhat.com>
7867
7868         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7869         find_function_start_sal instead of find_pc_line.
7870
7871 2018-04-26  Pedro Alves  <palves@redhat.com>
7872
7873         * breakpoint.c (set_breakpoint_location_function): Handle
7874         mst_data_gnu_ifunc.
7875         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7876         * elfread.c (elf_symtab_read): Give data symbols with
7877         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7878         (elf_rel_plt_read): Update comment.
7879         * linespec.c (convert_linespec_to_sals): Handle
7880         mst_data_gnu_ifunc.
7881         (minsym_found): Handle mst_data_gnu_ifunc.
7882         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7883         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7884         * parse.c (find_minsym_type_and_address): Handle
7885         mst_data_gnu_ifunc.
7886         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7887         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7888         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7889         comment.
7890         <mst_data_gnu_ifunc>: New enumerator.
7891
7892 2018-04-26  Pedro Alves  <palves@redhat.com>
7893
7894         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7895         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7896         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7897         Handle it.
7898         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7899         (lookup_minimal_symbol_by_pc): Adjust.
7900         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7901         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7902         * minsyms.h (lookup_msym_prefer): New enum.
7903         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7904         parameter by a lookup_msym_prefer parameter.
7905
7906 2018-04-26  Pedro Alves  <palves@redhat.com>
7907
7908         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7909         ends in "@plt" instead of looking at the symbol's section.
7910
7911 2018-04-26  Pedro Alves  <palves@redhat.com>
7912
7913         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7914         all references.
7915         (find_pc_partial_function_gnu_ifunc): Rename to ...
7916         (find_pc_partial_function): ... this, and remove references to
7917         'is_gnu_ifunc_p'.
7918         (find_pc_partial_function): Delete old implementation.
7919         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7920
7921 2018-04-26  Pedro Alves  <palves@redhat.com>
7922
7923         * linespec.c (struct bound_minimal_symbol_search_key): New.
7924         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7925         skip first line if we found a GNU ifunc minimal symbol by name.
7926         (compare_msymbols): Change parameters to work with a destructured
7927         lhs minsym.
7928         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7929         functions.
7930
7931 2018-04-26  Pedro Alves  <palves@redhat.com>
7932
7933         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7934         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7935         address/name.
7936         (add_location_to_breakpoint): Store the minsym and the objfile in
7937         the breakpoint location.
7938         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7939         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7940         Record the minsym in the sal.
7941         * symtab.h (symtab_and_line) <msymbol>: New field.
7942
7943 2018-04-26  Pedro Alves  <palves@redhat.com>
7944
7945         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7946         unless we actually resolved the ifunc.
7947
7948 2018-04-26  Pedro Alves  <palves@redhat.com>
7949
7950         * c-exp.y (variable production): Prefer ifunc minsyms over
7951         regular function symbols.
7952         * symtab.c (find_gnu_ifunc): New function.
7953         * minsyms.h (lookup_msym_prefer): New enum.
7954         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7955         parameter by a lookup_msym_prefer parameter.
7956         * symtab.h (find_gnu_ifunc): New declaration.
7957
7958 2018-04-26  Pedro Alves  <palves@redhat.com>
7959
7960         * blockframe.c (find_gnu_ifunc_target_type): New function.
7961         (find_function_type): New.
7962         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7963         return a value with a memory address.
7964         (eval_call): For calls to GNU ifunc functions, try to find the
7965         type of the target function from the type that the resolver
7966         returns.
7967         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7968         symbols.
7969         * infcall.c (find_function_return_type): Delete.
7970         (find_function_addr): Add 'function_type' parameter.  For calls to
7971         GNU ifunc functions, try to find the type of the target function
7972         from the type that the resolver returns, and return it via
7973         FUNCTION_TYPE.
7974         (call_function_by_hand_dummy): Adjust to use the function type
7975         returned by find_function_addr.
7976         (find_function_addr): Add 'function_type' parameter and move
7977         description here.
7978         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7979         declarations.
7980
7981 2018-04-26  Pedro Alves  <palves@redhat.com>
7982
7983         * c-exp.y (variable production): Skip finding an alias for ifunc
7984         symbols.
7985
7986 2018-04-26  Pedro Alves  <palves@redhat.com>
7987
7988         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7989
7990 2018-04-25  Pedro Alves  <palves@redhat.com>
7991
7992         * infcmd.c (kill_command): Print the pid as string, not the whole
7993         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7994         message.
7995         * remote.c (remote_detach_1): Print the pid as string, not the
7996         whole thread's ptid.
7997
7998 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7999             Sergio Durigan Junior  <sergiodj@redhat.com>
8000             Pedro Alves  <palves@redhat.com>
8001
8002         * infcmd.c (kill_command): Print message when inferior has
8003         been killed.
8004         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8005         '1'.
8006         (add_inferior): Improve message printed when
8007         'print_inferior_events' is on.
8008         (exit_inferior): Remove message printed when
8009         'print_inferior_events' is on.
8010         (detach_inferior): Improve message printed when
8011         'print_inferior_events' is on.
8012         (initialize_inferiors): Use 'add_inferior_silent' to set
8013         'current_inferior_'.
8014         * inferior.h (print_inferior_events): Declare here as
8015         'extern'.
8016         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8017         '[Detaching...]' messages when 'print_inferior_events' is on.
8018         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8019         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8020         'Detaching after fork from child...', replace it by '... from
8021         parent...'.
8022         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8023         prefix/suffix when printing 'Detaching...' messages.  Print
8024         them when 'print_inferior_events' is on.
8025         * remote.c (remote_detach_1): Print message when detaching
8026         from inferior and '!is_fork_parent'.
8027
8028 2018-04-24  Tom Tromey  <tom@tromey.com>
8029
8030         * cli-out.h: Reindent.
8031
8032 2018-04-24  Tom Tromey  <tom@tromey.com>
8033
8034         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8035         (cli_ui_out::do_field_string): Use fputs_filtered.
8036         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8037
8038 2018-04-23  Tom Tromey  <tom@tromey.com>
8039
8040         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8041         gdb::unique_xmalloc_ptr.
8042
8043 2018-04-23  Tom Tromey  <tom@tromey.com>
8044
8045         * configure: Rebuild.
8046
8047 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8048
8049         PR gdb/23095
8050         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8051         prepare_for_testing.  Set normal_bp to r_debug_state if target
8052         is bsd.
8053
8054 2018-04-21  Pedro Alves  <palves@redhat.com>
8055             Rajendra SY  <rajendra.sy@gmail.com>
8056
8057         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8058         * remote.c (extended_remote_attach): In all-stop mode, mark the
8059         thread as executing.
8060
8061 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8062
8063         * thread.c (thread_apply_all_command): Fix comment.
8064         (thread_command): Fix comment.
8065
8066 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8067
8068         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8069         parameter.
8070         * features/aarch64-core.c (create_feature_aarch64_core):
8071         Regenerate.
8072         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8073         Likewise.
8074         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8075         Likewise.
8076         * features/i386/32bit-avx512.c
8077         (create_feature_i386_32bit_avx512): Likewise.
8078         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8079         Likewise.
8080         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8081         Likewise.
8082         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8083         Likewise.
8084         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8085         Likewise.
8086         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8087         Likewise.
8088         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8089         Likewise.
8090         * features/i386/64bit-avx512.c
8091         (create_feature_i386_64bit_avx512): Likewise.
8092         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8093         Likewise.
8094         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8095         Likewise.
8096         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8097         Likewise.
8098         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8099         Likewise.
8100         * features/i386/64bit-segments.c
8101         (create_feature_i386_64bit_segments): Likewise.
8102         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8103         Likewise.
8104         * features/i386/x32-core.c
8105         (create_feature_i386_x32_core): Likewise.
8106         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8107         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8108         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8109         * target-descriptions.c: In generated code, don't pass xml
8110         filename.
8111
8112 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8113
8114         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8115         (print_xml_feature::visit_post): Likewise.
8116         (print_xml_feature::visit): Likewise.
8117         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8118         (print_xml_feature): Add new class.
8119         * regformats/regdat.sh: Null xmltarget on feature targets.
8120         * target-descriptions.c (struct target_desc): Add xmltarget.
8121         (maintenance_check_tdesc_xml_convert): Add unittest function.
8122         (tdesc_get_features_xml): Add function to get xml.
8123         (maintenance_check_xml_descriptions): Test xml generation.
8124         * xml-tdesc.c (string_read_description_xml): Add function.
8125         * xml-tdesc.h (string_read_description_xml): Add declaration.
8126
8127 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8128
8129         * features/Makefile: Add feature marker to targets with new style
8130         target descriptions.
8131         * regformats/aarch64.dat: Regenerate.
8132         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8133         * regformats/i386/amd64-avx-linux.dat: Likewise.
8134         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8135         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8136         * regformats/i386/amd64-linux.dat: Likewise.
8137         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8138         * regformats/i386/amd64.dat: Likewise.
8139         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8140         * regformats/i386/i386-avx-linux.dat: Likewise.
8141         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8142         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8143         * regformats/i386/i386-linux.dat: Likewise.
8144         * regformats/i386/i386-mmx-linux.dat: Likewise.
8145         * regformats/i386/i386-mpx-linux.dat: Likewise.
8146         * regformats/i386/i386.dat: Likewise.
8147         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8148         * regformats/i386/x32-avx-linux.dat: Likewise.
8149         * regformats/i386/x32-linux.dat: Likewise.
8150         * regformats/tic6x-c62x-linux.dat: Likewise.
8151         * regformats/tic6x-c64x-linux.dat: Likewise.
8152         * regformats/tic6x-c64xp-linux.dat: Likewise.
8153         * regformats/regdat.sh: Parse feature marker.
8154
8155 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8156
8157         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8158         (tdesc_osabi_name): Likewise.
8159         * target-descriptions.c (tdesc_architecture_name): Add new
8160         function.
8161         (tdesc_osabi_name): Likewise.
8162
8163 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8164
8165         * common/tdesc.c (tdesc_predefined_type): Move to here.
8166         (tdesc_named_type): Likewise.
8167         (tdesc_create_vector): Likewise.
8168         (tdesc_create_struct): Likewise.
8169         (tdesc_set_struct_size): Likewise.
8170         (tdesc_create_union): Likewise.
8171         (tdesc_create_flags): Likewise.
8172         (tdesc_create_enum): Likewise.
8173         (tdesc_add_field): Likewise.
8174         (tdesc_add_typed_bitfield): Likewise.
8175         (tdesc_add_bitfield): Likewise.
8176         (tdesc_add_flag): Likewise.
8177         (tdesc_add_enum_value): Likewise.
8178         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8179         (struct tdesc_type_vector): Likewise.
8180         (struct tdesc_type_field): Likewise.
8181         (struct tdesc_type_with_fields): Likewise.
8182         (tdesc_create_enum): Add declaration.
8183         (tdesc_add_typed_bitfield): Likewise.
8184         (tdesc_add_enum_value): Likewise.
8185         * target-descriptions.c (tdesc_type_field): Move from here.
8186         (tdesc_type_builtin): Likewise.
8187         (tdesc_type_vector): Likewise.
8188         (tdesc_type_with_fields): Likewise.
8189         (tdesc_predefined_types): Likewise.
8190         (tdesc_named_type): Likewise.
8191         (tdesc_create_vector): Likewise.
8192         (tdesc_create_struct): Likewise.
8193         (tdesc_set_struct_size): Likewise.
8194         (tdesc_create_union): Likewise.
8195         (tdesc_create_flags): Likewise.
8196         (tdesc_create_enum): Likewise.
8197         (tdesc_add_field): Likewise.
8198         (tdesc_add_typed_bitfield): Likewise.
8199         (tdesc_add_bitfield): Likewise.
8200         (tdesc_add_flag): Likewise.
8201         (tdesc_add_enum_value): Likewise.
8202         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8203         (tdesc_add_typed_bitfield): Likewise.
8204         (tdesc_add_enum_value): Likewise.
8205
8206 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8207
8208         * common/tdesc.c (tdesc_feature::accept): Move to here.
8209         (tdesc_feature::operator==): Likewise.
8210         (tdesc_create_reg): Likewise.
8211         * common/tdesc.h (tdesc_type_kind): Likewise.
8212         (struct tdesc_type): Likewise.
8213         (struct tdesc_feature): Likewise.
8214         * regformats/regdat.sh: Create a feature.
8215         * target-descriptions.c (tdesc_type_kind): Move from here.
8216         (tdesc_type): Likewise.
8217         (tdesc_type_up): Likewise.
8218         (tdesc_feature): Likewise.
8219         (tdesc_create_reg): Likewise.
8220
8221 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8222
8223         * Makefile.in: Add arch/tdesc.c
8224         * common/tdesc.c: New file.
8225         * common/tdesc.h (tdesc_element_visitor): Move to here.
8226         (tdesc_element): Likewise.
8227         (tdesc_reg): Likewise.
8228         (tdesc_reg_up): Likewise.
8229         * regformats/regdef.h (reg): Add offset to constructors.
8230         * target-descriptions.c (tdesc_element_visitor): Move from here.
8231         (tdesc_element): Likewise.
8232         (tdesc_reg): Likewise.
8233         (tdesc_reg_up): Likewise.
8234
8235 2018-04-17  Tom Tromey  <tom@tromey.com>
8236
8237         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8238         discriminant field.
8239
8240 2018-04-17  Tom Tromey  <tom@tromey.com>
8241
8242         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8243
8244 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8245
8246         * symtab.c (print_symbol_info): Skip printing filename and line
8247         number when `last' is NULL.
8248         (symtab_symbol_info): Use empty string instead of NULL for first
8249         invocation of print_symbol_info.
8250         (rbreak_command): Pass NULL to `last' parameter of
8251         print_symbol_info.
8252
8253 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8254
8255         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8256         instead of nullptr.
8257
8258 2018-04-16  Pedro Alves  <palves@redhat.com>
8259
8260         * MAINTAINERS (sh): Remove.
8261         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8262         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8263         (ALLDEPFILES): Remove sh64-tdep.c.
8264         * NEWS: Mentions that support for SH-5/SH64 is removed.
8265         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8266         (sh*-*-openbsd*): Ditto.
8267         (sh64-*-elf*): Remove.
8268         (sh*): Remove.
8269         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8270         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8271         * sh-tdep.c: No longer include "sh64-tdep.h".
8272         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8273         * sh64-tdep.c, sh64-tdep.h: Remove files.
8274
8275 2018-04-16  Pedro Alves  <palves@redhat.com>
8276
8277         * MAINTAINERS: Remove m88k.
8278         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8279         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8280         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8281         * NEWS: Mention that support for m88k was removed.
8282         * configure.host (m88*-*-*): Remove support.
8283         * configure.nat (m88k-*-*): Remove support.
8284         * configure.tgt (m88*-*-openbsd*): Remove.
8285         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8286
8287 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8288
8289         * configure.tgt (x86_tobjs): New variable.
8290         (amd64_tobjs, i386_tobjs): Use it.
8291
8292 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8293
8294         * symtab.c (print_symbol_info): Precede the symbol definition by
8295         the line number when available.
8296         * NEWS: Advertise this enhancement.
8297
8298 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8299
8300         * NEWS (New options): announce set/show record btrace cpu.
8301         * btrace.c: Include record-btrace.h.
8302         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8303         the vendor is unknown.
8304         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8305         Maybe overwrite the btrace configuration's cpu.
8306         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8307         (btrace_fetch): Add cpu parameter.  Update callers.
8308         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8309         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8310         errata workarounds if the vendor is unknown.
8311         * python/py-record-btrace.c: Include record-btrace.h.
8312         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8313         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8314         * record-btrace.c (record_btrace_cpu_state_kind): New.
8315         (record_btrace_cpu): New.
8316         (set_record_btrace_cpu_cmdlist): New.
8317         (record_btrace_get_cpu): New.
8318         (require_btrace_thread, record_btrace_info)
8319         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8320         (cmd_set_record_btrace_cpu_none): New.
8321         (cmd_set_record_btrace_cpu_auto): New.
8322         (cmd_set_record_btrace_cpu): New.
8323         (cmd_show_record_btrace_cpu): New.
8324         (_initialize_record_btrace): Initialize set/show record btrace cpu
8325         commands.
8326         * record-btrace.h (record_btrace_get_cpu): New.
8327
8328 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8329
8330         * record.c (set_record_command): Fix typo in message.
8331
8332 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8333
8334         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8335
8336 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8337
8338         * infrun.c (process_event_stop_test): Call
8339         gdbarch_in_indirect_branch_thunk.
8340         * gdbarch.sh (in_indirect_branch_thunk): New.
8341         * gdbarch.c: Regenerated.
8342         * gdbarch.h: Regenerated.
8343         * x86-tdep.h: New.
8344         * x86-tdep.c: New.
8345         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8346         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8347         (ALLDEPFILES): Add x86-tdep.c.
8348         * arch-utils.h (default_in_indirect_branch_thunk): New.
8349         * arch-utils.c (default_in_indirect_branch_thunk): New.
8350         * i386-tdep: Include x86-tdep.h.
8351         (i386_in_indirect_branch_thunk): New.
8352         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8353         function.
8354         * amd64-tdep: Include x86-tdep.h.
8355         (amd64_in_indirect_branch_thunk): New.
8356         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8357
8358 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8359
8360         PR gdb/23053
8361         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8362         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8363         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8364         regression.
8365
8366 2018-04-12  Tom Tromey  <tom@tromey.com>
8367
8368         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8369         (rust_evaluate_subexp): Likewise.
8370
8371 2018-04-12  Pedro Alves  <palves@redhat.com>
8372
8373         * procfs.c (procfs_detach): Make forward declaration's prototype
8374         match definition's protototype.
8375         (proc_get_LDT_entry): Remove stale do_cleanups call.
8376
8377 2018-04-12  Pedro Alves  <palves@redhat.com>
8378
8379         * target.h (target_ops::to_has_exited): Delete.
8380         (target_has_exited): Delete.
8381         * target-delegates.c: Regenerate.
8382
8383 2018-04-11  Pedro Alves  <palves@redhat.com>
8384
8385         * target.c (fileio_fh_t::t): Add comment.
8386         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8387         (target_fileio_close): Handle a NULL target.
8388         (invalidate_fileio_fh): New.
8389         (target_close): Call it.
8390         * remote.c (remote_hostio_send_command): No longer check whether
8391         remote_desc is open.
8392
8393 2018-04-11  Pedro Alves  <palves@redhat.com>
8394
8395         * target.c (fileio_fh_t): Make it a named struct instead of a
8396         typedef.
8397         (fileio_fh_t::is_closed): New method.
8398         (DEF_VEC_O (fileio_fh_t)): Remove.
8399         (fileio_fhandles): Now a std::vector.
8400         (is_closed_fileio_fh): Delete.
8401         (acquire_fileio_fd): Adjust.  Rename parameters.
8402         (release_fileio_fd): Adjust.
8403         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8404         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8405         (target_fileio_close): Adjust.
8406
8407 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8408
8409         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8410         index.
8411
8412 2018-04-10  Pedro Alves  <palves@redhat.com>
8413
8414         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8415         (scoped_finish_thread_state): New class.
8416         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8417         cleanup.
8418         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8419         (fetch_inferior_event, normal_stop): Likewise.
8420         * thread.c (finish_thread_state_cleanup): Delete.
8421
8422 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8423             Pedro Alves  <palves@redhat.com>
8424
8425         * value.c: Include "selftest.h" and "common/array-view.h".
8426         (struct range) <operator ==>: New.
8427         (test_ranges_contain): New.
8428         (check_ranges_vector): New.
8429         (test_insert_into_bit_range_vector): New.
8430         (_initialize_values): Register selftests.
8431         * common/array-view.h (operator==, operator!=): New.
8432
8433 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8434
8435         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8436         an iterator.
8437         * inline-frame.c: Include <algorithm>.
8438         (struct inline_state): Add constructor.
8439         (inline_state_s): Remove.
8440         (DEF_VEC_O(inline_state_s)): Remove.
8441         (inline_states): Change type to std::vector.
8442         (find_inline_frame_state): Adjust to std::vector.
8443         (allocate_inline_frame_state): Remove.
8444         (clear_inline_frame_state): Adjust to std::vector.
8445         (skip_inline_frames): Adjust to std::vector.
8446
8447 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8448
8449         * tracepoint.h (struct trace_state_variable): Add constructor.
8450         <name>: Change type to std::string.
8451         * tracepoint.c (tsv_s): Remove.
8452         (DEF_VEC_O(tsv_s)): Remove.
8453         (tvariables): Change to std::vector.
8454         (create_trace_state_variable): Adjust to std::vector.
8455         (find_trace_state_variable): Likewise.
8456         (find_trace_state_variable_by_number): Likewise.
8457         (delete_trace_state_variable): Likewise.
8458         (trace_variable_command): Adjust to std::string.
8459         (delete_trace_variable_command): Likewise.
8460         (tvariables_info_1): Adjust to std::vector.
8461         (save_trace_state_variables): Likewise.
8462         (start_tracing): Likewise.
8463         (merge_uploaded_trace_state_variables): Adjust to std::vector
8464         and std::string.
8465         * target.h (struct target_ops)
8466         <to_download_trace_state_variable>: Pass reference to
8467         trace_state_variable.
8468         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8469         * target-delegates.c: Re-generate.
8470         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8471         (mi_tsv_deleted): Likewise.
8472         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8473         * remote.c (remote_download_trace_state_variable): Change
8474         pointer to reference and adjust.
8475         * make-target-delegates (parse_argtypes): Handle references.
8476         (write_function_header): Likewise.
8477         (munge_type): Likewise.
8478
8479 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8480
8481         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8482         string_view-selftests.c.
8483         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8484         testsuite.
8485         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8486         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8487         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8488         * unittests/basic_string_view/element_access/char/1.cc:
8489         Likewise.
8490         * unittests/basic_string_view/element_access/char/empty.cc:
8491         Likewise.
8492         * unittests/basic_string_view/element_access/char/front_back.cc:
8493         Likewise.
8494         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8495         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8496         Likewise.
8497         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8498         Likewise.
8499         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8500         Likewise.
8501         * unittests/basic_string_view/operations/compare/char/1.cc:
8502         Likewise.
8503         * unittests/basic_string_view/operations/compare/char/13650.cc:
8504         Likewise.
8505         * unittests/basic_string_view/operations/copy/char/1.cc:
8506         Likewise.
8507         * unittests/basic_string_view/operations/data/char/1.cc:
8508         Likewise.
8509         * unittests/basic_string_view/operations/find/char/1.cc:
8510         Likewise.
8511         * unittests/basic_string_view/operations/find/char/2.cc:
8512         Likewise.
8513         * unittests/basic_string_view/operations/find/char/3.cc:
8514         Likewise.
8515         * unittests/basic_string_view/operations/find/char/4.cc:
8516         Likewise.
8517         * unittests/basic_string_view/operations/rfind/char/1.cc:
8518         Likewise.
8519         * unittests/basic_string_view/operations/rfind/char/2.cc:
8520         Likewise.
8521         * unittests/basic_string_view/operations/rfind/char/3.cc:
8522         Likewise.
8523         * unittests/basic_string_view/operations/substr/char/1.cc:
8524         Likewise.
8525         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8526         * unittests/string_view-selftests.c: New file.
8527
8528 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8529
8530         * unittests/basic_string_view/capacity/1.cc: New file.
8531         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8532         * unittests/basic_string_view/cons/char/1.cc: New file.
8533         * unittests/basic_string_view/cons/char/2.cc: New file.
8534         * unittests/basic_string_view/cons/char/3.cc: New file.
8535         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8536         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8537         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8538         * unittests/basic_string_view/element_access/char/1.cc: New file.
8539         * unittests/basic_string_view/element_access/char/2.cc: New file.
8540         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8541         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8542         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8543         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8544         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8545         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8546         * unittests/basic_string_view/include.cc: New file.
8547         * unittests/basic_string_view/inserters/char/1.cc: New file.
8548         * unittests/basic_string_view/inserters/char/2.cc: New file.
8549         * unittests/basic_string_view/inserters/char/3.cc: New file.
8550         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8551         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8552         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8553         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8554         * unittests/basic_string_view/literals/types.cc: New file.
8555         * unittests/basic_string_view/literals/values.cc: New file.
8556         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8557         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8558         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8559         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8560         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8561         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8562         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8563         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8564         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8565         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8566         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8567         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8568         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8569         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8570         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8571         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8572         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8573         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8574         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8575         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8576         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8577         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8578         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8579         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8580         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8581         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8582         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8583         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8584         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8585         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8586         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8587         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8588         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8589         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8590         * unittests/basic_string_view/operators/char/2.cc: New file.
8591         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8592         * unittests/basic_string_view/range_access/char/1.cc: New file.
8593         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8594         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8595         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8596         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8597         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8598         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8599         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8600         * unittests/basic_string_view/typedefs.cc: New file.
8601         * unittests/basic_string_view/types/1.cc: New file.
8602
8603 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8604
8605         * common/gdb_string_view.h: Remove libstdc++ implementation
8606         details, adjust to gdb reality.
8607         * common/gdb_string_view.tcc: Likewise.
8608         * cli/cli-script.c (struct string_view): Remove.
8609         (user_args) <m_args>: Change element type to gdb::string_view.
8610         (user_args::insert_args): Adjust.
8611
8612 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8613
8614         * common/gdb_string_view.h: New file.
8615         * common/gdb_string_view.tcc: New file.
8616
8617 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8618
8619         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8620         * configure: Re-generate.
8621
8622 2018-04-09  Pedro Alves  <palves@redhat.com>
8623
8624         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8625         (set_target_gdbarch): Call
8626         gdb::observers::architecture_changed.notify instead of
8627         observer_notify_architecture_changed.
8628
8629 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8630
8631         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8632         (do_restore_current_traceframe_cleanup): Remove.
8633         (restore_current_traceframe_cleanup_dtor): Remove.
8634         (make_cleanup_restore_current_traceframe): Remove.
8635         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8636         New.
8637         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8638         * infrun.c (fetch_inferior_event): Use
8639         scoped_restore_current_traceframe.
8640
8641 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8642
8643         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8644         Remove.
8645         <n_allocated_type_units>: Remove.
8646         <all_type_units>: Change to std::vector.
8647         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8648         to std::vector change.
8649         (dwarf2_per_objfile::get_cutu): Likewise.
8650         (dwarf2_per_objfile::get_tu): Likewise.
8651         (create_signatured_type_table_from_index): Likewise.
8652         (create_signatured_type_table_from_debug_names): Likewise.
8653         (dw2_symtab_iter_next): Likewise.
8654         (dw2_print_stats): Likewise.
8655         (dw2_expand_all_symtabs): Likewise.
8656         (dw2_expand_marked_cus): Likewise.
8657         (dw2_debug_names_iterator::next): Likewise.
8658         (dwarf2_initialize_objfile): Likewise.
8659         (add_signatured_type_cu_to_table): Likewise.
8660         (create_all_type_units): Likewise.
8661         (add_type_unit): Likewise.
8662         (struct tu_abbrev_offset): Add constructor.
8663         (build_type_psymtabs_1): Adjust to std::vector change.
8664         (print_tu_stats): Likewise.
8665         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8666         (write_debug_names): Likewise.
8667
8668 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8669
8670         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8671         Make an std::vector.
8672         <n_comp_units>: Remove.
8673         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8674         to std::vector change.
8675         (dwarf2_per_objfile::get_cutu): Likewise.
8676         (dwarf2_per_objfile::get_cu): Likewise.
8677         (create_cus_from_index): Likewise.
8678         (create_addrmap_from_index): Likewise.
8679         (create_addrmap_from_aranges): Likewise.
8680         (dwarf2_read_index): Likewise.
8681         (dw2_find_last_source_symtab): Likewise.
8682         (dw2_map_symtabs_matching_filename): Likewise.
8683         (dw2_symtab_iter_next): Likewise.
8684         (dw2_print_stats): Likewise.
8685         (dw2_expand_all_symtabs): Likewise.
8686         (dw2_expand_symtabs_with_fullname): Likewise.
8687         (dw2_expand_marked_cus): Likewise.
8688         (dw2_map_symbol_filenames): Likewise.
8689         (create_cus_from_debug_names): Likewise.
8690         (dwarf2_read_debug_names): Likewise.
8691         (dw2_debug_names_iterator::next): Likewise.
8692         (dwarf2_initialize_objfile): Likewise.
8693         (set_partial_user): Likewise.
8694         (dwarf2_build_psymtabs_hard): Likewise.
8695         (read_comp_units_from_section): Remove arguments, adjust to
8696         std::vector change.
8697         (create_all_comp_units): Adjust to std::vector and
8698         read_comp_units_from_section changes.
8699         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8700         change.
8701         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8702         (psyms_seen_size): Likewise.
8703         (write_gdbindex): Likewise.
8704         (write_debug_names): Likewise.
8705
8706 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8707
8708         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8709         with dwarf2_per_objfile.
8710         (create_cus_from_index): Likewise.
8711         (create_signatured_type_table_from_index): Likewise.
8712         (dwarf2_read_index): Likewise.
8713         (dwarf2_initialize_objfile): Likewise.
8714         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8715         per_cu rather than get_dwarf2_per_objfile.
8716
8717 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8718
8719         * dwarf2read.h (struct signatured_type): Forward declare.
8720         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8721         New methods.
8722         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8723         (dw2_get_cutu): ...this.
8724         (dwarf2_per_objfile::get_cu): Rename from...
8725         (dw2_get_cu): ...this.
8726         (dwarf2_per_objfile::get_tu): New.
8727         (create_addrmap_from_index): Adjust.
8728         (create_addrmap_from_aranges): Adjust.
8729         (dw2_find_last_source_symtab): Adjust.
8730         (dw2_map_symtabs_matching_filename): Adjust.
8731         (dw2_symtab_iter_next): Adjust.
8732         (dw2_print_stats): Adjust.
8733         (dw2_expand_all_symtabs): Adjust.
8734         (dw2_expand_symtabs_with_fullname): Adjust.
8735         (dw2_expand_marked_cus): Adjust.
8736         (dw_expand_symtabs_matching_file_matcher): Adjust.
8737         (dw2_map_symbol_filenames): Adjust.
8738         (dw2_debug_names_iterator::next): Adjust.
8739         (dwarf2_initialize_objfile): Adjust.
8740         (set_partial_user): Adjust.
8741         (dwarf2_build_psymtabs_hard): Adjust.
8742
8743 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8744
8745         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8746         Remove unused variables.
8747         (dw2_map_symtabs_matching_filename): Likewise.
8748         (dwarf2_record_block_ranges): Likewise.
8749         (dwarf2_read_addr_index): Likewise.
8750         (follow_die_offset): Likewise.
8751
8752 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8753
8754         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8755         to symbol_file_add_main.
8756
8757 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8758
8759         PR mi/22299
8760         * mi/mi-console.c (do_fputc_async_safe): New.
8761         (mi_console_file::write_async_safe): New.
8762         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8763         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8764         New.
8765         * ui-file.c (ui_file::putstrn): Adjust call to
8766         fputstrn_unfiltered.
8767         * utils.c (printchar): Replace do_fputs and do_fprintf
8768         parameters by do_fputc.
8769         (fputstr_filtered): Adjust call to printchar.
8770         (fputstr_unfiltered): Likewise.
8771         (fputstrn_filtered): Likewise.
8772         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8773         printchar.
8774         * utils.h (do_fputc_ftype): New typedef.
8775         (fputstrn_unfiltered): Add do_fputc parameter.
8776
8777 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8778
8779         * regformats/i386/i386-avx.dat: Remove.
8780
8781 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8782
8783         PR gdb/22979
8784         * amd64-tdep.c (amd64_none_init_abi): New function.
8785         (amd64_x32_none_init_abi): New function.
8786         (_initialize_amd64_tdep): Register handlers for x86-64 and
8787         x64_32 with GDB_OSABI_NONE.
8788         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8789         GDB_OSABI_NONE osabi.
8790
8791 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8792
8793         PR gdb/22980
8794         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8795         GDB_OSABI_NONE.
8796         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8797         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8798
8799 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8800
8801         * common/byte-vector.h (char_vector): New type.
8802         * target.h (target_read_alloc): Return
8803         gdb::optional<byte_vector>.
8804         (target_read_stralloc): Return gdb::optional<char_vector>.
8805         (target_get_osdata): Return gdb::optional<char_vector>.
8806         * target.c (target_read_alloc_1): Templatize.  Replacement
8807         manual memory management with vector.
8808         (target_read_alloc): Change return type, adjust.
8809         (target_read_stralloc): Change return type, adjust.
8810         (target_get_osdata): Change return type, adjust.
8811         * auxv.c (struct auxv_info) <length>: Remove.
8812         <data>: Change type to gdb::optional<byte_vector>.
8813         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8814         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8815         (target_auxv_search): Adjust.
8816         (fprint_target_auxv): Adjust.
8817         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8818         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8819         (linux_make_corefile_notes): Adjust.
8820         * osdata.c (get_osdata): Adjust.
8821         * remote.c (remote_get_threads_with_qxfer): Adjust.
8822         (remote_memory_map): Adjust.
8823         (remote_traceframe_info): Adjust.
8824         (btrace_read_config): Adjust.
8825         (remote_read_btrace): Adjust.
8826         (remote_pid_to_exec_file): Adjust.
8827         * solib-aix.c (solib_aix_get_library_list): Adjust.
8828         * solib-dsbt.c (decode_loadmap): Don't free buf.
8829         (dsbt_get_initial_loadmaps): Adjust.
8830         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8831         * solib-target.c (solib_target_current_sos): Adjust.
8832         * tracepoint.c (sdata_make_value): Adjust.
8833         * xml-support.c (xinclude_start_include): Adjust.
8834         (xml_fetch_content_from_file): Adjust.
8835         * xml-support.h (xml_fetch_another): Change return type.
8836         (xml_fetch_content_from_file): Change return type.
8837         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8838         * xml-tdesc.c (file_read_description_xml): Adjust.
8839         (fetch_available_features_from_target): Change return type.
8840         (target_fetch_description_xml): Adjust.
8841         (target_read_description_xml): Adjust.
8842
8843 2018-04-06  Tom Tromey  <tom@tromey.com>
8844
8845         * value.c (~value): Update.
8846         (struct value) <contents>: Now unique_xmalloc_ptr.
8847         (value_contents_bits_eq, allocate_value_contents)
8848         (value_contents_raw, value_contents_all_raw)
8849         (value_contents_for_printing, value_contents_for_printing_const)
8850         (set_value_enclosing_type): Update.
8851
8852 2018-04-06  Tom Tromey  <tom@tromey.com>
8853
8854         * value.c (range_s): Remove typedef, VEC.
8855         (struct range): Add operator<.
8856         (range_lessthan): Remove.
8857         (ranges_contain): Change type.
8858         (~value): Update.
8859         (struct value) <unavailable, optimized_out>: Now std::vector.
8860         (value_entirely_available)
8861         (value_entirely_covered_by_range_vector)
8862         (value_entirely_unavailable, value_entirely_optimized_out):
8863         Update.
8864         (insert_into_bit_range_vector): Change argument type.
8865         (find_first_range_overlap): Likewise.
8866         (struct ranges_and_idx, value_contents_bits_eq)
8867         (require_not_optimized_out, require_available): Update.
8868         (ranges_copy_adjusted): Change argument types.
8869         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8870
8871 2018-04-06  Tom Tromey  <tom@tromey.com>
8872
8873         * value.c (~value): Update.
8874         (struct value) <parent>: Now a value_ref_ptr.
8875         (value_parent, set_value_parent, value_address, value_copy):
8876         Update.
8877
8878 2018-04-06  Tom Tromey  <tom@tromey.com>
8879
8880         * value.c (struct value): Add constructor, destructor, and member
8881         initializers.
8882         (allocate_value_lazy, value_decref): Update.
8883
8884 2018-04-06  Tom Tromey  <tom@tromey.com>
8885
8886         * value.c (struct value) <released, next>: Remove.
8887         (all_values): Now a std::vector.
8888         (allocate_value_lazy): Update.
8889         (value_next): Remove.
8890         (value_mark, value_free_to_mark, release_value)
8891         (value_release_to_mark): Update.
8892
8893 2018-04-06  Tom Tromey  <tom@tromey.com>
8894
8895         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8896         (free_value_chain): Remove.
8897         * value.c (free_value_chain): Remove.
8898         (value_release_to_mark): Return a std::vector.
8899         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8900         std::vector.
8901         (check_condition): Update.
8902         * eval.c (fetch_subexp_value): Change "val_chain" to a
8903         std::vector.
8904         * breakpoint.c (update_watchpoint): Update.
8905         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8906
8907 2018-04-06  Tom Tromey  <tom@tromey.com>
8908
8909         * value.h (free_all_values): Remove.
8910         * value.c (free_all_values): Remove.
8911
8912 2018-04-06  Tom Tromey  <tom@tromey.com>
8913
8914         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8915         (value_history_chain, value_history_count): Remove.
8916         (value_history): New global.
8917         (record_latest_value, access_value_history, show_values)
8918         (preserve_values): Update.
8919
8920 2018-04-06  Tom Tromey  <tom@tromey.com>
8921
8922         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8923         * varobj.c (varobj_set_display_format, varobj_set_value)
8924         (install_default_visualizer, construct_visualizer)
8925         (install_new_value, ~varobj, varobj_get_value_type)
8926         (my_value_of_variable, varobj_editable_p): Update.
8927         * c-varobj.c (c_describe_child, c_value_of_variable)
8928         (cplus_number_of_children, cplus_describe_child): Update.
8929         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8930         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8931         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8932
8933 2018-04-06  Tom Tromey  <tom@tromey.com>
8934
8935         * printcmd.c (last_examine_address): Change type to
8936         value_ref_ptr.
8937         (do_examine, x_command): Update.
8938
8939 2018-04-06  Tom Tromey  <tom@tromey.com>
8940
8941         * value.c (release_value): Update.
8942         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8943         (struct bpstats) <val>: Now a value_ref_ptr.
8944         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8945         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8946         (~watchpoint, print_it_watchpoint, watch_command_1)
8947         (invalidate_bp_value_on_memory_change): Update.
8948
8949 2018-04-06  Tom Tromey  <tom@tromey.com>
8950
8951         * varobj.c (varobj_clear_saved_item)
8952         (update_dynamic_varobj_children, install_new_value, ~varobj):
8953         Update.
8954         * value.h (value_incref): Move declaration earlier.
8955         (value_decref): Rename from value_free.
8956         (struct value_ref_policy): New.
8957         (value_ref_ptr): New typedef.
8958         (struct value_deleter): Remove.
8959         (gdb_value_up): Remove typedef.
8960         (release_value): Change return type.
8961         (release_value_or_incref): Remove.
8962         * value.c (set_value_parent): Update.
8963         (value_incref): Change return type.
8964         (value_decref): Rename from value_free.
8965         (value_free_to_mark, free_all_values, free_value_chain): Update.
8966         (release_value): Return value_ref_ptr.
8967         (release_value_or_incref): Remove.
8968         (record_latest_value, set_internalvar, clear_internalvar):
8969         Update.
8970         * stack.c (info_frame_command): Don't call value_free.
8971         * python/py-value.c (valpy_dealloc, valpy_new)
8972         (value_to_value_object): Update.
8973         * printcmd.c (do_examine): Update.
8974         * opencl-lang.c (lval_func_free_closure): Update.
8975         * mi/mi-main.c (register_changed_p): Don't call value_free.
8976         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8977         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8978         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8979         value_free.
8980         * guile/scm-value.c (vlscm_free_value_smob)
8981         (vlscm_scm_from_value): Update.
8982         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8983         (frame_unwind_register_unsigned, get_frame_register_bytes)
8984         (put_frame_register_bytes): Don't call value_free.
8985         * findvar.c (address_from_register): Don't call value_free.
8986         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8987         * dwarf2loc.c (entry_data_value_free_closure)
8988         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8989         (dwarf2_evaluate_loc_desc_full): Update.
8990         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8991         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8992         (~watchpoint, watch_command_1)
8993         (invalidate_bp_value_on_memory_change): Update.
8994         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8995
8996 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
8997
8998         PR gdb/23022
8999         * warning.m4: Add -Wno-error=deprecated-register.
9000         * configure: Re-generate.
9001
9002 2018-04-05  Tom Tromey  <tom@tromey.com>
9003
9004         * linespec.h: Remove include of "vec.h".
9005
9006 2018-04-05  Tom Tromey  <tom@tromey.com>
9007
9008         * linespec.c (typep): Remove typedef.
9009         (find_methods, find_superclass_methods): Take a std::vector.
9010         (find_method): Use std::vector.
9011
9012 2018-04-05  Tom Tromey  <tom@tromey.com>
9013
9014         * utils.c (compare_strings): Remove.
9015         * utils.h (compare_strings): Remove.
9016         * objc-lang.h (find_imps): Update.
9017         * objc-lang.c (find_methods): Take a std::vector.
9018         (uniquify_strings, find_imps): Likewise.
9019         * linespec.c (find_methods): Take a std::vector.
9020         (decode_objc): Use std::vector.
9021         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9022         a std::vector.
9023         (find_method, find_function_symbols): Use std::vector.
9024
9025 2018-04-05  Tom Tromey  <tom@tromey.com>
9026
9027         * completer.c (completion_tracker::completion_tracker): Remove
9028         cast.
9029         (completion_tracker::discard_completions): Likewise.
9030         * breakpoint.c (ambiguous_names_p): Remove cast.
9031         * ada-lang.c (_initialize_ada_language): Remove cast.
9032         * utils.h (streq): Update.
9033         (streq_hash): Add new declaration.
9034         * utils.c (streq): Return bool.
9035         (streq_hash): New function.
9036
9037 2018-04-05  Tom Tromey  <tom@tromey.com>
9038
9039         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9040         Remove a string copy.
9041
9042 2018-04-05  Tom Tromey  <tom@tromey.com>
9043
9044         * linespec.c (filter_results): Use std::vector.
9045         (decode_line_2, decode_line_full): Update.
9046
9047 2018-04-05  Tom Tromey  <tom@tromey.com>
9048
9049         * linespec.c (canonical_to_fullform): Return std::string.
9050         (filter_results): Update.
9051         (struct decode_line_2_item): Add constructor.
9052         <fullform, displayform>: Now std::string.
9053         (decode_line_2_compare_items): Now a std::sort comparator.
9054         (decode_line_2): Update.
9055
9056 2018-04-05  Tom Tromey  <tom@tromey.com>
9057
9058         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9059         (unexpected_linespec_error): Update.
9060         (linespec_parse_basic, parse_linespec): Update.
9061
9062 2018-04-05  Tom Tromey  <tom@tromey.com>
9063
9064         * linespec.c (linespec_parse_basic): Reindent.
9065
9066 2018-04-05  Tom Tromey  <tom@tromey.com>
9067
9068         * minsyms.h (iterate_over_minimal_symbols): Update.
9069         * minsyms.c (iterate_over_minimal_symbols): Take a
9070         gdb::function_view.
9071         * linespec.c (struct collect_minsyms): Remove.
9072         (compare_msyms): Now a std::sort comparator.
9073         (add_minsym): Add parameters.
9074         (search_minsyms_for_name): Update.  Use std::vector.
9075
9076 2018-04-03  Tom Tromey  <tom@tromey.com>
9077
9078         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9079         gdb::byte_vector.
9080
9081 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9082
9083         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9084
9085 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9086
9087         PR gdb/16959
9088         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9089         printing static type.
9090
9091 2018-04-01  Tom Tromey  <tom@tromey.com>
9092
9093         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9094         (rs6000_xfer_shared_libraries): Update.
9095
9096 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9097
9098         * common/gdb_vecs.h (char_ptr): Remove.
9099         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9100
9101 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9102
9103         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9104         with std::vector.
9105         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9106
9107 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9108
9109         * tracepoint.h (struct uploaded_tp): Initialize fields.
9110         <actions, step_actions, cmd_strings>: Change type to
9111         std::vector<char *>.
9112         * tracepoint.c (get_uploaded_tp): Allocate with new.
9113         (free_uploaded_tps): Free with delete.
9114         (parse_tracepoint_definition): Adjust to std::vector change.
9115         * breakpoint.c (read_uploaded_action): Likewise.
9116         (create_tracepoint_from_upload): Likewise.
9117         * ctf.c (ctf_write_uploaded_tp): Likewise.
9118         (SET_ARRAY_FIELD): Likewise.
9119         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9120
9121 2018-03-30  Tom Tromey  <tom@tromey.com>
9122
9123         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9124         std::unique_ptr.
9125         (svr4_keep_data_in_core): Update.
9126         (svr4_read_so_list): Update.
9127
9128 2018-03-30  Tom Tromey  <tom@tromey.com>
9129
9130         * windows-nat.c (handle_output_debug_string, handle_exception):
9131         Update.
9132         * target.h (target_read_string): Update.
9133         * target.c (target_read_string): Change "string" to
9134         unique_xmalloc_ptr.
9135         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9136         Update.
9137         * solib-frv.c (frv_current_sos): Update.
9138         * solib-dsbt.c (dsbt_current_sos): Update.
9139         * solib-darwin.c (darwin_current_sos): Update.
9140         * linux-thread-db.c (inferior_has_bug): Update.
9141         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9142         Update.  Remove alloca.
9143         * ada-lang.c (ada_main_name): Update.
9144
9145 2018-03-30  Tom Tromey  <tom@tromey.com>
9146
9147         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9148         (struct dwo_file_deleter): New.
9149         (dwo_file_up): New typedef.
9150         (open_and_init_dwo_file): Use dwo_file_up.
9151         (free_dwo_file_cleanup): Remove.
9152
9153 2018-03-30  Tom Tromey  <tom@tromey.com>
9154
9155         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9156         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9157
9158 2018-03-30  Tom Tromey  <tom@tromey.com>
9159
9160         * dwarf2read.c (class free_cached_comp_units): New class.
9161         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9162         (free_cached_comp_units): Remove function.
9163
9164 2018-03-30  Tom Tromey  <tom@tromey.com>
9165
9166         * utils.h (make_cleanup_unpush_target): Remove.
9167         * inf-ptrace.c (struct target_unpusher): New.
9168         (target_unpush_up) New typedef.
9169         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9170         target_unpush_up.
9171         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9172
9173 2018-03-27  Tom Tromey  <tom@tromey.com>
9174
9175         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9176
9177 2018-03-27  Pedro Alves  <palves@redhat.com>
9178             Tom Tromey  <tom@tromey.com>
9179
9180         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9181         destructor.  Now a class.
9182         (gdb_readline_wrapper_cleanup): Remove function.
9183         (gdb_readline_wrapper): Remove cleanups.
9184
9185 2018-03-27  Tom Tromey  <tom@tromey.com>
9186
9187         * typeprint.h (struct type_print_options) <local_typedefs,
9188         global_typedefs>: Remove "struct" keyword.
9189         (class typedef_hash_table): New class.
9190         (recursively_update_typedef_hash, add_template_parameters)
9191         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9192         (find_typedef_in_hash): Don't declare.
9193         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9194         (typedef_hash_table::recursively_update): Rename from
9195         recursively_update_typedef_hash.  Now a member.
9196         (typedef_hash_table::add_template_parameters): Rename from
9197         add_template_parameters.  Now a member.
9198         (typedef_hash_table::typedef_hash_table): Now a constructor;
9199         rename from create_typedef_hash.
9200         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9201         rename from free_typedef_hash.
9202         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9203         (do_free_global_table): Remove.
9204         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9205         from copy_type_recursive.
9206         (create_global_typedef_table): Remove.
9207         (typedef_hash_table::find_global_typedef): Now a member of
9208         typedef_hash_table.
9209         (typedef_hash_table::find_typedef): Rename from
9210         find_typedef_in_hash; now a member.
9211         (whatis_exp): Update.
9212         * extension.h (struct ext_lang_type_printers): Add constructor and
9213         destructor.
9214         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9215         declare.
9216         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9217         Now a constructor; rename from start_ext_lang_type_printers.
9218         (ext_lang_type_printers): Now a destructor; rename from
9219         free_ext_lang_type_printers.
9220         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9221         Update.
9222         (c_type_print_base_struct_union): Update.  Remove cleanups.
9223
9224 2018-03-27  Tom Tromey  <tom@tromey.com>
9225
9226         * dwarf-index-write.c: Include <cmath>.
9227
9228 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9229
9230         * NEWS: Add entry describing new "set|show varsize-limit" command.
9231         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9232         command.
9233         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9234         "set variable".
9235
9236 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9237
9238         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9239         dwarf-index-write.c
9240         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9241         * dwarf-index-common.c: New file.
9242         * dwarf-index-common.h: New file.
9243         * dwarf-index-write.c: New file.
9244         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9245         (struct dwarf2_section_info): Move from here.
9246         (dwarf2_section_info_def): Likewise.
9247         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9248         (offset_type): Likewise.
9249         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9250         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9251         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9252         (byte_swap): Likewise.
9253         (MAYBE_SWAP): Likewise.
9254         (dwarf2_per_cu_ptr): Likewise.
9255         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9256         (struct tu_stats): Likewise.
9257         (struct dwarf2_per_objfile): Likewise.
9258         (struct dwarf2_per_cu_data): Likewise.
9259         (struct signatured_type): Likewise.
9260         (sig_type_ptr): Likewise.
9261         (DEF_VEC_P (sig_type_ptr)): Likewise.
9262         (INDEX4_SUFFIX): Likewise.
9263         (INDEX5_SUFFIX): Likewise.
9264         (DEBUG_STR_SUFFIX): Likewise.
9265         (dwarf2_read_section): Make non-static.
9266         (mapped_index_string_hash): Move from here.
9267         (dwarf5_djb_hash): Likewise.
9268         (file_write): Likewise.
9269         (class data_buf): Likewise.
9270         (struct symtab_index_entry): Likewise.
9271         (struct mapped_symtab): Likewise.
9272         (find_slot): Likewise.
9273         (hash_expand): Likewise.
9274         (add_index_entry): Likewise.
9275         (uniquify_cu_indices): Likewise.
9276         (class c_str_view): Likewise.
9277         (class c_str_view_hasher): Likewise.
9278         (class vector_hasher): Likewise.
9279         (write_hash_table): Likewise.
9280         (psym_index_map): Likewise.
9281         (struct addrmap_index_data): Likewise.
9282         (add_address_entry): Likewise.
9283         (add_address_entry_worker): Likewise.
9284         (write_address_map): Likewise.
9285         (symbol_kind): Likewise.
9286         (write_psymbols): Likewise.
9287         (struct signatured_type_index_data): Likewise.
9288         (write_one_signatured_type): Likewise.
9289         (recursively_count_psymbols): Likewise.
9290         (recursively_write_psymbols): Likewise.
9291         (class debug_names): Likewise.
9292         (check_dwarf64_offsets): Likewise.
9293         (psyms_seen_size): Likewise.
9294         (write_gdbindex): Likewise.
9295         (write_debug_names): Likewise.
9296         (assert_file_size): Likewise.
9297         (write_psymtabs_to_index): Likewise.
9298         (save_gdb_index_command): Likewise.
9299         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9300         command.
9301         * dwarf2read.h: New file.
9302
9303 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9304
9305         PR gdb/22670
9306         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9307         symbol name if the CU's language stores symbol names in linkage
9308         format.
9309         * language.h (struct language_defn)
9310         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9311         all instances of this struct.
9312
9313 2018-03-26  Tom Tromey  <tom@tromey.com>
9314
9315         * stack.c (backtrace_command_1): Remove verbose code.
9316
9317 2018-03-26  Tom Tromey  <tom@tromey.com>
9318
9319         * python/py-framefilter.c (py_print_type): Don't catch
9320         exceptions.  Return void.
9321         (py_print_value): Likewise.
9322         (py_print_single_arg): Likewise.
9323         (enumerate_args): Don't catch exceptions.
9324         (py_print_args): Likewise.
9325         (py_print_frame): Likewise.
9326         (gdbpy_apply_frame_filter): Catch exceptions here.
9327
9328 2018-03-26  Tom Tromey  <tom@tromey.com>
9329
9330         * stack.c (_initialize_stack): Remove trailing newlines from help
9331         text.  Add "Usage" line to "backtrace" help.
9332
9333 2018-03-26  Tom Tromey  <tom@tromey.com>
9334
9335         PR python/16486:
9336         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9337
9338 2018-03-26  Tom Tromey  <tom@tromey.com>
9339
9340         * python/py-framefilter.c (py_print_single_arg): Return
9341         EXT_LANG_BT_ERROR from catch.
9342
9343 2018-03-26  Tom Tromey  <tom@tromey.com>
9344
9345         PR backtrace/15584:
9346         * stack.c (backtrace_command_1): Move some code into no-filters
9347         "if".
9348
9349 2018-03-26  Tom Tromey  <tom@tromey.com>
9350
9351         * python/py-framefilter.c (throw_quit_or_print_exception): New
9352         function.
9353         (gdbpy_apply_frame_filter): Use it.
9354
9355 2018-03-26  Tom Tromey  <tom@tromey.com>
9356
9357         PR cli/17716:
9358         * python/py-framefilter.c (py_print_type, py_print_value)
9359         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9360         RETURN_MASK_ERROR.
9361
9362 2018-03-26  Tom Tromey  <tom@tromey.com>
9363
9364         * python/py-framefilter.c (enumerate_args): Use
9365         gdb::unique_xmalloc_ptr.
9366
9367 2018-03-26  Tom Tromey  <tom@tromey.com>
9368
9369         * python/py-framefilter.c (py_print_frame): Return
9370         EXT_LANG_BT_OK.
9371         (gdbpy_apply_frame_filter): Update comment.
9372         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9373         Remove.
9374         <EXT_LANG_BT_NO_FILTERS>: Change value.
9375
9376 2018-03-26  Tom Tromey  <tom@tromey.com>
9377
9378         PR backtrace/15582:
9379         * stack.c (backtrace_command): Parse "hide" argument.
9380         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9381         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9382         constant.
9383
9384 2018-03-26  Tom Tromey  <tom@tromey.com>
9385
9386         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9387         add "flags".
9388         (backtrace_command): Remove "fulltrace", add "flags".
9389
9390 2018-03-26  Tom Tromey  <tom@tromey.com>
9391
9392         * stack.c (backtrace_command): Rewrite command line parsing.
9393
9394 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9395
9396         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9397
9398 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9399
9400         * filename-seen-cache.h: Add include guard.
9401
9402 2018-03-26  Keith Seitz  <keiths@redhat.com>
9403
9404         * symfile.c (place_section): Remove "struct" from section_addr_info
9405         in comment.
9406         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9407         "struct" keyword from section_addr_info.
9408
9409 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9410
9411         * regformats/regdef.h (reg): Add constructors.
9412
9413 2018-03-25  Pedro Alves  <palves@redhat.com>
9414
9415         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9416         if then/else bodies in var_func_name extraction.
9417
9418 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9419
9420         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9421         lookup_minimal_symbol() to find symbol entry.
9422         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9423
9424 2018-03-23  Keith Seitz  <keiths@redhat.com>
9425
9426         PR c++/22968
9427         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9428         nested type definitions for C++, too.
9429
9430 2018-03-23  Tom Tromey  <tom@tromey.com>
9431
9432         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9433         a typedef.
9434         (macho_register_oso): Remove.
9435         (macho_symtab_read): Take a std::vector.
9436         (oso_el_compare_name): Now a std::sort comparator.
9437         (macho_symfile_read_all_oso): Take a std::vector.
9438         (macho_symfile_read): Use std::vector.  Remove cleanups.
9439
9440 2018-03-22  Tom Tromey  <tom@tromey.com>
9441
9442         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9443         (record_full_goto_bookmark): Use std::string.
9444
9445 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9446
9447         PR tdep/18295
9448         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9449         a single mask.
9450
9451 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9452
9453         * rs6000-tdep.c (store_insn_p): New function.
9454         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9455         and cr_reg to their unshifted values. Use store_insn_p to
9456         match LR saves using either R1 or fdata->alloca_reg. Use
9457         store_insn_p to match CR saves. Set alloca_reg_offset
9458         when alloca_reg and framep are set. Remove lr_reg shift
9459         when assigning to fdata->lr_register.
9460
9461 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9462
9463         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9464         command line args instead of emitting a warning.
9465
9466 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9467
9468         * tracepoint.h (struct static_tracepoint_marker): Initialize
9469         fields, define default constructor, move constructor and move
9470         assignment, disable the rest.
9471         <str_id, extra>: Make std::string.
9472         (release_static_tracepoint_marker): Remove.
9473         (free_current_marker): Remove.
9474         * tracepoint.c (free_current_marker): Remove.
9475         (parse_static_tracepoint_marker_definition): Adjust to
9476         std::string, use new hex2str overload.
9477         (release_static_tracepoint_marker): Remove.
9478         (print_one_static_tracepoint_marker): Get marker by reference
9479         and adjust to std::string.
9480         (info_static_tracepoint_markers_command): Adjust to std::vector
9481         changes
9482         * target.h (static_tracepoint_marker_p): Remove typedef.
9483         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9484         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9485         bool.
9486         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9487         * target-debug.h
9488         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9489         (target_debug_print_std_vector_static_tracepoint_marker): New.
9490         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9491         to...
9492         (target_debug_print_static_tracepoint_marker_p): ... this.
9493         * target-delegates.c: Re-generate.
9494         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9495         Make std::string.
9496         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9497         (decode_static_tracepoint_spec): Adjust to std::vector.
9498         (tracepoint_print_one_detail): Adjust to std::string.
9499         (strace_marker_decode_location): Adjust to std::string.
9500         (update_static_tracepoint): Adjust to std::string, remove call
9501         to release_static_tracepoint_marker.
9502         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9503         Adjust to std::vector.
9504         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9505         (remote_static_tracepoint_markers_by_strid): Adjust to
9506         std::vector.
9507         * common/rsp-low.h (hex2str): New overload with explicit count
9508         of bytes.
9509         * common/rsp-low.c (hex2str): New overload with explicit count
9510         of bytes.
9511         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9512         (_initialize_rsp_low_selftests): Add test_hex2str test.
9513         * unittests/tracepoint-selftests.c
9514         (test_parse_static_tracepoint_marker_definition): Adjust to
9515         std::string.
9516
9517 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9518
9519         * tracepoint.c (parse_static_tracepoint_marker_definition):
9520         Consider case where the definition is followed by more
9521         definitions.
9522         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9523         tracepoint-selftests.c.
9524         * unittests/tracepoint-selftests.c: New.
9525
9526 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9527
9528         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9529         Carvalho.
9530
9531 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9532
9533         * symtab.c (find_pc_sect_line): fixed indentation.
9534
9535 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9536
9537         * symtab.c (find_pc_sect_line): now uses binary search.
9538
9539 2018-03-19  Tom Tromey  <tom@tromey.com>
9540
9541         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9542         "IDENT" production.
9543
9544 2018-03-19  Pedro Alves  <palves@redhat.com>
9545             Tom Tromey  <tom@tromey.com>
9546
9547         * unittests/observable-selftests.c: New file.
9548         * common/observable.h: New file.
9549         * observable.h: New file.
9550         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9551         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9552         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9553         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9554         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9555         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9556         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9557         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9558         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9559         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9560         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9561         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9562         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9563         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9564         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9565         tui/tui-interp.c, valops.c: Update all users.
9566         * tui/tui-hooks.c (tui_bp_created_observer)
9567         (tui_bp_deleted_observer, tui_bp_modified_observer)
9568         (tui_inferior_exit_observer, tui_before_prompt_observer)
9569         (tui_normal_stop_observer, tui_register_changed_observer):
9570         Remove.
9571         (tui_observers_token): New global.
9572         (attach_or_detach, tui_attach_detach_observers): New functions.
9573         (tui_install_hooks, tui_remove_hooks): Use
9574         tui_attach_detach_observers.
9575         * record-btrace.c (record_btrace_thread_observer): Remove.
9576         (record_btrace_thread_observer_token): New global.
9577         * observer.sh: Remove.
9578         * observer.c: Rename to observable.c.
9579         * observable.c (namespace gdb_observers): Define new objects.
9580         (observer_debug): Move into gdb_observers namespace.
9581         (struct observer, struct observer_list, xalloc_observer_list_node)
9582         (xfree_observer_list_node, generic_observer_attach)
9583         (generic_observer_detach, generic_observer_notify): Remove.
9584         (_initialize_observer): Update.
9585         Don't include observer.inc.
9586         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9587         (clean mostlyclean): Likewise.
9588         (observer.h, observer.inc): Remove targets.
9589         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9590         (COMMON_SFILES): Use observable.c, not observer.c.
9591         * .gitignore: Remove observer.h.
9592
9593 2018-03-18  Tom Tromey  <tom@tromey.com>
9594
9595         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9596         gdb::def_vector.
9597         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9598
9599 2018-03-17  Tom Tromey  <tom@tromey.com>
9600
9601         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9602
9603 2018-03-17  Tom Tromey  <tom@tromey.com>
9604
9605         * target.c (class scoped_target_fd): New.
9606         (target_fileio_close_cleanup): Remove.
9607         (target_fileio_read_alloc_1): Use scoped_target_fd.
9608
9609 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9610
9611         * silent-rules.mk: New.
9612         * Makefile.in: Include silent-rules.mk
9613         (srcdir, VPATH, top_srcdir): Move up.
9614         (COMPILE): Add ECHO_CXX.
9615         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9616         (init.c): Add ECHO_INIT_C.
9617         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9618         (version.c): Add ECHO_GEN.
9619         (printcmd.o): Add ECHO_CXX.
9620         (target-float.o): Add ECHO_CXX.
9621         (ada-exp.o): Add ECHO_CXX.
9622         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9623         (insight$(EXEEXT)): Add ECHO_CXXLD.
9624         * gnulib/configure.ac: Add AM_SILENT_RULES.
9625         * gnulib/aclocal.m4: Re-generate.
9626         * gnulib/configure: Re-generate.
9627         * gnulib/import/Makefile.in: Re-generate.
9628
9629 2018-03-16  Tom Tromey  <tom@tromey.com>
9630
9631         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9632         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9633         * utils.c (do_free_section_addr_info)
9634         (make_cleanup_free_section_addr_info): Remove.
9635         * symfile.h (struct other_sections): Add constructor.
9636         (struct section_addr_info): Remove.
9637         (section_addr_info): New typedef.
9638         (struct sym_fns) <sym_offsets>: Change type of parameter.
9639         (build_section_addr_info_from_objfile)
9640         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9641         (default_symfile_offsets, symbol_file_add)
9642         (symbol_file_add_from_bfd)
9643         (build_section_addr_info_from_section_table): Update.
9644         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9645         * symfile.c (alloc_section_addr_info): Remove.
9646         (build_section_addr_info_from_section_table): Change return type.
9647         Update.
9648         (build_section_addr_info_from_bfd)
9649         (build_section_addr_info_from_objfile): Likewise.
9650         (free_section_addr_info): Remove.
9651         (relative_addr_info_to_section_offsets): Change type of "addrs".
9652         (addrs_section_compar): Now a std::sort comparator.
9653         (addrs_section_sort): Change return type.
9654         (addr_info_make_relative): Change type of "addrs".  Update.
9655         (default_symfile_offsets, syms_from_objfile_1)
9656         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9657         (symbol_file_add_separate): Update.
9658         (symbol_file_add): Change type of "addrs".  Update.
9659         (add_symbol_file_command): Update.  Remove cleanups.
9660         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9661         cleanups.
9662         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9663         * solib.c (solib_read_symbols): Update.
9664         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9665         * machoread.c (macho_symfile_offsets): Update.
9666         * jit.c (jit_bfd_try_read_symtab): Update.
9667
9668 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9669
9670         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9671         unittests/utils-selftests.c.
9672         * unittests/utils-selftests.c: New file.
9673
9674 2018-03-14  Tom Tromey  <tom@tromey.com>
9675
9676         PR cli/14977:
9677         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9678         for NULL.
9679
9680 2018-03-14  Tom Tromey  <tom@tromey.com>
9681
9682         PR cli/19918:
9683         * printcmd.c (printf_pointer): Allow "-" in format.
9684
9685 2018-03-14  Tom Tromey  <tom@tromey.com>
9686
9687         * printcmd.c (_initialize_printcmd): Add usage to printf.
9688
9689 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9690
9691         * MAINTAINERS: Update my email address.
9692
9693 2018-03-13  Tom Tromey  <tom@tromey.com>
9694
9695         * machoread.c (macho_check_dsym): Change filenamep to a
9696         std::string*.
9697         (macho_symfile_read): Update.
9698         * symfile.c (load_command): Use std::string.
9699
9700 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9701
9702         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9703         to error message string.
9704         (riscv_register_name): Use xsnprintf instead of sprintf.
9705         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9706         internal_error.
9707         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9708         error.
9709         (riscv_push_dummy_call): Likewise.
9710
9711 2018-03-12  Tom Tromey  <tom@tromey.com>
9712
9713         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9714         Use gdb::byte_vector.
9715         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9716
9717 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9718
9719         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9720         parameter type to readable_regcache.
9721         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9722         the declaration.
9723
9724 2018-03-11  Tom Tromey  <tom@tromey.com>
9725
9726         * dwarf2read.c (struct nextfield): Add initializers.
9727         (struct nextfnfield): Remove.
9728         (struct fnfieldlist): Add initializers.  Remove "length" and
9729         "head", use std::vector.
9730         (struct decl_field_list): Remove.
9731         (struct field_info): Add initializers.
9732         <fields, baseclasses>: Now std::vector.
9733         <nbaseclasses, nfnfields, typedef_field_list_count,
9734         nested_types_list_count>: Remove.
9735         (dwarf2_add_field, dwarf2_add_type_defn)
9736         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9737         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9738         (process_structure_scope): Update.
9739
9740 2018-03-11  Tom Tromey  <tom@tromey.com>
9741
9742         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9743         for use by std::sort.
9744         (build_type_psymtabs_1): Use std::vector.
9745
9746 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9747
9748         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9749         and LIBMPFR in the printed configuration.
9750
9751 2018-03-08  Tom Tromey  <tom@tromey.com>
9752
9753         * source.c (get_filename_and_charpos): Use scoped_fd.
9754         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9755         (procfs_pidlist): Likewise.
9756         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9757         (iterate_over_mappings): Likewise.
9758
9759 2018-03-08  Tom Tromey  <tom@tromey.com>
9760
9761         * infcall.c (struct call_return_meta_info)
9762         <stack_temporaries_enabled>: Remove.
9763         (get_call_return_value, call_function_by_hand_dummy): Update.
9764         * thread.c (disable_thread_stack_temporaries): Remove.
9765         (enable_thread_stack_temporaries): Remove.
9766         (thread_stack_temporaries_enabled_p): Return bool.
9767         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9768         (get_last_thread_stack_temporary): Update.
9769         * eval.c (evaluate_subexp): Update.
9770         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9771         class, not a function.
9772         (value_ptr, value_vec): Remove typedefs.
9773         (class thread_info) <stack_temporaries_enabled>: Now bool.
9774         <stack_temporaries>: Now a std::vector.
9775         (thread_stack_temporaries_enabled_p)
9776         (value_in_thread_stack_temporaries): Return bool.
9777
9778 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9779
9780         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9781         (getpkt_or_notif_sane_1): Likewise.
9782
9783 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9784
9785         * build-id.c (build_id_to_debug_bfd): Use std::string.
9786
9787 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9788
9789         * build-id.c (find_separate_debug_file_by_buildid): Return
9790         std::string.
9791         * build-id.h (find_separate_debug_file_by_buildid): Return
9792         std::string.
9793         * coffread.c (coff_symfile_read): Adjust to std::string.
9794         * elfread.c (elf_symfile_read): Adjust to std::string.
9795         * symfile.c (separate_debug_file_exists): Change parameter to
9796         std::string.
9797         (find_separate_debug_file): Return std::string.
9798         (find_separate_debug_file_by_debuglink): Return std::string.
9799         * symfile.h (find_separate_debug_file_by_debuglink): Return
9800         std::string.
9801
9802 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9803
9804         * common/xml-utils.c (xml_escape_text): Move code to...
9805         (xml_escape_text_append): ... this new function.
9806         * common/xml-utils.h (xml_escape_text_append): New declaration.
9807         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9808         New function.
9809         (_initialize_xml_utils): register test_xml_escape_text_append as
9810         a selftest.
9811
9812 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9813
9814         * defs.h: Remove MAX_REGISTER_SIZE.
9815         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9816         asserts.
9817         * python/py-unwind.c (pyuw_sniffer): Likewise.
9818
9819 2018-03-07  Tom Tromey  <tom@tromey.com>
9820
9821         * linux-tdep.c (linux_info_proc): Update.
9822         * target.h (struct target_ops) <to_fileio_readlink>: Return
9823         optional<string>.
9824         (target_fileio_readlink): Return optional<string>.
9825         * remote.c (remote_hostio_readlink): Return optional<string>.
9826         * inf-child.c (inf_child_fileio_readlink): Return
9827         optional<string>.
9828         * target.c (target_fileio_readlink): Return optional<string>.
9829
9830 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9831
9832         * regcache.c (cooked_read_test): Add riscv to the list of
9833         architectures that have a save_reggroup.
9834
9835 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9836
9837         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9838         value is not a dynamic class object.
9839
9840 2018-03-06  Tom Tromey  <tom@tromey.com>
9841
9842         * rust-exp.y: Formatting fixes.
9843
9844 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9845
9846         * riscv-tdep.c (riscv_register_name): Remove target description
9847         support.
9848         (riscv_gdbarch_init): Remove target description check.
9849
9850 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9851
9852         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9853         comment.
9854         * riscv-tdep.h: Likewise.
9855
9856 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9857
9858         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9859         (riscv_pseudo_register_write): Delete.
9860         (riscv_gdbarch_init): Remove all use of pseudo registers.
9861
9862 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9863
9864         * record-btrace.c (btrace_print_lines): Replace cleanup
9865         parameter with RAII equivalents.
9866         (btrace_insn_history): Replace cleanup with RAII equivalents.
9867         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9868         make_cleanup_ui_out_tuple_begin_end): Remove.
9869         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9870         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9871         make_cleanup_ui_out_list_begin_end): Remove.
9872
9873 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9874
9875         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9876         parameter types to std::vector.  Use bool.
9877         (record_btrace_wait): Replace VEC(tp_t) with
9878         std::vector<thread_info *>.
9879         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9880
9881 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9882
9883         * record-btrace.c (record_btrace_disable_callback): Remove.
9884         (struct scoped_btrace_disable): New.
9885         (record_btrace_open): Use scoped_btrace_disable.
9886
9887 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9888
9889         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9890         reading values from registers.
9891
9892 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9893
9894         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9895         where appropriate.
9896
9897 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9898
9899         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9900         change parameter type.  Use GDB's print functions, and use
9901         core_addr_to_string where appropriate.
9902         (riscv_push_dummy_call): Use core_addr_to_string where
9903         appropriate, update call to riscv_print_arg_location, and reindent
9904         a few lines.
9905         (riscv_return_value): Update call to riscv_print_arg_location.
9906
9907 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9908             Tim Newsome <tim@sifive.com>
9909             Albert Ou <a0u@eecs.berkeley.edu>
9910             Darius Rad <darius@bluespec.com>
9911
9912         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9913         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9914         (ALLDEPFILES): Add riscv-tdep.c
9915         * configure.tgt: Add riscv support.
9916         * riscv-tdep.c: New file.
9917         * riscv-tdep.h: New file.
9918         * NEWS: Mention new target.
9919         * MAINTAINERS: Add entry for riscv.
9920
9921 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9922
9923         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9924         fields within aggregates.
9925
9926 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
9927
9928         * record-btrace.c (btrace_print_lines): Change type of flags to
9929         gdb_disassembly_flags.
9930
9931 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9932
9933         * fbsd-nat.c: Include "inf-ptrace.h".
9934         (USE_SIGTRAP_SIGINFO): Conditionally define.
9935         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9936         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9937         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9938         function.
9939         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9940         Likewise.
9941         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9942         Likewise.
9943         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9944         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9945         "supports_stopped_by_hw_breakpoint" target methods.
9946
9947 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9948
9949         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9950         * fbsd-nat.c (debug_fbsd_nat): New variable.
9951         (show_fbsd_nat_debug): New function.
9952         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9953         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9954
9955 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9956
9957         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9958         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9959         prototype.
9960         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9961         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9962         method.
9963
9964 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9965
9966         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9967         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9968
9969 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9970
9971         * charset.c (struct charset_vector): New.
9972         (charsets): Change type to charset_vector.
9973         (find_charset_names): Adjust.
9974         (add_one): Adjust.
9975         (_initialize_charset): Adjust.
9976
9977 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9978
9979         * progspace.h (struct program_space) <deleted_solibs>: Change
9980         type to std::vector<std::string>.
9981         * progspace.c (clear_program_space_solib_cache): Adjust.
9982         * breakpoint.c (print_solib_event): Adjust.
9983         (check_status_catch_solib): Adjust.
9984         * solib.c (update_solib_list): Adjust.
9985         * ui-out.h (class ui_out) <field_string>: New overload.
9986         * ui-out.c (ui_out::field_string): New overload.
9987
9988 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9989
9990         * progspace.h (struct program_space): Add constructor and
9991         destructor, initialize fields.
9992         (add_program_space): Remove.
9993         * progspace.c (add_program_space): Rename to...
9994         (program_space::program_space): ... this.
9995         (release_program_space): Rename to...
9996         (program_space::~program_space): ... this.
9997         (delete_program_space): Use delete to delete program_space.
9998         (initialize_progspace): Use new to allocate program_space.
9999         * inferior.c (add_inferior_with_spaces): Likewise.
10000         (clone_inferior_command): Likewise.
10001         * infrun.c (follow_fork_inferior): Likewise.
10002         (handle_vfork_child_exec_or_exit): Likewise.
10003
10004 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10005
10006         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10007         (delim_string_to_char_ptr_vec): Return std::vector of
10008         gdb::unique_xmalloc_ptr.
10009         (dirnames_to_char_ptr_vec_append): Take std::vector of
10010         gdb::unique_xmalloc_ptr.
10011         (dirnames_to_char_ptr_vec): Return std::vector of
10012         gdb::unique_xmalloc_ptr.
10013         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10014         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10015         (delim_string_to_char_ptr_vec): Return an std::vector of
10016         gdb::unique_xmalloc_ptr, adjust the code.
10017         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10018         gdb::unique_xmalloc_ptr, adjust the code.
10019         (dirnames_to_char_ptr_vec): Return an std::vector of
10020         gdb::unique_xmalloc_ptr, adjust the code.
10021         * auto-load.c (auto_load_safe_path_vec): Change type to
10022         std::vector of gdb::unique_xmalloc_ptr.
10023         (auto_load_expand_dir_vars): Return an std::vector of
10024         gdb::unique_xmalloc_ptr, adjust the code.
10025         (auto_load_safe_path_vec_update): Adjust.
10026         (filename_is_in_auto_load_safe_path_vec): Adjust.
10027         (auto_load_objfile_script_1): Adjust.
10028         * build-id.c (build_id_to_debug_bfd): Adjust.
10029         * linux-thread-db.c (thread_db_load_search): Adjust.
10030         * source.c (add_path): Adjust.
10031         (openp): Adjust.
10032         * symfile.c (find_separate_debug_file): Adjust.
10033         * utils.c (do_free_char_ptr_vec): Remove.
10034         (make_cleanup_free_char_ptr_vec): Remove.
10035
10036 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10037
10038         PR gdb/22907
10039         * common/pathstuff.c: Conditionally include "<windows.h>".
10040
10041 2018-03-01  Georg Sauthoff  <mail@georg.so>
10042
10043         PR gdb/22888
10044         * gcore.in: Quote variables and switch interpreter to bash.
10045
10046 2018-03-01  Tom Tromey  <tom@tromey.com>
10047
10048         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10049         assertion.  Add assertion for discriminant_index.
10050         (quirk_rust_enum): Use correct base type name in univariant case.
10051
10052 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10053
10054         * record.c (get_call_history_modifiers): Return a
10055         record_print_flags.
10056         (cmd_record_call_history): Adjust.
10057         * record-btrace.c (record_btrace_call_history): Adjust.
10058         (record_btrace_call_history_range): Adjust.
10059         (record_btrace_call_history_from): Adjust.
10060         * target-debug.h (target_debug_print_record_print_flags): New.
10061         * target-delegates.c: Re-generate.
10062         * target.c (target_call_history): Change flags type.
10063         (target_call_history_from): Likewise.
10064         (target_call_history_range): Likewise.
10065         * target.h (struct target_ops) <target_call_history>: Likewise.
10066         (target_call_history_from): Likewise.
10067         (target_call_history_range): Likewise.
10068
10069 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10070             Simon Marchi  <simon.marchi@polymtl.ca>
10071
10072         * common/common-utils.c: Include "sys/stat.h".
10073         (is_regular_file): Move here from "source.c"; change return
10074         type to "bool".
10075         * common/common-utils.h (is_regular_file): New prototype.
10076         * common/pathstuff.c (contains_dir_separator): New function.
10077         * common/pathstuff.h (contains_dir_separator): New prototype.
10078         * source.c: Don't include "sys/stat.h".
10079         (is_regular_file): Move to "common/common-utils.c".
10080
10081 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10082
10083         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10084         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10085         * auto-load.c: Include "common/pathstuff.h".
10086         * common/common-def.h (current_directory): Move here.
10087         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10088         function.
10089         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10090         prototype.
10091         * common/pathstuff.c: New file.
10092         * common/pathstuff.h: New file.
10093         * compile/compile.c: Include "common/pathstuff.h".
10094         * defs.h (current_directory): Move to "common/common-defs.h".
10095         * dwarf2read.c: Include "common/pathstuff.h".
10096         * exec.c: Likewise.
10097         * guile/scm-safe-call.c: Likewise.
10098         * linux-thread-db.c: Likewise.
10099         * main.c: Likewise.
10100         * nto-tdep.c: Likewise.
10101         * objfiles.c: Likewise.
10102         * source.c: Likewise.
10103         * symtab.c: Likewise.
10104         * utils.c: Include "common/pathstuff.h".
10105         (gdb_realpath): Move to "common/pathstuff.c".
10106         (gdb_realpath_keepfile): Likewise.
10107         (gdb_abspath): Likewise.
10108         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10109         (gdb_realpath_keepfile): Likewise.
10110         (gdb_abspath): Likewise.
10111
10112 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10113
10114         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10115         wildcard process pid for super_resume for kernels with a
10116         specific bug.
10117
10118 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10119
10120         * compile/compile.c (get_args): Add additional comments
10121         explaining function.
10122
10123 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10124             Tom Tromey  <tom@tromey.com>
10125
10126         * target.h (memory_write_request_s): Remove typedef.  Don't define
10127         VEC.
10128         (target_write_memory_blocks): Change argument to std::vector.
10129         (struct memory_write_request): Add constructor.
10130         * target-memory.c (compare_block_starting_address): Return bool.
10131         Change argument types.
10132         (claim_memory): Change arguments to use std::vector.
10133         (split_regular_and_flash_blocks, blocks_to_erase)
10134         (compute_garbled_blocks): Likewise.
10135         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10136         (target_write_memory_blocks): Change argument to std::vector.
10137         * symfile.c (struct load_section_data): Add constructor and
10138         destructor.  Use std::vector for "requests".
10139         (struct load_progress_data): Add initializers.
10140         (load_section_callback): Update.  Use "new".
10141         (clear_memory_write_data): Remove.
10142         (generic_load): Update.
10143
10144 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10145
10146         * arch/aarch64.h: Use common/tdesc.h.
10147
10148 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10149
10150         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10151         architecture with a 64-bit ABI.
10152
10153 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10154
10155         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10156         ahead of target description loading.
10157
10158 2018-02-26  Tom Tromey  <tom@tromey.com>
10159
10160         * stack.c (backtrace_command_1): Update.
10161         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10162         of "flags".
10163         * python/py-framefilter.c (py_print_frame)
10164         (gdbpy_apply_frame_filter): Change type of "flags".
10165         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10166         of "flags".
10167         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10168         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10169         * extension.h (enum frame_filter_flag): Rename from
10170         frame_filter_flags.
10171         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10172         (apply_ext_lang_frame_filter): Change type of "flags".
10173         * extension.c (apply_ext_lang_frame_filter): Change type of
10174         "flags".
10175         * extension-priv.h (struct extension_language_ops)
10176         <apply_frame_filter>: Change type of "flags".
10177
10178 2018-02-26  Tom Tromey  <tom@tromey.com>
10179
10180         PR python/16497:
10181         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10182         off-by-one in py_end computation.
10183         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10184         PRINT_MORE_FRAMES.
10185         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10186         constant.
10187
10188 2018-02-26  Tom Tromey  <tom@tromey.com>
10189
10190         * dwarf2read.c (struct variant_field): New.
10191         (struct nextfield) <variant>: New field.
10192         (dwarf2_add_field): Handle DW_TAG_variant_part.
10193         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10194         discriminated union.
10195         (read_structure_type): Handle DW_TAG_variant_part.
10196         (handle_struct_member_die): New function, extracted from
10197         process_structure_scope.  Handle DW_TAG_variant.
10198         (process_structure_scope): Handle discriminated unions.  Call
10199         handle_struct_member_die.
10200
10201 2018-02-26  Tom Tromey  <tom@tromey.com>
10202
10203         * rust-lang.h (rust_last_path_segment): Declare.
10204         * rust-lang.c (rust_last_path_segment): Now public.  Change
10205         contract.
10206         (struct disr_info): Remove.
10207         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10208         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10209         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10210         (rust_enum_p, rust_enum_variant): New function.
10211         (rust_underscore_fields): Remove "offset" parameter.
10212         (rust_print_enum): New function.
10213         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10214         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10215         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10216         enums.
10217         (rust_internal_print_type): New function, from rust_print_type.
10218         Remove enum code.
10219         (rust_print_type): Call rust_internal_print_type.
10220         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10221         Update enum handling.
10222         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10223         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10224         (rust_union_quirks): New functions.
10225         (process_full_comp_unit, process_full_type_unit): Call
10226         rust_union_quirks.
10227         (process_structure_scope): Update rust_unions if necessary.
10228
10229 2018-02-26  Tom Tromey  <tom@tromey.com>
10230
10231         * value.h (value_union_variant): Declare.
10232         * valops.c (value_union_variant): New function.
10233         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10234         (struct discriminant_info): New.
10235         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10236         enumerator.
10237         (struct main_type) <flag_discriminated_union>: New field.
10238
10239 2018-02-26  Tom Tromey  <tom@tromey.com>
10240
10241         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10242         unittests/unpack-selftests.c.
10243         * unittests/unpack-selftests.c: New file.
10244         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10245
10246 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10247
10248         * dwarf2read.c (struct partial_die_info) <read>: New method.
10249         (read_partial_die): Remove the declaration.
10250         (load_partial_dies): Update.
10251         (partial_die_info::partial_die_info):
10252         (read_partial_die): Change it to partial_die_info::read.
10253
10254 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10255
10256         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10257         (fixup_partial_die): Remove declaration.
10258         (scan_partial_symbols): Update.
10259         (partial_die_parent_scope): Likewise.
10260         (partial_die_full_name): Likewise.
10261         (fixup_partial_die): Change it to partial_die_info::fixup.
10262
10263 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10264
10265         * dwarf2read.c (read_partial_die): Update the declaration.
10266         (load_partial_dies): Caller update.
10267         (read_partial_die): Remove one argument abbrev_len.
10268
10269 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10270
10271         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10272         assignment operator.
10273         (load_partial_dies): Use ctor and copy ctor.
10274         (read_partial_die): Update.
10275         (dwarf2_cu::find_partial_die): Use ctor.
10276
10277 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10278
10279         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10280         (find_partial_die_in_comp_unit): Change it to
10281         dwarf2_cu::find_partial_die.
10282         (find_partial_die): Update.
10283
10284 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10285
10286         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10287         is NULL.
10288
10289 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10290
10291         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10292
10293 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10294
10295         * arch/amd64.h: Use common/tdesc.h.
10296         * arch/i386.c: Likewise.
10297         * arch/i386.h: Likewise.
10298         * arch/tic6x.c: Likewise.
10299         * arch/tdesc.h: Move file from here...
10300         * common/tdesc.h: ...to here.
10301         * features/aarch64-core.c: Regenerate.
10302         * features/aarch64-fpu.c: Regenerate.
10303         * features/i386/32bit-avx.c: Regenerate.
10304         * features/i386/32bit-avx512.c: Regenerate.
10305         * features/i386/32bit-core.c: Regenerate.
10306         * features/i386/32bit-linux.c: Regenerate.
10307         * features/i386/32bit-mpx.c: Regenerate.
10308         * features/i386/32bit-pkeys.c: Regenerate.
10309         * features/i386/32bit-sse.c: Regenerate.
10310         * features/i386/64bit-avx.c: Regenerate.
10311         * features/i386/64bit-avx512.c: Regenerate.
10312         * features/i386/64bit-core.c: Regenerate.
10313         * features/i386/64bit-linux.c: Regenerate.
10314         * features/i386/64bit-mpx.c: Regenerate.
10315         * features/i386/64bit-pkeys.c: Regenerate.
10316         * features/i386/64bit-segments.c: Regenerate.
10317         * features/i386/64bit-sse.c: Regenerate.
10318         * features/i386/x32-core.c: Regenerate.
10319         * features/tic6x-c6xp.c: Regenerate.
10320         * features/tic6x-core.c: Regenerate.
10321         * features/tic6x-gp.c: Regenerate.
10322         * target-descriptions.c: Use common/tdesc.h.
10323         * target-descriptions.h: Likewise.
10324
10325 2018-02-24  Tom Tromey  <tom@tromey.com>
10326
10327         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10328         (try_thread_db_load_from_dir, thread_db_load_search): Use
10329         std::string.
10330         (info_auto_load_libthread_db_compare): Return bool.  Change
10331         argument types.
10332         (info_auto_load_libthread_db): Use std::vector, std::string.
10333         Remove cleanups.
10334
10335 2018-02-24  Tom Tromey  <tom@tromey.com>
10336
10337         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10338         std::string.
10339         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10340         std::string*.
10341         * gdbarch.c: Rebuild.
10342         * gdbarch.h: Rebuild.
10343         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10344         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10345         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10346         std::string*.
10347
10348 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10349
10350         * gdbtypes.h (sect_offset): Change type to uint64_t.
10351         (sect_offset_str): New function.
10352         * dwarf2read.c (create_addrmap_from_aranges): Use
10353         sect_offset_str.
10354         (error_check_comp_unit_head): Likewise.
10355         (create_debug_type_hash_table): Likewise.
10356         (read_cutu_die_from_dwo): Likewise.
10357         (init_cutu_and_read_dies): Likewise.
10358         (init_cutu_and_read_dies_no_follow): Likewise.
10359         (process_psymtab_comp_unit_reader): Likewise.
10360         (partial_die_parent_scope): Likewise.
10361         (peek_die_abbrev): Likewise.
10362         (process_queue): Likewise.
10363         (dwarf2_physname): Likewise.
10364         (read_namespace_alias): Likewise.
10365         (read_import_statement): Likewise.
10366         (create_dwo_cu_reader): Likewise.
10367         (create_cus_hash_table): Likewise.
10368         (lookup_dwo_cutu): Likewise.
10369         (inherit_abstract_dies): Likewise.
10370         (read_func_scope): Likewise.
10371         (read_call_site_scope): Likewise.
10372         (dwarf2_add_member_fn): Likewise.
10373         (read_common_block): Likewise.
10374         (read_module_type): Likewise.
10375         (read_typedef): Likewise.
10376         (read_subrange_type): Likewise.
10377         (load_partial_dies): Likewise.
10378         (read_partial_die): Likewise.
10379         (find_partial_die): Likewise.
10380         (read_str_index): Likewise.
10381         (dwarf2_string_attr): Likewise.
10382         (build_error_marker_type): Likewise.
10383         (lookup_die_type): Likewise.
10384         (dump_die_shallow): Likewise.
10385         (follow_die_ref): Likewise.
10386         (dwarf2_fetch_die_loc_sect_off): Likewise.
10387         (dwarf2_fetch_constant_bytes): Likewise.
10388         (follow_die_sig): Likewise.
10389         (get_signatured_type): Likewise.
10390         (get_DW_AT_signature_type): Likewise.
10391         (dwarf2_find_containing_comp_unit): Likewise.
10392         (set_die_type): Likewise.
10393
10394 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10395
10396         * arch/aarch64.c: Include "common-defs.h".
10397         * arch/amd64.c: Likewise.
10398         * arch/i386.c: Likewise.
10399
10400 2018-02-21  Tom Tromey  <tom@tromey.com>
10401
10402         * value.h: (extract_field_op): Update.
10403         * eval.c (extract_field_op): Return a const char *.
10404         * expression.h (parse_expression_for_completion): Update.
10405         * completer.c (complete_expression): Update.
10406         (add_struct_fields): Make fieldname const.
10407         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10408         (mark_completion_tag, parse_exp_in_context_1): Update.
10409         (parse_expression_for_completion): Change "name" to
10410         unique_xmalloc_ptr*.
10411
10412 2018-02-21  Tom Tromey  <tom@tromey.com>
10413
10414         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10415
10416 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10417
10418         * avr-tdep.c (avr_read_pc): Change parameter type to
10419         readable_regcache.
10420         * gdbarch.sh (read_pc): Likewise.
10421         * gdbarch.c: Re-generated.
10422         * gdbarch.h: Re-generated.
10423         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10424         readable_regcache.
10425         * ia64-tdep.c (ia64_read_pc): Likewise.
10426         * mips-tdep.c (mips_read_pc): Likewise.
10427         * spu-tdep.c (spu_read_pc): Likewise.
10428
10429 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10430
10431         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10432         * regcache-dump.c: New file.
10433         * regcache.c: Move register_dump to regcache-dump.c.
10434         (maintenance_print_registers): Likewise.
10435         (maintenance_print_raw_registers): Likewise.
10436         (maintenance_print_cooked_registers): Likewise.
10437         (maintenance_print_register_groups): Likewise.
10438         (maintenance_print_remote_registers): Likewise.
10439         (_initialize_regcache): Likewise.
10440         * regcache.h (register_dump): Moved from regcache.c.
10441
10442 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10443
10444         * regcache.c (regcache::regcache): Update.
10445         (regcache::invalidate): Move it to detached_regcache::invalidate.
10446         (get_thread_arch_aspace_regcache): Update.
10447         (regcache::raw_update): Update.
10448         (regcache::cooked_read): Remove some code.
10449         (regcache::cooked_read_value): Likewise.
10450         (regcache::raw_write): Remove assert on m_readonly_p.
10451         (regcache::raw_supply_integer): Move it to
10452         detached_regcache::raw_supply_integer.
10453         (regcache::raw_supply_zeroed): Likewise.
10454         * regcache.h (detached_regcache) <raw_supply_integer>: New
10455         declaration.
10456         <raw_supply_zeroed, invalidate>: Likewise.
10457         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10458         <invalidate>: Likewise.
10459         <m_readonly_p>: Removed.
10460
10461 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10462
10463         * infcmd.c (get_return_value): Let stop_regs point to
10464         get_current_regcache.
10465         * regcache.c (regcache::regcache): Remove.
10466         (register_dump_reg_buffer): New class.
10467         (regcache_print): Adjust.
10468         * regcache.h (regcache): Remove constructors.
10469
10470 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10471
10472         * regcache.c (class register_dump): New class.
10473         (register_dump_regcache, register_dump_none): New class.
10474         (register_dump_remote, register_dump_groups): New class.
10475         (regcache_print): Update.
10476         * regcache.h (regcache_dump_what): Move it to regcache.c.
10477         (regcache) <dump>: Remove.
10478
10479 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10480
10481         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10482          reg_buffer_rw *.
10483         (jit_unwind_reg_set_impl): Call raw_supply.
10484         (jit_frame_sniffer): Use reg_buffer_rw.
10485         * record-full.c (record_full_core_regbuf): Change its type.
10486         (record_full_core_open_1): Use reg_buffer_rw.
10487         (record_full_close): Likewise.
10488         (record_full_core_fetch_registers): Use regcache->raw_supply.
10489         (record_full_core_store_registers): Likewise.
10490         * regcache.c (regcache::get_register_status): Move it to
10491         reg_buffer.
10492         (regcache_raw_set_cached_value): Remove.
10493         (regcache::raw_set_cached_value): Remove.
10494         (regcache::raw_write): Call raw_supply.
10495         (regcache::raw_supply): Move it to reg_buffer_rw.
10496         * regcache.h (regcache_raw_set_cached_value): Remove.
10497         (reg_buffer_rw): New class.
10498
10499 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10500
10501         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10502         readonly_detached_regcache.
10503         (dummy_frame_prev_register): Use regcache->cooked_read.
10504         * frame.c (frame_save_as_regcache): Change return type.
10505         (frame_pop): Update.
10506         * frame.h (frame_save_as_regcache): Update declaration.
10507         * inferior.h (get_infcall_suspend_state_regcache): Update
10508         declaration.
10509         * infrun.c (infcall_suspend_state) <registers>: use
10510         readonly_detached_regcache.
10511         (save_infcall_suspend_state): Don't use regcache_dup.
10512         (get_infcall_suspend_state_regcache): Change return type.
10513         * linux-fork.c (struct fork_info) <savedregs>: Change to
10514         readonly_detached_regcache.
10515         <pc>: New field.
10516         (fork_save_infrun_state): Don't use regcache_dup.
10517         (info_checkpoints_command): Adjust.
10518         * mi/mi-main.c (register_changed_p): Update declaration.
10519         (mi_cmd_data_list_changed_registers): Use
10520         readonly_detached_regcache.
10521         (register_changed_p): Change parameter type to
10522         readonly_detached_regcache.
10523         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10524         readonly_detached_regcache.
10525         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10526         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10527         New.
10528         (regcache::save): Move it to reg_buffer.
10529         (regcache::restore): Change parameter type.
10530         (regcache_dup): Remove.
10531         * regcache.h (reg_buffer) <save>: New method.
10532         (readonly_detached_regcache): New class.
10533         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10534         readonly_detached_regcache.
10535         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10536
10537 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10538
10539         * frame.c (frame_save_as_regcache): Use regcache method save.
10540         (frame_pop): Use regcache method restore.
10541         * infrun.c (restore_infcall_suspend_state): Likewise.
10542         * linux-fork.c (fork_load_infrun_state): Likewise.
10543         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10544         save.
10545         * regcache.c (regcache_save): Remove.
10546         (regcache::restore): More asserts.
10547         (regcache_cpy): Remove.
10548         * regcache.h (regcache_save): Remove the declaration.
10549         (regcache::restore): Move from private to public.
10550         Remove the friend declaration of regcache_cpy.
10551         (regcache_cpy): Remove declaration.
10552
10553 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10554
10555         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10556         parameter type to 'readable_regcache *'.
10557         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10558         * arm-tdep.c (arm_neon_quad_read): Likewise.
10559         (arm_pseudo_read): Likewise.
10560         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10561         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10562         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10563         * gdbarch.c: Re-generated.
10564         * gdbarch.h: Re-generated.
10565         * gdbarch.sh (pseudo_register_read): Change parameter type to
10566         'readable_regcache *'.
10567         (pseudo_register_read_value): Likewise.
10568         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10569         (h8300_pseudo_register_read): Likewise.
10570         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10571         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10572         (i386_pseudo_register_read_into_value): Likewise.
10573         (i386_pseudo_register_read_value): Likewise.
10574         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10575         declaration.
10576         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10577         * m32c-tdep.c (m32c_raw_read): Likewise.
10578         (m32c_read_flg): Likewise.
10579         (m32c_banked_register): Likewise.
10580         (m32c_banked_read): Likewise.
10581         (m32c_sb_read): Likewise.
10582         (m32c_part_read): Likewise.
10583         (m32c_cat_read): Likewise.
10584         (m32c_r3r2r1r0_read): Likewise.
10585         (m32c_pseudo_register_read): Likewise.
10586         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10587         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10588         (mep_pseudo_cr64_read): Likewise.
10589         (mep_pseudo_register_read): Likewise.
10590         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10591         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10592         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10593         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10594         (regcache::cooked_read): Likewise.
10595         (regcache::cooked_read_value): Likewise.
10596         (regcache_cooked_read_signed):
10597         (regcache::cooked_read): Likewise.
10598         * regcache.h (readable_regcache): New class.
10599         (regcache): Inherit readable_regcache.  Move some methods to
10600         readable_regcache.
10601         * rl78-tdep.c (rl78_pseudo_register_read): Change
10602         parameter type to 'readable_regcache *'.
10603         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10604         (e500_pseudo_register_read): Change parameter type to
10605         'readable_regcache *'.
10606         (dfp_pseudo_register_read): Likewise.
10607         (vsx_pseudo_register_read): Likewise.
10608         (efpr_pseudo_register_read): Likewise.
10609         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10610         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10611         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10612         (sh64_pseudo_register_read): Likewise.
10613         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10614         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10615         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10616         (spu_pseudo_register_read): Likewise.
10617         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10618         (xtensa_pseudo_register_read): Likewise.
10619
10620 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10621
10622         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10623         (regcache::arch): Move it to reg_buffer::arch.
10624         (regcache::register_buffer): Likewise.
10625         (regcache::assert_regnum): Likewise.
10626         (regcache::num_raw_registers): Likewise.
10627         * regcache.h (reg_buffer): New class.
10628         (regcache): Inherit reg_buffer.
10629
10630 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10631
10632         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10633         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10634
10635 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10636
10637         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10638
10639 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10640
10641         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10642         (SFILES): Remove common/*.c files.
10643         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10644         * common/common.host: Add common reference.
10645         * configure.ac: Likewise.
10646         * configure: Regenerate.
10647
10648 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10649
10650         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10651         (block_initialize_namespace): Use new.
10652         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10653         (dwarf2_free_objfile): Use delete.
10654         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10655         (copy_type_recursive): Use new.
10656         * gdb_obstack.h (allocate_on_obstack): New.
10657
10658 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10659
10660         PR gdb/22849
10661         * inferior.c (exit_inferior_1): Reset inf->control.
10662
10663 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10664
10665         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10666         declaration.
10667
10668 2018-02-14  Pedro Alves  <palves@redhat.com>
10669
10670         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10671         frame_cleanup_after_sniffer on exception.
10672
10673 2018-02-14  Tom Tromey  <tom@tromey.com>
10674
10675         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10676         const.
10677         (solib_bfd_open): Make pathname const.
10678         * solib.c (solib_bfd_open): Make pathname const.
10679         * solib-spu.c (spu_bfd_fopen): Make name const.
10680         (spu_bfd_open): Make pathname const.
10681         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10682         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10683
10684 2018-02-14  Tom Tromey  <tom@tromey.com>
10685
10686         * symfile.c (symfile_bfd_open): Update.
10687         * source.h (openp, source_full_path_of, find_and_open_source):
10688         Change argument type to unique_xmalloc_ptr.
10689         * source.c (openp): Take a unique_xmalloc_ptr.
10690         (source_full_path_of, find_and_open_source): Likewise.
10691         (open_source_file, symtab_to_fullname): Update.
10692         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10693         unique_xmalloc_ptr.
10694         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10695         (exec_file_find): Update.
10696         * psymtab.c (psymtab_to_fullname): Update.
10697         * nto-tdep.h (nto_find_and_open_solib): Update.
10698         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10699         unique_xmalloc_ptr.
10700         * exec.c (exec_file_attach): Update.
10701         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10702         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10703
10704 2018-02-14  Tom Tromey  <tom@tromey.com>
10705
10706         * solib.c: Include source.h.
10707         * nto-tdep.c: Include source.h.
10708         * mi/mi-cmd-env.c: Include source.h.
10709         * infcmd.c: Include source.h.
10710         * exec.c: Include source.h.
10711         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10712         (add_path, directory_switch, source_path, init_source_path): Move
10713         declarations...
10714         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10715         (add_path, directory_switch, source_path, init_source_path):
10716         ...here.
10717
10718 2018-02-14  Tom Tromey  <tom@tromey.com>
10719
10720         * solist.h (exec_file_find, solib_find): Return
10721         unique_xmalloc_ptr.
10722         (solib_bfd_fopen): Take a const char *.
10723         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10724         (exec_file_find, solib_find): Likewise.
10725         (solib_bfd_fopen): Do not take ownership of "pathname".
10726         (solib_bfd_open): Use unique_xmalloc_ptr.
10727         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10728         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10729         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10730         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10731
10732 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10733
10734         * ada-lang.c (name_match_type_from_name): Remove reference to
10735         ada_name_for_lookup in function's documentation.
10736         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10737
10738 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10739
10740         * defs.h (enum openp_flags): New enum.
10741         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10742         Move to enum openp_flags.
10743         (openp_flags): New enum flags.
10744         (openp): Change parameter type to openp_flags.
10745         * source.c (openp): Change parameter type to openp_flags.
10746         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10747         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10748
10749 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10750
10751         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10752         per-command.
10753
10754 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10755
10756         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10757         into...
10758         (class dwarf2_queue_guard): ...the destructor of this new class.
10759         (dw2_do_instantiate_symtab): Create instance of the new class
10760         dwarf2_queue_guard, remove cleanup.
10761
10762 2018-02-09  Tom Tromey  <tom@tromey.com>
10763
10764         * source.c (find_source_lines): Don't reference past the end of
10765         the vector.
10766
10767 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10768
10769         * remote.c (remote_btrace_maybe_reopen): Change error message.
10770         * btrace.c (btrace_enable): Likewise.
10771         (parse_xml_btrace): Likewise.
10772         (parse_xml_btrace_conf): Likewise.
10773
10774 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10775
10776         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10777         (linux_enable_pt, linux_enable_bts): Call
10778         diagnose_perf_event_open_fail.
10779
10780 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10781
10782         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10783         Remove parameter and change return type.  Update callers.  Move it.
10784         (linux_enable_bts, linux_enable_pt): Improve error message.
10785         (linux_enable_pt): Remove zero buffer size check.
10786         (linux_enable_btrace): Improve error messages.  Remove NULL return
10787         check.
10788
10789 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10790
10791         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10792         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10793         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10794         (linux_supports_pt, linux_supports_btrace): Remove.
10795         (linux_enable_bts): Call cpu_supports_bts.
10796         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10797         * remote.c (remote_supports_btrace): Remove.
10798         (init_remote_ops): Remove remote_supports_btrace.
10799         * target-delegates.c: Regenerated.
10800         * target.c (target_supports_btrace): Remove.
10801         * target.h (target_ops) <to_supports_btrace>: Remove
10802         (target_supports_btrace): Remove.
10803         * x86-linux-nat.c (x86_linux_create_target): Remove
10804         linux_supports_btrace.
10805
10806 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10807
10808         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10809         btrace failed.
10810         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10811         exception and use message in own exception.
10812
10813 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10814
10815         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10816         (perf_event_pt_event_type): Use gdb_file_up.
10817         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10818         scoped_fd, and scoped_mmap.
10819
10820 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10821
10822         * common/scoped_mmap.h: New.
10823         * unittests/scoped_mmap-selftest.c: New.
10824         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10825         unittests/scoped_mmap-selftest.c.
10826
10827 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10828
10829         * common/scoped_fd.h: New.
10830         * unittests/scoped_fd-selftest.c: New.
10831         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10832         unittests/scoped_fd-selftest.c.
10833
10834 2018-02-09  Tom Tromey  <tom@tromey.com>
10835
10836         * auto-load.c (auto_load_section_scripts): Use
10837         gdb::unique_xmalloc_ptr.
10838
10839 2018-02-09  Tom Tromey  <tom@tromey.com>
10840
10841         * auto-load.c (execute_script_contents): Use std::string.
10842
10843 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10844
10845         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10846         Python function, rather than a new command.
10847
10848 2018-02-08  Tom Tromey  <tom@tromey.com>
10849
10850         * solib.c (solib_find_1): Use std::string.
10851         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10852
10853 2018-02-08  Tom Tromey  <tom@tromey.com>
10854
10855         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10856
10857 2018-02-08  Tom Tromey  <tom@tromey.com>
10858
10859         * source.c (find_source_lines): Use gdb::def_vector.
10860
10861 2018-02-08  Tom Tromey  <tom@tromey.com>
10862
10863         * macrocmd.c (struct temporary_macro_definition): New.
10864         (macro_define_command): Use temporary_macro_definition.  Remove
10865         cleanups.
10866         (free_macro_definition_ptr): Remove.
10867
10868 2018-02-08  Tom Tromey  <tom@tromey.com>
10869
10870         * macroexp.c (maybe_expand): Use std::string.
10871
10872 2018-02-08  Tom Tromey  <tom@tromey.com>
10873
10874         * macroexp.c (struct macro_buffer): Add initializers for some
10875         members.
10876         (init_buffer, init_shared_buffer, free_buffer)
10877         (free_buffer_return_text): Remove.
10878         (macro_buffer): New constructors.
10879         (~macro_buffer): New destructor.
10880         (macro_buffer::set_shared): New method.
10881         (macro_buffer::resize_buffer, macro_buffer::appendc)
10882         (macro_buffer::appendmem): Now methods, not free functions.
10883         (set_token, append_tokens_without_splicing, stringify)
10884         (macro_stringify): Update.
10885         (gather_arguments): Change return type.  Remove argc_p argument,
10886         add args_ptr argument.  Use std::vector.
10887         (substitute_args): Remove argc argument.  Accept std::vector.
10888         (expand): Update.  Use std::vector.
10889         (scan, macro_expand, macro_expand_next): Update.
10890
10891 2018-02-08  Tom Tromey  <tom@tromey.com>
10892
10893         * symtab.c (default_collect_symbol_completion_matches_break_on):
10894         Use unique_xmalloc_ptr.
10895         * macroscope.h: (sal_macro_scope, user_macro_scope)
10896         (default_macro_scope): Return unique_xmalloc_ptr.
10897         * macroscope.c (sal_macro_scope, user_macro_scope)
10898         (default_macro_scope): Return unique_xmalloc_ptr.
10899         * macroexp.h (macro_expand, macro_expand_once): Return
10900         unique_xmalloc_ptr.
10901         * macroexp.c (macro_expand, macro_expand_once): Return
10902         unique_xmalloc_ptr.
10903         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10904         (info_macro_command, info_macros_command): Use
10905         unique_xmalloc_ptr.
10906         * compile/compile-c-support.c (write_macro_definitions): Use
10907         unique_xmalloc_ptr.
10908         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10909
10910 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10911
10912         * value.c (value_static_field): Assign field type instead of
10913         containing type when returning an optimized out value.
10914
10915 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10916
10917         * ft32-tdep.c (ft32_read_pc): Remove.
10918         (ft32_write_pc): Remove.
10919         (ft32_gdbarch_init): Update.
10920         * m32r-tdep.c (m32r_read_pc): Remove.
10921         (m32r_gdbarch_init): Update.
10922         * mep-tdep.c (mep_read_pc): Remove.
10923         (mep_gdbarch_init): Update.
10924         * microblaze-tdep.c (microblaze_write_pc): Remove.
10925         (microblaze_gdbarch_init): Update.
10926         * mn10300-tdep.c (mn10300_read_pc): Remove.
10927         (mn10300_write_pc): Remove.
10928         (mn10300_gdbarch_init): Update.
10929         * moxie-tdep.c (moxie_read_pc): Remove.
10930         (moxie_write_pc): Remove.
10931         (moxie_gdbarch_init): Update.
10932
10933 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10934
10935         * expprint.c (print_subexp_standard): Handle
10936         OP_F77_UNDETERMINED_ARGLIST.
10937         (dump_subexp_body_standard): Likewise.
10938
10939 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
10940
10941         * target-descriptions.c (tdesc_element_visitor) Add empty
10942         implementations.
10943         (tdesc_type): Move make_gdb_type from here.
10944         (tdesc_type_builtin): Likewise.
10945         (tdesc_type_vector): Likewise.
10946         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10947         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10948         (make_gdb_type_union): Likewise.
10949         (make_gdb_type_flags): Likewise.
10950         (make_gdb_type_enum): Likewise.
10951         (make_gdb_type): New function.
10952         (tdesc_register_type): Use static make_gdb_type.
10953
10954 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
10955
10956         * infcmd.c (default_print_one_register_info): Align natural-format
10957         column values consistently one under another.
10958         (pad_to_column): New function.
10959
10960 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
10961
10962         * dwarf2read.c (dwarf2_physname): Move commment.
10963
10964 2018-02-01  Leszek Swirski  <leszeks@google.com>
10965
10966         * varobj.c (varobj_formatted_print_options): Allow recursive
10967         pretty printing if pretty printing is enabled.
10968
10969 2018-02-01  Leszek Swirski  <leszeks@google.com>
10970
10971         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10972         names after a structop as a filename.
10973
10974 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10975
10976         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10977         (arm_record_coproc_data_proc): Likewise.
10978
10979 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10980
10981         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10982
10983 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
10984
10985         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10986         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10987
10988 2018-01-31  Pedro Alves  <palves@redhat.com>
10989
10990         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10991         * inflow.c (child_terminal_save_inferior): Wrap reference to
10992         tcgetpgrp in HAVE_TERMIOS_H.
10993         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10994         _WIN32.
10995         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10996         always iterate over all inferiors.
10997         (gdbsim_cntrl_c): Adjust.
10998         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10999
11000 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11001
11002         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11003         index type is objfile-owned if the element type is as well.
11004
11005 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11006
11007         GDB 8.1 released.
11008
11009 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11010
11011         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11012         "features/s390x-linux64.c".
11013         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11014         s390_linux32 and s390x_linux64.
11015         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11016         default tdesc.
11017         * s390-tdep.c: Include "features/s390-linux32.c" and
11018         "features/s390x-linux64.c".
11019         (s390_tdesc_valid): Add check for tdesc_has_registers.
11020         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11021         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11022         tdesc_s390x_linux64.
11023         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11024         tdesc_s390x_linux64 to...
11025         * s390-tdep.h: ...here.
11026
11027 2018-01-30  Pedro Alves  <palves@redhat.com>
11028
11029         PR gdb/13211
11030         * config.in, configure: Regenerate.
11031         * configure.ac: Check for getpgid.
11032         * go32-nat.c (go32_pass_ctrlc): New.
11033         (go32_target): Install it.
11034         * inf-child.c (inf_child_target): Install
11035         child_terminal_save_inferior, child_pass_ctrlc and
11036         child_interrupt.
11037         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11038         (inf_ptrace_target): No longer install it.
11039         * infcmd.c (interrupt_target_1): Adjust.
11040         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11041         (child_interrupt): Declare.
11042         (inferior::terminal_state): New.
11043         * inflow.c (struct terminal_info): Update comments.
11044         (inferior_process_group): Delete.
11045         (terminal_is_ours): Delete.
11046         (gdb_tty_state): New.
11047         (child_terminal_init): Adjust.
11048         (is_gdb_terminal, sharing_input_terminal_1)
11049         (sharing_input_terminal): New functions.
11050         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11051         Set the process's actual process group in the foreground if
11052         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11053         mark terminal as the inferior's if not sharing GDB's terminal.
11054         Don't check attach_flag.
11055         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11056         pass down a target_terminal_state.
11057         (child_terminal_save_inferior): New, factored out from ...
11058         (child_terminal_ours_1): ... this.  Handle
11059         target_terminal_state::is_ours_for_output.
11060         (child_interrupt, child_pass_ctrlc): New.
11061         (inflow_inferior_exit): Clear the inferior's terminal_state.
11062         (copy_terminal_info): Copy the inferior's terminal state.
11063         (_initialize_inflow): Remove reference to terminal_is_ours.
11064         * inflow.h (inferior_process_group): Delete.
11065         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11066         * procfs.c (procfs_target): Don't install procfs_interrupt.
11067         (procfs_interrupt): Delete.
11068         * remote.c (remote_serial_quit_handler): Adjust.
11069         (remote_interrupt): Remove ptid parameter.  Adjust.
11070         * target-delegates.c: Regenerate.
11071         * target.c: Include "terminal.h".
11072         (target_terminal::terminal_state): Rename to ...
11073         (target_terminal::m_terminal_state): ... this.
11074         (target_terminal::init): Adjust.
11075         (target_terminal::inferior): Adjust to per-inferior
11076         terminal_state.
11077         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11078         (target_terminal::ours, target_terminal::ours_for_output): Use
11079         target_terminal_is_ours_kind.
11080         (target_interrupt): Remove ptid parameter.  Adjust.
11081         (default_target_pass_ctrlc): Adjust.
11082         * target.h (target_ops::to_terminal_save_inferior): New field.
11083         (target_ops::to_interrupt): Remove ptid_t parameter.
11084         (target_interrupt): Remove ptid_t parameter.  Update comment.
11085         (target_pass_ctrlc): Update comment.
11086         * target/target.h (target_terminal_state): New scoped enum,
11087         factored out of ...
11088         (target_terminal::terminal_state): ... here.
11089         (target_terminal::inferior): Update comments.
11090         (target_terminal::restore_inferior): New.
11091         (target_terminal::is_inferior, target_terminal::is_ours)
11092         (target_terminal::is_ours_for_output): Adjust.
11093         (target_terminal::scoped_restore_terminal_state): Adjust to
11094         rename, and call restore_inferior() instead of inferior().
11095         (target_terminal::scoped_restore_terminal_state::m_state): Change
11096         type.
11097         (target_terminal::terminal_state): Rename to ...
11098         (target_terminal::m_terminal_state): ... this and change type.
11099
11100 2018-01-30  Pedro Alves  <palves@redhat.com>
11101
11102         * linux-nat.c (wait_for_signal): New function.
11103         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11104         directly.
11105         (async_terminal_is_ours)
11106         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11107         (linux_nat_add_target): Don't override
11108         to_terminal_inferior/to_terminal_ours.
11109
11110 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11111
11112         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11113
11114 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11115
11116         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11117         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11118         dwarf2_per_objfile_free here.
11119         (dwarf2_per_objfile_free): Remove.
11120         (_initialize_dwarf2_read): Don't register
11121         dwarf2_per_objfile_free as a registry cleanup.
11122
11123 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11124
11125         Avoid compilation errors in MinGW native builds
11126
11127         The error is triggered by including python-internal.h, and the
11128         error message is:
11129
11130              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11131                       from build-gnulib/import/math.h:27,
11132                       from d:/usr/Python26/include/pyport.h:235,
11133                       from d:/usr/Python26/include/Python.h:58,
11134                       from python/python-internal.h:94,
11135                       from python/py-arch.c:24:
11136              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11137         using ::hypot;
11138                 ^~~~~
11139
11140         This happens because Python headers define 'hypot' to expand t
11141         '_hypot' in the Windows builds.
11142         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11143         'hypoth'.  This avoids a compilation error.
11144
11145 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11146
11147         * MAINTAINERS (Write After Approval): Fix ordering.
11148
11149 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11150
11151         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11152
11153 2018-01-26  Alan Modra  <amodra@gmail.com>
11154
11155         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11156         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11157         Remove nop.  Make const.  Comment.
11158         (powerpc32_plt_stub_so_2): New.
11159         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11160         Correct count.  Update uses.
11161         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11162         Move common code reading PLT entry word.  Correct
11163         powerpc32_plt_stub PLT address calculation.
11164         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11165         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11166         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11167         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11168         (ppc64_standard_linkage8): Likewise.
11169         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11170         Correct insns description.
11171         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11172
11173 2018-01-24  Pedro Alves  <palves@redhat.com>
11174
11175         GCC PR libstdc++/83906
11176         * gdbtypes.c (operator==(const dynamic_prop &,
11177         const dynamic_prop &)): New.
11178         (operator==(const range_bounds &, const range_bounds &)): New.
11179         (check_types_equal): Use them instead of memcmp.
11180         * gdbtypes.h (operator==(const dynamic_prop &,
11181         const dynamic_prop &)): Declare.
11182         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11183         (operator==(const range_bounds &, const range_bounds &)): Declare.
11184         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11185
11186 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11187
11188         * s390-linux-tdep.c (s390_record_address_mask)
11189         (s390_record_calc_disp_common, s390_record_calc_disp)
11190         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11191         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11192         (s390_process_record): Move to s390-tdep.c.
11193         (s390_linux_init_abi_any): Adjust.
11194         * s390-tdep.c (s390_record_address_mask)
11195         (s390_record_calc_disp_common, s390_record_calc_disp)
11196         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11197         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11198         (s390_process_record): Moved from s390-linux-tdep.c
11199         (s390_gdbarch_init): Adjust.
11200
11201 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11202
11203         * s390-linux-nat.c (s390-tdep.h): New include.
11204         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11205         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11206         (ALLDEPFILES): Add s390-tdep.c.
11207         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11208         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11209         * s390-tdep.h: ...this.  New file.
11210         * s390-linux-tdep.c (s390-tdep.h): New include.
11211         (_initialize_s390_tdep): Rename to...
11212         (_initialize_s390_linux_tdep): ...this and adjust.
11213         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11214         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11215         s390-tdep.h.
11216         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11217         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11218         (s390_is_partial_instruction, s390_software_single_step)
11219         (is_non_branch_ril, s390_displaced_step_copy_insn)
11220         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11221         (s390_prologue_data, s390_addr, s390_store, s390_load)
11222         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11223         (s390_register_call_saved, s390_guess_tracepoint_registers)
11224         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11225         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11226         (s390_pseudo_register_name, s390_pseudo_register_type)
11227         (s390_pseudo_register_read, s390_pseudo_register_write)
11228         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11229         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11230         (s390_addr_bits_remove, s390_address_class_type_flags)
11231         (s390_address_class_type_flags_to_name)
11232         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11233         (s390_function_arg_float, s390_function_arg_vector)
11234         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11235         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11236         (s390_frame_align, s390_register_return_value, s390_return_value)
11237         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11238         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11239         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11240         (s390_trad_frame_prev_register, s390_unwind_cache)
11241         (s390_prologue_frame_unwind_cache)
11242         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11243         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11244         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11245         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11246         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11247         (s390_frame_base_address, s390_local_base_address)
11248         (s390_frame_base, s390_gcc_target_options)
11249         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11250         (s390_validate_reg_range, s390_tdesc_valid)
11251         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11252         * s390-tdep.c: ...this.  New file.
11253
11254 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11255
11256         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11257         (s390_process_record, s390_gdbarch_tdep_alloc)
11258         (s390_linux_init_abi_any): Use/set new hook.
11259
11260 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11261
11262         * s390-linux-tdep.c (osabi.h): New include.
11263         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11264         (s390_linux_init_abi_any): New functions.
11265         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11266
11267 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11268
11269         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11270         tdesc_has_registers check
11271
11272 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11273
11274         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11275         (s390_validate_reg_range): New macro.
11276         (s390_gdbarch_init): Adjust.
11277
11278 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11279
11280         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11281         (s390_gdbarch_tdep_alloc): Adjust.
11282         (s390_gdbarch_init): Adjust.
11283
11284 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11285
11286         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11287         <have_tdb>: Change type to bool.
11288         (s390_gdbarch_tdep_alloc): Adjust.
11289         (s390_gdbarch_init): Adjust.
11290
11291 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11292
11293         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11294         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11295         (s390_gdbarch_tdep_alloc): New function.
11296         (s390_gdbarch_init): Allocate tdep at start and use its fields
11297         instead of separate variables.
11298
11299 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11300
11301         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11302         when looking for cached gdbarch and add comment for remaining.
11303
11304 2018-01-22  Pedro Alves  <palves@redhat.com>
11305             Sergio Durigan Junior  <sergiodj@redhat.com>
11306
11307         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11308         case.
11309
11310 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11311
11312         * MAINTAINERS: Update my company e-mail address.
11313
11314 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11315
11316         * regcache.c (cooked_write_test): New function.
11317         (_initialize_regcache): Register the test.
11318
11319 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11320
11321         * ia64-tdep.c (ia64_pseudo_register_read): Call
11322         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11323         * m32c-tdep.c (m32c_cat_read): Likewise.
11324         (m32c_r3r2r1r0_read): Likewise.
11325         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11326         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11327
11328 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11329
11330         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11331         method raw_read instead of regcache_raw_read.
11332         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11333         * arm-tdep.c (arm_neon_quad_read): Likewise.
11334         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11335         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11336         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11337         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11338         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11339         (i386_pseudo_register_read_into_value): Likewise.
11340         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11341         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11342         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11343         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11344         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11345         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11346         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11347         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11348         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11349
11350 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11351
11352         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11353         * configure.tgt: Remove target mt.
11354         * mt-tdep.c: Remove.
11355         * regcache.c (cooked_read_test): Remove the check for mt.
11356
11357 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11358
11359         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11360         instead of gdbarch_pseudo_register_read_value.
11361
11362 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11363
11364         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11365         language is Ada.
11366
11367 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11368
11369         * linespec.c (create_sals_line_offset): Remove code that preserved
11370         the symtab_and_line's line number.
11371
11372 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11373
11374         * varobj.c (varobj_create): Don't set valid_block when creating a
11375         floating varobj.
11376
11377 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11378
11379         * varobj.c (varobj_create): Remove out of date comment.
11380
11381 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11382
11383         PR mi/20395
11384         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11385         updating innermost block.
11386         * parse.c (innermost_block_tracker::update): Take extra type
11387         parameter, and check types match before updating innermost block.
11388         (write_dollar_variable): Update innermost block for registers.
11389         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11390         (innermost_block_tracker::innermost_block_tracker): Initialise
11391         m_types member.
11392         (innermost_block_tracker::reset): Take type parameter.
11393         (innermost_block_tracker::update): Take type parameter, and pass
11394         type through as needed.
11395         (innermost_block_tracker::m_types): New member.
11396         * varobj.c (varobj_create): Pass type when reseting innermost
11397         block.
11398
11399 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11400
11401         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11402         * ada-lang.c (resolve_subexp): Likewise.
11403         * breakpoint.c (set_breakpoint_condition) Likewise.
11404         (watch_command_1) Likewise.
11405         * c-exp.y (variable): Likewise.
11406         * d-exp.y (PrimaryExpression): Likewise.
11407         * f-exp.y (variable): Likewise.
11408         * go-exp.y (variable): Likewise.
11409         * m2-exp.y (variable): Likewise.
11410         * objfiles.c (objfile::~objfile): Likewise.
11411         * p-exp.y (variable): Likewise.
11412         * parse.c (innermost_block): Change type.
11413         * parser-defs.h (class innermost_block_tracker): New.
11414         (innermost_block): Change to innermost_block_tracker.
11415         * printcmd.c (display_command): Switch to innermost_block API.
11416         (do_one_display): Likewise.
11417         * rust-exp.y (do_one_display): Likewise.
11418         * symfile.c (clear_symtab_users): Likewise.
11419         * varobj.c (varobj_create): Switch to innermost_block API, replace
11420         use of innermost_block with block stored on varobj object.
11421
11422 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11423
11424         * expression.h (innermost_block): Remove declaration.
11425         * varobj.c: Add 'parser-defs.h' include.
11426
11427 2018-01-19  Tom Tromey  <tom@tromey.com>
11428
11429         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11430         symbols in the static and global blocks.
11431
11432 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11433
11434         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11435         gdb_ptrace.h, and move including gdb_wait.h ...
11436         * nat/linux-ptrace.h: ... to here.
11437
11438 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11439
11440         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11441         inf_ptrace_detach_success.
11442         (inf_ptrace_detach_success): Add inferior parameter, use it
11443         instead of inferior_ptid, pass it to detach_inferior.
11444         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11445         parameter.
11446         * inferior.c (detach_inferior): Add overload that takes an
11447         inferior object.
11448         * inferior.h (detach_inferior): Likewise.
11449         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11450         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11451         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11452
11453 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11454
11455         * target.h (struct target_ops) <to_detach>: Add inferior
11456         parameter.
11457         (target_detach): Likewise.
11458         * target.c (dispose_inferior): Pass inferior down.
11459         (target_detach): Pass inferior down.  Assert that it is equal to
11460         the current inferior.
11461         * aix-thread.c (aix_thread_detach): Pass inferior down.
11462         * corefile.c (core_file_command): Pass current_inferior() down.
11463         * corelow.c (core_detach): Add inferior parameter.
11464         * darwin-nat.c (darwin_detach): Likewise.
11465         * gnu-nat.c (gnu_detach): Likewise.
11466         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11467         * infcmd.c (detach_command): Pass current_inferior() down to
11468         target_detach.
11469         * infrun.c (follow_fork_inferior): Pass parent_inf to
11470         target_detach.
11471         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11472         target_detach.
11473         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11474         * linux-thread-db.c (thread_db_detach): Likewise.
11475         * nto-procfs.c (procfs_detach): Likewise.
11476         * procfs.c (procfs_detach): Likewise.
11477         * record.c (record_detach): Likewise.
11478         * record.h (struct inferior): Forward-declare.
11479         (record_detach): Add inferior parameter.
11480         * remote-sim.c (gdbsim_detach): Likewise.
11481         * remote.c (remote_detach_1): Likewise.
11482         (remote_detach): Likewise.
11483         (extended_remote_detach): Likewise.
11484         * sol-thread.c (sol_thread_detach): Likewise.
11485         * target-debug.h (target_debug_print_inferior_p): New macro.
11486         * target-delegates.c: Re-generate.
11487         * top.c (kill_or_detach): Pass inferior down to target_detach.
11488         * windows-nat.c (windows_detach): Add inferior parameter.
11489
11490 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11491
11492         * target.h (struct target_ops) <to_detach>: Remove args
11493         parameter.
11494         (target_detach): Likewise.
11495         * target.c (dispose_inferior): Adjust.
11496         (target_detach): Remove args parameter, adjust.
11497         * aix-thread.c (aix_thread_detach): Adjust.
11498         * corefile.c (core_file_command): Adjust.
11499         * corelow.c (core_detach): Adjust.
11500         * darwin-nat.c (darwin_detach): Adjust.
11501         * gnu-nat.c (gnu_detach): Adjust.
11502         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11503         * infcmd.c (detach_command): Adjust
11504         * infrun.c (follow_fork_inferior): Adjust.
11505         (handle_vfork_child_exec_or_exit): Adjust.
11506         * linux-fork.c (linux_fork_detach): Remove args parameter.
11507         * linux-fork.h (linux_fork_detach): Likewise.
11508         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11509         * linux-thread-db.c (thread_db_detach): Likewise.
11510         * nto-procfs.c (procfs_detach): Likewise.
11511         * procfs.c (procfs_detach): Likewise.
11512         (do_detach): Remove signo parameter.
11513         * record.c (record_detach): Remove args parameter.
11514         * record.h (record_detach): Likewise.
11515         * remote-sim.c (gdbsim_detach): Likewise.
11516         * remote.c (remote_detach_1): Likewise.
11517         (remote_detach): Likewise.
11518         (extended_remote_detach): Likewise.
11519         * sol-thread.c (sol_thread_detach): Likewise.
11520         * target-delegates.c: Re-generate.
11521         * top.c (struct qt_args) <args>: Remove field.
11522         (kill_or_detach): Don't pass args.
11523         (quit_force): Don't set args.
11524         * windows-nat.c (windows_detach): Remove args parameter.
11525
11526 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11527
11528         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11529         (arm_linux_init_abi): Install it.
11530
11531 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11532
11533         * osabi.c (gdb_osabi_names): Extend the regexp for
11534         arm-linux-gnueabihf.
11535
11536 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11537
11538         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11539         m_abbrevs.
11540         (abbrev_table::add_abbrev): Update.
11541         (abbrev_table::lookup_abbrev): Update.
11542
11543 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11544
11545         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11546
11547 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11548
11549         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11550         to "std::string".
11551
11552 2018-01-17  Tom Tromey  <tom@tromey.com>
11553
11554         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11555
11556 2018-01-17  Tom Tromey  <tom@tromey.com>
11557
11558         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11559         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11560         (create_array_type_with_stride): Update.
11561         * dwarf2read.c (set_die_type): Update.
11562
11563 2018-01-17  Tom Tromey  <tom@tromey.com>
11564
11565         * dwarf2read.c (delayed_method_info): Remove typedef.
11566         (dwarf2_cu::method_info): Now a std::vector.
11567         (add_to_method_list): Update.
11568         (free_delayed_list): Remove.
11569         (compute_delayed_physnames): Update.
11570         (process_full_comp_unit, process_full_type_unit): Clear the method
11571         list.  Remove cleanups.
11572         (psymtab_include_file_name): Add name_holder parameter.  Use
11573         unique_xmalloc_ptr.
11574         (dwarf_decode_lines): Update.
11575
11576 2018-01-17  Tom Tromey  <tom@tromey.com>
11577             Simon Marchi  <simon.marchi@ericsson.com>
11578
11579         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11580         (dwarf2_per_objfile::free_cached_comp_units)
11581         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11582         (init_cutu_and_read_dies_no_follow): Update.
11583         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11584         (dwarf2_cu::~dwarf2_cu): New.
11585         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11586         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11587
11588 2018-01-17  Tom Tromey  <tom@tromey.com>
11589             Simon Marchi  <simon.marchi@ericsson.com>
11590
11591         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11592         (struct die_reader_specs) <abbrev_table>: New member.
11593         (struct abbrev_table): Add constructor.
11594         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11595         <abbrev_obstack>: Now an auto_obstack.
11596         (abbrev_table_up): New typedef.
11597         (init_cu_die_reader): Add abbrev_table parameter.
11598         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11599         Add result_dwo_abbrev_table.
11600         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11601         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11602         Update.
11603         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11604         parameter.
11605         (skip_children): Update.
11606         (abbrev_table::alloc_abbrev): Rename from
11607         abbrev_table_alloc_abbrev.
11608         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11609         (abbrev_table::lookup_abbrev): Rename from
11610         abbrev_table_lookup_abbrev.
11611         (abbrev_table_read_table): Return abbrev_table_up.
11612         (abbrev_table_free, abbrev_table_free_cleanup)
11613         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11614         (load_partial_dies): Update.
11615
11616 2018-01-17  Tom Tromey  <tom@tromey.com>
11617
11618         * dwarf2read.c (dwarf2_compute_name): Update comment.
11619         (read_func_scope, read_variable): Update.
11620         (new_symbol): Remove.
11621         (new_symbol_full): Rename to new_symbol.
11622
11623 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11624
11625         PR gdb/16577
11626         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11627         a warning instead of throwing an error, set section size to 0 and return
11628         NULL.
11629         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11630
11631 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11632
11633         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11634         std::string.
11635         (linux_ptrace_attach_fail_reason_string): Likewise.
11636         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11637         Likewise.
11638         (linux_ptrace_attach_fail_reason_string): Likewise.
11639         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11640
11641 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11642
11643         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11644
11645 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11646
11647         PR gdb/21559
11648         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11649         checking for fs_base/gs_base fields in struct user_regs_struct.
11650         * configure: Regenerate.
11651
11652 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11653
11654         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11655         function.
11656         (aarch64_linux_init_abi): Install it to gdbarch hook
11657         gcc_target_options.
11658
11659 2018-01-15  Pedro Alves  <palves@redhat.com>
11660
11661         * common/signals-state-save-restore.c
11662         (save_original_signals_state): Fix typos.
11663
11664 2017-01-12  Tom Tromey  <tom@tromey.com>
11665             Sergio Durigan Junior  <sergiodj@redhat.com>
11666
11667         * Makefile.in (install-only): Install gdb-add-index.
11668
11669 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11670
11671         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11672
11673 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11674
11675         * infrun.c (keep_going_pass_signal): Clear step-over info when
11676         insert_breakpoints fails.
11677
11678 2018-01-11  Pedro Alves  <palves@redhat.com>
11679
11680         PR gdb/22583
11681         * infrun.c (resume): Rename to ...
11682         (resume_1): ... this.
11683         (resume): Reimplement as wrapper around resume_1.
11684
11685 2018-01-11  Pedro Alves  <palves@redhat.com>
11686
11687         PR remote/22597
11688         * remote.c (remote_parse_stop_reply): Default to the last-set
11689         general thread instead of to 'magic_null_ptid'.
11690
11691 2018-01-10  Pedro Alves  <palves@redhat.com>
11692
11693         * language.h (language_get_symbol_name_matcher): Rename ...
11694         (get_symbol_name_matcher): ... this.
11695         * language.c (language_get_symbol_name_matcher): Ditto.
11696         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11697         callers adjusted.
11698
11699 2018-01-10  Pedro Alves  <palves@redhat.com>
11700
11701         PR gdb/22670
11702         * dwarf2read.c
11703         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11704         Adjust to use language_get_symbol_name_matcher instead of
11705         language_defn::la_get_symbol_name_matcher.
11706         * language.c (language_get_symbol_name_matcher): If in Ada mode
11707         and the lookup name is a verbatim match, return Ada's matcher.
11708         * language.h (language_get_symbol_name_matcher): Adjust comment.
11709         (ada_lookup_name_info::verbatim_p):: New method.
11710
11711 2018-01-10  Pedro Alves  <palves@redhat.com>
11712
11713         PR gdb/22670
11714         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11715         minsym's language is language_auto or language_cplus, pass down
11716         language_ada instead.
11717         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11718
11719 2018-01-10  Pedro Alves  <palves@redhat.com>
11720
11721         PR gdb/22670
11722         * minsyms.c (linkage_name_str): New function.
11723         (iterate_over_minimal_symbols): Use it.
11724
11725 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11726
11727         * NEWS: Document that 'info proc' now works on FreeBSD.
11728
11729 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11730
11731         * configure.ac: Check for kinfo_getfile in libutil.
11732         * configure: Regenerate.
11733         * config.in: Regenerate.
11734         * fbsd-nat.c: Include "fbsd-tdep.h".
11735         (fbsd_fetch_cmdline): New.
11736         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11737         rather than calling error.
11738         (fbsd_info_proc): New.
11739         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11740         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11741         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11742
11743 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11744
11745         * fbsd-nat.c (struct free_deleter): Remove.
11746         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11747
11748 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11749
11750         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11751         NULL for an empty pathname.
11752
11753 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11754
11755         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11756         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11757         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11758         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11759         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11760         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11761         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11762         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11763         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11764         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11765         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11766         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11767         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11768         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11769         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11770
11771 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11772
11773         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11774         (gnu_xfer_auxv): New function.
11775         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11776         TARGET_OBJECT_AUXV.
11777
11778 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11779             Simon Marchi  <simon.marchi@ericsson.com>
11780
11781         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11782         common/selftest.c.
11783         (COMMON_OBS): Remove selftest.o.
11784         * configure.ac: Append selftest-arch.c and common/selftest.c to
11785         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11786         * configure: Re-generated.
11787         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11788         GDB_SELF_TEST.
11789         (maintenance_info_selftests): Likewise.
11790
11791 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11792
11793         * ada-valprint.c (val_print_packed_array_elements): Use
11794         proper number of elements when printing an array indexed
11795         by an enumeration type.
11796
11797 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11798
11799         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11800         (dw2_get_file_names_reader): Adjust.
11801         (lookup_dwo_signatured_type): Adjust.
11802         (lookup_dwp_signatured_type): Adjust.
11803         (lookup_signatured_type): Adjust.
11804         (create_type_unit_group): Adjust.
11805         (get_type_unit_group): Adjust.
11806         (process_psymtab_comp_unit_reader): Adjust.
11807         (build_type_psymtabs_reader): Adjust.
11808         (scan_partial_symbols): Adjust.
11809         (add_partial_symbol): Adjust.
11810         (add_partial_subprogram): Adjust.
11811         (peek_die_abbrev): Adjust.
11812         (fixup_go_packaging): Adjust.
11813         (process_imported_unit_die): Adjust.
11814         (dwarf2_compute_name): Adjust.
11815         (dwarf2_physname): Adjust.
11816         (read_import_statement): Adjust.
11817         (handle_DW_AT_stmt_list): Adjust.
11818         (read_file_scope): Adjust.
11819         (read_func_scope): Adjust.
11820         (read_lexical_block_scope): Adjust.
11821         (read_call_site_scope): Adjust.
11822         (read_variable): Adjust.
11823         (dwarf2_rnglists_process): Adjust.
11824         (dwarf2_ranges_process): Adjust.
11825         (dwarf2_ranges_read): Adjust.
11826         (dwarf2_get_pc_bounds): Adjust.
11827         (dwarf2_record_block_ranges): Adjust.
11828         (dwarf2_add_field): Adjust.
11829         (dwarf2_add_member_fn): Adjust.
11830         (read_structure_type): Adjust.
11831         (process_structure_scope): Adjust.
11832         (read_enumeration_type): Adjust.
11833         (read_array_type): Adjust.
11834         (mark_common_block_symbol_computed): Adjust.
11835         (read_common_block): Adjust.
11836         (read_namespace_type): Adjust.
11837         (read_namespace): Adjust.
11838         (read_module_type): Adjust.
11839         (read_tag_pointer_type): Adjust.
11840         (read_tag_ptr_to_member_type): Adjust.
11841         (read_tag_string_type): Adjust.
11842         (read_subroutine_type): Adjust.
11843         (read_typedef): Adjust.
11844         (read_base_type): Adjust.
11845         (attr_to_dynamic_prop): Adjust.
11846         (read_subrange_type): Adjust.
11847         (read_unspecified_type): Adjust.
11848         (dwarf2_read_abbrevs): Adjust.
11849         (load_partial_dies): Adjust.
11850         (read_partial_die): Adjust.
11851         (find_partial_die): Adjust.
11852         (guess_partial_die_structure_name): Adjust.
11853         (fixup_partial_die): Adjust.
11854         (read_attribute_value): Adjust.
11855         (read_addr_index): Adjust.
11856         (read_addr_index_from_leb128): Adjust.
11857         (read_str_index): Adjust.
11858         (dwarf2_string_attr): Adjust.
11859         (get_debug_line_section): Adjust.
11860         (dwarf_decode_line_header): Adjust.
11861         (lnp_state_machine::check_line_address): Adjust.
11862         (dwarf_decode_lines_1): Adjust.
11863         (dwarf_decode_lines): Adjust.
11864         (dwarf2_start_symtab): Adjust.
11865         (var_decode_location): Adjust.
11866         (new_symbol_full): Adjust.
11867         (dwarf2_const_value_data): Adjust.
11868         (dwarf2_const_value_attr): Adjust.
11869         (dwarf2_const_value): Adjust.
11870         (die_type): Adjust.
11871         (die_containing_type): Adjust.
11872         (build_error_marker_type): Adjust.
11873         (lookup_die_type): Adjust.
11874         (guess_full_die_structure_name): Adjust.
11875         (anonymous_struct_prefix): Adjust.
11876         (determine_prefix): Adjust.
11877         (dwarf2_name): Adjust.
11878         (follow_die_ref_or_sig): Adjust.
11879         (follow_die_offset): Adjust.
11880         (follow_die_ref): Adjust.
11881         (follow_die_sig_1): Adjust.
11882         (follow_die_sig): Adjust.
11883         (get_signatured_type): Adjust.
11884         (get_DW_AT_signature_type): Adjust.
11885         (decode_locdesc): Adjust.
11886         (dwarf_decode_macros): Adjust.
11887         (cu_debug_loc_section): Adjust.
11888         (fill_in_loclist_baton): Adjust.
11889         (dwarf2_symbol_mark_computed): Adjust.
11890         (init_one_comp_unit): Don't assign
11891         dwarf2_cu::dwarf2_per_objfile.
11892         (set_die_type): Adjust.
11893
11894 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11895
11896         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11897         <dwarf2_per_objfile>: New field.
11898         (dwarf2_per_objfile): Remove global.
11899         (get_dwarf2_per_objfile): New function.
11900         (set_dwarf2_per_objfile): New function.
11901         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11902         dwarf2_per_objfile.
11903         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11904         (read_abbrev_offset): Likewise.
11905         (read_indirect_string): Likewise.
11906         (read_indirect_line_string): Likewise.
11907         (read_indirect_string_at_offset): Likewise.
11908         (read_indirect_string_from_dwz): Likewise.
11909         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11910         dwarf2_per_objfile.
11911         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11912         (create_all_comp_units): Change objfile parameter to
11913         dwarf2_per_objfile.
11914         (create_all_type_units): Likewise.
11915         (process_queue): Add dwarf2_per_objfile parameter.
11916         (read_and_check_comp_unit_head): Likewise.
11917         (lookup_dwo_unit_in_dwp): Likewise.
11918         (get_dwp_file): Likewise.
11919         (process_cu_includes): Likewise.
11920         (struct free_dwo_file_cleanup_data): New struct.
11921         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11922         set_dwarf2_per_objfile.
11923         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11924         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11925         context, adjust calls.
11926         (dw2_instantiate_symtab): Likewise.
11927         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11928         (dw2_get_cu): Likewise.
11929         (create_cu_from_index_list): Change objfile parameter to
11930         dwarf2_per_objfile.
11931         (create_cus_from_index_list): Get dwarf2_per_objfile from
11932         context, adjust calls.
11933         (create_cus_from_index): Likewise.
11934         (create_signatured_type_table_from_index): Change objfile
11935         parameter to dwarf2_per_objfile.
11936         (create_signatured_type_table_from_debug_names): Change objfile
11937         parameter to dwarf2_per_objfile.
11938         (create_addrmap_from_index): Likewise.
11939         (create_addrmap_from_aranges): Likewise.
11940         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11941         (dw2_setup): Remove.
11942         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11943         context.
11944         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11945         get_dwarf2_per_objfile.
11946         (dw2_forget_cached_source_info): Likewise.
11947         (dw2_map_symtabs_matching_filename): Likewise.
11948         (struct dw2_symtab_iterator) <index>: Remove.
11949         <dwarf2_per_objfile>: New field.
11950         (dw2_symtab_iter_init): Replace index parameter with
11951         dwarf2_per_objfile.
11952         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11953         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11954         (dw2_print_stats): Likewise.
11955         (dw2_dump): Likewise.
11956         (dw2_expand_symtabs_for_function): Likewise.
11957         (dw2_expand_all_symtabs): Likewise.
11958         (dw2_expand_symtabs_with_fullname): Likewise.
11959         (dw2_expand_marked_cus): Replace index and objfile parameters
11960         with dwarf2_per_objfile.
11961         (dw_expand_symtabs_matching_file_matcher): Add
11962         dwarf2_per_objfile parameter and adjust calls.
11963         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11964         adjust calls.
11965         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11966         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11967         adjust calls.
11968         (create_cus_from_debug_names_list): Replace objfile parameter
11969         with dwarf2_per_objfile and adjust calls.
11970         (create_cus_from_debug_names): Likewise.
11971         (dwarf2_read_debug_names): Likewise.
11972         (mapped_debug_names::namei_to_name): Adjust call.
11973         (dw2_debug_names_iterator::next): Likewise.
11974         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11975         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11976         (dw2_debug_names_dump): Likewise.
11977         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11978         (dw2_debug_names_expand_symtabs_matching): Likewise.
11979         (dwarf2_initialize_objfile): Likewise.
11980         (dwarf2_build_psymtabs): Likewise.
11981         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11982         this_cu.
11983         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11984         (read_and_check_comp_unit_head): Likewise.
11985         (read_abbrev_offset): Likewise.
11986         (create_debug_type_hash_table): Likewise.
11987         (create_debug_types_hash_table): Likewise.
11988         (create_all_type_units): Replace objfile parameter with
11989         dwarf2_per_objfile.
11990         (add_type_unit): Add dwarf2_per_objfile parameter.
11991         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11992         with dwarf2_per_objfile.
11993         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11994         (lookup_dwp_signatured_type): Likewise.
11995         (lookup_signatured_type): Likewise.
11996         (read_cutu_die_from_dwo): Likewise.
11997         (init_tu_and_read_dwo_dies): Likewise.
11998         (init_cutu_and_read_dies): Likewise.
11999         (init_cutu_and_read_dies_no_follow): Likewise.
12000         (allocate_type_unit_groups_table): Add objfile parameter.
12001         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12002         (get_type_unit_group): Likewise.
12003         (process_psymtab_comp_unit): Update call.
12004         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12005         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12006         (print_tu_stats): Likewise.
12007         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12008         in void* parameter.
12009         (build_type_psymtabs): Change objfile parameter to
12010         dwarf2_per_objfile.
12011         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12012         passed in void* parameter.
12013         (process_skeletonless_type_units): Change objfile parameter to
12014         dwarf2_per_objfile.
12015         (set_partial_user): Likewise.
12016         (dwarf2_build_psymtabs_hard): Likewise.
12017         (read_comp_units_from_section): Likewise.
12018         (create_all_comp_units): Likewise.
12019         (scan_partial_symbols): Update calls.
12020         (add_partial_symbol): Likewise.
12021         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12022         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12023         (process_queue): Add dwarf2_per_objfile parameter.
12024         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12025         (compute_compunit_symtab_includes): Likewise.
12026         (process_cu_includes): Add dwarf2_per_objfile parameter.
12027         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12028         (process_full_type_unit): Likewise.
12029         (process_imported_unit_die): Update call.
12030         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12031         (read_file_scope): Likewise.
12032         (allocate_dwo_file_hash_table): Add objfile parameter.
12033         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12034         (create_cus_hash_table): Likewise.
12035         (create_dwp_hash_table): Likewise.
12036         (create_dwo_unit_in_dwp_v1): Likewise.
12037         (create_dwp_v2_section): Likewise.
12038         (create_dwo_unit_in_dwp_v2): Likewise.
12039         (lookup_dwo_unit_in_dwp): Likewise.
12040         (try_open_dwop_file): Likewise.
12041         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12042         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12043         cleanup to include a reference to dwarf2_per_objfile.
12044         (open_dwp_file): Add dwarf2_per_objfile parameter.
12045         (open_and_init_dwp_file): Likewise.
12046         (get_dwp_file): Likewise.
12047         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12048         (queue_and_load_all_dwo_tus): Update call.
12049         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12050         data.
12051         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12052         (dwarf2_ranges_process): Likewise.
12053         (dwarf2_get_pc_bounds): Likewise.
12054         (mark_common_block_symbol_computed): Likewise.
12055         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12056         (dwarf2_read_abbrevs): Update call.
12057         (read_partial_die): Use dwarf2_per_objfile from cu.
12058         (find_partial_die): Likewise.
12059         (fixup_partial_die): Likewise.
12060         (read_attribute_value): Likewise.
12061         (read_indirect_string_at_offset_from): Add objfile parameter.
12062         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12063         parameter.
12064         (read_indirect_string_from_dwz): Add objfile parameter.
12065         (read_indirect_string): Add objfile parameter.
12066         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12067         (read_addr_index): Use dwarf2_per_objfile from cu.
12068         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12069         call dw2_setup.
12070         (read_str_index): Use dwarf2_per_objfile from cu.
12071         (get_debug_line_section): Likewise.
12072         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12073         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12074         (new_symbol_full): Use dwarf2_per_objfile from cu.
12075         (build_error_marker_type): Likewise.
12076         (lookup_die_type): Likewise.
12077         (determine_prefix): Likewise.
12078         (follow_die_offset): Likewise.
12079         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12080         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12081         (dwarf2_fetch_die_type_sect_off): Likewise.
12082         (dwarf2_get_die_type): Likewise.
12083         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12084         (get_signatured_type): Likewise.
12085         (get_DW_AT_signature_type): Likewise.
12086         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12087         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12088         (cu_debug_loc_section): Likewise.
12089         (fill_in_loclist_baton): Likewise.
12090         (dwarf2_symbol_mark_computed): Likewise.
12091         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12092         dwarf2_per_objfile.
12093         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12094         parameter.
12095         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12096         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12097         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12098         (set_die_type): Use dwarf2_free_objfile from cu.
12099         (get_die_type_at_offset): Likewise.
12100         (dwarf2_per_objfile_free): Don't assign global variable.
12101         (debug_names) <constructor>: Add dwarf2_per_objfile
12102         parameter, update m_debugstrlookup construction.
12103         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12104         parameter.
12105         <m_dwarf2_per_objfile>: New field.
12106         <lookup>: Use m_dwarf2_per_objfile.
12107         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12108         (psyms_seen_size): Likewise.
12109         (write_gdbindex): Replace objfile parameter with
12110         dwarf2_per_objfile.
12111         (write_debug_names): Likewise.
12112         (write_psymtabs_to_index): Likewise.
12113         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12114         calls.
12115
12116 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12117
12118         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12119         <dwarf2_per_objfile>: New field.
12120         (struct dwarf2_per_cu_data) <objfile>: Remove.
12121         <dwarf2_per_objfile>: New field.
12122         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12123         of objfile.
12124         (create_signatured_type_table_from_index): Likewise.
12125         (create_debug_type_hash_table): Likewise.
12126         (fill_in_sig_entry_from_dwo_entry): Likewise.
12127         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12128         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12129         objfile.
12130         (create_partial_symtab): Access objfile through
12131         dwarf2_per_objfile.
12132         (process_psymtab_comp_unit_reader): Likewise.
12133         (read_comp_units_from_section): Likewise.
12134         (scan_partial_symbols): Likewise.
12135         (add_partial_symbol): Likewise.
12136         (add_partial_subprogram): Likewise.
12137         (peek_die_abbrev): Likewise.
12138         (fixup_go_packaging): Likewise.
12139         (process_full_comp_unit): Likewise.
12140         (process_full_type_unit): Likewise.
12141         (process_imported_unit_die): Likewise.
12142         (dwarf2_compute_name): Likewise.
12143         (dwarf2_physname): Likewise.
12144         (read_import_statement): Likewise.
12145         (create_cus_hash_table): Assign dwarf2_physname instead of
12146         objfile.
12147         (read_func_scope): Access objfile through dwarf2_per_objfile.
12148         (read_lexical_block_scope): Likewise.
12149         (read_call_site_scope): Likewise.
12150         (read_variable): Likewise.
12151         (dwarf2_rnglists_process): Likewise.
12152         (dwarf2_ranges_process): Likewise.
12153         (dwarf2_ranges_read): Likewise.
12154         (dwarf2_record_block_ranges): Likewise.
12155         (dwarf2_add_field): Likewise.
12156         (dwarf2_add_member_fn): Likewise.
12157         (read_structure_type): Likewise.
12158         (process_structure_scope): Likewise.
12159         (read_enumeration_type): Likewise.
12160         (read_array_type): Likewise.
12161         (read_common_block): Likewise.
12162         (read_namespace_type): Likewise.
12163         (read_namespace): Likewise.
12164         (read_module_type): Likewise.
12165         (read_tag_pointer_type): Likewise.
12166         (read_tag_ptr_to_member_type): Likewise.
12167         (read_tag_string_type): Likewise.
12168         (read_subroutine_type): Likewise.
12169         (read_typedef): Likewise.
12170         (read_base_type): Likewise.
12171         (attr_to_dynamic_prop): Likewise.
12172         (read_subrange_type): Likewise.
12173         (read_unspecified_type): Likewise.
12174         (load_partial_dies): Likewise.
12175         (read_partial_die): Likewise.
12176         (find_partial_die): Likewise.
12177         (guess_partial_die_structure_name): Likewise.
12178         (fixup_partial_die): Likewise.
12179         (read_attribute_value): Likewise.
12180         (read_addr_index_from_leb128): Likewise.
12181         (dwarf2_read_addr_index): Likewise.
12182         (dwarf2_string_attr): Likewise.
12183         (lnp_state_machine::check_line_address): Likewise.
12184         (dwarf_decode_lines_1): Likewise.
12185         (dwarf_decode_lines): Likewise.
12186         (dwarf2_start_symtab): Likewise.
12187         (var_decode_location): Likewise.
12188         (new_symbol_full): Likewise.
12189         (dwarf2_const_value_data): Likewise.
12190         (dwarf2_const_value_attr): Likewise.
12191         (dwarf2_const_value): Likewise.
12192         (die_type): Likewise.
12193         (die_containing_type): Likewise.
12194         (lookup_die_type): Likewise.
12195         (guess_full_die_structure_name): Likewise.
12196         (anonymous_struct_prefix): Likewise.
12197         (dwarf2_name): Likewise.
12198         (follow_die_ref_or_sig): Likewise.
12199         (follow_die_offset): Likewise.
12200         (follow_die_ref): Likewise.
12201         (dwarf2_fetch_die_loc_sect_off): Likewise.
12202         (dwarf2_fetch_constant_bytes): Likewise.
12203         (dwarf2_fetch_die_type_sect_off): Likewise.
12204         (dwarf2_get_die_type): Likewise.
12205         (follow_die_sig): Likewise.
12206         (decode_locdesc): Likewise.
12207         (dwarf2_per_cu_objfile): Likewise.
12208         (dwarf2_per_cu_text_offset): Likewise.
12209         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12210         objfile.
12211         (set_die_type): Access objfile through
12212         dwarf2_per_objfile.
12213
12214 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12215
12216         * valprint.c (converted_character_d): Remove typedef.
12217         (DEF_VEC_O (converted_character_d)): Remove.
12218         (count_next_character): Use std::vector.
12219         (print_converted_chars_to_obstack): Likewise.
12220         (generic_printstr): Likewise.
12221
12222 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12223
12224         * xml-support.h (struct gdb_xml_value): Add constructor.
12225         <value>: Change type to unique_xmalloc_ptr.
12226         (gdb_xml_value_s): Remove typedef.
12227         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12228         (gdb_xml_element_start_handler): Change parameter type to
12229         std::vector.
12230         (xml_find_attribute): Likewise.
12231         * xml-support.c (xml_find_attribute): Change parameter type to
12232         std::vector and adjust.
12233         (gdb_xml_values_cleanup): Remove.
12234         (gdb_xml_parser::start_element): Adjust to std::vector.
12235         (xinclude_start_include): Change paraeter type to std::vector
12236         and adjust.
12237         * btrace.c (check_xml_btrace_version): Likewise.
12238         (parse_xml_btrace_block): Likewise.
12239         (parse_xml_btrace_pt_config_cpu): Likewise.
12240         (parse_xml_btrace_pt): Likewise.
12241         (parse_xml_btrace_conf_bts): Likewise.
12242         (parse_xml_btrace_conf_pt): Likewise.
12243         * memory-map.c (memory_map_start_memory): Likewise.
12244         (memory_map_start_property): Likewise.
12245         * osdata.c (osdata_start_osdata): Likewise.
12246         (osdata_start_item): Likewise.
12247         (osdata_start_column): Likewise.
12248         * remote.c (start_thread): Likewise.
12249         * solib-aix.c (library_list_start_library): Likewise.
12250         (library_list_start_list): Likewise.
12251         * solib-svr4.c (library_list_start_library): Likewise.
12252         (svr4_library_list_start_list): Likewise.
12253         * solib-target.c (library_list_start_segment): Likewise.
12254         (library_list_start_section): Likewise.
12255         (library_list_start_library): Likewise.
12256         (library_list_start_list): Likewise.
12257         * tracepoint.c (traceframe_info_start_memory): Likewise.
12258         (traceframe_info_start_tvar): Likewise.
12259         * xml-syscall.c (syscall_start_syscall): Likewise.
12260         * xml-tdesc.c (tdesc_start_target): Likewise.
12261         (tdesc_start_feature): Likewise.
12262         (tdesc_start_reg): Likewise.
12263         (tdesc_start_union): Likewise.
12264         (tdesc_start_struct): Likewise.
12265         (tdesc_start_flags): Likewise.
12266         (tdesc_start_enum): Likewise.
12267         (tdesc_start_field): Likewise.
12268         (tdesc_start_enum_value): Likewise.
12269         (tdesc_start_vector): Likewise.
12270
12271 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12272
12273         * extension.h (struct xmethod_worker) <clone>: Remove.
12274         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12275         Remove.
12276         (python_xmethod_worker::clone): Remove.
12277         * valops.c (find_overload_match): Use std::move instead of
12278         clone.
12279
12280 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12281
12282         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12283         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12284         <free_xmethod_worker_data>: Remove.
12285         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12286         <get_xmethod_arg_types>: Remove.
12287         <get_xmethod_result_type>: Remove.
12288         <invoke_xmethod>: Remove.
12289         * extension.c (new_xmethod_worker): Remove.
12290         (clone_xmethod_worker): Remove.
12291         (get_matching_xmethod_workers): Return void, pass std::vector by
12292         pointer.
12293         (get_xmethod_arg_types): Rename to...
12294         (xmethod_worker::get_arg_types): ... this, and adjust.
12295         (get_xmethod_result_type): Rename to...
12296         (xmethod_worker::get_result_type): ... this, and adjust.
12297         (invoke_xmethod): Remove.
12298         (free_xmethod_worker): Remove.
12299         (free_xmethod_worker_vec): Remove.
12300         * extension.h (enum ext_lang_rc): Move here from
12301         extension-priv.h.
12302         (struct xmethod_worker): Add constructor and destructor.
12303         <data>: Remove.
12304         <value>: Remove.
12305         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12306         virtual pure methods.
12307         <get_arg_types, get_result_type>: New methods.
12308         (xmethod_worker_ptr): Remove typedef.
12309         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12310         (xmethod_worker_vec): Remove typedef.
12311         (xmethod_worker_up): New typedef.
12312         (invoke_xmethod): Remove.
12313         (clone_xmethod_worker): Remove.
12314         (free_xmethod_worker): Remove.
12315         (free_xmethod_worker_vec): Remove.
12316         (get_xmethod_arg_types): Remove.
12317         (get_xmethod_result_type): Remove.
12318         * valops.c (find_method_list): Use std::vector, don't use
12319         intermediate vector.
12320         (value_find_oload_method_list): Use std::vector.
12321         (find_overload_match): Use std::vector.
12322         (find_oload_champ): Use std::vector.
12323         * value.c (value_free): Use operator delete.
12324         (value_of_xmethod): Rename to...
12325         (value_from_xmethod): ... this.  Don't assign
12326         xmethod_worker::value, take rvalue-reference.
12327         (result_type_of_xmethod): Adjust.
12328         (call_xmethod): Adjust.
12329         * value.h: Include extension.h.
12330         (struct xmethod_worker): Don't forward-declare.
12331         (value_of_xmethod): Rename to...
12332         (value_from_xmethod): ... this, take rvalue-reference.
12333         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12334         (struct python_xmethod_worker): ... this, add constructor and
12335         destructor.
12336         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12337         (gdbpy_free_xmethod_worker_data): Rename to...
12338         (python_xmethod_worker::~python_xmethod_worker): ... this and
12339         adjust.
12340         (gdbpy_clone_xmethod_worker_data): Rename to...
12341         (python_xmethod_worker::clone): ... this and adjust.
12342         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12343         temporary vector.
12344         (gdbpy_get_xmethod_arg_types): Rename to...
12345         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12346         (gdbpy_get_xmethod_result_type): Rename to...
12347         (python_xmethod_worker::do_get_result_type): ... this and
12348         adjust.
12349         (gdbpy_invoke_xmethod): Rename to...
12350         (python_xmethod_worker::invoke): ... this and adjust.
12351         (new_python_xmethod_worker): Rename to...
12352         (python_xmethod_worker::python_xmethod_worker): ... this and
12353         adjust.
12354         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12355         Remove.
12356         (gdbpy_free_xmethod_worker_data): Remove.
12357         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12358         (gdbpy_get_xmethod_arg_types): Remove.
12359         (gdbpy_get_xmethod_result_type): Remove.
12360         (gdbpy_invoke_xmethod): Remove.
12361         * python/python.c (python_extension_ops): Remove obsolete
12362         callbacks.
12363
12364 2018-01-05  Pedro Alves  <palves@redhat.com>
12365
12366         PR gdb/18653
12367         * common/signals-state-save-restore.c
12368         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12369         find a custom handler preinstalled, instead of internal erroring.
12370         But only warn if !quiet.
12371         * common/signals-state-save-restore.h
12372         (save_original_signals_state): New parameter 'quiet'.
12373         * main.c (captured_main_1): Move save_original_signals_state call
12374         after option handling, and pass QUIET.
12375
12376 2018-01-05  Pedro Alves  <palves@redhat.com>
12377
12378         * spu-tdep.c (spu_catch_start): Pass
12379         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12380
12381 2018-01-05  Pedro Alves  <palves@redhat.com>
12382
12383         PR gdb/22670
12384         * ada-lang.c (literal_symbol_name_matcher): New function.
12385         (ada_get_symbol_name_matcher): Use it for
12386         symbol_name_match_type::SEARCH_NAME.
12387         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12388         it down instead of assuming symbol_name_match_type::FULL.
12389         * block.h (block_lookup_symbol): New parameter 'match_type'.
12390         * c-valprint.c (print_unpacked_pointer): Use
12391         lookup_symbol_search_name instead of lookup_symbol.
12392         * compile/compile-object-load.c (get_out_value_type): Pass down
12393         symbol_name_match_type::SEARCH_NAME.
12394         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12395         symbol_name_match_type::FULL.
12396         * cp-support.c (cp_get_symbol_name_matcher): Handle
12397         symbol_name_match_type::SEARCH_NAME.
12398         * infrun.c (insert_exception_resume_breakpoint): Use
12399         lookup_symbol_search_name.
12400         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12401         * psymtab.c (maintenance_check_psymtabs): Use
12402         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12403         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12404         SYMBOL_SEARCH_NAME.
12405         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12406         if symbol_name_match_type::SEARCH_NAME.
12407         (lookup_symbol_in_language): Pass down
12408         symbol_name_match_type::FULL.
12409         (lookup_symbol_search_name): New.
12410         (lookup_language_this): Pass down
12411         symbol_name_match_type::SEARCH_NAME.
12412         (lookup_symbol_aux, lookup_local_symbol): New parameter
12413         'match_type'.  Pass it down.
12414         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12415         (lookup_symbol_search_name): New declaration.
12416         (lookup_symbol_in_block): New 'match_type' parameter.
12417
12418 2018-01-05  Pedro Alves  <palves@redhat.com>
12419
12420         PR gdb/22670
12421         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12422         ada_lookup_symbol.
12423         (ada_lookup_symbol): Reimplement in terms of
12424         ada_lookup_symbol_list, bits factored out from
12425         ada_lookup_encoded_symbol.
12426
12427 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12428
12429         * ada-exp.y (write_object_renaming): When subscripting an array
12430         using a symbol as the index, pass the block in call to
12431         ada_lookup_encoded_symbol when looking that symbol up.
12432
12433 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12434
12435         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12436         TYPE_INDEX_TYPE.
12437
12438 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12439
12440         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12441         the case where VALUE_LVAL (val0) is not lval_memory.
12442
12443 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12444
12445         * ada-valprint.c (print_optional_low_bound): Handle
12446         character-indexed array printing like boolean-indexed array
12447         printing.
12448
12449 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12450
12451         * NEWS: Create a new section for the next release branch.
12452         Rename the section of the current branch, now that it has
12453         been cut.
12454
12455 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12456
12457         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12458         * version.in: Bump version to 8.1.50.DATE-git.
12459
12460 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12461
12462         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12463         Add field.
12464         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12465         Add field.
12466         (default_exception_support_info) <catch_handlers_sym>: Add field.
12467         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12468         (ada_exception_name_addr_1): Add "catch handlers" handling.
12469         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12470         Update all callers.
12471         (create_excep_cond_exprs) <ex>: Add parameter.
12472         (re_set_exception): Update create_excep_cond_exprs call.
12473         (print_it_exception, print_one_exception, print_mention_exception)
12474         (print_recreate_exception): Add "catch handler" handling.
12475         (allocate_location_catch_handlers, re_set_catch_handlers)
12476         (check_status_catch_handlers, print_it_catch_handlers)
12477         (print_one_catch_handlers, print_mention_catch_handlers)
12478         (print_recreate_catch_handlers): New function.
12479         (catch_handlers_breakpoint_ops): New variable.
12480         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12481         Add parameter.  Add "catch handler" handling.
12482         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12483         Add "catch handler" handling.
12484         (ada_exception_catchpoint_cond_string): Add "catch handler"
12485         handling.
12486         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12487         call.
12488         (catch_ada_handlers_command): New function.
12489         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12490         operations structure.
12491         (_initialize_ada_language): Add "catch handlers" command entry.
12492         * NEWS: Document "catch handlers" feature.
12493
12494 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12495
12496         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12497         account when creating the array type of the slice.
12498         (ada_value_slice): Likewise.
12499
12500 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12501
12502         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12503         New enum value.
12504         (create_array_type_with_stride): Add byte_stride_prop parameter.
12505         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12506         New parameter.  Update all callers in this file.
12507         (array_type_has_dynamic_stride): New function.
12508         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12509         of arrays with dynamic byte strides.
12510         * dwarf2read.c (read_array_type): Add support for dynamic
12511         DW_AT_byte_stride attributes.
12512
12513 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12514
12515         * dwarf2read.c (read_unspecified_type): Treat
12516         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12517
12518 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12519
12520         Update copyright year range in all GDB files.
12521
12522 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12523
12524         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12525         and gdb/testsuite/gdb.base/step-line.c.
12526
12527 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12528
12529         * copyright.py (main): Dump the contents of
12530         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12531         even if BY_HAND is empty.
12532
12533 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12534
12535         * top.c (print_gdb_version): Update Copyright year in version
12536         message.
12537
12538 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12539
12540         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12541
12542 For older changes see ChangeLog-2017.
12543 \f
12544 Local Variables:
12545 mode: change-log
12546 left-margin: 8
12547 fill-column: 74
12548 version-control: never
12549 coding: utf-8
12550 End: