Make Rust error message mention the field name
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-13 Tom Tromey <tom@tromey.com>
2
3 PR rust/23650:
4 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
5
6 2018-09-13 Tom Tromey <tom@tromey.com>
7
8 PR rust/23626:
9 * rust-lang.c (rust_enum_variant): Now static.
10 (rust_empty_enum_p): New function.
11 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
12 Handle empty enum.
13
14 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
15
16 * python/py-inferior.c (infpy_repr): New.
17 (inferior_object_type): Register infpy_repr.
18 * python/py-objfile.c (objfpy_repr): New.
19 (objfile_object_type): Register objfpy_repr.
20
21 2018-09-12 John Baldwin <jhb@FreeBSD.org>
22
23 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
24
25 2018-09-12 John Baldwin <jhb@FreeBSD.org>
26
27 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
28 typo.
29
30 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
31
32 * common/common-utils.c: Don't include '<sys/stat.h>'.
33 (is_regular_file): Move to...
34 * common/filestuff.c (is_regular_file): ... here.
35 * common/common-utils.h (is_regular_file): Move to...
36 * common/filestuff.h (is_regular_file): ... here.
37
38 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
39
40 * skip.c (debug_skip): New variable.
41 (skiplist_entry::do_skip_file_p): Add debug output.
42 (skiplist_entry::do_skip_gfile_p): Likewise.
43 (skiplist_entry::skip_function_p): Likewise.
44 (_initialize_step_skip): Create debug command.
45 * NEWS: Mention set/show debug skip.
46
47 2018-09-11 Xavier Roirand <roirand@adacore.com>
48
49 * darwin-nat.c (should_disable_startup_with_shell):
50 New function.
51 (darwin_nat_target::create_inferior): Add call.
52
53 2018-09-11 Xavier Roirand <roirand@adacore.com>
54
55 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
56 inf_port, msg_state>: Initialize.
57 (struct darwin_thread_info) <signaled, single_step>: Change
58 type and initialize.
59 (struct darwin_thread_info) <event>: Initialize.
60
61 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
62
63 PR gdb/23555
64 PR gdb/23558
65 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
66 guesses.
67
68 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
69
70 Revert:
71 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
72
73 PR gdb/23555
74 PR gdb/23558
75 * gnulib/aclocal.m4: Regenerate.
76 * gnulib/config.in: Regenerate.
77 * gnulib/configure: Regenerate.
78 * gnulib/import/Makefile.am: Update.
79 * gnulib/import/Makefile.in: Update.
80 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
81 * gnulib/import/_Noreturn.h: ... this.
82 * gnulib/import/alloca.in.h: Update.
83 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
84 * gnulib/import/arg-nonnull.h: ... this.
85 * gnulib/import/assure.h: Update.
86 * gnulib/import/at-func.c: Update.
87 * gnulib/import/basename-lgpl.c: Update.
88 * gnulib/import/extra/snippet/c++defs.h: Rename to...
89 * gnulib/import/c++defs.h: ... this.
90 * gnulib/import/canonicalize-lgpl.c: Update.
91 * gnulib/import/cdefs.h: Update.
92 * gnulib/import/chdir-long.c: Update.
93 * gnulib/import/chdir-long.h: Update.
94 * gnulib/import/cloexec.c: Update.
95 * gnulib/import/cloexec.h: Update.
96 * gnulib/import/close.c: Update.
97 * gnulib/import/closedir.c: Update.
98 * gnulib/import/config.charset: Update.
99 * gnulib/import/dirent-private.h: Update.
100 * gnulib/import/dirent.in.h: Update.
101 * gnulib/import/dirfd.c: Update.
102 * gnulib/import/dirname-lgpl.c: Update.
103 * gnulib/import/dirname.h: Update.
104 * gnulib/import/dosname.h: Update.
105 * gnulib/import/dup-safer-flag.c: Update.
106 * gnulib/import/dup-safer.c: Update.
107 * gnulib/import/dup.c: Update.
108 * gnulib/import/dup2.c: Update.
109 * gnulib/import/errno.in.h: Update.
110 * gnulib/import/error.c: Update.
111 * gnulib/import/error.h: Update.
112 * gnulib/import/exitfail.c: Update.
113 * gnulib/import/exitfail.h: Update.
114 * gnulib/import/extra/update-copyright: Update.
115 * gnulib/import/fchdir.c: Update.
116 * gnulib/import/fcntl.c: Update.
117 * gnulib/import/fcntl.in.h: Update.
118 * gnulib/import/fd-hook.c: Update.
119 * gnulib/import/fd-hook.h: Update.
120 * gnulib/import/fd-safer-flag.c: Update.
121 * gnulib/import/fd-safer.c: Update.
122 * gnulib/import/fdopendir.c: Update.
123 * gnulib/import/filename.h: Update.
124 * gnulib/import/filenamecat-lgpl.c: Update.
125 * gnulib/import/filenamecat.h: Update.
126 * gnulib/import/flexmember.h: Update.
127 * gnulib/import/float+.h: Update.
128 * gnulib/import/float.c: Update.
129 * gnulib/import/float.in.h: Update.
130 * gnulib/import/fnmatch.c: Update.
131 * gnulib/import/fnmatch.in.h: Update.
132 * gnulib/import/fnmatch_loop.c: Update.
133 * gnulib/import/fpucw.h: Update.
134 * gnulib/import/frexp.c: Update.
135 * gnulib/import/frexpl.c: Update.
136 * gnulib/import/fstat.c: Update.
137 * gnulib/import/fstatat.c: Update.
138 * gnulib/import/getcwd-lgpl.c: Update.
139 * gnulib/import/getcwd.c: Update.
140 * gnulib/import/getdtablesize.c: Update.
141 * gnulib/import/getlogin_r.c: Update.
142 * gnulib/import/getprogname.c: Update.
143 * gnulib/import/getprogname.h: Update.
144 * gnulib/import/gettext.h: Update.
145 * gnulib/import/gettimeofday.c: Update.
146 * gnulib/import/glob-libc.h: Update.
147 * gnulib/import/glob.c: Update.
148 * gnulib/import/glob.in.h: Update.
149 * gnulib/import/glob_internal.h: Update.
150 * gnulib/import/glob_pattern_p.c: Update.
151 * gnulib/import/globfree.c: Update.
152 * gnulib/import/hard-locale.c: Update.
153 * gnulib/import/hard-locale.h: Update.
154 * gnulib/import/intprops.h: Update.
155 * gnulib/import/inttypes.in.h: Update.
156 * gnulib/import/isnan.c: Update.
157 * gnulib/import/isnand-nolibm.h: Update.
158 * gnulib/import/isnand.c: Update.
159 * gnulib/import/isnanl-nolibm.h: Update.
160 * gnulib/import/isnanl.c: Update.
161 * gnulib/import/itold.c: Update.
162 * gnulib/import/libc-config.h: Update.
163 * gnulib/import/limits.in.h: Update.
164 * gnulib/import/localcharset.c: Update.
165 * gnulib/import/localcharset.h: Update.
166 * gnulib/import/localtime-buffer.c: Update.
167 * gnulib/import/localtime-buffer.h: Update.
168 * gnulib/import/lstat.c: Update.
169 * gnulib/import/m4/00gnulib.m4: Update.
170 * gnulib/import/m4/__inline.m4: Update.
171 * gnulib/import/m4/absolute-header.m4: Update.
172 * gnulib/import/m4/alloca.m4: Update.
173 * gnulib/import/m4/builtin-expect.m4: Update.
174 * gnulib/import/m4/canonicalize.m4: Update.
175 * gnulib/import/m4/chdir-long.m4: Update.
176 * gnulib/import/m4/close.m4: Update.
177 * gnulib/import/m4/closedir.m4: Update.
178 * gnulib/import/m4/configmake.m4: Update.
179 * gnulib/import/m4/d-ino.m4: Update.
180 * gnulib/import/m4/d-type.m4: Update.
181 * gnulib/import/m4/dirent_h.m4: Update.
182 * gnulib/import/m4/dirfd.m4: Update.
183 * gnulib/import/m4/dirname.m4: Update.
184 * gnulib/import/m4/double-slash-root.m4: Update.
185 * gnulib/import/m4/dup.m4: Update.
186 * gnulib/import/m4/dup2.m4: Update.
187 * gnulib/import/m4/eealloc.m4: Update.
188 * gnulib/import/m4/environ.m4: Update.
189 * gnulib/import/m4/errno_h.m4: Update.
190 * gnulib/import/m4/error.m4: Update.
191 * gnulib/import/m4/exponentd.m4: Update.
192 * gnulib/import/m4/exponentl.m4: Update.
193 * gnulib/import/m4/extensions.m4: Update.
194 * gnulib/import/m4/extern-inline.m4: Update.
195 * gnulib/import/m4/fchdir.m4: Update.
196 * gnulib/import/m4/fcntl-o.m4: Update.
197 * gnulib/import/m4/fcntl.m4: Update.
198 * gnulib/import/m4/fcntl_h.m4: Update.
199 * gnulib/import/m4/fdopendir.m4: Update.
200 * gnulib/import/m4/filenamecat.m4: Update.
201 * gnulib/import/m4/flexmember.m4: Update.
202 * gnulib/import/m4/float_h.m4: Update.
203 * gnulib/import/m4/fnmatch.m4: Update.
204 * gnulib/import/m4/fnmatch_h.m4: Update.
205 * gnulib/import/m4/fpieee.m4: Update.
206 * gnulib/import/m4/frexp.m4: Update.
207 * gnulib/import/m4/frexpl.m4: Update.
208 * gnulib/import/m4/fstat.m4: Update.
209 * gnulib/import/m4/fstatat.m4: Update.
210 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
211 * gnulib/import/m4/getcwd-path-max.m4: Update.
212 * gnulib/import/m4/getcwd.m4: Update.
213 * gnulib/import/m4/getdtablesize.m4: Update.
214 * gnulib/import/m4/getlogin.m4: Update.
215 * gnulib/import/m4/getlogin_r.m4: Update.
216 * gnulib/import/m4/getpagesize.m4: Update.
217 * gnulib/import/m4/getprogname.m4: Update.
218 * gnulib/import/m4/gettimeofday.m4: Update.
219 * gnulib/import/m4/glibc21.m4: Update.
220 * gnulib/import/m4/glob.m4: Update.
221 * gnulib/import/m4/glob_h.m4: Update.
222 * gnulib/import/m4/gnulib-cache.m4: Update.
223 * gnulib/import/m4/gnulib-common.m4: Update.
224 * gnulib/import/m4/gnulib-comp.m4: Update.
225 * gnulib/import/m4/gnulib-tool.m4: Update.
226 * gnulib/import/m4/hard-locale.m4: Update.
227 * gnulib/import/m4/include_next.m4: Update.
228 * gnulib/import/m4/inttypes-pri.m4: Update.
229 * gnulib/import/m4/inttypes.m4: Update.
230 * gnulib/import/m4/isnand.m4: Update.
231 * gnulib/import/m4/isnanl.m4: Update.
232 * gnulib/import/m4/largefile.m4: Update.
233 * gnulib/import/m4/limits-h.m4: Update.
234 * gnulib/import/m4/localcharset.m4: Update.
235 * gnulib/import/m4/locale-fr.m4: Update.
236 * gnulib/import/m4/locale-ja.m4: Update.
237 * gnulib/import/m4/locale-zh.m4: Update.
238 * gnulib/import/m4/localtime-buffer.m4: Update.
239 * gnulib/import/m4/longlong.m4: Update.
240 * gnulib/import/m4/lstat.m4: Update.
241 * gnulib/import/m4/malloc.m4: Update.
242 * gnulib/import/m4/malloca.m4: Update.
243 * gnulib/import/m4/math_h.m4: Update.
244 * gnulib/import/m4/mbrtowc.m4: Update.
245 * gnulib/import/m4/mbsinit.m4: Update.
246 * gnulib/import/m4/mbsrtowcs.m4: Update.
247 * gnulib/import/m4/mbstate_t.m4: Update.
248 * gnulib/import/m4/memchr.m4: Update.
249 * gnulib/import/m4/memmem.m4: Update.
250 * gnulib/import/m4/mempcpy.m4: Update.
251 * gnulib/import/m4/memrchr.m4: Update.
252 * gnulib/import/m4/mkdir.m4: Update.
253 * gnulib/import/m4/mkstemp.m4: Update.
254 * gnulib/import/m4/mmap-anon.m4: Update.
255 * gnulib/import/m4/mode_t.m4: Update.
256 * gnulib/import/m4/msvc-inval.m4: Update.
257 * gnulib/import/m4/msvc-nothrow.m4: Update.
258 * gnulib/import/m4/multiarch.m4: Update.
259 * gnulib/import/m4/nocrash.m4: Update.
260 * gnulib/import/m4/off_t.m4: Update.
261 * gnulib/import/m4/onceonly.m4: Update.
262 * gnulib/import/m4/open-cloexec.m4: Update.
263 * gnulib/import/m4/open.m4: Update.
264 * gnulib/import/m4/openat.m4: Update.
265 * gnulib/import/m4/opendir.m4: Update.
266 * gnulib/import/m4/pathmax.m4: Update.
267 * gnulib/import/m4/rawmemchr.m4: Update.
268 * gnulib/import/m4/readdir.m4: Update.
269 * gnulib/import/m4/readlink.m4: Update.
270 * gnulib/import/m4/realloc.m4: Update.
271 * gnulib/import/m4/rename.m4: Update.
272 * gnulib/import/m4/rewinddir.m4: Update.
273 * gnulib/import/m4/rmdir.m4: Update.
274 * gnulib/import/m4/save-cwd.m4: Update.
275 * gnulib/import/m4/secure_getenv.m4: Update.
276 * gnulib/import/m4/setenv.m4: Update.
277 * gnulib/import/m4/signal_h.m4: Update.
278 * gnulib/import/m4/ssize_t.m4: Update.
279 * gnulib/import/m4/stat-time.m4: Update.
280 * gnulib/import/m4/stat.m4: Update.
281 * gnulib/import/m4/std-gnu11.m4: Update.
282 * gnulib/import/m4/stdbool.m4: Update.
283 * gnulib/import/m4/stddef_h.m4: Update.
284 * gnulib/import/m4/stdint.m4: Update.
285 * gnulib/import/m4/stdio_h.m4: Update.
286 * gnulib/import/m4/stdlib_h.m4: Update.
287 * gnulib/import/m4/strchrnul.m4: Update.
288 * gnulib/import/m4/strdup.m4: Update.
289 * gnulib/import/m4/strerror.m4: Update.
290 * gnulib/import/m4/string_h.m4: Update.
291 * gnulib/import/m4/strstr.m4: Update.
292 * gnulib/import/m4/strtok_r.m4: Update.
293 * gnulib/import/m4/sys_socket_h.m4: Update.
294 * gnulib/import/m4/sys_stat_h.m4: Update.
295 * gnulib/import/m4/sys_time_h.m4: Update.
296 * gnulib/import/m4/sys_types_h.m4: Update.
297 * gnulib/import/m4/tempname.m4: Update.
298 * gnulib/import/m4/time_h.m4: Update.
299 * gnulib/import/m4/unistd-safer.m4: Update.
300 * gnulib/import/m4/unistd_h.m4: Update.
301 * gnulib/import/m4/warn-on-use.m4: Update.
302 * gnulib/import/m4/wchar_h.m4: Update.
303 * gnulib/import/m4/wchar_t.m4: Update.
304 * gnulib/import/m4/wctype_h.m4: Update.
305 * gnulib/import/m4/wint_t.m4: Update.
306 * gnulib/import/malloc.c: Update.
307 * gnulib/import/malloc/scratch_buffer.h: Update.
308 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
309 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
310 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
311 * gnulib/import/malloca.c: Update.
312 * gnulib/import/malloca.h: Update.
313 * gnulib/import/malloca.valgrind: Update.
314 * gnulib/import/math.in.h: Update.
315 * gnulib/import/mbrtowc.c: Update.
316 * gnulib/import/mbsinit.c: Update.
317 * gnulib/import/mbsrtowcs-impl.h: Update.
318 * gnulib/import/mbsrtowcs-state.c: Update.
319 * gnulib/import/mbsrtowcs.c: Update.
320 * gnulib/import/memchr.c: Update.
321 * gnulib/import/memmem.c: Update.
322 * gnulib/import/mempcpy.c: Update.
323 * gnulib/import/memrchr.c: Update.
324 * gnulib/import/mkdir.c: Update.
325 * gnulib/import/mkstemp.c: Update.
326 * gnulib/import/msvc-inval.c: Update.
327 * gnulib/import/msvc-inval.h: Update.
328 * gnulib/import/msvc-nothrow.c: Update.
329 * gnulib/import/msvc-nothrow.h: Update.
330 * gnulib/import/open.c: Update.
331 * gnulib/import/openat-die.c: Update.
332 * gnulib/import/openat-priv.h: Update.
333 * gnulib/import/openat-proc.c: Update.
334 * gnulib/import/openat.c: Update.
335 * gnulib/import/openat.h: Update.
336 * gnulib/import/opendir.c: Update.
337 * gnulib/import/pathmax.h: Update.
338 * gnulib/import/pipe-safer.c: Update.
339 * gnulib/import/rawmemchr.c: Update.
340 * gnulib/import/readdir.c: Update.
341 * gnulib/import/readlink.c: Update.
342 * gnulib/import/realloc.c: Update.
343 * gnulib/import/ref-add.sin: Update.
344 * gnulib/import/ref-del.sin: Update.
345 * gnulib/import/rename.c: Update.
346 * gnulib/import/rewinddir.c: Update.
347 * gnulib/import/rmdir.c: Update.
348 * gnulib/import/same-inode.h: Update.
349 * gnulib/import/save-cwd.c: Update.
350 * gnulib/import/save-cwd.h: Update.
351 * gnulib/import/scratch_buffer.h: Update.
352 * gnulib/import/secure_getenv.c: Update.
353 * gnulib/import/setenv.c: Update.
354 * gnulib/import/signal.in.h: Update.
355 * gnulib/import/stat-time.c: Update.
356 * gnulib/import/stat-time.h: Update.
357 * gnulib/import/stat-w32.c: Update.
358 * gnulib/import/stat-w32.h: Update.
359 * gnulib/import/stat.c: Update.
360 * gnulib/import/stdbool.in.h: Update.
361 * gnulib/import/stddef.in.h: Update.
362 * gnulib/import/stdint.in.h: Update.
363 * gnulib/import/stdio.in.h: Update.
364 * gnulib/import/stdlib.in.h: Update.
365 * gnulib/import/str-two-way.h: Update.
366 * gnulib/import/strchrnul.c: Update.
367 * gnulib/import/strdup.c: Update.
368 * gnulib/import/streq.h: Update.
369 * gnulib/import/strerror-override.c: Update.
370 * gnulib/import/strerror-override.h: Update.
371 * gnulib/import/strerror.c: Update.
372 * gnulib/import/string.in.h: Update.
373 * gnulib/import/stripslash.c: Update.
374 * gnulib/import/strnlen1.c: Update.
375 * gnulib/import/strnlen1.h: Update.
376 * gnulib/import/strstr.c: Update.
377 * gnulib/import/strtok_r.c: Update.
378 * gnulib/import/sys_stat.in.h: Update.
379 * gnulib/import/sys_time.in.h: Update.
380 * gnulib/import/sys_types.in.h: Update.
381 * gnulib/import/tempname.c: Update.
382 * gnulib/import/tempname.h: Update.
383 * gnulib/import/time.in.h: Update.
384 * gnulib/import/unistd--.h: Update.
385 * gnulib/import/unistd-safer.h: Update.
386 * gnulib/import/unistd.in.h: Update.
387 * gnulib/import/unsetenv.c: Update.
388 * gnulib/import/verify.h: Update.
389 * gnulib/import/extra/snippet/warn-on-use.h: Update.
390 * gnulib/import/wchar.in.h: Update.
391 * gnulib/import/wctype.in.h: Update.
392 * gnulib/import/xalloc-oversized.h: Update.
393 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
394 "53e2c179f26a890fa6685af4b6c1397ee370433b".
395
396 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
397
398 * record-btrace.c (get_thread_current_frame): Remove
399 old_inferior_ptid.
400
401 2018-09-10 Jerome Guitton <guitton@adacore.com>
402
403 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
404 with check_tag to 1 if and only if the type is tagged and the
405 component being searched cannot been found in the current
406 view. Otherwise, always call ada_to_fixed_type with
407 check_tag to 0.
408
409 2018-09-10 Xavier Roirand <roirand@adacore.com>
410
411 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
412 declaration.
413 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
414 * ada-varobj.c (ada_varobj_get_number_of_children,
415 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
416
417 2018-09-10 Xavier Roirand <roirand@adacore.com>
418
419 * ada-valprint.c (ada_value_print): Use type instead of
420 enclosing type.
421
422 2018-09-10 Xavier Roirand <roirand@adacore.com>
423
424 * ada-lang.c (ada_value_subscript): Handle case when parameter is
425 an array of access to unconstrained array.
426
427 2018-09-10 Xavier Roirand <roirand@adacore.com>
428
429 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
430 (ada_check_typedef): Use it.
431
432 2018-09-10 Xavier Roirand <roirand@adacore.com>
433
434 * ada-varobj.c (ada_varobj_describe_struct_child)
435 (ada_varobj_describe_child): Handle union case like struct one.
436
437 2018-09-10 Tom Tromey <tom@tromey.com>
438
439 PR python/18380:
440 * python/python.c (_initialize_python): Make example in "python"
441 help work in Python 3.
442
443 2018-09-10 Eli Zaretskii <eliz@gnu.org>
444
445 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
446 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
447 $(EXEEXT) to the script, as it is not a program.
448
449 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
450
451 * python/py-prettyprint.c (pretty_print_one_value): Return
452 gdbpy_ref<>.
453 (print_string_repr): Adjust.
454 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
455 * python/python-internal.h (apply_varobj_pretty_printer): Return
456 gdbpy_ref<>.
457 * varobj.c (varobj_value_get_print_value): Adjust.
458
459 2018-09-08 Tom Tromey <tom@tromey.com>
460
461 PR python/16047:
462 * python/py-prettyprint.c (pretty_print_one_value): Check for
463 to_string method.
464
465 2018-09-08 Joel Brobecker <brobecker@adacore.com>
466
467 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
468 replace_operator_with_call.
469
470 2018-09-08 Joel Brobecker <brobecker@adacore.com>
471
472 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
473
474 2018-09-08 Joel Brobecker <brobecker@adacore.com>
475
476 * ada-typeprint.c (print_range): Print the bounds using TYPE
477 rather than its TYPE_TARGET_TYPE.
478
479 2018-09-08 Joel Brobecker <brobecker@adacore.com>
480
481 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
482 call to ada_to_fixed_value_create.
483
484 2018-09-08 Jerome Guitton <guitton@adacore.com>
485
486 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
487
488 2018-09-08 Joel Brobecker <brobecker@adacore.com>
489
490 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
491 by calls to error.
492
493 2018-09-08 Joel Brobecker <brobecker@adacore.com>
494
495 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
496 Move update of loop variable "fi".
497
498 2018-09-08 Joel Brobecker <brobecker@adacore.com>
499
500 * ada-lang.c (value_assign_to_component): In the case of
501 big-endian targets, extract the bits of the given VAL
502 using an src_offset of zero if container is not a scalar.
503
504 2018-09-06 Simon Ser <contact@emersion.fr>
505
506 PR gdb/23105
507 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
508 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
509 * fbsd-tdep.c (fbsd_make_note_desc): New.
510 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
511 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
512 * target.h (enum target_object) Add FreeBSD-specific
513 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
514
515 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
516
517 * compile/compile-c.h (generate_c_for_variable_locations):
518 Change reference to pointer.
519 * compile/compile-c-support.c (compile_program) <compute>:
520 Likewise.
521 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
522 (generate_c_for_for_one_variable): Likewise
523 (generate_c_for_variable_locations): Likewise
524 * compile/compile-c-types.c (compile_c_instance::convert_type):
525 Likewise
526 * compile/compile-cplus-symbols.c (convert_one_symbol):
527 std::move the scope passed to enter_scope.
528 * compile/compile-cplus-types.c
529 (compile_cplus_instance::enter_scope): Make parameter
530 rvalue-reference.
531 (compile_cplus_instance::new_scope): Change reference to
532 pointer.
533 (compile_cplus_instance::convert_type): Likewise
534 (compile_cplus_convert_typedef): std::move the scope passed to
535 enter_scope.
536 (compile_cplus_convert_struct_or_union): Likewise.
537 (compile_cplus_convert_enum): Likewise.
538 (compile_cplus_convert_namespace): Likewise.
539 * compile/compile-cplus.h (compile_cplus_instance)
540 <enter_scope>: Make parameter rvalue-reference.
541 * compile/compile-internal.h (compile_instance)
542 <get_cached_type>: Likewise
543 * compile/compile-loc2c.c (push): Likewise
544 (pushf): Likewise
545 (unary): Likewise
546 (binary): Likewise
547 (print_label): Likewise
548 (pushf_register_address): Likewise
549 (pushf_register): Likewise
550 (do_compile_dwarf_expr_to_c): Likewise
551 (compile_dwarf_expr_to_c): Likewise
552 (compile_dwarf_bounds_to_c): Likewise
553 * compile/compile.c (compile_instance::get_cached_type):
554 Likewise
555 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
556 (compile_dwarf_bounds_to_c): Likewise
557 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
558 (dwarf2_compile_property_to_c): Likewise
559 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
560 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
561 Likewise
562
563 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
564
565 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
566 * tui/tui-data.c (init_content_element): Don't initialize it.
567
568 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
569
570 * tui/tui-data.h (struct tui_win_info)
571 <detail::opaque>: Remove.
572 * tui/tui-data.c (init_win_info): Remove assignment.
573
574 2018-09-05 Tom Tromey <tom@tromey.com>
575
576 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
577 -Wformat-nonliteral.
578 * target-float.c (host_float_ops<T>::to_string)
579 (host_float_ops<T>::from_string): Use
580 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
581 * configure: Rebuild.
582
583 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
584
585 * printcmd.c (printf_c_string): Use
586 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
587 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
588
589 2018-09-05 Tom Tromey <tom@tromey.com>
590
591 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
592
593 2018-09-05 Tom de Vries <tdevries@suse.de>
594
595 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
596 with resolve_abstract_p == true.
597 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
598 defaulting to false. Propagate resolve_abstract_p to
599 dwarf2_fetch_die_loc_sect_off.
600 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
601 parameter, defaulting to false.
602 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
603 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
604 parameter.
605 * dwarf2read.h (struct die_info): Forward-declare.
606 (die_info_ptr): New typedef.
607 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
608
609 2018-09-05 Joel Brobecker <brobecker@adacore.com>
610
611 GDB 8.2 released.
612
613 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
614 Pedro Alves <palves@redhat.com>
615
616 * gnulib/Makefile.in (aclocal_m4_deps): Move to
617 "aclocal-m4-deps.mk". Include file here.
618 $(srcdir)/aclocal.m4: Add "configure.ac".
619 * gnulib/aclocal-m4-deps.mk: New file.
620 * gnulib/update-gnulib.sh: Automatically update
621 "aclocal-m4-deps.mk".
622
623 2018-09-04 Tom Tromey <tom@tromey.com>
624
625 * configure: Rebuild.
626 * configure.ac: Remove multi-ice code.
627
628 2018-09-04 Tom Tromey <tom@tromey.com>
629
630 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
631 (ada-exp.o): Update.
632
633 2018-09-04 Tom Tromey <tom@tromey.com>
634
635 * Makefile.in (printcmd.o, target-float.o): Remove.
636 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
637
638 2018-09-04 Tom Tromey <tom@tromey.com>
639
640 * gnulib/Makefile.in: Remove obsolete comment.
641 * Makefile.in: Remove obsolete comment.
642
643 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
644
645 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
646 line with '+'.
647
648 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
649
650 * riscv-tdep.c: Add 'prologue-value.h' include.
651 (struct riscv_unwind_cache): New struct.
652 (riscv_debug_unwinder): New global.
653 (riscv_scan_prologue): Update arguments, capture register details
654 from prologue scan.
655 (riscv_skip_prologue): Reformat arguments line, move end of
656 prologue calculation into riscv_scan_prologue.
657 (riscv_frame_cache): Update return type, create
658 riscv_unwind_cache, scan the prologue, and fill in remaining cache
659 details.
660 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
661 (riscv_frame_prev_register): Use the trad_frame within the
662 riscv_unwind_cache.
663 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
664 flag.
665
666 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
667
668 * trad-frame.h (trad_frame_set_realreg): Declare.
669 (trad_frame_set_addr): Declare.
670 * trad-frame.c (trad_frame_set_realreg): Define new function.
671 (trad_frame_set_addr): Define new function.
672 (trad_frame_set_reg_realreg): Use new function.
673 (trad_frame_set_reg_addr): Use new function.
674
675 2018-09-01 Keith Seitz <keiths@redhat.com>
676
677 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
678 pulongest instead of "%lld".
679 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
680 ATTRIBUTE_UNUSED.
681
682 2018-08-31 Tom Tromey <tom@tromey.com>
683
684 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
685 variant part type.
686
687 2018-08-31 Pedro Alves <palves@redhat.com>
688
689 * gdbarch.h: Regenerate.
690
691 2018-08-31 Pedro Alves <palves@redhat.com>
692
693 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
694 * target.h (Hardware watchpoint interfaces): Describe
695 continuable/steppable/non-steppable watchpoints.
696 * gdbarch.h, gdbarch.c: Regenerate.
697
698 2018-08-31 Pedro Alves <palves@redhat.com>
699
700 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
701 Delete.
702 * s390-linux-nat.c
703 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
704 * target.h (target_ops::have_continuable_watchpoint): Delete.
705 (target_have_continuable_watchpoint): Delete.
706 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
707 * target-delegates.c: Regenerate.
708
709 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
710
711 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
712 the files present in "gnulib/import/m4/".
713
714 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
715
716 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
717 c.sw, c.swsp, and c.sdsp.
718
719 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
720
721 * riscv-tdep.c (struct riscv_inferior_data): Delete.
722 (riscv_read_misa_reg): Don't cache value read into inferior data.
723 (riscv_new_inferior_data): Delete.
724 (riscv_inferior_data_cleanup): Delete.
725 (riscv_inferior_data): Delete.
726 (riscv_invalidate_inferior_data): Delete.
727 (_initialize_riscv_tdep): Remove initialisation of inferior data.
728
729 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
730
731 * compile/compile-cplus-types.c
732 (compile_cplus_instance::leave_scope): Take the address of scope
733 object.
734 (compile_cplus_instance::convert_qualified_base): Compare quals
735 to 0.
736
737 2018-08-30 Keith Seitz <keiths@redhat.com>
738
739 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
740 Use "%s" and host_address_to_string instead of "%p" in printf.
741
742 2018-08-29 Keith Seitz <keiths@redhat.com>
743
744 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
745 and compile-cplus-types.c.
746 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
747 * c-lang.c (cplus_language_defn): Set C++ compile functions.
748 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
749 Declare.
750 * compile/compile-c-support.c: Include compile-cplus.h.
751 (load_libcompile): Templatize.
752 (get_compile_context): "New" function.
753 (c_get_compile_context): Use get_compile_context.
754 (cplus_get_compile_context): New function.
755 (cplus_push_user_expression, cplus_pop_user_expression)
756 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
757 (cplus_compute_program): Define new structs/functions.
758 * compile/compile-cplus-symmbols.c: New file.
759 * compile/compile-cplus-types.c: New file.
760 * compile/compile-cplus.h: New file.
761 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
762 Declare.
763 * compile/compile-object-load.c (get_out_value_type): Use
764 strncmp_iw when comparing symbol names.
765 (compile_object_load): Add mst_bss and mst_data.
766 * compile/compile.c (_initialize_compile): Remove
767 -Wno-implicit-function-declaration from `compile_args'.
768 * compile/gcc-cp-plugin.h: New file.
769 * NEWS: Mention C++ compile support and new debug options.
770
771 2018-08-29 Keith Seitz <keiths@redhat.com>
772
773 * linespec.c (collect_info::add_symbol): Make virtual.
774 (struct symbol_searcher_collect_info): New struct.
775 (symbol_searcher::find_all_symbols): New method.
776 * symtab.h (class symbol_searcher): New class.
777
778 2018-08-29 Keith Seitz <keiths@redhat.com>
779
780 * linespec.c (struct linespec) <function_symbols, label_symbols>:
781 Change to vector of block_symbol. Update all users.
782 (struct collect_info) <symbols>: Likewise.
783 (collect_info::add_symbol): Take block_symbol as argument.
784 Update all callers.
785 (decode_compound_collector) <m_symbols>: Change type to vector
786 of block_symbol. Update all users.
787 (decode_compound_collector::operator ()): Change parameter type
788 to block_symbol.
789 (find_method, find_function_symbols, find_linespec_symbols)
790 (find_label_symbols_in_block, find_label_symbols): Change symbol
791 vectors to block_symbol vectors.
792 * symtab.h (symbol_found_callback_ftype): Change parameter type to
793 block_symbol.
794
795 2018-08-29 Keith Seitz <keiths@redhat.com>
796
797 * linespec.c (symbolp): Remove typedef and VEC definitions.
798 (bound_minimal_symbol_d): Likewise.
799
800 2018-08-29 Keith Seitz <keiths@redhat.com>
801
802 * linespec.c (decode_compound_collector::decode_compound_collector):
803 Remove initialization for `m_symtabs'.
804 (decode_compound_collector::release_symbols): Change return type
805 to std::vector. Update all callers.
806 (class decode_compound_collector) <m_symbols>: Change type to
807 std::vector.
808 (lookup_prefix_sym): Change return type to std::vector. Update all
809 callers.
810 (compare_symbols): Remove.
811 (std_compare_symbols): Rename to `compare_symbols'.
812 (find_method): Change `sym_classes' parameter to std::vector.
813 Update all callers. Use std::sort to sort sym_classes.
814 (find_linespec_symbols): Remove cleanup.
815
816 2018-08-29 Keith Seitz <keiths@redhat.com>
817
818 * linespec.c (struct linespec) <minimal_symbols>: Change type to
819 std::vector. Update all users.
820 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
821 (struct collect_info) <minimal_symbols>: Likewise.
822 (compare_msymbols): Return bool. Change parameters to const
823 bound_minimal_symbol references.
824 (find_method, find_function_symbols, find_linespec_symbols): Change
825 `minsyms' parameter to std::vector. Update all callers.
826
827 2018-08-29 Keith Seitz <keiths@redhat.com>
828
829 * linespec.c (struct linespec) <label_symbols>: Change type to
830 std::vector. Update all users.
831 (find_label_symbols_in_block): Change `result' parameter to
832 std::vector. Update all callers.
833 (find_label_symbols): Return std::vector. Update all callers.
834
835 2018-08-29 Keith Seitz <keiths@redhat.com>
836
837 * linespec.c (struct linespec) <function_symbols>: Change type to
838 std::vector. Update all users.
839 (struct collect_info) <function_symbols>: Likewise.
840 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
841 (std_compare_symbols): New function.
842 (find_method, find_function_symbols, find_linespec_symbols)
843 (find_label_symbols_in_block): Change `symbols' parameter to
844 std::vector. Update all callers.
845 (find_label_symbols): Likewise for `function_symbols' and
846 `label_funcs_ret'.
847
848 2018-08-29 Keith Seitz <keiths@redhat.com>
849
850 * linespec.c (symtab_vector_up): Define.
851 (struct linespec) <file_symtabs>: Change type to std::vector *.
852 Update all uses.
853 (struct collect_info) <file_symtabs>: Likewise.
854 (collect_symtabs_from_filename): Return symtab_vector_up.
855 Update all callers.
856 (decode_objc): Remove cleanup.
857 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
858 (symtab_collector::release_symtabs): Return symtab_vector_up.
859 Update all callers.
860 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
861 Update all users.
862 (collect_symtabs_from_filename, symtabs_from_filename): Return
863 symtab_vector_up. Update all callers.
864
865 2018-08-29 Tom Tromey <tom@tromey.com>
866
867 * csky-tdep.c (csky_analyze_prologue): Use
868 core_addr_to_string_nz.
869
870 2018-08-29 Tom Tromey <tom@tromey.com>
871
872 * windows-nat.c (struct xlate_exception) <them>: Change type to
873 DWORD.
874 (xlate): Fix formatting. Remove last entry.
875 (struct xlate_exception, xlate): Comment out.
876 (windows_nat_target::resume): Use ranged for.
877
878 2018-08-29 Jim Wilson <jimw@sifive.com>
879
880 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
881 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
882 of NT_PRFPREG.
883 (riscv_linux_nat_target::store_registers): Likewise.
884
885 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
886
887 PR gdb/23555
888 PR gdb/23558
889 * gnulib/aclocal.m4: Regenerate.
890 * gnulib/config.in: Regenerate.
891 * gnulib/configure: Regenerate.
892 * gnulib/import/Makefile.am: Update.
893 * gnulib/import/Makefile.in: Update.
894 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
895 * gnulib/import/_Noreturn.h: ... this.
896 * gnulib/import/alloca.in.h: Update.
897 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
898 * gnulib/import/arg-nonnull.h: ... this.
899 * gnulib/import/assure.h: Update.
900 * gnulib/import/at-func.c: Update.
901 * gnulib/import/basename-lgpl.c: Update.
902 * gnulib/import/extra/snippet/c++defs.h: Rename to...
903 * gnulib/import/c++defs.h: ... this.
904 * gnulib/import/canonicalize-lgpl.c: Update.
905 * gnulib/import/cdefs.h: Update.
906 * gnulib/import/chdir-long.c: Update.
907 * gnulib/import/chdir-long.h: Update.
908 * gnulib/import/cloexec.c: Update.
909 * gnulib/import/cloexec.h: Update.
910 * gnulib/import/close.c: Update.
911 * gnulib/import/closedir.c: Update.
912 * gnulib/import/config.charset: Update.
913 * gnulib/import/dirent-private.h: Update.
914 * gnulib/import/dirent.in.h: Update.
915 * gnulib/import/dirfd.c: Update.
916 * gnulib/import/dirname-lgpl.c: Update.
917 * gnulib/import/dirname.h: Update.
918 * gnulib/import/dosname.h: Update.
919 * gnulib/import/dup-safer-flag.c: Update.
920 * gnulib/import/dup-safer.c: Update.
921 * gnulib/import/dup.c: Update.
922 * gnulib/import/dup2.c: Update.
923 * gnulib/import/errno.in.h: Update.
924 * gnulib/import/error.c: Update.
925 * gnulib/import/error.h: Update.
926 * gnulib/import/exitfail.c: Update.
927 * gnulib/import/exitfail.h: Update.
928 * gnulib/import/extra/update-copyright: Update.
929 * gnulib/import/fchdir.c: Update.
930 * gnulib/import/fcntl.c: Update.
931 * gnulib/import/fcntl.in.h: Update.
932 * gnulib/import/fd-hook.c: Update.
933 * gnulib/import/fd-hook.h: Update.
934 * gnulib/import/fd-safer-flag.c: Update.
935 * gnulib/import/fd-safer.c: Update.
936 * gnulib/import/fdopendir.c: Update.
937 * gnulib/import/filename.h: Update.
938 * gnulib/import/filenamecat-lgpl.c: Update.
939 * gnulib/import/filenamecat.h: Update.
940 * gnulib/import/flexmember.h: Update.
941 * gnulib/import/float+.h: Update.
942 * gnulib/import/float.c: Update.
943 * gnulib/import/float.in.h: Update.
944 * gnulib/import/fnmatch.c: Update.
945 * gnulib/import/fnmatch.in.h: Update.
946 * gnulib/import/fnmatch_loop.c: Update.
947 * gnulib/import/fpucw.h: Update.
948 * gnulib/import/frexp.c: Update.
949 * gnulib/import/frexpl.c: Update.
950 * gnulib/import/fstat.c: Update.
951 * gnulib/import/fstatat.c: Update.
952 * gnulib/import/getcwd-lgpl.c: Update.
953 * gnulib/import/getcwd.c: Update.
954 * gnulib/import/getdtablesize.c: Update.
955 * gnulib/import/getlogin_r.c: Update.
956 * gnulib/import/getprogname.c: Update.
957 * gnulib/import/getprogname.h: Update.
958 * gnulib/import/gettext.h: Update.
959 * gnulib/import/gettimeofday.c: Update.
960 * gnulib/import/glob-libc.h: Update.
961 * gnulib/import/glob.c: Update.
962 * gnulib/import/glob.in.h: Update.
963 * gnulib/import/glob_internal.h: Update.
964 * gnulib/import/glob_pattern_p.c: Update.
965 * gnulib/import/globfree.c: Update.
966 * gnulib/import/hard-locale.c: Update.
967 * gnulib/import/hard-locale.h: Update.
968 * gnulib/import/intprops.h: Update.
969 * gnulib/import/inttypes.in.h: Update.
970 * gnulib/import/isnan.c: Update.
971 * gnulib/import/isnand-nolibm.h: Update.
972 * gnulib/import/isnand.c: Update.
973 * gnulib/import/isnanl-nolibm.h: Update.
974 * gnulib/import/isnanl.c: Update.
975 * gnulib/import/itold.c: Update.
976 * gnulib/import/libc-config.h: Update.
977 * gnulib/import/limits.in.h: Update.
978 * gnulib/import/localcharset.c: Update.
979 * gnulib/import/localcharset.h: Update.
980 * gnulib/import/localtime-buffer.c: Update.
981 * gnulib/import/localtime-buffer.h: Update.
982 * gnulib/import/lstat.c: Update.
983 * gnulib/import/m4/00gnulib.m4: Update.
984 * gnulib/import/m4/__inline.m4: Update.
985 * gnulib/import/m4/absolute-header.m4: Update.
986 * gnulib/import/m4/alloca.m4: Update.
987 * gnulib/import/m4/builtin-expect.m4: Update.
988 * gnulib/import/m4/canonicalize.m4: Update.
989 * gnulib/import/m4/chdir-long.m4: Update.
990 * gnulib/import/m4/close.m4: Update.
991 * gnulib/import/m4/closedir.m4: Update.
992 * gnulib/import/m4/configmake.m4: Update.
993 * gnulib/import/m4/d-ino.m4: Update.
994 * gnulib/import/m4/d-type.m4: Update.
995 * gnulib/import/m4/dirent_h.m4: Update.
996 * gnulib/import/m4/dirfd.m4: Update.
997 * gnulib/import/m4/dirname.m4: Update.
998 * gnulib/import/m4/double-slash-root.m4: Update.
999 * gnulib/import/m4/dup.m4: Update.
1000 * gnulib/import/m4/dup2.m4: Update.
1001 * gnulib/import/m4/eealloc.m4: Update.
1002 * gnulib/import/m4/environ.m4: Update.
1003 * gnulib/import/m4/errno_h.m4: Update.
1004 * gnulib/import/m4/error.m4: Update.
1005 * gnulib/import/m4/exponentd.m4: Update.
1006 * gnulib/import/m4/exponentl.m4: Update.
1007 * gnulib/import/m4/extensions.m4: Update.
1008 * gnulib/import/m4/extern-inline.m4: Update.
1009 * gnulib/import/m4/fchdir.m4: Update.
1010 * gnulib/import/m4/fcntl-o.m4: Update.
1011 * gnulib/import/m4/fcntl.m4: Update.
1012 * gnulib/import/m4/fcntl_h.m4: Update.
1013 * gnulib/import/m4/fdopendir.m4: Update.
1014 * gnulib/import/m4/filenamecat.m4: Update.
1015 * gnulib/import/m4/flexmember.m4: Update.
1016 * gnulib/import/m4/float_h.m4: Update.
1017 * gnulib/import/m4/fnmatch.m4: Update.
1018 * gnulib/import/m4/fnmatch_h.m4: Update.
1019 * gnulib/import/m4/fpieee.m4: Update.
1020 * gnulib/import/m4/frexp.m4: Update.
1021 * gnulib/import/m4/frexpl.m4: Update.
1022 * gnulib/import/m4/fstat.m4: Update.
1023 * gnulib/import/m4/fstatat.m4: Update.
1024 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1025 * gnulib/import/m4/getcwd-path-max.m4: Update.
1026 * gnulib/import/m4/getcwd.m4: Update.
1027 * gnulib/import/m4/getdtablesize.m4: Update.
1028 * gnulib/import/m4/getlogin.m4: Update.
1029 * gnulib/import/m4/getlogin_r.m4: Update.
1030 * gnulib/import/m4/getpagesize.m4: Update.
1031 * gnulib/import/m4/getprogname.m4: Update.
1032 * gnulib/import/m4/gettimeofday.m4: Update.
1033 * gnulib/import/m4/glibc21.m4: Update.
1034 * gnulib/import/m4/glob.m4: Update.
1035 * gnulib/import/m4/glob_h.m4: Update.
1036 * gnulib/import/m4/gnulib-cache.m4: Update.
1037 * gnulib/import/m4/gnulib-common.m4: Update.
1038 * gnulib/import/m4/gnulib-comp.m4: Update.
1039 * gnulib/import/m4/gnulib-tool.m4: Update.
1040 * gnulib/import/m4/hard-locale.m4: Update.
1041 * gnulib/import/m4/include_next.m4: Update.
1042 * gnulib/import/m4/inttypes-pri.m4: Update.
1043 * gnulib/import/m4/inttypes.m4: Update.
1044 * gnulib/import/m4/isnand.m4: Update.
1045 * gnulib/import/m4/isnanl.m4: Update.
1046 * gnulib/import/m4/largefile.m4: Update.
1047 * gnulib/import/m4/limits-h.m4: Update.
1048 * gnulib/import/m4/localcharset.m4: Update.
1049 * gnulib/import/m4/locale-fr.m4: Update.
1050 * gnulib/import/m4/locale-ja.m4: Update.
1051 * gnulib/import/m4/locale-zh.m4: Update.
1052 * gnulib/import/m4/localtime-buffer.m4: Update.
1053 * gnulib/import/m4/longlong.m4: Update.
1054 * gnulib/import/m4/lstat.m4: Update.
1055 * gnulib/import/m4/malloc.m4: Update.
1056 * gnulib/import/m4/malloca.m4: Update.
1057 * gnulib/import/m4/math_h.m4: Update.
1058 * gnulib/import/m4/mbrtowc.m4: Update.
1059 * gnulib/import/m4/mbsinit.m4: Update.
1060 * gnulib/import/m4/mbsrtowcs.m4: Update.
1061 * gnulib/import/m4/mbstate_t.m4: Update.
1062 * gnulib/import/m4/memchr.m4: Update.
1063 * gnulib/import/m4/memmem.m4: Update.
1064 * gnulib/import/m4/mempcpy.m4: Update.
1065 * gnulib/import/m4/memrchr.m4: Update.
1066 * gnulib/import/m4/mkdir.m4: Update.
1067 * gnulib/import/m4/mkstemp.m4: Update.
1068 * gnulib/import/m4/mmap-anon.m4: Update.
1069 * gnulib/import/m4/mode_t.m4: Update.
1070 * gnulib/import/m4/msvc-inval.m4: Update.
1071 * gnulib/import/m4/msvc-nothrow.m4: Update.
1072 * gnulib/import/m4/multiarch.m4: Update.
1073 * gnulib/import/m4/nocrash.m4: Update.
1074 * gnulib/import/m4/off_t.m4: Update.
1075 * gnulib/import/m4/onceonly.m4: Update.
1076 * gnulib/import/m4/open-cloexec.m4: Update.
1077 * gnulib/import/m4/open.m4: Update.
1078 * gnulib/import/m4/openat.m4: Update.
1079 * gnulib/import/m4/opendir.m4: Update.
1080 * gnulib/import/m4/pathmax.m4: Update.
1081 * gnulib/import/m4/rawmemchr.m4: Update.
1082 * gnulib/import/m4/readdir.m4: Update.
1083 * gnulib/import/m4/readlink.m4: Update.
1084 * gnulib/import/m4/realloc.m4: Update.
1085 * gnulib/import/m4/rename.m4: Update.
1086 * gnulib/import/m4/rewinddir.m4: Update.
1087 * gnulib/import/m4/rmdir.m4: Update.
1088 * gnulib/import/m4/save-cwd.m4: Update.
1089 * gnulib/import/m4/secure_getenv.m4: Update.
1090 * gnulib/import/m4/setenv.m4: Update.
1091 * gnulib/import/m4/signal_h.m4: Update.
1092 * gnulib/import/m4/ssize_t.m4: Update.
1093 * gnulib/import/m4/stat-time.m4: Update.
1094 * gnulib/import/m4/stat.m4: Update.
1095 * gnulib/import/m4/std-gnu11.m4: Update.
1096 * gnulib/import/m4/stdbool.m4: Update.
1097 * gnulib/import/m4/stddef_h.m4: Update.
1098 * gnulib/import/m4/stdint.m4: Update.
1099 * gnulib/import/m4/stdio_h.m4: Update.
1100 * gnulib/import/m4/stdlib_h.m4: Update.
1101 * gnulib/import/m4/strchrnul.m4: Update.
1102 * gnulib/import/m4/strdup.m4: Update.
1103 * gnulib/import/m4/strerror.m4: Update.
1104 * gnulib/import/m4/string_h.m4: Update.
1105 * gnulib/import/m4/strstr.m4: Update.
1106 * gnulib/import/m4/strtok_r.m4: Update.
1107 * gnulib/import/m4/sys_socket_h.m4: Update.
1108 * gnulib/import/m4/sys_stat_h.m4: Update.
1109 * gnulib/import/m4/sys_time_h.m4: Update.
1110 * gnulib/import/m4/sys_types_h.m4: Update.
1111 * gnulib/import/m4/tempname.m4: Update.
1112 * gnulib/import/m4/time_h.m4: Update.
1113 * gnulib/import/m4/unistd-safer.m4: Update.
1114 * gnulib/import/m4/unistd_h.m4: Update.
1115 * gnulib/import/m4/warn-on-use.m4: Update.
1116 * gnulib/import/m4/wchar_h.m4: Update.
1117 * gnulib/import/m4/wchar_t.m4: Update.
1118 * gnulib/import/m4/wctype_h.m4: Update.
1119 * gnulib/import/m4/wint_t.m4: Update.
1120 * gnulib/import/malloc.c: Update.
1121 * gnulib/import/malloc/scratch_buffer.h: Update.
1122 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1123 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1124 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1125 * gnulib/import/malloca.c: Update.
1126 * gnulib/import/malloca.h: Update.
1127 * gnulib/import/malloca.valgrind: Update.
1128 * gnulib/import/math.in.h: Update.
1129 * gnulib/import/mbrtowc.c: Update.
1130 * gnulib/import/mbsinit.c: Update.
1131 * gnulib/import/mbsrtowcs-impl.h: Update.
1132 * gnulib/import/mbsrtowcs-state.c: Update.
1133 * gnulib/import/mbsrtowcs.c: Update.
1134 * gnulib/import/memchr.c: Update.
1135 * gnulib/import/memmem.c: Update.
1136 * gnulib/import/mempcpy.c: Update.
1137 * gnulib/import/memrchr.c: Update.
1138 * gnulib/import/mkdir.c: Update.
1139 * gnulib/import/mkstemp.c: Update.
1140 * gnulib/import/msvc-inval.c: Update.
1141 * gnulib/import/msvc-inval.h: Update.
1142 * gnulib/import/msvc-nothrow.c: Update.
1143 * gnulib/import/msvc-nothrow.h: Update.
1144 * gnulib/import/open.c: Update.
1145 * gnulib/import/openat-die.c: Update.
1146 * gnulib/import/openat-priv.h: Update.
1147 * gnulib/import/openat-proc.c: Update.
1148 * gnulib/import/openat.c: Update.
1149 * gnulib/import/openat.h: Update.
1150 * gnulib/import/opendir.c: Update.
1151 * gnulib/import/pathmax.h: Update.
1152 * gnulib/import/pipe-safer.c: Update.
1153 * gnulib/import/rawmemchr.c: Update.
1154 * gnulib/import/readdir.c: Update.
1155 * gnulib/import/readlink.c: Update.
1156 * gnulib/import/realloc.c: Update.
1157 * gnulib/import/ref-add.sin: Update.
1158 * gnulib/import/ref-del.sin: Update.
1159 * gnulib/import/rename.c: Update.
1160 * gnulib/import/rewinddir.c: Update.
1161 * gnulib/import/rmdir.c: Update.
1162 * gnulib/import/same-inode.h: Update.
1163 * gnulib/import/save-cwd.c: Update.
1164 * gnulib/import/save-cwd.h: Update.
1165 * gnulib/import/scratch_buffer.h: Update.
1166 * gnulib/import/secure_getenv.c: Update.
1167 * gnulib/import/setenv.c: Update.
1168 * gnulib/import/signal.in.h: Update.
1169 * gnulib/import/stat-time.c: Update.
1170 * gnulib/import/stat-time.h: Update.
1171 * gnulib/import/stat-w32.c: Update.
1172 * gnulib/import/stat-w32.h: Update.
1173 * gnulib/import/stat.c: Update.
1174 * gnulib/import/stdbool.in.h: Update.
1175 * gnulib/import/stddef.in.h: Update.
1176 * gnulib/import/stdint.in.h: Update.
1177 * gnulib/import/stdio.in.h: Update.
1178 * gnulib/import/stdlib.in.h: Update.
1179 * gnulib/import/str-two-way.h: Update.
1180 * gnulib/import/strchrnul.c: Update.
1181 * gnulib/import/strdup.c: Update.
1182 * gnulib/import/streq.h: Update.
1183 * gnulib/import/strerror-override.c: Update.
1184 * gnulib/import/strerror-override.h: Update.
1185 * gnulib/import/strerror.c: Update.
1186 * gnulib/import/string.in.h: Update.
1187 * gnulib/import/stripslash.c: Update.
1188 * gnulib/import/strnlen1.c: Update.
1189 * gnulib/import/strnlen1.h: Update.
1190 * gnulib/import/strstr.c: Update.
1191 * gnulib/import/strtok_r.c: Update.
1192 * gnulib/import/sys_stat.in.h: Update.
1193 * gnulib/import/sys_time.in.h: Update.
1194 * gnulib/import/sys_types.in.h: Update.
1195 * gnulib/import/tempname.c: Update.
1196 * gnulib/import/tempname.h: Update.
1197 * gnulib/import/time.in.h: Update.
1198 * gnulib/import/unistd--.h: Update.
1199 * gnulib/import/unistd-safer.h: Update.
1200 * gnulib/import/unistd.in.h: Update.
1201 * gnulib/import/unsetenv.c: Update.
1202 * gnulib/import/verify.h: Update.
1203 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1204 * gnulib/import/wchar.in.h: Update.
1205 * gnulib/import/wctype.in.h: Update.
1206 * gnulib/import/xalloc-oversized.h: Update.
1207 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1208 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1209
1210 2018-08-16 Gary Benson <gbenson@redhat.com>
1211
1212 PR gdb/13000:
1213 * gdb/main.c (captured_main_1): Exit with nonzero status
1214 in batch mode if the last command to be executed failed.
1215 * NEWS: Mention the above.
1216
1217 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1220 end of warning message.
1221
1222 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1223
1224 PR gdb/22943:
1225 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1226 (aarch64_extract_return_value): Use
1227 aapcs_is_vfp_call_or_return_candidate.
1228 (aarch64_return_in_memory): Likewise.
1229 (aarch64_store_return_value): Likewise.
1230
1231 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1232
1233 * aarch64-tdep.c
1234 (aapcs_is_vfp_call_or_return_candidate): Make static
1235 (pass_in_v_or_stack): Remove function.
1236 (pass_in_v_vfp_candidate): New function.
1237 (aarch64_push_dummy_call): Check for float register candidates.
1238
1239 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1240
1241 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1242 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1243 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1244
1245 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 PR build/23399
1248 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1249 (struct ipa_sym_addresses): Rename to...
1250 (struct ipa_sym_addresses_common): ... this.
1251 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1252
1253 2018-08-28 Tom Tromey <tom@tromey.com>
1254
1255 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1256 (token_fifo): Now a std::vector.
1257 (yylex, c_parse): Update.
1258 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1259 (token_fifo): Now a std::vector.
1260 (yylex, d_parse): Update.
1261 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1262 (token_fifo): Now a std::vector.
1263 (yylex, go_parse): Update.
1264
1265 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * parser-defs.h (struct type_stack) <elements>: Change type to
1268 std::vector<union type_stack_elt>.
1269 <depth, size>: Remove.
1270 * parse.c (parse_exp_in_context_1): Adjust.
1271 (type_stack_reserve): Remove.
1272 (check_type_stack_depth): Remove.
1273 (insert_into_type_stack): Adjust to std::vector.
1274 (insert_type): Likewise.
1275 (push_type): Likewise.
1276 (push_type_int): Likewise.
1277 (insert_type_address_space): Likewise.
1278 (pop_type): Likewise.
1279 (pop_type_int): Likewise.
1280 (pop_typelist): Likewise.
1281 (pop_type_stack): Likewise.
1282 (append_type_stack): Likewise.
1283 (push_type_stack): Likewise.
1284 (get_type_stack): Likewise.
1285 (type_stack_cleanup): Likewise.
1286 (push_typelist): Likewise.
1287 (follow_types): Likewise.
1288 (_initialize_parse): Likewise.
1289
1290 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1291
1292 * NEWS: Mention csky target.
1293
1294 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1295 Hafiz Abid Qadeer <abidh@codesourcery.com>
1296 Don Breazeal <donb@codesourcery.com>
1297
1298 * csky-linux-tdep.c: New file.
1299 * csky-tdep.c: Likewise.
1300 * csky-tdep.h: Likewise.
1301 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1302 csky-tdep.o.
1303 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1304 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1305 * configure.tgt: Add csky support.
1306
1307 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1308
1309 * python/py-framefilter.c (py_print_frame): Print frame architecture
1310 when printing on an MI output.
1311
1312 2018-08-27 Tom Tromey <tom@tromey.com>
1313
1314 PR build/23087:
1315 * configure: Rebuild.
1316 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1317
1318 2018-08-27 Tom Tromey <tom@tromey.com>
1319
1320 * aarch64-linux-tdep.c
1321 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1322 casts to int.
1323
1324 2018-08-27 Tom Tromey <tom@tromey.com>
1325
1326 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1327 unsigned.
1328 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1329 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1330 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1331 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1332 unsigned.
1333
1334 2018-08-27 Tom Tromey <tom@tromey.com>
1335
1336 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1337 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1338
1339 2018-08-27 Tom Tromey <tom@tromey.com>
1340
1341 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1342 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1343 ULONGEST_MAX.
1344 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1345 ULONGEST_MAX.
1346 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1347 ULONGEST_MAX.
1348 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1349 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1350 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1351 ULONGEST_MAX.
1352 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1353 (ppc64_linux_sigaction_tramp_frame)
1354 (ppc32_linux_sighandler_tramp_frame)
1355 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1356 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1357 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1358 * mn10300-linux-tdep.c (am33_linux_sigframe)
1359 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1360 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1361 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1362 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1363 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1364 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1365 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1366 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1367 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1368 * microblaze-linux-tdep.c
1369 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1370 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1371 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1372 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1373 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1374 * common/common-types.h (ULONGEST_MAX): New define.
1375 (CORE_ADDR_MAX): Fix formatting.
1376 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1377 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1378 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1379 (arm_linux_rt_sigreturn_tramp_frame)
1380 (arm_eabi_linux_sigreturn_tramp_frame)
1381 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1382 (thumb2_eabi_linux_sigreturn_tramp_frame)
1383 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1384 (arm_linux_restart_syscall_tramp_frame)
1385 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1386 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1387 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1388 ULONGEST_MAX.
1389 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1390
1391 2018-08-27 Tom Tromey <tom@tromey.com>
1392
1393 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1394 CORE_ADDR_MAX.
1395 * mips-tdep.c (mips_deal_with_atomic_sequence)
1396 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1397 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1398 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1399 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1400 CORE_ADDR_MAX.
1401 * aarch64-tdep.c (aarch64_software_single_step): Use
1402 CORE_ADDR_MAX.
1403
1404 2018-08-27 Tom Tromey <tom@tromey.com>
1405
1406 * linespec.c (complete_linespec_component): Add cast to "char".
1407 * completer.c (completion_tracker::build_completion_result): Add
1408 cast to "char".
1409
1410 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * solist.h (struct solist, struct target_so_ops): Fix
1413 indentation.
1414
1415 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1416
1417 * ada-tasks.c (ada_task_info_s): Remove typedef.
1418 (DEF_VEC_O(ada_task_info_s)): Remove.
1419 (struct ada_tasks_inferior_data): Initialize fields.
1420 <task_list>: Make an std::vector.
1421 (get_ada_tasks_inferior_data): Allocate with new.
1422 (ada_get_task_number): Adjust.
1423 (get_task_number_from_id): Likewise.
1424 (valid_task_id): Likewise.
1425 (ada_get_task_info_from_ptid): Likewise.
1426 (iterate_over_live_ada_tasks): Likewise.
1427 (add_ada_task): Likewise.
1428 (read_known_tasks): Likewise.
1429 (ada_build_task_list): Likewise.
1430 (print_ada_task_info): Likewise.
1431 (info_task): Likewise.
1432 (task_command_1): Likewise.
1433
1434 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * ada-lang.c (add_angle_brackets): Return std::string.
1437
1438 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1439
1440 * python/py-threadevent.c (py_get_event_thread): Initialize
1441 pythread.
1442
1443 2018-08-24 Pedro Alves <palves@redhat.com>
1444
1445 * python/py-bpevent.c (create_breakpoint_event_object): Use
1446 copy-initialization.
1447 * python/py-continueevent.c (emit_continue_event): Use
1448 copy-initialization.
1449 * python/py-exitedevent.c (create_exited_event_object): Return a
1450 gdbpy_ref<>.
1451 (emit_exited_event): Use copy-initialization.
1452 * python/py-inferior.c (python_new_inferior)
1453 (python_inferior_deleted, add_thread_object): Use
1454 copy-initialization.
1455 * python/py-infevents.c (create_inferior_call_event_object)
1456 (create_register_changed_event_object)
1457 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1458 (emit_inferior_call_event, emit_memory_changed_event)
1459 (emit_register_changed_event): Use copy-initialization.
1460 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1461 Return a gdbpy_ref<>.
1462 (emit_new_objfile_event): Use copy-initialization.
1463 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1464 (emit_clear_objfiles_event): Use copy-initialization.
1465 * python/py-signalevent.c (create_signal_event_object): Use
1466 copy-initialization.
1467 * python/py-threadevent.c (create_thread_event_object): Use
1468 copy-initialization.
1469
1470 2018-08-24 Pedro Alves <palves@redhat.com>
1471 Simon Marchi <simon.marchi@ericsson.com>
1472
1473 PR gdb/23379
1474 * python/py-continueevent.c: Include "gdbthread.h".
1475 (create_continue_event_object): Add intro comment. Add 'ptid'
1476 parameter. Use it to find thread to pass to
1477 create_thread_event_object.
1478 (emit_continue_event): Pass PTID down to
1479 create_continue_event_object.
1480 * python/py-event.h (py_get_event_thread): Declare.
1481 (create_thread_event_object): Remove default from 'thread'
1482 parameter.
1483 * python/py-stopevent.c (create_stop_event_object): Use
1484 py_get_event_thread.
1485 * python/py-threadevent.c (get_event_thread): Rename to ...
1486 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1487 and use it to find the thread.
1488 (create_thread_event_object): Assert that THREAD isn't null.
1489 Don't find the event thread here.
1490
1491 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1492
1493 * block.h (blockrange, blockranges): New struct declarations.
1494 (struct block): Add new field named `ranges'.
1495 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1496 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1497 macros for accessing ranges in struct block.
1498 (make_blockranges): New declaration.
1499 block.c (make_blockranges): New function.
1500 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1501 for block.
1502 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1503 * blockframe.c (cache_pc_function_block): New static global.
1504 (clear_pc_function_cache): Clear cache_pc_function_block.
1505 (find_pc_partial_function): Move comment to symtab.h. Add
1506 support for non-contiguous blocks.
1507 * cli/cli-cmds.c (block.h): Include.
1508 (print_disassembly): Handle printing of non-contiguous blocks.
1509 (disassemble_current_function): Likewise.
1510 (disassemble_command): Likewise.
1511
1512 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1513 BLOCK_START.
1514 * blockframe.c (get_pc_function_start): Likewise.
1515 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1516 (gcc_symbol_address): Likewise.
1517 * compile/compile-object-run.c (compile_object_run): Likewise.
1518 * compile/compile.c (get_expr_block_and_pc): Likewise.
1519 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1520 (func_addr_to_tail_call_list): Likewise.
1521 * findvar.c (default_read_var_value): Likewise.
1522 * inline-frame.c (inline_frame_this_id): Likewise.
1523 (skip-inline_frames): Likewise.
1524 * infcmd.c (until_next_command): Likewise.
1525 * linespec.c (convert_linespec_to_sals): Likewise.
1526 * parse.c (parse_exp_in_context_1): Likewise.
1527 * printcmd.c (build_address_symbolic): likewise.
1528 (info_address_command): Likewise.
1529 symtab.c (find_function_start_sal): Likewise.
1530 (skip_prologue_sal): Likewise.
1531 (find_function_alias_target): Likewise.
1532 (find_gnu_ifunc): Likewise.
1533 * stack.c (find_frame_funname): Likewise.
1534 * symtab.c (fixup_symbol_section): Likewise.
1535 (find_function_start_sal): Likewise.
1536 (skip_prologue_sal): Likewsie.
1537 (find_function_alias_target): Likewise.
1538 (find_gnu_ifunc): Likewise.
1539 * tracepoint.c (info_scope_command): Likewise.
1540 * value.c (value_fn_field): Likewise.
1541
1542 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1543 in place of find_pc_partial_function.
1544 * blockframe.c (find_function_entry_range_from_pc): New function.
1545 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1546 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1547 for each range in a block.
1548
1549
1550 2018-08-23 Xavier Roirand <roirand@adacore.com>
1551
1552 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1553 incrementation.
1554
1555 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1556
1557 * solib-svr4.c (read_program_headers_from_bfd): Return
1558 gdb::optional<gdb::byte_vector>.
1559 (svr4_exec_displacement): Adjust.
1560
1561 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1562
1563 * solib-svr4.c (read_program_header): Return
1564 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1565 (find_program_interpreter): Return
1566 gdb::optional<gdb::byte_vector>.
1567 (scan_dyntag_auxv): Adjust.
1568 (enable_break): Adjust.
1569 (svr4_exec_displacement): Adjust.
1570
1571 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1574 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1575
1576 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1577
1578 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1579 string_vprintf.
1580 * guile/scm-utils.c (gdbscm_printf): Likewise.
1581 * serial.c (serial_printf): Likewise.
1582 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1583
1584 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1585
1586 * stack.c (print_frame): Print frame architecture when printing on
1587 an MI output.
1588 * NEWS: Mention new "arch" attribute in frame output.
1589
1590 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1591
1592 * arch/aarch64.h (aarch64_regnum): Update comment.
1593
1594 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1595
1596 * NEWS: Add SVE to 8.2 section.
1597
1598 2018-08-21 Pedro Alves <palves@redhat.com>
1599
1600 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1601 out from gdbscm_parse_function_args.
1602 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1603 gdbscm_parse_function_args_1.
1604
1605 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1606
1607 PR gdb/17816
1608 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1609 operator.
1610
1611 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1612
1613 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1614
1615 2018-08-19 Michael Spang <spang@google.com>
1616
1617 PR gdb/11786
1618 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1619 for PT_TLS segments.
1620
1621 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1622
1623 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1624 dwarf_variable_value.
1625 * dwarf2-frame.c (class dwarf_expr_executor):
1626 Add override for dwarf_variable_value.
1627 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1628 (class symbol_needs_eval_context): Likewise.
1629 (indirect_synthetic_pointer): Add forward declaration.
1630 (sect_variable_value): New function.
1631 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1632 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1633 for DW_OP_GNU_variable_value.
1634
1635 2018-08-16 Tom Tromey <tom@tromey.com>
1636
1637 * top.c (read_command_file): Update.
1638 (command_line_input): Remove "repeat" argument.
1639 * ada-lang.c (get_selections): Update.
1640 * linespec.c (decode_line_2): Update.
1641 * defs.h (command_line_input): Remove argument.
1642 * cli/cli-script.c (read_next_line): Update.
1643 * python/py-gdb-readline.c: Update.
1644
1645 2018-08-17 Tom Tromey <tom@tromey.com>
1646
1647 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1648 command_line_input.
1649
1650 2018-08-15 Tom Tromey <tom@tromey.com>
1651
1652 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1653
1654 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1655
1656 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1657 If used, use find_pc_partial_function to find address range
1658 to disassemble.
1659 * mi/mi-main.c (mi_cmd_list_features): Report
1660 "data-disassemble-a-option" feature.
1661 * NEWS: Mention new -data-disassemble option -a.
1662
1663 2018-08-13 Tom Tromey <tom@tromey.com>
1664
1665 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1666
1667 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1668
1669 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1670 (aarch64_linux_collect_sve_regset): Likewise.
1671 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1672 * regcache.h (regcache_map_entry_size): New function.
1673
1674 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1675
1676 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1677 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1678 (SVE_HEADER_VL_LENGTH): Likewise.
1679 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1680 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1681 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1682 (SVE_HEADER_SIZE_OFFSET): Likewise.
1683 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1684 (SVE_HEADER_VL_OFFSET): Likewise.
1685 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1686 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1687 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1688 (SVE_HEADER_SIZE): Likewise.
1689 (aarch64_linux_core_read_vq): Add function.
1690 (aarch64_linux_core_read_description): Check for SVE section.
1691
1692 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1693
1694 * aarch64-fbsd-tdep.c
1695 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1696 collect_size.
1697 * aarch64-linux-tdep.c
1698 (aarch64_linux_iterate_over_regset_sections): Likewise.
1699 * alpha-linux-tdep.c
1700 (alpha_linux_iterate_over_regset_sections):
1701 * alpha-nbsd-tdep.c
1702 (alphanbsd_iterate_over_regset_sections): Likewise.
1703 * amd64-fbsd-tdep.c
1704 (amd64fbsd_iterate_over_regset_sections): Likewise.
1705 * amd64-linux-tdep.c
1706 (amd64_linux_iterate_over_regset_sections): Likewise.
1707 * arm-bsd-tdep.c
1708 (armbsd_iterate_over_regset_sections): Likewise.
1709 * arm-fbsd-tdep.c
1710 (arm_fbsd_iterate_over_regset_sections): Likewise.
1711 * arm-linux-tdep.c
1712 (arm_linux_iterate_over_regset_sections): Likewise.
1713 * corelow.c (get_core_registers_cb): Likewise.
1714 (core_target::fetch_registers): Likewise.
1715 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1716 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1717 * gdbarch.h (void): Regenerate.
1718 * gdbarch.sh: Add supply_size and collect_size.
1719 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1720 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1721 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1722 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1723 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1724 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1725 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1726 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1727 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1728 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1729 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1730 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1731 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1732 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1733 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1734 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1735 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1736 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1737 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1738 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1739 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1740 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1741 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1742 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1743 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1744 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1745 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1746 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1747 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1748 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1749
1750 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1751
1752 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1753 with string_printf.
1754
1755 2018-08-10 Keith Seitz <keiths@redhat.com>
1756
1757 * compile/compile-c-support.c (add_code_header, add_code_footer):
1758 Move into policy class.
1759 (c_push_user_expression, pop_user_expression_nop)
1760 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1761 (compile_program): New host class.
1762 (c_compile_program): New typedef.
1763 (c_compute_porgram): Use c_compile_program.
1764
1765 2018-08-10 Keith Seitz <keiths@redhat.com>
1766
1767 * compile/compile-internal.h (compile_instance::~compile_instance):
1768 Remove calls to htab_delete.
1769 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1770 * compile.c (compile_instance::compile_instance): Initialize
1771 htab unique pointers.
1772 (compile_instance::get_cached_type, compile_instance::insert_type)
1773 (compile_instance::error_symbol_once): Update for unique_ptr.
1774
1775 2018-08-10 Keith Seitz <keiths@redhat.com>
1776
1777 * compile/compile-c-symbols.c (struct symbol_error)
1778 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1779 (compile_instance::insert_symbol_error)
1780 (compile_instance::error_symbol_once): Move to ...
1781 * compile/compile.c: ... here.
1782
1783 2018-08-10 Keith Seitz <keiths@redhat.com>
1784
1785 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1786 instead of `new_compile_instance'.
1787 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1788 Update description.
1789 If the symbol error map is not initialized, create it.
1790 (generate_c_for_for_one_symbol): Do not check/initialize
1791 the symbol error map.
1792 * compile/compile-c-types.c (compile_c_instance): Make a class.
1793 Update all callers.
1794 (compile_instance::compile_instance): Initialize the type cache.
1795 (get_cached_type): New function.
1796 (insert_type): Update description.
1797 (compile_c_instance::m_default_cflags): Define.
1798 (convert_type): Update description. Use get_cached_type.
1799 (delete_instance): Moved to destructor.
1800 (new_compile_instance): Moved to constructor.
1801 * compile/compile-c.h (compile_c_instance): Make class inheriting
1802 from compile_instance.
1803 <base>: Remove field.
1804 <type_map, symbol_err_map>: Move to base class.
1805 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1806 * compile/compile-internal.h (compile_instance): Make class.
1807 <type_map_t, symbol_err_map_t>: Define.
1808 <fe>: Rename to `m_gcc_fe'.
1809 <scope, block, gcc_target_options>: Add `m_' prefix.
1810 <m_type_map, m_symbol_err_map>: New fields, moved from
1811 compile_c_instance.
1812 <destroy>: Remove.
1813 (convert_type, new_compile_instance): Remove.
1814 * compile/compile.c (cleanup_compile_instance): Remove.
1815 (compile_to_object): Use unique_ptr to eliminate cleanups.
1816 (compile_instance::set_print_callback, compile_instance::version)
1817 (compile_instance::set_verbose)
1818 (compile_instance::set_driver_filename)
1819 (compile_instance::set_triplet_regexp)
1820 (compile_instance::set_arguments)
1821 (compile_instance::set_source_file)
1822 (compile_instance::compile): Define.
1823
1824 2018-08-10 Keith Seitz <keiths@redhat.com>
1825
1826 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1827 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1828 gcc-c-fe.def to define C plugin.
1829 (delete_instance): Delete `c_plugin'.
1830 (new_compile_instance): Initialize `c_plugin'.
1831 * compile/compile-c.h: Include gcc_c_plugin.h.
1832 (struct compile_c_instance) <c_plugin>: New member.
1833 * gcc-c-plugin.h: New file.
1834 Update all callers with API change.
1835
1836 2018-08-10 Keith Seitz <keiths@redhat.com>
1837
1838 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1839 (HFILES_NO_SRCDIR): ... to here.
1840 Add compile-internal.h and compile-c.h.
1841 * compile/compile-c-support.c: Include compile-c.h.
1842 * compile/compile-c-symbols.c: Include compile-c.h.
1843 (generate_c_for_variable_locations): Update comment.
1844 * compile/compile-c-types.c: Include compile-c.h.
1845 * compile/compile-c.h: New file -- moved C language declarations
1846 from other files here.
1847 * compile/compile-internal.h: Do not include hashtab.h or
1848 common/enum-flags.h.
1849 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1850 (gcc_convert_symbol, gcc_symbol_address)
1851 (generate_c_for_variable_locations, c_get_mode_for_size)
1852 (c_get_range_decl_name): Definitions moved to compile-c.h.
1853 * compile/compile-loc2c.c: Include compile-c.h.
1854
1855 2018-08-10 Keith Seitz <keiths@redhat.com>
1856
1857 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1858 (c_symbol_substitution_name): ... this.
1859 Update all callers.
1860
1861 2018-08-10 Keith Seitz <keiths@redhat.com>
1862
1863 * compile/compile-c-support.c (c_compute_program): Use
1864 unique_xmalloc_ptr to eliminate cleanup.
1865 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1866 Return a unique_xmalloc_ptr and eliminate cleanup.
1867 * compile/compile-internal.h (generate_c_for_variable_locations):
1868 Return unique_xmalloc_ptr and update description.
1869
1870 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1871
1872 * corelow.c (core_target::get_core_register_section): Rename
1873 min_size to section_min_size.
1874
1875 2018-08-09 Jim Wilson <jimw@sifive.com>
1876
1877 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1878 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1879 * NEWS: Mention new GNU/Linux RISC-V target.
1880 * configure.host: Add riscv*-*-linux*.
1881 * configure.nat: Add riscv*.
1882 * configure.tgt: Add riscv*-*-linux*.
1883 * riscv-linux-nat.c: New file.
1884 * riscv-linux-tdep.c: New file.
1885
1886 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1887
1888 * infrun.c (resume): Make static, add forward declaration.
1889 (proceed): Update header comment.
1890 * infrun.h (resume): Delete declaration.
1891
1892 2018-08-09 Tom Tromey <tom@tromey.com>
1893
1894 * riscv-tdep.h: Minor formatting fixes.
1895
1896 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1899 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1900 (test_mkdir_recursive): Likewise.
1901 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1902
1903 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1904
1905 * valarith.c (value_subscripted_rvalue): If an array is not in
1906 memory, and we don't know the upper bound, then we can't know that
1907 the requested element exists or not.
1908
1909 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1910
1911 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1912 (target_options_to_string): Add comment.
1913
1914 2018-08-08 Tom Tromey <tom@tromey.com>
1915
1916 * unittests/scoped_mmap-selftests.c: Check result of "write".
1917
1918 2018-08-08 Jim Wilson <jimw@sifive.com>
1919
1920 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1921 (decode_register_index_short): New.
1922 (decode_j_type_insn, decode_cj_type_insn): New.
1923 (decode_b_type_insn, decode_cb_type_insn): New.
1924 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1925 local xlen. Check xlen when decoding ambiguous compressed insns. In
1926 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1927 is_c_sw_insn instead of is_sw_insn.
1928 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1929 (riscv_software_single_step): New.
1930 * riscv-tdep.h (riscv_software_single_step): Declare.
1931
1932 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1933 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1934
1935 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1936
1937 PR gdb/18050:
1938 * target.c (dispose_inferior): Don't dispose of inferiors that are
1939 already killed.
1940
1941 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1942
1943 * remote.c (remote_target::download_tracepoint): Change char* to
1944 const char*.
1945
1946 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * target.h (target_options_to_string): Return an std::string.
1949 * target.c (str_comma_list_concat_elem): Return void, use
1950 std::string.
1951 (do_option): Likewise.
1952 (target_options_to_string): Return an std::string.
1953 * linux-nat.c (linux_nat_target::wait): Adjust.
1954 * target-debug.h (target_debug_print_options): Adjust.
1955
1956 2018-08-07 Tom Tromey <tom@tromey.com>
1957
1958 * Makefile.in (CPPFLAGS): New variable.
1959 (INTERNAL_CPPFLAGS): Use it.
1960
1961 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1962
1963 * NEWS: Mention the index cache.
1964
1965 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1966
1967 * common/pathstuff.h (get_standard_cache_dir): New.
1968 * common/pathstuff.c (get_standard_cache_dir): New.
1969 * build-id.h (build_id_to_string): New.
1970 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1971 DEBUG_STR_SUFFIX): Move to here.
1972 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1973 DEBUG_STR_SUFFIX): Move from there.
1974 (write_psymtabs_to_index): Make non-static, add basename
1975 parameter. Write to temporary files, rename when done.
1976 (save_gdb_index_command): Adjust call to
1977 write_psymtabs_to_index.
1978 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1979 field.
1980 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1981 (get_gdb_index_contents_from_cache): New.
1982 (get_gdb_index_contents_from_cache_dwz): New.
1983 (dwarf2_initialize_objfile): Read index from cache.
1984 (dwarf2_build_psymtabs): Save to index.
1985 * dwarf-index-cache.h: New file.
1986 * dwarf-index-cache.c: New file.
1987 * dwarf-index-write.h: New file.
1988
1989 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1990
1991 * gnulib/aclocal.m4: Re-generate.
1992 * gnulib/config.in: Re-generate.
1993 * gnulib/configure: Re-generate.
1994 * gnulib/import/Makefile.am: Re-generate.
1995 * gnulib/import/Makefile.in: Re-generate.
1996 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1997 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1998 * gnulib/import/m4/mkdir.m4: New file.
1999 * gnulib/import/mkdir.c: New file.
2000 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2001 module.
2002
2003 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2004
2005 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2006 * common/scoped_mmap.c: New file.
2007 * common/scoped_mmap.h (destroy): New method.
2008 (~scoped_mmap, reset): Use destroy.
2009 (scoped_mmap): New move constructor.
2010 (mmap_file): New declaration.
2011 * unittests/scoped_mmap-selftests.c (test_normal,
2012 test_invalid_filename, run_tests): New functions.
2013 (_initialize_scoped_mmap_selftests): Register selftest.
2014
2015 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2016
2017 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2018 (read_gdb_index_from_buffer): ... this. Remove section
2019 parameter, add buffer parameter.
2020 (get_gdb_index_contents_ftype,
2021 get_gdb_index_contents_dwz_ftype): New typedefs.
2022 (dwarf2_read_gdb_index): Add callback parameters to get the
2023 index contents.
2024 (get_gdb_index_contents_from_section): New.
2025 (dwarf2_initialize_objfile): Update call to
2026 dwarf2_read_gdb_index.
2027
2028 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2031 (gdb_open_cloexec): Likewise.
2032 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2033 (commandline_from_pid): Likewise.
2034 (linux_xfer_osdata_threads): Likewise.
2035 (linux_xfer_osdata_fds): Likewise.
2036 * ada-lang.c (is_package_name): Likewise.
2037 * auxv.c (procfs_xfer_auxv): Likewise.
2038 * breakpoint.c (print_one_breakpoint_location): Use
2039 uiout::field_fmt.
2040 (print_one_catch_solib): Use string_printf.
2041 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2042 (add_pe_forwarded_sym): Likewise.
2043 * dwarf2read.c (create_type_unit_group): Likewise.
2044 (build_error_marker_type): Likewise.
2045 * infcall.c (get_function_name): Likewise.
2046 * valprint.c (print_converted_chars_to_obstack): Likewise.
2047 * xtensa-tdep.c (xtensa_register_type): Likewise.
2048
2049 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2050
2051 * remote.c (remote_target::download_tracepoint): Fix format
2052 string errors.
2053
2054 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2055
2056 * tracefile.c: Include common/byte-vector.h.
2057 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2058 with trace_regblock_size if needed. Update uses of buf.
2059
2060 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2061
2062 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2063 std::vector<unsigned char>.
2064 * tracepoint.c (collection_list::collection_list): Remove
2065 m_regs_mask initializer from initializer list. Resize
2066 m_regs_mask using the largest remote register number.
2067 (collection_list::add_remote_register): Remove size check on
2068 m_regs_mask. Use at to access element.
2069 (collection_list::stringify): Change type of temp_buf to
2070 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2071 stringify the register mask. Use pack_hex_byte for the register
2072 mask.
2073
2074 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2075
2076 * tracepoint.h (class collection_list) <add_register>: Remove.
2077 <add_remote_register, add_ax_registers, add_local_register>:
2078 Declare.
2079 <add_memrange>: Add scope parameter.
2080 * tracepoint.c (encode_actions_1): Likewise.
2081 (collection_list::add_register): Rename to ...
2082 (collection_list::add_remote_register): ... this. Update
2083 comment.
2084 (collection_list::add_ax_registers, add_local_register): New
2085 methods.
2086 (collection_list::add_memrange): Add scope parameter. Call
2087 add_local_register instead of add_register.
2088 (finalize_tracepoint_aexpr): New function.
2089 (collection_list::collect_symbol): Update calls to add_memrange.
2090 Call add_local_register instead of add_register. Call
2091 add_ax_registers. Call finalize_tracepoint_aexpr.
2092 (encode_actions_1): Get remote regnos for $reg action. Call
2093 add_remote_register, add_ax_registers, and add_local_register.
2094 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2095 (validate_actionline): Call finalize_tracepoint_aexpr.
2096
2097 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2098
2099 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2100 Replace array buf with gdb::char_vector buf, of size
2101 get_remote_packet_size (). Replace references to buf and
2102 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2103 and xsnprintf with snprintf. Raise errors if the buffer is too
2104 small.
2105
2106 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2107
2108 * remote.c (remote_target::download_tracepoint): Fix the has_more
2109 predicate in the QTDP action list iteration.
2110
2111 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2112
2113 * remote.c (remote_target::download_tracepoint): Fix indentation
2114 in for block.
2115
2116 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2117
2118 * proc-api.c (_initialize_proc_api): Remove c, unused.
2119 * procfs.c (procfs_init_inferior): Remove signals, unused.
2120 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2121 unused.
2122
2123 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2124 Andrew Burgess <andrew.burgess@embecosm.com>
2125
2126 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2127 'W_STOPCODE (0)' as this could be ambiguous.
2128
2129 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2130
2131 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2132 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2133 "ai_socktype").
2134
2135 2018-08-02 Tom Tromey <tom@tromey.com>
2136
2137 PR symtab/16842.
2138 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2139 symbols.
2140 (process_structure_scope): Likewise.
2141
2142 2018-08-02 Xavier Roirand <roirand@adacore.com>
2143
2144 PR gdb/22629:
2145 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2146 kill inferior.
2147
2148 2018-08-02 Tom Tromey <tom@tromey.com>
2149
2150 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2151 (darwin_suspend_inferior, darwin_resume_inferior)
2152 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2153 (darwin_check_new_threads): Check result of get_darwin_inferior.
2154
2155 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2156
2157 GDB 8.1.1 released.
2158
2159 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2160
2161 * varobj.c (varobj_get_path_expr_parent): Report an error if
2162 parent is a dynamic varobj.
2163
2164 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * gnulib/aclocal.m4: Re-generate.
2167 * gnulib/config.in: Re-generate.
2168 * gnulib/configure: Re-generate.
2169 * gnulib/import/Makefile.in: Re-generate.
2170 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2171 * gnulib/import/m4/onceonly.m4: Re-generate.
2172
2173 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2174
2175 * target-descriptions.c (struct xml_test_tdesc): New.
2176 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2177 (record_xml_tdesc): Update.
2178 (maintenance_check_xml_descriptions): Update.
2179 * target-descriptions.h (record_xml_tdesc): Update comment.
2180
2181 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2182
2183 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2184 checking array bounds are defined.
2185
2186 2018-07-30 Tom Tromey <tom@tromey.com>
2187
2188 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2189 irreflexivity violation.
2190
2191 2018-07-30 Tom Tromey <tom@tromey.com>
2192
2193 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2194 * value.c (unpack_long): Remove lint code.
2195 * valops.c (value_ind): Remove lint code.
2196 * valarith.c (value_x_binop, value_x_unop, value_equal)
2197 (value_pos): Remove lint code.
2198
2199 2018-07-28 Tom de Vries <tdevries@suse.de>
2200
2201 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2202 with undefined upper bound as <optimized out>.
2203
2204 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2205
2206 * gcore.in: Rename variable "name" to "prefix". Expand
2207 "usage" text.
2208
2209 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2210
2211 * windows-nat.c (windows_nat_target::create_inferior): Update to
2212 call close() in global namespace.
2213
2214 2018-07-26 Tom Tromey <tom@tromey.com>
2215
2216 * dwarf-index-write.c (add_address_entry): Don't add objfile
2217 offsets.
2218 * dbxread.c (find_stab_function): Rename from
2219 find_stab_function_addr. Return a bound_minimal_symbol.
2220 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2221 Don't add objfile offsets.
2222 (end_psymtab): Use raw_text_low, raw_text_high,
2223 MSYMBOL_VALUE_RAW_ADDRESS.
2224 (read_ofile_symtab): Update.
2225 (process_one_symbol): Update.
2226 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2227 offsets.
2228 (dw2_relocate): Remove.
2229 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2230 searching addrmap.
2231 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2232 Update.
2233 (process_psymtab_comp_unit_reader, add_partial_symbol)
2234 (add_partial_subprogram, dwarf2_ranges_read): Update.
2235 (load_partial_dies): Update.
2236 (add_address_entry): Don't add objfile offsets.
2237 (dwarf2_build_include_psymtabs): Update.
2238 (create_addrmap_from_aranges): Don't add objfile offsets.
2239 (dw2_find_pc_sect_compunit_symtab): Update.
2240 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2241 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2242 Update.
2243 (parse_partial_symbols): Don't add objfile offsets. Use
2244 raw_text_low, raw_text_high. Update.
2245 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2246 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2247 or call 'relocate' quick function. Clear psymbol_map.
2248 * psympriv.h (struct partial_symbol) <address>: Add section
2249 offset.
2250 <set_unrelocated_address>: Rename from set_address.
2251 <raw_text_low, raw_text_high>: New methods.
2252 <text_low, text_high>: Add objfile parameter.
2253 (add_psymbol_to_bcache): Add 'section' parameter. Call
2254 set_unrelocated_address.
2255 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2256 (find_pc_psymbol): Update.
2257 (fixup_psymbol_section, relocate_psymtabs): Remove.
2258 (dump_psymtab, psym_functions): Update.
2259 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2260 parameter.
2261 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2262 (start_psymtab_common): Update.
2263 * symfile-debug.c (debug_qf_relocate): Remove.
2264 (debug_sym_quick_functions): Update.
2265 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2266 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2267 Update.
2268
2269 2018-07-26 Tom Tromey <tromey@redhat.com>
2270
2271 * dbxread.c (end_psymtab): Use text_high_valid and
2272 text_low_valid.
2273 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2274 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2275 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2276 Update comment.
2277 <text_low_valid, text_high_valid>: New fields.
2278 <set_text_low, set_text_high>: Update.
2279 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2280
2281 2018-07-26 Tom Tromey <tom@tromey.com>
2282
2283 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2284 Update.
2285 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2286 textlow and texthigh fields.
2287 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2288 Update.
2289 * mdebugread.c (parse_lines, parse_partial_symbols)
2290 (psymtab_to_symtab_1): Update.
2291 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2292 Rename fields. Update comment. Now private.
2293 <text_low, text_high, set_text_low, set_text_high>: New methods.
2294 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2295 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2296 (start_psymtab_common, maintenance_info_psymtabs)
2297 (maintenance_check_psymtabs): Update.
2298 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2299 texthigh fields.
2300 (scan_xcoff_symtab): Update.
2301
2302 2018-07-26 Tom Tromey <tromey@redhat.com>
2303
2304 * psympriv.h (struct partial_symbol) <unrelocated_address,
2305 address, set_address>: New methods.
2306 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2307 (fixup_psymbol_section, relocate_psymtabs): Update.
2308 (print_partial_symbols): Add 'objfile' parameter. Update.
2309 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2310 Update.
2311
2312 2018-07-26 Tom Tromey <tom@tromey.com>
2313
2314 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2315 (debug_names::write_psymbols): Update.
2316 * psympriv.h (struct partial_symbol): Derive from
2317 general_symbol_info.
2318 <obj_section>: New method.
2319 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2320 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2321 (find_pc_sect_psymbol, fixup_psymbol_section)
2322 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2323 (print_partial_symbols, recursively_search_psymtabs)
2324 (compare_psymbols, psymbol_hash, psymbol_compare)
2325 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2326 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2327
2328 2018-07-26 Tom Tromey <tromey@redhat.com>
2329
2330 * dbxread.c (end_psymtab): Remove dead code.
2331
2332 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2333
2334 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2335 DWARF unwinders are disabled.
2336 * dwarf2-frame.c: Add dwarf2read.h include.
2337 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2338 disabled.
2339 (dwarf2_frame_unwinders_enabled_p): Define.
2340 (show_dwarf_unwinders_enabled_p): New function.
2341 (_initialize_dwarf2_frame): Register switch to control DWARF
2342 unwinder use.
2343 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2344 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2345 (show_dwarf_cmdlist): Remove static keyword.
2346 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2347 (show_dwarf_cmdlist): Declare.
2348 * NEWS: Document new feature.
2349
2350 2018-07-26 Tom de Vries <tdevries@suse.de>
2351
2352 PR breakpoints/23366
2353 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2354
2355 2018-07-26 Tom de Vries <tdevries@suse.de>
2356
2357 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2358 DW_AT_count can't be translated to a dynamic prop.
2359
2360 2018-07-25 Tom de Vries <tdevries@suse.de>
2361
2362 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2363 try/catch.
2364
2365 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2366
2367 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2368
2369 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2370
2371 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2372
2373 2018-07-24 Keith Seitz <keiths@redhat.comt
2374
2375 PR symtab/23010
2376 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2377 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2378 instead of add_symbol_to_list.
2379 (read_file_scope): Call prepare_one_comp_unit before reading
2380 any other DIEs.
2381
2382 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2385
2386 2018-07-24 Tom Tromey <tom@tromey.com>
2387
2388 * utils.c (malloc, realloc, free): Don't declare.
2389 * configure, config.in: Rebuild.
2390 * configure.ac: Don't check for declarations of free, malloc, or
2391 realloc.
2392
2393 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2394
2395 * aarch64-linux-nat.c
2396 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2397 variable.
2398 * arm-linux-nat.c (fetch_regs): Likewise.
2399 (store_regs): Likewise.
2400 (fetch_vfp_regs): Likewise.
2401 (store_vfp_regs): Likewise.
2402 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2403 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2404 (arm_linux_nat_target::insert_watchpoint): Likewise.
2405 (arm_linux_nat_target::remove_watchpoint): Likewise.
2406 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2407 Likewise.
2408 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2409 Likewise.
2410 * ppc-linux-nat.c (fetch_register): Likewise.
2411 (fetch_all_gp_regs): Likewise.
2412 (fetch_ppc_registers): Likewise.
2413 (store_all_gp_regs): Likewise.
2414 (store_ppc_registers): Likewise.
2415 (hwdebug_insert_point): Likewise.
2416 (can_use_watchpoint_cond_accel): Likewise.
2417 * remote-sim.c (gdb_os_write_stdout): Likewise.
2418
2419 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2420 Tom Tromey <tom@tromey.com>
2421
2422 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2423 test for it.
2424 * configure: Rebuild.
2425
2426 2018-07-22 Tom Tromey <tom@tromey.com>
2427
2428 * regformats/regdat.sh: Define xmltarget_${name} inside
2429 #ifndef IN_PROCESS_AGENT.
2430
2431 2018-07-22 Tom Tromey <tom@tromey.com>
2432
2433 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2434
2435 2018-07-22 Tom Tromey <tom@tromey.com>
2436
2437 * symfile.c (reread_symbols): Notify iter, not objfile.
2438
2439 2018-07-22 Tom Tromey <tom@tromey.com>
2440
2441 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2442 Use arch_ops.
2443 (ravenscar_thread_target::prepare_to_store): Likewise.
2444
2445 2018-07-22 Tom Tromey <tom@tromey.com>
2446
2447 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2448 unused variable. Call value_fetch_lazy when needed.
2449 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2450 Remove unused variable. Call value_fetch_lazy when needed.
2451
2452 2018-07-22 Tom Tromey <tom@tromey.com>
2453
2454 * m32c-tdep.c (mark_dma): Return void.
2455 (make_regs): Remove unused declarations.
2456
2457 2018-07-22 Tom Tromey <tom@tromey.com>
2458
2459 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2460 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2461 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2462 bkscm_get_valid_block_smob_arg_unsafe for effect.
2463
2464 2018-07-22 Tom Tromey <tom@tromey.com>
2465
2466 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2467 value_type.
2468
2469 2018-07-22 Tom Tromey <tom@tromey.com>
2470
2471 * windows-nat.c (saved_context): Conditionally define.
2472 * remote.c (remote_target::remote_btrace_maybe_reopen):
2473 Conditionally declare "warned".
2474 * inflow.c (sigquit_ours): Conditionally define.
2475 (new_tty): Move "tty" declaration inside #if.
2476 * guile/guile.c (guile_datadir): Conditionally define.
2477 * charset.c (set_be_le_names): Move some declarations inside #if.
2478 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2479 #if.
2480 (parse_xml_btrace_conf): Likewise.
2481
2482 2018-07-22 Tom Tromey <tom@tromey.com>
2483
2484 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2485
2486 2018-07-22 Tom Tromey <tom@tromey.com>
2487
2488 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2489 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2490 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2491 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2492 * stack.c (frame_apply_level_command): Remove unused variable.
2493 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2494 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2495 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2496 unused variable.
2497 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2498 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2499 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2500 variable.
2501 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2502 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2503 variable.
2504 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2505 Remove unused variable.
2506 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2507 variable.
2508 * common/tdesc.c (print_xml_feature::visit): Remove unused
2509 variable.
2510 * compile/compile-object-load.c (store_regs): Remove unused
2511 variables.
2512 * complaints.c (clear_complaints): Remove unused variable.
2513 * corelow.c (core_target_open): Remove unused variable.
2514 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2515 variable.
2516 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2517 variable.
2518 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2519 variable.
2520 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2521 variable.
2522 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2523 variable.
2524 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2525 variable.
2526 * ia64-tdep.c (examine_prologue): Remove unused variable.
2527 * infcall.c (run_inferior_call): Remove unused variable.
2528 * inferior.c (exit_inferior): Remove unused variable.
2529 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2530 * linespec.c (decode_line_2): Remove unused variable.
2531 * linux-nat.c (super_close): Remove.
2532 * linux-tdep.c (linux_info_proc): Remove unused variable.
2533 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2534 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2535 Remove unused variable.
2536 * parse.c (find_minsym_type_and_address): Remove unused variable.
2537 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2538 variable.
2539 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2540 variable.
2541 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2542 variables.
2543 * record-btrace.c (record_btrace_target::store_registers): Remove
2544 unused variable.
2545 (cmd_show_record_btrace_cpu): Remove unused variable.
2546 * riscv-tdep.c (riscv_register_reggroup_p)
2547 (riscv_push_dummy_call, riscv_return_value): Remove unused
2548 variable.
2549 * rust-exp.y (literal): Remove unused variable.
2550 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2551 unused variable.
2552 <STRUCTOP_ANONYMOUS>: Likewise.
2553 * s390-linux-tdep.c (s390_linux_init_abi_31)
2554 (s390_linux_init_abi_64): Remove unused variable.
2555 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2556 (file_select_thread, net_windows_open, _initialize_ser_windows):
2557 Remove unused variables.
2558 * symtab.c (find_pc_sect_line): Remove unused variable.
2559 * target-memory.c (compute_garbled_blocks): Remove unused
2560 variable.
2561 (target_write_memory_blocks): Remove unused variable.
2562 * target.c (target_stack::unpush): Remove unused variables.
2563 * tracepoint.c (start_tracing, all_tracepoint_actions)
2564 (merge_uploaded_trace_state_variables)
2565 (print_one_static_tracepoint_marker): Remove unused variable.
2566 * unittests/basic_string_view/element_access/char/1.cc (test01):
2567 Remove unused variable.
2568 * windows-nat.c (windows_continue, windows_add_all_dlls)
2569 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2570 Remove unused variables.
2571
2572 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2573
2574 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2575 attr_profile in HAVE_ELF.
2576 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2577 HAVE_ELF.
2578
2579 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2580
2581 * frame.c (frame_register_unwind): Change parameter name.
2582 (frame_unwind_register): Likewise.
2583 (frame_unwind_register_value): Likewise.
2584 (frame_unwind_register_signed): Likewise.
2585 (frame_unwind_register_unsigned): Likewise.
2586 * frame.h (frame_register_unwind): Likewise.
2587 (frame_unwind_register): Likewise.
2588 (frame_unwind_register_value): Likewise.
2589 (frame_unwind_register_signed): Likewise.
2590 (frame_unwind_register_unsigned): Likewise.
2591 (frame_unwind_arch): Likewise.
2592
2593 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2594
2595 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2596 ISA maintenance.
2597
2598 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2599
2600 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2601 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2602 hand.
2603
2604 2018-07-20 Keith Seitz <keiths@redhat.com>
2605
2606 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2607 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2608 m_compunit_symtab, m_language>: Add "m_" prefix.
2609 Update all uses.
2610 * buildsym.c: Update all uses.
2611
2612 2018-07-20 Tom Tromey <tom@tromey.com>
2613
2614 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2615 * buildsym.h (record_line_ftype): Remove typedef.
2616
2617 2018-07-20 Tom Tromey <tom@tromey.com>
2618
2619 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2620 (end_expandable_symtab): Likewise.
2621 (end_symtab_get_static_block): Likewise.
2622 (end_symtab_from_static_block): Likewise.
2623 * buildsym-legacy.c (augment_type_symtab): Remove.
2624 (end_expandable_symtab): Remove.
2625 (end_symtab_get_static_block): Remove.
2626 (end_symtab_from_static_block): Remove.
2627
2628 2018-07-20 Tom Tromey <tom@tromey.com>
2629
2630 * dwarf2read.c: Include buildsym.h.
2631 (struct dwarf2_cu) <builder>: New method.
2632 (fixup_go_packaging): Update.
2633 (process_full_comp_unit, process_full_type_unit): Update. Don't
2634 use scoped_free_pendings.
2635 (using_directives): Add "cu" parameter, remove "language".
2636 (read_import_statement, setup_type_unit_groups, )
2637 (read_func_scope, read_lexical_block_scope)
2638 (dwarf2_record_block_ranges, read_namespace): Update.
2639 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2640 (lnp_state_machine::handle_end_sequence): Update.
2641 (class lnp_state_machine) <m_cu>: New member.
2642 <m_record_line_callback>: Remove.
2643 <m_currently_recording_lines>: New member.
2644 (lnp_state_machine::handle_set_file): Update.
2645 (noop_record_line): Remove.
2646 (dwarf_record_line_p): Add cu parameter.
2647 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2648 (lnp_state_machine::record_line)
2649 (lnp_state_machine::lnp_state_machine)
2650 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2651 (dwarf_decode_lines): Update.
2652 (dwarf2_start_subfile): Add cu parameter.
2653 (dwarf2_start_symtab, new_symbol): Update.
2654 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2655 Remove dwarf2_per_objfile parameter.
2656 (dwarf_decode_macros): Update.
2657
2658 2018-07-20 Tom Tromey <tom@tromey.com>
2659
2660 * stabsread.c (define_symbol): Update.
2661 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2662 * dwarf2read.c (new_symbol): Update.
2663 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2664 * cp-namespace.c: Include buildsym.h.
2665 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2666 * buildsym-legacy.c (get_buildsym_compunit): New function.
2667
2668 2018-07-20 Tom Tromey <tom@tromey.com>
2669
2670 * xcoffread.c: Include buildsym-legacy.h.
2671 * windows-nat.c: Include buildsym-legacy.h.
2672 * stabsread.c: Include buildsym-legacy.h.
2673 * mdebugread.c: Include buildsym-legacy.h.
2674 * buildsym-legacy.h: New file.
2675 * buildsym-legacy.c: New file, from buildsym.c.
2676 * go32-nat.c: Include buildsym-legacy.h.
2677 * dwarf2read.c: Include buildsym-legacy.h.
2678 * dbxread.c: Include buildsym-legacy.h.
2679 * cp-namespace.c: Include buildsym-legacy.h.
2680 * coffread.c: Include buildsym-legacy.h.
2681 * buildsym.h: Move some contents to buildsym-legacy.h.
2682 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2683 buildsym-legacy.c.
2684 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2685
2686 2018-07-20 Tom Tromey <tom@tromey.com>
2687
2688 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2689 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2690 (buildsym_compunit::buildsym_compunit)
2691 (buildsym_compunit::~buildsym_compunit)
2692 (buildsym_compunit::get_macro_table): Define.
2693
2694 2018-07-20 Tom Tromey <tom@tromey.com>
2695
2696 * buildsym.c (reset_symtab_globals): Remove.
2697 (buildsym_compunit::end_symtab_from_static_block): Update.
2698 (buildsym_compunit::augment_type_symtab): Update.
2699 (end_symtab_from_static_block): Call free_buildsym_compunit.
2700 (augment_type_symtab, end_symtab, end_expandable_symtab):
2701 Likewise.
2702
2703 2018-07-20 Tom Tromey <tom@tromey.com>
2704
2705 * arch-utils.c: Do not include buildsym.h.
2706 * mipsread.c: Do not include buildsym.h.
2707 * machoread.c: Do not include buildsym.h.
2708 * elfread.c: Do not include buildsym.h.
2709
2710 2018-07-20 Tom Tromey <tom@tromey.com>
2711
2712 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2713 initialization.
2714 (buildsym_compunit): Add new constructor.
2715 (struct buildsym_compunit) <get_last_source_file, finish_block,
2716 record_block_range, start_subfile, patch_subfile_names,
2717 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2718 set_last_source_start_addr, get_last_source_start_addr,
2719 get_local_using_directives, set_local_using_directives,
2720 get_global_using_directives, outermost_context_p,
2721 get_current_context_stack, get_context_stack_depth,
2722 get_current_subfile, get_local_symbols, get_file_symbols,
2723 get_global_symbols, record_debugformat, record_producer,
2724 push_context, pop_context, end_symtab_get_static_block,
2725 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2726 New public methods.
2727 <record_pending_block, finish_block_internal, make_blockvector,
2728 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2729 private methods.
2730 Update all users.
2731
2732 2018-05-22 Tom Tromey <tom@tromey.com>
2733
2734 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2735 parameter.
2736 (finish_block_internal): Update.
2737
2738 2018-07-20 Tom Tromey <tom@tromey.com>
2739
2740 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2741 parameter.
2742 (finish_block_internal): Update.
2743
2744 2018-07-20 Tom Tromey <tom@tromey.com>
2745
2746 * buildsym.h (EXTERN): Don't define or undef.
2747 * buildsym.c (EXTERN): Don't define.
2748
2749 2018-07-20 Tom Tromey <tom@tromey.com>
2750
2751 * buildsym.c: Remove TODO comment.
2752
2753 2018-07-20 Tom Tromey <tom@tromey.com>
2754
2755 * coffread.c (coff_symtab_read): Update.
2756 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2757 (xcoff_new_init): Update.
2758 * mipsread.c (mipscoff_new_init): Update.
2759 * mdebugread.c (mdebug_build_psymtabs): Update.
2760 * elfread.c (elf_new_init): Update.
2761 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2762 Update.
2763 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2764 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2765 (stabsect_build_psymtabs): Update.
2766 * buildsym.h (buildsym_init): Don't declare.
2767 * buildsym.c: Update comment.
2768 (prepare_for_building): Remove.
2769 (start_symtab, restart_symtab): Update.
2770 (reset_symtab_globals): Update comment.
2771 (buildsym_init): Remove.
2772
2773 2018-07-20 Tom Tromey <tom@tromey.com>
2774
2775 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2776 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2777 (read_enum_type, common_block_start, common_block_end)
2778 (cleanup_undefined_types_1, finish_global_stabs): Update.
2779 * mdebugread.c (psymtab_to_symtab_1): Update.
2780 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2781 (read_lexical_block_scope, new_symbol): Update.
2782 * dbxread.c (process_one_symbol): Update.
2783 * coffread.c (coff_symtab_read, process_coff_symbol)
2784 (coff_read_enum_type): Update.
2785 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2786 declare.
2787 (get_local_symbols, get_file_symbols, get_global_symbols): New
2788 functions.
2789 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2790 m_global_symbols.
2791 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2792 (~scoped_free_pendings): Update.
2793 (finish_block, prepare_for_building, reset_symtab_globals)
2794 (end_symtab_get_static_block, end_symtab_with_blockvector)
2795 (augment_type_symtab, push_context): Update.
2796 (get_local_symbols, get_file_symbols, get_global_symbols): New
2797 functions.
2798 (buildsym_init): Update.
2799
2800 2018-07-20 Tom Tromey <tom@tromey.com>
2801
2802 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2803 (process_full_type_unit): Likewise.
2804 (dwarf2_start_symtab): Set list_in_scope.
2805
2806 2018-07-20 Tom Tromey <tom@tromey.com>
2807
2808 * dwarf2read.c (process_psymtab_comp_unit_reader)
2809 (build_type_psymtabs_reader): Do not set list_in_scope.
2810
2811 2018-07-20 Tom Tromey <tom@tromey.com>
2812
2813 * buildsym.c (free_pendings): Remove.
2814 (add_symbol_to_list, scoped_free_pendings)
2815 (finish_block_internal, buildsym_init): Update.
2816
2817 2018-07-20 Tom Tromey <tom@tromey.com>
2818
2819 * xcoffread.c (read_xcoff_symtab): Update.
2820 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2821 Update.
2822 * dbxread.c (process_one_symbol): Update.
2823 * coffread.c (coff_symtab_read): Update.
2824 * buildsym.h (finish_block): Update.
2825 * buildsym.c (finish_block): Remove "listhead" argument.
2826 (end_symtab_get_static_block): Update.
2827
2828 2018-07-20 Tom Tromey <tom@tromey.com>
2829
2830 * buildsym.h (class scoped_free_pendings): Remove constructor.
2831 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2832 method.
2833 <m_pending_block_obstack, m_pending_blocks>: New members.
2834 (pending_block_obstack, pending_blocks): Remove.
2835 (scoped_free_pendings::scoped_free_pendings): Default.
2836 (~scoped_free_pendings): Update.
2837 (free_pending_blocks): Remove.
2838 (finish_block_internal, record_pending_block, make_blockvector)
2839 (end_symtab_get_static_block, augment_type_symtab, push_context)
2840 (buildsym_init): Update.
2841
2842 2018-07-20 Tom Tromey <tom@tromey.com>
2843
2844 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2845 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2846 members.
2847 (pending_addrmap, pending_addrmap_obstack)
2848 (pending_addrmap_interesting): Remove.
2849 (scoped_free_pendings, record_block_range, make_blockvector)
2850 (prepare_for_building, reset_symtab_globals, buildsym_init):
2851 Update.
2852
2853 2018-07-20 Tom Tromey <tom@tromey.com>
2854
2855 * xcoffread.c (process_linenos): Update.
2856 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2857 * mdebugread.c (psymtab_to_symtab_1): Update.
2858 * dwarf2read.c (setup_type_unit_groups)
2859 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2860 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2861 * dbxread.c (process_one_symbol): Update.
2862 * coffread.c (coff_symtab_read, enter_linenos)
2863 (process_coff_symbol): Update.
2864 * buildsym.h (current_subfile): Don't declare.
2865 (get_current_subfile): Declare.
2866 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2867 member.
2868 (start_subfile, free_buildsym_compunit, push_subfile)
2869 (prepare_for_building, start_symtab): Update.
2870 (get_current_subfile): New function.
2871
2872 2018-07-20 Tom Tromey <tom@tromey.com>
2873
2874 * coffread.c (coff_symtab_read): Update.
2875 * xcoffread.c (read_xcoff_symtab): Update.
2876 * dwarf2read.c (new_symbol): Update.
2877 (read_func_scope, read_lexical_block_scope): Update.
2878 * dbxread.c (process_one_symbol): Update.
2879 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2880 (outermost_context_p): Remove macro.
2881 (outermost_context_p, get_current_context_stack)
2882 (get_context_stack_depth): Declare.
2883 (pop_context): Return struct context_stack.
2884 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2885 member.
2886 (context_stack_size): Remove.
2887 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2888 (prepare_for_building, end_symtab_get_static_block)
2889 (augment_type_symtab, push_context): Update.
2890 (pop_context): Return struct context_stack.
2891 (outermost_context_p, get_current_context_stack)
2892 (get_context_stack_depth): New functions.
2893 (buildsym_init): Update.
2894
2895 2018-07-20 Tom Tromey <tom@tromey.com>
2896
2897 * rust-exp.y: Now a pure parser. Update all rules.
2898 (%union): Move earlier.
2899 (current_parser, work_obstack): Remove globals.
2900 (rust_parser, ~rust_parser): Update.
2901 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2902 lex_character, lex_number, lex_string, lex_identifier,
2903 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2904 convert_name, convert_params_to_expression,
2905 convert_ast_to_expression, ast_basic_type, ast_operation,
2906 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2907 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2908 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2909 ast_array_type, ast_slice_type, ast_reference_type,
2910 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2911 (rust_parse): Update.
2912 (rustyyerror, rustyylex): Add parser parameter.
2913 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2914 (rust_lex_stringish_test, rust_lex_test_sequence)
2915 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2916 (rust_lex_test_push_back, rust_lex_tests): Update.
2917
2918 2018-07-19 Pedro Alves <palves@redhat.com>
2919
2920 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2921 gdb::unique_xmalloc_ptr.
2922 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2923 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2924 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2925 copy-initialization.
2926 * guile/scm-pretty-print.c (ppscm_print_children): Use
2927 gdb::unique_xmalloc_ptr instead of cleanups.
2928 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2929 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2930 gdb::unique_xmalloc_ptr.
2931 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2932 Adjust to use gdb::unique_xmalloc_ptr.
2933 * guile/scm-utils.c (extract_arg): Adjust.
2934 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2935 gdb::unique_xmalloc_ptr instead of a cleanup.
2936
2937 2018-07-19 Tom Tromey <tom@tromey.com>
2938
2939 * utils.c (do_value_free_to_mark)
2940 (make_cleanup_value_free_to_mark): Remove.
2941 * utils.h (make_cleanup_value_free_to_mark): Remove.
2942
2943 2018-07-19 Pedro Alves <palves@redhat.com>
2944
2945 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2946 forwarding reference.
2947
2948 2018-07-18 Pedro Alves <palves@redhat.com>
2949
2950 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2951 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2952 cleanup.
2953
2954 2018-07-18 Pedro Alves <palves@redhat.com>
2955
2956 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2957 exceptions.
2958 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2959 (gdbscm_wrap): New.
2960 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2961 directly instead of a cleanup.
2962 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2963 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2964 (vlscm_binop_gdbthrow): New, factored out from ...
2965 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2966 (vlscm_rich_compare): Use gdbscm_wrap.
2967 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2968 instead of a cleanup.
2969 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2970 cleanup.
2971 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2972 Use xfree directly instead of a cleanup.
2973 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2974 Adjust to use gdbscm_wrap and scoped_value_mark.
2975 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2976 (gdbscm_value_address, gdbscm_value_dereference)
2977 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2978 scoped_value_mark.
2979 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2980 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2981 scoped_value_mark.
2982 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2983 gdbscm_wrap and scoped_value_mark.
2984 (gdbscm_value_to_string): Use xfree directly instead of a
2985 cleanup. Move 'buffer' unique_ptr to TRY scope.
2986 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2987 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2988 scoped_value_mark.
2989 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2990 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2991 scoped_value_mark.
2992 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2993 gdbscm_wrap.
2994
2995 2018-07-18 Tom de Vries <tdevries@suse.de>
2996
2997 * findvar.c (default_read_var_value): Also resolve dynamic type for
2998 LOC_OPTIMIZED_OUT vars.
2999
3000 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3001
3002 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3003 decoding.
3004
3005 2018-07-17 Tom Tromey <tom@tromey.com>
3006
3007 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3008 (compute_enum_list, pascm_set_param_value_x)
3009 (gdbscm_parameter_value): Update.
3010 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3011 (gdbscm_scm_to_host_string): Update.
3012 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3013 Update.
3014 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3015 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3016 * guile/scm-string.c (gdbscm_scm_to_string): Return
3017 unique_xmalloc_ptr.
3018 (gdbscm_scm_to_host_string): Likewise.
3019
3020 2018-07-17 Tom Tromey <tom@tromey.com>
3021
3022 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3023 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3024 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3025 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3026 unique_xmalloc_ptr.
3027
3028 2018-07-17 Tom Tromey <tom@tromey.com>
3029
3030 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3031 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3032 Update.
3033 * guile/scm-cmd.c (cmdscm_function): Update.
3034 * guile/scm-pretty-print.c
3035 (ppscm_print_exception_unless_memory_error): Update.
3036 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3037 Return unique_xmalloc_ptr.
3038
3039 2018-07-17 Tom Tromey <tom@tromey.com>
3040
3041 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3042 Use string_printf.
3043
3044 2018-07-17 Jim Wilson <jimw@sifive.com>
3045
3046 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3047 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3048 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3049 unecessary braces after EF_RISCV_RVC test. Delete call to
3050 set_gdbarch_decr_pc_after_break.
3051
3052 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3053 RISCV_LAST_FP_REGNUM + 1.
3054 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3055
3056 2018-07-17 Tom Tromey <tom@tromey.com>
3057
3058 * configure.ac: Remove --disable-gdbcli.
3059 * configure: Rebuild.
3060 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3061 (SUBDIR_CLI_CFLAGS): Remove.
3062 (SFILES): Use SUBDIR_CLI_SRCS.
3063 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3064
3065 2018-07-17 Tom Tromey <tom@tromey.com>
3066
3067 PR gdb/18624:
3068 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3069
3070 2018-07-16 Jim Wilson <jimw@sifive.com>
3071
3072 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3073
3074 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3075
3076 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3077 variable.
3078 (libunwind_frame_sniffer): Likewise.
3079 (libunwind_frame_prev_register): Likewise.
3080 (libunwind_sigtramp_frame_sniffer): Likewise.
3081 * ia64-tdep.c (ia64_access_reg): Likewise.
3082 (ia64_access_rse_reg): Likewise.
3083 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3084 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3085
3086 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3087
3088 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3089
3090 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3091
3092 * remote-sim.c (gdbsim_target::close,
3093 gdbsim_target::mourn_inferior): Remove unused variables.
3094
3095 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3096
3097 * ia64-tdep.c (ktab_buf): New global.
3098 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3099 (get_kernel_table): Adjust.
3100
3101 2018-07-16 Tom Tromey <tom@tromey.com>
3102
3103 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3104 * dwarf2read.c (using_directives, new_symbol): Use
3105 outermost_context_p.
3106 * dbxread.c (process_one_symbol): Use outermost_context_p.
3107 * coffread.c (coff_symtab_read): Use outermost_context_p.
3108
3109 2018-07-16 Tom Tromey <tom@tromey.com>
3110
3111 * dwarf2read.c (using_directives, read_func_scope)
3112 (read_lexical_block_scope): Update.
3113 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3114 * buildsym.h (local_using_directives, global_using_directives):
3115 Don't declare.
3116 (get_local_using_directives, set_local_using_directives)
3117 (get_global_using_directives): Declare.
3118 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3119 m_global_using_directives>: New members.
3120 (finish_block_internal, prepare_for_building)
3121 (reset_symtab_globals, end_symtab_get_static_block)
3122 (push_context): Update.
3123 (get_local_using_directives, set_local_using_directives)
3124 (get_global_using_directives): New functions.
3125 (buildsym_init): Update.
3126
3127 2018-07-16 Tom Tromey <tom@tromey.com>
3128
3129 * xcoffread.c (xcoff_initial_scan): Don't call
3130 free_pending_blocks.
3131 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3132 * buildsym.h (class scoped_free_pendings): Add constructor.
3133 (free_pending_blocks): Don't declare.
3134 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3135 (free_pending_blocks): Now static.
3136
3137 2018-07-16 Tom Tromey <tom@tromey.com>
3138
3139 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3140 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3141 member.
3142 (struct subfile_stack): Remove.
3143 (subfile_stack): Remove.
3144 (push_subfile, pop_subfile, buildsym_init): Update.
3145
3146 2018-07-16 Tom Tromey <tom@tromey.com>
3147
3148 * buildsym.c (push_subfile): Use gdb_assert.
3149 (pop_subfile): Use gdb_assert.
3150
3151 2018-07-16 Tom Tromey <tom@tromey.com>
3152
3153 * buildsym.h (merge_symbol_lists): Remove.
3154 * buildsym.c (merge_symbol_lists): Remove.
3155
3156 2018-07-16 Tom Tromey <tom@tromey.com>
3157
3158 * stabsread.c (scan_file_globals): Update comment.
3159 * stabsread.h (scan_file_globals): Move from buildsym.h.
3160 * buildsym.h (scan_file_globals): Move to stabsread.h.
3161
3162 2018-07-16 Tom Tromey <tom@tromey.com>
3163
3164 * xcoffread.c (xcoff_new_init): Update.
3165 * mipsread.c (mipscoff_new_init): Update.
3166 * mdebugread.c (mdebug_build_psymtabs): Update.
3167 * elfread.c (elf_new_init): Update.
3168 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3169 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3170 * buildsym.h (buildsym_new_init): Don't declare.
3171 * buildsym.c (buildsym_new_init): Remove.
3172
3173 2018-07-16 Tom Tromey <tom@tromey.com>
3174
3175 * stabsread.h (within_function): Move from buildsym.h.
3176 * stabsread.c (start_stabs): Clear within_function.
3177 * coffread.c (coff_start_symtab): Clear within_function.
3178 * buildsym.h (within_function): Move to stabsread.h.
3179 * buildsym.c (prepare_for_building): Update.
3180
3181 2018-07-16 Tom Tromey <tom@tromey.com>
3182
3183 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3184 * dwarf2read.c (dwarf2_start_symtab): Don't set
3185 processing_gcc_compilation.
3186 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3187
3188 2018-07-16 Tom Tromey <tom@tromey.com>
3189
3190 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3191 (next_symbol_text_func): Move from buildsym.h.
3192 * stabsread.c (hashname): Move from buildsym.c.
3193 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3194 (next_symbol_text_func, hashname): Move to stabsread.h.
3195 * buildsym.c: Don't include bcache.h
3196 (hashname): Move to stasbread.c.
3197
3198 2018-07-16 Tom Tromey <tom@tromey.com>
3199
3200 * buildsym.h (context_stack_size): Don't declare.
3201 * buildsym.c (context_stack_size): New global.
3202
3203 2018-07-16 Tom Tromey <tom@tromey.com>
3204
3205 * dbxread.c (processing_acc_compilation): New global.
3206 * buildsym.h (processing_acc_compilation): Don't declare.
3207
3208 2018-07-16 Tom Tromey <tom@tromey.com>
3209
3210 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3211 * dbxread.c (read_ofile_symtab): Update.
3212 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3213 * buildsym.h (last_source_start_addr): Remove.
3214 (set_last_source_start_addr, get_last_source_start_addr):
3215 Declare.
3216 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3217 parameter.
3218 (struct buildsym_compunit) <m_last_source_start_addr>: New
3219 member.
3220 (prepare_for_building): Remove start_addr parameter.
3221 (start_symtab, restart_symtab, end_symtab_get_static_block)
3222 (end_symtab_with_blockvector): Update.
3223 (set_last_source_start_addr, get_last_source_start_addr): New
3224 functions.
3225
3226 2018-07-16 Tom Tromey <tom@tromey.com>
3227
3228 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3229 member.
3230 (have_line_numbers): Remove.
3231 (record_line, prepare_for_building, end_symtab_get_static_block)
3232 (augment_type_symtab): Update.
3233
3234 2018-07-16 Tom Tromey <tom@tromey.com>
3235
3236 * buildsym.c (~buildsym_compunit): Free the macro table.
3237 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3238 methods.
3239 <m_pending_macros>: New member.
3240 (pending_macros): Remove.
3241 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3242 (reset_symtab_globals, end_symtab_get_static_block)
3243 (end_symtab_with_blockvector, augment_type_symtab)
3244 (buildsym_init): Update.
3245
3246 2018-07-16 Tom Tromey <tom@tromey.com>
3247
3248 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3249 parameter.
3250 (buildsym_compunit::set_last_source_file): New method.
3251 <m_last_source_file>: New member.
3252 (prepare_for_building): Remove "name" parameter.
3253 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3254 (last_source_file): Remove.
3255 (set_last_source_file, get_last_source_file): Update.
3256
3257 2018-07-16 Tom Tromey <tom@tromey.com>
3258
3259 * buildsym.c (prepare_for_building): Add assert.
3260
3261 2018-07-16 Tom Tromey <tom@tromey.com>
3262
3263 * buildsym.c (~buildsym_compunit): Update.
3264 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3265 (start_subfile, patch_subfile_names)
3266 (end_symtab_with_blockvector): Update.
3267
3268 2018-07-16 Tom Tromey <tom@tromey.com>
3269
3270 * buildsym.c (struct buildsym_compunit): Add constructor,
3271 destructor, initializers.
3272 (start_buildsym_compunit): Remove.
3273 (free_buildsym_compunit): Use "delete".
3274 (start_symtab, restart_symtab): Use "new".
3275
3276 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3277
3278 * symfile.c (set_objfile_default_section_offset): Remove struct
3279 keyword.
3280
3281 2018-07-14 Stafford Horne <shorne@gmail.com>
3282
3283 * (Responsible Maintainers): Add myself as or1k maintainer.
3284
3285 2018-07-13 Tom Tromey <tom@tromey.com>
3286
3287 * symfile.c (set_objfile_default_section_offset): Use extra braces
3288 around initializer.
3289
3290 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3291
3292 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3293 non-branching basr.
3294
3295 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3296
3297 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3298 unittests/cli-utils-selftests.c
3299 * unittests/cli-utils-selftests.c: New file.
3300
3301 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3302
3303 * NEWS: Mention new commands. Mention change to 'thread apply'.
3304
3305 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3306
3307 * thread.c (thr_try_catch_cmd): New function.
3308 (thread_apply_all_command): Handle qcs flags.
3309 (thread_apply_command): Handle qcs flags.
3310 (taas_command): New function.
3311 (tfaas_command): New function.
3312 (_initialize_thread): Update to setup the new commands 'taas
3313 and 'tfaas'. Change doc string for 'thread apply'.
3314
3315 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3316
3317 * stack.c: (trailing_outermost_frame): New function, mostly
3318 extracted from backtrace_command_1.
3319 (leading_innermost_frame): New function.
3320 (backtrace_command_1): Update to call trailing_outermost_frame.
3321 (frame_apply_command_count): New function.
3322 (frame_apply_level_command): New function.
3323 (frame_apply_all_command): New function.
3324 (frame_apply_command): New function.
3325 (faas_command): New function.
3326 (frame_cmd_list): New variable.
3327 (_initialize_stack): Update to setup the new commands 'frame apply'
3328 and 'faas'.
3329
3330 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3331
3332 * cli-utils.c (number_or_range_parser::get_number): Only handle
3333 numbers or convenience var as numbers.
3334 (parse_flags): New function.
3335 (parse_flags_qcs): New function.
3336 (number_or_range_parser::finished): Ensure parsing end is detected
3337 before end of string.
3338 * cli-utils.h (parse_flags): New function.
3339 (parse_flags_qcs): New function.
3340 (number_or_range_parser): Remove m_finished bool.
3341 (number_or_range_parser::skip_range): Set m_in_range to false.
3342
3343 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3344
3345 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3346 on Windows.
3347
3348 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3349 Jan Kratochvil <jan.kratochvil@redhat.com>
3350 Paul Fertser <fercerpav@gmail.com>
3351 Tsutomu Seki <sekiriki@gmail.com>
3352 Pedro Alves <palves@redhat.com>
3353
3354 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3355 'unittests/parse-connection-spec-selftests.c'.
3356 (COMMON_SFILES): Add 'common/netstuff.c'.
3357 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3358 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3359 * common/netstuff.c: New file.
3360 * common/netstuff.h: New file.
3361 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3362 (wait_for_connect): Update comment. New parameter
3363 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3364 Use 'sock' directly instead of 'scb->fd'.
3365 (try_connect): New function, with code from 'net_open'.
3366 (net_open): Rewrite main loop to deal with multiple
3367 sockets/addresses. Handle IPv6-style hostnames; implement
3368 support for IPv6 connections.
3369 * unittests/parse-connection-spec-selftests.c: New file.
3370
3371 2018-07-11 Pedro Alves <palves@redhat.com>
3372
3373 PR gdb/23377
3374 * remote.c (remote_target::remote_detach_pid): Call
3375 set_current_process.
3376
3377 2018-07-11 Pedro Alves <palves@redhat.com>
3378
3379 * h8300-tdep.c (h8300_gdbarch_init): Remove
3380 set_gdbarch_ecoff_reg_to_regnum calls.
3381
3382 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3383
3384 PR c++/23373
3385 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3386 offsets/sizes for static members of a class/struct.
3387
3388 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3389
3390 * target-descriptions.c (tdesc_register_bitsize): Rename.
3391 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3392 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3393 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3394
3395 2018-07-10 Tom Tromey <tom@tromey.com>
3396
3397 * breakpoint.c (moribund_locations): Now static and a
3398 std::vector.
3399 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3400 (build_bpstat_chain, update_global_location_list)
3401 (breakpoint_retire_moribund): Update.
3402 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3403 VEC.
3404
3405 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3406
3407 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3408 (riscv_register_reggroup_p): Use new function, remove unneeded
3409 parenthesis.
3410 (riscv_push_dummy_call): Extend assert to compare against xlen or
3411 flen based on register type.
3412
3413 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3414
3415 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3416
3417 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3418
3419 * remote.c (show_hardware_watchpoint_limit): New function.
3420 (show_hardware_watchpoint_length_limit): New function.
3421 (show_hardware_breakpoint_limit): New function.
3422 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3423 where appropriate, update help text.
3424
3425 2018-07-09 Tom Tromey <tom@tromey.com>
3426
3427 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3428 (CLIBS): Don't mention NAT_CLIBS.
3429
3430 2018-07-09 Tom Tromey <tom@tromey.com>
3431
3432 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3433 (LIBGDB_OBS, clean mostlyclean): Update.
3434 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3435
3436 2018-07-09 Tom Tromey <tom@tromey.com>
3437
3438 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3439 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3440 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3441
3442 2018-07-09 Tom Tromey <tom@tromey.com>
3443
3444 * Makefile.in (ALLDEPFILES): Remove exec.c.
3445 (COMMON_OBS): Remove exec.o.
3446 (COMMON_SFILES): Add exec.c.
3447
3448 2018-07-09 Tom Tromey <tom@tromey.com>
3449
3450 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3451
3452 2018-07-09 Tom Tromey <tom@tromey.com>
3453
3454 * Makefile.in (clean mostlyclean): Remove stamp-version.
3455 (version.c): Depend on stamp-version.
3456 (stamp-version): New rule, from version.c rule.
3457
3458 2018-07-09 Tom Tromey <tom@tromey.com>
3459
3460 * Makefile.in (init.c): Depend on stamp-init.
3461 (stamp-init): New rule, from init.c rule.
3462 (clean mostlyclean): Remove stamp-init.
3463
3464 2018-07-09 Tom Tromey <tom@tromey.com>
3465
3466 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3467 SUBDIR_GCC_COMPILE_SRCS.
3468
3469 2018-07-09 Tom Tromey <tom@tromey.com>
3470
3471 * Makefile.in (init.c): Remove some unused sed rules.
3472
3473 2018-07-09 Tom Tromey <tom@tromey.com>
3474
3475 * Makefile.in (TSOBS): Remove.
3476 (INIT_FILES): Update.
3477 (LIBGDB_OBS): Update.
3478 (COMMON_SFILES): Add inflow.c.
3479 (SFILES): Remove inflow.c.
3480
3481 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3482
3483 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3484
3485 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3486
3487 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3488 get_saveloc_name, is_signal_frame_name, step_name,
3489 init_remote_name, create_addr_space_name,
3490 destroy_addr_space_name, search_unwind_table_name,
3491 find_dyn_list_name): Constify.
3492
3493 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3494
3495 * darwin-nat.c (darwin_pthread_kill): New function.
3496 (darwin_resume_thread): Use darwin_pthread_kill.
3497
3498 2018-07-05 Tom de Vries <tdevries@suse.de>
3499
3500 * macroexp.c (macro_buffer) <operator=>: New member function.
3501
3502 2018-07-04 Tom Tromey <tom@tromey.com>
3503
3504 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3505
3506 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3507
3508 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3509 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3510 * maint.c: Likewise.
3511 * top.c: Likewise.
3512
3513 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3514
3515 * NEWS: Create a new section for the next release branch.
3516 Rename the section of the current branch, now that it has
3517 been cut.
3518
3519 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3520
3521 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3522 * version.in: Bump version to 8.2.50.DATE-git.
3523
3524 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3525 Pedro Alves <palves@redhat.com>
3526
3527 * linux-nat.c (linux_init_ptrace): Rename to ...
3528 (linux_init_ptrace_procfs): ... this. Call
3529 linux_proc_init_warnings.
3530 (linux_nat_target::post_attach)
3531 (linux_nat_target::post_startup_inferior): Adjust.
3532 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3533 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3534
3535 2018-07-04 Tom de Vries <tdevries@suse.de>
3536
3537 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3538 check ...
3539 (read_comp_unit_head): ... here.
3540
3541 2018-07-03 Tom Tromey <tom@tromey.com>
3542
3543 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3544 (stop_tracing, tstatus_command)
3545 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3546 (print_one_static_tracepoint_marker): Update.
3547 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3548 std::vector.
3549 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3550 VEC.
3551 (all_tracepoints, static_tracepoints_here): Return std::vector.
3552
3553 2018-07-03 Tom Tromey <tom@tromey.com>
3554
3555 * common/ptid.c (ptid_equal): Remove.
3556 * common/ptid.h (ptid_equal): Don't declare.
3557 * ada-tasks.c: Update.
3558 * breakpoint.c: Update.
3559 * common/agent.c: Update.
3560 * corelow.c: Update.
3561 * darwin-nat-info.c: Update.
3562 * darwin-nat.c: Update.
3563 * dcache.c: Update.
3564 * dtrace-probe.c: Update.
3565 * dummy-frame.c: Update.
3566 * fbsd-nat.c: Update.
3567 * frame.c: Update.
3568 * gdbthread.h: Update.
3569 * gnu-nat.c: Update.
3570 * go32-nat.c: Update.
3571 * inf-loop.c: Update.
3572 * inf-ptrace.c: Update.
3573 * infcall.c: Update.
3574 * infcmd.c: Update.
3575 * inflow.c: Update.
3576 * infrun.c: Update.
3577 * linux-fork.c: Update.
3578 * linux-nat.c: Update.
3579 * linux-thread-db.c: Update.
3580 * mi/mi-cmd-var.c: Update.
3581 * mi/mi-interp.c: Update.
3582 * mi/mi-main.c: Update.
3583 * nto-procfs.c: Update.
3584 * ppc-linux-tdep.c: Update.
3585 * procfs.c: Update.
3586 * python/py-inferior.c: Update.
3587 * python/py-record-btrace.c: Update.
3588 * python/py-record.c: Update.
3589 * ravenscar-thread.c: Update.
3590 * regcache.c: Update.
3591 * remote-sim.c: Update.
3592 * remote.c: Update.
3593 * sol-thread.c: Update.
3594 * solib.c: Update.
3595 * target.c: Update.
3596 * tui/tui-stack.c: Update.
3597 * varobj.c: Update.
3598 * windows-nat.c: Update.
3599 * windows-tdep.c: Update.
3600
3601 2018-07-03 Tom Tromey <tom@tromey.com>
3602
3603 * common/ptid.c (ptid_match): Remove.
3604 * common/ptid.h (ptid_match): Don't declare.
3605 * fbsd-nat.c: Update.
3606 * infcmd.c: Update.
3607 * infrun.c: Update.
3608 * linux-nat.c: Update.
3609 * record-btrace.c: Update.
3610 * regcache.c: Update.
3611 * remote.c: Update.
3612
3613 2018-07-03 Tom Tromey <tom@tromey.com>
3614
3615 * common/ptid.c (ptid_tid_p): Remove.
3616 * common/ptid.h (ptid_tid_p): Don't declare.
3617 * sol-thread.c: Update.
3618
3619 2018-07-03 Tom Tromey <tom@tromey.com>
3620
3621 * common/ptid.c (ptid_lwp_p): Remove.
3622 * common/ptid.h (ptid_lwp_p): Don't declare.
3623 * fbsd-nat.c: Update.
3624 * linux-nat.c: Update.
3625 * nat/linux-procfs.c: Update.
3626 * nat/x86-linux-dregs.c: Update.
3627 * sol-thread.c: Update.
3628
3629 2018-07-03 Tom Tromey <tom@tromey.com>
3630
3631 * common/ptid.c (ptid_is_pid): Remove.
3632 * common/ptid.h (ptid_is_pid): Don't declare.
3633 * infrun.c: Update.
3634 * linux-nat.c: Update.
3635 * mi/mi-interp.c: Update.
3636 * remote.c: Update.
3637 * thread.c: Update.
3638
3639 2018-07-03 Tom Tromey <tom@tromey.com>
3640
3641 * common/ptid.c (ptid_get_tid): Remove.
3642 * common/ptid.h (ptid_get_tid): Don't declare.
3643 * ada-tasks.c: Update.
3644 * aix-thread.c: Update.
3645 * bsd-uthread.c: Update.
3646 * darwin-nat.c: Update.
3647 * fbsd-nat.c: Update.
3648 * i386-darwin-nat.c: Update.
3649 * infrun.c: Update.
3650 * linux-tdep.c: Update.
3651 * nto-procfs.c: Update.
3652 * ppc-ravenscar-thread.c: Update.
3653 * python/py-infthread.c: Update.
3654 * ravenscar-thread.c: Update.
3655 * sol-thread.c: Update.
3656 * sparc-ravenscar-thread.c: Update.
3657 * windows-nat.c: Update.
3658
3659 2018-07-03 Tom Tromey <tom@tromey.com>
3660
3661 * common/ptid.c (ptid_get_lwp): Remove.
3662 * common/ptid.h (ptid_get_lwp): Don't declare.
3663 * aarch64-linux-nat.c: Update.
3664 * ada-tasks.c: Update.
3665 * aix-thread.c: Update.
3666 * amd64-linux-nat.c: Update.
3667 * arm-linux-nat.c: Update.
3668 * corelow.c: Update.
3669 * fbsd-nat.c: Update.
3670 * fbsd-tdep.c: Update.
3671 * gnu-nat.c: Update.
3672 * i386-cygwin-tdep.c: Update.
3673 * i386-gnu-nat.c: Update.
3674 * i386-linux-nat.c: Update.
3675 * ia64-linux-nat.c: Update.
3676 * inf-ptrace.c: Update.
3677 * infrun.c: Update.
3678 * linux-fork.c: Update.
3679 * linux-nat.c: Update.
3680 * linux-tdep.c: Update.
3681 * linux-thread-db.c: Update.
3682 * mips-linux-nat.c: Update.
3683 * nat/aarch64-linux-hw-point.c: Update.
3684 * nat/aarch64-linux.c: Update.
3685 * nat/linux-btrace.c: Update.
3686 * nat/linux-osdata.c: Update.
3687 * nat/linux-procfs.c: Update.
3688 * nat/x86-linux-dregs.c: Update.
3689 * obsd-nat.c: Update.
3690 * ppc-fbsd-nat.c: Update.
3691 * ppc-linux-nat.c: Update.
3692 * procfs.c: Update.
3693 * python/py-infthread.c: Update.
3694 * ravenscar-thread.c: Update.
3695 * remote.c: Update.
3696 * s390-linux-nat.c: Update.
3697 * sol-thread.c: Update.
3698 * sol2-tdep.c: Update.
3699 * spu-linux-nat.c: Update.
3700 * x86-linux-nat.c: Update.
3701 * xtensa-linux-nat.c: Update.
3702
3703 2018-07-03 Tom Tromey <tom@tromey.com>
3704
3705 * common/ptid.c (ptid_get_pid): Remove.
3706 * common/ptid.h (ptid_get_pid): Don't declare.
3707 * aarch64-linux-nat.c: Update.
3708 * ada-lang.c: Update.
3709 * aix-thread.c: Update.
3710 * alpha-bsd-nat.c: Update.
3711 * amd64-fbsd-nat.c: Update.
3712 * amd64-linux-nat.c: Update.
3713 * arm-linux-nat.c: Update.
3714 * arm-nbsd-nat.c: Update.
3715 * auxv.c: Update.
3716 * break-catch-syscall.c: Update.
3717 * breakpoint.c: Update.
3718 * bsd-uthread.c: Update.
3719 * corelow.c: Update.
3720 * ctf.c: Update.
3721 * darwin-nat.c: Update.
3722 * fbsd-nat.c: Update.
3723 * fbsd-tdep.c: Update.
3724 * gcore.c: Update.
3725 * gnu-nat.c: Update.
3726 * hppa-nbsd-nat.c: Update.
3727 * hppa-obsd-nat.c: Update.
3728 * i386-fbsd-nat.c: Update.
3729 * ia64-linux-nat.c: Update.
3730 * inf-ptrace.c: Update.
3731 * infcmd.c: Update.
3732 * inferior.c: Update.
3733 * inferior.h: Update.
3734 * inflow.c: Update.
3735 * infrun.c: Update.
3736 * linux-fork.c: Update.
3737 * linux-nat.c: Update.
3738 * linux-tdep.c: Update.
3739 * linux-thread-db.c: Update.
3740 * m68k-bsd-nat.c: Update.
3741 * mi/mi-interp.c: Update.
3742 * mi/mi-main.c: Update.
3743 * mips-linux-nat.c: Update.
3744 * mips-nbsd-nat.c: Update.
3745 * mips64-obsd-nat.c: Update.
3746 * nat/aarch64-linux-hw-point.c: Update.
3747 * nat/aarch64-linux.c: Update.
3748 * nat/linux-btrace.c: Update.
3749 * nat/linux-osdata.c: Update.
3750 * nat/linux-procfs.c: Update.
3751 * nat/x86-linux-dregs.c: Update.
3752 * nto-procfs.c: Update.
3753 * obsd-nat.c: Update.
3754 * ppc-linux-nat.c: Update.
3755 * ppc-nbsd-nat.c: Update.
3756 * ppc-obsd-nat.c: Update.
3757 * proc-service.c: Update.
3758 * procfs.c: Update.
3759 * python/py-inferior.c: Update.
3760 * python/py-infthread.c: Update.
3761 * ravenscar-thread.c: Update.
3762 * record.c: Update.
3763 * remote-sim.c: Update.
3764 * remote.c: Update.
3765 * rs6000-nat.c: Update.
3766 * s390-linux-nat.c: Update.
3767 * sh-nbsd-nat.c: Update.
3768 * sol-thread.c: Update.
3769 * sparc-nat.c: Update.
3770 * sparc64-tdep.c: Update.
3771 * spu-linux-nat.c: Update.
3772 * spu-tdep.c: Update.
3773 * target-debug.h: Update.
3774 * target.c: Update.
3775 * thread.c: Update.
3776 * tid-parse.c: Update.
3777 * tracefile-tfile.c: Update.
3778 * vax-bsd-nat.c: Update.
3779 * windows-nat.c: Update.
3780 * x86-linux-nat.c: Update.
3781 * x86-nat.c: Update.
3782
3783 2018-07-03 Tom Tromey <tom@tromey.com>
3784
3785 * common/ptid.c (pid_to_ptid): Remove.
3786 * common/ptid.h (pid_to_ptid): Don't declare.
3787 * aix-thread.c: Update.
3788 * arm-linux-nat.c: Update.
3789 * common/ptid.c: Update.
3790 * common/ptid.h: Update.
3791 * corelow.c: Update.
3792 * ctf.c: Update.
3793 * darwin-nat.c: Update.
3794 * fbsd-nat.c: Update.
3795 * fork-child.c: Update.
3796 * gnu-nat.c: Update.
3797 * go32-nat.c: Update.
3798 * inf-ptrace.c: Update.
3799 * infcmd.c: Update.
3800 * inferior.c: Update.
3801 * infrun.c: Update.
3802 * linux-fork.c: Update.
3803 * linux-nat.c: Update.
3804 * nat/aarch64-linux-hw-point.c: Update.
3805 * nat/fork-inferior.c: Update.
3806 * nat/x86-linux-dregs.c: Update.
3807 * nto-procfs.c: Update.
3808 * obsd-nat.c: Update.
3809 * procfs.c: Update.
3810 * progspace.c: Update.
3811 * remote.c: Update.
3812 * rs6000-nat.c: Update.
3813 * s390-linux-nat.c: Update.
3814 * sol-thread.c: Update.
3815 * spu-linux-nat.c: Update.
3816 * target.c: Update.
3817 * top.c: Update.
3818 * tracefile-tfile.c: Update.
3819 * windows-nat.c: Update.
3820
3821 2018-07-03 Tom Tromey <tom@tromey.com>
3822
3823 * common/ptid.h (ptid_build): Don't declare.
3824 * common/ptid.c (ptid_build): Remove.
3825 * aix-thread.c: Update.
3826 * bsd-kvm.c: Update.
3827 * bsd-uthread.c: Update.
3828 * common/agent.c: Update.
3829 * common/ptid.c: Update.
3830 * common/ptid.h: Update.
3831 * corelow.c: Update.
3832 * darwin-nat.c: Update.
3833 * fbsd-nat.c: Update.
3834 * gnu-nat.c: Update.
3835 * linux-fork.c: Update.
3836 * linux-nat.c: Update.
3837 * linux-thread-db.c: Update.
3838 * nat/linux-osdata.c: Update.
3839 * nat/linux-procfs.c: Update.
3840 * nto-procfs.c: Update.
3841 * obsd-nat.c: Update.
3842 * proc-service.c: Update.
3843 * procfs.c: Update.
3844 * ravenscar-thread.c: Update.
3845 * remote-sim.c: Update.
3846 * remote.c: Update.
3847 * sol-thread.c: Update.
3848 * target.c: Update.
3849 * windows-nat.c: Update.
3850
3851 2018-07-03 Tom Tromey <tom@tromey.com>
3852
3853 * infrun.c (follow_exec): Use exit_inferior_silent.
3854 * inferior.c (exit_inferior_num_silent): Remove.
3855 * inferior.h (exit_inferior_num_silent): Don't declare.
3856
3857 2018-07-03 Tom Tromey <tom@tromey.com>
3858
3859 PR cli/23340:
3860 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3861 inferior_ptid on error.
3862
3863 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3864 Simon Marchi <simon.marchi@polymtl.ca>
3865
3866 PR tdep/8282
3867 * disasm.h (gdb_disassembler): Add
3868 `m_disassembler_options_holder'. member
3869 * disasm.c (get_all_disassembler_options): New function.
3870 (gdb_disassembler::gdb_disassembler): Use it.
3871 (gdb_buffered_insn_length_init_dis): Likewise.
3872 (gdb_buffered_insn_length): Adjust accordingly.
3873 (set_disassembler_options): Handle options with arguments.
3874 (show_disassembler_options_sfunc): Likewise. Add a leading new
3875 line if showing options with descriptions.
3876 (disassembler_options_completer): Adapt to using the
3877 `disasm_options_and_args_t' structure.
3878 * mips-tdep.c (mips_disassembler_options): New variable.
3879 (mips_disassembler_options_o32): Likewise.
3880 (mips_disassembler_options_n32): Likewise.
3881 (mips_disassembler_options_n64): Likewise.
3882 (gdb_print_insn_mips): Don't set `disassembler_options'.
3883 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3884 functions.
3885 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3886 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3887 `gdbarch_disassembler_options_implicit' and
3888 `gdbarch_valid_disassembler_options'.
3889 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3890 `disasm_options_and_args_t' structure.
3891 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3892 method.
3893 (valid_disassembler_options): Switch from `disasm_options_t' to
3894 the `disasm_options_and_args_t' structure.
3895 * NEWS: Document `set disassembler-options' support for the MIPS
3896 target.
3897 * gdbarch.h: Regenerate.
3898 * gdbarch.c: Regenerate.
3899
3900 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3901
3902 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3903
3904 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3905
3906 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3907 parameter in call to amd64_target_description.
3908 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3909 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3910 (amd64fbsd_init_abi): Likewise.
3911 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3912 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3913 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3914 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3915
3916 2018-06-29 Pedro Alves <palves@redhat.com>
3917
3918 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3919 "segments" parameter.
3920 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3921 (_initialize_amd64_tdep): Update call to
3922 amd64_create_target_description.
3923 (amd64_target_description): Add "segments" parameter. Adjust
3924 the implementation to use it.
3925 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3926 call to amd64_create_target_description.
3927 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3928 * gdb/arch/amd64.h (amd64_create_target_description): Add
3929 "segments" register.
3930 * gdb/arch/amd64.c (amd64_create_target_description): Add
3931 "segments" parameter. Call create_feature_i386_64bit_segments
3932 only if SEGMENTS is true.
3933 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3934 call to amd64_create_target_description.
3935
3936 2018-06-29 Pedro Alves <palves@redhat.com>
3937
3938 * thread.c (thread_target_id_str): New, factored out from ...
3939 (print_thread_info_1): ... here. Use it to compute the max
3940 "Target Id" column width.
3941
3942 2018-06-29 Pedro Alves <palves@redhat.com>
3943
3944 * remote.c (remote_target::extra_thread_info): Delete
3945 'display_buf' and 'n' locals. from the cache, regardless of
3946 packet mechanims is in use. Use cache for qThreadExtra and qP
3947 methods too.
3948
3949 2018-06-29 Pedro Alves <palves@redhat.com>
3950
3951 * blockframe.c (find_pc_sect_containing_function): New function.
3952 * breakpoint.c (print_breakpoint_location): Don't call
3953 find_pc_sect_function.
3954 * linespec.c (create_sals_line_offset): Record the location's
3955 symbol in the sal.
3956 * linespec.c (convert_address_location_to_sals): Fill in sal's
3957 symbol with find_pc_sect_containing_function.
3958 * symtab.c (find_function_start_sal): Rename to ...
3959 (find_function_start_sal_1): ... this.
3960 (find_function_start_sal): Reimplement as wrapper around
3961 find_function_start_sal_1, and use
3962 find_pc_sect_containing_function to fill in the sal's symbol.
3963 (find_function_start_sal(symbol*, bool)): Adjust.
3964 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3965 comments.
3966 (find_pc_sect_containing_function): Declare.
3967
3968 2018-06-29 Pedro Alves <palves@redhat.com>
3969
3970 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3971 true if the the location has no symbol.
3972
3973 2018-06-28 Tom Tromey <tom@tromey.com>
3974
3975 * NEWS: Mention --enable-codesign.
3976 * silent-rules.mk (ECHO_SIGN): New variable.
3977 * configure.ac: Add --enable-codesign.
3978 * configure: Rebuild.
3979 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3980 (gdb$(EXEEXT)): Optionally invoke codesign.
3981
3982 2018-06-28 Pedro Alves <palves@redhat.com>
3983
3984 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3985 comments.
3986 (switch_to_thread_no_regs): Adjust comment.
3987 * infcmd.c (stop_pc): Delete.
3988 (post_create_inferior, info_program_command): Replace references
3989 to stop_pc with references to thread_info->suspend.stop_pc.
3990 * inferior.h (stop_pc): Delete declaration.
3991 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3992 (handle_inferior_event_1, handle_signal_stop)
3993 (process_event_stop_test, keep_going_stepped_thread)
3994 (handle_step_into_function, handle_step_into_function_backward)
3995 (print_stop_location): Replace references to stop_pc with
3996 references to thread_info->suspend.stop_pc.
3997 (struct infcall_suspend_state) <stop_pc>: Delete field.
3998 (save_infcall_suspend_state, restore_infcall_suspend_state):
3999 Remove references to inf_stat->stop_pc.
4000 * linux-fork.c (fork_load_infrun_state): Likewise.
4001 * record-btrace.c (record_btrace_set_replay): Likewise.
4002 * record-full.c (record_full_goto_entry): Likewise.
4003 * remote.c (print_one_stopped_thread): Likewise.
4004 * target.c (target_resume): Extend comment.
4005 * thread.c (set_executing_thread): New.
4006 (set_executing): Use it.
4007 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4008 Remove references to stop_pc.
4009
4010 2018-06-28 Pedro Alves <palves@redhat.com>
4011
4012 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4013 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4014
4015 2018-06-28 Tom Tromey <tom@tromey.com>
4016
4017 * coffread.c (coff_symfile_finish): Update.
4018 * xcoffread.c (xcoff_symfile_finish): Update.
4019 * elfread.c (elf_symfile_finish): Update.
4020 * symfile.h (dwarf2_free_objfile): Don't declare.
4021 * dwarf2read.c (_initialize_dwarf2_read): Use
4022 register_objfile_data_with_cleanup.
4023 (dwarf2_free_objfile): Now static. Change signature.
4024
4025 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4026
4027 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4028 option "-o" to add-symbol-file-load to add an offset to each
4029 section's load address.
4030 * symfile.c (set_objfile_default_section_offset): New function.
4031
4032 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4033
4034 * symfile.c (add_symbol_file_command): Make sure that sections
4035 with the same name are sorted in the same order.
4036
4037 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4038
4039 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4040 require the second argument. If omitted, load sections at the
4041 addresses specified in the file.
4042
4043 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4044
4045 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4046 (_initialize_symfile): Add option "-o" to symbol-file to add an
4047 offset to each section of the symbol file.
4048
4049 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4050
4051 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4052
4053 2018-06-27 Tom Tromey <tom@tromey.com>
4054
4055 * stack.c (_initialize_stack): Update "func" help text.
4056
4057 2018-06-27 Tom Tromey <tom@tromey.com>
4058
4059 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4060 std::vector.
4061 (unwind_infopy_str, pyuw_create_unwind_info)
4062 (unwind_infopy_add_saved_register, pyuw_sniffer)
4063 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4064 Update.
4065 (struct saved_reg): Add constructor.
4066 <value>: Now a gdbpy_ref<>.
4067
4068 2018-06-27 Tom Tromey <tom@tromey.com>
4069
4070 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4071
4072 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4073
4074 * gdb-gdb.py.in: Format using autopep8.
4075
4076 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4077
4078 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4079 (type_lookup_function): Recognize CORE_ADDR values.
4080
4081 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4082
4083 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4084 print tag_name.
4085
4086 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4087
4088 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4089 <__lt__>: Add.
4090
4091 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * gdb-gdb.py: Move to...
4094 * gdb-gdb.py.in: ... here.
4095 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4096 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4097 dependencies.
4098 (distclean): Remove gdb-gdb.py when cleaning.
4099 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4100 * configure: Re-generate.
4101
4102 2018-06-27 Pedro Alves <palves@redhat.com>
4103
4104 * proc-service.c (get_ps_regcache): New.
4105 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4106 (ps_lsetfpregs): Use it.
4107
4108 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4109
4110 PR gdb/21695
4111 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4112 (dwarf_decode_lines_1): Adjust.
4113
4114 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4115
4116 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4117 override.
4118 <info_proc>: Likewise.
4119
4120 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4121
4122 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4123 to windows_fetch_one_register, and only handle the case of
4124 fetching one register. Move the code that reloads the context
4125 and iterates over all registers if R is negative to...
4126 (windows_nat_target::fetch_registers): ... here.
4127 (do_windows_store_inferior_registers): Rename to
4128 windows_store_one_register, and only handle the case of storing
4129 one register. Move the code that handles the case where r is
4130 negative to...
4131 (windows_nat_target::store_registers) ... here.
4132
4133 2018-06-26 Tom Tromey <tom@tromey.com>
4134
4135 PR rust/22574:
4136 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4137 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4138 Update.
4139 (rust_internal_print_type): Add podata parameter.
4140 (rust_print_type): Update.
4141
4142 2018-06-26 Tom Tromey <tom@tromey.com>
4143
4144 * typeprint.h (struct print_offset_data) <update, finish,
4145 maybe_print_hole>: New methods.
4146 <indentation>: New constant.
4147 * typeprint.c (print_offset_data::indentation): Define.
4148 (print_offset_data::maybe_print_hole, print_offset_data::update)
4149 (print_offset_data::finish): Move from c-typeprint.c and rename.
4150 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4151 (print_spaces_filtered_with_print_options): Update.
4152 (c_print_type_union_field_offset, maybe_print_hole)
4153 (c_print_type_struct_field_offset): Move to typeprint.c and
4154 rename.
4155 (c_type_print_base_struct_union): Update.
4156
4157 2018-06-25 Pedro Alves <palves@redhat.com>
4158
4159 * gdbthread.h (thread_info_ref, delete_thread)
4160 (delete_thread_silent, first_thread_of_inferior)
4161 (any_thread_of_inferior, switch_to_thread)
4162 (enable_thread_stack_temporaries)
4163 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4164 (get_last_thread_stack_temporary)
4165 (value_in_thread_stack_temporaries, can_access_registers_thread):
4166 Spell out "struct thread_info" instead of just "thread_info".
4167 * inferior.h (notice_new_inferior): Likewise.
4168
4169 2018-06-25 Pedro Alves <palves@redhat.com>
4170
4171 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4172 pass thread_info pointer to delete_thread.
4173 (windows_nat_target::detach): Pass inferior pointer to
4174 detach_inferior.
4175 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4176 delete_thread.
4177 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4178 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4179 and pass a thread_info pointer to delete_thread.
4180 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4181 pass thread_info pointer to delete_thread.
4182 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4183 delete_thread_silent call.
4184 * procfs.c (procfs_target::detach): Pass inferior pointer to
4185 detach_inferior.
4186 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4187 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4188 delete_thread_silent call.
4189 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4190 pass thread_info pointer to delete_thread.
4191 (windows_nat_target::detach): Pass inferior pointer to
4192 delete_inferior.
4193
4194 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4195
4196 * regcache.c (readable_regcache::read_part): Fix asserts.
4197 (reg_buffer::raw_collect_part): New function.
4198 (regcache::write_part): Fix asserts.
4199 (reg_buffer::raw_supply_part): New function.
4200 (regcache::transfer_regset_register): New helper function.
4201 (regcache::transfer_regset): Call new functions.
4202 (regcache_supply_regset): Use gdb_byte*.
4203 (regcache::supply_regset): Likewise.
4204 (regcache_collect_regset): Likewise.
4205 (regcache::collect_regset): Likewise.
4206 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4207 (reg_buffer::raw_supply_part): Likewise.
4208 (regcache::transfer_regset_register): Likewise.
4209 (regcache::transfer_regset): Use gdb_byte*.
4210
4211 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4212
4213 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4214
4215 2018-06-21 Pedro Alves <palves@redhat.com>
4216
4217 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4218 instead of a ptid_t. All callers adjusted.
4219 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4220 adjusted.
4221 (print_ada_task_info, display_current_task_id, task_command_1):
4222 Adjust.
4223 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4224 inferior_thread.
4225 (breakpoint_kind): Adjust.
4226 (remove_breakpoints_pid): Rename to ...
4227 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4228 pointer. All callers adjusted.
4229 (bpstat_clear_actions): Use inferior_thread.
4230 (get_bpstat_thread): New.
4231 (bpstat_do_actions): Use it.
4232 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4233 to take a thread_info pointer. All callers adjusted.
4234 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4235 (breakpoint_re_set_thread): Use inferior_thread.
4236 * breakpoint.h (struct inferior): Forward declare.
4237 (bpstat_stop_status): Update.
4238 (remove_breakpoints_pid): Delete.
4239 (remove_breakpoints_inf): New.
4240 * bsd-uthread.c (bsd_uthread_target::wait)
4241 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4242 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4243 (maint_btrace_packet_history_cmd)
4244 (maint_btrace_clear_packet_history_cmd): Adjust.
4245 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4246 inferior_thread.
4247 * cli/cli-interp.c: Include "inferior.h".
4248 * common/refcounted-object.h (struct
4249 refcounted_object_ref_policy): New.
4250 * compile/compile-object-load.c: Include gdbthread.h.
4251 (store_regs): Use inferior_thread.
4252 * corelow.c (core_target::close): Use current_inferior.
4253 (core_target_open): Adjust to use first_thread_of_inferior and use
4254 the current inferior.
4255 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4256 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4257 <thread>: ... this new field. All references adjusted.
4258 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4259 Take a thread_info pointer instead of a ptid_t.
4260 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4261 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4262 thread_info pointer instead of a ptid_t.
4263 * elfread.c: Include "inferior.h".
4264 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4265 Use inferior_thread.
4266 * eval.c (evaluate_subexp): Likewise.
4267 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4268 inferior_thread.
4269 * gdb_proc_service.h (struct thread_info): Forward declare.
4270 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4271 <thread>: ... this new field. All references adjusted.
4272 * gdbarch.h, gdbarch.c: Regenerate.
4273 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4274 'thread' parameter. All implementations and callers adjusted.
4275 * gdbthread.h (thread_info) <set_running>: New method.
4276 (delete_thread, delete_thread_silent): Take a thread_info pointer
4277 instead of a ptid.
4278 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4279 (first_thread_of_process): Delete, replaced by ...
4280 (first_thread_of_inferior): ... this new function. All callers
4281 adjusted.
4282 (any_live_thread_of_process): Delete, replaced by ...
4283 (any_live_thread_of_inferior): ... this new function. All callers
4284 adjusted.
4285 (switch_to_thread, switch_to_no_thread): Declare.
4286 (is_executing): Delete.
4287 (enable_thread_stack_temporaries): Update comment.
4288 <enable_thread_stack_temporaries>: Take a thread_info pointer
4289 instead of a ptid_t. Incref the thread.
4290 <~enable_thread_stack_temporaries>: Decref the thread.
4291 <m_ptid>: Delete
4292 <m_thr>: New.
4293 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4294 (get_last_thread_stack_temporary)
4295 (value_in_thread_stack_temporaries, can_access_registers_thread):
4296 Take a thread_info pointer instead of a ptid_t. All callers
4297 adjusted.
4298 * infcall.c (get_call_return_value): Use inferior_thread.
4299 (run_inferior_call): Work with thread pointers instead of ptid_t.
4300 (call_function_by_hand_dummy): Work with thread pointers instead
4301 of ptid_t. Use thread_info_ref.
4302 * infcmd.c (proceed_thread_callback): Access thread's state
4303 directly.
4304 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4305 access thread's state directly.
4306 (continue_command): Use inferior_thread.
4307 (info_program_command): Use find_thread_ptid and access thread
4308 state directly.
4309 (proceed_after_attach_callback): Use thread state directly.
4310 (notice_new_inferior): Take a thread_info pointer instead of a
4311 ptid_t. All callers adjusted.
4312 (exit_inferior): Take an inferior pointer instead of a pid. All
4313 callers adjusted.
4314 (exit_inferior_silent): New.
4315 (detach_inferior): Delete.
4316 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4317 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4318 (detach_inferior_command, kill_inferior_command): Use
4319 find_inferior_id instead of valid_gdb_inferior_id and
4320 gdb_inferior_id_to_pid.
4321 (inferior_command): Use inferior and thread pointers.
4322 * inferior.h (struct thread_info): Forward declare.
4323 (notice_new_inferior): Take a thread_info pointer instead of a
4324 ptid_t. All callers adjusted.
4325 (detach_inferior): Delete declaration.
4326 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4327 instead of a pid. All callers adjusted.
4328 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4329 (valid_gdb_inferior_id): Delete.
4330 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4331 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4332 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4333 ...
4334 <inf>: ... this new field.
4335 <step_ptid>: Delete, replaced by ...
4336 <step_thread>: ... this new field.
4337 (get_displaced_stepping_state): Take an inferior pointer instead
4338 of a pid. All callers adjusted.
4339 (displaced_step_in_progress_any_inferior): Adjust.
4340 (displaced_step_in_progress_thread): Take a thread pointer instead
4341 of a ptid_t. All callers adjusted.
4342 (displaced_step_in_progress, add_displaced_stepping_state): Take
4343 an inferior pointer instead of a pid. All callers adjusted.
4344 (get_displaced_step_closure_by_addr): Adjust.
4345 (remove_displaced_stepping_state): Take an inferior pointer
4346 instead of a pid. All callers adjusted.
4347 (displaced_step_prepare_throw, displaced_step_prepare)
4348 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4349 All callers adjusted.
4350 (start_step_over): Adjust.
4351 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4352 displaced step queue.
4353 (do_target_resume): Adjust.
4354 (fetch_inferior_event): Use inferior_thread.
4355 (context_switch, get_inferior_stop_soon): Take an
4356 execution_control_state pointer instead of a ptid_t. All callers
4357 adjusted.
4358 (switch_to_thread_cleanup): Delete.
4359 (stop_all_threads): Use scoped_restore_current_thread.
4360 * inline-frame.c: Include "gdbthread.h".
4361 (inline_state) <inline_state>: Take a thread pointer instead of a
4362 ptid_t. All callers adjusted.
4363 <ptid>: Delete, replaced by ...
4364 <thread>: ... this new field.
4365 (find_inline_frame_state): Take a thread pointer instead of a
4366 ptid_t. All callers adjusted.
4367 (skip_inline_frames, step_into_inline_frame)
4368 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4369 pointer instead of a ptid_t. All callers adjusted.
4370 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4371 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4372 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4373 pointers directly.
4374 * linux-nat.c (get_detach_signal): Likewise.
4375 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4376 (thread_db_notice_clone): Adjust.
4377 (thread_db_find_new_threads_silently)
4378 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4379 a thread pointer instead of a ptid_t. All callers adjusted.
4380 * mi/mi-cmd-var.c: Include "inferior.h".
4381 (mi_cmd_var_update_iter): Update to use thread pointers.
4382 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4383 inferior directly.
4384 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4385 out to ...
4386 (mi_output_running): ... this new function.
4387 (mi_on_resume_1): Adjust to use it.
4388 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4389 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4390 directly.
4391 (interrupt_thread_callback): : Adjust to use thread and inferior
4392 pointers.
4393 * proc-service.c: Include "gdbthread.h".
4394 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4395 * progspace-and-thread.c: Include "inferior.h".
4396 * progspace.c: Include "inferior.h".
4397 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4398 hold a reference to an inferior_object.
4399 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4400 inferior_thread.
4401 * python/py-inferior.c (struct inferior_object): Give the type a
4402 tag name instead of a typedef.
4403 (python_on_normal_stop): No need to check if the current thread is
4404 listed.
4405 (inferior_to_inferior_object): Change return type to
4406 inferior_object. All callers adjusted.
4407 (find_thread_object): Delete, bits factored out to ...
4408 (thread_to_thread_object): ... this new function.
4409 * python/py-infthread.c (create_thread_object): Use
4410 inferior_to_inferior_object.
4411 (thpy_is_stopped): Use thread pointer directly.
4412 (gdbpy_selected_thread): Use inferior_thread.
4413 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4414 field, replaced with ...
4415 <thread>: ... this new field. All users adjusted.
4416 (btpy_insn_or_gap_new): Drop const.
4417 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4418 callers adjusted.
4419 * python/py-record.c: Include "gdbthread.h".
4420 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4421 a ptid_t. All callers adjusted.
4422 (gdbpy_current_recording): Use inferior_thread.
4423 * python/py-record.h (recpy_record_object) <ptid>: Delete
4424 field, replaced with ...
4425 <thread>: ... this new field. All users adjusted.
4426 (recpy_element_object) <ptid>: Delete
4427 field, replaced with ...
4428 <thread>: ... this new field. All users adjusted.
4429 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4430 a ptid_t. All callers adjusted.
4431 * python/py-threadevent.c: Include "gdbthread.h".
4432 (get_event_thread): Use thread_to_thread_object.
4433 * python/python-internal.h (struct inferior_object): Forward
4434 declare.
4435 (find_thread_object, find_inferior_object): Delete declarations.
4436 (thread_to_thread_object, inferior_to_inferior_object): New
4437 declarations.
4438 * record-btrace.c: Include "inferior.h".
4439 (require_btrace_thread): Use inferior_thread.
4440 (record_btrace_frame_sniffer)
4441 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4442 (get_thread_current_frame): Use scoped_restore_current_thread and
4443 switch_to_thread.
4444 (get_thread_current_frame): Use thread pointer directly.
4445 (record_btrace_replay_at_breakpoint): Use thread's inferior
4446 pointer directly.
4447 * record-full.c: Include "inferior.h".
4448 * regcache.c: Include "gdbthread.h".
4449 (get_thread_arch_regcache): Use the inferior's address space
4450 directly.
4451 (get_thread_regcache, registers_changed_thread): New.
4452 * regcache.h (get_thread_regcache(thread_info *thread)): New
4453 overload.
4454 (registers_changed_thread): New.
4455 (remote_target) <remote_detach_1>: Swap order of parameters.
4456 (remote_add_thread): <remote_add_thread>: Return the new thread.
4457 (get_remote_thread_info(ptid_t)): New overload.
4458 (remote_target::remote_notice_new_inferior): Use thread pointers
4459 directly.
4460 (remote_target::process_initial_stop_replies): Use
4461 thread_info::set_running.
4462 (remote_target::remote_detach_1, remote_target::detach)
4463 (extended_remote_target::detach): Adjust.
4464 * stack.c (frame_show_address): Use inferior_thread.
4465 * target-debug.h (target_debug_print_thread_info_pp): New.
4466 * target-delegates.c: Regenerate.
4467 * target.c (default_thread_address_space): Delete.
4468 (memory_xfer_partial_1): Use current_inferior.
4469 (target_detach): Use current_inferior.
4470 (target_thread_address_space): Delete.
4471 (generic_mourn_inferior): Use current_inferior.
4472 * target.h (struct target_ops) <thread_address_space>: Delete.
4473 (target_thread_address_space): Delete.
4474 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4475 pointers directly.
4476 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4477 thread pointer instead of a ptid_t. Adjust all callers.
4478 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4479 (first_thread_of_process): Delete, replaced by ...
4480 (first_thread_of_inferior): ... this new function. All callers
4481 adjusted.
4482 (any_thread_of_process): Rename to ...
4483 (any_thread_of_inferior): ... this, and take an inferior pointer.
4484 (any_live_thread_of_process): Rename to ...
4485 (any_live_thread_of_inferior): ... this, and take an inferior
4486 pointer.
4487 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4488 (value_in_thread_stack_temporaries)
4489 (get_last_thread_stack_temporary): Take a thread pointer instead
4490 of a ptid_t. Adjust all callers.
4491 (thread_info::set_running): New.
4492 (validate_registers_access): Use inferior_thread.
4493 (can_access_registers_ptid): Rename to ...
4494 (can_access_registers_thread): ... this, and take a thread
4495 pointer.
4496 (print_thread_info_1): Adjust to compare thread pointers instead
4497 of ptids.
4498 (switch_to_no_thread, switch_to_thread): Make extern.
4499 (scoped_restore_current_thread::~scoped_restore_current_thread):
4500 Use m_thread pointer directly.
4501 (scoped_restore_current_thread::scoped_restore_current_thread):
4502 Use inferior_thread.
4503 (thread_command): Use thread pointer directly.
4504 (thread_num_make_value_helper): Use inferior_thread.
4505 * top.c (execute_command): Use inferior_thread.
4506 * tui/tui-interp.c: Include "inferior.h".
4507 * varobj.c (varobj_create): Use inferior_thread.
4508 (value_of_root_1): Use find_thread_global_id instead of
4509 global_thread_id_to_ptid.
4510
4511 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4512
4513 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4514 possible.
4515 (regcache::write_part): Likewise.
4516 (readable_regcache::cooked_read_part): Update comment.
4517 (readable_regcache::cooked_write_part): Likewise.
4518 * regcache.h: (readable_regcache::read_part): Likewise.
4519 (regcache::write_part): Likewise.
4520
4521 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4522 Dirk Schubert <dirk.schubert@arm.com>
4523
4524 * aarch64-linux-nat.c (post_attach): New.
4525 (aarch64_linux_nat_target::post_attach): Override post_attach to
4526 record the number of hardware debug registers.
4527
4528 2018-06-20 Tom Tromey <tom@tromey.com>
4529
4530 * python/py-param.c (add_setshow_generic): Make parameters const.
4531 (parmpy_init): Update.
4532
4533 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4534
4535 * regcache.h (regcache_cooked_read_ftype): Rename to...
4536 (register_read_ftype): ...this, change type to function_view.
4537 (class reg_buffer) <save>: Remove src parameter.
4538 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4539 parameter non-const in first overload. Remove src parameter in
4540 second overload.
4541 * regcache.c (do_cooked_read): Remove.
4542 (readonly_detached_regcache::readonly_detached_regcache): Make
4543 parameter non-const, adjust call to other constructor.
4544 (reg_buffer::save): Remove src parameter.
4545 * frame.c (do_frame_register_read): Remove.
4546 (frame_save_as_regcache): Use lambda function.
4547 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4548 parameter to ppu2spu_data *.
4549 (ppu2spu_sniffer): Use lambda function.
4550
4551 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4552
4553 * record-full.c (record_full_target::insert_breakpoint): Remove
4554 "struct" keyword, add const.
4555
4556 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4557
4558 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4559 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4560 * configure.ac: Remove AC_PREREQ, add missing quoting.
4561 * gnulib/configure.ac: Modernize usage of
4562 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4563 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4564 (AUTOMAKE_VERSION): Bump to 1.15.1.
4565 * configure: Re-generate.
4566 * config.in: Re-generate.
4567 * aclocal.m4: Re-generate.
4568 * gnulib/aclocal.m4: Re-generate.
4569 * gnulib/config.in: Re-generate.
4570 * gnulib/configure: Re-generate.
4571 * gnulib/import/Makefile.in: Re-generate.
4572
4573 2018-06-19 Pedro Alves <palves@redhat.com>
4574
4575 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4576 (lookup_minimal_symbol_by_pc_section): ... here with
4577 gdb_assert_not_reached added.
4578
4579 2018-06-19 Pedro Alves <palves@redhat.com>
4580
4581 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4582 parameter with a block parameter. Compare location's block symbol
4583 with the frame's block instead of addresses.
4584 (skip_inline_frames): Pass the current block instead of the
4585 frame's address. Break out as soon as we determine the frame
4586 should not be skipped.
4587
4588 2018-06-18 Tom Tromey <tom@tromey.com>
4589
4590 * solib-aix.c (solib_aix_get_section_offsets): Return
4591 unique_xmalloc_ptr.
4592 (solib_aix_solib_create_inferior_hook): Update.
4593
4594 2018-06-18 Tom Tromey <tom@tromey.com>
4595
4596 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4597
4598 2018-06-18 Tom Tromey <tom@tromey.com>
4599
4600 * solib-frv.c (frv_relocate_main_executable): Use
4601 unique_xmalloc_ptr.
4602 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4603 unique_xmalloc_ptr.
4604
4605 2018-06-18 Tom Tromey <tom@tromey.com>
4606
4607 * objfiles.h (inhibit_section_map_updates): Update.
4608 (resume_section_map_updates, resume_section_map_updates_cleanup):
4609 Remove.
4610 * solib-svr4.c (svr4_handle_solib_event): Update.
4611 * objfiles.c (inhibit_section_map_updates): Return
4612 scoped_restore_tmpl<int>.
4613 (resume_section_map_updates, resume_section_map_updates_cleanup):
4614 Remove.
4615
4616 2018-06-18 Tom Tromey <tom@tromey.com>
4617
4618 * valprint.h (read_string): Update.
4619 * valprint.c (read_string): Change type of "buffer".
4620 (val_print_string): Update.
4621 * python/py-value.c (valpy_string): Update.
4622 * language.h (struct language_defn) <la_get_string>: Change
4623 type of "buffer".
4624 (default_get_string, c_get_string): Update.
4625 * language.c (default_get_string): Change type of "buffer".
4626 * guile/scm-value.c (gdbscm_value_to_string): Update.
4627 * c-lang.c (c_get_string): Change type of "buffer".
4628
4629 2018-06-18 Tom Tromey <tom@tromey.com>
4630
4631 * ser-mingw.c (struct pipe_state_destroyer): New.
4632 (pipe_state_up): New typedef.
4633 (cleanup_pipe_state): Remove.
4634 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4635
4636 2018-06-18 Tom Tromey <tom@tromey.com>
4637
4638 * rust-lang.h (rust_yyerror): Don't declare.
4639 * rust-lang.c (rust_language_defn): Update.
4640 * rust-exp.y (yyerror): Now static.
4641 * parse.c (parse_exp_in_context_1): Update.
4642 * p-lang.h (p_yyerror): Don't declare.
4643 * p-lang.c (p_language_defn): Update.
4644 * p-exp.y (yyerror): Now static.
4645 * opencl-lang.c (opencl_language_defn): Update.
4646 * objc-lang.c (objc_language_defn): Update.
4647 * m2-lang.h (m2_yyerror): Don't declare.
4648 * m2-lang.c (m2_language_defn): Update.
4649 * m2-exp.y (yyerror): Now static.
4650 * language.h (struct language_defn) <la_error>: Remove.
4651 * language.c (unk_lang_error): Remove.
4652 (unknown_language_defn, auto_language_defn): Remove.
4653 * go-lang.h (go_yyerror): Don't declare.
4654 * go-lang.c (go_language_defn): Update.
4655 * go-exp.y (yyerror): Now static.
4656 * f-lang.h (f_yyerror): Don't declare.
4657 * f-lang.c (f_language_defn): Update.
4658 * f-exp.y (yyerror): Now static.
4659 * d-lang.h (d_yyerror): Don't declare.
4660 * d-lang.c (d_language_defn): Update.
4661 * d-exp.y (yyerror): Now static.
4662 * c-lang.h (c_yyerror): Don't declare.
4663 * c-lang.c (c_language_defn, cplus_language_defn)
4664 (asm_language_defn, minimal_language_defn): Update.
4665 * c-exp.y (yyerror): Now static.
4666 * ada-lang.h (ada_yyerror): Don't declare.
4667 * ada-lang.c (ada_language_defn): Update.
4668 * ada-exp.y (yyerror): Now static.
4669
4670 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4671
4672 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4673 (store_sveregs_to_thread): Likewise.
4674 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4675 (aarch64_linux_store_inferior_registers): Likewise.
4676 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4677 function.
4678 (aarch64_sve_regs_copy_to_regcache): Likewise.
4679 (aarch64_sve_regs_copy_from_regcache): Likewise.
4680 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4681 declaration.
4682 (aarch64_sve_regs_copy_to_regcache): Likewise.
4683 (aarch64_sve_regs_copy_from_regcache): Likewise.
4684 (sve_context): Structure from Linux headers.
4685 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4686 (SVE_SIG_ZREG_SIZE): Likewise.
4687 (SVE_SIG_PREG_SIZE): Likewise.
4688 (SVE_SIG_FFR_SIZE): Likewise.
4689 (SVE_SIG_REGS_OFFSET): Likewise.
4690 (SVE_SIG_ZREGS_OFFSET): Likewise.
4691 (SVE_SIG_ZREG_OFFSET): Likewise.
4692 (SVE_SIG_ZREGS_SIZE): Likewise.
4693 (SVE_SIG_PREGS_OFFSET): Likewise.
4694 (SVE_SIG_PREG_OFFSET): Likewise.
4695 (SVE_SIG_PREGS_SIZE): Likewise.
4696 (SVE_SIG_FFR_OFFSET): Likewise.
4697 (SVE_SIG_REGS_SIZE): Likewise.
4698 (SVE_SIG_CONTEXT_SIZE): Likewise.
4699 (SVE_PT_REGS_MASK): Likewise.
4700 (SVE_PT_REGS_FPSIMD): Likewise.
4701 (SVE_PT_REGS_SVE): Likewise.
4702 (SVE_PT_VL_INHERIT): Likewise.
4703 (SVE_PT_VL_ONEXEC): Likewise.
4704 (SVE_PT_REGS_OFFSET): Likewise.
4705 (SVE_PT_FPSIMD_OFFSET): Likewise.
4706 (SVE_PT_FPSIMD_SIZE): Likewise.
4707 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4708 (SVE_PT_SVE_PREG_SIZE): Likewise.
4709 (SVE_PT_SVE_FFR_SIZE): Likewise.
4710 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4711 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4712 (__SVE_SIG_TO_PT): Likewise.
4713 (SVE_PT_SVE_OFFSET): Likewise.
4714 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4715 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4716 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4717 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4718 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4719 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4720 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4721 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4722 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4723 (SVE_PT_SVE_SIZE): Likewise.
4724 (SVE_PT_SIZE): Likewise.
4725 (HAS_SVE_STATE): New define.
4726
4727 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4728
4729 * nat/aarch64-sve-linux-sigcontext.h: New file.
4730 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4731 new files.
4732 (SVE_VQ_MIN): Likewise.
4733 (SVE_VQ_MAX): Likewise.
4734 (SVE_VL_MIN): Likewise.
4735 (SVE_VL_MAX): Likewise.
4736 (SVE_NUM_ZREGS): Likewise.
4737 (SVE_NUM_PREGS): Likewise.
4738 (sve_vl_valid): Likewise.
4739 (struct user_sve_header): Likewise.
4740
4741 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4742 Richard Bunt <Richard.Bunt@arm.com>
4743
4744 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4745 was requested by GDB.
4746
4747 2018-06-15 Tom de Vries <tdevries@suse.de>
4748
4749 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4750
4751 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4752
4753 * gnulib/update-gnulib.sh: Print expected versions of
4754 autoconf/aclocal.
4755
4756 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4757
4758 * arch-utils.c (default_type_align): Use type_length_units.
4759 * gdbtypes.c (type_align): Use type_length_units.
4760
4761 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4762
4763 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4764 of 'define' command.
4765
4766 2018-06-14 Tom de Vries <tdevries@suse.de>
4767
4768 PR cli/22573
4769 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4770 get_no_prettyformat_print_options.
4771
4772 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4773
4774 * sparc-nat.h: Include target.h.
4775 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4776 <fetch_registers>: Remove this argument in function call.
4777 <store_registers>: Remove this argument in function call, remove
4778 extra semicolon.
4779 <low_forget_process>: Call sparc64_forget_process instead of
4780 sparc_forget_process.
4781
4782 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4783
4784 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4785 (procfs_target::make_corefile_notes): Adjust to new
4786 target_read_alloc return type.
4787
4788 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4789 Stephen Roberts <stephen.roberts@arm.com>
4790
4791 PR gdb/22882
4792 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4793 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4794 Move should_notify_stop local into more inner scope.
4795
4796 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4797 Stephen Roberts <stephen.roberts@arm.com>
4798
4799 PR gdb/22882
4800 * infrun.c (resume_1): Add call to mark_async_event_handler.
4801
4802 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4803
4804 * infrun.c (do_target_wait): Change old version of $pc printed.
4805
4806 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4807
4808 * dwarf2read.c (read_index_from_section): Rename to...
4809 (read_gdb_index_from_section): ... this, update all callers.
4810 (dwarf2_read_index): Rename to...
4811 (dwarf2_read_gdb_index): ... this, update all callers.
4812
4813 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4814
4815 * gdb/hppa-linux-nat.c
4816 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4817 hppa_linux_nat_target::fetch_registers.
4818
4819 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4820
4821 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4822 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4823 (AARCH64_DWARF_SVE_FFR): Likewise.
4824 (AARCH64_DWARF_SVE_P0): Likewise.
4825 (AARCH64_DWARF_SVE_Z0): Likewise.
4826
4827 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4828
4829 * common/common-regcache.h (raw_compare): New function.
4830 * regcache.c (regcache::raw_compare): Likewise.
4831 * regcache.h (regcache::raw_compare): New declaration.
4832
4833 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4834
4835 * common/common-regcache.h (reg_buffer_common): New structure.
4836 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4837 (reg_buffer::raw_supply): Likewise.
4838 (reg_buffer::raw_supply_integer): Likewise.
4839 (reg_buffer::raw_supply_zeroed): Likewise.
4840 (reg_buffer::raw_collect): Likewise.
4841 (reg_buffer::raw_collect_integer): Likewise.
4842 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4843 (reg_buffer::raw_supply): Likewise.
4844 (reg_buffer::raw_supply_integer): Likewise.
4845 (reg_buffer::raw_supply_zeroed): Likewise.
4846 (reg_buffer::raw_collect): Likewise.
4847 (reg_buffer::raw_collect_integer): Likewise.
4848
4849 2018-06-10 Tom Tromey <tom@tromey.com>
4850
4851 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4852 (class remote_state) <stop_reply_queue>: Now std::vector.
4853 (remote_state::~remote_state)
4854 (remote_target::stop_reply_queue_length): Update.
4855 (struct queue_iter_param, remove_child_of_pending_fork)
4856 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4857 (check_pending_event_prevents_wildcard_vcont_callback)
4858 (remove_stop_reply_for_inferior)
4859 (remove_stop_reply_of_remote_state)
4860 (remote_notif_remove_once_on_match)
4861 (stop_reply_match_ptid_and_ws)
4862 (remote_kill_child_of_pending_fork): Remove.
4863 (remote_target::remove_new_fork_children)
4864 (remote_target::check_pending_events_prevent_wildcard_vcont)
4865 (remote_target::discard_pending_stop_replies)
4866 (remote_target::discard_pending_stop_replies_in_queue)
4867 (remote_target::remote_notif_remove_queued_reply)
4868 (remote_target::queued_stop_reply)
4869 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4870 (remote_target::wait, remote_target::kill_new_fork_children)
4871 (remote_target::async): Update.
4872
4873 2018-06-10 Tom Tromey <tom@tromey.com>
4874
4875 * record-full.c (record_full_arch_list_cleanups): Remove.
4876 (record_full_message): Use try/catch.
4877 (record_full_wait_cleanups): Remove.
4878 (record_full_wait_1): Use try/catch.
4879 (record_full_restore): Likewise.
4880
4881 2018-06-10 Tom Tromey <tom@tromey.com>
4882
4883 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4884 declare VEC. Add constructor.
4885 <in_target_beneath>: Now bool.
4886 (record_full_breakpoints): Now a std::vector, static.
4887 (record_full_sync_record_breakpoints)
4888 (record_full_init_record_breakpoints)
4889 (record_full_target::insert_breakpoint)
4890 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4891
4892 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4893
4894 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4895 * serial.c (serial_interface_lookup): Remove struct keyword.
4896
4897 2018-06-10 Tom Tromey <tom@tromey.com>
4898
4899 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4900 method.
4901 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4902 a method.
4903 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4904 method.
4905 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4906 "beneath" as a method.
4907 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4908 Use "beneath" as a method.
4909
4910 2018-06-10 Tom Tromey <tom@tromey.com>
4911
4912 * tracefile.c (struct trace_file_writer_deleter): New.
4913 <operator()>: Rename from trace_file_writer_xfree.
4914 (trace_file_writer_up): New typedef.
4915 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4916
4917 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4918
4919 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4920 <m_registers, m_register_status>: Change type to
4921 std::unique_ptr.
4922 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4923 XCNEWVEC.
4924
4925 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4926
4927 * common/common-regcache.h (enum register_status): Add
4928 underlying type "signed char".
4929 * regcache.h (reg_buffer) <m_register_status>: Change type to
4930 register_status *.
4931 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4932 register_status instead of signed char.
4933 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4934 (reg_buffer::get_register_status): Remove cast.
4935 (readable_regcache::raw_read): Remove cast.
4936 (readable_regcache::cooked_read): Remove cast.
4937
4938 2018-06-09 Tom Tromey <tom@tromey.com>
4939
4940 * source.c (reverse_search_command, forward_search_command): Use
4941 scoped_fd.
4942
4943 2018-06-09 Tom Tromey <tom@tromey.com>
4944
4945 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4946 (serial_ops_list): Now static, std::vector.
4947 (serial_interface_lookup, serial_add_interface): Update.
4948
4949 2018-06-09 Tom Tromey <tom@tromey.com>
4950
4951 * dwarf2read.c (process_cu_includes): Update.
4952 (process_full_comp_unit): Update.
4953 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4954 std::vector.
4955
4956 2018-06-08 Paul Koning <paul_koning@dell.com>
4957
4958 PR gdb/23252
4959
4960 * python/python.c (do_start_initialization):
4961 Avoid call to internal Python API.
4962 (init__gdb_module): New function.
4963
4964 2018-06-08 Gary Benson <gbenson@redhat.com>
4965
4966 * linux-thread-db.c (valprint.h): New include.
4967 (struct check_thread_db_info): New structure.
4968 (check_thread_db_on_load, tdb_testinfo): New static globals.
4969 (check_thread_db, check_thread_db_callback): New functions.
4970 (try_thread_db_load_1): Run integrity checks if requested.
4971 (maintenance_check_libthread_db): New function.
4972 (_initialize_thread_db): Register "maint check libthread-db"
4973 and "maint set/show check-libthread-db".
4974 * NEWS: Mention the above new commands.
4975
4976 2018-06-08 Tom Tromey <tom@tromey.com>
4977
4978 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4979 now a method.
4980
4981 2018-06-08 Tom Tromey <tom@tromey.com>
4982
4983 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4984
4985 2018-06-08 Tom Tromey <tom@tromey.com>
4986
4987 * common/btrace-common.h (struct btrace_data): Add constructor,
4988 destructor, move assignment operator.
4989 <empty, clear, fini>: New methods.
4990 <format>: Initialize.
4991 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4992 (btrace_data_empty): Don't declare.
4993 * common/btrace-common.c (btrace_data_init): Remove.
4994 (btrace_data::fini): Rename from btrace_data_fini.
4995 (btrace_data::empty): Rename from btrace_data_empty.
4996 (btrace_data::clear): Rename from btrace_data_clear. Return
4997 bool.
4998 * btrace.h (make_cleanup_btrace_data): Don't declare.
4999 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5000 (parse_xml_btrace): Update.
5001 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5002 (maint_btrace_clear_packet_history_cmd): Update.
5003
5004 2018-06-07 Pedro Alves <palves@redhat.com>
5005
5006 * target.h (target_ops) <beneath>: Now a method. All references
5007 updated.
5008 (class target_stack): New.
5009 * target.c (g_target_stack): New.
5010 (g_current_top_target): Delete.
5011 (current_top_target): Get the top target out of g_target_stack.
5012 (target_stack::push, target_stack::unpush): New.
5013 (push_target, unpush_target): Reimplement.
5014 (target_is_pushed): Reimplement in terms of g_target_stack.
5015 (target_ops::beneath, target_stack::find_beneath): New.
5016
5017 2018-06-07 Pedro Alves <palves@redhat.com>
5018
5019 * target.h (find_target_beneath): Delete declaration.
5020 * target.c (find_target_beneath): Delete definition.
5021 * aix-thread.c: All callers of find_target_beneath adjusted to
5022 call target_ops::beneath instead.
5023 * bsd-uthread.c: Likewise.
5024 * linux-thread-db.c: Likewise.
5025 * ravenscar-thread.c: Likewise.
5026 * sol-thread.c: Likewise.
5027 * spu-multiarch.c: Likewise.
5028
5029 2018-06-07 Pedro Alves <palves@redhat.com>
5030
5031 * target.h (target_ops) <beneath>: Now a method. All references
5032 updated.
5033 (target_ops) <m_beneath>: New.
5034 * target.c (target_ops::beneath): New.
5035 * corelow.c: Adjust all references to target_ops::beneath.
5036 * linux-thread-db.c: Likewise.
5037 * make-target-delegates: Likewise.
5038 * record-btrace.c: Likewise.
5039 * record-full.c: Likewise.
5040 * remote.c: Likewise.
5041 * target.c: Likewise.
5042 * target-delegates.c: Regenerate.
5043
5044 2018-06-07 Pedro Alves <palves@redhat.com>
5045
5046 * target.h (target_stack): Delete.
5047 (current_top_target): Declare function.
5048 * target.c (target_stack): Delete.
5049 (g_current_top_target): New.
5050 (current_top_target): New function.
5051 * auxv.c: Use current_top_target instead of target_stack
5052 throughout.
5053 * avr-tdep.c: Likewise.
5054 * breakpoint.c: Likewise.
5055 * corefile.c: Likewise.
5056 * elfread.c: Likewise.
5057 * eval.c: Likewise.
5058 * exceptions.c: Likewise.
5059 * frame.c: Likewise.
5060 * gdbarch-selftests.c: Likewise.
5061 * gnu-v3-abi.c: Likewise.
5062 * ia64-tdep.c: Likewise.
5063 * ia64-vms-tdep.c: Likewise.
5064 * infcall.c: Likewise.
5065 * infcmd.c: Likewise.
5066 * infrun.c: Likewise.
5067 * linespec.c: Likewise.
5068 * linux-tdep.c: Likewise.
5069 * minsyms.c: Likewise.
5070 * ppc-linux-nat.c: Likewise.
5071 * ppc-linux-tdep.c: Likewise.
5072 * procfs.c: Likewise.
5073 * regcache.c: Likewise.
5074 * remote.c: Likewise.
5075 * rs6000-tdep.c: Likewise.
5076 * s390-linux-nat.c: Likewise.
5077 * s390-tdep.c: Likewise.
5078 * solib-aix.c: Likewise.
5079 * solib-darwin.c: Likewise.
5080 * solib-dsbt.c: Likewise.
5081 * solib-spu.c: Likewise.
5082 * solib-svr4.c: Likewise.
5083 * solib-target.c: Likewise.
5084 * sparc-tdep.c: Likewise.
5085 * sparc64-tdep.c: Likewise.
5086 * spu-tdep.c: Likewise.
5087 * symfile.c: Likewise.
5088 * symtab.c: Likewise.
5089 * target-descriptions.c: Likewise.
5090 * target-memory.c: Likewise.
5091 * target.c: Likewise.
5092 * target.h: Likewise.
5093 * tracefile-tfile.c: Likewise.
5094 * tracepoint.c: Likewise.
5095 * valops.c: Likewise.
5096 * valprint.c: Likewise.
5097 * value.c: Likewise.
5098 * windows-tdep.c: Likewise.
5099 * mi/mi-main.c: Likewise.
5100
5101 2018-06-07 Tom Tromey <tom@tromey.com>
5102
5103 * valprint.h (build_address_symbolic): Declare.
5104 * printcmd.c (print_address_symbolic): Update.
5105 (build_address_symbolic): Change "name" and "filename" to
5106 std::string.
5107 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5108 Update.
5109 * defs.h (build_address_symbolic): Remove declaration.
5110
5111 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5112
5113 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5114 (aarch64_vnv_type): Add function.
5115 (aarch64_pseudo_register_name): Add V regs for SVE.
5116 (aarch64_pseudo_register_type): Likewise.
5117 (aarch64_pseudo_register_reggroup_p): Likewise.
5118 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5119 (aarch64_pseudo_read_value): Add V regs for SVE.
5120 (aarch64_pseudo_write_2): Use V0 offset for SVE
5121 (aarch64_pseudo_write): Add V regs for SVE.
5122 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5123
5124 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5125
5126 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5127 (sve_vl_from_vq): Likewise.
5128
5129 2018-06-05 Tom Tromey <tom@tromey.com>
5130
5131 * cli/cli-cmds.c (show_version): Update.
5132 * top.c (print_gdb_version): Add "interactive" parameter.
5133 Update.
5134 * main.c (captured_main_1): Update.
5135 * top.h (print_gdb_version): Add "interactive" parameter and a
5136 comment.
5137
5138 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5139
5140 * common/enum-flags.h: Add trailing semicolon to example in
5141 comment.
5142
5143 2018-06-05 Tom Tromey <tom@tromey.com>
5144
5145 PR cli/12326:
5146 * NEWS: Add entry about pager.
5147 * utils.c (pagination_disabled_for_command): New global.
5148 (prompt_for_continue): Allow "c" response to prompt.
5149 (reinitialize_more_filter): Clear
5150 pagination_disabled_for_command.
5151 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5152
5153 2018-06-04 Tom Tromey <tom@tromey.com>
5154
5155 * ada-lang.h (ada_lookup_symbol_list): Update.
5156 * ada-lang.c (resolve_subexp): Update.
5157 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5158 parameter.
5159 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5160 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5161 results parameter to std::vector.
5162 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5163 Update.
5164 * ada-exp.y (block_lookup): Update.
5165 (select_possible_type_sym): Change type of syms. Remove nsyms
5166 parameter.
5167 (write_var_or_type, write_name_assoc): Update.
5168
5169 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5170
5171 * windows-nat.c (windows_nat_target::xfer_partial): Return
5172 TARGET_XFER_E_IO if we need to delegate to the target beneath
5173 but BENEATH is NULL.
5174
5175 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5176
5177 * Makefile.in (config.status): Add configure.nat as a
5178 dependency.
5179
5180 2018-06-04 Tom Tromey <tom@tromey.com>
5181
5182 * cp-name-parser.y (cpname_state): Add method declarations.
5183 (HANDLE_QUAL): Update.
5184 (cpname_state::d_grab, cpname_state::fill_comp)
5185 (cpname_state::make_operator, cpname_state::make_dtor)
5186 (cpname_state::make_builtin_type, cpname_state::make_name)
5187 (cpname_state::d_qualify, cpname_state::d_int_type)
5188 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5189 (%union): Move earlier.
5190
5191 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5192
5193 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5194
5195 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5196
5197 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5198 (aarch64_pseudo_write_1): Likewise.
5199 (aarch64_pseudo_read_value): Use helper.
5200 (aarch64_pseudo_write): Likewise.
5201
5202 2018-06-04 Pedro Alves <palves@redhat.com>
5203
5204 * darwin-nat.c (darwin_ops): Delete.
5205 (darwin_attach_pid): Use get_native_target.
5206
5207 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5208
5209 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5210 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5211
5212 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5213
5214 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5215 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5216 (aarch64_gdbarch_init): Check for SVE.
5217 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5218
5219 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5220
5221 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5222 * aarch64-tdep.h (aarch64_read_description): Likewise.
5223 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5224 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5225 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5226 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5227 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5228
5229 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5230
5231 * value.c (value_fetch_lazy_bitfield): New.
5232 (value_fetch_lazy_memory): New.
5233 (value_fetch_lazy_register): New.
5234 (value_fetch_lazy): Factor out to smaller functions.
5235
5236 2018-06-01 Tom Tromey <tom@tromey.com>
5237
5238 * cp-name-parser.y (backslashable, represented): Now const.
5239
5240 2018-06-01 Tom Tromey <tom@tromey.com>
5241
5242 * cp-name-parser.y: Include parser-defs.h.
5243 (parser_fprintf): Remove declaration.
5244
5245 2018-06-01 Tom Tromey <tom@tromey.com>
5246
5247 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5248 %parse-param.
5249 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5250 (global_result): Remove globals.
5251 (struct cpname_state): New.
5252 (yyparse): Don't declare.
5253 (yylex, yyerror): Move declarations after %union.
5254 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5255 (make_name): Add state parameter.
5256 Update all callers.
5257 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5258 parameter.
5259 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5260 Update.
5261 (yylex): Add lvalp, state parameters.
5262 (yyerror): Add state parameter.
5263 (cp_demangled_name_to_comp): Update.
5264
5265 2018-06-01 Tom Tromey <tom@tromey.com>
5266
5267 * cp-name-parser.y (parser_fprintf): Declare.
5268 (GDB_YY_REMAP_PREFIX): Define.
5269 Include yy-remap.h. Don't redefine yy* identifiers.
5270
5271 2018-06-01 Tom Tromey <tom@tromey.com>
5272
5273 * python/py-type.c (typy_legacy_template_argument): Update.
5274 * cp-support.h (cp_demangled_name_to_comp): Update.
5275 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5276 parameter to be a "std::string *".
5277 (main): Update.
5278
5279 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5280
5281 * ada-lex.l: Include "diagnostics.h" instead of
5282 "common/diagnostics.h".
5283 * unittests/environ-selftests.c: Likewise.
5284 * common/diagnostics.h: Moved to ../include.
5285
5286 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5287
5288 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5289 to language_mode_manual while calling breakpoint_re_set_one.
5290
5291 2018-06-01 Tom Tromey <tom@tromey.com>
5292
5293 * valops.c (value_cast_structs, destructor_name_p): Update.
5294 * symtab.c (gdb_mangle_name): Update.
5295 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5296 Update.
5297 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5298 (pascal_object_print_value_fields, pascal_object_print_value):
5299 Update.
5300 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5301 * linespec.c (find_methods): Update.
5302 * gdbtypes.h (type_name_no_tag): Remove.
5303 (type_name_or_error): Rename from type_name_no_tag_or_error.
5304 * gdbtypes.c (type_name_no_tag): Remove.
5305 (type_name_or_error): Rename from type_name_no_tag_or_error.
5306 (lookup_struct_elt_type, check_typedef): Update.
5307 * expprint.c (print_subexp_standard): Update.
5308 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5309 * d-namespace.c (d_lookup_nested_symbol): Update.
5310 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5311 (cp_print_class_member): Update.
5312 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5313 * completer.c (add_struct_fields): Update.
5314 * c-typeprint.c (cp_type_print_derivation_info)
5315 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5316 Update.
5317 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5318 (ada_prefer_type, ada_is_exception_sym): Update.
5319
5320 2018-06-01 Tom Tromey <tom@tromey.com>
5321
5322 * valops.c (enum_constant_from_type, value_namespace_elt)
5323 (value_maybe_namespace_elt): Update.
5324 * valarith.c (find_size_for_pointer_math): Update.
5325 * target-descriptions.c (make_gdb_type): Update.
5326 * symmisc.c (print_symbol): Update.
5327 * stabsread.c (define_symbol, read_type)
5328 (complain_about_struct_wipeout, add_undefined_type)
5329 (cleanup_undefined_types_1): Update.
5330 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5331 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5332 (rust_internal_print_type, rust_composite_type)
5333 (rust_evaluate_funcall, rust_evaluate_subexp)
5334 (rust_inclusive_range_type_p): Update.
5335 * python/py-type.c (typy_get_tag): Update.
5336 * p-typeprint.c (pascal_type_print_base): Update.
5337 * mdebugread.c (parse_symbol, parse_type): Update.
5338 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5339 Update.
5340 * guile/scm-type.c (gdbscm_type_tag): Update.
5341 * go-lang.c (sixg_string_p): Update.
5342 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5343 Update.
5344 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5345 (TYPE_TAG_NAME): Remove.
5346 * gdbtypes.c (type_name_no_tag): Simplify.
5347 (check_typedef, check_types_equal, recursive_dump_type)
5348 (copy_type_recursive, arch_composite_type): Update.
5349 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5350 in summary mode when needed.
5351 * eval.c (evaluate_funcall): Update.
5352 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5353 (process_structure_scope, read_enumeration_type)
5354 (read_namespace_type, read_module_type, determine_prefix): Update.
5355 * cp-support.c (inspect_type): Update.
5356 * coffread.c (process_coff_symbol, decode_base_type): Update.
5357 * c-varobj.c (c_is_path_expr_parent): Update.
5358 * c-typeprint.c (c_type_print_base_struct_union): Update.
5359 (c_type_print_base_1): Update. Print struct/class/union/enum in
5360 summary when using C language.
5361 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5362 (gen_maybe_namespace_elt): Update.
5363 * ada-lang.c (ada_type_name): Simplify.
5364 (empty_record, ada_template_to_fixed_record_type_1)
5365 (template_to_static_fixed_type)
5366 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5367
5368 2018-06-01 Tom Tromey <tom@tromey.com>
5369
5370 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5371 c_print_type.
5372 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5373 (c_print_type): Update.
5374 (c_print_type): New overload.
5375 (c_type_print_varspec_prefix, c_type_print_args)
5376 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5377 (c_type_print_base_struct_union, c_type_print_base_1)
5378 (cp_type_print_method_args): Add "language" parameter.
5379 (c_type_print_base): Update.
5380 * c-lang.h (c_print_type): Add new overload.
5381
5382 2018-06-01 Tom Tromey <tom@tromey.com>
5383
5384 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5385 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5386
5387 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5388
5389 * aarch64-tdep.c (aarch64_sve_register_names): New const
5390 var.
5391 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5392 (AARCH64_SVE_Z_REGS_NUM): New define.
5393 (AARCH64_SVE_P_REGS_NUM): Likewise.
5394 (AARCH64_SVE_NUM_REGS): Likewise.
5395
5396 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5397
5398 * nat/linux-ptrace.h [__alpha__]
5399 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5400 definitions.
5401
5402 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5403
5404 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5405 the endianness selected.
5406 * NEWS: Document `set endian auto' mode operation update.
5407
5408 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5409
5410 * Makefile.in: Add new header.
5411 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5412 (sve_vl_from_vg): Likewise.
5413 (sve_vq_from_vl): Likewise.
5414 (sve_vl_from_vq): Likewise.
5415 (sve_vq_from_vg): Likewise.
5416 (sve_vg_from_vq): Likewise.
5417 * configure.nat: Add new c file.
5418 * nat/aarch64-sve-linux-ptrace.c: New file.
5419 * nat/aarch64-sve-linux-ptrace.h: New file.
5420
5421 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5422
5423 * aarch64-linux-nat.c (aarch64_linux_read_description):
5424 Add parmeter zero.
5425 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5426 Likewise.
5427 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5428 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5429 (aarch64_gdbarch_init): Add parmeter zero.
5430 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5431 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5432 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5433 parmeter.
5434 * doc/gdb.texinfo: Describe SVE feature
5435 * features/aarch64-sve.c: New file.
5436
5437 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5438
5439 PR gdb/23210
5440 * gdbarch.sh (significant_addr_bit): Default to zero when
5441 not set by target architecture.
5442 * gdbarch.c: Re-generated.
5443 * utils.c (address_significant): Update.
5444
5445 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5446
5447 * stack.c (func_command): Remove trailing newline in call to error.
5448
5449 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5450
5451 * regcache.h (regcache_raw_collect): Remove, update callers to
5452 use regcache::raw_collect.
5453 * regcache.c (regcache_raw_collect): Remove.
5454
5455 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5456
5457 * regcache.h (regcache_raw_supply): Remove, update callers to
5458 use detached_regcache::raw_supply.
5459 * regcache.c (regcache_raw_supply): Remove.
5460
5461 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5462
5463 * regcache.h (regcache_cooked_write_part): Remove, update
5464 callers to use regcache::cooked_write_part.
5465 * regcache.c (regcache_cooked_write_part): Remove.
5466
5467 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5468
5469 * regcache.h (regcache_cooked_read_part): Remove, update callers
5470 to use readable_regcache::cooked_read_part.
5471 * regcache.c (regcache_cooked_read_part): Remove.
5472
5473 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5474
5475 * regcache.h (regcache_cooked_read_value): Remove, update
5476 callers to use readable_regcache::cooked_read_value.
5477 * regcache.c (regcache_cooked_read_value): Remove.
5478
5479 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5480
5481 * regcache.h (regcache_cooked_write): Remove, update callers to
5482 use regcache::cooked_write.
5483 * regcache.c (regcache_cooked_write): Remove.
5484
5485 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5486
5487 * regcache.h (regcache_invalidate): Remove, update callers to
5488 use detached_regcache::invalidate instead.
5489 * regcache.c (regcache_invalidate): Remove.
5490
5491 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5492
5493 * regcache.h (regcache_raw_write_part): Remove, update callers
5494 to use regcache::raw_write_part instead.
5495 * regcache.c (regcache_raw_write_part): Remove.
5496
5497 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 * regcache.h (regcache_raw_read_part): Remove, update callers to
5500 use readable_regcache::raw_read_part instead.
5501 * regcache.c (regcache_raw_read_part): Remove.
5502
5503 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5504
5505 * regcache.h (regcache_cooked_read): Remove, update callers to
5506 use readable_regcache::cooked_read instead.
5507 * regcache.c (regcache_cooked_read): Remove.
5508
5509 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5510
5511 * regcache.h (regcache_raw_write): Remove, update callers to use
5512 regcache::raw_write instead.
5513 * regcache.c (regcache_raw_write): Remove.
5514
5515 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5516
5517 * regcache.h (regcache_raw_read): Remove, update callers to use
5518 readable_regcache::raw_read instead.
5519 * regcache.c (regcache_raw_read): Remove.
5520
5521 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5522
5523 * regcache.h (regcache_raw_update): Remove, update callers to
5524 use readable_regcache::raw_update instead.
5525 * regcache.c (regcache_raw_update): Remove.
5526
5527 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5528
5529 * regcache.h (regcache_register_status): Remove, update callers
5530 to use reg_buffer::get_register_status directly instead.
5531 * regcache.c (regcache_register_status): Remove.
5532
5533 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5534
5535 * regcache.h (regcache_get_ptid): Remove, update all callers to
5536 call regcache::ptid instead.
5537 * regcache.c (regcache_get_ptid): Remove.
5538
5539 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5540
5541 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5542
5543 2018-05-30 Pedro Alves <palves@redhat.com>
5544
5545 * common/common-exceptions.h (exception_rethrow): Use
5546 ATTRIBUTE_NORETURN.
5547
5548 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5549
5550 * breakpoint.c (print_solib_event, check_status_catch_solib):
5551 Remove struct keyword in range-based for loops.
5552 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5553 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5554 Likewise.
5555 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5556 Likewise.
5557 * symfile.c (addr_info_make_relative): Likewise.
5558 * thread.c (value_in_thread_stack_temporaries): Likewise.
5559
5560 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5561
5562 PR gdb/16841
5563 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5564 aggregate type to get its real type before accessing it.
5565
5566 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5567
5568 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5569 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5570 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5571 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5572 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5573 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5574 * printcmd.c (info_address_command): Likewise.
5575
5576 2018-05-29 Tom Tromey <tom@tromey.com>
5577
5578 * windows-nat.c (handle_exception): Update fall-through comment.
5579
5580 2018-05-29 Tom Tromey <tom@tromey.com>
5581
5582 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5583 (struct program_space) <added_solibs>: Now a std::vector.
5584 * breakpoint.c (print_solib_event): Update.
5585 (check_status_catch_solib): Update.
5586 * progspace.c (clear_program_space_solib_cache): Update.
5587 * solib.c (update_solib_list): Update.
5588
5589 2018-05-29 Tom Tromey <tom@tromey.com>
5590
5591 * python/py-type.c (typy_richcompare): Update.
5592 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5593 * gdbtypes.h (types_deeply_equal): Return bool.
5594 (types_equal): Likewise.
5595 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5596 declare VEC.
5597 (check_types_equal): Change worklist to std::vector. Return
5598 bool.
5599 (struct type_equality_entry): Add constructor.
5600 (compare_maybe_null_strings): Return bool.
5601 (check_types_worklist): Return bool. Change worklist to
5602 std::vector.
5603 (types_deeply_equal): Use std::vector.
5604 (types_equal): Return bool.
5605 (compare_maybe_null_strings): Simplify.
5606
5607 2018-05-29 Tom Tromey <tom@tromey.com>
5608
5609 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5610
5611 2018-05-29 Tom Tromey <tom@tromey.com>
5612
5613 * objc-lang.h: Don't include cp-support.h.
5614 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5615 declare VEC.
5616
5617 2018-05-27 Tom Tromey <tom@tromey.com>
5618
5619 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5620
5621 2018-05-25 Tom Tromey <tom@tromey.com>
5622
5623 * value.c (value::location): Initialize.
5624
5625 2018-05-25 Tom Tromey <tom@tromey.com>
5626
5627 * dbxread.c (init_bincl_list): Remove.
5628 (bincl_list): Now a std::vector.
5629 (bincls_allocated, next_bincl): Remove.
5630 (free_bincl_list, do_free_bincl_list_cleanup)
5631 (make_cleanup_free_bincl_list): Remove.
5632 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5633 unique_xmalloc_ptr.
5634 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5635 (struct header_file_location): Add constructor.
5636 (add_bincl_to_list): Remove.
5637
5638 2018-05-25 Tom Tromey <tom@tromey.com>
5639
5640 * tui/tui.c (tui_enable): Update.
5641 * mi/mi-interp.c (mi_interp::init): Update.
5642 * interps.h (class interp) <name>: New method.
5643 <m_name>: Rename from name.
5644 (~scoped_restore_interp): Update.
5645 * interps.c (interp::interp): Update.
5646 (interp_add, interp_set, interp_lookup_existing)
5647 (current_interp_named_p): Update.
5648
5649 2018-05-25 Tom Tromey <tom@tromey.com>
5650
5651 * interps.c (interp_name): Remove.
5652 * mi/mi-interp.c (mi_interp::init): Update.
5653 * interps.h (interp_name): Remove.
5654 (~scoped_restore_interp): Update.
5655 * tui/tui.c (tui_enable): Update.
5656
5657 2018-05-25 Tom Tromey <tom@tromey.com>
5658
5659 * utils.c (fputs_maybe_filtered): Update.
5660 * linespec.c (decode_line_full): Update.
5661 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5662 (mi_print_breakpoint_for_event, mi_solib_loaded)
5663 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5664 (mi_user_selected_context_changed): Update.
5665 * mi/mi-main.c (mi_execute_command): Update.
5666 * cli/cli-script.c (execute_control_command): Update.
5667 * python/python.c (execute_gdb_command): Update.
5668 * solib.c (info_sharedlibrary_command): Update.
5669 * interps.c (interp_ui_out): Remove.
5670 * interps.h (interp_ui_out): Remove.
5671
5672 2018-05-25 Tom Tromey <tom@tromey.com>
5673
5674 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5675 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5676 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5677
5678 2018-05-25 Tom Tromey <tom@tromey.com>
5679
5680 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5681 * interps.c (interp_exec): Use scoped_restore.
5682
5683 2018-05-25 Tom Tromey <tom@tromey.com>
5684
5685 * remote.c (remote_target::remote_file_get): Use
5686 gdb::byte_vector.
5687 (remote_target::remote_file_put): Likewise.
5688
5689 2018-05-25 Tom Tromey <tom@tromey.com>
5690
5691 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5692 a std::string.
5693 (get_pe_section_index, add_pe_exported_sym): Update.
5694 (read_pe_exported_syms): Use gdb::def_vector.
5695
5696 2018-05-25 Tom Tromey <tom@tromey.com>
5697
5698 * frame.c (remove_prev_frame): Remove.
5699 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5700
5701 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5702
5703 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5704 Remove prototypes.
5705 * mips-linux-nat.c (supply_fpregset): Always call
5706 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5707 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5708 `mips_fill_fpregset'.
5709 * mips-linux-tdep.c (mips_supply_fpregset)
5710 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5711 (mips_fill_fpregset_wrapper): Remove functions.
5712 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5713 (mips_linux_fpregset): Remove variable.
5714 (mips_linux_iterate_over_regset_sections): Use
5715 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5716 (mips_linux_o32_sigframe_init): Remove comment.
5717
5718 2018-05-25 Pedro Alves <palves@redhat.com>
5719
5720 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5721 (struct readahead_cache, struct packet_reg, struct
5722 remote_arch_state, class remote_state): Move higher up in the
5723 file.
5724 (remote_target::m_remote_state): Now an object instead of a pointer.
5725 (remote_target::get_remote_state): Adjust.
5726
5727 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5728
5729 * stack.c (select_and_print_frame): Delete.
5730 (struct function_bounds): Move struct within function.
5731 (func_command): Most content moved into new function
5732 find_frame_for_function, use new function, print result, add
5733 function comment.
5734 (find_frame_for_function): New function, now returns a result.
5735
5736 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5737
5738 * stack.c (iterate_over_block_arg_vars): Fix comment.
5739 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5740
5741 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5742
5743 PR gdb/23203
5744 * frame.c
5745 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5746 Define.
5747 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5748 Define.
5749 * frame.h (class scoped_restore_selected_frame): New class.
5750 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5751 of any exception, use scoped_restore_selected_frame to restore the
5752 frame instead.
5753
5754 2018-05-24 Pedro Alves <palves@redhat.com>
5755
5756 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5757 override.
5758
5759 2018-05-23 Tom Tromey <tom@tromey.com>
5760
5761 * complaints.c (struct complaints): Remove.
5762 (symfile_complaint_book): Remove.
5763 (series): New global.
5764 (complaint_internal): Update.
5765 (clear_complaints): Update.
5766
5767 2018-05-23 Tom Tromey <tom@tromey.com>
5768
5769 * complaints.c (counters): New global.
5770 (struct complain): Remove.
5771 (struct complaints) <root>: Remove.
5772 (complaint_sentinel): Remove.
5773 (symfile_complaint_book): Update.
5774 (find_complaint) Remove.
5775 (complaint_internal, clear_complaints): Update.
5776
5777 2018-05-23 Tom Tromey <tom@tromey.com>
5778
5779 * complaints.c (struct complain) <file, line>: Remove.
5780 (find_complaint): Remove file, line parameters.
5781 (complaint_internal): Update.
5782
5783 2018-05-23 Tom Tromey <tom@tromey.com>
5784
5785 * complaints.c (vcomplaint): Remove.
5786 (complaint_internal) Merge in contents of vcomplaint.
5787
5788 2018-05-23 Tom Tromey <tom@tromey.com>
5789
5790 * complaints.c (struct complaints) <explanation>: Remove.
5791 (symfile_explanations): Remove.
5792 (symfile_complaint_book): Update.
5793 (vcomplaint): Update.
5794 (struct explanation): Remove.
5795
5796 2018-05-23 Tom Tromey <tom@tromey.com>
5797
5798 * complaints.c (symfile_complaints): Remove.
5799 (complaint_internal): Remove "complaints" parameter.
5800 (clear_complaints, vcomplaint): Remove "c" parameter.
5801 (get_complaints): Remove.
5802 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5803 (dwarf2_debug_line_missing_file_complaint)
5804 (dwarf2_debug_line_missing_end_sequence_complaint)
5805 (dwarf2_complex_location_expr_complaint)
5806 (dwarf2_const_value_length_mismatch_complaint)
5807 (dwarf2_section_buffer_overflow_complaint)
5808 (dwarf2_macro_malformed_definition_complaint)
5809 (dwarf2_invalid_attrib_class_complaint)
5810 (create_addrmap_from_index, dw2_symtab_iter_next)
5811 (dw2_expand_marked_cus)
5812 (dw2_debug_names_iterator::find_vec_in_debug_names)
5813 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5814 (create_debug_type_hash_table, init_cutu_and_read_dies)
5815 (partial_die_parent_scope, add_partial_enumeration)
5816 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5817 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5818 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5819 (create_cus_hash_table, create_dwp_hash_table)
5820 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5821 (dwarf2_rnglists_process, dwarf2_ranges_process)
5822 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5823 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5824 (handle_struct_member_die, process_structure_scope)
5825 (read_array_type, read_common_block, read_module_type)
5826 (read_tag_pointer_type, read_typedef, read_base_type)
5827 (read_subrange_type, load_partial_dies, partial_die_info::read)
5828 (partial_die_info::read, partial_die_info::read)
5829 (partial_die_info::read, read_checked_initial_length_and_offset)
5830 (dwarf2_string_attr, read_formatted_entries)
5831 (dwarf_decode_line_header)
5832 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5833 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5834 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5835 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5836 (get_signatured_type, get_DW_AT_signature_type)
5837 (decode_locdesc, file_file_name, consume_improper_spaces)
5838 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5839 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5840 (dwarf2_symbol_mark_computed, set_die_type)
5841 (read_attribute_value): Update.
5842 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5843 Update.
5844 * dbxread.c (unknown_symtype_complaint)
5845 (lbrac_mismatch_complaint, repeated_header_complaint)
5846 (set_namestring, function_outside_compilation_unit_complaint)
5847 (read_dbx_symtab, process_one_symbol): Update.
5848 * gdbtypes.c (stub_noname_complaint): Update.
5849 * windows-nat.c (handle_unload_dll): Update.
5850 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5851 (decode_base_type): Update.
5852 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5853 (eb_complaint, record_include_begin, record_include_end)
5854 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5855 (process_xcoff_symbol, read_symbol)
5856 (function_outside_compilation_unit_complaint)
5857 (scan_xcoff_symtab): Update.
5858 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5859 * buildsym.c (finish_block_internal, make_blockvector)
5860 (end_symtab_get_static_block, augment_type_symtab): Update.
5861 * dtrace-probe.c (dtrace_process_dof)
5862 (dtrace_static_probe_ops::get_probes): Update.
5863 * complaints.h (struct complaint): Don't declare.
5864 (symfile_complaints): Remove.
5865 (complaint_internal): Remove "complaints" parameter.
5866 (complaint): Likewise.
5867 (clear_complaints): Likewise.
5868 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5869 (reread_symbols): Update.
5870 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5871 (dwarf2_frame_cache, decode_frame_entry): Update.
5872 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5873 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5874 (info_selectors_command): Update.
5875 * macrotab.c (macro_include, check_for_redefinition)
5876 (macro_undef): Update.
5877 * objfiles.c (filter_overlapping_sections): Update.
5878 * stabsread.c (invalid_cpp_abbrev_complaint)
5879 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5880 (define_symbol, error_type, read_type, rs6000_builtin_type)
5881 (stabs_method_name_from_physname, read_member_functions)
5882 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5883 (attach_fields_to_type, complain_about_struct_wipeout)
5884 (read_range_type, read_args, common_block_start)
5885 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5886 Update.
5887 * mdebugread.c (index_complaint, unknown_ext_complaint)
5888 (basic_type_complaint, bad_tag_guess_complaint)
5889 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5890 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5891 (parse_procedure, parse_lines)
5892 (function_outside_compilation_unit_complaint)
5893 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5894 (bad_tag_guess_complaint, reg_value_complaint): Update.
5895 * cp-support.c (demangled_name_complaint): Update.
5896 * macroscope.c (sal_macro_scope): Update.
5897 * dwarf-index-write.c (class debug_names): Update.
5898
5899 2018-05-23 Tom Tromey <tom@tromey.com>
5900
5901 * complaints.c (clear_complaints): Remove "noisy" parameter.
5902 * complaints.h (clear_complaints): Update.
5903 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5904 (reread_symbols): Update.
5905
5906 2018-05-23 Tom Tromey <tom@tromey.com>
5907
5908 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5909 SUBSEQUENT_MESSAGE.
5910 (vcomplaint, clear_complaints): Update.
5911 (symfile_explanations): Remove some messages.
5912
5913 2018-05-23 Tom Tromey <tom@tromey.com>
5914
5915 * complaints.c (internal_complaint): Remove.
5916 * complaints.h (internal_complaint): Remove.
5917
5918 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5919
5920 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5921
5922 2018-05-22 Pedro Alves <palves@redhat.com>
5923
5924 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5925 (remote_fileio_badfd, remote_fileio_return_errno)
5926 (remote_fileio_return_success, remote_fileio_func_open)
5927 (remote_fileio_func_open, remote_fileio_func_close)
5928 (remote_fileio_func_read, remote_fileio_func_write)
5929 (remote_fileio_func_lseek, remote_fileio_func_rename)
5930 (remote_fileio_func_unlink, remote_fileio_func_stat)
5931 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5932 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5933 remote_target parameter.
5934 (remote_fio_func_map) <func>: Add remote_target parameter.
5935 (do_remote_fileio_request, remote_fileio_request):
5936 * remote-fileio.h (remote_fileio_request):
5937 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5938 remote_target parameter.
5939 (remote_notif_process, handle_notification): Adjust to pass down
5940 the remote.
5941 (remote_notif_state_allocate): Add remote_target parameter. Save
5942 it.
5943 * remote-notif.h (struct remote_target): Forward declare.
5944 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5945 remote_target parameter.
5946 (struct remote_notif_state) <remote>: New field.
5947 (remote_notif_ack, remote_notif_parse): Add remote_target
5948 parameter.
5949 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5950 remote_target parameter.
5951 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5952 (threads_listing_context, rmt_thread_action, protocol_feature)
5953 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5954 (packet_result, struct threads_listing_context, remote_state):
5955 Move definitions and declarations higher up.
5956 (remote_target) <~remote_target>: Declare.
5957 (remote_download_command_source, remote_file_put, remote_file_get)
5958 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5959 (remote_hostio_pread_vFile, remote_hostio_send_command)
5960 (remote_hostio_set_filesystem, remote_hostio_open)
5961 (remote_hostio_close, remote_hostio_unlink, remote_state)
5962 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5963 (get_memory_write_packet_size, get_memory_read_packet_size)
5964 (append_pending_thread_resumptions, remote_detach_1)
5965 (append_resumption, remote_resume_with_vcont)
5966 (add_current_inferior_and_thread, wait_ns, wait_as)
5967 (process_stop_reply, remote_notice_new_inferior)
5968 (process_initial_stop_replies, remote_add_thread)
5969 (btrace_sync_conf, remote_btrace_maybe_reopen)
5970 (remove_new_fork_children, kill_new_fork_children)
5971 (discard_pending_stop_replies, stop_reply_queue_length)
5972 (check_pending_events_prevent_wildcard_vcont)
5973 (discard_pending_stop_replies_in_queue, stop_reply)
5974 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5975 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5976 (remote_interrupt_as, remote_interrupt_ns)
5977 (remote_get_noisy_reply, remote_query_attached)
5978 (remote_add_inferior, remote_current_thread, get_current_thread)
5979 (set_thread, set_general_thread, set_continue_thread)
5980 (set_general_process, write_ptid)
5981 (remote_unpack_thread_info_response, remote_get_threadinfo)
5982 (parse_threadlist_response, remote_get_threadlist)
5983 (remote_threadlist_iterator, remote_get_threads_with_ql)
5984 (remote_get_threads_with_qxfer)
5985 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5986 (get_offsets, remote_check_symbols, remote_supported_packet)
5987 (remote_query_supported, remote_packet_size)
5988 (remote_serial_quit_handler, remote_detach_pid)
5989 (remote_vcont_probe, remote_resume_with_hc)
5990 (send_interrupt_sequence, interrupt_query)
5991 (remote_notif_get_pending_events, fetch_register_using_p)
5992 (send_g_packet, process_g_packet, fetch_registers_using_g)
5993 (store_register_using_P, store_registers_using_G)
5994 (set_remote_traceframe, check_binary_download)
5995 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5996 (remote_xfer_live_readonly_partial, remote_read_bytes)
5997 (remote_send_printf, remote_flash_write, readchar)
5998 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5999 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6000 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6001 (extended_remote_disable_randomization, extended_remote_run)
6002 (send_environment_packet, extended_remote_environment_support)
6003 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6004 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6005 (packet_command): Now methods of ...
6006 (remote_target): ... this class.
6007 (m_remote_state) <remote_target>: New field.
6008 (struct remote_state) <stop_reply_queue,
6009 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6010 fields.
6011 (remote_state::remote_state): Allocate stop_reply_queue.
6012 (remote_state): Delete global.
6013 (get_remote_state_raw): Delete.
6014 (remote_target::get_remote_state): Allocate m_remote_state on
6015 demand.
6016 (get_current_remote_target): New.
6017 (remote_ops, extended_remote_ops): Delete.
6018 (wait_forever_enabled_p, remote_async_inferior_event_token):
6019 Delete, moved to struct remote_state.
6020 (remote_target::close): Delete self. Destruction bits split to
6021 ...
6022 (remote_target::~remote_target): ... this.
6023 (show_memory_packet_size): Adjust to use
6024 get_current_remote_target.
6025 (struct protocol_feature) <func>: Add remote_target parameter.
6026 All callers adjusted.
6027 (curr_quit_handler_target): New.
6028 (remote_serial_quit_handler): Reimplement.
6029 (remote_target::open_1): Adjust to use get_current_remote_target.
6030 Heap-allocate remote_target/extended_remote_target instances.
6031 (vcont_builder::vcont_builder): Add remote_target parameter, and
6032 save it in m_remote. All callers adjusted.
6033 (vcont_builder::m_remote): New field.
6034 (vcont_builder::restart, vcont_builder::flush)
6035 (vcont_builder::push_action): Use it.
6036 (remote_target::commit_resume): Use it.
6037 (struct queue_iter_param) <remote>: New field.
6038 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6039 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6040 (check_pending_event_prevents_wildcard_vcont_callback)
6041 (remote_target::check_pending_events_prevent_wildcard_vcont)
6042 (remote_target::discard_pending_stop_replies)
6043 (remote_target::discard_pending_stop_replies_in_queue)
6044 (remote_target::remote_notif_remove_queued_reply): Fill in
6045 'remote' field.
6046 (remote_notif_get_pending_events): New.
6047 (remote_target::readchar, remote_target::remote_serial_write):
6048 Save/restore curr_quit_handler_target.
6049 (putpkt): New.
6050 (kill_new_fork_children): Fill in 'remote' field.
6051 (packet_command): Use get_current_remote_target, defer to
6052 remote_target method of same name.
6053 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6054 parameter, and save it in m_remote. All callers adjusted.
6055 (scoped_remote_fd::release): Use m_remote.
6056 (scoped_remote_fd::m_remote): New field.
6057 (remote_file_put, remote_file_get, remote_file_delete): Use
6058 get_current_remote_target, defer to remote_target method of same
6059 name.
6060 (remote_btrace_reset): Add remote_state paremeter. Update all
6061 callers.
6062 (remote_async_inferior_event_handler). Pass down 'data'.
6063 (remote_new_objfile): Use get_current_remote_target.
6064 (remote_target::vcont_r_supported): New.
6065 (set_range_stepping): Use get_current_remote_target and
6066 remote_target::vcont_r_supported.
6067 (_initialize_remote): Don't allocate 'remote_state' and
6068 'stop_reply_queue' globals.
6069 * remote.h (struct remote_target): Forward declare.
6070 (getpkt, putpkt, remote_notif_get_pending_events): Add
6071 'remote_target' parameter.
6072
6073 2018-05-22 Pedro Alves <palves@redhat.com>
6074
6075 * remote.c (vcont_builder): Now a class. Make all data members
6076 private.
6077 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6078 Declare methods.
6079 (vcont_builder_restart): Rename to ...
6080 (vcont_builder::restart): ... this.
6081 (vcont_builder_flush): Rename to ...
6082 (vcont_builder::flush): ... this.
6083 (vcont_builder_push_action): Rename to ...
6084 (vcont_builder::push_action): ... this.
6085 (remote_target::commit_resume): Adjust.
6086
6087 2018-05-22 Pedro Alves <palves@redhat.com>
6088
6089 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6090 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6091 (get_fixed_memory_packet_size): New.
6092 (get_memory_packet_size): Use it.
6093 (set_memory_packet_size): Don't override the config size with
6094 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6095 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6096 Don't refer to get_memory_packet_size if not connected to a remote
6097 target. Show "(default)" if configured size is 0.
6098
6099 2018-05-22 Pedro Alves <palves@redhat.com>
6100
6101 * remote.c (remote_target::mourn_inferior): Move
6102 discard_pending_stop_replies call here from ...
6103 (_initialize_remote): ... here.
6104
6105 2018-05-22 Pedro Alves <palves@redhat.com>
6106
6107 * remote.c (compare_section_command): Remove set_general_process
6108 call.
6109
6110 2018-05-22 Pedro Alves <palves@redhat.com>
6111
6112 * remote.c (struct packet_reg, struct remote_arch_state):
6113 Move higher up in the file.
6114 (remote_state) <m_arch_states>: Store remote_arch_state values
6115 instead of remote_arch_state pointers.
6116 (remote_state::get_remote_arch_state): Adjust.
6117
6118 2018-05-22 Pedro Alves <palves@redhat.com>
6119
6120 * remote.c: Include <unordered_map>.
6121 (remote_state): Now a class.
6122 (remote_state) <get_remote_arch_state>: Declare method.
6123 <get_remote_arch_state>: New field.
6124 (remote_arch_state) <remote_arch_state>: Declare ctor.
6125 <regs>: Now a unique_ptr.
6126 (remote_gdbarch_data_handle): Delete.
6127 (get_remote_arch_state): Delete.
6128 (remote_state::get_remote_arch_state): New.
6129 (get_remote_state): Adjust to call remote_state's
6130 get_remote_arch_state method.
6131 (init_remote_state): Delete, bits factored out to ...
6132 (remote_arch_state::remote_arch_state): ... this new method.
6133 (get_remote_packet_size, get_memory_packet_size)
6134 (process_g_packet, remote_target::fetch_registers)
6135 (remote_target::prepare_to_store, store_registers_using_G)
6136 (remote_target::store_registers, remote_target::get_trace_status):
6137 Adjust to call remote_state's method.
6138 (_initialize_remote): Remove reference to
6139 remote_gdbarch_data_handle.
6140
6141 2018-05-22 Pedro Alves <palves@redhat.com>
6142
6143 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6144 pread>: New method declarations.
6145 (remote_target::open_1): Adjust.
6146 (readahead_cache_invalidate): Rename to ...
6147 (readahead_cache::invalidate): ... this, and adjust to be a class
6148 method.
6149 (readahead_cache_invalidate_fd): Rename to ...
6150 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6151 class method.
6152 (remote_hostio_pwrite): Adjust.
6153 (remote_hostio_pread_from_cache): Rename to ...
6154 (readahead_cache::pread): ... this, and adjust to be a class
6155 method.
6156 (remote_hostio_close): Adjust.
6157
6158 2018-05-22 Pedro Alves <palves@redhat.com>
6159
6160 * remote.c (remote_hostio_close_cleanup): Delete.
6161 (class scoped_remote_fd): New.
6162 (remote_file_put, remote_file_get): Use it.
6163
6164 2018-05-22 Pedro Alves <palves@redhat.com>
6165
6166 (struct vCont_action_support): Use bool and initialize all fields.
6167 (struct readahead_cache): Initialize all fields.
6168 (remote_state): Use bool and initialize all fields.
6169 (remote_state::remote_state, remote_state::~remote_state): New.
6170 (new_remote_state): Delete.
6171 (_initialize_remote): Use new to allocate remote_state.
6172
6173 2018-05-22 Pedro Alves <palves@redhat.com>
6174 張俊芝 <zjz@zjz.name>
6175
6176 PR gdb/22973
6177 * c-exp.y: Include "c-support.h".
6178 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6179 of tolower. Use c_ident_is_alpha to scan names.
6180 * c-lang.c: Include "c-support.h".
6181 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6182 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6183 * c-support.h: New file, with bits factored out from ...
6184 * cp-name-parser.y: ... this file.
6185 Include "c-support.h".
6186 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6187 c-support.h and renamed.
6188 (symbol_end, yylex): Adjust.
6189
6190 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6191
6192 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6193 parameter type to CORE_ADDR.
6194 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6195 parameter type in declaration to CORE_ADDR.
6196 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6197 target_auxv_search to get AT_HWCAP and use the result to get the
6198 target description.
6199 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6200 to CORE_ADDR. Remove the cast of the return value to unsigned
6201 long. Fix error predicate of target_auxv_search.
6202 (ppc_linux_nat_target::read_description): Change the type of the
6203 hwcap variable to CORE_ADDR.
6204
6205 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6206
6207 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6208 if the size of fpscr is larger than 32 bits.
6209
6210 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6211
6212 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6213 (ppc32_linux_vsxregmap): New global.
6214 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6215 regcache_supply_regset, and regcache_collect_regset.
6216 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6217 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6218 (fetch_vsx_register, store_vsx_register): Remove.
6219 (fetch_vsx_registers): Add regno parameter. Get regset using
6220 ppc_linux_vsxregset. Use regset to supply registers.
6221 (store_vsx_registers): Add regno parameter. Get regset using
6222 ppc_linux_vsxregset. Use regset to collect registers.
6223 (fetch_register): Call fetch_vsx_registers instead of
6224 fetch_vsx_register.
6225 (store_register): Call store_vsx_registers instead of
6226 store_vsx_register.
6227 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6228 new regno parameter.
6229 (store_ppc_registers): Call store_vsx_registers with -1 for the
6230 new regno parameter.
6231 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6232 (ppc_collect_vsxregset): Remove.
6233
6234 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6235
6236 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6237 offset fields.
6238 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6239 for vector register offset fields.
6240 (ppc64_fbsd_reg_offsets): Likewise.
6241 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6242 to vector register offset fields.
6243 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6244 to vector register offset fields.
6245 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6246 vector register offset fields.
6247 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6248 initializers for vector register offset fields.
6249 (rs6000_aix64_reg_offsets): Likewise.
6250 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6251 (ppc_supply_vrregset): Remove.
6252 (ppc_collect_vrregset): Remove.
6253 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6254 (ppc_linux_vrregset) : New function.
6255 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6256 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6257 (ppc32_linux_vrregset): Remove.
6258 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6259 and use result instead of ppc32_linux_vrregset.
6260 (ppc32_linux_reg_offsets): Remove initializers for vector register
6261 offset fields.
6262 (ppc64_linux_reg_offsets): Likewise.
6263 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6264 * ppc-linux-nat.c: Include regset.h.
6265 (gdb_vrregset_t): Adjust comment to account for little-endian
6266 mode.
6267 (supply_vrregset, fill_vrregset): Remove.
6268 (fetch_altivec_register, store_altivec_register): Remove.
6269 (fetch_altivec_registers): Add regno parameter. Get regset using
6270 ppc_linux_vrregset. Use regset to supply registers.
6271 (store_altivec_registers): Add regno parameter. Get regset using
6272 ppc_linux_vrregset. Use regset to collect registers.
6273 (fetch_register): Call fetch_altivec_registers instead of
6274 fetch_altivec_register.
6275 (store_register): Call store_altivec_registers instead of
6276 store_altivec_register.
6277 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6278 the new regno parameter.
6279 (store_ppc_registers): Call store_altivec_registers with -1 for
6280 the new regno parameter.
6281
6282 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6283
6284 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6285 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6286 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6287 (gdb_vrregset_t): Change array type size to
6288 PPC_LINUX_SIZEOF_VRREGSET.
6289 (gdb_vsxregset_t): Change array type size to
6290 PPC_LINUX_SIZEOF_VSXREGSET.
6291 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6292 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6293 PPC_LINUX_SIZEOF_VSXREGSET.
6294
6295 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6296
6297 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6298 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6299 nat/ppc-linux.c.
6300 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6301 ppc_linux_target_wordsize with tid.
6302 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6303 wordsize with tid.
6304 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6305 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6306 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6307 tid parameter. Remove static specifier.
6308 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6309 (ppc_linux_target_wordsize): New declaration.
6310
6311 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6312
6313 * arch/ppc-linux-common.c: New file.
6314 * arch/ppc-linux-common.h: New file.
6315 * arch/ppc-linux-tdesc.h: New file.
6316 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6317 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6318 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6319 arch/ppc-linux-tdesc.h.
6320 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6321 arch/ppc-linux-tdesc.h.
6322 (ppc_linux_nat_target::read_description): Remove target
6323 description matching code. Fill a ppc_linux_features struct and
6324 call ppc_linux_match_description with it. Move comment about ISA
6325 2.05 to ppc-linux-common.c.
6326 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6327 arch/ppc-linux-tdesc.h.
6328 (ppc_linux_core_read_description): Remove target description
6329 matching code. Fill a ppc_linux_features struct and call
6330 ppc_linux_match_description with it.
6331 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6332 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6333 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6334 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6335 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6336 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6337 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6338 (tdesc_powerpc_e500l): Remove.
6339
6340 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6341
6342 * ada-lang.c (catch_assert_command): Pass empty string instead
6343 of NULL for excep_string argument.
6344
6345 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6346
6347 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6348 the width of the requested register exceeds the width of the
6349 `ptrace' data type.
6350
6351 2018-05-21 Tom Tromey <tom@tromey.com>
6352
6353 * printcmd.c (output_command): Remove.
6354 (output_command_const): Rename to output_command.
6355 * valprint.h (output_command): Rename from output_command_const.
6356 * tracepoint.c (trace_dump_actions): Call output_command.
6357
6358 2018-05-21 Tom Tromey <tom@tromey.com>
6359
6360 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6361 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6362 * ada-lang.h (create_ada_exception_catchpoint): Update.
6363 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6364 std::string.
6365 (create_excep_cond_exprs, ~ada_catchpoint)
6366 (should_stop_exception, print_one_exception)
6367 (print_mention_exception, print_recreate_exception): Update.
6368 (ada_get_next_arg): Remove.
6369 (catch_ada_exception_command_split): Use std::string. Change type
6370 of "excep_string", "cond_string".
6371 (catch_ada_exception_command): Update.
6372 (create_ada_exception_catchpoint): Change type of excep_string.
6373 (ada_exception_sal): Remove excep_string parameter.
6374 (~ada_catchpoint): Remove.
6375
6376 2018-05-21 Tom Tromey <tom@tromey.com>
6377
6378 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6379 cleanup.
6380
6381 2018-05-21 Tom Tromey <tom@tromey.com>
6382
6383 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6384 Return unique_xmalloc_ptr.
6385 (print_it_exception): Update.
6386
6387 2018-05-21 Tom Tromey <tom@tromey.com>
6388
6389 * tracepoint.c (trace_dump_actions): Use std::string.
6390
6391 2018-05-21 Tom Tromey <tom@tromey.com>
6392
6393 * symfile.c (reread_symbols): Use std::string for original_name.
6394
6395 2018-05-21 Tom Tromey <tom@tromey.com>
6396
6397 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6398 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6399 constructor.
6400
6401 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6402
6403 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6404 instance to...
6405 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6406 * objfiles.c (get_objfile_bfd_data): Allocate
6407 objfile_per_bfd_storage with obstack_new when allocating on
6408 obstack.
6409
6410 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6411
6412 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6413 OBSTACK_ZALLOC.
6414 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6415 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6416 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6417 (add_pending): Likewise.
6418 (parse_symbol): Likewise.
6419 (parse_partial_symbols): Likewise.
6420 (psymtab_to_symtab_1): Likewise.
6421 (new_psymtab): Likewise.
6422 (elfmdebug_build_psymtabs): Likewise.
6423 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6424 * objfiles.c (get_objfile_bfd_data): Likewise.
6425 (objfile_register_static_link): Likewise.
6426 * psymtab.c (allocate_psymtab): Likewise.
6427 * stabsread.c (read_member_functions): Likewise.
6428 * xcoffread.c (xcoff_end_psymtab): Likewise.
6429
6430 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6431
6432 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6433 compiler supports std::is_trivially_constructible.
6434 * common/poison.h: Include obstack.h.
6435 (IsMallocable): Define to is_trivially_constructible if the
6436 compiler supports it, define to true_type otherwise.
6437 (xobnew): New.
6438 (XOBNEW): Redefine.
6439 (xobnewvec): New.
6440 (XOBNEWVEC): Redefine.
6441 * gdb_obstack.h (obstack_zalloc): New.
6442 (OBSTACK_ZALLOC): Redefine.
6443 (obstack_calloc): New.
6444 (OBSTACK_CALLOC): Redefine.
6445 (obstack_new): New.
6446 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6447 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6448 gdbarch.c.
6449 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6450 obstack_calloc/obstack_zalloc.
6451 (gdbarch_obstack_zalloc): Remove.
6452 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6453
6454 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6455
6456 * stack.c (backtrace_command_1): Remove useless variable int i.
6457
6458 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6459
6460 * stack.c (print_frame_info): Fix comment.
6461
6462 2018-05-18 Tom Tromey <tom@tromey.com>
6463
6464 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6465 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6466 (~dwarf2_per_objfile): Update
6467 (dwarf2_get_dwz_file): Use new.
6468 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6469 unique_ptr.
6470
6471 2018-05-18 Tom Tromey <tom@tromey.com>
6472
6473 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6474 unique_ptr.
6475 * dwarf2read.c (struct dwp_file): Add constructor and
6476 initializers.
6477 (open_and_init_dwp_file): Return a unique_ptr.
6478 (dwarf2_per_objfile, create_dwp_hash_table)
6479 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6480 (lookup_dwo_unit_in_dwp): Update.
6481 (open_and_init_dwp_file, get_dwp_file): Update.
6482
6483 2018-05-18 Tom Tromey <tom@tromey.com>
6484
6485 * dwarf2read.c (dwarf2_per_objfile): Update.
6486 (struct mapped_index): Add initializers.
6487 (dwarf2_read_index): Use new.
6488 (dw2_symtab_iter_init): Update.
6489 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6490 unique_ptr.
6491
6492 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6493
6494 * dwarf2read.c (mapped_index) <total_size>: Remove.
6495
6496 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6497
6498 * unittests/format_pieces-selftests.c (test_format_specifier):
6499 Add ARI comments.
6500
6501 2018-05-18 Tom Tromey <tom@tromey.com>
6502
6503 * c-typeprint.c (maybe_print_hole): New function.
6504 (c_print_type_struct_field_offset): Update.
6505 (c_type_print_base_struct_union): Call maybe_print_hole.
6506
6507 2018-05-17 Keith Seitz <keiths@redhat.com>
6508
6509 * breakpoint.c (build_bpstat_chain): New function, moved from
6510 bpstat_stop_status.
6511 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6512 If no stop chain is passed, call build_bpstat_chain to build it.
6513 * breakpoint.h (build_bpstat_chain): Declare.
6514 (bpstat_stop_status): Move documentation here from breakpoint.c.
6515 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6516 build the stop chain and pass it to skip_inline_frames.
6517 Pass this stop chain to bpstat_stop_status.
6518 * inline-frame.c: Include breakpoint.h.
6519 (stopped_by_user_bp_inline_frame): New function.
6520 (skip_inline_frames): Add parameter `stop_chain'.
6521 Move documention to inline-frame.h.
6522 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6523 whether the frame should be elided.
6524 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6525 Add moved documentation and update for new parameter.
6526
6527 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6528
6529 PR cli/14975
6530 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6531 unittests/format_pieces-selftests.c.
6532 * common/format.h (format_piece) <operator==>: New.
6533 (format_pieces) <operator[]>: Remove.
6534 * common/format.c (format_pieces::format_pieces): Handle \e.
6535 * unittests/format_pieces-selftests.c: New.
6536
6537 2018-05-17 Tom Tromey <tom@tromey.com>
6538
6539 PR symtab/23010:
6540 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6541 (dw2_instantiate_symtab): Add skip_partial parameter.
6542 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6543 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6544 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6545 (dw2_expand_symtabs_matching_one)
6546 (dw2_find_pc_sect_compunit_symtab)
6547 (dw2_debug_names_lookup_symbol)
6548 (dw2_debug_names_expand_symtabs_for_function): Update.
6549 (init_cutu_and_read_dies): Add skip_partial parameter.
6550 (process_psymtab_comp_unit, build_type_psymtabs_1)
6551 (process_skeletonless_type_unit, load_partial_comp_unit)
6552 (psymtab_to_symtab_1): Update.
6553 (load_full_comp_unit): Add skip_partial parameter.
6554 (process_imported_unit_die, dwarf2_read_addr_index)
6555 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6556 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6557 (read_signatured_type): Update.
6558
6559 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6560
6561 * value.c (release_value): Remove unused variable.
6562 (record_latest_value): Likewise.
6563 (access_value_history): Likewise.
6564 (preserve_values): Likewise.
6565
6566 2018-05-17 Tom Tromey <tom@tromey.com>
6567
6568 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6569 Initialize.
6570
6571 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6572
6573 PR gdb/22286
6574 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6575 Also handle registers whose width is not a multiple of
6576 PTRACE_TYPE_RET.
6577 (linux_nat_trad_target::store_register): Likewise.
6578
6579 2018-05-16 Tom Tromey <tom@tromey.com>
6580
6581 * gdbcore.h (core_bfd): Redefine.
6582 * corelow.c (core_target::close): Update.
6583 (core_target_open): Update.
6584 * progspace.h (struct program_space) <cbfd>: Now a
6585 gdb_bfd_ref_ptr.
6586
6587 2018-05-16 Tom Tromey <tom@tromey.com>
6588
6589 PR cli/19551:
6590 * symfile-add-flags.h (enum symfile_add_flags)
6591 <SYMFILE_NOT_FILENAME>: New constant.
6592 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6593 objfile name from BFD.
6594 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6595 * minidebug.c (find_separate_debug_file_in_section): Put
6596 ".gnu_debugdata" into BFD's file name.
6597
6598 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6599
6600 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6601 Remove.
6602
6603 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6604
6605 PR binutils/21446
6606 * aarch64-tdep.c (aarch64_analyze_prologue,
6607 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6608 Indicate not interested in errors.
6609
6610 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6611
6612 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6613 Supply the MIPS_ZERO_REGNUM register.
6614
6615 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6616
6617 * mips-tdep.c (mask_address_var): Make variable static.
6618
6619 2018-05-14 Tom Tromey <tom@tromey.com>
6620
6621 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6622
6623 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6624
6625 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6626 FXSAVE_ADDR for the mxcsr register.
6627
6628 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6629
6630 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6631
6632 2018-05-11 Pedro Alves <palves@redhat.com>
6633
6634 * corelow.c (core_target) <core_target>: No longer inline.
6635 Initialize m_core_gdbarch, m_core_vec and build the section table
6636 here.
6637 <~core_target>: New.
6638 <core_gdbarch, get_core_register_section>: New methods.
6639 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6640 factored out from ...
6641 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6642 (core_ops): Delete.
6643 (sniff_core_bfd): Add gdbarch parameter.
6644 (core_close): Delete, merged into ...
6645 (core_target::close): ... here. Delete self.
6646 (core_close_cleanup): Delete.
6647 (core_target_open): Allocate a core_target on the heap. Use a
6648 unique_ptr instead of a cleanup. Bits moved into the core_target
6649 ctor. Adjust to use core_target methods instead of globals.
6650 (get_core_register_section): Rename to ...
6651 (core_target::get_core_register_section): ... this and adjust.
6652 (struct get_core_registers_cb_data): New.
6653 (get_core_registers_cb): Use it. Use bool.
6654 (core_target::fetch_registers, core_target::files_info)
6655 (core_target::xfer_partial, core_target::read_description)
6656 (core_target::pid_to, core_target::thread_name): Adjust to
6657 reference class fields instead of globals.
6658 * target.h (struct target_ops_deleter, target_ops_up): New.
6659
6660 2018-05-11 Pedro Alves <palves@redhat.com>
6661
6662 * corefile.c (core_file_command): Move to corelow.c.
6663 * corelow.c (the_core_target): Delete.
6664 (core_file_command): Moved from corefile.c. Check exec_bfd
6665 instead of the_core_target. Use target_detach instead of calling
6666 into the_core_target directly.
6667 (maybe_say_no_core_file_now): New.
6668 (core_target::detach): Use it.
6669 (_initialize_corelow): Remove references to the_core_target.
6670 * gdbcore.h (the_core_target): Delete.
6671
6672 2018-05-11 Tom Tromey <tromey@redhat.com>
6673 Pedro Alves <palves@redhat.com>
6674
6675 * corefile.c (core_bfd): Remove.
6676 * gdbcore.h (core_bfd): Now a macro.
6677 * progspace.h (struct program_space) <cbfd>: New field.
6678
6679 2018-05-11 Tom Tromey <tom@tromey.com>
6680
6681 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6682 gdb::def_vector.
6683
6684 2018-05-10 Tom Tromey <tom@tromey.com>
6685
6686 * configure: Rebuild.
6687 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6688
6689 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6690
6691 PR server/23158:
6692 * regformats/regdat.sh: Adjust script, following the addition
6693 of the new expedite_regs parameter to init_target_desc.
6694
6695 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6696
6697 PR gdb/23127
6698 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6699 set_gdbarch_significant_addr_bit.
6700 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6701 set_gdbarch_significant_addr_bit.
6702 * utils.c (address_significant): Update to sign extend addr.
6703
6704 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6705
6706 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6707 (xtensa_linux_init_abi): Limit tdep->num_regs by
6708 tdep->num_nopriv_regs.
6709 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6710 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6711 not initialized.
6712
6713 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6714
6715 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6716
6717 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6718
6719 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6720 (I387_MXCSR_INIT_VAL): New constant.
6721 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6722 buffer if it was supplied by the inferior.
6723 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6724 (i387_xsave_get_clear_bv): New function.
6725 (i387_supply_xsave): Only read x87 control registers from the
6726 xsave buffer if the feature is enabled, and the state will have
6727 been written, otherwise, provide a suitable default.
6728 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6729 including x87 control registers. Update control registers if they
6730 have changed from the default value, and mark features as enabled
6731 as required.
6732 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6733
6734 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6735
6736 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6737
6738 2018-05-07 Tom Tromey <tom@tromey.com>
6739
6740 * configure: Rebuild.
6741 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6742
6743 2018-05-07 Tom Tromey <tom@tromey.com>
6744
6745 PR tdep/20362:
6746 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6747 bit. Use correct value for VDIV.
6748
6749 2018-05-04 Tom Tromey <tom@tromey.com>
6750
6751 * configure: Rebuild.
6752 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6753
6754 2018-05-04 Tom Tromey <tom@tromey.com>
6755
6756 * linux-record.c (record_linux_system_call) <case
6757 RECORD_SYS_RECVFROM>: Add "break".
6758
6759 2018-05-04 Tom Tromey <tom@tromey.com>
6760
6761 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6762 Add missing "break".
6763 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6764 Add missing "break".
6765
6766 2018-05-04 Tom Tromey <tom@tromey.com>
6767
6768 * rs6000-tdep.c (ppc_process_record_op4)
6769 (ppc_process_record_op63): Add fall-through comment.
6770
6771 2018-05-04 Tom Tromey <tom@tromey.com>
6772
6773 * i386-tdep.c (i386_process_record): Add fall-through comment.
6774
6775 2018-05-04 Tom Tromey <tom@tromey.com>
6776
6777 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6778 comment.
6779
6780 2018-05-04 Tom Tromey <tom@tromey.com>
6781
6782 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6783 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6784 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6785 comment.
6786 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6787 comment.
6788 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6789 comment.
6790
6791 2018-05-04 Tom Tromey <tom@tromey.com>
6792
6793 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6794
6795 2018-05-04 Tom Tromey <tom@tromey.com>
6796
6797 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6798 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6799 * symfile.c (section_is_mapped): Fix fall-through comment.
6800 * stabsread.c (define_symbol, read_member_functions): Fix
6801 fall-through comment.
6802 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6803 comment.
6804 * remote.c (remote_wait_as): Fix fall-through comment.
6805 * p-exp.y (yylex): Fix fall-through comment.
6806 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6807 comment.
6808 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6809 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6810 * jv-exp.y (yylex): Fix fall-through comment.
6811 * go-exp.y (lex_one_token): Fix fall-through comment.
6812 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6813 fall-through comment.
6814 * f-exp.y (yylex): Fix fall-through comment.
6815 * dwarf2read.c (process_die): Fix fall-through comments.
6816 * dbxread.c (process_one_symbol): Fix fall-through comment.
6817 * d-exp.y (lex_one_token): Fix fall-through comment.
6818 * cp-name-parser.y (yylex): Fix fall-through comment.
6819 * coffread.c (coff_symtab_read): Fix fall-through comment.
6820 * c-exp.y (lex_one_token): Fix fall-through comment.
6821 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6822 comment.
6823 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6824 comment.
6825
6826 2018-05-04 Tom Tromey <tom@tromey.com>
6827
6828 PR python/22730:
6829 * NEWS: Mention gdb.execute change.
6830 * gdbcmd.h (execute_control_command): Don't declare.
6831 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6832 execute_control_commands, execute_control_commands_to_string.
6833 * cli/cli-script.h (execute_control_commands)
6834 (execute_control_commands_to_string): Declare.
6835 (execute_control_command): Add from_tty parameter.
6836 * cli/cli-script.c (execute_control_commands)
6837 (execute_control_commands_to_string): New functions.
6838 (execute_user_command): Use execute_control_commands.
6839 (execute_control_command_1): Add "from_tty" parameter. Update.
6840 (execute_control_command): Likewise.
6841
6842 2018-05-04 Tom Tromey <tom@tromey.com>
6843
6844 PR python/22731:
6845 * NEWS: Mention that breakpoint commands are writable.
6846 * python/py-breakpoint.c (bppy_set_commands): New function.
6847 (breakpoint_object_getset) <"commands">: Use it.
6848
6849 2018-05-04 Tom Tromey <tom@tromey.com>
6850
6851 * tracepoint.c (actions_command): Update.
6852 * mi/mi-cmd-break.c (mi_command_line_array)
6853 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6854 (mi_read_next_line): Remove.
6855 (mi_cmd_break_commands): Update.
6856 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6857 function_view.
6858 * cli/cli-script.c (get_command_line): Update.
6859 (process_next_line): Use function_view. Constify.
6860 (recurse_read_control_structure, read_command_lines)
6861 (read_command_lines_1): Change argument types to function_view.
6862 (do_define_command, document_command): Update.
6863 * breakpoint.h (check_tracepoint_command): Don't declare.
6864 * breakpoint.c (check_tracepoint_command): Remove.
6865 (commands_command_1, create_tracepoint_from_upload): Update.
6866
6867 2018-05-04 Tom Tromey <tom@tromey.com>
6868
6869 PR gdb/11750:
6870 * cli/cli-script.h (enum command_control_type) <define_control>:
6871 New constant.
6872 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6873 (build_command_line, execute_control_command_1)
6874 (process_next_line): Likewise.
6875 (do_define_command): New function, extracted from define_command.
6876 (define_command): Use it.
6877
6878 2018-05-04 Tom Tromey <tom@tromey.com>
6879
6880 * tracepoint.c (actions_command): Update.
6881 * cli/cli-script.h (read_command_lines): Update.
6882 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6883 (MAX_TMPBUF): Remove define.
6884 (define_command): Use string_printf.
6885 (document_command): Likewise.
6886 * breakpoint.c (commands_command_1): Update.
6887
6888 2018-05-04 Tom Tromey <tom@tromey.com>
6889
6890 * top.c (execute_command): Update.
6891 * cli/cli-script.h (print_command_lines): Now varargs.
6892 * cli/cli-script.c (print_command_lines): Now varargs.
6893 (execute_control_command_1) <case while_control, case if_control>:
6894 Update.
6895
6896 2018-05-04 Tom Tromey <tom@tromey.com>
6897
6898 * tracepoint.c (all_tracepoint_actions): Rename from
6899 all_tracepoint_actions_and_cleanup. Change return type.
6900 (actions_command, encode_actions_1, encode_actions)
6901 (trace_dump_actions, tdump_command): Update.
6902 * remote.c (remote_download_command_source): Update.
6903 * python/python.c (gdbpy_eval_from_control_command)
6904 (python_command, python_interactive_command): Update.
6905 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6906 * guile/guile.c (guile_command)
6907 (gdbscm_eval_from_control_command, guile_command): Update.
6908 * compile/compile.c (compile_code_command)
6909 (compile_print_command, compile_to_object): Update.
6910 * cli/cli-script.h (struct command_lines_deleter): New.
6911 (counted_command_line): New typedef.
6912 (struct command_line): Add constructor, destructor.
6913 <body_list>: Remove.
6914 <body_list_0, body_list_1>: New members.
6915 (command_line_up): Remove typedef.
6916 (read_command_lines, read_command_lines_1, get_command_line):
6917 Update.
6918 (copy_command_lines): Don't declare.
6919 * cli/cli-script.c (build_command_line): Use "new".
6920 (get_command_line): Return counted_command_line.
6921 (print_command_lines, execute_user_command)
6922 (execute_control_command_1, while_command, if_command): Update.
6923 (realloc_body_list): Remove.
6924 (process_next_line, recurse_read_control_structure): Update.
6925 (read_command_lines, read_command_lines_1): Return counted_command_line.
6926 (free_command_lines): Use "delete".
6927 (copy_command_lines): Remove.
6928 (define_command, document_command, show_user_1): Update.
6929 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6930 a counted_command_line.
6931 * breakpoint.h (counted_command_line): Remove typedef.
6932 (breakpoint_set_commands): Update.
6933 * breakpoint.c (check_no_tracepoint_commands)
6934 (validate_commands_for_breakpoint): Update.
6935 (breakpoint_set_commands): Change commands to be a
6936 counted_command_line.
6937 (commands_command_1, update_dprintf_command_list)
6938 (create_tracepoint_from_upload): Update.
6939
6940 2018-05-04 Tom Tromey <tom@tromey.com>
6941
6942 * cli/cli-decode.h (cmd_list_element): New constructor.
6943 (~cmd_list_element): New destructor.
6944 (struct cmd_list_element): Add initializers.
6945 * cli/cli-decode.c (do_add_cmd): Use "new".
6946 (delete_cmd): Use "delete".
6947
6948 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6949 Pedro Alves <palves@redhat.com>
6950
6951 PR breakpoints/19806 and support for PR external/20207.
6952 * NEWS: Mention Aarch64 watchpoint improvements.
6953 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6954 watchpoints and PR external/20207 watchpoints.
6955 * nat/aarch64-linux-hw-point.c
6956 (kernel_supports_any_contiguous_range): New.
6957 (aarch64_watchpoint_offset): New.
6958 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6959 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6960 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6961 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6962 next_addr_orig_p. Support PR external/20207 watchpoints.
6963 (aarch64_downgrade_regs): New.
6964 (aarch64_dr_state_insert_one_point): New parameters offset and
6965 addr_orig.
6966 (aarch64_dr_state_remove_one_point): Likewise.
6967 (aarch64_handle_breakpoint): Update caller.
6968 (aarch64_handle_aligned_watchpoint): Likewise.
6969 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6970 aligned_offset.
6971 (aarch64_linux_set_debug_regs): Remove const from state. Call
6972 aarch64_downgrade_regs.
6973 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6974 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6975 (DR_CONTROL_MASK): ... this.
6976 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6977 (unsigned int aarch64_watchpoint_offset): New prototype.
6978 (aarch64_linux_set_debug_regs): Remove const from state.
6979 * utils.c (align_up, align_down): Move to ...
6980 * common/common-utils.c (align_up, align_down): ... here.
6981 * utils.h (align_up, align_down): Move to ...
6982 * common/common-utils.h (align_up, align_down): ... here.
6983
6984 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6985
6986 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6987 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6988 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6989 Re-implement to match the ABI as summarized in GCC's
6990 gcc/config/sparc/sparc.c. All callers updated.
6991 (sparc32_store_arguments): Remove assertion.
6992
6993 2018-05-04 Tom Tromey <tom@tromey.com>
6994
6995 * printcmd.c: Don't include tui.h.
6996 (decode_format): Use skip_spaces.
6997
6998 2018-05-04 Tom Tromey <tom@tromey.com>
6999
7000 PR gdb/22619:
7001 * printcmd.c (last_count): New global.
7002 (x_command): Use saved count when repeating.
7003
7004 2018-05-04 Tom Tromey <tom@tromey.com>
7005
7006 * nto-procfs.c (do_closedir_cleanup): Remove.
7007 (procfs_pidlist): Use gdb_dir_up.
7008 * procfs.c (do_closedir_cleanup): Remove.
7009 (proc_update_threads): Use gdb_dir_up.
7010 * common/filestuff.h (struct gdb_dir_deleter): New.
7011 (gdb_dir_up): New typedef.
7012
7013 2018-05-04 Tom Tromey <tom@tromey.com>
7014
7015 * ada-lang.c (print_mention_exception): Use std::string.
7016
7017 2018-05-04 Tom Tromey <tom@tromey.com>
7018
7019 * ada-lang.c (create_excep_cond_exprs): Update.
7020 (ada_exception_catchpoint_cond_string): Use std::string.
7021
7022 2018-05-04 Tom Tromey <tom@tromey.com>
7023
7024 * ada-lang.c (xget_renaming_scope): Return std::string.
7025 (old_renaming_is_invisible): Update.
7026
7027 2018-05-04 Tom Tromey <tom@tromey.com>
7028
7029 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7030 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7031
7032 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7033
7034 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7035
7036 2018-05-04 Tom Tromey <tom@tromey.com>
7037
7038 * remote.c (remote_query_supported_append): Change type.
7039 (remote_check_symbols): Update.
7040
7041 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7042
7043 PR gdb/11420
7044 * configure.ac: Prepend libpython.
7045 * python/python-config.py: Likewise.
7046 * configure: Regenerate.
7047
7048 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7049
7050 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7051
7052 2018-05-03 Pedro Alves <palves@redhat.com>
7053
7054 * s390-linux-nat.c
7055 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7056 override. Write 'true' instead of '1'.
7057 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7058 declaration.
7059
7060 2018-05-02 Pedro Alves <palves@redhat.com>
7061
7062 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7063 add_inf_child_target.
7064 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7065 add_inf_child_target.
7066 * aix-thread.c (aix_thread_target_info): New.
7067 (aix_thread_target) <shortname, longname, doc>: Delete.
7068 <info>: New.
7069 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7070 add_inf_child_target.
7071 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7072 add_inf_child_target.
7073 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7074 add_inf_child_target.
7075 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7076 add_inf_child_target.
7077 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7078 add_inf_child_target.
7079 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7080 add_inf_child_target.
7081 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7082 add_inf_child_target.
7083 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7084 add_inf_child_target.
7085 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7086 add_inf_child_target.
7087 * bfd-target.c (target_bfd_target_info): New.
7088 (target_bfd) <shortname, longname, doc>: Delete.
7089 <info>: New.
7090 * bsd-kvm.c (bsd_kvm_target_info): New.
7091 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7092 <info>: New.
7093 (bsd_kvm_target::open): Rename to ...
7094 (bsd_kvm_target_open): ... this. Adjust.
7095 * bsd-uthread.c (bsd_uthread_target_info): New.
7096 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7097 <info>: New.
7098 * corefile.c (core_file_command): Adjust.
7099 * corelow.c (core_target_info): New.
7100 (core_target) <shortname, longname, doc>: Delete.
7101 <info>: New.
7102 (core_target::open): Rename to ...
7103 (core_target_open): ... this. Adjust.
7104 * ctf.c (ctf_target_info): New.
7105 (ctf_target) <shortname, longname, doc>: Delete.
7106 <info>: New.
7107 (ctf_target::open): Rename to ...
7108 (ctf_target_open): ... this.
7109 (_initialize_ctf): Adjust.
7110 * exec.c (exec_target_info): New.
7111 (exec_target) <shortname, longname, doc>: Delete.
7112 <info>: New.
7113 (exec_target::open): Rename to ...
7114 (exec_target_open): ... this.
7115 * gdbcore.h (core_target_open): Declare.
7116 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7117 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7118 add_inf_child_target.
7119 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7120 add_inf_child_target.
7121 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7122 add_inf_child_target.
7123 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7124 add_inf_child_target.
7125 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7126 add_inf_child_target.
7127 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7128 add_inf_child_target.
7129 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7130 add_inf_child_target.
7131 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7132 add_inf_child_target.
7133 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7134 add_inf_child_target.
7135 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7136 add_inf_child_target.
7137 * inf-child.c (inf_child_target_info): New.
7138 (inf_child_target::info): New.
7139 (inf_child_open_target): Remove 'target' parameter. Use
7140 get_native_target instead.
7141 (inf_child_target::open): Delete.
7142 (add_inf_child_target): New.
7143 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7144 Delete.
7145 <info>: New.
7146 (add_inf_child_target): Declare.
7147 (inf_child_open_target): Declare.
7148 * linux-thread-db.c (thread_db_target_info): New.
7149 (thread_db_target) <shortname, longname, doc>: Delete.
7150 <info>: New.
7151 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7152 add_inf_child_target.
7153 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7154 add_inf_child_target.
7155 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7156 add_inf_child_target.
7157 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7158 add_inf_child_target.
7159 * make-target-delegates (print_class): Adjust.
7160 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7161 add_inf_child_target.
7162 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7163 add_inf_child_target.
7164 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7165 add_inf_child_target.
7166 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7167 add_inf_child_target.
7168 * nto-procfs.c (nto_native_target_info): New.
7169 (nto_procfs_target_native) <shortname, longname, doc>:
7170 Delete.
7171 <info>: New.
7172 (nto_procfs_target_info): New.
7173 (nto_procfs_target_procfs) <shortname, longname, doc>:
7174 Delete.
7175 <info>: New.
7176 (init_procfs_targets): Adjust.
7177 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7178 add_inf_child_target.
7179 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7180 add_inf_child_target.
7181 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7182 add_inf_child_target.
7183 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7184 add_inf_child_target.
7185 * ravenscar-thread.c (ravenscar_target_info): New.
7186 (ravenscar_thread_target) <shortname, longname, doc>:
7187 Delete.
7188 <info>: New.
7189 * record-btrace.c (record_btrace_target_info):
7190 (record_btrace_target) <shortname, longname, doc>: Delete.
7191 <info>: New.
7192 (record_btrace_target::open): Rename to ...
7193 (record_btrace_target_open): ... this. Adjust.
7194 * record-full.c (record_longname, record_doc): New.
7195 (record_full_base_target) <shortname, longname, doc>: Delete.
7196 <info>: New.
7197 (record_full_target_info): New.
7198 (record_full_target): <shortname>: Delete.
7199 <info>: New.
7200 (record_full_core_open_1, record_full_open_1): Update comments.
7201 (record_full_base_target::open): Rename to ...
7202 (record_full_open): ... this.
7203 (cmd_record_full_restore): Update.
7204 (_initialize_record_full): Update.
7205 * remote-sim.c (remote_sim_target_info): New.
7206 (gdbsim_target) <shortname, longname, doc>: Delete.
7207 <info>: New.
7208 (gdbsim_target::open): Rename to ...
7209 (gdbsim_target_open): ... this.
7210 (_initialize_remote_sim): Adjust.
7211 * remote.c (remote_doc): New.
7212 (remote_target_info): New.
7213 (remote_target) <shortname, longname, doc>: Delete.
7214 <info>: New.
7215 (extended_remote_target_info): New.
7216 (extended_remote_target) <shortname, longname, doc>: Delete.
7217 <info>: New.
7218 (remote_target::open_1): Make static. Adjust.
7219 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7220 * s390-linux-nat.c (_initialize_s390_nat): Use
7221 add_inf_child_target.
7222 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7223 add_inf_child_target.
7224 * sol-thread.c (thread_db_target_info): New.
7225 (sol_thread_target) <shortname, longname, doc>: Delete.
7226 <info>: New.
7227 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7228 add_inf_child_target.
7229 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7230 add_inf_child_target.
7231 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7232 add_inf_child_target.
7233 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7234 add_inf_child_target.
7235 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7236 add_inf_child_target.
7237 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7238 add_inf_child_target.
7239 * spu-linux-nat.c (_initialize_spu_nat): Use
7240 add_inf_child_target.
7241 * spu-multiarch.c (spu_multiarch_target_info): New.
7242 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7243 <info>: New.
7244 * target-delegates.c: Regenerate.
7245 * target.c: Include <unordered_map>.
7246 (target_ops_p): Delete.
7247 (DEF_VEC_P(target_ops_p)): Delete.
7248 (target_factories): New.
7249 (test_target_info): New.
7250 (test_target_ops::info): New.
7251 (open_target): Adjust to use target_factories.
7252 (add_target_with_completer): Rename to ...
7253 (add_target): ... this. Change prototype. Register target_info
7254 and open callback in target_factories. Register target_info in
7255 command context instead of target_ops.
7256 (add_target): Delete old implementation.
7257 (add_deprecated_target_alias): Change prototype. Adjust.
7258 (the_native_target): New.
7259 (set_native_target, get_native_target): New.
7260 (find_default_run_target): Use the_native_target.
7261 (find_attach_target, find_run_target): Simplify.
7262 (target_ops::open): Delete.
7263 (dummy_target_info): New.
7264 (dummy_target::shortname, dummy_target::longname)
7265 (dummy_target::doc): Delete.
7266 (dummy_target::info): New.
7267 (debug_target::shortname, debug_target::longname)
7268 (debug_target::doc): Delete.
7269 (debug_target::info): New.
7270 * target.h (struct target_info): New.
7271 (target_ops::~target_ops): Add comment.
7272 (target_ops::info): New.
7273 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7274 longer virtual. Implement in terms of target_info.
7275 (set_native_target, get_native_target): Declare.
7276 (target_open_ftype): New.
7277 (add_target, add_target_with_completer)
7278 (add_deprecated_target_alias): Change prototype.
7279 (test_target) <shortname, longname, doc>: Delete.
7280 <info>: New.
7281 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7282 add_inf_child_target.
7283 * tracefile-tfile.c (tfile_target_info): New.
7284 (tfile_target) <shortname, longname, doc>: Delete.
7285 <info>: New.
7286 (tfile_target::open): Rename to ...
7287 (tfile_target_open): ... this.
7288 (_initialize_tracefile_tfile): Adjust.
7289 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7290 add_inf_child_target.
7291 * windows-nat.c (_initialize_windows_nat): Use
7292 add_inf_child_target.
7293 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7294 add_inf_child_target.
7295
7296 2018-05-02 Pedro Alves <palves@redhat.com>
7297
7298 * linux-nat.h (linux_nat_target) <low_new_thread,
7299 low_delete_thread, low_new_fork, low_forget_process,
7300 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7301 New virtual methods.
7302 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7303 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7304 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7305 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7306 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7307 Delete.
7308 * linux-fork.c (delete_fork): Adjust to call low method.
7309 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7310 (linux_nat_new_fork, linux_nat_forget_process_hook)
7311 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7312 (linux_nat_status_is_event):
7313 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7314 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7315 to call low method.
7316 (sigtrap_is_event): Rename to ...
7317 (linux_nat_target::low_status_is_event): ... this.
7318 (linux_nat_set_status_is_event): Delete.
7319 (save_stop_reason, linux_nat_wait_1)
7320 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7321 low methods.
7322 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7323 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7324 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7325 (linux_nat_set_prepare_to_resume): Delete.
7326 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7327 low virtual methods.
7328 * amd64-linux-nat.c: Likewise.
7329 * arm-linux-nat.c: Likewise.
7330 * i386-linux-nat.c: Likewise.
7331 * ia64-linux-nat.c: Likewise.
7332 * mips-linux-nat.c: Likewise.
7333 * ppc-linux-nat.c: Likewise.
7334 * s390-linux-nat.c: Likewise.
7335 * sparc64-linux-nat.c: Likewise.
7336 * x86-linux-nat.c: Likewise.
7337 * x86-linux-nat.h: Include "nat/x86-linux.h".
7338 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7339 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7340 Override methods.
7341
7342 2018-05-02 Pedro Alves <palves@redhat.com>
7343
7344 * target.h (target_ops)
7345 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7346 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7347 stopped_by_watchpoint, have_continuable_watchpoint,
7348 stopped_data_address, watchpoint_addr_within_range,
7349 can_accel_watchpoint_condition, can_run, thread_alive,
7350 has_all_memory, has_memory, has_stack, has_registers,
7351 has_execution, can_async_p, is_async_p, supports_non_stop,
7352 always_non_stop_p, can_execute_reverse, supports_multi_process,
7353 supports_enable_disable_tracepoint,
7354 supports_disable_randomization, supports_string_tracing,
7355 supports_evaluation_of_breakpoint_conditions,
7356 can_run_breakpoint_commands, filesystem_is_local,
7357 can_download_tracepoint, get_trace_state_variable_value,
7358 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7359 record_is_replaying, record_will_replay,
7360 augmented_libraries_svr4_read>: Adjust to return bool.
7361 * aarch64-linux-nat.c: All implementations adjusted.
7362 * aix-thread.c: All implementations adjusted.
7363 * arm-linux-nat.c: All implementations adjusted.
7364 * breakpoint.c: All implementations adjusted.
7365 * bsd-kvm.c: All implementations adjusted.
7366 * bsd-uthread.c: All implementations adjusted.
7367 * corelow.c: All implementations adjusted.
7368 * ctf.c: All implementations adjusted.
7369 * darwin-nat.c: All implementations adjusted.
7370 * darwin-nat.h: All implementations adjusted.
7371 * exec.c: All implementations adjusted.
7372 * fbsd-nat.c: All implementations adjusted.
7373 * fbsd-nat.h: All implementations adjusted.
7374 * gnu-nat.c: All implementations adjusted.
7375 * gnu-nat.h: All implementations adjusted.
7376 * go32-nat.c: All implementations adjusted.
7377 * ia64-linux-nat.c: All implementations adjusted.
7378 * inf-child.c: All implementations adjusted.
7379 * inf-child.h: All implementations adjusted.
7380 * inf-ptrace.c: All implementations adjusted.
7381 * inf-ptrace.h: All implementations adjusted.
7382 * linux-nat.c: All implementations adjusted.
7383 * linux-nat.h: All implementations adjusted.
7384 * mips-linux-nat.c: All implementations adjusted.
7385 * nto-procfs.c: All implementations adjusted.
7386 * ppc-linux-nat.c: All implementations adjusted.
7387 * procfs.c: All implementations adjusted.
7388 * ravenscar-thread.c: All implementations adjusted.
7389 * record-btrace.c: All implementations adjusted.
7390 * record-full.c: All implementations adjusted.
7391 * remote-sim.c: All implementations adjusted.
7392 * remote.c: All implementations adjusted.
7393 * s390-linux-nat.c: All implementations adjusted.
7394 * sol-thread.c: All implementations adjusted.
7395 * spu-multiarch.c: All implementations adjusted.
7396 * target-delegates.c: All implementations adjusted.
7397 * target.c: All implementations adjusted.
7398 * target.h: All implementations adjusted.
7399 * tracefile-tfile.c: All implementations adjusted.
7400 * tracefile.c: All implementations adjusted.
7401 * tracefile.h: All implementations adjusted.
7402 * windows-nat.c: All implementations adjusted.
7403 * x86-linux-nat.h: All implementations adjusted.
7404 * x86-nat.h: All implementations adjusted.
7405
7406 2018-05-02 Pedro Alves <palves@redhat.com>
7407
7408 * make-target-delegates (scan_target_h): Don't trim lines here.
7409 Replace sequences of tabs and/or whitespace with a single
7410 whitespace.
7411 (top level, parsing methods): Trim each line before processing it
7412 here.
7413
7414 2018-05-02 Pedro Alves <palves@redhat.com>
7415 John Baldwin <jhb@freebsd.org>
7416
7417 * target.h (enum strata) <debug_stratum>: New.
7418 (struct target_ops) <all delegation methods>: Replace by C++
7419 virtual methods, and drop "to_" prefix. All references updated
7420 throughout.
7421 <to_shortname, to_longname, to_doc, to_data,
7422 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7423 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7424 virtual methods. All references updated throughout.
7425 <can_attach, supports_terminal_ours, can_create_inferior,
7426 get_thread_control_capabilities, attach_no_wait>: New
7427 virtual methods.
7428 <insert_breakpoint, remove_breakpoint>: Now
7429 TARGET_DEFAULT_NORETURN methods.
7430 <info_proc>: Now returns bool.
7431 <to_magic>: Delete.
7432 (OPS_MAGIC): Delete.
7433 (current_target): Delete. All references replaced by references
7434 to ...
7435 (target_stack): ... this. New.
7436 (target_shortname, target_longname): Adjust.
7437 (target_can_run): Now a function declaration.
7438 (default_child_has_all_memory, default_child_has_memory)
7439 (default_child_has_stack, default_child_has_registers)
7440 (default_child_has_execution): Remove target_ops parameter.
7441 (complete_target_initialization): Delete.
7442 (memory_breakpoint_target): New template class.
7443 (test_target_ops): Refactor as a C++ class with virtual methods.
7444 * make-target-delegates (NAME_PART): Tighten.
7445 (POINTER_PART, CP_SYMBOL): New.
7446 (SIMPLE_RETURN_PART): Reimplement.
7447 (VEC_RETURN_PART): Expect less.
7448 (RETURN_PART, VIRTUAL_PART): New.
7449 (METHOD): Adjust to C++ virtual methods.
7450 (scan_target_h): Remove reference to C99.
7451 (dname): Output "target_ops::" prefix.
7452 (write_function_header): Adjust to output a C++ class method.
7453 (write_declaration): New.
7454 (write_delegator): Adjust to output a C++ class method.
7455 (tdname): Output "dummy_target::" prefix.
7456 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7457 method.
7458 (tdefault_names, debug_names): Delete.
7459 (return_types, tdefaults, styles, argtypes_array): New.
7460 (top level): All methods are delegators.
7461 (print_class): New.
7462 (top level): Print dummy_target and debug_target classes.
7463 * target-delegates.c: Regenerate.
7464 * target-debug.h (target_debug_print_enum_info_proc_what)
7465 (target_debug_print_thread_control_capabilities)
7466 (target_debug_print_thread_info_p): New.
7467 * target.c (dummy_target): Delete.
7468 (the_dummy_target, the_debug_target): New.
7469 (target_stack): Now extern.
7470 (set_targetdebug): Push/unpush debug target.
7471 (default_child_has_all_memory, default_child_has_memory)
7472 (default_child_has_stack, default_child_has_registers)
7473 (default_child_has_execution): Remove target_ops parameter.
7474 (complete_target_initialization): Delete.
7475 (add_target_with_completer): No longer call
7476 complete_target_initialization.
7477 (target_supports_terminal_ours): Use regular delegation.
7478 (update_current_target): Delete.
7479 (push_target): No longer check magic number. Don't call
7480 update_current_target.
7481 (unpush_target): Don't call update_current_target.
7482 (target_is_pushed): No longer check magic number.
7483 (target_require_runnable): Skip for all stratums over
7484 process_stratum.
7485 (target_ops::info_proc): New.
7486 (target_info_proc): Use find_target_at and
7487 find_default_run_target.
7488 (target_supports_disable_randomization): Use regular delegation.
7489 (target_get_osdata): Use find_target_at.
7490 (target_ops::open, target_ops::close, target_ops::can_attach)
7491 (target_ops::attach, target_ops::can_create_inferior)
7492 (target_ops::create_inferior, target_ops::can_run)
7493 (target_can_run): New.
7494 (default_fileio_target): Use regular delegation.
7495 (target_ops::fileio_open, target_ops::fileio_pwrite)
7496 (target_ops::fileio_pread, target_ops::fileio_fstat)
7497 (target_ops::fileio_close, target_ops::fileio_unlink)
7498 (target_ops::fileio_readlink): New.
7499 (target_fileio_open_1, target_fileio_unlink)
7500 (target_fileio_readlink): Always call the target method. Handle
7501 FILEIO_ENOSYS.
7502 (return_zero, return_zero_has_execution): Delete.
7503 (init_dummy_target): Delete.
7504 (dummy_target::dummy_target, dummy_target::shortname)
7505 (dummy_target::longname, dummy_target::doc)
7506 (debug_target::debug_target, debug_target::shortname)
7507 (debug_target::longname, debug_target::doc): New.
7508 (target_supports_delete_record): Use regular delegation.
7509 (setup_target_debug): Delete.
7510 (maintenance_print_target_stack): Skip debug_stratum.
7511 (initialize_targets): Instantiate the_dummy_target and
7512 the_debug_target.
7513 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7514 use target_stack.
7515 (target_auxv_search, fprint_target_auxv): Adjust.
7516 (info_auxv_command): Adjust to use target_stack.
7517 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7518 * exceptions.c (print_flush): Handle a NULL target_stack.
7519 * regcache.c (target_ops_no_register): Refactor as class with
7520 virtual methods.
7521
7522 * exec.c (exec_target): New class.
7523 (exec_ops): Now an exec_target.
7524 (exec_open, exec_close_1, exec_get_section_table)
7525 (exec_xfer_partial, exec_files_info, exec_has_memory)
7526 (exec_make_note_section): Refactor as exec_target methods.
7527 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7528 Delete.
7529 (exec_target::find_memory_regions): New.
7530 (_initialize_exec): Don't call init_exec_ops.
7531 * gdbcore.h (exec_file_clear): Delete.
7532
7533 * corefile.c (core_target): Delete.
7534 (core_file_command): Adjust.
7535 * corelow.c (core_target): New class.
7536 (the_core_target): New.
7537 (core_close): Remove target_ops parameter.
7538 (core_close_cleanup): Adjust.
7539 (core_target::close): New.
7540 (core_open, core_detach, get_core_registers, core_files_info)
7541 (core_xfer_partial, core_thread_alive, core_read_description)
7542 (core_pid_to_str, core_thread_name, core_has_memory)
7543 (core_has_stack, core_has_registers, core_info_proc): Rework as
7544 core_target methods.
7545 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7546 (_initialize_corelow): Initialize the_core_target.
7547 * gdbcore.h (core_target): Delete.
7548 (the_core_target): New.
7549
7550 * ctf.c: (ctf_target): New class.
7551 (ctf_ops): Now a ctf_target.
7552 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7553 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7554 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7555 methods.
7556 (init_ctf_ops): Delete.
7557 (_initialize_ctf): Don't call it.
7558 * tracefile-tfile.c (tfile_target): New class.
7559 (tfile_ops): Now a tfile_target.
7560 (tfile_open, tfile_close, tfile_files_info)
7561 (tfile_get_tracepoint_status, tfile_trace_find)
7562 (tfile_fetch_registers, tfile_xfer_partial)
7563 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7564 Refactor as tfile_target methods.
7565 (tfile_xfer_partial_features): Remove target_ops parameter.
7566 (init_tfile_ops): Delete.
7567 (_initialize_tracefile_tfile): Don't call it.
7568 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7569 (tracefile_has_stack, tracefile_has_registers)
7570 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7571 tracefile_target methods.
7572 (init_tracefile_ops): Delete.
7573 (tracefile_target::tracefile_target): New.
7574 * tracefile.h: Include "target.h".
7575 (tracefile_target): New class.
7576 (init_tracefile_ops): Delete.
7577
7578 * spu-multiarch.c (spu_multiarch_target): New class.
7579 (spu_ops): Now a spu_multiarch_target.
7580 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7581 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7582 (spu_search_memory, spu_mourn_inferior): Refactor as
7583 spu_multiarch_target methods.
7584 (init_spu_ops): Delete.
7585 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7586 complete_target_initialization.
7587
7588 * ravenscar-thread.c (ravenscar_thread_target): New class.
7589 (ravenscar_ops): Now a ravenscar_thread_target.
7590 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7591 (ravenscar_thread_alive, ravenscar_pid_to_str)
7592 (ravenscar_fetch_registers, ravenscar_store_registers)
7593 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7594 (ravenscar_stopped_by_hw_breakpoint)
7595 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7596 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7597 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7598 methods.
7599 (init_ravenscar_thread_ops): Delete.
7600 (_initialize_ravenscar): Remove references to
7601 init_ravenscar_thread_ops and complete_target_initialization.
7602
7603 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7604 (bsd_uthread_target): New class.
7605 (bsd_uthread_ops): Now a bsd_uthread_target.
7606 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7607 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7608 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7609 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7610 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7611 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7612 (bsd_uthread_target): Delete function.
7613 (_initialize_bsd_uthread): Remove reference to
7614 complete_target_initialization.
7615
7616 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7617 (target_bfd): ... this new class.
7618 (target_bfd_xfer_partial, target_bfd_get_section_table)
7619 (target_bfd_close): Refactor as target_bfd methods.
7620 (target_bfd::~target_bfd): New.
7621 (target_bfd_reopen): Adjust.
7622 (target_bfd::close): New.
7623
7624 * record-btrace.c (record_btrace_target): New class.
7625 (record_btrace_ops): Now a record_btrace_target.
7626 (record_btrace_open, record_btrace_stop_recording)
7627 (record_btrace_disconnect, record_btrace_close)
7628 (record_btrace_async, record_btrace_info)
7629 (record_btrace_insn_history, record_btrace_insn_history_range)
7630 (record_btrace_insn_history_from, record_btrace_call_history)
7631 (record_btrace_call_history_range)
7632 (record_btrace_call_history_from, record_btrace_record_method)
7633 (record_btrace_is_replaying, record_btrace_will_replay)
7634 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7635 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7636 (record_btrace_store_registers, record_btrace_prepare_to_store)
7637 (record_btrace_to_get_unwinder)
7638 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7639 (record_btrace_commit_resume, record_btrace_wait)
7640 (record_btrace_stop, record_btrace_can_execute_reverse)
7641 (record_btrace_stopped_by_sw_breakpoint)
7642 (record_btrace_supports_stopped_by_sw_breakpoint)
7643 (record_btrace_stopped_by_hw_breakpoint)
7644 (record_btrace_supports_stopped_by_hw_breakpoint)
7645 (record_btrace_update_thread_list, record_btrace_thread_alive)
7646 (record_btrace_goto_begin, record_btrace_goto_end)
7647 (record_btrace_goto, record_btrace_stop_replaying_all)
7648 (record_btrace_execution_direction)
7649 (record_btrace_prepare_to_generate_core)
7650 (record_btrace_done_generating_core): Refactor as
7651 record_btrace_target methods.
7652 (init_record_btrace_ops): Delete.
7653 (_initialize_record_btrace): Remove reference to
7654 init_record_btrace_ops.
7655 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7656 the execution_direction global.
7657 (record_full_base_target, record_full_target)
7658 (record_full_core_target): New classes.
7659 (record_full_ops): Now a record_full_target.
7660 (record_full_core_ops): Now a record_full_core_target.
7661 (record_full_target::detach, record_full_target::disconnect)
7662 (record_full_core_target::disconnect)
7663 (record_full_target::mourn_inferior, record_full_target::kill):
7664 New.
7665 (record_full_open, record_full_close, record_full_async): Refactor
7666 as methods of the record_full_base_target class.
7667 (record_full_resume, record_full_commit_resume): Refactor
7668 as methods of the record_full_target class.
7669 (record_full_wait, record_full_stopped_by_watchpoint)
7670 (record_full_stopped_data_address)
7671 (record_full_stopped_by_sw_breakpoint)
7672 (record_full_supports_stopped_by_sw_breakpoint)
7673 (record_full_stopped_by_hw_breakpoint)
7674 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7675 methods of the record_full_base_target class.
7676 (record_full_store_registers, record_full_xfer_partial)
7677 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7678 Refactor as methods of the record_full_target class.
7679 (record_full_can_execute_reverse, record_full_get_bookmark)
7680 (record_full_goto_bookmark, record_full_execution_direction)
7681 (record_full_record_method, record_full_info, record_full_delete)
7682 (record_full_is_replaying, record_full_will_replay)
7683 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7684 (record_full_stop_replaying): Refactor as methods of the
7685 record_full_base_target class.
7686 (record_full_core_resume, record_full_core_kill)
7687 (record_full_core_fetch_registers)
7688 (record_full_core_prepare_to_store)
7689 (record_full_core_store_registers, record_full_core_xfer_partial)
7690 (record_full_core_insert_breakpoint)
7691 (record_full_core_remove_breakpoint)
7692 (record_full_core_has_execution): Refactor
7693 as methods of the record_full_core_target class.
7694 (record_full_base_target::supports_delete_record): New.
7695 (init_record_full_ops): Delete.
7696 (init_record_full_core_ops): Delete.
7697 (record_full_save): Refactor as method of the
7698 record_full_base_target class.
7699 (_initialize_record_full): Remove references to
7700 init_record_full_ops and init_record_full_core_ops.
7701
7702 * remote.c (remote_target, extended_remote_target): New classes.
7703 (remote_ops): Now a remote_target.
7704 (extended_remote_ops): Now an extended_remote_target.
7705 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7706 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7707 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7708 (remote_pass_signals, remote_set_syscall_catchpoint)
7709 (remote_program_signals, )
7710 (remote_thread_always_alive): Remove target_ops parameter.
7711 (remote_thread_alive, remote_thread_name)
7712 (remote_update_thread_list, remote_threads_extra_info)
7713 (remote_static_tracepoint_marker_at)
7714 (remote_static_tracepoint_markers_by_strid)
7715 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7716 (remote_open): Refactor as methods of remote_target.
7717 (extended_remote_open, extended_remote_detach)
7718 (extended_remote_attach, extended_remote_post_attach):
7719 (extended_remote_supports_disable_randomization)
7720 (extended_remote_create_inferior): : Refactor as method of
7721 extended_remote_target.
7722 (remote_set_permissions, remote_open_1, remote_detach)
7723 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7724 (remote_resume, remote_commit_resume, remote_stop)
7725 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7726 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7727 (remote_prepare_to_store, remote_store_registers)
7728 (remote_flash_erase, remote_flash_done, remote_files_info)
7729 (remote_kill, remote_mourn, remote_insert_breakpoint)
7730 (remote_remove_breakpoint, remote_insert_watchpoint)
7731 (remote_watchpoint_addr_within_range)
7732 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7733 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7734 (remote_supports_stopped_by_sw_breakpoint)
7735 (remote_stopped_by_hw_breakpoint)
7736 (remote_supports_stopped_by_hw_breakpoint)
7737 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7738 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7739 (remote_verify_memory): Refactor as methods of remote_target.
7740 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7741 parameter.
7742 (remote_xfer_partial, remote_get_memory_xfer_limit)
7743 (remote_search_memory, remote_rcmd, remote_memory_map)
7744 (remote_pid_to_str, remote_get_thread_local_address)
7745 (remote_get_tib_address, remote_read_description): Refactor as
7746 methods of remote_target.
7747 (remote_target::fileio_open, remote_target::fileio_pwrite)
7748 (remote_target::fileio_pread, remote_target::fileio_close): New.
7749 (remote_hostio_readlink, remote_hostio_fstat)
7750 (remote_filesystem_is_local, remote_can_execute_reverse)
7751 (remote_supports_non_stop, remote_supports_disable_randomization)
7752 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7753 (remote_supports_enable_disable_tracepoint)
7754 (remote_supports_string_tracing)
7755 (remote_can_run_breakpoint_commands, remote_trace_init)
7756 (remote_download_tracepoint, remote_can_download_tracepoint)
7757 (remote_download_trace_state_variable, remote_enable_tracepoint)
7758 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7759 (remote_trace_start, remote_get_trace_status)
7760 (remote_get_tracepoint_status, remote_trace_stop)
7761 (remote_trace_find, remote_get_trace_state_variable_value)
7762 (remote_save_trace_data, remote_get_raw_trace_data)
7763 (remote_set_disconnected_tracing, remote_core_of_thread)
7764 (remote_set_circular_trace_buffer, remote_traceframe_info)
7765 (remote_get_min_fast_tracepoint_insn_len)
7766 (remote_set_trace_buffer_size, remote_set_trace_notes)
7767 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7768 (remote_disable_btrace, remote_teardown_btrace)
7769 (remote_read_btrace, remote_btrace_conf)
7770 (remote_augmented_libraries_svr4_read, remote_load)
7771 (remote_pid_to_exec_file, remote_can_do_single_step)
7772 (remote_execution_direction, remote_thread_handle_to_thread_info):
7773 Refactor as methods of remote_target.
7774 (init_remote_ops, init_extended_remote_ops): Delete.
7775 (remote_can_async_p, remote_is_async_p, remote_async)
7776 (remote_thread_events, remote_upload_tracepoints)
7777 (remote_upload_trace_state_variables): Refactor as methods of
7778 remote_target.
7779 (_initialize_remote): Remove references to init_remote_ops and
7780 init_extended_remote_ops.
7781
7782 * remote-sim.c (gdbsim_target): New class.
7783 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7784 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7785 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7786 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7787 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7788 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7789 Refactor as methods of gdbsim_target.
7790 (gdbsim_ops): Now a gdbsim_target.
7791 (init_gdbsim_ops): Delete.
7792 (gdbsim_cntrl_c): Adjust.
7793 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7794
7795 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7796 (the_amd64_linux_nat_target): New.
7797 (amd64_linux_fetch_inferior_registers)
7798 (amd64_linux_store_inferior_registers): Refactor as methods of
7799 amd64_linux_nat_target.
7800 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7801 * i386-linux-nat.c: Don't include "linux-nat.h".
7802 (i386_linux_nat_target): New class.
7803 (the_i386_linux_nat_target): New.
7804 (i386_linux_fetch_inferior_registers)
7805 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7806 as methods of i386_linux_nat_target.
7807 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7808 * inf-child.c (inf_child_ops): Delete.
7809 (inf_child_fetch_inferior_registers)
7810 (inf_child_store_inferior_registers): Delete.
7811 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7812 methods of inf_child_target.
7813 (inf_child_target::supports_terminal_ours)
7814 (inf_child_target::terminal_init)
7815 (inf_child_target::terminal_inferior)
7816 (inf_child_target::terminal_ours_for_output)
7817 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7818 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7819 New.
7820 (inf_child_open, inf_child_disconnect, inf_child_close)
7821 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7822 (inf_child_post_startup_inferior, inf_child_can_run)
7823 (inf_child_pid_to_exec_file): Refactor as methods of
7824 inf_child_target.
7825 (inf_child_follow_fork): Delete.
7826 (inf_child_target::can_create_inferior)
7827 (inf_child_target::can_attach): New.
7828 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7829 (inf_child_target::has_stack, inf_child_target::has_registers)
7830 (inf_child_target::has_execution): New.
7831 (inf_child_fileio_open, inf_child_fileio_pwrite)
7832 (inf_child_fileio_pread, inf_child_fileio_fstat)
7833 (inf_child_fileio_close, inf_child_fileio_unlink)
7834 (inf_child_fileio_readlink, inf_child_use_agent)
7835 (inf_child_can_use_agent): Refactor as methods of
7836 inf_child_target.
7837 (return_zero, inf_child_target): Delete.
7838 (inf_child_target::inf_child_target): New.
7839 * inf-child.h: Include "target.h".
7840 (inf_child_target): Delete function prototype.
7841 (inf_child_target): New class.
7842 (inf_child_open_target, inf_child_mourn_inferior)
7843 (inf_child_maybe_unpush_target): Delete.
7844 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7845 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7846 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7847 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7848 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7849 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7850 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7851 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7852 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7853 methods of inf_ptrace_target.
7854 (inf_ptrace_target): Delete function.
7855 * inf-ptrace.h: Include "inf-child.h".
7856 (inf_ptrace_target): Delete function declaration.
7857 (inf_ptrace_target): New class.
7858 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7859 * linux-nat.c (linux_target): New.
7860 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7861 (linux_nat_target::~linux_nat_target): New.
7862 (linux_child_post_attach, linux_child_post_startup_inferior)
7863 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7864 (linux_child_remove_fork_catchpoint)
7865 (linux_child_insert_vfork_catchpoint)
7866 (linux_child_remove_vfork_catchpoint)
7867 (linux_child_insert_exec_catchpoint)
7868 (linux_child_remove_exec_catchpoint)
7869 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7870 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7871 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7872 (linux_nat_stopped_data_address)
7873 (linux_nat_stopped_by_sw_breakpoint)
7874 (linux_nat_supports_stopped_by_sw_breakpoint)
7875 (linux_nat_stopped_by_hw_breakpoint)
7876 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7877 (linux_nat_kill, linux_nat_mourn_inferior)
7878 (linux_nat_xfer_partial, linux_nat_thread_alive)
7879 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7880 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7881 (linux_child_static_tracepoint_markers_by_strid)
7882 (linux_nat_is_async_p, linux_nat_can_async_p)
7883 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7884 (linux_nat_supports_multi_process)
7885 (linux_nat_supports_disable_randomization, linux_nat_async)
7886 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7887 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7888 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7889 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7890 methods of linux_nat_target.
7891 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7892 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7893 parameter.
7894 (check_stopped_by_watchpoint): Adjust.
7895 (linux_xfer_partial): Delete.
7896 (linux_target_install_ops, linux_target, linux_nat_add_target):
7897 Delete.
7898 (linux_nat_target::linux_nat_target): New.
7899 * linux-nat.h: Include "inf-ptrace.h".
7900 (linux_nat_target): New.
7901 (linux_target, linux_target_install_ops, linux_nat_add_target):
7902 Delete function declarations.
7903 (linux_target): Declare global.
7904 * linux-thread-db.c (thread_db_target): New.
7905 (thread_db_target::thread_db_target): New.
7906 (thread_db_ops): Delete.
7907 (the_thread_db_target): New.
7908 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7909 (thread_db_update_thread_list, thread_db_pid_to_str)
7910 (thread_db_extra_thread_info)
7911 (thread_db_thread_handle_to_thread_info)
7912 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7913 (thread_db_resume): Refactor as methods of thread_db_target.
7914 (init_thread_db_ops): Delete.
7915 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7916 * x86-linux-nat.c: Don't include "linux-nat.h".
7917 (super_post_startup_inferior): Delete.
7918 (x86_linux_nat_target::~x86_linux_nat_target): New.
7919 (x86_linux_child_post_startup_inferior)
7920 (x86_linux_read_description, x86_linux_enable_btrace)
7921 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7922 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7923 methods of x86_linux_nat_target.
7924 (x86_linux_create_target): Delete. Bits folded ...
7925 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7926 pointer.
7927 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7928 (x86_linux_nat_target): New class.
7929 (x86_linux_create_target): Delete.
7930 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7931 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7932 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7933 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7934 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7935 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7936 make extern.
7937 (x86_use_watchpoints): Delete.
7938 * x86-nat.h: Include "breakpoint.h" and "target.h".
7939 (x86_use_watchpoints): Delete.
7940 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7941 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7942 (x86_insert_watchpoint, x86_remove_watchpoint)
7943 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7944 (x86_stopped_by_hw_breakpoint): New declarations.
7945 (x86_nat_target): New template class.
7946
7947 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7948 (the_ppc_linux_nat_target): New.
7949 (ppc_linux_fetch_inferior_registers)
7950 (ppc_linux_can_use_hw_breakpoint)
7951 (ppc_linux_region_ok_for_hw_watchpoint)
7952 (ppc_linux_ranged_break_num_registers)
7953 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7954 (ppc_linux_insert_mask_watchpoint)
7955 (ppc_linux_remove_mask_watchpoint)
7956 (ppc_linux_can_accel_watchpoint_condition)
7957 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7958 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7959 (ppc_linux_watchpoint_addr_within_range)
7960 (ppc_linux_masked_watch_num_registers)
7961 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7962 (ppc_linux_read_description): Refactor as methods of
7963 ppc_linux_nat_target.
7964 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7965
7966 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7967 (procfs_target): New class.
7968 (the_procfs_target): New.
7969 (procfs_target): Delete function.
7970 (procfs_auxv_parse, procfs_attach, procfs_detach)
7971 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7972 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7973 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7974 (procfs_create_inferior, procfs_update_thread_list)
7975 (procfs_thread_alive, procfs_pid_to_str)
7976 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7977 (procfs_stopped_data_address, procfs_insert_watchpoint)
7978 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7979 (proc_find_memory_regions, procfs_info_proc)
7980 (procfs_make_note_section): Refactor as methods of procfs_target.
7981 (_initialize_procfs): Adjust.
7982 * sol-thread.c (sol_thread_target): New class.
7983 (sol_thread_ops): Now a sol_thread_target.
7984 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7985 (sol_thread_fetch_registers, sol_thread_store_registers)
7986 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7987 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7988 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7989 (init_sol_thread_ops): Delete.
7990 (_initialize_sol_thread): Adjust. Remove references to
7991 init_sol_thread_ops and complete_target_initialization.
7992
7993 * windows-nat.c (windows_nat_target): New class.
7994 (windows_fetch_inferior_registers)
7995 (windows_store_inferior_registers, windows_resume, windows_wait)
7996 (windows_attach, windows_detach, windows_pid_to_exec_file)
7997 (windows_files_info, windows_create_inferior)
7998 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7999 (windows_close, windows_pid_to_str, windows_xfer_partial)
8000 (windows_get_tib_address, windows_get_ada_task_ptid)
8001 (windows_thread_name, windows_thread_alive): Refactor as
8002 windows_nat_target methods.
8003 (do_initial_windows_stuff): Adjust.
8004 (windows_target): Delete function.
8005 (_initialize_windows_nat): Adjust.
8006
8007 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8008 (darwin_mourn_inferior, darwin_kill_inferior)
8009 (darwin_create_inferior, darwin_attach, darwin_detach)
8010 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8011 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8012 (darwin_supports_multi_process): Refactor as darwin_nat_target
8013 methods.
8014 (darwin_resume_to, darwin_files_info): Delete.
8015 (_initialize_darwin_inferior): Rename to ...
8016 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8017 * darwin-nat.h: Include "inf-child.h".
8018 (darwin_nat_target): New class.
8019 (darwin_complete_target): Delete.
8020 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8021 (darwin_target): New.
8022 (i386_darwin_fetch_inferior_registers)
8023 (i386_darwin_store_inferior_registers): Refactor as methods of
8024 darwin_nat_target.
8025 (darwin_complete_target): Delete, with ...
8026 (_initialize_i386_darwin_nat): ... bits factored out here.
8027
8028 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8029 (the_alpha_linux_nat_target): New.
8030 (alpha_linux_register_u_offset): Refactor as
8031 alpha_linux_nat_target method.
8032 (_initialize_alpha_linux_nat): Adjust.
8033 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8034 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8035 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8036 methods of linux_nat_trad_target.
8037 (linux_trad_target): Delete.
8038 * linux-nat-trad.h (linux_trad_target): Delete function.
8039 (linux_nat_trad_target): New class.
8040 * mips-linux-nat.c (mips_linux_nat_target): New class.
8041 (super_fetch_registers, super_store_registers, super_close):
8042 Delete.
8043 (the_mips_linux_nat_target): New.
8044 (mips64_linux_regsets_fetch_registers)
8045 (mips64_linux_regsets_store_registers)
8046 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8047 (mips_linux_register_u_offset, mips_linux_read_description)
8048 (mips_linux_can_use_hw_breakpoint)
8049 (mips_linux_stopped_by_watchpoint)
8050 (mips_linux_stopped_data_address)
8051 (mips_linux_region_ok_for_hw_watchpoint)
8052 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8053 (mips_linux_close): Refactor as methods of mips_linux_nat.
8054 (_initialize_mips_linux_nat): Adjust to C++ification.
8055
8056 * aix-thread.c (aix_thread_target): New class.
8057 (aix_thread_ops): Now an aix_thread_target.
8058 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8059 (aix_thread_fetch_registers, aix_thread_store_registers)
8060 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8061 (aix_thread_thread_alive, aix_thread_pid_to_str)
8062 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8063 Refactor as methods of aix_thread_target.
8064 (init_aix_thread_ops): Delete.
8065 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8066 and complete_target_initialization.
8067 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8068 (rs6000_nat_target): New class.
8069 (the_rs6000_nat_target): New.
8070 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8071 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8072 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8073 (super_create_inferior): Delete.
8074 (_initialize_rs6000_nat): Adjust to C++ification.
8075
8076 * arm-linux-nat.c (arm_linux_nat_target): New class.
8077 (the_arm_linux_nat_target): New.
8078 (arm_linux_fetch_inferior_registers)
8079 (arm_linux_store_inferior_registers, arm_linux_read_description)
8080 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8081 (arm_linux_remove_hw_breakpoint)
8082 (arm_linux_region_ok_for_hw_watchpoint)
8083 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8084 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8085 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8086 arm_linux_nat_target.
8087 (_initialize_arm_linux_nat): Adjust to C++ification.
8088
8089 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8090 (the_aarch64_linux_nat_target): New.
8091 (aarch64_linux_fetch_inferior_registers)
8092 (aarch64_linux_store_inferior_registers)
8093 (aarch64_linux_child_post_startup_inferior)
8094 (aarch64_linux_read_description)
8095 (aarch64_linux_can_use_hw_breakpoint)
8096 (aarch64_linux_insert_hw_breakpoint)
8097 (aarch64_linux_remove_hw_breakpoint)
8098 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8099 (aarch64_linux_region_ok_for_hw_watchpoint)
8100 (aarch64_linux_stopped_data_address)
8101 (aarch64_linux_stopped_by_watchpoint)
8102 (aarch64_linux_watchpoint_addr_within_range)
8103 (aarch64_linux_can_do_single_step): Refactor as methods of
8104 aarch64_linux_nat_target.
8105 (super_post_startup_inferior): Delete.
8106 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8107
8108 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8109 (the_hppa_linux_nat_target): New.
8110 (hppa_linux_fetch_inferior_registers)
8111 (hppa_linux_store_inferior_registers): Refactor as methods of
8112 hppa_linux_nat_target.
8113 (_initialize_hppa_linux_nat): Adjust to C++ification.
8114
8115 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8116 (the_ia64_linux_nat_target): New.
8117 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8118 (ia64_linux_stopped_data_address)
8119 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8120 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8121 ia64_linux_nat_target methods.
8122 (super_xfer_partial): Delete.
8123 (_initialize_ia64_linux_nat): Adjust to C++ification.
8124
8125 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8126 (the_m32r_linux_nat_target): New.
8127 (m32r_linux_fetch_inferior_registers)
8128 (m32r_linux_store_inferior_registers): Refactor as
8129 m32r_linux_nat_target methods.
8130 (_initialize_m32r_linux_nat): Adjust to C++ification.
8131
8132 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8133 (the_m68k_linux_nat_target): New.
8134 (m68k_linux_fetch_inferior_registers)
8135 (m68k_linux_store_inferior_registers): Refactor as
8136 m68k_linux_nat_target methods.
8137 (_initialize_m68k_linux_nat): Adjust to C++ification.
8138
8139 * s390-linux-nat.c (s390_linux_nat_target): New class.
8140 (the_s390_linux_nat_target): New.
8141 (s390_linux_fetch_inferior_registers)
8142 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8143 (s390_insert_watchpoint, s390_remove_watchpoint)
8144 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8145 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8146 (s390_auxv_parse, s390_read_description): Refactor as methods of
8147 s390_linux_nat_target.
8148 (_initialize_s390_nat): Adjust to C++ification.
8149
8150 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8151 (the_sparc_linux_nat_target): New.
8152 (_initialize_sparc_linux_nat): Adjust to C++ification.
8153 * sparc-nat.c (sparc_fetch_inferior_registers)
8154 (sparc_store_inferior_registers): Remove target_ops parameter.
8155 * sparc-nat.h (sparc_fetch_inferior_registers)
8156 (sparc_store_inferior_registers): Remove target_ops parameter.
8157 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8158 (the_sparc64_linux_nat_target): New.
8159 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8160
8161 * spu-linux-nat.c (spu_linux_nat_target): New class.
8162 (the_spu_linux_nat_target): New.
8163 (spu_child_post_startup_inferior, spu_child_post_attach)
8164 (spu_child_wait, spu_fetch_inferior_registers)
8165 (spu_store_inferior_registers, spu_xfer_partial)
8166 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8167 methods.
8168 (_initialize_spu_nat): Adjust to C++ification.
8169
8170 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8171 (the_tilegx_linux_nat_target): New.
8172 (fetch_inferior_registers, store_inferior_registers):
8173 Refactor as methods.
8174 (_initialize_tile_linux_nat): Adjust to C++ification.
8175
8176 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8177 (the_xtensa_linux_nat_target): New.
8178 (xtensa_linux_fetch_inferior_registers)
8179 (xtensa_linux_store_inferior_registers): Refactor as
8180 xtensa_linux_nat_target methods.
8181 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8182
8183 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8184 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8185 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8186 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8187 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8188 (fbsd_stopped_by_sw_breakpoint)
8189 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8190 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8191 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8192 (fbsd_post_startup_inferior, fbsd_post_attach)
8193 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8194 (fbsd_set_syscall_catchpoint)
8195 (super_xfer_partial, super_resume, super_wait)
8196 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8197 (fbsd_handle_debug_trap): Remove target_ops parameter.
8198 (fbsd_nat_add_target): Delete.
8199 * fbsd-nat.h: Include "inf-ptrace.h".
8200 (fbsd_nat_add_target): Delete.
8201 (USE_SIGTRAP_SIGINFO): Define.
8202 (fbsd_nat_target): New class.
8203
8204 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8205 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8206 (amd64bsd_target): Delete.
8207 * amd64-bsd-nat.h: New file.
8208 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8209 "x86-bsd-nat.h".
8210 (amd64_fbsd_nat_target): New class.
8211 (the_amd64_fbsd_nat_target): New.
8212 (amd64fbsd_read_description): Refactor as method of
8213 amd64_fbsd_nat_target.
8214 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8215 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8216 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8217 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8218 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8219 (i386bsd_target): Delete.
8220 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8221 (i386bsd_fetch_inferior_registers)
8222 (i386bsd_store_inferior_registers): Declare.
8223 (i386_bsd_nat_target): New class.
8224 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8225 (the_i386_fbsd_nat_target): New.
8226 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8227 i386_fbsd_nat_target methods.
8228 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8229 (_initialize_i386fbsd_nat): Adjust to C++ification.
8230 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8231 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8232 (_initialize_x86_bsd_nat): Adjust to C++ification.
8233 * x86-bsd-nat.h: Include "x86-nat.h".
8234 (x86bsd_target): Delete declaration.
8235 (x86bsd_nat_target): New class.
8236
8237 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8238 (the_aarch64_fbsd_nat_target): New.
8239 (aarch64_fbsd_fetch_inferior_registers)
8240 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8241 aarch64_fbsd_nat_target.
8242 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8243 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8244 (the_alpha_bsd_nat_target): New.
8245 (alphabsd_fetch_inferior_registers)
8246 (alphabsd_store_inferior_registers): Refactor as
8247 alpha_bsd_nat_target methods.
8248 (_initialize_alphabsd_nat): Refactor as methods of
8249 alpha_bsd_nat_target.
8250 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8251 (the_amd64_nbsd_nat_target): New.
8252 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8253 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8254 (the_amd64_obsd_nat_target): New.
8255 (_initialize_amd64obsd_nat): Adjust to C++ification.
8256 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8257 (the_arm_fbsd_nat_target): New.
8258 (arm_fbsd_fetch_inferior_registers)
8259 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8260 (_initialize_arm_fbsd_nat): Refactor as methods of
8261 arm_fbsd_nat_target.
8262 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8263 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8264 (the_arm_netbsd_nat_target): New.
8265 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8266 arm_netbsd_nat_target.
8267 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8268 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8269 (the_hppa_nbsd_nat_target): New.
8270 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8271 hppa_nbsd_nat_target methods.
8272 (_initialize_hppanbsd_nat): Adjust to C++ification.
8273 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8274 (the_hppa_obsd_nat_target): New.
8275 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8276 methods of hppa_obsd_nat_target.
8277 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8278 add_target.
8279 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8280 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8281 add_target.
8282 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8283 (_initialize_i386obsd_nat): Use add_target.
8284 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8285 (the_m68k_bsd_nat_target): New.
8286 (m68kbsd_fetch_inferior_registers)
8287 (m68kbsd_store_inferior_registers): Refactor as methods of
8288 m68k_bsd_nat_target.
8289 (_initialize_m68kbsd_nat): Adjust to C++ification.
8290 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8291 (the_mips_fbsd_nat_target): New.
8292 (mips_fbsd_fetch_inferior_registers)
8293 (mips_fbsd_store_inferior_registers): Refactor as methods of
8294 mips_fbsd_nat_target.
8295 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8296 add_target.
8297 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8298 (the_mips_nbsd_nat_target): New.
8299 (mipsnbsd_fetch_inferior_registers)
8300 (mipsnbsd_store_inferior_registers): Refactor as methods of
8301 mips_nbsd_nat_target.
8302 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8303 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8304 (the_mips64_obsd_nat_target): New.
8305 (mips64obsd_fetch_inferior_registers)
8306 (mips64obsd_store_inferior_registers): Refactor as methods of
8307 mips64_obsd_nat_target.
8308 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8309 add_target.
8310 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8311 nbsd_nat_target.
8312 * nbsd-nat.h: Include "inf-ptrace.h".
8313 (nbsd_nat_target): New class.
8314 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8315 (obsd_wait): Refactor as methods of obsd_nat_target.
8316 (obsd_add_target): Delete.
8317 * obsd-nat.h: Include "inf-ptrace.h".
8318 (obsd_nat_target): New class.
8319 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8320 (the_ppc_fbsd_nat_target): New.
8321 (ppcfbsd_fetch_inferior_registers)
8322 (ppcfbsd_store_inferior_registers): Refactor as methods of
8323 ppc_fbsd_nat_target.
8324 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8325 add_target.
8326 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8327 (the_ppc_nbsd_nat_target): New.
8328 (ppcnbsd_fetch_inferior_registers)
8329 (ppcnbsd_store_inferior_registers): Refactor as methods of
8330 ppc_nbsd_nat_target.
8331 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8332 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8333 (the_ppc_obsd_nat_target): New.
8334 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8335 methods of ppc_obsd_nat_target.
8336 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8337 add_target.
8338 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8339 (the_sh_nbsd_nat_target): New.
8340 (shnbsd_fetch_inferior_registers)
8341 (shnbsd_store_inferior_registers): Refactor as methods of
8342 sh_nbsd_nat_target.
8343 (_initialize_shnbsd_nat): Adjust to C++ification.
8344 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8345 (inf_ptrace_xfer_partial): Delete.
8346 (sparc_xfer_partial, sparc_target): Delete.
8347 * sparc-nat.h (sparc_fetch_inferior_registers)
8348 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8349 (sparc_target): Delete function declaration.
8350 (sparc_target): New template class.
8351 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8352 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8353 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8354 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8355 add_target.
8356 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8357 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8358 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8359 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8360 add_target.
8361 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8362 (the_vax_bsd_nat_target): New.
8363 (vaxbsd_fetch_inferior_registers)
8364 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8365 methods.
8366 (_initialize_vaxbsd_nat): Adjust to C++ification.
8367
8368 * bsd-kvm.c (bsd_kvm_target): New class.
8369 (bsd_kvm_ops): Now a bsd_kvm_target.
8370 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8371 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8372 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8373 bsd_kvm_target.
8374 (bsd_kvm_return_one): Delete.
8375 (bsd_kvm_add_target): Adjust to C++ification.
8376
8377 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8378 (nto_procfs_target_procfs): New classes.
8379 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8380 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8381 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8382 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8383 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8384 (procfs_remove_hw_breakpoint, procfs_resume)
8385 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8386 (procfs_kill_inferior, procfs_store_registers)
8387 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8388 as methods of nto_procfs_target.
8389 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8390 (nto_native_ops): Delete.
8391 (procfs_open, procfs_native_open): Delete.
8392 (nto_native_ops): Now an nto_procfs_target_native.
8393 (init_procfs_targets): Adjust to C++ification.
8394 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8395 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8396 Refactor as methods of nto_procfs_target.
8397
8398 * go32-nat.c (go32_nat_target): New class.
8399 (the_go32_nat_target): New.
8400 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8401 (go32_store_registers, go32_xfer_partial, go32_files_info)
8402 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8403 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8404 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8405 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8406 (go32_target): Delete.
8407 (_initialize_go32_nat): Adjust to C++ification.
8408
8409 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8410 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8411 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8412 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8413 gnu_nat_target.
8414 (gnu_target): Delete.
8415 * gnu-nat.h (gnu_target): Delete.
8416 (gnu_nat_target): New class.
8417 * i386-gnu-nat.c (gnu_base_target): New.
8418 (i386_gnu_nat_target): New class.
8419 (the_i386_gnu_nat_target): New.
8420 (_initialize_i386gnu_nat): Adjust to C++ification.
8421
8422 2018-05-02 Pedro Alves <palves@redhat.com>
8423
8424 * bfd-target.c (target_bfd_xclose): Rename to ...
8425 (target_bfd_close): ... this.
8426 (target_bfd_reopen): Adjust.
8427 * target.c (target_close): Remove references to to_xclose.
8428 * target.h (target_ops::to_xclose): Delete.
8429 (target_ops::to_close): Update comments.
8430
8431 2018-05-02 Pedro Alves <palves@redhat.com>
8432
8433 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8434 "linux-nat.h".
8435 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8436 * inf-ptrace.c (inf_ptrace_register_u_offset)
8437 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8438 (inf_ptrace_store_register, inf_ptrace_store_registers)
8439 (inf_ptrace_trad_target): Move to ...
8440 * linux-nat-trad.c: ... this new file.
8441 * linux-nat-trad.h: New file.
8442 * linux-nat.c (linux_target_install_ops): Make extern.
8443 (linux_trad_target): Delete.
8444 * linux-nat.h (linux_trad_target): Delete declaration.
8445 (linux_target_install_ops): Declare.
8446 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8447 "linux-nat.h".
8448
8449 2018-05-02 Pedro Alves <palves@redhat.com>
8450
8451 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8452 procfs_target/add_target here.
8453 * procfs.c (procfs_target): Make static.
8454 (_initialize_procfs): Call add_target here.
8455 * procfs.h (struct target_ops): Remove forward declaration.
8456 (procfs_target): Remove declaration.
8457 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8458
8459 2018-05-02 Pedro Alves <palves@redhat.com>
8460
8461 * procfs.c (procfs_stopped_by_watchpoint)
8462 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8463 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8464 Forward declare.
8465 (procfs_use_watchpoints): Delete, move contents...
8466 (procfs_target): ... here.
8467 * procfs.h (procfs_use_watchpoints): Delete declaration.
8468 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8469 procfs_use_watchpoints.
8470 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8471 procfs_use_watchpoints.
8472
8473 2018-05-02 Tom Tromey <tom@tromey.com>
8474
8475 PR python/20084:
8476 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8477 and var_zuinteger_unlimited.
8478 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8479 and PARAM_ZUINTEGER_UNLIMITED.
8480 (set_parameter_value): Handle var_zuinteger and
8481 var_zuinteger_unlimited.
8482 (add_setshow_generic): Likewise.
8483 (parmpy_init): Likewise.
8484
8485 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8486
8487 PR rust/23124
8488 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8489 pointer is not null before dereferencing it.
8490
8491 2018-04-30 Tom Tromey <tom@tromey.com>
8492
8493 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8494 is_mi_like_p.
8495
8496 2018-04-30 Tom Tromey <tom@tromey.com>
8497
8498 * breakpoint.c (mention): Remove use of is_mi_like_p.
8499 (print_mention_ranged_breakpoint): Likewise.
8500 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8501 of is_mi_like_p.
8502
8503 2018-04-30 Tom Tromey <tom@tromey.com>
8504
8505 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8506
8507 2018-04-30 Tom Tromey <tom@tromey.com>
8508
8509 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8510 (info_spu_event_command): Remove some uses of is_mi_like_p.
8511
8512 2018-04-30 Tom Tromey <tom@tromey.com>
8513
8514 * python/py-framefilter.c (py_print_single_arg)
8515 (enumerate_locals, py_print_args, py_print_frame): Remove some
8516 uses of is_mi_like_p.
8517
8518 2018-04-30 Tom Tromey <tom@tromey.com>
8519
8520 * ui-out.c: Update.
8521 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8522 * ui-out.h (ui_out::is_mi_like_p): Now const.
8523 (ui_out::do_is_mi_like_p): Now const.
8524 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8525
8526 2018-04-30 Tom Tromey <tom@tromey.com>
8527
8528 * varobj.c (varobj_set_visualizer): Use new_reference.
8529 * python/python.c (gdbpy_decode_line): Use new_reference.
8530 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8531 new_reference.
8532
8533 2018-04-30 Tom Tromey <tom@tromey.com>
8534
8535 * varobj.c (install_new_value): Use new_reference.
8536 * value.h (value_incref): Return void. Swap intro comment with
8537 value_decref.
8538 * value.c (set_value_parent): Use new_reference.
8539 (value_incref): Return void. Update intro comment.
8540 (release_value): Use new_reference.
8541 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8542
8543 2018-04-30 Tom Tromey <tom@tromey.com>
8544
8545 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8546 * gdb_bfd.h (new_bfd_ref): Remove.
8547 (gdb_bfd_open): Update comment.
8548 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8549 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8550 (gdb_bfd_fdopenr): Use new_reference.
8551 * exec.c (exec_file_attach): Use new_reference.
8552
8553 2018-04-30 Tom Tromey <tom@tromey.com>
8554
8555 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8556 method.
8557
8558 2018-04-30 Tom Tromey <tom@tromey.com>
8559
8560 * jit.c (jit_read_code_entry): Use type_align.
8561 * i386-tdep.c (i386_gdbarch_init): Don't call
8562 set_gdbarch_long_long_align_bit.
8563 * gdbarch.sh: Remove long_long_align_bit.
8564 * gdbarch.c, gdbarch.h: Rebuild.
8565 * arc-tdep.c (arc_type_align): New function.
8566 (arc_gdbarch_init): Use arc_type_align. Don't call
8567 set_gdbarch_long_long_align_bit.
8568
8569 2018-04-30 Tom Tromey <tom@tromey.com>
8570
8571 * rust-lang.c (rust_type_alignment): Remove.
8572 (rust_composite_type): Use type_align.
8573
8574 2018-04-30 Tom Tromey <tom@tromey.com>
8575
8576 * NEWS: Mention Type.align.
8577 * python/py-type.c (typy_get_alignof): New function.
8578 (type_object_getset): Add "alignof".
8579
8580 2018-04-30 Tom Tromey <tom@tromey.com>
8581
8582 PR exp/17095:
8583 * NEWS: Update.
8584 * std-operator.def (UNOP_ALIGNOF): New operator.
8585 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8586 New.
8587 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8588 * c-lang.c (c_op_print_tab): Add alignof.
8589 * c-exp.y (ALIGNOF): New token.
8590 (exp): Add "ALIGNOF" production.
8591 (ident_tokens): Add _Alignof and alignof.
8592
8593 2018-04-30 Tom Tromey <tom@tromey.com>
8594
8595 * i386-tdep.c (i386_type_align): New function.
8596 (i386_gdbarch_init): Update.
8597 * gdbarch.sh (type_align): New method.
8598 * gdbarch.c, gdbarch.h: Rebuild.
8599 * arch-utils.h (default_type_align): Declare.
8600 * arch-utils.c (default_type_align): New function.
8601 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8602 (struct type) <align_log2>: New field.
8603 <instance_flags>: Now a bitfield.
8604 (TYPE_RAW_ALIGN): New macro.
8605 (type_align, type_raw_align, set_type_align): Declare.
8606 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8607 functions.
8608 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8609 (get_alignment, maybe_set_alignment): New functions.
8610 (read_structure_type, read_enumeration_type, read_array_type)
8611 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8612 (read_subrange_type, read_base_type): Set type alignment.
8613
8614 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8615
8616 * dwarf2read.c (read_index_from_section): Use bool.
8617
8618 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8619
8620 PR gdb/22950
8621 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8622 with #ifdef.
8623
8624 2018-04-29 John Reiser <jreiser@BitWagon.com>
8625
8626 PR build/22873
8627 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8628 last step, and do it atomically.
8629
8630 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8631
8632 * compile/compile-c-types.c (convert_int, convert_float):
8633 Update for C FE v1.
8634
8635 2018-04-27 Tom Tromey <tom@tromey.com>
8636
8637 PR rust/22545:
8638 * rust-lang.c (rust_inclusive_range_type_p): New function.
8639 (rust_range): Handle inclusive ranges.
8640 (rust_compute_range): Likewise.
8641 * rust-exp.y (struct rust_op) <inclusive>: New field.
8642 (DOTDOTEQ): New constant.
8643 (range_expr): Add "..=" productions.
8644 (operator_tokens): Add "..=" token.
8645 (ast_range): Add "inclusive" parameter.
8646 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8647 ranges.
8648 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8649 bounds values.
8650 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8651 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8652 Update comments.
8653 * expprint.c (print_subexp_standard): Handle new bounds values.
8654 (dump_subexp_body_standard): Likewise.
8655
8656 2018-04-27 Tom Tromey <tom@tromey.com>
8657
8658 * configure: Rebuild.
8659 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8660 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8661 "OVERRIDE".
8662 (class symbol_needs_eval_context): Likewise.
8663 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8664 (mock_mapped_index::symbol_name_at): Use "override". Remove
8665 "virtual".
8666 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8667 "override".
8668 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8669 * aarch64-tdep.c (instruction_reader::read): Use "override".
8670 (instruction_reader_test::read): Likewise.
8671 * arm-tdep.c (instruction_reader::read): Use "override".
8672 (instruction_reader_thumb::read): Likewise.
8673
8674 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8675
8676 PR remote/9665
8677 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8678 instead of remote_send.
8679 (remote_send): Remove.
8680
8681 2018-04-26 Pedro Alves <palves@redhat.com>
8682
8683 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8684 find_function_start_sal instead of find_pc_line.
8685
8686 2018-04-26 Pedro Alves <palves@redhat.com>
8687
8688 * breakpoint.c (set_breakpoint_location_function): Handle
8689 mst_data_gnu_ifunc.
8690 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8691 * elfread.c (elf_symtab_read): Give data symbols with
8692 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8693 (elf_rel_plt_read): Update comment.
8694 * linespec.c (convert_linespec_to_sals): Handle
8695 mst_data_gnu_ifunc.
8696 (minsym_found): Handle mst_data_gnu_ifunc.
8697 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8698 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8699 * parse.c (find_minsym_type_and_address): Handle
8700 mst_data_gnu_ifunc.
8701 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8702 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8703 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8704 comment.
8705 <mst_data_gnu_ifunc>: New enumerator.
8706
8707 2018-04-26 Pedro Alves <palves@redhat.com>
8708
8709 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8710 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8711 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8712 Handle it.
8713 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8714 (lookup_minimal_symbol_by_pc): Adjust.
8715 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8716 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8717 * minsyms.h (lookup_msym_prefer): New enum.
8718 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8719 parameter by a lookup_msym_prefer parameter.
8720
8721 2018-04-26 Pedro Alves <palves@redhat.com>
8722
8723 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8724 ends in "@plt" instead of looking at the symbol's section.
8725
8726 2018-04-26 Pedro Alves <palves@redhat.com>
8727
8728 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8729 all references.
8730 (find_pc_partial_function_gnu_ifunc): Rename to ...
8731 (find_pc_partial_function): ... this, and remove references to
8732 'is_gnu_ifunc_p'.
8733 (find_pc_partial_function): Delete old implementation.
8734 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8735
8736 2018-04-26 Pedro Alves <palves@redhat.com>
8737
8738 * linespec.c (struct bound_minimal_symbol_search_key): New.
8739 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8740 skip first line if we found a GNU ifunc minimal symbol by name.
8741 (compare_msymbols): Change parameters to work with a destructured
8742 lhs minsym.
8743 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8744 functions.
8745
8746 2018-04-26 Pedro Alves <palves@redhat.com>
8747
8748 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8749 ifunc targets here. Instead, if we have an ifunc minsym, use its
8750 address/name.
8751 (add_location_to_breakpoint): Store the minsym and the objfile in
8752 the breakpoint location.
8753 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8754 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8755 Record the minsym in the sal.
8756 * symtab.h (symtab_and_line) <msymbol>: New field.
8757
8758 2018-04-26 Pedro Alves <palves@redhat.com>
8759
8760 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8761 unless we actually resolved the ifunc.
8762
8763 2018-04-26 Pedro Alves <palves@redhat.com>
8764
8765 * c-exp.y (variable production): Prefer ifunc minsyms over
8766 regular function symbols.
8767 * symtab.c (find_gnu_ifunc): New function.
8768 * minsyms.h (lookup_msym_prefer): New enum.
8769 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8770 parameter by a lookup_msym_prefer parameter.
8771 * symtab.h (find_gnu_ifunc): New declaration.
8772
8773 2018-04-26 Pedro Alves <palves@redhat.com>
8774
8775 * blockframe.c (find_gnu_ifunc_target_type): New function.
8776 (find_function_type): New.
8777 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8778 return a value with a memory address.
8779 (eval_call): For calls to GNU ifunc functions, try to find the
8780 type of the target function from the type that the resolver
8781 returns.
8782 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8783 symbols.
8784 * infcall.c (find_function_return_type): Delete.
8785 (find_function_addr): Add 'function_type' parameter. For calls to
8786 GNU ifunc functions, try to find the type of the target function
8787 from the type that the resolver returns, and return it via
8788 FUNCTION_TYPE.
8789 (call_function_by_hand_dummy): Adjust to use the function type
8790 returned by find_function_addr.
8791 (find_function_addr): Add 'function_type' parameter and move
8792 description here.
8793 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8794 declarations.
8795
8796 2018-04-26 Pedro Alves <palves@redhat.com>
8797
8798 * c-exp.y (variable production): Skip finding an alias for ifunc
8799 symbols.
8800
8801 2018-04-26 Pedro Alves <palves@redhat.com>
8802
8803 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8804
8805 2018-04-25 Pedro Alves <palves@redhat.com>
8806
8807 * infcmd.c (kill_command): Print the pid as string, not the whole
8808 thread's ptid. Add comment. s/has been killed/killed/ in output
8809 message.
8810 * remote.c (remote_detach_1): Print the pid as string, not the
8811 whole thread's ptid.
8812
8813 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8814 Sergio Durigan Junior <sergiodj@redhat.com>
8815 Pedro Alves <palves@redhat.com>
8816
8817 * infcmd.c (kill_command): Print message when inferior has
8818 been killed.
8819 * inferior.c (print_inferior_events): Remove 'static'. Set as
8820 '1'.
8821 (add_inferior): Improve message printed when
8822 'print_inferior_events' is on.
8823 (exit_inferior): Remove message printed when
8824 'print_inferior_events' is on.
8825 (detach_inferior): Improve message printed when
8826 'print_inferior_events' is on.
8827 (initialize_inferiors): Use 'add_inferior_silent' to set
8828 'current_inferior_'.
8829 * inferior.h (print_inferior_events): Declare here as
8830 'extern'.
8831 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8832 '[Detaching...]' messages when 'print_inferior_events' is on.
8833 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8834 as prefix/suffix for messages. Remove periods. Fix erroneous
8835 'Detaching after fork from child...', replace it by '... from
8836 parent...'.
8837 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8838 prefix/suffix when printing 'Detaching...' messages. Print
8839 them when 'print_inferior_events' is on.
8840 * remote.c (remote_detach_1): Print message when detaching
8841 from inferior and '!is_fork_parent'.
8842
8843 2018-04-24 Tom Tromey <tom@tromey.com>
8844
8845 * cli-out.h: Reindent.
8846
8847 2018-04-24 Tom Tromey <tom@tromey.com>
8848
8849 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8850 (cli_ui_out::do_field_string): Use fputs_filtered.
8851 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8852
8853 2018-04-23 Tom Tromey <tom@tromey.com>
8854
8855 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8856 gdb::unique_xmalloc_ptr.
8857
8858 2018-04-23 Tom Tromey <tom@tromey.com>
8859
8860 * configure: Rebuild.
8861
8862 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8863
8864 PR gdb/23095
8865 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8866 prepare_for_testing. Set normal_bp to r_debug_state if target
8867 is bsd.
8868
8869 2018-04-21 Pedro Alves <palves@redhat.com>
8870 Rajendra SY <rajendra.sy@gmail.com>
8871
8872 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8873 * remote.c (extended_remote_attach): In all-stop mode, mark the
8874 thread as executing.
8875
8876 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8877
8878 * thread.c (thread_apply_all_command): Fix comment.
8879 (thread_command): Fix comment.
8880
8881 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8882
8883 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8884 parameter.
8885 * features/aarch64-core.c (create_feature_aarch64_core):
8886 Regenerate.
8887 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8888 Likewise.
8889 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8890 Likewise.
8891 * features/i386/32bit-avx512.c
8892 (create_feature_i386_32bit_avx512): Likewise.
8893 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8894 Likewise.
8895 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8896 Likewise.
8897 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8898 Likewise.
8899 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8900 Likewise.
8901 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8902 Likewise.
8903 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8904 Likewise.
8905 * features/i386/64bit-avx512.c
8906 (create_feature_i386_64bit_avx512): Likewise.
8907 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8908 Likewise.
8909 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8910 Likewise.
8911 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8912 Likewise.
8913 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8914 Likewise.
8915 * features/i386/64bit-segments.c
8916 (create_feature_i386_64bit_segments): Likewise.
8917 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8918 Likewise.
8919 * features/i386/x32-core.c
8920 (create_feature_i386_x32_core): Likewise.
8921 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8922 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8923 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8924 * target-descriptions.c: In generated code, don't pass xml
8925 filename.
8926
8927 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8928
8929 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8930 (print_xml_feature::visit_post): Likewise.
8931 (print_xml_feature::visit): Likewise.
8932 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8933 (print_xml_feature): Add new class.
8934 * regformats/regdat.sh: Null xmltarget on feature targets.
8935 * target-descriptions.c (struct target_desc): Add xmltarget.
8936 (maintenance_check_tdesc_xml_convert): Add unittest function.
8937 (tdesc_get_features_xml): Add function to get xml.
8938 (maintenance_check_xml_descriptions): Test xml generation.
8939 * xml-tdesc.c (string_read_description_xml): Add function.
8940 * xml-tdesc.h (string_read_description_xml): Add declaration.
8941
8942 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8943
8944 * features/Makefile: Add feature marker to targets with new style
8945 target descriptions.
8946 * regformats/aarch64.dat: Regenerate.
8947 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8948 * regformats/i386/amd64-avx-linux.dat: Likewise.
8949 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8950 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8951 * regformats/i386/amd64-linux.dat: Likewise.
8952 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8953 * regformats/i386/amd64.dat: Likewise.
8954 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8955 * regformats/i386/i386-avx-linux.dat: Likewise.
8956 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8957 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8958 * regformats/i386/i386-linux.dat: Likewise.
8959 * regformats/i386/i386-mmx-linux.dat: Likewise.
8960 * regformats/i386/i386-mpx-linux.dat: Likewise.
8961 * regformats/i386/i386.dat: Likewise.
8962 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8963 * regformats/i386/x32-avx-linux.dat: Likewise.
8964 * regformats/i386/x32-linux.dat: Likewise.
8965 * regformats/tic6x-c62x-linux.dat: Likewise.
8966 * regformats/tic6x-c64x-linux.dat: Likewise.
8967 * regformats/tic6x-c64xp-linux.dat: Likewise.
8968 * regformats/regdat.sh: Parse feature marker.
8969
8970 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8971
8972 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8973 (tdesc_osabi_name): Likewise.
8974 * target-descriptions.c (tdesc_architecture_name): Add new
8975 function.
8976 (tdesc_osabi_name): Likewise.
8977
8978 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8979
8980 * common/tdesc.c (tdesc_predefined_type): Move to here.
8981 (tdesc_named_type): Likewise.
8982 (tdesc_create_vector): Likewise.
8983 (tdesc_create_struct): Likewise.
8984 (tdesc_set_struct_size): Likewise.
8985 (tdesc_create_union): Likewise.
8986 (tdesc_create_flags): Likewise.
8987 (tdesc_create_enum): Likewise.
8988 (tdesc_add_field): Likewise.
8989 (tdesc_add_typed_bitfield): Likewise.
8990 (tdesc_add_bitfield): Likewise.
8991 (tdesc_add_flag): Likewise.
8992 (tdesc_add_enum_value): Likewise.
8993 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8994 (struct tdesc_type_vector): Likewise.
8995 (struct tdesc_type_field): Likewise.
8996 (struct tdesc_type_with_fields): Likewise.
8997 (tdesc_create_enum): Add declaration.
8998 (tdesc_add_typed_bitfield): Likewise.
8999 (tdesc_add_enum_value): Likewise.
9000 * target-descriptions.c (tdesc_type_field): Move from here.
9001 (tdesc_type_builtin): Likewise.
9002 (tdesc_type_vector): Likewise.
9003 (tdesc_type_with_fields): Likewise.
9004 (tdesc_predefined_types): Likewise.
9005 (tdesc_named_type): Likewise.
9006 (tdesc_create_vector): Likewise.
9007 (tdesc_create_struct): Likewise.
9008 (tdesc_set_struct_size): Likewise.
9009 (tdesc_create_union): Likewise.
9010 (tdesc_create_flags): Likewise.
9011 (tdesc_create_enum): Likewise.
9012 (tdesc_add_field): Likewise.
9013 (tdesc_add_typed_bitfield): Likewise.
9014 (tdesc_add_bitfield): Likewise.
9015 (tdesc_add_flag): Likewise.
9016 (tdesc_add_enum_value): Likewise.
9017 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9018 (tdesc_add_typed_bitfield): Likewise.
9019 (tdesc_add_enum_value): Likewise.
9020
9021 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9022
9023 * common/tdesc.c (tdesc_feature::accept): Move to here.
9024 (tdesc_feature::operator==): Likewise.
9025 (tdesc_create_reg): Likewise.
9026 * common/tdesc.h (tdesc_type_kind): Likewise.
9027 (struct tdesc_type): Likewise.
9028 (struct tdesc_feature): Likewise.
9029 * regformats/regdat.sh: Create a feature.
9030 * target-descriptions.c (tdesc_type_kind): Move from here.
9031 (tdesc_type): Likewise.
9032 (tdesc_type_up): Likewise.
9033 (tdesc_feature): Likewise.
9034 (tdesc_create_reg): Likewise.
9035
9036 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9037
9038 * Makefile.in: Add arch/tdesc.c
9039 * common/tdesc.c: New file.
9040 * common/tdesc.h (tdesc_element_visitor): Move to here.
9041 (tdesc_element): Likewise.
9042 (tdesc_reg): Likewise.
9043 (tdesc_reg_up): Likewise.
9044 * regformats/regdef.h (reg): Add offset to constructors.
9045 * target-descriptions.c (tdesc_element_visitor): Move from here.
9046 (tdesc_element): Likewise.
9047 (tdesc_reg): Likewise.
9048 (tdesc_reg_up): Likewise.
9049
9050 2018-04-17 Tom Tromey <tom@tromey.com>
9051
9052 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9053 discriminant field.
9054
9055 2018-04-17 Tom Tromey <tom@tromey.com>
9056
9057 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9058
9059 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9060
9061 * symtab.c (print_symbol_info): Skip printing filename and line
9062 number when `last' is NULL.
9063 (symtab_symbol_info): Use empty string instead of NULL for first
9064 invocation of print_symbol_info.
9065 (rbreak_command): Pass NULL to `last' parameter of
9066 print_symbol_info.
9067
9068 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9069
9070 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9071 instead of nullptr.
9072
9073 2018-04-16 Pedro Alves <palves@redhat.com>
9074
9075 * MAINTAINERS (sh): Remove.
9076 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9077 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9078 (ALLDEPFILES): Remove sh64-tdep.c.
9079 * NEWS: Mentions that support for SH-5/SH64 is removed.
9080 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9081 (sh*-*-openbsd*): Ditto.
9082 (sh64-*-elf*): Remove.
9083 (sh*): Remove.
9084 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9085 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9086 * sh-tdep.c: No longer include "sh64-tdep.h".
9087 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9088 * sh64-tdep.c, sh64-tdep.h: Remove files.
9089
9090 2018-04-16 Pedro Alves <palves@redhat.com>
9091
9092 * MAINTAINERS: Remove m88k.
9093 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9094 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9095 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9096 * NEWS: Mention that support for m88k was removed.
9097 * configure.host (m88*-*-*): Remove support.
9098 * configure.nat (m88k-*-*): Remove support.
9099 * configure.tgt (m88*-*-openbsd*): Remove.
9100 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9101
9102 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9103
9104 * configure.tgt (x86_tobjs): New variable.
9105 (amd64_tobjs, i386_tobjs): Use it.
9106
9107 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9108
9109 * symtab.c (print_symbol_info): Precede the symbol definition by
9110 the line number when available.
9111 * NEWS: Advertise this enhancement.
9112
9113 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9114
9115 * NEWS (New options): announce set/show record btrace cpu.
9116 * btrace.c: Include record-btrace.h.
9117 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9118 the vendor is unknown.
9119 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9120 Maybe overwrite the btrace configuration's cpu.
9121 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9122 (btrace_fetch): Add cpu parameter. Update callers.
9123 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9124 Maybe overwrite the btrace configuration's cpu. Skip enabling
9125 errata workarounds if the vendor is unknown.
9126 * python/py-record-btrace.c: Include record-btrace.h.
9127 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9128 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9129 * record-btrace.c (record_btrace_cpu_state_kind): New.
9130 (record_btrace_cpu): New.
9131 (set_record_btrace_cpu_cmdlist): New.
9132 (record_btrace_get_cpu): New.
9133 (require_btrace_thread, record_btrace_info)
9134 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9135 (cmd_set_record_btrace_cpu_none): New.
9136 (cmd_set_record_btrace_cpu_auto): New.
9137 (cmd_set_record_btrace_cpu): New.
9138 (cmd_show_record_btrace_cpu): New.
9139 (_initialize_record_btrace): Initialize set/show record btrace cpu
9140 commands.
9141 * record-btrace.h (record_btrace_get_cpu): New.
9142
9143 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9144
9145 * record.c (set_record_command): Fix typo in message.
9146
9147 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9148
9149 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9150
9151 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9152
9153 * infrun.c (process_event_stop_test): Call
9154 gdbarch_in_indirect_branch_thunk.
9155 * gdbarch.sh (in_indirect_branch_thunk): New.
9156 * gdbarch.c: Regenerated.
9157 * gdbarch.h: Regenerated.
9158 * x86-tdep.h: New.
9159 * x86-tdep.c: New.
9160 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9161 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9162 (ALLDEPFILES): Add x86-tdep.c.
9163 * arch-utils.h (default_in_indirect_branch_thunk): New.
9164 * arch-utils.c (default_in_indirect_branch_thunk): New.
9165 * i386-tdep: Include x86-tdep.h.
9166 (i386_in_indirect_branch_thunk): New.
9167 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9168 function.
9169 * amd64-tdep: Include x86-tdep.h.
9170 (amd64_in_indirect_branch_thunk): New.
9171 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9172
9173 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9174
9175 PR gdb/23053
9176 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9177 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9178 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9179 regression.
9180
9181 2018-04-12 Tom Tromey <tom@tromey.com>
9182
9183 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9184 (rust_evaluate_subexp): Likewise.
9185
9186 2018-04-12 Pedro Alves <palves@redhat.com>
9187
9188 * procfs.c (procfs_detach): Make forward declaration's prototype
9189 match definition's protototype.
9190 (proc_get_LDT_entry): Remove stale do_cleanups call.
9191
9192 2018-04-12 Pedro Alves <palves@redhat.com>
9193
9194 * target.h (target_ops::to_has_exited): Delete.
9195 (target_has_exited): Delete.
9196 * target-delegates.c: Regenerate.
9197
9198 2018-04-11 Pedro Alves <palves@redhat.com>
9199
9200 * target.c (fileio_fh_t::t): Add comment.
9201 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9202 (target_fileio_close): Handle a NULL target.
9203 (invalidate_fileio_fh): New.
9204 (target_close): Call it.
9205 * remote.c (remote_hostio_send_command): No longer check whether
9206 remote_desc is open.
9207
9208 2018-04-11 Pedro Alves <palves@redhat.com>
9209
9210 * target.c (fileio_fh_t): Make it a named struct instead of a
9211 typedef.
9212 (fileio_fh_t::is_closed): New method.
9213 (DEF_VEC_O (fileio_fh_t)): Remove.
9214 (fileio_fhandles): Now a std::vector.
9215 (is_closed_fileio_fh): Delete.
9216 (acquire_fileio_fd): Adjust. Rename parameters.
9217 (release_fileio_fd): Adjust.
9218 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9219 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9220 (target_fileio_close): Adjust.
9221
9222 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9223
9224 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9225 index.
9226
9227 2018-04-10 Pedro Alves <palves@redhat.com>
9228
9229 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9230 (scoped_finish_thread_state): New class.
9231 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9232 cleanup.
9233 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9234 (fetch_inferior_event, normal_stop): Likewise.
9235 * thread.c (finish_thread_state_cleanup): Delete.
9236
9237 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9238 Pedro Alves <palves@redhat.com>
9239
9240 * value.c: Include "selftest.h" and "common/array-view.h".
9241 (struct range) <operator ==>: New.
9242 (test_ranges_contain): New.
9243 (check_ranges_vector): New.
9244 (test_insert_into_bit_range_vector): New.
9245 (_initialize_values): Register selftests.
9246 * common/array-view.h (operator==, operator!=): New.
9247
9248 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9249
9250 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9251 an iterator.
9252 * inline-frame.c: Include <algorithm>.
9253 (struct inline_state): Add constructor.
9254 (inline_state_s): Remove.
9255 (DEF_VEC_O(inline_state_s)): Remove.
9256 (inline_states): Change type to std::vector.
9257 (find_inline_frame_state): Adjust to std::vector.
9258 (allocate_inline_frame_state): Remove.
9259 (clear_inline_frame_state): Adjust to std::vector.
9260 (skip_inline_frames): Adjust to std::vector.
9261
9262 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9263
9264 * tracepoint.h (struct trace_state_variable): Add constructor.
9265 <name>: Change type to std::string.
9266 * tracepoint.c (tsv_s): Remove.
9267 (DEF_VEC_O(tsv_s)): Remove.
9268 (tvariables): Change to std::vector.
9269 (create_trace_state_variable): Adjust to std::vector.
9270 (find_trace_state_variable): Likewise.
9271 (find_trace_state_variable_by_number): Likewise.
9272 (delete_trace_state_variable): Likewise.
9273 (trace_variable_command): Adjust to std::string.
9274 (delete_trace_variable_command): Likewise.
9275 (tvariables_info_1): Adjust to std::vector.
9276 (save_trace_state_variables): Likewise.
9277 (start_tracing): Likewise.
9278 (merge_uploaded_trace_state_variables): Adjust to std::vector
9279 and std::string.
9280 * target.h (struct target_ops)
9281 <to_download_trace_state_variable>: Pass reference to
9282 trace_state_variable.
9283 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9284 * target-delegates.c: Re-generate.
9285 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9286 (mi_tsv_deleted): Likewise.
9287 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9288 * remote.c (remote_download_trace_state_variable): Change
9289 pointer to reference and adjust.
9290 * make-target-delegates (parse_argtypes): Handle references.
9291 (write_function_header): Likewise.
9292 (munge_type): Likewise.
9293
9294 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9295
9296 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9297 string_view-selftests.c.
9298 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9299 testsuite.
9300 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9301 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9302 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9303 * unittests/basic_string_view/element_access/char/1.cc:
9304 Likewise.
9305 * unittests/basic_string_view/element_access/char/empty.cc:
9306 Likewise.
9307 * unittests/basic_string_view/element_access/char/front_back.cc:
9308 Likewise.
9309 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9310 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9311 Likewise.
9312 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9313 Likewise.
9314 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9315 Likewise.
9316 * unittests/basic_string_view/operations/compare/char/1.cc:
9317 Likewise.
9318 * unittests/basic_string_view/operations/compare/char/13650.cc:
9319 Likewise.
9320 * unittests/basic_string_view/operations/copy/char/1.cc:
9321 Likewise.
9322 * unittests/basic_string_view/operations/data/char/1.cc:
9323 Likewise.
9324 * unittests/basic_string_view/operations/find/char/1.cc:
9325 Likewise.
9326 * unittests/basic_string_view/operations/find/char/2.cc:
9327 Likewise.
9328 * unittests/basic_string_view/operations/find/char/3.cc:
9329 Likewise.
9330 * unittests/basic_string_view/operations/find/char/4.cc:
9331 Likewise.
9332 * unittests/basic_string_view/operations/rfind/char/1.cc:
9333 Likewise.
9334 * unittests/basic_string_view/operations/rfind/char/2.cc:
9335 Likewise.
9336 * unittests/basic_string_view/operations/rfind/char/3.cc:
9337 Likewise.
9338 * unittests/basic_string_view/operations/substr/char/1.cc:
9339 Likewise.
9340 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9341 * unittests/string_view-selftests.c: New file.
9342
9343 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9344
9345 * unittests/basic_string_view/capacity/1.cc: New file.
9346 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9347 * unittests/basic_string_view/cons/char/1.cc: New file.
9348 * unittests/basic_string_view/cons/char/2.cc: New file.
9349 * unittests/basic_string_view/cons/char/3.cc: New file.
9350 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9351 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9352 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9353 * unittests/basic_string_view/element_access/char/1.cc: New file.
9354 * unittests/basic_string_view/element_access/char/2.cc: New file.
9355 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9356 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9357 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9358 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9359 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9360 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9361 * unittests/basic_string_view/include.cc: New file.
9362 * unittests/basic_string_view/inserters/char/1.cc: New file.
9363 * unittests/basic_string_view/inserters/char/2.cc: New file.
9364 * unittests/basic_string_view/inserters/char/3.cc: New file.
9365 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9366 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9367 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9368 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9369 * unittests/basic_string_view/literals/types.cc: New file.
9370 * unittests/basic_string_view/literals/values.cc: New file.
9371 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9372 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9373 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9374 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9375 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9376 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9377 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9378 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9379 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9380 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9381 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9382 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9383 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9384 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9385 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9386 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9387 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9388 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9389 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9390 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9391 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9392 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9393 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9394 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9395 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9396 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9397 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9398 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9399 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9400 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9401 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9402 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9403 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9404 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9405 * unittests/basic_string_view/operators/char/2.cc: New file.
9406 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9407 * unittests/basic_string_view/range_access/char/1.cc: New file.
9408 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9409 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9410 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9411 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9412 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9413 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9414 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9415 * unittests/basic_string_view/typedefs.cc: New file.
9416 * unittests/basic_string_view/types/1.cc: New file.
9417
9418 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9419
9420 * common/gdb_string_view.h: Remove libstdc++ implementation
9421 details, adjust to gdb reality.
9422 * common/gdb_string_view.tcc: Likewise.
9423 * cli/cli-script.c (struct string_view): Remove.
9424 (user_args) <m_args>: Change element type to gdb::string_view.
9425 (user_args::insert_args): Adjust.
9426
9427 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9428
9429 * common/gdb_string_view.h: New file.
9430 * common/gdb_string_view.tcc: New file.
9431
9432 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9433
9434 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9435 * configure: Re-generate.
9436
9437 2018-04-09 Pedro Alves <palves@redhat.com>
9438
9439 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9440 (set_target_gdbarch): Call
9441 gdb::observers::architecture_changed.notify instead of
9442 observer_notify_architecture_changed.
9443
9444 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9445
9446 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9447 (do_restore_current_traceframe_cleanup): Remove.
9448 (restore_current_traceframe_cleanup_dtor): Remove.
9449 (make_cleanup_restore_current_traceframe): Remove.
9450 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9451 New.
9452 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9453 * infrun.c (fetch_inferior_event): Use
9454 scoped_restore_current_traceframe.
9455
9456 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9457
9458 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9459 Remove.
9460 <n_allocated_type_units>: Remove.
9461 <all_type_units>: Change to std::vector.
9462 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9463 to std::vector change.
9464 (dwarf2_per_objfile::get_cutu): Likewise.
9465 (dwarf2_per_objfile::get_tu): Likewise.
9466 (create_signatured_type_table_from_index): Likewise.
9467 (create_signatured_type_table_from_debug_names): Likewise.
9468 (dw2_symtab_iter_next): Likewise.
9469 (dw2_print_stats): Likewise.
9470 (dw2_expand_all_symtabs): Likewise.
9471 (dw2_expand_marked_cus): Likewise.
9472 (dw2_debug_names_iterator::next): Likewise.
9473 (dwarf2_initialize_objfile): Likewise.
9474 (add_signatured_type_cu_to_table): Likewise.
9475 (create_all_type_units): Likewise.
9476 (add_type_unit): Likewise.
9477 (struct tu_abbrev_offset): Add constructor.
9478 (build_type_psymtabs_1): Adjust to std::vector change.
9479 (print_tu_stats): Likewise.
9480 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9481 (write_debug_names): Likewise.
9482
9483 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9484
9485 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9486 Make an std::vector.
9487 <n_comp_units>: Remove.
9488 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9489 to std::vector change.
9490 (dwarf2_per_objfile::get_cutu): Likewise.
9491 (dwarf2_per_objfile::get_cu): Likewise.
9492 (create_cus_from_index): Likewise.
9493 (create_addrmap_from_index): Likewise.
9494 (create_addrmap_from_aranges): Likewise.
9495 (dwarf2_read_index): Likewise.
9496 (dw2_find_last_source_symtab): Likewise.
9497 (dw2_map_symtabs_matching_filename): Likewise.
9498 (dw2_symtab_iter_next): Likewise.
9499 (dw2_print_stats): Likewise.
9500 (dw2_expand_all_symtabs): Likewise.
9501 (dw2_expand_symtabs_with_fullname): Likewise.
9502 (dw2_expand_marked_cus): Likewise.
9503 (dw2_map_symbol_filenames): Likewise.
9504 (create_cus_from_debug_names): Likewise.
9505 (dwarf2_read_debug_names): Likewise.
9506 (dw2_debug_names_iterator::next): Likewise.
9507 (dwarf2_initialize_objfile): Likewise.
9508 (set_partial_user): Likewise.
9509 (dwarf2_build_psymtabs_hard): Likewise.
9510 (read_comp_units_from_section): Remove arguments, adjust to
9511 std::vector change.
9512 (create_all_comp_units): Adjust to std::vector and
9513 read_comp_units_from_section changes.
9514 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9515 change.
9516 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9517 (psyms_seen_size): Likewise.
9518 (write_gdbindex): Likewise.
9519 (write_debug_names): Likewise.
9520
9521 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9522
9523 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9524 with dwarf2_per_objfile.
9525 (create_cus_from_index): Likewise.
9526 (create_signatured_type_table_from_index): Likewise.
9527 (dwarf2_read_index): Likewise.
9528 (dwarf2_initialize_objfile): Likewise.
9529 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9530 per_cu rather than get_dwarf2_per_objfile.
9531
9532 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9533
9534 * dwarf2read.h (struct signatured_type): Forward declare.
9535 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9536 New methods.
9537 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9538 (dw2_get_cutu): ...this.
9539 (dwarf2_per_objfile::get_cu): Rename from...
9540 (dw2_get_cu): ...this.
9541 (dwarf2_per_objfile::get_tu): New.
9542 (create_addrmap_from_index): Adjust.
9543 (create_addrmap_from_aranges): Adjust.
9544 (dw2_find_last_source_symtab): Adjust.
9545 (dw2_map_symtabs_matching_filename): Adjust.
9546 (dw2_symtab_iter_next): Adjust.
9547 (dw2_print_stats): Adjust.
9548 (dw2_expand_all_symtabs): Adjust.
9549 (dw2_expand_symtabs_with_fullname): Adjust.
9550 (dw2_expand_marked_cus): Adjust.
9551 (dw_expand_symtabs_matching_file_matcher): Adjust.
9552 (dw2_map_symbol_filenames): Adjust.
9553 (dw2_debug_names_iterator::next): Adjust.
9554 (dwarf2_initialize_objfile): Adjust.
9555 (set_partial_user): Adjust.
9556 (dwarf2_build_psymtabs_hard): Adjust.
9557
9558 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9559
9560 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9561 Remove unused variables.
9562 (dw2_map_symtabs_matching_filename): Likewise.
9563 (dwarf2_record_block_ranges): Likewise.
9564 (dwarf2_read_addr_index): Likewise.
9565 (follow_die_offset): Likewise.
9566
9567 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9568
9569 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9570 to symbol_file_add_main.
9571
9572 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9573
9574 PR mi/22299
9575 * mi/mi-console.c (do_fputc_async_safe): New.
9576 (mi_console_file::write_async_safe): New.
9577 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9578 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9579 New.
9580 * ui-file.c (ui_file::putstrn): Adjust call to
9581 fputstrn_unfiltered.
9582 * utils.c (printchar): Replace do_fputs and do_fprintf
9583 parameters by do_fputc.
9584 (fputstr_filtered): Adjust call to printchar.
9585 (fputstr_unfiltered): Likewise.
9586 (fputstrn_filtered): Likewise.
9587 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9588 printchar.
9589 * utils.h (do_fputc_ftype): New typedef.
9590 (fputstrn_unfiltered): Add do_fputc parameter.
9591
9592 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9593
9594 * regformats/i386/i386-avx.dat: Remove.
9595
9596 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9597
9598 PR gdb/22979
9599 * amd64-tdep.c (amd64_none_init_abi): New function.
9600 (amd64_x32_none_init_abi): New function.
9601 (_initialize_amd64_tdep): Register handlers for x86-64 and
9602 x64_32 with GDB_OSABI_NONE.
9603 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9604 GDB_OSABI_NONE osabi.
9605
9606 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9607
9608 PR gdb/22980
9609 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9610 GDB_OSABI_NONE.
9611 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9612 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9613
9614 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9615
9616 * common/byte-vector.h (char_vector): New type.
9617 * target.h (target_read_alloc): Return
9618 gdb::optional<byte_vector>.
9619 (target_read_stralloc): Return gdb::optional<char_vector>.
9620 (target_get_osdata): Return gdb::optional<char_vector>.
9621 * target.c (target_read_alloc_1): Templatize. Replacement
9622 manual memory management with vector.
9623 (target_read_alloc): Change return type, adjust.
9624 (target_read_stralloc): Change return type, adjust.
9625 (target_get_osdata): Change return type, adjust.
9626 * auxv.c (struct auxv_info) <length>: Remove.
9627 <data>: Change type to gdb::optional<byte_vector>.
9628 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9629 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9630 (target_auxv_search): Adjust.
9631 (fprint_target_auxv): Adjust.
9632 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9633 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9634 (linux_make_corefile_notes): Adjust.
9635 * osdata.c (get_osdata): Adjust.
9636 * remote.c (remote_get_threads_with_qxfer): Adjust.
9637 (remote_memory_map): Adjust.
9638 (remote_traceframe_info): Adjust.
9639 (btrace_read_config): Adjust.
9640 (remote_read_btrace): Adjust.
9641 (remote_pid_to_exec_file): Adjust.
9642 * solib-aix.c (solib_aix_get_library_list): Adjust.
9643 * solib-dsbt.c (decode_loadmap): Don't free buf.
9644 (dsbt_get_initial_loadmaps): Adjust.
9645 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9646 * solib-target.c (solib_target_current_sos): Adjust.
9647 * tracepoint.c (sdata_make_value): Adjust.
9648 * xml-support.c (xinclude_start_include): Adjust.
9649 (xml_fetch_content_from_file): Adjust.
9650 * xml-support.h (xml_fetch_another): Change return type.
9651 (xml_fetch_content_from_file): Change return type.
9652 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9653 * xml-tdesc.c (file_read_description_xml): Adjust.
9654 (fetch_available_features_from_target): Change return type.
9655 (target_fetch_description_xml): Adjust.
9656 (target_read_description_xml): Adjust.
9657
9658 2018-04-06 Tom Tromey <tom@tromey.com>
9659
9660 * value.c (~value): Update.
9661 (struct value) <contents>: Now unique_xmalloc_ptr.
9662 (value_contents_bits_eq, allocate_value_contents)
9663 (value_contents_raw, value_contents_all_raw)
9664 (value_contents_for_printing, value_contents_for_printing_const)
9665 (set_value_enclosing_type): Update.
9666
9667 2018-04-06 Tom Tromey <tom@tromey.com>
9668
9669 * value.c (range_s): Remove typedef, VEC.
9670 (struct range): Add operator<.
9671 (range_lessthan): Remove.
9672 (ranges_contain): Change type.
9673 (~value): Update.
9674 (struct value) <unavailable, optimized_out>: Now std::vector.
9675 (value_entirely_available)
9676 (value_entirely_covered_by_range_vector)
9677 (value_entirely_unavailable, value_entirely_optimized_out):
9678 Update.
9679 (insert_into_bit_range_vector): Change argument type.
9680 (find_first_range_overlap): Likewise.
9681 (struct ranges_and_idx, value_contents_bits_eq)
9682 (require_not_optimized_out, require_available): Update.
9683 (ranges_copy_adjusted): Change argument types.
9684 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9685
9686 2018-04-06 Tom Tromey <tom@tromey.com>
9687
9688 * value.c (~value): Update.
9689 (struct value) <parent>: Now a value_ref_ptr.
9690 (value_parent, set_value_parent, value_address, value_copy):
9691 Update.
9692
9693 2018-04-06 Tom Tromey <tom@tromey.com>
9694
9695 * value.c (struct value): Add constructor, destructor, and member
9696 initializers.
9697 (allocate_value_lazy, value_decref): Update.
9698
9699 2018-04-06 Tom Tromey <tom@tromey.com>
9700
9701 * value.c (struct value) <released, next>: Remove.
9702 (all_values): Now a std::vector.
9703 (allocate_value_lazy): Update.
9704 (value_next): Remove.
9705 (value_mark, value_free_to_mark, release_value)
9706 (value_release_to_mark): Update.
9707
9708 2018-04-06 Tom Tromey <tom@tromey.com>
9709
9710 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9711 (free_value_chain): Remove.
9712 * value.c (free_value_chain): Remove.
9713 (value_release_to_mark): Return a std::vector.
9714 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9715 std::vector.
9716 (check_condition): Update.
9717 * eval.c (fetch_subexp_value): Change "val_chain" to a
9718 std::vector.
9719 * breakpoint.c (update_watchpoint): Update.
9720 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9721
9722 2018-04-06 Tom Tromey <tom@tromey.com>
9723
9724 * value.h (free_all_values): Remove.
9725 * value.c (free_all_values): Remove.
9726
9727 2018-04-06 Tom Tromey <tom@tromey.com>
9728
9729 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9730 (value_history_chain, value_history_count): Remove.
9731 (value_history): New global.
9732 (record_latest_value, access_value_history, show_values)
9733 (preserve_values): Update.
9734
9735 2018-04-06 Tom Tromey <tom@tromey.com>
9736
9737 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9738 * varobj.c (varobj_set_display_format, varobj_set_value)
9739 (install_default_visualizer, construct_visualizer)
9740 (install_new_value, ~varobj, varobj_get_value_type)
9741 (my_value_of_variable, varobj_editable_p): Update.
9742 * c-varobj.c (c_describe_child, c_value_of_variable)
9743 (cplus_number_of_children, cplus_describe_child): Update.
9744 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9745 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9746 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9747
9748 2018-04-06 Tom Tromey <tom@tromey.com>
9749
9750 * printcmd.c (last_examine_address): Change type to
9751 value_ref_ptr.
9752 (do_examine, x_command): Update.
9753
9754 2018-04-06 Tom Tromey <tom@tromey.com>
9755
9756 * value.c (release_value): Update.
9757 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9758 (struct bpstats) <val>: Now a value_ref_ptr.
9759 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9760 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9761 (~watchpoint, print_it_watchpoint, watch_command_1)
9762 (invalidate_bp_value_on_memory_change): Update.
9763
9764 2018-04-06 Tom Tromey <tom@tromey.com>
9765
9766 * varobj.c (varobj_clear_saved_item)
9767 (update_dynamic_varobj_children, install_new_value, ~varobj):
9768 Update.
9769 * value.h (value_incref): Move declaration earlier.
9770 (value_decref): Rename from value_free.
9771 (struct value_ref_policy): New.
9772 (value_ref_ptr): New typedef.
9773 (struct value_deleter): Remove.
9774 (gdb_value_up): Remove typedef.
9775 (release_value): Change return type.
9776 (release_value_or_incref): Remove.
9777 * value.c (set_value_parent): Update.
9778 (value_incref): Change return type.
9779 (value_decref): Rename from value_free.
9780 (value_free_to_mark, free_all_values, free_value_chain): Update.
9781 (release_value): Return value_ref_ptr.
9782 (release_value_or_incref): Remove.
9783 (record_latest_value, set_internalvar, clear_internalvar):
9784 Update.
9785 * stack.c (info_frame_command): Don't call value_free.
9786 * python/py-value.c (valpy_dealloc, valpy_new)
9787 (value_to_value_object): Update.
9788 * printcmd.c (do_examine): Update.
9789 * opencl-lang.c (lval_func_free_closure): Update.
9790 * mi/mi-main.c (register_changed_p): Don't call value_free.
9791 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9792 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9793 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9794 value_free.
9795 * guile/scm-value.c (vlscm_free_value_smob)
9796 (vlscm_scm_from_value): Update.
9797 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9798 (frame_unwind_register_unsigned, get_frame_register_bytes)
9799 (put_frame_register_bytes): Don't call value_free.
9800 * findvar.c (address_from_register): Don't call value_free.
9801 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9802 * dwarf2loc.c (entry_data_value_free_closure)
9803 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9804 (dwarf2_evaluate_loc_desc_full): Update.
9805 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9806 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9807 (~watchpoint, watch_command_1)
9808 (invalidate_bp_value_on_memory_change): Update.
9809 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9810
9811 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9812
9813 PR gdb/23022
9814 * warning.m4: Add -Wno-error=deprecated-register.
9815 * configure: Re-generate.
9816
9817 2018-04-05 Tom Tromey <tom@tromey.com>
9818
9819 * linespec.h: Remove include of "vec.h".
9820
9821 2018-04-05 Tom Tromey <tom@tromey.com>
9822
9823 * linespec.c (typep): Remove typedef.
9824 (find_methods, find_superclass_methods): Take a std::vector.
9825 (find_method): Use std::vector.
9826
9827 2018-04-05 Tom Tromey <tom@tromey.com>
9828
9829 * utils.c (compare_strings): Remove.
9830 * utils.h (compare_strings): Remove.
9831 * objc-lang.h (find_imps): Update.
9832 * objc-lang.c (find_methods): Take a std::vector.
9833 (uniquify_strings, find_imps): Likewise.
9834 * linespec.c (find_methods): Take a std::vector.
9835 (decode_objc): Use std::vector.
9836 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9837 a std::vector.
9838 (find_method, find_function_symbols): Use std::vector.
9839
9840 2018-04-05 Tom Tromey <tom@tromey.com>
9841
9842 * completer.c (completion_tracker::completion_tracker): Remove
9843 cast.
9844 (completion_tracker::discard_completions): Likewise.
9845 * breakpoint.c (ambiguous_names_p): Remove cast.
9846 * ada-lang.c (_initialize_ada_language): Remove cast.
9847 * utils.h (streq): Update.
9848 (streq_hash): Add new declaration.
9849 * utils.c (streq): Return bool.
9850 (streq_hash): New function.
9851
9852 2018-04-05 Tom Tromey <tom@tromey.com>
9853
9854 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9855 Remove a string copy.
9856
9857 2018-04-05 Tom Tromey <tom@tromey.com>
9858
9859 * linespec.c (filter_results): Use std::vector.
9860 (decode_line_2, decode_line_full): Update.
9861
9862 2018-04-05 Tom Tromey <tom@tromey.com>
9863
9864 * linespec.c (canonical_to_fullform): Return std::string.
9865 (filter_results): Update.
9866 (struct decode_line_2_item): Add constructor.
9867 <fullform, displayform>: Now std::string.
9868 (decode_line_2_compare_items): Now a std::sort comparator.
9869 (decode_line_2): Update.
9870
9871 2018-04-05 Tom Tromey <tom@tromey.com>
9872
9873 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9874 (unexpected_linespec_error): Update.
9875 (linespec_parse_basic, parse_linespec): Update.
9876
9877 2018-04-05 Tom Tromey <tom@tromey.com>
9878
9879 * linespec.c (linespec_parse_basic): Reindent.
9880
9881 2018-04-05 Tom Tromey <tom@tromey.com>
9882
9883 * minsyms.h (iterate_over_minimal_symbols): Update.
9884 * minsyms.c (iterate_over_minimal_symbols): Take a
9885 gdb::function_view.
9886 * linespec.c (struct collect_minsyms): Remove.
9887 (compare_msyms): Now a std::sort comparator.
9888 (add_minsym): Add parameters.
9889 (search_minsyms_for_name): Update. Use std::vector.
9890
9891 2018-04-03 Tom Tromey <tom@tromey.com>
9892
9893 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9894 gdb::byte_vector.
9895
9896 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9897
9898 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9899
9900 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9901
9902 PR gdb/16959
9903 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9904 printing static type.
9905
9906 2018-04-01 Tom Tromey <tom@tromey.com>
9907
9908 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9909 (rs6000_xfer_shared_libraries): Update.
9910
9911 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9912
9913 * common/gdb_vecs.h (char_ptr): Remove.
9914 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9915
9916 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9917
9918 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9919 with std::vector.
9920 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9921
9922 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9923
9924 * tracepoint.h (struct uploaded_tp): Initialize fields.
9925 <actions, step_actions, cmd_strings>: Change type to
9926 std::vector<char *>.
9927 * tracepoint.c (get_uploaded_tp): Allocate with new.
9928 (free_uploaded_tps): Free with delete.
9929 (parse_tracepoint_definition): Adjust to std::vector change.
9930 * breakpoint.c (read_uploaded_action): Likewise.
9931 (create_tracepoint_from_upload): Likewise.
9932 * ctf.c (ctf_write_uploaded_tp): Likewise.
9933 (SET_ARRAY_FIELD): Likewise.
9934 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9935
9936 2018-03-30 Tom Tromey <tom@tromey.com>
9937
9938 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9939 std::unique_ptr.
9940 (svr4_keep_data_in_core): Update.
9941 (svr4_read_so_list): Update.
9942
9943 2018-03-30 Tom Tromey <tom@tromey.com>
9944
9945 * windows-nat.c (handle_output_debug_string, handle_exception):
9946 Update.
9947 * target.h (target_read_string): Update.
9948 * target.c (target_read_string): Change "string" to
9949 unique_xmalloc_ptr.
9950 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9951 Update.
9952 * solib-frv.c (frv_current_sos): Update.
9953 * solib-dsbt.c (dsbt_current_sos): Update.
9954 * solib-darwin.c (darwin_current_sos): Update.
9955 * linux-thread-db.c (inferior_has_bug): Update.
9956 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9957 Update. Remove alloca.
9958 * ada-lang.c (ada_main_name): Update.
9959
9960 2018-03-30 Tom Tromey <tom@tromey.com>
9961
9962 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9963 (struct dwo_file_deleter): New.
9964 (dwo_file_up): New typedef.
9965 (open_and_init_dwo_file): Use dwo_file_up.
9966 (free_dwo_file_cleanup): Remove.
9967
9968 2018-03-30 Tom Tromey <tom@tromey.com>
9969
9970 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9971 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9972
9973 2018-03-30 Tom Tromey <tom@tromey.com>
9974
9975 * dwarf2read.c (class free_cached_comp_units): New class.
9976 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9977 (free_cached_comp_units): Remove function.
9978
9979 2018-03-30 Tom Tromey <tom@tromey.com>
9980
9981 * utils.h (make_cleanup_unpush_target): Remove.
9982 * inf-ptrace.c (struct target_unpusher): New.
9983 (target_unpush_up) New typedef.
9984 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9985 target_unpush_up.
9986 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9987
9988 2018-03-27 Tom Tromey <tom@tromey.com>
9989
9990 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9991
9992 2018-03-27 Pedro Alves <palves@redhat.com>
9993 Tom Tromey <tom@tromey.com>
9994
9995 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9996 destructor. Now a class.
9997 (gdb_readline_wrapper_cleanup): Remove function.
9998 (gdb_readline_wrapper): Remove cleanups.
9999
10000 2018-03-27 Tom Tromey <tom@tromey.com>
10001
10002 * typeprint.h (struct type_print_options) <local_typedefs,
10003 global_typedefs>: Remove "struct" keyword.
10004 (class typedef_hash_table): New class.
10005 (recursively_update_typedef_hash, add_template_parameters)
10006 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10007 (find_typedef_in_hash): Don't declare.
10008 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10009 (typedef_hash_table::recursively_update): Rename from
10010 recursively_update_typedef_hash. Now a member.
10011 (typedef_hash_table::add_template_parameters): Rename from
10012 add_template_parameters. Now a member.
10013 (typedef_hash_table::typedef_hash_table): Now a constructor;
10014 rename from create_typedef_hash.
10015 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10016 rename from free_typedef_hash.
10017 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10018 (do_free_global_table): Remove.
10019 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10020 from copy_type_recursive.
10021 (create_global_typedef_table): Remove.
10022 (typedef_hash_table::find_global_typedef): Now a member of
10023 typedef_hash_table.
10024 (typedef_hash_table::find_typedef): Rename from
10025 find_typedef_in_hash; now a member.
10026 (whatis_exp): Update.
10027 * extension.h (struct ext_lang_type_printers): Add constructor and
10028 destructor.
10029 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10030 declare.
10031 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10032 Now a constructor; rename from start_ext_lang_type_printers.
10033 (ext_lang_type_printers): Now a destructor; rename from
10034 free_ext_lang_type_printers.
10035 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10036 Update.
10037 (c_type_print_base_struct_union): Update. Remove cleanups.
10038
10039 2018-03-27 Tom Tromey <tom@tromey.com>
10040
10041 * dwarf-index-write.c: Include <cmath>.
10042
10043 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10044
10045 * NEWS: Add entry describing new "set|show varsize-limit" command.
10046 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10047 command.
10048 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10049 "set variable".
10050
10051 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10052
10053 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10054 dwarf-index-write.c
10055 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10056 * dwarf-index-common.c: New file.
10057 * dwarf-index-common.h: New file.
10058 * dwarf-index-write.c: New file.
10059 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10060 (struct dwarf2_section_info): Move from here.
10061 (dwarf2_section_info_def): Likewise.
10062 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10063 (offset_type): Likewise.
10064 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10065 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10066 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10067 (byte_swap): Likewise.
10068 (MAYBE_SWAP): Likewise.
10069 (dwarf2_per_cu_ptr): Likewise.
10070 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10071 (struct tu_stats): Likewise.
10072 (struct dwarf2_per_objfile): Likewise.
10073 (struct dwarf2_per_cu_data): Likewise.
10074 (struct signatured_type): Likewise.
10075 (sig_type_ptr): Likewise.
10076 (DEF_VEC_P (sig_type_ptr)): Likewise.
10077 (INDEX4_SUFFIX): Likewise.
10078 (INDEX5_SUFFIX): Likewise.
10079 (DEBUG_STR_SUFFIX): Likewise.
10080 (dwarf2_read_section): Make non-static.
10081 (mapped_index_string_hash): Move from here.
10082 (dwarf5_djb_hash): Likewise.
10083 (file_write): Likewise.
10084 (class data_buf): Likewise.
10085 (struct symtab_index_entry): Likewise.
10086 (struct mapped_symtab): Likewise.
10087 (find_slot): Likewise.
10088 (hash_expand): Likewise.
10089 (add_index_entry): Likewise.
10090 (uniquify_cu_indices): Likewise.
10091 (class c_str_view): Likewise.
10092 (class c_str_view_hasher): Likewise.
10093 (class vector_hasher): Likewise.
10094 (write_hash_table): Likewise.
10095 (psym_index_map): Likewise.
10096 (struct addrmap_index_data): Likewise.
10097 (add_address_entry): Likewise.
10098 (add_address_entry_worker): Likewise.
10099 (write_address_map): Likewise.
10100 (symbol_kind): Likewise.
10101 (write_psymbols): Likewise.
10102 (struct signatured_type_index_data): Likewise.
10103 (write_one_signatured_type): Likewise.
10104 (recursively_count_psymbols): Likewise.
10105 (recursively_write_psymbols): Likewise.
10106 (class debug_names): Likewise.
10107 (check_dwarf64_offsets): Likewise.
10108 (psyms_seen_size): Likewise.
10109 (write_gdbindex): Likewise.
10110 (write_debug_names): Likewise.
10111 (assert_file_size): Likewise.
10112 (write_psymtabs_to_index): Likewise.
10113 (save_gdb_index_command): Likewise.
10114 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10115 command.
10116 * dwarf2read.h: New file.
10117
10118 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10119
10120 PR gdb/22670
10121 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10122 symbol name if the CU's language stores symbol names in linkage
10123 format.
10124 * language.h (struct language_defn)
10125 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10126 all instances of this struct.
10127
10128 2018-03-26 Tom Tromey <tom@tromey.com>
10129
10130 * stack.c (backtrace_command_1): Remove verbose code.
10131
10132 2018-03-26 Tom Tromey <tom@tromey.com>
10133
10134 * python/py-framefilter.c (py_print_type): Don't catch
10135 exceptions. Return void.
10136 (py_print_value): Likewise.
10137 (py_print_single_arg): Likewise.
10138 (enumerate_args): Don't catch exceptions.
10139 (py_print_args): Likewise.
10140 (py_print_frame): Likewise.
10141 (gdbpy_apply_frame_filter): Catch exceptions here.
10142
10143 2018-03-26 Tom Tromey <tom@tromey.com>
10144
10145 * stack.c (_initialize_stack): Remove trailing newlines from help
10146 text. Add "Usage" line to "backtrace" help.
10147
10148 2018-03-26 Tom Tromey <tom@tromey.com>
10149
10150 PR python/16486:
10151 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10152
10153 2018-03-26 Tom Tromey <tom@tromey.com>
10154
10155 * python/py-framefilter.c (py_print_single_arg): Return
10156 EXT_LANG_BT_ERROR from catch.
10157
10158 2018-03-26 Tom Tromey <tom@tromey.com>
10159
10160 PR backtrace/15584:
10161 * stack.c (backtrace_command_1): Move some code into no-filters
10162 "if".
10163
10164 2018-03-26 Tom Tromey <tom@tromey.com>
10165
10166 * python/py-framefilter.c (throw_quit_or_print_exception): New
10167 function.
10168 (gdbpy_apply_frame_filter): Use it.
10169
10170 2018-03-26 Tom Tromey <tom@tromey.com>
10171
10172 PR cli/17716:
10173 * python/py-framefilter.c (py_print_type, py_print_value)
10174 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10175 RETURN_MASK_ERROR.
10176
10177 2018-03-26 Tom Tromey <tom@tromey.com>
10178
10179 * python/py-framefilter.c (enumerate_args): Use
10180 gdb::unique_xmalloc_ptr.
10181
10182 2018-03-26 Tom Tromey <tom@tromey.com>
10183
10184 * python/py-framefilter.c (py_print_frame): Return
10185 EXT_LANG_BT_OK.
10186 (gdbpy_apply_frame_filter): Update comment.
10187 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10188 Remove.
10189 <EXT_LANG_BT_NO_FILTERS>: Change value.
10190
10191 2018-03-26 Tom Tromey <tom@tromey.com>
10192
10193 PR backtrace/15582:
10194 * stack.c (backtrace_command): Parse "hide" argument.
10195 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10196 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10197 constant.
10198
10199 2018-03-26 Tom Tromey <tom@tromey.com>
10200
10201 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10202 add "flags".
10203 (backtrace_command): Remove "fulltrace", add "flags".
10204
10205 2018-03-26 Tom Tromey <tom@tromey.com>
10206
10207 * stack.c (backtrace_command): Rewrite command line parsing.
10208
10209 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10210
10211 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10212
10213 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10214
10215 * filename-seen-cache.h: Add include guard.
10216
10217 2018-03-26 Keith Seitz <keiths@redhat.com>
10218
10219 * symfile.c (place_section): Remove "struct" from section_addr_info
10220 in comment.
10221 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10222 "struct" keyword from section_addr_info.
10223
10224 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10225
10226 * regformats/regdef.h (reg): Add constructors.
10227
10228 2018-03-25 Pedro Alves <palves@redhat.com>
10229
10230 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10231 if then/else bodies in var_func_name extraction.
10232
10233 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10234
10235 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10236 lookup_minimal_symbol() to find symbol entry.
10237 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10238
10239 2018-03-23 Keith Seitz <keiths@redhat.com>
10240
10241 PR c++/22968
10242 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10243 nested type definitions for C++, too.
10244
10245 2018-03-23 Tom Tromey <tom@tromey.com>
10246
10247 * machoread.c (struct oso_el): Add a constructor. Don't define as
10248 a typedef.
10249 (macho_register_oso): Remove.
10250 (macho_symtab_read): Take a std::vector.
10251 (oso_el_compare_name): Now a std::sort comparator.
10252 (macho_symfile_read_all_oso): Take a std::vector.
10253 (macho_symfile_read): Use std::vector. Remove cleanups.
10254
10255 2018-03-22 Tom Tromey <tom@tromey.com>
10256
10257 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10258 (record_full_goto_bookmark): Use std::string.
10259
10260 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10261
10262 PR tdep/18295
10263 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10264 a single mask.
10265
10266 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10267
10268 * rs6000-tdep.c (store_insn_p): New function.
10269 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10270 and cr_reg to their unshifted values. Use store_insn_p to
10271 match LR saves using either R1 or fdata->alloca_reg. Use
10272 store_insn_p to match CR saves. Set alloca_reg_offset
10273 when alloca_reg and framep are set. Remove lr_reg shift
10274 when assigning to fdata->lr_register.
10275
10276 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10277
10278 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10279 command line args instead of emitting a warning.
10280
10281 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10282
10283 * tracepoint.h (struct static_tracepoint_marker): Initialize
10284 fields, define default constructor, move constructor and move
10285 assignment, disable the rest.
10286 <str_id, extra>: Make std::string.
10287 (release_static_tracepoint_marker): Remove.
10288 (free_current_marker): Remove.
10289 * tracepoint.c (free_current_marker): Remove.
10290 (parse_static_tracepoint_marker_definition): Adjust to
10291 std::string, use new hex2str overload.
10292 (release_static_tracepoint_marker): Remove.
10293 (print_one_static_tracepoint_marker): Get marker by reference
10294 and adjust to std::string.
10295 (info_static_tracepoint_markers_command): Adjust to std::vector
10296 changes
10297 * target.h (static_tracepoint_marker_p): Remove typedef.
10298 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10299 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10300 bool.
10301 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10302 * target-debug.h
10303 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10304 (target_debug_print_std_vector_static_tracepoint_marker): New.
10305 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10306 to...
10307 (target_debug_print_static_tracepoint_marker_p): ... this.
10308 * target-delegates.c: Re-generate.
10309 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10310 Make std::string.
10311 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10312 (decode_static_tracepoint_spec): Adjust to std::vector.
10313 (tracepoint_print_one_detail): Adjust to std::string.
10314 (strace_marker_decode_location): Adjust to std::string.
10315 (update_static_tracepoint): Adjust to std::string, remove call
10316 to release_static_tracepoint_marker.
10317 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10318 Adjust to std::vector.
10319 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10320 (remote_static_tracepoint_markers_by_strid): Adjust to
10321 std::vector.
10322 * common/rsp-low.h (hex2str): New overload with explicit count
10323 of bytes.
10324 * common/rsp-low.c (hex2str): New overload with explicit count
10325 of bytes.
10326 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10327 (_initialize_rsp_low_selftests): Add test_hex2str test.
10328 * unittests/tracepoint-selftests.c
10329 (test_parse_static_tracepoint_marker_definition): Adjust to
10330 std::string.
10331
10332 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10333
10334 * tracepoint.c (parse_static_tracepoint_marker_definition):
10335 Consider case where the definition is followed by more
10336 definitions.
10337 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10338 tracepoint-selftests.c.
10339 * unittests/tracepoint-selftests.c: New.
10340
10341 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10342
10343 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10344 Carvalho.
10345
10346 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10347
10348 * symtab.c (find_pc_sect_line): fixed indentation.
10349
10350 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10351
10352 * symtab.c (find_pc_sect_line): now uses binary search.
10353
10354 2018-03-19 Tom Tromey <tom@tromey.com>
10355
10356 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10357 "IDENT" production.
10358
10359 2018-03-19 Pedro Alves <palves@redhat.com>
10360 Tom Tromey <tom@tromey.com>
10361
10362 * unittests/observable-selftests.c: New file.
10363 * common/observable.h: New file.
10364 * observable.h: New file.
10365 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10366 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10367 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10368 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10369 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10370 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10371 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10372 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10373 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10374 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10375 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10376 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10377 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10378 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10379 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10380 tui/tui-interp.c, valops.c: Update all users.
10381 * tui/tui-hooks.c (tui_bp_created_observer)
10382 (tui_bp_deleted_observer, tui_bp_modified_observer)
10383 (tui_inferior_exit_observer, tui_before_prompt_observer)
10384 (tui_normal_stop_observer, tui_register_changed_observer):
10385 Remove.
10386 (tui_observers_token): New global.
10387 (attach_or_detach, tui_attach_detach_observers): New functions.
10388 (tui_install_hooks, tui_remove_hooks): Use
10389 tui_attach_detach_observers.
10390 * record-btrace.c (record_btrace_thread_observer): Remove.
10391 (record_btrace_thread_observer_token): New global.
10392 * observer.sh: Remove.
10393 * observer.c: Rename to observable.c.
10394 * observable.c (namespace gdb_observers): Define new objects.
10395 (observer_debug): Move into gdb_observers namespace.
10396 (struct observer, struct observer_list, xalloc_observer_list_node)
10397 (xfree_observer_list_node, generic_observer_attach)
10398 (generic_observer_detach, generic_observer_notify): Remove.
10399 (_initialize_observer): Update.
10400 Don't include observer.inc.
10401 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10402 (clean mostlyclean): Likewise.
10403 (observer.h, observer.inc): Remove targets.
10404 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10405 (COMMON_SFILES): Use observable.c, not observer.c.
10406 * .gitignore: Remove observer.h.
10407
10408 2018-03-18 Tom Tromey <tom@tromey.com>
10409
10410 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10411 gdb::def_vector.
10412 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10413
10414 2018-03-17 Tom Tromey <tom@tromey.com>
10415
10416 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10417
10418 2018-03-17 Tom Tromey <tom@tromey.com>
10419
10420 * target.c (class scoped_target_fd): New.
10421 (target_fileio_close_cleanup): Remove.
10422 (target_fileio_read_alloc_1): Use scoped_target_fd.
10423
10424 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10425
10426 * silent-rules.mk: New.
10427 * Makefile.in: Include silent-rules.mk
10428 (srcdir, VPATH, top_srcdir): Move up.
10429 (COMPILE): Add ECHO_CXX.
10430 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10431 (init.c): Add ECHO_INIT_C.
10432 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10433 (version.c): Add ECHO_GEN.
10434 (printcmd.o): Add ECHO_CXX.
10435 (target-float.o): Add ECHO_CXX.
10436 (ada-exp.o): Add ECHO_CXX.
10437 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10438 (insight$(EXEEXT)): Add ECHO_CXXLD.
10439 * gnulib/configure.ac: Add AM_SILENT_RULES.
10440 * gnulib/aclocal.m4: Re-generate.
10441 * gnulib/configure: Re-generate.
10442 * gnulib/import/Makefile.in: Re-generate.
10443
10444 2018-03-16 Tom Tromey <tom@tromey.com>
10445
10446 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10447 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10448 * utils.c (do_free_section_addr_info)
10449 (make_cleanup_free_section_addr_info): Remove.
10450 * symfile.h (struct other_sections): Add constructor.
10451 (struct section_addr_info): Remove.
10452 (section_addr_info): New typedef.
10453 (struct sym_fns) <sym_offsets>: Change type of parameter.
10454 (build_section_addr_info_from_objfile)
10455 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10456 (default_symfile_offsets, symbol_file_add)
10457 (symbol_file_add_from_bfd)
10458 (build_section_addr_info_from_section_table): Update.
10459 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10460 * symfile.c (alloc_section_addr_info): Remove.
10461 (build_section_addr_info_from_section_table): Change return type.
10462 Update.
10463 (build_section_addr_info_from_bfd)
10464 (build_section_addr_info_from_objfile): Likewise.
10465 (free_section_addr_info): Remove.
10466 (relative_addr_info_to_section_offsets): Change type of "addrs".
10467 (addrs_section_compar): Now a std::sort comparator.
10468 (addrs_section_sort): Change return type.
10469 (addr_info_make_relative): Change type of "addrs". Update.
10470 (default_symfile_offsets, syms_from_objfile_1)
10471 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10472 (symbol_file_add_separate): Update.
10473 (symbol_file_add): Change type of "addrs". Update.
10474 (add_symbol_file_command): Update. Remove cleanups.
10475 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10476 cleanups.
10477 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10478 * solib.c (solib_read_symbols): Update.
10479 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10480 * machoread.c (macho_symfile_offsets): Update.
10481 * jit.c (jit_bfd_try_read_symtab): Update.
10482
10483 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10484
10485 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10486 unittests/utils-selftests.c.
10487 * unittests/utils-selftests.c: New file.
10488
10489 2018-03-14 Tom Tromey <tom@tromey.com>
10490
10491 PR cli/14977:
10492 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10493 for NULL.
10494
10495 2018-03-14 Tom Tromey <tom@tromey.com>
10496
10497 PR cli/19918:
10498 * printcmd.c (printf_pointer): Allow "-" in format.
10499
10500 2018-03-14 Tom Tromey <tom@tromey.com>
10501
10502 * printcmd.c (_initialize_printcmd): Add usage to printf.
10503
10504 2018-03-14 Yao Qi <qiyao@sourceware.org>
10505
10506 * MAINTAINERS: Update my email address.
10507
10508 2018-03-13 Tom Tromey <tom@tromey.com>
10509
10510 * machoread.c (macho_check_dsym): Change filenamep to a
10511 std::string*.
10512 (macho_symfile_read): Update.
10513 * symfile.c (load_command): Use std::string.
10514
10515 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10516
10517 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10518 to error message string.
10519 (riscv_register_name): Use xsnprintf instead of sprintf.
10520 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10521 internal_error.
10522 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10523 error.
10524 (riscv_push_dummy_call): Likewise.
10525
10526 2018-03-12 Tom Tromey <tom@tromey.com>
10527
10528 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10529 Use gdb::byte_vector.
10530 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10531
10532 2018-03-12 Yao Qi <yao.qi@linaro.org>
10533
10534 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10535 parameter type to readable_regcache.
10536 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10537 the declaration.
10538
10539 2018-03-11 Tom Tromey <tom@tromey.com>
10540
10541 * dwarf2read.c (struct nextfield): Add initializers.
10542 (struct nextfnfield): Remove.
10543 (struct fnfieldlist): Add initializers. Remove "length" and
10544 "head", use std::vector.
10545 (struct decl_field_list): Remove.
10546 (struct field_info): Add initializers.
10547 <fields, baseclasses>: Now std::vector.
10548 <nbaseclasses, nfnfields, typedef_field_list_count,
10549 nested_types_list_count>: Remove.
10550 (dwarf2_add_field, dwarf2_add_type_defn)
10551 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10552 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10553 (process_structure_scope): Update.
10554
10555 2018-03-11 Tom Tromey <tom@tromey.com>
10556
10557 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10558 for use by std::sort.
10559 (build_type_psymtabs_1): Use std::vector.
10560
10561 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10562
10563 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10564 and LIBMPFR in the printed configuration.
10565
10566 2018-03-08 Tom Tromey <tom@tromey.com>
10567
10568 * source.c (get_filename_and_charpos): Use scoped_fd.
10569 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10570 (procfs_pidlist): Likewise.
10571 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10572 (iterate_over_mappings): Likewise.
10573
10574 2018-03-08 Tom Tromey <tom@tromey.com>
10575
10576 * infcall.c (struct call_return_meta_info)
10577 <stack_temporaries_enabled>: Remove.
10578 (get_call_return_value, call_function_by_hand_dummy): Update.
10579 * thread.c (disable_thread_stack_temporaries): Remove.
10580 (enable_thread_stack_temporaries): Remove.
10581 (thread_stack_temporaries_enabled_p): Return bool.
10582 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10583 (get_last_thread_stack_temporary): Update.
10584 * eval.c (evaluate_subexp): Update.
10585 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10586 class, not a function.
10587 (value_ptr, value_vec): Remove typedefs.
10588 (class thread_info) <stack_temporaries_enabled>: Now bool.
10589 <stack_temporaries>: Now a std::vector.
10590 (thread_stack_temporaries_enabled_p)
10591 (value_in_thread_stack_temporaries): Return bool.
10592
10593 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10594
10595 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10596 (getpkt_or_notif_sane_1): Likewise.
10597
10598 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10599
10600 * build-id.c (build_id_to_debug_bfd): Use std::string.
10601
10602 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10603
10604 * build-id.c (find_separate_debug_file_by_buildid): Return
10605 std::string.
10606 * build-id.h (find_separate_debug_file_by_buildid): Return
10607 std::string.
10608 * coffread.c (coff_symfile_read): Adjust to std::string.
10609 * elfread.c (elf_symfile_read): Adjust to std::string.
10610 * symfile.c (separate_debug_file_exists): Change parameter to
10611 std::string.
10612 (find_separate_debug_file): Return std::string.
10613 (find_separate_debug_file_by_debuglink): Return std::string.
10614 * symfile.h (find_separate_debug_file_by_debuglink): Return
10615 std::string.
10616
10617 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10618
10619 * common/xml-utils.c (xml_escape_text): Move code to...
10620 (xml_escape_text_append): ... this new function.
10621 * common/xml-utils.h (xml_escape_text_append): New declaration.
10622 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10623 New function.
10624 (_initialize_xml_utils): register test_xml_escape_text_append as
10625 a selftest.
10626
10627 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10628
10629 * defs.h: Remove MAX_REGISTER_SIZE.
10630 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10631 asserts.
10632 * python/py-unwind.c (pyuw_sniffer): Likewise.
10633
10634 2018-03-07 Tom Tromey <tom@tromey.com>
10635
10636 * linux-tdep.c (linux_info_proc): Update.
10637 * target.h (struct target_ops) <to_fileio_readlink>: Return
10638 optional<string>.
10639 (target_fileio_readlink): Return optional<string>.
10640 * remote.c (remote_hostio_readlink): Return optional<string>.
10641 * inf-child.c (inf_child_fileio_readlink): Return
10642 optional<string>.
10643 * target.c (target_fileio_readlink): Return optional<string>.
10644
10645 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10646
10647 * regcache.c (cooked_read_test): Add riscv to the list of
10648 architectures that have a save_reggroup.
10649
10650 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10651
10652 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10653 value is not a dynamic class object.
10654
10655 2018-03-06 Tom Tromey <tom@tromey.com>
10656
10657 * rust-exp.y: Formatting fixes.
10658
10659 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10660
10661 * riscv-tdep.c (riscv_register_name): Remove target description
10662 support.
10663 (riscv_gdbarch_init): Remove target description check.
10664
10665 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10666
10667 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10668 comment.
10669 * riscv-tdep.h: Likewise.
10670
10671 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10672
10673 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10674 (riscv_pseudo_register_write): Delete.
10675 (riscv_gdbarch_init): Remove all use of pseudo registers.
10676
10677 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10678
10679 * record-btrace.c (btrace_print_lines): Replace cleanup
10680 parameter with RAII equivalents.
10681 (btrace_insn_history): Replace cleanup with RAII equivalents.
10682 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10683 make_cleanup_ui_out_tuple_begin_end): Remove.
10684 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10685 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10686 make_cleanup_ui_out_list_begin_end): Remove.
10687
10688 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10689
10690 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10691 parameter types to std::vector. Use bool.
10692 (record_btrace_wait): Replace VEC(tp_t) with
10693 std::vector<thread_info *>.
10694 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10695
10696 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10697
10698 * record-btrace.c (record_btrace_disable_callback): Remove.
10699 (struct scoped_btrace_disable): New.
10700 (record_btrace_open): Use scoped_btrace_disable.
10701
10702 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10703
10704 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10705 reading values from registers.
10706
10707 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10708
10709 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10710 where appropriate.
10711
10712 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10713
10714 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10715 change parameter type. Use GDB's print functions, and use
10716 core_addr_to_string where appropriate.
10717 (riscv_push_dummy_call): Use core_addr_to_string where
10718 appropriate, update call to riscv_print_arg_location, and reindent
10719 a few lines.
10720 (riscv_return_value): Update call to riscv_print_arg_location.
10721
10722 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10723 Tim Newsome <tim@sifive.com>
10724 Albert Ou <a0u@eecs.berkeley.edu>
10725 Darius Rad <darius@bluespec.com>
10726
10727 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10728 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10729 (ALLDEPFILES): Add riscv-tdep.c
10730 * configure.tgt: Add riscv support.
10731 * riscv-tdep.c: New file.
10732 * riscv-tdep.h: New file.
10733 * NEWS: Mention new target.
10734 * MAINTAINERS: Add entry for riscv.
10735
10736 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10737
10738 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10739 fields within aggregates.
10740
10741 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10742
10743 * record-btrace.c (btrace_print_lines): Change type of flags to
10744 gdb_disassembly_flags.
10745
10746 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10747
10748 * fbsd-nat.c: Include "inf-ptrace.h".
10749 (USE_SIGTRAP_SIGINFO): Conditionally define.
10750 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10751 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10752 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10753 function.
10754 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10755 Likewise.
10756 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10757 Likewise.
10758 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10759 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10760 "supports_stopped_by_hw_breakpoint" target methods.
10761
10762 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10763
10764 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10765 * fbsd-nat.c (debug_fbsd_nat): New variable.
10766 (show_fbsd_nat_debug): New function.
10767 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10768 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10769
10770 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10771
10772 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10773 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10774 prototype.
10775 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10776 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10777 method.
10778
10779 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10780
10781 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10782 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10783
10784 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10785
10786 * charset.c (struct charset_vector): New.
10787 (charsets): Change type to charset_vector.
10788 (find_charset_names): Adjust.
10789 (add_one): Adjust.
10790 (_initialize_charset): Adjust.
10791
10792 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10793
10794 * progspace.h (struct program_space) <deleted_solibs>: Change
10795 type to std::vector<std::string>.
10796 * progspace.c (clear_program_space_solib_cache): Adjust.
10797 * breakpoint.c (print_solib_event): Adjust.
10798 (check_status_catch_solib): Adjust.
10799 * solib.c (update_solib_list): Adjust.
10800 * ui-out.h (class ui_out) <field_string>: New overload.
10801 * ui-out.c (ui_out::field_string): New overload.
10802
10803 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10804
10805 * progspace.h (struct program_space): Add constructor and
10806 destructor, initialize fields.
10807 (add_program_space): Remove.
10808 * progspace.c (add_program_space): Rename to...
10809 (program_space::program_space): ... this.
10810 (release_program_space): Rename to...
10811 (program_space::~program_space): ... this.
10812 (delete_program_space): Use delete to delete program_space.
10813 (initialize_progspace): Use new to allocate program_space.
10814 * inferior.c (add_inferior_with_spaces): Likewise.
10815 (clone_inferior_command): Likewise.
10816 * infrun.c (follow_fork_inferior): Likewise.
10817 (handle_vfork_child_exec_or_exit): Likewise.
10818
10819 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10820
10821 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10822 (delim_string_to_char_ptr_vec): Return std::vector of
10823 gdb::unique_xmalloc_ptr.
10824 (dirnames_to_char_ptr_vec_append): Take std::vector of
10825 gdb::unique_xmalloc_ptr.
10826 (dirnames_to_char_ptr_vec): Return std::vector of
10827 gdb::unique_xmalloc_ptr.
10828 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10829 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10830 (delim_string_to_char_ptr_vec): Return an std::vector of
10831 gdb::unique_xmalloc_ptr, adjust the code.
10832 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10833 gdb::unique_xmalloc_ptr, adjust the code.
10834 (dirnames_to_char_ptr_vec): Return an std::vector of
10835 gdb::unique_xmalloc_ptr, adjust the code.
10836 * auto-load.c (auto_load_safe_path_vec): Change type to
10837 std::vector of gdb::unique_xmalloc_ptr.
10838 (auto_load_expand_dir_vars): Return an std::vector of
10839 gdb::unique_xmalloc_ptr, adjust the code.
10840 (auto_load_safe_path_vec_update): Adjust.
10841 (filename_is_in_auto_load_safe_path_vec): Adjust.
10842 (auto_load_objfile_script_1): Adjust.
10843 * build-id.c (build_id_to_debug_bfd): Adjust.
10844 * linux-thread-db.c (thread_db_load_search): Adjust.
10845 * source.c (add_path): Adjust.
10846 (openp): Adjust.
10847 * symfile.c (find_separate_debug_file): Adjust.
10848 * utils.c (do_free_char_ptr_vec): Remove.
10849 (make_cleanup_free_char_ptr_vec): Remove.
10850
10851 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10852
10853 PR gdb/22907
10854 * common/pathstuff.c: Conditionally include "<windows.h>".
10855
10856 2018-03-01 Georg Sauthoff <mail@georg.so>
10857
10858 PR gdb/22888
10859 * gcore.in: Quote variables and switch interpreter to bash.
10860
10861 2018-03-01 Tom Tromey <tom@tromey.com>
10862
10863 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10864 assertion. Add assertion for discriminant_index.
10865 (quirk_rust_enum): Use correct base type name in univariant case.
10866
10867 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10868
10869 * record.c (get_call_history_modifiers): Return a
10870 record_print_flags.
10871 (cmd_record_call_history): Adjust.
10872 * record-btrace.c (record_btrace_call_history): Adjust.
10873 (record_btrace_call_history_range): Adjust.
10874 (record_btrace_call_history_from): Adjust.
10875 * target-debug.h (target_debug_print_record_print_flags): New.
10876 * target-delegates.c: Re-generate.
10877 * target.c (target_call_history): Change flags type.
10878 (target_call_history_from): Likewise.
10879 (target_call_history_range): Likewise.
10880 * target.h (struct target_ops) <target_call_history>: Likewise.
10881 (target_call_history_from): Likewise.
10882 (target_call_history_range): Likewise.
10883
10884 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10885 Simon Marchi <simon.marchi@polymtl.ca>
10886
10887 * common/common-utils.c: Include "sys/stat.h".
10888 (is_regular_file): Move here from "source.c"; change return
10889 type to "bool".
10890 * common/common-utils.h (is_regular_file): New prototype.
10891 * common/pathstuff.c (contains_dir_separator): New function.
10892 * common/pathstuff.h (contains_dir_separator): New prototype.
10893 * source.c: Don't include "sys/stat.h".
10894 (is_regular_file): Move to "common/common-utils.c".
10895
10896 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10897
10898 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10899 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10900 * auto-load.c: Include "common/pathstuff.h".
10901 * common/common-def.h (current_directory): Move here.
10902 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10903 function.
10904 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10905 prototype.
10906 * common/pathstuff.c: New file.
10907 * common/pathstuff.h: New file.
10908 * compile/compile.c: Include "common/pathstuff.h".
10909 * defs.h (current_directory): Move to "common/common-defs.h".
10910 * dwarf2read.c: Include "common/pathstuff.h".
10911 * exec.c: Likewise.
10912 * guile/scm-safe-call.c: Likewise.
10913 * linux-thread-db.c: Likewise.
10914 * main.c: Likewise.
10915 * nto-tdep.c: Likewise.
10916 * objfiles.c: Likewise.
10917 * source.c: Likewise.
10918 * symtab.c: Likewise.
10919 * utils.c: Include "common/pathstuff.h".
10920 (gdb_realpath): Move to "common/pathstuff.c".
10921 (gdb_realpath_keepfile): Likewise.
10922 (gdb_abspath): Likewise.
10923 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10924 (gdb_realpath_keepfile): Likewise.
10925 (gdb_abspath): Likewise.
10926
10927 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10928
10929 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10930 wildcard process pid for super_resume for kernels with a
10931 specific bug.
10932
10933 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10934
10935 * compile/compile.c (get_args): Add additional comments
10936 explaining function.
10937
10938 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10939 Tom Tromey <tom@tromey.com>
10940
10941 * target.h (memory_write_request_s): Remove typedef. Don't define
10942 VEC.
10943 (target_write_memory_blocks): Change argument to std::vector.
10944 (struct memory_write_request): Add constructor.
10945 * target-memory.c (compare_block_starting_address): Return bool.
10946 Change argument types.
10947 (claim_memory): Change arguments to use std::vector.
10948 (split_regular_and_flash_blocks, blocks_to_erase)
10949 (compute_garbled_blocks): Likewise.
10950 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10951 (target_write_memory_blocks): Change argument to std::vector.
10952 * symfile.c (struct load_section_data): Add constructor and
10953 destructor. Use std::vector for "requests".
10954 (struct load_progress_data): Add initializers.
10955 (load_section_callback): Update. Use "new".
10956 (clear_memory_write_data): Remove.
10957 (generic_load): Update.
10958
10959 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10960
10961 * arch/aarch64.h: Use common/tdesc.h.
10962
10963 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10964
10965 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10966 architecture with a 64-bit ABI.
10967
10968 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10969
10970 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10971 ahead of target description loading.
10972
10973 2018-02-26 Tom Tromey <tom@tromey.com>
10974
10975 * stack.c (backtrace_command_1): Update.
10976 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10977 of "flags".
10978 * python/py-framefilter.c (py_print_frame)
10979 (gdbpy_apply_frame_filter): Change type of "flags".
10980 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10981 of "flags".
10982 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10983 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10984 * extension.h (enum frame_filter_flag): Rename from
10985 frame_filter_flags.
10986 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10987 (apply_ext_lang_frame_filter): Change type of "flags".
10988 * extension.c (apply_ext_lang_frame_filter): Change type of
10989 "flags".
10990 * extension-priv.h (struct extension_language_ops)
10991 <apply_frame_filter>: Change type of "flags".
10992
10993 2018-02-26 Tom Tromey <tom@tromey.com>
10994
10995 PR python/16497:
10996 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10997 off-by-one in py_end computation.
10998 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10999 PRINT_MORE_FRAMES.
11000 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11001 constant.
11002
11003 2018-02-26 Tom Tromey <tom@tromey.com>
11004
11005 * dwarf2read.c (struct variant_field): New.
11006 (struct nextfield) <variant>: New field.
11007 (dwarf2_add_field): Handle DW_TAG_variant_part.
11008 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11009 discriminated union.
11010 (read_structure_type): Handle DW_TAG_variant_part.
11011 (handle_struct_member_die): New function, extracted from
11012 process_structure_scope. Handle DW_TAG_variant.
11013 (process_structure_scope): Handle discriminated unions. Call
11014 handle_struct_member_die.
11015
11016 2018-02-26 Tom Tromey <tom@tromey.com>
11017
11018 * rust-lang.h (rust_last_path_segment): Declare.
11019 * rust-lang.c (rust_last_path_segment): Now public. Change
11020 contract.
11021 (struct disr_info): Remove.
11022 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11023 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11024 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11025 (rust_enum_p, rust_enum_variant): New function.
11026 (rust_underscore_fields): Remove "offset" parameter.
11027 (rust_print_enum): New function.
11028 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11029 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11030 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11031 enums.
11032 (rust_internal_print_type): New function, from rust_print_type.
11033 Remove enum code.
11034 (rust_print_type): Call rust_internal_print_type.
11035 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11036 Update enum handling.
11037 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11038 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11039 (rust_union_quirks): New functions.
11040 (process_full_comp_unit, process_full_type_unit): Call
11041 rust_union_quirks.
11042 (process_structure_scope): Update rust_unions if necessary.
11043
11044 2018-02-26 Tom Tromey <tom@tromey.com>
11045
11046 * value.h (value_union_variant): Declare.
11047 * valops.c (value_union_variant): New function.
11048 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11049 (struct discriminant_info): New.
11050 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11051 enumerator.
11052 (struct main_type) <flag_discriminated_union>: New field.
11053
11054 2018-02-26 Tom Tromey <tom@tromey.com>
11055
11056 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11057 unittests/unpack-selftests.c.
11058 * unittests/unpack-selftests.c: New file.
11059 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11060
11061 2018-02-26 Yao Qi <yao.qi@linaro.org>
11062
11063 * dwarf2read.c (struct partial_die_info) <read>: New method.
11064 (read_partial_die): Remove the declaration.
11065 (load_partial_dies): Update.
11066 (partial_die_info::partial_die_info):
11067 (read_partial_die): Change it to partial_die_info::read.
11068
11069 2018-02-26 Yao Qi <yao.qi@linaro.org>
11070
11071 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11072 (fixup_partial_die): Remove declaration.
11073 (scan_partial_symbols): Update.
11074 (partial_die_parent_scope): Likewise.
11075 (partial_die_full_name): Likewise.
11076 (fixup_partial_die): Change it to partial_die_info::fixup.
11077
11078 2018-02-26 Yao Qi <yao.qi@linaro.org>
11079
11080 * dwarf2read.c (read_partial_die): Update the declaration.
11081 (load_partial_dies): Caller update.
11082 (read_partial_die): Remove one argument abbrev_len.
11083
11084 2018-02-26 Yao Qi <yao.qi@linaro.org>
11085
11086 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11087 assignment operator.
11088 (load_partial_dies): Use ctor and copy ctor.
11089 (read_partial_die): Update.
11090 (dwarf2_cu::find_partial_die): Use ctor.
11091
11092 2018-02-26 Yao Qi <yao.qi@linaro.org>
11093
11094 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11095 (find_partial_die_in_comp_unit): Change it to
11096 dwarf2_cu::find_partial_die.
11097 (find_partial_die): Update.
11098
11099 2018-02-26 Yao Qi <yao.qi@linaro.org>
11100
11101 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11102 is NULL.
11103
11104 2018-02-26 Yao Qi <yao.qi@linaro.org>
11105
11106 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11107
11108 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11109
11110 * arch/amd64.h: Use common/tdesc.h.
11111 * arch/i386.c: Likewise.
11112 * arch/i386.h: Likewise.
11113 * arch/tic6x.c: Likewise.
11114 * arch/tdesc.h: Move file from here...
11115 * common/tdesc.h: ...to here.
11116 * features/aarch64-core.c: Regenerate.
11117 * features/aarch64-fpu.c: Regenerate.
11118 * features/i386/32bit-avx.c: Regenerate.
11119 * features/i386/32bit-avx512.c: Regenerate.
11120 * features/i386/32bit-core.c: Regenerate.
11121 * features/i386/32bit-linux.c: Regenerate.
11122 * features/i386/32bit-mpx.c: Regenerate.
11123 * features/i386/32bit-pkeys.c: Regenerate.
11124 * features/i386/32bit-sse.c: Regenerate.
11125 * features/i386/64bit-avx.c: Regenerate.
11126 * features/i386/64bit-avx512.c: Regenerate.
11127 * features/i386/64bit-core.c: Regenerate.
11128 * features/i386/64bit-linux.c: Regenerate.
11129 * features/i386/64bit-mpx.c: Regenerate.
11130 * features/i386/64bit-pkeys.c: Regenerate.
11131 * features/i386/64bit-segments.c: Regenerate.
11132 * features/i386/64bit-sse.c: Regenerate.
11133 * features/i386/x32-core.c: Regenerate.
11134 * features/tic6x-c6xp.c: Regenerate.
11135 * features/tic6x-core.c: Regenerate.
11136 * features/tic6x-gp.c: Regenerate.
11137 * target-descriptions.c: Use common/tdesc.h.
11138 * target-descriptions.h: Likewise.
11139
11140 2018-02-24 Tom Tromey <tom@tromey.com>
11141
11142 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11143 (try_thread_db_load_from_dir, thread_db_load_search): Use
11144 std::string.
11145 (info_auto_load_libthread_db_compare): Return bool. Change
11146 argument types.
11147 (info_auto_load_libthread_db): Use std::vector, std::string.
11148 Remove cleanups.
11149
11150 2018-02-24 Tom Tromey <tom@tromey.com>
11151
11152 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11153 std::string.
11154 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11155 std::string*.
11156 * gdbarch.c: Rebuild.
11157 * gdbarch.h: Rebuild.
11158 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11159 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11160 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11161 std::string*.
11162
11163 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11164
11165 * gdbtypes.h (sect_offset): Change type to uint64_t.
11166 (sect_offset_str): New function.
11167 * dwarf2read.c (create_addrmap_from_aranges): Use
11168 sect_offset_str.
11169 (error_check_comp_unit_head): Likewise.
11170 (create_debug_type_hash_table): Likewise.
11171 (read_cutu_die_from_dwo): Likewise.
11172 (init_cutu_and_read_dies): Likewise.
11173 (init_cutu_and_read_dies_no_follow): Likewise.
11174 (process_psymtab_comp_unit_reader): Likewise.
11175 (partial_die_parent_scope): Likewise.
11176 (peek_die_abbrev): Likewise.
11177 (process_queue): Likewise.
11178 (dwarf2_physname): Likewise.
11179 (read_namespace_alias): Likewise.
11180 (read_import_statement): Likewise.
11181 (create_dwo_cu_reader): Likewise.
11182 (create_cus_hash_table): Likewise.
11183 (lookup_dwo_cutu): Likewise.
11184 (inherit_abstract_dies): Likewise.
11185 (read_func_scope): Likewise.
11186 (read_call_site_scope): Likewise.
11187 (dwarf2_add_member_fn): Likewise.
11188 (read_common_block): Likewise.
11189 (read_module_type): Likewise.
11190 (read_typedef): Likewise.
11191 (read_subrange_type): Likewise.
11192 (load_partial_dies): Likewise.
11193 (read_partial_die): Likewise.
11194 (find_partial_die): Likewise.
11195 (read_str_index): Likewise.
11196 (dwarf2_string_attr): Likewise.
11197 (build_error_marker_type): Likewise.
11198 (lookup_die_type): Likewise.
11199 (dump_die_shallow): Likewise.
11200 (follow_die_ref): Likewise.
11201 (dwarf2_fetch_die_loc_sect_off): Likewise.
11202 (dwarf2_fetch_constant_bytes): Likewise.
11203 (follow_die_sig): Likewise.
11204 (get_signatured_type): Likewise.
11205 (get_DW_AT_signature_type): Likewise.
11206 (dwarf2_find_containing_comp_unit): Likewise.
11207 (set_die_type): Likewise.
11208
11209 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11210
11211 * arch/aarch64.c: Include "common-defs.h".
11212 * arch/amd64.c: Likewise.
11213 * arch/i386.c: Likewise.
11214
11215 2018-02-21 Tom Tromey <tom@tromey.com>
11216
11217 * value.h: (extract_field_op): Update.
11218 * eval.c (extract_field_op): Return a const char *.
11219 * expression.h (parse_expression_for_completion): Update.
11220 * completer.c (complete_expression): Update.
11221 (add_struct_fields): Make fieldname const.
11222 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11223 (mark_completion_tag, parse_exp_in_context_1): Update.
11224 (parse_expression_for_completion): Change "name" to
11225 unique_xmalloc_ptr*.
11226
11227 2018-02-21 Tom Tromey <tom@tromey.com>
11228
11229 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11230
11231 2018-02-21 Yao Qi <yao.qi@linaro.org>
11232
11233 * avr-tdep.c (avr_read_pc): Change parameter type to
11234 readable_regcache.
11235 * gdbarch.sh (read_pc): Likewise.
11236 * gdbarch.c: Re-generated.
11237 * gdbarch.h: Re-generated.
11238 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11239 readable_regcache.
11240 * ia64-tdep.c (ia64_read_pc): Likewise.
11241 * mips-tdep.c (mips_read_pc): Likewise.
11242 * spu-tdep.c (spu_read_pc): Likewise.
11243
11244 2018-02-21 Yao Qi <yao.qi@linaro.org>
11245
11246 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11247 * regcache-dump.c: New file.
11248 * regcache.c: Move register_dump to regcache-dump.c.
11249 (maintenance_print_registers): Likewise.
11250 (maintenance_print_raw_registers): Likewise.
11251 (maintenance_print_cooked_registers): Likewise.
11252 (maintenance_print_register_groups): Likewise.
11253 (maintenance_print_remote_registers): Likewise.
11254 (_initialize_regcache): Likewise.
11255 * regcache.h (register_dump): Moved from regcache.c.
11256
11257 2018-02-21 Yao Qi <yao.qi@linaro.org>
11258
11259 * regcache.c (regcache::regcache): Update.
11260 (regcache::invalidate): Move it to detached_regcache::invalidate.
11261 (get_thread_arch_aspace_regcache): Update.
11262 (regcache::raw_update): Update.
11263 (regcache::cooked_read): Remove some code.
11264 (regcache::cooked_read_value): Likewise.
11265 (regcache::raw_write): Remove assert on m_readonly_p.
11266 (regcache::raw_supply_integer): Move it to
11267 detached_regcache::raw_supply_integer.
11268 (regcache::raw_supply_zeroed): Likewise.
11269 * regcache.h (detached_regcache) <raw_supply_integer>: New
11270 declaration.
11271 <raw_supply_zeroed, invalidate>: Likewise.
11272 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11273 <invalidate>: Likewise.
11274 <m_readonly_p>: Removed.
11275
11276 2018-02-21 Yao Qi <yao.qi@linaro.org>
11277
11278 * infcmd.c (get_return_value): Let stop_regs point to
11279 get_current_regcache.
11280 * regcache.c (regcache::regcache): Remove.
11281 (register_dump_reg_buffer): New class.
11282 (regcache_print): Adjust.
11283 * regcache.h (regcache): Remove constructors.
11284
11285 2018-02-21 Yao Qi <yao.qi@linaro.org>
11286
11287 * regcache.c (class register_dump): New class.
11288 (register_dump_regcache, register_dump_none): New class.
11289 (register_dump_remote, register_dump_groups): New class.
11290 (regcache_print): Update.
11291 * regcache.h (regcache_dump_what): Move it to regcache.c.
11292 (regcache) <dump>: Remove.
11293
11294 2018-02-21 Yao Qi <yao.qi@linaro.org>
11295
11296 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11297 reg_buffer_rw *.
11298 (jit_unwind_reg_set_impl): Call raw_supply.
11299 (jit_frame_sniffer): Use reg_buffer_rw.
11300 * record-full.c (record_full_core_regbuf): Change its type.
11301 (record_full_core_open_1): Use reg_buffer_rw.
11302 (record_full_close): Likewise.
11303 (record_full_core_fetch_registers): Use regcache->raw_supply.
11304 (record_full_core_store_registers): Likewise.
11305 * regcache.c (regcache::get_register_status): Move it to
11306 reg_buffer.
11307 (regcache_raw_set_cached_value): Remove.
11308 (regcache::raw_set_cached_value): Remove.
11309 (regcache::raw_write): Call raw_supply.
11310 (regcache::raw_supply): Move it to reg_buffer_rw.
11311 * regcache.h (regcache_raw_set_cached_value): Remove.
11312 (reg_buffer_rw): New class.
11313
11314 2018-02-21 Yao Qi <yao.qi@linaro.org>
11315
11316 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11317 readonly_detached_regcache.
11318 (dummy_frame_prev_register): Use regcache->cooked_read.
11319 * frame.c (frame_save_as_regcache): Change return type.
11320 (frame_pop): Update.
11321 * frame.h (frame_save_as_regcache): Update declaration.
11322 * inferior.h (get_infcall_suspend_state_regcache): Update
11323 declaration.
11324 * infrun.c (infcall_suspend_state) <registers>: use
11325 readonly_detached_regcache.
11326 (save_infcall_suspend_state): Don't use regcache_dup.
11327 (get_infcall_suspend_state_regcache): Change return type.
11328 * linux-fork.c (struct fork_info) <savedregs>: Change to
11329 readonly_detached_regcache.
11330 <pc>: New field.
11331 (fork_save_infrun_state): Don't use regcache_dup.
11332 (info_checkpoints_command): Adjust.
11333 * mi/mi-main.c (register_changed_p): Update declaration.
11334 (mi_cmd_data_list_changed_registers): Use
11335 readonly_detached_regcache.
11336 (register_changed_p): Change parameter type to
11337 readonly_detached_regcache.
11338 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11339 readonly_detached_regcache.
11340 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11341 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11342 New.
11343 (regcache::save): Move it to reg_buffer.
11344 (regcache::restore): Change parameter type.
11345 (regcache_dup): Remove.
11346 * regcache.h (reg_buffer) <save>: New method.
11347 (readonly_detached_regcache): New class.
11348 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11349 readonly_detached_regcache.
11350 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11351
11352 2018-02-21 Yao Qi <yao.qi@linaro.org>
11353
11354 * frame.c (frame_save_as_regcache): Use regcache method save.
11355 (frame_pop): Use regcache method restore.
11356 * infrun.c (restore_infcall_suspend_state): Likewise.
11357 * linux-fork.c (fork_load_infrun_state): Likewise.
11358 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11359 save.
11360 * regcache.c (regcache_save): Remove.
11361 (regcache::restore): More asserts.
11362 (regcache_cpy): Remove.
11363 * regcache.h (regcache_save): Remove the declaration.
11364 (regcache::restore): Move from private to public.
11365 Remove the friend declaration of regcache_cpy.
11366 (regcache_cpy): Remove declaration.
11367
11368 2018-02-21 Yao Qi <yao.qi@linaro.org>
11369
11370 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11371 parameter type to 'readable_regcache *'.
11372 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11373 * arm-tdep.c (arm_neon_quad_read): Likewise.
11374 (arm_pseudo_read): Likewise.
11375 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11376 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11377 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11378 * gdbarch.c: Re-generated.
11379 * gdbarch.h: Re-generated.
11380 * gdbarch.sh (pseudo_register_read): Change parameter type to
11381 'readable_regcache *'.
11382 (pseudo_register_read_value): Likewise.
11383 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11384 (h8300_pseudo_register_read): Likewise.
11385 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11386 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11387 (i386_pseudo_register_read_into_value): Likewise.
11388 (i386_pseudo_register_read_value): Likewise.
11389 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11390 declaration.
11391 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11392 * m32c-tdep.c (m32c_raw_read): Likewise.
11393 (m32c_read_flg): Likewise.
11394 (m32c_banked_register): Likewise.
11395 (m32c_banked_read): Likewise.
11396 (m32c_sb_read): Likewise.
11397 (m32c_part_read): Likewise.
11398 (m32c_cat_read): Likewise.
11399 (m32c_r3r2r1r0_read): Likewise.
11400 (m32c_pseudo_register_read): Likewise.
11401 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11402 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11403 (mep_pseudo_cr64_read): Likewise.
11404 (mep_pseudo_register_read): Likewise.
11405 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11406 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11407 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11408 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11409 (regcache::cooked_read): Likewise.
11410 (regcache::cooked_read_value): Likewise.
11411 (regcache_cooked_read_signed):
11412 (regcache::cooked_read): Likewise.
11413 * regcache.h (readable_regcache): New class.
11414 (regcache): Inherit readable_regcache. Move some methods to
11415 readable_regcache.
11416 * rl78-tdep.c (rl78_pseudo_register_read): Change
11417 parameter type to 'readable_regcache *'.
11418 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11419 (e500_pseudo_register_read): Change parameter type to
11420 'readable_regcache *'.
11421 (dfp_pseudo_register_read): Likewise.
11422 (vsx_pseudo_register_read): Likewise.
11423 (efpr_pseudo_register_read): Likewise.
11424 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11425 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11426 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11427 (sh64_pseudo_register_read): Likewise.
11428 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11429 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11430 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11431 (spu_pseudo_register_read): Likewise.
11432 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11433 (xtensa_pseudo_register_read): Likewise.
11434
11435 2018-02-21 Yao Qi <yao.qi@linaro.org>
11436
11437 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11438 (regcache::arch): Move it to reg_buffer::arch.
11439 (regcache::register_buffer): Likewise.
11440 (regcache::assert_regnum): Likewise.
11441 (regcache::num_raw_registers): Likewise.
11442 * regcache.h (reg_buffer): New class.
11443 (regcache): Inherit reg_buffer.
11444
11445 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11446
11447 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11448 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11449
11450 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11451
11452 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11453
11454 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11455
11456 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11457 (SFILES): Remove common/*.c files.
11458 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11459 * common/common.host: Add common reference.
11460 * configure.ac: Likewise.
11461 * configure: Regenerate.
11462
11463 2018-02-16 Yao Qi <yao.qi@linaro.org>
11464
11465 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11466 (block_initialize_namespace): Use new.
11467 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11468 (dwarf2_free_objfile): Use delete.
11469 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11470 (copy_type_recursive): Use new.
11471 * gdb_obstack.h (allocate_on_obstack): New.
11472
11473 2018-02-15 Yao Qi <yao.qi@linaro.org>
11474
11475 PR gdb/22849
11476 * inferior.c (exit_inferior_1): Reset inf->control.
11477
11478 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11479
11480 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11481 declaration.
11482
11483 2018-02-14 Pedro Alves <palves@redhat.com>
11484
11485 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11486 frame_cleanup_after_sniffer on exception.
11487
11488 2018-02-14 Tom Tromey <tom@tromey.com>
11489
11490 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11491 const.
11492 (solib_bfd_open): Make pathname const.
11493 * solib.c (solib_bfd_open): Make pathname const.
11494 * solib-spu.c (spu_bfd_fopen): Make name const.
11495 (spu_bfd_open): Make pathname const.
11496 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11497 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11498
11499 2018-02-14 Tom Tromey <tom@tromey.com>
11500
11501 * symfile.c (symfile_bfd_open): Update.
11502 * source.h (openp, source_full_path_of, find_and_open_source):
11503 Change argument type to unique_xmalloc_ptr.
11504 * source.c (openp): Take a unique_xmalloc_ptr.
11505 (source_full_path_of, find_and_open_source): Likewise.
11506 (open_source_file, symtab_to_fullname): Update.
11507 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11508 unique_xmalloc_ptr.
11509 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11510 (exec_file_find): Update.
11511 * psymtab.c (psymtab_to_fullname): Update.
11512 * nto-tdep.h (nto_find_and_open_solib): Update.
11513 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11514 unique_xmalloc_ptr.
11515 * exec.c (exec_file_attach): Update.
11516 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11517 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11518
11519 2018-02-14 Tom Tromey <tom@tromey.com>
11520
11521 * solib.c: Include source.h.
11522 * nto-tdep.c: Include source.h.
11523 * mi/mi-cmd-env.c: Include source.h.
11524 * infcmd.c: Include source.h.
11525 * exec.c: Include source.h.
11526 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11527 (add_path, directory_switch, source_path, init_source_path): Move
11528 declarations...
11529 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11530 (add_path, directory_switch, source_path, init_source_path):
11531 ...here.
11532
11533 2018-02-14 Tom Tromey <tom@tromey.com>
11534
11535 * solist.h (exec_file_find, solib_find): Return
11536 unique_xmalloc_ptr.
11537 (solib_bfd_fopen): Take a const char *.
11538 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11539 (exec_file_find, solib_find): Likewise.
11540 (solib_bfd_fopen): Do not take ownership of "pathname".
11541 (solib_bfd_open): Use unique_xmalloc_ptr.
11542 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11543 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11544 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11545 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11546
11547 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11548
11549 * ada-lang.c (name_match_type_from_name): Remove reference to
11550 ada_name_for_lookup in function's documentation.
11551 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11552
11553 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11554
11555 * defs.h (enum openp_flags): New enum.
11556 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11557 Move to enum openp_flags.
11558 (openp_flags): New enum flags.
11559 (openp): Change parameter type to openp_flags.
11560 * source.c (openp): Change parameter type to openp_flags.
11561 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11562 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11563
11564 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11565
11566 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11567 per-command.
11568
11569 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11570
11571 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11572 into...
11573 (class dwarf2_queue_guard): ...the destructor of this new class.
11574 (dw2_do_instantiate_symtab): Create instance of the new class
11575 dwarf2_queue_guard, remove cleanup.
11576
11577 2018-02-09 Tom Tromey <tom@tromey.com>
11578
11579 * source.c (find_source_lines): Don't reference past the end of
11580 the vector.
11581
11582 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11583
11584 * remote.c (remote_btrace_maybe_reopen): Change error message.
11585 * btrace.c (btrace_enable): Likewise.
11586 (parse_xml_btrace): Likewise.
11587 (parse_xml_btrace_conf): Likewise.
11588
11589 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11590
11591 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11592 (linux_enable_pt, linux_enable_bts): Call
11593 diagnose_perf_event_open_fail.
11594
11595 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11596
11597 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11598 Remove parameter and change return type. Update callers. Move it.
11599 (linux_enable_bts, linux_enable_pt): Improve error message.
11600 (linux_enable_pt): Remove zero buffer size check.
11601 (linux_enable_btrace): Improve error messages. Remove NULL return
11602 check.
11603
11604 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11605
11606 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11607 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11608 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11609 (linux_supports_pt, linux_supports_btrace): Remove.
11610 (linux_enable_bts): Call cpu_supports_bts.
11611 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11612 * remote.c (remote_supports_btrace): Remove.
11613 (init_remote_ops): Remove remote_supports_btrace.
11614 * target-delegates.c: Regenerated.
11615 * target.c (target_supports_btrace): Remove.
11616 * target.h (target_ops) <to_supports_btrace>: Remove
11617 (target_supports_btrace): Remove.
11618 * x86-linux-nat.c (x86_linux_create_target): Remove
11619 linux_supports_btrace.
11620
11621 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11622
11623 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11624 btrace failed.
11625 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11626 exception and use message in own exception.
11627
11628 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11629
11630 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11631 (perf_event_pt_event_type): Use gdb_file_up.
11632 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11633 scoped_fd, and scoped_mmap.
11634
11635 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11636
11637 * common/scoped_mmap.h: New.
11638 * unittests/scoped_mmap-selftest.c: New.
11639 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11640 unittests/scoped_mmap-selftest.c.
11641
11642 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11643
11644 * common/scoped_fd.h: New.
11645 * unittests/scoped_fd-selftest.c: New.
11646 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11647 unittests/scoped_fd-selftest.c.
11648
11649 2018-02-09 Tom Tromey <tom@tromey.com>
11650
11651 * auto-load.c (auto_load_section_scripts): Use
11652 gdb::unique_xmalloc_ptr.
11653
11654 2018-02-09 Tom Tromey <tom@tromey.com>
11655
11656 * auto-load.c (execute_script_contents): Use std::string.
11657
11658 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11659
11660 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11661 Python function, rather than a new command.
11662
11663 2018-02-08 Tom Tromey <tom@tromey.com>
11664
11665 * solib.c (solib_find_1): Use std::string.
11666 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11667
11668 2018-02-08 Tom Tromey <tom@tromey.com>
11669
11670 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11671
11672 2018-02-08 Tom Tromey <tom@tromey.com>
11673
11674 * source.c (find_source_lines): Use gdb::def_vector.
11675
11676 2018-02-08 Tom Tromey <tom@tromey.com>
11677
11678 * macrocmd.c (struct temporary_macro_definition): New.
11679 (macro_define_command): Use temporary_macro_definition. Remove
11680 cleanups.
11681 (free_macro_definition_ptr): Remove.
11682
11683 2018-02-08 Tom Tromey <tom@tromey.com>
11684
11685 * macroexp.c (maybe_expand): Use std::string.
11686
11687 2018-02-08 Tom Tromey <tom@tromey.com>
11688
11689 * macroexp.c (struct macro_buffer): Add initializers for some
11690 members.
11691 (init_buffer, init_shared_buffer, free_buffer)
11692 (free_buffer_return_text): Remove.
11693 (macro_buffer): New constructors.
11694 (~macro_buffer): New destructor.
11695 (macro_buffer::set_shared): New method.
11696 (macro_buffer::resize_buffer, macro_buffer::appendc)
11697 (macro_buffer::appendmem): Now methods, not free functions.
11698 (set_token, append_tokens_without_splicing, stringify)
11699 (macro_stringify): Update.
11700 (gather_arguments): Change return type. Remove argc_p argument,
11701 add args_ptr argument. Use std::vector.
11702 (substitute_args): Remove argc argument. Accept std::vector.
11703 (expand): Update. Use std::vector.
11704 (scan, macro_expand, macro_expand_next): Update.
11705
11706 2018-02-08 Tom Tromey <tom@tromey.com>
11707
11708 * symtab.c (default_collect_symbol_completion_matches_break_on):
11709 Use unique_xmalloc_ptr.
11710 * macroscope.h: (sal_macro_scope, user_macro_scope)
11711 (default_macro_scope): Return unique_xmalloc_ptr.
11712 * macroscope.c (sal_macro_scope, user_macro_scope)
11713 (default_macro_scope): Return unique_xmalloc_ptr.
11714 * macroexp.h (macro_expand, macro_expand_once): Return
11715 unique_xmalloc_ptr.
11716 * macroexp.c (macro_expand, macro_expand_once): Return
11717 unique_xmalloc_ptr.
11718 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11719 (info_macro_command, info_macros_command): Use
11720 unique_xmalloc_ptr.
11721 * compile/compile-c-support.c (write_macro_definitions): Use
11722 unique_xmalloc_ptr.
11723 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11724
11725 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11726
11727 * value.c (value_static_field): Assign field type instead of
11728 containing type when returning an optimized out value.
11729
11730 2018-02-06 Yao Qi <yao.qi@linaro.org>
11731
11732 * ft32-tdep.c (ft32_read_pc): Remove.
11733 (ft32_write_pc): Remove.
11734 (ft32_gdbarch_init): Update.
11735 * m32r-tdep.c (m32r_read_pc): Remove.
11736 (m32r_gdbarch_init): Update.
11737 * mep-tdep.c (mep_read_pc): Remove.
11738 (mep_gdbarch_init): Update.
11739 * microblaze-tdep.c (microblaze_write_pc): Remove.
11740 (microblaze_gdbarch_init): Update.
11741 * mn10300-tdep.c (mn10300_read_pc): Remove.
11742 (mn10300_write_pc): Remove.
11743 (mn10300_gdbarch_init): Update.
11744 * moxie-tdep.c (moxie_read_pc): Remove.
11745 (moxie_write_pc): Remove.
11746 (moxie_gdbarch_init): Update.
11747
11748 2018-02-06 Yao Qi <yao.qi@linaro.org>
11749
11750 * expprint.c (print_subexp_standard): Handle
11751 OP_F77_UNDETERMINED_ARGLIST.
11752 (dump_subexp_body_standard): Likewise.
11753
11754 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11755
11756 * target-descriptions.c (tdesc_element_visitor) Add empty
11757 implementations.
11758 (tdesc_type): Move make_gdb_type from here.
11759 (tdesc_type_builtin): Likewise.
11760 (tdesc_type_vector): Likewise.
11761 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11762 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11763 (make_gdb_type_union): Likewise.
11764 (make_gdb_type_flags): Likewise.
11765 (make_gdb_type_enum): Likewise.
11766 (make_gdb_type): New function.
11767 (tdesc_register_type): Use static make_gdb_type.
11768
11769 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11770
11771 * infcmd.c (default_print_one_register_info): Align natural-format
11772 column values consistently one under another.
11773 (pad_to_column): New function.
11774
11775 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11776
11777 * dwarf2read.c (dwarf2_physname): Move commment.
11778
11779 2018-02-01 Leszek Swirski <leszeks@google.com>
11780
11781 * varobj.c (varobj_formatted_print_options): Allow recursive
11782 pretty printing if pretty printing is enabled.
11783
11784 2018-02-01 Leszek Swirski <leszeks@google.com>
11785
11786 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11787 names after a structop as a filename.
11788
11789 2018-02-01 Yao Qi <yao.qi@linaro.org>
11790
11791 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11792 (arm_record_coproc_data_proc): Likewise.
11793
11794 2018-02-01 Yao Qi <yao.qi@linaro.org>
11795
11796 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11797
11798 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11799
11800 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11801 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11802
11803 2018-01-31 Pedro Alves <palves@redhat.com>
11804
11805 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11806 * inflow.c (child_terminal_save_inferior): Wrap reference to
11807 tcgetpgrp in HAVE_TERMIOS_H.
11808 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11809 _WIN32.
11810 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11811 always iterate over all inferiors.
11812 (gdbsim_cntrl_c): Adjust.
11813 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11814
11815 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11816
11817 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11818 index type is objfile-owned if the element type is as well.
11819
11820 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11821
11822 GDB 8.1 released.
11823
11824 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11825
11826 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11827 "features/s390x-linux64.c".
11828 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11829 s390_linux32 and s390x_linux64.
11830 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11831 default tdesc.
11832 * s390-tdep.c: Include "features/s390-linux32.c" and
11833 "features/s390x-linux64.c".
11834 (s390_tdesc_valid): Add check for tdesc_has_registers.
11835 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11836 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11837 tdesc_s390x_linux64.
11838 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11839 tdesc_s390x_linux64 to...
11840 * s390-tdep.h: ...here.
11841
11842 2018-01-30 Pedro Alves <palves@redhat.com>
11843
11844 PR gdb/13211
11845 * config.in, configure: Regenerate.
11846 * configure.ac: Check for getpgid.
11847 * go32-nat.c (go32_pass_ctrlc): New.
11848 (go32_target): Install it.
11849 * inf-child.c (inf_child_target): Install
11850 child_terminal_save_inferior, child_pass_ctrlc and
11851 child_interrupt.
11852 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11853 (inf_ptrace_target): No longer install it.
11854 * infcmd.c (interrupt_target_1): Adjust.
11855 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11856 (child_interrupt): Declare.
11857 (inferior::terminal_state): New.
11858 * inflow.c (struct terminal_info): Update comments.
11859 (inferior_process_group): Delete.
11860 (terminal_is_ours): Delete.
11861 (gdb_tty_state): New.
11862 (child_terminal_init): Adjust.
11863 (is_gdb_terminal, sharing_input_terminal_1)
11864 (sharing_input_terminal): New functions.
11865 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11866 Set the process's actual process group in the foreground if
11867 possible. Handle is_ours_for_output/is_ours distinction. Don't
11868 mark terminal as the inferior's if not sharing GDB's terminal.
11869 Don't check attach_flag.
11870 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11871 pass down a target_terminal_state.
11872 (child_terminal_save_inferior): New, factored out from ...
11873 (child_terminal_ours_1): ... this. Handle
11874 target_terminal_state::is_ours_for_output.
11875 (child_interrupt, child_pass_ctrlc): New.
11876 (inflow_inferior_exit): Clear the inferior's terminal_state.
11877 (copy_terminal_info): Copy the inferior's terminal state.
11878 (_initialize_inflow): Remove reference to terminal_is_ours.
11879 * inflow.h (inferior_process_group): Delete.
11880 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11881 * procfs.c (procfs_target): Don't install procfs_interrupt.
11882 (procfs_interrupt): Delete.
11883 * remote.c (remote_serial_quit_handler): Adjust.
11884 (remote_interrupt): Remove ptid parameter. Adjust.
11885 * target-delegates.c: Regenerate.
11886 * target.c: Include "terminal.h".
11887 (target_terminal::terminal_state): Rename to ...
11888 (target_terminal::m_terminal_state): ... this.
11889 (target_terminal::init): Adjust.
11890 (target_terminal::inferior): Adjust to per-inferior
11891 terminal_state.
11892 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11893 (target_terminal::ours, target_terminal::ours_for_output): Use
11894 target_terminal_is_ours_kind.
11895 (target_interrupt): Remove ptid parameter. Adjust.
11896 (default_target_pass_ctrlc): Adjust.
11897 * target.h (target_ops::to_terminal_save_inferior): New field.
11898 (target_ops::to_interrupt): Remove ptid_t parameter.
11899 (target_interrupt): Remove ptid_t parameter. Update comment.
11900 (target_pass_ctrlc): Update comment.
11901 * target/target.h (target_terminal_state): New scoped enum,
11902 factored out of ...
11903 (target_terminal::terminal_state): ... here.
11904 (target_terminal::inferior): Update comments.
11905 (target_terminal::restore_inferior): New.
11906 (target_terminal::is_inferior, target_terminal::is_ours)
11907 (target_terminal::is_ours_for_output): Adjust.
11908 (target_terminal::scoped_restore_terminal_state): Adjust to
11909 rename, and call restore_inferior() instead of inferior().
11910 (target_terminal::scoped_restore_terminal_state::m_state): Change
11911 type.
11912 (target_terminal::terminal_state): Rename to ...
11913 (target_terminal::m_terminal_state): ... this and change type.
11914
11915 2018-01-30 Pedro Alves <palves@redhat.com>
11916
11917 * linux-nat.c (wait_for_signal): New function.
11918 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11919 directly.
11920 (async_terminal_is_ours)
11921 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11922 (linux_nat_add_target): Don't override
11923 to_terminal_inferior/to_terminal_ours.
11924
11925 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11926
11927 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11928
11929 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11930
11931 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11932 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11933 dwarf2_per_objfile_free here.
11934 (dwarf2_per_objfile_free): Remove.
11935 (_initialize_dwarf2_read): Don't register
11936 dwarf2_per_objfile_free as a registry cleanup.
11937
11938 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11939
11940 Avoid compilation errors in MinGW native builds
11941
11942 The error is triggered by including python-internal.h, and the
11943 error message is:
11944
11945 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11946 from build-gnulib/import/math.h:27,
11947 from d:/usr/Python26/include/pyport.h:235,
11948 from d:/usr/Python26/include/Python.h:58,
11949 from python/python-internal.h:94,
11950 from python/py-arch.c:24:
11951 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11952 using ::hypot;
11953 ^~~~~
11954
11955 This happens because Python headers define 'hypot' to expand t
11956 '_hypot' in the Windows builds.
11957 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11958 'hypoth'. This avoids a compilation error.
11959
11960 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11961
11962 * MAINTAINERS (Write After Approval): Fix ordering.
11963
11964 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11965
11966 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11967
11968 2018-01-26 Alan Modra <amodra@gmail.com>
11969
11970 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11971 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11972 Remove nop. Make const. Comment.
11973 (powerpc32_plt_stub_so_2): New.
11974 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11975 Correct count. Update uses.
11976 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11977 Move common code reading PLT entry word. Correct
11978 powerpc32_plt_stub PLT address calculation.
11979 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11980 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11981 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11982 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11983 (ppc64_standard_linkage8): Likewise.
11984 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11985 Correct insns description.
11986 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11987
11988 2018-01-24 Pedro Alves <palves@redhat.com>
11989
11990 GCC PR libstdc++/83906
11991 * gdbtypes.c (operator==(const dynamic_prop &,
11992 const dynamic_prop &)): New.
11993 (operator==(const range_bounds &, const range_bounds &)): New.
11994 (check_types_equal): Use them instead of memcmp.
11995 * gdbtypes.h (operator==(const dynamic_prop &,
11996 const dynamic_prop &)): Declare.
11997 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11998 (operator==(const range_bounds &, const range_bounds &)): Declare.
11999 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12000
12001 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12002
12003 * s390-linux-tdep.c (s390_record_address_mask)
12004 (s390_record_calc_disp_common, s390_record_calc_disp)
12005 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12006 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12007 (s390_process_record): Move to s390-tdep.c.
12008 (s390_linux_init_abi_any): Adjust.
12009 * s390-tdep.c (s390_record_address_mask)
12010 (s390_record_calc_disp_common, s390_record_calc_disp)
12011 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12012 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12013 (s390_process_record): Moved from s390-linux-tdep.c
12014 (s390_gdbarch_init): Adjust.
12015
12016 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12017
12018 * s390-linux-nat.c (s390-tdep.h): New include.
12019 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12020 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12021 (ALLDEPFILES): Add s390-tdep.c.
12022 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12023 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12024 * s390-tdep.h: ...this. New file.
12025 * s390-linux-tdep.c (s390-tdep.h): New include.
12026 (_initialize_s390_tdep): Rename to...
12027 (_initialize_s390_linux_tdep): ...this and adjust.
12028 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12029 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12030 s390-tdep.h.
12031 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12032 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12033 (s390_is_partial_instruction, s390_software_single_step)
12034 (is_non_branch_ril, s390_displaced_step_copy_insn)
12035 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12036 (s390_prologue_data, s390_addr, s390_store, s390_load)
12037 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12038 (s390_register_call_saved, s390_guess_tracepoint_registers)
12039 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12040 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12041 (s390_pseudo_register_name, s390_pseudo_register_type)
12042 (s390_pseudo_register_read, s390_pseudo_register_write)
12043 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12044 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12045 (s390_addr_bits_remove, s390_address_class_type_flags)
12046 (s390_address_class_type_flags_to_name)
12047 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12048 (s390_function_arg_float, s390_function_arg_vector)
12049 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12050 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12051 (s390_frame_align, s390_register_return_value, s390_return_value)
12052 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12053 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12054 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12055 (s390_trad_frame_prev_register, s390_unwind_cache)
12056 (s390_prologue_frame_unwind_cache)
12057 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12058 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12059 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12060 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12061 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12062 (s390_frame_base_address, s390_local_base_address)
12063 (s390_frame_base, s390_gcc_target_options)
12064 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12065 (s390_validate_reg_range, s390_tdesc_valid)
12066 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12067 * s390-tdep.c: ...this. New file.
12068
12069 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12070
12071 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12072 (s390_process_record, s390_gdbarch_tdep_alloc)
12073 (s390_linux_init_abi_any): Use/set new hook.
12074
12075 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12076
12077 * s390-linux-tdep.c (osabi.h): New include.
12078 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12079 (s390_linux_init_abi_any): New functions.
12080 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12081
12082 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12083
12084 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12085 tdesc_has_registers check
12086
12087 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12088
12089 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12090 (s390_validate_reg_range): New macro.
12091 (s390_gdbarch_init): Adjust.
12092
12093 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12094
12095 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12096 (s390_gdbarch_tdep_alloc): Adjust.
12097 (s390_gdbarch_init): Adjust.
12098
12099 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12100
12101 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12102 <have_tdb>: Change type to bool.
12103 (s390_gdbarch_tdep_alloc): Adjust.
12104 (s390_gdbarch_init): Adjust.
12105
12106 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12107
12108 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12109 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12110 (s390_gdbarch_tdep_alloc): New function.
12111 (s390_gdbarch_init): Allocate tdep at start and use its fields
12112 instead of separate variables.
12113
12114 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12115
12116 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12117 when looking for cached gdbarch and add comment for remaining.
12118
12119 2018-01-22 Pedro Alves <palves@redhat.com>
12120 Sergio Durigan Junior <sergiodj@redhat.com>
12121
12122 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12123 case.
12124
12125 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12126
12127 * MAINTAINERS: Update my company e-mail address.
12128
12129 2018-01-22 Yao Qi <yao.qi@linaro.org>
12130
12131 * regcache.c (cooked_write_test): New function.
12132 (_initialize_regcache): Register the test.
12133
12134 2018-01-22 Yao Qi <yao.qi@linaro.org>
12135
12136 * ia64-tdep.c (ia64_pseudo_register_read): Call
12137 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12138 * m32c-tdep.c (m32c_cat_read): Likewise.
12139 (m32c_r3r2r1r0_read): Likewise.
12140 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12141 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12142
12143 2018-01-22 Yao Qi <yao.qi@linaro.org>
12144
12145 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12146 method raw_read instead of regcache_raw_read.
12147 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12148 * arm-tdep.c (arm_neon_quad_read): Likewise.
12149 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12150 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12151 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12152 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12153 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12154 (i386_pseudo_register_read_into_value): Likewise.
12155 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12156 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12157 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12158 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12159 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12160 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12161 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12162 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12163 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12164
12165 2018-01-22 Yao Qi <yao.qi@linaro.org>
12166
12167 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12168 * configure.tgt: Remove target mt.
12169 * mt-tdep.c: Remove.
12170 * regcache.c (cooked_read_test): Remove the check for mt.
12171
12172 2018-01-22 Yao Qi <yao.qi@linaro.org>
12173
12174 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12175 instead of gdbarch_pseudo_register_read_value.
12176
12177 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12178
12179 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12180 language is Ada.
12181
12182 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12183
12184 * linespec.c (create_sals_line_offset): Remove code that preserved
12185 the symtab_and_line's line number.
12186
12187 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12188
12189 * varobj.c (varobj_create): Don't set valid_block when creating a
12190 floating varobj.
12191
12192 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12193
12194 * varobj.c (varobj_create): Remove out of date comment.
12195
12196 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12197
12198 PR mi/20395
12199 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12200 updating innermost block.
12201 * parse.c (innermost_block_tracker::update): Take extra type
12202 parameter, and check types match before updating innermost block.
12203 (write_dollar_variable): Update innermost block for registers.
12204 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12205 (innermost_block_tracker::innermost_block_tracker): Initialise
12206 m_types member.
12207 (innermost_block_tracker::reset): Take type parameter.
12208 (innermost_block_tracker::update): Take type parameter, and pass
12209 type through as needed.
12210 (innermost_block_tracker::m_types): New member.
12211 * varobj.c (varobj_create): Pass type when reseting innermost
12212 block.
12213
12214 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12215
12216 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12217 * ada-lang.c (resolve_subexp): Likewise.
12218 * breakpoint.c (set_breakpoint_condition) Likewise.
12219 (watch_command_1) Likewise.
12220 * c-exp.y (variable): Likewise.
12221 * d-exp.y (PrimaryExpression): Likewise.
12222 * f-exp.y (variable): Likewise.
12223 * go-exp.y (variable): Likewise.
12224 * m2-exp.y (variable): Likewise.
12225 * objfiles.c (objfile::~objfile): Likewise.
12226 * p-exp.y (variable): Likewise.
12227 * parse.c (innermost_block): Change type.
12228 * parser-defs.h (class innermost_block_tracker): New.
12229 (innermost_block): Change to innermost_block_tracker.
12230 * printcmd.c (display_command): Switch to innermost_block API.
12231 (do_one_display): Likewise.
12232 * rust-exp.y (do_one_display): Likewise.
12233 * symfile.c (clear_symtab_users): Likewise.
12234 * varobj.c (varobj_create): Switch to innermost_block API, replace
12235 use of innermost_block with block stored on varobj object.
12236
12237 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12238
12239 * expression.h (innermost_block): Remove declaration.
12240 * varobj.c: Add 'parser-defs.h' include.
12241
12242 2018-01-19 Tom Tromey <tom@tromey.com>
12243
12244 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12245 symbols in the static and global blocks.
12246
12247 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12248
12249 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12250 gdb_ptrace.h, and move including gdb_wait.h ...
12251 * nat/linux-ptrace.h: ... to here.
12252
12253 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12254
12255 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12256 inf_ptrace_detach_success.
12257 (inf_ptrace_detach_success): Add inferior parameter, use it
12258 instead of inferior_ptid, pass it to detach_inferior.
12259 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12260 parameter.
12261 * inferior.c (detach_inferior): Add overload that takes an
12262 inferior object.
12263 * inferior.h (detach_inferior): Likewise.
12264 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12265 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12266 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12267
12268 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12269
12270 * target.h (struct target_ops) <to_detach>: Add inferior
12271 parameter.
12272 (target_detach): Likewise.
12273 * target.c (dispose_inferior): Pass inferior down.
12274 (target_detach): Pass inferior down. Assert that it is equal to
12275 the current inferior.
12276 * aix-thread.c (aix_thread_detach): Pass inferior down.
12277 * corefile.c (core_file_command): Pass current_inferior() down.
12278 * corelow.c (core_detach): Add inferior parameter.
12279 * darwin-nat.c (darwin_detach): Likewise.
12280 * gnu-nat.c (gnu_detach): Likewise.
12281 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12282 * infcmd.c (detach_command): Pass current_inferior() down to
12283 target_detach.
12284 * infrun.c (follow_fork_inferior): Pass parent_inf to
12285 target_detach.
12286 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12287 target_detach.
12288 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12289 * linux-thread-db.c (thread_db_detach): Likewise.
12290 * nto-procfs.c (procfs_detach): Likewise.
12291 * procfs.c (procfs_detach): Likewise.
12292 * record.c (record_detach): Likewise.
12293 * record.h (struct inferior): Forward-declare.
12294 (record_detach): Add inferior parameter.
12295 * remote-sim.c (gdbsim_detach): Likewise.
12296 * remote.c (remote_detach_1): Likewise.
12297 (remote_detach): Likewise.
12298 (extended_remote_detach): Likewise.
12299 * sol-thread.c (sol_thread_detach): Likewise.
12300 * target-debug.h (target_debug_print_inferior_p): New macro.
12301 * target-delegates.c: Re-generate.
12302 * top.c (kill_or_detach): Pass inferior down to target_detach.
12303 * windows-nat.c (windows_detach): Add inferior parameter.
12304
12305 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12306
12307 * target.h (struct target_ops) <to_detach>: Remove args
12308 parameter.
12309 (target_detach): Likewise.
12310 * target.c (dispose_inferior): Adjust.
12311 (target_detach): Remove args parameter, adjust.
12312 * aix-thread.c (aix_thread_detach): Adjust.
12313 * corefile.c (core_file_command): Adjust.
12314 * corelow.c (core_detach): Adjust.
12315 * darwin-nat.c (darwin_detach): Adjust.
12316 * gnu-nat.c (gnu_detach): Adjust.
12317 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12318 * infcmd.c (detach_command): Adjust
12319 * infrun.c (follow_fork_inferior): Adjust.
12320 (handle_vfork_child_exec_or_exit): Adjust.
12321 * linux-fork.c (linux_fork_detach): Remove args parameter.
12322 * linux-fork.h (linux_fork_detach): Likewise.
12323 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12324 * linux-thread-db.c (thread_db_detach): Likewise.
12325 * nto-procfs.c (procfs_detach): Likewise.
12326 * procfs.c (procfs_detach): Likewise.
12327 (do_detach): Remove signo parameter.
12328 * record.c (record_detach): Remove args parameter.
12329 * record.h (record_detach): Likewise.
12330 * remote-sim.c (gdbsim_detach): Likewise.
12331 * remote.c (remote_detach_1): Likewise.
12332 (remote_detach): Likewise.
12333 (extended_remote_detach): Likewise.
12334 * sol-thread.c (sol_thread_detach): Likewise.
12335 * target-delegates.c: Re-generate.
12336 * top.c (struct qt_args) <args>: Remove field.
12337 (kill_or_detach): Don't pass args.
12338 (quit_force): Don't set args.
12339 * windows-nat.c (windows_detach): Remove args parameter.
12340
12341 2018-01-19 Yao Qi <yao.qi@linaro.org>
12342
12343 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12344 (arm_linux_init_abi): Install it.
12345
12346 2018-01-19 Yao Qi <yao.qi@linaro.org>
12347
12348 * osabi.c (gdb_osabi_names): Extend the regexp for
12349 arm-linux-gnueabihf.
12350
12351 2018-01-18 Yao Qi <yao.qi@linaro.org>
12352
12353 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12354 m_abbrevs.
12355 (abbrev_table::add_abbrev): Update.
12356 (abbrev_table::lookup_abbrev): Update.
12357
12358 2018-01-18 Yao Qi <yao.qi@linaro.org>
12359
12360 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12361
12362 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12363
12364 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12365 to "std::string".
12366
12367 2018-01-17 Tom Tromey <tom@tromey.com>
12368
12369 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12370
12371 2018-01-17 Tom Tromey <tom@tromey.com>
12372
12373 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12374 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12375 (create_array_type_with_stride): Update.
12376 * dwarf2read.c (set_die_type): Update.
12377
12378 2018-01-17 Tom Tromey <tom@tromey.com>
12379
12380 * dwarf2read.c (delayed_method_info): Remove typedef.
12381 (dwarf2_cu::method_info): Now a std::vector.
12382 (add_to_method_list): Update.
12383 (free_delayed_list): Remove.
12384 (compute_delayed_physnames): Update.
12385 (process_full_comp_unit, process_full_type_unit): Clear the method
12386 list. Remove cleanups.
12387 (psymtab_include_file_name): Add name_holder parameter. Use
12388 unique_xmalloc_ptr.
12389 (dwarf_decode_lines): Update.
12390
12391 2018-01-17 Tom Tromey <tom@tromey.com>
12392 Simon Marchi <simon.marchi@ericsson.com>
12393
12394 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12395 (dwarf2_per_objfile::free_cached_comp_units)
12396 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12397 (init_cutu_and_read_dies_no_follow): Update.
12398 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12399 (dwarf2_cu::~dwarf2_cu): New.
12400 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12401 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12402
12403 2018-01-17 Tom Tromey <tom@tromey.com>
12404 Simon Marchi <simon.marchi@ericsson.com>
12405
12406 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12407 (struct die_reader_specs) <abbrev_table>: New member.
12408 (struct abbrev_table): Add constructor.
12409 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12410 <abbrev_obstack>: Now an auto_obstack.
12411 (abbrev_table_up): New typedef.
12412 (init_cu_die_reader): Add abbrev_table parameter.
12413 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12414 Add result_dwo_abbrev_table.
12415 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12416 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12417 Update.
12418 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12419 parameter.
12420 (skip_children): Update.
12421 (abbrev_table::alloc_abbrev): Rename from
12422 abbrev_table_alloc_abbrev.
12423 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12424 (abbrev_table::lookup_abbrev): Rename from
12425 abbrev_table_lookup_abbrev.
12426 (abbrev_table_read_table): Return abbrev_table_up.
12427 (abbrev_table_free, abbrev_table_free_cleanup)
12428 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12429 (load_partial_dies): Update.
12430
12431 2018-01-17 Tom Tromey <tom@tromey.com>
12432
12433 * dwarf2read.c (dwarf2_compute_name): Update comment.
12434 (read_func_scope, read_variable): Update.
12435 (new_symbol): Remove.
12436 (new_symbol_full): Rename to new_symbol.
12437
12438 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12439
12440 PR gdb/16577
12441 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12442 a warning instead of throwing an error, set section size to 0 and return
12443 NULL.
12444 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12445
12446 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12447
12448 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12449 std::string.
12450 (linux_ptrace_attach_fail_reason_string): Likewise.
12451 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12452 Likewise.
12453 (linux_ptrace_attach_fail_reason_string): Likewise.
12454 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12455
12456 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12457
12458 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12459
12460 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12461
12462 PR gdb/21559
12463 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12464 checking for fs_base/gs_base fields in struct user_regs_struct.
12465 * configure: Regenerate.
12466
12467 2018-01-17 Yao Qi <yao.qi@linaro.org>
12468
12469 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12470 function.
12471 (aarch64_linux_init_abi): Install it to gdbarch hook
12472 gcc_target_options.
12473
12474 2018-01-15 Pedro Alves <palves@redhat.com>
12475
12476 * common/signals-state-save-restore.c
12477 (save_original_signals_state): Fix typos.
12478
12479 2017-01-12 Tom Tromey <tom@tromey.com>
12480 Sergio Durigan Junior <sergiodj@redhat.com>
12481
12482 * Makefile.in (install-only): Install gdb-add-index.
12483
12484 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12485
12486 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12487
12488 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12489
12490 * infrun.c (keep_going_pass_signal): Clear step-over info when
12491 insert_breakpoints fails.
12492
12493 2018-01-11 Pedro Alves <palves@redhat.com>
12494
12495 PR gdb/22583
12496 * infrun.c (resume): Rename to ...
12497 (resume_1): ... this.
12498 (resume): Reimplement as wrapper around resume_1.
12499
12500 2018-01-11 Pedro Alves <palves@redhat.com>
12501
12502 PR remote/22597
12503 * remote.c (remote_parse_stop_reply): Default to the last-set
12504 general thread instead of to 'magic_null_ptid'.
12505
12506 2018-01-10 Pedro Alves <palves@redhat.com>
12507
12508 * language.h (language_get_symbol_name_matcher): Rename ...
12509 (get_symbol_name_matcher): ... this.
12510 * language.c (language_get_symbol_name_matcher): Ditto.
12511 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12512 callers adjusted.
12513
12514 2018-01-10 Pedro Alves <palves@redhat.com>
12515
12516 PR gdb/22670
12517 * dwarf2read.c
12518 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12519 Adjust to use language_get_symbol_name_matcher instead of
12520 language_defn::la_get_symbol_name_matcher.
12521 * language.c (language_get_symbol_name_matcher): If in Ada mode
12522 and the lookup name is a verbatim match, return Ada's matcher.
12523 * language.h (language_get_symbol_name_matcher): Adjust comment.
12524 (ada_lookup_name_info::verbatim_p):: New method.
12525
12526 2018-01-10 Pedro Alves <palves@redhat.com>
12527
12528 PR gdb/22670
12529 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12530 minsym's language is language_auto or language_cplus, pass down
12531 language_ada instead.
12532 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12533
12534 2018-01-10 Pedro Alves <palves@redhat.com>
12535
12536 PR gdb/22670
12537 * minsyms.c (linkage_name_str): New function.
12538 (iterate_over_minimal_symbols): Use it.
12539
12540 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12541
12542 * NEWS: Document that 'info proc' now works on FreeBSD.
12543
12544 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12545
12546 * configure.ac: Check for kinfo_getfile in libutil.
12547 * configure: Regenerate.
12548 * config.in: Regenerate.
12549 * fbsd-nat.c: Include "fbsd-tdep.h".
12550 (fbsd_fetch_cmdline): New.
12551 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12552 rather than calling error.
12553 (fbsd_info_proc): New.
12554 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12555 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12556 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12557
12558 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12559
12560 * fbsd-nat.c (struct free_deleter): Remove.
12561 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12562
12563 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12564
12565 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12566 NULL for an empty pathname.
12567
12568 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12569
12570 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12571 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12572 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12573 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12574 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12575 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12576 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12577 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12578 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12579 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12580 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12581 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12582 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12583 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12584 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12585
12586 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12587
12588 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12589 (gnu_xfer_auxv): New function.
12590 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12591 TARGET_OBJECT_AUXV.
12592
12593 2018-01-08 Yao Qi <yao.qi@linaro.org>
12594 Simon Marchi <simon.marchi@ericsson.com>
12595
12596 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12597 common/selftest.c.
12598 (COMMON_OBS): Remove selftest.o.
12599 * configure.ac: Append selftest-arch.c and common/selftest.c to
12600 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12601 * configure: Re-generated.
12602 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12603 GDB_SELF_TEST.
12604 (maintenance_info_selftests): Likewise.
12605
12606 2018-01-08 Xavier Roirand <roirand@adacore.com>
12607
12608 * ada-valprint.c (val_print_packed_array_elements): Use
12609 proper number of elements when printing an array indexed
12610 by an enumeration type.
12611
12612 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12613
12614 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12615 (dw2_get_file_names_reader): Adjust.
12616 (lookup_dwo_signatured_type): Adjust.
12617 (lookup_dwp_signatured_type): Adjust.
12618 (lookup_signatured_type): Adjust.
12619 (create_type_unit_group): Adjust.
12620 (get_type_unit_group): Adjust.
12621 (process_psymtab_comp_unit_reader): Adjust.
12622 (build_type_psymtabs_reader): Adjust.
12623 (scan_partial_symbols): Adjust.
12624 (add_partial_symbol): Adjust.
12625 (add_partial_subprogram): Adjust.
12626 (peek_die_abbrev): Adjust.
12627 (fixup_go_packaging): Adjust.
12628 (process_imported_unit_die): Adjust.
12629 (dwarf2_compute_name): Adjust.
12630 (dwarf2_physname): Adjust.
12631 (read_import_statement): Adjust.
12632 (handle_DW_AT_stmt_list): Adjust.
12633 (read_file_scope): Adjust.
12634 (read_func_scope): Adjust.
12635 (read_lexical_block_scope): Adjust.
12636 (read_call_site_scope): Adjust.
12637 (read_variable): Adjust.
12638 (dwarf2_rnglists_process): Adjust.
12639 (dwarf2_ranges_process): Adjust.
12640 (dwarf2_ranges_read): Adjust.
12641 (dwarf2_get_pc_bounds): Adjust.
12642 (dwarf2_record_block_ranges): Adjust.
12643 (dwarf2_add_field): Adjust.
12644 (dwarf2_add_member_fn): Adjust.
12645 (read_structure_type): Adjust.
12646 (process_structure_scope): Adjust.
12647 (read_enumeration_type): Adjust.
12648 (read_array_type): Adjust.
12649 (mark_common_block_symbol_computed): Adjust.
12650 (read_common_block): Adjust.
12651 (read_namespace_type): Adjust.
12652 (read_namespace): Adjust.
12653 (read_module_type): Adjust.
12654 (read_tag_pointer_type): Adjust.
12655 (read_tag_ptr_to_member_type): Adjust.
12656 (read_tag_string_type): Adjust.
12657 (read_subroutine_type): Adjust.
12658 (read_typedef): Adjust.
12659 (read_base_type): Adjust.
12660 (attr_to_dynamic_prop): Adjust.
12661 (read_subrange_type): Adjust.
12662 (read_unspecified_type): Adjust.
12663 (dwarf2_read_abbrevs): Adjust.
12664 (load_partial_dies): Adjust.
12665 (read_partial_die): Adjust.
12666 (find_partial_die): Adjust.
12667 (guess_partial_die_structure_name): Adjust.
12668 (fixup_partial_die): Adjust.
12669 (read_attribute_value): Adjust.
12670 (read_addr_index): Adjust.
12671 (read_addr_index_from_leb128): Adjust.
12672 (read_str_index): Adjust.
12673 (dwarf2_string_attr): Adjust.
12674 (get_debug_line_section): Adjust.
12675 (dwarf_decode_line_header): Adjust.
12676 (lnp_state_machine::check_line_address): Adjust.
12677 (dwarf_decode_lines_1): Adjust.
12678 (dwarf_decode_lines): Adjust.
12679 (dwarf2_start_symtab): Adjust.
12680 (var_decode_location): Adjust.
12681 (new_symbol_full): Adjust.
12682 (dwarf2_const_value_data): Adjust.
12683 (dwarf2_const_value_attr): Adjust.
12684 (dwarf2_const_value): Adjust.
12685 (die_type): Adjust.
12686 (die_containing_type): Adjust.
12687 (build_error_marker_type): Adjust.
12688 (lookup_die_type): Adjust.
12689 (guess_full_die_structure_name): Adjust.
12690 (anonymous_struct_prefix): Adjust.
12691 (determine_prefix): Adjust.
12692 (dwarf2_name): Adjust.
12693 (follow_die_ref_or_sig): Adjust.
12694 (follow_die_offset): Adjust.
12695 (follow_die_ref): Adjust.
12696 (follow_die_sig_1): Adjust.
12697 (follow_die_sig): Adjust.
12698 (get_signatured_type): Adjust.
12699 (get_DW_AT_signature_type): Adjust.
12700 (decode_locdesc): Adjust.
12701 (dwarf_decode_macros): Adjust.
12702 (cu_debug_loc_section): Adjust.
12703 (fill_in_loclist_baton): Adjust.
12704 (dwarf2_symbol_mark_computed): Adjust.
12705 (init_one_comp_unit): Don't assign
12706 dwarf2_cu::dwarf2_per_objfile.
12707 (set_die_type): Adjust.
12708
12709 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12710
12711 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12712 <dwarf2_per_objfile>: New field.
12713 (dwarf2_per_objfile): Remove global.
12714 (get_dwarf2_per_objfile): New function.
12715 (set_dwarf2_per_objfile): New function.
12716 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12717 dwarf2_per_objfile.
12718 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12719 (read_abbrev_offset): Likewise.
12720 (read_indirect_string): Likewise.
12721 (read_indirect_line_string): Likewise.
12722 (read_indirect_string_at_offset): Likewise.
12723 (read_indirect_string_from_dwz): Likewise.
12724 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12725 dwarf2_per_objfile.
12726 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12727 (create_all_comp_units): Change objfile parameter to
12728 dwarf2_per_objfile.
12729 (create_all_type_units): Likewise.
12730 (process_queue): Add dwarf2_per_objfile parameter.
12731 (read_and_check_comp_unit_head): Likewise.
12732 (lookup_dwo_unit_in_dwp): Likewise.
12733 (get_dwp_file): Likewise.
12734 (process_cu_includes): Likewise.
12735 (struct free_dwo_file_cleanup_data): New struct.
12736 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12737 set_dwarf2_per_objfile.
12738 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12739 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12740 context, adjust calls.
12741 (dw2_instantiate_symtab): Likewise.
12742 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12743 (dw2_get_cu): Likewise.
12744 (create_cu_from_index_list): Change objfile parameter to
12745 dwarf2_per_objfile.
12746 (create_cus_from_index_list): Get dwarf2_per_objfile from
12747 context, adjust calls.
12748 (create_cus_from_index): Likewise.
12749 (create_signatured_type_table_from_index): Change objfile
12750 parameter to dwarf2_per_objfile.
12751 (create_signatured_type_table_from_debug_names): Change objfile
12752 parameter to dwarf2_per_objfile.
12753 (create_addrmap_from_index): Likewise.
12754 (create_addrmap_from_aranges): Likewise.
12755 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12756 (dw2_setup): Remove.
12757 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12758 context.
12759 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12760 get_dwarf2_per_objfile.
12761 (dw2_forget_cached_source_info): Likewise.
12762 (dw2_map_symtabs_matching_filename): Likewise.
12763 (struct dw2_symtab_iterator) <index>: Remove.
12764 <dwarf2_per_objfile>: New field.
12765 (dw2_symtab_iter_init): Replace index parameter with
12766 dwarf2_per_objfile.
12767 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12768 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12769 (dw2_print_stats): Likewise.
12770 (dw2_dump): Likewise.
12771 (dw2_expand_symtabs_for_function): Likewise.
12772 (dw2_expand_all_symtabs): Likewise.
12773 (dw2_expand_symtabs_with_fullname): Likewise.
12774 (dw2_expand_marked_cus): Replace index and objfile parameters
12775 with dwarf2_per_objfile.
12776 (dw_expand_symtabs_matching_file_matcher): Add
12777 dwarf2_per_objfile parameter and adjust calls.
12778 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12779 adjust calls.
12780 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12781 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12782 adjust calls.
12783 (create_cus_from_debug_names_list): Replace objfile parameter
12784 with dwarf2_per_objfile and adjust calls.
12785 (create_cus_from_debug_names): Likewise.
12786 (dwarf2_read_debug_names): Likewise.
12787 (mapped_debug_names::namei_to_name): Adjust call.
12788 (dw2_debug_names_iterator::next): Likewise.
12789 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12790 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12791 (dw2_debug_names_dump): Likewise.
12792 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12793 (dw2_debug_names_expand_symtabs_matching): Likewise.
12794 (dwarf2_initialize_objfile): Likewise.
12795 (dwarf2_build_psymtabs): Likewise.
12796 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12797 this_cu.
12798 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12799 (read_and_check_comp_unit_head): Likewise.
12800 (read_abbrev_offset): Likewise.
12801 (create_debug_type_hash_table): Likewise.
12802 (create_debug_types_hash_table): Likewise.
12803 (create_all_type_units): Replace objfile parameter with
12804 dwarf2_per_objfile.
12805 (add_type_unit): Add dwarf2_per_objfile parameter.
12806 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12807 with dwarf2_per_objfile.
12808 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12809 (lookup_dwp_signatured_type): Likewise.
12810 (lookup_signatured_type): Likewise.
12811 (read_cutu_die_from_dwo): Likewise.
12812 (init_tu_and_read_dwo_dies): Likewise.
12813 (init_cutu_and_read_dies): Likewise.
12814 (init_cutu_and_read_dies_no_follow): Likewise.
12815 (allocate_type_unit_groups_table): Add objfile parameter.
12816 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12817 (get_type_unit_group): Likewise.
12818 (process_psymtab_comp_unit): Update call.
12819 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12820 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12821 (print_tu_stats): Likewise.
12822 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12823 in void* parameter.
12824 (build_type_psymtabs): Change objfile parameter to
12825 dwarf2_per_objfile.
12826 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12827 passed in void* parameter.
12828 (process_skeletonless_type_units): Change objfile parameter to
12829 dwarf2_per_objfile.
12830 (set_partial_user): Likewise.
12831 (dwarf2_build_psymtabs_hard): Likewise.
12832 (read_comp_units_from_section): Likewise.
12833 (create_all_comp_units): Likewise.
12834 (scan_partial_symbols): Update calls.
12835 (add_partial_symbol): Likewise.
12836 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12837 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12838 (process_queue): Add dwarf2_per_objfile parameter.
12839 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12840 (compute_compunit_symtab_includes): Likewise.
12841 (process_cu_includes): Add dwarf2_per_objfile parameter.
12842 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12843 (process_full_type_unit): Likewise.
12844 (process_imported_unit_die): Update call.
12845 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12846 (read_file_scope): Likewise.
12847 (allocate_dwo_file_hash_table): Add objfile parameter.
12848 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12849 (create_cus_hash_table): Likewise.
12850 (create_dwp_hash_table): Likewise.
12851 (create_dwo_unit_in_dwp_v1): Likewise.
12852 (create_dwp_v2_section): Likewise.
12853 (create_dwo_unit_in_dwp_v2): Likewise.
12854 (lookup_dwo_unit_in_dwp): Likewise.
12855 (try_open_dwop_file): Likewise.
12856 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12857 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12858 cleanup to include a reference to dwarf2_per_objfile.
12859 (open_dwp_file): Add dwarf2_per_objfile parameter.
12860 (open_and_init_dwp_file): Likewise.
12861 (get_dwp_file): Likewise.
12862 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12863 (queue_and_load_all_dwo_tus): Update call.
12864 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12865 data.
12866 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12867 (dwarf2_ranges_process): Likewise.
12868 (dwarf2_get_pc_bounds): Likewise.
12869 (mark_common_block_symbol_computed): Likewise.
12870 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12871 (dwarf2_read_abbrevs): Update call.
12872 (read_partial_die): Use dwarf2_per_objfile from cu.
12873 (find_partial_die): Likewise.
12874 (fixup_partial_die): Likewise.
12875 (read_attribute_value): Likewise.
12876 (read_indirect_string_at_offset_from): Add objfile parameter.
12877 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12878 parameter.
12879 (read_indirect_string_from_dwz): Add objfile parameter.
12880 (read_indirect_string): Add objfile parameter.
12881 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12882 (read_addr_index): Use dwarf2_per_objfile from cu.
12883 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12884 call dw2_setup.
12885 (read_str_index): Use dwarf2_per_objfile from cu.
12886 (get_debug_line_section): Likewise.
12887 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12888 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12889 (new_symbol_full): Use dwarf2_per_objfile from cu.
12890 (build_error_marker_type): Likewise.
12891 (lookup_die_type): Likewise.
12892 (determine_prefix): Likewise.
12893 (follow_die_offset): Likewise.
12894 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12895 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12896 (dwarf2_fetch_die_type_sect_off): Likewise.
12897 (dwarf2_get_die_type): Likewise.
12898 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12899 (get_signatured_type): Likewise.
12900 (get_DW_AT_signature_type): Likewise.
12901 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12902 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12903 (cu_debug_loc_section): Likewise.
12904 (fill_in_loclist_baton): Likewise.
12905 (dwarf2_symbol_mark_computed): Likewise.
12906 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12907 dwarf2_per_objfile.
12908 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12909 parameter.
12910 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12911 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12912 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12913 (set_die_type): Use dwarf2_free_objfile from cu.
12914 (get_die_type_at_offset): Likewise.
12915 (dwarf2_per_objfile_free): Don't assign global variable.
12916 (debug_names) <constructor>: Add dwarf2_per_objfile
12917 parameter, update m_debugstrlookup construction.
12918 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12919 parameter.
12920 <m_dwarf2_per_objfile>: New field.
12921 <lookup>: Use m_dwarf2_per_objfile.
12922 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12923 (psyms_seen_size): Likewise.
12924 (write_gdbindex): Replace objfile parameter with
12925 dwarf2_per_objfile.
12926 (write_debug_names): Likewise.
12927 (write_psymtabs_to_index): Likewise.
12928 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12929 calls.
12930
12931 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12932
12933 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12934 <dwarf2_per_objfile>: New field.
12935 (struct dwarf2_per_cu_data) <objfile>: Remove.
12936 <dwarf2_per_objfile>: New field.
12937 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12938 of objfile.
12939 (create_signatured_type_table_from_index): Likewise.
12940 (create_debug_type_hash_table): Likewise.
12941 (fill_in_sig_entry_from_dwo_entry): Likewise.
12942 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12943 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12944 objfile.
12945 (create_partial_symtab): Access objfile through
12946 dwarf2_per_objfile.
12947 (process_psymtab_comp_unit_reader): Likewise.
12948 (read_comp_units_from_section): Likewise.
12949 (scan_partial_symbols): Likewise.
12950 (add_partial_symbol): Likewise.
12951 (add_partial_subprogram): Likewise.
12952 (peek_die_abbrev): Likewise.
12953 (fixup_go_packaging): Likewise.
12954 (process_full_comp_unit): Likewise.
12955 (process_full_type_unit): Likewise.
12956 (process_imported_unit_die): Likewise.
12957 (dwarf2_compute_name): Likewise.
12958 (dwarf2_physname): Likewise.
12959 (read_import_statement): Likewise.
12960 (create_cus_hash_table): Assign dwarf2_physname instead of
12961 objfile.
12962 (read_func_scope): Access objfile through dwarf2_per_objfile.
12963 (read_lexical_block_scope): Likewise.
12964 (read_call_site_scope): Likewise.
12965 (read_variable): Likewise.
12966 (dwarf2_rnglists_process): Likewise.
12967 (dwarf2_ranges_process): Likewise.
12968 (dwarf2_ranges_read): Likewise.
12969 (dwarf2_record_block_ranges): Likewise.
12970 (dwarf2_add_field): Likewise.
12971 (dwarf2_add_member_fn): Likewise.
12972 (read_structure_type): Likewise.
12973 (process_structure_scope): Likewise.
12974 (read_enumeration_type): Likewise.
12975 (read_array_type): Likewise.
12976 (read_common_block): Likewise.
12977 (read_namespace_type): Likewise.
12978 (read_namespace): Likewise.
12979 (read_module_type): Likewise.
12980 (read_tag_pointer_type): Likewise.
12981 (read_tag_ptr_to_member_type): Likewise.
12982 (read_tag_string_type): Likewise.
12983 (read_subroutine_type): Likewise.
12984 (read_typedef): Likewise.
12985 (read_base_type): Likewise.
12986 (attr_to_dynamic_prop): Likewise.
12987 (read_subrange_type): Likewise.
12988 (read_unspecified_type): Likewise.
12989 (load_partial_dies): Likewise.
12990 (read_partial_die): Likewise.
12991 (find_partial_die): Likewise.
12992 (guess_partial_die_structure_name): Likewise.
12993 (fixup_partial_die): Likewise.
12994 (read_attribute_value): Likewise.
12995 (read_addr_index_from_leb128): Likewise.
12996 (dwarf2_read_addr_index): Likewise.
12997 (dwarf2_string_attr): Likewise.
12998 (lnp_state_machine::check_line_address): Likewise.
12999 (dwarf_decode_lines_1): Likewise.
13000 (dwarf_decode_lines): Likewise.
13001 (dwarf2_start_symtab): Likewise.
13002 (var_decode_location): Likewise.
13003 (new_symbol_full): Likewise.
13004 (dwarf2_const_value_data): Likewise.
13005 (dwarf2_const_value_attr): Likewise.
13006 (dwarf2_const_value): Likewise.
13007 (die_type): Likewise.
13008 (die_containing_type): Likewise.
13009 (lookup_die_type): Likewise.
13010 (guess_full_die_structure_name): Likewise.
13011 (anonymous_struct_prefix): Likewise.
13012 (dwarf2_name): Likewise.
13013 (follow_die_ref_or_sig): Likewise.
13014 (follow_die_offset): Likewise.
13015 (follow_die_ref): Likewise.
13016 (dwarf2_fetch_die_loc_sect_off): Likewise.
13017 (dwarf2_fetch_constant_bytes): Likewise.
13018 (dwarf2_fetch_die_type_sect_off): Likewise.
13019 (dwarf2_get_die_type): Likewise.
13020 (follow_die_sig): Likewise.
13021 (decode_locdesc): Likewise.
13022 (dwarf2_per_cu_objfile): Likewise.
13023 (dwarf2_per_cu_text_offset): Likewise.
13024 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13025 objfile.
13026 (set_die_type): Access objfile through
13027 dwarf2_per_objfile.
13028
13029 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13030
13031 * valprint.c (converted_character_d): Remove typedef.
13032 (DEF_VEC_O (converted_character_d)): Remove.
13033 (count_next_character): Use std::vector.
13034 (print_converted_chars_to_obstack): Likewise.
13035 (generic_printstr): Likewise.
13036
13037 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13038
13039 * xml-support.h (struct gdb_xml_value): Add constructor.
13040 <value>: Change type to unique_xmalloc_ptr.
13041 (gdb_xml_value_s): Remove typedef.
13042 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13043 (gdb_xml_element_start_handler): Change parameter type to
13044 std::vector.
13045 (xml_find_attribute): Likewise.
13046 * xml-support.c (xml_find_attribute): Change parameter type to
13047 std::vector and adjust.
13048 (gdb_xml_values_cleanup): Remove.
13049 (gdb_xml_parser::start_element): Adjust to std::vector.
13050 (xinclude_start_include): Change paraeter type to std::vector
13051 and adjust.
13052 * btrace.c (check_xml_btrace_version): Likewise.
13053 (parse_xml_btrace_block): Likewise.
13054 (parse_xml_btrace_pt_config_cpu): Likewise.
13055 (parse_xml_btrace_pt): Likewise.
13056 (parse_xml_btrace_conf_bts): Likewise.
13057 (parse_xml_btrace_conf_pt): Likewise.
13058 * memory-map.c (memory_map_start_memory): Likewise.
13059 (memory_map_start_property): Likewise.
13060 * osdata.c (osdata_start_osdata): Likewise.
13061 (osdata_start_item): Likewise.
13062 (osdata_start_column): Likewise.
13063 * remote.c (start_thread): Likewise.
13064 * solib-aix.c (library_list_start_library): Likewise.
13065 (library_list_start_list): Likewise.
13066 * solib-svr4.c (library_list_start_library): Likewise.
13067 (svr4_library_list_start_list): Likewise.
13068 * solib-target.c (library_list_start_segment): Likewise.
13069 (library_list_start_section): Likewise.
13070 (library_list_start_library): Likewise.
13071 (library_list_start_list): Likewise.
13072 * tracepoint.c (traceframe_info_start_memory): Likewise.
13073 (traceframe_info_start_tvar): Likewise.
13074 * xml-syscall.c (syscall_start_syscall): Likewise.
13075 * xml-tdesc.c (tdesc_start_target): Likewise.
13076 (tdesc_start_feature): Likewise.
13077 (tdesc_start_reg): Likewise.
13078 (tdesc_start_union): Likewise.
13079 (tdesc_start_struct): Likewise.
13080 (tdesc_start_flags): Likewise.
13081 (tdesc_start_enum): Likewise.
13082 (tdesc_start_field): Likewise.
13083 (tdesc_start_enum_value): Likewise.
13084 (tdesc_start_vector): Likewise.
13085
13086 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13087
13088 * extension.h (struct xmethod_worker) <clone>: Remove.
13089 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13090 Remove.
13091 (python_xmethod_worker::clone): Remove.
13092 * valops.c (find_overload_match): Use std::move instead of
13093 clone.
13094
13095 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13096
13097 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13098 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13099 <free_xmethod_worker_data>: Remove.
13100 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13101 <get_xmethod_arg_types>: Remove.
13102 <get_xmethod_result_type>: Remove.
13103 <invoke_xmethod>: Remove.
13104 * extension.c (new_xmethod_worker): Remove.
13105 (clone_xmethod_worker): Remove.
13106 (get_matching_xmethod_workers): Return void, pass std::vector by
13107 pointer.
13108 (get_xmethod_arg_types): Rename to...
13109 (xmethod_worker::get_arg_types): ... this, and adjust.
13110 (get_xmethod_result_type): Rename to...
13111 (xmethod_worker::get_result_type): ... this, and adjust.
13112 (invoke_xmethod): Remove.
13113 (free_xmethod_worker): Remove.
13114 (free_xmethod_worker_vec): Remove.
13115 * extension.h (enum ext_lang_rc): Move here from
13116 extension-priv.h.
13117 (struct xmethod_worker): Add constructor and destructor.
13118 <data>: Remove.
13119 <value>: Remove.
13120 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13121 virtual pure methods.
13122 <get_arg_types, get_result_type>: New methods.
13123 (xmethod_worker_ptr): Remove typedef.
13124 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13125 (xmethod_worker_vec): Remove typedef.
13126 (xmethod_worker_up): New typedef.
13127 (invoke_xmethod): Remove.
13128 (clone_xmethod_worker): Remove.
13129 (free_xmethod_worker): Remove.
13130 (free_xmethod_worker_vec): Remove.
13131 (get_xmethod_arg_types): Remove.
13132 (get_xmethod_result_type): Remove.
13133 * valops.c (find_method_list): Use std::vector, don't use
13134 intermediate vector.
13135 (value_find_oload_method_list): Use std::vector.
13136 (find_overload_match): Use std::vector.
13137 (find_oload_champ): Use std::vector.
13138 * value.c (value_free): Use operator delete.
13139 (value_of_xmethod): Rename to...
13140 (value_from_xmethod): ... this. Don't assign
13141 xmethod_worker::value, take rvalue-reference.
13142 (result_type_of_xmethod): Adjust.
13143 (call_xmethod): Adjust.
13144 * value.h: Include extension.h.
13145 (struct xmethod_worker): Don't forward-declare.
13146 (value_of_xmethod): Rename to...
13147 (value_from_xmethod): ... this, take rvalue-reference.
13148 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13149 (struct python_xmethod_worker): ... this, add constructor and
13150 destructor.
13151 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13152 (gdbpy_free_xmethod_worker_data): Rename to...
13153 (python_xmethod_worker::~python_xmethod_worker): ... this and
13154 adjust.
13155 (gdbpy_clone_xmethod_worker_data): Rename to...
13156 (python_xmethod_worker::clone): ... this and adjust.
13157 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13158 temporary vector.
13159 (gdbpy_get_xmethod_arg_types): Rename to...
13160 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13161 (gdbpy_get_xmethod_result_type): Rename to...
13162 (python_xmethod_worker::do_get_result_type): ... this and
13163 adjust.
13164 (gdbpy_invoke_xmethod): Rename to...
13165 (python_xmethod_worker::invoke): ... this and adjust.
13166 (new_python_xmethod_worker): Rename to...
13167 (python_xmethod_worker::python_xmethod_worker): ... this and
13168 adjust.
13169 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13170 Remove.
13171 (gdbpy_free_xmethod_worker_data): Remove.
13172 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13173 (gdbpy_get_xmethod_arg_types): Remove.
13174 (gdbpy_get_xmethod_result_type): Remove.
13175 (gdbpy_invoke_xmethod): Remove.
13176 * python/python.c (python_extension_ops): Remove obsolete
13177 callbacks.
13178
13179 2018-01-05 Pedro Alves <palves@redhat.com>
13180
13181 PR gdb/18653
13182 * common/signals-state-save-restore.c
13183 (save_original_signals_state): New parameter 'quiet'. Warn if we
13184 find a custom handler preinstalled, instead of internal erroring.
13185 But only warn if !quiet.
13186 * common/signals-state-save-restore.h
13187 (save_original_signals_state): New parameter 'quiet'.
13188 * main.c (captured_main_1): Move save_original_signals_state call
13189 after option handling, and pass QUIET.
13190
13191 2018-01-05 Pedro Alves <palves@redhat.com>
13192
13193 * spu-tdep.c (spu_catch_start): Pass
13194 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13195
13196 2018-01-05 Pedro Alves <palves@redhat.com>
13197
13198 PR gdb/22670
13199 * ada-lang.c (literal_symbol_name_matcher): New function.
13200 (ada_get_symbol_name_matcher): Use it for
13201 symbol_name_match_type::SEARCH_NAME.
13202 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13203 it down instead of assuming symbol_name_match_type::FULL.
13204 * block.h (block_lookup_symbol): New parameter 'match_type'.
13205 * c-valprint.c (print_unpacked_pointer): Use
13206 lookup_symbol_search_name instead of lookup_symbol.
13207 * compile/compile-object-load.c (get_out_value_type): Pass down
13208 symbol_name_match_type::SEARCH_NAME.
13209 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13210 symbol_name_match_type::FULL.
13211 * cp-support.c (cp_get_symbol_name_matcher): Handle
13212 symbol_name_match_type::SEARCH_NAME.
13213 * infrun.c (insert_exception_resume_breakpoint): Use
13214 lookup_symbol_search_name.
13215 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13216 * psymtab.c (maintenance_check_psymtabs): Use
13217 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13218 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13219 SYMBOL_SEARCH_NAME.
13220 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13221 if symbol_name_match_type::SEARCH_NAME.
13222 (lookup_symbol_in_language): Pass down
13223 symbol_name_match_type::FULL.
13224 (lookup_symbol_search_name): New.
13225 (lookup_language_this): Pass down
13226 symbol_name_match_type::SEARCH_NAME.
13227 (lookup_symbol_aux, lookup_local_symbol): New parameter
13228 'match_type'. Pass it down.
13229 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13230 (lookup_symbol_search_name): New declaration.
13231 (lookup_symbol_in_block): New 'match_type' parameter.
13232
13233 2018-01-05 Pedro Alves <palves@redhat.com>
13234
13235 PR gdb/22670
13236 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13237 ada_lookup_symbol.
13238 (ada_lookup_symbol): Reimplement in terms of
13239 ada_lookup_symbol_list, bits factored out from
13240 ada_lookup_encoded_symbol.
13241
13242 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13243
13244 * ada-exp.y (write_object_renaming): When subscripting an array
13245 using a symbol as the index, pass the block in call to
13246 ada_lookup_encoded_symbol when looking that symbol up.
13247
13248 2018-01-05 Jerome Guitton <guitton@adacore.com>
13249
13250 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13251 TYPE_INDEX_TYPE.
13252
13253 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13254
13255 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13256 the case where VALUE_LVAL (val0) is not lval_memory.
13257
13258 2018-01-05 Xavier Roirand <roirand@adacore.com>
13259
13260 * ada-valprint.c (print_optional_low_bound): Handle
13261 character-indexed array printing like boolean-indexed array
13262 printing.
13263
13264 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13265
13266 * NEWS: Create a new section for the next release branch.
13267 Rename the section of the current branch, now that it has
13268 been cut.
13269
13270 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13271
13272 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13273 * version.in: Bump version to 8.1.50.DATE-git.
13274
13275 2018-01-03 Xavier Roirand <roirand@adacore.com>
13276
13277 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13278 Add field.
13279 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13280 Add field.
13281 (default_exception_support_info) <catch_handlers_sym>: Add field.
13282 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13283 (ada_exception_name_addr_1): Add "catch handlers" handling.
13284 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13285 Update all callers.
13286 (create_excep_cond_exprs) <ex>: Add parameter.
13287 (re_set_exception): Update create_excep_cond_exprs call.
13288 (print_it_exception, print_one_exception, print_mention_exception)
13289 (print_recreate_exception): Add "catch handler" handling.
13290 (allocate_location_catch_handlers, re_set_catch_handlers)
13291 (check_status_catch_handlers, print_it_catch_handlers)
13292 (print_one_catch_handlers, print_mention_catch_handlers)
13293 (print_recreate_catch_handlers): New function.
13294 (catch_handlers_breakpoint_ops): New variable.
13295 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13296 Add parameter. Add "catch handler" handling.
13297 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13298 Add "catch handler" handling.
13299 (ada_exception_catchpoint_cond_string): Add "catch handler"
13300 handling.
13301 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13302 call.
13303 (catch_ada_handlers_command): New function.
13304 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13305 operations structure.
13306 (_initialize_ada_language): Add "catch handlers" command entry.
13307 * NEWS: Document "catch handlers" feature.
13308
13309 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13310
13311 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13312 account when creating the array type of the slice.
13313 (ada_value_slice): Likewise.
13314
13315 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13316
13317 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13318 New enum value.
13319 (create_array_type_with_stride): Add byte_stride_prop parameter.
13320 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13321 New parameter. Update all callers in this file.
13322 (array_type_has_dynamic_stride): New function.
13323 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13324 of arrays with dynamic byte strides.
13325 * dwarf2read.c (read_array_type): Add support for dynamic
13326 DW_AT_byte_stride attributes.
13327
13328 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13329
13330 * dwarf2read.c (read_unspecified_type): Treat
13331 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13332
13333 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13334
13335 Update copyright year range in all GDB files.
13336
13337 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13338
13339 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13340 and gdb/testsuite/gdb.base/step-line.c.
13341
13342 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13343
13344 * copyright.py (main): Dump the contents of
13345 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13346 even if BY_HAND is empty.
13347
13348 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13349
13350 * top.c (print_gdb_version): Update Copyright year in version
13351 message.
13352
13353 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13354
13355 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13356
13357 For older changes see ChangeLog-2017.
13358 \f
13359 Local Variables:
13360 mode: change-log
13361 left-margin: 8
13362 fill-column: 74
13363 version-control: never
13364 coding: utf-8
13365 End:
This page took 0.310911 seconds and 4 git commands to generate.