Fix riscv-linux native gdb build failure.
[external/binutils.git] / gdb / ChangeLog
1 2018-08-29  Jim Wilson  <jimw@sifive.com>
2
3         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
5         of NT_PRFPREG.
6         (riscv_linux_nat_target::store_registers): Likewise.
7
8 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9
10         PR gdb/23555
11         PR gdb/23558
12         * gnulib/aclocal.m4: Regenerate.
13         * gnulib/config.in: Regenerate.
14         * gnulib/configure: Regenerate.
15         * gnulib/import/Makefile.am: Update.
16         * gnulib/import/Makefile.in: Update.
17         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
18         * gnulib/import/_Noreturn.h: ... this.
19         * gnulib/import/alloca.in.h: Update.
20         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
21         * gnulib/import/arg-nonnull.h: ... this.
22         * gnulib/import/assure.h: Update.
23         * gnulib/import/at-func.c: Update.
24         * gnulib/import/basename-lgpl.c: Update.
25         * gnulib/import/extra/snippet/c++defs.h: Rename to...
26         * gnulib/import/c++defs.h: ... this.
27         * gnulib/import/canonicalize-lgpl.c: Update.
28         * gnulib/import/cdefs.h: Update.
29         * gnulib/import/chdir-long.c: Update.
30         * gnulib/import/chdir-long.h: Update.
31         * gnulib/import/cloexec.c: Update.
32         * gnulib/import/cloexec.h: Update.
33         * gnulib/import/close.c: Update.
34         * gnulib/import/closedir.c: Update.
35         * gnulib/import/config.charset: Update.
36         * gnulib/import/dirent-private.h: Update.
37         * gnulib/import/dirent.in.h: Update.
38         * gnulib/import/dirfd.c: Update.
39         * gnulib/import/dirname-lgpl.c: Update.
40         * gnulib/import/dirname.h: Update.
41         * gnulib/import/dosname.h: Update.
42         * gnulib/import/dup-safer-flag.c: Update.
43         * gnulib/import/dup-safer.c: Update.
44         * gnulib/import/dup.c: Update.
45         * gnulib/import/dup2.c: Update.
46         * gnulib/import/errno.in.h: Update.
47         * gnulib/import/error.c: Update.
48         * gnulib/import/error.h: Update.
49         * gnulib/import/exitfail.c: Update.
50         * gnulib/import/exitfail.h: Update.
51         * gnulib/import/extra/update-copyright: Update.
52         * gnulib/import/fchdir.c: Update.
53         * gnulib/import/fcntl.c: Update.
54         * gnulib/import/fcntl.in.h: Update.
55         * gnulib/import/fd-hook.c: Update.
56         * gnulib/import/fd-hook.h: Update.
57         * gnulib/import/fd-safer-flag.c: Update.
58         * gnulib/import/fd-safer.c: Update.
59         * gnulib/import/fdopendir.c: Update.
60         * gnulib/import/filename.h: Update.
61         * gnulib/import/filenamecat-lgpl.c: Update.
62         * gnulib/import/filenamecat.h: Update.
63         * gnulib/import/flexmember.h: Update.
64         * gnulib/import/float+.h: Update.
65         * gnulib/import/float.c: Update.
66         * gnulib/import/float.in.h: Update.
67         * gnulib/import/fnmatch.c: Update.
68         * gnulib/import/fnmatch.in.h: Update.
69         * gnulib/import/fnmatch_loop.c: Update.
70         * gnulib/import/fpucw.h: Update.
71         * gnulib/import/frexp.c: Update.
72         * gnulib/import/frexpl.c: Update.
73         * gnulib/import/fstat.c: Update.
74         * gnulib/import/fstatat.c: Update.
75         * gnulib/import/getcwd-lgpl.c: Update.
76         * gnulib/import/getcwd.c: Update.
77         * gnulib/import/getdtablesize.c: Update.
78         * gnulib/import/getlogin_r.c: Update.
79         * gnulib/import/getprogname.c: Update.
80         * gnulib/import/getprogname.h: Update.
81         * gnulib/import/gettext.h: Update.
82         * gnulib/import/gettimeofday.c: Update.
83         * gnulib/import/glob-libc.h: Update.
84         * gnulib/import/glob.c: Update.
85         * gnulib/import/glob.in.h: Update.
86         * gnulib/import/glob_internal.h: Update.
87         * gnulib/import/glob_pattern_p.c: Update.
88         * gnulib/import/globfree.c: Update.
89         * gnulib/import/hard-locale.c: Update.
90         * gnulib/import/hard-locale.h: Update.
91         * gnulib/import/intprops.h: Update.
92         * gnulib/import/inttypes.in.h: Update.
93         * gnulib/import/isnan.c: Update.
94         * gnulib/import/isnand-nolibm.h: Update.
95         * gnulib/import/isnand.c: Update.
96         * gnulib/import/isnanl-nolibm.h: Update.
97         * gnulib/import/isnanl.c: Update.
98         * gnulib/import/itold.c: Update.
99         * gnulib/import/libc-config.h: Update.
100         * gnulib/import/limits.in.h: Update.
101         * gnulib/import/localcharset.c: Update.
102         * gnulib/import/localcharset.h: Update.
103         * gnulib/import/localtime-buffer.c: Update.
104         * gnulib/import/localtime-buffer.h: Update.
105         * gnulib/import/lstat.c: Update.
106         * gnulib/import/m4/00gnulib.m4: Update.
107         * gnulib/import/m4/__inline.m4: Update.
108         * gnulib/import/m4/absolute-header.m4: Update.
109         * gnulib/import/m4/alloca.m4: Update.
110         * gnulib/import/m4/builtin-expect.m4: Update.
111         * gnulib/import/m4/canonicalize.m4: Update.
112         * gnulib/import/m4/chdir-long.m4: Update.
113         * gnulib/import/m4/close.m4: Update.
114         * gnulib/import/m4/closedir.m4: Update.
115         * gnulib/import/m4/configmake.m4: Update.
116         * gnulib/import/m4/d-ino.m4: Update.
117         * gnulib/import/m4/d-type.m4: Update.
118         * gnulib/import/m4/dirent_h.m4: Update.
119         * gnulib/import/m4/dirfd.m4: Update.
120         * gnulib/import/m4/dirname.m4: Update.
121         * gnulib/import/m4/double-slash-root.m4: Update.
122         * gnulib/import/m4/dup.m4: Update.
123         * gnulib/import/m4/dup2.m4: Update.
124         * gnulib/import/m4/eealloc.m4: Update.
125         * gnulib/import/m4/environ.m4: Update.
126         * gnulib/import/m4/errno_h.m4: Update.
127         * gnulib/import/m4/error.m4: Update.
128         * gnulib/import/m4/exponentd.m4: Update.
129         * gnulib/import/m4/exponentl.m4: Update.
130         * gnulib/import/m4/extensions.m4: Update.
131         * gnulib/import/m4/extern-inline.m4: Update.
132         * gnulib/import/m4/fchdir.m4: Update.
133         * gnulib/import/m4/fcntl-o.m4: Update.
134         * gnulib/import/m4/fcntl.m4: Update.
135         * gnulib/import/m4/fcntl_h.m4: Update.
136         * gnulib/import/m4/fdopendir.m4: Update.
137         * gnulib/import/m4/filenamecat.m4: Update.
138         * gnulib/import/m4/flexmember.m4: Update.
139         * gnulib/import/m4/float_h.m4: Update.
140         * gnulib/import/m4/fnmatch.m4: Update.
141         * gnulib/import/m4/fnmatch_h.m4: Update.
142         * gnulib/import/m4/fpieee.m4: Update.
143         * gnulib/import/m4/frexp.m4: Update.
144         * gnulib/import/m4/frexpl.m4: Update.
145         * gnulib/import/m4/fstat.m4: Update.
146         * gnulib/import/m4/fstatat.m4: Update.
147         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
148         * gnulib/import/m4/getcwd-path-max.m4: Update.
149         * gnulib/import/m4/getcwd.m4: Update.
150         * gnulib/import/m4/getdtablesize.m4: Update.
151         * gnulib/import/m4/getlogin.m4: Update.
152         * gnulib/import/m4/getlogin_r.m4: Update.
153         * gnulib/import/m4/getpagesize.m4: Update.
154         * gnulib/import/m4/getprogname.m4: Update.
155         * gnulib/import/m4/gettimeofday.m4: Update.
156         * gnulib/import/m4/glibc21.m4: Update.
157         * gnulib/import/m4/glob.m4: Update.
158         * gnulib/import/m4/glob_h.m4: Update.
159         * gnulib/import/m4/gnulib-cache.m4: Update.
160         * gnulib/import/m4/gnulib-common.m4: Update.
161         * gnulib/import/m4/gnulib-comp.m4: Update.
162         * gnulib/import/m4/gnulib-tool.m4: Update.
163         * gnulib/import/m4/hard-locale.m4: Update.
164         * gnulib/import/m4/include_next.m4: Update.
165         * gnulib/import/m4/inttypes-pri.m4: Update.
166         * gnulib/import/m4/inttypes.m4: Update.
167         * gnulib/import/m4/isnand.m4: Update.
168         * gnulib/import/m4/isnanl.m4: Update.
169         * gnulib/import/m4/largefile.m4: Update.
170         * gnulib/import/m4/limits-h.m4: Update.
171         * gnulib/import/m4/localcharset.m4: Update.
172         * gnulib/import/m4/locale-fr.m4: Update.
173         * gnulib/import/m4/locale-ja.m4: Update.
174         * gnulib/import/m4/locale-zh.m4: Update.
175         * gnulib/import/m4/localtime-buffer.m4: Update.
176         * gnulib/import/m4/longlong.m4: Update.
177         * gnulib/import/m4/lstat.m4: Update.
178         * gnulib/import/m4/malloc.m4: Update.
179         * gnulib/import/m4/malloca.m4: Update.
180         * gnulib/import/m4/math_h.m4: Update.
181         * gnulib/import/m4/mbrtowc.m4: Update.
182         * gnulib/import/m4/mbsinit.m4: Update.
183         * gnulib/import/m4/mbsrtowcs.m4: Update.
184         * gnulib/import/m4/mbstate_t.m4: Update.
185         * gnulib/import/m4/memchr.m4: Update.
186         * gnulib/import/m4/memmem.m4: Update.
187         * gnulib/import/m4/mempcpy.m4: Update.
188         * gnulib/import/m4/memrchr.m4: Update.
189         * gnulib/import/m4/mkdir.m4: Update.
190         * gnulib/import/m4/mkstemp.m4: Update.
191         * gnulib/import/m4/mmap-anon.m4: Update.
192         * gnulib/import/m4/mode_t.m4: Update.
193         * gnulib/import/m4/msvc-inval.m4: Update.
194         * gnulib/import/m4/msvc-nothrow.m4: Update.
195         * gnulib/import/m4/multiarch.m4: Update.
196         * gnulib/import/m4/nocrash.m4: Update.
197         * gnulib/import/m4/off_t.m4: Update.
198         * gnulib/import/m4/onceonly.m4: Update.
199         * gnulib/import/m4/open-cloexec.m4: Update.
200         * gnulib/import/m4/open.m4: Update.
201         * gnulib/import/m4/openat.m4: Update.
202         * gnulib/import/m4/opendir.m4: Update.
203         * gnulib/import/m4/pathmax.m4: Update.
204         * gnulib/import/m4/rawmemchr.m4: Update.
205         * gnulib/import/m4/readdir.m4: Update.
206         * gnulib/import/m4/readlink.m4: Update.
207         * gnulib/import/m4/realloc.m4: Update.
208         * gnulib/import/m4/rename.m4: Update.
209         * gnulib/import/m4/rewinddir.m4: Update.
210         * gnulib/import/m4/rmdir.m4: Update.
211         * gnulib/import/m4/save-cwd.m4: Update.
212         * gnulib/import/m4/secure_getenv.m4: Update.
213         * gnulib/import/m4/setenv.m4: Update.
214         * gnulib/import/m4/signal_h.m4: Update.
215         * gnulib/import/m4/ssize_t.m4: Update.
216         * gnulib/import/m4/stat-time.m4: Update.
217         * gnulib/import/m4/stat.m4: Update.
218         * gnulib/import/m4/std-gnu11.m4: Update.
219         * gnulib/import/m4/stdbool.m4: Update.
220         * gnulib/import/m4/stddef_h.m4: Update.
221         * gnulib/import/m4/stdint.m4: Update.
222         * gnulib/import/m4/stdio_h.m4: Update.
223         * gnulib/import/m4/stdlib_h.m4: Update.
224         * gnulib/import/m4/strchrnul.m4: Update.
225         * gnulib/import/m4/strdup.m4: Update.
226         * gnulib/import/m4/strerror.m4: Update.
227         * gnulib/import/m4/string_h.m4: Update.
228         * gnulib/import/m4/strstr.m4: Update.
229         * gnulib/import/m4/strtok_r.m4: Update.
230         * gnulib/import/m4/sys_socket_h.m4: Update.
231         * gnulib/import/m4/sys_stat_h.m4: Update.
232         * gnulib/import/m4/sys_time_h.m4: Update.
233         * gnulib/import/m4/sys_types_h.m4: Update.
234         * gnulib/import/m4/tempname.m4: Update.
235         * gnulib/import/m4/time_h.m4: Update.
236         * gnulib/import/m4/unistd-safer.m4: Update.
237         * gnulib/import/m4/unistd_h.m4: Update.
238         * gnulib/import/m4/warn-on-use.m4: Update.
239         * gnulib/import/m4/wchar_h.m4: Update.
240         * gnulib/import/m4/wchar_t.m4: Update.
241         * gnulib/import/m4/wctype_h.m4: Update.
242         * gnulib/import/m4/wint_t.m4: Update.
243         * gnulib/import/malloc.c: Update.
244         * gnulib/import/malloc/scratch_buffer.h: Update.
245         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
246         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
247         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
248         * gnulib/import/malloca.c: Update.
249         * gnulib/import/malloca.h: Update.
250         * gnulib/import/malloca.valgrind: Update.
251         * gnulib/import/math.in.h: Update.
252         * gnulib/import/mbrtowc.c: Update.
253         * gnulib/import/mbsinit.c: Update.
254         * gnulib/import/mbsrtowcs-impl.h: Update.
255         * gnulib/import/mbsrtowcs-state.c: Update.
256         * gnulib/import/mbsrtowcs.c: Update.
257         * gnulib/import/memchr.c: Update.
258         * gnulib/import/memmem.c: Update.
259         * gnulib/import/mempcpy.c: Update.
260         * gnulib/import/memrchr.c: Update.
261         * gnulib/import/mkdir.c: Update.
262         * gnulib/import/mkstemp.c: Update.
263         * gnulib/import/msvc-inval.c: Update.
264         * gnulib/import/msvc-inval.h: Update.
265         * gnulib/import/msvc-nothrow.c: Update.
266         * gnulib/import/msvc-nothrow.h: Update.
267         * gnulib/import/open.c: Update.
268         * gnulib/import/openat-die.c: Update.
269         * gnulib/import/openat-priv.h: Update.
270         * gnulib/import/openat-proc.c: Update.
271         * gnulib/import/openat.c: Update.
272         * gnulib/import/openat.h: Update.
273         * gnulib/import/opendir.c: Update.
274         * gnulib/import/pathmax.h: Update.
275         * gnulib/import/pipe-safer.c: Update.
276         * gnulib/import/rawmemchr.c: Update.
277         * gnulib/import/readdir.c: Update.
278         * gnulib/import/readlink.c: Update.
279         * gnulib/import/realloc.c: Update.
280         * gnulib/import/ref-add.sin: Update.
281         * gnulib/import/ref-del.sin: Update.
282         * gnulib/import/rename.c: Update.
283         * gnulib/import/rewinddir.c: Update.
284         * gnulib/import/rmdir.c: Update.
285         * gnulib/import/same-inode.h: Update.
286         * gnulib/import/save-cwd.c: Update.
287         * gnulib/import/save-cwd.h: Update.
288         * gnulib/import/scratch_buffer.h: Update.
289         * gnulib/import/secure_getenv.c: Update.
290         * gnulib/import/setenv.c: Update.
291         * gnulib/import/signal.in.h: Update.
292         * gnulib/import/stat-time.c: Update.
293         * gnulib/import/stat-time.h: Update.
294         * gnulib/import/stat-w32.c: Update.
295         * gnulib/import/stat-w32.h: Update.
296         * gnulib/import/stat.c: Update.
297         * gnulib/import/stdbool.in.h: Update.
298         * gnulib/import/stddef.in.h: Update.
299         * gnulib/import/stdint.in.h: Update.
300         * gnulib/import/stdio.in.h: Update.
301         * gnulib/import/stdlib.in.h: Update.
302         * gnulib/import/str-two-way.h: Update.
303         * gnulib/import/strchrnul.c: Update.
304         * gnulib/import/strdup.c: Update.
305         * gnulib/import/streq.h: Update.
306         * gnulib/import/strerror-override.c: Update.
307         * gnulib/import/strerror-override.h: Update.
308         * gnulib/import/strerror.c: Update.
309         * gnulib/import/string.in.h: Update.
310         * gnulib/import/stripslash.c: Update.
311         * gnulib/import/strnlen1.c: Update.
312         * gnulib/import/strnlen1.h: Update.
313         * gnulib/import/strstr.c: Update.
314         * gnulib/import/strtok_r.c: Update.
315         * gnulib/import/sys_stat.in.h: Update.
316         * gnulib/import/sys_time.in.h: Update.
317         * gnulib/import/sys_types.in.h: Update.
318         * gnulib/import/tempname.c: Update.
319         * gnulib/import/tempname.h: Update.
320         * gnulib/import/time.in.h: Update.
321         * gnulib/import/unistd--.h: Update.
322         * gnulib/import/unistd-safer.h: Update.
323         * gnulib/import/unistd.in.h: Update.
324         * gnulib/import/unsetenv.c: Update.
325         * gnulib/import/verify.h: Update.
326         * gnulib/import/extra/snippet/warn-on-use.h: Update.
327         * gnulib/import/wchar.in.h: Update.
328         * gnulib/import/wctype.in.h: Update.
329         * gnulib/import/xalloc-oversized.h: Update.
330         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
331         "53e2c179f26a890fa6685af4b6c1397ee370433b".
332
333 2018-08-16  Gary Benson <gbenson@redhat.com>
334
335         PR gdb/13000:
336         * gdb/main.c (captured_main_1): Exit with nonzero status
337         in batch mode if the last command to be executed failed.
338         * NEWS: Mention the above.
339
340 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
341
342         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
343         end of warning message.
344
345 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
346
347         PR gdb/22943:
348         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
349         (aarch64_extract_return_value): Use
350         aapcs_is_vfp_call_or_return_candidate.
351         (aarch64_return_in_memory): Likewise.
352         (aarch64_store_return_value): Likewise.
353
354 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
355
356         * aarch64-tdep.c
357         (aapcs_is_vfp_call_or_return_candidate): Make static
358         (pass_in_v_or_stack): Remove function.
359         (pass_in_v_vfp_candidate): New function.
360         (aarch64_push_dummy_call): Check for float register candidates.
361
362 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
363
364         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
365         (aapcs_is_vfp_call_or_return_candidate_1): New function.
366         (aapcs_is_vfp_call_or_return_candidate): Likewise.
367
368 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
369
370         PR build/23399
371         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
372         (struct ipa_sym_addresses): Rename to...
373         (struct ipa_sym_addresses_common): ... this.
374         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
375
376 2018-08-28  Tom Tromey  <tom@tromey.com>
377
378         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
379         (token_fifo): Now a std::vector.
380         (yylex, c_parse): Update.
381         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
382         (token_fifo): Now a std::vector.
383         (yylex, d_parse): Update.
384         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
385         (token_fifo): Now a std::vector.
386         (yylex, go_parse): Update.
387
388 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
389
390         * parser-defs.h (struct type_stack) <elements>: Change type to
391         std::vector<union type_stack_elt>.
392         <depth, size>: Remove.
393         * parse.c (parse_exp_in_context_1): Adjust.
394         (type_stack_reserve): Remove.
395         (check_type_stack_depth): Remove.
396         (insert_into_type_stack): Adjust to std::vector.
397         (insert_type): Likewise.
398         (push_type): Likewise.
399         (push_type_int): Likewise.
400         (insert_type_address_space): Likewise.
401         (pop_type): Likewise.
402         (pop_type_int): Likewise.
403         (pop_typelist): Likewise.
404         (pop_type_stack): Likewise.
405         (append_type_stack): Likewise.
406         (push_type_stack): Likewise.
407         (get_type_stack): Likewise.
408         (type_stack_cleanup): Likewise.
409         (push_typelist): Likewise.
410         (follow_types): Likewise.
411         (_initialize_parse): Likewise.
412
413 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
414
415         * NEWS: Mention csky target.
416
417 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
418             Hafiz Abid Qadeer  <abidh@codesourcery.com>
419             Don Breazeal  <donb@codesourcery.com>
420
421         * csky-linux-tdep.c: New file.
422         * csky-tdep.c: Likewise.
423         * csky-tdep.h: Likewise.
424         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
425         csky-tdep.o.
426         (HFILES_NO_SRCDIR): Add csky-tdep.h.
427         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
428         * configure.tgt: Add csky support.
429
430 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
431
432         * python/py-framefilter.c (py_print_frame): Print frame architecture
433         when printing on an MI output.
434
435 2018-08-27  Tom Tromey  <tom@tromey.com>
436
437         PR build/23087:
438         * configure: Rebuild.
439         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
440
441 2018-08-27  Tom Tromey  <tom@tromey.com>
442
443         * aarch64-linux-tdep.c
444         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
445         casts to int.
446
447 2018-08-27  Tom Tromey  <tom@tromey.com>
448
449         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
450         unsigned.
451         (ppc64_standard_linkage1, ppc64_standard_linkage2)
452         (ppc64_standard_linkage3, ppc64_standard_linkage4)
453         (ppc64_standard_linkage5, ppc64_standard_linkage6)
454         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
455         unsigned.
456
457 2018-08-27  Tom Tromey  <tom@tromey.com>
458
459         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
460         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
461
462 2018-08-27  Tom Tromey  <tom@tromey.com>
463
464         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
465         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
466         ULONGEST_MAX.
467         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
468         ULONGEST_MAX.
469         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
470         ULONGEST_MAX.
471         * sparc-linux-tdep.c (sparc32_linux_sigframe)
472         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
473         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
474         ULONGEST_MAX.
475         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
476         (ppc64_linux_sigaction_tramp_frame)
477         (ppc32_linux_sighandler_tramp_frame)
478         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
479         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
480         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
481         * mn10300-linux-tdep.c (am33_linux_sigframe)
482         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
483         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
484         * mips-linux-tdep.c (mips_linux_o32_sigframe)
485         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
486         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
487         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
488         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
489         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
490         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
491         * microblaze-linux-tdep.c
492         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
493         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
494         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
495         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
496         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
497         * common/common-types.h (ULONGEST_MAX): New define.
498         (CORE_ADDR_MAX): Fix formatting.
499         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
500         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
501         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
502         (arm_linux_rt_sigreturn_tramp_frame)
503         (arm_eabi_linux_sigreturn_tramp_frame)
504         (arm_eabi_linux_rt_sigreturn_tramp_frame)
505         (thumb2_eabi_linux_sigreturn_tramp_frame)
506         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
507         (arm_linux_restart_syscall_tramp_frame)
508         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
509         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
510         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
511         ULONGEST_MAX.
512         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
513
514 2018-08-27  Tom Tromey  <tom@tromey.com>
515
516         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
517         CORE_ADDR_MAX.
518         * mips-tdep.c (mips_deal_with_atomic_sequence)
519         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
520         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
521         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
522         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
523         CORE_ADDR_MAX.
524         * aarch64-tdep.c (aarch64_software_single_step): Use
525         CORE_ADDR_MAX.
526
527 2018-08-27  Tom Tromey  <tom@tromey.com>
528
529         * linespec.c (complete_linespec_component): Add cast to "char".
530         * completer.c (completion_tracker::build_completion_result): Add
531         cast to "char".
532
533 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
534
535         * solist.h (struct solist, struct target_so_ops): Fix
536         indentation.
537
538 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
539
540         * ada-tasks.c (ada_task_info_s): Remove typedef.
541         (DEF_VEC_O(ada_task_info_s)): Remove.
542         (struct ada_tasks_inferior_data): Initialize fields.
543         <task_list>: Make an std::vector.
544         (get_ada_tasks_inferior_data): Allocate with new.
545         (ada_get_task_number): Adjust.
546         (get_task_number_from_id): Likewise.
547         (valid_task_id): Likewise.
548         (ada_get_task_info_from_ptid): Likewise.
549         (iterate_over_live_ada_tasks): Likewise.
550         (add_ada_task): Likewise.
551         (read_known_tasks): Likewise.
552         (ada_build_task_list): Likewise.
553         (print_ada_task_info): Likewise.
554         (info_task): Likewise.
555         (task_command_1): Likewise.
556
557 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
558
559         * ada-lang.c (add_angle_brackets): Return std::string.
560
561 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
562
563         * python/py-threadevent.c (py_get_event_thread): Initialize
564         pythread.
565
566 2018-08-24  Pedro Alves  <palves@redhat.com>
567
568         * python/py-bpevent.c (create_breakpoint_event_object): Use
569         copy-initialization.
570         * python/py-continueevent.c (emit_continue_event): Use
571         copy-initialization.
572         * python/py-exitedevent.c (create_exited_event_object): Return a
573         gdbpy_ref<>.
574         (emit_exited_event): Use copy-initialization.
575         * python/py-inferior.c (python_new_inferior)
576         (python_inferior_deleted, add_thread_object): Use
577         copy-initialization.
578         * python/py-infevents.c (create_inferior_call_event_object)
579         (create_register_changed_event_object)
580         (create_memory_changed_event_object): Return a gdbpy_ref<>.
581         (emit_inferior_call_event, emit_memory_changed_event)
582         (emit_register_changed_event): Use copy-initialization.
583         * python/py-newobjfileevent.c (create_new_objfile_event_object):
584         Return a gdbpy_ref<>.
585         (emit_new_objfile_event): Use copy-initialization.
586         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
587         (emit_clear_objfiles_event): Use copy-initialization.
588         * python/py-signalevent.c (create_signal_event_object): Use
589         copy-initialization.
590         * python/py-threadevent.c (create_thread_event_object): Use
591         copy-initialization.
592
593 2018-08-24  Pedro Alves  <palves@redhat.com>
594             Simon Marchi  <simon.marchi@ericsson.com>
595
596         PR gdb/23379
597         * python/py-continueevent.c: Include "gdbthread.h".
598         (create_continue_event_object): Add intro comment.  Add 'ptid'
599         parameter.  Use it to find thread to pass to
600         create_thread_event_object.
601         (emit_continue_event): Pass PTID down to
602         create_continue_event_object.
603         * python/py-event.h (py_get_event_thread): Declare.
604         (create_thread_event_object): Remove default from 'thread'
605         parameter.
606         * python/py-stopevent.c (create_stop_event_object): Use
607         py_get_event_thread.
608         * python/py-threadevent.c (get_event_thread): Rename to ...
609         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
610         and use it to find the thread.
611         (create_thread_event_object): Assert that THREAD isn't null.
612         Don't find the event thread here.
613
614 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
615
616         * block.h (blockrange, blockranges): New struct declarations.
617         (struct block): Add new field named `ranges'.
618         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
619         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
620         macros for accessing ranges in struct block.
621         (make_blockranges): New declaration.
622         block.c (make_blockranges): New function.
623         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
624         for block.
625         * symtab.h (find_pc_partial_function): Add new parameter `block'.
626         * blockframe.c (cache_pc_function_block): New static global.
627         (clear_pc_function_cache): Clear cache_pc_function_block.
628         (find_pc_partial_function): Move comment to symtab.h.  Add
629         support for non-contiguous blocks.
630         * cli/cli-cmds.c (block.h): Include.
631         (print_disassembly): Handle printing of non-contiguous blocks.
632         (disassemble_current_function): Likewise.
633         (disassemble_command): Likewise.
634
635         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
636         BLOCK_START.
637         * blockframe.c (get_pc_function_start): Likewise.
638         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
639         (gcc_symbol_address): Likewise.
640         * compile/compile-object-run.c (compile_object_run): Likewise.
641         * compile/compile.c (get_expr_block_and_pc): Likewise.
642         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
643         (func_addr_to_tail_call_list): Likewise.
644         * findvar.c (default_read_var_value): Likewise.
645         * inline-frame.c (inline_frame_this_id): Likewise.
646         (skip-inline_frames): Likewise.
647         * infcmd.c (until_next_command): Likewise.
648         * linespec.c (convert_linespec_to_sals): Likewise.
649         * parse.c (parse_exp_in_context_1): Likewise.
650         * printcmd.c (build_address_symbolic): likewise.
651         (info_address_command): Likewise.
652         symtab.c (find_function_start_sal): Likewise.
653         (skip_prologue_sal): Likewise.
654         (find_function_alias_target): Likewise.
655         (find_gnu_ifunc): Likewise.
656         * stack.c (find_frame_funname): Likewise.
657         * symtab.c (fixup_symbol_section): Likewise.
658         (find_function_start_sal): Likewise.
659         (skip_prologue_sal): Likewsie.
660         (find_function_alias_target): Likewise.
661         (find_gnu_ifunc): Likewise.
662         * tracepoint.c (info_scope_command): Likewise.
663         * value.c (value_fn_field): Likewise.
664
665         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
666         in place of find_pc_partial_function.
667         * blockframe.c (find_function_entry_range_from_pc): New function.
668         * symtab.h (find_function_entry_range_from_pc): Declare and document.
669         * objfiles.c (objfile_relocate1): Relocate start and end addresses
670         for each range in a block.
671
672
673 2018-08-23  Xavier Roirand  <roirand@adacore.com>
674
675         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
676         incrementation.
677
678 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
679
680         * solib-svr4.c (read_program_headers_from_bfd): Return
681         gdb::optional<gdb::byte_vector>.
682         (svr4_exec_displacement): Adjust.
683
684 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
685
686         * solib-svr4.c (read_program_header): Return
687         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
688         (find_program_interpreter): Return
689         gdb::optional<gdb::byte_vector>.
690         (scan_dyntag_auxv): Adjust.
691         (enable_break): Adjust.
692         (svr4_exec_displacement): Adjust.
693
694 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
695
696         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
697         * inf-child.c (inf_child_target::terminal_save_inferior): New.
698
699 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
700
701         * guile/scm-string.c (gdbscm_scm_from_printf): Use
702         string_vprintf.
703         * guile/scm-utils.c (gdbscm_printf): Likewise.
704         * serial.c (serial_printf): Likewise.
705         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
706
707 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
708
709         * stack.c (print_frame): Print frame architecture when printing on
710         an MI output.
711         * NEWS: Mention new "arch" attribute in frame output.
712
713 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
714
715         * arch/aarch64.h (aarch64_regnum): Update comment.
716
717 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
718
719         * NEWS: Add SVE to 8.2 section.
720
721 2018-08-21  Pedro Alves  <palves@redhat.com>
722
723         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
724         out from gdbscm_parse_function_args.
725         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
726         gdbscm_parse_function_args_1.
727
728 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
729
730         PR gdb/17816
731         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
732         operator.
733
734 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
735
736         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
737
738 2018-08-19  Michael Spang  <spang@google.com>
739
740         PR gdb/11786
741         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
742         for PT_TLS segments.
743
744 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
745
746         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
747         dwarf_variable_value.
748         * dwarf2-frame.c (class dwarf_expr_executor):
749         Add override for dwarf_variable_value.
750         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
751         (class symbol_needs_eval_context): Likewise.
752         (indirect_synthetic_pointer): Add forward declaration.
753         (sect_variable_value): New function.
754         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
755         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
756         for DW_OP_GNU_variable_value.
757
758 2018-08-16  Tom Tromey  <tom@tromey.com>
759
760         * top.c (read_command_file): Update.
761         (command_line_input): Remove "repeat" argument.
762         * ada-lang.c (get_selections): Update.
763         * linespec.c (decode_line_2): Update.
764         * defs.h (command_line_input): Remove argument.
765         * cli/cli-script.c (read_next_line): Update.
766         * python/py-gdb-readline.c: Update.
767
768 2018-08-17  Tom Tromey  <tom@tromey.com>
769
770         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
771         command_line_input.
772
773 2018-08-15  Tom Tromey  <tom@tromey.com>
774
775         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
776
777 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
778
779         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
780         If used, use find_pc_partial_function to find address range
781         to disassemble.
782         * mi/mi-main.c (mi_cmd_list_features): Report
783         "data-disassemble-a-option" feature.
784         * NEWS: Mention new -data-disassemble option -a.
785
786 2018-08-13  Tom Tromey  <tom@tromey.com>
787
788         * common/common-defs.h (_FORTIFY_SOURCE): Define.
789
790 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
791
792         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
793         (aarch64_linux_collect_sve_regset): Likewise.
794         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
795         * regcache.h (regcache_map_entry_size): New function.
796
797 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
798
799         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
800         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
801         (SVE_HEADER_VL_LENGTH): Likewise.
802         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
803         (SVE_HEADER_FLAGS_LENGTH): Likewise.
804         (SVE_HEADER_RESERVED_LENGTH): Likewise.
805         (SVE_HEADER_SIZE_OFFSET): Likewise.
806         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
807         (SVE_HEADER_VL_OFFSET): Likewise.
808         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
809         (SVE_HEADER_FLAGS_OFFSET): Likewise.
810         (SVE_HEADER_RESERVED_OFFSET): Likewise.
811         (SVE_HEADER_SIZE): Likewise.
812         (aarch64_linux_core_read_vq): Add function.
813         (aarch64_linux_core_read_description): Check for SVE section.
814
815 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
816
817         * aarch64-fbsd-tdep.c
818         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
819         collect_size.
820         * aarch64-linux-tdep.c
821         (aarch64_linux_iterate_over_regset_sections): Likewise.
822         * alpha-linux-tdep.c
823         (alpha_linux_iterate_over_regset_sections):
824         * alpha-nbsd-tdep.c
825         (alphanbsd_iterate_over_regset_sections): Likewise.
826         * amd64-fbsd-tdep.c
827         (amd64fbsd_iterate_over_regset_sections): Likewise.
828         * amd64-linux-tdep.c
829         (amd64_linux_iterate_over_regset_sections): Likewise.
830         * arm-bsd-tdep.c
831         (armbsd_iterate_over_regset_sections): Likewise.
832         * arm-fbsd-tdep.c
833         (arm_fbsd_iterate_over_regset_sections): Likewise.
834         * arm-linux-tdep.c
835         (arm_linux_iterate_over_regset_sections): Likewise.
836         * corelow.c (get_core_registers_cb): Likewise.
837         (core_target::fetch_registers): Likewise.
838         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
839         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
840         * gdbarch.h (void): Regenerate.
841         * gdbarch.sh: Add supply_size and collect_size.
842         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
843         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
844         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
845         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
846         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
847         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
848         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
849         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
850         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
851         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
852         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
853         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
854         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
855         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
856         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
857         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
858         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
859         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
860         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
861         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
862         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
863         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
864         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
865         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
866         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
867         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
868         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
869         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
870         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
871         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
872
873 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
874
875         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
876         with string_printf.
877
878 2018-08-10  Keith Seitz  <keiths@redhat.com>
879
880         * compile/compile-c-support.c (add_code_header, add_code_footer):
881         Move into policy class.
882         (c_push_user_expression, pop_user_expression_nop)
883         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
884         (compile_program): New host class.
885         (c_compile_program): New typedef.
886         (c_compute_porgram): Use c_compile_program.
887
888 2018-08-10  Keith Seitz  <keiths@redhat.com>
889
890         * compile/compile-internal.h (compile_instance::~compile_instance):
891         Remove calls to htab_delete.
892         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
893         * compile.c (compile_instance::compile_instance): Initialize
894         htab unique pointers.
895         (compile_instance::get_cached_type, compile_instance::insert_type)
896         (compile_instance::error_symbol_once): Update for unique_ptr.
897
898 2018-08-10  Keith Seitz  <keiths@redhat.com>
899
900         * compile/compile-c-symbols.c (struct symbol_error)
901         (hash_symbol_error, eq_symbol_error, del_symbol_error)
902         (compile_instance::insert_symbol_error)
903         (compile_instance::error_symbol_once): Move to ...
904         * compile/compile.c: ... here.
905
906 2018-08-10  Keith Seitz  <keiths@redhat.com>
907
908         * compile/compile-c-support.c (c_get_compile_context): Use `new'
909         instead of `new_compile_instance'.
910         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
911         Update description.
912         If the symbol error map is not initialized, create it.
913         (generate_c_for_for_one_symbol): Do not check/initialize
914         the symbol error map.
915         * compile/compile-c-types.c (compile_c_instance): Make a class.
916         Update all callers.
917         (compile_instance::compile_instance): Initialize the type cache.
918         (get_cached_type): New function.
919         (insert_type): Update description.
920         (compile_c_instance::m_default_cflags): Define.
921         (convert_type): Update description.  Use get_cached_type.
922         (delete_instance): Moved to destructor.
923         (new_compile_instance): Moved to constructor.
924         * compile/compile-c.h (compile_c_instance): Make class inheriting
925         from compile_instance.
926         <base>: Remove field.
927         <type_map, symbol_err_map>: Move to base class.
928         <c_plugin>: Rename to `m_plugin' and remove pointer type.
929         * compile/compile-internal.h (compile_instance): Make class.
930         <type_map_t, symbol_err_map_t>: Define.
931         <fe>: Rename to `m_gcc_fe'.
932         <scope, block, gcc_target_options>: Add `m_' prefix.
933         <m_type_map, m_symbol_err_map>: New fields, moved from
934         compile_c_instance.
935         <destroy>: Remove.
936         (convert_type, new_compile_instance): Remove.
937         * compile/compile.c (cleanup_compile_instance): Remove.
938         (compile_to_object): Use unique_ptr to eliminate cleanups.
939         (compile_instance::set_print_callback, compile_instance::version)
940         (compile_instance::set_verbose)
941         (compile_instance::set_driver_filename)
942         (compile_instance::set_triplet_regexp)
943         (compile_instance::set_arguments)
944         (compile_instance::set_source_file)
945         (compile_instance::compile): Define.
946
947 2018-08-10  Keith Seitz  <keiths@redhat.com>
948
949         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
950         * compile/compile-c-types.c: Define GCC_METHODN macros and include
951         gcc-c-fe.def to define C plugin.
952         (delete_instance): Delete `c_plugin'.
953         (new_compile_instance): Initialize `c_plugin'.
954         * compile/compile-c.h: Include gcc_c_plugin.h.
955         (struct compile_c_instance) <c_plugin>: New member.
956         * gcc-c-plugin.h: New file.
957         Update all callers with API change.
958
959 2018-08-10  Keith Seitz  <keiths@redhat.com>
960
961         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
962         (HFILES_NO_SRCDIR): ... to here.
963         Add compile-internal.h and compile-c.h.
964         * compile/compile-c-support.c: Include compile-c.h.
965         * compile/compile-c-symbols.c: Include compile-c.h.
966         (generate_c_for_variable_locations): Update comment.
967         * compile/compile-c-types.c: Include compile-c.h.
968         * compile/compile-c.h: New file -- moved C language declarations
969         from other files here.
970         * compile/compile-internal.h: Do not include hashtab.h or
971         common/enum-flags.h.
972         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
973         (gcc_convert_symbol, gcc_symbol_address)
974         (generate_c_for_variable_locations, c_get_mode_for_size)
975         (c_get_range_decl_name): Definitions moved to compile-c.h.
976         * compile/compile-loc2c.c: Include compile-c.h.
977
978 2018-08-10  Keith Seitz  <keiths@redhat.com>
979
980         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
981         (c_symbol_substitution_name): ... this.
982         Update all callers.
983
984 2018-08-10  Keith Seitz  <keiths@redhat.com>
985
986         * compile/compile-c-support.c (c_compute_program): Use
987         unique_xmalloc_ptr to eliminate cleanup.
988         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
989         Return a unique_xmalloc_ptr and eliminate cleanup.
990         * compile/compile-internal.h (generate_c_for_variable_locations):
991         Return unique_xmalloc_ptr and update description.
992
993 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
994
995         * corelow.c (core_target::get_core_register_section): Rename
996         min_size to section_min_size.
997
998 2018-08-09  Jim Wilson  <jimw@sifive.com>
999
1000         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1001         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1002         * NEWS: Mention new GNU/Linux RISC-V target.
1003         * configure.host: Add riscv*-*-linux*.
1004         * configure.nat: Add riscv*.
1005         * configure.tgt: Add riscv*-*-linux*.
1006         * riscv-linux-nat.c: New file.
1007         * riscv-linux-tdep.c: New file.
1008
1009 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1010
1011         * infrun.c (resume): Make static, add forward declaration.
1012         (proceed): Update header comment.
1013         * infrun.h (resume): Delete declaration.
1014
1015 2018-08-09  Tom Tromey  <tom@tromey.com>
1016
1017         * riscv-tdep.h: Minor formatting fixes.
1018
1019 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1020
1021         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1022         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1023         (test_mkdir_recursive): Likewise.
1024         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1025
1026 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1027
1028         * valarith.c (value_subscripted_rvalue): If an array is not in
1029         memory, and we don't know the upper bound, then we can't know that
1030         the requested element exists or not.
1031
1032 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1033
1034         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1035         (target_options_to_string): Add comment.
1036
1037 2018-08-08  Tom Tromey  <tom@tromey.com>
1038
1039         * unittests/scoped_mmap-selftests.c: Check result of "write".
1040
1041 2018-08-08  Jim Wilson  <jimw@sifive.com>
1042
1043         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1044         (decode_register_index_short): New.
1045         (decode_j_type_insn, decode_cj_type_insn): New.
1046         (decode_b_type_insn, decode_cb_type_insn): New.
1047         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1048         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1049         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1050         is_c_sw_insn instead of is_sw_insn.
1051         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1052         (riscv_software_single_step): New.
1053         * riscv-tdep.h (riscv_software_single_step): Declare.
1054
1055         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1056         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1057
1058 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1059
1060         PR gdb/18050:
1061         * target.c (dispose_inferior): Don't dispose of inferiors that are
1062         already killed.
1063
1064 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1065
1066         * remote.c (remote_target::download_tracepoint): Change char* to
1067         const char*.
1068
1069 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1070
1071         * target.h (target_options_to_string): Return an std::string.
1072         * target.c (str_comma_list_concat_elem): Return void, use
1073         std::string.
1074         (do_option): Likewise.
1075         (target_options_to_string): Return an std::string.
1076         * linux-nat.c (linux_nat_target::wait): Adjust.
1077         * target-debug.h (target_debug_print_options): Adjust.
1078
1079 2018-08-07  Tom Tromey  <tom@tromey.com>
1080
1081         * Makefile.in (CPPFLAGS): New variable.
1082         (INTERNAL_CPPFLAGS): Use it.
1083
1084 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1085
1086         * NEWS: Mention the index cache.
1087
1088 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1089
1090         * common/pathstuff.h (get_standard_cache_dir): New.
1091         * common/pathstuff.c (get_standard_cache_dir): New.
1092         * build-id.h (build_id_to_string): New.
1093         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1094         DEBUG_STR_SUFFIX): Move to here.
1095         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1096         DEBUG_STR_SUFFIX): Move from there.
1097         (write_psymtabs_to_index): Make non-static, add basename
1098         parameter.  Write to temporary files, rename when done.
1099         (save_gdb_index_command): Adjust call to
1100         write_psymtabs_to_index.
1101         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1102         field.
1103         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1104         (get_gdb_index_contents_from_cache): New.
1105         (get_gdb_index_contents_from_cache_dwz): New.
1106         (dwarf2_initialize_objfile): Read index from cache.
1107         (dwarf2_build_psymtabs): Save to index.
1108         * dwarf-index-cache.h: New file.
1109         * dwarf-index-cache.c: New file.
1110         * dwarf-index-write.h: New file.
1111
1112 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1113
1114         * gnulib/aclocal.m4: Re-generate.
1115         * gnulib/config.in: Re-generate.
1116         * gnulib/configure: Re-generate.
1117         * gnulib/import/Makefile.am: Re-generate.
1118         * gnulib/import/Makefile.in: Re-generate.
1119         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1120         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1121         * gnulib/import/m4/mkdir.m4: New file.
1122         * gnulib/import/mkdir.c: New file.
1123         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1124         module.
1125
1126 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1127
1128         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1129         * common/scoped_mmap.c: New file.
1130         * common/scoped_mmap.h (destroy): New method.
1131         (~scoped_mmap, reset): Use destroy.
1132         (scoped_mmap): New move constructor.
1133         (mmap_file): New declaration.
1134         * unittests/scoped_mmap-selftests.c (test_normal,
1135         test_invalid_filename, run_tests): New functions.
1136         (_initialize_scoped_mmap_selftests): Register selftest.
1137
1138 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1139
1140         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1141         (read_gdb_index_from_buffer): ... this.  Remove section
1142         parameter, add buffer parameter.
1143         (get_gdb_index_contents_ftype,
1144         get_gdb_index_contents_dwz_ftype): New typedefs.
1145         (dwarf2_read_gdb_index): Add callback parameters to get the
1146         index contents.
1147         (get_gdb_index_contents_from_section): New.
1148         (dwarf2_initialize_objfile): Update call to
1149         dwarf2_read_gdb_index.
1150
1151 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1152
1153         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1154         (gdb_open_cloexec): Likewise.
1155         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1156         (commandline_from_pid): Likewise.
1157         (linux_xfer_osdata_threads): Likewise.
1158         (linux_xfer_osdata_fds): Likewise.
1159         * ada-lang.c (is_package_name): Likewise.
1160         * auxv.c (procfs_xfer_auxv): Likewise.
1161         * breakpoint.c (print_one_breakpoint_location): Use
1162         uiout::field_fmt.
1163         (print_one_catch_solib): Use string_printf.
1164         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1165         (add_pe_forwarded_sym): Likewise.
1166         * dwarf2read.c (create_type_unit_group): Likewise.
1167         (build_error_marker_type): Likewise.
1168         * infcall.c (get_function_name): Likewise.
1169         * valprint.c (print_converted_chars_to_obstack): Likewise.
1170         * xtensa-tdep.c (xtensa_register_type): Likewise.
1171
1172 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1173
1174         * remote.c (remote_target::download_tracepoint): Fix format
1175         string errors.
1176
1177 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1178
1179         * tracefile.c: Include common/byte-vector.h.
1180         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1181         with trace_regblock_size if needed.  Update uses of buf.
1182
1183 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1184
1185         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1186         std::vector<unsigned char>.
1187         * tracepoint.c (collection_list::collection_list): Remove
1188         m_regs_mask initializer from initializer list.  Resize
1189         m_regs_mask using the largest remote register number.
1190         (collection_list::add_remote_register): Remove size check on
1191         m_regs_mask.  Use at to access element.
1192         (collection_list::stringify): Change type of temp_buf to
1193         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1194         stringify the register mask.  Use pack_hex_byte for the register
1195         mask.
1196
1197 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1198
1199         * tracepoint.h (class collection_list) <add_register>: Remove.
1200         <add_remote_register, add_ax_registers, add_local_register>:
1201         Declare.
1202         <add_memrange>: Add scope parameter.
1203         * tracepoint.c (encode_actions_1): Likewise.
1204         (collection_list::add_register): Rename to ...
1205         (collection_list::add_remote_register): ... this.  Update
1206         comment.
1207         (collection_list::add_ax_registers, add_local_register): New
1208         methods.
1209         (collection_list::add_memrange): Add scope parameter.  Call
1210         add_local_register instead of add_register.
1211         (finalize_tracepoint_aexpr): New function.
1212         (collection_list::collect_symbol): Update calls to add_memrange.
1213         Call add_local_register instead of add_register.  Call
1214         add_ax_registers.  Call finalize_tracepoint_aexpr.
1215         (encode_actions_1): Get remote regnos for $reg action.  Call
1216         add_remote_register, add_ax_registers, and add_local_register.
1217         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1218         (validate_actionline): Call finalize_tracepoint_aexpr.
1219
1220 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1221
1222         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1223         Replace array buf with gdb::char_vector buf, of size
1224         get_remote_packet_size ().  Replace references to buf and
1225         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1226         and xsnprintf with snprintf.  Raise errors if the buffer is too
1227         small.
1228
1229 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1230
1231         * remote.c (remote_target::download_tracepoint): Fix the has_more
1232         predicate in the QTDP action list iteration.
1233
1234 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1235
1236         * remote.c (remote_target::download_tracepoint): Fix indentation
1237         in for block.
1238
1239 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1240
1241         * proc-api.c (_initialize_proc_api): Remove c, unused.
1242         * procfs.c (procfs_init_inferior): Remove signals, unused.
1243         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1244         unused.
1245
1246 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1247             Andrew Burgess  <andrew.burgess@embecosm.com>
1248
1249         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1250         'W_STOPCODE (0)' as this could be ambiguous.
1251
1252 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1253
1254         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1255         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1256         "ai_socktype").
1257
1258 2018-08-02  Tom Tromey  <tom@tromey.com>
1259
1260         PR symtab/16842.
1261         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1262         symbols.
1263         (process_structure_scope): Likewise.
1264
1265 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1266
1267         PR gdb/22629:
1268         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1269         kill inferior.
1270
1271 2018-08-02  Tom Tromey  <tom@tromey.com>
1272
1273         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1274         (darwin_suspend_inferior, darwin_resume_inferior)
1275         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1276         (darwin_check_new_threads): Check result of get_darwin_inferior.
1277
1278 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1279
1280         GDB 8.1.1 released.
1281
1282 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1283
1284         * varobj.c (varobj_get_path_expr_parent): Report an error if
1285         parent is a dynamic varobj.
1286
1287 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1288
1289         * gnulib/aclocal.m4: Re-generate.
1290         * gnulib/config.in: Re-generate.
1291         * gnulib/configure: Re-generate.
1292         * gnulib/import/Makefile.in: Re-generate.
1293         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1294         * gnulib/import/m4/onceonly.m4: Re-generate.
1295
1296 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1297
1298         * target-descriptions.c (struct xml_test_tdesc): New.
1299         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1300         (record_xml_tdesc): Update.
1301         (maintenance_check_xml_descriptions): Update.
1302         * target-descriptions.h (record_xml_tdesc): Update comment.
1303
1304 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1305
1306         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1307         checking array bounds are defined.
1308
1309 2018-07-30  Tom Tromey  <tom@tromey.com>
1310
1311         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1312         irreflexivity violation.
1313
1314 2018-07-30  Tom Tromey  <tom@tromey.com>
1315
1316         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1317         * value.c (unpack_long): Remove lint code.
1318         * valops.c (value_ind): Remove lint code.
1319         * valarith.c (value_x_binop, value_x_unop, value_equal)
1320         (value_pos): Remove lint code.
1321
1322 2018-07-28  Tom de Vries  <tdevries@suse.de>
1323
1324         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1325         with undefined upper bound as <optimized out>.
1326
1327 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1328
1329         * gcore.in: Rename variable "name" to "prefix".  Expand
1330         "usage" text.
1331
1332 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1333
1334         * windows-nat.c (windows_nat_target::create_inferior): Update to
1335         call close() in global namespace.
1336
1337 2018-07-26  Tom Tromey  <tom@tromey.com>
1338
1339         * dwarf-index-write.c (add_address_entry): Don't add objfile
1340         offsets.
1341         * dbxread.c (find_stab_function): Rename from
1342         find_stab_function_addr.  Return a bound_minimal_symbol.
1343         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1344         Don't add objfile offsets.
1345         (end_psymtab): Use raw_text_low, raw_text_high,
1346         MSYMBOL_VALUE_RAW_ADDRESS.
1347         (read_ofile_symtab): Update.
1348         (process_one_symbol): Update.
1349         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1350         offsets.
1351         (dw2_relocate): Remove.
1352         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1353         searching addrmap.
1354         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1355         Update.
1356         (process_psymtab_comp_unit_reader, add_partial_symbol)
1357         (add_partial_subprogram, dwarf2_ranges_read): Update.
1358         (load_partial_dies): Update.
1359         (add_address_entry): Don't add objfile offsets.
1360         (dwarf2_build_include_psymtabs): Update.
1361         (create_addrmap_from_aranges): Don't add objfile offsets.
1362         (dw2_find_pc_sect_compunit_symtab): Update.
1363         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1364         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1365         Update.
1366         (parse_partial_symbols): Don't add objfile offsets.  Use
1367         raw_text_low, raw_text_high.  Update.
1368         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1369         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1370         or call 'relocate' quick function.  Clear psymbol_map.
1371         * psympriv.h (struct partial_symbol) <address>: Add section
1372         offset.
1373         <set_unrelocated_address>: Rename from set_address.
1374         <raw_text_low, raw_text_high>: New methods.
1375         <text_low, text_high>: Add objfile parameter.
1376         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1377         set_unrelocated_address.
1378         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1379         (find_pc_psymbol): Update.
1380         (fixup_psymbol_section, relocate_psymtabs): Remove.
1381         (dump_psymtab, psym_functions): Update.
1382         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1383         parameter.
1384         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1385         (start_psymtab_common): Update.
1386         * symfile-debug.c (debug_qf_relocate): Remove.
1387         (debug_sym_quick_functions): Update.
1388         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1389         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1390         Update.
1391
1392 2018-07-26  Tom Tromey  <tromey@redhat.com>
1393
1394         * dbxread.c (end_psymtab): Use text_high_valid and
1395         text_low_valid.
1396         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1397         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1398         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1399         Update comment.
1400         <text_low_valid, text_high_valid>: New fields.
1401         <set_text_low, set_text_high>: Update.
1402         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1403
1404 2018-07-26  Tom Tromey  <tom@tromey.com>
1405
1406         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1407         Update.
1408         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1409         textlow and texthigh fields.
1410         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1411         Update.
1412         * mdebugread.c (parse_lines, parse_partial_symbols)
1413         (psymtab_to_symtab_1): Update.
1414         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1415         Rename fields.  Update comment.  Now private.
1416         <text_low, text_high, set_text_low, set_text_high>: New methods.
1417         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1418         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1419         (start_psymtab_common, maintenance_info_psymtabs)
1420         (maintenance_check_psymtabs): Update.
1421         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1422         texthigh fields.
1423         (scan_xcoff_symtab): Update.
1424
1425 2018-07-26  Tom Tromey  <tromey@redhat.com>
1426
1427         * psympriv.h (struct partial_symbol) <unrelocated_address,
1428         address, set_address>: New methods.
1429         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1430         (fixup_psymbol_section, relocate_psymtabs): Update.
1431         (print_partial_symbols): Add 'objfile' parameter.  Update.
1432         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1433         Update.
1434
1435 2018-07-26  Tom Tromey  <tom@tromey.com>
1436
1437         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1438         (debug_names::write_psymbols): Update.
1439         * psympriv.h (struct partial_symbol): Derive from
1440         general_symbol_info.
1441         <obj_section>: New method.
1442         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1443         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1444         (find_pc_sect_psymbol, fixup_psymbol_section)
1445         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1446         (print_partial_symbols, recursively_search_psymtabs)
1447         (compare_psymbols, psymbol_hash, psymbol_compare)
1448         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1449         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1450
1451 2018-07-26  Tom Tromey  <tromey@redhat.com>
1452
1453         * dbxread.c (end_psymtab): Remove dead code.
1454
1455 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1456
1457         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1458         DWARF unwinders are disabled.
1459         * dwarf2-frame.c: Add dwarf2read.h include.
1460         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1461         disabled.
1462         (dwarf2_frame_unwinders_enabled_p): Define.
1463         (show_dwarf_unwinders_enabled_p): New function.
1464         (_initialize_dwarf2_frame): Register switch to control DWARF
1465         unwinder use.
1466         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1467         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1468         (show_dwarf_cmdlist): Remove static keyword.
1469         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1470         (show_dwarf_cmdlist): Declare.
1471         * NEWS: Document new feature.
1472
1473 2018-07-26  Tom de Vries  <tdevries@suse.de>
1474
1475         PR breakpoints/23366
1476         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1477
1478 2018-07-26  Tom de Vries  <tdevries@suse.de>
1479
1480         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1481         DW_AT_count can't be translated to a dynamic prop.
1482
1483 2018-07-25  Tom de Vries  <tdevries@suse.de>
1484
1485         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1486         try/catch.
1487
1488 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1489
1490         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1491
1492 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1493
1494         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1495
1496 2018-07-24  Keith Seitz  <keiths@redhat.comt
1497
1498         PR symtab/23010
1499         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1500         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1501         instead of add_symbol_to_list.
1502         (read_file_scope): Call prepare_one_comp_unit before reading
1503         any other DIEs.
1504
1505 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1506
1507         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1508
1509 2018-07-24  Tom Tromey  <tom@tromey.com>
1510
1511         * utils.c (malloc, realloc, free): Don't declare.
1512         * configure, config.in: Rebuild.
1513         * configure.ac: Don't check for declarations of free, malloc, or
1514         realloc.
1515
1516 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1517
1518         * aarch64-linux-nat.c
1519         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1520         variable.
1521         * arm-linux-nat.c (fetch_regs): Likewise.
1522         (store_regs): Likewise.
1523         (fetch_vfp_regs): Likewise.
1524         (store_vfp_regs): Likewise.
1525         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1526         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1527         (arm_linux_nat_target::insert_watchpoint): Likewise.
1528         (arm_linux_nat_target::remove_watchpoint): Likewise.
1529         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1530         Likewise.
1531         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1532         Likewise.
1533         * ppc-linux-nat.c (fetch_register): Likewise.
1534         (fetch_all_gp_regs): Likewise.
1535         (fetch_ppc_registers): Likewise.
1536         (store_all_gp_regs): Likewise.
1537         (store_ppc_registers): Likewise.
1538         (hwdebug_insert_point): Likewise.
1539         (can_use_watchpoint_cond_accel): Likewise.
1540         * remote-sim.c (gdb_os_write_stdout): Likewise.
1541
1542 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1543             Tom Tromey  <tom@tromey.com>
1544
1545         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1546         test for it.
1547         * configure: Rebuild.
1548
1549 2018-07-22  Tom Tromey  <tom@tromey.com>
1550
1551         * regformats/regdat.sh: Define xmltarget_${name} inside
1552         #ifndef IN_PROCESS_AGENT.
1553
1554 2018-07-22  Tom Tromey  <tom@tromey.com>
1555
1556         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1557
1558 2018-07-22  Tom Tromey  <tom@tromey.com>
1559
1560         * symfile.c (reread_symbols): Notify iter, not objfile.
1561
1562 2018-07-22  Tom Tromey  <tom@tromey.com>
1563
1564         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1565         Use arch_ops.
1566         (ravenscar_thread_target::prepare_to_store): Likewise.
1567
1568 2018-07-22  Tom Tromey  <tom@tromey.com>
1569
1570         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1571         unused variable.  Call value_fetch_lazy when needed.
1572         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1573         Remove unused variable.  Call value_fetch_lazy when needed.
1574
1575 2018-07-22  Tom Tromey  <tom@tromey.com>
1576
1577         * m32c-tdep.c (mark_dma): Return void.
1578         (make_regs): Remove unused declarations.
1579
1580 2018-07-22  Tom Tromey  <tom@tromey.com>
1581
1582         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1583         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1584         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1585         bkscm_get_valid_block_smob_arg_unsafe for effect.
1586
1587 2018-07-22  Tom Tromey  <tom@tromey.com>
1588
1589         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1590         value_type.
1591
1592 2018-07-22  Tom Tromey  <tom@tromey.com>
1593
1594         * windows-nat.c (saved_context): Conditionally define.
1595         * remote.c (remote_target::remote_btrace_maybe_reopen):
1596         Conditionally declare "warned".
1597         * inflow.c (sigquit_ours): Conditionally define.
1598         (new_tty): Move "tty" declaration inside #if.
1599         * guile/guile.c (guile_datadir): Conditionally define.
1600         * charset.c (set_be_le_names): Move some declarations inside #if.
1601         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1602         #if.
1603         (parse_xml_btrace_conf): Likewise.
1604
1605 2018-07-22  Tom Tromey  <tom@tromey.com>
1606
1607         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1608
1609 2018-07-22  Tom Tromey  <tom@tromey.com>
1610
1611         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1612         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1613         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1614         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1615         * stack.c (frame_apply_level_command): Remove unused variable.
1616         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1617         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1618         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1619         unused variable.
1620         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1621         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1622         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1623         variable.
1624         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1625         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1626         variable.
1627         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1628         Remove unused variable.
1629         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1630         variable.
1631         * common/tdesc.c (print_xml_feature::visit): Remove unused
1632         variable.
1633         * compile/compile-object-load.c (store_regs): Remove unused
1634         variables.
1635         * complaints.c (clear_complaints): Remove unused variable.
1636         * corelow.c (core_target_open): Remove unused variable.
1637         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1638         variable.
1639         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1640         variable.
1641         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1642         variable.
1643         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1644         variable.
1645         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1646         variable.
1647         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1648         variable.
1649         * ia64-tdep.c (examine_prologue): Remove unused variable.
1650         * infcall.c (run_inferior_call): Remove unused variable.
1651         * inferior.c (exit_inferior): Remove unused variable.
1652         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1653         * linespec.c (decode_line_2): Remove unused variable.
1654         * linux-nat.c (super_close): Remove.
1655         * linux-tdep.c (linux_info_proc): Remove unused variable.
1656         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1657         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1658         Remove unused variable.
1659         * parse.c (find_minsym_type_and_address): Remove unused variable.
1660         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1661         variable.
1662         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1663         variable.
1664         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1665         variables.
1666         * record-btrace.c (record_btrace_target::store_registers): Remove
1667         unused variable.
1668         (cmd_show_record_btrace_cpu): Remove unused variable.
1669         * riscv-tdep.c (riscv_register_reggroup_p)
1670         (riscv_push_dummy_call, riscv_return_value): Remove unused
1671         variable.
1672         * rust-exp.y (literal): Remove unused variable.
1673         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1674         unused variable.
1675         <STRUCTOP_ANONYMOUS>: Likewise.
1676         * s390-linux-tdep.c (s390_linux_init_abi_31)
1677         (s390_linux_init_abi_64): Remove unused variable.
1678         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1679         (file_select_thread, net_windows_open, _initialize_ser_windows):
1680         Remove unused variables.
1681         * symtab.c (find_pc_sect_line): Remove unused variable.
1682         * target-memory.c (compute_garbled_blocks): Remove unused
1683         variable.
1684         (target_write_memory_blocks): Remove unused variable.
1685         * target.c (target_stack::unpush): Remove unused variables.
1686         * tracepoint.c (start_tracing, all_tracepoint_actions)
1687         (merge_uploaded_trace_state_variables)
1688         (print_one_static_tracepoint_marker): Remove unused variable.
1689         * unittests/basic_string_view/element_access/char/1.cc (test01):
1690         Remove unused variable.
1691         * windows-nat.c (windows_continue, windows_add_all_dlls)
1692         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1693         Remove unused variables.
1694
1695 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1696
1697         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1698         attr_profile in HAVE_ELF.
1699         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1700         HAVE_ELF.
1701
1702 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1703
1704         * frame.c (frame_register_unwind): Change parameter name.
1705         (frame_unwind_register): Likewise.
1706         (frame_unwind_register_value): Likewise.
1707         (frame_unwind_register_signed): Likewise.
1708         (frame_unwind_register_unsigned): Likewise.
1709         * frame.h (frame_register_unwind): Likewise.
1710         (frame_unwind_register): Likewise.
1711         (frame_unwind_register_value): Likewise.
1712         (frame_unwind_register_signed): Likewise.
1713         (frame_unwind_register_unsigned): Likewise.
1714         (frame_unwind_arch): Likewise.
1715
1716 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1717
1718         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1719         ISA maintenance.
1720
1721 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1722
1723         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1724         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1725         hand.
1726
1727 2018-07-20  Keith Seitz  <keiths@redhat.com>
1728
1729         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1730         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1731         m_compunit_symtab, m_language>: Add "m_" prefix.
1732         Update all uses.
1733         * buildsym.c: Update all uses.
1734
1735 2018-07-20  Tom Tromey  <tom@tromey.com>
1736
1737         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1738         * buildsym.h (record_line_ftype): Remove typedef.
1739
1740 2018-07-20  Tom Tromey  <tom@tromey.com>
1741
1742         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1743         (end_expandable_symtab): Likewise.
1744         (end_symtab_get_static_block): Likewise.
1745         (end_symtab_from_static_block): Likewise.
1746         * buildsym-legacy.c (augment_type_symtab): Remove.
1747         (end_expandable_symtab): Remove.
1748         (end_symtab_get_static_block): Remove.
1749         (end_symtab_from_static_block): Remove.
1750
1751 2018-07-20  Tom Tromey  <tom@tromey.com>
1752
1753         * dwarf2read.c: Include buildsym.h.
1754         (struct dwarf2_cu) <builder>: New method.
1755         (fixup_go_packaging): Update.
1756         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1757         use scoped_free_pendings.
1758         (using_directives): Add "cu" parameter, remove "language".
1759         (read_import_statement, setup_type_unit_groups, )
1760         (read_func_scope, read_lexical_block_scope)
1761         (dwarf2_record_block_ranges, read_namespace): Update.
1762         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1763         (lnp_state_machine::handle_end_sequence): Update.
1764         (class lnp_state_machine) <m_cu>: New member.
1765         <m_record_line_callback>: Remove.
1766         <m_currently_recording_lines>: New member.
1767         (lnp_state_machine::handle_set_file): Update.
1768         (noop_record_line): Remove.
1769         (dwarf_record_line_p): Add cu parameter.
1770         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1771         (lnp_state_machine::record_line)
1772         (lnp_state_machine::lnp_state_machine)
1773         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1774         (dwarf_decode_lines): Update.
1775         (dwarf2_start_subfile): Add cu parameter.
1776         (dwarf2_start_symtab, new_symbol): Update.
1777         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1778         Remove dwarf2_per_objfile parameter.
1779         (dwarf_decode_macros): Update.
1780
1781 2018-07-20  Tom Tromey  <tom@tromey.com>
1782
1783         * stabsread.c (define_symbol): Update.
1784         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1785         * dwarf2read.c (new_symbol): Update.
1786         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1787         * cp-namespace.c: Include buildsym.h.
1788         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1789         * buildsym-legacy.c (get_buildsym_compunit): New function.
1790
1791 2018-07-20  Tom Tromey  <tom@tromey.com>
1792
1793         * xcoffread.c: Include buildsym-legacy.h.
1794         * windows-nat.c: Include buildsym-legacy.h.
1795         * stabsread.c: Include buildsym-legacy.h.
1796         * mdebugread.c: Include buildsym-legacy.h.
1797         * buildsym-legacy.h: New file.
1798         * buildsym-legacy.c: New file, from buildsym.c.
1799         * go32-nat.c: Include buildsym-legacy.h.
1800         * dwarf2read.c: Include buildsym-legacy.h.
1801         * dbxread.c: Include buildsym-legacy.h.
1802         * cp-namespace.c: Include buildsym-legacy.h.
1803         * coffread.c: Include buildsym-legacy.h.
1804         * buildsym.h: Move some contents to buildsym-legacy.h.
1805         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1806         buildsym-legacy.c.
1807         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1808
1809 2018-07-20  Tom Tromey  <tom@tromey.com>
1810
1811         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1812         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1813         (buildsym_compunit::buildsym_compunit)
1814         (buildsym_compunit::~buildsym_compunit)
1815         (buildsym_compunit::get_macro_table): Define.
1816
1817 2018-07-20  Tom Tromey  <tom@tromey.com>
1818
1819         * buildsym.c (reset_symtab_globals): Remove.
1820         (buildsym_compunit::end_symtab_from_static_block): Update.
1821         (buildsym_compunit::augment_type_symtab): Update.
1822         (end_symtab_from_static_block): Call free_buildsym_compunit.
1823         (augment_type_symtab, end_symtab, end_expandable_symtab):
1824         Likewise.
1825
1826 2018-07-20  Tom Tromey  <tom@tromey.com>
1827
1828         * arch-utils.c: Do not include buildsym.h.
1829         * mipsread.c: Do not include buildsym.h.
1830         * machoread.c: Do not include buildsym.h.
1831         * elfread.c: Do not include buildsym.h.
1832
1833 2018-07-20  Tom Tromey  <tom@tromey.com>
1834
1835         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1836         initialization.
1837         (buildsym_compunit): Add new constructor.
1838         (struct buildsym_compunit) <get_last_source_file, finish_block,
1839         record_block_range, start_subfile, patch_subfile_names,
1840         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1841         set_last_source_start_addr, get_last_source_start_addr,
1842         get_local_using_directives, set_local_using_directives,
1843         get_global_using_directives, outermost_context_p,
1844         get_current_context_stack, get_context_stack_depth,
1845         get_current_subfile, get_local_symbols, get_file_symbols,
1846         get_global_symbols, record_debugformat, record_producer,
1847         push_context, pop_context, end_symtab_get_static_block,
1848         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1849         New public methods.
1850         <record_pending_block, finish_block_internal, make_blockvector,
1851         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1852         private methods.
1853         Update all users.
1854
1855 2018-05-22  Tom Tromey  <tom@tromey.com>
1856
1857         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1858         parameter.
1859         (finish_block_internal): Update.
1860
1861 2018-07-20  Tom Tromey  <tom@tromey.com>
1862
1863         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1864         parameter.
1865         (finish_block_internal): Update.
1866
1867 2018-07-20  Tom Tromey  <tom@tromey.com>
1868
1869         * buildsym.h (EXTERN): Don't define or undef.
1870         * buildsym.c (EXTERN): Don't define.
1871
1872 2018-07-20  Tom Tromey  <tom@tromey.com>
1873
1874         * buildsym.c: Remove TODO comment.
1875
1876 2018-07-20  Tom Tromey  <tom@tromey.com>
1877
1878         * coffread.c (coff_symtab_read): Update.
1879         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1880         (xcoff_new_init): Update.
1881         * mipsread.c (mipscoff_new_init): Update.
1882         * mdebugread.c (mdebug_build_psymtabs): Update.
1883         * elfread.c (elf_new_init): Update.
1884         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1885         Update.
1886         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1887         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1888         (stabsect_build_psymtabs): Update.
1889         * buildsym.h (buildsym_init): Don't declare.
1890         * buildsym.c: Update comment.
1891         (prepare_for_building): Remove.
1892         (start_symtab, restart_symtab): Update.
1893         (reset_symtab_globals): Update comment.
1894         (buildsym_init): Remove.
1895
1896 2018-07-20  Tom Tromey  <tom@tromey.com>
1897
1898         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1899         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1900         (read_enum_type, common_block_start, common_block_end)
1901         (cleanup_undefined_types_1, finish_global_stabs): Update.
1902         * mdebugread.c (psymtab_to_symtab_1): Update.
1903         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1904         (read_lexical_block_scope, new_symbol): Update.
1905         * dbxread.c (process_one_symbol): Update.
1906         * coffread.c (coff_symtab_read, process_coff_symbol)
1907         (coff_read_enum_type): Update.
1908         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1909         declare.
1910         (get_local_symbols, get_file_symbols, get_global_symbols): New
1911         functions.
1912         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1913         m_global_symbols.
1914         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1915         (~scoped_free_pendings): Update.
1916         (finish_block, prepare_for_building, reset_symtab_globals)
1917         (end_symtab_get_static_block, end_symtab_with_blockvector)
1918         (augment_type_symtab, push_context): Update.
1919         (get_local_symbols, get_file_symbols, get_global_symbols): New
1920         functions.
1921         (buildsym_init): Update.
1922
1923 2018-07-20  Tom Tromey  <tom@tromey.com>
1924
1925         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1926         (process_full_type_unit): Likewise.
1927         (dwarf2_start_symtab): Set list_in_scope.
1928
1929 2018-07-20  Tom Tromey  <tom@tromey.com>
1930
1931         * dwarf2read.c (process_psymtab_comp_unit_reader)
1932         (build_type_psymtabs_reader): Do not set list_in_scope.
1933
1934 2018-07-20  Tom Tromey  <tom@tromey.com>
1935
1936         * buildsym.c (free_pendings): Remove.
1937         (add_symbol_to_list, scoped_free_pendings)
1938         (finish_block_internal, buildsym_init): Update.
1939
1940 2018-07-20  Tom Tromey  <tom@tromey.com>
1941
1942         * xcoffread.c (read_xcoff_symtab): Update.
1943         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1944         Update.
1945         * dbxread.c (process_one_symbol): Update.
1946         * coffread.c (coff_symtab_read): Update.
1947         * buildsym.h (finish_block): Update.
1948         * buildsym.c (finish_block): Remove "listhead" argument.
1949         (end_symtab_get_static_block): Update.
1950
1951 2018-07-20  Tom Tromey  <tom@tromey.com>
1952
1953         * buildsym.h (class scoped_free_pendings): Remove constructor.
1954         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1955         method.
1956         <m_pending_block_obstack, m_pending_blocks>: New members.
1957         (pending_block_obstack, pending_blocks): Remove.
1958         (scoped_free_pendings::scoped_free_pendings): Default.
1959         (~scoped_free_pendings): Update.
1960         (free_pending_blocks): Remove.
1961         (finish_block_internal, record_pending_block, make_blockvector)
1962         (end_symtab_get_static_block, augment_type_symtab, push_context)
1963         (buildsym_init): Update.
1964
1965 2018-07-20  Tom Tromey  <tom@tromey.com>
1966
1967         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1968         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1969         members.
1970         (pending_addrmap, pending_addrmap_obstack)
1971         (pending_addrmap_interesting): Remove.
1972         (scoped_free_pendings, record_block_range, make_blockvector)
1973         (prepare_for_building, reset_symtab_globals, buildsym_init):
1974         Update.
1975
1976 2018-07-20  Tom Tromey  <tom@tromey.com>
1977
1978         * xcoffread.c (process_linenos): Update.
1979         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1980         * mdebugread.c (psymtab_to_symtab_1): Update.
1981         * dwarf2read.c (setup_type_unit_groups)
1982         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1983         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1984         * dbxread.c (process_one_symbol): Update.
1985         * coffread.c (coff_symtab_read, enter_linenos)
1986         (process_coff_symbol): Update.
1987         * buildsym.h (current_subfile): Don't declare.
1988         (get_current_subfile): Declare.
1989         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1990         member.
1991         (start_subfile, free_buildsym_compunit, push_subfile)
1992         (prepare_for_building, start_symtab): Update.
1993         (get_current_subfile): New function.
1994
1995 2018-07-20  Tom Tromey  <tom@tromey.com>
1996
1997         * coffread.c (coff_symtab_read): Update.
1998         * xcoffread.c (read_xcoff_symtab): Update.
1999         * dwarf2read.c (new_symbol): Update.
2000         (read_func_scope, read_lexical_block_scope): Update.
2001         * dbxread.c (process_one_symbol): Update.
2002         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2003         (outermost_context_p): Remove macro.
2004         (outermost_context_p, get_current_context_stack)
2005         (get_context_stack_depth): Declare.
2006         (pop_context): Return struct context_stack.
2007         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2008         member.
2009         (context_stack_size): Remove.
2010         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2011         (prepare_for_building, end_symtab_get_static_block)
2012         (augment_type_symtab, push_context): Update.
2013         (pop_context): Return struct context_stack.
2014         (outermost_context_p, get_current_context_stack)
2015         (get_context_stack_depth): New functions.
2016         (buildsym_init): Update.
2017
2018 2018-07-20  Tom Tromey  <tom@tromey.com>
2019
2020         * rust-exp.y: Now a pure parser.  Update all rules.
2021         (%union): Move earlier.
2022         (current_parser, work_obstack): Remove globals.
2023         (rust_parser, ~rust_parser): Update.
2024         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2025         lex_character, lex_number, lex_string, lex_identifier,
2026         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2027         convert_name, convert_params_to_expression,
2028         convert_ast_to_expression, ast_basic_type, ast_operation,
2029         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2030         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2031         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2032         ast_array_type, ast_slice_type, ast_reference_type,
2033         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2034         (rust_parse): Update.
2035         (rustyyerror, rustyylex): Add parser parameter.
2036         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2037         (rust_lex_stringish_test, rust_lex_test_sequence)
2038         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2039         (rust_lex_test_push_back, rust_lex_tests): Update.
2040
2041 2018-07-19  Pedro Alves  <palves@redhat.com>
2042
2043         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2044         gdb::unique_xmalloc_ptr.
2045         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2046         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2047         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2048         copy-initialization.
2049         * guile/scm-pretty-print.c (ppscm_print_children): Use
2050         gdb::unique_xmalloc_ptr instead of cleanups.
2051         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2052         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2053         gdb::unique_xmalloc_ptr.
2054         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2055         Adjust to use gdb::unique_xmalloc_ptr.
2056         * guile/scm-utils.c (extract_arg): Adjust.
2057         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2058         gdb::unique_xmalloc_ptr instead of a cleanup.
2059
2060 2018-07-19  Tom Tromey  <tom@tromey.com>
2061
2062         * utils.c (do_value_free_to_mark)
2063         (make_cleanup_value_free_to_mark): Remove.
2064         * utils.h (make_cleanup_value_free_to_mark): Remove.
2065
2066 2018-07-19  Pedro Alves  <palves@redhat.com>
2067
2068         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2069         forwarding reference.
2070
2071 2018-07-18  Pedro Alves  <palves@redhat.com>
2072
2073         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2074         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2075         cleanup.
2076
2077 2018-07-18  Pedro Alves  <palves@redhat.com>
2078
2079         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2080         exceptions.
2081         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2082         (gdbscm_wrap): New.
2083         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2084         directly instead of a cleanup.
2085         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2086         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2087         (vlscm_binop_gdbthrow): New, factored out from ...
2088         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2089         (vlscm_rich_compare): Use gdbscm_wrap.
2090         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2091         instead of a cleanup.
2092         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2093         cleanup.
2094         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2095         Use xfree directly instead of a cleanup.
2096         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2097         Adjust to use gdbscm_wrap and scoped_value_mark.
2098         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2099         (gdbscm_value_address, gdbscm_value_dereference)
2100         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2101         scoped_value_mark.
2102         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2103         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2104         scoped_value_mark.
2105         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2106         gdbscm_wrap and scoped_value_mark.
2107         (gdbscm_value_to_string): Use xfree directly instead of a
2108         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2109         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2110         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2111         scoped_value_mark.
2112         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2113         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2114         scoped_value_mark.
2115         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2116         gdbscm_wrap.
2117
2118 2018-07-18  Tom de Vries  <tdevries@suse.de>
2119
2120         * findvar.c (default_read_var_value): Also resolve dynamic type for
2121         LOC_OPTIMIZED_OUT vars.
2122
2123 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2124
2125         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2126         decoding.
2127
2128 2018-07-17  Tom Tromey  <tom@tromey.com>
2129
2130         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2131         (compute_enum_list, pascm_set_param_value_x)
2132         (gdbscm_parameter_value): Update.
2133         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2134         (gdbscm_scm_to_host_string): Update.
2135         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2136         Update.
2137         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2138         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2139         * guile/scm-string.c (gdbscm_scm_to_string): Return
2140         unique_xmalloc_ptr.
2141         (gdbscm_scm_to_host_string): Likewise.
2142
2143 2018-07-17  Tom Tromey  <tom@tromey.com>
2144
2145         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2146         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2147         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2148         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2149         unique_xmalloc_ptr.
2150
2151 2018-07-17  Tom Tromey  <tom@tromey.com>
2152
2153         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2154         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2155         Update.
2156         * guile/scm-cmd.c (cmdscm_function): Update.
2157         * guile/scm-pretty-print.c
2158         (ppscm_print_exception_unless_memory_error): Update.
2159         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2160         Return unique_xmalloc_ptr.
2161
2162 2018-07-17  Tom Tromey  <tom@tromey.com>
2163
2164         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2165         Use string_printf.
2166
2167 2018-07-17  Jim Wilson  <jimw@sifive.com>
2168
2169         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2170         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2171         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2172         unecessary braces after EF_RISCV_RVC test.  Delete call to
2173         set_gdbarch_decr_pc_after_break.
2174
2175         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2176         RISCV_LAST_FP_REGNUM + 1.
2177         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2178
2179 2018-07-17  Tom Tromey  <tom@tromey.com>
2180
2181         * configure.ac: Remove --disable-gdbcli.
2182         * configure: Rebuild.
2183         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2184         (SUBDIR_CLI_CFLAGS): Remove.
2185         (SFILES): Use SUBDIR_CLI_SRCS.
2186         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2187
2188 2018-07-17  Tom Tromey  <tom@tromey.com>
2189
2190         PR gdb/18624:
2191         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2192
2193 2018-07-16  Jim Wilson  <jimw@sifive.com>
2194
2195         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2196
2197 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2198
2199         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2200         variable.
2201         (libunwind_frame_sniffer): Likewise.
2202         (libunwind_frame_prev_register): Likewise.
2203         (libunwind_sigtramp_frame_sniffer): Likewise.
2204         * ia64-tdep.c (ia64_access_reg): Likewise.
2205         (ia64_access_rse_reg): Likewise.
2206         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2207         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2208
2209 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2210
2211         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2212
2213 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2214
2215         * remote-sim.c (gdbsim_target::close,
2216         gdbsim_target::mourn_inferior): Remove unused variables.
2217
2218 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2219
2220         * ia64-tdep.c (ktab_buf): New global.
2221         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2222         (get_kernel_table): Adjust.
2223
2224 2018-07-16  Tom Tromey  <tom@tromey.com>
2225
2226         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2227         * dwarf2read.c (using_directives, new_symbol): Use
2228         outermost_context_p.
2229         * dbxread.c (process_one_symbol): Use outermost_context_p.
2230         * coffread.c (coff_symtab_read): Use outermost_context_p.
2231
2232 2018-07-16  Tom Tromey  <tom@tromey.com>
2233
2234         * dwarf2read.c (using_directives, read_func_scope)
2235         (read_lexical_block_scope): Update.
2236         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2237         * buildsym.h (local_using_directives, global_using_directives):
2238         Don't declare.
2239         (get_local_using_directives, set_local_using_directives)
2240         (get_global_using_directives): Declare.
2241         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2242         m_global_using_directives>: New members.
2243         (finish_block_internal, prepare_for_building)
2244         (reset_symtab_globals, end_symtab_get_static_block)
2245         (push_context): Update.
2246         (get_local_using_directives, set_local_using_directives)
2247         (get_global_using_directives): New functions.
2248         (buildsym_init): Update.
2249
2250 2018-07-16  Tom Tromey  <tom@tromey.com>
2251
2252         * xcoffread.c (xcoff_initial_scan): Don't call
2253         free_pending_blocks.
2254         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2255         * buildsym.h (class scoped_free_pendings): Add constructor.
2256         (free_pending_blocks): Don't declare.
2257         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2258         (free_pending_blocks): Now static.
2259
2260 2018-07-16  Tom Tromey  <tom@tromey.com>
2261
2262         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2263         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2264         member.
2265         (struct subfile_stack): Remove.
2266         (subfile_stack): Remove.
2267         (push_subfile, pop_subfile, buildsym_init): Update.
2268
2269 2018-07-16  Tom Tromey  <tom@tromey.com>
2270
2271         * buildsym.c (push_subfile): Use gdb_assert.
2272         (pop_subfile): Use gdb_assert.
2273
2274 2018-07-16  Tom Tromey  <tom@tromey.com>
2275
2276         * buildsym.h (merge_symbol_lists): Remove.
2277         * buildsym.c (merge_symbol_lists): Remove.
2278
2279 2018-07-16  Tom Tromey  <tom@tromey.com>
2280
2281         * stabsread.c (scan_file_globals): Update comment.
2282         * stabsread.h (scan_file_globals): Move from buildsym.h.
2283         * buildsym.h (scan_file_globals): Move to stabsread.h.
2284
2285 2018-07-16  Tom Tromey  <tom@tromey.com>
2286
2287         * xcoffread.c (xcoff_new_init): Update.
2288         * mipsread.c (mipscoff_new_init): Update.
2289         * mdebugread.c (mdebug_build_psymtabs): Update.
2290         * elfread.c (elf_new_init): Update.
2291         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2292         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2293         * buildsym.h (buildsym_new_init): Don't declare.
2294         * buildsym.c (buildsym_new_init): Remove.
2295
2296 2018-07-16  Tom Tromey  <tom@tromey.com>
2297
2298         * stabsread.h (within_function): Move from buildsym.h.
2299         * stabsread.c (start_stabs): Clear within_function.
2300         * coffread.c (coff_start_symtab): Clear within_function.
2301         * buildsym.h (within_function): Move to stabsread.h.
2302         * buildsym.c (prepare_for_building): Update.
2303
2304 2018-07-16  Tom Tromey  <tom@tromey.com>
2305
2306         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2307         * dwarf2read.c (dwarf2_start_symtab): Don't set
2308         processing_gcc_compilation.
2309         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2310
2311 2018-07-16  Tom Tromey  <tom@tromey.com>
2312
2313         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2314         (next_symbol_text_func): Move from buildsym.h.
2315         * stabsread.c (hashname): Move from buildsym.c.
2316         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2317         (next_symbol_text_func, hashname): Move to stabsread.h.
2318         * buildsym.c: Don't include bcache.h
2319         (hashname): Move to stasbread.c.
2320
2321 2018-07-16  Tom Tromey  <tom@tromey.com>
2322
2323         * buildsym.h (context_stack_size): Don't declare.
2324         * buildsym.c (context_stack_size): New global.
2325
2326 2018-07-16  Tom Tromey  <tom@tromey.com>
2327
2328         * dbxread.c (processing_acc_compilation): New global.
2329         * buildsym.h (processing_acc_compilation): Don't declare.
2330
2331 2018-07-16  Tom Tromey  <tom@tromey.com>
2332
2333         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2334         * dbxread.c (read_ofile_symtab): Update.
2335         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2336         * buildsym.h (last_source_start_addr): Remove.
2337         (set_last_source_start_addr, get_last_source_start_addr):
2338         Declare.
2339         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2340         parameter.
2341         (struct buildsym_compunit) <m_last_source_start_addr>: New
2342         member.
2343         (prepare_for_building): Remove start_addr parameter.
2344         (start_symtab, restart_symtab, end_symtab_get_static_block)
2345         (end_symtab_with_blockvector): Update.
2346         (set_last_source_start_addr, get_last_source_start_addr): New
2347         functions.
2348
2349 2018-07-16  Tom Tromey  <tom@tromey.com>
2350
2351         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2352         member.
2353         (have_line_numbers): Remove.
2354         (record_line, prepare_for_building, end_symtab_get_static_block)
2355         (augment_type_symtab): Update.
2356
2357 2018-07-16  Tom Tromey  <tom@tromey.com>
2358
2359         * buildsym.c (~buildsym_compunit): Free the macro table.
2360         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2361         methods.
2362         <m_pending_macros>: New member.
2363         (pending_macros): Remove.
2364         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2365         (reset_symtab_globals, end_symtab_get_static_block)
2366         (end_symtab_with_blockvector, augment_type_symtab)
2367         (buildsym_init): Update.
2368
2369 2018-07-16  Tom Tromey  <tom@tromey.com>
2370
2371         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2372         parameter.
2373         (buildsym_compunit::set_last_source_file): New method.
2374         <m_last_source_file>: New member.
2375         (prepare_for_building): Remove "name" parameter.
2376         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2377         (last_source_file): Remove.
2378         (set_last_source_file, get_last_source_file): Update.
2379
2380 2018-07-16  Tom Tromey  <tom@tromey.com>
2381
2382         * buildsym.c (prepare_for_building): Add assert.
2383
2384 2018-07-16  Tom Tromey  <tom@tromey.com>
2385
2386         * buildsym.c (~buildsym_compunit): Update.
2387         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2388         (start_subfile, patch_subfile_names)
2389         (end_symtab_with_blockvector): Update.
2390
2391 2018-07-16  Tom Tromey  <tom@tromey.com>
2392
2393         * buildsym.c (struct buildsym_compunit): Add constructor,
2394         destructor, initializers.
2395         (start_buildsym_compunit): Remove.
2396         (free_buildsym_compunit): Use "delete".
2397         (start_symtab, restart_symtab): Use "new".
2398
2399 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2400
2401         * symfile.c (set_objfile_default_section_offset): Remove struct
2402         keyword.
2403
2404 2018-07-14  Stafford Horne  <shorne@gmail.com>
2405
2406         * (Responsible Maintainers): Add myself as or1k maintainer.
2407
2408 2018-07-13  Tom Tromey  <tom@tromey.com>
2409
2410         * symfile.c (set_objfile_default_section_offset): Use extra braces
2411         around initializer.
2412
2413 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2414
2415         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2416         non-branching basr.
2417
2418 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2419
2420         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2421         unittests/cli-utils-selftests.c
2422         * unittests/cli-utils-selftests.c: New file.
2423
2424 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2425
2426         * NEWS: Mention new commands. Mention change to 'thread apply'.
2427
2428 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2429
2430         * thread.c (thr_try_catch_cmd): New function.
2431         (thread_apply_all_command): Handle qcs flags.
2432         (thread_apply_command): Handle qcs flags.
2433         (taas_command): New function.
2434         (tfaas_command): New function.
2435         (_initialize_thread): Update to setup the new commands 'taas
2436         and 'tfaas'. Change doc string for 'thread apply'.
2437
2438 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2439
2440         * stack.c: (trailing_outermost_frame): New function, mostly
2441         extracted from backtrace_command_1.
2442         (leading_innermost_frame): New function.
2443         (backtrace_command_1): Update to call trailing_outermost_frame.
2444         (frame_apply_command_count): New function.
2445         (frame_apply_level_command): New function.
2446         (frame_apply_all_command): New function.
2447         (frame_apply_command): New function.
2448         (faas_command): New function.
2449         (frame_cmd_list): New variable.
2450         (_initialize_stack): Update to setup the new commands 'frame apply'
2451         and 'faas'.
2452
2453 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2454
2455         * cli-utils.c (number_or_range_parser::get_number): Only handle
2456         numbers or convenience var as numbers.
2457         (parse_flags): New function.
2458         (parse_flags_qcs): New function.
2459         (number_or_range_parser::finished): Ensure parsing end is detected
2460         before end of string.
2461         * cli-utils.h (parse_flags): New function.
2462         (parse_flags_qcs): New function.
2463         (number_or_range_parser): Remove m_finished bool.
2464         (number_or_range_parser::skip_range): Set m_in_range to false.
2465
2466 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2467
2468         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2469         on Windows.
2470
2471 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2472             Jan Kratochvil  <jan.kratochvil@redhat.com>
2473             Paul Fertser  <fercerpav@gmail.com>
2474             Tsutomu Seki  <sekiriki@gmail.com>
2475             Pedro Alves  <palves@redhat.com>
2476
2477         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2478         'unittests/parse-connection-spec-selftests.c'.
2479         (COMMON_SFILES): Add 'common/netstuff.c'.
2480         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2481         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2482         * common/netstuff.c: New file.
2483         * common/netstuff.h: New file.
2484         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2485         (wait_for_connect): Update comment.  New parameter
2486         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2487         Use 'sock' directly instead of 'scb->fd'.
2488         (try_connect): New function, with code from 'net_open'.
2489         (net_open): Rewrite main loop to deal with multiple
2490         sockets/addresses.  Handle IPv6-style hostnames; implement
2491         support for IPv6 connections.
2492         * unittests/parse-connection-spec-selftests.c: New file.
2493
2494 2018-07-11  Pedro Alves  <palves@redhat.com>
2495
2496         PR gdb/23377
2497         * remote.c (remote_target::remote_detach_pid): Call
2498         set_current_process.
2499
2500 2018-07-11  Pedro Alves  <palves@redhat.com>
2501
2502         * h8300-tdep.c (h8300_gdbarch_init): Remove
2503         set_gdbarch_ecoff_reg_to_regnum calls.
2504
2505 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2506
2507         PR c++/23373
2508         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2509         offsets/sizes for static members of a class/struct.
2510
2511 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2512
2513         * target-descriptions.c (tdesc_register_bitsize): Rename.
2514         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2515         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2516         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2517
2518 2018-07-10  Tom Tromey  <tom@tromey.com>
2519
2520         * breakpoint.c (moribund_locations): Now static and a
2521         std::vector.
2522         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2523         (build_bpstat_chain, update_global_location_list)
2524         (breakpoint_retire_moribund): Update.
2525         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2526         VEC.
2527
2528 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2529
2530         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2531         (riscv_register_reggroup_p): Use new function, remove unneeded
2532         parenthesis.
2533         (riscv_push_dummy_call): Extend assert to compare against xlen or
2534         flen based on register type.
2535
2536 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2537
2538         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2539
2540 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2541
2542         * remote.c (show_hardware_watchpoint_limit): New function.
2543         (show_hardware_watchpoint_length_limit): New function.
2544         (show_hardware_breakpoint_limit): New function.
2545         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2546         where appropriate, update help text.
2547
2548 2018-07-09  Tom Tromey  <tom@tromey.com>
2549
2550         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2551         (CLIBS): Don't mention NAT_CLIBS.
2552
2553 2018-07-09  Tom Tromey  <tom@tromey.com>
2554
2555         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2556         (LIBGDB_OBS, clean mostlyclean): Update.
2557         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2558
2559 2018-07-09  Tom Tromey  <tom@tromey.com>
2560
2561         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2562         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2563         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2564
2565 2018-07-09  Tom Tromey  <tom@tromey.com>
2566
2567         * Makefile.in (ALLDEPFILES): Remove exec.c.
2568         (COMMON_OBS): Remove exec.o.
2569         (COMMON_SFILES): Add exec.c.
2570
2571 2018-07-09  Tom Tromey  <tom@tromey.com>
2572
2573         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2574
2575 2018-07-09  Tom Tromey  <tom@tromey.com>
2576
2577         * Makefile.in (clean mostlyclean): Remove stamp-version.
2578         (version.c): Depend on stamp-version.
2579         (stamp-version): New rule, from version.c rule.
2580
2581 2018-07-09  Tom Tromey  <tom@tromey.com>
2582
2583         * Makefile.in (init.c): Depend on stamp-init.
2584         (stamp-init): New rule, from init.c rule.
2585         (clean mostlyclean): Remove stamp-init.
2586
2587 2018-07-09  Tom Tromey  <tom@tromey.com>
2588
2589         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2590         SUBDIR_GCC_COMPILE_SRCS.
2591
2592 2018-07-09  Tom Tromey  <tom@tromey.com>
2593
2594         * Makefile.in (init.c): Remove some unused sed rules.
2595
2596 2018-07-09  Tom Tromey  <tom@tromey.com>
2597
2598         * Makefile.in (TSOBS): Remove.
2599         (INIT_FILES): Update.
2600         (LIBGDB_OBS): Update.
2601         (COMMON_SFILES): Add inflow.c.
2602         (SFILES): Remove inflow.c.
2603
2604 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2605
2606         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2607
2608 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2609
2610         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2611         get_saveloc_name, is_signal_frame_name, step_name,
2612         init_remote_name, create_addr_space_name,
2613         destroy_addr_space_name, search_unwind_table_name,
2614         find_dyn_list_name): Constify.
2615
2616 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2617
2618         * darwin-nat.c (darwin_pthread_kill): New function.
2619         (darwin_resume_thread): Use darwin_pthread_kill.
2620
2621 2018-07-05  Tom de Vries  <tdevries@suse.de>
2622
2623         * macroexp.c (macro_buffer) <operator=>: New member function.
2624
2625 2018-07-04  Tom Tromey  <tom@tromey.com>
2626
2627         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2628
2629 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2630
2631         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2632         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2633         * maint.c: Likewise.
2634         * top.c: Likewise.
2635
2636 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2637
2638         * NEWS: Create a new section for the next release branch.
2639         Rename the section of the current branch, now that it has
2640         been cut.
2641
2642 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2643
2644         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2645         * version.in: Bump version to 8.2.50.DATE-git.
2646
2647 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2648             Pedro Alves  <palves@redhat.com>
2649
2650         * linux-nat.c (linux_init_ptrace): Rename to ...
2651         (linux_init_ptrace_procfs): ... this.  Call
2652         linux_proc_init_warnings.
2653         (linux_nat_target::post_attach)
2654         (linux_nat_target::post_startup_inferior): Adjust.
2655         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2656         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2657
2658 2018-07-04  Tom de Vries  <tdevries@suse.de>
2659
2660         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2661         check ...
2662         (read_comp_unit_head): ... here.
2663
2664 2018-07-03  Tom Tromey  <tom@tromey.com>
2665
2666         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2667         (stop_tracing, tstatus_command)
2668         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2669         (print_one_static_tracepoint_marker): Update.
2670         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2671         std::vector.
2672         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2673         VEC.
2674         (all_tracepoints, static_tracepoints_here): Return std::vector.
2675
2676 2018-07-03  Tom Tromey  <tom@tromey.com>
2677
2678         * common/ptid.c (ptid_equal): Remove.
2679         * common/ptid.h (ptid_equal): Don't declare.
2680         * ada-tasks.c: Update.
2681         * breakpoint.c: Update.
2682         * common/agent.c: Update.
2683         * corelow.c: Update.
2684         * darwin-nat-info.c: Update.
2685         * darwin-nat.c: Update.
2686         * dcache.c: Update.
2687         * dtrace-probe.c: Update.
2688         * dummy-frame.c: Update.
2689         * fbsd-nat.c: Update.
2690         * frame.c: Update.
2691         * gdbthread.h: Update.
2692         * gnu-nat.c: Update.
2693         * go32-nat.c: Update.
2694         * inf-loop.c: Update.
2695         * inf-ptrace.c: Update.
2696         * infcall.c: Update.
2697         * infcmd.c: Update.
2698         * inflow.c: Update.
2699         * infrun.c: Update.
2700         * linux-fork.c: Update.
2701         * linux-nat.c: Update.
2702         * linux-thread-db.c: Update.
2703         * mi/mi-cmd-var.c: Update.
2704         * mi/mi-interp.c: Update.
2705         * mi/mi-main.c: Update.
2706         * nto-procfs.c: Update.
2707         * ppc-linux-tdep.c: Update.
2708         * procfs.c: Update.
2709         * python/py-inferior.c: Update.
2710         * python/py-record-btrace.c: Update.
2711         * python/py-record.c: Update.
2712         * ravenscar-thread.c: Update.
2713         * regcache.c: Update.
2714         * remote-sim.c: Update.
2715         * remote.c: Update.
2716         * sol-thread.c: Update.
2717         * solib.c: Update.
2718         * target.c: Update.
2719         * tui/tui-stack.c: Update.
2720         * varobj.c: Update.
2721         * windows-nat.c: Update.
2722         * windows-tdep.c: Update.
2723
2724 2018-07-03  Tom Tromey  <tom@tromey.com>
2725
2726         * common/ptid.c (ptid_match): Remove.
2727         * common/ptid.h (ptid_match): Don't declare.
2728         * fbsd-nat.c: Update.
2729         * infcmd.c: Update.
2730         * infrun.c: Update.
2731         * linux-nat.c: Update.
2732         * record-btrace.c: Update.
2733         * regcache.c: Update.
2734         * remote.c: Update.
2735
2736 2018-07-03  Tom Tromey  <tom@tromey.com>
2737
2738         * common/ptid.c (ptid_tid_p): Remove.
2739         * common/ptid.h (ptid_tid_p): Don't declare.
2740         * sol-thread.c: Update.
2741
2742 2018-07-03  Tom Tromey  <tom@tromey.com>
2743
2744         * common/ptid.c (ptid_lwp_p): Remove.
2745         * common/ptid.h (ptid_lwp_p): Don't declare.
2746         * fbsd-nat.c: Update.
2747         * linux-nat.c: Update.
2748         * nat/linux-procfs.c: Update.
2749         * nat/x86-linux-dregs.c: Update.
2750         * sol-thread.c: Update.
2751
2752 2018-07-03  Tom Tromey  <tom@tromey.com>
2753
2754         * common/ptid.c (ptid_is_pid): Remove.
2755         * common/ptid.h (ptid_is_pid): Don't declare.
2756         * infrun.c: Update.
2757         * linux-nat.c: Update.
2758         * mi/mi-interp.c: Update.
2759         * remote.c: Update.
2760         * thread.c: Update.
2761
2762 2018-07-03  Tom Tromey  <tom@tromey.com>
2763
2764         * common/ptid.c (ptid_get_tid): Remove.
2765         * common/ptid.h (ptid_get_tid): Don't declare.
2766         * ada-tasks.c: Update.
2767         * aix-thread.c: Update.
2768         * bsd-uthread.c: Update.
2769         * darwin-nat.c: Update.
2770         * fbsd-nat.c: Update.
2771         * i386-darwin-nat.c: Update.
2772         * infrun.c: Update.
2773         * linux-tdep.c: Update.
2774         * nto-procfs.c: Update.
2775         * ppc-ravenscar-thread.c: Update.
2776         * python/py-infthread.c: Update.
2777         * ravenscar-thread.c: Update.
2778         * sol-thread.c: Update.
2779         * sparc-ravenscar-thread.c: Update.
2780         * windows-nat.c: Update.
2781
2782 2018-07-03  Tom Tromey  <tom@tromey.com>
2783
2784         * common/ptid.c (ptid_get_lwp): Remove.
2785         * common/ptid.h (ptid_get_lwp): Don't declare.
2786         * aarch64-linux-nat.c: Update.
2787         * ada-tasks.c: Update.
2788         * aix-thread.c: Update.
2789         * amd64-linux-nat.c: Update.
2790         * arm-linux-nat.c: Update.
2791         * corelow.c: Update.
2792         * fbsd-nat.c: Update.
2793         * fbsd-tdep.c: Update.
2794         * gnu-nat.c: Update.
2795         * i386-cygwin-tdep.c: Update.
2796         * i386-gnu-nat.c: Update.
2797         * i386-linux-nat.c: Update.
2798         * ia64-linux-nat.c: Update.
2799         * inf-ptrace.c: Update.
2800         * infrun.c: Update.
2801         * linux-fork.c: Update.
2802         * linux-nat.c: Update.
2803         * linux-tdep.c: Update.
2804         * linux-thread-db.c: Update.
2805         * mips-linux-nat.c: Update.
2806         * nat/aarch64-linux-hw-point.c: Update.
2807         * nat/aarch64-linux.c: Update.
2808         * nat/linux-btrace.c: Update.
2809         * nat/linux-osdata.c: Update.
2810         * nat/linux-procfs.c: Update.
2811         * nat/x86-linux-dregs.c: Update.
2812         * obsd-nat.c: Update.
2813         * ppc-fbsd-nat.c: Update.
2814         * ppc-linux-nat.c: Update.
2815         * procfs.c: Update.
2816         * python/py-infthread.c: Update.
2817         * ravenscar-thread.c: Update.
2818         * remote.c: Update.
2819         * s390-linux-nat.c: Update.
2820         * sol-thread.c: Update.
2821         * sol2-tdep.c: Update.
2822         * spu-linux-nat.c: Update.
2823         * x86-linux-nat.c: Update.
2824         * xtensa-linux-nat.c: Update.
2825
2826 2018-07-03  Tom Tromey  <tom@tromey.com>
2827
2828         * common/ptid.c (ptid_get_pid): Remove.
2829         * common/ptid.h (ptid_get_pid): Don't declare.
2830         * aarch64-linux-nat.c: Update.
2831         * ada-lang.c: Update.
2832         * aix-thread.c: Update.
2833         * alpha-bsd-nat.c: Update.
2834         * amd64-fbsd-nat.c: Update.
2835         * amd64-linux-nat.c: Update.
2836         * arm-linux-nat.c: Update.
2837         * arm-nbsd-nat.c: Update.
2838         * auxv.c: Update.
2839         * break-catch-syscall.c: Update.
2840         * breakpoint.c: Update.
2841         * bsd-uthread.c: Update.
2842         * corelow.c: Update.
2843         * ctf.c: Update.
2844         * darwin-nat.c: Update.
2845         * fbsd-nat.c: Update.
2846         * fbsd-tdep.c: Update.
2847         * gcore.c: Update.
2848         * gnu-nat.c: Update.
2849         * hppa-nbsd-nat.c: Update.
2850         * hppa-obsd-nat.c: Update.
2851         * i386-fbsd-nat.c: Update.
2852         * ia64-linux-nat.c: Update.
2853         * inf-ptrace.c: Update.
2854         * infcmd.c: Update.
2855         * inferior.c: Update.
2856         * inferior.h: Update.
2857         * inflow.c: Update.
2858         * infrun.c: Update.
2859         * linux-fork.c: Update.
2860         * linux-nat.c: Update.
2861         * linux-tdep.c: Update.
2862         * linux-thread-db.c: Update.
2863         * m68k-bsd-nat.c: Update.
2864         * mi/mi-interp.c: Update.
2865         * mi/mi-main.c: Update.
2866         * mips-linux-nat.c: Update.
2867         * mips-nbsd-nat.c: Update.
2868         * mips64-obsd-nat.c: Update.
2869         * nat/aarch64-linux-hw-point.c: Update.
2870         * nat/aarch64-linux.c: Update.
2871         * nat/linux-btrace.c: Update.
2872         * nat/linux-osdata.c: Update.
2873         * nat/linux-procfs.c: Update.
2874         * nat/x86-linux-dregs.c: Update.
2875         * nto-procfs.c: Update.
2876         * obsd-nat.c: Update.
2877         * ppc-linux-nat.c: Update.
2878         * ppc-nbsd-nat.c: Update.
2879         * ppc-obsd-nat.c: Update.
2880         * proc-service.c: Update.
2881         * procfs.c: Update.
2882         * python/py-inferior.c: Update.
2883         * python/py-infthread.c: Update.
2884         * ravenscar-thread.c: Update.
2885         * record.c: Update.
2886         * remote-sim.c: Update.
2887         * remote.c: Update.
2888         * rs6000-nat.c: Update.
2889         * s390-linux-nat.c: Update.
2890         * sh-nbsd-nat.c: Update.
2891         * sol-thread.c: Update.
2892         * sparc-nat.c: Update.
2893         * sparc64-tdep.c: Update.
2894         * spu-linux-nat.c: Update.
2895         * spu-tdep.c: Update.
2896         * target-debug.h: Update.
2897         * target.c: Update.
2898         * thread.c: Update.
2899         * tid-parse.c: Update.
2900         * tracefile-tfile.c: Update.
2901         * vax-bsd-nat.c: Update.
2902         * windows-nat.c: Update.
2903         * x86-linux-nat.c: Update.
2904         * x86-nat.c: Update.
2905
2906 2018-07-03  Tom Tromey  <tom@tromey.com>
2907
2908         * common/ptid.c (pid_to_ptid): Remove.
2909         * common/ptid.h (pid_to_ptid): Don't declare.
2910         * aix-thread.c: Update.
2911         * arm-linux-nat.c: Update.
2912         * common/ptid.c: Update.
2913         * common/ptid.h: Update.
2914         * corelow.c: Update.
2915         * ctf.c: Update.
2916         * darwin-nat.c: Update.
2917         * fbsd-nat.c: Update.
2918         * fork-child.c: Update.
2919         * gnu-nat.c: Update.
2920         * go32-nat.c: Update.
2921         * inf-ptrace.c: Update.
2922         * infcmd.c: Update.
2923         * inferior.c: Update.
2924         * infrun.c: Update.
2925         * linux-fork.c: Update.
2926         * linux-nat.c: Update.
2927         * nat/aarch64-linux-hw-point.c: Update.
2928         * nat/fork-inferior.c: Update.
2929         * nat/x86-linux-dregs.c: Update.
2930         * nto-procfs.c: Update.
2931         * obsd-nat.c: Update.
2932         * procfs.c: Update.
2933         * progspace.c: Update.
2934         * remote.c: Update.
2935         * rs6000-nat.c: Update.
2936         * s390-linux-nat.c: Update.
2937         * sol-thread.c: Update.
2938         * spu-linux-nat.c: Update.
2939         * target.c: Update.
2940         * top.c: Update.
2941         * tracefile-tfile.c: Update.
2942         * windows-nat.c: Update.
2943
2944 2018-07-03  Tom Tromey  <tom@tromey.com>
2945
2946         * common/ptid.h (ptid_build): Don't declare.
2947         * common/ptid.c (ptid_build): Remove.
2948         * aix-thread.c: Update.
2949         * bsd-kvm.c: Update.
2950         * bsd-uthread.c: Update.
2951         * common/agent.c: Update.
2952         * common/ptid.c: Update.
2953         * common/ptid.h: Update.
2954         * corelow.c: Update.
2955         * darwin-nat.c: Update.
2956         * fbsd-nat.c: Update.
2957         * gnu-nat.c: Update.
2958         * linux-fork.c: Update.
2959         * linux-nat.c: Update.
2960         * linux-thread-db.c: Update.
2961         * nat/linux-osdata.c: Update.
2962         * nat/linux-procfs.c: Update.
2963         * nto-procfs.c: Update.
2964         * obsd-nat.c: Update.
2965         * proc-service.c: Update.
2966         * procfs.c: Update.
2967         * ravenscar-thread.c: Update.
2968         * remote-sim.c: Update.
2969         * remote.c: Update.
2970         * sol-thread.c: Update.
2971         * target.c: Update.
2972         * windows-nat.c: Update.
2973
2974 2018-07-03  Tom Tromey  <tom@tromey.com>
2975
2976         * infrun.c (follow_exec): Use exit_inferior_silent.
2977         * inferior.c (exit_inferior_num_silent): Remove.
2978         * inferior.h (exit_inferior_num_silent): Don't declare.
2979
2980 2018-07-03  Tom Tromey  <tom@tromey.com>
2981
2982         PR cli/23340:
2983         * darwin-nat.c (darwin_attach_pid): Reset inferior and
2984         inferior_ptid on error.
2985
2986 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
2987             Simon Marchi  <simon.marchi@polymtl.ca>
2988
2989         PR tdep/8282
2990         * disasm.h (gdb_disassembler): Add
2991         `m_disassembler_options_holder'. member
2992         * disasm.c (get_all_disassembler_options): New function.
2993         (gdb_disassembler::gdb_disassembler): Use it.
2994         (gdb_buffered_insn_length_init_dis): Likewise.
2995         (gdb_buffered_insn_length): Adjust accordingly.
2996         (set_disassembler_options): Handle options with arguments.
2997         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2998         line if showing options with descriptions.
2999         (disassembler_options_completer): Adapt to using the
3000         `disasm_options_and_args_t' structure.
3001         * mips-tdep.c (mips_disassembler_options): New variable.
3002         (mips_disassembler_options_o32): Likewise.
3003         (mips_disassembler_options_n32): Likewise.
3004         (mips_disassembler_options_n64): Likewise.
3005         (gdb_print_insn_mips): Don't set `disassembler_options'.
3006         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3007         functions.
3008         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3009         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3010         `gdbarch_disassembler_options_implicit' and
3011         `gdbarch_valid_disassembler_options'.
3012         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3013         `disasm_options_and_args_t' structure.
3014         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3015         method.
3016         (valid_disassembler_options): Switch from `disasm_options_t' to
3017         the `disasm_options_and_args_t' structure.
3018         * NEWS: Document `set disassembler-options' support for the MIPS
3019         target.
3020         * gdbarch.h: Regenerate.
3021         * gdbarch.c: Regenerate.
3022
3023 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3024
3025         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3026
3027 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3028
3029         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3030         parameter in call to amd64_target_description.
3031         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3032         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3033         (amd64fbsd_init_abi): Likewise.
3034         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3035         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3036         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3037         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3038
3039 2018-06-29  Pedro Alves  <palves@redhat.com>
3040
3041         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3042         "segments" parameter.
3043         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3044         (_initialize_amd64_tdep): Update call to
3045         amd64_create_target_description.
3046         (amd64_target_description): Add "segments" parameter.  Adjust
3047         the implementation to use it.
3048         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3049         call to amd64_create_target_description.
3050         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3051         * gdb/arch/amd64.h (amd64_create_target_description): Add
3052         "segments" register.
3053         * gdb/arch/amd64.c (amd64_create_target_description): Add
3054         "segments" parameter.  Call create_feature_i386_64bit_segments
3055         only if SEGMENTS is true.
3056         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3057         call to amd64_create_target_description.
3058
3059 2018-06-29  Pedro Alves  <palves@redhat.com>
3060
3061         * thread.c (thread_target_id_str): New, factored out from ...
3062         (print_thread_info_1): ... here.  Use it to compute the max
3063         "Target Id" column width.
3064
3065 2018-06-29  Pedro Alves  <palves@redhat.com>
3066
3067         * remote.c (remote_target::extra_thread_info): Delete
3068         'display_buf' and 'n' locals.  from the cache, regardless of
3069         packet mechanims is in use.  Use cache for qThreadExtra and qP
3070         methods too.
3071
3072 2018-06-29  Pedro Alves  <palves@redhat.com>
3073
3074         * blockframe.c (find_pc_sect_containing_function): New function.
3075         * breakpoint.c (print_breakpoint_location): Don't call
3076         find_pc_sect_function.
3077         * linespec.c (create_sals_line_offset): Record the location's
3078         symbol in the sal.
3079         * linespec.c (convert_address_location_to_sals): Fill in sal's
3080         symbol with find_pc_sect_containing_function.
3081         * symtab.c (find_function_start_sal): Rename to ...
3082         (find_function_start_sal_1): ... this.
3083         (find_function_start_sal): Reimplement as wrapper around
3084         find_function_start_sal_1, and use
3085         find_pc_sect_containing_function to fill in the sal's symbol.
3086         (find_function_start_sal(symbol*, bool)): Adjust.
3087         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3088         comments.
3089         (find_pc_sect_containing_function): Declare.
3090
3091 2018-06-29  Pedro Alves  <palves@redhat.com>
3092
3093         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3094         true if the the location has no symbol.
3095
3096 2018-06-28  Tom Tromey  <tom@tromey.com>
3097
3098         * NEWS: Mention --enable-codesign.
3099         * silent-rules.mk (ECHO_SIGN): New variable.
3100         * configure.ac: Add --enable-codesign.
3101         * configure: Rebuild.
3102         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3103         (gdb$(EXEEXT)): Optionally invoke codesign.
3104
3105 2018-06-28  Pedro Alves  <palves@redhat.com>
3106
3107         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3108         comments.
3109         (switch_to_thread_no_regs): Adjust comment.
3110         * infcmd.c (stop_pc): Delete.
3111         (post_create_inferior, info_program_command): Replace references
3112         to stop_pc with references to thread_info->suspend.stop_pc.
3113         * inferior.h (stop_pc): Delete declaration.
3114         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3115         (handle_inferior_event_1, handle_signal_stop)
3116         (process_event_stop_test, keep_going_stepped_thread)
3117         (handle_step_into_function, handle_step_into_function_backward)
3118         (print_stop_location): Replace references to stop_pc with
3119         references to thread_info->suspend.stop_pc.
3120         (struct infcall_suspend_state) <stop_pc>: Delete field.
3121         (save_infcall_suspend_state, restore_infcall_suspend_state):
3122         Remove references to inf_stat->stop_pc.
3123         * linux-fork.c (fork_load_infrun_state): Likewise.
3124         * record-btrace.c (record_btrace_set_replay): Likewise.
3125         * record-full.c (record_full_goto_entry): Likewise.
3126         * remote.c (print_one_stopped_thread): Likewise.
3127         * target.c (target_resume): Extend comment.
3128         * thread.c (set_executing_thread): New.
3129         (set_executing): Use it.
3130         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3131         Remove references to stop_pc.
3132
3133 2018-06-28  Pedro Alves  <palves@redhat.com>
3134
3135         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3136         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3137
3138 2018-06-28  Tom Tromey  <tom@tromey.com>
3139
3140         * coffread.c (coff_symfile_finish): Update.
3141         * xcoffread.c (xcoff_symfile_finish): Update.
3142         * elfread.c (elf_symfile_finish): Update.
3143         * symfile.h (dwarf2_free_objfile): Don't declare.
3144         * dwarf2read.c (_initialize_dwarf2_read): Use
3145         register_objfile_data_with_cleanup.
3146         (dwarf2_free_objfile): Now static.  Change signature.
3147
3148 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3149
3150         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3151         option "-o" to add-symbol-file-load to add an offset to each
3152         section's load address.
3153         * symfile.c (set_objfile_default_section_offset): New function.
3154
3155 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3156
3157         * symfile.c (add_symbol_file_command): Make sure that sections
3158         with the same name are sorted in the same order.
3159
3160 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3161
3162         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3163         require the second argument.  If omitted, load sections at the
3164         addresses specified in the file.
3165
3166 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3167
3168         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3169         (_initialize_symfile): Add option "-o" to symbol-file to add an
3170         offset to each section of the symbol file.
3171
3172 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3173
3174         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3175
3176 2018-06-27  Tom Tromey  <tom@tromey.com>
3177
3178         * stack.c (_initialize_stack): Update "func" help text.
3179
3180 2018-06-27  Tom Tromey  <tom@tromey.com>
3181
3182         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3183         std::vector.
3184         (unwind_infopy_str, pyuw_create_unwind_info)
3185         (unwind_infopy_add_saved_register, pyuw_sniffer)
3186         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3187         Update.
3188         (struct saved_reg): Add constructor.
3189         <value>: Now a gdbpy_ref<>.
3190
3191 2018-06-27  Tom Tromey  <tom@tromey.com>
3192
3193         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3194
3195 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3196
3197         * gdb-gdb.py.in: Format using autopep8.
3198
3199 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3200
3201         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3202         (type_lookup_function): Recognize CORE_ADDR values.
3203
3204 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3205
3206         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3207         print tag_name.
3208
3209 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3210
3211         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3212         <__lt__>: Add.
3213
3214 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3215
3216         * gdb-gdb.py: Move to...
3217         * gdb-gdb.py.in: ... here.
3218         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3219         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3220         dependencies.
3221         (distclean): Remove gdb-gdb.py when cleaning.
3222         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3223         * configure: Re-generate.
3224
3225 2018-06-27  Pedro Alves  <palves@redhat.com>
3226
3227         * proc-service.c (get_ps_regcache): New.
3228         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3229         (ps_lsetfpregs): Use it.
3230
3231 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3232
3233         PR gdb/21695
3234         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3235         (dwarf_decode_lines_1): Adjust.
3236
3237 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3238
3239         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3240         override.
3241         <info_proc>: Likewise.
3242
3243 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3244
3245         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3246         to windows_fetch_one_register, and only handle the case of
3247         fetching one register.  Move the code that reloads the context
3248         and iterates over all registers if R is negative to...
3249         (windows_nat_target::fetch_registers): ... here.
3250         (do_windows_store_inferior_registers): Rename to
3251         windows_store_one_register, and only handle the case of storing
3252         one register.  Move the code that handles the case where r is
3253         negative to...
3254         (windows_nat_target::store_registers) ... here.
3255
3256 2018-06-26  Tom Tromey  <tom@tromey.com>
3257
3258         PR rust/22574:
3259         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3260         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3261         Update.
3262         (rust_internal_print_type): Add podata parameter.
3263         (rust_print_type): Update.
3264
3265 2018-06-26  Tom Tromey  <tom@tromey.com>
3266
3267         * typeprint.h (struct print_offset_data) <update, finish,
3268         maybe_print_hole>: New methods.
3269         <indentation>: New constant.
3270         * typeprint.c (print_offset_data::indentation): Define.
3271         (print_offset_data::maybe_print_hole, print_offset_data::update)
3272         (print_offset_data::finish): Move from c-typeprint.c and rename.
3273         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3274         (print_spaces_filtered_with_print_options): Update.
3275         (c_print_type_union_field_offset, maybe_print_hole)
3276         (c_print_type_struct_field_offset): Move to typeprint.c and
3277         rename.
3278         (c_type_print_base_struct_union): Update.
3279
3280 2018-06-25  Pedro Alves  <palves@redhat.com>
3281
3282         * gdbthread.h (thread_info_ref, delete_thread)
3283         (delete_thread_silent, first_thread_of_inferior)
3284         (any_thread_of_inferior, switch_to_thread)
3285         (enable_thread_stack_temporaries)
3286         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3287         (get_last_thread_stack_temporary)
3288         (value_in_thread_stack_temporaries, can_access_registers_thread):
3289         Spell out "struct thread_info" instead of just "thread_info".
3290         * inferior.h (notice_new_inferior): Likewise.
3291
3292 2018-06-25  Pedro Alves  <palves@redhat.com>
3293
3294         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3295         pass thread_info pointer to delete_thread.
3296         (windows_nat_target::detach): Pass inferior pointer to
3297         detach_inferior.
3298         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3299         delete_thread.
3300         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3301         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3302         and pass a thread_info pointer to delete_thread.
3303         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3304         pass thread_info pointer to delete_thread.
3305         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3306         delete_thread_silent call.
3307         * procfs.c (procfs_target::detach): Pass inferior pointer to
3308         detach_inferior.
3309         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3310         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3311         delete_thread_silent call.
3312         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3313         pass thread_info pointer to delete_thread.
3314         (windows_nat_target::detach): Pass inferior pointer to
3315         delete_inferior.
3316
3317 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3318
3319         * regcache.c (readable_regcache::read_part): Fix asserts.
3320         (reg_buffer::raw_collect_part): New function.
3321         (regcache::write_part): Fix asserts.
3322         (reg_buffer::raw_supply_part): New function.
3323         (regcache::transfer_regset_register): New helper function.
3324         (regcache::transfer_regset): Call new functions.
3325         (regcache_supply_regset): Use gdb_byte*.
3326         (regcache::supply_regset): Likewise.
3327         (regcache_collect_regset): Likewise.
3328         (regcache::collect_regset): Likewise.
3329         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3330         (reg_buffer::raw_supply_part): Likewise.
3331         (regcache::transfer_regset_register): Likewise.
3332         (regcache::transfer_regset): Use gdb_byte*.
3333
3334 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3335
3336         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3337
3338 2018-06-21  Pedro Alves  <palves@redhat.com>
3339
3340         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3341         instead of a ptid_t.  All callers adjusted.
3342         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3343         adjusted.
3344         (print_ada_task_info, display_current_task_id, task_command_1):
3345         Adjust.
3346         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3347         inferior_thread.
3348         (breakpoint_kind): Adjust.
3349         (remove_breakpoints_pid): Rename to ...
3350         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3351         pointer.  All callers adjusted.
3352         (bpstat_clear_actions): Use inferior_thread.
3353         (get_bpstat_thread): New.
3354         (bpstat_do_actions): Use it.
3355         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3356         to take a thread_info pointer.  All callers adjusted.
3357         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3358         (breakpoint_re_set_thread): Use inferior_thread.
3359         * breakpoint.h (struct inferior): Forward declare.
3360         (bpstat_stop_status): Update.
3361         (remove_breakpoints_pid): Delete.
3362         (remove_breakpoints_inf): New.
3363         * bsd-uthread.c (bsd_uthread_target::wait)
3364         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3365         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3366         (maint_btrace_packet_history_cmd)
3367         (maint_btrace_clear_packet_history_cmd): Adjust.
3368         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3369         inferior_thread.
3370         * cli/cli-interp.c: Include "inferior.h".
3371         * common/refcounted-object.h (struct
3372         refcounted_object_ref_policy): New.
3373         * compile/compile-object-load.c: Include gdbthread.h.
3374         (store_regs): Use inferior_thread.
3375         * corelow.c (core_target::close): Use current_inferior.
3376         (core_target_open): Adjust to use first_thread_of_inferior and use
3377         the current inferior.
3378         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3379         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3380         <thread>: ... this new field.  All references adjusted.
3381         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3382         Take a thread_info pointer instead of a ptid_t.
3383         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3384         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3385         thread_info pointer instead of a ptid_t.
3386         * elfread.c: Include "inferior.h".
3387         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3388         Use inferior_thread.
3389         * eval.c (evaluate_subexp): Likewise.
3390         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3391         inferior_thread.
3392         * gdb_proc_service.h (struct thread_info): Forward declare.
3393         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3394         <thread>: ... this new field.  All references adjusted.
3395         * gdbarch.h, gdbarch.c: Regenerate.
3396         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3397         'thread' parameter.  All implementations and callers adjusted.
3398         * gdbthread.h (thread_info) <set_running>: New method.
3399         (delete_thread, delete_thread_silent): Take a thread_info pointer
3400         instead of a ptid.
3401         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3402         (first_thread_of_process): Delete, replaced by ...
3403         (first_thread_of_inferior): ... this new function.  All callers
3404         adjusted.
3405         (any_live_thread_of_process): Delete, replaced by ...
3406         (any_live_thread_of_inferior): ... this new function.  All callers
3407         adjusted.
3408         (switch_to_thread, switch_to_no_thread): Declare.
3409         (is_executing): Delete.
3410         (enable_thread_stack_temporaries): Update comment.
3411         <enable_thread_stack_temporaries>: Take a thread_info pointer
3412         instead of a ptid_t.  Incref the thread.
3413         <~enable_thread_stack_temporaries>: Decref the thread.
3414         <m_ptid>: Delete
3415         <m_thr>: New.
3416         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3417         (get_last_thread_stack_temporary)
3418         (value_in_thread_stack_temporaries, can_access_registers_thread):
3419         Take a thread_info pointer instead of a ptid_t.  All callers
3420         adjusted.
3421         * infcall.c (get_call_return_value): Use inferior_thread.
3422         (run_inferior_call): Work with thread pointers instead of ptid_t.
3423         (call_function_by_hand_dummy): Work with thread pointers instead
3424         of ptid_t.  Use thread_info_ref.
3425         * infcmd.c (proceed_thread_callback): Access thread's state
3426         directly.
3427         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3428         access thread's state directly.
3429         (continue_command): Use inferior_thread.
3430         (info_program_command): Use find_thread_ptid and access thread
3431         state directly.
3432         (proceed_after_attach_callback): Use thread state directly.
3433         (notice_new_inferior): Take a thread_info pointer instead of a
3434         ptid_t.  All callers adjusted.
3435         (exit_inferior): Take an inferior pointer instead of a pid.  All
3436         callers adjusted.
3437         (exit_inferior_silent): New.
3438         (detach_inferior): Delete.
3439         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3440         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3441         (detach_inferior_command, kill_inferior_command): Use
3442         find_inferior_id instead of valid_gdb_inferior_id and
3443         gdb_inferior_id_to_pid.
3444         (inferior_command): Use inferior and thread pointers.
3445         * inferior.h (struct thread_info): Forward declare.
3446         (notice_new_inferior): Take a thread_info pointer instead of a
3447         ptid_t.  All callers adjusted.
3448         (detach_inferior): Delete declaration.
3449         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3450         instead of a pid.  All callers adjusted.
3451         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3452         (valid_gdb_inferior_id): Delete.
3453         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3454         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3455         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3456         ...
3457         <inf>: ... this new field.
3458         <step_ptid>: Delete, replaced by ...
3459         <step_thread>: ... this new field.
3460         (get_displaced_stepping_state): Take an inferior pointer instead
3461         of a pid.  All callers adjusted.
3462         (displaced_step_in_progress_any_inferior): Adjust.
3463         (displaced_step_in_progress_thread): Take a thread pointer instead
3464         of a ptid_t.  All callers adjusted.
3465         (displaced_step_in_progress, add_displaced_stepping_state): Take
3466         an inferior pointer instead of a pid.  All callers adjusted.
3467         (get_displaced_step_closure_by_addr): Adjust.
3468         (remove_displaced_stepping_state): Take an inferior pointer
3469         instead of a pid.  All callers adjusted.
3470         (displaced_step_prepare_throw, displaced_step_prepare)
3471         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3472         All callers adjusted.
3473         (start_step_over): Adjust.
3474         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3475         displaced step queue.
3476         (do_target_resume): Adjust.
3477         (fetch_inferior_event): Use inferior_thread.
3478         (context_switch, get_inferior_stop_soon): Take an
3479         execution_control_state pointer instead of a ptid_t.  All callers
3480         adjusted.
3481         (switch_to_thread_cleanup): Delete.
3482         (stop_all_threads): Use scoped_restore_current_thread.
3483         * inline-frame.c: Include "gdbthread.h".
3484         (inline_state) <inline_state>: Take a thread pointer instead of a
3485         ptid_t.  All callers adjusted.
3486         <ptid>: Delete, replaced by ...
3487         <thread>: ... this new field.
3488         (find_inline_frame_state): Take a thread pointer instead of a
3489         ptid_t.  All callers adjusted.
3490         (skip_inline_frames, step_into_inline_frame)
3491         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3492         pointer instead of a ptid_t.  All callers adjusted.
3493         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3494         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3495         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3496         pointers directly.
3497         * linux-nat.c (get_detach_signal): Likewise.
3498         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3499         (thread_db_notice_clone): Adjust.
3500         (thread_db_find_new_threads_silently)
3501         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3502         a thread pointer instead of a ptid_t.  All callers adjusted.
3503         * mi/mi-cmd-var.c: Include "inferior.h".
3504         (mi_cmd_var_update_iter): Update to use thread pointers.
3505         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3506         inferior directly.
3507         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3508         out to ...
3509         (mi_output_running): ... this new function.
3510         (mi_on_resume_1): Adjust to use it.
3511         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3512         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3513         directly.
3514         (interrupt_thread_callback): : Adjust to use thread and inferior
3515         pointers.
3516         * proc-service.c: Include "gdbthread.h".
3517         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3518         * progspace-and-thread.c: Include "inferior.h".
3519         * progspace.c: Include "inferior.h".
3520         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3521         hold a reference to an inferior_object.
3522         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3523         inferior_thread.
3524         * python/py-inferior.c (struct inferior_object): Give the type a
3525         tag name instead of a typedef.
3526         (python_on_normal_stop): No need to check if the current thread is
3527         listed.
3528         (inferior_to_inferior_object): Change return type to
3529         inferior_object.  All callers adjusted.
3530         (find_thread_object): Delete, bits factored out to ...
3531         (thread_to_thread_object): ... this new function.
3532         * python/py-infthread.c (create_thread_object): Use
3533         inferior_to_inferior_object.
3534         (thpy_is_stopped): Use thread pointer directly.
3535         (gdbpy_selected_thread): Use inferior_thread.
3536         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3537         field, replaced with ...
3538         <thread>: ... this new field.  All users adjusted.
3539         (btpy_insn_or_gap_new): Drop const.
3540         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3541         callers adjusted.
3542         * python/py-record.c: Include "gdbthread.h".
3543         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3544         a ptid_t.  All callers adjusted.
3545         (gdbpy_current_recording): Use inferior_thread.
3546         * python/py-record.h (recpy_record_object) <ptid>: Delete
3547         field, replaced with ...
3548         <thread>: ... this new field.  All users adjusted.
3549         (recpy_element_object) <ptid>: Delete
3550         field, replaced with ...
3551         <thread>: ... this new field.  All users adjusted.
3552         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3553         a ptid_t.  All callers adjusted.
3554         * python/py-threadevent.c: Include "gdbthread.h".
3555         (get_event_thread): Use thread_to_thread_object.
3556         * python/python-internal.h (struct inferior_object): Forward
3557         declare.
3558         (find_thread_object, find_inferior_object): Delete declarations.
3559         (thread_to_thread_object, inferior_to_inferior_object): New
3560         declarations.
3561         * record-btrace.c: Include "inferior.h".
3562         (require_btrace_thread): Use inferior_thread.
3563         (record_btrace_frame_sniffer)
3564         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3565         (get_thread_current_frame): Use scoped_restore_current_thread and
3566         switch_to_thread.
3567         (get_thread_current_frame): Use thread pointer directly.
3568         (record_btrace_replay_at_breakpoint): Use thread's inferior
3569         pointer directly.
3570         * record-full.c: Include "inferior.h".
3571         * regcache.c: Include "gdbthread.h".
3572         (get_thread_arch_regcache): Use the inferior's address space
3573         directly.
3574         (get_thread_regcache, registers_changed_thread): New.
3575         * regcache.h (get_thread_regcache(thread_info *thread)): New
3576         overload.
3577         (registers_changed_thread): New.
3578         (remote_target) <remote_detach_1>: Swap order of parameters.
3579         (remote_add_thread): <remote_add_thread>: Return the new thread.
3580         (get_remote_thread_info(ptid_t)): New overload.
3581         (remote_target::remote_notice_new_inferior): Use thread pointers
3582         directly.
3583         (remote_target::process_initial_stop_replies): Use
3584         thread_info::set_running.
3585         (remote_target::remote_detach_1, remote_target::detach)
3586         (extended_remote_target::detach): Adjust.
3587         * stack.c (frame_show_address): Use inferior_thread.
3588         * target-debug.h (target_debug_print_thread_info_pp): New.
3589         * target-delegates.c: Regenerate.
3590         * target.c (default_thread_address_space): Delete.
3591         (memory_xfer_partial_1): Use current_inferior.
3592         (target_detach): Use current_inferior.
3593         (target_thread_address_space): Delete.
3594         (generic_mourn_inferior): Use current_inferior.
3595         * target.h (struct target_ops) <thread_address_space>: Delete.
3596         (target_thread_address_space): Delete.
3597         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3598         pointers directly.
3599         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3600         thread pointer instead of a ptid_t.  Adjust all callers.
3601         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3602         (first_thread_of_process): Delete, replaced by ...
3603         (first_thread_of_inferior): ... this new function.  All callers
3604         adjusted.
3605         (any_thread_of_process): Rename to ...
3606         (any_thread_of_inferior): ... this, and take an inferior pointer.
3607         (any_live_thread_of_process): Rename to ...
3608         (any_live_thread_of_inferior): ... this, and take an inferior
3609         pointer.
3610         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3611         (value_in_thread_stack_temporaries)
3612         (get_last_thread_stack_temporary): Take a thread pointer instead
3613         of a ptid_t.  Adjust all callers.
3614         (thread_info::set_running): New.
3615         (validate_registers_access): Use inferior_thread.
3616         (can_access_registers_ptid): Rename to ...
3617         (can_access_registers_thread): ... this, and take a thread
3618         pointer.
3619         (print_thread_info_1): Adjust to compare thread pointers instead
3620         of ptids.
3621         (switch_to_no_thread, switch_to_thread): Make extern.
3622         (scoped_restore_current_thread::~scoped_restore_current_thread):
3623         Use m_thread pointer directly.
3624         (scoped_restore_current_thread::scoped_restore_current_thread):
3625         Use inferior_thread.
3626         (thread_command): Use thread pointer directly.
3627         (thread_num_make_value_helper): Use inferior_thread.
3628         * top.c (execute_command): Use inferior_thread.
3629         * tui/tui-interp.c: Include "inferior.h".
3630         * varobj.c (varobj_create): Use inferior_thread.
3631         (value_of_root_1): Use find_thread_global_id instead of
3632         global_thread_id_to_ptid.
3633
3634 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3635
3636         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3637         possible.
3638         (regcache::write_part): Likewise.
3639         (readable_regcache::cooked_read_part): Update comment.
3640         (readable_regcache::cooked_write_part): Likewise.
3641         * regcache.h: (readable_regcache::read_part): Likewise.
3642         (regcache::write_part): Likewise.
3643
3644 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3645             Dirk Schubert  <dirk.schubert@arm.com>
3646
3647         * aarch64-linux-nat.c (post_attach): New.
3648         (aarch64_linux_nat_target::post_attach): Override post_attach to
3649         record the number of hardware debug registers.
3650
3651 2018-06-20  Tom Tromey  <tom@tromey.com>
3652
3653         * python/py-param.c (add_setshow_generic): Make parameters const.
3654         (parmpy_init): Update.
3655
3656 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3657
3658         * regcache.h (regcache_cooked_read_ftype): Rename to...
3659         (register_read_ftype): ...this, change type to function_view.
3660         (class reg_buffer) <save>: Remove src parameter.
3661         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3662         parameter non-const in first overload.  Remove src parameter in
3663         second overload.
3664         * regcache.c (do_cooked_read): Remove.
3665         (readonly_detached_regcache::readonly_detached_regcache): Make
3666         parameter non-const, adjust call to other constructor.
3667         (reg_buffer::save): Remove src parameter.
3668         * frame.c (do_frame_register_read): Remove.
3669         (frame_save_as_regcache): Use lambda function.
3670         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3671         parameter to ppu2spu_data *.
3672         (ppu2spu_sniffer): Use lambda function.
3673
3674 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3675
3676         * record-full.c (record_full_target::insert_breakpoint): Remove
3677         "struct" keyword, add const.
3678
3679 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3680
3681         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3682         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3683         * configure.ac: Remove AC_PREREQ, add missing quoting.
3684         * gnulib/configure.ac: Modernize usage of
3685         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3686         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3687         (AUTOMAKE_VERSION): Bump to 1.15.1.
3688         * configure: Re-generate.
3689         * config.in: Re-generate.
3690         * aclocal.m4: Re-generate.
3691         * gnulib/aclocal.m4: Re-generate.
3692         * gnulib/config.in: Re-generate.
3693         * gnulib/configure: Re-generate.
3694         * gnulib/import/Makefile.in: Re-generate.
3695
3696 2018-06-19  Pedro Alves  <palves@redhat.com>
3697
3698         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3699         (lookup_minimal_symbol_by_pc_section): ... here with
3700         gdb_assert_not_reached added.
3701
3702 2018-06-19  Pedro Alves  <palves@redhat.com>
3703
3704         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3705         parameter with a block parameter.  Compare location's block symbol
3706         with the frame's block instead of addresses.
3707         (skip_inline_frames): Pass the current block instead of the
3708         frame's address.  Break out as soon as we determine the frame
3709         should not be skipped.
3710
3711 2018-06-18  Tom Tromey  <tom@tromey.com>
3712
3713         * solib-aix.c (solib_aix_get_section_offsets): Return
3714         unique_xmalloc_ptr.
3715         (solib_aix_solib_create_inferior_hook): Update.
3716
3717 2018-06-18  Tom Tromey  <tom@tromey.com>
3718
3719         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3720
3721 2018-06-18  Tom Tromey  <tom@tromey.com>
3722
3723         * solib-frv.c (frv_relocate_main_executable): Use
3724         unique_xmalloc_ptr.
3725         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3726         unique_xmalloc_ptr.
3727
3728 2018-06-18  Tom Tromey  <tom@tromey.com>
3729
3730         * objfiles.h (inhibit_section_map_updates): Update.
3731         (resume_section_map_updates, resume_section_map_updates_cleanup):
3732         Remove.
3733         * solib-svr4.c (svr4_handle_solib_event): Update.
3734         * objfiles.c (inhibit_section_map_updates): Return
3735         scoped_restore_tmpl<int>.
3736         (resume_section_map_updates, resume_section_map_updates_cleanup):
3737         Remove.
3738
3739 2018-06-18  Tom Tromey  <tom@tromey.com>
3740
3741         * valprint.h (read_string): Update.
3742         * valprint.c (read_string): Change type of "buffer".
3743         (val_print_string): Update.
3744         * python/py-value.c (valpy_string): Update.
3745         * language.h (struct language_defn) <la_get_string>: Change
3746         type of "buffer".
3747         (default_get_string, c_get_string): Update.
3748         * language.c (default_get_string): Change type of "buffer".
3749         * guile/scm-value.c (gdbscm_value_to_string): Update.
3750         * c-lang.c (c_get_string): Change type of "buffer".
3751
3752 2018-06-18  Tom Tromey  <tom@tromey.com>
3753
3754         * ser-mingw.c (struct pipe_state_destroyer): New.
3755         (pipe_state_up): New typedef.
3756         (cleanup_pipe_state): Remove.
3757         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3758
3759 2018-06-18  Tom Tromey  <tom@tromey.com>
3760
3761         * rust-lang.h (rust_yyerror): Don't declare.
3762         * rust-lang.c (rust_language_defn): Update.
3763         * rust-exp.y (yyerror): Now static.
3764         * parse.c (parse_exp_in_context_1): Update.
3765         * p-lang.h (p_yyerror): Don't declare.
3766         * p-lang.c (p_language_defn): Update.
3767         * p-exp.y (yyerror): Now static.
3768         * opencl-lang.c (opencl_language_defn): Update.
3769         * objc-lang.c (objc_language_defn): Update.
3770         * m2-lang.h (m2_yyerror): Don't declare.
3771         * m2-lang.c (m2_language_defn): Update.
3772         * m2-exp.y (yyerror): Now static.
3773         * language.h (struct language_defn) <la_error>: Remove.
3774         * language.c (unk_lang_error): Remove.
3775         (unknown_language_defn, auto_language_defn): Remove.
3776         * go-lang.h (go_yyerror): Don't declare.
3777         * go-lang.c (go_language_defn): Update.
3778         * go-exp.y (yyerror): Now static.
3779         * f-lang.h (f_yyerror): Don't declare.
3780         * f-lang.c (f_language_defn): Update.
3781         * f-exp.y (yyerror): Now static.
3782         * d-lang.h (d_yyerror): Don't declare.
3783         * d-lang.c (d_language_defn): Update.
3784         * d-exp.y (yyerror): Now static.
3785         * c-lang.h (c_yyerror): Don't declare.
3786         * c-lang.c (c_language_defn, cplus_language_defn)
3787         (asm_language_defn, minimal_language_defn): Update.
3788         * c-exp.y (yyerror): Now static.
3789         * ada-lang.h (ada_yyerror): Don't declare.
3790         * ada-lang.c (ada_language_defn): Update.
3791         * ada-exp.y (yyerror): Now static.
3792
3793 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3794
3795         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3796         (store_sveregs_to_thread): Likewise.
3797         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3798         (aarch64_linux_store_inferior_registers): Likewise.
3799         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3800         function.
3801         (aarch64_sve_regs_copy_to_regcache): Likewise.
3802         (aarch64_sve_regs_copy_from_regcache): Likewise.
3803         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3804         declaration.
3805         (aarch64_sve_regs_copy_to_regcache): Likewise.
3806         (aarch64_sve_regs_copy_from_regcache): Likewise.
3807         (sve_context): Structure from Linux headers.
3808         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3809         (SVE_SIG_ZREG_SIZE): Likewise.
3810         (SVE_SIG_PREG_SIZE): Likewise.
3811         (SVE_SIG_FFR_SIZE): Likewise.
3812         (SVE_SIG_REGS_OFFSET): Likewise.
3813         (SVE_SIG_ZREGS_OFFSET): Likewise.
3814         (SVE_SIG_ZREG_OFFSET): Likewise.
3815         (SVE_SIG_ZREGS_SIZE): Likewise.
3816         (SVE_SIG_PREGS_OFFSET): Likewise.
3817         (SVE_SIG_PREG_OFFSET): Likewise.
3818         (SVE_SIG_PREGS_SIZE): Likewise.
3819         (SVE_SIG_FFR_OFFSET): Likewise.
3820         (SVE_SIG_REGS_SIZE): Likewise.
3821         (SVE_SIG_CONTEXT_SIZE): Likewise.
3822         (SVE_PT_REGS_MASK): Likewise.
3823         (SVE_PT_REGS_FPSIMD): Likewise.
3824         (SVE_PT_REGS_SVE): Likewise.
3825         (SVE_PT_VL_INHERIT): Likewise.
3826         (SVE_PT_VL_ONEXEC): Likewise.
3827         (SVE_PT_REGS_OFFSET): Likewise.
3828         (SVE_PT_FPSIMD_OFFSET): Likewise.
3829         (SVE_PT_FPSIMD_SIZE): Likewise.
3830         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3831         (SVE_PT_SVE_PREG_SIZE): Likewise.
3832         (SVE_PT_SVE_FFR_SIZE): Likewise.
3833         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3834         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3835         (__SVE_SIG_TO_PT): Likewise.
3836         (SVE_PT_SVE_OFFSET): Likewise.
3837         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3838         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3839         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3840         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3841         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3842         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3843         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3844         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3845         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3846         (SVE_PT_SVE_SIZE): Likewise.
3847         (SVE_PT_SIZE): Likewise.
3848         (HAS_SVE_STATE): New define.
3849
3850 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3851
3852         * nat/aarch64-sve-linux-sigcontext.h: New file.
3853         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3854         new files.
3855         (SVE_VQ_MIN): Likewise.
3856         (SVE_VQ_MAX): Likewise.
3857         (SVE_VL_MIN): Likewise.
3858         (SVE_VL_MAX): Likewise.
3859         (SVE_NUM_ZREGS): Likewise.
3860         (SVE_NUM_PREGS): Likewise.
3861         (sve_vl_valid): Likewise.
3862         (struct user_sve_header): Likewise.
3863
3864 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
3865             Richard Bunt <Richard.Bunt@arm.com>
3866
3867         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3868         was requested by GDB.
3869
3870 2018-06-15  Tom de Vries  <tdevries@suse.de>
3871
3872         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3873
3874 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
3875
3876         * gnulib/update-gnulib.sh: Print expected versions of
3877         autoconf/aclocal.
3878
3879 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
3880
3881         * arch-utils.c (default_type_align): Use type_length_units.
3882         * gdbtypes.c (type_align): Use type_length_units.
3883
3884 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3885
3886         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3887         of 'define' command.
3888
3889 2018-06-14  Tom de Vries  <tdevries@suse.de>
3890
3891         PR cli/22573
3892         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3893         get_no_prettyformat_print_options.
3894
3895 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3896
3897         * sparc-nat.h: Include target.h.
3898         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3899         <fetch_registers>: Remove this argument in function call.
3900         <store_registers>: Remove this argument in function call, remove
3901         extra semicolon.
3902         <low_forget_process>: Call sparc64_forget_process instead of
3903         sparc_forget_process.
3904
3905 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3906
3907         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3908         (procfs_target::make_corefile_notes): Adjust to new
3909         target_read_alloc return type.
3910
3911 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3912             Stephen Roberts  <stephen.roberts@arm.com>
3913
3914         PR gdb/22882
3915         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3916         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3917         Move should_notify_stop local into more inner scope.
3918
3919 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3920             Stephen Roberts  <stephen.roberts@arm.com>
3921
3922         PR gdb/22882
3923         * infrun.c (resume_1): Add call to mark_async_event_handler.
3924
3925 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3926
3927         * infrun.c (do_target_wait): Change old version of $pc printed.
3928
3929 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3930
3931         * dwarf2read.c (read_index_from_section): Rename to...
3932         (read_gdb_index_from_section): ... this, update all callers.
3933         (dwarf2_read_index): Rename to...
3934         (dwarf2_read_gdb_index): ... this, update all callers.
3935
3936 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
3937
3938         * gdb/hppa-linux-nat.c
3939         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3940         hppa_linux_nat_target::fetch_registers.
3941
3942 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3943
3944         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3945         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3946         (AARCH64_DWARF_SVE_FFR): Likewise.
3947         (AARCH64_DWARF_SVE_P0): Likewise.
3948         (AARCH64_DWARF_SVE_Z0): Likewise.
3949
3950 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3951
3952         * common/common-regcache.h (raw_compare): New function.
3953         * regcache.c (regcache::raw_compare): Likewise.
3954         * regcache.h (regcache::raw_compare): New declaration.
3955
3956 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3957
3958         * common/common-regcache.h (reg_buffer_common): New structure.
3959         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3960         (reg_buffer::raw_supply): Likewise.
3961         (reg_buffer::raw_supply_integer): Likewise.
3962         (reg_buffer::raw_supply_zeroed): Likewise.
3963         (reg_buffer::raw_collect): Likewise.
3964         (reg_buffer::raw_collect_integer): Likewise.
3965         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3966         (reg_buffer::raw_supply): Likewise.
3967         (reg_buffer::raw_supply_integer): Likewise.
3968         (reg_buffer::raw_supply_zeroed): Likewise.
3969         (reg_buffer::raw_collect): Likewise.
3970         (reg_buffer::raw_collect_integer): Likewise.
3971
3972 2018-06-10  Tom Tromey  <tom@tromey.com>
3973
3974         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
3975         (class remote_state) <stop_reply_queue>: Now std::vector.
3976         (remote_state::~remote_state)
3977         (remote_target::stop_reply_queue_length): Update.
3978         (struct queue_iter_param, remove_child_of_pending_fork)
3979         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3980         (check_pending_event_prevents_wildcard_vcont_callback)
3981         (remove_stop_reply_for_inferior)
3982         (remove_stop_reply_of_remote_state)
3983         (remote_notif_remove_once_on_match)
3984         (stop_reply_match_ptid_and_ws)
3985         (remote_kill_child_of_pending_fork): Remove.
3986         (remote_target::remove_new_fork_children)
3987         (remote_target::check_pending_events_prevent_wildcard_vcont)
3988         (remote_target::discard_pending_stop_replies)
3989         (remote_target::discard_pending_stop_replies_in_queue)
3990         (remote_target::remote_notif_remove_queued_reply)
3991         (remote_target::queued_stop_reply)
3992         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3993         (remote_target::wait, remote_target::kill_new_fork_children)
3994         (remote_target::async): Update.
3995
3996 2018-06-10  Tom Tromey  <tom@tromey.com>
3997
3998         * record-full.c (record_full_arch_list_cleanups): Remove.
3999         (record_full_message): Use try/catch.
4000         (record_full_wait_cleanups): Remove.
4001         (record_full_wait_1): Use try/catch.
4002         (record_full_restore): Likewise.
4003
4004 2018-06-10  Tom Tromey  <tom@tromey.com>
4005
4006         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4007         declare VEC.  Add constructor.
4008         <in_target_beneath>: Now bool.
4009         (record_full_breakpoints): Now a std::vector, static.
4010         (record_full_sync_record_breakpoints)
4011         (record_full_init_record_breakpoints)
4012         (record_full_target::insert_breakpoint)
4013         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4014
4015 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4016
4017         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4018         * serial.c (serial_interface_lookup): Remove struct keyword.
4019
4020 2018-06-10  Tom Tromey  <tom@tromey.com>
4021
4022         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4023         method.
4024         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4025         a method.
4026         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4027         method.
4028         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4029         "beneath" as a method.
4030         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4031         Use "beneath" as a method.
4032
4033 2018-06-10  Tom Tromey  <tom@tromey.com>
4034
4035         * tracefile.c (struct trace_file_writer_deleter): New.
4036         <operator()>: Rename from trace_file_writer_xfree.
4037         (trace_file_writer_up): New typedef.
4038         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4039
4040 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4041
4042         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4043         <m_registers, m_register_status>: Change type to
4044         std::unique_ptr.
4045         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4046         XCNEWVEC.
4047
4048 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4049
4050         * common/common-regcache.h (enum register_status): Add
4051         underlying type "signed char".
4052         * regcache.h (reg_buffer) <m_register_status>: Change type to
4053         register_status *.
4054         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4055         register_status instead of signed char.
4056         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4057         (reg_buffer::get_register_status): Remove cast.
4058         (readable_regcache::raw_read): Remove cast.
4059         (readable_regcache::cooked_read): Remove cast.
4060
4061 2018-06-09  Tom Tromey  <tom@tromey.com>
4062
4063         * source.c (reverse_search_command, forward_search_command): Use
4064         scoped_fd.
4065
4066 2018-06-09  Tom Tromey  <tom@tromey.com>
4067
4068         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4069         (serial_ops_list): Now static, std::vector.
4070         (serial_interface_lookup, serial_add_interface): Update.
4071
4072 2018-06-09  Tom Tromey  <tom@tromey.com>
4073
4074         * dwarf2read.c (process_cu_includes): Update.
4075         (process_full_comp_unit): Update.
4076         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4077         std::vector.
4078
4079 2018-06-08  Paul Koning  <paul_koning@dell.com>
4080
4081         PR gdb/23252
4082
4083         * python/python.c (do_start_initialization):
4084         Avoid call to internal Python API.
4085         (init__gdb_module): New function.
4086
4087 2018-06-08  Gary Benson <gbenson@redhat.com>
4088
4089         * linux-thread-db.c (valprint.h): New include.
4090         (struct check_thread_db_info): New structure.
4091         (check_thread_db_on_load, tdb_testinfo): New static globals.
4092         (check_thread_db, check_thread_db_callback): New functions.
4093         (try_thread_db_load_1): Run integrity checks if requested.
4094         (maintenance_check_libthread_db): New function.
4095         (_initialize_thread_db): Register "maint check libthread-db"
4096         and "maint set/show check-libthread-db".
4097         * NEWS: Mention the above new commands.
4098
4099 2018-06-08  Tom Tromey  <tom@tromey.com>
4100
4101         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4102         now a method.
4103
4104 2018-06-08  Tom Tromey  <tom@tromey.com>
4105
4106         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4107
4108 2018-06-08  Tom Tromey  <tom@tromey.com>
4109
4110         * common/btrace-common.h (struct btrace_data): Add constructor,
4111         destructor, move assignment operator.
4112         <empty, clear, fini>: New methods.
4113         <format>: Initialize.
4114         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4115         (btrace_data_empty): Don't declare.
4116         * common/btrace-common.c (btrace_data_init): Remove.
4117         (btrace_data::fini): Rename from btrace_data_fini.
4118         (btrace_data::empty): Rename from btrace_data_empty.
4119         (btrace_data::clear): Rename from btrace_data_clear.  Return
4120         bool.
4121         * btrace.h (make_cleanup_btrace_data): Don't declare.
4122         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4123         (parse_xml_btrace): Update.
4124         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4125         (maint_btrace_clear_packet_history_cmd): Update.
4126
4127 2018-06-07  Pedro Alves  <palves@redhat.com>
4128
4129         * target.h (target_ops) <beneath>: Now a method.  All references
4130         updated.
4131         (class target_stack): New.
4132         * target.c (g_target_stack): New.
4133         (g_current_top_target): Delete.
4134         (current_top_target): Get the top target out of g_target_stack.
4135         (target_stack::push, target_stack::unpush): New.
4136         (push_target, unpush_target): Reimplement.
4137         (target_is_pushed): Reimplement in terms of g_target_stack.
4138         (target_ops::beneath, target_stack::find_beneath): New.
4139
4140 2018-06-07  Pedro Alves  <palves@redhat.com>
4141
4142         * target.h (find_target_beneath): Delete declaration.
4143         * target.c (find_target_beneath): Delete definition.
4144         * aix-thread.c: All callers of find_target_beneath adjusted to
4145         call target_ops::beneath instead.
4146         * bsd-uthread.c: Likewise.
4147         * linux-thread-db.c: Likewise.
4148         * ravenscar-thread.c: Likewise.
4149         * sol-thread.c: Likewise.
4150         * spu-multiarch.c: Likewise.
4151
4152 2018-06-07  Pedro Alves  <palves@redhat.com>
4153
4154         * target.h (target_ops) <beneath>: Now a method.  All references
4155         updated.
4156         (target_ops) <m_beneath>: New.
4157         * target.c (target_ops::beneath): New.
4158         * corelow.c: Adjust all references to target_ops::beneath.
4159         * linux-thread-db.c: Likewise.
4160         * make-target-delegates: Likewise.
4161         * record-btrace.c: Likewise.
4162         * record-full.c: Likewise.
4163         * remote.c: Likewise.
4164         * target.c: Likewise.
4165         * target-delegates.c: Regenerate.
4166
4167 2018-06-07  Pedro Alves  <palves@redhat.com>
4168
4169         * target.h (target_stack): Delete.
4170         (current_top_target): Declare function.
4171         * target.c (target_stack): Delete.
4172         (g_current_top_target): New.
4173         (current_top_target): New function.
4174         * auxv.c: Use current_top_target instead of target_stack
4175         throughout.
4176         * avr-tdep.c: Likewise.
4177         * breakpoint.c: Likewise.
4178         * corefile.c: Likewise.
4179         * elfread.c: Likewise.
4180         * eval.c: Likewise.
4181         * exceptions.c: Likewise.
4182         * frame.c: Likewise.
4183         * gdbarch-selftests.c: Likewise.
4184         * gnu-v3-abi.c: Likewise.
4185         * ia64-tdep.c: Likewise.
4186         * ia64-vms-tdep.c: Likewise.
4187         * infcall.c: Likewise.
4188         * infcmd.c: Likewise.
4189         * infrun.c: Likewise.
4190         * linespec.c: Likewise.
4191         * linux-tdep.c: Likewise.
4192         * minsyms.c: Likewise.
4193         * ppc-linux-nat.c: Likewise.
4194         * ppc-linux-tdep.c: Likewise.
4195         * procfs.c: Likewise.
4196         * regcache.c: Likewise.
4197         * remote.c: Likewise.
4198         * rs6000-tdep.c: Likewise.
4199         * s390-linux-nat.c: Likewise.
4200         * s390-tdep.c: Likewise.
4201         * solib-aix.c: Likewise.
4202         * solib-darwin.c: Likewise.
4203         * solib-dsbt.c: Likewise.
4204         * solib-spu.c: Likewise.
4205         * solib-svr4.c: Likewise.
4206         * solib-target.c: Likewise.
4207         * sparc-tdep.c: Likewise.
4208         * sparc64-tdep.c: Likewise.
4209         * spu-tdep.c: Likewise.
4210         * symfile.c: Likewise.
4211         * symtab.c: Likewise.
4212         * target-descriptions.c: Likewise.
4213         * target-memory.c: Likewise.
4214         * target.c: Likewise.
4215         * target.h: Likewise.
4216         * tracefile-tfile.c: Likewise.
4217         * tracepoint.c: Likewise.
4218         * valops.c: Likewise.
4219         * valprint.c: Likewise.
4220         * value.c: Likewise.
4221         * windows-tdep.c: Likewise.
4222         * mi/mi-main.c: Likewise.
4223
4224 2018-06-07  Tom Tromey  <tom@tromey.com>
4225
4226         * valprint.h (build_address_symbolic): Declare.
4227         * printcmd.c (print_address_symbolic): Update.
4228         (build_address_symbolic): Change "name" and "filename" to
4229         std::string.
4230         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4231         Update.
4232         * defs.h (build_address_symbolic): Remove declaration.
4233
4234 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4235
4236         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4237         (aarch64_vnv_type): Add function.
4238         (aarch64_pseudo_register_name): Add V regs for SVE.
4239         (aarch64_pseudo_register_type): Likewise.
4240         (aarch64_pseudo_register_reggroup_p): Likewise.
4241         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4242         (aarch64_pseudo_read_value): Add V regs for SVE.
4243         (aarch64_pseudo_write_2): Use V0 offset for SVE
4244         (aarch64_pseudo_write): Add V regs for SVE.
4245         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4246
4247 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4248
4249         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4250         (sve_vl_from_vq): Likewise.
4251
4252 2018-06-05  Tom Tromey  <tom@tromey.com>
4253
4254         * cli/cli-cmds.c (show_version): Update.
4255         * top.c (print_gdb_version): Add "interactive" parameter.
4256         Update.
4257         * main.c (captured_main_1): Update.
4258         * top.h (print_gdb_version): Add "interactive" parameter and a
4259         comment.
4260
4261 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4262
4263         * common/enum-flags.h: Add trailing semicolon to example in
4264         comment.
4265
4266 2018-06-05  Tom Tromey  <tom@tromey.com>
4267
4268         PR cli/12326:
4269         * NEWS: Add entry about pager.
4270         * utils.c (pagination_disabled_for_command): New global.
4271         (prompt_for_continue): Allow "c" response to prompt.
4272         (reinitialize_more_filter): Clear
4273         pagination_disabled_for_command.
4274         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4275
4276 2018-06-04  Tom Tromey  <tom@tromey.com>
4277
4278         * ada-lang.h (ada_lookup_symbol_list): Update.
4279         * ada-lang.c (resolve_subexp): Update.
4280         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4281         parameter.
4282         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4283         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4284         results parameter to std::vector.
4285         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4286         Update.
4287         * ada-exp.y (block_lookup): Update.
4288         (select_possible_type_sym): Change type of syms.  Remove nsyms
4289         parameter.
4290         (write_var_or_type, write_name_assoc): Update.
4291
4292 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4293
4294         * windows-nat.c (windows_nat_target::xfer_partial): Return
4295         TARGET_XFER_E_IO if we need to delegate to the target beneath
4296         but BENEATH is NULL.
4297
4298 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4299
4300         * Makefile.in (config.status): Add configure.nat as a
4301         dependency.
4302
4303 2018-06-04  Tom Tromey  <tom@tromey.com>
4304
4305         * cp-name-parser.y (cpname_state): Add method declarations.
4306         (HANDLE_QUAL): Update.
4307         (cpname_state::d_grab, cpname_state::fill_comp)
4308         (cpname_state::make_operator, cpname_state::make_dtor)
4309         (cpname_state::make_builtin_type, cpname_state::make_name)
4310         (cpname_state::d_qualify, cpname_state::d_int_type)
4311         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4312         (%union): Move earlier.
4313
4314 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4315
4316         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4317
4318 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4319
4320         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4321         (aarch64_pseudo_write_1): Likewise.
4322         (aarch64_pseudo_read_value): Use helper.
4323         (aarch64_pseudo_write): Likewise.
4324
4325 2018-06-04  Pedro Alves  <palves@redhat.com>
4326
4327         * darwin-nat.c (darwin_ops): Delete.
4328         (darwin_attach_pid): Use get_native_target.
4329
4330 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4331
4332         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4333         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4334
4335 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4336
4337         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4338         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4339         (aarch64_gdbarch_init): Check for SVE.
4340         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4341
4342 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4343
4344         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4345         * aarch64-tdep.h (aarch64_read_description): Likewise.
4346         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4347         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4348         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4349         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4350         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4351
4352 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4353
4354         * value.c (value_fetch_lazy_bitfield): New.
4355         (value_fetch_lazy_memory): New.
4356         (value_fetch_lazy_register): New.
4357         (value_fetch_lazy): Factor out to smaller functions.
4358
4359 2018-06-01  Tom Tromey  <tom@tromey.com>
4360
4361         * cp-name-parser.y (backslashable, represented): Now const.
4362
4363 2018-06-01  Tom Tromey  <tom@tromey.com>
4364
4365         * cp-name-parser.y: Include parser-defs.h.
4366         (parser_fprintf): Remove declaration.
4367
4368 2018-06-01  Tom Tromey  <tom@tromey.com>
4369
4370         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4371         %parse-param.
4372         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4373         (global_result): Remove globals.
4374         (struct cpname_state): New.
4375         (yyparse): Don't declare.
4376         (yylex, yyerror): Move declarations after %union.
4377         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4378         (make_name): Add state parameter.
4379         Update all callers.
4380         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4381         parameter.
4382         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4383         Update.
4384         (yylex): Add lvalp, state parameters.
4385         (yyerror): Add state parameter.
4386         (cp_demangled_name_to_comp): Update.
4387
4388 2018-06-01  Tom Tromey  <tom@tromey.com>
4389
4390         * cp-name-parser.y (parser_fprintf): Declare.
4391         (GDB_YY_REMAP_PREFIX): Define.
4392         Include yy-remap.h.  Don't redefine yy* identifiers.
4393
4394 2018-06-01  Tom Tromey  <tom@tromey.com>
4395
4396         * python/py-type.c (typy_legacy_template_argument): Update.
4397         * cp-support.h (cp_demangled_name_to_comp): Update.
4398         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4399         parameter to be a "std::string *".
4400         (main): Update.
4401
4402 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4403
4404         * ada-lex.l: Include "diagnostics.h" instead of
4405         "common/diagnostics.h".
4406         * unittests/environ-selftests.c: Likewise.
4407         * common/diagnostics.h: Moved to ../include.
4408
4409 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4410
4411         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4412         to language_mode_manual while calling breakpoint_re_set_one.
4413
4414 2018-06-01  Tom Tromey  <tom@tromey.com>
4415
4416         * valops.c (value_cast_structs, destructor_name_p): Update.
4417         * symtab.c (gdb_mangle_name): Update.
4418         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4419         Update.
4420         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4421         (pascal_object_print_value_fields, pascal_object_print_value):
4422         Update.
4423         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4424         * linespec.c (find_methods): Update.
4425         * gdbtypes.h (type_name_no_tag): Remove.
4426         (type_name_or_error): Rename from type_name_no_tag_or_error.
4427         * gdbtypes.c (type_name_no_tag): Remove.
4428         (type_name_or_error): Rename from type_name_no_tag_or_error.
4429         (lookup_struct_elt_type, check_typedef): Update.
4430         * expprint.c (print_subexp_standard): Update.
4431         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4432         * d-namespace.c (d_lookup_nested_symbol): Update.
4433         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4434         (cp_print_class_member): Update.
4435         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4436         * completer.c (add_struct_fields): Update.
4437         * c-typeprint.c (cp_type_print_derivation_info)
4438         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4439         Update.
4440         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4441         (ada_prefer_type, ada_is_exception_sym): Update.
4442
4443 2018-06-01  Tom Tromey  <tom@tromey.com>
4444
4445         * valops.c (enum_constant_from_type, value_namespace_elt)
4446         (value_maybe_namespace_elt): Update.
4447         * valarith.c (find_size_for_pointer_math): Update.
4448         * target-descriptions.c (make_gdb_type): Update.
4449         * symmisc.c (print_symbol): Update.
4450         * stabsread.c (define_symbol, read_type)
4451         (complain_about_struct_wipeout, add_undefined_type)
4452         (cleanup_undefined_types_1): Update.
4453         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4454         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4455         (rust_internal_print_type, rust_composite_type)
4456         (rust_evaluate_funcall, rust_evaluate_subexp)
4457         (rust_inclusive_range_type_p): Update.
4458         * python/py-type.c (typy_get_tag): Update.
4459         * p-typeprint.c (pascal_type_print_base): Update.
4460         * mdebugread.c (parse_symbol, parse_type): Update.
4461         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4462         Update.
4463         * guile/scm-type.c (gdbscm_type_tag): Update.
4464         * go-lang.c (sixg_string_p): Update.
4465         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4466         Update.
4467         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4468         (TYPE_TAG_NAME): Remove.
4469         * gdbtypes.c (type_name_no_tag): Simplify.
4470         (check_typedef, check_types_equal, recursive_dump_type)
4471         (copy_type_recursive, arch_composite_type): Update.
4472         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4473         in summary mode when needed.
4474         * eval.c (evaluate_funcall): Update.
4475         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4476         (process_structure_scope, read_enumeration_type)
4477         (read_namespace_type, read_module_type, determine_prefix): Update.
4478         * cp-support.c (inspect_type): Update.
4479         * coffread.c (process_coff_symbol, decode_base_type): Update.
4480         * c-varobj.c (c_is_path_expr_parent): Update.
4481         * c-typeprint.c (c_type_print_base_struct_union): Update.
4482         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4483         summary when using C language.
4484         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4485         (gen_maybe_namespace_elt): Update.
4486         * ada-lang.c (ada_type_name): Simplify.
4487         (empty_record, ada_template_to_fixed_record_type_1)
4488         (template_to_static_fixed_type)
4489         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4490
4491 2018-06-01  Tom Tromey  <tom@tromey.com>
4492
4493         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4494         c_print_type.
4495         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4496         (c_print_type): Update.
4497         (c_print_type): New overload.
4498         (c_type_print_varspec_prefix, c_type_print_args)
4499         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4500         (c_type_print_base_struct_union, c_type_print_base_1)
4501         (cp_type_print_method_args): Add "language" parameter.
4502         (c_type_print_base): Update.
4503         * c-lang.h (c_print_type): Add new overload.
4504
4505 2018-06-01  Tom Tromey  <tom@tromey.com>
4506
4507         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4508         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4509
4510 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4511
4512         * aarch64-tdep.c (aarch64_sve_register_names): New const
4513         var.
4514         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4515         (AARCH64_SVE_Z_REGS_NUM): New define.
4516         (AARCH64_SVE_P_REGS_NUM): Likewise.
4517         (AARCH64_SVE_NUM_REGS): Likewise.
4518
4519 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4520
4521         * nat/linux-ptrace.h [__alpha__]
4522         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4523         definitions.
4524
4525 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4526
4527         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4528         the endianness selected.
4529         * NEWS: Document `set endian auto' mode operation update.
4530
4531 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4532
4533         * Makefile.in: Add new header.
4534         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4535         (sve_vl_from_vg): Likewise.
4536         (sve_vq_from_vl): Likewise.
4537         (sve_vl_from_vq): Likewise.
4538         (sve_vq_from_vg): Likewise.
4539         (sve_vg_from_vq): Likewise.
4540         * configure.nat: Add new c file.
4541         * nat/aarch64-sve-linux-ptrace.c: New file.
4542         * nat/aarch64-sve-linux-ptrace.h: New file.
4543
4544 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4545
4546         * aarch64-linux-nat.c (aarch64_linux_read_description):
4547         Add parmeter zero.
4548         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4549         Likewise.
4550         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4551         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4552         (aarch64_gdbarch_init): Add parmeter zero.
4553         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4554         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4555         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4556         parmeter.
4557         * doc/gdb.texinfo: Describe SVE feature
4558         * features/aarch64-sve.c: New file.
4559
4560 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4561
4562         PR gdb/23210
4563         * gdbarch.sh (significant_addr_bit): Default to zero when
4564         not set by target architecture.
4565         * gdbarch.c: Re-generated.
4566         * utils.c (address_significant): Update.
4567
4568 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4569
4570         * stack.c (func_command): Remove trailing newline in call to error.
4571
4572 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4573
4574         * regcache.h (regcache_raw_collect): Remove, update callers to
4575         use regcache::raw_collect.
4576         * regcache.c (regcache_raw_collect): Remove.
4577
4578 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4579
4580         * regcache.h (regcache_raw_supply): Remove, update callers to
4581         use detached_regcache::raw_supply.
4582         * regcache.c (regcache_raw_supply): Remove.
4583
4584 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4585
4586         * regcache.h (regcache_cooked_write_part): Remove, update
4587         callers to use regcache::cooked_write_part.
4588         * regcache.c (regcache_cooked_write_part): Remove.
4589
4590 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4591
4592         * regcache.h (regcache_cooked_read_part): Remove, update callers
4593         to use readable_regcache::cooked_read_part.
4594         * regcache.c (regcache_cooked_read_part): Remove.
4595
4596 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4597
4598         * regcache.h (regcache_cooked_read_value): Remove, update
4599         callers to use readable_regcache::cooked_read_value.
4600         * regcache.c (regcache_cooked_read_value): Remove.
4601
4602 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4603
4604         * regcache.h (regcache_cooked_write): Remove, update callers to
4605         use regcache::cooked_write.
4606         * regcache.c (regcache_cooked_write): Remove.
4607
4608 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4609
4610         * regcache.h (regcache_invalidate): Remove, update callers to
4611         use detached_regcache::invalidate instead.
4612         * regcache.c (regcache_invalidate): Remove.
4613
4614 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4615
4616         * regcache.h (regcache_raw_write_part): Remove, update callers
4617         to use regcache::raw_write_part instead.
4618         * regcache.c (regcache_raw_write_part): Remove.
4619
4620 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4621
4622         * regcache.h (regcache_raw_read_part): Remove, update callers to
4623         use readable_regcache::raw_read_part instead.
4624         * regcache.c (regcache_raw_read_part): Remove.
4625
4626 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4627
4628         * regcache.h (regcache_cooked_read): Remove, update callers to
4629         use readable_regcache::cooked_read instead.
4630         * regcache.c (regcache_cooked_read): Remove.
4631
4632 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4633
4634         * regcache.h (regcache_raw_write): Remove, update callers to use
4635         regcache::raw_write instead.
4636         * regcache.c (regcache_raw_write): Remove.
4637
4638 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4639
4640         * regcache.h (regcache_raw_read): Remove, update callers to use
4641         readable_regcache::raw_read instead.
4642         * regcache.c (regcache_raw_read): Remove.
4643
4644 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4645
4646         * regcache.h (regcache_raw_update): Remove, update callers to
4647         use readable_regcache::raw_update instead.
4648         * regcache.c (regcache_raw_update): Remove.
4649
4650 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4651
4652         * regcache.h (regcache_register_status): Remove, update callers
4653         to use reg_buffer::get_register_status directly instead.
4654         * regcache.c (regcache_register_status): Remove.
4655
4656 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4657
4658         * regcache.h (regcache_get_ptid): Remove, update all callers to
4659         call regcache::ptid instead.
4660         * regcache.c (regcache_get_ptid): Remove.
4661
4662 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4663
4664         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4665
4666 2018-05-30  Pedro Alves  <palves@redhat.com>
4667
4668         * common/common-exceptions.h (exception_rethrow): Use
4669         ATTRIBUTE_NORETURN.
4670
4671 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4672
4673         * breakpoint.c (print_solib_event, check_status_catch_solib):
4674         Remove struct keyword in range-based for loops.
4675         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4676         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4677         Likewise.
4678         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4679         Likewise.
4680         * symfile.c (addr_info_make_relative): Likewise.
4681         * thread.c (value_in_thread_stack_temporaries): Likewise.
4682
4683 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4684
4685         PR gdb/16841
4686         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4687         aggregate type to get its real type before accessing it.
4688
4689 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4690
4691         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4692         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4693         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4694         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4695         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4696         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4697         * printcmd.c (info_address_command): Likewise.
4698
4699 2018-05-29  Tom Tromey  <tom@tromey.com>
4700
4701         * windows-nat.c (handle_exception): Update fall-through comment.
4702
4703 2018-05-29  Tom Tromey  <tom@tromey.com>
4704
4705         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4706         (struct program_space) <added_solibs>: Now a std::vector.
4707         * breakpoint.c (print_solib_event): Update.
4708         (check_status_catch_solib): Update.
4709         * progspace.c (clear_program_space_solib_cache): Update.
4710         * solib.c (update_solib_list): Update.
4711
4712 2018-05-29  Tom Tromey  <tom@tromey.com>
4713
4714         * python/py-type.c (typy_richcompare): Update.
4715         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4716         * gdbtypes.h (types_deeply_equal): Return bool.
4717         (types_equal): Likewise.
4718         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4719         declare VEC.
4720         (check_types_equal): Change worklist to std::vector.  Return
4721         bool.
4722         (struct type_equality_entry): Add constructor.
4723         (compare_maybe_null_strings): Return bool.
4724         (check_types_worklist): Return bool.  Change worklist to
4725         std::vector.
4726         (types_deeply_equal): Use std::vector.
4727         (types_equal): Return bool.
4728         (compare_maybe_null_strings): Simplify.
4729
4730 2018-05-29  Tom Tromey  <tom@tromey.com>
4731
4732         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4733
4734 2018-05-29  Tom Tromey  <tom@tromey.com>
4735
4736         * objc-lang.h: Don't include cp-support.h.
4737         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4738         declare VEC.
4739
4740 2018-05-27  Tom Tromey  <tom@tromey.com>
4741
4742         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4743
4744 2018-05-25  Tom Tromey  <tom@tromey.com>
4745
4746         * value.c (value::location): Initialize.
4747
4748 2018-05-25  Tom Tromey  <tom@tromey.com>
4749
4750         * dbxread.c (init_bincl_list): Remove.
4751         (bincl_list): Now a std::vector.
4752         (bincls_allocated, next_bincl): Remove.
4753         (free_bincl_list, do_free_bincl_list_cleanup)
4754         (make_cleanup_free_bincl_list): Remove.
4755         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4756         unique_xmalloc_ptr.
4757         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4758         (struct header_file_location): Add constructor.
4759         (add_bincl_to_list): Remove.
4760
4761 2018-05-25  Tom Tromey  <tom@tromey.com>
4762
4763         * tui/tui.c (tui_enable): Update.
4764         * mi/mi-interp.c (mi_interp::init): Update.
4765         * interps.h (class interp) <name>: New method.
4766         <m_name>: Rename from name.
4767         (~scoped_restore_interp): Update.
4768         * interps.c (interp::interp): Update.
4769         (interp_add, interp_set, interp_lookup_existing)
4770         (current_interp_named_p): Update.
4771
4772 2018-05-25  Tom Tromey  <tom@tromey.com>
4773
4774         * interps.c (interp_name): Remove.
4775         * mi/mi-interp.c (mi_interp::init): Update.
4776         * interps.h (interp_name): Remove.
4777         (~scoped_restore_interp): Update.
4778         * tui/tui.c (tui_enable): Update.
4779
4780 2018-05-25  Tom Tromey  <tom@tromey.com>
4781
4782         * utils.c (fputs_maybe_filtered): Update.
4783         * linespec.c (decode_line_full): Update.
4784         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4785         (mi_print_breakpoint_for_event, mi_solib_loaded)
4786         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4787         (mi_user_selected_context_changed): Update.
4788         * mi/mi-main.c (mi_execute_command): Update.
4789         * cli/cli-script.c (execute_control_command): Update.
4790         * python/python.c (execute_gdb_command): Update.
4791         * solib.c (info_sharedlibrary_command): Update.
4792         * interps.c (interp_ui_out): Remove.
4793         * interps.h (interp_ui_out): Remove.
4794
4795 2018-05-25  Tom Tromey  <tom@tromey.com>
4796
4797         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4798         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4799         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4800
4801 2018-05-25  Tom Tromey  <tom@tromey.com>
4802
4803         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4804         * interps.c (interp_exec): Use scoped_restore.
4805
4806 2018-05-25  Tom Tromey  <tom@tromey.com>
4807
4808         * remote.c (remote_target::remote_file_get): Use
4809         gdb::byte_vector.
4810         (remote_target::remote_file_put): Likewise.
4811
4812 2018-05-25  Tom Tromey  <tom@tromey.com>
4813
4814         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4815         a std::string.
4816         (get_pe_section_index, add_pe_exported_sym): Update.
4817         (read_pe_exported_syms): Use gdb::def_vector.
4818
4819 2018-05-25  Tom Tromey  <tom@tromey.com>
4820
4821         * frame.c (remove_prev_frame): Remove.
4822         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4823
4824 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4825
4826         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4827         Remove prototypes.
4828         * mips-linux-nat.c (supply_fpregset): Always call
4829         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4830         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4831         `mips_fill_fpregset'.
4832         * mips-linux-tdep.c (mips_supply_fpregset)
4833         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4834         (mips_fill_fpregset_wrapper): Remove functions.
4835         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4836         (mips_linux_fpregset): Remove variable.
4837         (mips_linux_iterate_over_regset_sections): Use
4838         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4839         (mips_linux_o32_sigframe_init): Remove comment.
4840
4841 2018-05-25  Pedro Alves  <palves@redhat.com>
4842
4843         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4844         (struct readahead_cache, struct packet_reg, struct
4845         remote_arch_state, class remote_state): Move higher up in the
4846         file.
4847         (remote_target::m_remote_state): Now an object instead of a pointer.
4848         (remote_target::get_remote_state): Adjust.
4849
4850 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4851
4852         * stack.c (select_and_print_frame): Delete.
4853         (struct function_bounds): Move struct within function.
4854         (func_command): Most content moved into new function
4855         find_frame_for_function, use new function, print result, add
4856         function comment.
4857         (find_frame_for_function): New function, now returns a result.
4858
4859 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4860
4861         * stack.c (iterate_over_block_arg_vars): Fix comment.
4862         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4863
4864 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4865
4866         PR gdb/23203
4867         * frame.c
4868         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4869         Define.
4870         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4871         Define.
4872         * frame.h (class scoped_restore_selected_frame): New class.
4873         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4874         of any exception, use scoped_restore_selected_frame to restore the
4875         frame instead.
4876
4877 2018-05-24  Pedro Alves  <palves@redhat.com>
4878
4879         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4880         override.
4881
4882 2018-05-23  Tom Tromey  <tom@tromey.com>
4883
4884         * complaints.c (struct complaints): Remove.
4885         (symfile_complaint_book): Remove.
4886         (series): New global.
4887         (complaint_internal): Update.
4888         (clear_complaints): Update.
4889
4890 2018-05-23  Tom Tromey  <tom@tromey.com>
4891
4892         * complaints.c (counters): New global.
4893         (struct complain): Remove.
4894         (struct complaints) <root>: Remove.
4895         (complaint_sentinel): Remove.
4896         (symfile_complaint_book): Update.
4897         (find_complaint) Remove.
4898         (complaint_internal, clear_complaints): Update.
4899
4900 2018-05-23  Tom Tromey  <tom@tromey.com>
4901
4902         * complaints.c (struct complain) <file, line>: Remove.
4903         (find_complaint): Remove file, line parameters.
4904         (complaint_internal): Update.
4905
4906 2018-05-23  Tom Tromey  <tom@tromey.com>
4907
4908         * complaints.c (vcomplaint): Remove.
4909         (complaint_internal) Merge in contents of vcomplaint.
4910
4911 2018-05-23  Tom Tromey  <tom@tromey.com>
4912
4913         * complaints.c (struct complaints) <explanation>: Remove.
4914         (symfile_explanations): Remove.
4915         (symfile_complaint_book): Update.
4916         (vcomplaint): Update.
4917         (struct explanation): Remove.
4918
4919 2018-05-23  Tom Tromey  <tom@tromey.com>
4920
4921         * complaints.c (symfile_complaints): Remove.
4922         (complaint_internal): Remove "complaints" parameter.
4923         (clear_complaints, vcomplaint): Remove "c" parameter.
4924         (get_complaints): Remove.
4925         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4926         (dwarf2_debug_line_missing_file_complaint)
4927         (dwarf2_debug_line_missing_end_sequence_complaint)
4928         (dwarf2_complex_location_expr_complaint)
4929         (dwarf2_const_value_length_mismatch_complaint)
4930         (dwarf2_section_buffer_overflow_complaint)
4931         (dwarf2_macro_malformed_definition_complaint)
4932         (dwarf2_invalid_attrib_class_complaint)
4933         (create_addrmap_from_index, dw2_symtab_iter_next)
4934         (dw2_expand_marked_cus)
4935         (dw2_debug_names_iterator::find_vec_in_debug_names)
4936         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4937         (create_debug_type_hash_table, init_cutu_and_read_dies)
4938         (partial_die_parent_scope, add_partial_enumeration)
4939         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4940         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4941         (read_import_statement, read_file_scope, create_dwo_cu_reader)
4942         (create_cus_hash_table, create_dwp_hash_table)
4943         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4944         (dwarf2_rnglists_process, dwarf2_ranges_process)
4945         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4946         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4947         (handle_struct_member_die, process_structure_scope)
4948         (read_array_type, read_common_block, read_module_type)
4949         (read_tag_pointer_type, read_typedef, read_base_type)
4950         (read_subrange_type, load_partial_dies, partial_die_info::read)
4951         (partial_die_info::read, partial_die_info::read)
4952         (partial_die_info::read, read_checked_initial_length_and_offset)
4953         (dwarf2_string_attr, read_formatted_entries)
4954         (dwarf_decode_line_header)
4955         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4956         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4957         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4958         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4959         (get_signatured_type, get_DW_AT_signature_type)
4960         (decode_locdesc, file_file_name, consume_improper_spaces)
4961         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4962         (dwarf_decode_macro_bytes, dwarf_decode_macros)
4963         (dwarf2_symbol_mark_computed, set_die_type)
4964         (read_attribute_value): Update.
4965         * stap-probe.c (handle_stap_probe, get_stap_base_address):
4966         Update.
4967         * dbxread.c (unknown_symtype_complaint)
4968         (lbrac_mismatch_complaint, repeated_header_complaint)
4969         (set_namestring, function_outside_compilation_unit_complaint)
4970         (read_dbx_symtab, process_one_symbol): Update.
4971         * gdbtypes.c (stub_noname_complaint): Update.
4972         * windows-nat.c (handle_unload_dll): Update.
4973         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4974         (decode_base_type): Update.
4975         * xcoffread.c (bf_notfound_complaint, ef_complaint)
4976         (eb_complaint, record_include_begin, record_include_end)
4977         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4978         (process_xcoff_symbol, read_symbol)
4979         (function_outside_compilation_unit_complaint)
4980         (scan_xcoff_symtab): Update.
4981         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4982         * buildsym.c (finish_block_internal, make_blockvector)
4983         (end_symtab_get_static_block, augment_type_symtab): Update.
4984         * dtrace-probe.c (dtrace_process_dof)
4985         (dtrace_static_probe_ops::get_probes): Update.
4986         * complaints.h (struct complaint): Don't declare.
4987         (symfile_complaints): Remove.
4988         (complaint_internal): Remove "complaints" parameter.
4989         (complaint): Likewise.
4990         (clear_complaints): Likewise.
4991         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4992         (reread_symbols): Update.
4993         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4994         (dwarf2_frame_cache, decode_frame_entry): Update.
4995         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4996         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4997         (info_selectors_command): Update.
4998         * macrotab.c (macro_include, check_for_redefinition)
4999         (macro_undef): Update.
5000         * objfiles.c (filter_overlapping_sections): Update.
5001         * stabsread.c (invalid_cpp_abbrev_complaint)
5002         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5003         (define_symbol, error_type, read_type, rs6000_builtin_type)
5004         (stabs_method_name_from_physname, read_member_functions)
5005         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5006         (attach_fields_to_type, complain_about_struct_wipeout)
5007         (read_range_type, read_args, common_block_start)
5008         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5009         Update.
5010         * mdebugread.c (index_complaint, unknown_ext_complaint)
5011         (basic_type_complaint, bad_tag_guess_complaint)
5012         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5013         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5014         (parse_procedure, parse_lines)
5015         (function_outside_compilation_unit_complaint)
5016         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5017         (bad_tag_guess_complaint, reg_value_complaint): Update.
5018         * cp-support.c (demangled_name_complaint): Update.
5019         * macroscope.c (sal_macro_scope): Update.
5020         * dwarf-index-write.c (class debug_names): Update.
5021
5022 2018-05-23  Tom Tromey  <tom@tromey.com>
5023
5024         * complaints.c (clear_complaints): Remove "noisy" parameter.
5025         * complaints.h (clear_complaints): Update.
5026         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5027         (reread_symbols): Update.
5028
5029 2018-05-23  Tom Tromey  <tom@tromey.com>
5030
5031         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5032         SUBSEQUENT_MESSAGE.
5033         (vcomplaint, clear_complaints): Update.
5034         (symfile_explanations): Remove some messages.
5035
5036 2018-05-23  Tom Tromey  <tom@tromey.com>
5037
5038         * complaints.c (internal_complaint): Remove.
5039         * complaints.h (internal_complaint): Remove.
5040
5041 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5042
5043         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5044
5045 2018-05-22  Pedro Alves  <palves@redhat.com>
5046
5047         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5048         (remote_fileio_badfd, remote_fileio_return_errno)
5049         (remote_fileio_return_success, remote_fileio_func_open)
5050         (remote_fileio_func_open, remote_fileio_func_close)
5051         (remote_fileio_func_read, remote_fileio_func_write)
5052         (remote_fileio_func_lseek, remote_fileio_func_rename)
5053         (remote_fileio_func_unlink, remote_fileio_func_stat)
5054         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5055         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5056         remote_target parameter.
5057         (remote_fio_func_map) <func>: Add remote_target parameter.
5058         (do_remote_fileio_request, remote_fileio_request):
5059         * remote-fileio.h (remote_fileio_request):
5060         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5061         remote_target parameter.
5062         (remote_notif_process, handle_notification): Adjust to pass down
5063         the remote.
5064         (remote_notif_state_allocate): Add remote_target parameter.  Save
5065         it.
5066         * remote-notif.h (struct remote_target): Forward declare.
5067         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5068         remote_target parameter.
5069         (struct remote_notif_state) <remote>: New field.
5070         (remote_notif_ack, remote_notif_parse): Add remote_target
5071         parameter.
5072         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5073         remote_target parameter.
5074         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5075         (threads_listing_context, rmt_thread_action, protocol_feature)
5076         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5077         (packet_result, struct threads_listing_context, remote_state):
5078         Move definitions and declarations higher up.
5079         (remote_target) <~remote_target>: Declare.
5080         (remote_download_command_source, remote_file_put, remote_file_get)
5081         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5082         (remote_hostio_pread_vFile, remote_hostio_send_command)
5083         (remote_hostio_set_filesystem, remote_hostio_open)
5084         (remote_hostio_close, remote_hostio_unlink, remote_state)
5085         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5086         (get_memory_write_packet_size, get_memory_read_packet_size)
5087         (append_pending_thread_resumptions, remote_detach_1)
5088         (append_resumption, remote_resume_with_vcont)
5089         (add_current_inferior_and_thread, wait_ns, wait_as)
5090         (process_stop_reply, remote_notice_new_inferior)
5091         (process_initial_stop_replies, remote_add_thread)
5092         (btrace_sync_conf, remote_btrace_maybe_reopen)
5093         (remove_new_fork_children, kill_new_fork_children)
5094         (discard_pending_stop_replies, stop_reply_queue_length)
5095         (check_pending_events_prevent_wildcard_vcont)
5096         (discard_pending_stop_replies_in_queue, stop_reply)
5097         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5098         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5099         (remote_interrupt_as, remote_interrupt_ns)
5100         (remote_get_noisy_reply, remote_query_attached)
5101         (remote_add_inferior, remote_current_thread, get_current_thread)
5102         (set_thread, set_general_thread, set_continue_thread)
5103         (set_general_process, write_ptid)
5104         (remote_unpack_thread_info_response, remote_get_threadinfo)
5105         (parse_threadlist_response, remote_get_threadlist)
5106         (remote_threadlist_iterator, remote_get_threads_with_ql)
5107         (remote_get_threads_with_qxfer)
5108         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5109         (get_offsets, remote_check_symbols, remote_supported_packet)
5110         (remote_query_supported, remote_packet_size)
5111         (remote_serial_quit_handler, remote_detach_pid)
5112         (remote_vcont_probe, remote_resume_with_hc)
5113         (send_interrupt_sequence, interrupt_query)
5114         (remote_notif_get_pending_events, fetch_register_using_p)
5115         (send_g_packet, process_g_packet, fetch_registers_using_g)
5116         (store_register_using_P, store_registers_using_G)
5117         (set_remote_traceframe, check_binary_download)
5118         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5119         (remote_xfer_live_readonly_partial, remote_read_bytes)
5120         (remote_send_printf, remote_flash_write, readchar)
5121         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5122         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5123         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5124         (extended_remote_disable_randomization, extended_remote_run)
5125         (send_environment_packet, extended_remote_environment_support)
5126         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5127         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5128         (packet_command): Now methods of ...
5129         (remote_target): ... this class.
5130         (m_remote_state) <remote_target>: New field.
5131         (struct remote_state) <stop_reply_queue,
5132         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5133         fields.
5134         (remote_state::remote_state): Allocate stop_reply_queue.
5135         (remote_state): Delete global.
5136         (get_remote_state_raw): Delete.
5137         (remote_target::get_remote_state): Allocate m_remote_state on
5138         demand.
5139         (get_current_remote_target): New.
5140         (remote_ops, extended_remote_ops): Delete.
5141         (wait_forever_enabled_p, remote_async_inferior_event_token):
5142         Delete, moved to struct remote_state.
5143         (remote_target::close): Delete self.  Destruction bits split to
5144         ...
5145         (remote_target::~remote_target): ... this.
5146         (show_memory_packet_size): Adjust to use
5147         get_current_remote_target.
5148         (struct protocol_feature) <func>: Add remote_target parameter.
5149         All callers adjusted.
5150         (curr_quit_handler_target): New.
5151         (remote_serial_quit_handler): Reimplement.
5152         (remote_target::open_1): Adjust to use get_current_remote_target.
5153         Heap-allocate remote_target/extended_remote_target instances.
5154         (vcont_builder::vcont_builder): Add remote_target parameter, and
5155         save it in m_remote.  All callers adjusted.
5156         (vcont_builder::m_remote): New field.
5157         (vcont_builder::restart, vcont_builder::flush)
5158         (vcont_builder::push_action): Use it.
5159         (remote_target::commit_resume): Use it.
5160         (struct queue_iter_param) <remote>: New field.
5161         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5162         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5163         (check_pending_event_prevents_wildcard_vcont_callback)
5164         (remote_target::check_pending_events_prevent_wildcard_vcont)
5165         (remote_target::discard_pending_stop_replies)
5166         (remote_target::discard_pending_stop_replies_in_queue)
5167         (remote_target::remote_notif_remove_queued_reply): Fill in
5168         'remote' field.
5169         (remote_notif_get_pending_events): New.
5170         (remote_target::readchar, remote_target::remote_serial_write):
5171         Save/restore curr_quit_handler_target.
5172         (putpkt): New.
5173         (kill_new_fork_children): Fill in 'remote' field.
5174         (packet_command): Use get_current_remote_target, defer to
5175         remote_target method of same name.
5176         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5177         parameter, and save it in m_remote.  All callers adjusted.
5178         (scoped_remote_fd::release): Use m_remote.
5179         (scoped_remote_fd::m_remote): New field.
5180         (remote_file_put, remote_file_get, remote_file_delete): Use
5181         get_current_remote_target, defer to remote_target method of same
5182         name.
5183         (remote_btrace_reset): Add remote_state paremeter.  Update all
5184         callers.
5185         (remote_async_inferior_event_handler). Pass down 'data'.
5186         (remote_new_objfile): Use get_current_remote_target.
5187         (remote_target::vcont_r_supported): New.
5188         (set_range_stepping): Use get_current_remote_target and
5189         remote_target::vcont_r_supported.
5190         (_initialize_remote): Don't allocate 'remote_state' and
5191         'stop_reply_queue' globals.
5192         * remote.h (struct remote_target): Forward declare.
5193         (getpkt, putpkt, remote_notif_get_pending_events): Add
5194         'remote_target' parameter.
5195
5196 2018-05-22  Pedro Alves  <palves@redhat.com>
5197
5198         * remote.c (vcont_builder): Now a class.  Make all data members
5199         private.
5200         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5201         Declare methods.
5202         (vcont_builder_restart): Rename to ...
5203         (vcont_builder::restart): ... this.
5204         (vcont_builder_flush): Rename to ...
5205         (vcont_builder::flush): ... this.
5206         (vcont_builder_push_action): Rename to ...
5207         (vcont_builder::push_action): ... this.
5208         (remote_target::commit_resume): Adjust.
5209
5210 2018-05-22  Pedro Alves  <palves@redhat.com>
5211
5212         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5213         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5214         (get_fixed_memory_packet_size): New.
5215         (get_memory_packet_size): Use it.
5216         (set_memory_packet_size): Don't override the config size with
5217         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5218         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5219         Don't refer to get_memory_packet_size if not connected to a remote
5220         target.  Show "(default)" if configured size is 0.
5221
5222 2018-05-22  Pedro Alves  <palves@redhat.com>
5223
5224         * remote.c (remote_target::mourn_inferior): Move
5225         discard_pending_stop_replies call here from ...
5226         (_initialize_remote): ... here.
5227
5228 2018-05-22  Pedro Alves  <palves@redhat.com>
5229
5230         * remote.c (compare_section_command): Remove set_general_process
5231         call.
5232
5233 2018-05-22  Pedro Alves  <palves@redhat.com>
5234
5235         * remote.c (struct packet_reg, struct remote_arch_state):
5236         Move higher up in the file.
5237         (remote_state) <m_arch_states>: Store remote_arch_state values
5238         instead of remote_arch_state pointers.
5239         (remote_state::get_remote_arch_state): Adjust.
5240
5241 2018-05-22  Pedro Alves  <palves@redhat.com>
5242
5243         * remote.c: Include <unordered_map>.
5244         (remote_state): Now a class.
5245         (remote_state) <get_remote_arch_state>: Declare method.
5246         <get_remote_arch_state>: New field.
5247         (remote_arch_state) <remote_arch_state>: Declare ctor.
5248         <regs>: Now a unique_ptr.
5249         (remote_gdbarch_data_handle): Delete.
5250         (get_remote_arch_state): Delete.
5251         (remote_state::get_remote_arch_state): New.
5252         (get_remote_state): Adjust to call remote_state's
5253         get_remote_arch_state method.
5254         (init_remote_state): Delete, bits factored out to ...
5255         (remote_arch_state::remote_arch_state): ... this new method.
5256         (get_remote_packet_size, get_memory_packet_size)
5257         (process_g_packet, remote_target::fetch_registers)
5258         (remote_target::prepare_to_store, store_registers_using_G)
5259         (remote_target::store_registers, remote_target::get_trace_status):
5260         Adjust to call remote_state's method.
5261         (_initialize_remote): Remove reference to
5262         remote_gdbarch_data_handle.
5263
5264 2018-05-22  Pedro Alves  <palves@redhat.com>
5265
5266         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5267         pread>: New method declarations.
5268         (remote_target::open_1): Adjust.
5269         (readahead_cache_invalidate): Rename to ...
5270         (readahead_cache::invalidate): ... this, and adjust to be a class
5271         method.
5272         (readahead_cache_invalidate_fd): Rename to ...
5273         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5274         class method.
5275         (remote_hostio_pwrite): Adjust.
5276         (remote_hostio_pread_from_cache): Rename to ...
5277         (readahead_cache::pread): ... this, and adjust to be a class
5278         method.
5279         (remote_hostio_close): Adjust.
5280
5281 2018-05-22  Pedro Alves  <palves@redhat.com>
5282
5283         * remote.c (remote_hostio_close_cleanup): Delete.
5284         (class scoped_remote_fd): New.
5285         (remote_file_put, remote_file_get): Use it.
5286
5287 2018-05-22  Pedro Alves  <palves@redhat.com>
5288
5289         (struct vCont_action_support): Use bool and initialize all fields.
5290         (struct readahead_cache): Initialize all fields.
5291         (remote_state): Use bool and initialize all fields.
5292         (remote_state::remote_state, remote_state::~remote_state): New.
5293         (new_remote_state): Delete.
5294         (_initialize_remote): Use new to allocate remote_state.
5295
5296 2018-05-22  Pedro Alves  <palves@redhat.com>
5297             張俊芝  <zjz@zjz.name>
5298
5299         PR gdb/22973
5300         * c-exp.y: Include "c-support.h".
5301         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5302         of tolower.  Use c_ident_is_alpha to scan names.
5303         * c-lang.c: Include "c-support.h".
5304         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5305         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5306         * c-support.h: New file, with bits factored out from ...
5307         * cp-name-parser.y: ... this file.
5308         Include "c-support.h".
5309         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5310         c-support.h and renamed.
5311         (symbol_end, yylex): Adjust.
5312
5313 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5314
5315         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5316         parameter type to CORE_ADDR.
5317         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5318         parameter type in declaration to CORE_ADDR.
5319         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5320         target_auxv_search to get AT_HWCAP and use the result to get the
5321         target description.
5322         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5323         to CORE_ADDR. Remove the cast of the return value to unsigned
5324         long. Fix error predicate of target_auxv_search.
5325         (ppc_linux_nat_target::read_description): Change the type of the
5326         hwcap variable to CORE_ADDR.
5327
5328 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5329
5330         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5331         if the size of fpscr is larger than 32 bits.
5332
5333 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5334
5335         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5336         (ppc32_linux_vsxregmap): New global.
5337         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5338         regcache_supply_regset, and regcache_collect_regset.
5339         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5340         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5341         (fetch_vsx_register, store_vsx_register): Remove.
5342         (fetch_vsx_registers): Add regno parameter. Get regset using
5343         ppc_linux_vsxregset. Use regset to supply registers.
5344         (store_vsx_registers): Add regno parameter. Get regset using
5345         ppc_linux_vsxregset. Use regset to collect registers.
5346         (fetch_register): Call fetch_vsx_registers instead of
5347         fetch_vsx_register.
5348         (store_register): Call store_vsx_registers instead of
5349         store_vsx_register.
5350         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5351         new regno parameter.
5352         (store_ppc_registers): Call store_vsx_registers with -1 for the
5353         new regno parameter.
5354         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5355         (ppc_collect_vsxregset): Remove.
5356
5357 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5358
5359         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5360         offset fields.
5361         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5362         for vector register offset fields.
5363         (ppc64_fbsd_reg_offsets): Likewise.
5364         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5365         to vector register offset fields.
5366         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5367         to vector register offset fields.
5368         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5369         vector register offset fields.
5370         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5371         initializers for vector register offset fields.
5372         (rs6000_aix64_reg_offsets): Likewise.
5373         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5374         (ppc_supply_vrregset): Remove.
5375         (ppc_collect_vrregset): Remove.
5376         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5377         (ppc_linux_vrregset) : New function.
5378         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5379         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5380         (ppc32_linux_vrregset): Remove.
5381         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5382         and use result instead of ppc32_linux_vrregset.
5383         (ppc32_linux_reg_offsets): Remove initializers for vector register
5384         offset fields.
5385         (ppc64_linux_reg_offsets): Likewise.
5386         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5387         * ppc-linux-nat.c: Include regset.h.
5388         (gdb_vrregset_t): Adjust comment to account for little-endian
5389         mode.
5390         (supply_vrregset, fill_vrregset): Remove.
5391         (fetch_altivec_register, store_altivec_register): Remove.
5392         (fetch_altivec_registers): Add regno parameter. Get regset using
5393         ppc_linux_vrregset. Use regset to supply registers.
5394         (store_altivec_registers): Add regno parameter. Get regset using
5395         ppc_linux_vrregset. Use regset to collect registers.
5396         (fetch_register): Call fetch_altivec_registers instead of
5397         fetch_altivec_register.
5398         (store_register): Call store_altivec_registers instead of
5399         store_altivec_register.
5400         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5401         the new regno parameter.
5402         (store_ppc_registers): Call store_altivec_registers with -1 for
5403         the new regno parameter.
5404
5405 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5406
5407         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5408         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5409         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5410         (gdb_vrregset_t): Change array type size to
5411         PPC_LINUX_SIZEOF_VRREGSET.
5412         (gdb_vsxregset_t): Change array type size to
5413         PPC_LINUX_SIZEOF_VSXREGSET.
5414         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5415         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5416         PPC_LINUX_SIZEOF_VSXREGSET.
5417
5418 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5419
5420         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5421         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5422         nat/ppc-linux.c.
5423         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5424         ppc_linux_target_wordsize with tid.
5425         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5426         wordsize with tid.
5427         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5428         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5429         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5430         tid parameter. Remove static specifier.
5431         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5432         (ppc_linux_target_wordsize): New declaration.
5433
5434 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5435
5436         * arch/ppc-linux-common.c: New file.
5437         * arch/ppc-linux-common.h: New file.
5438         * arch/ppc-linux-tdesc.h: New file.
5439         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5440         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5441         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5442         arch/ppc-linux-tdesc.h.
5443         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5444         arch/ppc-linux-tdesc.h.
5445         (ppc_linux_nat_target::read_description): Remove target
5446         description matching code. Fill a ppc_linux_features struct and
5447         call ppc_linux_match_description with it. Move comment about ISA
5448         2.05 to ppc-linux-common.c.
5449         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5450         arch/ppc-linux-tdesc.h.
5451         (ppc_linux_core_read_description): Remove target description
5452         matching code. Fill a ppc_linux_features struct and call
5453         ppc_linux_match_description with it.
5454         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5455         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5456         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5457         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5458         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5459         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5460         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5461         (tdesc_powerpc_e500l): Remove.
5462
5463 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5464
5465         * ada-lang.c (catch_assert_command): Pass empty string instead
5466         of NULL for excep_string argument.
5467
5468 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5469
5470         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5471         the width of the requested register exceeds the width of the
5472         `ptrace' data type.
5473
5474 2018-05-21  Tom Tromey  <tom@tromey.com>
5475
5476         * printcmd.c (output_command): Remove.
5477         (output_command_const): Rename to output_command.
5478         * valprint.h (output_command): Rename from output_command_const.
5479         * tracepoint.c (trace_dump_actions): Call output_command.
5480
5481 2018-05-21  Tom Tromey  <tom@tromey.com>
5482
5483         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5484         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5485         * ada-lang.h (create_ada_exception_catchpoint): Update.
5486         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5487         std::string.
5488         (create_excep_cond_exprs, ~ada_catchpoint)
5489         (should_stop_exception, print_one_exception)
5490         (print_mention_exception, print_recreate_exception): Update.
5491         (ada_get_next_arg): Remove.
5492         (catch_ada_exception_command_split): Use std::string.  Change type
5493         of "excep_string", "cond_string".
5494         (catch_ada_exception_command): Update.
5495         (create_ada_exception_catchpoint): Change type of excep_string.
5496         (ada_exception_sal): Remove excep_string parameter.
5497         (~ada_catchpoint): Remove.
5498
5499 2018-05-21  Tom Tromey  <tom@tromey.com>
5500
5501         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5502         cleanup.
5503
5504 2018-05-21  Tom Tromey  <tom@tromey.com>
5505
5506         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5507         Return unique_xmalloc_ptr.
5508         (print_it_exception): Update.
5509
5510 2018-05-21  Tom Tromey  <tom@tromey.com>
5511
5512         * tracepoint.c (trace_dump_actions): Use std::string.
5513
5514 2018-05-21  Tom Tromey  <tom@tromey.com>
5515
5516         * symfile.c (reread_symbols): Use std::string for original_name.
5517
5518 2018-05-21  Tom Tromey  <tom@tromey.com>
5519
5520         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5521         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5522         constructor.
5523
5524 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5525
5526         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5527         instance to...
5528         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5529         * objfiles.c (get_objfile_bfd_data): Allocate
5530         objfile_per_bfd_storage with obstack_new when allocating on
5531         obstack.
5532
5533 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5534
5535         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5536         OBSTACK_ZALLOC.
5537         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5538         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5539         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5540         (add_pending): Likewise.
5541         (parse_symbol): Likewise.
5542         (parse_partial_symbols): Likewise.
5543         (psymtab_to_symtab_1): Likewise.
5544         (new_psymtab): Likewise.
5545         (elfmdebug_build_psymtabs): Likewise.
5546         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5547         * objfiles.c (get_objfile_bfd_data): Likewise.
5548         (objfile_register_static_link): Likewise.
5549         * psymtab.c (allocate_psymtab): Likewise.
5550         * stabsread.c (read_member_functions): Likewise.
5551         * xcoffread.c (xcoff_end_psymtab): Likewise.
5552
5553 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5554
5555         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5556         compiler supports std::is_trivially_constructible.
5557         * common/poison.h: Include obstack.h.
5558         (IsMallocable): Define to is_trivially_constructible if the
5559         compiler supports it, define to true_type otherwise.
5560         (xobnew): New.
5561         (XOBNEW): Redefine.
5562         (xobnewvec): New.
5563         (XOBNEWVEC): Redefine.
5564         * gdb_obstack.h (obstack_zalloc): New.
5565         (OBSTACK_ZALLOC): Redefine.
5566         (obstack_calloc): New.
5567         (OBSTACK_CALLOC): Redefine.
5568         (obstack_new): New.
5569         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5570         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5571         gdbarch.c.
5572         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5573         obstack_calloc/obstack_zalloc.
5574         (gdbarch_obstack_zalloc): Remove.
5575         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5576
5577 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5578
5579         * stack.c (backtrace_command_1): Remove useless variable int i.
5580
5581 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5582
5583         * stack.c (print_frame_info): Fix comment.
5584
5585 2018-05-18  Tom Tromey  <tom@tromey.com>
5586
5587         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5588         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5589         (~dwarf2_per_objfile): Update
5590         (dwarf2_get_dwz_file): Use new.
5591         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5592         unique_ptr.
5593
5594 2018-05-18  Tom Tromey  <tom@tromey.com>
5595
5596         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5597         unique_ptr.
5598         * dwarf2read.c (struct dwp_file): Add constructor and
5599         initializers.
5600         (open_and_init_dwp_file): Return a unique_ptr.
5601         (dwarf2_per_objfile, create_dwp_hash_table)
5602         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5603         (lookup_dwo_unit_in_dwp): Update.
5604         (open_and_init_dwp_file, get_dwp_file): Update.
5605
5606 2018-05-18  Tom Tromey  <tom@tromey.com>
5607
5608         * dwarf2read.c (dwarf2_per_objfile): Update.
5609         (struct mapped_index): Add initializers.
5610         (dwarf2_read_index): Use new.
5611         (dw2_symtab_iter_init): Update.
5612         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5613         unique_ptr.
5614
5615 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5616
5617         * dwarf2read.c (mapped_index) <total_size>: Remove.
5618
5619 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5620
5621         * unittests/format_pieces-selftests.c (test_format_specifier):
5622         Add ARI comments.
5623
5624 2018-05-18  Tom Tromey  <tom@tromey.com>
5625
5626         * c-typeprint.c (maybe_print_hole): New function.
5627         (c_print_type_struct_field_offset): Update.
5628         (c_type_print_base_struct_union): Call maybe_print_hole.
5629
5630 2018-05-17  Keith Seitz  <keiths@redhat.com>
5631
5632         * breakpoint.c (build_bpstat_chain): New function, moved from
5633         bpstat_stop_status.
5634         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5635         If no stop chain is passed, call build_bpstat_chain to build it.
5636         * breakpoint.h (build_bpstat_chain): Declare.
5637         (bpstat_stop_status): Move documentation here from breakpoint.c.
5638         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5639         build the stop chain and pass it to skip_inline_frames.
5640         Pass this stop chain to bpstat_stop_status.
5641         * inline-frame.c: Include breakpoint.h.
5642         (stopped_by_user_bp_inline_frame): New function.
5643         (skip_inline_frames): Add parameter `stop_chain'.
5644         Move documention to inline-frame.h.
5645         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5646         whether the frame should be elided.
5647         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5648         Add moved documentation and update for new parameter.
5649
5650 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5651
5652         PR cli/14975
5653         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5654         unittests/format_pieces-selftests.c.
5655         * common/format.h (format_piece) <operator==>: New.
5656         (format_pieces) <operator[]>: Remove.
5657         * common/format.c (format_pieces::format_pieces): Handle \e.
5658         * unittests/format_pieces-selftests.c: New.
5659
5660 2018-05-17  Tom Tromey  <tom@tromey.com>
5661
5662         PR symtab/23010:
5663         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5664         (dw2_instantiate_symtab): Add skip_partial parameter.
5665         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5666         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5667         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5668         (dw2_expand_symtabs_matching_one)
5669         (dw2_find_pc_sect_compunit_symtab)
5670         (dw2_debug_names_lookup_symbol)
5671         (dw2_debug_names_expand_symtabs_for_function): Update.
5672         (init_cutu_and_read_dies): Add skip_partial parameter.
5673         (process_psymtab_comp_unit, build_type_psymtabs_1)
5674         (process_skeletonless_type_unit, load_partial_comp_unit)
5675         (psymtab_to_symtab_1): Update.
5676         (load_full_comp_unit): Add skip_partial parameter.
5677         (process_imported_unit_die, dwarf2_read_addr_index)
5678         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5679         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5680         (read_signatured_type): Update.
5681
5682 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5683
5684         * value.c (release_value): Remove unused variable.
5685         (record_latest_value): Likewise.
5686         (access_value_history): Likewise.
5687         (preserve_values): Likewise.
5688
5689 2018-05-17  Tom Tromey  <tom@tromey.com>
5690
5691         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5692         Initialize.
5693
5694 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5695
5696         PR gdb/22286
5697         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5698         Also handle registers whose width is not a multiple of
5699         PTRACE_TYPE_RET.
5700         (linux_nat_trad_target::store_register): Likewise.
5701
5702 2018-05-16  Tom Tromey  <tom@tromey.com>
5703
5704         * gdbcore.h (core_bfd): Redefine.
5705         * corelow.c (core_target::close): Update.
5706         (core_target_open): Update.
5707         * progspace.h (struct program_space) <cbfd>: Now a
5708         gdb_bfd_ref_ptr.
5709
5710 2018-05-16  Tom Tromey  <tom@tromey.com>
5711
5712         PR cli/19551:
5713         * symfile-add-flags.h (enum symfile_add_flags)
5714         <SYMFILE_NOT_FILENAME>: New constant.
5715         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5716         objfile name from BFD.
5717         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5718         * minidebug.c (find_separate_debug_file_in_section): Put
5719         ".gnu_debugdata" into BFD's file name.
5720
5721 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5722
5723         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5724         Remove.
5725
5726 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5727
5728         PR binutils/21446
5729         * aarch64-tdep.c (aarch64_analyze_prologue,
5730         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5731         Indicate not interested in errors.
5732
5733 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5734
5735         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5736         Supply the MIPS_ZERO_REGNUM register.
5737
5738 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5739
5740         * mips-tdep.c (mask_address_var): Make variable static.
5741
5742 2018-05-14  Tom Tromey  <tom@tromey.com>
5743
5744         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5745
5746 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5747
5748         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5749         FXSAVE_ADDR for the mxcsr register.
5750
5751 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5752
5753         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5754
5755 2018-05-11  Pedro Alves  <palves@redhat.com>
5756
5757         * corelow.c (core_target) <core_target>: No longer inline.
5758         Initialize m_core_gdbarch, m_core_vec and build the section table
5759         here.
5760         <~core_target>: New.
5761         <core_gdbarch, get_core_register_section>: New methods.
5762         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5763         factored out from ...
5764         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5765         (core_ops): Delete.
5766         (sniff_core_bfd): Add gdbarch parameter.
5767         (core_close): Delete, merged into ...
5768         (core_target::close): ... here.  Delete self.
5769         (core_close_cleanup): Delete.
5770         (core_target_open): Allocate a core_target on the heap.  Use a
5771         unique_ptr instead of a cleanup.  Bits moved into the core_target
5772         ctor.  Adjust to use core_target methods instead of globals.
5773         (get_core_register_section): Rename to ...
5774         (core_target::get_core_register_section): ... this and adjust.
5775         (struct get_core_registers_cb_data): New.
5776         (get_core_registers_cb): Use it.  Use bool.
5777         (core_target::fetch_registers, core_target::files_info)
5778         (core_target::xfer_partial, core_target::read_description)
5779         (core_target::pid_to, core_target::thread_name): Adjust to
5780         reference class fields instead of globals.
5781         * target.h (struct target_ops_deleter, target_ops_up): New.
5782
5783 2018-05-11  Pedro Alves  <palves@redhat.com>
5784
5785         * corefile.c (core_file_command): Move to corelow.c.
5786         * corelow.c (the_core_target): Delete.
5787         (core_file_command): Moved from corefile.c.  Check exec_bfd
5788         instead of the_core_target.  Use target_detach instead of calling
5789         into the_core_target directly.
5790         (maybe_say_no_core_file_now): New.
5791         (core_target::detach): Use it.
5792         (_initialize_corelow): Remove references to the_core_target.
5793         * gdbcore.h (the_core_target): Delete.
5794
5795 2018-05-11  Tom Tromey  <tromey@redhat.com>
5796             Pedro Alves  <palves@redhat.com>
5797
5798         * corefile.c (core_bfd): Remove.
5799         * gdbcore.h (core_bfd): Now a macro.
5800         * progspace.h (struct program_space) <cbfd>: New field.
5801
5802 2018-05-11  Tom Tromey  <tom@tromey.com>
5803
5804         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5805         gdb::def_vector.
5806
5807 2018-05-10  Tom Tromey  <tom@tromey.com>
5808
5809         * configure: Rebuild.
5810         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5811
5812 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5813
5814         PR server/23158:
5815         * regformats/regdat.sh: Adjust script, following the addition
5816         of the new expedite_regs parameter to init_target_desc.
5817
5818 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5819     
5820         PR gdb/23127
5821         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5822         set_gdbarch_significant_addr_bit.
5823         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5824         set_gdbarch_significant_addr_bit.
5825         * utils.c (address_significant): Update to sign extend addr.
5826
5827 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5828
5829         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5830         (xtensa_linux_init_abi): Limit tdep->num_regs by
5831         tdep->num_nopriv_regs.
5832         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5833         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5834         not initialized.
5835
5836 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5837
5838         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5839
5840 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5841
5842         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5843         (I387_MXCSR_INIT_VAL): New constant.
5844         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5845         buffer if it was supplied by the inferior.
5846         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5847         (i387_xsave_get_clear_bv): New function.
5848         (i387_supply_xsave): Only read x87 control registers from the
5849         xsave buffer if the feature is enabled, and the state will have
5850         been written, otherwise, provide a suitable default.
5851         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5852         including x87 control registers.  Update control registers if they
5853         have changed from the default value, and mark features as enabled
5854         as required.
5855         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5856
5857 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5858
5859         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5860
5861 2018-05-07  Tom Tromey  <tom@tromey.com>
5862
5863         * configure: Rebuild.
5864         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5865
5866 2018-05-07  Tom Tromey  <tom@tromey.com>
5867
5868         PR tdep/20362:
5869         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5870         bit.  Use correct value for VDIV.
5871
5872 2018-05-04  Tom Tromey  <tom@tromey.com>
5873
5874         * configure: Rebuild.
5875         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5876
5877 2018-05-04  Tom Tromey  <tom@tromey.com>
5878
5879         * linux-record.c (record_linux_system_call) <case
5880         RECORD_SYS_RECVFROM>: Add "break".
5881
5882 2018-05-04  Tom Tromey  <tom@tromey.com>
5883
5884         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5885         Add missing "break".
5886         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5887         Add missing "break".
5888
5889 2018-05-04  Tom Tromey  <tom@tromey.com>
5890
5891         * rs6000-tdep.c (ppc_process_record_op4)
5892         (ppc_process_record_op63): Add fall-through comment.
5893
5894 2018-05-04  Tom Tromey  <tom@tromey.com>
5895
5896         * i386-tdep.c (i386_process_record): Add fall-through comment.
5897
5898 2018-05-04  Tom Tromey  <tom@tromey.com>
5899
5900         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5901         comment.
5902
5903 2018-05-04  Tom Tromey  <tom@tromey.com>
5904
5905         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5906         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5907         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5908         comment.
5909         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5910         comment.
5911         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5912         comment.
5913
5914 2018-05-04  Tom Tromey  <tom@tromey.com>
5915
5916         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5917
5918 2018-05-04  Tom Tromey  <tom@tromey.com>
5919
5920         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5921         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5922         * symfile.c (section_is_mapped): Fix fall-through comment.
5923         * stabsread.c (define_symbol, read_member_functions): Fix
5924         fall-through comment.
5925         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5926         comment.
5927         * remote.c (remote_wait_as): Fix fall-through comment.
5928         * p-exp.y (yylex): Fix fall-through comment.
5929         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5930         comment.
5931         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5932         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5933         * jv-exp.y (yylex): Fix fall-through comment.
5934         * go-exp.y (lex_one_token): Fix fall-through comment.
5935         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5936         fall-through comment.
5937         * f-exp.y (yylex): Fix fall-through comment.
5938         * dwarf2read.c (process_die): Fix fall-through comments.
5939         * dbxread.c (process_one_symbol): Fix fall-through comment.
5940         * d-exp.y (lex_one_token): Fix fall-through comment.
5941         * cp-name-parser.y (yylex): Fix fall-through comment.
5942         * coffread.c (coff_symtab_read): Fix fall-through comment.
5943         * c-exp.y (lex_one_token): Fix fall-through comment.
5944         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5945         comment.
5946         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5947         comment.
5948
5949 2018-05-04  Tom Tromey  <tom@tromey.com>
5950
5951         PR python/22730:
5952         * NEWS: Mention gdb.execute change.
5953         * gdbcmd.h (execute_control_command): Don't declare.
5954         * python/python.c (execute_gdb_command): Use read_command_lines_1,
5955         execute_control_commands, execute_control_commands_to_string.
5956         * cli/cli-script.h (execute_control_commands)
5957         (execute_control_commands_to_string): Declare.
5958         (execute_control_command): Add from_tty parameter.
5959         * cli/cli-script.c (execute_control_commands)
5960         (execute_control_commands_to_string): New functions.
5961         (execute_user_command): Use execute_control_commands.
5962         (execute_control_command_1): Add "from_tty" parameter.  Update.
5963         (execute_control_command): Likewise.
5964
5965 2018-05-04  Tom Tromey  <tom@tromey.com>
5966
5967         PR python/22731:
5968         * NEWS: Mention that breakpoint commands are writable.
5969         * python/py-breakpoint.c (bppy_set_commands): New function.
5970         (breakpoint_object_getset) <"commands">: Use it.
5971
5972 2018-05-04  Tom Tromey  <tom@tromey.com>
5973
5974         * tracepoint.c (actions_command): Update.
5975         * mi/mi-cmd-break.c (mi_command_line_array)
5976         (mi_command_line_array_cnt, mi_command_line_array_ptr)
5977         (mi_read_next_line): Remove.
5978         (mi_cmd_break_commands): Update.
5979         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5980         function_view.
5981         * cli/cli-script.c (get_command_line): Update.
5982         (process_next_line): Use function_view.  Constify.
5983         (recurse_read_control_structure, read_command_lines)
5984         (read_command_lines_1): Change argument types to function_view.
5985         (do_define_command, document_command): Update.
5986         * breakpoint.h (check_tracepoint_command): Don't declare.
5987         * breakpoint.c (check_tracepoint_command): Remove.
5988         (commands_command_1, create_tracepoint_from_upload): Update.
5989
5990 2018-05-04  Tom Tromey  <tom@tromey.com>
5991
5992         PR gdb/11750:
5993         * cli/cli-script.h (enum command_control_type) <define_control>:
5994         New constant.
5995         * cli/cli-script.c (multi_line_command_p): Handle define_control.
5996         (build_command_line, execute_control_command_1)
5997         (process_next_line): Likewise.
5998         (do_define_command): New function, extracted from define_command.
5999         (define_command): Use it.
6000
6001 2018-05-04  Tom Tromey  <tom@tromey.com>
6002
6003         * tracepoint.c (actions_command): Update.
6004         * cli/cli-script.h (read_command_lines): Update.
6005         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6006         (MAX_TMPBUF): Remove define.
6007         (define_command): Use string_printf.
6008         (document_command): Likewise.
6009         * breakpoint.c (commands_command_1): Update.
6010
6011 2018-05-04  Tom Tromey  <tom@tromey.com>
6012
6013         * top.c (execute_command): Update.
6014         * cli/cli-script.h (print_command_lines): Now varargs.
6015         * cli/cli-script.c (print_command_lines): Now varargs.
6016         (execute_control_command_1) <case while_control, case if_control>:
6017         Update.
6018
6019 2018-05-04  Tom Tromey  <tom@tromey.com>
6020
6021         * tracepoint.c (all_tracepoint_actions): Rename from
6022         all_tracepoint_actions_and_cleanup.  Change return type.
6023         (actions_command, encode_actions_1, encode_actions)
6024         (trace_dump_actions, tdump_command): Update.
6025         * remote.c (remote_download_command_source): Update.
6026         * python/python.c (gdbpy_eval_from_control_command)
6027         (python_command, python_interactive_command): Update.
6028         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6029         * guile/guile.c (guile_command)
6030         (gdbscm_eval_from_control_command, guile_command): Update.
6031         * compile/compile.c (compile_code_command)
6032         (compile_print_command, compile_to_object): Update.
6033         * cli/cli-script.h (struct command_lines_deleter): New.
6034         (counted_command_line): New typedef.
6035         (struct command_line): Add constructor, destructor.
6036         <body_list>: Remove.
6037         <body_list_0, body_list_1>: New members.
6038         (command_line_up): Remove typedef.
6039         (read_command_lines, read_command_lines_1, get_command_line):
6040         Update.
6041         (copy_command_lines): Don't declare.
6042         * cli/cli-script.c (build_command_line): Use "new".
6043         (get_command_line): Return counted_command_line.
6044         (print_command_lines, execute_user_command)
6045         (execute_control_command_1, while_command, if_command): Update.
6046         (realloc_body_list): Remove.
6047         (process_next_line, recurse_read_control_structure): Update.
6048         (read_command_lines, read_command_lines_1): Return counted_command_line.
6049         (free_command_lines): Use "delete".
6050         (copy_command_lines): Remove.
6051         (define_command, document_command, show_user_1): Update.
6052         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6053         a counted_command_line.
6054         * breakpoint.h (counted_command_line): Remove typedef.
6055         (breakpoint_set_commands): Update.
6056         * breakpoint.c (check_no_tracepoint_commands)
6057         (validate_commands_for_breakpoint): Update.
6058         (breakpoint_set_commands): Change commands to be a
6059         counted_command_line.
6060         (commands_command_1, update_dprintf_command_list)
6061         (create_tracepoint_from_upload): Update.
6062
6063 2018-05-04  Tom Tromey  <tom@tromey.com>
6064
6065         * cli/cli-decode.h (cmd_list_element): New constructor.
6066         (~cmd_list_element): New destructor.
6067         (struct cmd_list_element): Add initializers.
6068         * cli/cli-decode.c (do_add_cmd): Use "new".
6069         (delete_cmd): Use "delete".
6070
6071 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6072             Pedro Alves <palves@redhat.com>
6073
6074         PR breakpoints/19806 and support for PR external/20207.
6075         * NEWS: Mention Aarch64 watchpoint improvements.
6076         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6077         watchpoints and PR external/20207 watchpoints.
6078         * nat/aarch64-linux-hw-point.c
6079         (kernel_supports_any_contiguous_range): New.
6080         (aarch64_watchpoint_offset): New.
6081         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6082         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6083         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6084         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6085         next_addr_orig_p.  Support PR external/20207 watchpoints.
6086         (aarch64_downgrade_regs): New.
6087         (aarch64_dr_state_insert_one_point): New parameters offset and
6088         addr_orig.
6089         (aarch64_dr_state_remove_one_point): Likewise.
6090         (aarch64_handle_breakpoint): Update caller.
6091         (aarch64_handle_aligned_watchpoint): Likewise.
6092         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6093         aligned_offset.
6094         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6095         aarch64_downgrade_regs.
6096         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6097         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6098         (DR_CONTROL_MASK): ... this.
6099         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6100         (unsigned int aarch64_watchpoint_offset): New prototype.
6101         (aarch64_linux_set_debug_regs): Remove const from state.
6102         * utils.c (align_up, align_down): Move to ...
6103         * common/common-utils.c (align_up, align_down): ... here.
6104         * utils.h (align_up, align_down): Move to ...
6105         * common/common-utils.h (align_up, align_down): ... here.
6106
6107 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6108
6109         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6110         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6111         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6112         Re-implement to match the ABI as summarized in GCC's
6113         gcc/config/sparc/sparc.c.  All callers updated.
6114         (sparc32_store_arguments): Remove assertion.
6115
6116 2018-05-04  Tom Tromey  <tom@tromey.com>
6117
6118         * printcmd.c: Don't include tui.h.
6119         (decode_format): Use skip_spaces.
6120
6121 2018-05-04  Tom Tromey  <tom@tromey.com>
6122
6123         PR gdb/22619:
6124         * printcmd.c (last_count): New global.
6125         (x_command): Use saved count when repeating.
6126
6127 2018-05-04  Tom Tromey  <tom@tromey.com>
6128
6129         * nto-procfs.c (do_closedir_cleanup): Remove.
6130         (procfs_pidlist): Use gdb_dir_up.
6131         * procfs.c (do_closedir_cleanup): Remove.
6132         (proc_update_threads): Use gdb_dir_up.
6133         * common/filestuff.h (struct gdb_dir_deleter): New.
6134         (gdb_dir_up): New typedef.
6135
6136 2018-05-04  Tom Tromey  <tom@tromey.com>
6137
6138         * ada-lang.c (print_mention_exception): Use std::string.
6139
6140 2018-05-04  Tom Tromey  <tom@tromey.com>
6141
6142         * ada-lang.c (create_excep_cond_exprs): Update.
6143         (ada_exception_catchpoint_cond_string): Use std::string.
6144
6145 2018-05-04  Tom Tromey  <tom@tromey.com>
6146
6147         * ada-lang.c (xget_renaming_scope): Return std::string.
6148         (old_renaming_is_invisible): Update.
6149
6150 2018-05-04  Tom Tromey  <tom@tromey.com>
6151
6152         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6153         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6154
6155 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6156
6157         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6158
6159 2018-05-04  Tom Tromey  <tom@tromey.com>
6160
6161         * remote.c (remote_query_supported_append): Change type.
6162         (remote_check_symbols): Update.
6163
6164 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6165
6166         PR gdb/11420
6167         * configure.ac: Prepend libpython.
6168         * python/python-config.py: Likewise.
6169         * configure: Regenerate.
6170
6171 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6172
6173         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6174
6175 2018-05-03  Pedro Alves  <palves@redhat.com>
6176
6177         * s390-linux-nat.c
6178         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6179         override.  Write 'true' instead of '1'.
6180         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6181         declaration.
6182
6183 2018-05-02  Pedro Alves  <palves@redhat.com>
6184
6185         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6186         add_inf_child_target.
6187         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6188         add_inf_child_target.
6189         * aix-thread.c (aix_thread_target_info): New.
6190         (aix_thread_target) <shortname, longname, doc>: Delete.
6191         <info>: New.
6192         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6193         add_inf_child_target.
6194         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6195         add_inf_child_target.
6196         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6197         add_inf_child_target.
6198         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6199         add_inf_child_target.
6200         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6201         add_inf_child_target.
6202         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6203         add_inf_child_target.
6204         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6205         add_inf_child_target.
6206         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6207         add_inf_child_target.
6208         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6209         add_inf_child_target.
6210         * bfd-target.c (target_bfd_target_info): New.
6211         (target_bfd) <shortname, longname, doc>: Delete.
6212         <info>: New.
6213         * bsd-kvm.c (bsd_kvm_target_info): New.
6214         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6215         <info>: New.
6216         (bsd_kvm_target::open): Rename to ...
6217         (bsd_kvm_target_open): ... this.  Adjust.
6218         * bsd-uthread.c (bsd_uthread_target_info): New.
6219         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6220         <info>: New.
6221         * corefile.c (core_file_command): Adjust.
6222         * corelow.c (core_target_info): New.
6223         (core_target) <shortname, longname, doc>: Delete.
6224         <info>: New.
6225         (core_target::open): Rename to ...
6226         (core_target_open): ... this.  Adjust.
6227         * ctf.c (ctf_target_info): New.
6228         (ctf_target) <shortname, longname, doc>: Delete.
6229         <info>: New.
6230         (ctf_target::open): Rename to ...
6231         (ctf_target_open): ... this.
6232         (_initialize_ctf): Adjust.
6233         * exec.c (exec_target_info): New.
6234         (exec_target) <shortname, longname, doc>: Delete.
6235         <info>: New.
6236         (exec_target::open): Rename to ...
6237         (exec_target_open): ... this.
6238         * gdbcore.h (core_target_open): Declare.
6239         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6240         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6241         add_inf_child_target.
6242         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6243         add_inf_child_target.
6244         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6245         add_inf_child_target.
6246         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6247         add_inf_child_target.
6248         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6249         add_inf_child_target.
6250         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6251         add_inf_child_target.
6252         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6253         add_inf_child_target.
6254         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6255         add_inf_child_target.
6256         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6257         add_inf_child_target.
6258         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6259         add_inf_child_target.
6260         * inf-child.c (inf_child_target_info): New.
6261         (inf_child_target::info): New.
6262         (inf_child_open_target): Remove 'target' parameter.  Use
6263         get_native_target instead.
6264         (inf_child_target::open): Delete.
6265         (add_inf_child_target): New.
6266         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6267         Delete.
6268         <info>: New.
6269         (add_inf_child_target): Declare.
6270         (inf_child_open_target): Declare.
6271         * linux-thread-db.c (thread_db_target_info): New.
6272         (thread_db_target) <shortname, longname, doc>: Delete.
6273         <info>: New.
6274         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6275         add_inf_child_target.
6276         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6277         add_inf_child_target.
6278         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6279         add_inf_child_target.
6280         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6281         add_inf_child_target.
6282         * make-target-delegates (print_class): Adjust.
6283         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6284         add_inf_child_target.
6285         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6286         add_inf_child_target.
6287         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6288         add_inf_child_target.
6289         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6290         add_inf_child_target.
6291         * nto-procfs.c (nto_native_target_info): New.
6292         (nto_procfs_target_native) <shortname, longname, doc>:
6293         Delete.
6294         <info>: New.
6295         (nto_procfs_target_info): New.
6296         (nto_procfs_target_procfs) <shortname, longname, doc>:
6297         Delete.
6298         <info>: New.
6299         (init_procfs_targets): Adjust.
6300         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6301         add_inf_child_target.
6302         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6303         add_inf_child_target.
6304         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6305         add_inf_child_target.
6306         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6307         add_inf_child_target.
6308         * ravenscar-thread.c (ravenscar_target_info): New.
6309         (ravenscar_thread_target) <shortname, longname, doc>:
6310         Delete.
6311         <info>: New.
6312         * record-btrace.c (record_btrace_target_info):
6313         (record_btrace_target) <shortname, longname, doc>: Delete.
6314         <info>: New.
6315         (record_btrace_target::open): Rename to ...
6316         (record_btrace_target_open): ... this.  Adjust.
6317         * record-full.c (record_longname, record_doc): New.
6318         (record_full_base_target) <shortname, longname, doc>: Delete.
6319         <info>: New.
6320         (record_full_target_info): New.
6321         (record_full_target): <shortname>: Delete.
6322         <info>: New.
6323         (record_full_core_open_1, record_full_open_1): Update comments.
6324         (record_full_base_target::open): Rename to ...
6325         (record_full_open): ... this.
6326         (cmd_record_full_restore): Update.
6327         (_initialize_record_full): Update.
6328         * remote-sim.c (remote_sim_target_info): New.
6329         (gdbsim_target) <shortname, longname, doc>: Delete.
6330         <info>: New.
6331         (gdbsim_target::open): Rename to ...
6332         (gdbsim_target_open): ... this.
6333         (_initialize_remote_sim): Adjust.
6334         * remote.c (remote_doc): New.
6335         (remote_target_info): New.
6336         (remote_target) <shortname, longname, doc>: Delete.
6337         <info>: New.
6338         (extended_remote_target_info): New.
6339         (extended_remote_target) <shortname, longname, doc>: Delete.
6340         <info>: New.
6341         (remote_target::open_1): Make static.  Adjust.
6342         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6343         * s390-linux-nat.c (_initialize_s390_nat): Use
6344         add_inf_child_target.
6345         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6346         add_inf_child_target.
6347         * sol-thread.c (thread_db_target_info): New.
6348         (sol_thread_target) <shortname, longname, doc>: Delete.
6349         <info>: New.
6350         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6351         add_inf_child_target.
6352         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6353         add_inf_child_target.
6354         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6355         add_inf_child_target.
6356         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6357         add_inf_child_target.
6358         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6359         add_inf_child_target.
6360         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6361         add_inf_child_target.
6362         * spu-linux-nat.c (_initialize_spu_nat): Use
6363         add_inf_child_target.
6364         * spu-multiarch.c (spu_multiarch_target_info): New.
6365         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6366         <info>: New.
6367         * target-delegates.c: Regenerate.
6368         * target.c: Include <unordered_map>.
6369         (target_ops_p): Delete.
6370         (DEF_VEC_P(target_ops_p)): Delete.
6371         (target_factories): New.
6372         (test_target_info): New.
6373         (test_target_ops::info): New.
6374         (open_target): Adjust to use target_factories.
6375         (add_target_with_completer): Rename to ...
6376         (add_target): ... this.  Change prototype.  Register target_info
6377         and open callback in target_factories.  Register target_info in
6378         command context instead of target_ops.
6379         (add_target): Delete old implementation.
6380         (add_deprecated_target_alias): Change prototype.  Adjust.
6381         (the_native_target): New.
6382         (set_native_target, get_native_target): New.
6383         (find_default_run_target): Use the_native_target.
6384         (find_attach_target, find_run_target): Simplify.
6385         (target_ops::open): Delete.
6386         (dummy_target_info): New.
6387         (dummy_target::shortname, dummy_target::longname)
6388         (dummy_target::doc): Delete.
6389         (dummy_target::info): New.
6390         (debug_target::shortname, debug_target::longname)
6391         (debug_target::doc): Delete.
6392         (debug_target::info): New.
6393         * target.h (struct target_info): New.
6394         (target_ops::~target_ops): Add comment.
6395         (target_ops::info): New.
6396         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6397         longer virtual.  Implement in terms of target_info.
6398         (set_native_target, get_native_target): Declare.
6399         (target_open_ftype): New.
6400         (add_target, add_target_with_completer)
6401         (add_deprecated_target_alias): Change prototype.
6402         (test_target) <shortname, longname, doc>: Delete.
6403         <info>: New.
6404         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6405         add_inf_child_target.
6406         * tracefile-tfile.c (tfile_target_info): New.
6407         (tfile_target) <shortname, longname, doc>: Delete.
6408         <info>: New.
6409         (tfile_target::open): Rename to ...
6410         (tfile_target_open): ... this.
6411         (_initialize_tracefile_tfile): Adjust.
6412         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6413         add_inf_child_target.
6414         * windows-nat.c (_initialize_windows_nat): Use
6415         add_inf_child_target.
6416         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6417         add_inf_child_target.
6418
6419 2018-05-02  Pedro Alves  <palves@redhat.com>
6420
6421         * linux-nat.h (linux_nat_target) <low_new_thread,
6422         low_delete_thread, low_new_fork, low_forget_process,
6423         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6424         New virtual methods.
6425         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6426         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6427         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6428         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6429         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6430         Delete.
6431         * linux-fork.c (delete_fork): Adjust to call low method.
6432         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6433         (linux_nat_new_fork, linux_nat_forget_process_hook)
6434         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6435         (linux_nat_status_is_event):
6436         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6437         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6438         to call low method.
6439         (sigtrap_is_event): Rename to ...
6440         (linux_nat_target::low_status_is_event): ... this.
6441         (linux_nat_set_status_is_event): Delete.
6442         (save_stop_reason, linux_nat_wait_1)
6443         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6444         low methods.
6445         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6446         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6447         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6448         (linux_nat_set_prepare_to_resume): Delete.
6449         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6450         low virtual methods.
6451         * amd64-linux-nat.c: Likewise.
6452         * arm-linux-nat.c: Likewise.
6453         * i386-linux-nat.c: Likewise.
6454         * ia64-linux-nat.c: Likewise.
6455         * mips-linux-nat.c: Likewise.
6456         * ppc-linux-nat.c: Likewise.
6457         * s390-linux-nat.c: Likewise.
6458         * sparc64-linux-nat.c: Likewise.
6459         * x86-linux-nat.c: Likewise.
6460         * x86-linux-nat.h: Include "nat/x86-linux.h".
6461         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6462         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6463         Override methods.
6464
6465 2018-05-02  Pedro Alves  <palves@redhat.com>
6466
6467         * target.h (target_ops)
6468         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6469         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6470         stopped_by_watchpoint, have_continuable_watchpoint,
6471         stopped_data_address, watchpoint_addr_within_range,
6472         can_accel_watchpoint_condition, can_run, thread_alive,
6473         has_all_memory, has_memory, has_stack, has_registers,
6474         has_execution, can_async_p, is_async_p, supports_non_stop,
6475         always_non_stop_p, can_execute_reverse, supports_multi_process,
6476         supports_enable_disable_tracepoint,
6477         supports_disable_randomization, supports_string_tracing,
6478         supports_evaluation_of_breakpoint_conditions,
6479         can_run_breakpoint_commands, filesystem_is_local,
6480         can_download_tracepoint, get_trace_state_variable_value,
6481         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6482         record_is_replaying, record_will_replay,
6483         augmented_libraries_svr4_read>: Adjust to return bool.
6484         * aarch64-linux-nat.c: All implementations adjusted.
6485         * aix-thread.c: All implementations adjusted.
6486         * arm-linux-nat.c: All implementations adjusted.
6487         * breakpoint.c: All implementations adjusted.
6488         * bsd-kvm.c: All implementations adjusted.
6489         * bsd-uthread.c: All implementations adjusted.
6490         * corelow.c: All implementations adjusted.
6491         * ctf.c: All implementations adjusted.
6492         * darwin-nat.c: All implementations adjusted.
6493         * darwin-nat.h: All implementations adjusted.
6494         * exec.c: All implementations adjusted.
6495         * fbsd-nat.c: All implementations adjusted.
6496         * fbsd-nat.h: All implementations adjusted.
6497         * gnu-nat.c: All implementations adjusted.
6498         * gnu-nat.h: All implementations adjusted.
6499         * go32-nat.c: All implementations adjusted.
6500         * ia64-linux-nat.c: All implementations adjusted.
6501         * inf-child.c: All implementations adjusted.
6502         * inf-child.h: All implementations adjusted.
6503         * inf-ptrace.c: All implementations adjusted.
6504         * inf-ptrace.h: All implementations adjusted.
6505         * linux-nat.c: All implementations adjusted.
6506         * linux-nat.h: All implementations adjusted.
6507         * mips-linux-nat.c: All implementations adjusted.
6508         * nto-procfs.c: All implementations adjusted.
6509         * ppc-linux-nat.c: All implementations adjusted.
6510         * procfs.c: All implementations adjusted.
6511         * ravenscar-thread.c: All implementations adjusted.
6512         * record-btrace.c: All implementations adjusted.
6513         * record-full.c: All implementations adjusted.
6514         * remote-sim.c: All implementations adjusted.
6515         * remote.c: All implementations adjusted.
6516         * s390-linux-nat.c: All implementations adjusted.
6517         * sol-thread.c: All implementations adjusted.
6518         * spu-multiarch.c: All implementations adjusted.
6519         * target-delegates.c: All implementations adjusted.
6520         * target.c: All implementations adjusted.
6521         * target.h: All implementations adjusted.
6522         * tracefile-tfile.c: All implementations adjusted.
6523         * tracefile.c: All implementations adjusted.
6524         * tracefile.h: All implementations adjusted.
6525         * windows-nat.c: All implementations adjusted.
6526         * x86-linux-nat.h: All implementations adjusted.
6527         * x86-nat.h: All implementations adjusted.
6528
6529 2018-05-02  Pedro Alves  <palves@redhat.com>
6530
6531         * make-target-delegates (scan_target_h): Don't trim lines here.
6532         Replace sequences of tabs and/or whitespace with a single
6533         whitespace.
6534         (top level, parsing methods): Trim each line before processing it
6535         here.
6536
6537 2018-05-02  Pedro Alves  <palves@redhat.com>
6538             John Baldwin  <jhb@freebsd.org>
6539
6540         * target.h (enum strata) <debug_stratum>: New.
6541         (struct target_ops) <all delegation methods>: Replace by C++
6542         virtual methods, and drop "to_" prefix.  All references updated
6543         throughout.
6544         <to_shortname, to_longname, to_doc, to_data,
6545         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6546         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6547         virtual methods.  All references updated throughout.
6548         <can_attach, supports_terminal_ours, can_create_inferior,
6549         get_thread_control_capabilities, attach_no_wait>: New
6550         virtual methods.
6551         <insert_breakpoint, remove_breakpoint>: Now
6552         TARGET_DEFAULT_NORETURN methods.
6553         <info_proc>: Now returns bool.
6554         <to_magic>: Delete.
6555         (OPS_MAGIC): Delete.
6556         (current_target): Delete.  All references replaced by references
6557         to ...
6558         (target_stack): ... this.  New.
6559         (target_shortname, target_longname): Adjust.
6560         (target_can_run): Now a function declaration.
6561         (default_child_has_all_memory, default_child_has_memory)
6562         (default_child_has_stack, default_child_has_registers)
6563         (default_child_has_execution): Remove target_ops parameter.
6564         (complete_target_initialization): Delete.
6565         (memory_breakpoint_target): New template class.
6566         (test_target_ops): Refactor as a C++ class with virtual methods.
6567         * make-target-delegates (NAME_PART): Tighten.
6568         (POINTER_PART, CP_SYMBOL): New.
6569         (SIMPLE_RETURN_PART): Reimplement.
6570         (VEC_RETURN_PART): Expect less.
6571         (RETURN_PART, VIRTUAL_PART): New.
6572         (METHOD): Adjust to C++ virtual methods.
6573         (scan_target_h): Remove reference to C99.
6574         (dname): Output "target_ops::" prefix.
6575         (write_function_header): Adjust to output a C++ class method.
6576         (write_declaration): New.
6577         (write_delegator): Adjust to output a C++ class method.
6578         (tdname): Output "dummy_target::" prefix.
6579         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6580         method.
6581         (tdefault_names, debug_names): Delete.
6582         (return_types, tdefaults, styles, argtypes_array): New.
6583         (top level): All methods are delegators.
6584         (print_class): New.
6585         (top level): Print dummy_target and debug_target classes.
6586         * target-delegates.c: Regenerate.
6587         * target-debug.h (target_debug_print_enum_info_proc_what)
6588         (target_debug_print_thread_control_capabilities)
6589         (target_debug_print_thread_info_p): New.
6590         * target.c (dummy_target): Delete.
6591         (the_dummy_target, the_debug_target): New.
6592         (target_stack): Now extern.
6593         (set_targetdebug): Push/unpush debug target.
6594         (default_child_has_all_memory, default_child_has_memory)
6595         (default_child_has_stack, default_child_has_registers)
6596         (default_child_has_execution): Remove target_ops parameter.
6597         (complete_target_initialization): Delete.
6598         (add_target_with_completer): No longer call
6599         complete_target_initialization.
6600         (target_supports_terminal_ours): Use regular delegation.
6601         (update_current_target): Delete.
6602         (push_target): No longer check magic number.  Don't call
6603         update_current_target.
6604         (unpush_target): Don't call update_current_target.
6605         (target_is_pushed): No longer check magic number.
6606         (target_require_runnable): Skip for all stratums over
6607         process_stratum.
6608         (target_ops::info_proc): New.
6609         (target_info_proc): Use find_target_at and
6610         find_default_run_target.
6611         (target_supports_disable_randomization): Use regular delegation.
6612         (target_get_osdata): Use find_target_at.
6613         (target_ops::open, target_ops::close, target_ops::can_attach)
6614         (target_ops::attach, target_ops::can_create_inferior)
6615         (target_ops::create_inferior, target_ops::can_run)
6616         (target_can_run): New.
6617         (default_fileio_target): Use regular delegation.
6618         (target_ops::fileio_open, target_ops::fileio_pwrite)
6619         (target_ops::fileio_pread, target_ops::fileio_fstat)
6620         (target_ops::fileio_close, target_ops::fileio_unlink)
6621         (target_ops::fileio_readlink): New.
6622         (target_fileio_open_1, target_fileio_unlink)
6623         (target_fileio_readlink): Always call the target method.  Handle
6624         FILEIO_ENOSYS.
6625         (return_zero, return_zero_has_execution): Delete.
6626         (init_dummy_target): Delete.
6627         (dummy_target::dummy_target, dummy_target::shortname)
6628         (dummy_target::longname, dummy_target::doc)
6629         (debug_target::debug_target, debug_target::shortname)
6630         (debug_target::longname, debug_target::doc): New.
6631         (target_supports_delete_record): Use regular delegation.
6632         (setup_target_debug): Delete.
6633         (maintenance_print_target_stack): Skip debug_stratum.
6634         (initialize_targets): Instantiate the_dummy_target and
6635         the_debug_target.
6636         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6637         use target_stack.
6638         (target_auxv_search, fprint_target_auxv): Adjust.
6639         (info_auxv_command): Adjust to use target_stack.
6640         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6641         * exceptions.c (print_flush): Handle a NULL target_stack.
6642         * regcache.c (target_ops_no_register): Refactor as class with
6643         virtual methods.
6644
6645         * exec.c (exec_target): New class.
6646         (exec_ops): Now an exec_target.
6647         (exec_open, exec_close_1, exec_get_section_table)
6648         (exec_xfer_partial, exec_files_info, exec_has_memory)
6649         (exec_make_note_section): Refactor as exec_target methods.
6650         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6651         Delete.
6652         (exec_target::find_memory_regions): New.
6653         (_initialize_exec): Don't call init_exec_ops.
6654         * gdbcore.h (exec_file_clear): Delete.
6655
6656         * corefile.c (core_target): Delete.
6657         (core_file_command): Adjust.
6658         * corelow.c (core_target): New class.
6659         (the_core_target): New.
6660         (core_close): Remove target_ops parameter.
6661         (core_close_cleanup): Adjust.
6662         (core_target::close): New.
6663         (core_open, core_detach, get_core_registers, core_files_info)
6664         (core_xfer_partial, core_thread_alive, core_read_description)
6665         (core_pid_to_str, core_thread_name, core_has_memory)
6666         (core_has_stack, core_has_registers, core_info_proc): Rework as
6667         core_target methods.
6668         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6669         (_initialize_corelow): Initialize the_core_target.
6670         * gdbcore.h (core_target): Delete.
6671         (the_core_target): New.
6672
6673         * ctf.c: (ctf_target): New class.
6674         (ctf_ops): Now a ctf_target.
6675         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6676         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6677         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6678         methods.
6679         (init_ctf_ops): Delete.
6680         (_initialize_ctf): Don't call it.
6681         * tracefile-tfile.c (tfile_target): New class.
6682         (tfile_ops): Now a tfile_target.
6683         (tfile_open, tfile_close, tfile_files_info)
6684         (tfile_get_tracepoint_status, tfile_trace_find)
6685         (tfile_fetch_registers, tfile_xfer_partial)
6686         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6687         Refactor as tfile_target methods.
6688         (tfile_xfer_partial_features): Remove target_ops parameter.
6689         (init_tfile_ops): Delete.
6690         (_initialize_tracefile_tfile): Don't call it.
6691         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6692         (tracefile_has_stack, tracefile_has_registers)
6693         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6694         tracefile_target methods.
6695         (init_tracefile_ops): Delete.
6696         (tracefile_target::tracefile_target): New.
6697         * tracefile.h: Include "target.h".
6698         (tracefile_target): New class.
6699         (init_tracefile_ops): Delete.
6700
6701         * spu-multiarch.c (spu_multiarch_target): New class.
6702         (spu_ops): Now a spu_multiarch_target.
6703         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6704         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6705         (spu_search_memory, spu_mourn_inferior): Refactor as
6706         spu_multiarch_target methods.
6707         (init_spu_ops): Delete.
6708         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6709         complete_target_initialization.
6710
6711         * ravenscar-thread.c (ravenscar_thread_target): New class.
6712         (ravenscar_ops): Now a ravenscar_thread_target.
6713         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6714         (ravenscar_thread_alive, ravenscar_pid_to_str)
6715         (ravenscar_fetch_registers, ravenscar_store_registers)
6716         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6717         (ravenscar_stopped_by_hw_breakpoint)
6718         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6719         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6720         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6721         methods.
6722         (init_ravenscar_thread_ops): Delete.
6723         (_initialize_ravenscar): Remove references to
6724         init_ravenscar_thread_ops and complete_target_initialization.
6725
6726         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6727         (bsd_uthread_target): New class.
6728         (bsd_uthread_ops): Now a bsd_uthread_target.
6729         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6730         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6731         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6732         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6733         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6734         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6735         (bsd_uthread_target): Delete function.
6736         (_initialize_bsd_uthread): Remove reference to
6737         complete_target_initialization.
6738
6739         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6740         (target_bfd): ... this new class.
6741         (target_bfd_xfer_partial, target_bfd_get_section_table)
6742         (target_bfd_close): Refactor as target_bfd methods.
6743         (target_bfd::~target_bfd): New.
6744         (target_bfd_reopen): Adjust.
6745         (target_bfd::close): New.
6746
6747         * record-btrace.c (record_btrace_target): New class.
6748         (record_btrace_ops): Now a record_btrace_target.
6749         (record_btrace_open, record_btrace_stop_recording)
6750         (record_btrace_disconnect, record_btrace_close)
6751         (record_btrace_async, record_btrace_info)
6752         (record_btrace_insn_history, record_btrace_insn_history_range)
6753         (record_btrace_insn_history_from, record_btrace_call_history)
6754         (record_btrace_call_history_range)
6755         (record_btrace_call_history_from, record_btrace_record_method)
6756         (record_btrace_is_replaying, record_btrace_will_replay)
6757         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6758         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6759         (record_btrace_store_registers, record_btrace_prepare_to_store)
6760         (record_btrace_to_get_unwinder)
6761         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6762         (record_btrace_commit_resume, record_btrace_wait)
6763         (record_btrace_stop, record_btrace_can_execute_reverse)
6764         (record_btrace_stopped_by_sw_breakpoint)
6765         (record_btrace_supports_stopped_by_sw_breakpoint)
6766         (record_btrace_stopped_by_hw_breakpoint)
6767         (record_btrace_supports_stopped_by_hw_breakpoint)
6768         (record_btrace_update_thread_list, record_btrace_thread_alive)
6769         (record_btrace_goto_begin, record_btrace_goto_end)
6770         (record_btrace_goto, record_btrace_stop_replaying_all)
6771         (record_btrace_execution_direction)
6772         (record_btrace_prepare_to_generate_core)
6773         (record_btrace_done_generating_core): Refactor as
6774         record_btrace_target methods.
6775         (init_record_btrace_ops): Delete.
6776         (_initialize_record_btrace): Remove reference to
6777         init_record_btrace_ops.
6778         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6779         the execution_direction global.
6780         (record_full_base_target, record_full_target)
6781         (record_full_core_target): New classes.
6782         (record_full_ops): Now a record_full_target.
6783         (record_full_core_ops): Now a record_full_core_target.
6784         (record_full_target::detach, record_full_target::disconnect)
6785         (record_full_core_target::disconnect)
6786         (record_full_target::mourn_inferior, record_full_target::kill):
6787         New.
6788         (record_full_open, record_full_close, record_full_async): Refactor
6789         as methods of the record_full_base_target class.
6790         (record_full_resume, record_full_commit_resume): Refactor
6791         as methods of the record_full_target class.
6792         (record_full_wait, record_full_stopped_by_watchpoint)
6793         (record_full_stopped_data_address)
6794         (record_full_stopped_by_sw_breakpoint)
6795         (record_full_supports_stopped_by_sw_breakpoint)
6796         (record_full_stopped_by_hw_breakpoint)
6797         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6798         methods of the record_full_base_target class.
6799         (record_full_store_registers, record_full_xfer_partial)
6800         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6801         Refactor as methods of the record_full_target class.
6802         (record_full_can_execute_reverse, record_full_get_bookmark)
6803         (record_full_goto_bookmark, record_full_execution_direction)
6804         (record_full_record_method, record_full_info, record_full_delete)
6805         (record_full_is_replaying, record_full_will_replay)
6806         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6807         (record_full_stop_replaying): Refactor as methods of the
6808         record_full_base_target class.
6809         (record_full_core_resume, record_full_core_kill)
6810         (record_full_core_fetch_registers)
6811         (record_full_core_prepare_to_store)
6812         (record_full_core_store_registers, record_full_core_xfer_partial)
6813         (record_full_core_insert_breakpoint)
6814         (record_full_core_remove_breakpoint)
6815         (record_full_core_has_execution): Refactor
6816         as methods of the record_full_core_target class.
6817         (record_full_base_target::supports_delete_record): New.
6818         (init_record_full_ops): Delete.
6819         (init_record_full_core_ops): Delete.
6820         (record_full_save): Refactor as method of the
6821         record_full_base_target class.
6822         (_initialize_record_full): Remove references to
6823         init_record_full_ops and init_record_full_core_ops.
6824
6825         * remote.c (remote_target, extended_remote_target): New classes.
6826         (remote_ops): Now a remote_target.
6827         (extended_remote_ops): Now an extended_remote_target.
6828         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6829         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6830         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6831         (remote_pass_signals, remote_set_syscall_catchpoint)
6832         (remote_program_signals, )
6833         (remote_thread_always_alive): Remove target_ops parameter.
6834         (remote_thread_alive, remote_thread_name)
6835         (remote_update_thread_list, remote_threads_extra_info)
6836         (remote_static_tracepoint_marker_at)
6837         (remote_static_tracepoint_markers_by_strid)
6838         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6839         (remote_open): Refactor as methods of remote_target.
6840         (extended_remote_open, extended_remote_detach)
6841         (extended_remote_attach, extended_remote_post_attach):
6842         (extended_remote_supports_disable_randomization)
6843         (extended_remote_create_inferior): : Refactor as method of
6844         extended_remote_target.
6845         (remote_set_permissions, remote_open_1, remote_detach)
6846         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6847         (remote_resume, remote_commit_resume, remote_stop)
6848         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6849         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6850         (remote_prepare_to_store, remote_store_registers)
6851         (remote_flash_erase, remote_flash_done, remote_files_info)
6852         (remote_kill, remote_mourn, remote_insert_breakpoint)
6853         (remote_remove_breakpoint, remote_insert_watchpoint)
6854         (remote_watchpoint_addr_within_range)
6855         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6856         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6857         (remote_supports_stopped_by_sw_breakpoint)
6858         (remote_stopped_by_hw_breakpoint)
6859         (remote_supports_stopped_by_hw_breakpoint)
6860         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6861         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6862         (remote_verify_memory): Refactor as methods of remote_target.
6863         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6864         parameter.
6865         (remote_xfer_partial, remote_get_memory_xfer_limit)
6866         (remote_search_memory, remote_rcmd, remote_memory_map)
6867         (remote_pid_to_str, remote_get_thread_local_address)
6868         (remote_get_tib_address, remote_read_description): Refactor as
6869         methods of remote_target.
6870         (remote_target::fileio_open, remote_target::fileio_pwrite)
6871         (remote_target::fileio_pread, remote_target::fileio_close): New.
6872         (remote_hostio_readlink, remote_hostio_fstat)
6873         (remote_filesystem_is_local, remote_can_execute_reverse)
6874         (remote_supports_non_stop, remote_supports_disable_randomization)
6875         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6876         (remote_supports_enable_disable_tracepoint)
6877         (remote_supports_string_tracing)
6878         (remote_can_run_breakpoint_commands, remote_trace_init)
6879         (remote_download_tracepoint, remote_can_download_tracepoint)
6880         (remote_download_trace_state_variable, remote_enable_tracepoint)
6881         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6882         (remote_trace_start, remote_get_trace_status)
6883         (remote_get_tracepoint_status, remote_trace_stop)
6884         (remote_trace_find, remote_get_trace_state_variable_value)
6885         (remote_save_trace_data, remote_get_raw_trace_data)
6886         (remote_set_disconnected_tracing, remote_core_of_thread)
6887         (remote_set_circular_trace_buffer, remote_traceframe_info)
6888         (remote_get_min_fast_tracepoint_insn_len)
6889         (remote_set_trace_buffer_size, remote_set_trace_notes)
6890         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6891         (remote_disable_btrace, remote_teardown_btrace)
6892         (remote_read_btrace, remote_btrace_conf)
6893         (remote_augmented_libraries_svr4_read, remote_load)
6894         (remote_pid_to_exec_file, remote_can_do_single_step)
6895         (remote_execution_direction, remote_thread_handle_to_thread_info):
6896         Refactor as methods of remote_target.
6897         (init_remote_ops, init_extended_remote_ops): Delete.
6898         (remote_can_async_p, remote_is_async_p, remote_async)
6899         (remote_thread_events, remote_upload_tracepoints)
6900         (remote_upload_trace_state_variables): Refactor as methods of
6901         remote_target.
6902         (_initialize_remote): Remove references to init_remote_ops and
6903         init_extended_remote_ops.
6904
6905         * remote-sim.c (gdbsim_target): New class.
6906         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6907         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6908         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6909         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6910         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6911         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6912         Refactor as methods of gdbsim_target.
6913         (gdbsim_ops): Now a gdbsim_target.
6914         (init_gdbsim_ops): Delete.
6915         (gdbsim_cntrl_c): Adjust.
6916         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6917
6918         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6919         (the_amd64_linux_nat_target): New.
6920         (amd64_linux_fetch_inferior_registers)
6921         (amd64_linux_store_inferior_registers): Refactor as methods of
6922         amd64_linux_nat_target.
6923         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6924         * i386-linux-nat.c: Don't include "linux-nat.h".
6925         (i386_linux_nat_target): New class.
6926         (the_i386_linux_nat_target): New.
6927         (i386_linux_fetch_inferior_registers)
6928         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6929         as methods of i386_linux_nat_target.
6930         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6931         * inf-child.c (inf_child_ops): Delete.
6932         (inf_child_fetch_inferior_registers)
6933         (inf_child_store_inferior_registers): Delete.
6934         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6935         methods of inf_child_target.
6936         (inf_child_target::supports_terminal_ours)
6937         (inf_child_target::terminal_init)
6938         (inf_child_target::terminal_inferior)
6939         (inf_child_target::terminal_ours_for_output)
6940         (inf_child_target::terminal_ours, inf_child_target::interrupt)
6941         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6942         New.
6943         (inf_child_open, inf_child_disconnect, inf_child_close)
6944         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6945         (inf_child_post_startup_inferior, inf_child_can_run)
6946         (inf_child_pid_to_exec_file): Refactor as methods of
6947         inf_child_target.
6948         (inf_child_follow_fork): Delete.
6949         (inf_child_target::can_create_inferior)
6950         (inf_child_target::can_attach): New.
6951         (inf_child_target::has_all_memory, inf_child_target::has_memory)
6952         (inf_child_target::has_stack, inf_child_target::has_registers)
6953         (inf_child_target::has_execution): New.
6954         (inf_child_fileio_open, inf_child_fileio_pwrite)
6955         (inf_child_fileio_pread, inf_child_fileio_fstat)
6956         (inf_child_fileio_close, inf_child_fileio_unlink)
6957         (inf_child_fileio_readlink, inf_child_use_agent)
6958         (inf_child_can_use_agent): Refactor as methods of
6959         inf_child_target.
6960         (return_zero, inf_child_target): Delete.
6961         (inf_child_target::inf_child_target): New.
6962         * inf-child.h: Include "target.h".
6963         (inf_child_target): Delete function prototype.
6964         (inf_child_target): New class.
6965         (inf_child_open_target, inf_child_mourn_inferior)
6966         (inf_child_maybe_unpush_target): Delete.
6967         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6968         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6969         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6970         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6971         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6972         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6973         (inf_ptrace_wait, inf_ptrace_xfer_partial)
6974         (inf_ptrace_thread_alive, inf_ptrace_files_info)
6975         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6976         methods of inf_ptrace_target.
6977         (inf_ptrace_target): Delete function.
6978         * inf-ptrace.h: Include "inf-child.h".
6979         (inf_ptrace_target): Delete function declaration.
6980         (inf_ptrace_target): New class.
6981         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6982         * linux-nat.c (linux_target): New.
6983         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6984         (linux_nat_target::~linux_nat_target): New.
6985         (linux_child_post_attach, linux_child_post_startup_inferior)
6986         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6987         (linux_child_remove_fork_catchpoint)
6988         (linux_child_insert_vfork_catchpoint)
6989         (linux_child_remove_vfork_catchpoint)
6990         (linux_child_insert_exec_catchpoint)
6991         (linux_child_remove_exec_catchpoint)
6992         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6993         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6994         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6995         (linux_nat_stopped_data_address)
6996         (linux_nat_stopped_by_sw_breakpoint)
6997         (linux_nat_supports_stopped_by_sw_breakpoint)
6998         (linux_nat_stopped_by_hw_breakpoint)
6999         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7000         (linux_nat_kill, linux_nat_mourn_inferior)
7001         (linux_nat_xfer_partial, linux_nat_thread_alive)
7002         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7003         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7004         (linux_child_static_tracepoint_markers_by_strid)
7005         (linux_nat_is_async_p, linux_nat_can_async_p)
7006         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7007         (linux_nat_supports_multi_process)
7008         (linux_nat_supports_disable_randomization, linux_nat_async)
7009         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7010         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7011         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7012         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7013         methods of linux_nat_target.
7014         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7015         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7016         parameter.
7017         (check_stopped_by_watchpoint): Adjust.
7018         (linux_xfer_partial): Delete.
7019         (linux_target_install_ops, linux_target, linux_nat_add_target):
7020         Delete.
7021         (linux_nat_target::linux_nat_target): New.
7022         * linux-nat.h: Include "inf-ptrace.h".
7023         (linux_nat_target): New.
7024         (linux_target, linux_target_install_ops, linux_nat_add_target):
7025         Delete function declarations.
7026         (linux_target): Declare global.
7027         * linux-thread-db.c (thread_db_target): New.
7028         (thread_db_target::thread_db_target): New.
7029         (thread_db_ops): Delete.
7030         (the_thread_db_target): New.
7031         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7032         (thread_db_update_thread_list, thread_db_pid_to_str)
7033         (thread_db_extra_thread_info)
7034         (thread_db_thread_handle_to_thread_info)
7035         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7036         (thread_db_resume): Refactor as methods of thread_db_target.
7037         (init_thread_db_ops): Delete.
7038         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7039         * x86-linux-nat.c: Don't include "linux-nat.h".
7040         (super_post_startup_inferior): Delete.
7041         (x86_linux_nat_target::~x86_linux_nat_target): New.
7042         (x86_linux_child_post_startup_inferior)
7043         (x86_linux_read_description, x86_linux_enable_btrace)
7044         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7045         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7046         methods of x86_linux_nat_target.
7047         (x86_linux_create_target): Delete.  Bits folded ...
7048         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7049         pointer.
7050         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7051         (x86_linux_nat_target): New class.
7052         (x86_linux_create_target): Delete.
7053         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7054         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7055         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7056         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7057         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7058         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7059         make extern.
7060         (x86_use_watchpoints): Delete.
7061         * x86-nat.h: Include "breakpoint.h" and "target.h".
7062         (x86_use_watchpoints): Delete.
7063         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7064         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7065         (x86_insert_watchpoint, x86_remove_watchpoint)
7066         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7067         (x86_stopped_by_hw_breakpoint): New declarations.
7068         (x86_nat_target): New template class.
7069
7070         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7071         (the_ppc_linux_nat_target): New.
7072         (ppc_linux_fetch_inferior_registers)
7073         (ppc_linux_can_use_hw_breakpoint)
7074         (ppc_linux_region_ok_for_hw_watchpoint)
7075         (ppc_linux_ranged_break_num_registers)
7076         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7077         (ppc_linux_insert_mask_watchpoint)
7078         (ppc_linux_remove_mask_watchpoint)
7079         (ppc_linux_can_accel_watchpoint_condition)
7080         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7081         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7082         (ppc_linux_watchpoint_addr_within_range)
7083         (ppc_linux_masked_watch_num_registers)
7084         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7085         (ppc_linux_read_description): Refactor as methods of
7086         ppc_linux_nat_target.
7087         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7088
7089         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7090         (procfs_target): New class.
7091         (the_procfs_target): New.
7092         (procfs_target): Delete function.
7093         (procfs_auxv_parse, procfs_attach, procfs_detach)
7094         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7095         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7096         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7097         (procfs_create_inferior, procfs_update_thread_list)
7098         (procfs_thread_alive, procfs_pid_to_str)
7099         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7100         (procfs_stopped_data_address, procfs_insert_watchpoint)
7101         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7102         (proc_find_memory_regions, procfs_info_proc)
7103         (procfs_make_note_section): Refactor as methods of procfs_target.
7104         (_initialize_procfs): Adjust.
7105         * sol-thread.c (sol_thread_target): New class.
7106         (sol_thread_ops): Now a sol_thread_target.
7107         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7108         (sol_thread_fetch_registers, sol_thread_store_registers)
7109         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7110         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7111         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7112         (init_sol_thread_ops): Delete.
7113         (_initialize_sol_thread): Adjust.  Remove references to
7114         init_sol_thread_ops and complete_target_initialization.
7115
7116         * windows-nat.c (windows_nat_target): New class.
7117         (windows_fetch_inferior_registers)
7118         (windows_store_inferior_registers, windows_resume, windows_wait)
7119         (windows_attach, windows_detach, windows_pid_to_exec_file)
7120         (windows_files_info, windows_create_inferior)
7121         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7122         (windows_close, windows_pid_to_str, windows_xfer_partial)
7123         (windows_get_tib_address, windows_get_ada_task_ptid)
7124         (windows_thread_name, windows_thread_alive): Refactor as
7125         windows_nat_target methods.
7126         (do_initial_windows_stuff): Adjust.
7127         (windows_target): Delete function.
7128         (_initialize_windows_nat): Adjust.
7129
7130         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7131         (darwin_mourn_inferior, darwin_kill_inferior)
7132         (darwin_create_inferior, darwin_attach, darwin_detach)
7133         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7134         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7135         (darwin_supports_multi_process): Refactor as darwin_nat_target
7136         methods.
7137         (darwin_resume_to, darwin_files_info): Delete.
7138         (_initialize_darwin_inferior): Rename to ...
7139         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7140         * darwin-nat.h: Include "inf-child.h".
7141         (darwin_nat_target): New class.
7142         (darwin_complete_target): Delete.
7143         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7144         (darwin_target): New.
7145         (i386_darwin_fetch_inferior_registers)
7146         (i386_darwin_store_inferior_registers): Refactor as methods of
7147         darwin_nat_target.
7148         (darwin_complete_target): Delete, with ...
7149         (_initialize_i386_darwin_nat): ... bits factored out here.
7150
7151         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7152         (the_alpha_linux_nat_target): New.
7153         (alpha_linux_register_u_offset): Refactor as
7154         alpha_linux_nat_target method.
7155         (_initialize_alpha_linux_nat): Adjust.
7156         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7157         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7158         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7159         methods of linux_nat_trad_target.
7160         (linux_trad_target): Delete.
7161         * linux-nat-trad.h (linux_trad_target): Delete function.
7162         (linux_nat_trad_target): New class.
7163         * mips-linux-nat.c (mips_linux_nat_target): New class.
7164         (super_fetch_registers, super_store_registers, super_close):
7165         Delete.
7166         (the_mips_linux_nat_target): New.
7167         (mips64_linux_regsets_fetch_registers)
7168         (mips64_linux_regsets_store_registers)
7169         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7170         (mips_linux_register_u_offset, mips_linux_read_description)
7171         (mips_linux_can_use_hw_breakpoint)
7172         (mips_linux_stopped_by_watchpoint)
7173         (mips_linux_stopped_data_address)
7174         (mips_linux_region_ok_for_hw_watchpoint)
7175         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7176         (mips_linux_close): Refactor as methods of mips_linux_nat.
7177         (_initialize_mips_linux_nat): Adjust to C++ification.
7178
7179         * aix-thread.c (aix_thread_target): New class.
7180         (aix_thread_ops): Now an aix_thread_target.
7181         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7182         (aix_thread_fetch_registers, aix_thread_store_registers)
7183         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7184         (aix_thread_thread_alive, aix_thread_pid_to_str)
7185         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7186         Refactor as methods of aix_thread_target.
7187         (init_aix_thread_ops): Delete.
7188         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7189         and complete_target_initialization.
7190         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7191         (rs6000_nat_target): New class.
7192         (the_rs6000_nat_target): New.
7193         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7194         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7195         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7196         (super_create_inferior): Delete.
7197         (_initialize_rs6000_nat): Adjust to C++ification.
7198
7199         * arm-linux-nat.c (arm_linux_nat_target): New class.
7200         (the_arm_linux_nat_target): New.
7201         (arm_linux_fetch_inferior_registers)
7202         (arm_linux_store_inferior_registers, arm_linux_read_description)
7203         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7204         (arm_linux_remove_hw_breakpoint)
7205         (arm_linux_region_ok_for_hw_watchpoint)
7206         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7207         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7208         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7209         arm_linux_nat_target.
7210         (_initialize_arm_linux_nat): Adjust to C++ification.
7211
7212         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7213         (the_aarch64_linux_nat_target): New.
7214         (aarch64_linux_fetch_inferior_registers)
7215         (aarch64_linux_store_inferior_registers)
7216         (aarch64_linux_child_post_startup_inferior)
7217         (aarch64_linux_read_description)
7218         (aarch64_linux_can_use_hw_breakpoint)
7219         (aarch64_linux_insert_hw_breakpoint)
7220         (aarch64_linux_remove_hw_breakpoint)
7221         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7222         (aarch64_linux_region_ok_for_hw_watchpoint)
7223         (aarch64_linux_stopped_data_address)
7224         (aarch64_linux_stopped_by_watchpoint)
7225         (aarch64_linux_watchpoint_addr_within_range)
7226         (aarch64_linux_can_do_single_step): Refactor as methods of
7227         aarch64_linux_nat_target.
7228         (super_post_startup_inferior): Delete.
7229         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7230
7231         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7232         (the_hppa_linux_nat_target): New.
7233         (hppa_linux_fetch_inferior_registers)
7234         (hppa_linux_store_inferior_registers): Refactor as methods of
7235         hppa_linux_nat_target.
7236         (_initialize_hppa_linux_nat): Adjust to C++ification.
7237
7238         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7239         (the_ia64_linux_nat_target): New.
7240         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7241         (ia64_linux_stopped_data_address)
7242         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7243         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7244         ia64_linux_nat_target methods.
7245         (super_xfer_partial): Delete.
7246         (_initialize_ia64_linux_nat): Adjust to C++ification.
7247
7248         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7249         (the_m32r_linux_nat_target): New.
7250         (m32r_linux_fetch_inferior_registers)
7251         (m32r_linux_store_inferior_registers): Refactor as
7252         m32r_linux_nat_target methods.
7253         (_initialize_m32r_linux_nat): Adjust to C++ification.
7254
7255         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7256         (the_m68k_linux_nat_target): New.
7257         (m68k_linux_fetch_inferior_registers)
7258         (m68k_linux_store_inferior_registers): Refactor as
7259         m68k_linux_nat_target methods.
7260         (_initialize_m68k_linux_nat): Adjust to C++ification.
7261
7262         * s390-linux-nat.c (s390_linux_nat_target): New class.
7263         (the_s390_linux_nat_target): New.
7264         (s390_linux_fetch_inferior_registers)
7265         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7266         (s390_insert_watchpoint, s390_remove_watchpoint)
7267         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7268         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7269         (s390_auxv_parse, s390_read_description): Refactor as methods of
7270         s390_linux_nat_target.
7271         (_initialize_s390_nat): Adjust to C++ification.
7272
7273         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7274         (the_sparc_linux_nat_target): New.
7275         (_initialize_sparc_linux_nat): Adjust to C++ification.
7276         * sparc-nat.c (sparc_fetch_inferior_registers)
7277         (sparc_store_inferior_registers): Remove target_ops parameter.
7278         * sparc-nat.h (sparc_fetch_inferior_registers)
7279         (sparc_store_inferior_registers): Remove target_ops parameter.
7280         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7281         (the_sparc64_linux_nat_target): New.
7282         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7283
7284         * spu-linux-nat.c (spu_linux_nat_target): New class.
7285         (the_spu_linux_nat_target): New.
7286         (spu_child_post_startup_inferior, spu_child_post_attach)
7287         (spu_child_wait, spu_fetch_inferior_registers)
7288         (spu_store_inferior_registers, spu_xfer_partial)
7289         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7290         methods.
7291         (_initialize_spu_nat): Adjust to C++ification.
7292
7293         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7294         (the_tilegx_linux_nat_target): New.
7295         (fetch_inferior_registers, store_inferior_registers):
7296         Refactor as methods.
7297         (_initialize_tile_linux_nat): Adjust to C++ification.
7298
7299         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7300         (the_xtensa_linux_nat_target): New.
7301         (xtensa_linux_fetch_inferior_registers)
7302         (xtensa_linux_store_inferior_registers): Refactor as
7303         xtensa_linux_nat_target methods.
7304         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7305
7306         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7307         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7308         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7309         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7310         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7311         (fbsd_stopped_by_sw_breakpoint)
7312         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7313         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7314         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7315         (fbsd_post_startup_inferior, fbsd_post_attach)
7316         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7317         (fbsd_set_syscall_catchpoint)
7318         (super_xfer_partial, super_resume, super_wait)
7319         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7320         (fbsd_handle_debug_trap): Remove target_ops parameter.
7321         (fbsd_nat_add_target): Delete.
7322         * fbsd-nat.h: Include "inf-ptrace.h".
7323         (fbsd_nat_add_target): Delete.
7324         (USE_SIGTRAP_SIGINFO): Define.
7325         (fbsd_nat_target): New class.
7326
7327         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7328         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7329         (amd64bsd_target): Delete.
7330         * amd64-bsd-nat.h: New file.
7331         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7332         "x86-bsd-nat.h".
7333         (amd64_fbsd_nat_target): New class.
7334         (the_amd64_fbsd_nat_target): New.
7335         (amd64fbsd_read_description): Refactor as method of
7336         amd64_fbsd_nat_target.
7337         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7338         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7339         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7340         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7341         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7342         (i386bsd_target): Delete.
7343         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7344         (i386bsd_fetch_inferior_registers)
7345         (i386bsd_store_inferior_registers): Declare.
7346         (i386_bsd_nat_target): New class.
7347         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7348         (the_i386_fbsd_nat_target): New.
7349         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7350         i386_fbsd_nat_target methods.
7351         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7352         (_initialize_i386fbsd_nat): Adjust to C++ification.
7353         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7354         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7355         (_initialize_x86_bsd_nat): Adjust to C++ification.
7356         * x86-bsd-nat.h: Include "x86-nat.h".
7357         (x86bsd_target): Delete declaration.
7358         (x86bsd_nat_target): New class.
7359
7360         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7361         (the_aarch64_fbsd_nat_target): New.
7362         (aarch64_fbsd_fetch_inferior_registers)
7363         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7364         aarch64_fbsd_nat_target.
7365         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7366         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7367         (the_alpha_bsd_nat_target): New.
7368         (alphabsd_fetch_inferior_registers)
7369         (alphabsd_store_inferior_registers): Refactor as
7370         alpha_bsd_nat_target methods.
7371         (_initialize_alphabsd_nat): Refactor as methods of
7372         alpha_bsd_nat_target.
7373         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7374         (the_amd64_nbsd_nat_target): New.
7375         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7376         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7377         (the_amd64_obsd_nat_target): New.
7378         (_initialize_amd64obsd_nat): Adjust to C++ification.
7379         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7380         (the_arm_fbsd_nat_target): New.
7381         (arm_fbsd_fetch_inferior_registers)
7382         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7383         (_initialize_arm_fbsd_nat): Refactor as methods of
7384         arm_fbsd_nat_target.
7385         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7386         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7387         (the_arm_netbsd_nat_target): New.
7388         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7389         arm_netbsd_nat_target.
7390         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7391         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7392         (the_hppa_nbsd_nat_target): New.
7393         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7394         hppa_nbsd_nat_target methods.
7395         (_initialize_hppanbsd_nat): Adjust to C++ification.
7396         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7397         (the_hppa_obsd_nat_target): New.
7398         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7399         methods of hppa_obsd_nat_target.
7400         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7401         add_target.
7402         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7403         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7404         add_target.
7405         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7406         (_initialize_i386obsd_nat): Use add_target.
7407         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7408         (the_m68k_bsd_nat_target): New.
7409         (m68kbsd_fetch_inferior_registers)
7410         (m68kbsd_store_inferior_registers): Refactor as methods of
7411         m68k_bsd_nat_target.
7412         (_initialize_m68kbsd_nat): Adjust to C++ification.
7413         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7414         (the_mips_fbsd_nat_target): New.
7415         (mips_fbsd_fetch_inferior_registers)
7416         (mips_fbsd_store_inferior_registers): Refactor as methods of
7417         mips_fbsd_nat_target.
7418         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7419         add_target.
7420         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7421         (the_mips_nbsd_nat_target): New.
7422         (mipsnbsd_fetch_inferior_registers)
7423         (mipsnbsd_store_inferior_registers): Refactor as methods of
7424         mips_nbsd_nat_target.
7425         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7426         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7427         (the_mips64_obsd_nat_target): New.
7428         (mips64obsd_fetch_inferior_registers)
7429         (mips64obsd_store_inferior_registers): Refactor as methods of
7430         mips64_obsd_nat_target.
7431         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7432         add_target.
7433         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7434         nbsd_nat_target.
7435         * nbsd-nat.h: Include "inf-ptrace.h".
7436         (nbsd_nat_target): New class.
7437         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7438         (obsd_wait): Refactor as methods of obsd_nat_target.
7439         (obsd_add_target): Delete.
7440         * obsd-nat.h: Include "inf-ptrace.h".
7441         (obsd_nat_target): New class.
7442         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7443         (the_ppc_fbsd_nat_target): New.
7444         (ppcfbsd_fetch_inferior_registers)
7445         (ppcfbsd_store_inferior_registers): Refactor as methods of
7446         ppc_fbsd_nat_target.
7447         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7448         add_target.
7449         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7450         (the_ppc_nbsd_nat_target): New.
7451         (ppcnbsd_fetch_inferior_registers)
7452         (ppcnbsd_store_inferior_registers): Refactor as methods of
7453         ppc_nbsd_nat_target.
7454         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7455         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7456         (the_ppc_obsd_nat_target): New.
7457         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7458         methods of ppc_obsd_nat_target.
7459         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7460         add_target.
7461         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7462         (the_sh_nbsd_nat_target): New.
7463         (shnbsd_fetch_inferior_registers)
7464         (shnbsd_store_inferior_registers): Refactor as methods of
7465         sh_nbsd_nat_target.
7466         (_initialize_shnbsd_nat): Adjust to C++ification.
7467         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7468         (inf_ptrace_xfer_partial): Delete.
7469         (sparc_xfer_partial, sparc_target): Delete.
7470         * sparc-nat.h (sparc_fetch_inferior_registers)
7471         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7472         (sparc_target): Delete function declaration.
7473         (sparc_target): New template class.
7474         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7475         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7476         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7477         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7478         add_target.
7479         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7480         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7481         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7482         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7483         add_target.
7484         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7485         (the_vax_bsd_nat_target): New.
7486         (vaxbsd_fetch_inferior_registers)
7487         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7488         methods.
7489         (_initialize_vaxbsd_nat): Adjust to C++ification.
7490
7491         * bsd-kvm.c (bsd_kvm_target): New class.
7492         (bsd_kvm_ops): Now a bsd_kvm_target.
7493         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7494         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7495         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7496         bsd_kvm_target.
7497         (bsd_kvm_return_one): Delete.
7498         (bsd_kvm_add_target): Adjust to C++ification.
7499
7500         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7501         (nto_procfs_target_procfs): New classes.
7502         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7503         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7504         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7505         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7506         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7507         (procfs_remove_hw_breakpoint, procfs_resume)
7508         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7509         (procfs_kill_inferior, procfs_store_registers)
7510         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7511         as methods of nto_procfs_target.
7512         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7513         (nto_native_ops): Delete.
7514         (procfs_open, procfs_native_open): Delete.
7515         (nto_native_ops): Now an nto_procfs_target_native.
7516         (init_procfs_targets): Adjust to C++ification.
7517         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7518         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7519         Refactor as methods of nto_procfs_target.
7520
7521         * go32-nat.c (go32_nat_target): New class.
7522         (the_go32_nat_target): New.
7523         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7524         (go32_store_registers, go32_xfer_partial, go32_files_info)
7525         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7526         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7527         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7528         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7529         (go32_target): Delete.
7530         (_initialize_go32_nat): Adjust to C++ification.
7531
7532         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7533         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7534         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7535         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7536         gnu_nat_target.
7537         (gnu_target): Delete.
7538         * gnu-nat.h (gnu_target): Delete.
7539         (gnu_nat_target): New class.
7540         * i386-gnu-nat.c (gnu_base_target): New.
7541         (i386_gnu_nat_target): New class.
7542         (the_i386_gnu_nat_target): New.
7543         (_initialize_i386gnu_nat): Adjust to C++ification.
7544
7545 2018-05-02  Pedro Alves  <palves@redhat.com>
7546
7547         * bfd-target.c (target_bfd_xclose): Rename to ...
7548         (target_bfd_close): ... this.
7549         (target_bfd_reopen): Adjust.
7550         * target.c (target_close): Remove references to to_xclose.
7551         * target.h (target_ops::to_xclose): Delete.
7552         (target_ops::to_close): Update comments.
7553
7554 2018-05-02  Pedro Alves  <palves@redhat.com>
7555
7556         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7557         "linux-nat.h".
7558         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7559         * inf-ptrace.c (inf_ptrace_register_u_offset)
7560         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7561         (inf_ptrace_store_register, inf_ptrace_store_registers)
7562         (inf_ptrace_trad_target): Move to ...
7563         * linux-nat-trad.c: ... this new file.
7564         * linux-nat-trad.h: New file.
7565         * linux-nat.c (linux_target_install_ops): Make extern.
7566         (linux_trad_target): Delete.
7567         * linux-nat.h (linux_trad_target): Delete declaration.
7568         (linux_target_install_ops): Declare.
7569         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7570         "linux-nat.h".
7571
7572 2018-05-02  Pedro Alves  <palves@redhat.com>
7573
7574         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7575         procfs_target/add_target here.
7576         * procfs.c (procfs_target): Make static.
7577         (_initialize_procfs): Call add_target here.
7578         * procfs.h (struct target_ops): Remove forward declaration.
7579         (procfs_target): Remove declaration.
7580         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7581
7582 2018-05-02  Pedro Alves  <palves@redhat.com>
7583
7584         * procfs.c (procfs_stopped_by_watchpoint)
7585         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7586         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7587         Forward declare.
7588         (procfs_use_watchpoints): Delete, move contents...
7589         (procfs_target): ... here.
7590         * procfs.h (procfs_use_watchpoints): Delete declaration.
7591         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7592         procfs_use_watchpoints.
7593         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7594         procfs_use_watchpoints.
7595
7596 2018-05-02  Tom Tromey  <tom@tromey.com>
7597
7598         PR python/20084:
7599         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7600         and var_zuinteger_unlimited.
7601         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7602         and PARAM_ZUINTEGER_UNLIMITED.
7603         (set_parameter_value): Handle var_zuinteger and
7604         var_zuinteger_unlimited.
7605         (add_setshow_generic): Likewise.
7606         (parmpy_init): Likewise.
7607
7608 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7609
7610         PR rust/23124
7611         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7612         pointer is not null before dereferencing it.
7613
7614 2018-04-30  Tom Tromey  <tom@tromey.com>
7615
7616         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7617         is_mi_like_p.
7618
7619 2018-04-30  Tom Tromey  <tom@tromey.com>
7620
7621         * breakpoint.c (mention): Remove use of is_mi_like_p.
7622         (print_mention_ranged_breakpoint): Likewise.
7623         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7624         of is_mi_like_p.
7625
7626 2018-04-30  Tom Tromey  <tom@tromey.com>
7627
7628         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7629
7630 2018-04-30  Tom Tromey  <tom@tromey.com>
7631
7632         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7633         (info_spu_event_command): Remove some uses of is_mi_like_p.
7634
7635 2018-04-30  Tom Tromey  <tom@tromey.com>
7636
7637         * python/py-framefilter.c (py_print_single_arg)
7638         (enumerate_locals, py_print_args, py_print_frame): Remove some
7639         uses of is_mi_like_p.
7640
7641 2018-04-30  Tom Tromey  <tom@tromey.com>
7642
7643         * ui-out.c: Update.
7644         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7645         * ui-out.h (ui_out::is_mi_like_p): Now const.
7646         (ui_out::do_is_mi_like_p): Now const.
7647         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7648
7649 2018-04-30  Tom Tromey  <tom@tromey.com>
7650
7651         * varobj.c (varobj_set_visualizer): Use new_reference.
7652         * python/python.c (gdbpy_decode_line): Use new_reference.
7653         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7654         new_reference.
7655
7656 2018-04-30  Tom Tromey  <tom@tromey.com>
7657
7658         * varobj.c (install_new_value): Use new_reference.
7659         * value.h (value_incref): Return void.  Swap intro comment with
7660         value_decref.
7661         * value.c (set_value_parent): Use new_reference.
7662         (value_incref): Return void.  Update intro comment.
7663         (release_value): Use new_reference.
7664         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7665
7666 2018-04-30  Tom Tromey  <tom@tromey.com>
7667
7668         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7669         * gdb_bfd.h (new_bfd_ref): Remove.
7670         (gdb_bfd_open): Update comment.
7671         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7672         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7673         (gdb_bfd_fdopenr): Use new_reference.
7674         * exec.c (exec_file_attach): Use new_reference.
7675
7676 2018-04-30  Tom Tromey  <tom@tromey.com>
7677
7678         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7679         method.
7680
7681 2018-04-30  Tom Tromey  <tom@tromey.com>
7682
7683         * jit.c (jit_read_code_entry): Use type_align.
7684         * i386-tdep.c (i386_gdbarch_init): Don't call
7685         set_gdbarch_long_long_align_bit.
7686         * gdbarch.sh: Remove long_long_align_bit.
7687         * gdbarch.c, gdbarch.h: Rebuild.
7688         * arc-tdep.c (arc_type_align): New function.
7689         (arc_gdbarch_init): Use arc_type_align.  Don't call
7690         set_gdbarch_long_long_align_bit.
7691
7692 2018-04-30  Tom Tromey  <tom@tromey.com>
7693
7694         * rust-lang.c (rust_type_alignment): Remove.
7695         (rust_composite_type): Use type_align.
7696
7697 2018-04-30  Tom Tromey  <tom@tromey.com>
7698
7699         * NEWS: Mention Type.align.
7700         * python/py-type.c (typy_get_alignof): New function.
7701         (type_object_getset): Add "alignof".
7702
7703 2018-04-30  Tom Tromey  <tom@tromey.com>
7704
7705         PR exp/17095:
7706         * NEWS: Update.
7707         * std-operator.def (UNOP_ALIGNOF): New operator.
7708         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7709         New.
7710         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7711         * c-lang.c (c_op_print_tab): Add alignof.
7712         * c-exp.y (ALIGNOF): New token.
7713         (exp): Add "ALIGNOF" production.
7714         (ident_tokens): Add _Alignof and alignof.
7715
7716 2018-04-30  Tom Tromey  <tom@tromey.com>
7717
7718         * i386-tdep.c (i386_type_align): New function.
7719         (i386_gdbarch_init): Update.
7720         * gdbarch.sh (type_align): New method.
7721         * gdbarch.c, gdbarch.h: Rebuild.
7722         * arch-utils.h (default_type_align): Declare.
7723         * arch-utils.c (default_type_align): New function.
7724         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7725         (struct type) <align_log2>: New field.
7726         <instance_flags>: Now a bitfield.
7727         (TYPE_RAW_ALIGN): New macro.
7728         (type_align, type_raw_align, set_type_align): Declare.
7729         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7730         functions.
7731         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7732         (get_alignment, maybe_set_alignment): New functions.
7733         (read_structure_type, read_enumeration_type, read_array_type)
7734         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7735         (read_subrange_type, read_base_type): Set type alignment.
7736
7737 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7738
7739         * dwarf2read.c (read_index_from_section): Use bool.
7740
7741 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7742
7743         PR gdb/22950
7744         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7745         with #ifdef.
7746
7747 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7748
7749         PR build/22873
7750         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7751         last step, and do it atomically.
7752
7753 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7754
7755         * compile/compile-c-types.c (convert_int, convert_float):
7756         Update for C FE v1.
7757
7758 2018-04-27  Tom Tromey  <tom@tromey.com>
7759
7760         PR rust/22545:
7761         * rust-lang.c (rust_inclusive_range_type_p): New function.
7762         (rust_range): Handle inclusive ranges.
7763         (rust_compute_range): Likewise.
7764         * rust-exp.y (struct rust_op) <inclusive>: New field.
7765         (DOTDOTEQ): New constant.
7766         (range_expr): Add "..=" productions.
7767         (operator_tokens): Add "..=" token.
7768         (ast_range): Add "inclusive" parameter.
7769         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7770         ranges.
7771         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7772         bounds values.
7773         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7774         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7775         Update comments.
7776         * expprint.c (print_subexp_standard): Handle new bounds values.
7777         (dump_subexp_body_standard): Likewise.
7778
7779 2018-04-27  Tom Tromey  <tom@tromey.com>
7780
7781         * configure: Rebuild.
7782         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7783         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7784         "OVERRIDE".
7785         (class symbol_needs_eval_context): Likewise.
7786         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7787         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7788         "virtual".
7789         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7790         "override".
7791         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7792         * aarch64-tdep.c (instruction_reader::read): Use "override".
7793         (instruction_reader_test::read): Likewise.
7794         * arm-tdep.c (instruction_reader::read): Use "override".
7795         (instruction_reader_thumb::read): Likewise.
7796
7797 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7798
7799         PR remote/9665
7800         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7801         instead of remote_send.
7802         (remote_send): Remove.
7803
7804 2018-04-26  Pedro Alves  <palves@redhat.com>
7805
7806         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7807         find_function_start_sal instead of find_pc_line.
7808
7809 2018-04-26  Pedro Alves  <palves@redhat.com>
7810
7811         * breakpoint.c (set_breakpoint_location_function): Handle
7812         mst_data_gnu_ifunc.
7813         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7814         * elfread.c (elf_symtab_read): Give data symbols with
7815         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7816         (elf_rel_plt_read): Update comment.
7817         * linespec.c (convert_linespec_to_sals): Handle
7818         mst_data_gnu_ifunc.
7819         (minsym_found): Handle mst_data_gnu_ifunc.
7820         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7821         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7822         * parse.c (find_minsym_type_and_address): Handle
7823         mst_data_gnu_ifunc.
7824         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7825         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7826         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7827         comment.
7828         <mst_data_gnu_ifunc>: New enumerator.
7829
7830 2018-04-26  Pedro Alves  <palves@redhat.com>
7831
7832         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7833         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7834         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7835         Handle it.
7836         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7837         (lookup_minimal_symbol_by_pc): Adjust.
7838         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7839         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7840         * minsyms.h (lookup_msym_prefer): New enum.
7841         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7842         parameter by a lookup_msym_prefer parameter.
7843
7844 2018-04-26  Pedro Alves  <palves@redhat.com>
7845
7846         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7847         ends in "@plt" instead of looking at the symbol's section.
7848
7849 2018-04-26  Pedro Alves  <palves@redhat.com>
7850
7851         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7852         all references.
7853         (find_pc_partial_function_gnu_ifunc): Rename to ...
7854         (find_pc_partial_function): ... this, and remove references to
7855         'is_gnu_ifunc_p'.
7856         (find_pc_partial_function): Delete old implementation.
7857         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7858
7859 2018-04-26  Pedro Alves  <palves@redhat.com>
7860
7861         * linespec.c (struct bound_minimal_symbol_search_key): New.
7862         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7863         skip first line if we found a GNU ifunc minimal symbol by name.
7864         (compare_msymbols): Change parameters to work with a destructured
7865         lhs minsym.
7866         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7867         functions.
7868
7869 2018-04-26  Pedro Alves  <palves@redhat.com>
7870
7871         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7872         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7873         address/name.
7874         (add_location_to_breakpoint): Store the minsym and the objfile in
7875         the breakpoint location.
7876         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7877         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7878         Record the minsym in the sal.
7879         * symtab.h (symtab_and_line) <msymbol>: New field.
7880
7881 2018-04-26  Pedro Alves  <palves@redhat.com>
7882
7883         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7884         unless we actually resolved the ifunc.
7885
7886 2018-04-26  Pedro Alves  <palves@redhat.com>
7887
7888         * c-exp.y (variable production): Prefer ifunc minsyms over
7889         regular function symbols.
7890         * symtab.c (find_gnu_ifunc): New function.
7891         * minsyms.h (lookup_msym_prefer): New enum.
7892         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7893         parameter by a lookup_msym_prefer parameter.
7894         * symtab.h (find_gnu_ifunc): New declaration.
7895
7896 2018-04-26  Pedro Alves  <palves@redhat.com>
7897
7898         * blockframe.c (find_gnu_ifunc_target_type): New function.
7899         (find_function_type): New.
7900         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7901         return a value with a memory address.
7902         (eval_call): For calls to GNU ifunc functions, try to find the
7903         type of the target function from the type that the resolver
7904         returns.
7905         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7906         symbols.
7907         * infcall.c (find_function_return_type): Delete.
7908         (find_function_addr): Add 'function_type' parameter.  For calls to
7909         GNU ifunc functions, try to find the type of the target function
7910         from the type that the resolver returns, and return it via
7911         FUNCTION_TYPE.
7912         (call_function_by_hand_dummy): Adjust to use the function type
7913         returned by find_function_addr.
7914         (find_function_addr): Add 'function_type' parameter and move
7915         description here.
7916         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7917         declarations.
7918
7919 2018-04-26  Pedro Alves  <palves@redhat.com>
7920
7921         * c-exp.y (variable production): Skip finding an alias for ifunc
7922         symbols.
7923
7924 2018-04-26  Pedro Alves  <palves@redhat.com>
7925
7926         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7927
7928 2018-04-25  Pedro Alves  <palves@redhat.com>
7929
7930         * infcmd.c (kill_command): Print the pid as string, not the whole
7931         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7932         message.
7933         * remote.c (remote_detach_1): Print the pid as string, not the
7934         whole thread's ptid.
7935
7936 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7937             Sergio Durigan Junior  <sergiodj@redhat.com>
7938             Pedro Alves  <palves@redhat.com>
7939
7940         * infcmd.c (kill_command): Print message when inferior has
7941         been killed.
7942         * inferior.c (print_inferior_events): Remove 'static'.  Set as
7943         '1'.
7944         (add_inferior): Improve message printed when
7945         'print_inferior_events' is on.
7946         (exit_inferior): Remove message printed when
7947         'print_inferior_events' is on.
7948         (detach_inferior): Improve message printed when
7949         'print_inferior_events' is on.
7950         (initialize_inferiors): Use 'add_inferior_silent' to set
7951         'current_inferior_'.
7952         * inferior.h (print_inferior_events): Declare here as
7953         'extern'.
7954         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7955         '[Detaching...]' messages when 'print_inferior_events' is on.
7956         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
7957         as prefix/suffix for messages.  Remove periods.  Fix erroneous
7958         'Detaching after fork from child...', replace it by '... from
7959         parent...'.
7960         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7961         prefix/suffix when printing 'Detaching...' messages.  Print
7962         them when 'print_inferior_events' is on.
7963         * remote.c (remote_detach_1): Print message when detaching
7964         from inferior and '!is_fork_parent'.
7965
7966 2018-04-24  Tom Tromey  <tom@tromey.com>
7967
7968         * cli-out.h: Reindent.
7969
7970 2018-04-24  Tom Tromey  <tom@tromey.com>
7971
7972         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7973         (cli_ui_out::do_field_string): Use fputs_filtered.
7974         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7975
7976 2018-04-23  Tom Tromey  <tom@tromey.com>
7977
7978         * guile/scm-frame.c (gdbscm_frame_read_var): Use
7979         gdb::unique_xmalloc_ptr.
7980
7981 2018-04-23  Tom Tromey  <tom@tromey.com>
7982
7983         * configure: Rebuild.
7984
7985 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
7986
7987         PR gdb/23095
7988         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7989         prepare_for_testing.  Set normal_bp to r_debug_state if target
7990         is bsd.
7991
7992 2018-04-21  Pedro Alves  <palves@redhat.com>
7993             Rajendra SY  <rajendra.sy@gmail.com>
7994
7995         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7996         * remote.c (extended_remote_attach): In all-stop mode, mark the
7997         thread as executing.
7998
7999 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8000
8001         * thread.c (thread_apply_all_command): Fix comment.
8002         (thread_command): Fix comment.
8003
8004 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8005
8006         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8007         parameter.
8008         * features/aarch64-core.c (create_feature_aarch64_core):
8009         Regenerate.
8010         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8011         Likewise.
8012         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8013         Likewise.
8014         * features/i386/32bit-avx512.c
8015         (create_feature_i386_32bit_avx512): Likewise.
8016         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8017         Likewise.
8018         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8019         Likewise.
8020         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8021         Likewise.
8022         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8023         Likewise.
8024         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8025         Likewise.
8026         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8027         Likewise.
8028         * features/i386/64bit-avx512.c
8029         (create_feature_i386_64bit_avx512): Likewise.
8030         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8031         Likewise.
8032         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8033         Likewise.
8034         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8035         Likewise.
8036         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8037         Likewise.
8038         * features/i386/64bit-segments.c
8039         (create_feature_i386_64bit_segments): Likewise.
8040         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8041         Likewise.
8042         * features/i386/x32-core.c
8043         (create_feature_i386_x32_core): Likewise.
8044         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8045         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8046         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8047         * target-descriptions.c: In generated code, don't pass xml
8048         filename.
8049
8050 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8051
8052         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8053         (print_xml_feature::visit_post): Likewise.
8054         (print_xml_feature::visit): Likewise.
8055         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8056         (print_xml_feature): Add new class.
8057         * regformats/regdat.sh: Null xmltarget on feature targets.
8058         * target-descriptions.c (struct target_desc): Add xmltarget.
8059         (maintenance_check_tdesc_xml_convert): Add unittest function.
8060         (tdesc_get_features_xml): Add function to get xml.
8061         (maintenance_check_xml_descriptions): Test xml generation.
8062         * xml-tdesc.c (string_read_description_xml): Add function.
8063         * xml-tdesc.h (string_read_description_xml): Add declaration.
8064
8065 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8066
8067         * features/Makefile: Add feature marker to targets with new style
8068         target descriptions.
8069         * regformats/aarch64.dat: Regenerate.
8070         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8071         * regformats/i386/amd64-avx-linux.dat: Likewise.
8072         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8073         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8074         * regformats/i386/amd64-linux.dat: Likewise.
8075         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8076         * regformats/i386/amd64.dat: Likewise.
8077         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8078         * regformats/i386/i386-avx-linux.dat: Likewise.
8079         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8080         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8081         * regformats/i386/i386-linux.dat: Likewise.
8082         * regformats/i386/i386-mmx-linux.dat: Likewise.
8083         * regformats/i386/i386-mpx-linux.dat: Likewise.
8084         * regformats/i386/i386.dat: Likewise.
8085         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8086         * regformats/i386/x32-avx-linux.dat: Likewise.
8087         * regformats/i386/x32-linux.dat: Likewise.
8088         * regformats/tic6x-c62x-linux.dat: Likewise.
8089         * regformats/tic6x-c64x-linux.dat: Likewise.
8090         * regformats/tic6x-c64xp-linux.dat: Likewise.
8091         * regformats/regdat.sh: Parse feature marker.
8092
8093 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8094
8095         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8096         (tdesc_osabi_name): Likewise.
8097         * target-descriptions.c (tdesc_architecture_name): Add new
8098         function.
8099         (tdesc_osabi_name): Likewise.
8100
8101 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8102
8103         * common/tdesc.c (tdesc_predefined_type): Move to here.
8104         (tdesc_named_type): Likewise.
8105         (tdesc_create_vector): Likewise.
8106         (tdesc_create_struct): Likewise.
8107         (tdesc_set_struct_size): Likewise.
8108         (tdesc_create_union): Likewise.
8109         (tdesc_create_flags): Likewise.
8110         (tdesc_create_enum): Likewise.
8111         (tdesc_add_field): Likewise.
8112         (tdesc_add_typed_bitfield): Likewise.
8113         (tdesc_add_bitfield): Likewise.
8114         (tdesc_add_flag): Likewise.
8115         (tdesc_add_enum_value): Likewise.
8116         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8117         (struct tdesc_type_vector): Likewise.
8118         (struct tdesc_type_field): Likewise.
8119         (struct tdesc_type_with_fields): Likewise.
8120         (tdesc_create_enum): Add declaration.
8121         (tdesc_add_typed_bitfield): Likewise.
8122         (tdesc_add_enum_value): Likewise.
8123         * target-descriptions.c (tdesc_type_field): Move from here.
8124         (tdesc_type_builtin): Likewise.
8125         (tdesc_type_vector): Likewise.
8126         (tdesc_type_with_fields): Likewise.
8127         (tdesc_predefined_types): Likewise.
8128         (tdesc_named_type): Likewise.
8129         (tdesc_create_vector): Likewise.
8130         (tdesc_create_struct): Likewise.
8131         (tdesc_set_struct_size): Likewise.
8132         (tdesc_create_union): Likewise.
8133         (tdesc_create_flags): Likewise.
8134         (tdesc_create_enum): Likewise.
8135         (tdesc_add_field): Likewise.
8136         (tdesc_add_typed_bitfield): Likewise.
8137         (tdesc_add_bitfield): Likewise.
8138         (tdesc_add_flag): Likewise.
8139         (tdesc_add_enum_value): Likewise.
8140         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8141         (tdesc_add_typed_bitfield): Likewise.
8142         (tdesc_add_enum_value): Likewise.
8143
8144 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8145
8146         * common/tdesc.c (tdesc_feature::accept): Move to here.
8147         (tdesc_feature::operator==): Likewise.
8148         (tdesc_create_reg): Likewise.
8149         * common/tdesc.h (tdesc_type_kind): Likewise.
8150         (struct tdesc_type): Likewise.
8151         (struct tdesc_feature): Likewise.
8152         * regformats/regdat.sh: Create a feature.
8153         * target-descriptions.c (tdesc_type_kind): Move from here.
8154         (tdesc_type): Likewise.
8155         (tdesc_type_up): Likewise.
8156         (tdesc_feature): Likewise.
8157         (tdesc_create_reg): Likewise.
8158
8159 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8160
8161         * Makefile.in: Add arch/tdesc.c
8162         * common/tdesc.c: New file.
8163         * common/tdesc.h (tdesc_element_visitor): Move to here.
8164         (tdesc_element): Likewise.
8165         (tdesc_reg): Likewise.
8166         (tdesc_reg_up): Likewise.
8167         * regformats/regdef.h (reg): Add offset to constructors.
8168         * target-descriptions.c (tdesc_element_visitor): Move from here.
8169         (tdesc_element): Likewise.
8170         (tdesc_reg): Likewise.
8171         (tdesc_reg_up): Likewise.
8172
8173 2018-04-17  Tom Tromey  <tom@tromey.com>
8174
8175         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8176         discriminant field.
8177
8178 2018-04-17  Tom Tromey  <tom@tromey.com>
8179
8180         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8181
8182 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8183
8184         * symtab.c (print_symbol_info): Skip printing filename and line
8185         number when `last' is NULL.
8186         (symtab_symbol_info): Use empty string instead of NULL for first
8187         invocation of print_symbol_info.
8188         (rbreak_command): Pass NULL to `last' parameter of
8189         print_symbol_info.
8190
8191 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8192
8193         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8194         instead of nullptr.
8195
8196 2018-04-16  Pedro Alves  <palves@redhat.com>
8197
8198         * MAINTAINERS (sh): Remove.
8199         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8200         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8201         (ALLDEPFILES): Remove sh64-tdep.c.
8202         * NEWS: Mentions that support for SH-5/SH64 is removed.
8203         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8204         (sh*-*-openbsd*): Ditto.
8205         (sh64-*-elf*): Remove.
8206         (sh*): Remove.
8207         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8208         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8209         * sh-tdep.c: No longer include "sh64-tdep.h".
8210         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8211         * sh64-tdep.c, sh64-tdep.h: Remove files.
8212
8213 2018-04-16  Pedro Alves  <palves@redhat.com>
8214
8215         * MAINTAINERS: Remove m88k.
8216         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8217         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8218         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8219         * NEWS: Mention that support for m88k was removed.
8220         * configure.host (m88*-*-*): Remove support.
8221         * configure.nat (m88k-*-*): Remove support.
8222         * configure.tgt (m88*-*-openbsd*): Remove.
8223         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8224
8225 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8226
8227         * configure.tgt (x86_tobjs): New variable.
8228         (amd64_tobjs, i386_tobjs): Use it.
8229
8230 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8231
8232         * symtab.c (print_symbol_info): Precede the symbol definition by
8233         the line number when available.
8234         * NEWS: Advertise this enhancement.
8235
8236 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8237
8238         * NEWS (New options): announce set/show record btrace cpu.
8239         * btrace.c: Include record-btrace.h.
8240         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8241         the vendor is unknown.
8242         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8243         Maybe overwrite the btrace configuration's cpu.
8244         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8245         (btrace_fetch): Add cpu parameter.  Update callers.
8246         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8247         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8248         errata workarounds if the vendor is unknown.
8249         * python/py-record-btrace.c: Include record-btrace.h.
8250         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8251         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8252         * record-btrace.c (record_btrace_cpu_state_kind): New.
8253         (record_btrace_cpu): New.
8254         (set_record_btrace_cpu_cmdlist): New.
8255         (record_btrace_get_cpu): New.
8256         (require_btrace_thread, record_btrace_info)
8257         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8258         (cmd_set_record_btrace_cpu_none): New.
8259         (cmd_set_record_btrace_cpu_auto): New.
8260         (cmd_set_record_btrace_cpu): New.
8261         (cmd_show_record_btrace_cpu): New.
8262         (_initialize_record_btrace): Initialize set/show record btrace cpu
8263         commands.
8264         * record-btrace.h (record_btrace_get_cpu): New.
8265
8266 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8267
8268         * record.c (set_record_command): Fix typo in message.
8269
8270 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8271
8272         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8273
8274 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8275
8276         * infrun.c (process_event_stop_test): Call
8277         gdbarch_in_indirect_branch_thunk.
8278         * gdbarch.sh (in_indirect_branch_thunk): New.
8279         * gdbarch.c: Regenerated.
8280         * gdbarch.h: Regenerated.
8281         * x86-tdep.h: New.
8282         * x86-tdep.c: New.
8283         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8284         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8285         (ALLDEPFILES): Add x86-tdep.c.
8286         * arch-utils.h (default_in_indirect_branch_thunk): New.
8287         * arch-utils.c (default_in_indirect_branch_thunk): New.
8288         * i386-tdep: Include x86-tdep.h.
8289         (i386_in_indirect_branch_thunk): New.
8290         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8291         function.
8292         * amd64-tdep: Include x86-tdep.h.
8293         (amd64_in_indirect_branch_thunk): New.
8294         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8295
8296 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8297
8298         PR gdb/23053
8299         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8300         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8301         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8302         regression.
8303
8304 2018-04-12  Tom Tromey  <tom@tromey.com>
8305
8306         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8307         (rust_evaluate_subexp): Likewise.
8308
8309 2018-04-12  Pedro Alves  <palves@redhat.com>
8310
8311         * procfs.c (procfs_detach): Make forward declaration's prototype
8312         match definition's protototype.
8313         (proc_get_LDT_entry): Remove stale do_cleanups call.
8314
8315 2018-04-12  Pedro Alves  <palves@redhat.com>
8316
8317         * target.h (target_ops::to_has_exited): Delete.
8318         (target_has_exited): Delete.
8319         * target-delegates.c: Regenerate.
8320
8321 2018-04-11  Pedro Alves  <palves@redhat.com>
8322
8323         * target.c (fileio_fh_t::t): Add comment.
8324         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8325         (target_fileio_close): Handle a NULL target.
8326         (invalidate_fileio_fh): New.
8327         (target_close): Call it.
8328         * remote.c (remote_hostio_send_command): No longer check whether
8329         remote_desc is open.
8330
8331 2018-04-11  Pedro Alves  <palves@redhat.com>
8332
8333         * target.c (fileio_fh_t): Make it a named struct instead of a
8334         typedef.
8335         (fileio_fh_t::is_closed): New method.
8336         (DEF_VEC_O (fileio_fh_t)): Remove.
8337         (fileio_fhandles): Now a std::vector.
8338         (is_closed_fileio_fh): Delete.
8339         (acquire_fileio_fd): Adjust.  Rename parameters.
8340         (release_fileio_fd): Adjust.
8341         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8342         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8343         (target_fileio_close): Adjust.
8344
8345 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8346
8347         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8348         index.
8349
8350 2018-04-10  Pedro Alves  <palves@redhat.com>
8351
8352         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8353         (scoped_finish_thread_state): New class.
8354         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8355         cleanup.
8356         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8357         (fetch_inferior_event, normal_stop): Likewise.
8358         * thread.c (finish_thread_state_cleanup): Delete.
8359
8360 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8361             Pedro Alves  <palves@redhat.com>
8362
8363         * value.c: Include "selftest.h" and "common/array-view.h".
8364         (struct range) <operator ==>: New.
8365         (test_ranges_contain): New.
8366         (check_ranges_vector): New.
8367         (test_insert_into_bit_range_vector): New.
8368         (_initialize_values): Register selftests.
8369         * common/array-view.h (operator==, operator!=): New.
8370
8371 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8372
8373         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8374         an iterator.
8375         * inline-frame.c: Include <algorithm>.
8376         (struct inline_state): Add constructor.
8377         (inline_state_s): Remove.
8378         (DEF_VEC_O(inline_state_s)): Remove.
8379         (inline_states): Change type to std::vector.
8380         (find_inline_frame_state): Adjust to std::vector.
8381         (allocate_inline_frame_state): Remove.
8382         (clear_inline_frame_state): Adjust to std::vector.
8383         (skip_inline_frames): Adjust to std::vector.
8384
8385 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8386
8387         * tracepoint.h (struct trace_state_variable): Add constructor.
8388         <name>: Change type to std::string.
8389         * tracepoint.c (tsv_s): Remove.
8390         (DEF_VEC_O(tsv_s)): Remove.
8391         (tvariables): Change to std::vector.
8392         (create_trace_state_variable): Adjust to std::vector.
8393         (find_trace_state_variable): Likewise.
8394         (find_trace_state_variable_by_number): Likewise.
8395         (delete_trace_state_variable): Likewise.
8396         (trace_variable_command): Adjust to std::string.
8397         (delete_trace_variable_command): Likewise.
8398         (tvariables_info_1): Adjust to std::vector.
8399         (save_trace_state_variables): Likewise.
8400         (start_tracing): Likewise.
8401         (merge_uploaded_trace_state_variables): Adjust to std::vector
8402         and std::string.
8403         * target.h (struct target_ops)
8404         <to_download_trace_state_variable>: Pass reference to
8405         trace_state_variable.
8406         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8407         * target-delegates.c: Re-generate.
8408         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8409         (mi_tsv_deleted): Likewise.
8410         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8411         * remote.c (remote_download_trace_state_variable): Change
8412         pointer to reference and adjust.
8413         * make-target-delegates (parse_argtypes): Handle references.
8414         (write_function_header): Likewise.
8415         (munge_type): Likewise.
8416
8417 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8418
8419         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8420         string_view-selftests.c.
8421         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8422         testsuite.
8423         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8424         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8425         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8426         * unittests/basic_string_view/element_access/char/1.cc:
8427         Likewise.
8428         * unittests/basic_string_view/element_access/char/empty.cc:
8429         Likewise.
8430         * unittests/basic_string_view/element_access/char/front_back.cc:
8431         Likewise.
8432         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8433         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8434         Likewise.
8435         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8436         Likewise.
8437         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8438         Likewise.
8439         * unittests/basic_string_view/operations/compare/char/1.cc:
8440         Likewise.
8441         * unittests/basic_string_view/operations/compare/char/13650.cc:
8442         Likewise.
8443         * unittests/basic_string_view/operations/copy/char/1.cc:
8444         Likewise.
8445         * unittests/basic_string_view/operations/data/char/1.cc:
8446         Likewise.
8447         * unittests/basic_string_view/operations/find/char/1.cc:
8448         Likewise.
8449         * unittests/basic_string_view/operations/find/char/2.cc:
8450         Likewise.
8451         * unittests/basic_string_view/operations/find/char/3.cc:
8452         Likewise.
8453         * unittests/basic_string_view/operations/find/char/4.cc:
8454         Likewise.
8455         * unittests/basic_string_view/operations/rfind/char/1.cc:
8456         Likewise.
8457         * unittests/basic_string_view/operations/rfind/char/2.cc:
8458         Likewise.
8459         * unittests/basic_string_view/operations/rfind/char/3.cc:
8460         Likewise.
8461         * unittests/basic_string_view/operations/substr/char/1.cc:
8462         Likewise.
8463         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8464         * unittests/string_view-selftests.c: New file.
8465
8466 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8467
8468         * unittests/basic_string_view/capacity/1.cc: New file.
8469         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8470         * unittests/basic_string_view/cons/char/1.cc: New file.
8471         * unittests/basic_string_view/cons/char/2.cc: New file.
8472         * unittests/basic_string_view/cons/char/3.cc: New file.
8473         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8474         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8475         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8476         * unittests/basic_string_view/element_access/char/1.cc: New file.
8477         * unittests/basic_string_view/element_access/char/2.cc: New file.
8478         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8479         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8480         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8481         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8482         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8483         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8484         * unittests/basic_string_view/include.cc: New file.
8485         * unittests/basic_string_view/inserters/char/1.cc: New file.
8486         * unittests/basic_string_view/inserters/char/2.cc: New file.
8487         * unittests/basic_string_view/inserters/char/3.cc: New file.
8488         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8489         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8490         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8491         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8492         * unittests/basic_string_view/literals/types.cc: New file.
8493         * unittests/basic_string_view/literals/values.cc: New file.
8494         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8495         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8496         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8497         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8498         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8499         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8500         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8501         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8502         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8503         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8504         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8505         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8506         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8507         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8508         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8509         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8510         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8511         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8512         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8513         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8514         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8515         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8516         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8517         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8518         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8519         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8520         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8521         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8522         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8523         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8524         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8525         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8526         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8527         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8528         * unittests/basic_string_view/operators/char/2.cc: New file.
8529         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8530         * unittests/basic_string_view/range_access/char/1.cc: New file.
8531         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8532         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8533         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8534         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8535         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8536         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8537         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8538         * unittests/basic_string_view/typedefs.cc: New file.
8539         * unittests/basic_string_view/types/1.cc: New file.
8540
8541 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8542
8543         * common/gdb_string_view.h: Remove libstdc++ implementation
8544         details, adjust to gdb reality.
8545         * common/gdb_string_view.tcc: Likewise.
8546         * cli/cli-script.c (struct string_view): Remove.
8547         (user_args) <m_args>: Change element type to gdb::string_view.
8548         (user_args::insert_args): Adjust.
8549
8550 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8551
8552         * common/gdb_string_view.h: New file.
8553         * common/gdb_string_view.tcc: New file.
8554
8555 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8556
8557         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8558         * configure: Re-generate.
8559
8560 2018-04-09  Pedro Alves  <palves@redhat.com>
8561
8562         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8563         (set_target_gdbarch): Call
8564         gdb::observers::architecture_changed.notify instead of
8565         observer_notify_architecture_changed.
8566
8567 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8568
8569         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8570         (do_restore_current_traceframe_cleanup): Remove.
8571         (restore_current_traceframe_cleanup_dtor): Remove.
8572         (make_cleanup_restore_current_traceframe): Remove.
8573         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8574         New.
8575         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8576         * infrun.c (fetch_inferior_event): Use
8577         scoped_restore_current_traceframe.
8578
8579 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8580
8581         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8582         Remove.
8583         <n_allocated_type_units>: Remove.
8584         <all_type_units>: Change to std::vector.
8585         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8586         to std::vector change.
8587         (dwarf2_per_objfile::get_cutu): Likewise.
8588         (dwarf2_per_objfile::get_tu): Likewise.
8589         (create_signatured_type_table_from_index): Likewise.
8590         (create_signatured_type_table_from_debug_names): Likewise.
8591         (dw2_symtab_iter_next): Likewise.
8592         (dw2_print_stats): Likewise.
8593         (dw2_expand_all_symtabs): Likewise.
8594         (dw2_expand_marked_cus): Likewise.
8595         (dw2_debug_names_iterator::next): Likewise.
8596         (dwarf2_initialize_objfile): Likewise.
8597         (add_signatured_type_cu_to_table): Likewise.
8598         (create_all_type_units): Likewise.
8599         (add_type_unit): Likewise.
8600         (struct tu_abbrev_offset): Add constructor.
8601         (build_type_psymtabs_1): Adjust to std::vector change.
8602         (print_tu_stats): Likewise.
8603         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8604         (write_debug_names): Likewise.
8605
8606 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8607
8608         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8609         Make an std::vector.
8610         <n_comp_units>: Remove.
8611         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8612         to std::vector change.
8613         (dwarf2_per_objfile::get_cutu): Likewise.
8614         (dwarf2_per_objfile::get_cu): Likewise.
8615         (create_cus_from_index): Likewise.
8616         (create_addrmap_from_index): Likewise.
8617         (create_addrmap_from_aranges): Likewise.
8618         (dwarf2_read_index): Likewise.
8619         (dw2_find_last_source_symtab): Likewise.
8620         (dw2_map_symtabs_matching_filename): Likewise.
8621         (dw2_symtab_iter_next): Likewise.
8622         (dw2_print_stats): Likewise.
8623         (dw2_expand_all_symtabs): Likewise.
8624         (dw2_expand_symtabs_with_fullname): Likewise.
8625         (dw2_expand_marked_cus): Likewise.
8626         (dw2_map_symbol_filenames): Likewise.
8627         (create_cus_from_debug_names): Likewise.
8628         (dwarf2_read_debug_names): Likewise.
8629         (dw2_debug_names_iterator::next): Likewise.
8630         (dwarf2_initialize_objfile): Likewise.
8631         (set_partial_user): Likewise.
8632         (dwarf2_build_psymtabs_hard): Likewise.
8633         (read_comp_units_from_section): Remove arguments, adjust to
8634         std::vector change.
8635         (create_all_comp_units): Adjust to std::vector and
8636         read_comp_units_from_section changes.
8637         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8638         change.
8639         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8640         (psyms_seen_size): Likewise.
8641         (write_gdbindex): Likewise.
8642         (write_debug_names): Likewise.
8643
8644 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8645
8646         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8647         with dwarf2_per_objfile.
8648         (create_cus_from_index): Likewise.
8649         (create_signatured_type_table_from_index): Likewise.
8650         (dwarf2_read_index): Likewise.
8651         (dwarf2_initialize_objfile): Likewise.
8652         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8653         per_cu rather than get_dwarf2_per_objfile.
8654
8655 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8656
8657         * dwarf2read.h (struct signatured_type): Forward declare.
8658         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8659         New methods.
8660         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8661         (dw2_get_cutu): ...this.
8662         (dwarf2_per_objfile::get_cu): Rename from...
8663         (dw2_get_cu): ...this.
8664         (dwarf2_per_objfile::get_tu): New.
8665         (create_addrmap_from_index): Adjust.
8666         (create_addrmap_from_aranges): Adjust.
8667         (dw2_find_last_source_symtab): Adjust.
8668         (dw2_map_symtabs_matching_filename): Adjust.
8669         (dw2_symtab_iter_next): Adjust.
8670         (dw2_print_stats): Adjust.
8671         (dw2_expand_all_symtabs): Adjust.
8672         (dw2_expand_symtabs_with_fullname): Adjust.
8673         (dw2_expand_marked_cus): Adjust.
8674         (dw_expand_symtabs_matching_file_matcher): Adjust.
8675         (dw2_map_symbol_filenames): Adjust.
8676         (dw2_debug_names_iterator::next): Adjust.
8677         (dwarf2_initialize_objfile): Adjust.
8678         (set_partial_user): Adjust.
8679         (dwarf2_build_psymtabs_hard): Adjust.
8680
8681 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8682
8683         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8684         Remove unused variables.
8685         (dw2_map_symtabs_matching_filename): Likewise.
8686         (dwarf2_record_block_ranges): Likewise.
8687         (dwarf2_read_addr_index): Likewise.
8688         (follow_die_offset): Likewise.
8689
8690 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8691
8692         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8693         to symbol_file_add_main.
8694
8695 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8696
8697         PR mi/22299
8698         * mi/mi-console.c (do_fputc_async_safe): New.
8699         (mi_console_file::write_async_safe): New.
8700         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8701         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8702         New.
8703         * ui-file.c (ui_file::putstrn): Adjust call to
8704         fputstrn_unfiltered.
8705         * utils.c (printchar): Replace do_fputs and do_fprintf
8706         parameters by do_fputc.
8707         (fputstr_filtered): Adjust call to printchar.
8708         (fputstr_unfiltered): Likewise.
8709         (fputstrn_filtered): Likewise.
8710         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8711         printchar.
8712         * utils.h (do_fputc_ftype): New typedef.
8713         (fputstrn_unfiltered): Add do_fputc parameter.
8714
8715 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8716
8717         * regformats/i386/i386-avx.dat: Remove.
8718
8719 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8720
8721         PR gdb/22979
8722         * amd64-tdep.c (amd64_none_init_abi): New function.
8723         (amd64_x32_none_init_abi): New function.
8724         (_initialize_amd64_tdep): Register handlers for x86-64 and
8725         x64_32 with GDB_OSABI_NONE.
8726         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8727         GDB_OSABI_NONE osabi.
8728
8729 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8730
8731         PR gdb/22980
8732         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8733         GDB_OSABI_NONE.
8734         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8735         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8736
8737 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8738
8739         * common/byte-vector.h (char_vector): New type.
8740         * target.h (target_read_alloc): Return
8741         gdb::optional<byte_vector>.
8742         (target_read_stralloc): Return gdb::optional<char_vector>.
8743         (target_get_osdata): Return gdb::optional<char_vector>.
8744         * target.c (target_read_alloc_1): Templatize.  Replacement
8745         manual memory management with vector.
8746         (target_read_alloc): Change return type, adjust.
8747         (target_read_stralloc): Change return type, adjust.
8748         (target_get_osdata): Change return type, adjust.
8749         * auxv.c (struct auxv_info) <length>: Remove.
8750         <data>: Change type to gdb::optional<byte_vector>.
8751         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8752         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8753         (target_auxv_search): Adjust.
8754         (fprint_target_auxv): Adjust.
8755         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8756         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8757         (linux_make_corefile_notes): Adjust.
8758         * osdata.c (get_osdata): Adjust.
8759         * remote.c (remote_get_threads_with_qxfer): Adjust.
8760         (remote_memory_map): Adjust.
8761         (remote_traceframe_info): Adjust.
8762         (btrace_read_config): Adjust.
8763         (remote_read_btrace): Adjust.
8764         (remote_pid_to_exec_file): Adjust.
8765         * solib-aix.c (solib_aix_get_library_list): Adjust.
8766         * solib-dsbt.c (decode_loadmap): Don't free buf.
8767         (dsbt_get_initial_loadmaps): Adjust.
8768         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8769         * solib-target.c (solib_target_current_sos): Adjust.
8770         * tracepoint.c (sdata_make_value): Adjust.
8771         * xml-support.c (xinclude_start_include): Adjust.
8772         (xml_fetch_content_from_file): Adjust.
8773         * xml-support.h (xml_fetch_another): Change return type.
8774         (xml_fetch_content_from_file): Change return type.
8775         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8776         * xml-tdesc.c (file_read_description_xml): Adjust.
8777         (fetch_available_features_from_target): Change return type.
8778         (target_fetch_description_xml): Adjust.
8779         (target_read_description_xml): Adjust.
8780
8781 2018-04-06  Tom Tromey  <tom@tromey.com>
8782
8783         * value.c (~value): Update.
8784         (struct value) <contents>: Now unique_xmalloc_ptr.
8785         (value_contents_bits_eq, allocate_value_contents)
8786         (value_contents_raw, value_contents_all_raw)
8787         (value_contents_for_printing, value_contents_for_printing_const)
8788         (set_value_enclosing_type): Update.
8789
8790 2018-04-06  Tom Tromey  <tom@tromey.com>
8791
8792         * value.c (range_s): Remove typedef, VEC.
8793         (struct range): Add operator<.
8794         (range_lessthan): Remove.
8795         (ranges_contain): Change type.
8796         (~value): Update.
8797         (struct value) <unavailable, optimized_out>: Now std::vector.
8798         (value_entirely_available)
8799         (value_entirely_covered_by_range_vector)
8800         (value_entirely_unavailable, value_entirely_optimized_out):
8801         Update.
8802         (insert_into_bit_range_vector): Change argument type.
8803         (find_first_range_overlap): Likewise.
8804         (struct ranges_and_idx, value_contents_bits_eq)
8805         (require_not_optimized_out, require_available): Update.
8806         (ranges_copy_adjusted): Change argument types.
8807         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8808
8809 2018-04-06  Tom Tromey  <tom@tromey.com>
8810
8811         * value.c (~value): Update.
8812         (struct value) <parent>: Now a value_ref_ptr.
8813         (value_parent, set_value_parent, value_address, value_copy):
8814         Update.
8815
8816 2018-04-06  Tom Tromey  <tom@tromey.com>
8817
8818         * value.c (struct value): Add constructor, destructor, and member
8819         initializers.
8820         (allocate_value_lazy, value_decref): Update.
8821
8822 2018-04-06  Tom Tromey  <tom@tromey.com>
8823
8824         * value.c (struct value) <released, next>: Remove.
8825         (all_values): Now a std::vector.
8826         (allocate_value_lazy): Update.
8827         (value_next): Remove.
8828         (value_mark, value_free_to_mark, release_value)
8829         (value_release_to_mark): Update.
8830
8831 2018-04-06  Tom Tromey  <tom@tromey.com>
8832
8833         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8834         (free_value_chain): Remove.
8835         * value.c (free_value_chain): Remove.
8836         (value_release_to_mark): Return a std::vector.
8837         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8838         std::vector.
8839         (check_condition): Update.
8840         * eval.c (fetch_subexp_value): Change "val_chain" to a
8841         std::vector.
8842         * breakpoint.c (update_watchpoint): Update.
8843         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8844
8845 2018-04-06  Tom Tromey  <tom@tromey.com>
8846
8847         * value.h (free_all_values): Remove.
8848         * value.c (free_all_values): Remove.
8849
8850 2018-04-06  Tom Tromey  <tom@tromey.com>
8851
8852         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8853         (value_history_chain, value_history_count): Remove.
8854         (value_history): New global.
8855         (record_latest_value, access_value_history, show_values)
8856         (preserve_values): Update.
8857
8858 2018-04-06  Tom Tromey  <tom@tromey.com>
8859
8860         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8861         * varobj.c (varobj_set_display_format, varobj_set_value)
8862         (install_default_visualizer, construct_visualizer)
8863         (install_new_value, ~varobj, varobj_get_value_type)
8864         (my_value_of_variable, varobj_editable_p): Update.
8865         * c-varobj.c (c_describe_child, c_value_of_variable)
8866         (cplus_number_of_children, cplus_describe_child): Update.
8867         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8868         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8869         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8870
8871 2018-04-06  Tom Tromey  <tom@tromey.com>
8872
8873         * printcmd.c (last_examine_address): Change type to
8874         value_ref_ptr.
8875         (do_examine, x_command): Update.
8876
8877 2018-04-06  Tom Tromey  <tom@tromey.com>
8878
8879         * value.c (release_value): Update.
8880         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8881         (struct bpstats) <val>: Now a value_ref_ptr.
8882         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8883         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8884         (~watchpoint, print_it_watchpoint, watch_command_1)
8885         (invalidate_bp_value_on_memory_change): Update.
8886
8887 2018-04-06  Tom Tromey  <tom@tromey.com>
8888
8889         * varobj.c (varobj_clear_saved_item)
8890         (update_dynamic_varobj_children, install_new_value, ~varobj):
8891         Update.
8892         * value.h (value_incref): Move declaration earlier.
8893         (value_decref): Rename from value_free.
8894         (struct value_ref_policy): New.
8895         (value_ref_ptr): New typedef.
8896         (struct value_deleter): Remove.
8897         (gdb_value_up): Remove typedef.
8898         (release_value): Change return type.
8899         (release_value_or_incref): Remove.
8900         * value.c (set_value_parent): Update.
8901         (value_incref): Change return type.
8902         (value_decref): Rename from value_free.
8903         (value_free_to_mark, free_all_values, free_value_chain): Update.
8904         (release_value): Return value_ref_ptr.
8905         (release_value_or_incref): Remove.
8906         (record_latest_value, set_internalvar, clear_internalvar):
8907         Update.
8908         * stack.c (info_frame_command): Don't call value_free.
8909         * python/py-value.c (valpy_dealloc, valpy_new)
8910         (value_to_value_object): Update.
8911         * printcmd.c (do_examine): Update.
8912         * opencl-lang.c (lval_func_free_closure): Update.
8913         * mi/mi-main.c (register_changed_p): Don't call value_free.
8914         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8915         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8916         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8917         value_free.
8918         * guile/scm-value.c (vlscm_free_value_smob)
8919         (vlscm_scm_from_value): Update.
8920         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8921         (frame_unwind_register_unsigned, get_frame_register_bytes)
8922         (put_frame_register_bytes): Don't call value_free.
8923         * findvar.c (address_from_register): Don't call value_free.
8924         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8925         * dwarf2loc.c (entry_data_value_free_closure)
8926         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8927         (dwarf2_evaluate_loc_desc_full): Update.
8928         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8929         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8930         (~watchpoint, watch_command_1)
8931         (invalidate_bp_value_on_memory_change): Update.
8932         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8933
8934 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
8935
8936         PR gdb/23022
8937         * warning.m4: Add -Wno-error=deprecated-register.
8938         * configure: Re-generate.
8939
8940 2018-04-05  Tom Tromey  <tom@tromey.com>
8941
8942         * linespec.h: Remove include of "vec.h".
8943
8944 2018-04-05  Tom Tromey  <tom@tromey.com>
8945
8946         * linespec.c (typep): Remove typedef.
8947         (find_methods, find_superclass_methods): Take a std::vector.
8948         (find_method): Use std::vector.
8949
8950 2018-04-05  Tom Tromey  <tom@tromey.com>
8951
8952         * utils.c (compare_strings): Remove.
8953         * utils.h (compare_strings): Remove.
8954         * objc-lang.h (find_imps): Update.
8955         * objc-lang.c (find_methods): Take a std::vector.
8956         (uniquify_strings, find_imps): Likewise.
8957         * linespec.c (find_methods): Take a std::vector.
8958         (decode_objc): Use std::vector.
8959         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8960         a std::vector.
8961         (find_method, find_function_symbols): Use std::vector.
8962
8963 2018-04-05  Tom Tromey  <tom@tromey.com>
8964
8965         * completer.c (completion_tracker::completion_tracker): Remove
8966         cast.
8967         (completion_tracker::discard_completions): Likewise.
8968         * breakpoint.c (ambiguous_names_p): Remove cast.
8969         * ada-lang.c (_initialize_ada_language): Remove cast.
8970         * utils.h (streq): Update.
8971         (streq_hash): Add new declaration.
8972         * utils.c (streq): Return bool.
8973         (streq_hash): New function.
8974
8975 2018-04-05  Tom Tromey  <tom@tromey.com>
8976
8977         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8978         Remove a string copy.
8979
8980 2018-04-05  Tom Tromey  <tom@tromey.com>
8981
8982         * linespec.c (filter_results): Use std::vector.
8983         (decode_line_2, decode_line_full): Update.
8984
8985 2018-04-05  Tom Tromey  <tom@tromey.com>
8986
8987         * linespec.c (canonical_to_fullform): Return std::string.
8988         (filter_results): Update.
8989         (struct decode_line_2_item): Add constructor.
8990         <fullform, displayform>: Now std::string.
8991         (decode_line_2_compare_items): Now a std::sort comparator.
8992         (decode_line_2): Update.
8993
8994 2018-04-05  Tom Tromey  <tom@tromey.com>
8995
8996         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8997         (unexpected_linespec_error): Update.
8998         (linespec_parse_basic, parse_linespec): Update.
8999
9000 2018-04-05  Tom Tromey  <tom@tromey.com>
9001
9002         * linespec.c (linespec_parse_basic): Reindent.
9003
9004 2018-04-05  Tom Tromey  <tom@tromey.com>
9005
9006         * minsyms.h (iterate_over_minimal_symbols): Update.
9007         * minsyms.c (iterate_over_minimal_symbols): Take a
9008         gdb::function_view.
9009         * linespec.c (struct collect_minsyms): Remove.
9010         (compare_msyms): Now a std::sort comparator.
9011         (add_minsym): Add parameters.
9012         (search_minsyms_for_name): Update.  Use std::vector.
9013
9014 2018-04-03  Tom Tromey  <tom@tromey.com>
9015
9016         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9017         gdb::byte_vector.
9018
9019 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9020
9021         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9022
9023 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9024
9025         PR gdb/16959
9026         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9027         printing static type.
9028
9029 2018-04-01  Tom Tromey  <tom@tromey.com>
9030
9031         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9032         (rs6000_xfer_shared_libraries): Update.
9033
9034 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9035
9036         * common/gdb_vecs.h (char_ptr): Remove.
9037         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9038
9039 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9040
9041         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9042         with std::vector.
9043         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9044
9045 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9046
9047         * tracepoint.h (struct uploaded_tp): Initialize fields.
9048         <actions, step_actions, cmd_strings>: Change type to
9049         std::vector<char *>.
9050         * tracepoint.c (get_uploaded_tp): Allocate with new.
9051         (free_uploaded_tps): Free with delete.
9052         (parse_tracepoint_definition): Adjust to std::vector change.
9053         * breakpoint.c (read_uploaded_action): Likewise.
9054         (create_tracepoint_from_upload): Likewise.
9055         * ctf.c (ctf_write_uploaded_tp): Likewise.
9056         (SET_ARRAY_FIELD): Likewise.
9057         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9058
9059 2018-03-30  Tom Tromey  <tom@tromey.com>
9060
9061         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9062         std::unique_ptr.
9063         (svr4_keep_data_in_core): Update.
9064         (svr4_read_so_list): Update.
9065
9066 2018-03-30  Tom Tromey  <tom@tromey.com>
9067
9068         * windows-nat.c (handle_output_debug_string, handle_exception):
9069         Update.
9070         * target.h (target_read_string): Update.
9071         * target.c (target_read_string): Change "string" to
9072         unique_xmalloc_ptr.
9073         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9074         Update.
9075         * solib-frv.c (frv_current_sos): Update.
9076         * solib-dsbt.c (dsbt_current_sos): Update.
9077         * solib-darwin.c (darwin_current_sos): Update.
9078         * linux-thread-db.c (inferior_has_bug): Update.
9079         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9080         Update.  Remove alloca.
9081         * ada-lang.c (ada_main_name): Update.
9082
9083 2018-03-30  Tom Tromey  <tom@tromey.com>
9084
9085         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9086         (struct dwo_file_deleter): New.
9087         (dwo_file_up): New typedef.
9088         (open_and_init_dwo_file): Use dwo_file_up.
9089         (free_dwo_file_cleanup): Remove.
9090
9091 2018-03-30  Tom Tromey  <tom@tromey.com>
9092
9093         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9094         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9095
9096 2018-03-30  Tom Tromey  <tom@tromey.com>
9097
9098         * dwarf2read.c (class free_cached_comp_units): New class.
9099         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9100         (free_cached_comp_units): Remove function.
9101
9102 2018-03-30  Tom Tromey  <tom@tromey.com>
9103
9104         * utils.h (make_cleanup_unpush_target): Remove.
9105         * inf-ptrace.c (struct target_unpusher): New.
9106         (target_unpush_up) New typedef.
9107         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9108         target_unpush_up.
9109         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9110
9111 2018-03-27  Tom Tromey  <tom@tromey.com>
9112
9113         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9114
9115 2018-03-27  Pedro Alves  <palves@redhat.com>
9116             Tom Tromey  <tom@tromey.com>
9117
9118         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9119         destructor.  Now a class.
9120         (gdb_readline_wrapper_cleanup): Remove function.
9121         (gdb_readline_wrapper): Remove cleanups.
9122
9123 2018-03-27  Tom Tromey  <tom@tromey.com>
9124
9125         * typeprint.h (struct type_print_options) <local_typedefs,
9126         global_typedefs>: Remove "struct" keyword.
9127         (class typedef_hash_table): New class.
9128         (recursively_update_typedef_hash, add_template_parameters)
9129         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9130         (find_typedef_in_hash): Don't declare.
9131         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9132         (typedef_hash_table::recursively_update): Rename from
9133         recursively_update_typedef_hash.  Now a member.
9134         (typedef_hash_table::add_template_parameters): Rename from
9135         add_template_parameters.  Now a member.
9136         (typedef_hash_table::typedef_hash_table): Now a constructor;
9137         rename from create_typedef_hash.
9138         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9139         rename from free_typedef_hash.
9140         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9141         (do_free_global_table): Remove.
9142         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9143         from copy_type_recursive.
9144         (create_global_typedef_table): Remove.
9145         (typedef_hash_table::find_global_typedef): Now a member of
9146         typedef_hash_table.
9147         (typedef_hash_table::find_typedef): Rename from
9148         find_typedef_in_hash; now a member.
9149         (whatis_exp): Update.
9150         * extension.h (struct ext_lang_type_printers): Add constructor and
9151         destructor.
9152         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9153         declare.
9154         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9155         Now a constructor; rename from start_ext_lang_type_printers.
9156         (ext_lang_type_printers): Now a destructor; rename from
9157         free_ext_lang_type_printers.
9158         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9159         Update.
9160         (c_type_print_base_struct_union): Update.  Remove cleanups.
9161
9162 2018-03-27  Tom Tromey  <tom@tromey.com>
9163
9164         * dwarf-index-write.c: Include <cmath>.
9165
9166 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9167
9168         * NEWS: Add entry describing new "set|show varsize-limit" command.
9169         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9170         command.
9171         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9172         "set variable".
9173
9174 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9175
9176         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9177         dwarf-index-write.c
9178         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9179         * dwarf-index-common.c: New file.
9180         * dwarf-index-common.h: New file.
9181         * dwarf-index-write.c: New file.
9182         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9183         (struct dwarf2_section_info): Move from here.
9184         (dwarf2_section_info_def): Likewise.
9185         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9186         (offset_type): Likewise.
9187         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9188         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9189         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9190         (byte_swap): Likewise.
9191         (MAYBE_SWAP): Likewise.
9192         (dwarf2_per_cu_ptr): Likewise.
9193         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9194         (struct tu_stats): Likewise.
9195         (struct dwarf2_per_objfile): Likewise.
9196         (struct dwarf2_per_cu_data): Likewise.
9197         (struct signatured_type): Likewise.
9198         (sig_type_ptr): Likewise.
9199         (DEF_VEC_P (sig_type_ptr)): Likewise.
9200         (INDEX4_SUFFIX): Likewise.
9201         (INDEX5_SUFFIX): Likewise.
9202         (DEBUG_STR_SUFFIX): Likewise.
9203         (dwarf2_read_section): Make non-static.
9204         (mapped_index_string_hash): Move from here.
9205         (dwarf5_djb_hash): Likewise.
9206         (file_write): Likewise.
9207         (class data_buf): Likewise.
9208         (struct symtab_index_entry): Likewise.
9209         (struct mapped_symtab): Likewise.
9210         (find_slot): Likewise.
9211         (hash_expand): Likewise.
9212         (add_index_entry): Likewise.
9213         (uniquify_cu_indices): Likewise.
9214         (class c_str_view): Likewise.
9215         (class c_str_view_hasher): Likewise.
9216         (class vector_hasher): Likewise.
9217         (write_hash_table): Likewise.
9218         (psym_index_map): Likewise.
9219         (struct addrmap_index_data): Likewise.
9220         (add_address_entry): Likewise.
9221         (add_address_entry_worker): Likewise.
9222         (write_address_map): Likewise.
9223         (symbol_kind): Likewise.
9224         (write_psymbols): Likewise.
9225         (struct signatured_type_index_data): Likewise.
9226         (write_one_signatured_type): Likewise.
9227         (recursively_count_psymbols): Likewise.
9228         (recursively_write_psymbols): Likewise.
9229         (class debug_names): Likewise.
9230         (check_dwarf64_offsets): Likewise.
9231         (psyms_seen_size): Likewise.
9232         (write_gdbindex): Likewise.
9233         (write_debug_names): Likewise.
9234         (assert_file_size): Likewise.
9235         (write_psymtabs_to_index): Likewise.
9236         (save_gdb_index_command): Likewise.
9237         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9238         command.
9239         * dwarf2read.h: New file.
9240
9241 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9242
9243         PR gdb/22670
9244         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9245         symbol name if the CU's language stores symbol names in linkage
9246         format.
9247         * language.h (struct language_defn)
9248         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9249         all instances of this struct.
9250
9251 2018-03-26  Tom Tromey  <tom@tromey.com>
9252
9253         * stack.c (backtrace_command_1): Remove verbose code.
9254
9255 2018-03-26  Tom Tromey  <tom@tromey.com>
9256
9257         * python/py-framefilter.c (py_print_type): Don't catch
9258         exceptions.  Return void.
9259         (py_print_value): Likewise.
9260         (py_print_single_arg): Likewise.
9261         (enumerate_args): Don't catch exceptions.
9262         (py_print_args): Likewise.
9263         (py_print_frame): Likewise.
9264         (gdbpy_apply_frame_filter): Catch exceptions here.
9265
9266 2018-03-26  Tom Tromey  <tom@tromey.com>
9267
9268         * stack.c (_initialize_stack): Remove trailing newlines from help
9269         text.  Add "Usage" line to "backtrace" help.
9270
9271 2018-03-26  Tom Tromey  <tom@tromey.com>
9272
9273         PR python/16486:
9274         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9275
9276 2018-03-26  Tom Tromey  <tom@tromey.com>
9277
9278         * python/py-framefilter.c (py_print_single_arg): Return
9279         EXT_LANG_BT_ERROR from catch.
9280
9281 2018-03-26  Tom Tromey  <tom@tromey.com>
9282
9283         PR backtrace/15584:
9284         * stack.c (backtrace_command_1): Move some code into no-filters
9285         "if".
9286
9287 2018-03-26  Tom Tromey  <tom@tromey.com>
9288
9289         * python/py-framefilter.c (throw_quit_or_print_exception): New
9290         function.
9291         (gdbpy_apply_frame_filter): Use it.
9292
9293 2018-03-26  Tom Tromey  <tom@tromey.com>
9294
9295         PR cli/17716:
9296         * python/py-framefilter.c (py_print_type, py_print_value)
9297         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9298         RETURN_MASK_ERROR.
9299
9300 2018-03-26  Tom Tromey  <tom@tromey.com>
9301
9302         * python/py-framefilter.c (enumerate_args): Use
9303         gdb::unique_xmalloc_ptr.
9304
9305 2018-03-26  Tom Tromey  <tom@tromey.com>
9306
9307         * python/py-framefilter.c (py_print_frame): Return
9308         EXT_LANG_BT_OK.
9309         (gdbpy_apply_frame_filter): Update comment.
9310         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9311         Remove.
9312         <EXT_LANG_BT_NO_FILTERS>: Change value.
9313
9314 2018-03-26  Tom Tromey  <tom@tromey.com>
9315
9316         PR backtrace/15582:
9317         * stack.c (backtrace_command): Parse "hide" argument.
9318         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9319         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9320         constant.
9321
9322 2018-03-26  Tom Tromey  <tom@tromey.com>
9323
9324         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9325         add "flags".
9326         (backtrace_command): Remove "fulltrace", add "flags".
9327
9328 2018-03-26  Tom Tromey  <tom@tromey.com>
9329
9330         * stack.c (backtrace_command): Rewrite command line parsing.
9331
9332 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9333
9334         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9335
9336 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9337
9338         * filename-seen-cache.h: Add include guard.
9339
9340 2018-03-26  Keith Seitz  <keiths@redhat.com>
9341
9342         * symfile.c (place_section): Remove "struct" from section_addr_info
9343         in comment.
9344         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9345         "struct" keyword from section_addr_info.
9346
9347 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9348
9349         * regformats/regdef.h (reg): Add constructors.
9350
9351 2018-03-25  Pedro Alves  <palves@redhat.com>
9352
9353         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9354         if then/else bodies in var_func_name extraction.
9355
9356 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9357
9358         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9359         lookup_minimal_symbol() to find symbol entry.
9360         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9361
9362 2018-03-23  Keith Seitz  <keiths@redhat.com>
9363
9364         PR c++/22968
9365         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9366         nested type definitions for C++, too.
9367
9368 2018-03-23  Tom Tromey  <tom@tromey.com>
9369
9370         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9371         a typedef.
9372         (macho_register_oso): Remove.
9373         (macho_symtab_read): Take a std::vector.
9374         (oso_el_compare_name): Now a std::sort comparator.
9375         (macho_symfile_read_all_oso): Take a std::vector.
9376         (macho_symfile_read): Use std::vector.  Remove cleanups.
9377
9378 2018-03-22  Tom Tromey  <tom@tromey.com>
9379
9380         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9381         (record_full_goto_bookmark): Use std::string.
9382
9383 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9384
9385         PR tdep/18295
9386         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9387         a single mask.
9388
9389 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9390
9391         * rs6000-tdep.c (store_insn_p): New function.
9392         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9393         and cr_reg to their unshifted values. Use store_insn_p to
9394         match LR saves using either R1 or fdata->alloca_reg. Use
9395         store_insn_p to match CR saves. Set alloca_reg_offset
9396         when alloca_reg and framep are set. Remove lr_reg shift
9397         when assigning to fdata->lr_register.
9398
9399 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9400
9401         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9402         command line args instead of emitting a warning.
9403
9404 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9405
9406         * tracepoint.h (struct static_tracepoint_marker): Initialize
9407         fields, define default constructor, move constructor and move
9408         assignment, disable the rest.
9409         <str_id, extra>: Make std::string.
9410         (release_static_tracepoint_marker): Remove.
9411         (free_current_marker): Remove.
9412         * tracepoint.c (free_current_marker): Remove.
9413         (parse_static_tracepoint_marker_definition): Adjust to
9414         std::string, use new hex2str overload.
9415         (release_static_tracepoint_marker): Remove.
9416         (print_one_static_tracepoint_marker): Get marker by reference
9417         and adjust to std::string.
9418         (info_static_tracepoint_markers_command): Adjust to std::vector
9419         changes
9420         * target.h (static_tracepoint_marker_p): Remove typedef.
9421         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9422         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9423         bool.
9424         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9425         * target-debug.h
9426         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9427         (target_debug_print_std_vector_static_tracepoint_marker): New.
9428         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9429         to...
9430         (target_debug_print_static_tracepoint_marker_p): ... this.
9431         * target-delegates.c: Re-generate.
9432         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9433         Make std::string.
9434         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9435         (decode_static_tracepoint_spec): Adjust to std::vector.
9436         (tracepoint_print_one_detail): Adjust to std::string.
9437         (strace_marker_decode_location): Adjust to std::string.
9438         (update_static_tracepoint): Adjust to std::string, remove call
9439         to release_static_tracepoint_marker.
9440         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9441         Adjust to std::vector.
9442         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9443         (remote_static_tracepoint_markers_by_strid): Adjust to
9444         std::vector.
9445         * common/rsp-low.h (hex2str): New overload with explicit count
9446         of bytes.
9447         * common/rsp-low.c (hex2str): New overload with explicit count
9448         of bytes.
9449         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9450         (_initialize_rsp_low_selftests): Add test_hex2str test.
9451         * unittests/tracepoint-selftests.c
9452         (test_parse_static_tracepoint_marker_definition): Adjust to
9453         std::string.
9454
9455 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9456
9457         * tracepoint.c (parse_static_tracepoint_marker_definition):
9458         Consider case where the definition is followed by more
9459         definitions.
9460         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9461         tracepoint-selftests.c.
9462         * unittests/tracepoint-selftests.c: New.
9463
9464 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9465
9466         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9467         Carvalho.
9468
9469 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9470
9471         * symtab.c (find_pc_sect_line): fixed indentation.
9472
9473 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9474
9475         * symtab.c (find_pc_sect_line): now uses binary search.
9476
9477 2018-03-19  Tom Tromey  <tom@tromey.com>
9478
9479         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9480         "IDENT" production.
9481
9482 2018-03-19  Pedro Alves  <palves@redhat.com>
9483             Tom Tromey  <tom@tromey.com>
9484
9485         * unittests/observable-selftests.c: New file.
9486         * common/observable.h: New file.
9487         * observable.h: New file.
9488         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9489         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9490         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9491         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9492         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9493         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9494         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9495         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9496         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9497         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9498         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9499         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9500         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9501         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9502         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9503         tui/tui-interp.c, valops.c: Update all users.
9504         * tui/tui-hooks.c (tui_bp_created_observer)
9505         (tui_bp_deleted_observer, tui_bp_modified_observer)
9506         (tui_inferior_exit_observer, tui_before_prompt_observer)
9507         (tui_normal_stop_observer, tui_register_changed_observer):
9508         Remove.
9509         (tui_observers_token): New global.
9510         (attach_or_detach, tui_attach_detach_observers): New functions.
9511         (tui_install_hooks, tui_remove_hooks): Use
9512         tui_attach_detach_observers.
9513         * record-btrace.c (record_btrace_thread_observer): Remove.
9514         (record_btrace_thread_observer_token): New global.
9515         * observer.sh: Remove.
9516         * observer.c: Rename to observable.c.
9517         * observable.c (namespace gdb_observers): Define new objects.
9518         (observer_debug): Move into gdb_observers namespace.
9519         (struct observer, struct observer_list, xalloc_observer_list_node)
9520         (xfree_observer_list_node, generic_observer_attach)
9521         (generic_observer_detach, generic_observer_notify): Remove.
9522         (_initialize_observer): Update.
9523         Don't include observer.inc.
9524         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9525         (clean mostlyclean): Likewise.
9526         (observer.h, observer.inc): Remove targets.
9527         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9528         (COMMON_SFILES): Use observable.c, not observer.c.
9529         * .gitignore: Remove observer.h.
9530
9531 2018-03-18  Tom Tromey  <tom@tromey.com>
9532
9533         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9534         gdb::def_vector.
9535         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9536
9537 2018-03-17  Tom Tromey  <tom@tromey.com>
9538
9539         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9540
9541 2018-03-17  Tom Tromey  <tom@tromey.com>
9542
9543         * target.c (class scoped_target_fd): New.
9544         (target_fileio_close_cleanup): Remove.
9545         (target_fileio_read_alloc_1): Use scoped_target_fd.
9546
9547 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9548
9549         * silent-rules.mk: New.
9550         * Makefile.in: Include silent-rules.mk
9551         (srcdir, VPATH, top_srcdir): Move up.
9552         (COMPILE): Add ECHO_CXX.
9553         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9554         (init.c): Add ECHO_INIT_C.
9555         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9556         (version.c): Add ECHO_GEN.
9557         (printcmd.o): Add ECHO_CXX.
9558         (target-float.o): Add ECHO_CXX.
9559         (ada-exp.o): Add ECHO_CXX.
9560         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9561         (insight$(EXEEXT)): Add ECHO_CXXLD.
9562         * gnulib/configure.ac: Add AM_SILENT_RULES.
9563         * gnulib/aclocal.m4: Re-generate.
9564         * gnulib/configure: Re-generate.
9565         * gnulib/import/Makefile.in: Re-generate.
9566
9567 2018-03-16  Tom Tromey  <tom@tromey.com>
9568
9569         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9570         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9571         * utils.c (do_free_section_addr_info)
9572         (make_cleanup_free_section_addr_info): Remove.
9573         * symfile.h (struct other_sections): Add constructor.
9574         (struct section_addr_info): Remove.
9575         (section_addr_info): New typedef.
9576         (struct sym_fns) <sym_offsets>: Change type of parameter.
9577         (build_section_addr_info_from_objfile)
9578         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9579         (default_symfile_offsets, symbol_file_add)
9580         (symbol_file_add_from_bfd)
9581         (build_section_addr_info_from_section_table): Update.
9582         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9583         * symfile.c (alloc_section_addr_info): Remove.
9584         (build_section_addr_info_from_section_table): Change return type.
9585         Update.
9586         (build_section_addr_info_from_bfd)
9587         (build_section_addr_info_from_objfile): Likewise.
9588         (free_section_addr_info): Remove.
9589         (relative_addr_info_to_section_offsets): Change type of "addrs".
9590         (addrs_section_compar): Now a std::sort comparator.
9591         (addrs_section_sort): Change return type.
9592         (addr_info_make_relative): Change type of "addrs".  Update.
9593         (default_symfile_offsets, syms_from_objfile_1)
9594         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9595         (symbol_file_add_separate): Update.
9596         (symbol_file_add): Change type of "addrs".  Update.
9597         (add_symbol_file_command): Update.  Remove cleanups.
9598         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9599         cleanups.
9600         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9601         * solib.c (solib_read_symbols): Update.
9602         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9603         * machoread.c (macho_symfile_offsets): Update.
9604         * jit.c (jit_bfd_try_read_symtab): Update.
9605
9606 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9607
9608         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9609         unittests/utils-selftests.c.
9610         * unittests/utils-selftests.c: New file.
9611
9612 2018-03-14  Tom Tromey  <tom@tromey.com>
9613
9614         PR cli/14977:
9615         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9616         for NULL.
9617
9618 2018-03-14  Tom Tromey  <tom@tromey.com>
9619
9620         PR cli/19918:
9621         * printcmd.c (printf_pointer): Allow "-" in format.
9622
9623 2018-03-14  Tom Tromey  <tom@tromey.com>
9624
9625         * printcmd.c (_initialize_printcmd): Add usage to printf.
9626
9627 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9628
9629         * MAINTAINERS: Update my email address.
9630
9631 2018-03-13  Tom Tromey  <tom@tromey.com>
9632
9633         * machoread.c (macho_check_dsym): Change filenamep to a
9634         std::string*.
9635         (macho_symfile_read): Update.
9636         * symfile.c (load_command): Use std::string.
9637
9638 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9639
9640         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9641         to error message string.
9642         (riscv_register_name): Use xsnprintf instead of sprintf.
9643         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9644         internal_error.
9645         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9646         error.
9647         (riscv_push_dummy_call): Likewise.
9648
9649 2018-03-12  Tom Tromey  <tom@tromey.com>
9650
9651         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9652         Use gdb::byte_vector.
9653         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9654
9655 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9656
9657         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9658         parameter type to readable_regcache.
9659         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9660         the declaration.
9661
9662 2018-03-11  Tom Tromey  <tom@tromey.com>
9663
9664         * dwarf2read.c (struct nextfield): Add initializers.
9665         (struct nextfnfield): Remove.
9666         (struct fnfieldlist): Add initializers.  Remove "length" and
9667         "head", use std::vector.
9668         (struct decl_field_list): Remove.
9669         (struct field_info): Add initializers.
9670         <fields, baseclasses>: Now std::vector.
9671         <nbaseclasses, nfnfields, typedef_field_list_count,
9672         nested_types_list_count>: Remove.
9673         (dwarf2_add_field, dwarf2_add_type_defn)
9674         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9675         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9676         (process_structure_scope): Update.
9677
9678 2018-03-11  Tom Tromey  <tom@tromey.com>
9679
9680         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9681         for use by std::sort.
9682         (build_type_psymtabs_1): Use std::vector.
9683
9684 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9685
9686         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9687         and LIBMPFR in the printed configuration.
9688
9689 2018-03-08  Tom Tromey  <tom@tromey.com>
9690
9691         * source.c (get_filename_and_charpos): Use scoped_fd.
9692         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9693         (procfs_pidlist): Likewise.
9694         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9695         (iterate_over_mappings): Likewise.
9696
9697 2018-03-08  Tom Tromey  <tom@tromey.com>
9698
9699         * infcall.c (struct call_return_meta_info)
9700         <stack_temporaries_enabled>: Remove.
9701         (get_call_return_value, call_function_by_hand_dummy): Update.
9702         * thread.c (disable_thread_stack_temporaries): Remove.
9703         (enable_thread_stack_temporaries): Remove.
9704         (thread_stack_temporaries_enabled_p): Return bool.
9705         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9706         (get_last_thread_stack_temporary): Update.
9707         * eval.c (evaluate_subexp): Update.
9708         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9709         class, not a function.
9710         (value_ptr, value_vec): Remove typedefs.
9711         (class thread_info) <stack_temporaries_enabled>: Now bool.
9712         <stack_temporaries>: Now a std::vector.
9713         (thread_stack_temporaries_enabled_p)
9714         (value_in_thread_stack_temporaries): Return bool.
9715
9716 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9717
9718         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9719         (getpkt_or_notif_sane_1): Likewise.
9720
9721 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9722
9723         * build-id.c (build_id_to_debug_bfd): Use std::string.
9724
9725 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9726
9727         * build-id.c (find_separate_debug_file_by_buildid): Return
9728         std::string.
9729         * build-id.h (find_separate_debug_file_by_buildid): Return
9730         std::string.
9731         * coffread.c (coff_symfile_read): Adjust to std::string.
9732         * elfread.c (elf_symfile_read): Adjust to std::string.
9733         * symfile.c (separate_debug_file_exists): Change parameter to
9734         std::string.
9735         (find_separate_debug_file): Return std::string.
9736         (find_separate_debug_file_by_debuglink): Return std::string.
9737         * symfile.h (find_separate_debug_file_by_debuglink): Return
9738         std::string.
9739
9740 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9741
9742         * common/xml-utils.c (xml_escape_text): Move code to...
9743         (xml_escape_text_append): ... this new function.
9744         * common/xml-utils.h (xml_escape_text_append): New declaration.
9745         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9746         New function.
9747         (_initialize_xml_utils): register test_xml_escape_text_append as
9748         a selftest.
9749
9750 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9751
9752         * defs.h: Remove MAX_REGISTER_SIZE.
9753         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9754         asserts.
9755         * python/py-unwind.c (pyuw_sniffer): Likewise.
9756
9757 2018-03-07  Tom Tromey  <tom@tromey.com>
9758
9759         * linux-tdep.c (linux_info_proc): Update.
9760         * target.h (struct target_ops) <to_fileio_readlink>: Return
9761         optional<string>.
9762         (target_fileio_readlink): Return optional<string>.
9763         * remote.c (remote_hostio_readlink): Return optional<string>.
9764         * inf-child.c (inf_child_fileio_readlink): Return
9765         optional<string>.
9766         * target.c (target_fileio_readlink): Return optional<string>.
9767
9768 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9769
9770         * regcache.c (cooked_read_test): Add riscv to the list of
9771         architectures that have a save_reggroup.
9772
9773 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9774
9775         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9776         value is not a dynamic class object.
9777
9778 2018-03-06  Tom Tromey  <tom@tromey.com>
9779
9780         * rust-exp.y: Formatting fixes.
9781
9782 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9783
9784         * riscv-tdep.c (riscv_register_name): Remove target description
9785         support.
9786         (riscv_gdbarch_init): Remove target description check.
9787
9788 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9789
9790         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9791         comment.
9792         * riscv-tdep.h: Likewise.
9793
9794 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9795
9796         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9797         (riscv_pseudo_register_write): Delete.
9798         (riscv_gdbarch_init): Remove all use of pseudo registers.
9799
9800 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9801
9802         * record-btrace.c (btrace_print_lines): Replace cleanup
9803         parameter with RAII equivalents.
9804         (btrace_insn_history): Replace cleanup with RAII equivalents.
9805         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9806         make_cleanup_ui_out_tuple_begin_end): Remove.
9807         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9808         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9809         make_cleanup_ui_out_list_begin_end): Remove.
9810
9811 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9812
9813         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9814         parameter types to std::vector.  Use bool.
9815         (record_btrace_wait): Replace VEC(tp_t) with
9816         std::vector<thread_info *>.
9817         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9818
9819 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9820
9821         * record-btrace.c (record_btrace_disable_callback): Remove.
9822         (struct scoped_btrace_disable): New.
9823         (record_btrace_open): Use scoped_btrace_disable.
9824
9825 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9826
9827         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9828         reading values from registers.
9829
9830 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9831
9832         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9833         where appropriate.
9834
9835 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9836
9837         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9838         change parameter type.  Use GDB's print functions, and use
9839         core_addr_to_string where appropriate.
9840         (riscv_push_dummy_call): Use core_addr_to_string where
9841         appropriate, update call to riscv_print_arg_location, and reindent
9842         a few lines.
9843         (riscv_return_value): Update call to riscv_print_arg_location.
9844
9845 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9846             Tim Newsome <tim@sifive.com>
9847             Albert Ou <a0u@eecs.berkeley.edu>
9848             Darius Rad <darius@bluespec.com>
9849
9850         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9851         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9852         (ALLDEPFILES): Add riscv-tdep.c
9853         * configure.tgt: Add riscv support.
9854         * riscv-tdep.c: New file.
9855         * riscv-tdep.h: New file.
9856         * NEWS: Mention new target.
9857         * MAINTAINERS: Add entry for riscv.
9858
9859 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9860
9861         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9862         fields within aggregates.
9863
9864 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
9865
9866         * record-btrace.c (btrace_print_lines): Change type of flags to
9867         gdb_disassembly_flags.
9868
9869 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9870
9871         * fbsd-nat.c: Include "inf-ptrace.h".
9872         (USE_SIGTRAP_SIGINFO): Conditionally define.
9873         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9874         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9875         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9876         function.
9877         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9878         Likewise.
9879         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9880         Likewise.
9881         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9882         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9883         "supports_stopped_by_hw_breakpoint" target methods.
9884
9885 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9886
9887         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9888         * fbsd-nat.c (debug_fbsd_nat): New variable.
9889         (show_fbsd_nat_debug): New function.
9890         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9891         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9892
9893 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9894
9895         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9896         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9897         prototype.
9898         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9899         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9900         method.
9901
9902 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9903
9904         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9905         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9906
9907 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9908
9909         * charset.c (struct charset_vector): New.
9910         (charsets): Change type to charset_vector.
9911         (find_charset_names): Adjust.
9912         (add_one): Adjust.
9913         (_initialize_charset): Adjust.
9914
9915 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9916
9917         * progspace.h (struct program_space) <deleted_solibs>: Change
9918         type to std::vector<std::string>.
9919         * progspace.c (clear_program_space_solib_cache): Adjust.
9920         * breakpoint.c (print_solib_event): Adjust.
9921         (check_status_catch_solib): Adjust.
9922         * solib.c (update_solib_list): Adjust.
9923         * ui-out.h (class ui_out) <field_string>: New overload.
9924         * ui-out.c (ui_out::field_string): New overload.
9925
9926 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9927
9928         * progspace.h (struct program_space): Add constructor and
9929         destructor, initialize fields.
9930         (add_program_space): Remove.
9931         * progspace.c (add_program_space): Rename to...
9932         (program_space::program_space): ... this.
9933         (release_program_space): Rename to...
9934         (program_space::~program_space): ... this.
9935         (delete_program_space): Use delete to delete program_space.
9936         (initialize_progspace): Use new to allocate program_space.
9937         * inferior.c (add_inferior_with_spaces): Likewise.
9938         (clone_inferior_command): Likewise.
9939         * infrun.c (follow_fork_inferior): Likewise.
9940         (handle_vfork_child_exec_or_exit): Likewise.
9941
9942 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9943
9944         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9945         (delim_string_to_char_ptr_vec): Return std::vector of
9946         gdb::unique_xmalloc_ptr.
9947         (dirnames_to_char_ptr_vec_append): Take std::vector of
9948         gdb::unique_xmalloc_ptr.
9949         (dirnames_to_char_ptr_vec): Return std::vector of
9950         gdb::unique_xmalloc_ptr.
9951         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9952         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9953         (delim_string_to_char_ptr_vec): Return an std::vector of
9954         gdb::unique_xmalloc_ptr, adjust the code.
9955         (dirnames_to_char_ptr_vec_append): Take an std::vector of
9956         gdb::unique_xmalloc_ptr, adjust the code.
9957         (dirnames_to_char_ptr_vec): Return an std::vector of
9958         gdb::unique_xmalloc_ptr, adjust the code.
9959         * auto-load.c (auto_load_safe_path_vec): Change type to
9960         std::vector of gdb::unique_xmalloc_ptr.
9961         (auto_load_expand_dir_vars): Return an std::vector of
9962         gdb::unique_xmalloc_ptr, adjust the code.
9963         (auto_load_safe_path_vec_update): Adjust.
9964         (filename_is_in_auto_load_safe_path_vec): Adjust.
9965         (auto_load_objfile_script_1): Adjust.
9966         * build-id.c (build_id_to_debug_bfd): Adjust.
9967         * linux-thread-db.c (thread_db_load_search): Adjust.
9968         * source.c (add_path): Adjust.
9969         (openp): Adjust.
9970         * symfile.c (find_separate_debug_file): Adjust.
9971         * utils.c (do_free_char_ptr_vec): Remove.
9972         (make_cleanup_free_char_ptr_vec): Remove.
9973
9974 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
9975
9976         PR gdb/22907
9977         * common/pathstuff.c: Conditionally include "<windows.h>".
9978
9979 2018-03-01  Georg Sauthoff  <mail@georg.so>
9980
9981         PR gdb/22888
9982         * gcore.in: Quote variables and switch interpreter to bash.
9983
9984 2018-03-01  Tom Tromey  <tom@tromey.com>
9985
9986         * dwarf2read.c (alloc_discriminant_info): Fix default_index
9987         assertion.  Add assertion for discriminant_index.
9988         (quirk_rust_enum): Use correct base type name in univariant case.
9989
9990 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
9991
9992         * record.c (get_call_history_modifiers): Return a
9993         record_print_flags.
9994         (cmd_record_call_history): Adjust.
9995         * record-btrace.c (record_btrace_call_history): Adjust.
9996         (record_btrace_call_history_range): Adjust.
9997         (record_btrace_call_history_from): Adjust.
9998         * target-debug.h (target_debug_print_record_print_flags): New.
9999         * target-delegates.c: Re-generate.
10000         * target.c (target_call_history): Change flags type.
10001         (target_call_history_from): Likewise.
10002         (target_call_history_range): Likewise.
10003         * target.h (struct target_ops) <target_call_history>: Likewise.
10004         (target_call_history_from): Likewise.
10005         (target_call_history_range): Likewise.
10006
10007 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10008             Simon Marchi  <simon.marchi@polymtl.ca>
10009
10010         * common/common-utils.c: Include "sys/stat.h".
10011         (is_regular_file): Move here from "source.c"; change return
10012         type to "bool".
10013         * common/common-utils.h (is_regular_file): New prototype.
10014         * common/pathstuff.c (contains_dir_separator): New function.
10015         * common/pathstuff.h (contains_dir_separator): New prototype.
10016         * source.c: Don't include "sys/stat.h".
10017         (is_regular_file): Move to "common/common-utils.c".
10018
10019 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10020
10021         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10022         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10023         * auto-load.c: Include "common/pathstuff.h".
10024         * common/common-def.h (current_directory): Move here.
10025         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10026         function.
10027         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10028         prototype.
10029         * common/pathstuff.c: New file.
10030         * common/pathstuff.h: New file.
10031         * compile/compile.c: Include "common/pathstuff.h".
10032         * defs.h (current_directory): Move to "common/common-defs.h".
10033         * dwarf2read.c: Include "common/pathstuff.h".
10034         * exec.c: Likewise.
10035         * guile/scm-safe-call.c: Likewise.
10036         * linux-thread-db.c: Likewise.
10037         * main.c: Likewise.
10038         * nto-tdep.c: Likewise.
10039         * objfiles.c: Likewise.
10040         * source.c: Likewise.
10041         * symtab.c: Likewise.
10042         * utils.c: Include "common/pathstuff.h".
10043         (gdb_realpath): Move to "common/pathstuff.c".
10044         (gdb_realpath_keepfile): Likewise.
10045         (gdb_abspath): Likewise.
10046         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10047         (gdb_realpath_keepfile): Likewise.
10048         (gdb_abspath): Likewise.
10049
10050 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10051
10052         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10053         wildcard process pid for super_resume for kernels with a
10054         specific bug.
10055
10056 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10057
10058         * compile/compile.c (get_args): Add additional comments
10059         explaining function.
10060
10061 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10062             Tom Tromey  <tom@tromey.com>
10063
10064         * target.h (memory_write_request_s): Remove typedef.  Don't define
10065         VEC.
10066         (target_write_memory_blocks): Change argument to std::vector.
10067         (struct memory_write_request): Add constructor.
10068         * target-memory.c (compare_block_starting_address): Return bool.
10069         Change argument types.
10070         (claim_memory): Change arguments to use std::vector.
10071         (split_regular_and_flash_blocks, blocks_to_erase)
10072         (compute_garbled_blocks): Likewise.
10073         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10074         (target_write_memory_blocks): Change argument to std::vector.
10075         * symfile.c (struct load_section_data): Add constructor and
10076         destructor.  Use std::vector for "requests".
10077         (struct load_progress_data): Add initializers.
10078         (load_section_callback): Update.  Use "new".
10079         (clear_memory_write_data): Remove.
10080         (generic_load): Update.
10081
10082 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10083
10084         * arch/aarch64.h: Use common/tdesc.h.
10085
10086 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10087
10088         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10089         architecture with a 64-bit ABI.
10090
10091 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10092
10093         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10094         ahead of target description loading.
10095
10096 2018-02-26  Tom Tromey  <tom@tromey.com>
10097
10098         * stack.c (backtrace_command_1): Update.
10099         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10100         of "flags".
10101         * python/py-framefilter.c (py_print_frame)
10102         (gdbpy_apply_frame_filter): Change type of "flags".
10103         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10104         of "flags".
10105         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10106         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10107         * extension.h (enum frame_filter_flag): Rename from
10108         frame_filter_flags.
10109         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10110         (apply_ext_lang_frame_filter): Change type of "flags".
10111         * extension.c (apply_ext_lang_frame_filter): Change type of
10112         "flags".
10113         * extension-priv.h (struct extension_language_ops)
10114         <apply_frame_filter>: Change type of "flags".
10115
10116 2018-02-26  Tom Tromey  <tom@tromey.com>
10117
10118         PR python/16497:
10119         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10120         off-by-one in py_end computation.
10121         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10122         PRINT_MORE_FRAMES.
10123         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10124         constant.
10125
10126 2018-02-26  Tom Tromey  <tom@tromey.com>
10127
10128         * dwarf2read.c (struct variant_field): New.
10129         (struct nextfield) <variant>: New field.
10130         (dwarf2_add_field): Handle DW_TAG_variant_part.
10131         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10132         discriminated union.
10133         (read_structure_type): Handle DW_TAG_variant_part.
10134         (handle_struct_member_die): New function, extracted from
10135         process_structure_scope.  Handle DW_TAG_variant.
10136         (process_structure_scope): Handle discriminated unions.  Call
10137         handle_struct_member_die.
10138
10139 2018-02-26  Tom Tromey  <tom@tromey.com>
10140
10141         * rust-lang.h (rust_last_path_segment): Declare.
10142         * rust-lang.c (rust_last_path_segment): Now public.  Change
10143         contract.
10144         (struct disr_info): Remove.
10145         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10146         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10147         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10148         (rust_enum_p, rust_enum_variant): New function.
10149         (rust_underscore_fields): Remove "offset" parameter.
10150         (rust_print_enum): New function.
10151         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10152         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10153         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10154         enums.
10155         (rust_internal_print_type): New function, from rust_print_type.
10156         Remove enum code.
10157         (rust_print_type): Call rust_internal_print_type.
10158         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10159         Update enum handling.
10160         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10161         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10162         (rust_union_quirks): New functions.
10163         (process_full_comp_unit, process_full_type_unit): Call
10164         rust_union_quirks.
10165         (process_structure_scope): Update rust_unions if necessary.
10166
10167 2018-02-26  Tom Tromey  <tom@tromey.com>
10168
10169         * value.h (value_union_variant): Declare.
10170         * valops.c (value_union_variant): New function.
10171         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10172         (struct discriminant_info): New.
10173         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10174         enumerator.
10175         (struct main_type) <flag_discriminated_union>: New field.
10176
10177 2018-02-26  Tom Tromey  <tom@tromey.com>
10178
10179         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10180         unittests/unpack-selftests.c.
10181         * unittests/unpack-selftests.c: New file.
10182         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10183
10184 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10185
10186         * dwarf2read.c (struct partial_die_info) <read>: New method.
10187         (read_partial_die): Remove the declaration.
10188         (load_partial_dies): Update.
10189         (partial_die_info::partial_die_info):
10190         (read_partial_die): Change it to partial_die_info::read.
10191
10192 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10193
10194         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10195         (fixup_partial_die): Remove declaration.
10196         (scan_partial_symbols): Update.
10197         (partial_die_parent_scope): Likewise.
10198         (partial_die_full_name): Likewise.
10199         (fixup_partial_die): Change it to partial_die_info::fixup.
10200
10201 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10202
10203         * dwarf2read.c (read_partial_die): Update the declaration.
10204         (load_partial_dies): Caller update.
10205         (read_partial_die): Remove one argument abbrev_len.
10206
10207 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10208
10209         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10210         assignment operator.
10211         (load_partial_dies): Use ctor and copy ctor.
10212         (read_partial_die): Update.
10213         (dwarf2_cu::find_partial_die): Use ctor.
10214
10215 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10216
10217         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10218         (find_partial_die_in_comp_unit): Change it to
10219         dwarf2_cu::find_partial_die.
10220         (find_partial_die): Update.
10221
10222 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10223
10224         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10225         is NULL.
10226
10227 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10228
10229         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10230
10231 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10232
10233         * arch/amd64.h: Use common/tdesc.h.
10234         * arch/i386.c: Likewise.
10235         * arch/i386.h: Likewise.
10236         * arch/tic6x.c: Likewise.
10237         * arch/tdesc.h: Move file from here...
10238         * common/tdesc.h: ...to here.
10239         * features/aarch64-core.c: Regenerate.
10240         * features/aarch64-fpu.c: Regenerate.
10241         * features/i386/32bit-avx.c: Regenerate.
10242         * features/i386/32bit-avx512.c: Regenerate.
10243         * features/i386/32bit-core.c: Regenerate.
10244         * features/i386/32bit-linux.c: Regenerate.
10245         * features/i386/32bit-mpx.c: Regenerate.
10246         * features/i386/32bit-pkeys.c: Regenerate.
10247         * features/i386/32bit-sse.c: Regenerate.
10248         * features/i386/64bit-avx.c: Regenerate.
10249         * features/i386/64bit-avx512.c: Regenerate.
10250         * features/i386/64bit-core.c: Regenerate.
10251         * features/i386/64bit-linux.c: Regenerate.
10252         * features/i386/64bit-mpx.c: Regenerate.
10253         * features/i386/64bit-pkeys.c: Regenerate.
10254         * features/i386/64bit-segments.c: Regenerate.
10255         * features/i386/64bit-sse.c: Regenerate.
10256         * features/i386/x32-core.c: Regenerate.
10257         * features/tic6x-c6xp.c: Regenerate.
10258         * features/tic6x-core.c: Regenerate.
10259         * features/tic6x-gp.c: Regenerate.
10260         * target-descriptions.c: Use common/tdesc.h.
10261         * target-descriptions.h: Likewise.
10262
10263 2018-02-24  Tom Tromey  <tom@tromey.com>
10264
10265         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10266         (try_thread_db_load_from_dir, thread_db_load_search): Use
10267         std::string.
10268         (info_auto_load_libthread_db_compare): Return bool.  Change
10269         argument types.
10270         (info_auto_load_libthread_db): Use std::vector, std::string.
10271         Remove cleanups.
10272
10273 2018-02-24  Tom Tromey  <tom@tromey.com>
10274
10275         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10276         std::string.
10277         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10278         std::string*.
10279         * gdbarch.c: Rebuild.
10280         * gdbarch.h: Rebuild.
10281         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10282         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10283         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10284         std::string*.
10285
10286 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10287
10288         * gdbtypes.h (sect_offset): Change type to uint64_t.
10289         (sect_offset_str): New function.
10290         * dwarf2read.c (create_addrmap_from_aranges): Use
10291         sect_offset_str.
10292         (error_check_comp_unit_head): Likewise.
10293         (create_debug_type_hash_table): Likewise.
10294         (read_cutu_die_from_dwo): Likewise.
10295         (init_cutu_and_read_dies): Likewise.
10296         (init_cutu_and_read_dies_no_follow): Likewise.
10297         (process_psymtab_comp_unit_reader): Likewise.
10298         (partial_die_parent_scope): Likewise.
10299         (peek_die_abbrev): Likewise.
10300         (process_queue): Likewise.
10301         (dwarf2_physname): Likewise.
10302         (read_namespace_alias): Likewise.
10303         (read_import_statement): Likewise.
10304         (create_dwo_cu_reader): Likewise.
10305         (create_cus_hash_table): Likewise.
10306         (lookup_dwo_cutu): Likewise.
10307         (inherit_abstract_dies): Likewise.
10308         (read_func_scope): Likewise.
10309         (read_call_site_scope): Likewise.
10310         (dwarf2_add_member_fn): Likewise.
10311         (read_common_block): Likewise.
10312         (read_module_type): Likewise.
10313         (read_typedef): Likewise.
10314         (read_subrange_type): Likewise.
10315         (load_partial_dies): Likewise.
10316         (read_partial_die): Likewise.
10317         (find_partial_die): Likewise.
10318         (read_str_index): Likewise.
10319         (dwarf2_string_attr): Likewise.
10320         (build_error_marker_type): Likewise.
10321         (lookup_die_type): Likewise.
10322         (dump_die_shallow): Likewise.
10323         (follow_die_ref): Likewise.
10324         (dwarf2_fetch_die_loc_sect_off): Likewise.
10325         (dwarf2_fetch_constant_bytes): Likewise.
10326         (follow_die_sig): Likewise.
10327         (get_signatured_type): Likewise.
10328         (get_DW_AT_signature_type): Likewise.
10329         (dwarf2_find_containing_comp_unit): Likewise.
10330         (set_die_type): Likewise.
10331
10332 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10333
10334         * arch/aarch64.c: Include "common-defs.h".
10335         * arch/amd64.c: Likewise.
10336         * arch/i386.c: Likewise.
10337
10338 2018-02-21  Tom Tromey  <tom@tromey.com>
10339
10340         * value.h: (extract_field_op): Update.
10341         * eval.c (extract_field_op): Return a const char *.
10342         * expression.h (parse_expression_for_completion): Update.
10343         * completer.c (complete_expression): Update.
10344         (add_struct_fields): Make fieldname const.
10345         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10346         (mark_completion_tag, parse_exp_in_context_1): Update.
10347         (parse_expression_for_completion): Change "name" to
10348         unique_xmalloc_ptr*.
10349
10350 2018-02-21  Tom Tromey  <tom@tromey.com>
10351
10352         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10353
10354 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10355
10356         * avr-tdep.c (avr_read_pc): Change parameter type to
10357         readable_regcache.
10358         * gdbarch.sh (read_pc): Likewise.
10359         * gdbarch.c: Re-generated.
10360         * gdbarch.h: Re-generated.
10361         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10362         readable_regcache.
10363         * ia64-tdep.c (ia64_read_pc): Likewise.
10364         * mips-tdep.c (mips_read_pc): Likewise.
10365         * spu-tdep.c (spu_read_pc): Likewise.
10366
10367 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10368
10369         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10370         * regcache-dump.c: New file.
10371         * regcache.c: Move register_dump to regcache-dump.c.
10372         (maintenance_print_registers): Likewise.
10373         (maintenance_print_raw_registers): Likewise.
10374         (maintenance_print_cooked_registers): Likewise.
10375         (maintenance_print_register_groups): Likewise.
10376         (maintenance_print_remote_registers): Likewise.
10377         (_initialize_regcache): Likewise.
10378         * regcache.h (register_dump): Moved from regcache.c.
10379
10380 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10381
10382         * regcache.c (regcache::regcache): Update.
10383         (regcache::invalidate): Move it to detached_regcache::invalidate.
10384         (get_thread_arch_aspace_regcache): Update.
10385         (regcache::raw_update): Update.
10386         (regcache::cooked_read): Remove some code.
10387         (regcache::cooked_read_value): Likewise.
10388         (regcache::raw_write): Remove assert on m_readonly_p.
10389         (regcache::raw_supply_integer): Move it to
10390         detached_regcache::raw_supply_integer.
10391         (regcache::raw_supply_zeroed): Likewise.
10392         * regcache.h (detached_regcache) <raw_supply_integer>: New
10393         declaration.
10394         <raw_supply_zeroed, invalidate>: Likewise.
10395         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10396         <invalidate>: Likewise.
10397         <m_readonly_p>: Removed.
10398
10399 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10400
10401         * infcmd.c (get_return_value): Let stop_regs point to
10402         get_current_regcache.
10403         * regcache.c (regcache::regcache): Remove.
10404         (register_dump_reg_buffer): New class.
10405         (regcache_print): Adjust.
10406         * regcache.h (regcache): Remove constructors.
10407
10408 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10409
10410         * regcache.c (class register_dump): New class.
10411         (register_dump_regcache, register_dump_none): New class.
10412         (register_dump_remote, register_dump_groups): New class.
10413         (regcache_print): Update.
10414         * regcache.h (regcache_dump_what): Move it to regcache.c.
10415         (regcache) <dump>: Remove.
10416
10417 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10418
10419         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10420          reg_buffer_rw *.
10421         (jit_unwind_reg_set_impl): Call raw_supply.
10422         (jit_frame_sniffer): Use reg_buffer_rw.
10423         * record-full.c (record_full_core_regbuf): Change its type.
10424         (record_full_core_open_1): Use reg_buffer_rw.
10425         (record_full_close): Likewise.
10426         (record_full_core_fetch_registers): Use regcache->raw_supply.
10427         (record_full_core_store_registers): Likewise.
10428         * regcache.c (regcache::get_register_status): Move it to
10429         reg_buffer.
10430         (regcache_raw_set_cached_value): Remove.
10431         (regcache::raw_set_cached_value): Remove.
10432         (regcache::raw_write): Call raw_supply.
10433         (regcache::raw_supply): Move it to reg_buffer_rw.
10434         * regcache.h (regcache_raw_set_cached_value): Remove.
10435         (reg_buffer_rw): New class.
10436
10437 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10438
10439         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10440         readonly_detached_regcache.
10441         (dummy_frame_prev_register): Use regcache->cooked_read.
10442         * frame.c (frame_save_as_regcache): Change return type.
10443         (frame_pop): Update.
10444         * frame.h (frame_save_as_regcache): Update declaration.
10445         * inferior.h (get_infcall_suspend_state_regcache): Update
10446         declaration.
10447         * infrun.c (infcall_suspend_state) <registers>: use
10448         readonly_detached_regcache.
10449         (save_infcall_suspend_state): Don't use regcache_dup.
10450         (get_infcall_suspend_state_regcache): Change return type.
10451         * linux-fork.c (struct fork_info) <savedregs>: Change to
10452         readonly_detached_regcache.
10453         <pc>: New field.
10454         (fork_save_infrun_state): Don't use regcache_dup.
10455         (info_checkpoints_command): Adjust.
10456         * mi/mi-main.c (register_changed_p): Update declaration.
10457         (mi_cmd_data_list_changed_registers): Use
10458         readonly_detached_regcache.
10459         (register_changed_p): Change parameter type to
10460         readonly_detached_regcache.
10461         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10462         readonly_detached_regcache.
10463         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10464         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10465         New.
10466         (regcache::save): Move it to reg_buffer.
10467         (regcache::restore): Change parameter type.
10468         (regcache_dup): Remove.
10469         * regcache.h (reg_buffer) <save>: New method.
10470         (readonly_detached_regcache): New class.
10471         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10472         readonly_detached_regcache.
10473         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10474
10475 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10476
10477         * frame.c (frame_save_as_regcache): Use regcache method save.
10478         (frame_pop): Use regcache method restore.
10479         * infrun.c (restore_infcall_suspend_state): Likewise.
10480         * linux-fork.c (fork_load_infrun_state): Likewise.
10481         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10482         save.
10483         * regcache.c (regcache_save): Remove.
10484         (regcache::restore): More asserts.
10485         (regcache_cpy): Remove.
10486         * regcache.h (regcache_save): Remove the declaration.
10487         (regcache::restore): Move from private to public.
10488         Remove the friend declaration of regcache_cpy.
10489         (regcache_cpy): Remove declaration.
10490
10491 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10492
10493         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10494         parameter type to 'readable_regcache *'.
10495         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10496         * arm-tdep.c (arm_neon_quad_read): Likewise.
10497         (arm_pseudo_read): Likewise.
10498         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10499         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10500         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10501         * gdbarch.c: Re-generated.
10502         * gdbarch.h: Re-generated.
10503         * gdbarch.sh (pseudo_register_read): Change parameter type to
10504         'readable_regcache *'.
10505         (pseudo_register_read_value): Likewise.
10506         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10507         (h8300_pseudo_register_read): Likewise.
10508         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10509         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10510         (i386_pseudo_register_read_into_value): Likewise.
10511         (i386_pseudo_register_read_value): Likewise.
10512         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10513         declaration.
10514         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10515         * m32c-tdep.c (m32c_raw_read): Likewise.
10516         (m32c_read_flg): Likewise.
10517         (m32c_banked_register): Likewise.
10518         (m32c_banked_read): Likewise.
10519         (m32c_sb_read): Likewise.
10520         (m32c_part_read): Likewise.
10521         (m32c_cat_read): Likewise.
10522         (m32c_r3r2r1r0_read): Likewise.
10523         (m32c_pseudo_register_read): Likewise.
10524         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10525         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10526         (mep_pseudo_cr64_read): Likewise.
10527         (mep_pseudo_register_read): Likewise.
10528         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10529         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10530         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10531         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10532         (regcache::cooked_read): Likewise.
10533         (regcache::cooked_read_value): Likewise.
10534         (regcache_cooked_read_signed):
10535         (regcache::cooked_read): Likewise.
10536         * regcache.h (readable_regcache): New class.
10537         (regcache): Inherit readable_regcache.  Move some methods to
10538         readable_regcache.
10539         * rl78-tdep.c (rl78_pseudo_register_read): Change
10540         parameter type to 'readable_regcache *'.
10541         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10542         (e500_pseudo_register_read): Change parameter type to
10543         'readable_regcache *'.
10544         (dfp_pseudo_register_read): Likewise.
10545         (vsx_pseudo_register_read): Likewise.
10546         (efpr_pseudo_register_read): Likewise.
10547         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10548         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10549         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10550         (sh64_pseudo_register_read): Likewise.
10551         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10552         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10553         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10554         (spu_pseudo_register_read): Likewise.
10555         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10556         (xtensa_pseudo_register_read): Likewise.
10557
10558 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10559
10560         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10561         (regcache::arch): Move it to reg_buffer::arch.
10562         (regcache::register_buffer): Likewise.
10563         (regcache::assert_regnum): Likewise.
10564         (regcache::num_raw_registers): Likewise.
10565         * regcache.h (reg_buffer): New class.
10566         (regcache): Inherit reg_buffer.
10567
10568 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10569
10570         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10571         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10572
10573 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10574
10575         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10576
10577 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10578
10579         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10580         (SFILES): Remove common/*.c files.
10581         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10582         * common/common.host: Add common reference.
10583         * configure.ac: Likewise.
10584         * configure: Regenerate.
10585
10586 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10587
10588         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10589         (block_initialize_namespace): Use new.
10590         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10591         (dwarf2_free_objfile): Use delete.
10592         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10593         (copy_type_recursive): Use new.
10594         * gdb_obstack.h (allocate_on_obstack): New.
10595
10596 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10597
10598         PR gdb/22849
10599         * inferior.c (exit_inferior_1): Reset inf->control.
10600
10601 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10602
10603         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10604         declaration.
10605
10606 2018-02-14  Pedro Alves  <palves@redhat.com>
10607
10608         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10609         frame_cleanup_after_sniffer on exception.
10610
10611 2018-02-14  Tom Tromey  <tom@tromey.com>
10612
10613         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10614         const.
10615         (solib_bfd_open): Make pathname const.
10616         * solib.c (solib_bfd_open): Make pathname const.
10617         * solib-spu.c (spu_bfd_fopen): Make name const.
10618         (spu_bfd_open): Make pathname const.
10619         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10620         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10621
10622 2018-02-14  Tom Tromey  <tom@tromey.com>
10623
10624         * symfile.c (symfile_bfd_open): Update.
10625         * source.h (openp, source_full_path_of, find_and_open_source):
10626         Change argument type to unique_xmalloc_ptr.
10627         * source.c (openp): Take a unique_xmalloc_ptr.
10628         (source_full_path_of, find_and_open_source): Likewise.
10629         (open_source_file, symtab_to_fullname): Update.
10630         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10631         unique_xmalloc_ptr.
10632         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10633         (exec_file_find): Update.
10634         * psymtab.c (psymtab_to_fullname): Update.
10635         * nto-tdep.h (nto_find_and_open_solib): Update.
10636         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10637         unique_xmalloc_ptr.
10638         * exec.c (exec_file_attach): Update.
10639         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10640         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10641
10642 2018-02-14  Tom Tromey  <tom@tromey.com>
10643
10644         * solib.c: Include source.h.
10645         * nto-tdep.c: Include source.h.
10646         * mi/mi-cmd-env.c: Include source.h.
10647         * infcmd.c: Include source.h.
10648         * exec.c: Include source.h.
10649         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10650         (add_path, directory_switch, source_path, init_source_path): Move
10651         declarations...
10652         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10653         (add_path, directory_switch, source_path, init_source_path):
10654         ...here.
10655
10656 2018-02-14  Tom Tromey  <tom@tromey.com>
10657
10658         * solist.h (exec_file_find, solib_find): Return
10659         unique_xmalloc_ptr.
10660         (solib_bfd_fopen): Take a const char *.
10661         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10662         (exec_file_find, solib_find): Likewise.
10663         (solib_bfd_fopen): Do not take ownership of "pathname".
10664         (solib_bfd_open): Use unique_xmalloc_ptr.
10665         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10666         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10667         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10668         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10669
10670 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10671
10672         * ada-lang.c (name_match_type_from_name): Remove reference to
10673         ada_name_for_lookup in function's documentation.
10674         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10675
10676 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10677
10678         * defs.h (enum openp_flags): New enum.
10679         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10680         Move to enum openp_flags.
10681         (openp_flags): New enum flags.
10682         (openp): Change parameter type to openp_flags.
10683         * source.c (openp): Change parameter type to openp_flags.
10684         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10685         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10686
10687 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10688
10689         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10690         per-command.
10691
10692 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10693
10694         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10695         into...
10696         (class dwarf2_queue_guard): ...the destructor of this new class.
10697         (dw2_do_instantiate_symtab): Create instance of the new class
10698         dwarf2_queue_guard, remove cleanup.
10699
10700 2018-02-09  Tom Tromey  <tom@tromey.com>
10701
10702         * source.c (find_source_lines): Don't reference past the end of
10703         the vector.
10704
10705 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10706
10707         * remote.c (remote_btrace_maybe_reopen): Change error message.
10708         * btrace.c (btrace_enable): Likewise.
10709         (parse_xml_btrace): Likewise.
10710         (parse_xml_btrace_conf): Likewise.
10711
10712 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10713
10714         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10715         (linux_enable_pt, linux_enable_bts): Call
10716         diagnose_perf_event_open_fail.
10717
10718 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10719
10720         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10721         Remove parameter and change return type.  Update callers.  Move it.
10722         (linux_enable_bts, linux_enable_pt): Improve error message.
10723         (linux_enable_pt): Remove zero buffer size check.
10724         (linux_enable_btrace): Improve error messages.  Remove NULL return
10725         check.
10726
10727 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10728
10729         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10730         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10731         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10732         (linux_supports_pt, linux_supports_btrace): Remove.
10733         (linux_enable_bts): Call cpu_supports_bts.
10734         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10735         * remote.c (remote_supports_btrace): Remove.
10736         (init_remote_ops): Remove remote_supports_btrace.
10737         * target-delegates.c: Regenerated.
10738         * target.c (target_supports_btrace): Remove.
10739         * target.h (target_ops) <to_supports_btrace>: Remove
10740         (target_supports_btrace): Remove.
10741         * x86-linux-nat.c (x86_linux_create_target): Remove
10742         linux_supports_btrace.
10743
10744 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10745
10746         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10747         btrace failed.
10748         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10749         exception and use message in own exception.
10750
10751 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10752
10753         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10754         (perf_event_pt_event_type): Use gdb_file_up.
10755         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10756         scoped_fd, and scoped_mmap.
10757
10758 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10759
10760         * common/scoped_mmap.h: New.
10761         * unittests/scoped_mmap-selftest.c: New.
10762         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10763         unittests/scoped_mmap-selftest.c.
10764
10765 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10766
10767         * common/scoped_fd.h: New.
10768         * unittests/scoped_fd-selftest.c: New.
10769         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10770         unittests/scoped_fd-selftest.c.
10771
10772 2018-02-09  Tom Tromey  <tom@tromey.com>
10773
10774         * auto-load.c (auto_load_section_scripts): Use
10775         gdb::unique_xmalloc_ptr.
10776
10777 2018-02-09  Tom Tromey  <tom@tromey.com>
10778
10779         * auto-load.c (execute_script_contents): Use std::string.
10780
10781 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10782
10783         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10784         Python function, rather than a new command.
10785
10786 2018-02-08  Tom Tromey  <tom@tromey.com>
10787
10788         * solib.c (solib_find_1): Use std::string.
10789         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10790
10791 2018-02-08  Tom Tromey  <tom@tromey.com>
10792
10793         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10794
10795 2018-02-08  Tom Tromey  <tom@tromey.com>
10796
10797         * source.c (find_source_lines): Use gdb::def_vector.
10798
10799 2018-02-08  Tom Tromey  <tom@tromey.com>
10800
10801         * macrocmd.c (struct temporary_macro_definition): New.
10802         (macro_define_command): Use temporary_macro_definition.  Remove
10803         cleanups.
10804         (free_macro_definition_ptr): Remove.
10805
10806 2018-02-08  Tom Tromey  <tom@tromey.com>
10807
10808         * macroexp.c (maybe_expand): Use std::string.
10809
10810 2018-02-08  Tom Tromey  <tom@tromey.com>
10811
10812         * macroexp.c (struct macro_buffer): Add initializers for some
10813         members.
10814         (init_buffer, init_shared_buffer, free_buffer)
10815         (free_buffer_return_text): Remove.
10816         (macro_buffer): New constructors.
10817         (~macro_buffer): New destructor.
10818         (macro_buffer::set_shared): New method.
10819         (macro_buffer::resize_buffer, macro_buffer::appendc)
10820         (macro_buffer::appendmem): Now methods, not free functions.
10821         (set_token, append_tokens_without_splicing, stringify)
10822         (macro_stringify): Update.
10823         (gather_arguments): Change return type.  Remove argc_p argument,
10824         add args_ptr argument.  Use std::vector.
10825         (substitute_args): Remove argc argument.  Accept std::vector.
10826         (expand): Update.  Use std::vector.
10827         (scan, macro_expand, macro_expand_next): Update.
10828
10829 2018-02-08  Tom Tromey  <tom@tromey.com>
10830
10831         * symtab.c (default_collect_symbol_completion_matches_break_on):
10832         Use unique_xmalloc_ptr.
10833         * macroscope.h: (sal_macro_scope, user_macro_scope)
10834         (default_macro_scope): Return unique_xmalloc_ptr.
10835         * macroscope.c (sal_macro_scope, user_macro_scope)
10836         (default_macro_scope): Return unique_xmalloc_ptr.
10837         * macroexp.h (macro_expand, macro_expand_once): Return
10838         unique_xmalloc_ptr.
10839         * macroexp.c (macro_expand, macro_expand_once): Return
10840         unique_xmalloc_ptr.
10841         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10842         (info_macro_command, info_macros_command): Use
10843         unique_xmalloc_ptr.
10844         * compile/compile-c-support.c (write_macro_definitions): Use
10845         unique_xmalloc_ptr.
10846         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10847
10848 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10849
10850         * value.c (value_static_field): Assign field type instead of
10851         containing type when returning an optimized out value.
10852
10853 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10854
10855         * ft32-tdep.c (ft32_read_pc): Remove.
10856         (ft32_write_pc): Remove.
10857         (ft32_gdbarch_init): Update.
10858         * m32r-tdep.c (m32r_read_pc): Remove.
10859         (m32r_gdbarch_init): Update.
10860         * mep-tdep.c (mep_read_pc): Remove.
10861         (mep_gdbarch_init): Update.
10862         * microblaze-tdep.c (microblaze_write_pc): Remove.
10863         (microblaze_gdbarch_init): Update.
10864         * mn10300-tdep.c (mn10300_read_pc): Remove.
10865         (mn10300_write_pc): Remove.
10866         (mn10300_gdbarch_init): Update.
10867         * moxie-tdep.c (moxie_read_pc): Remove.
10868         (moxie_write_pc): Remove.
10869         (moxie_gdbarch_init): Update.
10870
10871 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10872
10873         * expprint.c (print_subexp_standard): Handle
10874         OP_F77_UNDETERMINED_ARGLIST.
10875         (dump_subexp_body_standard): Likewise.
10876
10877 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
10878
10879         * target-descriptions.c (tdesc_element_visitor) Add empty
10880         implementations.
10881         (tdesc_type): Move make_gdb_type from here.
10882         (tdesc_type_builtin): Likewise.
10883         (tdesc_type_vector): Likewise.
10884         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10885         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10886         (make_gdb_type_union): Likewise.
10887         (make_gdb_type_flags): Likewise.
10888         (make_gdb_type_enum): Likewise.
10889         (make_gdb_type): New function.
10890         (tdesc_register_type): Use static make_gdb_type.
10891
10892 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
10893
10894         * infcmd.c (default_print_one_register_info): Align natural-format
10895         column values consistently one under another.
10896         (pad_to_column): New function.
10897
10898 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
10899
10900         * dwarf2read.c (dwarf2_physname): Move commment.
10901
10902 2018-02-01  Leszek Swirski  <leszeks@google.com>
10903
10904         * varobj.c (varobj_formatted_print_options): Allow recursive
10905         pretty printing if pretty printing is enabled.
10906
10907 2018-02-01  Leszek Swirski  <leszeks@google.com>
10908
10909         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10910         names after a structop as a filename.
10911
10912 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10913
10914         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10915         (arm_record_coproc_data_proc): Likewise.
10916
10917 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10918
10919         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10920
10921 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
10922
10923         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10924         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10925
10926 2018-01-31  Pedro Alves  <palves@redhat.com>
10927
10928         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10929         * inflow.c (child_terminal_save_inferior): Wrap reference to
10930         tcgetpgrp in HAVE_TERMIOS_H.
10931         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10932         _WIN32.
10933         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10934         always iterate over all inferiors.
10935         (gdbsim_cntrl_c): Adjust.
10936         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10937
10938 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10939
10940         * gdbtypes.c (lookup_array_range_type): Make sure the array's
10941         index type is objfile-owned if the element type is as well.
10942
10943 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10944
10945         GDB 8.1 released.
10946
10947 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10948
10949         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10950         "features/s390x-linux64.c".
10951         (_initialize_s390_linux_tdep): Remove initialization of tdescs
10952         s390_linux32 and s390x_linux64.
10953         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10954         default tdesc.
10955         * s390-tdep.c: Include "features/s390-linux32.c" and
10956         "features/s390x-linux64.c".
10957         (s390_tdesc_valid): Add check for tdesc_has_registers.
10958         (s390_gdbarch_init): Make sure there is always a valid tdesc.
10959         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10960         tdesc_s390x_linux64.
10961         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10962         tdesc_s390x_linux64 to...
10963         * s390-tdep.h: ...here.
10964
10965 2018-01-30  Pedro Alves  <palves@redhat.com>
10966
10967         PR gdb/13211
10968         * config.in, configure: Regenerate.
10969         * configure.ac: Check for getpgid.
10970         * go32-nat.c (go32_pass_ctrlc): New.
10971         (go32_target): Install it.
10972         * inf-child.c (inf_child_target): Install
10973         child_terminal_save_inferior, child_pass_ctrlc and
10974         child_interrupt.
10975         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10976         (inf_ptrace_target): No longer install it.
10977         * infcmd.c (interrupt_target_1): Adjust.
10978         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10979         (child_interrupt): Declare.
10980         (inferior::terminal_state): New.
10981         * inflow.c (struct terminal_info): Update comments.
10982         (inferior_process_group): Delete.
10983         (terminal_is_ours): Delete.
10984         (gdb_tty_state): New.
10985         (child_terminal_init): Adjust.
10986         (is_gdb_terminal, sharing_input_terminal_1)
10987         (sharing_input_terminal): New functions.
10988         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
10989         Set the process's actual process group in the foreground if
10990         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
10991         mark terminal as the inferior's if not sharing GDB's terminal.
10992         Don't check attach_flag.
10993         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10994         pass down a target_terminal_state.
10995         (child_terminal_save_inferior): New, factored out from ...
10996         (child_terminal_ours_1): ... this.  Handle
10997         target_terminal_state::is_ours_for_output.
10998         (child_interrupt, child_pass_ctrlc): New.
10999         (inflow_inferior_exit): Clear the inferior's terminal_state.
11000         (copy_terminal_info): Copy the inferior's terminal state.
11001         (_initialize_inflow): Remove reference to terminal_is_ours.
11002         * inflow.h (inferior_process_group): Delete.
11003         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11004         * procfs.c (procfs_target): Don't install procfs_interrupt.
11005         (procfs_interrupt): Delete.
11006         * remote.c (remote_serial_quit_handler): Adjust.
11007         (remote_interrupt): Remove ptid parameter.  Adjust.
11008         * target-delegates.c: Regenerate.
11009         * target.c: Include "terminal.h".
11010         (target_terminal::terminal_state): Rename to ...
11011         (target_terminal::m_terminal_state): ... this.
11012         (target_terminal::init): Adjust.
11013         (target_terminal::inferior): Adjust to per-inferior
11014         terminal_state.
11015         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11016         (target_terminal::ours, target_terminal::ours_for_output): Use
11017         target_terminal_is_ours_kind.
11018         (target_interrupt): Remove ptid parameter.  Adjust.
11019         (default_target_pass_ctrlc): Adjust.
11020         * target.h (target_ops::to_terminal_save_inferior): New field.
11021         (target_ops::to_interrupt): Remove ptid_t parameter.
11022         (target_interrupt): Remove ptid_t parameter.  Update comment.
11023         (target_pass_ctrlc): Update comment.
11024         * target/target.h (target_terminal_state): New scoped enum,
11025         factored out of ...
11026         (target_terminal::terminal_state): ... here.
11027         (target_terminal::inferior): Update comments.
11028         (target_terminal::restore_inferior): New.
11029         (target_terminal::is_inferior, target_terminal::is_ours)
11030         (target_terminal::is_ours_for_output): Adjust.
11031         (target_terminal::scoped_restore_terminal_state): Adjust to
11032         rename, and call restore_inferior() instead of inferior().
11033         (target_terminal::scoped_restore_terminal_state::m_state): Change
11034         type.
11035         (target_terminal::terminal_state): Rename to ...
11036         (target_terminal::m_terminal_state): ... this and change type.
11037
11038 2018-01-30  Pedro Alves  <palves@redhat.com>
11039
11040         * linux-nat.c (wait_for_signal): New function.
11041         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11042         directly.
11043         (async_terminal_is_ours)
11044         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11045         (linux_nat_add_target): Don't override
11046         to_terminal_inferior/to_terminal_ours.
11047
11048 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11049
11050         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11051
11052 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11053
11054         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11055         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11056         dwarf2_per_objfile_free here.
11057         (dwarf2_per_objfile_free): Remove.
11058         (_initialize_dwarf2_read): Don't register
11059         dwarf2_per_objfile_free as a registry cleanup.
11060
11061 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11062
11063         Avoid compilation errors in MinGW native builds
11064
11065         The error is triggered by including python-internal.h, and the
11066         error message is:
11067
11068              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11069                       from build-gnulib/import/math.h:27,
11070                       from d:/usr/Python26/include/pyport.h:235,
11071                       from d:/usr/Python26/include/Python.h:58,
11072                       from python/python-internal.h:94,
11073                       from python/py-arch.c:24:
11074              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11075         using ::hypot;
11076                 ^~~~~
11077
11078         This happens because Python headers define 'hypot' to expand t
11079         '_hypot' in the Windows builds.
11080         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11081         'hypoth'.  This avoids a compilation error.
11082
11083 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11084
11085         * MAINTAINERS (Write After Approval): Fix ordering.
11086
11087 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11088
11089         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11090
11091 2018-01-26  Alan Modra  <amodra@gmail.com>
11092
11093         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11094         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11095         Remove nop.  Make const.  Comment.
11096         (powerpc32_plt_stub_so_2): New.
11097         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11098         Correct count.  Update uses.
11099         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11100         Move common code reading PLT entry word.  Correct
11101         powerpc32_plt_stub PLT address calculation.
11102         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11103         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11104         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11105         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11106         (ppc64_standard_linkage8): Likewise.
11107         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11108         Correct insns description.
11109         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11110
11111 2018-01-24  Pedro Alves  <palves@redhat.com>
11112
11113         GCC PR libstdc++/83906
11114         * gdbtypes.c (operator==(const dynamic_prop &,
11115         const dynamic_prop &)): New.
11116         (operator==(const range_bounds &, const range_bounds &)): New.
11117         (check_types_equal): Use them instead of memcmp.
11118         * gdbtypes.h (operator==(const dynamic_prop &,
11119         const dynamic_prop &)): Declare.
11120         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11121         (operator==(const range_bounds &, const range_bounds &)): Declare.
11122         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11123
11124 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11125
11126         * s390-linux-tdep.c (s390_record_address_mask)
11127         (s390_record_calc_disp_common, s390_record_calc_disp)
11128         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11129         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11130         (s390_process_record): Move to s390-tdep.c.
11131         (s390_linux_init_abi_any): Adjust.
11132         * s390-tdep.c (s390_record_address_mask)
11133         (s390_record_calc_disp_common, s390_record_calc_disp)
11134         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11135         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11136         (s390_process_record): Moved from s390-linux-tdep.c
11137         (s390_gdbarch_init): Adjust.
11138
11139 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11140
11141         * s390-linux-nat.c (s390-tdep.h): New include.
11142         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11143         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11144         (ALLDEPFILES): Add s390-tdep.c.
11145         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11146         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11147         * s390-tdep.h: ...this.  New file.
11148         * s390-linux-tdep.c (s390-tdep.h): New include.
11149         (_initialize_s390_tdep): Rename to...
11150         (_initialize_s390_linux_tdep): ...this and adjust.
11151         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11152         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11153         s390-tdep.h.
11154         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11155         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11156         (s390_is_partial_instruction, s390_software_single_step)
11157         (is_non_branch_ril, s390_displaced_step_copy_insn)
11158         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11159         (s390_prologue_data, s390_addr, s390_store, s390_load)
11160         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11161         (s390_register_call_saved, s390_guess_tracepoint_registers)
11162         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11163         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11164         (s390_pseudo_register_name, s390_pseudo_register_type)
11165         (s390_pseudo_register_read, s390_pseudo_register_write)
11166         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11167         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11168         (s390_addr_bits_remove, s390_address_class_type_flags)
11169         (s390_address_class_type_flags_to_name)
11170         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11171         (s390_function_arg_float, s390_function_arg_vector)
11172         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11173         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11174         (s390_frame_align, s390_register_return_value, s390_return_value)
11175         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11176         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11177         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11178         (s390_trad_frame_prev_register, s390_unwind_cache)
11179         (s390_prologue_frame_unwind_cache)
11180         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11181         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11182         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11183         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11184         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11185         (s390_frame_base_address, s390_local_base_address)
11186         (s390_frame_base, s390_gcc_target_options)
11187         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11188         (s390_validate_reg_range, s390_tdesc_valid)
11189         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11190         * s390-tdep.c: ...this.  New file.
11191
11192 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11193
11194         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11195         (s390_process_record, s390_gdbarch_tdep_alloc)
11196         (s390_linux_init_abi_any): Use/set new hook.
11197
11198 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11199
11200         * s390-linux-tdep.c (osabi.h): New include.
11201         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11202         (s390_linux_init_abi_any): New functions.
11203         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11204
11205 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11206
11207         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11208         tdesc_has_registers check
11209
11210 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11211
11212         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11213         (s390_validate_reg_range): New macro.
11214         (s390_gdbarch_init): Adjust.
11215
11216 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11217
11218         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11219         (s390_gdbarch_tdep_alloc): Adjust.
11220         (s390_gdbarch_init): Adjust.
11221
11222 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11223
11224         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11225         <have_tdb>: Change type to bool.
11226         (s390_gdbarch_tdep_alloc): Adjust.
11227         (s390_gdbarch_init): Adjust.
11228
11229 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11230
11231         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11232         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11233         (s390_gdbarch_tdep_alloc): New function.
11234         (s390_gdbarch_init): Allocate tdep at start and use its fields
11235         instead of separate variables.
11236
11237 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11238
11239         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11240         when looking for cached gdbarch and add comment for remaining.
11241
11242 2018-01-22  Pedro Alves  <palves@redhat.com>
11243             Sergio Durigan Junior  <sergiodj@redhat.com>
11244
11245         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11246         case.
11247
11248 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11249
11250         * MAINTAINERS: Update my company e-mail address.
11251
11252 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11253
11254         * regcache.c (cooked_write_test): New function.
11255         (_initialize_regcache): Register the test.
11256
11257 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11258
11259         * ia64-tdep.c (ia64_pseudo_register_read): Call
11260         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11261         * m32c-tdep.c (m32c_cat_read): Likewise.
11262         (m32c_r3r2r1r0_read): Likewise.
11263         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11264         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11265
11266 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11267
11268         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11269         method raw_read instead of regcache_raw_read.
11270         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11271         * arm-tdep.c (arm_neon_quad_read): Likewise.
11272         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11273         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11274         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11275         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11276         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11277         (i386_pseudo_register_read_into_value): Likewise.
11278         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11279         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11280         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11281         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11282         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11283         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11284         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11285         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11286         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11287
11288 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11289
11290         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11291         * configure.tgt: Remove target mt.
11292         * mt-tdep.c: Remove.
11293         * regcache.c (cooked_read_test): Remove the check for mt.
11294
11295 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11296
11297         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11298         instead of gdbarch_pseudo_register_read_value.
11299
11300 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11301
11302         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11303         language is Ada.
11304
11305 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11306
11307         * linespec.c (create_sals_line_offset): Remove code that preserved
11308         the symtab_and_line's line number.
11309
11310 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11311
11312         * varobj.c (varobj_create): Don't set valid_block when creating a
11313         floating varobj.
11314
11315 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11316
11317         * varobj.c (varobj_create): Remove out of date comment.
11318
11319 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11320
11321         PR mi/20395
11322         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11323         updating innermost block.
11324         * parse.c (innermost_block_tracker::update): Take extra type
11325         parameter, and check types match before updating innermost block.
11326         (write_dollar_variable): Update innermost block for registers.
11327         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11328         (innermost_block_tracker::innermost_block_tracker): Initialise
11329         m_types member.
11330         (innermost_block_tracker::reset): Take type parameter.
11331         (innermost_block_tracker::update): Take type parameter, and pass
11332         type through as needed.
11333         (innermost_block_tracker::m_types): New member.
11334         * varobj.c (varobj_create): Pass type when reseting innermost
11335         block.
11336
11337 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11338
11339         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11340         * ada-lang.c (resolve_subexp): Likewise.
11341         * breakpoint.c (set_breakpoint_condition) Likewise.
11342         (watch_command_1) Likewise.
11343         * c-exp.y (variable): Likewise.
11344         * d-exp.y (PrimaryExpression): Likewise.
11345         * f-exp.y (variable): Likewise.
11346         * go-exp.y (variable): Likewise.
11347         * m2-exp.y (variable): Likewise.
11348         * objfiles.c (objfile::~objfile): Likewise.
11349         * p-exp.y (variable): Likewise.
11350         * parse.c (innermost_block): Change type.
11351         * parser-defs.h (class innermost_block_tracker): New.
11352         (innermost_block): Change to innermost_block_tracker.
11353         * printcmd.c (display_command): Switch to innermost_block API.
11354         (do_one_display): Likewise.
11355         * rust-exp.y (do_one_display): Likewise.
11356         * symfile.c (clear_symtab_users): Likewise.
11357         * varobj.c (varobj_create): Switch to innermost_block API, replace
11358         use of innermost_block with block stored on varobj object.
11359
11360 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11361
11362         * expression.h (innermost_block): Remove declaration.
11363         * varobj.c: Add 'parser-defs.h' include.
11364
11365 2018-01-19  Tom Tromey  <tom@tromey.com>
11366
11367         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11368         symbols in the static and global blocks.
11369
11370 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11371
11372         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11373         gdb_ptrace.h, and move including gdb_wait.h ...
11374         * nat/linux-ptrace.h: ... to here.
11375
11376 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11377
11378         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11379         inf_ptrace_detach_success.
11380         (inf_ptrace_detach_success): Add inferior parameter, use it
11381         instead of inferior_ptid, pass it to detach_inferior.
11382         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11383         parameter.
11384         * inferior.c (detach_inferior): Add overload that takes an
11385         inferior object.
11386         * inferior.h (detach_inferior): Likewise.
11387         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11388         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11389         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11390
11391 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11392
11393         * target.h (struct target_ops) <to_detach>: Add inferior
11394         parameter.
11395         (target_detach): Likewise.
11396         * target.c (dispose_inferior): Pass inferior down.
11397         (target_detach): Pass inferior down.  Assert that it is equal to
11398         the current inferior.
11399         * aix-thread.c (aix_thread_detach): Pass inferior down.
11400         * corefile.c (core_file_command): Pass current_inferior() down.
11401         * corelow.c (core_detach): Add inferior parameter.
11402         * darwin-nat.c (darwin_detach): Likewise.
11403         * gnu-nat.c (gnu_detach): Likewise.
11404         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11405         * infcmd.c (detach_command): Pass current_inferior() down to
11406         target_detach.
11407         * infrun.c (follow_fork_inferior): Pass parent_inf to
11408         target_detach.
11409         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11410         target_detach.
11411         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11412         * linux-thread-db.c (thread_db_detach): Likewise.
11413         * nto-procfs.c (procfs_detach): Likewise.
11414         * procfs.c (procfs_detach): Likewise.
11415         * record.c (record_detach): Likewise.
11416         * record.h (struct inferior): Forward-declare.
11417         (record_detach): Add inferior parameter.
11418         * remote-sim.c (gdbsim_detach): Likewise.
11419         * remote.c (remote_detach_1): Likewise.
11420         (remote_detach): Likewise.
11421         (extended_remote_detach): Likewise.
11422         * sol-thread.c (sol_thread_detach): Likewise.
11423         * target-debug.h (target_debug_print_inferior_p): New macro.
11424         * target-delegates.c: Re-generate.
11425         * top.c (kill_or_detach): Pass inferior down to target_detach.
11426         * windows-nat.c (windows_detach): Add inferior parameter.
11427
11428 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11429
11430         * target.h (struct target_ops) <to_detach>: Remove args
11431         parameter.
11432         (target_detach): Likewise.
11433         * target.c (dispose_inferior): Adjust.
11434         (target_detach): Remove args parameter, adjust.
11435         * aix-thread.c (aix_thread_detach): Adjust.
11436         * corefile.c (core_file_command): Adjust.
11437         * corelow.c (core_detach): Adjust.
11438         * darwin-nat.c (darwin_detach): Adjust.
11439         * gnu-nat.c (gnu_detach): Adjust.
11440         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11441         * infcmd.c (detach_command): Adjust
11442         * infrun.c (follow_fork_inferior): Adjust.
11443         (handle_vfork_child_exec_or_exit): Adjust.
11444         * linux-fork.c (linux_fork_detach): Remove args parameter.
11445         * linux-fork.h (linux_fork_detach): Likewise.
11446         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11447         * linux-thread-db.c (thread_db_detach): Likewise.
11448         * nto-procfs.c (procfs_detach): Likewise.
11449         * procfs.c (procfs_detach): Likewise.
11450         (do_detach): Remove signo parameter.
11451         * record.c (record_detach): Remove args parameter.
11452         * record.h (record_detach): Likewise.
11453         * remote-sim.c (gdbsim_detach): Likewise.
11454         * remote.c (remote_detach_1): Likewise.
11455         (remote_detach): Likewise.
11456         (extended_remote_detach): Likewise.
11457         * sol-thread.c (sol_thread_detach): Likewise.
11458         * target-delegates.c: Re-generate.
11459         * top.c (struct qt_args) <args>: Remove field.
11460         (kill_or_detach): Don't pass args.
11461         (quit_force): Don't set args.
11462         * windows-nat.c (windows_detach): Remove args parameter.
11463
11464 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11465
11466         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11467         (arm_linux_init_abi): Install it.
11468
11469 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11470
11471         * osabi.c (gdb_osabi_names): Extend the regexp for
11472         arm-linux-gnueabihf.
11473
11474 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11475
11476         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11477         m_abbrevs.
11478         (abbrev_table::add_abbrev): Update.
11479         (abbrev_table::lookup_abbrev): Update.
11480
11481 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11482
11483         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11484
11485 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11486
11487         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11488         to "std::string".
11489
11490 2018-01-17  Tom Tromey  <tom@tromey.com>
11491
11492         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11493
11494 2018-01-17  Tom Tromey  <tom@tromey.com>
11495
11496         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11497         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11498         (create_array_type_with_stride): Update.
11499         * dwarf2read.c (set_die_type): Update.
11500
11501 2018-01-17  Tom Tromey  <tom@tromey.com>
11502
11503         * dwarf2read.c (delayed_method_info): Remove typedef.
11504         (dwarf2_cu::method_info): Now a std::vector.
11505         (add_to_method_list): Update.
11506         (free_delayed_list): Remove.
11507         (compute_delayed_physnames): Update.
11508         (process_full_comp_unit, process_full_type_unit): Clear the method
11509         list.  Remove cleanups.
11510         (psymtab_include_file_name): Add name_holder parameter.  Use
11511         unique_xmalloc_ptr.
11512         (dwarf_decode_lines): Update.
11513
11514 2018-01-17  Tom Tromey  <tom@tromey.com>
11515             Simon Marchi  <simon.marchi@ericsson.com>
11516
11517         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11518         (dwarf2_per_objfile::free_cached_comp_units)
11519         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11520         (init_cutu_and_read_dies_no_follow): Update.
11521         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11522         (dwarf2_cu::~dwarf2_cu): New.
11523         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11524         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11525
11526 2018-01-17  Tom Tromey  <tom@tromey.com>
11527             Simon Marchi  <simon.marchi@ericsson.com>
11528
11529         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11530         (struct die_reader_specs) <abbrev_table>: New member.
11531         (struct abbrev_table): Add constructor.
11532         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11533         <abbrev_obstack>: Now an auto_obstack.
11534         (abbrev_table_up): New typedef.
11535         (init_cu_die_reader): Add abbrev_table parameter.
11536         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11537         Add result_dwo_abbrev_table.
11538         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11539         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11540         Update.
11541         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11542         parameter.
11543         (skip_children): Update.
11544         (abbrev_table::alloc_abbrev): Rename from
11545         abbrev_table_alloc_abbrev.
11546         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11547         (abbrev_table::lookup_abbrev): Rename from
11548         abbrev_table_lookup_abbrev.
11549         (abbrev_table_read_table): Return abbrev_table_up.
11550         (abbrev_table_free, abbrev_table_free_cleanup)
11551         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11552         (load_partial_dies): Update.
11553
11554 2018-01-17  Tom Tromey  <tom@tromey.com>
11555
11556         * dwarf2read.c (dwarf2_compute_name): Update comment.
11557         (read_func_scope, read_variable): Update.
11558         (new_symbol): Remove.
11559         (new_symbol_full): Rename to new_symbol.
11560
11561 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11562
11563         PR gdb/16577
11564         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11565         a warning instead of throwing an error, set section size to 0 and return
11566         NULL.
11567         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11568
11569 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11570
11571         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11572         std::string.
11573         (linux_ptrace_attach_fail_reason_string): Likewise.
11574         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11575         Likewise.
11576         (linux_ptrace_attach_fail_reason_string): Likewise.
11577         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11578
11579 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11580
11581         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11582
11583 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11584
11585         PR gdb/21559
11586         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11587         checking for fs_base/gs_base fields in struct user_regs_struct.
11588         * configure: Regenerate.
11589
11590 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11591
11592         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11593         function.
11594         (aarch64_linux_init_abi): Install it to gdbarch hook
11595         gcc_target_options.
11596
11597 2018-01-15  Pedro Alves  <palves@redhat.com>
11598
11599         * common/signals-state-save-restore.c
11600         (save_original_signals_state): Fix typos.
11601
11602 2017-01-12  Tom Tromey  <tom@tromey.com>
11603             Sergio Durigan Junior  <sergiodj@redhat.com>
11604
11605         * Makefile.in (install-only): Install gdb-add-index.
11606
11607 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11608
11609         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11610
11611 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11612
11613         * infrun.c (keep_going_pass_signal): Clear step-over info when
11614         insert_breakpoints fails.
11615
11616 2018-01-11  Pedro Alves  <palves@redhat.com>
11617
11618         PR gdb/22583
11619         * infrun.c (resume): Rename to ...
11620         (resume_1): ... this.
11621         (resume): Reimplement as wrapper around resume_1.
11622
11623 2018-01-11  Pedro Alves  <palves@redhat.com>
11624
11625         PR remote/22597
11626         * remote.c (remote_parse_stop_reply): Default to the last-set
11627         general thread instead of to 'magic_null_ptid'.
11628
11629 2018-01-10  Pedro Alves  <palves@redhat.com>
11630
11631         * language.h (language_get_symbol_name_matcher): Rename ...
11632         (get_symbol_name_matcher): ... this.
11633         * language.c (language_get_symbol_name_matcher): Ditto.
11634         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11635         callers adjusted.
11636
11637 2018-01-10  Pedro Alves  <palves@redhat.com>
11638
11639         PR gdb/22670
11640         * dwarf2read.c
11641         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11642         Adjust to use language_get_symbol_name_matcher instead of
11643         language_defn::la_get_symbol_name_matcher.
11644         * language.c (language_get_symbol_name_matcher): If in Ada mode
11645         and the lookup name is a verbatim match, return Ada's matcher.
11646         * language.h (language_get_symbol_name_matcher): Adjust comment.
11647         (ada_lookup_name_info::verbatim_p):: New method.
11648
11649 2018-01-10  Pedro Alves  <palves@redhat.com>
11650
11651         PR gdb/22670
11652         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11653         minsym's language is language_auto or language_cplus, pass down
11654         language_ada instead.
11655         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11656
11657 2018-01-10  Pedro Alves  <palves@redhat.com>
11658
11659         PR gdb/22670
11660         * minsyms.c (linkage_name_str): New function.
11661         (iterate_over_minimal_symbols): Use it.
11662
11663 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11664
11665         * NEWS: Document that 'info proc' now works on FreeBSD.
11666
11667 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11668
11669         * configure.ac: Check for kinfo_getfile in libutil.
11670         * configure: Regenerate.
11671         * config.in: Regenerate.
11672         * fbsd-nat.c: Include "fbsd-tdep.h".
11673         (fbsd_fetch_cmdline): New.
11674         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11675         rather than calling error.
11676         (fbsd_info_proc): New.
11677         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11678         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11679         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11680
11681 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11682
11683         * fbsd-nat.c (struct free_deleter): Remove.
11684         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11685
11686 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11687
11688         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11689         NULL for an empty pathname.
11690
11691 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11692
11693         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11694         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11695         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11696         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11697         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11698         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11699         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11700         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11701         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11702         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11703         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11704         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11705         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11706         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11707         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11708
11709 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11710
11711         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11712         (gnu_xfer_auxv): New function.
11713         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11714         TARGET_OBJECT_AUXV.
11715
11716 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11717             Simon Marchi  <simon.marchi@ericsson.com>
11718
11719         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11720         common/selftest.c.
11721         (COMMON_OBS): Remove selftest.o.
11722         * configure.ac: Append selftest-arch.c and common/selftest.c to
11723         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11724         * configure: Re-generated.
11725         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11726         GDB_SELF_TEST.
11727         (maintenance_info_selftests): Likewise.
11728
11729 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11730
11731         * ada-valprint.c (val_print_packed_array_elements): Use
11732         proper number of elements when printing an array indexed
11733         by an enumeration type.
11734
11735 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11736
11737         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11738         (dw2_get_file_names_reader): Adjust.
11739         (lookup_dwo_signatured_type): Adjust.
11740         (lookup_dwp_signatured_type): Adjust.
11741         (lookup_signatured_type): Adjust.
11742         (create_type_unit_group): Adjust.
11743         (get_type_unit_group): Adjust.
11744         (process_psymtab_comp_unit_reader): Adjust.
11745         (build_type_psymtabs_reader): Adjust.
11746         (scan_partial_symbols): Adjust.
11747         (add_partial_symbol): Adjust.
11748         (add_partial_subprogram): Adjust.
11749         (peek_die_abbrev): Adjust.
11750         (fixup_go_packaging): Adjust.
11751         (process_imported_unit_die): Adjust.
11752         (dwarf2_compute_name): Adjust.
11753         (dwarf2_physname): Adjust.
11754         (read_import_statement): Adjust.
11755         (handle_DW_AT_stmt_list): Adjust.
11756         (read_file_scope): Adjust.
11757         (read_func_scope): Adjust.
11758         (read_lexical_block_scope): Adjust.
11759         (read_call_site_scope): Adjust.
11760         (read_variable): Adjust.
11761         (dwarf2_rnglists_process): Adjust.
11762         (dwarf2_ranges_process): Adjust.
11763         (dwarf2_ranges_read): Adjust.
11764         (dwarf2_get_pc_bounds): Adjust.
11765         (dwarf2_record_block_ranges): Adjust.
11766         (dwarf2_add_field): Adjust.
11767         (dwarf2_add_member_fn): Adjust.
11768         (read_structure_type): Adjust.
11769         (process_structure_scope): Adjust.
11770         (read_enumeration_type): Adjust.
11771         (read_array_type): Adjust.
11772         (mark_common_block_symbol_computed): Adjust.
11773         (read_common_block): Adjust.
11774         (read_namespace_type): Adjust.
11775         (read_namespace): Adjust.
11776         (read_module_type): Adjust.
11777         (read_tag_pointer_type): Adjust.
11778         (read_tag_ptr_to_member_type): Adjust.
11779         (read_tag_string_type): Adjust.
11780         (read_subroutine_type): Adjust.
11781         (read_typedef): Adjust.
11782         (read_base_type): Adjust.
11783         (attr_to_dynamic_prop): Adjust.
11784         (read_subrange_type): Adjust.
11785         (read_unspecified_type): Adjust.
11786         (dwarf2_read_abbrevs): Adjust.
11787         (load_partial_dies): Adjust.
11788         (read_partial_die): Adjust.
11789         (find_partial_die): Adjust.
11790         (guess_partial_die_structure_name): Adjust.
11791         (fixup_partial_die): Adjust.
11792         (read_attribute_value): Adjust.
11793         (read_addr_index): Adjust.
11794         (read_addr_index_from_leb128): Adjust.
11795         (read_str_index): Adjust.
11796         (dwarf2_string_attr): Adjust.
11797         (get_debug_line_section): Adjust.
11798         (dwarf_decode_line_header): Adjust.
11799         (lnp_state_machine::check_line_address): Adjust.
11800         (dwarf_decode_lines_1): Adjust.
11801         (dwarf_decode_lines): Adjust.
11802         (dwarf2_start_symtab): Adjust.
11803         (var_decode_location): Adjust.
11804         (new_symbol_full): Adjust.
11805         (dwarf2_const_value_data): Adjust.
11806         (dwarf2_const_value_attr): Adjust.
11807         (dwarf2_const_value): Adjust.
11808         (die_type): Adjust.
11809         (die_containing_type): Adjust.
11810         (build_error_marker_type): Adjust.
11811         (lookup_die_type): Adjust.
11812         (guess_full_die_structure_name): Adjust.
11813         (anonymous_struct_prefix): Adjust.
11814         (determine_prefix): Adjust.
11815         (dwarf2_name): Adjust.
11816         (follow_die_ref_or_sig): Adjust.
11817         (follow_die_offset): Adjust.
11818         (follow_die_ref): Adjust.
11819         (follow_die_sig_1): Adjust.
11820         (follow_die_sig): Adjust.
11821         (get_signatured_type): Adjust.
11822         (get_DW_AT_signature_type): Adjust.
11823         (decode_locdesc): Adjust.
11824         (dwarf_decode_macros): Adjust.
11825         (cu_debug_loc_section): Adjust.
11826         (fill_in_loclist_baton): Adjust.
11827         (dwarf2_symbol_mark_computed): Adjust.
11828         (init_one_comp_unit): Don't assign
11829         dwarf2_cu::dwarf2_per_objfile.
11830         (set_die_type): Adjust.
11831
11832 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11833
11834         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11835         <dwarf2_per_objfile>: New field.
11836         (dwarf2_per_objfile): Remove global.
11837         (get_dwarf2_per_objfile): New function.
11838         (set_dwarf2_per_objfile): New function.
11839         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11840         dwarf2_per_objfile.
11841         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11842         (read_abbrev_offset): Likewise.
11843         (read_indirect_string): Likewise.
11844         (read_indirect_line_string): Likewise.
11845         (read_indirect_string_at_offset): Likewise.
11846         (read_indirect_string_from_dwz): Likewise.
11847         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11848         dwarf2_per_objfile.
11849         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11850         (create_all_comp_units): Change objfile parameter to
11851         dwarf2_per_objfile.
11852         (create_all_type_units): Likewise.
11853         (process_queue): Add dwarf2_per_objfile parameter.
11854         (read_and_check_comp_unit_head): Likewise.
11855         (lookup_dwo_unit_in_dwp): Likewise.
11856         (get_dwp_file): Likewise.
11857         (process_cu_includes): Likewise.
11858         (struct free_dwo_file_cleanup_data): New struct.
11859         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11860         set_dwarf2_per_objfile.
11861         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11862         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11863         context, adjust calls.
11864         (dw2_instantiate_symtab): Likewise.
11865         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11866         (dw2_get_cu): Likewise.
11867         (create_cu_from_index_list): Change objfile parameter to
11868         dwarf2_per_objfile.
11869         (create_cus_from_index_list): Get dwarf2_per_objfile from
11870         context, adjust calls.
11871         (create_cus_from_index): Likewise.
11872         (create_signatured_type_table_from_index): Change objfile
11873         parameter to dwarf2_per_objfile.
11874         (create_signatured_type_table_from_debug_names): Change objfile
11875         parameter to dwarf2_per_objfile.
11876         (create_addrmap_from_index): Likewise.
11877         (create_addrmap_from_aranges): Likewise.
11878         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11879         (dw2_setup): Remove.
11880         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11881         context.
11882         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11883         get_dwarf2_per_objfile.
11884         (dw2_forget_cached_source_info): Likewise.
11885         (dw2_map_symtabs_matching_filename): Likewise.
11886         (struct dw2_symtab_iterator) <index>: Remove.
11887         <dwarf2_per_objfile>: New field.
11888         (dw2_symtab_iter_init): Replace index parameter with
11889         dwarf2_per_objfile.
11890         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11891         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11892         (dw2_print_stats): Likewise.
11893         (dw2_dump): Likewise.
11894         (dw2_expand_symtabs_for_function): Likewise.
11895         (dw2_expand_all_symtabs): Likewise.
11896         (dw2_expand_symtabs_with_fullname): Likewise.
11897         (dw2_expand_marked_cus): Replace index and objfile parameters
11898         with dwarf2_per_objfile.
11899         (dw_expand_symtabs_matching_file_matcher): Add
11900         dwarf2_per_objfile parameter and adjust calls.
11901         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11902         adjust calls.
11903         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11904         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11905         adjust calls.
11906         (create_cus_from_debug_names_list): Replace objfile parameter
11907         with dwarf2_per_objfile and adjust calls.
11908         (create_cus_from_debug_names): Likewise.
11909         (dwarf2_read_debug_names): Likewise.
11910         (mapped_debug_names::namei_to_name): Adjust call.
11911         (dw2_debug_names_iterator::next): Likewise.
11912         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11913         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11914         (dw2_debug_names_dump): Likewise.
11915         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11916         (dw2_debug_names_expand_symtabs_matching): Likewise.
11917         (dwarf2_initialize_objfile): Likewise.
11918         (dwarf2_build_psymtabs): Likewise.
11919         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11920         this_cu.
11921         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11922         (read_and_check_comp_unit_head): Likewise.
11923         (read_abbrev_offset): Likewise.
11924         (create_debug_type_hash_table): Likewise.
11925         (create_debug_types_hash_table): Likewise.
11926         (create_all_type_units): Replace objfile parameter with
11927         dwarf2_per_objfile.
11928         (add_type_unit): Add dwarf2_per_objfile parameter.
11929         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11930         with dwarf2_per_objfile.
11931         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11932         (lookup_dwp_signatured_type): Likewise.
11933         (lookup_signatured_type): Likewise.
11934         (read_cutu_die_from_dwo): Likewise.
11935         (init_tu_and_read_dwo_dies): Likewise.
11936         (init_cutu_and_read_dies): Likewise.
11937         (init_cutu_and_read_dies_no_follow): Likewise.
11938         (allocate_type_unit_groups_table): Add objfile parameter.
11939         (create_type_unit_group): Use dwarf2_per_objfile from cu.
11940         (get_type_unit_group): Likewise.
11941         (process_psymtab_comp_unit): Update call.
11942         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11943         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11944         (print_tu_stats): Likewise.
11945         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11946         in void* parameter.
11947         (build_type_psymtabs): Change objfile parameter to
11948         dwarf2_per_objfile.
11949         (process_skeletonless_type_unit): Use dwarf2_per_objfile
11950         passed in void* parameter.
11951         (process_skeletonless_type_units): Change objfile parameter to
11952         dwarf2_per_objfile.
11953         (set_partial_user): Likewise.
11954         (dwarf2_build_psymtabs_hard): Likewise.
11955         (read_comp_units_from_section): Likewise.
11956         (create_all_comp_units): Likewise.
11957         (scan_partial_symbols): Update calls.
11958         (add_partial_symbol): Likewise.
11959         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11960         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11961         (process_queue): Add dwarf2_per_objfile parameter.
11962         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11963         (compute_compunit_symtab_includes): Likewise.
11964         (process_cu_includes): Add dwarf2_per_objfile parameter.
11965         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11966         (process_full_type_unit): Likewise.
11967         (process_imported_unit_die): Update call.
11968         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11969         (read_file_scope): Likewise.
11970         (allocate_dwo_file_hash_table): Add objfile parameter.
11971         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11972         (create_cus_hash_table): Likewise.
11973         (create_dwp_hash_table): Likewise.
11974         (create_dwo_unit_in_dwp_v1): Likewise.
11975         (create_dwp_v2_section): Likewise.
11976         (create_dwo_unit_in_dwp_v2): Likewise.
11977         (lookup_dwo_unit_in_dwp): Likewise.
11978         (try_open_dwop_file): Likewise.
11979         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11980         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11981         cleanup to include a reference to dwarf2_per_objfile.
11982         (open_dwp_file): Add dwarf2_per_objfile parameter.
11983         (open_and_init_dwp_file): Likewise.
11984         (get_dwp_file): Likewise.
11985         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11986         (queue_and_load_all_dwo_tus): Update call.
11987         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11988         data.
11989         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11990         (dwarf2_ranges_process): Likewise.
11991         (dwarf2_get_pc_bounds): Likewise.
11992         (mark_common_block_symbol_computed): Likewise.
11993         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11994         (dwarf2_read_abbrevs): Update call.
11995         (read_partial_die): Use dwarf2_per_objfile from cu.
11996         (find_partial_die): Likewise.
11997         (fixup_partial_die): Likewise.
11998         (read_attribute_value): Likewise.
11999         (read_indirect_string_at_offset_from): Add objfile parameter.
12000         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12001         parameter.
12002         (read_indirect_string_from_dwz): Add objfile parameter.
12003         (read_indirect_string): Add objfile parameter.
12004         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12005         (read_addr_index): Use dwarf2_per_objfile from cu.
12006         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12007         call dw2_setup.
12008         (read_str_index): Use dwarf2_per_objfile from cu.
12009         (get_debug_line_section): Likewise.
12010         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12011         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12012         (new_symbol_full): Use dwarf2_per_objfile from cu.
12013         (build_error_marker_type): Likewise.
12014         (lookup_die_type): Likewise.
12015         (determine_prefix): Likewise.
12016         (follow_die_offset): Likewise.
12017         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12018         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12019         (dwarf2_fetch_die_type_sect_off): Likewise.
12020         (dwarf2_get_die_type): Likewise.
12021         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12022         (get_signatured_type): Likewise.
12023         (get_DW_AT_signature_type): Likewise.
12024         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12025         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12026         (cu_debug_loc_section): Likewise.
12027         (fill_in_loclist_baton): Likewise.
12028         (dwarf2_symbol_mark_computed): Likewise.
12029         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12030         dwarf2_per_objfile.
12031         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12032         parameter.
12033         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12034         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12035         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12036         (set_die_type): Use dwarf2_free_objfile from cu.
12037         (get_die_type_at_offset): Likewise.
12038         (dwarf2_per_objfile_free): Don't assign global variable.
12039         (debug_names) <constructor>: Add dwarf2_per_objfile
12040         parameter, update m_debugstrlookup construction.
12041         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12042         parameter.
12043         <m_dwarf2_per_objfile>: New field.
12044         <lookup>: Use m_dwarf2_per_objfile.
12045         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12046         (psyms_seen_size): Likewise.
12047         (write_gdbindex): Replace objfile parameter with
12048         dwarf2_per_objfile.
12049         (write_debug_names): Likewise.
12050         (write_psymtabs_to_index): Likewise.
12051         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12052         calls.
12053
12054 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12055
12056         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12057         <dwarf2_per_objfile>: New field.
12058         (struct dwarf2_per_cu_data) <objfile>: Remove.
12059         <dwarf2_per_objfile>: New field.
12060         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12061         of objfile.
12062         (create_signatured_type_table_from_index): Likewise.
12063         (create_debug_type_hash_table): Likewise.
12064         (fill_in_sig_entry_from_dwo_entry): Likewise.
12065         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12066         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12067         objfile.
12068         (create_partial_symtab): Access objfile through
12069         dwarf2_per_objfile.
12070         (process_psymtab_comp_unit_reader): Likewise.
12071         (read_comp_units_from_section): Likewise.
12072         (scan_partial_symbols): Likewise.
12073         (add_partial_symbol): Likewise.
12074         (add_partial_subprogram): Likewise.
12075         (peek_die_abbrev): Likewise.
12076         (fixup_go_packaging): Likewise.
12077         (process_full_comp_unit): Likewise.
12078         (process_full_type_unit): Likewise.
12079         (process_imported_unit_die): Likewise.
12080         (dwarf2_compute_name): Likewise.
12081         (dwarf2_physname): Likewise.
12082         (read_import_statement): Likewise.
12083         (create_cus_hash_table): Assign dwarf2_physname instead of
12084         objfile.
12085         (read_func_scope): Access objfile through dwarf2_per_objfile.
12086         (read_lexical_block_scope): Likewise.
12087         (read_call_site_scope): Likewise.
12088         (read_variable): Likewise.
12089         (dwarf2_rnglists_process): Likewise.
12090         (dwarf2_ranges_process): Likewise.
12091         (dwarf2_ranges_read): Likewise.
12092         (dwarf2_record_block_ranges): Likewise.
12093         (dwarf2_add_field): Likewise.
12094         (dwarf2_add_member_fn): Likewise.
12095         (read_structure_type): Likewise.
12096         (process_structure_scope): Likewise.
12097         (read_enumeration_type): Likewise.
12098         (read_array_type): Likewise.
12099         (read_common_block): Likewise.
12100         (read_namespace_type): Likewise.
12101         (read_namespace): Likewise.
12102         (read_module_type): Likewise.
12103         (read_tag_pointer_type): Likewise.
12104         (read_tag_ptr_to_member_type): Likewise.
12105         (read_tag_string_type): Likewise.
12106         (read_subroutine_type): Likewise.
12107         (read_typedef): Likewise.
12108         (read_base_type): Likewise.
12109         (attr_to_dynamic_prop): Likewise.
12110         (read_subrange_type): Likewise.
12111         (read_unspecified_type): Likewise.
12112         (load_partial_dies): Likewise.
12113         (read_partial_die): Likewise.
12114         (find_partial_die): Likewise.
12115         (guess_partial_die_structure_name): Likewise.
12116         (fixup_partial_die): Likewise.
12117         (read_attribute_value): Likewise.
12118         (read_addr_index_from_leb128): Likewise.
12119         (dwarf2_read_addr_index): Likewise.
12120         (dwarf2_string_attr): Likewise.
12121         (lnp_state_machine::check_line_address): Likewise.
12122         (dwarf_decode_lines_1): Likewise.
12123         (dwarf_decode_lines): Likewise.
12124         (dwarf2_start_symtab): Likewise.
12125         (var_decode_location): Likewise.
12126         (new_symbol_full): Likewise.
12127         (dwarf2_const_value_data): Likewise.
12128         (dwarf2_const_value_attr): Likewise.
12129         (dwarf2_const_value): Likewise.
12130         (die_type): Likewise.
12131         (die_containing_type): Likewise.
12132         (lookup_die_type): Likewise.
12133         (guess_full_die_structure_name): Likewise.
12134         (anonymous_struct_prefix): Likewise.
12135         (dwarf2_name): Likewise.
12136         (follow_die_ref_or_sig): Likewise.
12137         (follow_die_offset): Likewise.
12138         (follow_die_ref): Likewise.
12139         (dwarf2_fetch_die_loc_sect_off): Likewise.
12140         (dwarf2_fetch_constant_bytes): Likewise.
12141         (dwarf2_fetch_die_type_sect_off): Likewise.
12142         (dwarf2_get_die_type): Likewise.
12143         (follow_die_sig): Likewise.
12144         (decode_locdesc): Likewise.
12145         (dwarf2_per_cu_objfile): Likewise.
12146         (dwarf2_per_cu_text_offset): Likewise.
12147         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12148         objfile.
12149         (set_die_type): Access objfile through
12150         dwarf2_per_objfile.
12151
12152 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12153
12154         * valprint.c (converted_character_d): Remove typedef.
12155         (DEF_VEC_O (converted_character_d)): Remove.
12156         (count_next_character): Use std::vector.
12157         (print_converted_chars_to_obstack): Likewise.
12158         (generic_printstr): Likewise.
12159
12160 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12161
12162         * xml-support.h (struct gdb_xml_value): Add constructor.
12163         <value>: Change type to unique_xmalloc_ptr.
12164         (gdb_xml_value_s): Remove typedef.
12165         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12166         (gdb_xml_element_start_handler): Change parameter type to
12167         std::vector.
12168         (xml_find_attribute): Likewise.
12169         * xml-support.c (xml_find_attribute): Change parameter type to
12170         std::vector and adjust.
12171         (gdb_xml_values_cleanup): Remove.
12172         (gdb_xml_parser::start_element): Adjust to std::vector.
12173         (xinclude_start_include): Change paraeter type to std::vector
12174         and adjust.
12175         * btrace.c (check_xml_btrace_version): Likewise.
12176         (parse_xml_btrace_block): Likewise.
12177         (parse_xml_btrace_pt_config_cpu): Likewise.
12178         (parse_xml_btrace_pt): Likewise.
12179         (parse_xml_btrace_conf_bts): Likewise.
12180         (parse_xml_btrace_conf_pt): Likewise.
12181         * memory-map.c (memory_map_start_memory): Likewise.
12182         (memory_map_start_property): Likewise.
12183         * osdata.c (osdata_start_osdata): Likewise.
12184         (osdata_start_item): Likewise.
12185         (osdata_start_column): Likewise.
12186         * remote.c (start_thread): Likewise.
12187         * solib-aix.c (library_list_start_library): Likewise.
12188         (library_list_start_list): Likewise.
12189         * solib-svr4.c (library_list_start_library): Likewise.
12190         (svr4_library_list_start_list): Likewise.
12191         * solib-target.c (library_list_start_segment): Likewise.
12192         (library_list_start_section): Likewise.
12193         (library_list_start_library): Likewise.
12194         (library_list_start_list): Likewise.
12195         * tracepoint.c (traceframe_info_start_memory): Likewise.
12196         (traceframe_info_start_tvar): Likewise.
12197         * xml-syscall.c (syscall_start_syscall): Likewise.
12198         * xml-tdesc.c (tdesc_start_target): Likewise.
12199         (tdesc_start_feature): Likewise.
12200         (tdesc_start_reg): Likewise.
12201         (tdesc_start_union): Likewise.
12202         (tdesc_start_struct): Likewise.
12203         (tdesc_start_flags): Likewise.
12204         (tdesc_start_enum): Likewise.
12205         (tdesc_start_field): Likewise.
12206         (tdesc_start_enum_value): Likewise.
12207         (tdesc_start_vector): Likewise.
12208
12209 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12210
12211         * extension.h (struct xmethod_worker) <clone>: Remove.
12212         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12213         Remove.
12214         (python_xmethod_worker::clone): Remove.
12215         * valops.c (find_overload_match): Use std::move instead of
12216         clone.
12217
12218 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12219
12220         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12221         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12222         <free_xmethod_worker_data>: Remove.
12223         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12224         <get_xmethod_arg_types>: Remove.
12225         <get_xmethod_result_type>: Remove.
12226         <invoke_xmethod>: Remove.
12227         * extension.c (new_xmethod_worker): Remove.
12228         (clone_xmethod_worker): Remove.
12229         (get_matching_xmethod_workers): Return void, pass std::vector by
12230         pointer.
12231         (get_xmethod_arg_types): Rename to...
12232         (xmethod_worker::get_arg_types): ... this, and adjust.
12233         (get_xmethod_result_type): Rename to...
12234         (xmethod_worker::get_result_type): ... this, and adjust.
12235         (invoke_xmethod): Remove.
12236         (free_xmethod_worker): Remove.
12237         (free_xmethod_worker_vec): Remove.
12238         * extension.h (enum ext_lang_rc): Move here from
12239         extension-priv.h.
12240         (struct xmethod_worker): Add constructor and destructor.
12241         <data>: Remove.
12242         <value>: Remove.
12243         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12244         virtual pure methods.
12245         <get_arg_types, get_result_type>: New methods.
12246         (xmethod_worker_ptr): Remove typedef.
12247         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12248         (xmethod_worker_vec): Remove typedef.
12249         (xmethod_worker_up): New typedef.
12250         (invoke_xmethod): Remove.
12251         (clone_xmethod_worker): Remove.
12252         (free_xmethod_worker): Remove.
12253         (free_xmethod_worker_vec): Remove.
12254         (get_xmethod_arg_types): Remove.
12255         (get_xmethod_result_type): Remove.
12256         * valops.c (find_method_list): Use std::vector, don't use
12257         intermediate vector.
12258         (value_find_oload_method_list): Use std::vector.
12259         (find_overload_match): Use std::vector.
12260         (find_oload_champ): Use std::vector.
12261         * value.c (value_free): Use operator delete.
12262         (value_of_xmethod): Rename to...
12263         (value_from_xmethod): ... this.  Don't assign
12264         xmethod_worker::value, take rvalue-reference.
12265         (result_type_of_xmethod): Adjust.
12266         (call_xmethod): Adjust.
12267         * value.h: Include extension.h.
12268         (struct xmethod_worker): Don't forward-declare.
12269         (value_of_xmethod): Rename to...
12270         (value_from_xmethod): ... this, take rvalue-reference.
12271         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12272         (struct python_xmethod_worker): ... this, add constructor and
12273         destructor.
12274         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12275         (gdbpy_free_xmethod_worker_data): Rename to...
12276         (python_xmethod_worker::~python_xmethod_worker): ... this and
12277         adjust.
12278         (gdbpy_clone_xmethod_worker_data): Rename to...
12279         (python_xmethod_worker::clone): ... this and adjust.
12280         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12281         temporary vector.
12282         (gdbpy_get_xmethod_arg_types): Rename to...
12283         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12284         (gdbpy_get_xmethod_result_type): Rename to...
12285         (python_xmethod_worker::do_get_result_type): ... this and
12286         adjust.
12287         (gdbpy_invoke_xmethod): Rename to...
12288         (python_xmethod_worker::invoke): ... this and adjust.
12289         (new_python_xmethod_worker): Rename to...
12290         (python_xmethod_worker::python_xmethod_worker): ... this and
12291         adjust.
12292         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12293         Remove.
12294         (gdbpy_free_xmethod_worker_data): Remove.
12295         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12296         (gdbpy_get_xmethod_arg_types): Remove.
12297         (gdbpy_get_xmethod_result_type): Remove.
12298         (gdbpy_invoke_xmethod): Remove.
12299         * python/python.c (python_extension_ops): Remove obsolete
12300         callbacks.
12301
12302 2018-01-05  Pedro Alves  <palves@redhat.com>
12303
12304         PR gdb/18653
12305         * common/signals-state-save-restore.c
12306         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12307         find a custom handler preinstalled, instead of internal erroring.
12308         But only warn if !quiet.
12309         * common/signals-state-save-restore.h
12310         (save_original_signals_state): New parameter 'quiet'.
12311         * main.c (captured_main_1): Move save_original_signals_state call
12312         after option handling, and pass QUIET.
12313
12314 2018-01-05  Pedro Alves  <palves@redhat.com>
12315
12316         * spu-tdep.c (spu_catch_start): Pass
12317         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12318
12319 2018-01-05  Pedro Alves  <palves@redhat.com>
12320
12321         PR gdb/22670
12322         * ada-lang.c (literal_symbol_name_matcher): New function.
12323         (ada_get_symbol_name_matcher): Use it for
12324         symbol_name_match_type::SEARCH_NAME.
12325         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12326         it down instead of assuming symbol_name_match_type::FULL.
12327         * block.h (block_lookup_symbol): New parameter 'match_type'.
12328         * c-valprint.c (print_unpacked_pointer): Use
12329         lookup_symbol_search_name instead of lookup_symbol.
12330         * compile/compile-object-load.c (get_out_value_type): Pass down
12331         symbol_name_match_type::SEARCH_NAME.
12332         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12333         symbol_name_match_type::FULL.
12334         * cp-support.c (cp_get_symbol_name_matcher): Handle
12335         symbol_name_match_type::SEARCH_NAME.
12336         * infrun.c (insert_exception_resume_breakpoint): Use
12337         lookup_symbol_search_name.
12338         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12339         * psymtab.c (maintenance_check_psymtabs): Use
12340         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12341         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12342         SYMBOL_SEARCH_NAME.
12343         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12344         if symbol_name_match_type::SEARCH_NAME.
12345         (lookup_symbol_in_language): Pass down
12346         symbol_name_match_type::FULL.
12347         (lookup_symbol_search_name): New.
12348         (lookup_language_this): Pass down
12349         symbol_name_match_type::SEARCH_NAME.
12350         (lookup_symbol_aux, lookup_local_symbol): New parameter
12351         'match_type'.  Pass it down.
12352         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12353         (lookup_symbol_search_name): New declaration.
12354         (lookup_symbol_in_block): New 'match_type' parameter.
12355
12356 2018-01-05  Pedro Alves  <palves@redhat.com>
12357
12358         PR gdb/22670
12359         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12360         ada_lookup_symbol.
12361         (ada_lookup_symbol): Reimplement in terms of
12362         ada_lookup_symbol_list, bits factored out from
12363         ada_lookup_encoded_symbol.
12364
12365 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12366
12367         * ada-exp.y (write_object_renaming): When subscripting an array
12368         using a symbol as the index, pass the block in call to
12369         ada_lookup_encoded_symbol when looking that symbol up.
12370
12371 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12372
12373         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12374         TYPE_INDEX_TYPE.
12375
12376 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12377
12378         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12379         the case where VALUE_LVAL (val0) is not lval_memory.
12380
12381 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12382
12383         * ada-valprint.c (print_optional_low_bound): Handle
12384         character-indexed array printing like boolean-indexed array
12385         printing.
12386
12387 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12388
12389         * NEWS: Create a new section for the next release branch.
12390         Rename the section of the current branch, now that it has
12391         been cut.
12392
12393 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12394
12395         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12396         * version.in: Bump version to 8.1.50.DATE-git.
12397
12398 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12399
12400         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12401         Add field.
12402         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12403         Add field.
12404         (default_exception_support_info) <catch_handlers_sym>: Add field.
12405         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12406         (ada_exception_name_addr_1): Add "catch handlers" handling.
12407         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12408         Update all callers.
12409         (create_excep_cond_exprs) <ex>: Add parameter.
12410         (re_set_exception): Update create_excep_cond_exprs call.
12411         (print_it_exception, print_one_exception, print_mention_exception)
12412         (print_recreate_exception): Add "catch handler" handling.
12413         (allocate_location_catch_handlers, re_set_catch_handlers)
12414         (check_status_catch_handlers, print_it_catch_handlers)
12415         (print_one_catch_handlers, print_mention_catch_handlers)
12416         (print_recreate_catch_handlers): New function.
12417         (catch_handlers_breakpoint_ops): New variable.
12418         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12419         Add parameter.  Add "catch handler" handling.
12420         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12421         Add "catch handler" handling.
12422         (ada_exception_catchpoint_cond_string): Add "catch handler"
12423         handling.
12424         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12425         call.
12426         (catch_ada_handlers_command): New function.
12427         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12428         operations structure.
12429         (_initialize_ada_language): Add "catch handlers" command entry.
12430         * NEWS: Document "catch handlers" feature.
12431
12432 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12433
12434         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12435         account when creating the array type of the slice.
12436         (ada_value_slice): Likewise.
12437
12438 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12439
12440         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12441         New enum value.
12442         (create_array_type_with_stride): Add byte_stride_prop parameter.
12443         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12444         New parameter.  Update all callers in this file.
12445         (array_type_has_dynamic_stride): New function.
12446         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12447         of arrays with dynamic byte strides.
12448         * dwarf2read.c (read_array_type): Add support for dynamic
12449         DW_AT_byte_stride attributes.
12450
12451 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12452
12453         * dwarf2read.c (read_unspecified_type): Treat
12454         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12455
12456 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12457
12458         Update copyright year range in all GDB files.
12459
12460 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12461
12462         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12463         and gdb/testsuite/gdb.base/step-line.c.
12464
12465 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12466
12467         * copyright.py (main): Dump the contents of
12468         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12469         even if BY_HAND is empty.
12470
12471 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12472
12473         * top.c (print_gdb_version): Update Copyright year in version
12474         message.
12475
12476 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12477
12478         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12479
12480 For older changes see ChangeLog-2017.
12481 \f
12482 Local Variables:
12483 mode: change-log
12484 left-margin: 8
12485 fill-column: 74
12486 version-control: never
12487 coding: utf-8
12488 End: