Darwin: set startup-with-shell to off on Sierra and later.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-11 Xavier Roirand <roirand@adacore.com>
2
3 * darwin-nat.c (should_disable_startup_with_shell):
4 New function.
5 (darwin_nat_target::create_inferior): Add call.
6
7 2018-09-11 Xavier Roirand <roirand@adacore.com>
8
9 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
10 inf_port, msg_state>: Initialize.
11 (struct darwin_thread_info) <signaled, single_step>: Change
12 type and initialize.
13 (struct darwin_thread_info) <event>: Initialize.
14
15 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
16
17 PR gdb/23555
18 PR gdb/23558
19 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
20 guesses.
21
22 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
23
24 Revert:
25 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
26
27 PR gdb/23555
28 PR gdb/23558
29 * gnulib/aclocal.m4: Regenerate.
30 * gnulib/config.in: Regenerate.
31 * gnulib/configure: Regenerate.
32 * gnulib/import/Makefile.am: Update.
33 * gnulib/import/Makefile.in: Update.
34 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
35 * gnulib/import/_Noreturn.h: ... this.
36 * gnulib/import/alloca.in.h: Update.
37 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
38 * gnulib/import/arg-nonnull.h: ... this.
39 * gnulib/import/assure.h: Update.
40 * gnulib/import/at-func.c: Update.
41 * gnulib/import/basename-lgpl.c: Update.
42 * gnulib/import/extra/snippet/c++defs.h: Rename to...
43 * gnulib/import/c++defs.h: ... this.
44 * gnulib/import/canonicalize-lgpl.c: Update.
45 * gnulib/import/cdefs.h: Update.
46 * gnulib/import/chdir-long.c: Update.
47 * gnulib/import/chdir-long.h: Update.
48 * gnulib/import/cloexec.c: Update.
49 * gnulib/import/cloexec.h: Update.
50 * gnulib/import/close.c: Update.
51 * gnulib/import/closedir.c: Update.
52 * gnulib/import/config.charset: Update.
53 * gnulib/import/dirent-private.h: Update.
54 * gnulib/import/dirent.in.h: Update.
55 * gnulib/import/dirfd.c: Update.
56 * gnulib/import/dirname-lgpl.c: Update.
57 * gnulib/import/dirname.h: Update.
58 * gnulib/import/dosname.h: Update.
59 * gnulib/import/dup-safer-flag.c: Update.
60 * gnulib/import/dup-safer.c: Update.
61 * gnulib/import/dup.c: Update.
62 * gnulib/import/dup2.c: Update.
63 * gnulib/import/errno.in.h: Update.
64 * gnulib/import/error.c: Update.
65 * gnulib/import/error.h: Update.
66 * gnulib/import/exitfail.c: Update.
67 * gnulib/import/exitfail.h: Update.
68 * gnulib/import/extra/update-copyright: Update.
69 * gnulib/import/fchdir.c: Update.
70 * gnulib/import/fcntl.c: Update.
71 * gnulib/import/fcntl.in.h: Update.
72 * gnulib/import/fd-hook.c: Update.
73 * gnulib/import/fd-hook.h: Update.
74 * gnulib/import/fd-safer-flag.c: Update.
75 * gnulib/import/fd-safer.c: Update.
76 * gnulib/import/fdopendir.c: Update.
77 * gnulib/import/filename.h: Update.
78 * gnulib/import/filenamecat-lgpl.c: Update.
79 * gnulib/import/filenamecat.h: Update.
80 * gnulib/import/flexmember.h: Update.
81 * gnulib/import/float+.h: Update.
82 * gnulib/import/float.c: Update.
83 * gnulib/import/float.in.h: Update.
84 * gnulib/import/fnmatch.c: Update.
85 * gnulib/import/fnmatch.in.h: Update.
86 * gnulib/import/fnmatch_loop.c: Update.
87 * gnulib/import/fpucw.h: Update.
88 * gnulib/import/frexp.c: Update.
89 * gnulib/import/frexpl.c: Update.
90 * gnulib/import/fstat.c: Update.
91 * gnulib/import/fstatat.c: Update.
92 * gnulib/import/getcwd-lgpl.c: Update.
93 * gnulib/import/getcwd.c: Update.
94 * gnulib/import/getdtablesize.c: Update.
95 * gnulib/import/getlogin_r.c: Update.
96 * gnulib/import/getprogname.c: Update.
97 * gnulib/import/getprogname.h: Update.
98 * gnulib/import/gettext.h: Update.
99 * gnulib/import/gettimeofday.c: Update.
100 * gnulib/import/glob-libc.h: Update.
101 * gnulib/import/glob.c: Update.
102 * gnulib/import/glob.in.h: Update.
103 * gnulib/import/glob_internal.h: Update.
104 * gnulib/import/glob_pattern_p.c: Update.
105 * gnulib/import/globfree.c: Update.
106 * gnulib/import/hard-locale.c: Update.
107 * gnulib/import/hard-locale.h: Update.
108 * gnulib/import/intprops.h: Update.
109 * gnulib/import/inttypes.in.h: Update.
110 * gnulib/import/isnan.c: Update.
111 * gnulib/import/isnand-nolibm.h: Update.
112 * gnulib/import/isnand.c: Update.
113 * gnulib/import/isnanl-nolibm.h: Update.
114 * gnulib/import/isnanl.c: Update.
115 * gnulib/import/itold.c: Update.
116 * gnulib/import/libc-config.h: Update.
117 * gnulib/import/limits.in.h: Update.
118 * gnulib/import/localcharset.c: Update.
119 * gnulib/import/localcharset.h: Update.
120 * gnulib/import/localtime-buffer.c: Update.
121 * gnulib/import/localtime-buffer.h: Update.
122 * gnulib/import/lstat.c: Update.
123 * gnulib/import/m4/00gnulib.m4: Update.
124 * gnulib/import/m4/__inline.m4: Update.
125 * gnulib/import/m4/absolute-header.m4: Update.
126 * gnulib/import/m4/alloca.m4: Update.
127 * gnulib/import/m4/builtin-expect.m4: Update.
128 * gnulib/import/m4/canonicalize.m4: Update.
129 * gnulib/import/m4/chdir-long.m4: Update.
130 * gnulib/import/m4/close.m4: Update.
131 * gnulib/import/m4/closedir.m4: Update.
132 * gnulib/import/m4/configmake.m4: Update.
133 * gnulib/import/m4/d-ino.m4: Update.
134 * gnulib/import/m4/d-type.m4: Update.
135 * gnulib/import/m4/dirent_h.m4: Update.
136 * gnulib/import/m4/dirfd.m4: Update.
137 * gnulib/import/m4/dirname.m4: Update.
138 * gnulib/import/m4/double-slash-root.m4: Update.
139 * gnulib/import/m4/dup.m4: Update.
140 * gnulib/import/m4/dup2.m4: Update.
141 * gnulib/import/m4/eealloc.m4: Update.
142 * gnulib/import/m4/environ.m4: Update.
143 * gnulib/import/m4/errno_h.m4: Update.
144 * gnulib/import/m4/error.m4: Update.
145 * gnulib/import/m4/exponentd.m4: Update.
146 * gnulib/import/m4/exponentl.m4: Update.
147 * gnulib/import/m4/extensions.m4: Update.
148 * gnulib/import/m4/extern-inline.m4: Update.
149 * gnulib/import/m4/fchdir.m4: Update.
150 * gnulib/import/m4/fcntl-o.m4: Update.
151 * gnulib/import/m4/fcntl.m4: Update.
152 * gnulib/import/m4/fcntl_h.m4: Update.
153 * gnulib/import/m4/fdopendir.m4: Update.
154 * gnulib/import/m4/filenamecat.m4: Update.
155 * gnulib/import/m4/flexmember.m4: Update.
156 * gnulib/import/m4/float_h.m4: Update.
157 * gnulib/import/m4/fnmatch.m4: Update.
158 * gnulib/import/m4/fnmatch_h.m4: Update.
159 * gnulib/import/m4/fpieee.m4: Update.
160 * gnulib/import/m4/frexp.m4: Update.
161 * gnulib/import/m4/frexpl.m4: Update.
162 * gnulib/import/m4/fstat.m4: Update.
163 * gnulib/import/m4/fstatat.m4: Update.
164 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
165 * gnulib/import/m4/getcwd-path-max.m4: Update.
166 * gnulib/import/m4/getcwd.m4: Update.
167 * gnulib/import/m4/getdtablesize.m4: Update.
168 * gnulib/import/m4/getlogin.m4: Update.
169 * gnulib/import/m4/getlogin_r.m4: Update.
170 * gnulib/import/m4/getpagesize.m4: Update.
171 * gnulib/import/m4/getprogname.m4: Update.
172 * gnulib/import/m4/gettimeofday.m4: Update.
173 * gnulib/import/m4/glibc21.m4: Update.
174 * gnulib/import/m4/glob.m4: Update.
175 * gnulib/import/m4/glob_h.m4: Update.
176 * gnulib/import/m4/gnulib-cache.m4: Update.
177 * gnulib/import/m4/gnulib-common.m4: Update.
178 * gnulib/import/m4/gnulib-comp.m4: Update.
179 * gnulib/import/m4/gnulib-tool.m4: Update.
180 * gnulib/import/m4/hard-locale.m4: Update.
181 * gnulib/import/m4/include_next.m4: Update.
182 * gnulib/import/m4/inttypes-pri.m4: Update.
183 * gnulib/import/m4/inttypes.m4: Update.
184 * gnulib/import/m4/isnand.m4: Update.
185 * gnulib/import/m4/isnanl.m4: Update.
186 * gnulib/import/m4/largefile.m4: Update.
187 * gnulib/import/m4/limits-h.m4: Update.
188 * gnulib/import/m4/localcharset.m4: Update.
189 * gnulib/import/m4/locale-fr.m4: Update.
190 * gnulib/import/m4/locale-ja.m4: Update.
191 * gnulib/import/m4/locale-zh.m4: Update.
192 * gnulib/import/m4/localtime-buffer.m4: Update.
193 * gnulib/import/m4/longlong.m4: Update.
194 * gnulib/import/m4/lstat.m4: Update.
195 * gnulib/import/m4/malloc.m4: Update.
196 * gnulib/import/m4/malloca.m4: Update.
197 * gnulib/import/m4/math_h.m4: Update.
198 * gnulib/import/m4/mbrtowc.m4: Update.
199 * gnulib/import/m4/mbsinit.m4: Update.
200 * gnulib/import/m4/mbsrtowcs.m4: Update.
201 * gnulib/import/m4/mbstate_t.m4: Update.
202 * gnulib/import/m4/memchr.m4: Update.
203 * gnulib/import/m4/memmem.m4: Update.
204 * gnulib/import/m4/mempcpy.m4: Update.
205 * gnulib/import/m4/memrchr.m4: Update.
206 * gnulib/import/m4/mkdir.m4: Update.
207 * gnulib/import/m4/mkstemp.m4: Update.
208 * gnulib/import/m4/mmap-anon.m4: Update.
209 * gnulib/import/m4/mode_t.m4: Update.
210 * gnulib/import/m4/msvc-inval.m4: Update.
211 * gnulib/import/m4/msvc-nothrow.m4: Update.
212 * gnulib/import/m4/multiarch.m4: Update.
213 * gnulib/import/m4/nocrash.m4: Update.
214 * gnulib/import/m4/off_t.m4: Update.
215 * gnulib/import/m4/onceonly.m4: Update.
216 * gnulib/import/m4/open-cloexec.m4: Update.
217 * gnulib/import/m4/open.m4: Update.
218 * gnulib/import/m4/openat.m4: Update.
219 * gnulib/import/m4/opendir.m4: Update.
220 * gnulib/import/m4/pathmax.m4: Update.
221 * gnulib/import/m4/rawmemchr.m4: Update.
222 * gnulib/import/m4/readdir.m4: Update.
223 * gnulib/import/m4/readlink.m4: Update.
224 * gnulib/import/m4/realloc.m4: Update.
225 * gnulib/import/m4/rename.m4: Update.
226 * gnulib/import/m4/rewinddir.m4: Update.
227 * gnulib/import/m4/rmdir.m4: Update.
228 * gnulib/import/m4/save-cwd.m4: Update.
229 * gnulib/import/m4/secure_getenv.m4: Update.
230 * gnulib/import/m4/setenv.m4: Update.
231 * gnulib/import/m4/signal_h.m4: Update.
232 * gnulib/import/m4/ssize_t.m4: Update.
233 * gnulib/import/m4/stat-time.m4: Update.
234 * gnulib/import/m4/stat.m4: Update.
235 * gnulib/import/m4/std-gnu11.m4: Update.
236 * gnulib/import/m4/stdbool.m4: Update.
237 * gnulib/import/m4/stddef_h.m4: Update.
238 * gnulib/import/m4/stdint.m4: Update.
239 * gnulib/import/m4/stdio_h.m4: Update.
240 * gnulib/import/m4/stdlib_h.m4: Update.
241 * gnulib/import/m4/strchrnul.m4: Update.
242 * gnulib/import/m4/strdup.m4: Update.
243 * gnulib/import/m4/strerror.m4: Update.
244 * gnulib/import/m4/string_h.m4: Update.
245 * gnulib/import/m4/strstr.m4: Update.
246 * gnulib/import/m4/strtok_r.m4: Update.
247 * gnulib/import/m4/sys_socket_h.m4: Update.
248 * gnulib/import/m4/sys_stat_h.m4: Update.
249 * gnulib/import/m4/sys_time_h.m4: Update.
250 * gnulib/import/m4/sys_types_h.m4: Update.
251 * gnulib/import/m4/tempname.m4: Update.
252 * gnulib/import/m4/time_h.m4: Update.
253 * gnulib/import/m4/unistd-safer.m4: Update.
254 * gnulib/import/m4/unistd_h.m4: Update.
255 * gnulib/import/m4/warn-on-use.m4: Update.
256 * gnulib/import/m4/wchar_h.m4: Update.
257 * gnulib/import/m4/wchar_t.m4: Update.
258 * gnulib/import/m4/wctype_h.m4: Update.
259 * gnulib/import/m4/wint_t.m4: Update.
260 * gnulib/import/malloc.c: Update.
261 * gnulib/import/malloc/scratch_buffer.h: Update.
262 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
263 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
264 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
265 * gnulib/import/malloca.c: Update.
266 * gnulib/import/malloca.h: Update.
267 * gnulib/import/malloca.valgrind: Update.
268 * gnulib/import/math.in.h: Update.
269 * gnulib/import/mbrtowc.c: Update.
270 * gnulib/import/mbsinit.c: Update.
271 * gnulib/import/mbsrtowcs-impl.h: Update.
272 * gnulib/import/mbsrtowcs-state.c: Update.
273 * gnulib/import/mbsrtowcs.c: Update.
274 * gnulib/import/memchr.c: Update.
275 * gnulib/import/memmem.c: Update.
276 * gnulib/import/mempcpy.c: Update.
277 * gnulib/import/memrchr.c: Update.
278 * gnulib/import/mkdir.c: Update.
279 * gnulib/import/mkstemp.c: Update.
280 * gnulib/import/msvc-inval.c: Update.
281 * gnulib/import/msvc-inval.h: Update.
282 * gnulib/import/msvc-nothrow.c: Update.
283 * gnulib/import/msvc-nothrow.h: Update.
284 * gnulib/import/open.c: Update.
285 * gnulib/import/openat-die.c: Update.
286 * gnulib/import/openat-priv.h: Update.
287 * gnulib/import/openat-proc.c: Update.
288 * gnulib/import/openat.c: Update.
289 * gnulib/import/openat.h: Update.
290 * gnulib/import/opendir.c: Update.
291 * gnulib/import/pathmax.h: Update.
292 * gnulib/import/pipe-safer.c: Update.
293 * gnulib/import/rawmemchr.c: Update.
294 * gnulib/import/readdir.c: Update.
295 * gnulib/import/readlink.c: Update.
296 * gnulib/import/realloc.c: Update.
297 * gnulib/import/ref-add.sin: Update.
298 * gnulib/import/ref-del.sin: Update.
299 * gnulib/import/rename.c: Update.
300 * gnulib/import/rewinddir.c: Update.
301 * gnulib/import/rmdir.c: Update.
302 * gnulib/import/same-inode.h: Update.
303 * gnulib/import/save-cwd.c: Update.
304 * gnulib/import/save-cwd.h: Update.
305 * gnulib/import/scratch_buffer.h: Update.
306 * gnulib/import/secure_getenv.c: Update.
307 * gnulib/import/setenv.c: Update.
308 * gnulib/import/signal.in.h: Update.
309 * gnulib/import/stat-time.c: Update.
310 * gnulib/import/stat-time.h: Update.
311 * gnulib/import/stat-w32.c: Update.
312 * gnulib/import/stat-w32.h: Update.
313 * gnulib/import/stat.c: Update.
314 * gnulib/import/stdbool.in.h: Update.
315 * gnulib/import/stddef.in.h: Update.
316 * gnulib/import/stdint.in.h: Update.
317 * gnulib/import/stdio.in.h: Update.
318 * gnulib/import/stdlib.in.h: Update.
319 * gnulib/import/str-two-way.h: Update.
320 * gnulib/import/strchrnul.c: Update.
321 * gnulib/import/strdup.c: Update.
322 * gnulib/import/streq.h: Update.
323 * gnulib/import/strerror-override.c: Update.
324 * gnulib/import/strerror-override.h: Update.
325 * gnulib/import/strerror.c: Update.
326 * gnulib/import/string.in.h: Update.
327 * gnulib/import/stripslash.c: Update.
328 * gnulib/import/strnlen1.c: Update.
329 * gnulib/import/strnlen1.h: Update.
330 * gnulib/import/strstr.c: Update.
331 * gnulib/import/strtok_r.c: Update.
332 * gnulib/import/sys_stat.in.h: Update.
333 * gnulib/import/sys_time.in.h: Update.
334 * gnulib/import/sys_types.in.h: Update.
335 * gnulib/import/tempname.c: Update.
336 * gnulib/import/tempname.h: Update.
337 * gnulib/import/time.in.h: Update.
338 * gnulib/import/unistd--.h: Update.
339 * gnulib/import/unistd-safer.h: Update.
340 * gnulib/import/unistd.in.h: Update.
341 * gnulib/import/unsetenv.c: Update.
342 * gnulib/import/verify.h: Update.
343 * gnulib/import/extra/snippet/warn-on-use.h: Update.
344 * gnulib/import/wchar.in.h: Update.
345 * gnulib/import/wctype.in.h: Update.
346 * gnulib/import/xalloc-oversized.h: Update.
347 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
348 "53e2c179f26a890fa6685af4b6c1397ee370433b".
349
350 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
351
352 * record-btrace.c (get_thread_current_frame): Remove
353 old_inferior_ptid.
354
355 2018-09-10 Jerome Guitton <guitton@adacore.com>
356
357 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
358 with check_tag to 1 if and only if the type is tagged and the
359 component being searched cannot been found in the current
360 view. Otherwise, always call ada_to_fixed_type with
361 check_tag to 0.
362
363 2018-09-10 Xavier Roirand <roirand@adacore.com>
364
365 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
366 declaration.
367 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
368 * ada-varobj.c (ada_varobj_get_number_of_children,
369 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
370
371 2018-09-10 Xavier Roirand <roirand@adacore.com>
372
373 * ada-valprint.c (ada_value_print): Use type instead of
374 enclosing type.
375
376 2018-09-10 Xavier Roirand <roirand@adacore.com>
377
378 * ada-lang.c (ada_value_subscript): Handle case when parameter is
379 an array of access to unconstrained array.
380
381 2018-09-10 Xavier Roirand <roirand@adacore.com>
382
383 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
384 (ada_check_typedef): Use it.
385
386 2018-09-10 Xavier Roirand <roirand@adacore.com>
387
388 * ada-varobj.c (ada_varobj_describe_struct_child)
389 (ada_varobj_describe_child): Handle union case like struct one.
390
391 2018-09-10 Tom Tromey <tom@tromey.com>
392
393 PR python/18380:
394 * python/python.c (_initialize_python): Make example in "python"
395 help work in Python 3.
396
397 2018-09-10 Eli Zaretskii <eliz@gnu.org>
398
399 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
400 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
401 $(EXEEXT) to the script, as it is not a program.
402
403 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
404
405 * python/py-prettyprint.c (pretty_print_one_value): Return
406 gdbpy_ref<>.
407 (print_string_repr): Adjust.
408 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
409 * python/python-internal.h (apply_varobj_pretty_printer): Return
410 gdbpy_ref<>.
411 * varobj.c (varobj_value_get_print_value): Adjust.
412
413 2018-09-08 Tom Tromey <tom@tromey.com>
414
415 PR python/16047:
416 * python/py-prettyprint.c (pretty_print_one_value): Check for
417 to_string method.
418
419 2018-09-08 Joel Brobecker <brobecker@adacore.com>
420
421 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
422 replace_operator_with_call.
423
424 2018-09-08 Joel Brobecker <brobecker@adacore.com>
425
426 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
427
428 2018-09-08 Joel Brobecker <brobecker@adacore.com>
429
430 * ada-typeprint.c (print_range): Print the bounds using TYPE
431 rather than its TYPE_TARGET_TYPE.
432
433 2018-09-08 Joel Brobecker <brobecker@adacore.com>
434
435 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
436 call to ada_to_fixed_value_create.
437
438 2018-09-08 Jerome Guitton <guitton@adacore.com>
439
440 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
441
442 2018-09-08 Joel Brobecker <brobecker@adacore.com>
443
444 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
445 by calls to error.
446
447 2018-09-08 Joel Brobecker <brobecker@adacore.com>
448
449 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
450 Move update of loop variable "fi".
451
452 2018-09-08 Joel Brobecker <brobecker@adacore.com>
453
454 * ada-lang.c (value_assign_to_component): In the case of
455 big-endian targets, extract the bits of the given VAL
456 using an src_offset of zero if container is not a scalar.
457
458 2018-09-06 Simon Ser <contact@emersion.fr>
459
460 PR gdb/23105
461 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
462 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
463 * fbsd-tdep.c (fbsd_make_note_desc): New.
464 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
465 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
466 * target.h (enum target_object) Add FreeBSD-specific
467 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
468
469 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
470
471 * compile/compile-c.h (generate_c_for_variable_locations):
472 Change reference to pointer.
473 * compile/compile-c-support.c (compile_program) <compute>:
474 Likewise.
475 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
476 (generate_c_for_for_one_variable): Likewise
477 (generate_c_for_variable_locations): Likewise
478 * compile/compile-c-types.c (compile_c_instance::convert_type):
479 Likewise
480 * compile/compile-cplus-symbols.c (convert_one_symbol):
481 std::move the scope passed to enter_scope.
482 * compile/compile-cplus-types.c
483 (compile_cplus_instance::enter_scope): Make parameter
484 rvalue-reference.
485 (compile_cplus_instance::new_scope): Change reference to
486 pointer.
487 (compile_cplus_instance::convert_type): Likewise
488 (compile_cplus_convert_typedef): std::move the scope passed to
489 enter_scope.
490 (compile_cplus_convert_struct_or_union): Likewise.
491 (compile_cplus_convert_enum): Likewise.
492 (compile_cplus_convert_namespace): Likewise.
493 * compile/compile-cplus.h (compile_cplus_instance)
494 <enter_scope>: Make parameter rvalue-reference.
495 * compile/compile-internal.h (compile_instance)
496 <get_cached_type>: Likewise
497 * compile/compile-loc2c.c (push): Likewise
498 (pushf): Likewise
499 (unary): Likewise
500 (binary): Likewise
501 (print_label): Likewise
502 (pushf_register_address): Likewise
503 (pushf_register): Likewise
504 (do_compile_dwarf_expr_to_c): Likewise
505 (compile_dwarf_expr_to_c): Likewise
506 (compile_dwarf_bounds_to_c): Likewise
507 * compile/compile.c (compile_instance::get_cached_type):
508 Likewise
509 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
510 (compile_dwarf_bounds_to_c): Likewise
511 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
512 (dwarf2_compile_property_to_c): Likewise
513 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
514 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
515 Likewise
516
517 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
518
519 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
520 * tui/tui-data.c (init_content_element): Don't initialize it.
521
522 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
523
524 * tui/tui-data.h (struct tui_win_info)
525 <detail::opaque>: Remove.
526 * tui/tui-data.c (init_win_info): Remove assignment.
527
528 2018-09-05 Tom Tromey <tom@tromey.com>
529
530 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
531 -Wformat-nonliteral.
532 * target-float.c (host_float_ops<T>::to_string)
533 (host_float_ops<T>::from_string): Use
534 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
535 * configure: Rebuild.
536
537 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
538
539 * printcmd.c (printf_c_string): Use
540 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
541 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
542
543 2018-09-05 Tom Tromey <tom@tromey.com>
544
545 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
546
547 2018-09-05 Tom de Vries <tdevries@suse.de>
548
549 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
550 with resolve_abstract_p == true.
551 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
552 defaulting to false. Propagate resolve_abstract_p to
553 dwarf2_fetch_die_loc_sect_off.
554 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
555 parameter, defaulting to false.
556 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
557 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
558 parameter.
559 * dwarf2read.h (struct die_info): Forward-declare.
560 (die_info_ptr): New typedef.
561 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
562
563 2018-09-05 Joel Brobecker <brobecker@adacore.com>
564
565 GDB 8.2 released.
566
567 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
568 Pedro Alves <palves@redhat.com>
569
570 * gnulib/Makefile.in (aclocal_m4_deps): Move to
571 "aclocal-m4-deps.mk". Include file here.
572 $(srcdir)/aclocal.m4: Add "configure.ac".
573 * gnulib/aclocal-m4-deps.mk: New file.
574 * gnulib/update-gnulib.sh: Automatically update
575 "aclocal-m4-deps.mk".
576
577 2018-09-04 Tom Tromey <tom@tromey.com>
578
579 * configure: Rebuild.
580 * configure.ac: Remove multi-ice code.
581
582 2018-09-04 Tom Tromey <tom@tromey.com>
583
584 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
585 (ada-exp.o): Update.
586
587 2018-09-04 Tom Tromey <tom@tromey.com>
588
589 * Makefile.in (printcmd.o, target-float.o): Remove.
590 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
591
592 2018-09-04 Tom Tromey <tom@tromey.com>
593
594 * gnulib/Makefile.in: Remove obsolete comment.
595 * Makefile.in: Remove obsolete comment.
596
597 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
598
599 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
600 line with '+'.
601
602 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
603
604 * riscv-tdep.c: Add 'prologue-value.h' include.
605 (struct riscv_unwind_cache): New struct.
606 (riscv_debug_unwinder): New global.
607 (riscv_scan_prologue): Update arguments, capture register details
608 from prologue scan.
609 (riscv_skip_prologue): Reformat arguments line, move end of
610 prologue calculation into riscv_scan_prologue.
611 (riscv_frame_cache): Update return type, create
612 riscv_unwind_cache, scan the prologue, and fill in remaining cache
613 details.
614 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
615 (riscv_frame_prev_register): Use the trad_frame within the
616 riscv_unwind_cache.
617 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
618 flag.
619
620 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
621
622 * trad-frame.h (trad_frame_set_realreg): Declare.
623 (trad_frame_set_addr): Declare.
624 * trad-frame.c (trad_frame_set_realreg): Define new function.
625 (trad_frame_set_addr): Define new function.
626 (trad_frame_set_reg_realreg): Use new function.
627 (trad_frame_set_reg_addr): Use new function.
628
629 2018-09-01 Keith Seitz <keiths@redhat.com>
630
631 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
632 pulongest instead of "%lld".
633 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
634 ATTRIBUTE_UNUSED.
635
636 2018-08-31 Tom Tromey <tom@tromey.com>
637
638 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
639 variant part type.
640
641 2018-08-31 Pedro Alves <palves@redhat.com>
642
643 * gdbarch.h: Regenerate.
644
645 2018-08-31 Pedro Alves <palves@redhat.com>
646
647 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
648 * target.h (Hardware watchpoint interfaces): Describe
649 continuable/steppable/non-steppable watchpoints.
650 * gdbarch.h, gdbarch.c: Regenerate.
651
652 2018-08-31 Pedro Alves <palves@redhat.com>
653
654 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
655 Delete.
656 * s390-linux-nat.c
657 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
658 * target.h (target_ops::have_continuable_watchpoint): Delete.
659 (target_have_continuable_watchpoint): Delete.
660 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
661 * target-delegates.c: Regenerate.
662
663 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
664
665 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
666 the files present in "gnulib/import/m4/".
667
668 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
669
670 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
671 c.sw, c.swsp, and c.sdsp.
672
673 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
674
675 * riscv-tdep.c (struct riscv_inferior_data): Delete.
676 (riscv_read_misa_reg): Don't cache value read into inferior data.
677 (riscv_new_inferior_data): Delete.
678 (riscv_inferior_data_cleanup): Delete.
679 (riscv_inferior_data): Delete.
680 (riscv_invalidate_inferior_data): Delete.
681 (_initialize_riscv_tdep): Remove initialisation of inferior data.
682
683 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
684
685 * compile/compile-cplus-types.c
686 (compile_cplus_instance::leave_scope): Take the address of scope
687 object.
688 (compile_cplus_instance::convert_qualified_base): Compare quals
689 to 0.
690
691 2018-08-30 Keith Seitz <keiths@redhat.com>
692
693 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
694 Use "%s" and host_address_to_string instead of "%p" in printf.
695
696 2018-08-29 Keith Seitz <keiths@redhat.com>
697
698 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
699 and compile-cplus-types.c.
700 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
701 * c-lang.c (cplus_language_defn): Set C++ compile functions.
702 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
703 Declare.
704 * compile/compile-c-support.c: Include compile-cplus.h.
705 (load_libcompile): Templatize.
706 (get_compile_context): "New" function.
707 (c_get_compile_context): Use get_compile_context.
708 (cplus_get_compile_context): New function.
709 (cplus_push_user_expression, cplus_pop_user_expression)
710 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
711 (cplus_compute_program): Define new structs/functions.
712 * compile/compile-cplus-symmbols.c: New file.
713 * compile/compile-cplus-types.c: New file.
714 * compile/compile-cplus.h: New file.
715 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
716 Declare.
717 * compile/compile-object-load.c (get_out_value_type): Use
718 strncmp_iw when comparing symbol names.
719 (compile_object_load): Add mst_bss and mst_data.
720 * compile/compile.c (_initialize_compile): Remove
721 -Wno-implicit-function-declaration from `compile_args'.
722 * compile/gcc-cp-plugin.h: New file.
723 * NEWS: Mention C++ compile support and new debug options.
724
725 2018-08-29 Keith Seitz <keiths@redhat.com>
726
727 * linespec.c (collect_info::add_symbol): Make virtual.
728 (struct symbol_searcher_collect_info): New struct.
729 (symbol_searcher::find_all_symbols): New method.
730 * symtab.h (class symbol_searcher): New class.
731
732 2018-08-29 Keith Seitz <keiths@redhat.com>
733
734 * linespec.c (struct linespec) <function_symbols, label_symbols>:
735 Change to vector of block_symbol. Update all users.
736 (struct collect_info) <symbols>: Likewise.
737 (collect_info::add_symbol): Take block_symbol as argument.
738 Update all callers.
739 (decode_compound_collector) <m_symbols>: Change type to vector
740 of block_symbol. Update all users.
741 (decode_compound_collector::operator ()): Change parameter type
742 to block_symbol.
743 (find_method, find_function_symbols, find_linespec_symbols)
744 (find_label_symbols_in_block, find_label_symbols): Change symbol
745 vectors to block_symbol vectors.
746 * symtab.h (symbol_found_callback_ftype): Change parameter type to
747 block_symbol.
748
749 2018-08-29 Keith Seitz <keiths@redhat.com>
750
751 * linespec.c (symbolp): Remove typedef and VEC definitions.
752 (bound_minimal_symbol_d): Likewise.
753
754 2018-08-29 Keith Seitz <keiths@redhat.com>
755
756 * linespec.c (decode_compound_collector::decode_compound_collector):
757 Remove initialization for `m_symtabs'.
758 (decode_compound_collector::release_symbols): Change return type
759 to std::vector. Update all callers.
760 (class decode_compound_collector) <m_symbols>: Change type to
761 std::vector.
762 (lookup_prefix_sym): Change return type to std::vector. Update all
763 callers.
764 (compare_symbols): Remove.
765 (std_compare_symbols): Rename to `compare_symbols'.
766 (find_method): Change `sym_classes' parameter to std::vector.
767 Update all callers. Use std::sort to sort sym_classes.
768 (find_linespec_symbols): Remove cleanup.
769
770 2018-08-29 Keith Seitz <keiths@redhat.com>
771
772 * linespec.c (struct linespec) <minimal_symbols>: Change type to
773 std::vector. Update all users.
774 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
775 (struct collect_info) <minimal_symbols>: Likewise.
776 (compare_msymbols): Return bool. Change parameters to const
777 bound_minimal_symbol references.
778 (find_method, find_function_symbols, find_linespec_symbols): Change
779 `minsyms' parameter to std::vector. Update all callers.
780
781 2018-08-29 Keith Seitz <keiths@redhat.com>
782
783 * linespec.c (struct linespec) <label_symbols>: Change type to
784 std::vector. Update all users.
785 (find_label_symbols_in_block): Change `result' parameter to
786 std::vector. Update all callers.
787 (find_label_symbols): Return std::vector. Update all callers.
788
789 2018-08-29 Keith Seitz <keiths@redhat.com>
790
791 * linespec.c (struct linespec) <function_symbols>: Change type to
792 std::vector. Update all users.
793 (struct collect_info) <function_symbols>: Likewise.
794 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
795 (std_compare_symbols): New function.
796 (find_method, find_function_symbols, find_linespec_symbols)
797 (find_label_symbols_in_block): Change `symbols' parameter to
798 std::vector. Update all callers.
799 (find_label_symbols): Likewise for `function_symbols' and
800 `label_funcs_ret'.
801
802 2018-08-29 Keith Seitz <keiths@redhat.com>
803
804 * linespec.c (symtab_vector_up): Define.
805 (struct linespec) <file_symtabs>: Change type to std::vector *.
806 Update all uses.
807 (struct collect_info) <file_symtabs>: Likewise.
808 (collect_symtabs_from_filename): Return symtab_vector_up.
809 Update all callers.
810 (decode_objc): Remove cleanup.
811 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
812 (symtab_collector::release_symtabs): Return symtab_vector_up.
813 Update all callers.
814 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
815 Update all users.
816 (collect_symtabs_from_filename, symtabs_from_filename): Return
817 symtab_vector_up. Update all callers.
818
819 2018-08-29 Tom Tromey <tom@tromey.com>
820
821 * csky-tdep.c (csky_analyze_prologue): Use
822 core_addr_to_string_nz.
823
824 2018-08-29 Tom Tromey <tom@tromey.com>
825
826 * windows-nat.c (struct xlate_exception) <them>: Change type to
827 DWORD.
828 (xlate): Fix formatting. Remove last entry.
829 (struct xlate_exception, xlate): Comment out.
830 (windows_nat_target::resume): Use ranged for.
831
832 2018-08-29 Jim Wilson <jimw@sifive.com>
833
834 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
835 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
836 of NT_PRFPREG.
837 (riscv_linux_nat_target::store_registers): Likewise.
838
839 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
840
841 PR gdb/23555
842 PR gdb/23558
843 * gnulib/aclocal.m4: Regenerate.
844 * gnulib/config.in: Regenerate.
845 * gnulib/configure: Regenerate.
846 * gnulib/import/Makefile.am: Update.
847 * gnulib/import/Makefile.in: Update.
848 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
849 * gnulib/import/_Noreturn.h: ... this.
850 * gnulib/import/alloca.in.h: Update.
851 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
852 * gnulib/import/arg-nonnull.h: ... this.
853 * gnulib/import/assure.h: Update.
854 * gnulib/import/at-func.c: Update.
855 * gnulib/import/basename-lgpl.c: Update.
856 * gnulib/import/extra/snippet/c++defs.h: Rename to...
857 * gnulib/import/c++defs.h: ... this.
858 * gnulib/import/canonicalize-lgpl.c: Update.
859 * gnulib/import/cdefs.h: Update.
860 * gnulib/import/chdir-long.c: Update.
861 * gnulib/import/chdir-long.h: Update.
862 * gnulib/import/cloexec.c: Update.
863 * gnulib/import/cloexec.h: Update.
864 * gnulib/import/close.c: Update.
865 * gnulib/import/closedir.c: Update.
866 * gnulib/import/config.charset: Update.
867 * gnulib/import/dirent-private.h: Update.
868 * gnulib/import/dirent.in.h: Update.
869 * gnulib/import/dirfd.c: Update.
870 * gnulib/import/dirname-lgpl.c: Update.
871 * gnulib/import/dirname.h: Update.
872 * gnulib/import/dosname.h: Update.
873 * gnulib/import/dup-safer-flag.c: Update.
874 * gnulib/import/dup-safer.c: Update.
875 * gnulib/import/dup.c: Update.
876 * gnulib/import/dup2.c: Update.
877 * gnulib/import/errno.in.h: Update.
878 * gnulib/import/error.c: Update.
879 * gnulib/import/error.h: Update.
880 * gnulib/import/exitfail.c: Update.
881 * gnulib/import/exitfail.h: Update.
882 * gnulib/import/extra/update-copyright: Update.
883 * gnulib/import/fchdir.c: Update.
884 * gnulib/import/fcntl.c: Update.
885 * gnulib/import/fcntl.in.h: Update.
886 * gnulib/import/fd-hook.c: Update.
887 * gnulib/import/fd-hook.h: Update.
888 * gnulib/import/fd-safer-flag.c: Update.
889 * gnulib/import/fd-safer.c: Update.
890 * gnulib/import/fdopendir.c: Update.
891 * gnulib/import/filename.h: Update.
892 * gnulib/import/filenamecat-lgpl.c: Update.
893 * gnulib/import/filenamecat.h: Update.
894 * gnulib/import/flexmember.h: Update.
895 * gnulib/import/float+.h: Update.
896 * gnulib/import/float.c: Update.
897 * gnulib/import/float.in.h: Update.
898 * gnulib/import/fnmatch.c: Update.
899 * gnulib/import/fnmatch.in.h: Update.
900 * gnulib/import/fnmatch_loop.c: Update.
901 * gnulib/import/fpucw.h: Update.
902 * gnulib/import/frexp.c: Update.
903 * gnulib/import/frexpl.c: Update.
904 * gnulib/import/fstat.c: Update.
905 * gnulib/import/fstatat.c: Update.
906 * gnulib/import/getcwd-lgpl.c: Update.
907 * gnulib/import/getcwd.c: Update.
908 * gnulib/import/getdtablesize.c: Update.
909 * gnulib/import/getlogin_r.c: Update.
910 * gnulib/import/getprogname.c: Update.
911 * gnulib/import/getprogname.h: Update.
912 * gnulib/import/gettext.h: Update.
913 * gnulib/import/gettimeofday.c: Update.
914 * gnulib/import/glob-libc.h: Update.
915 * gnulib/import/glob.c: Update.
916 * gnulib/import/glob.in.h: Update.
917 * gnulib/import/glob_internal.h: Update.
918 * gnulib/import/glob_pattern_p.c: Update.
919 * gnulib/import/globfree.c: Update.
920 * gnulib/import/hard-locale.c: Update.
921 * gnulib/import/hard-locale.h: Update.
922 * gnulib/import/intprops.h: Update.
923 * gnulib/import/inttypes.in.h: Update.
924 * gnulib/import/isnan.c: Update.
925 * gnulib/import/isnand-nolibm.h: Update.
926 * gnulib/import/isnand.c: Update.
927 * gnulib/import/isnanl-nolibm.h: Update.
928 * gnulib/import/isnanl.c: Update.
929 * gnulib/import/itold.c: Update.
930 * gnulib/import/libc-config.h: Update.
931 * gnulib/import/limits.in.h: Update.
932 * gnulib/import/localcharset.c: Update.
933 * gnulib/import/localcharset.h: Update.
934 * gnulib/import/localtime-buffer.c: Update.
935 * gnulib/import/localtime-buffer.h: Update.
936 * gnulib/import/lstat.c: Update.
937 * gnulib/import/m4/00gnulib.m4: Update.
938 * gnulib/import/m4/__inline.m4: Update.
939 * gnulib/import/m4/absolute-header.m4: Update.
940 * gnulib/import/m4/alloca.m4: Update.
941 * gnulib/import/m4/builtin-expect.m4: Update.
942 * gnulib/import/m4/canonicalize.m4: Update.
943 * gnulib/import/m4/chdir-long.m4: Update.
944 * gnulib/import/m4/close.m4: Update.
945 * gnulib/import/m4/closedir.m4: Update.
946 * gnulib/import/m4/configmake.m4: Update.
947 * gnulib/import/m4/d-ino.m4: Update.
948 * gnulib/import/m4/d-type.m4: Update.
949 * gnulib/import/m4/dirent_h.m4: Update.
950 * gnulib/import/m4/dirfd.m4: Update.
951 * gnulib/import/m4/dirname.m4: Update.
952 * gnulib/import/m4/double-slash-root.m4: Update.
953 * gnulib/import/m4/dup.m4: Update.
954 * gnulib/import/m4/dup2.m4: Update.
955 * gnulib/import/m4/eealloc.m4: Update.
956 * gnulib/import/m4/environ.m4: Update.
957 * gnulib/import/m4/errno_h.m4: Update.
958 * gnulib/import/m4/error.m4: Update.
959 * gnulib/import/m4/exponentd.m4: Update.
960 * gnulib/import/m4/exponentl.m4: Update.
961 * gnulib/import/m4/extensions.m4: Update.
962 * gnulib/import/m4/extern-inline.m4: Update.
963 * gnulib/import/m4/fchdir.m4: Update.
964 * gnulib/import/m4/fcntl-o.m4: Update.
965 * gnulib/import/m4/fcntl.m4: Update.
966 * gnulib/import/m4/fcntl_h.m4: Update.
967 * gnulib/import/m4/fdopendir.m4: Update.
968 * gnulib/import/m4/filenamecat.m4: Update.
969 * gnulib/import/m4/flexmember.m4: Update.
970 * gnulib/import/m4/float_h.m4: Update.
971 * gnulib/import/m4/fnmatch.m4: Update.
972 * gnulib/import/m4/fnmatch_h.m4: Update.
973 * gnulib/import/m4/fpieee.m4: Update.
974 * gnulib/import/m4/frexp.m4: Update.
975 * gnulib/import/m4/frexpl.m4: Update.
976 * gnulib/import/m4/fstat.m4: Update.
977 * gnulib/import/m4/fstatat.m4: Update.
978 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
979 * gnulib/import/m4/getcwd-path-max.m4: Update.
980 * gnulib/import/m4/getcwd.m4: Update.
981 * gnulib/import/m4/getdtablesize.m4: Update.
982 * gnulib/import/m4/getlogin.m4: Update.
983 * gnulib/import/m4/getlogin_r.m4: Update.
984 * gnulib/import/m4/getpagesize.m4: Update.
985 * gnulib/import/m4/getprogname.m4: Update.
986 * gnulib/import/m4/gettimeofday.m4: Update.
987 * gnulib/import/m4/glibc21.m4: Update.
988 * gnulib/import/m4/glob.m4: Update.
989 * gnulib/import/m4/glob_h.m4: Update.
990 * gnulib/import/m4/gnulib-cache.m4: Update.
991 * gnulib/import/m4/gnulib-common.m4: Update.
992 * gnulib/import/m4/gnulib-comp.m4: Update.
993 * gnulib/import/m4/gnulib-tool.m4: Update.
994 * gnulib/import/m4/hard-locale.m4: Update.
995 * gnulib/import/m4/include_next.m4: Update.
996 * gnulib/import/m4/inttypes-pri.m4: Update.
997 * gnulib/import/m4/inttypes.m4: Update.
998 * gnulib/import/m4/isnand.m4: Update.
999 * gnulib/import/m4/isnanl.m4: Update.
1000 * gnulib/import/m4/largefile.m4: Update.
1001 * gnulib/import/m4/limits-h.m4: Update.
1002 * gnulib/import/m4/localcharset.m4: Update.
1003 * gnulib/import/m4/locale-fr.m4: Update.
1004 * gnulib/import/m4/locale-ja.m4: Update.
1005 * gnulib/import/m4/locale-zh.m4: Update.
1006 * gnulib/import/m4/localtime-buffer.m4: Update.
1007 * gnulib/import/m4/longlong.m4: Update.
1008 * gnulib/import/m4/lstat.m4: Update.
1009 * gnulib/import/m4/malloc.m4: Update.
1010 * gnulib/import/m4/malloca.m4: Update.
1011 * gnulib/import/m4/math_h.m4: Update.
1012 * gnulib/import/m4/mbrtowc.m4: Update.
1013 * gnulib/import/m4/mbsinit.m4: Update.
1014 * gnulib/import/m4/mbsrtowcs.m4: Update.
1015 * gnulib/import/m4/mbstate_t.m4: Update.
1016 * gnulib/import/m4/memchr.m4: Update.
1017 * gnulib/import/m4/memmem.m4: Update.
1018 * gnulib/import/m4/mempcpy.m4: Update.
1019 * gnulib/import/m4/memrchr.m4: Update.
1020 * gnulib/import/m4/mkdir.m4: Update.
1021 * gnulib/import/m4/mkstemp.m4: Update.
1022 * gnulib/import/m4/mmap-anon.m4: Update.
1023 * gnulib/import/m4/mode_t.m4: Update.
1024 * gnulib/import/m4/msvc-inval.m4: Update.
1025 * gnulib/import/m4/msvc-nothrow.m4: Update.
1026 * gnulib/import/m4/multiarch.m4: Update.
1027 * gnulib/import/m4/nocrash.m4: Update.
1028 * gnulib/import/m4/off_t.m4: Update.
1029 * gnulib/import/m4/onceonly.m4: Update.
1030 * gnulib/import/m4/open-cloexec.m4: Update.
1031 * gnulib/import/m4/open.m4: Update.
1032 * gnulib/import/m4/openat.m4: Update.
1033 * gnulib/import/m4/opendir.m4: Update.
1034 * gnulib/import/m4/pathmax.m4: Update.
1035 * gnulib/import/m4/rawmemchr.m4: Update.
1036 * gnulib/import/m4/readdir.m4: Update.
1037 * gnulib/import/m4/readlink.m4: Update.
1038 * gnulib/import/m4/realloc.m4: Update.
1039 * gnulib/import/m4/rename.m4: Update.
1040 * gnulib/import/m4/rewinddir.m4: Update.
1041 * gnulib/import/m4/rmdir.m4: Update.
1042 * gnulib/import/m4/save-cwd.m4: Update.
1043 * gnulib/import/m4/secure_getenv.m4: Update.
1044 * gnulib/import/m4/setenv.m4: Update.
1045 * gnulib/import/m4/signal_h.m4: Update.
1046 * gnulib/import/m4/ssize_t.m4: Update.
1047 * gnulib/import/m4/stat-time.m4: Update.
1048 * gnulib/import/m4/stat.m4: Update.
1049 * gnulib/import/m4/std-gnu11.m4: Update.
1050 * gnulib/import/m4/stdbool.m4: Update.
1051 * gnulib/import/m4/stddef_h.m4: Update.
1052 * gnulib/import/m4/stdint.m4: Update.
1053 * gnulib/import/m4/stdio_h.m4: Update.
1054 * gnulib/import/m4/stdlib_h.m4: Update.
1055 * gnulib/import/m4/strchrnul.m4: Update.
1056 * gnulib/import/m4/strdup.m4: Update.
1057 * gnulib/import/m4/strerror.m4: Update.
1058 * gnulib/import/m4/string_h.m4: Update.
1059 * gnulib/import/m4/strstr.m4: Update.
1060 * gnulib/import/m4/strtok_r.m4: Update.
1061 * gnulib/import/m4/sys_socket_h.m4: Update.
1062 * gnulib/import/m4/sys_stat_h.m4: Update.
1063 * gnulib/import/m4/sys_time_h.m4: Update.
1064 * gnulib/import/m4/sys_types_h.m4: Update.
1065 * gnulib/import/m4/tempname.m4: Update.
1066 * gnulib/import/m4/time_h.m4: Update.
1067 * gnulib/import/m4/unistd-safer.m4: Update.
1068 * gnulib/import/m4/unistd_h.m4: Update.
1069 * gnulib/import/m4/warn-on-use.m4: Update.
1070 * gnulib/import/m4/wchar_h.m4: Update.
1071 * gnulib/import/m4/wchar_t.m4: Update.
1072 * gnulib/import/m4/wctype_h.m4: Update.
1073 * gnulib/import/m4/wint_t.m4: Update.
1074 * gnulib/import/malloc.c: Update.
1075 * gnulib/import/malloc/scratch_buffer.h: Update.
1076 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1077 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1078 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1079 * gnulib/import/malloca.c: Update.
1080 * gnulib/import/malloca.h: Update.
1081 * gnulib/import/malloca.valgrind: Update.
1082 * gnulib/import/math.in.h: Update.
1083 * gnulib/import/mbrtowc.c: Update.
1084 * gnulib/import/mbsinit.c: Update.
1085 * gnulib/import/mbsrtowcs-impl.h: Update.
1086 * gnulib/import/mbsrtowcs-state.c: Update.
1087 * gnulib/import/mbsrtowcs.c: Update.
1088 * gnulib/import/memchr.c: Update.
1089 * gnulib/import/memmem.c: Update.
1090 * gnulib/import/mempcpy.c: Update.
1091 * gnulib/import/memrchr.c: Update.
1092 * gnulib/import/mkdir.c: Update.
1093 * gnulib/import/mkstemp.c: Update.
1094 * gnulib/import/msvc-inval.c: Update.
1095 * gnulib/import/msvc-inval.h: Update.
1096 * gnulib/import/msvc-nothrow.c: Update.
1097 * gnulib/import/msvc-nothrow.h: Update.
1098 * gnulib/import/open.c: Update.
1099 * gnulib/import/openat-die.c: Update.
1100 * gnulib/import/openat-priv.h: Update.
1101 * gnulib/import/openat-proc.c: Update.
1102 * gnulib/import/openat.c: Update.
1103 * gnulib/import/openat.h: Update.
1104 * gnulib/import/opendir.c: Update.
1105 * gnulib/import/pathmax.h: Update.
1106 * gnulib/import/pipe-safer.c: Update.
1107 * gnulib/import/rawmemchr.c: Update.
1108 * gnulib/import/readdir.c: Update.
1109 * gnulib/import/readlink.c: Update.
1110 * gnulib/import/realloc.c: Update.
1111 * gnulib/import/ref-add.sin: Update.
1112 * gnulib/import/ref-del.sin: Update.
1113 * gnulib/import/rename.c: Update.
1114 * gnulib/import/rewinddir.c: Update.
1115 * gnulib/import/rmdir.c: Update.
1116 * gnulib/import/same-inode.h: Update.
1117 * gnulib/import/save-cwd.c: Update.
1118 * gnulib/import/save-cwd.h: Update.
1119 * gnulib/import/scratch_buffer.h: Update.
1120 * gnulib/import/secure_getenv.c: Update.
1121 * gnulib/import/setenv.c: Update.
1122 * gnulib/import/signal.in.h: Update.
1123 * gnulib/import/stat-time.c: Update.
1124 * gnulib/import/stat-time.h: Update.
1125 * gnulib/import/stat-w32.c: Update.
1126 * gnulib/import/stat-w32.h: Update.
1127 * gnulib/import/stat.c: Update.
1128 * gnulib/import/stdbool.in.h: Update.
1129 * gnulib/import/stddef.in.h: Update.
1130 * gnulib/import/stdint.in.h: Update.
1131 * gnulib/import/stdio.in.h: Update.
1132 * gnulib/import/stdlib.in.h: Update.
1133 * gnulib/import/str-two-way.h: Update.
1134 * gnulib/import/strchrnul.c: Update.
1135 * gnulib/import/strdup.c: Update.
1136 * gnulib/import/streq.h: Update.
1137 * gnulib/import/strerror-override.c: Update.
1138 * gnulib/import/strerror-override.h: Update.
1139 * gnulib/import/strerror.c: Update.
1140 * gnulib/import/string.in.h: Update.
1141 * gnulib/import/stripslash.c: Update.
1142 * gnulib/import/strnlen1.c: Update.
1143 * gnulib/import/strnlen1.h: Update.
1144 * gnulib/import/strstr.c: Update.
1145 * gnulib/import/strtok_r.c: Update.
1146 * gnulib/import/sys_stat.in.h: Update.
1147 * gnulib/import/sys_time.in.h: Update.
1148 * gnulib/import/sys_types.in.h: Update.
1149 * gnulib/import/tempname.c: Update.
1150 * gnulib/import/tempname.h: Update.
1151 * gnulib/import/time.in.h: Update.
1152 * gnulib/import/unistd--.h: Update.
1153 * gnulib/import/unistd-safer.h: Update.
1154 * gnulib/import/unistd.in.h: Update.
1155 * gnulib/import/unsetenv.c: Update.
1156 * gnulib/import/verify.h: Update.
1157 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1158 * gnulib/import/wchar.in.h: Update.
1159 * gnulib/import/wctype.in.h: Update.
1160 * gnulib/import/xalloc-oversized.h: Update.
1161 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1162 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1163
1164 2018-08-16 Gary Benson <gbenson@redhat.com>
1165
1166 PR gdb/13000:
1167 * gdb/main.c (captured_main_1): Exit with nonzero status
1168 in batch mode if the last command to be executed failed.
1169 * NEWS: Mention the above.
1170
1171 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1172
1173 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1174 end of warning message.
1175
1176 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1177
1178 PR gdb/22943:
1179 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1180 (aarch64_extract_return_value): Use
1181 aapcs_is_vfp_call_or_return_candidate.
1182 (aarch64_return_in_memory): Likewise.
1183 (aarch64_store_return_value): Likewise.
1184
1185 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1186
1187 * aarch64-tdep.c
1188 (aapcs_is_vfp_call_or_return_candidate): Make static
1189 (pass_in_v_or_stack): Remove function.
1190 (pass_in_v_vfp_candidate): New function.
1191 (aarch64_push_dummy_call): Check for float register candidates.
1192
1193 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1194
1195 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1196 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1197 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1198
1199 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1200
1201 PR build/23399
1202 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1203 (struct ipa_sym_addresses): Rename to...
1204 (struct ipa_sym_addresses_common): ... this.
1205 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1206
1207 2018-08-28 Tom Tromey <tom@tromey.com>
1208
1209 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1210 (token_fifo): Now a std::vector.
1211 (yylex, c_parse): Update.
1212 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1213 (token_fifo): Now a std::vector.
1214 (yylex, d_parse): Update.
1215 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1216 (token_fifo): Now a std::vector.
1217 (yylex, go_parse): Update.
1218
1219 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1220
1221 * parser-defs.h (struct type_stack) <elements>: Change type to
1222 std::vector<union type_stack_elt>.
1223 <depth, size>: Remove.
1224 * parse.c (parse_exp_in_context_1): Adjust.
1225 (type_stack_reserve): Remove.
1226 (check_type_stack_depth): Remove.
1227 (insert_into_type_stack): Adjust to std::vector.
1228 (insert_type): Likewise.
1229 (push_type): Likewise.
1230 (push_type_int): Likewise.
1231 (insert_type_address_space): Likewise.
1232 (pop_type): Likewise.
1233 (pop_type_int): Likewise.
1234 (pop_typelist): Likewise.
1235 (pop_type_stack): Likewise.
1236 (append_type_stack): Likewise.
1237 (push_type_stack): Likewise.
1238 (get_type_stack): Likewise.
1239 (type_stack_cleanup): Likewise.
1240 (push_typelist): Likewise.
1241 (follow_types): Likewise.
1242 (_initialize_parse): Likewise.
1243
1244 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1245
1246 * NEWS: Mention csky target.
1247
1248 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1249 Hafiz Abid Qadeer <abidh@codesourcery.com>
1250 Don Breazeal <donb@codesourcery.com>
1251
1252 * csky-linux-tdep.c: New file.
1253 * csky-tdep.c: Likewise.
1254 * csky-tdep.h: Likewise.
1255 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1256 csky-tdep.o.
1257 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1258 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1259 * configure.tgt: Add csky support.
1260
1261 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1262
1263 * python/py-framefilter.c (py_print_frame): Print frame architecture
1264 when printing on an MI output.
1265
1266 2018-08-27 Tom Tromey <tom@tromey.com>
1267
1268 PR build/23087:
1269 * configure: Rebuild.
1270 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1271
1272 2018-08-27 Tom Tromey <tom@tromey.com>
1273
1274 * aarch64-linux-tdep.c
1275 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1276 casts to int.
1277
1278 2018-08-27 Tom Tromey <tom@tromey.com>
1279
1280 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1281 unsigned.
1282 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1283 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1284 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1285 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1286 unsigned.
1287
1288 2018-08-27 Tom Tromey <tom@tromey.com>
1289
1290 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1291 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1292
1293 2018-08-27 Tom Tromey <tom@tromey.com>
1294
1295 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1296 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1297 ULONGEST_MAX.
1298 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1299 ULONGEST_MAX.
1300 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1301 ULONGEST_MAX.
1302 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1303 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1304 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1305 ULONGEST_MAX.
1306 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1307 (ppc64_linux_sigaction_tramp_frame)
1308 (ppc32_linux_sighandler_tramp_frame)
1309 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1310 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1311 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1312 * mn10300-linux-tdep.c (am33_linux_sigframe)
1313 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1314 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1315 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1316 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1317 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1318 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1319 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1320 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1321 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1322 * microblaze-linux-tdep.c
1323 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1324 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1325 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1326 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1327 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1328 * common/common-types.h (ULONGEST_MAX): New define.
1329 (CORE_ADDR_MAX): Fix formatting.
1330 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1331 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1332 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1333 (arm_linux_rt_sigreturn_tramp_frame)
1334 (arm_eabi_linux_sigreturn_tramp_frame)
1335 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1336 (thumb2_eabi_linux_sigreturn_tramp_frame)
1337 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1338 (arm_linux_restart_syscall_tramp_frame)
1339 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1340 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1341 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1342 ULONGEST_MAX.
1343 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1344
1345 2018-08-27 Tom Tromey <tom@tromey.com>
1346
1347 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1348 CORE_ADDR_MAX.
1349 * mips-tdep.c (mips_deal_with_atomic_sequence)
1350 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1351 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1352 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1353 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1354 CORE_ADDR_MAX.
1355 * aarch64-tdep.c (aarch64_software_single_step): Use
1356 CORE_ADDR_MAX.
1357
1358 2018-08-27 Tom Tromey <tom@tromey.com>
1359
1360 * linespec.c (complete_linespec_component): Add cast to "char".
1361 * completer.c (completion_tracker::build_completion_result): Add
1362 cast to "char".
1363
1364 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1365
1366 * solist.h (struct solist, struct target_so_ops): Fix
1367 indentation.
1368
1369 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1370
1371 * ada-tasks.c (ada_task_info_s): Remove typedef.
1372 (DEF_VEC_O(ada_task_info_s)): Remove.
1373 (struct ada_tasks_inferior_data): Initialize fields.
1374 <task_list>: Make an std::vector.
1375 (get_ada_tasks_inferior_data): Allocate with new.
1376 (ada_get_task_number): Adjust.
1377 (get_task_number_from_id): Likewise.
1378 (valid_task_id): Likewise.
1379 (ada_get_task_info_from_ptid): Likewise.
1380 (iterate_over_live_ada_tasks): Likewise.
1381 (add_ada_task): Likewise.
1382 (read_known_tasks): Likewise.
1383 (ada_build_task_list): Likewise.
1384 (print_ada_task_info): Likewise.
1385 (info_task): Likewise.
1386 (task_command_1): Likewise.
1387
1388 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1389
1390 * ada-lang.c (add_angle_brackets): Return std::string.
1391
1392 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1393
1394 * python/py-threadevent.c (py_get_event_thread): Initialize
1395 pythread.
1396
1397 2018-08-24 Pedro Alves <palves@redhat.com>
1398
1399 * python/py-bpevent.c (create_breakpoint_event_object): Use
1400 copy-initialization.
1401 * python/py-continueevent.c (emit_continue_event): Use
1402 copy-initialization.
1403 * python/py-exitedevent.c (create_exited_event_object): Return a
1404 gdbpy_ref<>.
1405 (emit_exited_event): Use copy-initialization.
1406 * python/py-inferior.c (python_new_inferior)
1407 (python_inferior_deleted, add_thread_object): Use
1408 copy-initialization.
1409 * python/py-infevents.c (create_inferior_call_event_object)
1410 (create_register_changed_event_object)
1411 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1412 (emit_inferior_call_event, emit_memory_changed_event)
1413 (emit_register_changed_event): Use copy-initialization.
1414 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1415 Return a gdbpy_ref<>.
1416 (emit_new_objfile_event): Use copy-initialization.
1417 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1418 (emit_clear_objfiles_event): Use copy-initialization.
1419 * python/py-signalevent.c (create_signal_event_object): Use
1420 copy-initialization.
1421 * python/py-threadevent.c (create_thread_event_object): Use
1422 copy-initialization.
1423
1424 2018-08-24 Pedro Alves <palves@redhat.com>
1425 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 PR gdb/23379
1428 * python/py-continueevent.c: Include "gdbthread.h".
1429 (create_continue_event_object): Add intro comment. Add 'ptid'
1430 parameter. Use it to find thread to pass to
1431 create_thread_event_object.
1432 (emit_continue_event): Pass PTID down to
1433 create_continue_event_object.
1434 * python/py-event.h (py_get_event_thread): Declare.
1435 (create_thread_event_object): Remove default from 'thread'
1436 parameter.
1437 * python/py-stopevent.c (create_stop_event_object): Use
1438 py_get_event_thread.
1439 * python/py-threadevent.c (get_event_thread): Rename to ...
1440 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1441 and use it to find the thread.
1442 (create_thread_event_object): Assert that THREAD isn't null.
1443 Don't find the event thread here.
1444
1445 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1446
1447 * block.h (blockrange, blockranges): New struct declarations.
1448 (struct block): Add new field named `ranges'.
1449 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1450 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1451 macros for accessing ranges in struct block.
1452 (make_blockranges): New declaration.
1453 block.c (make_blockranges): New function.
1454 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1455 for block.
1456 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1457 * blockframe.c (cache_pc_function_block): New static global.
1458 (clear_pc_function_cache): Clear cache_pc_function_block.
1459 (find_pc_partial_function): Move comment to symtab.h. Add
1460 support for non-contiguous blocks.
1461 * cli/cli-cmds.c (block.h): Include.
1462 (print_disassembly): Handle printing of non-contiguous blocks.
1463 (disassemble_current_function): Likewise.
1464 (disassemble_command): Likewise.
1465
1466 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1467 BLOCK_START.
1468 * blockframe.c (get_pc_function_start): Likewise.
1469 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1470 (gcc_symbol_address): Likewise.
1471 * compile/compile-object-run.c (compile_object_run): Likewise.
1472 * compile/compile.c (get_expr_block_and_pc): Likewise.
1473 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1474 (func_addr_to_tail_call_list): Likewise.
1475 * findvar.c (default_read_var_value): Likewise.
1476 * inline-frame.c (inline_frame_this_id): Likewise.
1477 (skip-inline_frames): Likewise.
1478 * infcmd.c (until_next_command): Likewise.
1479 * linespec.c (convert_linespec_to_sals): Likewise.
1480 * parse.c (parse_exp_in_context_1): Likewise.
1481 * printcmd.c (build_address_symbolic): likewise.
1482 (info_address_command): Likewise.
1483 symtab.c (find_function_start_sal): Likewise.
1484 (skip_prologue_sal): Likewise.
1485 (find_function_alias_target): Likewise.
1486 (find_gnu_ifunc): Likewise.
1487 * stack.c (find_frame_funname): Likewise.
1488 * symtab.c (fixup_symbol_section): Likewise.
1489 (find_function_start_sal): Likewise.
1490 (skip_prologue_sal): Likewsie.
1491 (find_function_alias_target): Likewise.
1492 (find_gnu_ifunc): Likewise.
1493 * tracepoint.c (info_scope_command): Likewise.
1494 * value.c (value_fn_field): Likewise.
1495
1496 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1497 in place of find_pc_partial_function.
1498 * blockframe.c (find_function_entry_range_from_pc): New function.
1499 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1500 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1501 for each range in a block.
1502
1503
1504 2018-08-23 Xavier Roirand <roirand@adacore.com>
1505
1506 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1507 incrementation.
1508
1509 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * solib-svr4.c (read_program_headers_from_bfd): Return
1512 gdb::optional<gdb::byte_vector>.
1513 (svr4_exec_displacement): Adjust.
1514
1515 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * solib-svr4.c (read_program_header): Return
1518 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1519 (find_program_interpreter): Return
1520 gdb::optional<gdb::byte_vector>.
1521 (scan_dyntag_auxv): Adjust.
1522 (enable_break): Adjust.
1523 (svr4_exec_displacement): Adjust.
1524
1525 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1526
1527 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1528 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1529
1530 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1531
1532 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1533 string_vprintf.
1534 * guile/scm-utils.c (gdbscm_printf): Likewise.
1535 * serial.c (serial_printf): Likewise.
1536 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1537
1538 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1539
1540 * stack.c (print_frame): Print frame architecture when printing on
1541 an MI output.
1542 * NEWS: Mention new "arch" attribute in frame output.
1543
1544 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1545
1546 * arch/aarch64.h (aarch64_regnum): Update comment.
1547
1548 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1549
1550 * NEWS: Add SVE to 8.2 section.
1551
1552 2018-08-21 Pedro Alves <palves@redhat.com>
1553
1554 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1555 out from gdbscm_parse_function_args.
1556 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1557 gdbscm_parse_function_args_1.
1558
1559 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1560
1561 PR gdb/17816
1562 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1563 operator.
1564
1565 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1566
1567 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1568
1569 2018-08-19 Michael Spang <spang@google.com>
1570
1571 PR gdb/11786
1572 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1573 for PT_TLS segments.
1574
1575 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1576
1577 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1578 dwarf_variable_value.
1579 * dwarf2-frame.c (class dwarf_expr_executor):
1580 Add override for dwarf_variable_value.
1581 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1582 (class symbol_needs_eval_context): Likewise.
1583 (indirect_synthetic_pointer): Add forward declaration.
1584 (sect_variable_value): New function.
1585 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1586 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1587 for DW_OP_GNU_variable_value.
1588
1589 2018-08-16 Tom Tromey <tom@tromey.com>
1590
1591 * top.c (read_command_file): Update.
1592 (command_line_input): Remove "repeat" argument.
1593 * ada-lang.c (get_selections): Update.
1594 * linespec.c (decode_line_2): Update.
1595 * defs.h (command_line_input): Remove argument.
1596 * cli/cli-script.c (read_next_line): Update.
1597 * python/py-gdb-readline.c: Update.
1598
1599 2018-08-17 Tom Tromey <tom@tromey.com>
1600
1601 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1602 command_line_input.
1603
1604 2018-08-15 Tom Tromey <tom@tromey.com>
1605
1606 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1607
1608 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1609
1610 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1611 If used, use find_pc_partial_function to find address range
1612 to disassemble.
1613 * mi/mi-main.c (mi_cmd_list_features): Report
1614 "data-disassemble-a-option" feature.
1615 * NEWS: Mention new -data-disassemble option -a.
1616
1617 2018-08-13 Tom Tromey <tom@tromey.com>
1618
1619 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1620
1621 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1622
1623 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1624 (aarch64_linux_collect_sve_regset): Likewise.
1625 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1626 * regcache.h (regcache_map_entry_size): New function.
1627
1628 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1629
1630 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1631 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1632 (SVE_HEADER_VL_LENGTH): Likewise.
1633 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1634 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1635 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1636 (SVE_HEADER_SIZE_OFFSET): Likewise.
1637 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1638 (SVE_HEADER_VL_OFFSET): Likewise.
1639 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1640 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1641 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1642 (SVE_HEADER_SIZE): Likewise.
1643 (aarch64_linux_core_read_vq): Add function.
1644 (aarch64_linux_core_read_description): Check for SVE section.
1645
1646 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1647
1648 * aarch64-fbsd-tdep.c
1649 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1650 collect_size.
1651 * aarch64-linux-tdep.c
1652 (aarch64_linux_iterate_over_regset_sections): Likewise.
1653 * alpha-linux-tdep.c
1654 (alpha_linux_iterate_over_regset_sections):
1655 * alpha-nbsd-tdep.c
1656 (alphanbsd_iterate_over_regset_sections): Likewise.
1657 * amd64-fbsd-tdep.c
1658 (amd64fbsd_iterate_over_regset_sections): Likewise.
1659 * amd64-linux-tdep.c
1660 (amd64_linux_iterate_over_regset_sections): Likewise.
1661 * arm-bsd-tdep.c
1662 (armbsd_iterate_over_regset_sections): Likewise.
1663 * arm-fbsd-tdep.c
1664 (arm_fbsd_iterate_over_regset_sections): Likewise.
1665 * arm-linux-tdep.c
1666 (arm_linux_iterate_over_regset_sections): Likewise.
1667 * corelow.c (get_core_registers_cb): Likewise.
1668 (core_target::fetch_registers): Likewise.
1669 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1670 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1671 * gdbarch.h (void): Regenerate.
1672 * gdbarch.sh: Add supply_size and collect_size.
1673 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1674 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1675 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1676 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1677 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1678 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1679 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1680 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1681 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1682 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1683 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1684 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1685 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1686 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1687 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1688 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1689 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1690 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1691 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1692 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1693 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1694 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1695 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1696 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1697 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1698 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1699 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1700 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1701 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1702 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1703
1704 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1707 with string_printf.
1708
1709 2018-08-10 Keith Seitz <keiths@redhat.com>
1710
1711 * compile/compile-c-support.c (add_code_header, add_code_footer):
1712 Move into policy class.
1713 (c_push_user_expression, pop_user_expression_nop)
1714 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1715 (compile_program): New host class.
1716 (c_compile_program): New typedef.
1717 (c_compute_porgram): Use c_compile_program.
1718
1719 2018-08-10 Keith Seitz <keiths@redhat.com>
1720
1721 * compile/compile-internal.h (compile_instance::~compile_instance):
1722 Remove calls to htab_delete.
1723 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1724 * compile.c (compile_instance::compile_instance): Initialize
1725 htab unique pointers.
1726 (compile_instance::get_cached_type, compile_instance::insert_type)
1727 (compile_instance::error_symbol_once): Update for unique_ptr.
1728
1729 2018-08-10 Keith Seitz <keiths@redhat.com>
1730
1731 * compile/compile-c-symbols.c (struct symbol_error)
1732 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1733 (compile_instance::insert_symbol_error)
1734 (compile_instance::error_symbol_once): Move to ...
1735 * compile/compile.c: ... here.
1736
1737 2018-08-10 Keith Seitz <keiths@redhat.com>
1738
1739 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1740 instead of `new_compile_instance'.
1741 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1742 Update description.
1743 If the symbol error map is not initialized, create it.
1744 (generate_c_for_for_one_symbol): Do not check/initialize
1745 the symbol error map.
1746 * compile/compile-c-types.c (compile_c_instance): Make a class.
1747 Update all callers.
1748 (compile_instance::compile_instance): Initialize the type cache.
1749 (get_cached_type): New function.
1750 (insert_type): Update description.
1751 (compile_c_instance::m_default_cflags): Define.
1752 (convert_type): Update description. Use get_cached_type.
1753 (delete_instance): Moved to destructor.
1754 (new_compile_instance): Moved to constructor.
1755 * compile/compile-c.h (compile_c_instance): Make class inheriting
1756 from compile_instance.
1757 <base>: Remove field.
1758 <type_map, symbol_err_map>: Move to base class.
1759 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1760 * compile/compile-internal.h (compile_instance): Make class.
1761 <type_map_t, symbol_err_map_t>: Define.
1762 <fe>: Rename to `m_gcc_fe'.
1763 <scope, block, gcc_target_options>: Add `m_' prefix.
1764 <m_type_map, m_symbol_err_map>: New fields, moved from
1765 compile_c_instance.
1766 <destroy>: Remove.
1767 (convert_type, new_compile_instance): Remove.
1768 * compile/compile.c (cleanup_compile_instance): Remove.
1769 (compile_to_object): Use unique_ptr to eliminate cleanups.
1770 (compile_instance::set_print_callback, compile_instance::version)
1771 (compile_instance::set_verbose)
1772 (compile_instance::set_driver_filename)
1773 (compile_instance::set_triplet_regexp)
1774 (compile_instance::set_arguments)
1775 (compile_instance::set_source_file)
1776 (compile_instance::compile): Define.
1777
1778 2018-08-10 Keith Seitz <keiths@redhat.com>
1779
1780 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1781 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1782 gcc-c-fe.def to define C plugin.
1783 (delete_instance): Delete `c_plugin'.
1784 (new_compile_instance): Initialize `c_plugin'.
1785 * compile/compile-c.h: Include gcc_c_plugin.h.
1786 (struct compile_c_instance) <c_plugin>: New member.
1787 * gcc-c-plugin.h: New file.
1788 Update all callers with API change.
1789
1790 2018-08-10 Keith Seitz <keiths@redhat.com>
1791
1792 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1793 (HFILES_NO_SRCDIR): ... to here.
1794 Add compile-internal.h and compile-c.h.
1795 * compile/compile-c-support.c: Include compile-c.h.
1796 * compile/compile-c-symbols.c: Include compile-c.h.
1797 (generate_c_for_variable_locations): Update comment.
1798 * compile/compile-c-types.c: Include compile-c.h.
1799 * compile/compile-c.h: New file -- moved C language declarations
1800 from other files here.
1801 * compile/compile-internal.h: Do not include hashtab.h or
1802 common/enum-flags.h.
1803 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1804 (gcc_convert_symbol, gcc_symbol_address)
1805 (generate_c_for_variable_locations, c_get_mode_for_size)
1806 (c_get_range_decl_name): Definitions moved to compile-c.h.
1807 * compile/compile-loc2c.c: Include compile-c.h.
1808
1809 2018-08-10 Keith Seitz <keiths@redhat.com>
1810
1811 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1812 (c_symbol_substitution_name): ... this.
1813 Update all callers.
1814
1815 2018-08-10 Keith Seitz <keiths@redhat.com>
1816
1817 * compile/compile-c-support.c (c_compute_program): Use
1818 unique_xmalloc_ptr to eliminate cleanup.
1819 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1820 Return a unique_xmalloc_ptr and eliminate cleanup.
1821 * compile/compile-internal.h (generate_c_for_variable_locations):
1822 Return unique_xmalloc_ptr and update description.
1823
1824 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1825
1826 * corelow.c (core_target::get_core_register_section): Rename
1827 min_size to section_min_size.
1828
1829 2018-08-09 Jim Wilson <jimw@sifive.com>
1830
1831 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1832 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1833 * NEWS: Mention new GNU/Linux RISC-V target.
1834 * configure.host: Add riscv*-*-linux*.
1835 * configure.nat: Add riscv*.
1836 * configure.tgt: Add riscv*-*-linux*.
1837 * riscv-linux-nat.c: New file.
1838 * riscv-linux-tdep.c: New file.
1839
1840 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1841
1842 * infrun.c (resume): Make static, add forward declaration.
1843 (proceed): Update header comment.
1844 * infrun.h (resume): Delete declaration.
1845
1846 2018-08-09 Tom Tromey <tom@tromey.com>
1847
1848 * riscv-tdep.h: Minor formatting fixes.
1849
1850 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1851
1852 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1853 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1854 (test_mkdir_recursive): Likewise.
1855 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1856
1857 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1858
1859 * valarith.c (value_subscripted_rvalue): If an array is not in
1860 memory, and we don't know the upper bound, then we can't know that
1861 the requested element exists or not.
1862
1863 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1864
1865 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1866 (target_options_to_string): Add comment.
1867
1868 2018-08-08 Tom Tromey <tom@tromey.com>
1869
1870 * unittests/scoped_mmap-selftests.c: Check result of "write".
1871
1872 2018-08-08 Jim Wilson <jimw@sifive.com>
1873
1874 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1875 (decode_register_index_short): New.
1876 (decode_j_type_insn, decode_cj_type_insn): New.
1877 (decode_b_type_insn, decode_cb_type_insn): New.
1878 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1879 local xlen. Check xlen when decoding ambiguous compressed insns. In
1880 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1881 is_c_sw_insn instead of is_sw_insn.
1882 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1883 (riscv_software_single_step): New.
1884 * riscv-tdep.h (riscv_software_single_step): Declare.
1885
1886 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1887 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1888
1889 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1890
1891 PR gdb/18050:
1892 * target.c (dispose_inferior): Don't dispose of inferiors that are
1893 already killed.
1894
1895 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1896
1897 * remote.c (remote_target::download_tracepoint): Change char* to
1898 const char*.
1899
1900 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1901
1902 * target.h (target_options_to_string): Return an std::string.
1903 * target.c (str_comma_list_concat_elem): Return void, use
1904 std::string.
1905 (do_option): Likewise.
1906 (target_options_to_string): Return an std::string.
1907 * linux-nat.c (linux_nat_target::wait): Adjust.
1908 * target-debug.h (target_debug_print_options): Adjust.
1909
1910 2018-08-07 Tom Tromey <tom@tromey.com>
1911
1912 * Makefile.in (CPPFLAGS): New variable.
1913 (INTERNAL_CPPFLAGS): Use it.
1914
1915 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1916
1917 * NEWS: Mention the index cache.
1918
1919 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1920
1921 * common/pathstuff.h (get_standard_cache_dir): New.
1922 * common/pathstuff.c (get_standard_cache_dir): New.
1923 * build-id.h (build_id_to_string): New.
1924 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1925 DEBUG_STR_SUFFIX): Move to here.
1926 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1927 DEBUG_STR_SUFFIX): Move from there.
1928 (write_psymtabs_to_index): Make non-static, add basename
1929 parameter. Write to temporary files, rename when done.
1930 (save_gdb_index_command): Adjust call to
1931 write_psymtabs_to_index.
1932 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1933 field.
1934 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1935 (get_gdb_index_contents_from_cache): New.
1936 (get_gdb_index_contents_from_cache_dwz): New.
1937 (dwarf2_initialize_objfile): Read index from cache.
1938 (dwarf2_build_psymtabs): Save to index.
1939 * dwarf-index-cache.h: New file.
1940 * dwarf-index-cache.c: New file.
1941 * dwarf-index-write.h: New file.
1942
1943 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * gnulib/aclocal.m4: Re-generate.
1946 * gnulib/config.in: Re-generate.
1947 * gnulib/configure: Re-generate.
1948 * gnulib/import/Makefile.am: Re-generate.
1949 * gnulib/import/Makefile.in: Re-generate.
1950 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1951 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1952 * gnulib/import/m4/mkdir.m4: New file.
1953 * gnulib/import/mkdir.c: New file.
1954 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1955 module.
1956
1957 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1960 * common/scoped_mmap.c: New file.
1961 * common/scoped_mmap.h (destroy): New method.
1962 (~scoped_mmap, reset): Use destroy.
1963 (scoped_mmap): New move constructor.
1964 (mmap_file): New declaration.
1965 * unittests/scoped_mmap-selftests.c (test_normal,
1966 test_invalid_filename, run_tests): New functions.
1967 (_initialize_scoped_mmap_selftests): Register selftest.
1968
1969 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1970
1971 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1972 (read_gdb_index_from_buffer): ... this. Remove section
1973 parameter, add buffer parameter.
1974 (get_gdb_index_contents_ftype,
1975 get_gdb_index_contents_dwz_ftype): New typedefs.
1976 (dwarf2_read_gdb_index): Add callback parameters to get the
1977 index contents.
1978 (get_gdb_index_contents_from_section): New.
1979 (dwarf2_initialize_objfile): Update call to
1980 dwarf2_read_gdb_index.
1981
1982 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1983
1984 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1985 (gdb_open_cloexec): Likewise.
1986 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1987 (commandline_from_pid): Likewise.
1988 (linux_xfer_osdata_threads): Likewise.
1989 (linux_xfer_osdata_fds): Likewise.
1990 * ada-lang.c (is_package_name): Likewise.
1991 * auxv.c (procfs_xfer_auxv): Likewise.
1992 * breakpoint.c (print_one_breakpoint_location): Use
1993 uiout::field_fmt.
1994 (print_one_catch_solib): Use string_printf.
1995 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1996 (add_pe_forwarded_sym): Likewise.
1997 * dwarf2read.c (create_type_unit_group): Likewise.
1998 (build_error_marker_type): Likewise.
1999 * infcall.c (get_function_name): Likewise.
2000 * valprint.c (print_converted_chars_to_obstack): Likewise.
2001 * xtensa-tdep.c (xtensa_register_type): Likewise.
2002
2003 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2004
2005 * remote.c (remote_target::download_tracepoint): Fix format
2006 string errors.
2007
2008 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2009
2010 * tracefile.c: Include common/byte-vector.h.
2011 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2012 with trace_regblock_size if needed. Update uses of buf.
2013
2014 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2015
2016 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2017 std::vector<unsigned char>.
2018 * tracepoint.c (collection_list::collection_list): Remove
2019 m_regs_mask initializer from initializer list. Resize
2020 m_regs_mask using the largest remote register number.
2021 (collection_list::add_remote_register): Remove size check on
2022 m_regs_mask. Use at to access element.
2023 (collection_list::stringify): Change type of temp_buf to
2024 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2025 stringify the register mask. Use pack_hex_byte for the register
2026 mask.
2027
2028 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2029
2030 * tracepoint.h (class collection_list) <add_register>: Remove.
2031 <add_remote_register, add_ax_registers, add_local_register>:
2032 Declare.
2033 <add_memrange>: Add scope parameter.
2034 * tracepoint.c (encode_actions_1): Likewise.
2035 (collection_list::add_register): Rename to ...
2036 (collection_list::add_remote_register): ... this. Update
2037 comment.
2038 (collection_list::add_ax_registers, add_local_register): New
2039 methods.
2040 (collection_list::add_memrange): Add scope parameter. Call
2041 add_local_register instead of add_register.
2042 (finalize_tracepoint_aexpr): New function.
2043 (collection_list::collect_symbol): Update calls to add_memrange.
2044 Call add_local_register instead of add_register. Call
2045 add_ax_registers. Call finalize_tracepoint_aexpr.
2046 (encode_actions_1): Get remote regnos for $reg action. Call
2047 add_remote_register, add_ax_registers, and add_local_register.
2048 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2049 (validate_actionline): Call finalize_tracepoint_aexpr.
2050
2051 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2052
2053 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2054 Replace array buf with gdb::char_vector buf, of size
2055 get_remote_packet_size (). Replace references to buf and
2056 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2057 and xsnprintf with snprintf. Raise errors if the buffer is too
2058 small.
2059
2060 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2061
2062 * remote.c (remote_target::download_tracepoint): Fix the has_more
2063 predicate in the QTDP action list iteration.
2064
2065 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2066
2067 * remote.c (remote_target::download_tracepoint): Fix indentation
2068 in for block.
2069
2070 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2071
2072 * proc-api.c (_initialize_proc_api): Remove c, unused.
2073 * procfs.c (procfs_init_inferior): Remove signals, unused.
2074 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2075 unused.
2076
2077 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2078 Andrew Burgess <andrew.burgess@embecosm.com>
2079
2080 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2081 'W_STOPCODE (0)' as this could be ambiguous.
2082
2083 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2084
2085 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2086 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2087 "ai_socktype").
2088
2089 2018-08-02 Tom Tromey <tom@tromey.com>
2090
2091 PR symtab/16842.
2092 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2093 symbols.
2094 (process_structure_scope): Likewise.
2095
2096 2018-08-02 Xavier Roirand <roirand@adacore.com>
2097
2098 PR gdb/22629:
2099 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2100 kill inferior.
2101
2102 2018-08-02 Tom Tromey <tom@tromey.com>
2103
2104 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2105 (darwin_suspend_inferior, darwin_resume_inferior)
2106 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2107 (darwin_check_new_threads): Check result of get_darwin_inferior.
2108
2109 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2110
2111 GDB 8.1.1 released.
2112
2113 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2114
2115 * varobj.c (varobj_get_path_expr_parent): Report an error if
2116 parent is a dynamic varobj.
2117
2118 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2119
2120 * gnulib/aclocal.m4: Re-generate.
2121 * gnulib/config.in: Re-generate.
2122 * gnulib/configure: Re-generate.
2123 * gnulib/import/Makefile.in: Re-generate.
2124 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2125 * gnulib/import/m4/onceonly.m4: Re-generate.
2126
2127 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2128
2129 * target-descriptions.c (struct xml_test_tdesc): New.
2130 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2131 (record_xml_tdesc): Update.
2132 (maintenance_check_xml_descriptions): Update.
2133 * target-descriptions.h (record_xml_tdesc): Update comment.
2134
2135 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2136
2137 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2138 checking array bounds are defined.
2139
2140 2018-07-30 Tom Tromey <tom@tromey.com>
2141
2142 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2143 irreflexivity violation.
2144
2145 2018-07-30 Tom Tromey <tom@tromey.com>
2146
2147 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2148 * value.c (unpack_long): Remove lint code.
2149 * valops.c (value_ind): Remove lint code.
2150 * valarith.c (value_x_binop, value_x_unop, value_equal)
2151 (value_pos): Remove lint code.
2152
2153 2018-07-28 Tom de Vries <tdevries@suse.de>
2154
2155 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2156 with undefined upper bound as <optimized out>.
2157
2158 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2159
2160 * gcore.in: Rename variable "name" to "prefix". Expand
2161 "usage" text.
2162
2163 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2164
2165 * windows-nat.c (windows_nat_target::create_inferior): Update to
2166 call close() in global namespace.
2167
2168 2018-07-26 Tom Tromey <tom@tromey.com>
2169
2170 * dwarf-index-write.c (add_address_entry): Don't add objfile
2171 offsets.
2172 * dbxread.c (find_stab_function): Rename from
2173 find_stab_function_addr. Return a bound_minimal_symbol.
2174 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2175 Don't add objfile offsets.
2176 (end_psymtab): Use raw_text_low, raw_text_high,
2177 MSYMBOL_VALUE_RAW_ADDRESS.
2178 (read_ofile_symtab): Update.
2179 (process_one_symbol): Update.
2180 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2181 offsets.
2182 (dw2_relocate): Remove.
2183 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2184 searching addrmap.
2185 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2186 Update.
2187 (process_psymtab_comp_unit_reader, add_partial_symbol)
2188 (add_partial_subprogram, dwarf2_ranges_read): Update.
2189 (load_partial_dies): Update.
2190 (add_address_entry): Don't add objfile offsets.
2191 (dwarf2_build_include_psymtabs): Update.
2192 (create_addrmap_from_aranges): Don't add objfile offsets.
2193 (dw2_find_pc_sect_compunit_symtab): Update.
2194 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2195 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2196 Update.
2197 (parse_partial_symbols): Don't add objfile offsets. Use
2198 raw_text_low, raw_text_high. Update.
2199 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2200 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2201 or call 'relocate' quick function. Clear psymbol_map.
2202 * psympriv.h (struct partial_symbol) <address>: Add section
2203 offset.
2204 <set_unrelocated_address>: Rename from set_address.
2205 <raw_text_low, raw_text_high>: New methods.
2206 <text_low, text_high>: Add objfile parameter.
2207 (add_psymbol_to_bcache): Add 'section' parameter. Call
2208 set_unrelocated_address.
2209 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2210 (find_pc_psymbol): Update.
2211 (fixup_psymbol_section, relocate_psymtabs): Remove.
2212 (dump_psymtab, psym_functions): Update.
2213 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2214 parameter.
2215 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2216 (start_psymtab_common): Update.
2217 * symfile-debug.c (debug_qf_relocate): Remove.
2218 (debug_sym_quick_functions): Update.
2219 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2220 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2221 Update.
2222
2223 2018-07-26 Tom Tromey <tromey@redhat.com>
2224
2225 * dbxread.c (end_psymtab): Use text_high_valid and
2226 text_low_valid.
2227 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2228 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2229 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2230 Update comment.
2231 <text_low_valid, text_high_valid>: New fields.
2232 <set_text_low, set_text_high>: Update.
2233 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2234
2235 2018-07-26 Tom Tromey <tom@tromey.com>
2236
2237 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2238 Update.
2239 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2240 textlow and texthigh fields.
2241 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2242 Update.
2243 * mdebugread.c (parse_lines, parse_partial_symbols)
2244 (psymtab_to_symtab_1): Update.
2245 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2246 Rename fields. Update comment. Now private.
2247 <text_low, text_high, set_text_low, set_text_high>: New methods.
2248 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2249 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2250 (start_psymtab_common, maintenance_info_psymtabs)
2251 (maintenance_check_psymtabs): Update.
2252 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2253 texthigh fields.
2254 (scan_xcoff_symtab): Update.
2255
2256 2018-07-26 Tom Tromey <tromey@redhat.com>
2257
2258 * psympriv.h (struct partial_symbol) <unrelocated_address,
2259 address, set_address>: New methods.
2260 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2261 (fixup_psymbol_section, relocate_psymtabs): Update.
2262 (print_partial_symbols): Add 'objfile' parameter. Update.
2263 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2264 Update.
2265
2266 2018-07-26 Tom Tromey <tom@tromey.com>
2267
2268 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2269 (debug_names::write_psymbols): Update.
2270 * psympriv.h (struct partial_symbol): Derive from
2271 general_symbol_info.
2272 <obj_section>: New method.
2273 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2274 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2275 (find_pc_sect_psymbol, fixup_psymbol_section)
2276 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2277 (print_partial_symbols, recursively_search_psymtabs)
2278 (compare_psymbols, psymbol_hash, psymbol_compare)
2279 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2280 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2281
2282 2018-07-26 Tom Tromey <tromey@redhat.com>
2283
2284 * dbxread.c (end_psymtab): Remove dead code.
2285
2286 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2287
2288 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2289 DWARF unwinders are disabled.
2290 * dwarf2-frame.c: Add dwarf2read.h include.
2291 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2292 disabled.
2293 (dwarf2_frame_unwinders_enabled_p): Define.
2294 (show_dwarf_unwinders_enabled_p): New function.
2295 (_initialize_dwarf2_frame): Register switch to control DWARF
2296 unwinder use.
2297 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2298 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2299 (show_dwarf_cmdlist): Remove static keyword.
2300 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2301 (show_dwarf_cmdlist): Declare.
2302 * NEWS: Document new feature.
2303
2304 2018-07-26 Tom de Vries <tdevries@suse.de>
2305
2306 PR breakpoints/23366
2307 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2308
2309 2018-07-26 Tom de Vries <tdevries@suse.de>
2310
2311 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2312 DW_AT_count can't be translated to a dynamic prop.
2313
2314 2018-07-25 Tom de Vries <tdevries@suse.de>
2315
2316 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2317 try/catch.
2318
2319 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2320
2321 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2322
2323 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2324
2325 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2326
2327 2018-07-24 Keith Seitz <keiths@redhat.comt
2328
2329 PR symtab/23010
2330 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2331 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2332 instead of add_symbol_to_list.
2333 (read_file_scope): Call prepare_one_comp_unit before reading
2334 any other DIEs.
2335
2336 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2337
2338 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2339
2340 2018-07-24 Tom Tromey <tom@tromey.com>
2341
2342 * utils.c (malloc, realloc, free): Don't declare.
2343 * configure, config.in: Rebuild.
2344 * configure.ac: Don't check for declarations of free, malloc, or
2345 realloc.
2346
2347 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2348
2349 * aarch64-linux-nat.c
2350 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2351 variable.
2352 * arm-linux-nat.c (fetch_regs): Likewise.
2353 (store_regs): Likewise.
2354 (fetch_vfp_regs): Likewise.
2355 (store_vfp_regs): Likewise.
2356 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2357 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2358 (arm_linux_nat_target::insert_watchpoint): Likewise.
2359 (arm_linux_nat_target::remove_watchpoint): Likewise.
2360 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2361 Likewise.
2362 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2363 Likewise.
2364 * ppc-linux-nat.c (fetch_register): Likewise.
2365 (fetch_all_gp_regs): Likewise.
2366 (fetch_ppc_registers): Likewise.
2367 (store_all_gp_regs): Likewise.
2368 (store_ppc_registers): Likewise.
2369 (hwdebug_insert_point): Likewise.
2370 (can_use_watchpoint_cond_accel): Likewise.
2371 * remote-sim.c (gdb_os_write_stdout): Likewise.
2372
2373 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2374 Tom Tromey <tom@tromey.com>
2375
2376 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2377 test for it.
2378 * configure: Rebuild.
2379
2380 2018-07-22 Tom Tromey <tom@tromey.com>
2381
2382 * regformats/regdat.sh: Define xmltarget_${name} inside
2383 #ifndef IN_PROCESS_AGENT.
2384
2385 2018-07-22 Tom Tromey <tom@tromey.com>
2386
2387 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2388
2389 2018-07-22 Tom Tromey <tom@tromey.com>
2390
2391 * symfile.c (reread_symbols): Notify iter, not objfile.
2392
2393 2018-07-22 Tom Tromey <tom@tromey.com>
2394
2395 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2396 Use arch_ops.
2397 (ravenscar_thread_target::prepare_to_store): Likewise.
2398
2399 2018-07-22 Tom Tromey <tom@tromey.com>
2400
2401 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2402 unused variable. Call value_fetch_lazy when needed.
2403 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2404 Remove unused variable. Call value_fetch_lazy when needed.
2405
2406 2018-07-22 Tom Tromey <tom@tromey.com>
2407
2408 * m32c-tdep.c (mark_dma): Return void.
2409 (make_regs): Remove unused declarations.
2410
2411 2018-07-22 Tom Tromey <tom@tromey.com>
2412
2413 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2414 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2415 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2416 bkscm_get_valid_block_smob_arg_unsafe for effect.
2417
2418 2018-07-22 Tom Tromey <tom@tromey.com>
2419
2420 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2421 value_type.
2422
2423 2018-07-22 Tom Tromey <tom@tromey.com>
2424
2425 * windows-nat.c (saved_context): Conditionally define.
2426 * remote.c (remote_target::remote_btrace_maybe_reopen):
2427 Conditionally declare "warned".
2428 * inflow.c (sigquit_ours): Conditionally define.
2429 (new_tty): Move "tty" declaration inside #if.
2430 * guile/guile.c (guile_datadir): Conditionally define.
2431 * charset.c (set_be_le_names): Move some declarations inside #if.
2432 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2433 #if.
2434 (parse_xml_btrace_conf): Likewise.
2435
2436 2018-07-22 Tom Tromey <tom@tromey.com>
2437
2438 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2439
2440 2018-07-22 Tom Tromey <tom@tromey.com>
2441
2442 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2443 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2444 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2445 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2446 * stack.c (frame_apply_level_command): Remove unused variable.
2447 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2448 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2449 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2450 unused variable.
2451 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2452 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2453 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2454 variable.
2455 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2456 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2457 variable.
2458 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2459 Remove unused variable.
2460 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2461 variable.
2462 * common/tdesc.c (print_xml_feature::visit): Remove unused
2463 variable.
2464 * compile/compile-object-load.c (store_regs): Remove unused
2465 variables.
2466 * complaints.c (clear_complaints): Remove unused variable.
2467 * corelow.c (core_target_open): Remove unused variable.
2468 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2469 variable.
2470 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2471 variable.
2472 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2473 variable.
2474 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2475 variable.
2476 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2477 variable.
2478 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2479 variable.
2480 * ia64-tdep.c (examine_prologue): Remove unused variable.
2481 * infcall.c (run_inferior_call): Remove unused variable.
2482 * inferior.c (exit_inferior): Remove unused variable.
2483 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2484 * linespec.c (decode_line_2): Remove unused variable.
2485 * linux-nat.c (super_close): Remove.
2486 * linux-tdep.c (linux_info_proc): Remove unused variable.
2487 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2488 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2489 Remove unused variable.
2490 * parse.c (find_minsym_type_and_address): Remove unused variable.
2491 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2492 variable.
2493 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2494 variable.
2495 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2496 variables.
2497 * record-btrace.c (record_btrace_target::store_registers): Remove
2498 unused variable.
2499 (cmd_show_record_btrace_cpu): Remove unused variable.
2500 * riscv-tdep.c (riscv_register_reggroup_p)
2501 (riscv_push_dummy_call, riscv_return_value): Remove unused
2502 variable.
2503 * rust-exp.y (literal): Remove unused variable.
2504 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2505 unused variable.
2506 <STRUCTOP_ANONYMOUS>: Likewise.
2507 * s390-linux-tdep.c (s390_linux_init_abi_31)
2508 (s390_linux_init_abi_64): Remove unused variable.
2509 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2510 (file_select_thread, net_windows_open, _initialize_ser_windows):
2511 Remove unused variables.
2512 * symtab.c (find_pc_sect_line): Remove unused variable.
2513 * target-memory.c (compute_garbled_blocks): Remove unused
2514 variable.
2515 (target_write_memory_blocks): Remove unused variable.
2516 * target.c (target_stack::unpush): Remove unused variables.
2517 * tracepoint.c (start_tracing, all_tracepoint_actions)
2518 (merge_uploaded_trace_state_variables)
2519 (print_one_static_tracepoint_marker): Remove unused variable.
2520 * unittests/basic_string_view/element_access/char/1.cc (test01):
2521 Remove unused variable.
2522 * windows-nat.c (windows_continue, windows_add_all_dlls)
2523 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2524 Remove unused variables.
2525
2526 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2527
2528 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2529 attr_profile in HAVE_ELF.
2530 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2531 HAVE_ELF.
2532
2533 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2534
2535 * frame.c (frame_register_unwind): Change parameter name.
2536 (frame_unwind_register): Likewise.
2537 (frame_unwind_register_value): Likewise.
2538 (frame_unwind_register_signed): Likewise.
2539 (frame_unwind_register_unsigned): Likewise.
2540 * frame.h (frame_register_unwind): Likewise.
2541 (frame_unwind_register): Likewise.
2542 (frame_unwind_register_value): Likewise.
2543 (frame_unwind_register_signed): Likewise.
2544 (frame_unwind_register_unsigned): Likewise.
2545 (frame_unwind_arch): Likewise.
2546
2547 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2548
2549 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2550 ISA maintenance.
2551
2552 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2553
2554 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2555 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2556 hand.
2557
2558 2018-07-20 Keith Seitz <keiths@redhat.com>
2559
2560 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2561 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2562 m_compunit_symtab, m_language>: Add "m_" prefix.
2563 Update all uses.
2564 * buildsym.c: Update all uses.
2565
2566 2018-07-20 Tom Tromey <tom@tromey.com>
2567
2568 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2569 * buildsym.h (record_line_ftype): Remove typedef.
2570
2571 2018-07-20 Tom Tromey <tom@tromey.com>
2572
2573 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2574 (end_expandable_symtab): Likewise.
2575 (end_symtab_get_static_block): Likewise.
2576 (end_symtab_from_static_block): Likewise.
2577 * buildsym-legacy.c (augment_type_symtab): Remove.
2578 (end_expandable_symtab): Remove.
2579 (end_symtab_get_static_block): Remove.
2580 (end_symtab_from_static_block): Remove.
2581
2582 2018-07-20 Tom Tromey <tom@tromey.com>
2583
2584 * dwarf2read.c: Include buildsym.h.
2585 (struct dwarf2_cu) <builder>: New method.
2586 (fixup_go_packaging): Update.
2587 (process_full_comp_unit, process_full_type_unit): Update. Don't
2588 use scoped_free_pendings.
2589 (using_directives): Add "cu" parameter, remove "language".
2590 (read_import_statement, setup_type_unit_groups, )
2591 (read_func_scope, read_lexical_block_scope)
2592 (dwarf2_record_block_ranges, read_namespace): Update.
2593 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2594 (lnp_state_machine::handle_end_sequence): Update.
2595 (class lnp_state_machine) <m_cu>: New member.
2596 <m_record_line_callback>: Remove.
2597 <m_currently_recording_lines>: New member.
2598 (lnp_state_machine::handle_set_file): Update.
2599 (noop_record_line): Remove.
2600 (dwarf_record_line_p): Add cu parameter.
2601 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2602 (lnp_state_machine::record_line)
2603 (lnp_state_machine::lnp_state_machine)
2604 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2605 (dwarf_decode_lines): Update.
2606 (dwarf2_start_subfile): Add cu parameter.
2607 (dwarf2_start_symtab, new_symbol): Update.
2608 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2609 Remove dwarf2_per_objfile parameter.
2610 (dwarf_decode_macros): Update.
2611
2612 2018-07-20 Tom Tromey <tom@tromey.com>
2613
2614 * stabsread.c (define_symbol): Update.
2615 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2616 * dwarf2read.c (new_symbol): Update.
2617 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2618 * cp-namespace.c: Include buildsym.h.
2619 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2620 * buildsym-legacy.c (get_buildsym_compunit): New function.
2621
2622 2018-07-20 Tom Tromey <tom@tromey.com>
2623
2624 * xcoffread.c: Include buildsym-legacy.h.
2625 * windows-nat.c: Include buildsym-legacy.h.
2626 * stabsread.c: Include buildsym-legacy.h.
2627 * mdebugread.c: Include buildsym-legacy.h.
2628 * buildsym-legacy.h: New file.
2629 * buildsym-legacy.c: New file, from buildsym.c.
2630 * go32-nat.c: Include buildsym-legacy.h.
2631 * dwarf2read.c: Include buildsym-legacy.h.
2632 * dbxread.c: Include buildsym-legacy.h.
2633 * cp-namespace.c: Include buildsym-legacy.h.
2634 * coffread.c: Include buildsym-legacy.h.
2635 * buildsym.h: Move some contents to buildsym-legacy.h.
2636 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2637 buildsym-legacy.c.
2638 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2639
2640 2018-07-20 Tom Tromey <tom@tromey.com>
2641
2642 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2643 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2644 (buildsym_compunit::buildsym_compunit)
2645 (buildsym_compunit::~buildsym_compunit)
2646 (buildsym_compunit::get_macro_table): Define.
2647
2648 2018-07-20 Tom Tromey <tom@tromey.com>
2649
2650 * buildsym.c (reset_symtab_globals): Remove.
2651 (buildsym_compunit::end_symtab_from_static_block): Update.
2652 (buildsym_compunit::augment_type_symtab): Update.
2653 (end_symtab_from_static_block): Call free_buildsym_compunit.
2654 (augment_type_symtab, end_symtab, end_expandable_symtab):
2655 Likewise.
2656
2657 2018-07-20 Tom Tromey <tom@tromey.com>
2658
2659 * arch-utils.c: Do not include buildsym.h.
2660 * mipsread.c: Do not include buildsym.h.
2661 * machoread.c: Do not include buildsym.h.
2662 * elfread.c: Do not include buildsym.h.
2663
2664 2018-07-20 Tom Tromey <tom@tromey.com>
2665
2666 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2667 initialization.
2668 (buildsym_compunit): Add new constructor.
2669 (struct buildsym_compunit) <get_last_source_file, finish_block,
2670 record_block_range, start_subfile, patch_subfile_names,
2671 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2672 set_last_source_start_addr, get_last_source_start_addr,
2673 get_local_using_directives, set_local_using_directives,
2674 get_global_using_directives, outermost_context_p,
2675 get_current_context_stack, get_context_stack_depth,
2676 get_current_subfile, get_local_symbols, get_file_symbols,
2677 get_global_symbols, record_debugformat, record_producer,
2678 push_context, pop_context, end_symtab_get_static_block,
2679 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2680 New public methods.
2681 <record_pending_block, finish_block_internal, make_blockvector,
2682 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2683 private methods.
2684 Update all users.
2685
2686 2018-05-22 Tom Tromey <tom@tromey.com>
2687
2688 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2689 parameter.
2690 (finish_block_internal): Update.
2691
2692 2018-07-20 Tom Tromey <tom@tromey.com>
2693
2694 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2695 parameter.
2696 (finish_block_internal): Update.
2697
2698 2018-07-20 Tom Tromey <tom@tromey.com>
2699
2700 * buildsym.h (EXTERN): Don't define or undef.
2701 * buildsym.c (EXTERN): Don't define.
2702
2703 2018-07-20 Tom Tromey <tom@tromey.com>
2704
2705 * buildsym.c: Remove TODO comment.
2706
2707 2018-07-20 Tom Tromey <tom@tromey.com>
2708
2709 * coffread.c (coff_symtab_read): Update.
2710 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2711 (xcoff_new_init): Update.
2712 * mipsread.c (mipscoff_new_init): Update.
2713 * mdebugread.c (mdebug_build_psymtabs): Update.
2714 * elfread.c (elf_new_init): Update.
2715 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2716 Update.
2717 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2718 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2719 (stabsect_build_psymtabs): Update.
2720 * buildsym.h (buildsym_init): Don't declare.
2721 * buildsym.c: Update comment.
2722 (prepare_for_building): Remove.
2723 (start_symtab, restart_symtab): Update.
2724 (reset_symtab_globals): Update comment.
2725 (buildsym_init): Remove.
2726
2727 2018-07-20 Tom Tromey <tom@tromey.com>
2728
2729 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2730 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2731 (read_enum_type, common_block_start, common_block_end)
2732 (cleanup_undefined_types_1, finish_global_stabs): Update.
2733 * mdebugread.c (psymtab_to_symtab_1): Update.
2734 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2735 (read_lexical_block_scope, new_symbol): Update.
2736 * dbxread.c (process_one_symbol): Update.
2737 * coffread.c (coff_symtab_read, process_coff_symbol)
2738 (coff_read_enum_type): Update.
2739 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2740 declare.
2741 (get_local_symbols, get_file_symbols, get_global_symbols): New
2742 functions.
2743 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2744 m_global_symbols.
2745 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2746 (~scoped_free_pendings): Update.
2747 (finish_block, prepare_for_building, reset_symtab_globals)
2748 (end_symtab_get_static_block, end_symtab_with_blockvector)
2749 (augment_type_symtab, push_context): Update.
2750 (get_local_symbols, get_file_symbols, get_global_symbols): New
2751 functions.
2752 (buildsym_init): Update.
2753
2754 2018-07-20 Tom Tromey <tom@tromey.com>
2755
2756 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2757 (process_full_type_unit): Likewise.
2758 (dwarf2_start_symtab): Set list_in_scope.
2759
2760 2018-07-20 Tom Tromey <tom@tromey.com>
2761
2762 * dwarf2read.c (process_psymtab_comp_unit_reader)
2763 (build_type_psymtabs_reader): Do not set list_in_scope.
2764
2765 2018-07-20 Tom Tromey <tom@tromey.com>
2766
2767 * buildsym.c (free_pendings): Remove.
2768 (add_symbol_to_list, scoped_free_pendings)
2769 (finish_block_internal, buildsym_init): Update.
2770
2771 2018-07-20 Tom Tromey <tom@tromey.com>
2772
2773 * xcoffread.c (read_xcoff_symtab): Update.
2774 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2775 Update.
2776 * dbxread.c (process_one_symbol): Update.
2777 * coffread.c (coff_symtab_read): Update.
2778 * buildsym.h (finish_block): Update.
2779 * buildsym.c (finish_block): Remove "listhead" argument.
2780 (end_symtab_get_static_block): Update.
2781
2782 2018-07-20 Tom Tromey <tom@tromey.com>
2783
2784 * buildsym.h (class scoped_free_pendings): Remove constructor.
2785 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2786 method.
2787 <m_pending_block_obstack, m_pending_blocks>: New members.
2788 (pending_block_obstack, pending_blocks): Remove.
2789 (scoped_free_pendings::scoped_free_pendings): Default.
2790 (~scoped_free_pendings): Update.
2791 (free_pending_blocks): Remove.
2792 (finish_block_internal, record_pending_block, make_blockvector)
2793 (end_symtab_get_static_block, augment_type_symtab, push_context)
2794 (buildsym_init): Update.
2795
2796 2018-07-20 Tom Tromey <tom@tromey.com>
2797
2798 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2799 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2800 members.
2801 (pending_addrmap, pending_addrmap_obstack)
2802 (pending_addrmap_interesting): Remove.
2803 (scoped_free_pendings, record_block_range, make_blockvector)
2804 (prepare_for_building, reset_symtab_globals, buildsym_init):
2805 Update.
2806
2807 2018-07-20 Tom Tromey <tom@tromey.com>
2808
2809 * xcoffread.c (process_linenos): Update.
2810 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2811 * mdebugread.c (psymtab_to_symtab_1): Update.
2812 * dwarf2read.c (setup_type_unit_groups)
2813 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2814 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2815 * dbxread.c (process_one_symbol): Update.
2816 * coffread.c (coff_symtab_read, enter_linenos)
2817 (process_coff_symbol): Update.
2818 * buildsym.h (current_subfile): Don't declare.
2819 (get_current_subfile): Declare.
2820 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2821 member.
2822 (start_subfile, free_buildsym_compunit, push_subfile)
2823 (prepare_for_building, start_symtab): Update.
2824 (get_current_subfile): New function.
2825
2826 2018-07-20 Tom Tromey <tom@tromey.com>
2827
2828 * coffread.c (coff_symtab_read): Update.
2829 * xcoffread.c (read_xcoff_symtab): Update.
2830 * dwarf2read.c (new_symbol): Update.
2831 (read_func_scope, read_lexical_block_scope): Update.
2832 * dbxread.c (process_one_symbol): Update.
2833 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2834 (outermost_context_p): Remove macro.
2835 (outermost_context_p, get_current_context_stack)
2836 (get_context_stack_depth): Declare.
2837 (pop_context): Return struct context_stack.
2838 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2839 member.
2840 (context_stack_size): Remove.
2841 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2842 (prepare_for_building, end_symtab_get_static_block)
2843 (augment_type_symtab, push_context): Update.
2844 (pop_context): Return struct context_stack.
2845 (outermost_context_p, get_current_context_stack)
2846 (get_context_stack_depth): New functions.
2847 (buildsym_init): Update.
2848
2849 2018-07-20 Tom Tromey <tom@tromey.com>
2850
2851 * rust-exp.y: Now a pure parser. Update all rules.
2852 (%union): Move earlier.
2853 (current_parser, work_obstack): Remove globals.
2854 (rust_parser, ~rust_parser): Update.
2855 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2856 lex_character, lex_number, lex_string, lex_identifier,
2857 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2858 convert_name, convert_params_to_expression,
2859 convert_ast_to_expression, ast_basic_type, ast_operation,
2860 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2861 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2862 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2863 ast_array_type, ast_slice_type, ast_reference_type,
2864 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2865 (rust_parse): Update.
2866 (rustyyerror, rustyylex): Add parser parameter.
2867 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2868 (rust_lex_stringish_test, rust_lex_test_sequence)
2869 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2870 (rust_lex_test_push_back, rust_lex_tests): Update.
2871
2872 2018-07-19 Pedro Alves <palves@redhat.com>
2873
2874 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2875 gdb::unique_xmalloc_ptr.
2876 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2877 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2878 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2879 copy-initialization.
2880 * guile/scm-pretty-print.c (ppscm_print_children): Use
2881 gdb::unique_xmalloc_ptr instead of cleanups.
2882 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2883 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2884 gdb::unique_xmalloc_ptr.
2885 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2886 Adjust to use gdb::unique_xmalloc_ptr.
2887 * guile/scm-utils.c (extract_arg): Adjust.
2888 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2889 gdb::unique_xmalloc_ptr instead of a cleanup.
2890
2891 2018-07-19 Tom Tromey <tom@tromey.com>
2892
2893 * utils.c (do_value_free_to_mark)
2894 (make_cleanup_value_free_to_mark): Remove.
2895 * utils.h (make_cleanup_value_free_to_mark): Remove.
2896
2897 2018-07-19 Pedro Alves <palves@redhat.com>
2898
2899 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2900 forwarding reference.
2901
2902 2018-07-18 Pedro Alves <palves@redhat.com>
2903
2904 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2905 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2906 cleanup.
2907
2908 2018-07-18 Pedro Alves <palves@redhat.com>
2909
2910 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2911 exceptions.
2912 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2913 (gdbscm_wrap): New.
2914 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2915 directly instead of a cleanup.
2916 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2917 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2918 (vlscm_binop_gdbthrow): New, factored out from ...
2919 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2920 (vlscm_rich_compare): Use gdbscm_wrap.
2921 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2922 instead of a cleanup.
2923 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2924 cleanup.
2925 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2926 Use xfree directly instead of a cleanup.
2927 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2928 Adjust to use gdbscm_wrap and scoped_value_mark.
2929 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2930 (gdbscm_value_address, gdbscm_value_dereference)
2931 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2932 scoped_value_mark.
2933 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2934 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2935 scoped_value_mark.
2936 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2937 gdbscm_wrap and scoped_value_mark.
2938 (gdbscm_value_to_string): Use xfree directly instead of a
2939 cleanup. Move 'buffer' unique_ptr to TRY scope.
2940 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2941 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2942 scoped_value_mark.
2943 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2944 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2945 scoped_value_mark.
2946 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2947 gdbscm_wrap.
2948
2949 2018-07-18 Tom de Vries <tdevries@suse.de>
2950
2951 * findvar.c (default_read_var_value): Also resolve dynamic type for
2952 LOC_OPTIMIZED_OUT vars.
2953
2954 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2955
2956 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2957 decoding.
2958
2959 2018-07-17 Tom Tromey <tom@tromey.com>
2960
2961 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2962 (compute_enum_list, pascm_set_param_value_x)
2963 (gdbscm_parameter_value): Update.
2964 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2965 (gdbscm_scm_to_host_string): Update.
2966 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2967 Update.
2968 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2969 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2970 * guile/scm-string.c (gdbscm_scm_to_string): Return
2971 unique_xmalloc_ptr.
2972 (gdbscm_scm_to_host_string): Likewise.
2973
2974 2018-07-17 Tom Tromey <tom@tromey.com>
2975
2976 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2977 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2978 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2979 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2980 unique_xmalloc_ptr.
2981
2982 2018-07-17 Tom Tromey <tom@tromey.com>
2983
2984 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2985 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2986 Update.
2987 * guile/scm-cmd.c (cmdscm_function): Update.
2988 * guile/scm-pretty-print.c
2989 (ppscm_print_exception_unless_memory_error): Update.
2990 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2991 Return unique_xmalloc_ptr.
2992
2993 2018-07-17 Tom Tromey <tom@tromey.com>
2994
2995 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2996 Use string_printf.
2997
2998 2018-07-17 Jim Wilson <jimw@sifive.com>
2999
3000 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3001 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3002 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3003 unecessary braces after EF_RISCV_RVC test. Delete call to
3004 set_gdbarch_decr_pc_after_break.
3005
3006 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3007 RISCV_LAST_FP_REGNUM + 1.
3008 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3009
3010 2018-07-17 Tom Tromey <tom@tromey.com>
3011
3012 * configure.ac: Remove --disable-gdbcli.
3013 * configure: Rebuild.
3014 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3015 (SUBDIR_CLI_CFLAGS): Remove.
3016 (SFILES): Use SUBDIR_CLI_SRCS.
3017 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3018
3019 2018-07-17 Tom Tromey <tom@tromey.com>
3020
3021 PR gdb/18624:
3022 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3023
3024 2018-07-16 Jim Wilson <jimw@sifive.com>
3025
3026 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3027
3028 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3029
3030 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3031 variable.
3032 (libunwind_frame_sniffer): Likewise.
3033 (libunwind_frame_prev_register): Likewise.
3034 (libunwind_sigtramp_frame_sniffer): Likewise.
3035 * ia64-tdep.c (ia64_access_reg): Likewise.
3036 (ia64_access_rse_reg): Likewise.
3037 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3038 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3039
3040 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3041
3042 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3043
3044 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3045
3046 * remote-sim.c (gdbsim_target::close,
3047 gdbsim_target::mourn_inferior): Remove unused variables.
3048
3049 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3050
3051 * ia64-tdep.c (ktab_buf): New global.
3052 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3053 (get_kernel_table): Adjust.
3054
3055 2018-07-16 Tom Tromey <tom@tromey.com>
3056
3057 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3058 * dwarf2read.c (using_directives, new_symbol): Use
3059 outermost_context_p.
3060 * dbxread.c (process_one_symbol): Use outermost_context_p.
3061 * coffread.c (coff_symtab_read): Use outermost_context_p.
3062
3063 2018-07-16 Tom Tromey <tom@tromey.com>
3064
3065 * dwarf2read.c (using_directives, read_func_scope)
3066 (read_lexical_block_scope): Update.
3067 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3068 * buildsym.h (local_using_directives, global_using_directives):
3069 Don't declare.
3070 (get_local_using_directives, set_local_using_directives)
3071 (get_global_using_directives): Declare.
3072 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3073 m_global_using_directives>: New members.
3074 (finish_block_internal, prepare_for_building)
3075 (reset_symtab_globals, end_symtab_get_static_block)
3076 (push_context): Update.
3077 (get_local_using_directives, set_local_using_directives)
3078 (get_global_using_directives): New functions.
3079 (buildsym_init): Update.
3080
3081 2018-07-16 Tom Tromey <tom@tromey.com>
3082
3083 * xcoffread.c (xcoff_initial_scan): Don't call
3084 free_pending_blocks.
3085 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3086 * buildsym.h (class scoped_free_pendings): Add constructor.
3087 (free_pending_blocks): Don't declare.
3088 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3089 (free_pending_blocks): Now static.
3090
3091 2018-07-16 Tom Tromey <tom@tromey.com>
3092
3093 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3094 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3095 member.
3096 (struct subfile_stack): Remove.
3097 (subfile_stack): Remove.
3098 (push_subfile, pop_subfile, buildsym_init): Update.
3099
3100 2018-07-16 Tom Tromey <tom@tromey.com>
3101
3102 * buildsym.c (push_subfile): Use gdb_assert.
3103 (pop_subfile): Use gdb_assert.
3104
3105 2018-07-16 Tom Tromey <tom@tromey.com>
3106
3107 * buildsym.h (merge_symbol_lists): Remove.
3108 * buildsym.c (merge_symbol_lists): Remove.
3109
3110 2018-07-16 Tom Tromey <tom@tromey.com>
3111
3112 * stabsread.c (scan_file_globals): Update comment.
3113 * stabsread.h (scan_file_globals): Move from buildsym.h.
3114 * buildsym.h (scan_file_globals): Move to stabsread.h.
3115
3116 2018-07-16 Tom Tromey <tom@tromey.com>
3117
3118 * xcoffread.c (xcoff_new_init): Update.
3119 * mipsread.c (mipscoff_new_init): Update.
3120 * mdebugread.c (mdebug_build_psymtabs): Update.
3121 * elfread.c (elf_new_init): Update.
3122 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3123 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3124 * buildsym.h (buildsym_new_init): Don't declare.
3125 * buildsym.c (buildsym_new_init): Remove.
3126
3127 2018-07-16 Tom Tromey <tom@tromey.com>
3128
3129 * stabsread.h (within_function): Move from buildsym.h.
3130 * stabsread.c (start_stabs): Clear within_function.
3131 * coffread.c (coff_start_symtab): Clear within_function.
3132 * buildsym.h (within_function): Move to stabsread.h.
3133 * buildsym.c (prepare_for_building): Update.
3134
3135 2018-07-16 Tom Tromey <tom@tromey.com>
3136
3137 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3138 * dwarf2read.c (dwarf2_start_symtab): Don't set
3139 processing_gcc_compilation.
3140 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3141
3142 2018-07-16 Tom Tromey <tom@tromey.com>
3143
3144 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3145 (next_symbol_text_func): Move from buildsym.h.
3146 * stabsread.c (hashname): Move from buildsym.c.
3147 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3148 (next_symbol_text_func, hashname): Move to stabsread.h.
3149 * buildsym.c: Don't include bcache.h
3150 (hashname): Move to stasbread.c.
3151
3152 2018-07-16 Tom Tromey <tom@tromey.com>
3153
3154 * buildsym.h (context_stack_size): Don't declare.
3155 * buildsym.c (context_stack_size): New global.
3156
3157 2018-07-16 Tom Tromey <tom@tromey.com>
3158
3159 * dbxread.c (processing_acc_compilation): New global.
3160 * buildsym.h (processing_acc_compilation): Don't declare.
3161
3162 2018-07-16 Tom Tromey <tom@tromey.com>
3163
3164 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3165 * dbxread.c (read_ofile_symtab): Update.
3166 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3167 * buildsym.h (last_source_start_addr): Remove.
3168 (set_last_source_start_addr, get_last_source_start_addr):
3169 Declare.
3170 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3171 parameter.
3172 (struct buildsym_compunit) <m_last_source_start_addr>: New
3173 member.
3174 (prepare_for_building): Remove start_addr parameter.
3175 (start_symtab, restart_symtab, end_symtab_get_static_block)
3176 (end_symtab_with_blockvector): Update.
3177 (set_last_source_start_addr, get_last_source_start_addr): New
3178 functions.
3179
3180 2018-07-16 Tom Tromey <tom@tromey.com>
3181
3182 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3183 member.
3184 (have_line_numbers): Remove.
3185 (record_line, prepare_for_building, end_symtab_get_static_block)
3186 (augment_type_symtab): Update.
3187
3188 2018-07-16 Tom Tromey <tom@tromey.com>
3189
3190 * buildsym.c (~buildsym_compunit): Free the macro table.
3191 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3192 methods.
3193 <m_pending_macros>: New member.
3194 (pending_macros): Remove.
3195 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3196 (reset_symtab_globals, end_symtab_get_static_block)
3197 (end_symtab_with_blockvector, augment_type_symtab)
3198 (buildsym_init): Update.
3199
3200 2018-07-16 Tom Tromey <tom@tromey.com>
3201
3202 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3203 parameter.
3204 (buildsym_compunit::set_last_source_file): New method.
3205 <m_last_source_file>: New member.
3206 (prepare_for_building): Remove "name" parameter.
3207 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3208 (last_source_file): Remove.
3209 (set_last_source_file, get_last_source_file): Update.
3210
3211 2018-07-16 Tom Tromey <tom@tromey.com>
3212
3213 * buildsym.c (prepare_for_building): Add assert.
3214
3215 2018-07-16 Tom Tromey <tom@tromey.com>
3216
3217 * buildsym.c (~buildsym_compunit): Update.
3218 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3219 (start_subfile, patch_subfile_names)
3220 (end_symtab_with_blockvector): Update.
3221
3222 2018-07-16 Tom Tromey <tom@tromey.com>
3223
3224 * buildsym.c (struct buildsym_compunit): Add constructor,
3225 destructor, initializers.
3226 (start_buildsym_compunit): Remove.
3227 (free_buildsym_compunit): Use "delete".
3228 (start_symtab, restart_symtab): Use "new".
3229
3230 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3231
3232 * symfile.c (set_objfile_default_section_offset): Remove struct
3233 keyword.
3234
3235 2018-07-14 Stafford Horne <shorne@gmail.com>
3236
3237 * (Responsible Maintainers): Add myself as or1k maintainer.
3238
3239 2018-07-13 Tom Tromey <tom@tromey.com>
3240
3241 * symfile.c (set_objfile_default_section_offset): Use extra braces
3242 around initializer.
3243
3244 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3245
3246 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3247 non-branching basr.
3248
3249 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3250
3251 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3252 unittests/cli-utils-selftests.c
3253 * unittests/cli-utils-selftests.c: New file.
3254
3255 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3256
3257 * NEWS: Mention new commands. Mention change to 'thread apply'.
3258
3259 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3260
3261 * thread.c (thr_try_catch_cmd): New function.
3262 (thread_apply_all_command): Handle qcs flags.
3263 (thread_apply_command): Handle qcs flags.
3264 (taas_command): New function.
3265 (tfaas_command): New function.
3266 (_initialize_thread): Update to setup the new commands 'taas
3267 and 'tfaas'. Change doc string for 'thread apply'.
3268
3269 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3270
3271 * stack.c: (trailing_outermost_frame): New function, mostly
3272 extracted from backtrace_command_1.
3273 (leading_innermost_frame): New function.
3274 (backtrace_command_1): Update to call trailing_outermost_frame.
3275 (frame_apply_command_count): New function.
3276 (frame_apply_level_command): New function.
3277 (frame_apply_all_command): New function.
3278 (frame_apply_command): New function.
3279 (faas_command): New function.
3280 (frame_cmd_list): New variable.
3281 (_initialize_stack): Update to setup the new commands 'frame apply'
3282 and 'faas'.
3283
3284 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3285
3286 * cli-utils.c (number_or_range_parser::get_number): Only handle
3287 numbers or convenience var as numbers.
3288 (parse_flags): New function.
3289 (parse_flags_qcs): New function.
3290 (number_or_range_parser::finished): Ensure parsing end is detected
3291 before end of string.
3292 * cli-utils.h (parse_flags): New function.
3293 (parse_flags_qcs): New function.
3294 (number_or_range_parser): Remove m_finished bool.
3295 (number_or_range_parser::skip_range): Set m_in_range to false.
3296
3297 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3298
3299 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3300 on Windows.
3301
3302 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3303 Jan Kratochvil <jan.kratochvil@redhat.com>
3304 Paul Fertser <fercerpav@gmail.com>
3305 Tsutomu Seki <sekiriki@gmail.com>
3306 Pedro Alves <palves@redhat.com>
3307
3308 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3309 'unittests/parse-connection-spec-selftests.c'.
3310 (COMMON_SFILES): Add 'common/netstuff.c'.
3311 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3312 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3313 * common/netstuff.c: New file.
3314 * common/netstuff.h: New file.
3315 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3316 (wait_for_connect): Update comment. New parameter
3317 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3318 Use 'sock' directly instead of 'scb->fd'.
3319 (try_connect): New function, with code from 'net_open'.
3320 (net_open): Rewrite main loop to deal with multiple
3321 sockets/addresses. Handle IPv6-style hostnames; implement
3322 support for IPv6 connections.
3323 * unittests/parse-connection-spec-selftests.c: New file.
3324
3325 2018-07-11 Pedro Alves <palves@redhat.com>
3326
3327 PR gdb/23377
3328 * remote.c (remote_target::remote_detach_pid): Call
3329 set_current_process.
3330
3331 2018-07-11 Pedro Alves <palves@redhat.com>
3332
3333 * h8300-tdep.c (h8300_gdbarch_init): Remove
3334 set_gdbarch_ecoff_reg_to_regnum calls.
3335
3336 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3337
3338 PR c++/23373
3339 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3340 offsets/sizes for static members of a class/struct.
3341
3342 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3343
3344 * target-descriptions.c (tdesc_register_bitsize): Rename.
3345 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3346 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3347 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3348
3349 2018-07-10 Tom Tromey <tom@tromey.com>
3350
3351 * breakpoint.c (moribund_locations): Now static and a
3352 std::vector.
3353 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3354 (build_bpstat_chain, update_global_location_list)
3355 (breakpoint_retire_moribund): Update.
3356 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3357 VEC.
3358
3359 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3360
3361 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3362 (riscv_register_reggroup_p): Use new function, remove unneeded
3363 parenthesis.
3364 (riscv_push_dummy_call): Extend assert to compare against xlen or
3365 flen based on register type.
3366
3367 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3368
3369 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3370
3371 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3372
3373 * remote.c (show_hardware_watchpoint_limit): New function.
3374 (show_hardware_watchpoint_length_limit): New function.
3375 (show_hardware_breakpoint_limit): New function.
3376 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3377 where appropriate, update help text.
3378
3379 2018-07-09 Tom Tromey <tom@tromey.com>
3380
3381 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3382 (CLIBS): Don't mention NAT_CLIBS.
3383
3384 2018-07-09 Tom Tromey <tom@tromey.com>
3385
3386 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3387 (LIBGDB_OBS, clean mostlyclean): Update.
3388 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3389
3390 2018-07-09 Tom Tromey <tom@tromey.com>
3391
3392 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3393 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3394 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3395
3396 2018-07-09 Tom Tromey <tom@tromey.com>
3397
3398 * Makefile.in (ALLDEPFILES): Remove exec.c.
3399 (COMMON_OBS): Remove exec.o.
3400 (COMMON_SFILES): Add exec.c.
3401
3402 2018-07-09 Tom Tromey <tom@tromey.com>
3403
3404 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3405
3406 2018-07-09 Tom Tromey <tom@tromey.com>
3407
3408 * Makefile.in (clean mostlyclean): Remove stamp-version.
3409 (version.c): Depend on stamp-version.
3410 (stamp-version): New rule, from version.c rule.
3411
3412 2018-07-09 Tom Tromey <tom@tromey.com>
3413
3414 * Makefile.in (init.c): Depend on stamp-init.
3415 (stamp-init): New rule, from init.c rule.
3416 (clean mostlyclean): Remove stamp-init.
3417
3418 2018-07-09 Tom Tromey <tom@tromey.com>
3419
3420 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3421 SUBDIR_GCC_COMPILE_SRCS.
3422
3423 2018-07-09 Tom Tromey <tom@tromey.com>
3424
3425 * Makefile.in (init.c): Remove some unused sed rules.
3426
3427 2018-07-09 Tom Tromey <tom@tromey.com>
3428
3429 * Makefile.in (TSOBS): Remove.
3430 (INIT_FILES): Update.
3431 (LIBGDB_OBS): Update.
3432 (COMMON_SFILES): Add inflow.c.
3433 (SFILES): Remove inflow.c.
3434
3435 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3436
3437 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3438
3439 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3440
3441 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3442 get_saveloc_name, is_signal_frame_name, step_name,
3443 init_remote_name, create_addr_space_name,
3444 destroy_addr_space_name, search_unwind_table_name,
3445 find_dyn_list_name): Constify.
3446
3447 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3448
3449 * darwin-nat.c (darwin_pthread_kill): New function.
3450 (darwin_resume_thread): Use darwin_pthread_kill.
3451
3452 2018-07-05 Tom de Vries <tdevries@suse.de>
3453
3454 * macroexp.c (macro_buffer) <operator=>: New member function.
3455
3456 2018-07-04 Tom Tromey <tom@tromey.com>
3457
3458 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3459
3460 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3461
3462 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3463 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3464 * maint.c: Likewise.
3465 * top.c: Likewise.
3466
3467 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3468
3469 * NEWS: Create a new section for the next release branch.
3470 Rename the section of the current branch, now that it has
3471 been cut.
3472
3473 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3474
3475 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3476 * version.in: Bump version to 8.2.50.DATE-git.
3477
3478 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3479 Pedro Alves <palves@redhat.com>
3480
3481 * linux-nat.c (linux_init_ptrace): Rename to ...
3482 (linux_init_ptrace_procfs): ... this. Call
3483 linux_proc_init_warnings.
3484 (linux_nat_target::post_attach)
3485 (linux_nat_target::post_startup_inferior): Adjust.
3486 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3487 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3488
3489 2018-07-04 Tom de Vries <tdevries@suse.de>
3490
3491 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3492 check ...
3493 (read_comp_unit_head): ... here.
3494
3495 2018-07-03 Tom Tromey <tom@tromey.com>
3496
3497 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3498 (stop_tracing, tstatus_command)
3499 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3500 (print_one_static_tracepoint_marker): Update.
3501 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3502 std::vector.
3503 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3504 VEC.
3505 (all_tracepoints, static_tracepoints_here): Return std::vector.
3506
3507 2018-07-03 Tom Tromey <tom@tromey.com>
3508
3509 * common/ptid.c (ptid_equal): Remove.
3510 * common/ptid.h (ptid_equal): Don't declare.
3511 * ada-tasks.c: Update.
3512 * breakpoint.c: Update.
3513 * common/agent.c: Update.
3514 * corelow.c: Update.
3515 * darwin-nat-info.c: Update.
3516 * darwin-nat.c: Update.
3517 * dcache.c: Update.
3518 * dtrace-probe.c: Update.
3519 * dummy-frame.c: Update.
3520 * fbsd-nat.c: Update.
3521 * frame.c: Update.
3522 * gdbthread.h: Update.
3523 * gnu-nat.c: Update.
3524 * go32-nat.c: Update.
3525 * inf-loop.c: Update.
3526 * inf-ptrace.c: Update.
3527 * infcall.c: Update.
3528 * infcmd.c: Update.
3529 * inflow.c: Update.
3530 * infrun.c: Update.
3531 * linux-fork.c: Update.
3532 * linux-nat.c: Update.
3533 * linux-thread-db.c: Update.
3534 * mi/mi-cmd-var.c: Update.
3535 * mi/mi-interp.c: Update.
3536 * mi/mi-main.c: Update.
3537 * nto-procfs.c: Update.
3538 * ppc-linux-tdep.c: Update.
3539 * procfs.c: Update.
3540 * python/py-inferior.c: Update.
3541 * python/py-record-btrace.c: Update.
3542 * python/py-record.c: Update.
3543 * ravenscar-thread.c: Update.
3544 * regcache.c: Update.
3545 * remote-sim.c: Update.
3546 * remote.c: Update.
3547 * sol-thread.c: Update.
3548 * solib.c: Update.
3549 * target.c: Update.
3550 * tui/tui-stack.c: Update.
3551 * varobj.c: Update.
3552 * windows-nat.c: Update.
3553 * windows-tdep.c: Update.
3554
3555 2018-07-03 Tom Tromey <tom@tromey.com>
3556
3557 * common/ptid.c (ptid_match): Remove.
3558 * common/ptid.h (ptid_match): Don't declare.
3559 * fbsd-nat.c: Update.
3560 * infcmd.c: Update.
3561 * infrun.c: Update.
3562 * linux-nat.c: Update.
3563 * record-btrace.c: Update.
3564 * regcache.c: Update.
3565 * remote.c: Update.
3566
3567 2018-07-03 Tom Tromey <tom@tromey.com>
3568
3569 * common/ptid.c (ptid_tid_p): Remove.
3570 * common/ptid.h (ptid_tid_p): Don't declare.
3571 * sol-thread.c: Update.
3572
3573 2018-07-03 Tom Tromey <tom@tromey.com>
3574
3575 * common/ptid.c (ptid_lwp_p): Remove.
3576 * common/ptid.h (ptid_lwp_p): Don't declare.
3577 * fbsd-nat.c: Update.
3578 * linux-nat.c: Update.
3579 * nat/linux-procfs.c: Update.
3580 * nat/x86-linux-dregs.c: Update.
3581 * sol-thread.c: Update.
3582
3583 2018-07-03 Tom Tromey <tom@tromey.com>
3584
3585 * common/ptid.c (ptid_is_pid): Remove.
3586 * common/ptid.h (ptid_is_pid): Don't declare.
3587 * infrun.c: Update.
3588 * linux-nat.c: Update.
3589 * mi/mi-interp.c: Update.
3590 * remote.c: Update.
3591 * thread.c: Update.
3592
3593 2018-07-03 Tom Tromey <tom@tromey.com>
3594
3595 * common/ptid.c (ptid_get_tid): Remove.
3596 * common/ptid.h (ptid_get_tid): Don't declare.
3597 * ada-tasks.c: Update.
3598 * aix-thread.c: Update.
3599 * bsd-uthread.c: Update.
3600 * darwin-nat.c: Update.
3601 * fbsd-nat.c: Update.
3602 * i386-darwin-nat.c: Update.
3603 * infrun.c: Update.
3604 * linux-tdep.c: Update.
3605 * nto-procfs.c: Update.
3606 * ppc-ravenscar-thread.c: Update.
3607 * python/py-infthread.c: Update.
3608 * ravenscar-thread.c: Update.
3609 * sol-thread.c: Update.
3610 * sparc-ravenscar-thread.c: Update.
3611 * windows-nat.c: Update.
3612
3613 2018-07-03 Tom Tromey <tom@tromey.com>
3614
3615 * common/ptid.c (ptid_get_lwp): Remove.
3616 * common/ptid.h (ptid_get_lwp): Don't declare.
3617 * aarch64-linux-nat.c: Update.
3618 * ada-tasks.c: Update.
3619 * aix-thread.c: Update.
3620 * amd64-linux-nat.c: Update.
3621 * arm-linux-nat.c: Update.
3622 * corelow.c: Update.
3623 * fbsd-nat.c: Update.
3624 * fbsd-tdep.c: Update.
3625 * gnu-nat.c: Update.
3626 * i386-cygwin-tdep.c: Update.
3627 * i386-gnu-nat.c: Update.
3628 * i386-linux-nat.c: Update.
3629 * ia64-linux-nat.c: Update.
3630 * inf-ptrace.c: Update.
3631 * infrun.c: Update.
3632 * linux-fork.c: Update.
3633 * linux-nat.c: Update.
3634 * linux-tdep.c: Update.
3635 * linux-thread-db.c: Update.
3636 * mips-linux-nat.c: Update.
3637 * nat/aarch64-linux-hw-point.c: Update.
3638 * nat/aarch64-linux.c: Update.
3639 * nat/linux-btrace.c: Update.
3640 * nat/linux-osdata.c: Update.
3641 * nat/linux-procfs.c: Update.
3642 * nat/x86-linux-dregs.c: Update.
3643 * obsd-nat.c: Update.
3644 * ppc-fbsd-nat.c: Update.
3645 * ppc-linux-nat.c: Update.
3646 * procfs.c: Update.
3647 * python/py-infthread.c: Update.
3648 * ravenscar-thread.c: Update.
3649 * remote.c: Update.
3650 * s390-linux-nat.c: Update.
3651 * sol-thread.c: Update.
3652 * sol2-tdep.c: Update.
3653 * spu-linux-nat.c: Update.
3654 * x86-linux-nat.c: Update.
3655 * xtensa-linux-nat.c: Update.
3656
3657 2018-07-03 Tom Tromey <tom@tromey.com>
3658
3659 * common/ptid.c (ptid_get_pid): Remove.
3660 * common/ptid.h (ptid_get_pid): Don't declare.
3661 * aarch64-linux-nat.c: Update.
3662 * ada-lang.c: Update.
3663 * aix-thread.c: Update.
3664 * alpha-bsd-nat.c: Update.
3665 * amd64-fbsd-nat.c: Update.
3666 * amd64-linux-nat.c: Update.
3667 * arm-linux-nat.c: Update.
3668 * arm-nbsd-nat.c: Update.
3669 * auxv.c: Update.
3670 * break-catch-syscall.c: Update.
3671 * breakpoint.c: Update.
3672 * bsd-uthread.c: Update.
3673 * corelow.c: Update.
3674 * ctf.c: Update.
3675 * darwin-nat.c: Update.
3676 * fbsd-nat.c: Update.
3677 * fbsd-tdep.c: Update.
3678 * gcore.c: Update.
3679 * gnu-nat.c: Update.
3680 * hppa-nbsd-nat.c: Update.
3681 * hppa-obsd-nat.c: Update.
3682 * i386-fbsd-nat.c: Update.
3683 * ia64-linux-nat.c: Update.
3684 * inf-ptrace.c: Update.
3685 * infcmd.c: Update.
3686 * inferior.c: Update.
3687 * inferior.h: Update.
3688 * inflow.c: Update.
3689 * infrun.c: Update.
3690 * linux-fork.c: Update.
3691 * linux-nat.c: Update.
3692 * linux-tdep.c: Update.
3693 * linux-thread-db.c: Update.
3694 * m68k-bsd-nat.c: Update.
3695 * mi/mi-interp.c: Update.
3696 * mi/mi-main.c: Update.
3697 * mips-linux-nat.c: Update.
3698 * mips-nbsd-nat.c: Update.
3699 * mips64-obsd-nat.c: Update.
3700 * nat/aarch64-linux-hw-point.c: Update.
3701 * nat/aarch64-linux.c: Update.
3702 * nat/linux-btrace.c: Update.
3703 * nat/linux-osdata.c: Update.
3704 * nat/linux-procfs.c: Update.
3705 * nat/x86-linux-dregs.c: Update.
3706 * nto-procfs.c: Update.
3707 * obsd-nat.c: Update.
3708 * ppc-linux-nat.c: Update.
3709 * ppc-nbsd-nat.c: Update.
3710 * ppc-obsd-nat.c: Update.
3711 * proc-service.c: Update.
3712 * procfs.c: Update.
3713 * python/py-inferior.c: Update.
3714 * python/py-infthread.c: Update.
3715 * ravenscar-thread.c: Update.
3716 * record.c: Update.
3717 * remote-sim.c: Update.
3718 * remote.c: Update.
3719 * rs6000-nat.c: Update.
3720 * s390-linux-nat.c: Update.
3721 * sh-nbsd-nat.c: Update.
3722 * sol-thread.c: Update.
3723 * sparc-nat.c: Update.
3724 * sparc64-tdep.c: Update.
3725 * spu-linux-nat.c: Update.
3726 * spu-tdep.c: Update.
3727 * target-debug.h: Update.
3728 * target.c: Update.
3729 * thread.c: Update.
3730 * tid-parse.c: Update.
3731 * tracefile-tfile.c: Update.
3732 * vax-bsd-nat.c: Update.
3733 * windows-nat.c: Update.
3734 * x86-linux-nat.c: Update.
3735 * x86-nat.c: Update.
3736
3737 2018-07-03 Tom Tromey <tom@tromey.com>
3738
3739 * common/ptid.c (pid_to_ptid): Remove.
3740 * common/ptid.h (pid_to_ptid): Don't declare.
3741 * aix-thread.c: Update.
3742 * arm-linux-nat.c: Update.
3743 * common/ptid.c: Update.
3744 * common/ptid.h: Update.
3745 * corelow.c: Update.
3746 * ctf.c: Update.
3747 * darwin-nat.c: Update.
3748 * fbsd-nat.c: Update.
3749 * fork-child.c: Update.
3750 * gnu-nat.c: Update.
3751 * go32-nat.c: Update.
3752 * inf-ptrace.c: Update.
3753 * infcmd.c: Update.
3754 * inferior.c: Update.
3755 * infrun.c: Update.
3756 * linux-fork.c: Update.
3757 * linux-nat.c: Update.
3758 * nat/aarch64-linux-hw-point.c: Update.
3759 * nat/fork-inferior.c: Update.
3760 * nat/x86-linux-dregs.c: Update.
3761 * nto-procfs.c: Update.
3762 * obsd-nat.c: Update.
3763 * procfs.c: Update.
3764 * progspace.c: Update.
3765 * remote.c: Update.
3766 * rs6000-nat.c: Update.
3767 * s390-linux-nat.c: Update.
3768 * sol-thread.c: Update.
3769 * spu-linux-nat.c: Update.
3770 * target.c: Update.
3771 * top.c: Update.
3772 * tracefile-tfile.c: Update.
3773 * windows-nat.c: Update.
3774
3775 2018-07-03 Tom Tromey <tom@tromey.com>
3776
3777 * common/ptid.h (ptid_build): Don't declare.
3778 * common/ptid.c (ptid_build): Remove.
3779 * aix-thread.c: Update.
3780 * bsd-kvm.c: Update.
3781 * bsd-uthread.c: Update.
3782 * common/agent.c: Update.
3783 * common/ptid.c: Update.
3784 * common/ptid.h: Update.
3785 * corelow.c: Update.
3786 * darwin-nat.c: Update.
3787 * fbsd-nat.c: Update.
3788 * gnu-nat.c: Update.
3789 * linux-fork.c: Update.
3790 * linux-nat.c: Update.
3791 * linux-thread-db.c: Update.
3792 * nat/linux-osdata.c: Update.
3793 * nat/linux-procfs.c: Update.
3794 * nto-procfs.c: Update.
3795 * obsd-nat.c: Update.
3796 * proc-service.c: Update.
3797 * procfs.c: Update.
3798 * ravenscar-thread.c: Update.
3799 * remote-sim.c: Update.
3800 * remote.c: Update.
3801 * sol-thread.c: Update.
3802 * target.c: Update.
3803 * windows-nat.c: Update.
3804
3805 2018-07-03 Tom Tromey <tom@tromey.com>
3806
3807 * infrun.c (follow_exec): Use exit_inferior_silent.
3808 * inferior.c (exit_inferior_num_silent): Remove.
3809 * inferior.h (exit_inferior_num_silent): Don't declare.
3810
3811 2018-07-03 Tom Tromey <tom@tromey.com>
3812
3813 PR cli/23340:
3814 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3815 inferior_ptid on error.
3816
3817 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3818 Simon Marchi <simon.marchi@polymtl.ca>
3819
3820 PR tdep/8282
3821 * disasm.h (gdb_disassembler): Add
3822 `m_disassembler_options_holder'. member
3823 * disasm.c (get_all_disassembler_options): New function.
3824 (gdb_disassembler::gdb_disassembler): Use it.
3825 (gdb_buffered_insn_length_init_dis): Likewise.
3826 (gdb_buffered_insn_length): Adjust accordingly.
3827 (set_disassembler_options): Handle options with arguments.
3828 (show_disassembler_options_sfunc): Likewise. Add a leading new
3829 line if showing options with descriptions.
3830 (disassembler_options_completer): Adapt to using the
3831 `disasm_options_and_args_t' structure.
3832 * mips-tdep.c (mips_disassembler_options): New variable.
3833 (mips_disassembler_options_o32): Likewise.
3834 (mips_disassembler_options_n32): Likewise.
3835 (mips_disassembler_options_n64): Likewise.
3836 (gdb_print_insn_mips): Don't set `disassembler_options'.
3837 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3838 functions.
3839 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3840 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3841 `gdbarch_disassembler_options_implicit' and
3842 `gdbarch_valid_disassembler_options'.
3843 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3844 `disasm_options_and_args_t' structure.
3845 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3846 method.
3847 (valid_disassembler_options): Switch from `disasm_options_t' to
3848 the `disasm_options_and_args_t' structure.
3849 * NEWS: Document `set disassembler-options' support for the MIPS
3850 target.
3851 * gdbarch.h: Regenerate.
3852 * gdbarch.c: Regenerate.
3853
3854 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3855
3856 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3857
3858 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3859
3860 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3861 parameter in call to amd64_target_description.
3862 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3863 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3864 (amd64fbsd_init_abi): Likewise.
3865 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3866 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3867 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3868 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3869
3870 2018-06-29 Pedro Alves <palves@redhat.com>
3871
3872 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3873 "segments" parameter.
3874 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3875 (_initialize_amd64_tdep): Update call to
3876 amd64_create_target_description.
3877 (amd64_target_description): Add "segments" parameter. Adjust
3878 the implementation to use it.
3879 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3880 call to amd64_create_target_description.
3881 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3882 * gdb/arch/amd64.h (amd64_create_target_description): Add
3883 "segments" register.
3884 * gdb/arch/amd64.c (amd64_create_target_description): Add
3885 "segments" parameter. Call create_feature_i386_64bit_segments
3886 only if SEGMENTS is true.
3887 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3888 call to amd64_create_target_description.
3889
3890 2018-06-29 Pedro Alves <palves@redhat.com>
3891
3892 * thread.c (thread_target_id_str): New, factored out from ...
3893 (print_thread_info_1): ... here. Use it to compute the max
3894 "Target Id" column width.
3895
3896 2018-06-29 Pedro Alves <palves@redhat.com>
3897
3898 * remote.c (remote_target::extra_thread_info): Delete
3899 'display_buf' and 'n' locals. from the cache, regardless of
3900 packet mechanims is in use. Use cache for qThreadExtra and qP
3901 methods too.
3902
3903 2018-06-29 Pedro Alves <palves@redhat.com>
3904
3905 * blockframe.c (find_pc_sect_containing_function): New function.
3906 * breakpoint.c (print_breakpoint_location): Don't call
3907 find_pc_sect_function.
3908 * linespec.c (create_sals_line_offset): Record the location's
3909 symbol in the sal.
3910 * linespec.c (convert_address_location_to_sals): Fill in sal's
3911 symbol with find_pc_sect_containing_function.
3912 * symtab.c (find_function_start_sal): Rename to ...
3913 (find_function_start_sal_1): ... this.
3914 (find_function_start_sal): Reimplement as wrapper around
3915 find_function_start_sal_1, and use
3916 find_pc_sect_containing_function to fill in the sal's symbol.
3917 (find_function_start_sal(symbol*, bool)): Adjust.
3918 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3919 comments.
3920 (find_pc_sect_containing_function): Declare.
3921
3922 2018-06-29 Pedro Alves <palves@redhat.com>
3923
3924 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3925 true if the the location has no symbol.
3926
3927 2018-06-28 Tom Tromey <tom@tromey.com>
3928
3929 * NEWS: Mention --enable-codesign.
3930 * silent-rules.mk (ECHO_SIGN): New variable.
3931 * configure.ac: Add --enable-codesign.
3932 * configure: Rebuild.
3933 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3934 (gdb$(EXEEXT)): Optionally invoke codesign.
3935
3936 2018-06-28 Pedro Alves <palves@redhat.com>
3937
3938 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3939 comments.
3940 (switch_to_thread_no_regs): Adjust comment.
3941 * infcmd.c (stop_pc): Delete.
3942 (post_create_inferior, info_program_command): Replace references
3943 to stop_pc with references to thread_info->suspend.stop_pc.
3944 * inferior.h (stop_pc): Delete declaration.
3945 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3946 (handle_inferior_event_1, handle_signal_stop)
3947 (process_event_stop_test, keep_going_stepped_thread)
3948 (handle_step_into_function, handle_step_into_function_backward)
3949 (print_stop_location): Replace references to stop_pc with
3950 references to thread_info->suspend.stop_pc.
3951 (struct infcall_suspend_state) <stop_pc>: Delete field.
3952 (save_infcall_suspend_state, restore_infcall_suspend_state):
3953 Remove references to inf_stat->stop_pc.
3954 * linux-fork.c (fork_load_infrun_state): Likewise.
3955 * record-btrace.c (record_btrace_set_replay): Likewise.
3956 * record-full.c (record_full_goto_entry): Likewise.
3957 * remote.c (print_one_stopped_thread): Likewise.
3958 * target.c (target_resume): Extend comment.
3959 * thread.c (set_executing_thread): New.
3960 (set_executing): Use it.
3961 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3962 Remove references to stop_pc.
3963
3964 2018-06-28 Pedro Alves <palves@redhat.com>
3965
3966 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3967 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3968
3969 2018-06-28 Tom Tromey <tom@tromey.com>
3970
3971 * coffread.c (coff_symfile_finish): Update.
3972 * xcoffread.c (xcoff_symfile_finish): Update.
3973 * elfread.c (elf_symfile_finish): Update.
3974 * symfile.h (dwarf2_free_objfile): Don't declare.
3975 * dwarf2read.c (_initialize_dwarf2_read): Use
3976 register_objfile_data_with_cleanup.
3977 (dwarf2_free_objfile): Now static. Change signature.
3978
3979 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3980
3981 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3982 option "-o" to add-symbol-file-load to add an offset to each
3983 section's load address.
3984 * symfile.c (set_objfile_default_section_offset): New function.
3985
3986 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3987
3988 * symfile.c (add_symbol_file_command): Make sure that sections
3989 with the same name are sorted in the same order.
3990
3991 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3992
3993 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3994 require the second argument. If omitted, load sections at the
3995 addresses specified in the file.
3996
3997 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3998
3999 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4000 (_initialize_symfile): Add option "-o" to symbol-file to add an
4001 offset to each section of the symbol file.
4002
4003 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4004
4005 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4006
4007 2018-06-27 Tom Tromey <tom@tromey.com>
4008
4009 * stack.c (_initialize_stack): Update "func" help text.
4010
4011 2018-06-27 Tom Tromey <tom@tromey.com>
4012
4013 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4014 std::vector.
4015 (unwind_infopy_str, pyuw_create_unwind_info)
4016 (unwind_infopy_add_saved_register, pyuw_sniffer)
4017 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4018 Update.
4019 (struct saved_reg): Add constructor.
4020 <value>: Now a gdbpy_ref<>.
4021
4022 2018-06-27 Tom Tromey <tom@tromey.com>
4023
4024 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4025
4026 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4027
4028 * gdb-gdb.py.in: Format using autopep8.
4029
4030 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4031
4032 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4033 (type_lookup_function): Recognize CORE_ADDR values.
4034
4035 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4036
4037 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4038 print tag_name.
4039
4040 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4041
4042 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4043 <__lt__>: Add.
4044
4045 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * gdb-gdb.py: Move to...
4048 * gdb-gdb.py.in: ... here.
4049 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4050 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4051 dependencies.
4052 (distclean): Remove gdb-gdb.py when cleaning.
4053 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4054 * configure: Re-generate.
4055
4056 2018-06-27 Pedro Alves <palves@redhat.com>
4057
4058 * proc-service.c (get_ps_regcache): New.
4059 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4060 (ps_lsetfpregs): Use it.
4061
4062 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4063
4064 PR gdb/21695
4065 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4066 (dwarf_decode_lines_1): Adjust.
4067
4068 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4069
4070 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4071 override.
4072 <info_proc>: Likewise.
4073
4074 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4075
4076 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4077 to windows_fetch_one_register, and only handle the case of
4078 fetching one register. Move the code that reloads the context
4079 and iterates over all registers if R is negative to...
4080 (windows_nat_target::fetch_registers): ... here.
4081 (do_windows_store_inferior_registers): Rename to
4082 windows_store_one_register, and only handle the case of storing
4083 one register. Move the code that handles the case where r is
4084 negative to...
4085 (windows_nat_target::store_registers) ... here.
4086
4087 2018-06-26 Tom Tromey <tom@tromey.com>
4088
4089 PR rust/22574:
4090 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4091 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4092 Update.
4093 (rust_internal_print_type): Add podata parameter.
4094 (rust_print_type): Update.
4095
4096 2018-06-26 Tom Tromey <tom@tromey.com>
4097
4098 * typeprint.h (struct print_offset_data) <update, finish,
4099 maybe_print_hole>: New methods.
4100 <indentation>: New constant.
4101 * typeprint.c (print_offset_data::indentation): Define.
4102 (print_offset_data::maybe_print_hole, print_offset_data::update)
4103 (print_offset_data::finish): Move from c-typeprint.c and rename.
4104 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4105 (print_spaces_filtered_with_print_options): Update.
4106 (c_print_type_union_field_offset, maybe_print_hole)
4107 (c_print_type_struct_field_offset): Move to typeprint.c and
4108 rename.
4109 (c_type_print_base_struct_union): Update.
4110
4111 2018-06-25 Pedro Alves <palves@redhat.com>
4112
4113 * gdbthread.h (thread_info_ref, delete_thread)
4114 (delete_thread_silent, first_thread_of_inferior)
4115 (any_thread_of_inferior, switch_to_thread)
4116 (enable_thread_stack_temporaries)
4117 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4118 (get_last_thread_stack_temporary)
4119 (value_in_thread_stack_temporaries, can_access_registers_thread):
4120 Spell out "struct thread_info" instead of just "thread_info".
4121 * inferior.h (notice_new_inferior): Likewise.
4122
4123 2018-06-25 Pedro Alves <palves@redhat.com>
4124
4125 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4126 pass thread_info pointer to delete_thread.
4127 (windows_nat_target::detach): Pass inferior pointer to
4128 detach_inferior.
4129 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4130 delete_thread.
4131 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4132 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4133 and pass a thread_info pointer to delete_thread.
4134 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4135 pass thread_info pointer to delete_thread.
4136 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4137 delete_thread_silent call.
4138 * procfs.c (procfs_target::detach): Pass inferior pointer to
4139 detach_inferior.
4140 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4141 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4142 delete_thread_silent call.
4143 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4144 pass thread_info pointer to delete_thread.
4145 (windows_nat_target::detach): Pass inferior pointer to
4146 delete_inferior.
4147
4148 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4149
4150 * regcache.c (readable_regcache::read_part): Fix asserts.
4151 (reg_buffer::raw_collect_part): New function.
4152 (regcache::write_part): Fix asserts.
4153 (reg_buffer::raw_supply_part): New function.
4154 (regcache::transfer_regset_register): New helper function.
4155 (regcache::transfer_regset): Call new functions.
4156 (regcache_supply_regset): Use gdb_byte*.
4157 (regcache::supply_regset): Likewise.
4158 (regcache_collect_regset): Likewise.
4159 (regcache::collect_regset): Likewise.
4160 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4161 (reg_buffer::raw_supply_part): Likewise.
4162 (regcache::transfer_regset_register): Likewise.
4163 (regcache::transfer_regset): Use gdb_byte*.
4164
4165 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4166
4167 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4168
4169 2018-06-21 Pedro Alves <palves@redhat.com>
4170
4171 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4172 instead of a ptid_t. All callers adjusted.
4173 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4174 adjusted.
4175 (print_ada_task_info, display_current_task_id, task_command_1):
4176 Adjust.
4177 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4178 inferior_thread.
4179 (breakpoint_kind): Adjust.
4180 (remove_breakpoints_pid): Rename to ...
4181 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4182 pointer. All callers adjusted.
4183 (bpstat_clear_actions): Use inferior_thread.
4184 (get_bpstat_thread): New.
4185 (bpstat_do_actions): Use it.
4186 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4187 to take a thread_info pointer. All callers adjusted.
4188 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4189 (breakpoint_re_set_thread): Use inferior_thread.
4190 * breakpoint.h (struct inferior): Forward declare.
4191 (bpstat_stop_status): Update.
4192 (remove_breakpoints_pid): Delete.
4193 (remove_breakpoints_inf): New.
4194 * bsd-uthread.c (bsd_uthread_target::wait)
4195 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4196 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4197 (maint_btrace_packet_history_cmd)
4198 (maint_btrace_clear_packet_history_cmd): Adjust.
4199 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4200 inferior_thread.
4201 * cli/cli-interp.c: Include "inferior.h".
4202 * common/refcounted-object.h (struct
4203 refcounted_object_ref_policy): New.
4204 * compile/compile-object-load.c: Include gdbthread.h.
4205 (store_regs): Use inferior_thread.
4206 * corelow.c (core_target::close): Use current_inferior.
4207 (core_target_open): Adjust to use first_thread_of_inferior and use
4208 the current inferior.
4209 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4210 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4211 <thread>: ... this new field. All references adjusted.
4212 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4213 Take a thread_info pointer instead of a ptid_t.
4214 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4215 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4216 thread_info pointer instead of a ptid_t.
4217 * elfread.c: Include "inferior.h".
4218 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4219 Use inferior_thread.
4220 * eval.c (evaluate_subexp): Likewise.
4221 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4222 inferior_thread.
4223 * gdb_proc_service.h (struct thread_info): Forward declare.
4224 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4225 <thread>: ... this new field. All references adjusted.
4226 * gdbarch.h, gdbarch.c: Regenerate.
4227 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4228 'thread' parameter. All implementations and callers adjusted.
4229 * gdbthread.h (thread_info) <set_running>: New method.
4230 (delete_thread, delete_thread_silent): Take a thread_info pointer
4231 instead of a ptid.
4232 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4233 (first_thread_of_process): Delete, replaced by ...
4234 (first_thread_of_inferior): ... this new function. All callers
4235 adjusted.
4236 (any_live_thread_of_process): Delete, replaced by ...
4237 (any_live_thread_of_inferior): ... this new function. All callers
4238 adjusted.
4239 (switch_to_thread, switch_to_no_thread): Declare.
4240 (is_executing): Delete.
4241 (enable_thread_stack_temporaries): Update comment.
4242 <enable_thread_stack_temporaries>: Take a thread_info pointer
4243 instead of a ptid_t. Incref the thread.
4244 <~enable_thread_stack_temporaries>: Decref the thread.
4245 <m_ptid>: Delete
4246 <m_thr>: New.
4247 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4248 (get_last_thread_stack_temporary)
4249 (value_in_thread_stack_temporaries, can_access_registers_thread):
4250 Take a thread_info pointer instead of a ptid_t. All callers
4251 adjusted.
4252 * infcall.c (get_call_return_value): Use inferior_thread.
4253 (run_inferior_call): Work with thread pointers instead of ptid_t.
4254 (call_function_by_hand_dummy): Work with thread pointers instead
4255 of ptid_t. Use thread_info_ref.
4256 * infcmd.c (proceed_thread_callback): Access thread's state
4257 directly.
4258 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4259 access thread's state directly.
4260 (continue_command): Use inferior_thread.
4261 (info_program_command): Use find_thread_ptid and access thread
4262 state directly.
4263 (proceed_after_attach_callback): Use thread state directly.
4264 (notice_new_inferior): Take a thread_info pointer instead of a
4265 ptid_t. All callers adjusted.
4266 (exit_inferior): Take an inferior pointer instead of a pid. All
4267 callers adjusted.
4268 (exit_inferior_silent): New.
4269 (detach_inferior): Delete.
4270 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4271 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4272 (detach_inferior_command, kill_inferior_command): Use
4273 find_inferior_id instead of valid_gdb_inferior_id and
4274 gdb_inferior_id_to_pid.
4275 (inferior_command): Use inferior and thread pointers.
4276 * inferior.h (struct thread_info): Forward declare.
4277 (notice_new_inferior): Take a thread_info pointer instead of a
4278 ptid_t. All callers adjusted.
4279 (detach_inferior): Delete declaration.
4280 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4281 instead of a pid. All callers adjusted.
4282 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4283 (valid_gdb_inferior_id): Delete.
4284 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4285 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4286 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4287 ...
4288 <inf>: ... this new field.
4289 <step_ptid>: Delete, replaced by ...
4290 <step_thread>: ... this new field.
4291 (get_displaced_stepping_state): Take an inferior pointer instead
4292 of a pid. All callers adjusted.
4293 (displaced_step_in_progress_any_inferior): Adjust.
4294 (displaced_step_in_progress_thread): Take a thread pointer instead
4295 of a ptid_t. All callers adjusted.
4296 (displaced_step_in_progress, add_displaced_stepping_state): Take
4297 an inferior pointer instead of a pid. All callers adjusted.
4298 (get_displaced_step_closure_by_addr): Adjust.
4299 (remove_displaced_stepping_state): Take an inferior pointer
4300 instead of a pid. All callers adjusted.
4301 (displaced_step_prepare_throw, displaced_step_prepare)
4302 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4303 All callers adjusted.
4304 (start_step_over): Adjust.
4305 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4306 displaced step queue.
4307 (do_target_resume): Adjust.
4308 (fetch_inferior_event): Use inferior_thread.
4309 (context_switch, get_inferior_stop_soon): Take an
4310 execution_control_state pointer instead of a ptid_t. All callers
4311 adjusted.
4312 (switch_to_thread_cleanup): Delete.
4313 (stop_all_threads): Use scoped_restore_current_thread.
4314 * inline-frame.c: Include "gdbthread.h".
4315 (inline_state) <inline_state>: Take a thread pointer instead of a
4316 ptid_t. All callers adjusted.
4317 <ptid>: Delete, replaced by ...
4318 <thread>: ... this new field.
4319 (find_inline_frame_state): Take a thread pointer instead of a
4320 ptid_t. All callers adjusted.
4321 (skip_inline_frames, step_into_inline_frame)
4322 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4323 pointer instead of a ptid_t. All callers adjusted.
4324 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4325 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4326 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4327 pointers directly.
4328 * linux-nat.c (get_detach_signal): Likewise.
4329 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4330 (thread_db_notice_clone): Adjust.
4331 (thread_db_find_new_threads_silently)
4332 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4333 a thread pointer instead of a ptid_t. All callers adjusted.
4334 * mi/mi-cmd-var.c: Include "inferior.h".
4335 (mi_cmd_var_update_iter): Update to use thread pointers.
4336 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4337 inferior directly.
4338 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4339 out to ...
4340 (mi_output_running): ... this new function.
4341 (mi_on_resume_1): Adjust to use it.
4342 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4343 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4344 directly.
4345 (interrupt_thread_callback): : Adjust to use thread and inferior
4346 pointers.
4347 * proc-service.c: Include "gdbthread.h".
4348 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4349 * progspace-and-thread.c: Include "inferior.h".
4350 * progspace.c: Include "inferior.h".
4351 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4352 hold a reference to an inferior_object.
4353 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4354 inferior_thread.
4355 * python/py-inferior.c (struct inferior_object): Give the type a
4356 tag name instead of a typedef.
4357 (python_on_normal_stop): No need to check if the current thread is
4358 listed.
4359 (inferior_to_inferior_object): Change return type to
4360 inferior_object. All callers adjusted.
4361 (find_thread_object): Delete, bits factored out to ...
4362 (thread_to_thread_object): ... this new function.
4363 * python/py-infthread.c (create_thread_object): Use
4364 inferior_to_inferior_object.
4365 (thpy_is_stopped): Use thread pointer directly.
4366 (gdbpy_selected_thread): Use inferior_thread.
4367 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4368 field, replaced with ...
4369 <thread>: ... this new field. All users adjusted.
4370 (btpy_insn_or_gap_new): Drop const.
4371 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4372 callers adjusted.
4373 * python/py-record.c: Include "gdbthread.h".
4374 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4375 a ptid_t. All callers adjusted.
4376 (gdbpy_current_recording): Use inferior_thread.
4377 * python/py-record.h (recpy_record_object) <ptid>: Delete
4378 field, replaced with ...
4379 <thread>: ... this new field. All users adjusted.
4380 (recpy_element_object) <ptid>: Delete
4381 field, replaced with ...
4382 <thread>: ... this new field. All users adjusted.
4383 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4384 a ptid_t. All callers adjusted.
4385 * python/py-threadevent.c: Include "gdbthread.h".
4386 (get_event_thread): Use thread_to_thread_object.
4387 * python/python-internal.h (struct inferior_object): Forward
4388 declare.
4389 (find_thread_object, find_inferior_object): Delete declarations.
4390 (thread_to_thread_object, inferior_to_inferior_object): New
4391 declarations.
4392 * record-btrace.c: Include "inferior.h".
4393 (require_btrace_thread): Use inferior_thread.
4394 (record_btrace_frame_sniffer)
4395 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4396 (get_thread_current_frame): Use scoped_restore_current_thread and
4397 switch_to_thread.
4398 (get_thread_current_frame): Use thread pointer directly.
4399 (record_btrace_replay_at_breakpoint): Use thread's inferior
4400 pointer directly.
4401 * record-full.c: Include "inferior.h".
4402 * regcache.c: Include "gdbthread.h".
4403 (get_thread_arch_regcache): Use the inferior's address space
4404 directly.
4405 (get_thread_regcache, registers_changed_thread): New.
4406 * regcache.h (get_thread_regcache(thread_info *thread)): New
4407 overload.
4408 (registers_changed_thread): New.
4409 (remote_target) <remote_detach_1>: Swap order of parameters.
4410 (remote_add_thread): <remote_add_thread>: Return the new thread.
4411 (get_remote_thread_info(ptid_t)): New overload.
4412 (remote_target::remote_notice_new_inferior): Use thread pointers
4413 directly.
4414 (remote_target::process_initial_stop_replies): Use
4415 thread_info::set_running.
4416 (remote_target::remote_detach_1, remote_target::detach)
4417 (extended_remote_target::detach): Adjust.
4418 * stack.c (frame_show_address): Use inferior_thread.
4419 * target-debug.h (target_debug_print_thread_info_pp): New.
4420 * target-delegates.c: Regenerate.
4421 * target.c (default_thread_address_space): Delete.
4422 (memory_xfer_partial_1): Use current_inferior.
4423 (target_detach): Use current_inferior.
4424 (target_thread_address_space): Delete.
4425 (generic_mourn_inferior): Use current_inferior.
4426 * target.h (struct target_ops) <thread_address_space>: Delete.
4427 (target_thread_address_space): Delete.
4428 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4429 pointers directly.
4430 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4431 thread pointer instead of a ptid_t. Adjust all callers.
4432 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4433 (first_thread_of_process): Delete, replaced by ...
4434 (first_thread_of_inferior): ... this new function. All callers
4435 adjusted.
4436 (any_thread_of_process): Rename to ...
4437 (any_thread_of_inferior): ... this, and take an inferior pointer.
4438 (any_live_thread_of_process): Rename to ...
4439 (any_live_thread_of_inferior): ... this, and take an inferior
4440 pointer.
4441 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4442 (value_in_thread_stack_temporaries)
4443 (get_last_thread_stack_temporary): Take a thread pointer instead
4444 of a ptid_t. Adjust all callers.
4445 (thread_info::set_running): New.
4446 (validate_registers_access): Use inferior_thread.
4447 (can_access_registers_ptid): Rename to ...
4448 (can_access_registers_thread): ... this, and take a thread
4449 pointer.
4450 (print_thread_info_1): Adjust to compare thread pointers instead
4451 of ptids.
4452 (switch_to_no_thread, switch_to_thread): Make extern.
4453 (scoped_restore_current_thread::~scoped_restore_current_thread):
4454 Use m_thread pointer directly.
4455 (scoped_restore_current_thread::scoped_restore_current_thread):
4456 Use inferior_thread.
4457 (thread_command): Use thread pointer directly.
4458 (thread_num_make_value_helper): Use inferior_thread.
4459 * top.c (execute_command): Use inferior_thread.
4460 * tui/tui-interp.c: Include "inferior.h".
4461 * varobj.c (varobj_create): Use inferior_thread.
4462 (value_of_root_1): Use find_thread_global_id instead of
4463 global_thread_id_to_ptid.
4464
4465 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4466
4467 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4468 possible.
4469 (regcache::write_part): Likewise.
4470 (readable_regcache::cooked_read_part): Update comment.
4471 (readable_regcache::cooked_write_part): Likewise.
4472 * regcache.h: (readable_regcache::read_part): Likewise.
4473 (regcache::write_part): Likewise.
4474
4475 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4476 Dirk Schubert <dirk.schubert@arm.com>
4477
4478 * aarch64-linux-nat.c (post_attach): New.
4479 (aarch64_linux_nat_target::post_attach): Override post_attach to
4480 record the number of hardware debug registers.
4481
4482 2018-06-20 Tom Tromey <tom@tromey.com>
4483
4484 * python/py-param.c (add_setshow_generic): Make parameters const.
4485 (parmpy_init): Update.
4486
4487 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4488
4489 * regcache.h (regcache_cooked_read_ftype): Rename to...
4490 (register_read_ftype): ...this, change type to function_view.
4491 (class reg_buffer) <save>: Remove src parameter.
4492 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4493 parameter non-const in first overload. Remove src parameter in
4494 second overload.
4495 * regcache.c (do_cooked_read): Remove.
4496 (readonly_detached_regcache::readonly_detached_regcache): Make
4497 parameter non-const, adjust call to other constructor.
4498 (reg_buffer::save): Remove src parameter.
4499 * frame.c (do_frame_register_read): Remove.
4500 (frame_save_as_regcache): Use lambda function.
4501 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4502 parameter to ppu2spu_data *.
4503 (ppu2spu_sniffer): Use lambda function.
4504
4505 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4506
4507 * record-full.c (record_full_target::insert_breakpoint): Remove
4508 "struct" keyword, add const.
4509
4510 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4511
4512 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4513 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4514 * configure.ac: Remove AC_PREREQ, add missing quoting.
4515 * gnulib/configure.ac: Modernize usage of
4516 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4517 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4518 (AUTOMAKE_VERSION): Bump to 1.15.1.
4519 * configure: Re-generate.
4520 * config.in: Re-generate.
4521 * aclocal.m4: Re-generate.
4522 * gnulib/aclocal.m4: Re-generate.
4523 * gnulib/config.in: Re-generate.
4524 * gnulib/configure: Re-generate.
4525 * gnulib/import/Makefile.in: Re-generate.
4526
4527 2018-06-19 Pedro Alves <palves@redhat.com>
4528
4529 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4530 (lookup_minimal_symbol_by_pc_section): ... here with
4531 gdb_assert_not_reached added.
4532
4533 2018-06-19 Pedro Alves <palves@redhat.com>
4534
4535 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4536 parameter with a block parameter. Compare location's block symbol
4537 with the frame's block instead of addresses.
4538 (skip_inline_frames): Pass the current block instead of the
4539 frame's address. Break out as soon as we determine the frame
4540 should not be skipped.
4541
4542 2018-06-18 Tom Tromey <tom@tromey.com>
4543
4544 * solib-aix.c (solib_aix_get_section_offsets): Return
4545 unique_xmalloc_ptr.
4546 (solib_aix_solib_create_inferior_hook): Update.
4547
4548 2018-06-18 Tom Tromey <tom@tromey.com>
4549
4550 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4551
4552 2018-06-18 Tom Tromey <tom@tromey.com>
4553
4554 * solib-frv.c (frv_relocate_main_executable): Use
4555 unique_xmalloc_ptr.
4556 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4557 unique_xmalloc_ptr.
4558
4559 2018-06-18 Tom Tromey <tom@tromey.com>
4560
4561 * objfiles.h (inhibit_section_map_updates): Update.
4562 (resume_section_map_updates, resume_section_map_updates_cleanup):
4563 Remove.
4564 * solib-svr4.c (svr4_handle_solib_event): Update.
4565 * objfiles.c (inhibit_section_map_updates): Return
4566 scoped_restore_tmpl<int>.
4567 (resume_section_map_updates, resume_section_map_updates_cleanup):
4568 Remove.
4569
4570 2018-06-18 Tom Tromey <tom@tromey.com>
4571
4572 * valprint.h (read_string): Update.
4573 * valprint.c (read_string): Change type of "buffer".
4574 (val_print_string): Update.
4575 * python/py-value.c (valpy_string): Update.
4576 * language.h (struct language_defn) <la_get_string>: Change
4577 type of "buffer".
4578 (default_get_string, c_get_string): Update.
4579 * language.c (default_get_string): Change type of "buffer".
4580 * guile/scm-value.c (gdbscm_value_to_string): Update.
4581 * c-lang.c (c_get_string): Change type of "buffer".
4582
4583 2018-06-18 Tom Tromey <tom@tromey.com>
4584
4585 * ser-mingw.c (struct pipe_state_destroyer): New.
4586 (pipe_state_up): New typedef.
4587 (cleanup_pipe_state): Remove.
4588 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4589
4590 2018-06-18 Tom Tromey <tom@tromey.com>
4591
4592 * rust-lang.h (rust_yyerror): Don't declare.
4593 * rust-lang.c (rust_language_defn): Update.
4594 * rust-exp.y (yyerror): Now static.
4595 * parse.c (parse_exp_in_context_1): Update.
4596 * p-lang.h (p_yyerror): Don't declare.
4597 * p-lang.c (p_language_defn): Update.
4598 * p-exp.y (yyerror): Now static.
4599 * opencl-lang.c (opencl_language_defn): Update.
4600 * objc-lang.c (objc_language_defn): Update.
4601 * m2-lang.h (m2_yyerror): Don't declare.
4602 * m2-lang.c (m2_language_defn): Update.
4603 * m2-exp.y (yyerror): Now static.
4604 * language.h (struct language_defn) <la_error>: Remove.
4605 * language.c (unk_lang_error): Remove.
4606 (unknown_language_defn, auto_language_defn): Remove.
4607 * go-lang.h (go_yyerror): Don't declare.
4608 * go-lang.c (go_language_defn): Update.
4609 * go-exp.y (yyerror): Now static.
4610 * f-lang.h (f_yyerror): Don't declare.
4611 * f-lang.c (f_language_defn): Update.
4612 * f-exp.y (yyerror): Now static.
4613 * d-lang.h (d_yyerror): Don't declare.
4614 * d-lang.c (d_language_defn): Update.
4615 * d-exp.y (yyerror): Now static.
4616 * c-lang.h (c_yyerror): Don't declare.
4617 * c-lang.c (c_language_defn, cplus_language_defn)
4618 (asm_language_defn, minimal_language_defn): Update.
4619 * c-exp.y (yyerror): Now static.
4620 * ada-lang.h (ada_yyerror): Don't declare.
4621 * ada-lang.c (ada_language_defn): Update.
4622 * ada-exp.y (yyerror): Now static.
4623
4624 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4625
4626 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4627 (store_sveregs_to_thread): Likewise.
4628 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4629 (aarch64_linux_store_inferior_registers): Likewise.
4630 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4631 function.
4632 (aarch64_sve_regs_copy_to_regcache): Likewise.
4633 (aarch64_sve_regs_copy_from_regcache): Likewise.
4634 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4635 declaration.
4636 (aarch64_sve_regs_copy_to_regcache): Likewise.
4637 (aarch64_sve_regs_copy_from_regcache): Likewise.
4638 (sve_context): Structure from Linux headers.
4639 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4640 (SVE_SIG_ZREG_SIZE): Likewise.
4641 (SVE_SIG_PREG_SIZE): Likewise.
4642 (SVE_SIG_FFR_SIZE): Likewise.
4643 (SVE_SIG_REGS_OFFSET): Likewise.
4644 (SVE_SIG_ZREGS_OFFSET): Likewise.
4645 (SVE_SIG_ZREG_OFFSET): Likewise.
4646 (SVE_SIG_ZREGS_SIZE): Likewise.
4647 (SVE_SIG_PREGS_OFFSET): Likewise.
4648 (SVE_SIG_PREG_OFFSET): Likewise.
4649 (SVE_SIG_PREGS_SIZE): Likewise.
4650 (SVE_SIG_FFR_OFFSET): Likewise.
4651 (SVE_SIG_REGS_SIZE): Likewise.
4652 (SVE_SIG_CONTEXT_SIZE): Likewise.
4653 (SVE_PT_REGS_MASK): Likewise.
4654 (SVE_PT_REGS_FPSIMD): Likewise.
4655 (SVE_PT_REGS_SVE): Likewise.
4656 (SVE_PT_VL_INHERIT): Likewise.
4657 (SVE_PT_VL_ONEXEC): Likewise.
4658 (SVE_PT_REGS_OFFSET): Likewise.
4659 (SVE_PT_FPSIMD_OFFSET): Likewise.
4660 (SVE_PT_FPSIMD_SIZE): Likewise.
4661 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4662 (SVE_PT_SVE_PREG_SIZE): Likewise.
4663 (SVE_PT_SVE_FFR_SIZE): Likewise.
4664 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4665 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4666 (__SVE_SIG_TO_PT): Likewise.
4667 (SVE_PT_SVE_OFFSET): Likewise.
4668 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4669 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4670 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4671 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4672 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4673 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4674 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4675 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4676 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4677 (SVE_PT_SVE_SIZE): Likewise.
4678 (SVE_PT_SIZE): Likewise.
4679 (HAS_SVE_STATE): New define.
4680
4681 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4682
4683 * nat/aarch64-sve-linux-sigcontext.h: New file.
4684 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4685 new files.
4686 (SVE_VQ_MIN): Likewise.
4687 (SVE_VQ_MAX): Likewise.
4688 (SVE_VL_MIN): Likewise.
4689 (SVE_VL_MAX): Likewise.
4690 (SVE_NUM_ZREGS): Likewise.
4691 (SVE_NUM_PREGS): Likewise.
4692 (sve_vl_valid): Likewise.
4693 (struct user_sve_header): Likewise.
4694
4695 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4696 Richard Bunt <Richard.Bunt@arm.com>
4697
4698 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4699 was requested by GDB.
4700
4701 2018-06-15 Tom de Vries <tdevries@suse.de>
4702
4703 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4704
4705 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4706
4707 * gnulib/update-gnulib.sh: Print expected versions of
4708 autoconf/aclocal.
4709
4710 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4711
4712 * arch-utils.c (default_type_align): Use type_length_units.
4713 * gdbtypes.c (type_align): Use type_length_units.
4714
4715 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4716
4717 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4718 of 'define' command.
4719
4720 2018-06-14 Tom de Vries <tdevries@suse.de>
4721
4722 PR cli/22573
4723 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4724 get_no_prettyformat_print_options.
4725
4726 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4727
4728 * sparc-nat.h: Include target.h.
4729 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4730 <fetch_registers>: Remove this argument in function call.
4731 <store_registers>: Remove this argument in function call, remove
4732 extra semicolon.
4733 <low_forget_process>: Call sparc64_forget_process instead of
4734 sparc_forget_process.
4735
4736 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4737
4738 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4739 (procfs_target::make_corefile_notes): Adjust to new
4740 target_read_alloc return type.
4741
4742 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4743 Stephen Roberts <stephen.roberts@arm.com>
4744
4745 PR gdb/22882
4746 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4747 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4748 Move should_notify_stop local into more inner scope.
4749
4750 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4751 Stephen Roberts <stephen.roberts@arm.com>
4752
4753 PR gdb/22882
4754 * infrun.c (resume_1): Add call to mark_async_event_handler.
4755
4756 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4757
4758 * infrun.c (do_target_wait): Change old version of $pc printed.
4759
4760 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4761
4762 * dwarf2read.c (read_index_from_section): Rename to...
4763 (read_gdb_index_from_section): ... this, update all callers.
4764 (dwarf2_read_index): Rename to...
4765 (dwarf2_read_gdb_index): ... this, update all callers.
4766
4767 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4768
4769 * gdb/hppa-linux-nat.c
4770 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4771 hppa_linux_nat_target::fetch_registers.
4772
4773 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4774
4775 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4776 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4777 (AARCH64_DWARF_SVE_FFR): Likewise.
4778 (AARCH64_DWARF_SVE_P0): Likewise.
4779 (AARCH64_DWARF_SVE_Z0): Likewise.
4780
4781 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4782
4783 * common/common-regcache.h (raw_compare): New function.
4784 * regcache.c (regcache::raw_compare): Likewise.
4785 * regcache.h (regcache::raw_compare): New declaration.
4786
4787 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4788
4789 * common/common-regcache.h (reg_buffer_common): New structure.
4790 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4791 (reg_buffer::raw_supply): Likewise.
4792 (reg_buffer::raw_supply_integer): Likewise.
4793 (reg_buffer::raw_supply_zeroed): Likewise.
4794 (reg_buffer::raw_collect): Likewise.
4795 (reg_buffer::raw_collect_integer): Likewise.
4796 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4797 (reg_buffer::raw_supply): Likewise.
4798 (reg_buffer::raw_supply_integer): Likewise.
4799 (reg_buffer::raw_supply_zeroed): Likewise.
4800 (reg_buffer::raw_collect): Likewise.
4801 (reg_buffer::raw_collect_integer): Likewise.
4802
4803 2018-06-10 Tom Tromey <tom@tromey.com>
4804
4805 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4806 (class remote_state) <stop_reply_queue>: Now std::vector.
4807 (remote_state::~remote_state)
4808 (remote_target::stop_reply_queue_length): Update.
4809 (struct queue_iter_param, remove_child_of_pending_fork)
4810 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4811 (check_pending_event_prevents_wildcard_vcont_callback)
4812 (remove_stop_reply_for_inferior)
4813 (remove_stop_reply_of_remote_state)
4814 (remote_notif_remove_once_on_match)
4815 (stop_reply_match_ptid_and_ws)
4816 (remote_kill_child_of_pending_fork): Remove.
4817 (remote_target::remove_new_fork_children)
4818 (remote_target::check_pending_events_prevent_wildcard_vcont)
4819 (remote_target::discard_pending_stop_replies)
4820 (remote_target::discard_pending_stop_replies_in_queue)
4821 (remote_target::remote_notif_remove_queued_reply)
4822 (remote_target::queued_stop_reply)
4823 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4824 (remote_target::wait, remote_target::kill_new_fork_children)
4825 (remote_target::async): Update.
4826
4827 2018-06-10 Tom Tromey <tom@tromey.com>
4828
4829 * record-full.c (record_full_arch_list_cleanups): Remove.
4830 (record_full_message): Use try/catch.
4831 (record_full_wait_cleanups): Remove.
4832 (record_full_wait_1): Use try/catch.
4833 (record_full_restore): Likewise.
4834
4835 2018-06-10 Tom Tromey <tom@tromey.com>
4836
4837 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4838 declare VEC. Add constructor.
4839 <in_target_beneath>: Now bool.
4840 (record_full_breakpoints): Now a std::vector, static.
4841 (record_full_sync_record_breakpoints)
4842 (record_full_init_record_breakpoints)
4843 (record_full_target::insert_breakpoint)
4844 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4845
4846 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4847
4848 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4849 * serial.c (serial_interface_lookup): Remove struct keyword.
4850
4851 2018-06-10 Tom Tromey <tom@tromey.com>
4852
4853 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4854 method.
4855 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4856 a method.
4857 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4858 method.
4859 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4860 "beneath" as a method.
4861 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4862 Use "beneath" as a method.
4863
4864 2018-06-10 Tom Tromey <tom@tromey.com>
4865
4866 * tracefile.c (struct trace_file_writer_deleter): New.
4867 <operator()>: Rename from trace_file_writer_xfree.
4868 (trace_file_writer_up): New typedef.
4869 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4870
4871 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4872
4873 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4874 <m_registers, m_register_status>: Change type to
4875 std::unique_ptr.
4876 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4877 XCNEWVEC.
4878
4879 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4880
4881 * common/common-regcache.h (enum register_status): Add
4882 underlying type "signed char".
4883 * regcache.h (reg_buffer) <m_register_status>: Change type to
4884 register_status *.
4885 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4886 register_status instead of signed char.
4887 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4888 (reg_buffer::get_register_status): Remove cast.
4889 (readable_regcache::raw_read): Remove cast.
4890 (readable_regcache::cooked_read): Remove cast.
4891
4892 2018-06-09 Tom Tromey <tom@tromey.com>
4893
4894 * source.c (reverse_search_command, forward_search_command): Use
4895 scoped_fd.
4896
4897 2018-06-09 Tom Tromey <tom@tromey.com>
4898
4899 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4900 (serial_ops_list): Now static, std::vector.
4901 (serial_interface_lookup, serial_add_interface): Update.
4902
4903 2018-06-09 Tom Tromey <tom@tromey.com>
4904
4905 * dwarf2read.c (process_cu_includes): Update.
4906 (process_full_comp_unit): Update.
4907 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4908 std::vector.
4909
4910 2018-06-08 Paul Koning <paul_koning@dell.com>
4911
4912 PR gdb/23252
4913
4914 * python/python.c (do_start_initialization):
4915 Avoid call to internal Python API.
4916 (init__gdb_module): New function.
4917
4918 2018-06-08 Gary Benson <gbenson@redhat.com>
4919
4920 * linux-thread-db.c (valprint.h): New include.
4921 (struct check_thread_db_info): New structure.
4922 (check_thread_db_on_load, tdb_testinfo): New static globals.
4923 (check_thread_db, check_thread_db_callback): New functions.
4924 (try_thread_db_load_1): Run integrity checks if requested.
4925 (maintenance_check_libthread_db): New function.
4926 (_initialize_thread_db): Register "maint check libthread-db"
4927 and "maint set/show check-libthread-db".
4928 * NEWS: Mention the above new commands.
4929
4930 2018-06-08 Tom Tromey <tom@tromey.com>
4931
4932 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4933 now a method.
4934
4935 2018-06-08 Tom Tromey <tom@tromey.com>
4936
4937 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4938
4939 2018-06-08 Tom Tromey <tom@tromey.com>
4940
4941 * common/btrace-common.h (struct btrace_data): Add constructor,
4942 destructor, move assignment operator.
4943 <empty, clear, fini>: New methods.
4944 <format>: Initialize.
4945 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4946 (btrace_data_empty): Don't declare.
4947 * common/btrace-common.c (btrace_data_init): Remove.
4948 (btrace_data::fini): Rename from btrace_data_fini.
4949 (btrace_data::empty): Rename from btrace_data_empty.
4950 (btrace_data::clear): Rename from btrace_data_clear. Return
4951 bool.
4952 * btrace.h (make_cleanup_btrace_data): Don't declare.
4953 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4954 (parse_xml_btrace): Update.
4955 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4956 (maint_btrace_clear_packet_history_cmd): Update.
4957
4958 2018-06-07 Pedro Alves <palves@redhat.com>
4959
4960 * target.h (target_ops) <beneath>: Now a method. All references
4961 updated.
4962 (class target_stack): New.
4963 * target.c (g_target_stack): New.
4964 (g_current_top_target): Delete.
4965 (current_top_target): Get the top target out of g_target_stack.
4966 (target_stack::push, target_stack::unpush): New.
4967 (push_target, unpush_target): Reimplement.
4968 (target_is_pushed): Reimplement in terms of g_target_stack.
4969 (target_ops::beneath, target_stack::find_beneath): New.
4970
4971 2018-06-07 Pedro Alves <palves@redhat.com>
4972
4973 * target.h (find_target_beneath): Delete declaration.
4974 * target.c (find_target_beneath): Delete definition.
4975 * aix-thread.c: All callers of find_target_beneath adjusted to
4976 call target_ops::beneath instead.
4977 * bsd-uthread.c: Likewise.
4978 * linux-thread-db.c: Likewise.
4979 * ravenscar-thread.c: Likewise.
4980 * sol-thread.c: Likewise.
4981 * spu-multiarch.c: Likewise.
4982
4983 2018-06-07 Pedro Alves <palves@redhat.com>
4984
4985 * target.h (target_ops) <beneath>: Now a method. All references
4986 updated.
4987 (target_ops) <m_beneath>: New.
4988 * target.c (target_ops::beneath): New.
4989 * corelow.c: Adjust all references to target_ops::beneath.
4990 * linux-thread-db.c: Likewise.
4991 * make-target-delegates: Likewise.
4992 * record-btrace.c: Likewise.
4993 * record-full.c: Likewise.
4994 * remote.c: Likewise.
4995 * target.c: Likewise.
4996 * target-delegates.c: Regenerate.
4997
4998 2018-06-07 Pedro Alves <palves@redhat.com>
4999
5000 * target.h (target_stack): Delete.
5001 (current_top_target): Declare function.
5002 * target.c (target_stack): Delete.
5003 (g_current_top_target): New.
5004 (current_top_target): New function.
5005 * auxv.c: Use current_top_target instead of target_stack
5006 throughout.
5007 * avr-tdep.c: Likewise.
5008 * breakpoint.c: Likewise.
5009 * corefile.c: Likewise.
5010 * elfread.c: Likewise.
5011 * eval.c: Likewise.
5012 * exceptions.c: Likewise.
5013 * frame.c: Likewise.
5014 * gdbarch-selftests.c: Likewise.
5015 * gnu-v3-abi.c: Likewise.
5016 * ia64-tdep.c: Likewise.
5017 * ia64-vms-tdep.c: Likewise.
5018 * infcall.c: Likewise.
5019 * infcmd.c: Likewise.
5020 * infrun.c: Likewise.
5021 * linespec.c: Likewise.
5022 * linux-tdep.c: Likewise.
5023 * minsyms.c: Likewise.
5024 * ppc-linux-nat.c: Likewise.
5025 * ppc-linux-tdep.c: Likewise.
5026 * procfs.c: Likewise.
5027 * regcache.c: Likewise.
5028 * remote.c: Likewise.
5029 * rs6000-tdep.c: Likewise.
5030 * s390-linux-nat.c: Likewise.
5031 * s390-tdep.c: Likewise.
5032 * solib-aix.c: Likewise.
5033 * solib-darwin.c: Likewise.
5034 * solib-dsbt.c: Likewise.
5035 * solib-spu.c: Likewise.
5036 * solib-svr4.c: Likewise.
5037 * solib-target.c: Likewise.
5038 * sparc-tdep.c: Likewise.
5039 * sparc64-tdep.c: Likewise.
5040 * spu-tdep.c: Likewise.
5041 * symfile.c: Likewise.
5042 * symtab.c: Likewise.
5043 * target-descriptions.c: Likewise.
5044 * target-memory.c: Likewise.
5045 * target.c: Likewise.
5046 * target.h: Likewise.
5047 * tracefile-tfile.c: Likewise.
5048 * tracepoint.c: Likewise.
5049 * valops.c: Likewise.
5050 * valprint.c: Likewise.
5051 * value.c: Likewise.
5052 * windows-tdep.c: Likewise.
5053 * mi/mi-main.c: Likewise.
5054
5055 2018-06-07 Tom Tromey <tom@tromey.com>
5056
5057 * valprint.h (build_address_symbolic): Declare.
5058 * printcmd.c (print_address_symbolic): Update.
5059 (build_address_symbolic): Change "name" and "filename" to
5060 std::string.
5061 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5062 Update.
5063 * defs.h (build_address_symbolic): Remove declaration.
5064
5065 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5066
5067 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5068 (aarch64_vnv_type): Add function.
5069 (aarch64_pseudo_register_name): Add V regs for SVE.
5070 (aarch64_pseudo_register_type): Likewise.
5071 (aarch64_pseudo_register_reggroup_p): Likewise.
5072 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5073 (aarch64_pseudo_read_value): Add V regs for SVE.
5074 (aarch64_pseudo_write_2): Use V0 offset for SVE
5075 (aarch64_pseudo_write): Add V regs for SVE.
5076 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5077
5078 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5079
5080 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5081 (sve_vl_from_vq): Likewise.
5082
5083 2018-06-05 Tom Tromey <tom@tromey.com>
5084
5085 * cli/cli-cmds.c (show_version): Update.
5086 * top.c (print_gdb_version): Add "interactive" parameter.
5087 Update.
5088 * main.c (captured_main_1): Update.
5089 * top.h (print_gdb_version): Add "interactive" parameter and a
5090 comment.
5091
5092 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5093
5094 * common/enum-flags.h: Add trailing semicolon to example in
5095 comment.
5096
5097 2018-06-05 Tom Tromey <tom@tromey.com>
5098
5099 PR cli/12326:
5100 * NEWS: Add entry about pager.
5101 * utils.c (pagination_disabled_for_command): New global.
5102 (prompt_for_continue): Allow "c" response to prompt.
5103 (reinitialize_more_filter): Clear
5104 pagination_disabled_for_command.
5105 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5106
5107 2018-06-04 Tom Tromey <tom@tromey.com>
5108
5109 * ada-lang.h (ada_lookup_symbol_list): Update.
5110 * ada-lang.c (resolve_subexp): Update.
5111 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5112 parameter.
5113 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5114 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5115 results parameter to std::vector.
5116 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5117 Update.
5118 * ada-exp.y (block_lookup): Update.
5119 (select_possible_type_sym): Change type of syms. Remove nsyms
5120 parameter.
5121 (write_var_or_type, write_name_assoc): Update.
5122
5123 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5124
5125 * windows-nat.c (windows_nat_target::xfer_partial): Return
5126 TARGET_XFER_E_IO if we need to delegate to the target beneath
5127 but BENEATH is NULL.
5128
5129 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5130
5131 * Makefile.in (config.status): Add configure.nat as a
5132 dependency.
5133
5134 2018-06-04 Tom Tromey <tom@tromey.com>
5135
5136 * cp-name-parser.y (cpname_state): Add method declarations.
5137 (HANDLE_QUAL): Update.
5138 (cpname_state::d_grab, cpname_state::fill_comp)
5139 (cpname_state::make_operator, cpname_state::make_dtor)
5140 (cpname_state::make_builtin_type, cpname_state::make_name)
5141 (cpname_state::d_qualify, cpname_state::d_int_type)
5142 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5143 (%union): Move earlier.
5144
5145 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5146
5147 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5148
5149 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5150
5151 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5152 (aarch64_pseudo_write_1): Likewise.
5153 (aarch64_pseudo_read_value): Use helper.
5154 (aarch64_pseudo_write): Likewise.
5155
5156 2018-06-04 Pedro Alves <palves@redhat.com>
5157
5158 * darwin-nat.c (darwin_ops): Delete.
5159 (darwin_attach_pid): Use get_native_target.
5160
5161 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5162
5163 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5164 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5165
5166 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5167
5168 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5169 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5170 (aarch64_gdbarch_init): Check for SVE.
5171 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5172
5173 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5174
5175 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5176 * aarch64-tdep.h (aarch64_read_description): Likewise.
5177 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5178 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5179 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5180 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5181 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5182
5183 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5184
5185 * value.c (value_fetch_lazy_bitfield): New.
5186 (value_fetch_lazy_memory): New.
5187 (value_fetch_lazy_register): New.
5188 (value_fetch_lazy): Factor out to smaller functions.
5189
5190 2018-06-01 Tom Tromey <tom@tromey.com>
5191
5192 * cp-name-parser.y (backslashable, represented): Now const.
5193
5194 2018-06-01 Tom Tromey <tom@tromey.com>
5195
5196 * cp-name-parser.y: Include parser-defs.h.
5197 (parser_fprintf): Remove declaration.
5198
5199 2018-06-01 Tom Tromey <tom@tromey.com>
5200
5201 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5202 %parse-param.
5203 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5204 (global_result): Remove globals.
5205 (struct cpname_state): New.
5206 (yyparse): Don't declare.
5207 (yylex, yyerror): Move declarations after %union.
5208 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5209 (make_name): Add state parameter.
5210 Update all callers.
5211 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5212 parameter.
5213 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5214 Update.
5215 (yylex): Add lvalp, state parameters.
5216 (yyerror): Add state parameter.
5217 (cp_demangled_name_to_comp): Update.
5218
5219 2018-06-01 Tom Tromey <tom@tromey.com>
5220
5221 * cp-name-parser.y (parser_fprintf): Declare.
5222 (GDB_YY_REMAP_PREFIX): Define.
5223 Include yy-remap.h. Don't redefine yy* identifiers.
5224
5225 2018-06-01 Tom Tromey <tom@tromey.com>
5226
5227 * python/py-type.c (typy_legacy_template_argument): Update.
5228 * cp-support.h (cp_demangled_name_to_comp): Update.
5229 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5230 parameter to be a "std::string *".
5231 (main): Update.
5232
5233 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5234
5235 * ada-lex.l: Include "diagnostics.h" instead of
5236 "common/diagnostics.h".
5237 * unittests/environ-selftests.c: Likewise.
5238 * common/diagnostics.h: Moved to ../include.
5239
5240 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5241
5242 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5243 to language_mode_manual while calling breakpoint_re_set_one.
5244
5245 2018-06-01 Tom Tromey <tom@tromey.com>
5246
5247 * valops.c (value_cast_structs, destructor_name_p): Update.
5248 * symtab.c (gdb_mangle_name): Update.
5249 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5250 Update.
5251 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5252 (pascal_object_print_value_fields, pascal_object_print_value):
5253 Update.
5254 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5255 * linespec.c (find_methods): Update.
5256 * gdbtypes.h (type_name_no_tag): Remove.
5257 (type_name_or_error): Rename from type_name_no_tag_or_error.
5258 * gdbtypes.c (type_name_no_tag): Remove.
5259 (type_name_or_error): Rename from type_name_no_tag_or_error.
5260 (lookup_struct_elt_type, check_typedef): Update.
5261 * expprint.c (print_subexp_standard): Update.
5262 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5263 * d-namespace.c (d_lookup_nested_symbol): Update.
5264 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5265 (cp_print_class_member): Update.
5266 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5267 * completer.c (add_struct_fields): Update.
5268 * c-typeprint.c (cp_type_print_derivation_info)
5269 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5270 Update.
5271 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5272 (ada_prefer_type, ada_is_exception_sym): Update.
5273
5274 2018-06-01 Tom Tromey <tom@tromey.com>
5275
5276 * valops.c (enum_constant_from_type, value_namespace_elt)
5277 (value_maybe_namespace_elt): Update.
5278 * valarith.c (find_size_for_pointer_math): Update.
5279 * target-descriptions.c (make_gdb_type): Update.
5280 * symmisc.c (print_symbol): Update.
5281 * stabsread.c (define_symbol, read_type)
5282 (complain_about_struct_wipeout, add_undefined_type)
5283 (cleanup_undefined_types_1): Update.
5284 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5285 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5286 (rust_internal_print_type, rust_composite_type)
5287 (rust_evaluate_funcall, rust_evaluate_subexp)
5288 (rust_inclusive_range_type_p): Update.
5289 * python/py-type.c (typy_get_tag): Update.
5290 * p-typeprint.c (pascal_type_print_base): Update.
5291 * mdebugread.c (parse_symbol, parse_type): Update.
5292 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5293 Update.
5294 * guile/scm-type.c (gdbscm_type_tag): Update.
5295 * go-lang.c (sixg_string_p): Update.
5296 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5297 Update.
5298 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5299 (TYPE_TAG_NAME): Remove.
5300 * gdbtypes.c (type_name_no_tag): Simplify.
5301 (check_typedef, check_types_equal, recursive_dump_type)
5302 (copy_type_recursive, arch_composite_type): Update.
5303 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5304 in summary mode when needed.
5305 * eval.c (evaluate_funcall): Update.
5306 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5307 (process_structure_scope, read_enumeration_type)
5308 (read_namespace_type, read_module_type, determine_prefix): Update.
5309 * cp-support.c (inspect_type): Update.
5310 * coffread.c (process_coff_symbol, decode_base_type): Update.
5311 * c-varobj.c (c_is_path_expr_parent): Update.
5312 * c-typeprint.c (c_type_print_base_struct_union): Update.
5313 (c_type_print_base_1): Update. Print struct/class/union/enum in
5314 summary when using C language.
5315 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5316 (gen_maybe_namespace_elt): Update.
5317 * ada-lang.c (ada_type_name): Simplify.
5318 (empty_record, ada_template_to_fixed_record_type_1)
5319 (template_to_static_fixed_type)
5320 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5321
5322 2018-06-01 Tom Tromey <tom@tromey.com>
5323
5324 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5325 c_print_type.
5326 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5327 (c_print_type): Update.
5328 (c_print_type): New overload.
5329 (c_type_print_varspec_prefix, c_type_print_args)
5330 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5331 (c_type_print_base_struct_union, c_type_print_base_1)
5332 (cp_type_print_method_args): Add "language" parameter.
5333 (c_type_print_base): Update.
5334 * c-lang.h (c_print_type): Add new overload.
5335
5336 2018-06-01 Tom Tromey <tom@tromey.com>
5337
5338 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5339 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5340
5341 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5342
5343 * aarch64-tdep.c (aarch64_sve_register_names): New const
5344 var.
5345 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5346 (AARCH64_SVE_Z_REGS_NUM): New define.
5347 (AARCH64_SVE_P_REGS_NUM): Likewise.
5348 (AARCH64_SVE_NUM_REGS): Likewise.
5349
5350 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5351
5352 * nat/linux-ptrace.h [__alpha__]
5353 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5354 definitions.
5355
5356 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5357
5358 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5359 the endianness selected.
5360 * NEWS: Document `set endian auto' mode operation update.
5361
5362 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5363
5364 * Makefile.in: Add new header.
5365 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5366 (sve_vl_from_vg): Likewise.
5367 (sve_vq_from_vl): Likewise.
5368 (sve_vl_from_vq): Likewise.
5369 (sve_vq_from_vg): Likewise.
5370 (sve_vg_from_vq): Likewise.
5371 * configure.nat: Add new c file.
5372 * nat/aarch64-sve-linux-ptrace.c: New file.
5373 * nat/aarch64-sve-linux-ptrace.h: New file.
5374
5375 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5376
5377 * aarch64-linux-nat.c (aarch64_linux_read_description):
5378 Add parmeter zero.
5379 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5380 Likewise.
5381 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5382 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5383 (aarch64_gdbarch_init): Add parmeter zero.
5384 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5385 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5386 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5387 parmeter.
5388 * doc/gdb.texinfo: Describe SVE feature
5389 * features/aarch64-sve.c: New file.
5390
5391 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5392
5393 PR gdb/23210
5394 * gdbarch.sh (significant_addr_bit): Default to zero when
5395 not set by target architecture.
5396 * gdbarch.c: Re-generated.
5397 * utils.c (address_significant): Update.
5398
5399 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5400
5401 * stack.c (func_command): Remove trailing newline in call to error.
5402
5403 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5404
5405 * regcache.h (regcache_raw_collect): Remove, update callers to
5406 use regcache::raw_collect.
5407 * regcache.c (regcache_raw_collect): Remove.
5408
5409 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5410
5411 * regcache.h (regcache_raw_supply): Remove, update callers to
5412 use detached_regcache::raw_supply.
5413 * regcache.c (regcache_raw_supply): Remove.
5414
5415 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5416
5417 * regcache.h (regcache_cooked_write_part): Remove, update
5418 callers to use regcache::cooked_write_part.
5419 * regcache.c (regcache_cooked_write_part): Remove.
5420
5421 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5422
5423 * regcache.h (regcache_cooked_read_part): Remove, update callers
5424 to use readable_regcache::cooked_read_part.
5425 * regcache.c (regcache_cooked_read_part): Remove.
5426
5427 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5428
5429 * regcache.h (regcache_cooked_read_value): Remove, update
5430 callers to use readable_regcache::cooked_read_value.
5431 * regcache.c (regcache_cooked_read_value): Remove.
5432
5433 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5434
5435 * regcache.h (regcache_cooked_write): Remove, update callers to
5436 use regcache::cooked_write.
5437 * regcache.c (regcache_cooked_write): Remove.
5438
5439 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5440
5441 * regcache.h (regcache_invalidate): Remove, update callers to
5442 use detached_regcache::invalidate instead.
5443 * regcache.c (regcache_invalidate): Remove.
5444
5445 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5446
5447 * regcache.h (regcache_raw_write_part): Remove, update callers
5448 to use regcache::raw_write_part instead.
5449 * regcache.c (regcache_raw_write_part): Remove.
5450
5451 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5452
5453 * regcache.h (regcache_raw_read_part): Remove, update callers to
5454 use readable_regcache::raw_read_part instead.
5455 * regcache.c (regcache_raw_read_part): Remove.
5456
5457 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5458
5459 * regcache.h (regcache_cooked_read): Remove, update callers to
5460 use readable_regcache::cooked_read instead.
5461 * regcache.c (regcache_cooked_read): Remove.
5462
5463 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5464
5465 * regcache.h (regcache_raw_write): Remove, update callers to use
5466 regcache::raw_write instead.
5467 * regcache.c (regcache_raw_write): Remove.
5468
5469 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5470
5471 * regcache.h (regcache_raw_read): Remove, update callers to use
5472 readable_regcache::raw_read instead.
5473 * regcache.c (regcache_raw_read): Remove.
5474
5475 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5476
5477 * regcache.h (regcache_raw_update): Remove, update callers to
5478 use readable_regcache::raw_update instead.
5479 * regcache.c (regcache_raw_update): Remove.
5480
5481 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5482
5483 * regcache.h (regcache_register_status): Remove, update callers
5484 to use reg_buffer::get_register_status directly instead.
5485 * regcache.c (regcache_register_status): Remove.
5486
5487 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5488
5489 * regcache.h (regcache_get_ptid): Remove, update all callers to
5490 call regcache::ptid instead.
5491 * regcache.c (regcache_get_ptid): Remove.
5492
5493 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5494
5495 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5496
5497 2018-05-30 Pedro Alves <palves@redhat.com>
5498
5499 * common/common-exceptions.h (exception_rethrow): Use
5500 ATTRIBUTE_NORETURN.
5501
5502 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5503
5504 * breakpoint.c (print_solib_event, check_status_catch_solib):
5505 Remove struct keyword in range-based for loops.
5506 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5507 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5508 Likewise.
5509 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5510 Likewise.
5511 * symfile.c (addr_info_make_relative): Likewise.
5512 * thread.c (value_in_thread_stack_temporaries): Likewise.
5513
5514 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5515
5516 PR gdb/16841
5517 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5518 aggregate type to get its real type before accessing it.
5519
5520 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5521
5522 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5523 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5524 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5525 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5526 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5527 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5528 * printcmd.c (info_address_command): Likewise.
5529
5530 2018-05-29 Tom Tromey <tom@tromey.com>
5531
5532 * windows-nat.c (handle_exception): Update fall-through comment.
5533
5534 2018-05-29 Tom Tromey <tom@tromey.com>
5535
5536 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5537 (struct program_space) <added_solibs>: Now a std::vector.
5538 * breakpoint.c (print_solib_event): Update.
5539 (check_status_catch_solib): Update.
5540 * progspace.c (clear_program_space_solib_cache): Update.
5541 * solib.c (update_solib_list): Update.
5542
5543 2018-05-29 Tom Tromey <tom@tromey.com>
5544
5545 * python/py-type.c (typy_richcompare): Update.
5546 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5547 * gdbtypes.h (types_deeply_equal): Return bool.
5548 (types_equal): Likewise.
5549 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5550 declare VEC.
5551 (check_types_equal): Change worklist to std::vector. Return
5552 bool.
5553 (struct type_equality_entry): Add constructor.
5554 (compare_maybe_null_strings): Return bool.
5555 (check_types_worklist): Return bool. Change worklist to
5556 std::vector.
5557 (types_deeply_equal): Use std::vector.
5558 (types_equal): Return bool.
5559 (compare_maybe_null_strings): Simplify.
5560
5561 2018-05-29 Tom Tromey <tom@tromey.com>
5562
5563 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5564
5565 2018-05-29 Tom Tromey <tom@tromey.com>
5566
5567 * objc-lang.h: Don't include cp-support.h.
5568 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5569 declare VEC.
5570
5571 2018-05-27 Tom Tromey <tom@tromey.com>
5572
5573 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5574
5575 2018-05-25 Tom Tromey <tom@tromey.com>
5576
5577 * value.c (value::location): Initialize.
5578
5579 2018-05-25 Tom Tromey <tom@tromey.com>
5580
5581 * dbxread.c (init_bincl_list): Remove.
5582 (bincl_list): Now a std::vector.
5583 (bincls_allocated, next_bincl): Remove.
5584 (free_bincl_list, do_free_bincl_list_cleanup)
5585 (make_cleanup_free_bincl_list): Remove.
5586 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5587 unique_xmalloc_ptr.
5588 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5589 (struct header_file_location): Add constructor.
5590 (add_bincl_to_list): Remove.
5591
5592 2018-05-25 Tom Tromey <tom@tromey.com>
5593
5594 * tui/tui.c (tui_enable): Update.
5595 * mi/mi-interp.c (mi_interp::init): Update.
5596 * interps.h (class interp) <name>: New method.
5597 <m_name>: Rename from name.
5598 (~scoped_restore_interp): Update.
5599 * interps.c (interp::interp): Update.
5600 (interp_add, interp_set, interp_lookup_existing)
5601 (current_interp_named_p): Update.
5602
5603 2018-05-25 Tom Tromey <tom@tromey.com>
5604
5605 * interps.c (interp_name): Remove.
5606 * mi/mi-interp.c (mi_interp::init): Update.
5607 * interps.h (interp_name): Remove.
5608 (~scoped_restore_interp): Update.
5609 * tui/tui.c (tui_enable): Update.
5610
5611 2018-05-25 Tom Tromey <tom@tromey.com>
5612
5613 * utils.c (fputs_maybe_filtered): Update.
5614 * linespec.c (decode_line_full): Update.
5615 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5616 (mi_print_breakpoint_for_event, mi_solib_loaded)
5617 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5618 (mi_user_selected_context_changed): Update.
5619 * mi/mi-main.c (mi_execute_command): Update.
5620 * cli/cli-script.c (execute_control_command): Update.
5621 * python/python.c (execute_gdb_command): Update.
5622 * solib.c (info_sharedlibrary_command): Update.
5623 * interps.c (interp_ui_out): Remove.
5624 * interps.h (interp_ui_out): Remove.
5625
5626 2018-05-25 Tom Tromey <tom@tromey.com>
5627
5628 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5629 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5630 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5631
5632 2018-05-25 Tom Tromey <tom@tromey.com>
5633
5634 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5635 * interps.c (interp_exec): Use scoped_restore.
5636
5637 2018-05-25 Tom Tromey <tom@tromey.com>
5638
5639 * remote.c (remote_target::remote_file_get): Use
5640 gdb::byte_vector.
5641 (remote_target::remote_file_put): Likewise.
5642
5643 2018-05-25 Tom Tromey <tom@tromey.com>
5644
5645 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5646 a std::string.
5647 (get_pe_section_index, add_pe_exported_sym): Update.
5648 (read_pe_exported_syms): Use gdb::def_vector.
5649
5650 2018-05-25 Tom Tromey <tom@tromey.com>
5651
5652 * frame.c (remove_prev_frame): Remove.
5653 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5654
5655 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5656
5657 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5658 Remove prototypes.
5659 * mips-linux-nat.c (supply_fpregset): Always call
5660 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5661 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5662 `mips_fill_fpregset'.
5663 * mips-linux-tdep.c (mips_supply_fpregset)
5664 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5665 (mips_fill_fpregset_wrapper): Remove functions.
5666 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5667 (mips_linux_fpregset): Remove variable.
5668 (mips_linux_iterate_over_regset_sections): Use
5669 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5670 (mips_linux_o32_sigframe_init): Remove comment.
5671
5672 2018-05-25 Pedro Alves <palves@redhat.com>
5673
5674 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5675 (struct readahead_cache, struct packet_reg, struct
5676 remote_arch_state, class remote_state): Move higher up in the
5677 file.
5678 (remote_target::m_remote_state): Now an object instead of a pointer.
5679 (remote_target::get_remote_state): Adjust.
5680
5681 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5682
5683 * stack.c (select_and_print_frame): Delete.
5684 (struct function_bounds): Move struct within function.
5685 (func_command): Most content moved into new function
5686 find_frame_for_function, use new function, print result, add
5687 function comment.
5688 (find_frame_for_function): New function, now returns a result.
5689
5690 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5691
5692 * stack.c (iterate_over_block_arg_vars): Fix comment.
5693 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5694
5695 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5696
5697 PR gdb/23203
5698 * frame.c
5699 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5700 Define.
5701 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5702 Define.
5703 * frame.h (class scoped_restore_selected_frame): New class.
5704 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5705 of any exception, use scoped_restore_selected_frame to restore the
5706 frame instead.
5707
5708 2018-05-24 Pedro Alves <palves@redhat.com>
5709
5710 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5711 override.
5712
5713 2018-05-23 Tom Tromey <tom@tromey.com>
5714
5715 * complaints.c (struct complaints): Remove.
5716 (symfile_complaint_book): Remove.
5717 (series): New global.
5718 (complaint_internal): Update.
5719 (clear_complaints): Update.
5720
5721 2018-05-23 Tom Tromey <tom@tromey.com>
5722
5723 * complaints.c (counters): New global.
5724 (struct complain): Remove.
5725 (struct complaints) <root>: Remove.
5726 (complaint_sentinel): Remove.
5727 (symfile_complaint_book): Update.
5728 (find_complaint) Remove.
5729 (complaint_internal, clear_complaints): Update.
5730
5731 2018-05-23 Tom Tromey <tom@tromey.com>
5732
5733 * complaints.c (struct complain) <file, line>: Remove.
5734 (find_complaint): Remove file, line parameters.
5735 (complaint_internal): Update.
5736
5737 2018-05-23 Tom Tromey <tom@tromey.com>
5738
5739 * complaints.c (vcomplaint): Remove.
5740 (complaint_internal) Merge in contents of vcomplaint.
5741
5742 2018-05-23 Tom Tromey <tom@tromey.com>
5743
5744 * complaints.c (struct complaints) <explanation>: Remove.
5745 (symfile_explanations): Remove.
5746 (symfile_complaint_book): Update.
5747 (vcomplaint): Update.
5748 (struct explanation): Remove.
5749
5750 2018-05-23 Tom Tromey <tom@tromey.com>
5751
5752 * complaints.c (symfile_complaints): Remove.
5753 (complaint_internal): Remove "complaints" parameter.
5754 (clear_complaints, vcomplaint): Remove "c" parameter.
5755 (get_complaints): Remove.
5756 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5757 (dwarf2_debug_line_missing_file_complaint)
5758 (dwarf2_debug_line_missing_end_sequence_complaint)
5759 (dwarf2_complex_location_expr_complaint)
5760 (dwarf2_const_value_length_mismatch_complaint)
5761 (dwarf2_section_buffer_overflow_complaint)
5762 (dwarf2_macro_malformed_definition_complaint)
5763 (dwarf2_invalid_attrib_class_complaint)
5764 (create_addrmap_from_index, dw2_symtab_iter_next)
5765 (dw2_expand_marked_cus)
5766 (dw2_debug_names_iterator::find_vec_in_debug_names)
5767 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5768 (create_debug_type_hash_table, init_cutu_and_read_dies)
5769 (partial_die_parent_scope, add_partial_enumeration)
5770 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5771 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5772 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5773 (create_cus_hash_table, create_dwp_hash_table)
5774 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5775 (dwarf2_rnglists_process, dwarf2_ranges_process)
5776 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5777 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5778 (handle_struct_member_die, process_structure_scope)
5779 (read_array_type, read_common_block, read_module_type)
5780 (read_tag_pointer_type, read_typedef, read_base_type)
5781 (read_subrange_type, load_partial_dies, partial_die_info::read)
5782 (partial_die_info::read, partial_die_info::read)
5783 (partial_die_info::read, read_checked_initial_length_and_offset)
5784 (dwarf2_string_attr, read_formatted_entries)
5785 (dwarf_decode_line_header)
5786 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5787 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5788 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5789 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5790 (get_signatured_type, get_DW_AT_signature_type)
5791 (decode_locdesc, file_file_name, consume_improper_spaces)
5792 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5793 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5794 (dwarf2_symbol_mark_computed, set_die_type)
5795 (read_attribute_value): Update.
5796 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5797 Update.
5798 * dbxread.c (unknown_symtype_complaint)
5799 (lbrac_mismatch_complaint, repeated_header_complaint)
5800 (set_namestring, function_outside_compilation_unit_complaint)
5801 (read_dbx_symtab, process_one_symbol): Update.
5802 * gdbtypes.c (stub_noname_complaint): Update.
5803 * windows-nat.c (handle_unload_dll): Update.
5804 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5805 (decode_base_type): Update.
5806 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5807 (eb_complaint, record_include_begin, record_include_end)
5808 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5809 (process_xcoff_symbol, read_symbol)
5810 (function_outside_compilation_unit_complaint)
5811 (scan_xcoff_symtab): Update.
5812 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5813 * buildsym.c (finish_block_internal, make_blockvector)
5814 (end_symtab_get_static_block, augment_type_symtab): Update.
5815 * dtrace-probe.c (dtrace_process_dof)
5816 (dtrace_static_probe_ops::get_probes): Update.
5817 * complaints.h (struct complaint): Don't declare.
5818 (symfile_complaints): Remove.
5819 (complaint_internal): Remove "complaints" parameter.
5820 (complaint): Likewise.
5821 (clear_complaints): Likewise.
5822 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5823 (reread_symbols): Update.
5824 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5825 (dwarf2_frame_cache, decode_frame_entry): Update.
5826 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5827 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5828 (info_selectors_command): Update.
5829 * macrotab.c (macro_include, check_for_redefinition)
5830 (macro_undef): Update.
5831 * objfiles.c (filter_overlapping_sections): Update.
5832 * stabsread.c (invalid_cpp_abbrev_complaint)
5833 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5834 (define_symbol, error_type, read_type, rs6000_builtin_type)
5835 (stabs_method_name_from_physname, read_member_functions)
5836 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5837 (attach_fields_to_type, complain_about_struct_wipeout)
5838 (read_range_type, read_args, common_block_start)
5839 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5840 Update.
5841 * mdebugread.c (index_complaint, unknown_ext_complaint)
5842 (basic_type_complaint, bad_tag_guess_complaint)
5843 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5844 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5845 (parse_procedure, parse_lines)
5846 (function_outside_compilation_unit_complaint)
5847 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5848 (bad_tag_guess_complaint, reg_value_complaint): Update.
5849 * cp-support.c (demangled_name_complaint): Update.
5850 * macroscope.c (sal_macro_scope): Update.
5851 * dwarf-index-write.c (class debug_names): Update.
5852
5853 2018-05-23 Tom Tromey <tom@tromey.com>
5854
5855 * complaints.c (clear_complaints): Remove "noisy" parameter.
5856 * complaints.h (clear_complaints): Update.
5857 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5858 (reread_symbols): Update.
5859
5860 2018-05-23 Tom Tromey <tom@tromey.com>
5861
5862 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5863 SUBSEQUENT_MESSAGE.
5864 (vcomplaint, clear_complaints): Update.
5865 (symfile_explanations): Remove some messages.
5866
5867 2018-05-23 Tom Tromey <tom@tromey.com>
5868
5869 * complaints.c (internal_complaint): Remove.
5870 * complaints.h (internal_complaint): Remove.
5871
5872 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5873
5874 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5875
5876 2018-05-22 Pedro Alves <palves@redhat.com>
5877
5878 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5879 (remote_fileio_badfd, remote_fileio_return_errno)
5880 (remote_fileio_return_success, remote_fileio_func_open)
5881 (remote_fileio_func_open, remote_fileio_func_close)
5882 (remote_fileio_func_read, remote_fileio_func_write)
5883 (remote_fileio_func_lseek, remote_fileio_func_rename)
5884 (remote_fileio_func_unlink, remote_fileio_func_stat)
5885 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5886 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5887 remote_target parameter.
5888 (remote_fio_func_map) <func>: Add remote_target parameter.
5889 (do_remote_fileio_request, remote_fileio_request):
5890 * remote-fileio.h (remote_fileio_request):
5891 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5892 remote_target parameter.
5893 (remote_notif_process, handle_notification): Adjust to pass down
5894 the remote.
5895 (remote_notif_state_allocate): Add remote_target parameter. Save
5896 it.
5897 * remote-notif.h (struct remote_target): Forward declare.
5898 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5899 remote_target parameter.
5900 (struct remote_notif_state) <remote>: New field.
5901 (remote_notif_ack, remote_notif_parse): Add remote_target
5902 parameter.
5903 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5904 remote_target parameter.
5905 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5906 (threads_listing_context, rmt_thread_action, protocol_feature)
5907 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5908 (packet_result, struct threads_listing_context, remote_state):
5909 Move definitions and declarations higher up.
5910 (remote_target) <~remote_target>: Declare.
5911 (remote_download_command_source, remote_file_put, remote_file_get)
5912 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5913 (remote_hostio_pread_vFile, remote_hostio_send_command)
5914 (remote_hostio_set_filesystem, remote_hostio_open)
5915 (remote_hostio_close, remote_hostio_unlink, remote_state)
5916 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5917 (get_memory_write_packet_size, get_memory_read_packet_size)
5918 (append_pending_thread_resumptions, remote_detach_1)
5919 (append_resumption, remote_resume_with_vcont)
5920 (add_current_inferior_and_thread, wait_ns, wait_as)
5921 (process_stop_reply, remote_notice_new_inferior)
5922 (process_initial_stop_replies, remote_add_thread)
5923 (btrace_sync_conf, remote_btrace_maybe_reopen)
5924 (remove_new_fork_children, kill_new_fork_children)
5925 (discard_pending_stop_replies, stop_reply_queue_length)
5926 (check_pending_events_prevent_wildcard_vcont)
5927 (discard_pending_stop_replies_in_queue, stop_reply)
5928 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5929 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5930 (remote_interrupt_as, remote_interrupt_ns)
5931 (remote_get_noisy_reply, remote_query_attached)
5932 (remote_add_inferior, remote_current_thread, get_current_thread)
5933 (set_thread, set_general_thread, set_continue_thread)
5934 (set_general_process, write_ptid)
5935 (remote_unpack_thread_info_response, remote_get_threadinfo)
5936 (parse_threadlist_response, remote_get_threadlist)
5937 (remote_threadlist_iterator, remote_get_threads_with_ql)
5938 (remote_get_threads_with_qxfer)
5939 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5940 (get_offsets, remote_check_symbols, remote_supported_packet)
5941 (remote_query_supported, remote_packet_size)
5942 (remote_serial_quit_handler, remote_detach_pid)
5943 (remote_vcont_probe, remote_resume_with_hc)
5944 (send_interrupt_sequence, interrupt_query)
5945 (remote_notif_get_pending_events, fetch_register_using_p)
5946 (send_g_packet, process_g_packet, fetch_registers_using_g)
5947 (store_register_using_P, store_registers_using_G)
5948 (set_remote_traceframe, check_binary_download)
5949 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5950 (remote_xfer_live_readonly_partial, remote_read_bytes)
5951 (remote_send_printf, remote_flash_write, readchar)
5952 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5953 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5954 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5955 (extended_remote_disable_randomization, extended_remote_run)
5956 (send_environment_packet, extended_remote_environment_support)
5957 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5958 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5959 (packet_command): Now methods of ...
5960 (remote_target): ... this class.
5961 (m_remote_state) <remote_target>: New field.
5962 (struct remote_state) <stop_reply_queue,
5963 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5964 fields.
5965 (remote_state::remote_state): Allocate stop_reply_queue.
5966 (remote_state): Delete global.
5967 (get_remote_state_raw): Delete.
5968 (remote_target::get_remote_state): Allocate m_remote_state on
5969 demand.
5970 (get_current_remote_target): New.
5971 (remote_ops, extended_remote_ops): Delete.
5972 (wait_forever_enabled_p, remote_async_inferior_event_token):
5973 Delete, moved to struct remote_state.
5974 (remote_target::close): Delete self. Destruction bits split to
5975 ...
5976 (remote_target::~remote_target): ... this.
5977 (show_memory_packet_size): Adjust to use
5978 get_current_remote_target.
5979 (struct protocol_feature) <func>: Add remote_target parameter.
5980 All callers adjusted.
5981 (curr_quit_handler_target): New.
5982 (remote_serial_quit_handler): Reimplement.
5983 (remote_target::open_1): Adjust to use get_current_remote_target.
5984 Heap-allocate remote_target/extended_remote_target instances.
5985 (vcont_builder::vcont_builder): Add remote_target parameter, and
5986 save it in m_remote. All callers adjusted.
5987 (vcont_builder::m_remote): New field.
5988 (vcont_builder::restart, vcont_builder::flush)
5989 (vcont_builder::push_action): Use it.
5990 (remote_target::commit_resume): Use it.
5991 (struct queue_iter_param) <remote>: New field.
5992 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5993 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5994 (check_pending_event_prevents_wildcard_vcont_callback)
5995 (remote_target::check_pending_events_prevent_wildcard_vcont)
5996 (remote_target::discard_pending_stop_replies)
5997 (remote_target::discard_pending_stop_replies_in_queue)
5998 (remote_target::remote_notif_remove_queued_reply): Fill in
5999 'remote' field.
6000 (remote_notif_get_pending_events): New.
6001 (remote_target::readchar, remote_target::remote_serial_write):
6002 Save/restore curr_quit_handler_target.
6003 (putpkt): New.
6004 (kill_new_fork_children): Fill in 'remote' field.
6005 (packet_command): Use get_current_remote_target, defer to
6006 remote_target method of same name.
6007 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6008 parameter, and save it in m_remote. All callers adjusted.
6009 (scoped_remote_fd::release): Use m_remote.
6010 (scoped_remote_fd::m_remote): New field.
6011 (remote_file_put, remote_file_get, remote_file_delete): Use
6012 get_current_remote_target, defer to remote_target method of same
6013 name.
6014 (remote_btrace_reset): Add remote_state paremeter. Update all
6015 callers.
6016 (remote_async_inferior_event_handler). Pass down 'data'.
6017 (remote_new_objfile): Use get_current_remote_target.
6018 (remote_target::vcont_r_supported): New.
6019 (set_range_stepping): Use get_current_remote_target and
6020 remote_target::vcont_r_supported.
6021 (_initialize_remote): Don't allocate 'remote_state' and
6022 'stop_reply_queue' globals.
6023 * remote.h (struct remote_target): Forward declare.
6024 (getpkt, putpkt, remote_notif_get_pending_events): Add
6025 'remote_target' parameter.
6026
6027 2018-05-22 Pedro Alves <palves@redhat.com>
6028
6029 * remote.c (vcont_builder): Now a class. Make all data members
6030 private.
6031 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6032 Declare methods.
6033 (vcont_builder_restart): Rename to ...
6034 (vcont_builder::restart): ... this.
6035 (vcont_builder_flush): Rename to ...
6036 (vcont_builder::flush): ... this.
6037 (vcont_builder_push_action): Rename to ...
6038 (vcont_builder::push_action): ... this.
6039 (remote_target::commit_resume): Adjust.
6040
6041 2018-05-22 Pedro Alves <palves@redhat.com>
6042
6043 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6044 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6045 (get_fixed_memory_packet_size): New.
6046 (get_memory_packet_size): Use it.
6047 (set_memory_packet_size): Don't override the config size with
6048 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6049 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6050 Don't refer to get_memory_packet_size if not connected to a remote
6051 target. Show "(default)" if configured size is 0.
6052
6053 2018-05-22 Pedro Alves <palves@redhat.com>
6054
6055 * remote.c (remote_target::mourn_inferior): Move
6056 discard_pending_stop_replies call here from ...
6057 (_initialize_remote): ... here.
6058
6059 2018-05-22 Pedro Alves <palves@redhat.com>
6060
6061 * remote.c (compare_section_command): Remove set_general_process
6062 call.
6063
6064 2018-05-22 Pedro Alves <palves@redhat.com>
6065
6066 * remote.c (struct packet_reg, struct remote_arch_state):
6067 Move higher up in the file.
6068 (remote_state) <m_arch_states>: Store remote_arch_state values
6069 instead of remote_arch_state pointers.
6070 (remote_state::get_remote_arch_state): Adjust.
6071
6072 2018-05-22 Pedro Alves <palves@redhat.com>
6073
6074 * remote.c: Include <unordered_map>.
6075 (remote_state): Now a class.
6076 (remote_state) <get_remote_arch_state>: Declare method.
6077 <get_remote_arch_state>: New field.
6078 (remote_arch_state) <remote_arch_state>: Declare ctor.
6079 <regs>: Now a unique_ptr.
6080 (remote_gdbarch_data_handle): Delete.
6081 (get_remote_arch_state): Delete.
6082 (remote_state::get_remote_arch_state): New.
6083 (get_remote_state): Adjust to call remote_state's
6084 get_remote_arch_state method.
6085 (init_remote_state): Delete, bits factored out to ...
6086 (remote_arch_state::remote_arch_state): ... this new method.
6087 (get_remote_packet_size, get_memory_packet_size)
6088 (process_g_packet, remote_target::fetch_registers)
6089 (remote_target::prepare_to_store, store_registers_using_G)
6090 (remote_target::store_registers, remote_target::get_trace_status):
6091 Adjust to call remote_state's method.
6092 (_initialize_remote): Remove reference to
6093 remote_gdbarch_data_handle.
6094
6095 2018-05-22 Pedro Alves <palves@redhat.com>
6096
6097 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6098 pread>: New method declarations.
6099 (remote_target::open_1): Adjust.
6100 (readahead_cache_invalidate): Rename to ...
6101 (readahead_cache::invalidate): ... this, and adjust to be a class
6102 method.
6103 (readahead_cache_invalidate_fd): Rename to ...
6104 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6105 class method.
6106 (remote_hostio_pwrite): Adjust.
6107 (remote_hostio_pread_from_cache): Rename to ...
6108 (readahead_cache::pread): ... this, and adjust to be a class
6109 method.
6110 (remote_hostio_close): Adjust.
6111
6112 2018-05-22 Pedro Alves <palves@redhat.com>
6113
6114 * remote.c (remote_hostio_close_cleanup): Delete.
6115 (class scoped_remote_fd): New.
6116 (remote_file_put, remote_file_get): Use it.
6117
6118 2018-05-22 Pedro Alves <palves@redhat.com>
6119
6120 (struct vCont_action_support): Use bool and initialize all fields.
6121 (struct readahead_cache): Initialize all fields.
6122 (remote_state): Use bool and initialize all fields.
6123 (remote_state::remote_state, remote_state::~remote_state): New.
6124 (new_remote_state): Delete.
6125 (_initialize_remote): Use new to allocate remote_state.
6126
6127 2018-05-22 Pedro Alves <palves@redhat.com>
6128 張俊芝 <zjz@zjz.name>
6129
6130 PR gdb/22973
6131 * c-exp.y: Include "c-support.h".
6132 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6133 of tolower. Use c_ident_is_alpha to scan names.
6134 * c-lang.c: Include "c-support.h".
6135 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6136 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6137 * c-support.h: New file, with bits factored out from ...
6138 * cp-name-parser.y: ... this file.
6139 Include "c-support.h".
6140 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6141 c-support.h and renamed.
6142 (symbol_end, yylex): Adjust.
6143
6144 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6145
6146 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6147 parameter type to CORE_ADDR.
6148 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6149 parameter type in declaration to CORE_ADDR.
6150 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6151 target_auxv_search to get AT_HWCAP and use the result to get the
6152 target description.
6153 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6154 to CORE_ADDR. Remove the cast of the return value to unsigned
6155 long. Fix error predicate of target_auxv_search.
6156 (ppc_linux_nat_target::read_description): Change the type of the
6157 hwcap variable to CORE_ADDR.
6158
6159 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6160
6161 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6162 if the size of fpscr is larger than 32 bits.
6163
6164 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6165
6166 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6167 (ppc32_linux_vsxregmap): New global.
6168 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6169 regcache_supply_regset, and regcache_collect_regset.
6170 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6171 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6172 (fetch_vsx_register, store_vsx_register): Remove.
6173 (fetch_vsx_registers): Add regno parameter. Get regset using
6174 ppc_linux_vsxregset. Use regset to supply registers.
6175 (store_vsx_registers): Add regno parameter. Get regset using
6176 ppc_linux_vsxregset. Use regset to collect registers.
6177 (fetch_register): Call fetch_vsx_registers instead of
6178 fetch_vsx_register.
6179 (store_register): Call store_vsx_registers instead of
6180 store_vsx_register.
6181 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6182 new regno parameter.
6183 (store_ppc_registers): Call store_vsx_registers with -1 for the
6184 new regno parameter.
6185 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6186 (ppc_collect_vsxregset): Remove.
6187
6188 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6189
6190 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6191 offset fields.
6192 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6193 for vector register offset fields.
6194 (ppc64_fbsd_reg_offsets): Likewise.
6195 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6196 to vector register offset fields.
6197 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6198 to vector register offset fields.
6199 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6200 vector register offset fields.
6201 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6202 initializers for vector register offset fields.
6203 (rs6000_aix64_reg_offsets): Likewise.
6204 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6205 (ppc_supply_vrregset): Remove.
6206 (ppc_collect_vrregset): Remove.
6207 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6208 (ppc_linux_vrregset) : New function.
6209 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6210 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6211 (ppc32_linux_vrregset): Remove.
6212 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6213 and use result instead of ppc32_linux_vrregset.
6214 (ppc32_linux_reg_offsets): Remove initializers for vector register
6215 offset fields.
6216 (ppc64_linux_reg_offsets): Likewise.
6217 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6218 * ppc-linux-nat.c: Include regset.h.
6219 (gdb_vrregset_t): Adjust comment to account for little-endian
6220 mode.
6221 (supply_vrregset, fill_vrregset): Remove.
6222 (fetch_altivec_register, store_altivec_register): Remove.
6223 (fetch_altivec_registers): Add regno parameter. Get regset using
6224 ppc_linux_vrregset. Use regset to supply registers.
6225 (store_altivec_registers): Add regno parameter. Get regset using
6226 ppc_linux_vrregset. Use regset to collect registers.
6227 (fetch_register): Call fetch_altivec_registers instead of
6228 fetch_altivec_register.
6229 (store_register): Call store_altivec_registers instead of
6230 store_altivec_register.
6231 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6232 the new regno parameter.
6233 (store_ppc_registers): Call store_altivec_registers with -1 for
6234 the new regno parameter.
6235
6236 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6237
6238 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6239 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6240 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6241 (gdb_vrregset_t): Change array type size to
6242 PPC_LINUX_SIZEOF_VRREGSET.
6243 (gdb_vsxregset_t): Change array type size to
6244 PPC_LINUX_SIZEOF_VSXREGSET.
6245 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6246 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6247 PPC_LINUX_SIZEOF_VSXREGSET.
6248
6249 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6250
6251 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6252 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6253 nat/ppc-linux.c.
6254 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6255 ppc_linux_target_wordsize with tid.
6256 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6257 wordsize with tid.
6258 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6259 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6260 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6261 tid parameter. Remove static specifier.
6262 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6263 (ppc_linux_target_wordsize): New declaration.
6264
6265 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6266
6267 * arch/ppc-linux-common.c: New file.
6268 * arch/ppc-linux-common.h: New file.
6269 * arch/ppc-linux-tdesc.h: New file.
6270 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6271 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6272 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6273 arch/ppc-linux-tdesc.h.
6274 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6275 arch/ppc-linux-tdesc.h.
6276 (ppc_linux_nat_target::read_description): Remove target
6277 description matching code. Fill a ppc_linux_features struct and
6278 call ppc_linux_match_description with it. Move comment about ISA
6279 2.05 to ppc-linux-common.c.
6280 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6281 arch/ppc-linux-tdesc.h.
6282 (ppc_linux_core_read_description): Remove target description
6283 matching code. Fill a ppc_linux_features struct and call
6284 ppc_linux_match_description with it.
6285 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6286 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6287 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6288 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6289 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6290 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6291 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6292 (tdesc_powerpc_e500l): Remove.
6293
6294 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6295
6296 * ada-lang.c (catch_assert_command): Pass empty string instead
6297 of NULL for excep_string argument.
6298
6299 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6300
6301 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6302 the width of the requested register exceeds the width of the
6303 `ptrace' data type.
6304
6305 2018-05-21 Tom Tromey <tom@tromey.com>
6306
6307 * printcmd.c (output_command): Remove.
6308 (output_command_const): Rename to output_command.
6309 * valprint.h (output_command): Rename from output_command_const.
6310 * tracepoint.c (trace_dump_actions): Call output_command.
6311
6312 2018-05-21 Tom Tromey <tom@tromey.com>
6313
6314 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6315 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6316 * ada-lang.h (create_ada_exception_catchpoint): Update.
6317 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6318 std::string.
6319 (create_excep_cond_exprs, ~ada_catchpoint)
6320 (should_stop_exception, print_one_exception)
6321 (print_mention_exception, print_recreate_exception): Update.
6322 (ada_get_next_arg): Remove.
6323 (catch_ada_exception_command_split): Use std::string. Change type
6324 of "excep_string", "cond_string".
6325 (catch_ada_exception_command): Update.
6326 (create_ada_exception_catchpoint): Change type of excep_string.
6327 (ada_exception_sal): Remove excep_string parameter.
6328 (~ada_catchpoint): Remove.
6329
6330 2018-05-21 Tom Tromey <tom@tromey.com>
6331
6332 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6333 cleanup.
6334
6335 2018-05-21 Tom Tromey <tom@tromey.com>
6336
6337 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6338 Return unique_xmalloc_ptr.
6339 (print_it_exception): Update.
6340
6341 2018-05-21 Tom Tromey <tom@tromey.com>
6342
6343 * tracepoint.c (trace_dump_actions): Use std::string.
6344
6345 2018-05-21 Tom Tromey <tom@tromey.com>
6346
6347 * symfile.c (reread_symbols): Use std::string for original_name.
6348
6349 2018-05-21 Tom Tromey <tom@tromey.com>
6350
6351 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6352 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6353 constructor.
6354
6355 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6356
6357 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6358 instance to...
6359 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6360 * objfiles.c (get_objfile_bfd_data): Allocate
6361 objfile_per_bfd_storage with obstack_new when allocating on
6362 obstack.
6363
6364 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6365
6366 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6367 OBSTACK_ZALLOC.
6368 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6369 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6370 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6371 (add_pending): Likewise.
6372 (parse_symbol): Likewise.
6373 (parse_partial_symbols): Likewise.
6374 (psymtab_to_symtab_1): Likewise.
6375 (new_psymtab): Likewise.
6376 (elfmdebug_build_psymtabs): Likewise.
6377 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6378 * objfiles.c (get_objfile_bfd_data): Likewise.
6379 (objfile_register_static_link): Likewise.
6380 * psymtab.c (allocate_psymtab): Likewise.
6381 * stabsread.c (read_member_functions): Likewise.
6382 * xcoffread.c (xcoff_end_psymtab): Likewise.
6383
6384 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6385
6386 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6387 compiler supports std::is_trivially_constructible.
6388 * common/poison.h: Include obstack.h.
6389 (IsMallocable): Define to is_trivially_constructible if the
6390 compiler supports it, define to true_type otherwise.
6391 (xobnew): New.
6392 (XOBNEW): Redefine.
6393 (xobnewvec): New.
6394 (XOBNEWVEC): Redefine.
6395 * gdb_obstack.h (obstack_zalloc): New.
6396 (OBSTACK_ZALLOC): Redefine.
6397 (obstack_calloc): New.
6398 (OBSTACK_CALLOC): Redefine.
6399 (obstack_new): New.
6400 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6401 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6402 gdbarch.c.
6403 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6404 obstack_calloc/obstack_zalloc.
6405 (gdbarch_obstack_zalloc): Remove.
6406 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6407
6408 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6409
6410 * stack.c (backtrace_command_1): Remove useless variable int i.
6411
6412 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6413
6414 * stack.c (print_frame_info): Fix comment.
6415
6416 2018-05-18 Tom Tromey <tom@tromey.com>
6417
6418 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6419 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6420 (~dwarf2_per_objfile): Update
6421 (dwarf2_get_dwz_file): Use new.
6422 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6423 unique_ptr.
6424
6425 2018-05-18 Tom Tromey <tom@tromey.com>
6426
6427 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6428 unique_ptr.
6429 * dwarf2read.c (struct dwp_file): Add constructor and
6430 initializers.
6431 (open_and_init_dwp_file): Return a unique_ptr.
6432 (dwarf2_per_objfile, create_dwp_hash_table)
6433 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6434 (lookup_dwo_unit_in_dwp): Update.
6435 (open_and_init_dwp_file, get_dwp_file): Update.
6436
6437 2018-05-18 Tom Tromey <tom@tromey.com>
6438
6439 * dwarf2read.c (dwarf2_per_objfile): Update.
6440 (struct mapped_index): Add initializers.
6441 (dwarf2_read_index): Use new.
6442 (dw2_symtab_iter_init): Update.
6443 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6444 unique_ptr.
6445
6446 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6447
6448 * dwarf2read.c (mapped_index) <total_size>: Remove.
6449
6450 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6451
6452 * unittests/format_pieces-selftests.c (test_format_specifier):
6453 Add ARI comments.
6454
6455 2018-05-18 Tom Tromey <tom@tromey.com>
6456
6457 * c-typeprint.c (maybe_print_hole): New function.
6458 (c_print_type_struct_field_offset): Update.
6459 (c_type_print_base_struct_union): Call maybe_print_hole.
6460
6461 2018-05-17 Keith Seitz <keiths@redhat.com>
6462
6463 * breakpoint.c (build_bpstat_chain): New function, moved from
6464 bpstat_stop_status.
6465 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6466 If no stop chain is passed, call build_bpstat_chain to build it.
6467 * breakpoint.h (build_bpstat_chain): Declare.
6468 (bpstat_stop_status): Move documentation here from breakpoint.c.
6469 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6470 build the stop chain and pass it to skip_inline_frames.
6471 Pass this stop chain to bpstat_stop_status.
6472 * inline-frame.c: Include breakpoint.h.
6473 (stopped_by_user_bp_inline_frame): New function.
6474 (skip_inline_frames): Add parameter `stop_chain'.
6475 Move documention to inline-frame.h.
6476 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6477 whether the frame should be elided.
6478 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6479 Add moved documentation and update for new parameter.
6480
6481 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6482
6483 PR cli/14975
6484 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6485 unittests/format_pieces-selftests.c.
6486 * common/format.h (format_piece) <operator==>: New.
6487 (format_pieces) <operator[]>: Remove.
6488 * common/format.c (format_pieces::format_pieces): Handle \e.
6489 * unittests/format_pieces-selftests.c: New.
6490
6491 2018-05-17 Tom Tromey <tom@tromey.com>
6492
6493 PR symtab/23010:
6494 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6495 (dw2_instantiate_symtab): Add skip_partial parameter.
6496 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6497 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6498 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6499 (dw2_expand_symtabs_matching_one)
6500 (dw2_find_pc_sect_compunit_symtab)
6501 (dw2_debug_names_lookup_symbol)
6502 (dw2_debug_names_expand_symtabs_for_function): Update.
6503 (init_cutu_and_read_dies): Add skip_partial parameter.
6504 (process_psymtab_comp_unit, build_type_psymtabs_1)
6505 (process_skeletonless_type_unit, load_partial_comp_unit)
6506 (psymtab_to_symtab_1): Update.
6507 (load_full_comp_unit): Add skip_partial parameter.
6508 (process_imported_unit_die, dwarf2_read_addr_index)
6509 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6510 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6511 (read_signatured_type): Update.
6512
6513 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6514
6515 * value.c (release_value): Remove unused variable.
6516 (record_latest_value): Likewise.
6517 (access_value_history): Likewise.
6518 (preserve_values): Likewise.
6519
6520 2018-05-17 Tom Tromey <tom@tromey.com>
6521
6522 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6523 Initialize.
6524
6525 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6526
6527 PR gdb/22286
6528 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6529 Also handle registers whose width is not a multiple of
6530 PTRACE_TYPE_RET.
6531 (linux_nat_trad_target::store_register): Likewise.
6532
6533 2018-05-16 Tom Tromey <tom@tromey.com>
6534
6535 * gdbcore.h (core_bfd): Redefine.
6536 * corelow.c (core_target::close): Update.
6537 (core_target_open): Update.
6538 * progspace.h (struct program_space) <cbfd>: Now a
6539 gdb_bfd_ref_ptr.
6540
6541 2018-05-16 Tom Tromey <tom@tromey.com>
6542
6543 PR cli/19551:
6544 * symfile-add-flags.h (enum symfile_add_flags)
6545 <SYMFILE_NOT_FILENAME>: New constant.
6546 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6547 objfile name from BFD.
6548 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6549 * minidebug.c (find_separate_debug_file_in_section): Put
6550 ".gnu_debugdata" into BFD's file name.
6551
6552 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6553
6554 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6555 Remove.
6556
6557 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6558
6559 PR binutils/21446
6560 * aarch64-tdep.c (aarch64_analyze_prologue,
6561 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6562 Indicate not interested in errors.
6563
6564 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6565
6566 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6567 Supply the MIPS_ZERO_REGNUM register.
6568
6569 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6570
6571 * mips-tdep.c (mask_address_var): Make variable static.
6572
6573 2018-05-14 Tom Tromey <tom@tromey.com>
6574
6575 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6576
6577 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6578
6579 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6580 FXSAVE_ADDR for the mxcsr register.
6581
6582 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6583
6584 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6585
6586 2018-05-11 Pedro Alves <palves@redhat.com>
6587
6588 * corelow.c (core_target) <core_target>: No longer inline.
6589 Initialize m_core_gdbarch, m_core_vec and build the section table
6590 here.
6591 <~core_target>: New.
6592 <core_gdbarch, get_core_register_section>: New methods.
6593 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6594 factored out from ...
6595 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6596 (core_ops): Delete.
6597 (sniff_core_bfd): Add gdbarch parameter.
6598 (core_close): Delete, merged into ...
6599 (core_target::close): ... here. Delete self.
6600 (core_close_cleanup): Delete.
6601 (core_target_open): Allocate a core_target on the heap. Use a
6602 unique_ptr instead of a cleanup. Bits moved into the core_target
6603 ctor. Adjust to use core_target methods instead of globals.
6604 (get_core_register_section): Rename to ...
6605 (core_target::get_core_register_section): ... this and adjust.
6606 (struct get_core_registers_cb_data): New.
6607 (get_core_registers_cb): Use it. Use bool.
6608 (core_target::fetch_registers, core_target::files_info)
6609 (core_target::xfer_partial, core_target::read_description)
6610 (core_target::pid_to, core_target::thread_name): Adjust to
6611 reference class fields instead of globals.
6612 * target.h (struct target_ops_deleter, target_ops_up): New.
6613
6614 2018-05-11 Pedro Alves <palves@redhat.com>
6615
6616 * corefile.c (core_file_command): Move to corelow.c.
6617 * corelow.c (the_core_target): Delete.
6618 (core_file_command): Moved from corefile.c. Check exec_bfd
6619 instead of the_core_target. Use target_detach instead of calling
6620 into the_core_target directly.
6621 (maybe_say_no_core_file_now): New.
6622 (core_target::detach): Use it.
6623 (_initialize_corelow): Remove references to the_core_target.
6624 * gdbcore.h (the_core_target): Delete.
6625
6626 2018-05-11 Tom Tromey <tromey@redhat.com>
6627 Pedro Alves <palves@redhat.com>
6628
6629 * corefile.c (core_bfd): Remove.
6630 * gdbcore.h (core_bfd): Now a macro.
6631 * progspace.h (struct program_space) <cbfd>: New field.
6632
6633 2018-05-11 Tom Tromey <tom@tromey.com>
6634
6635 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6636 gdb::def_vector.
6637
6638 2018-05-10 Tom Tromey <tom@tromey.com>
6639
6640 * configure: Rebuild.
6641 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6642
6643 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6644
6645 PR server/23158:
6646 * regformats/regdat.sh: Adjust script, following the addition
6647 of the new expedite_regs parameter to init_target_desc.
6648
6649 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6650
6651 PR gdb/23127
6652 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6653 set_gdbarch_significant_addr_bit.
6654 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6655 set_gdbarch_significant_addr_bit.
6656 * utils.c (address_significant): Update to sign extend addr.
6657
6658 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6659
6660 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6661 (xtensa_linux_init_abi): Limit tdep->num_regs by
6662 tdep->num_nopriv_regs.
6663 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6664 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6665 not initialized.
6666
6667 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6668
6669 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6670
6671 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6672
6673 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6674 (I387_MXCSR_INIT_VAL): New constant.
6675 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6676 buffer if it was supplied by the inferior.
6677 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6678 (i387_xsave_get_clear_bv): New function.
6679 (i387_supply_xsave): Only read x87 control registers from the
6680 xsave buffer if the feature is enabled, and the state will have
6681 been written, otherwise, provide a suitable default.
6682 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6683 including x87 control registers. Update control registers if they
6684 have changed from the default value, and mark features as enabled
6685 as required.
6686 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6687
6688 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6689
6690 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6691
6692 2018-05-07 Tom Tromey <tom@tromey.com>
6693
6694 * configure: Rebuild.
6695 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6696
6697 2018-05-07 Tom Tromey <tom@tromey.com>
6698
6699 PR tdep/20362:
6700 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6701 bit. Use correct value for VDIV.
6702
6703 2018-05-04 Tom Tromey <tom@tromey.com>
6704
6705 * configure: Rebuild.
6706 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6707
6708 2018-05-04 Tom Tromey <tom@tromey.com>
6709
6710 * linux-record.c (record_linux_system_call) <case
6711 RECORD_SYS_RECVFROM>: Add "break".
6712
6713 2018-05-04 Tom Tromey <tom@tromey.com>
6714
6715 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6716 Add missing "break".
6717 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6718 Add missing "break".
6719
6720 2018-05-04 Tom Tromey <tom@tromey.com>
6721
6722 * rs6000-tdep.c (ppc_process_record_op4)
6723 (ppc_process_record_op63): Add fall-through comment.
6724
6725 2018-05-04 Tom Tromey <tom@tromey.com>
6726
6727 * i386-tdep.c (i386_process_record): Add fall-through comment.
6728
6729 2018-05-04 Tom Tromey <tom@tromey.com>
6730
6731 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6732 comment.
6733
6734 2018-05-04 Tom Tromey <tom@tromey.com>
6735
6736 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6737 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6738 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6739 comment.
6740 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6741 comment.
6742 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6743 comment.
6744
6745 2018-05-04 Tom Tromey <tom@tromey.com>
6746
6747 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6748
6749 2018-05-04 Tom Tromey <tom@tromey.com>
6750
6751 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6752 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6753 * symfile.c (section_is_mapped): Fix fall-through comment.
6754 * stabsread.c (define_symbol, read_member_functions): Fix
6755 fall-through comment.
6756 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6757 comment.
6758 * remote.c (remote_wait_as): Fix fall-through comment.
6759 * p-exp.y (yylex): Fix fall-through comment.
6760 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6761 comment.
6762 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6763 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6764 * jv-exp.y (yylex): Fix fall-through comment.
6765 * go-exp.y (lex_one_token): Fix fall-through comment.
6766 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6767 fall-through comment.
6768 * f-exp.y (yylex): Fix fall-through comment.
6769 * dwarf2read.c (process_die): Fix fall-through comments.
6770 * dbxread.c (process_one_symbol): Fix fall-through comment.
6771 * d-exp.y (lex_one_token): Fix fall-through comment.
6772 * cp-name-parser.y (yylex): Fix fall-through comment.
6773 * coffread.c (coff_symtab_read): Fix fall-through comment.
6774 * c-exp.y (lex_one_token): Fix fall-through comment.
6775 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6776 comment.
6777 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6778 comment.
6779
6780 2018-05-04 Tom Tromey <tom@tromey.com>
6781
6782 PR python/22730:
6783 * NEWS: Mention gdb.execute change.
6784 * gdbcmd.h (execute_control_command): Don't declare.
6785 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6786 execute_control_commands, execute_control_commands_to_string.
6787 * cli/cli-script.h (execute_control_commands)
6788 (execute_control_commands_to_string): Declare.
6789 (execute_control_command): Add from_tty parameter.
6790 * cli/cli-script.c (execute_control_commands)
6791 (execute_control_commands_to_string): New functions.
6792 (execute_user_command): Use execute_control_commands.
6793 (execute_control_command_1): Add "from_tty" parameter. Update.
6794 (execute_control_command): Likewise.
6795
6796 2018-05-04 Tom Tromey <tom@tromey.com>
6797
6798 PR python/22731:
6799 * NEWS: Mention that breakpoint commands are writable.
6800 * python/py-breakpoint.c (bppy_set_commands): New function.
6801 (breakpoint_object_getset) <"commands">: Use it.
6802
6803 2018-05-04 Tom Tromey <tom@tromey.com>
6804
6805 * tracepoint.c (actions_command): Update.
6806 * mi/mi-cmd-break.c (mi_command_line_array)
6807 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6808 (mi_read_next_line): Remove.
6809 (mi_cmd_break_commands): Update.
6810 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6811 function_view.
6812 * cli/cli-script.c (get_command_line): Update.
6813 (process_next_line): Use function_view. Constify.
6814 (recurse_read_control_structure, read_command_lines)
6815 (read_command_lines_1): Change argument types to function_view.
6816 (do_define_command, document_command): Update.
6817 * breakpoint.h (check_tracepoint_command): Don't declare.
6818 * breakpoint.c (check_tracepoint_command): Remove.
6819 (commands_command_1, create_tracepoint_from_upload): Update.
6820
6821 2018-05-04 Tom Tromey <tom@tromey.com>
6822
6823 PR gdb/11750:
6824 * cli/cli-script.h (enum command_control_type) <define_control>:
6825 New constant.
6826 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6827 (build_command_line, execute_control_command_1)
6828 (process_next_line): Likewise.
6829 (do_define_command): New function, extracted from define_command.
6830 (define_command): Use it.
6831
6832 2018-05-04 Tom Tromey <tom@tromey.com>
6833
6834 * tracepoint.c (actions_command): Update.
6835 * cli/cli-script.h (read_command_lines): Update.
6836 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6837 (MAX_TMPBUF): Remove define.
6838 (define_command): Use string_printf.
6839 (document_command): Likewise.
6840 * breakpoint.c (commands_command_1): Update.
6841
6842 2018-05-04 Tom Tromey <tom@tromey.com>
6843
6844 * top.c (execute_command): Update.
6845 * cli/cli-script.h (print_command_lines): Now varargs.
6846 * cli/cli-script.c (print_command_lines): Now varargs.
6847 (execute_control_command_1) <case while_control, case if_control>:
6848 Update.
6849
6850 2018-05-04 Tom Tromey <tom@tromey.com>
6851
6852 * tracepoint.c (all_tracepoint_actions): Rename from
6853 all_tracepoint_actions_and_cleanup. Change return type.
6854 (actions_command, encode_actions_1, encode_actions)
6855 (trace_dump_actions, tdump_command): Update.
6856 * remote.c (remote_download_command_source): Update.
6857 * python/python.c (gdbpy_eval_from_control_command)
6858 (python_command, python_interactive_command): Update.
6859 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6860 * guile/guile.c (guile_command)
6861 (gdbscm_eval_from_control_command, guile_command): Update.
6862 * compile/compile.c (compile_code_command)
6863 (compile_print_command, compile_to_object): Update.
6864 * cli/cli-script.h (struct command_lines_deleter): New.
6865 (counted_command_line): New typedef.
6866 (struct command_line): Add constructor, destructor.
6867 <body_list>: Remove.
6868 <body_list_0, body_list_1>: New members.
6869 (command_line_up): Remove typedef.
6870 (read_command_lines, read_command_lines_1, get_command_line):
6871 Update.
6872 (copy_command_lines): Don't declare.
6873 * cli/cli-script.c (build_command_line): Use "new".
6874 (get_command_line): Return counted_command_line.
6875 (print_command_lines, execute_user_command)
6876 (execute_control_command_1, while_command, if_command): Update.
6877 (realloc_body_list): Remove.
6878 (process_next_line, recurse_read_control_structure): Update.
6879 (read_command_lines, read_command_lines_1): Return counted_command_line.
6880 (free_command_lines): Use "delete".
6881 (copy_command_lines): Remove.
6882 (define_command, document_command, show_user_1): Update.
6883 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6884 a counted_command_line.
6885 * breakpoint.h (counted_command_line): Remove typedef.
6886 (breakpoint_set_commands): Update.
6887 * breakpoint.c (check_no_tracepoint_commands)
6888 (validate_commands_for_breakpoint): Update.
6889 (breakpoint_set_commands): Change commands to be a
6890 counted_command_line.
6891 (commands_command_1, update_dprintf_command_list)
6892 (create_tracepoint_from_upload): Update.
6893
6894 2018-05-04 Tom Tromey <tom@tromey.com>
6895
6896 * cli/cli-decode.h (cmd_list_element): New constructor.
6897 (~cmd_list_element): New destructor.
6898 (struct cmd_list_element): Add initializers.
6899 * cli/cli-decode.c (do_add_cmd): Use "new".
6900 (delete_cmd): Use "delete".
6901
6902 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6903 Pedro Alves <palves@redhat.com>
6904
6905 PR breakpoints/19806 and support for PR external/20207.
6906 * NEWS: Mention Aarch64 watchpoint improvements.
6907 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6908 watchpoints and PR external/20207 watchpoints.
6909 * nat/aarch64-linux-hw-point.c
6910 (kernel_supports_any_contiguous_range): New.
6911 (aarch64_watchpoint_offset): New.
6912 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6913 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6914 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6915 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6916 next_addr_orig_p. Support PR external/20207 watchpoints.
6917 (aarch64_downgrade_regs): New.
6918 (aarch64_dr_state_insert_one_point): New parameters offset and
6919 addr_orig.
6920 (aarch64_dr_state_remove_one_point): Likewise.
6921 (aarch64_handle_breakpoint): Update caller.
6922 (aarch64_handle_aligned_watchpoint): Likewise.
6923 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6924 aligned_offset.
6925 (aarch64_linux_set_debug_regs): Remove const from state. Call
6926 aarch64_downgrade_regs.
6927 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6928 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6929 (DR_CONTROL_MASK): ... this.
6930 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6931 (unsigned int aarch64_watchpoint_offset): New prototype.
6932 (aarch64_linux_set_debug_regs): Remove const from state.
6933 * utils.c (align_up, align_down): Move to ...
6934 * common/common-utils.c (align_up, align_down): ... here.
6935 * utils.h (align_up, align_down): Move to ...
6936 * common/common-utils.h (align_up, align_down): ... here.
6937
6938 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6939
6940 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6941 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6942 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6943 Re-implement to match the ABI as summarized in GCC's
6944 gcc/config/sparc/sparc.c. All callers updated.
6945 (sparc32_store_arguments): Remove assertion.
6946
6947 2018-05-04 Tom Tromey <tom@tromey.com>
6948
6949 * printcmd.c: Don't include tui.h.
6950 (decode_format): Use skip_spaces.
6951
6952 2018-05-04 Tom Tromey <tom@tromey.com>
6953
6954 PR gdb/22619:
6955 * printcmd.c (last_count): New global.
6956 (x_command): Use saved count when repeating.
6957
6958 2018-05-04 Tom Tromey <tom@tromey.com>
6959
6960 * nto-procfs.c (do_closedir_cleanup): Remove.
6961 (procfs_pidlist): Use gdb_dir_up.
6962 * procfs.c (do_closedir_cleanup): Remove.
6963 (proc_update_threads): Use gdb_dir_up.
6964 * common/filestuff.h (struct gdb_dir_deleter): New.
6965 (gdb_dir_up): New typedef.
6966
6967 2018-05-04 Tom Tromey <tom@tromey.com>
6968
6969 * ada-lang.c (print_mention_exception): Use std::string.
6970
6971 2018-05-04 Tom Tromey <tom@tromey.com>
6972
6973 * ada-lang.c (create_excep_cond_exprs): Update.
6974 (ada_exception_catchpoint_cond_string): Use std::string.
6975
6976 2018-05-04 Tom Tromey <tom@tromey.com>
6977
6978 * ada-lang.c (xget_renaming_scope): Return std::string.
6979 (old_renaming_is_invisible): Update.
6980
6981 2018-05-04 Tom Tromey <tom@tromey.com>
6982
6983 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6984 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6985
6986 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6987
6988 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6989
6990 2018-05-04 Tom Tromey <tom@tromey.com>
6991
6992 * remote.c (remote_query_supported_append): Change type.
6993 (remote_check_symbols): Update.
6994
6995 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6996
6997 PR gdb/11420
6998 * configure.ac: Prepend libpython.
6999 * python/python-config.py: Likewise.
7000 * configure: Regenerate.
7001
7002 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7003
7004 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7005
7006 2018-05-03 Pedro Alves <palves@redhat.com>
7007
7008 * s390-linux-nat.c
7009 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7010 override. Write 'true' instead of '1'.
7011 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7012 declaration.
7013
7014 2018-05-02 Pedro Alves <palves@redhat.com>
7015
7016 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7017 add_inf_child_target.
7018 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7019 add_inf_child_target.
7020 * aix-thread.c (aix_thread_target_info): New.
7021 (aix_thread_target) <shortname, longname, doc>: Delete.
7022 <info>: New.
7023 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7024 add_inf_child_target.
7025 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7026 add_inf_child_target.
7027 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7028 add_inf_child_target.
7029 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7030 add_inf_child_target.
7031 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7032 add_inf_child_target.
7033 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7034 add_inf_child_target.
7035 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7036 add_inf_child_target.
7037 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7038 add_inf_child_target.
7039 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7040 add_inf_child_target.
7041 * bfd-target.c (target_bfd_target_info): New.
7042 (target_bfd) <shortname, longname, doc>: Delete.
7043 <info>: New.
7044 * bsd-kvm.c (bsd_kvm_target_info): New.
7045 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7046 <info>: New.
7047 (bsd_kvm_target::open): Rename to ...
7048 (bsd_kvm_target_open): ... this. Adjust.
7049 * bsd-uthread.c (bsd_uthread_target_info): New.
7050 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7051 <info>: New.
7052 * corefile.c (core_file_command): Adjust.
7053 * corelow.c (core_target_info): New.
7054 (core_target) <shortname, longname, doc>: Delete.
7055 <info>: New.
7056 (core_target::open): Rename to ...
7057 (core_target_open): ... this. Adjust.
7058 * ctf.c (ctf_target_info): New.
7059 (ctf_target) <shortname, longname, doc>: Delete.
7060 <info>: New.
7061 (ctf_target::open): Rename to ...
7062 (ctf_target_open): ... this.
7063 (_initialize_ctf): Adjust.
7064 * exec.c (exec_target_info): New.
7065 (exec_target) <shortname, longname, doc>: Delete.
7066 <info>: New.
7067 (exec_target::open): Rename to ...
7068 (exec_target_open): ... this.
7069 * gdbcore.h (core_target_open): Declare.
7070 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7071 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7072 add_inf_child_target.
7073 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7074 add_inf_child_target.
7075 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7076 add_inf_child_target.
7077 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7078 add_inf_child_target.
7079 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7080 add_inf_child_target.
7081 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7082 add_inf_child_target.
7083 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7084 add_inf_child_target.
7085 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7086 add_inf_child_target.
7087 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7088 add_inf_child_target.
7089 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7090 add_inf_child_target.
7091 * inf-child.c (inf_child_target_info): New.
7092 (inf_child_target::info): New.
7093 (inf_child_open_target): Remove 'target' parameter. Use
7094 get_native_target instead.
7095 (inf_child_target::open): Delete.
7096 (add_inf_child_target): New.
7097 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7098 Delete.
7099 <info>: New.
7100 (add_inf_child_target): Declare.
7101 (inf_child_open_target): Declare.
7102 * linux-thread-db.c (thread_db_target_info): New.
7103 (thread_db_target) <shortname, longname, doc>: Delete.
7104 <info>: New.
7105 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7106 add_inf_child_target.
7107 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7108 add_inf_child_target.
7109 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7110 add_inf_child_target.
7111 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7112 add_inf_child_target.
7113 * make-target-delegates (print_class): Adjust.
7114 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7115 add_inf_child_target.
7116 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7117 add_inf_child_target.
7118 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7119 add_inf_child_target.
7120 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7121 add_inf_child_target.
7122 * nto-procfs.c (nto_native_target_info): New.
7123 (nto_procfs_target_native) <shortname, longname, doc>:
7124 Delete.
7125 <info>: New.
7126 (nto_procfs_target_info): New.
7127 (nto_procfs_target_procfs) <shortname, longname, doc>:
7128 Delete.
7129 <info>: New.
7130 (init_procfs_targets): Adjust.
7131 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7132 add_inf_child_target.
7133 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7134 add_inf_child_target.
7135 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7136 add_inf_child_target.
7137 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7138 add_inf_child_target.
7139 * ravenscar-thread.c (ravenscar_target_info): New.
7140 (ravenscar_thread_target) <shortname, longname, doc>:
7141 Delete.
7142 <info>: New.
7143 * record-btrace.c (record_btrace_target_info):
7144 (record_btrace_target) <shortname, longname, doc>: Delete.
7145 <info>: New.
7146 (record_btrace_target::open): Rename to ...
7147 (record_btrace_target_open): ... this. Adjust.
7148 * record-full.c (record_longname, record_doc): New.
7149 (record_full_base_target) <shortname, longname, doc>: Delete.
7150 <info>: New.
7151 (record_full_target_info): New.
7152 (record_full_target): <shortname>: Delete.
7153 <info>: New.
7154 (record_full_core_open_1, record_full_open_1): Update comments.
7155 (record_full_base_target::open): Rename to ...
7156 (record_full_open): ... this.
7157 (cmd_record_full_restore): Update.
7158 (_initialize_record_full): Update.
7159 * remote-sim.c (remote_sim_target_info): New.
7160 (gdbsim_target) <shortname, longname, doc>: Delete.
7161 <info>: New.
7162 (gdbsim_target::open): Rename to ...
7163 (gdbsim_target_open): ... this.
7164 (_initialize_remote_sim): Adjust.
7165 * remote.c (remote_doc): New.
7166 (remote_target_info): New.
7167 (remote_target) <shortname, longname, doc>: Delete.
7168 <info>: New.
7169 (extended_remote_target_info): New.
7170 (extended_remote_target) <shortname, longname, doc>: Delete.
7171 <info>: New.
7172 (remote_target::open_1): Make static. Adjust.
7173 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7174 * s390-linux-nat.c (_initialize_s390_nat): Use
7175 add_inf_child_target.
7176 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7177 add_inf_child_target.
7178 * sol-thread.c (thread_db_target_info): New.
7179 (sol_thread_target) <shortname, longname, doc>: Delete.
7180 <info>: New.
7181 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7182 add_inf_child_target.
7183 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7184 add_inf_child_target.
7185 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7186 add_inf_child_target.
7187 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7188 add_inf_child_target.
7189 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7190 add_inf_child_target.
7191 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7192 add_inf_child_target.
7193 * spu-linux-nat.c (_initialize_spu_nat): Use
7194 add_inf_child_target.
7195 * spu-multiarch.c (spu_multiarch_target_info): New.
7196 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7197 <info>: New.
7198 * target-delegates.c: Regenerate.
7199 * target.c: Include <unordered_map>.
7200 (target_ops_p): Delete.
7201 (DEF_VEC_P(target_ops_p)): Delete.
7202 (target_factories): New.
7203 (test_target_info): New.
7204 (test_target_ops::info): New.
7205 (open_target): Adjust to use target_factories.
7206 (add_target_with_completer): Rename to ...
7207 (add_target): ... this. Change prototype. Register target_info
7208 and open callback in target_factories. Register target_info in
7209 command context instead of target_ops.
7210 (add_target): Delete old implementation.
7211 (add_deprecated_target_alias): Change prototype. Adjust.
7212 (the_native_target): New.
7213 (set_native_target, get_native_target): New.
7214 (find_default_run_target): Use the_native_target.
7215 (find_attach_target, find_run_target): Simplify.
7216 (target_ops::open): Delete.
7217 (dummy_target_info): New.
7218 (dummy_target::shortname, dummy_target::longname)
7219 (dummy_target::doc): Delete.
7220 (dummy_target::info): New.
7221 (debug_target::shortname, debug_target::longname)
7222 (debug_target::doc): Delete.
7223 (debug_target::info): New.
7224 * target.h (struct target_info): New.
7225 (target_ops::~target_ops): Add comment.
7226 (target_ops::info): New.
7227 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7228 longer virtual. Implement in terms of target_info.
7229 (set_native_target, get_native_target): Declare.
7230 (target_open_ftype): New.
7231 (add_target, add_target_with_completer)
7232 (add_deprecated_target_alias): Change prototype.
7233 (test_target) <shortname, longname, doc>: Delete.
7234 <info>: New.
7235 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7236 add_inf_child_target.
7237 * tracefile-tfile.c (tfile_target_info): New.
7238 (tfile_target) <shortname, longname, doc>: Delete.
7239 <info>: New.
7240 (tfile_target::open): Rename to ...
7241 (tfile_target_open): ... this.
7242 (_initialize_tracefile_tfile): Adjust.
7243 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7244 add_inf_child_target.
7245 * windows-nat.c (_initialize_windows_nat): Use
7246 add_inf_child_target.
7247 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7248 add_inf_child_target.
7249
7250 2018-05-02 Pedro Alves <palves@redhat.com>
7251
7252 * linux-nat.h (linux_nat_target) <low_new_thread,
7253 low_delete_thread, low_new_fork, low_forget_process,
7254 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7255 New virtual methods.
7256 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7257 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7258 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7259 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7260 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7261 Delete.
7262 * linux-fork.c (delete_fork): Adjust to call low method.
7263 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7264 (linux_nat_new_fork, linux_nat_forget_process_hook)
7265 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7266 (linux_nat_status_is_event):
7267 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7268 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7269 to call low method.
7270 (sigtrap_is_event): Rename to ...
7271 (linux_nat_target::low_status_is_event): ... this.
7272 (linux_nat_set_status_is_event): Delete.
7273 (save_stop_reason, linux_nat_wait_1)
7274 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7275 low methods.
7276 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7277 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7278 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7279 (linux_nat_set_prepare_to_resume): Delete.
7280 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7281 low virtual methods.
7282 * amd64-linux-nat.c: Likewise.
7283 * arm-linux-nat.c: Likewise.
7284 * i386-linux-nat.c: Likewise.
7285 * ia64-linux-nat.c: Likewise.
7286 * mips-linux-nat.c: Likewise.
7287 * ppc-linux-nat.c: Likewise.
7288 * s390-linux-nat.c: Likewise.
7289 * sparc64-linux-nat.c: Likewise.
7290 * x86-linux-nat.c: Likewise.
7291 * x86-linux-nat.h: Include "nat/x86-linux.h".
7292 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7293 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7294 Override methods.
7295
7296 2018-05-02 Pedro Alves <palves@redhat.com>
7297
7298 * target.h (target_ops)
7299 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7300 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7301 stopped_by_watchpoint, have_continuable_watchpoint,
7302 stopped_data_address, watchpoint_addr_within_range,
7303 can_accel_watchpoint_condition, can_run, thread_alive,
7304 has_all_memory, has_memory, has_stack, has_registers,
7305 has_execution, can_async_p, is_async_p, supports_non_stop,
7306 always_non_stop_p, can_execute_reverse, supports_multi_process,
7307 supports_enable_disable_tracepoint,
7308 supports_disable_randomization, supports_string_tracing,
7309 supports_evaluation_of_breakpoint_conditions,
7310 can_run_breakpoint_commands, filesystem_is_local,
7311 can_download_tracepoint, get_trace_state_variable_value,
7312 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7313 record_is_replaying, record_will_replay,
7314 augmented_libraries_svr4_read>: Adjust to return bool.
7315 * aarch64-linux-nat.c: All implementations adjusted.
7316 * aix-thread.c: All implementations adjusted.
7317 * arm-linux-nat.c: All implementations adjusted.
7318 * breakpoint.c: All implementations adjusted.
7319 * bsd-kvm.c: All implementations adjusted.
7320 * bsd-uthread.c: All implementations adjusted.
7321 * corelow.c: All implementations adjusted.
7322 * ctf.c: All implementations adjusted.
7323 * darwin-nat.c: All implementations adjusted.
7324 * darwin-nat.h: All implementations adjusted.
7325 * exec.c: All implementations adjusted.
7326 * fbsd-nat.c: All implementations adjusted.
7327 * fbsd-nat.h: All implementations adjusted.
7328 * gnu-nat.c: All implementations adjusted.
7329 * gnu-nat.h: All implementations adjusted.
7330 * go32-nat.c: All implementations adjusted.
7331 * ia64-linux-nat.c: All implementations adjusted.
7332 * inf-child.c: All implementations adjusted.
7333 * inf-child.h: All implementations adjusted.
7334 * inf-ptrace.c: All implementations adjusted.
7335 * inf-ptrace.h: All implementations adjusted.
7336 * linux-nat.c: All implementations adjusted.
7337 * linux-nat.h: All implementations adjusted.
7338 * mips-linux-nat.c: All implementations adjusted.
7339 * nto-procfs.c: All implementations adjusted.
7340 * ppc-linux-nat.c: All implementations adjusted.
7341 * procfs.c: All implementations adjusted.
7342 * ravenscar-thread.c: All implementations adjusted.
7343 * record-btrace.c: All implementations adjusted.
7344 * record-full.c: All implementations adjusted.
7345 * remote-sim.c: All implementations adjusted.
7346 * remote.c: All implementations adjusted.
7347 * s390-linux-nat.c: All implementations adjusted.
7348 * sol-thread.c: All implementations adjusted.
7349 * spu-multiarch.c: All implementations adjusted.
7350 * target-delegates.c: All implementations adjusted.
7351 * target.c: All implementations adjusted.
7352 * target.h: All implementations adjusted.
7353 * tracefile-tfile.c: All implementations adjusted.
7354 * tracefile.c: All implementations adjusted.
7355 * tracefile.h: All implementations adjusted.
7356 * windows-nat.c: All implementations adjusted.
7357 * x86-linux-nat.h: All implementations adjusted.
7358 * x86-nat.h: All implementations adjusted.
7359
7360 2018-05-02 Pedro Alves <palves@redhat.com>
7361
7362 * make-target-delegates (scan_target_h): Don't trim lines here.
7363 Replace sequences of tabs and/or whitespace with a single
7364 whitespace.
7365 (top level, parsing methods): Trim each line before processing it
7366 here.
7367
7368 2018-05-02 Pedro Alves <palves@redhat.com>
7369 John Baldwin <jhb@freebsd.org>
7370
7371 * target.h (enum strata) <debug_stratum>: New.
7372 (struct target_ops) <all delegation methods>: Replace by C++
7373 virtual methods, and drop "to_" prefix. All references updated
7374 throughout.
7375 <to_shortname, to_longname, to_doc, to_data,
7376 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7377 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7378 virtual methods. All references updated throughout.
7379 <can_attach, supports_terminal_ours, can_create_inferior,
7380 get_thread_control_capabilities, attach_no_wait>: New
7381 virtual methods.
7382 <insert_breakpoint, remove_breakpoint>: Now
7383 TARGET_DEFAULT_NORETURN methods.
7384 <info_proc>: Now returns bool.
7385 <to_magic>: Delete.
7386 (OPS_MAGIC): Delete.
7387 (current_target): Delete. All references replaced by references
7388 to ...
7389 (target_stack): ... this. New.
7390 (target_shortname, target_longname): Adjust.
7391 (target_can_run): Now a function declaration.
7392 (default_child_has_all_memory, default_child_has_memory)
7393 (default_child_has_stack, default_child_has_registers)
7394 (default_child_has_execution): Remove target_ops parameter.
7395 (complete_target_initialization): Delete.
7396 (memory_breakpoint_target): New template class.
7397 (test_target_ops): Refactor as a C++ class with virtual methods.
7398 * make-target-delegates (NAME_PART): Tighten.
7399 (POINTER_PART, CP_SYMBOL): New.
7400 (SIMPLE_RETURN_PART): Reimplement.
7401 (VEC_RETURN_PART): Expect less.
7402 (RETURN_PART, VIRTUAL_PART): New.
7403 (METHOD): Adjust to C++ virtual methods.
7404 (scan_target_h): Remove reference to C99.
7405 (dname): Output "target_ops::" prefix.
7406 (write_function_header): Adjust to output a C++ class method.
7407 (write_declaration): New.
7408 (write_delegator): Adjust to output a C++ class method.
7409 (tdname): Output "dummy_target::" prefix.
7410 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7411 method.
7412 (tdefault_names, debug_names): Delete.
7413 (return_types, tdefaults, styles, argtypes_array): New.
7414 (top level): All methods are delegators.
7415 (print_class): New.
7416 (top level): Print dummy_target and debug_target classes.
7417 * target-delegates.c: Regenerate.
7418 * target-debug.h (target_debug_print_enum_info_proc_what)
7419 (target_debug_print_thread_control_capabilities)
7420 (target_debug_print_thread_info_p): New.
7421 * target.c (dummy_target): Delete.
7422 (the_dummy_target, the_debug_target): New.
7423 (target_stack): Now extern.
7424 (set_targetdebug): Push/unpush debug target.
7425 (default_child_has_all_memory, default_child_has_memory)
7426 (default_child_has_stack, default_child_has_registers)
7427 (default_child_has_execution): Remove target_ops parameter.
7428 (complete_target_initialization): Delete.
7429 (add_target_with_completer): No longer call
7430 complete_target_initialization.
7431 (target_supports_terminal_ours): Use regular delegation.
7432 (update_current_target): Delete.
7433 (push_target): No longer check magic number. Don't call
7434 update_current_target.
7435 (unpush_target): Don't call update_current_target.
7436 (target_is_pushed): No longer check magic number.
7437 (target_require_runnable): Skip for all stratums over
7438 process_stratum.
7439 (target_ops::info_proc): New.
7440 (target_info_proc): Use find_target_at and
7441 find_default_run_target.
7442 (target_supports_disable_randomization): Use regular delegation.
7443 (target_get_osdata): Use find_target_at.
7444 (target_ops::open, target_ops::close, target_ops::can_attach)
7445 (target_ops::attach, target_ops::can_create_inferior)
7446 (target_ops::create_inferior, target_ops::can_run)
7447 (target_can_run): New.
7448 (default_fileio_target): Use regular delegation.
7449 (target_ops::fileio_open, target_ops::fileio_pwrite)
7450 (target_ops::fileio_pread, target_ops::fileio_fstat)
7451 (target_ops::fileio_close, target_ops::fileio_unlink)
7452 (target_ops::fileio_readlink): New.
7453 (target_fileio_open_1, target_fileio_unlink)
7454 (target_fileio_readlink): Always call the target method. Handle
7455 FILEIO_ENOSYS.
7456 (return_zero, return_zero_has_execution): Delete.
7457 (init_dummy_target): Delete.
7458 (dummy_target::dummy_target, dummy_target::shortname)
7459 (dummy_target::longname, dummy_target::doc)
7460 (debug_target::debug_target, debug_target::shortname)
7461 (debug_target::longname, debug_target::doc): New.
7462 (target_supports_delete_record): Use regular delegation.
7463 (setup_target_debug): Delete.
7464 (maintenance_print_target_stack): Skip debug_stratum.
7465 (initialize_targets): Instantiate the_dummy_target and
7466 the_debug_target.
7467 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7468 use target_stack.
7469 (target_auxv_search, fprint_target_auxv): Adjust.
7470 (info_auxv_command): Adjust to use target_stack.
7471 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7472 * exceptions.c (print_flush): Handle a NULL target_stack.
7473 * regcache.c (target_ops_no_register): Refactor as class with
7474 virtual methods.
7475
7476 * exec.c (exec_target): New class.
7477 (exec_ops): Now an exec_target.
7478 (exec_open, exec_close_1, exec_get_section_table)
7479 (exec_xfer_partial, exec_files_info, exec_has_memory)
7480 (exec_make_note_section): Refactor as exec_target methods.
7481 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7482 Delete.
7483 (exec_target::find_memory_regions): New.
7484 (_initialize_exec): Don't call init_exec_ops.
7485 * gdbcore.h (exec_file_clear): Delete.
7486
7487 * corefile.c (core_target): Delete.
7488 (core_file_command): Adjust.
7489 * corelow.c (core_target): New class.
7490 (the_core_target): New.
7491 (core_close): Remove target_ops parameter.
7492 (core_close_cleanup): Adjust.
7493 (core_target::close): New.
7494 (core_open, core_detach, get_core_registers, core_files_info)
7495 (core_xfer_partial, core_thread_alive, core_read_description)
7496 (core_pid_to_str, core_thread_name, core_has_memory)
7497 (core_has_stack, core_has_registers, core_info_proc): Rework as
7498 core_target methods.
7499 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7500 (_initialize_corelow): Initialize the_core_target.
7501 * gdbcore.h (core_target): Delete.
7502 (the_core_target): New.
7503
7504 * ctf.c: (ctf_target): New class.
7505 (ctf_ops): Now a ctf_target.
7506 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7507 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7508 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7509 methods.
7510 (init_ctf_ops): Delete.
7511 (_initialize_ctf): Don't call it.
7512 * tracefile-tfile.c (tfile_target): New class.
7513 (tfile_ops): Now a tfile_target.
7514 (tfile_open, tfile_close, tfile_files_info)
7515 (tfile_get_tracepoint_status, tfile_trace_find)
7516 (tfile_fetch_registers, tfile_xfer_partial)
7517 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7518 Refactor as tfile_target methods.
7519 (tfile_xfer_partial_features): Remove target_ops parameter.
7520 (init_tfile_ops): Delete.
7521 (_initialize_tracefile_tfile): Don't call it.
7522 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7523 (tracefile_has_stack, tracefile_has_registers)
7524 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7525 tracefile_target methods.
7526 (init_tracefile_ops): Delete.
7527 (tracefile_target::tracefile_target): New.
7528 * tracefile.h: Include "target.h".
7529 (tracefile_target): New class.
7530 (init_tracefile_ops): Delete.
7531
7532 * spu-multiarch.c (spu_multiarch_target): New class.
7533 (spu_ops): Now a spu_multiarch_target.
7534 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7535 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7536 (spu_search_memory, spu_mourn_inferior): Refactor as
7537 spu_multiarch_target methods.
7538 (init_spu_ops): Delete.
7539 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7540 complete_target_initialization.
7541
7542 * ravenscar-thread.c (ravenscar_thread_target): New class.
7543 (ravenscar_ops): Now a ravenscar_thread_target.
7544 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7545 (ravenscar_thread_alive, ravenscar_pid_to_str)
7546 (ravenscar_fetch_registers, ravenscar_store_registers)
7547 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7548 (ravenscar_stopped_by_hw_breakpoint)
7549 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7550 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7551 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7552 methods.
7553 (init_ravenscar_thread_ops): Delete.
7554 (_initialize_ravenscar): Remove references to
7555 init_ravenscar_thread_ops and complete_target_initialization.
7556
7557 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7558 (bsd_uthread_target): New class.
7559 (bsd_uthread_ops): Now a bsd_uthread_target.
7560 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7561 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7562 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7563 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7564 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7565 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7566 (bsd_uthread_target): Delete function.
7567 (_initialize_bsd_uthread): Remove reference to
7568 complete_target_initialization.
7569
7570 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7571 (target_bfd): ... this new class.
7572 (target_bfd_xfer_partial, target_bfd_get_section_table)
7573 (target_bfd_close): Refactor as target_bfd methods.
7574 (target_bfd::~target_bfd): New.
7575 (target_bfd_reopen): Adjust.
7576 (target_bfd::close): New.
7577
7578 * record-btrace.c (record_btrace_target): New class.
7579 (record_btrace_ops): Now a record_btrace_target.
7580 (record_btrace_open, record_btrace_stop_recording)
7581 (record_btrace_disconnect, record_btrace_close)
7582 (record_btrace_async, record_btrace_info)
7583 (record_btrace_insn_history, record_btrace_insn_history_range)
7584 (record_btrace_insn_history_from, record_btrace_call_history)
7585 (record_btrace_call_history_range)
7586 (record_btrace_call_history_from, record_btrace_record_method)
7587 (record_btrace_is_replaying, record_btrace_will_replay)
7588 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7589 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7590 (record_btrace_store_registers, record_btrace_prepare_to_store)
7591 (record_btrace_to_get_unwinder)
7592 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7593 (record_btrace_commit_resume, record_btrace_wait)
7594 (record_btrace_stop, record_btrace_can_execute_reverse)
7595 (record_btrace_stopped_by_sw_breakpoint)
7596 (record_btrace_supports_stopped_by_sw_breakpoint)
7597 (record_btrace_stopped_by_hw_breakpoint)
7598 (record_btrace_supports_stopped_by_hw_breakpoint)
7599 (record_btrace_update_thread_list, record_btrace_thread_alive)
7600 (record_btrace_goto_begin, record_btrace_goto_end)
7601 (record_btrace_goto, record_btrace_stop_replaying_all)
7602 (record_btrace_execution_direction)
7603 (record_btrace_prepare_to_generate_core)
7604 (record_btrace_done_generating_core): Refactor as
7605 record_btrace_target methods.
7606 (init_record_btrace_ops): Delete.
7607 (_initialize_record_btrace): Remove reference to
7608 init_record_btrace_ops.
7609 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7610 the execution_direction global.
7611 (record_full_base_target, record_full_target)
7612 (record_full_core_target): New classes.
7613 (record_full_ops): Now a record_full_target.
7614 (record_full_core_ops): Now a record_full_core_target.
7615 (record_full_target::detach, record_full_target::disconnect)
7616 (record_full_core_target::disconnect)
7617 (record_full_target::mourn_inferior, record_full_target::kill):
7618 New.
7619 (record_full_open, record_full_close, record_full_async): Refactor
7620 as methods of the record_full_base_target class.
7621 (record_full_resume, record_full_commit_resume): Refactor
7622 as methods of the record_full_target class.
7623 (record_full_wait, record_full_stopped_by_watchpoint)
7624 (record_full_stopped_data_address)
7625 (record_full_stopped_by_sw_breakpoint)
7626 (record_full_supports_stopped_by_sw_breakpoint)
7627 (record_full_stopped_by_hw_breakpoint)
7628 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7629 methods of the record_full_base_target class.
7630 (record_full_store_registers, record_full_xfer_partial)
7631 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7632 Refactor as methods of the record_full_target class.
7633 (record_full_can_execute_reverse, record_full_get_bookmark)
7634 (record_full_goto_bookmark, record_full_execution_direction)
7635 (record_full_record_method, record_full_info, record_full_delete)
7636 (record_full_is_replaying, record_full_will_replay)
7637 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7638 (record_full_stop_replaying): Refactor as methods of the
7639 record_full_base_target class.
7640 (record_full_core_resume, record_full_core_kill)
7641 (record_full_core_fetch_registers)
7642 (record_full_core_prepare_to_store)
7643 (record_full_core_store_registers, record_full_core_xfer_partial)
7644 (record_full_core_insert_breakpoint)
7645 (record_full_core_remove_breakpoint)
7646 (record_full_core_has_execution): Refactor
7647 as methods of the record_full_core_target class.
7648 (record_full_base_target::supports_delete_record): New.
7649 (init_record_full_ops): Delete.
7650 (init_record_full_core_ops): Delete.
7651 (record_full_save): Refactor as method of the
7652 record_full_base_target class.
7653 (_initialize_record_full): Remove references to
7654 init_record_full_ops and init_record_full_core_ops.
7655
7656 * remote.c (remote_target, extended_remote_target): New classes.
7657 (remote_ops): Now a remote_target.
7658 (extended_remote_ops): Now an extended_remote_target.
7659 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7660 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7661 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7662 (remote_pass_signals, remote_set_syscall_catchpoint)
7663 (remote_program_signals, )
7664 (remote_thread_always_alive): Remove target_ops parameter.
7665 (remote_thread_alive, remote_thread_name)
7666 (remote_update_thread_list, remote_threads_extra_info)
7667 (remote_static_tracepoint_marker_at)
7668 (remote_static_tracepoint_markers_by_strid)
7669 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7670 (remote_open): Refactor as methods of remote_target.
7671 (extended_remote_open, extended_remote_detach)
7672 (extended_remote_attach, extended_remote_post_attach):
7673 (extended_remote_supports_disable_randomization)
7674 (extended_remote_create_inferior): : Refactor as method of
7675 extended_remote_target.
7676 (remote_set_permissions, remote_open_1, remote_detach)
7677 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7678 (remote_resume, remote_commit_resume, remote_stop)
7679 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7680 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7681 (remote_prepare_to_store, remote_store_registers)
7682 (remote_flash_erase, remote_flash_done, remote_files_info)
7683 (remote_kill, remote_mourn, remote_insert_breakpoint)
7684 (remote_remove_breakpoint, remote_insert_watchpoint)
7685 (remote_watchpoint_addr_within_range)
7686 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7687 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7688 (remote_supports_stopped_by_sw_breakpoint)
7689 (remote_stopped_by_hw_breakpoint)
7690 (remote_supports_stopped_by_hw_breakpoint)
7691 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7692 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7693 (remote_verify_memory): Refactor as methods of remote_target.
7694 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7695 parameter.
7696 (remote_xfer_partial, remote_get_memory_xfer_limit)
7697 (remote_search_memory, remote_rcmd, remote_memory_map)
7698 (remote_pid_to_str, remote_get_thread_local_address)
7699 (remote_get_tib_address, remote_read_description): Refactor as
7700 methods of remote_target.
7701 (remote_target::fileio_open, remote_target::fileio_pwrite)
7702 (remote_target::fileio_pread, remote_target::fileio_close): New.
7703 (remote_hostio_readlink, remote_hostio_fstat)
7704 (remote_filesystem_is_local, remote_can_execute_reverse)
7705 (remote_supports_non_stop, remote_supports_disable_randomization)
7706 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7707 (remote_supports_enable_disable_tracepoint)
7708 (remote_supports_string_tracing)
7709 (remote_can_run_breakpoint_commands, remote_trace_init)
7710 (remote_download_tracepoint, remote_can_download_tracepoint)
7711 (remote_download_trace_state_variable, remote_enable_tracepoint)
7712 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7713 (remote_trace_start, remote_get_trace_status)
7714 (remote_get_tracepoint_status, remote_trace_stop)
7715 (remote_trace_find, remote_get_trace_state_variable_value)
7716 (remote_save_trace_data, remote_get_raw_trace_data)
7717 (remote_set_disconnected_tracing, remote_core_of_thread)
7718 (remote_set_circular_trace_buffer, remote_traceframe_info)
7719 (remote_get_min_fast_tracepoint_insn_len)
7720 (remote_set_trace_buffer_size, remote_set_trace_notes)
7721 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7722 (remote_disable_btrace, remote_teardown_btrace)
7723 (remote_read_btrace, remote_btrace_conf)
7724 (remote_augmented_libraries_svr4_read, remote_load)
7725 (remote_pid_to_exec_file, remote_can_do_single_step)
7726 (remote_execution_direction, remote_thread_handle_to_thread_info):
7727 Refactor as methods of remote_target.
7728 (init_remote_ops, init_extended_remote_ops): Delete.
7729 (remote_can_async_p, remote_is_async_p, remote_async)
7730 (remote_thread_events, remote_upload_tracepoints)
7731 (remote_upload_trace_state_variables): Refactor as methods of
7732 remote_target.
7733 (_initialize_remote): Remove references to init_remote_ops and
7734 init_extended_remote_ops.
7735
7736 * remote-sim.c (gdbsim_target): New class.
7737 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7738 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7739 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7740 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7741 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7742 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7743 Refactor as methods of gdbsim_target.
7744 (gdbsim_ops): Now a gdbsim_target.
7745 (init_gdbsim_ops): Delete.
7746 (gdbsim_cntrl_c): Adjust.
7747 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7748
7749 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7750 (the_amd64_linux_nat_target): New.
7751 (amd64_linux_fetch_inferior_registers)
7752 (amd64_linux_store_inferior_registers): Refactor as methods of
7753 amd64_linux_nat_target.
7754 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7755 * i386-linux-nat.c: Don't include "linux-nat.h".
7756 (i386_linux_nat_target): New class.
7757 (the_i386_linux_nat_target): New.
7758 (i386_linux_fetch_inferior_registers)
7759 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7760 as methods of i386_linux_nat_target.
7761 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7762 * inf-child.c (inf_child_ops): Delete.
7763 (inf_child_fetch_inferior_registers)
7764 (inf_child_store_inferior_registers): Delete.
7765 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7766 methods of inf_child_target.
7767 (inf_child_target::supports_terminal_ours)
7768 (inf_child_target::terminal_init)
7769 (inf_child_target::terminal_inferior)
7770 (inf_child_target::terminal_ours_for_output)
7771 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7772 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7773 New.
7774 (inf_child_open, inf_child_disconnect, inf_child_close)
7775 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7776 (inf_child_post_startup_inferior, inf_child_can_run)
7777 (inf_child_pid_to_exec_file): Refactor as methods of
7778 inf_child_target.
7779 (inf_child_follow_fork): Delete.
7780 (inf_child_target::can_create_inferior)
7781 (inf_child_target::can_attach): New.
7782 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7783 (inf_child_target::has_stack, inf_child_target::has_registers)
7784 (inf_child_target::has_execution): New.
7785 (inf_child_fileio_open, inf_child_fileio_pwrite)
7786 (inf_child_fileio_pread, inf_child_fileio_fstat)
7787 (inf_child_fileio_close, inf_child_fileio_unlink)
7788 (inf_child_fileio_readlink, inf_child_use_agent)
7789 (inf_child_can_use_agent): Refactor as methods of
7790 inf_child_target.
7791 (return_zero, inf_child_target): Delete.
7792 (inf_child_target::inf_child_target): New.
7793 * inf-child.h: Include "target.h".
7794 (inf_child_target): Delete function prototype.
7795 (inf_child_target): New class.
7796 (inf_child_open_target, inf_child_mourn_inferior)
7797 (inf_child_maybe_unpush_target): Delete.
7798 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7799 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7800 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7801 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7802 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7803 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7804 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7805 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7806 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7807 methods of inf_ptrace_target.
7808 (inf_ptrace_target): Delete function.
7809 * inf-ptrace.h: Include "inf-child.h".
7810 (inf_ptrace_target): Delete function declaration.
7811 (inf_ptrace_target): New class.
7812 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7813 * linux-nat.c (linux_target): New.
7814 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7815 (linux_nat_target::~linux_nat_target): New.
7816 (linux_child_post_attach, linux_child_post_startup_inferior)
7817 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7818 (linux_child_remove_fork_catchpoint)
7819 (linux_child_insert_vfork_catchpoint)
7820 (linux_child_remove_vfork_catchpoint)
7821 (linux_child_insert_exec_catchpoint)
7822 (linux_child_remove_exec_catchpoint)
7823 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7824 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7825 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7826 (linux_nat_stopped_data_address)
7827 (linux_nat_stopped_by_sw_breakpoint)
7828 (linux_nat_supports_stopped_by_sw_breakpoint)
7829 (linux_nat_stopped_by_hw_breakpoint)
7830 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7831 (linux_nat_kill, linux_nat_mourn_inferior)
7832 (linux_nat_xfer_partial, linux_nat_thread_alive)
7833 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7834 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7835 (linux_child_static_tracepoint_markers_by_strid)
7836 (linux_nat_is_async_p, linux_nat_can_async_p)
7837 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7838 (linux_nat_supports_multi_process)
7839 (linux_nat_supports_disable_randomization, linux_nat_async)
7840 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7841 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7842 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7843 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7844 methods of linux_nat_target.
7845 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7846 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7847 parameter.
7848 (check_stopped_by_watchpoint): Adjust.
7849 (linux_xfer_partial): Delete.
7850 (linux_target_install_ops, linux_target, linux_nat_add_target):
7851 Delete.
7852 (linux_nat_target::linux_nat_target): New.
7853 * linux-nat.h: Include "inf-ptrace.h".
7854 (linux_nat_target): New.
7855 (linux_target, linux_target_install_ops, linux_nat_add_target):
7856 Delete function declarations.
7857 (linux_target): Declare global.
7858 * linux-thread-db.c (thread_db_target): New.
7859 (thread_db_target::thread_db_target): New.
7860 (thread_db_ops): Delete.
7861 (the_thread_db_target): New.
7862 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7863 (thread_db_update_thread_list, thread_db_pid_to_str)
7864 (thread_db_extra_thread_info)
7865 (thread_db_thread_handle_to_thread_info)
7866 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7867 (thread_db_resume): Refactor as methods of thread_db_target.
7868 (init_thread_db_ops): Delete.
7869 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7870 * x86-linux-nat.c: Don't include "linux-nat.h".
7871 (super_post_startup_inferior): Delete.
7872 (x86_linux_nat_target::~x86_linux_nat_target): New.
7873 (x86_linux_child_post_startup_inferior)
7874 (x86_linux_read_description, x86_linux_enable_btrace)
7875 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7876 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7877 methods of x86_linux_nat_target.
7878 (x86_linux_create_target): Delete. Bits folded ...
7879 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7880 pointer.
7881 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7882 (x86_linux_nat_target): New class.
7883 (x86_linux_create_target): Delete.
7884 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7885 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7886 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7887 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7888 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7889 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7890 make extern.
7891 (x86_use_watchpoints): Delete.
7892 * x86-nat.h: Include "breakpoint.h" and "target.h".
7893 (x86_use_watchpoints): Delete.
7894 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7895 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7896 (x86_insert_watchpoint, x86_remove_watchpoint)
7897 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7898 (x86_stopped_by_hw_breakpoint): New declarations.
7899 (x86_nat_target): New template class.
7900
7901 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7902 (the_ppc_linux_nat_target): New.
7903 (ppc_linux_fetch_inferior_registers)
7904 (ppc_linux_can_use_hw_breakpoint)
7905 (ppc_linux_region_ok_for_hw_watchpoint)
7906 (ppc_linux_ranged_break_num_registers)
7907 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7908 (ppc_linux_insert_mask_watchpoint)
7909 (ppc_linux_remove_mask_watchpoint)
7910 (ppc_linux_can_accel_watchpoint_condition)
7911 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7912 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7913 (ppc_linux_watchpoint_addr_within_range)
7914 (ppc_linux_masked_watch_num_registers)
7915 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7916 (ppc_linux_read_description): Refactor as methods of
7917 ppc_linux_nat_target.
7918 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7919
7920 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7921 (procfs_target): New class.
7922 (the_procfs_target): New.
7923 (procfs_target): Delete function.
7924 (procfs_auxv_parse, procfs_attach, procfs_detach)
7925 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7926 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7927 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7928 (procfs_create_inferior, procfs_update_thread_list)
7929 (procfs_thread_alive, procfs_pid_to_str)
7930 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7931 (procfs_stopped_data_address, procfs_insert_watchpoint)
7932 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7933 (proc_find_memory_regions, procfs_info_proc)
7934 (procfs_make_note_section): Refactor as methods of procfs_target.
7935 (_initialize_procfs): Adjust.
7936 * sol-thread.c (sol_thread_target): New class.
7937 (sol_thread_ops): Now a sol_thread_target.
7938 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7939 (sol_thread_fetch_registers, sol_thread_store_registers)
7940 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7941 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7942 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7943 (init_sol_thread_ops): Delete.
7944 (_initialize_sol_thread): Adjust. Remove references to
7945 init_sol_thread_ops and complete_target_initialization.
7946
7947 * windows-nat.c (windows_nat_target): New class.
7948 (windows_fetch_inferior_registers)
7949 (windows_store_inferior_registers, windows_resume, windows_wait)
7950 (windows_attach, windows_detach, windows_pid_to_exec_file)
7951 (windows_files_info, windows_create_inferior)
7952 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7953 (windows_close, windows_pid_to_str, windows_xfer_partial)
7954 (windows_get_tib_address, windows_get_ada_task_ptid)
7955 (windows_thread_name, windows_thread_alive): Refactor as
7956 windows_nat_target methods.
7957 (do_initial_windows_stuff): Adjust.
7958 (windows_target): Delete function.
7959 (_initialize_windows_nat): Adjust.
7960
7961 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7962 (darwin_mourn_inferior, darwin_kill_inferior)
7963 (darwin_create_inferior, darwin_attach, darwin_detach)
7964 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7965 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7966 (darwin_supports_multi_process): Refactor as darwin_nat_target
7967 methods.
7968 (darwin_resume_to, darwin_files_info): Delete.
7969 (_initialize_darwin_inferior): Rename to ...
7970 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7971 * darwin-nat.h: Include "inf-child.h".
7972 (darwin_nat_target): New class.
7973 (darwin_complete_target): Delete.
7974 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7975 (darwin_target): New.
7976 (i386_darwin_fetch_inferior_registers)
7977 (i386_darwin_store_inferior_registers): Refactor as methods of
7978 darwin_nat_target.
7979 (darwin_complete_target): Delete, with ...
7980 (_initialize_i386_darwin_nat): ... bits factored out here.
7981
7982 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7983 (the_alpha_linux_nat_target): New.
7984 (alpha_linux_register_u_offset): Refactor as
7985 alpha_linux_nat_target method.
7986 (_initialize_alpha_linux_nat): Adjust.
7987 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7988 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7989 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7990 methods of linux_nat_trad_target.
7991 (linux_trad_target): Delete.
7992 * linux-nat-trad.h (linux_trad_target): Delete function.
7993 (linux_nat_trad_target): New class.
7994 * mips-linux-nat.c (mips_linux_nat_target): New class.
7995 (super_fetch_registers, super_store_registers, super_close):
7996 Delete.
7997 (the_mips_linux_nat_target): New.
7998 (mips64_linux_regsets_fetch_registers)
7999 (mips64_linux_regsets_store_registers)
8000 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8001 (mips_linux_register_u_offset, mips_linux_read_description)
8002 (mips_linux_can_use_hw_breakpoint)
8003 (mips_linux_stopped_by_watchpoint)
8004 (mips_linux_stopped_data_address)
8005 (mips_linux_region_ok_for_hw_watchpoint)
8006 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8007 (mips_linux_close): Refactor as methods of mips_linux_nat.
8008 (_initialize_mips_linux_nat): Adjust to C++ification.
8009
8010 * aix-thread.c (aix_thread_target): New class.
8011 (aix_thread_ops): Now an aix_thread_target.
8012 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8013 (aix_thread_fetch_registers, aix_thread_store_registers)
8014 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8015 (aix_thread_thread_alive, aix_thread_pid_to_str)
8016 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8017 Refactor as methods of aix_thread_target.
8018 (init_aix_thread_ops): Delete.
8019 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8020 and complete_target_initialization.
8021 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8022 (rs6000_nat_target): New class.
8023 (the_rs6000_nat_target): New.
8024 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8025 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8026 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8027 (super_create_inferior): Delete.
8028 (_initialize_rs6000_nat): Adjust to C++ification.
8029
8030 * arm-linux-nat.c (arm_linux_nat_target): New class.
8031 (the_arm_linux_nat_target): New.
8032 (arm_linux_fetch_inferior_registers)
8033 (arm_linux_store_inferior_registers, arm_linux_read_description)
8034 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8035 (arm_linux_remove_hw_breakpoint)
8036 (arm_linux_region_ok_for_hw_watchpoint)
8037 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8038 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8039 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8040 arm_linux_nat_target.
8041 (_initialize_arm_linux_nat): Adjust to C++ification.
8042
8043 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8044 (the_aarch64_linux_nat_target): New.
8045 (aarch64_linux_fetch_inferior_registers)
8046 (aarch64_linux_store_inferior_registers)
8047 (aarch64_linux_child_post_startup_inferior)
8048 (aarch64_linux_read_description)
8049 (aarch64_linux_can_use_hw_breakpoint)
8050 (aarch64_linux_insert_hw_breakpoint)
8051 (aarch64_linux_remove_hw_breakpoint)
8052 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8053 (aarch64_linux_region_ok_for_hw_watchpoint)
8054 (aarch64_linux_stopped_data_address)
8055 (aarch64_linux_stopped_by_watchpoint)
8056 (aarch64_linux_watchpoint_addr_within_range)
8057 (aarch64_linux_can_do_single_step): Refactor as methods of
8058 aarch64_linux_nat_target.
8059 (super_post_startup_inferior): Delete.
8060 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8061
8062 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8063 (the_hppa_linux_nat_target): New.
8064 (hppa_linux_fetch_inferior_registers)
8065 (hppa_linux_store_inferior_registers): Refactor as methods of
8066 hppa_linux_nat_target.
8067 (_initialize_hppa_linux_nat): Adjust to C++ification.
8068
8069 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8070 (the_ia64_linux_nat_target): New.
8071 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8072 (ia64_linux_stopped_data_address)
8073 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8074 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8075 ia64_linux_nat_target methods.
8076 (super_xfer_partial): Delete.
8077 (_initialize_ia64_linux_nat): Adjust to C++ification.
8078
8079 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8080 (the_m32r_linux_nat_target): New.
8081 (m32r_linux_fetch_inferior_registers)
8082 (m32r_linux_store_inferior_registers): Refactor as
8083 m32r_linux_nat_target methods.
8084 (_initialize_m32r_linux_nat): Adjust to C++ification.
8085
8086 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8087 (the_m68k_linux_nat_target): New.
8088 (m68k_linux_fetch_inferior_registers)
8089 (m68k_linux_store_inferior_registers): Refactor as
8090 m68k_linux_nat_target methods.
8091 (_initialize_m68k_linux_nat): Adjust to C++ification.
8092
8093 * s390-linux-nat.c (s390_linux_nat_target): New class.
8094 (the_s390_linux_nat_target): New.
8095 (s390_linux_fetch_inferior_registers)
8096 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8097 (s390_insert_watchpoint, s390_remove_watchpoint)
8098 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8099 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8100 (s390_auxv_parse, s390_read_description): Refactor as methods of
8101 s390_linux_nat_target.
8102 (_initialize_s390_nat): Adjust to C++ification.
8103
8104 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8105 (the_sparc_linux_nat_target): New.
8106 (_initialize_sparc_linux_nat): Adjust to C++ification.
8107 * sparc-nat.c (sparc_fetch_inferior_registers)
8108 (sparc_store_inferior_registers): Remove target_ops parameter.
8109 * sparc-nat.h (sparc_fetch_inferior_registers)
8110 (sparc_store_inferior_registers): Remove target_ops parameter.
8111 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8112 (the_sparc64_linux_nat_target): New.
8113 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8114
8115 * spu-linux-nat.c (spu_linux_nat_target): New class.
8116 (the_spu_linux_nat_target): New.
8117 (spu_child_post_startup_inferior, spu_child_post_attach)
8118 (spu_child_wait, spu_fetch_inferior_registers)
8119 (spu_store_inferior_registers, spu_xfer_partial)
8120 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8121 methods.
8122 (_initialize_spu_nat): Adjust to C++ification.
8123
8124 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8125 (the_tilegx_linux_nat_target): New.
8126 (fetch_inferior_registers, store_inferior_registers):
8127 Refactor as methods.
8128 (_initialize_tile_linux_nat): Adjust to C++ification.
8129
8130 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8131 (the_xtensa_linux_nat_target): New.
8132 (xtensa_linux_fetch_inferior_registers)
8133 (xtensa_linux_store_inferior_registers): Refactor as
8134 xtensa_linux_nat_target methods.
8135 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8136
8137 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8138 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8139 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8140 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8141 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8142 (fbsd_stopped_by_sw_breakpoint)
8143 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8144 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8145 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8146 (fbsd_post_startup_inferior, fbsd_post_attach)
8147 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8148 (fbsd_set_syscall_catchpoint)
8149 (super_xfer_partial, super_resume, super_wait)
8150 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8151 (fbsd_handle_debug_trap): Remove target_ops parameter.
8152 (fbsd_nat_add_target): Delete.
8153 * fbsd-nat.h: Include "inf-ptrace.h".
8154 (fbsd_nat_add_target): Delete.
8155 (USE_SIGTRAP_SIGINFO): Define.
8156 (fbsd_nat_target): New class.
8157
8158 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8159 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8160 (amd64bsd_target): Delete.
8161 * amd64-bsd-nat.h: New file.
8162 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8163 "x86-bsd-nat.h".
8164 (amd64_fbsd_nat_target): New class.
8165 (the_amd64_fbsd_nat_target): New.
8166 (amd64fbsd_read_description): Refactor as method of
8167 amd64_fbsd_nat_target.
8168 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8169 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8170 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8171 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8172 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8173 (i386bsd_target): Delete.
8174 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8175 (i386bsd_fetch_inferior_registers)
8176 (i386bsd_store_inferior_registers): Declare.
8177 (i386_bsd_nat_target): New class.
8178 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8179 (the_i386_fbsd_nat_target): New.
8180 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8181 i386_fbsd_nat_target methods.
8182 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8183 (_initialize_i386fbsd_nat): Adjust to C++ification.
8184 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8185 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8186 (_initialize_x86_bsd_nat): Adjust to C++ification.
8187 * x86-bsd-nat.h: Include "x86-nat.h".
8188 (x86bsd_target): Delete declaration.
8189 (x86bsd_nat_target): New class.
8190
8191 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8192 (the_aarch64_fbsd_nat_target): New.
8193 (aarch64_fbsd_fetch_inferior_registers)
8194 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8195 aarch64_fbsd_nat_target.
8196 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8197 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8198 (the_alpha_bsd_nat_target): New.
8199 (alphabsd_fetch_inferior_registers)
8200 (alphabsd_store_inferior_registers): Refactor as
8201 alpha_bsd_nat_target methods.
8202 (_initialize_alphabsd_nat): Refactor as methods of
8203 alpha_bsd_nat_target.
8204 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8205 (the_amd64_nbsd_nat_target): New.
8206 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8207 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8208 (the_amd64_obsd_nat_target): New.
8209 (_initialize_amd64obsd_nat): Adjust to C++ification.
8210 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8211 (the_arm_fbsd_nat_target): New.
8212 (arm_fbsd_fetch_inferior_registers)
8213 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8214 (_initialize_arm_fbsd_nat): Refactor as methods of
8215 arm_fbsd_nat_target.
8216 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8217 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8218 (the_arm_netbsd_nat_target): New.
8219 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8220 arm_netbsd_nat_target.
8221 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8222 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8223 (the_hppa_nbsd_nat_target): New.
8224 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8225 hppa_nbsd_nat_target methods.
8226 (_initialize_hppanbsd_nat): Adjust to C++ification.
8227 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8228 (the_hppa_obsd_nat_target): New.
8229 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8230 methods of hppa_obsd_nat_target.
8231 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8232 add_target.
8233 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8234 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8235 add_target.
8236 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8237 (_initialize_i386obsd_nat): Use add_target.
8238 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8239 (the_m68k_bsd_nat_target): New.
8240 (m68kbsd_fetch_inferior_registers)
8241 (m68kbsd_store_inferior_registers): Refactor as methods of
8242 m68k_bsd_nat_target.
8243 (_initialize_m68kbsd_nat): Adjust to C++ification.
8244 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8245 (the_mips_fbsd_nat_target): New.
8246 (mips_fbsd_fetch_inferior_registers)
8247 (mips_fbsd_store_inferior_registers): Refactor as methods of
8248 mips_fbsd_nat_target.
8249 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8250 add_target.
8251 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8252 (the_mips_nbsd_nat_target): New.
8253 (mipsnbsd_fetch_inferior_registers)
8254 (mipsnbsd_store_inferior_registers): Refactor as methods of
8255 mips_nbsd_nat_target.
8256 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8257 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8258 (the_mips64_obsd_nat_target): New.
8259 (mips64obsd_fetch_inferior_registers)
8260 (mips64obsd_store_inferior_registers): Refactor as methods of
8261 mips64_obsd_nat_target.
8262 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8263 add_target.
8264 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8265 nbsd_nat_target.
8266 * nbsd-nat.h: Include "inf-ptrace.h".
8267 (nbsd_nat_target): New class.
8268 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8269 (obsd_wait): Refactor as methods of obsd_nat_target.
8270 (obsd_add_target): Delete.
8271 * obsd-nat.h: Include "inf-ptrace.h".
8272 (obsd_nat_target): New class.
8273 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8274 (the_ppc_fbsd_nat_target): New.
8275 (ppcfbsd_fetch_inferior_registers)
8276 (ppcfbsd_store_inferior_registers): Refactor as methods of
8277 ppc_fbsd_nat_target.
8278 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8279 add_target.
8280 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8281 (the_ppc_nbsd_nat_target): New.
8282 (ppcnbsd_fetch_inferior_registers)
8283 (ppcnbsd_store_inferior_registers): Refactor as methods of
8284 ppc_nbsd_nat_target.
8285 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8286 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8287 (the_ppc_obsd_nat_target): New.
8288 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8289 methods of ppc_obsd_nat_target.
8290 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8291 add_target.
8292 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8293 (the_sh_nbsd_nat_target): New.
8294 (shnbsd_fetch_inferior_registers)
8295 (shnbsd_store_inferior_registers): Refactor as methods of
8296 sh_nbsd_nat_target.
8297 (_initialize_shnbsd_nat): Adjust to C++ification.
8298 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8299 (inf_ptrace_xfer_partial): Delete.
8300 (sparc_xfer_partial, sparc_target): Delete.
8301 * sparc-nat.h (sparc_fetch_inferior_registers)
8302 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8303 (sparc_target): Delete function declaration.
8304 (sparc_target): New template class.
8305 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8306 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8307 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8308 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8309 add_target.
8310 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8311 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8312 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8313 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8314 add_target.
8315 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8316 (the_vax_bsd_nat_target): New.
8317 (vaxbsd_fetch_inferior_registers)
8318 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8319 methods.
8320 (_initialize_vaxbsd_nat): Adjust to C++ification.
8321
8322 * bsd-kvm.c (bsd_kvm_target): New class.
8323 (bsd_kvm_ops): Now a bsd_kvm_target.
8324 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8325 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8326 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8327 bsd_kvm_target.
8328 (bsd_kvm_return_one): Delete.
8329 (bsd_kvm_add_target): Adjust to C++ification.
8330
8331 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8332 (nto_procfs_target_procfs): New classes.
8333 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8334 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8335 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8336 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8337 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8338 (procfs_remove_hw_breakpoint, procfs_resume)
8339 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8340 (procfs_kill_inferior, procfs_store_registers)
8341 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8342 as methods of nto_procfs_target.
8343 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8344 (nto_native_ops): Delete.
8345 (procfs_open, procfs_native_open): Delete.
8346 (nto_native_ops): Now an nto_procfs_target_native.
8347 (init_procfs_targets): Adjust to C++ification.
8348 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8349 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8350 Refactor as methods of nto_procfs_target.
8351
8352 * go32-nat.c (go32_nat_target): New class.
8353 (the_go32_nat_target): New.
8354 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8355 (go32_store_registers, go32_xfer_partial, go32_files_info)
8356 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8357 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8358 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8359 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8360 (go32_target): Delete.
8361 (_initialize_go32_nat): Adjust to C++ification.
8362
8363 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8364 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8365 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8366 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8367 gnu_nat_target.
8368 (gnu_target): Delete.
8369 * gnu-nat.h (gnu_target): Delete.
8370 (gnu_nat_target): New class.
8371 * i386-gnu-nat.c (gnu_base_target): New.
8372 (i386_gnu_nat_target): New class.
8373 (the_i386_gnu_nat_target): New.
8374 (_initialize_i386gnu_nat): Adjust to C++ification.
8375
8376 2018-05-02 Pedro Alves <palves@redhat.com>
8377
8378 * bfd-target.c (target_bfd_xclose): Rename to ...
8379 (target_bfd_close): ... this.
8380 (target_bfd_reopen): Adjust.
8381 * target.c (target_close): Remove references to to_xclose.
8382 * target.h (target_ops::to_xclose): Delete.
8383 (target_ops::to_close): Update comments.
8384
8385 2018-05-02 Pedro Alves <palves@redhat.com>
8386
8387 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8388 "linux-nat.h".
8389 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8390 * inf-ptrace.c (inf_ptrace_register_u_offset)
8391 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8392 (inf_ptrace_store_register, inf_ptrace_store_registers)
8393 (inf_ptrace_trad_target): Move to ...
8394 * linux-nat-trad.c: ... this new file.
8395 * linux-nat-trad.h: New file.
8396 * linux-nat.c (linux_target_install_ops): Make extern.
8397 (linux_trad_target): Delete.
8398 * linux-nat.h (linux_trad_target): Delete declaration.
8399 (linux_target_install_ops): Declare.
8400 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8401 "linux-nat.h".
8402
8403 2018-05-02 Pedro Alves <palves@redhat.com>
8404
8405 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8406 procfs_target/add_target here.
8407 * procfs.c (procfs_target): Make static.
8408 (_initialize_procfs): Call add_target here.
8409 * procfs.h (struct target_ops): Remove forward declaration.
8410 (procfs_target): Remove declaration.
8411 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8412
8413 2018-05-02 Pedro Alves <palves@redhat.com>
8414
8415 * procfs.c (procfs_stopped_by_watchpoint)
8416 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8417 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8418 Forward declare.
8419 (procfs_use_watchpoints): Delete, move contents...
8420 (procfs_target): ... here.
8421 * procfs.h (procfs_use_watchpoints): Delete declaration.
8422 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8423 procfs_use_watchpoints.
8424 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8425 procfs_use_watchpoints.
8426
8427 2018-05-02 Tom Tromey <tom@tromey.com>
8428
8429 PR python/20084:
8430 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8431 and var_zuinteger_unlimited.
8432 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8433 and PARAM_ZUINTEGER_UNLIMITED.
8434 (set_parameter_value): Handle var_zuinteger and
8435 var_zuinteger_unlimited.
8436 (add_setshow_generic): Likewise.
8437 (parmpy_init): Likewise.
8438
8439 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8440
8441 PR rust/23124
8442 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8443 pointer is not null before dereferencing it.
8444
8445 2018-04-30 Tom Tromey <tom@tromey.com>
8446
8447 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8448 is_mi_like_p.
8449
8450 2018-04-30 Tom Tromey <tom@tromey.com>
8451
8452 * breakpoint.c (mention): Remove use of is_mi_like_p.
8453 (print_mention_ranged_breakpoint): Likewise.
8454 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8455 of is_mi_like_p.
8456
8457 2018-04-30 Tom Tromey <tom@tromey.com>
8458
8459 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8460
8461 2018-04-30 Tom Tromey <tom@tromey.com>
8462
8463 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8464 (info_spu_event_command): Remove some uses of is_mi_like_p.
8465
8466 2018-04-30 Tom Tromey <tom@tromey.com>
8467
8468 * python/py-framefilter.c (py_print_single_arg)
8469 (enumerate_locals, py_print_args, py_print_frame): Remove some
8470 uses of is_mi_like_p.
8471
8472 2018-04-30 Tom Tromey <tom@tromey.com>
8473
8474 * ui-out.c: Update.
8475 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8476 * ui-out.h (ui_out::is_mi_like_p): Now const.
8477 (ui_out::do_is_mi_like_p): Now const.
8478 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8479
8480 2018-04-30 Tom Tromey <tom@tromey.com>
8481
8482 * varobj.c (varobj_set_visualizer): Use new_reference.
8483 * python/python.c (gdbpy_decode_line): Use new_reference.
8484 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8485 new_reference.
8486
8487 2018-04-30 Tom Tromey <tom@tromey.com>
8488
8489 * varobj.c (install_new_value): Use new_reference.
8490 * value.h (value_incref): Return void. Swap intro comment with
8491 value_decref.
8492 * value.c (set_value_parent): Use new_reference.
8493 (value_incref): Return void. Update intro comment.
8494 (release_value): Use new_reference.
8495 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8496
8497 2018-04-30 Tom Tromey <tom@tromey.com>
8498
8499 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8500 * gdb_bfd.h (new_bfd_ref): Remove.
8501 (gdb_bfd_open): Update comment.
8502 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8503 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8504 (gdb_bfd_fdopenr): Use new_reference.
8505 * exec.c (exec_file_attach): Use new_reference.
8506
8507 2018-04-30 Tom Tromey <tom@tromey.com>
8508
8509 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8510 method.
8511
8512 2018-04-30 Tom Tromey <tom@tromey.com>
8513
8514 * jit.c (jit_read_code_entry): Use type_align.
8515 * i386-tdep.c (i386_gdbarch_init): Don't call
8516 set_gdbarch_long_long_align_bit.
8517 * gdbarch.sh: Remove long_long_align_bit.
8518 * gdbarch.c, gdbarch.h: Rebuild.
8519 * arc-tdep.c (arc_type_align): New function.
8520 (arc_gdbarch_init): Use arc_type_align. Don't call
8521 set_gdbarch_long_long_align_bit.
8522
8523 2018-04-30 Tom Tromey <tom@tromey.com>
8524
8525 * rust-lang.c (rust_type_alignment): Remove.
8526 (rust_composite_type): Use type_align.
8527
8528 2018-04-30 Tom Tromey <tom@tromey.com>
8529
8530 * NEWS: Mention Type.align.
8531 * python/py-type.c (typy_get_alignof): New function.
8532 (type_object_getset): Add "alignof".
8533
8534 2018-04-30 Tom Tromey <tom@tromey.com>
8535
8536 PR exp/17095:
8537 * NEWS: Update.
8538 * std-operator.def (UNOP_ALIGNOF): New operator.
8539 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8540 New.
8541 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8542 * c-lang.c (c_op_print_tab): Add alignof.
8543 * c-exp.y (ALIGNOF): New token.
8544 (exp): Add "ALIGNOF" production.
8545 (ident_tokens): Add _Alignof and alignof.
8546
8547 2018-04-30 Tom Tromey <tom@tromey.com>
8548
8549 * i386-tdep.c (i386_type_align): New function.
8550 (i386_gdbarch_init): Update.
8551 * gdbarch.sh (type_align): New method.
8552 * gdbarch.c, gdbarch.h: Rebuild.
8553 * arch-utils.h (default_type_align): Declare.
8554 * arch-utils.c (default_type_align): New function.
8555 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8556 (struct type) <align_log2>: New field.
8557 <instance_flags>: Now a bitfield.
8558 (TYPE_RAW_ALIGN): New macro.
8559 (type_align, type_raw_align, set_type_align): Declare.
8560 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8561 functions.
8562 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8563 (get_alignment, maybe_set_alignment): New functions.
8564 (read_structure_type, read_enumeration_type, read_array_type)
8565 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8566 (read_subrange_type, read_base_type): Set type alignment.
8567
8568 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8569
8570 * dwarf2read.c (read_index_from_section): Use bool.
8571
8572 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8573
8574 PR gdb/22950
8575 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8576 with #ifdef.
8577
8578 2018-04-29 John Reiser <jreiser@BitWagon.com>
8579
8580 PR build/22873
8581 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8582 last step, and do it atomically.
8583
8584 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8585
8586 * compile/compile-c-types.c (convert_int, convert_float):
8587 Update for C FE v1.
8588
8589 2018-04-27 Tom Tromey <tom@tromey.com>
8590
8591 PR rust/22545:
8592 * rust-lang.c (rust_inclusive_range_type_p): New function.
8593 (rust_range): Handle inclusive ranges.
8594 (rust_compute_range): Likewise.
8595 * rust-exp.y (struct rust_op) <inclusive>: New field.
8596 (DOTDOTEQ): New constant.
8597 (range_expr): Add "..=" productions.
8598 (operator_tokens): Add "..=" token.
8599 (ast_range): Add "inclusive" parameter.
8600 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8601 ranges.
8602 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8603 bounds values.
8604 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8605 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8606 Update comments.
8607 * expprint.c (print_subexp_standard): Handle new bounds values.
8608 (dump_subexp_body_standard): Likewise.
8609
8610 2018-04-27 Tom Tromey <tom@tromey.com>
8611
8612 * configure: Rebuild.
8613 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8614 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8615 "OVERRIDE".
8616 (class symbol_needs_eval_context): Likewise.
8617 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8618 (mock_mapped_index::symbol_name_at): Use "override". Remove
8619 "virtual".
8620 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8621 "override".
8622 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8623 * aarch64-tdep.c (instruction_reader::read): Use "override".
8624 (instruction_reader_test::read): Likewise.
8625 * arm-tdep.c (instruction_reader::read): Use "override".
8626 (instruction_reader_thumb::read): Likewise.
8627
8628 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8629
8630 PR remote/9665
8631 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8632 instead of remote_send.
8633 (remote_send): Remove.
8634
8635 2018-04-26 Pedro Alves <palves@redhat.com>
8636
8637 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8638 find_function_start_sal instead of find_pc_line.
8639
8640 2018-04-26 Pedro Alves <palves@redhat.com>
8641
8642 * breakpoint.c (set_breakpoint_location_function): Handle
8643 mst_data_gnu_ifunc.
8644 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8645 * elfread.c (elf_symtab_read): Give data symbols with
8646 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8647 (elf_rel_plt_read): Update comment.
8648 * linespec.c (convert_linespec_to_sals): Handle
8649 mst_data_gnu_ifunc.
8650 (minsym_found): Handle mst_data_gnu_ifunc.
8651 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8652 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8653 * parse.c (find_minsym_type_and_address): Handle
8654 mst_data_gnu_ifunc.
8655 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8656 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8657 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8658 comment.
8659 <mst_data_gnu_ifunc>: New enumerator.
8660
8661 2018-04-26 Pedro Alves <palves@redhat.com>
8662
8663 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8664 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8665 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8666 Handle it.
8667 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8668 (lookup_minimal_symbol_by_pc): Adjust.
8669 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8670 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8671 * minsyms.h (lookup_msym_prefer): New enum.
8672 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8673 parameter by a lookup_msym_prefer parameter.
8674
8675 2018-04-26 Pedro Alves <palves@redhat.com>
8676
8677 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8678 ends in "@plt" instead of looking at the symbol's section.
8679
8680 2018-04-26 Pedro Alves <palves@redhat.com>
8681
8682 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8683 all references.
8684 (find_pc_partial_function_gnu_ifunc): Rename to ...
8685 (find_pc_partial_function): ... this, and remove references to
8686 'is_gnu_ifunc_p'.
8687 (find_pc_partial_function): Delete old implementation.
8688 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8689
8690 2018-04-26 Pedro Alves <palves@redhat.com>
8691
8692 * linespec.c (struct bound_minimal_symbol_search_key): New.
8693 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8694 skip first line if we found a GNU ifunc minimal symbol by name.
8695 (compare_msymbols): Change parameters to work with a destructured
8696 lhs minsym.
8697 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8698 functions.
8699
8700 2018-04-26 Pedro Alves <palves@redhat.com>
8701
8702 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8703 ifunc targets here. Instead, if we have an ifunc minsym, use its
8704 address/name.
8705 (add_location_to_breakpoint): Store the minsym and the objfile in
8706 the breakpoint location.
8707 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8708 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8709 Record the minsym in the sal.
8710 * symtab.h (symtab_and_line) <msymbol>: New field.
8711
8712 2018-04-26 Pedro Alves <palves@redhat.com>
8713
8714 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8715 unless we actually resolved the ifunc.
8716
8717 2018-04-26 Pedro Alves <palves@redhat.com>
8718
8719 * c-exp.y (variable production): Prefer ifunc minsyms over
8720 regular function symbols.
8721 * symtab.c (find_gnu_ifunc): New function.
8722 * minsyms.h (lookup_msym_prefer): New enum.
8723 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8724 parameter by a lookup_msym_prefer parameter.
8725 * symtab.h (find_gnu_ifunc): New declaration.
8726
8727 2018-04-26 Pedro Alves <palves@redhat.com>
8728
8729 * blockframe.c (find_gnu_ifunc_target_type): New function.
8730 (find_function_type): New.
8731 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8732 return a value with a memory address.
8733 (eval_call): For calls to GNU ifunc functions, try to find the
8734 type of the target function from the type that the resolver
8735 returns.
8736 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8737 symbols.
8738 * infcall.c (find_function_return_type): Delete.
8739 (find_function_addr): Add 'function_type' parameter. For calls to
8740 GNU ifunc functions, try to find the type of the target function
8741 from the type that the resolver returns, and return it via
8742 FUNCTION_TYPE.
8743 (call_function_by_hand_dummy): Adjust to use the function type
8744 returned by find_function_addr.
8745 (find_function_addr): Add 'function_type' parameter and move
8746 description here.
8747 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8748 declarations.
8749
8750 2018-04-26 Pedro Alves <palves@redhat.com>
8751
8752 * c-exp.y (variable production): Skip finding an alias for ifunc
8753 symbols.
8754
8755 2018-04-26 Pedro Alves <palves@redhat.com>
8756
8757 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8758
8759 2018-04-25 Pedro Alves <palves@redhat.com>
8760
8761 * infcmd.c (kill_command): Print the pid as string, not the whole
8762 thread's ptid. Add comment. s/has been killed/killed/ in output
8763 message.
8764 * remote.c (remote_detach_1): Print the pid as string, not the
8765 whole thread's ptid.
8766
8767 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8768 Sergio Durigan Junior <sergiodj@redhat.com>
8769 Pedro Alves <palves@redhat.com>
8770
8771 * infcmd.c (kill_command): Print message when inferior has
8772 been killed.
8773 * inferior.c (print_inferior_events): Remove 'static'. Set as
8774 '1'.
8775 (add_inferior): Improve message printed when
8776 'print_inferior_events' is on.
8777 (exit_inferior): Remove message printed when
8778 'print_inferior_events' is on.
8779 (detach_inferior): Improve message printed when
8780 'print_inferior_events' is on.
8781 (initialize_inferiors): Use 'add_inferior_silent' to set
8782 'current_inferior_'.
8783 * inferior.h (print_inferior_events): Declare here as
8784 'extern'.
8785 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8786 '[Detaching...]' messages when 'print_inferior_events' is on.
8787 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8788 as prefix/suffix for messages. Remove periods. Fix erroneous
8789 'Detaching after fork from child...', replace it by '... from
8790 parent...'.
8791 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8792 prefix/suffix when printing 'Detaching...' messages. Print
8793 them when 'print_inferior_events' is on.
8794 * remote.c (remote_detach_1): Print message when detaching
8795 from inferior and '!is_fork_parent'.
8796
8797 2018-04-24 Tom Tromey <tom@tromey.com>
8798
8799 * cli-out.h: Reindent.
8800
8801 2018-04-24 Tom Tromey <tom@tromey.com>
8802
8803 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8804 (cli_ui_out::do_field_string): Use fputs_filtered.
8805 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8806
8807 2018-04-23 Tom Tromey <tom@tromey.com>
8808
8809 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8810 gdb::unique_xmalloc_ptr.
8811
8812 2018-04-23 Tom Tromey <tom@tromey.com>
8813
8814 * configure: Rebuild.
8815
8816 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8817
8818 PR gdb/23095
8819 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8820 prepare_for_testing. Set normal_bp to r_debug_state if target
8821 is bsd.
8822
8823 2018-04-21 Pedro Alves <palves@redhat.com>
8824 Rajendra SY <rajendra.sy@gmail.com>
8825
8826 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8827 * remote.c (extended_remote_attach): In all-stop mode, mark the
8828 thread as executing.
8829
8830 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8831
8832 * thread.c (thread_apply_all_command): Fix comment.
8833 (thread_command): Fix comment.
8834
8835 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8836
8837 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8838 parameter.
8839 * features/aarch64-core.c (create_feature_aarch64_core):
8840 Regenerate.
8841 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8842 Likewise.
8843 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8844 Likewise.
8845 * features/i386/32bit-avx512.c
8846 (create_feature_i386_32bit_avx512): Likewise.
8847 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8848 Likewise.
8849 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8850 Likewise.
8851 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8852 Likewise.
8853 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8854 Likewise.
8855 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8856 Likewise.
8857 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8858 Likewise.
8859 * features/i386/64bit-avx512.c
8860 (create_feature_i386_64bit_avx512): Likewise.
8861 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8862 Likewise.
8863 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8864 Likewise.
8865 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8866 Likewise.
8867 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8868 Likewise.
8869 * features/i386/64bit-segments.c
8870 (create_feature_i386_64bit_segments): Likewise.
8871 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8872 Likewise.
8873 * features/i386/x32-core.c
8874 (create_feature_i386_x32_core): Likewise.
8875 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8876 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8877 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8878 * target-descriptions.c: In generated code, don't pass xml
8879 filename.
8880
8881 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8882
8883 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8884 (print_xml_feature::visit_post): Likewise.
8885 (print_xml_feature::visit): Likewise.
8886 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8887 (print_xml_feature): Add new class.
8888 * regformats/regdat.sh: Null xmltarget on feature targets.
8889 * target-descriptions.c (struct target_desc): Add xmltarget.
8890 (maintenance_check_tdesc_xml_convert): Add unittest function.
8891 (tdesc_get_features_xml): Add function to get xml.
8892 (maintenance_check_xml_descriptions): Test xml generation.
8893 * xml-tdesc.c (string_read_description_xml): Add function.
8894 * xml-tdesc.h (string_read_description_xml): Add declaration.
8895
8896 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8897
8898 * features/Makefile: Add feature marker to targets with new style
8899 target descriptions.
8900 * regformats/aarch64.dat: Regenerate.
8901 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8902 * regformats/i386/amd64-avx-linux.dat: Likewise.
8903 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8904 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8905 * regformats/i386/amd64-linux.dat: Likewise.
8906 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8907 * regformats/i386/amd64.dat: Likewise.
8908 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8909 * regformats/i386/i386-avx-linux.dat: Likewise.
8910 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8911 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8912 * regformats/i386/i386-linux.dat: Likewise.
8913 * regformats/i386/i386-mmx-linux.dat: Likewise.
8914 * regformats/i386/i386-mpx-linux.dat: Likewise.
8915 * regformats/i386/i386.dat: Likewise.
8916 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8917 * regformats/i386/x32-avx-linux.dat: Likewise.
8918 * regformats/i386/x32-linux.dat: Likewise.
8919 * regformats/tic6x-c62x-linux.dat: Likewise.
8920 * regformats/tic6x-c64x-linux.dat: Likewise.
8921 * regformats/tic6x-c64xp-linux.dat: Likewise.
8922 * regformats/regdat.sh: Parse feature marker.
8923
8924 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8925
8926 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8927 (tdesc_osabi_name): Likewise.
8928 * target-descriptions.c (tdesc_architecture_name): Add new
8929 function.
8930 (tdesc_osabi_name): Likewise.
8931
8932 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8933
8934 * common/tdesc.c (tdesc_predefined_type): Move to here.
8935 (tdesc_named_type): Likewise.
8936 (tdesc_create_vector): Likewise.
8937 (tdesc_create_struct): Likewise.
8938 (tdesc_set_struct_size): Likewise.
8939 (tdesc_create_union): Likewise.
8940 (tdesc_create_flags): Likewise.
8941 (tdesc_create_enum): Likewise.
8942 (tdesc_add_field): Likewise.
8943 (tdesc_add_typed_bitfield): Likewise.
8944 (tdesc_add_bitfield): Likewise.
8945 (tdesc_add_flag): Likewise.
8946 (tdesc_add_enum_value): Likewise.
8947 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8948 (struct tdesc_type_vector): Likewise.
8949 (struct tdesc_type_field): Likewise.
8950 (struct tdesc_type_with_fields): Likewise.
8951 (tdesc_create_enum): Add declaration.
8952 (tdesc_add_typed_bitfield): Likewise.
8953 (tdesc_add_enum_value): Likewise.
8954 * target-descriptions.c (tdesc_type_field): Move from here.
8955 (tdesc_type_builtin): Likewise.
8956 (tdesc_type_vector): Likewise.
8957 (tdesc_type_with_fields): Likewise.
8958 (tdesc_predefined_types): Likewise.
8959 (tdesc_named_type): Likewise.
8960 (tdesc_create_vector): Likewise.
8961 (tdesc_create_struct): Likewise.
8962 (tdesc_set_struct_size): Likewise.
8963 (tdesc_create_union): Likewise.
8964 (tdesc_create_flags): Likewise.
8965 (tdesc_create_enum): Likewise.
8966 (tdesc_add_field): Likewise.
8967 (tdesc_add_typed_bitfield): Likewise.
8968 (tdesc_add_bitfield): Likewise.
8969 (tdesc_add_flag): Likewise.
8970 (tdesc_add_enum_value): Likewise.
8971 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8972 (tdesc_add_typed_bitfield): Likewise.
8973 (tdesc_add_enum_value): Likewise.
8974
8975 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8976
8977 * common/tdesc.c (tdesc_feature::accept): Move to here.
8978 (tdesc_feature::operator==): Likewise.
8979 (tdesc_create_reg): Likewise.
8980 * common/tdesc.h (tdesc_type_kind): Likewise.
8981 (struct tdesc_type): Likewise.
8982 (struct tdesc_feature): Likewise.
8983 * regformats/regdat.sh: Create a feature.
8984 * target-descriptions.c (tdesc_type_kind): Move from here.
8985 (tdesc_type): Likewise.
8986 (tdesc_type_up): Likewise.
8987 (tdesc_feature): Likewise.
8988 (tdesc_create_reg): Likewise.
8989
8990 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8991
8992 * Makefile.in: Add arch/tdesc.c
8993 * common/tdesc.c: New file.
8994 * common/tdesc.h (tdesc_element_visitor): Move to here.
8995 (tdesc_element): Likewise.
8996 (tdesc_reg): Likewise.
8997 (tdesc_reg_up): Likewise.
8998 * regformats/regdef.h (reg): Add offset to constructors.
8999 * target-descriptions.c (tdesc_element_visitor): Move from here.
9000 (tdesc_element): Likewise.
9001 (tdesc_reg): Likewise.
9002 (tdesc_reg_up): Likewise.
9003
9004 2018-04-17 Tom Tromey <tom@tromey.com>
9005
9006 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9007 discriminant field.
9008
9009 2018-04-17 Tom Tromey <tom@tromey.com>
9010
9011 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9012
9013 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9014
9015 * symtab.c (print_symbol_info): Skip printing filename and line
9016 number when `last' is NULL.
9017 (symtab_symbol_info): Use empty string instead of NULL for first
9018 invocation of print_symbol_info.
9019 (rbreak_command): Pass NULL to `last' parameter of
9020 print_symbol_info.
9021
9022 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9023
9024 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9025 instead of nullptr.
9026
9027 2018-04-16 Pedro Alves <palves@redhat.com>
9028
9029 * MAINTAINERS (sh): Remove.
9030 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9031 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9032 (ALLDEPFILES): Remove sh64-tdep.c.
9033 * NEWS: Mentions that support for SH-5/SH64 is removed.
9034 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9035 (sh*-*-openbsd*): Ditto.
9036 (sh64-*-elf*): Remove.
9037 (sh*): Remove.
9038 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9039 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9040 * sh-tdep.c: No longer include "sh64-tdep.h".
9041 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9042 * sh64-tdep.c, sh64-tdep.h: Remove files.
9043
9044 2018-04-16 Pedro Alves <palves@redhat.com>
9045
9046 * MAINTAINERS: Remove m88k.
9047 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9048 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9049 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9050 * NEWS: Mention that support for m88k was removed.
9051 * configure.host (m88*-*-*): Remove support.
9052 * configure.nat (m88k-*-*): Remove support.
9053 * configure.tgt (m88*-*-openbsd*): Remove.
9054 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9055
9056 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9057
9058 * configure.tgt (x86_tobjs): New variable.
9059 (amd64_tobjs, i386_tobjs): Use it.
9060
9061 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9062
9063 * symtab.c (print_symbol_info): Precede the symbol definition by
9064 the line number when available.
9065 * NEWS: Advertise this enhancement.
9066
9067 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9068
9069 * NEWS (New options): announce set/show record btrace cpu.
9070 * btrace.c: Include record-btrace.h.
9071 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9072 the vendor is unknown.
9073 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9074 Maybe overwrite the btrace configuration's cpu.
9075 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9076 (btrace_fetch): Add cpu parameter. Update callers.
9077 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9078 Maybe overwrite the btrace configuration's cpu. Skip enabling
9079 errata workarounds if the vendor is unknown.
9080 * python/py-record-btrace.c: Include record-btrace.h.
9081 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9082 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9083 * record-btrace.c (record_btrace_cpu_state_kind): New.
9084 (record_btrace_cpu): New.
9085 (set_record_btrace_cpu_cmdlist): New.
9086 (record_btrace_get_cpu): New.
9087 (require_btrace_thread, record_btrace_info)
9088 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9089 (cmd_set_record_btrace_cpu_none): New.
9090 (cmd_set_record_btrace_cpu_auto): New.
9091 (cmd_set_record_btrace_cpu): New.
9092 (cmd_show_record_btrace_cpu): New.
9093 (_initialize_record_btrace): Initialize set/show record btrace cpu
9094 commands.
9095 * record-btrace.h (record_btrace_get_cpu): New.
9096
9097 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9098
9099 * record.c (set_record_command): Fix typo in message.
9100
9101 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9102
9103 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9104
9105 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9106
9107 * infrun.c (process_event_stop_test): Call
9108 gdbarch_in_indirect_branch_thunk.
9109 * gdbarch.sh (in_indirect_branch_thunk): New.
9110 * gdbarch.c: Regenerated.
9111 * gdbarch.h: Regenerated.
9112 * x86-tdep.h: New.
9113 * x86-tdep.c: New.
9114 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9115 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9116 (ALLDEPFILES): Add x86-tdep.c.
9117 * arch-utils.h (default_in_indirect_branch_thunk): New.
9118 * arch-utils.c (default_in_indirect_branch_thunk): New.
9119 * i386-tdep: Include x86-tdep.h.
9120 (i386_in_indirect_branch_thunk): New.
9121 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9122 function.
9123 * amd64-tdep: Include x86-tdep.h.
9124 (amd64_in_indirect_branch_thunk): New.
9125 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9126
9127 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9128
9129 PR gdb/23053
9130 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9131 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9132 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9133 regression.
9134
9135 2018-04-12 Tom Tromey <tom@tromey.com>
9136
9137 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9138 (rust_evaluate_subexp): Likewise.
9139
9140 2018-04-12 Pedro Alves <palves@redhat.com>
9141
9142 * procfs.c (procfs_detach): Make forward declaration's prototype
9143 match definition's protototype.
9144 (proc_get_LDT_entry): Remove stale do_cleanups call.
9145
9146 2018-04-12 Pedro Alves <palves@redhat.com>
9147
9148 * target.h (target_ops::to_has_exited): Delete.
9149 (target_has_exited): Delete.
9150 * target-delegates.c: Regenerate.
9151
9152 2018-04-11 Pedro Alves <palves@redhat.com>
9153
9154 * target.c (fileio_fh_t::t): Add comment.
9155 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9156 (target_fileio_close): Handle a NULL target.
9157 (invalidate_fileio_fh): New.
9158 (target_close): Call it.
9159 * remote.c (remote_hostio_send_command): No longer check whether
9160 remote_desc is open.
9161
9162 2018-04-11 Pedro Alves <palves@redhat.com>
9163
9164 * target.c (fileio_fh_t): Make it a named struct instead of a
9165 typedef.
9166 (fileio_fh_t::is_closed): New method.
9167 (DEF_VEC_O (fileio_fh_t)): Remove.
9168 (fileio_fhandles): Now a std::vector.
9169 (is_closed_fileio_fh): Delete.
9170 (acquire_fileio_fd): Adjust. Rename parameters.
9171 (release_fileio_fd): Adjust.
9172 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9173 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9174 (target_fileio_close): Adjust.
9175
9176 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9177
9178 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9179 index.
9180
9181 2018-04-10 Pedro Alves <palves@redhat.com>
9182
9183 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9184 (scoped_finish_thread_state): New class.
9185 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9186 cleanup.
9187 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9188 (fetch_inferior_event, normal_stop): Likewise.
9189 * thread.c (finish_thread_state_cleanup): Delete.
9190
9191 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9192 Pedro Alves <palves@redhat.com>
9193
9194 * value.c: Include "selftest.h" and "common/array-view.h".
9195 (struct range) <operator ==>: New.
9196 (test_ranges_contain): New.
9197 (check_ranges_vector): New.
9198 (test_insert_into_bit_range_vector): New.
9199 (_initialize_values): Register selftests.
9200 * common/array-view.h (operator==, operator!=): New.
9201
9202 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9203
9204 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9205 an iterator.
9206 * inline-frame.c: Include <algorithm>.
9207 (struct inline_state): Add constructor.
9208 (inline_state_s): Remove.
9209 (DEF_VEC_O(inline_state_s)): Remove.
9210 (inline_states): Change type to std::vector.
9211 (find_inline_frame_state): Adjust to std::vector.
9212 (allocate_inline_frame_state): Remove.
9213 (clear_inline_frame_state): Adjust to std::vector.
9214 (skip_inline_frames): Adjust to std::vector.
9215
9216 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9217
9218 * tracepoint.h (struct trace_state_variable): Add constructor.
9219 <name>: Change type to std::string.
9220 * tracepoint.c (tsv_s): Remove.
9221 (DEF_VEC_O(tsv_s)): Remove.
9222 (tvariables): Change to std::vector.
9223 (create_trace_state_variable): Adjust to std::vector.
9224 (find_trace_state_variable): Likewise.
9225 (find_trace_state_variable_by_number): Likewise.
9226 (delete_trace_state_variable): Likewise.
9227 (trace_variable_command): Adjust to std::string.
9228 (delete_trace_variable_command): Likewise.
9229 (tvariables_info_1): Adjust to std::vector.
9230 (save_trace_state_variables): Likewise.
9231 (start_tracing): Likewise.
9232 (merge_uploaded_trace_state_variables): Adjust to std::vector
9233 and std::string.
9234 * target.h (struct target_ops)
9235 <to_download_trace_state_variable>: Pass reference to
9236 trace_state_variable.
9237 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9238 * target-delegates.c: Re-generate.
9239 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9240 (mi_tsv_deleted): Likewise.
9241 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9242 * remote.c (remote_download_trace_state_variable): Change
9243 pointer to reference and adjust.
9244 * make-target-delegates (parse_argtypes): Handle references.
9245 (write_function_header): Likewise.
9246 (munge_type): Likewise.
9247
9248 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9249
9250 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9251 string_view-selftests.c.
9252 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9253 testsuite.
9254 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9255 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9256 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9257 * unittests/basic_string_view/element_access/char/1.cc:
9258 Likewise.
9259 * unittests/basic_string_view/element_access/char/empty.cc:
9260 Likewise.
9261 * unittests/basic_string_view/element_access/char/front_back.cc:
9262 Likewise.
9263 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9264 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9265 Likewise.
9266 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9267 Likewise.
9268 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9269 Likewise.
9270 * unittests/basic_string_view/operations/compare/char/1.cc:
9271 Likewise.
9272 * unittests/basic_string_view/operations/compare/char/13650.cc:
9273 Likewise.
9274 * unittests/basic_string_view/operations/copy/char/1.cc:
9275 Likewise.
9276 * unittests/basic_string_view/operations/data/char/1.cc:
9277 Likewise.
9278 * unittests/basic_string_view/operations/find/char/1.cc:
9279 Likewise.
9280 * unittests/basic_string_view/operations/find/char/2.cc:
9281 Likewise.
9282 * unittests/basic_string_view/operations/find/char/3.cc:
9283 Likewise.
9284 * unittests/basic_string_view/operations/find/char/4.cc:
9285 Likewise.
9286 * unittests/basic_string_view/operations/rfind/char/1.cc:
9287 Likewise.
9288 * unittests/basic_string_view/operations/rfind/char/2.cc:
9289 Likewise.
9290 * unittests/basic_string_view/operations/rfind/char/3.cc:
9291 Likewise.
9292 * unittests/basic_string_view/operations/substr/char/1.cc:
9293 Likewise.
9294 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9295 * unittests/string_view-selftests.c: New file.
9296
9297 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9298
9299 * unittests/basic_string_view/capacity/1.cc: New file.
9300 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9301 * unittests/basic_string_view/cons/char/1.cc: New file.
9302 * unittests/basic_string_view/cons/char/2.cc: New file.
9303 * unittests/basic_string_view/cons/char/3.cc: New file.
9304 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9305 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9306 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9307 * unittests/basic_string_view/element_access/char/1.cc: New file.
9308 * unittests/basic_string_view/element_access/char/2.cc: New file.
9309 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9310 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9311 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9312 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9313 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9314 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9315 * unittests/basic_string_view/include.cc: New file.
9316 * unittests/basic_string_view/inserters/char/1.cc: New file.
9317 * unittests/basic_string_view/inserters/char/2.cc: New file.
9318 * unittests/basic_string_view/inserters/char/3.cc: New file.
9319 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9320 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9321 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9322 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9323 * unittests/basic_string_view/literals/types.cc: New file.
9324 * unittests/basic_string_view/literals/values.cc: New file.
9325 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9326 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9327 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9328 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9329 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9330 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9331 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9332 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9333 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9334 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9335 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9336 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9337 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9338 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9339 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9340 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9341 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9342 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9343 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9344 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9345 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9346 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9347 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9348 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9349 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9350 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9351 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9352 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9353 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9354 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9355 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9356 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9357 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9358 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9359 * unittests/basic_string_view/operators/char/2.cc: New file.
9360 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9361 * unittests/basic_string_view/range_access/char/1.cc: New file.
9362 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9363 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9364 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9365 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9366 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9367 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9368 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9369 * unittests/basic_string_view/typedefs.cc: New file.
9370 * unittests/basic_string_view/types/1.cc: New file.
9371
9372 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9373
9374 * common/gdb_string_view.h: Remove libstdc++ implementation
9375 details, adjust to gdb reality.
9376 * common/gdb_string_view.tcc: Likewise.
9377 * cli/cli-script.c (struct string_view): Remove.
9378 (user_args) <m_args>: Change element type to gdb::string_view.
9379 (user_args::insert_args): Adjust.
9380
9381 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9382
9383 * common/gdb_string_view.h: New file.
9384 * common/gdb_string_view.tcc: New file.
9385
9386 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9387
9388 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9389 * configure: Re-generate.
9390
9391 2018-04-09 Pedro Alves <palves@redhat.com>
9392
9393 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9394 (set_target_gdbarch): Call
9395 gdb::observers::architecture_changed.notify instead of
9396 observer_notify_architecture_changed.
9397
9398 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9399
9400 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9401 (do_restore_current_traceframe_cleanup): Remove.
9402 (restore_current_traceframe_cleanup_dtor): Remove.
9403 (make_cleanup_restore_current_traceframe): Remove.
9404 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9405 New.
9406 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9407 * infrun.c (fetch_inferior_event): Use
9408 scoped_restore_current_traceframe.
9409
9410 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9411
9412 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9413 Remove.
9414 <n_allocated_type_units>: Remove.
9415 <all_type_units>: Change to std::vector.
9416 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9417 to std::vector change.
9418 (dwarf2_per_objfile::get_cutu): Likewise.
9419 (dwarf2_per_objfile::get_tu): Likewise.
9420 (create_signatured_type_table_from_index): Likewise.
9421 (create_signatured_type_table_from_debug_names): Likewise.
9422 (dw2_symtab_iter_next): Likewise.
9423 (dw2_print_stats): Likewise.
9424 (dw2_expand_all_symtabs): Likewise.
9425 (dw2_expand_marked_cus): Likewise.
9426 (dw2_debug_names_iterator::next): Likewise.
9427 (dwarf2_initialize_objfile): Likewise.
9428 (add_signatured_type_cu_to_table): Likewise.
9429 (create_all_type_units): Likewise.
9430 (add_type_unit): Likewise.
9431 (struct tu_abbrev_offset): Add constructor.
9432 (build_type_psymtabs_1): Adjust to std::vector change.
9433 (print_tu_stats): Likewise.
9434 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9435 (write_debug_names): Likewise.
9436
9437 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9438
9439 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9440 Make an std::vector.
9441 <n_comp_units>: Remove.
9442 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9443 to std::vector change.
9444 (dwarf2_per_objfile::get_cutu): Likewise.
9445 (dwarf2_per_objfile::get_cu): Likewise.
9446 (create_cus_from_index): Likewise.
9447 (create_addrmap_from_index): Likewise.
9448 (create_addrmap_from_aranges): Likewise.
9449 (dwarf2_read_index): Likewise.
9450 (dw2_find_last_source_symtab): Likewise.
9451 (dw2_map_symtabs_matching_filename): Likewise.
9452 (dw2_symtab_iter_next): Likewise.
9453 (dw2_print_stats): Likewise.
9454 (dw2_expand_all_symtabs): Likewise.
9455 (dw2_expand_symtabs_with_fullname): Likewise.
9456 (dw2_expand_marked_cus): Likewise.
9457 (dw2_map_symbol_filenames): Likewise.
9458 (create_cus_from_debug_names): Likewise.
9459 (dwarf2_read_debug_names): Likewise.
9460 (dw2_debug_names_iterator::next): Likewise.
9461 (dwarf2_initialize_objfile): Likewise.
9462 (set_partial_user): Likewise.
9463 (dwarf2_build_psymtabs_hard): Likewise.
9464 (read_comp_units_from_section): Remove arguments, adjust to
9465 std::vector change.
9466 (create_all_comp_units): Adjust to std::vector and
9467 read_comp_units_from_section changes.
9468 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9469 change.
9470 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9471 (psyms_seen_size): Likewise.
9472 (write_gdbindex): Likewise.
9473 (write_debug_names): Likewise.
9474
9475 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9476
9477 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9478 with dwarf2_per_objfile.
9479 (create_cus_from_index): Likewise.
9480 (create_signatured_type_table_from_index): Likewise.
9481 (dwarf2_read_index): Likewise.
9482 (dwarf2_initialize_objfile): Likewise.
9483 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9484 per_cu rather than get_dwarf2_per_objfile.
9485
9486 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9487
9488 * dwarf2read.h (struct signatured_type): Forward declare.
9489 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9490 New methods.
9491 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9492 (dw2_get_cutu): ...this.
9493 (dwarf2_per_objfile::get_cu): Rename from...
9494 (dw2_get_cu): ...this.
9495 (dwarf2_per_objfile::get_tu): New.
9496 (create_addrmap_from_index): Adjust.
9497 (create_addrmap_from_aranges): Adjust.
9498 (dw2_find_last_source_symtab): Adjust.
9499 (dw2_map_symtabs_matching_filename): Adjust.
9500 (dw2_symtab_iter_next): Adjust.
9501 (dw2_print_stats): Adjust.
9502 (dw2_expand_all_symtabs): Adjust.
9503 (dw2_expand_symtabs_with_fullname): Adjust.
9504 (dw2_expand_marked_cus): Adjust.
9505 (dw_expand_symtabs_matching_file_matcher): Adjust.
9506 (dw2_map_symbol_filenames): Adjust.
9507 (dw2_debug_names_iterator::next): Adjust.
9508 (dwarf2_initialize_objfile): Adjust.
9509 (set_partial_user): Adjust.
9510 (dwarf2_build_psymtabs_hard): Adjust.
9511
9512 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9513
9514 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9515 Remove unused variables.
9516 (dw2_map_symtabs_matching_filename): Likewise.
9517 (dwarf2_record_block_ranges): Likewise.
9518 (dwarf2_read_addr_index): Likewise.
9519 (follow_die_offset): Likewise.
9520
9521 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9522
9523 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9524 to symbol_file_add_main.
9525
9526 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9527
9528 PR mi/22299
9529 * mi/mi-console.c (do_fputc_async_safe): New.
9530 (mi_console_file::write_async_safe): New.
9531 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9532 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9533 New.
9534 * ui-file.c (ui_file::putstrn): Adjust call to
9535 fputstrn_unfiltered.
9536 * utils.c (printchar): Replace do_fputs and do_fprintf
9537 parameters by do_fputc.
9538 (fputstr_filtered): Adjust call to printchar.
9539 (fputstr_unfiltered): Likewise.
9540 (fputstrn_filtered): Likewise.
9541 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9542 printchar.
9543 * utils.h (do_fputc_ftype): New typedef.
9544 (fputstrn_unfiltered): Add do_fputc parameter.
9545
9546 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9547
9548 * regformats/i386/i386-avx.dat: Remove.
9549
9550 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9551
9552 PR gdb/22979
9553 * amd64-tdep.c (amd64_none_init_abi): New function.
9554 (amd64_x32_none_init_abi): New function.
9555 (_initialize_amd64_tdep): Register handlers for x86-64 and
9556 x64_32 with GDB_OSABI_NONE.
9557 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9558 GDB_OSABI_NONE osabi.
9559
9560 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9561
9562 PR gdb/22980
9563 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9564 GDB_OSABI_NONE.
9565 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9566 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9567
9568 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9569
9570 * common/byte-vector.h (char_vector): New type.
9571 * target.h (target_read_alloc): Return
9572 gdb::optional<byte_vector>.
9573 (target_read_stralloc): Return gdb::optional<char_vector>.
9574 (target_get_osdata): Return gdb::optional<char_vector>.
9575 * target.c (target_read_alloc_1): Templatize. Replacement
9576 manual memory management with vector.
9577 (target_read_alloc): Change return type, adjust.
9578 (target_read_stralloc): Change return type, adjust.
9579 (target_get_osdata): Change return type, adjust.
9580 * auxv.c (struct auxv_info) <length>: Remove.
9581 <data>: Change type to gdb::optional<byte_vector>.
9582 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9583 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9584 (target_auxv_search): Adjust.
9585 (fprint_target_auxv): Adjust.
9586 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9587 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9588 (linux_make_corefile_notes): Adjust.
9589 * osdata.c (get_osdata): Adjust.
9590 * remote.c (remote_get_threads_with_qxfer): Adjust.
9591 (remote_memory_map): Adjust.
9592 (remote_traceframe_info): Adjust.
9593 (btrace_read_config): Adjust.
9594 (remote_read_btrace): Adjust.
9595 (remote_pid_to_exec_file): Adjust.
9596 * solib-aix.c (solib_aix_get_library_list): Adjust.
9597 * solib-dsbt.c (decode_loadmap): Don't free buf.
9598 (dsbt_get_initial_loadmaps): Adjust.
9599 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9600 * solib-target.c (solib_target_current_sos): Adjust.
9601 * tracepoint.c (sdata_make_value): Adjust.
9602 * xml-support.c (xinclude_start_include): Adjust.
9603 (xml_fetch_content_from_file): Adjust.
9604 * xml-support.h (xml_fetch_another): Change return type.
9605 (xml_fetch_content_from_file): Change return type.
9606 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9607 * xml-tdesc.c (file_read_description_xml): Adjust.
9608 (fetch_available_features_from_target): Change return type.
9609 (target_fetch_description_xml): Adjust.
9610 (target_read_description_xml): Adjust.
9611
9612 2018-04-06 Tom Tromey <tom@tromey.com>
9613
9614 * value.c (~value): Update.
9615 (struct value) <contents>: Now unique_xmalloc_ptr.
9616 (value_contents_bits_eq, allocate_value_contents)
9617 (value_contents_raw, value_contents_all_raw)
9618 (value_contents_for_printing, value_contents_for_printing_const)
9619 (set_value_enclosing_type): Update.
9620
9621 2018-04-06 Tom Tromey <tom@tromey.com>
9622
9623 * value.c (range_s): Remove typedef, VEC.
9624 (struct range): Add operator<.
9625 (range_lessthan): Remove.
9626 (ranges_contain): Change type.
9627 (~value): Update.
9628 (struct value) <unavailable, optimized_out>: Now std::vector.
9629 (value_entirely_available)
9630 (value_entirely_covered_by_range_vector)
9631 (value_entirely_unavailable, value_entirely_optimized_out):
9632 Update.
9633 (insert_into_bit_range_vector): Change argument type.
9634 (find_first_range_overlap): Likewise.
9635 (struct ranges_and_idx, value_contents_bits_eq)
9636 (require_not_optimized_out, require_available): Update.
9637 (ranges_copy_adjusted): Change argument types.
9638 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9639
9640 2018-04-06 Tom Tromey <tom@tromey.com>
9641
9642 * value.c (~value): Update.
9643 (struct value) <parent>: Now a value_ref_ptr.
9644 (value_parent, set_value_parent, value_address, value_copy):
9645 Update.
9646
9647 2018-04-06 Tom Tromey <tom@tromey.com>
9648
9649 * value.c (struct value): Add constructor, destructor, and member
9650 initializers.
9651 (allocate_value_lazy, value_decref): Update.
9652
9653 2018-04-06 Tom Tromey <tom@tromey.com>
9654
9655 * value.c (struct value) <released, next>: Remove.
9656 (all_values): Now a std::vector.
9657 (allocate_value_lazy): Update.
9658 (value_next): Remove.
9659 (value_mark, value_free_to_mark, release_value)
9660 (value_release_to_mark): Update.
9661
9662 2018-04-06 Tom Tromey <tom@tromey.com>
9663
9664 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9665 (free_value_chain): Remove.
9666 * value.c (free_value_chain): Remove.
9667 (value_release_to_mark): Return a std::vector.
9668 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9669 std::vector.
9670 (check_condition): Update.
9671 * eval.c (fetch_subexp_value): Change "val_chain" to a
9672 std::vector.
9673 * breakpoint.c (update_watchpoint): Update.
9674 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9675
9676 2018-04-06 Tom Tromey <tom@tromey.com>
9677
9678 * value.h (free_all_values): Remove.
9679 * value.c (free_all_values): Remove.
9680
9681 2018-04-06 Tom Tromey <tom@tromey.com>
9682
9683 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9684 (value_history_chain, value_history_count): Remove.
9685 (value_history): New global.
9686 (record_latest_value, access_value_history, show_values)
9687 (preserve_values): Update.
9688
9689 2018-04-06 Tom Tromey <tom@tromey.com>
9690
9691 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9692 * varobj.c (varobj_set_display_format, varobj_set_value)
9693 (install_default_visualizer, construct_visualizer)
9694 (install_new_value, ~varobj, varobj_get_value_type)
9695 (my_value_of_variable, varobj_editable_p): Update.
9696 * c-varobj.c (c_describe_child, c_value_of_variable)
9697 (cplus_number_of_children, cplus_describe_child): Update.
9698 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9699 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9700 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9701
9702 2018-04-06 Tom Tromey <tom@tromey.com>
9703
9704 * printcmd.c (last_examine_address): Change type to
9705 value_ref_ptr.
9706 (do_examine, x_command): Update.
9707
9708 2018-04-06 Tom Tromey <tom@tromey.com>
9709
9710 * value.c (release_value): Update.
9711 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9712 (struct bpstats) <val>: Now a value_ref_ptr.
9713 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9714 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9715 (~watchpoint, print_it_watchpoint, watch_command_1)
9716 (invalidate_bp_value_on_memory_change): Update.
9717
9718 2018-04-06 Tom Tromey <tom@tromey.com>
9719
9720 * varobj.c (varobj_clear_saved_item)
9721 (update_dynamic_varobj_children, install_new_value, ~varobj):
9722 Update.
9723 * value.h (value_incref): Move declaration earlier.
9724 (value_decref): Rename from value_free.
9725 (struct value_ref_policy): New.
9726 (value_ref_ptr): New typedef.
9727 (struct value_deleter): Remove.
9728 (gdb_value_up): Remove typedef.
9729 (release_value): Change return type.
9730 (release_value_or_incref): Remove.
9731 * value.c (set_value_parent): Update.
9732 (value_incref): Change return type.
9733 (value_decref): Rename from value_free.
9734 (value_free_to_mark, free_all_values, free_value_chain): Update.
9735 (release_value): Return value_ref_ptr.
9736 (release_value_or_incref): Remove.
9737 (record_latest_value, set_internalvar, clear_internalvar):
9738 Update.
9739 * stack.c (info_frame_command): Don't call value_free.
9740 * python/py-value.c (valpy_dealloc, valpy_new)
9741 (value_to_value_object): Update.
9742 * printcmd.c (do_examine): Update.
9743 * opencl-lang.c (lval_func_free_closure): Update.
9744 * mi/mi-main.c (register_changed_p): Don't call value_free.
9745 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9746 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9747 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9748 value_free.
9749 * guile/scm-value.c (vlscm_free_value_smob)
9750 (vlscm_scm_from_value): Update.
9751 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9752 (frame_unwind_register_unsigned, get_frame_register_bytes)
9753 (put_frame_register_bytes): Don't call value_free.
9754 * findvar.c (address_from_register): Don't call value_free.
9755 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9756 * dwarf2loc.c (entry_data_value_free_closure)
9757 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9758 (dwarf2_evaluate_loc_desc_full): Update.
9759 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9760 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9761 (~watchpoint, watch_command_1)
9762 (invalidate_bp_value_on_memory_change): Update.
9763 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9764
9765 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9766
9767 PR gdb/23022
9768 * warning.m4: Add -Wno-error=deprecated-register.
9769 * configure: Re-generate.
9770
9771 2018-04-05 Tom Tromey <tom@tromey.com>
9772
9773 * linespec.h: Remove include of "vec.h".
9774
9775 2018-04-05 Tom Tromey <tom@tromey.com>
9776
9777 * linespec.c (typep): Remove typedef.
9778 (find_methods, find_superclass_methods): Take a std::vector.
9779 (find_method): Use std::vector.
9780
9781 2018-04-05 Tom Tromey <tom@tromey.com>
9782
9783 * utils.c (compare_strings): Remove.
9784 * utils.h (compare_strings): Remove.
9785 * objc-lang.h (find_imps): Update.
9786 * objc-lang.c (find_methods): Take a std::vector.
9787 (uniquify_strings, find_imps): Likewise.
9788 * linespec.c (find_methods): Take a std::vector.
9789 (decode_objc): Use std::vector.
9790 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9791 a std::vector.
9792 (find_method, find_function_symbols): Use std::vector.
9793
9794 2018-04-05 Tom Tromey <tom@tromey.com>
9795
9796 * completer.c (completion_tracker::completion_tracker): Remove
9797 cast.
9798 (completion_tracker::discard_completions): Likewise.
9799 * breakpoint.c (ambiguous_names_p): Remove cast.
9800 * ada-lang.c (_initialize_ada_language): Remove cast.
9801 * utils.h (streq): Update.
9802 (streq_hash): Add new declaration.
9803 * utils.c (streq): Return bool.
9804 (streq_hash): New function.
9805
9806 2018-04-05 Tom Tromey <tom@tromey.com>
9807
9808 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9809 Remove a string copy.
9810
9811 2018-04-05 Tom Tromey <tom@tromey.com>
9812
9813 * linespec.c (filter_results): Use std::vector.
9814 (decode_line_2, decode_line_full): Update.
9815
9816 2018-04-05 Tom Tromey <tom@tromey.com>
9817
9818 * linespec.c (canonical_to_fullform): Return std::string.
9819 (filter_results): Update.
9820 (struct decode_line_2_item): Add constructor.
9821 <fullform, displayform>: Now std::string.
9822 (decode_line_2_compare_items): Now a std::sort comparator.
9823 (decode_line_2): Update.
9824
9825 2018-04-05 Tom Tromey <tom@tromey.com>
9826
9827 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9828 (unexpected_linespec_error): Update.
9829 (linespec_parse_basic, parse_linespec): Update.
9830
9831 2018-04-05 Tom Tromey <tom@tromey.com>
9832
9833 * linespec.c (linespec_parse_basic): Reindent.
9834
9835 2018-04-05 Tom Tromey <tom@tromey.com>
9836
9837 * minsyms.h (iterate_over_minimal_symbols): Update.
9838 * minsyms.c (iterate_over_minimal_symbols): Take a
9839 gdb::function_view.
9840 * linespec.c (struct collect_minsyms): Remove.
9841 (compare_msyms): Now a std::sort comparator.
9842 (add_minsym): Add parameters.
9843 (search_minsyms_for_name): Update. Use std::vector.
9844
9845 2018-04-03 Tom Tromey <tom@tromey.com>
9846
9847 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9848 gdb::byte_vector.
9849
9850 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9851
9852 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9853
9854 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9855
9856 PR gdb/16959
9857 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9858 printing static type.
9859
9860 2018-04-01 Tom Tromey <tom@tromey.com>
9861
9862 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9863 (rs6000_xfer_shared_libraries): Update.
9864
9865 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9866
9867 * common/gdb_vecs.h (char_ptr): Remove.
9868 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9869
9870 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9871
9872 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9873 with std::vector.
9874 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9875
9876 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9877
9878 * tracepoint.h (struct uploaded_tp): Initialize fields.
9879 <actions, step_actions, cmd_strings>: Change type to
9880 std::vector<char *>.
9881 * tracepoint.c (get_uploaded_tp): Allocate with new.
9882 (free_uploaded_tps): Free with delete.
9883 (parse_tracepoint_definition): Adjust to std::vector change.
9884 * breakpoint.c (read_uploaded_action): Likewise.
9885 (create_tracepoint_from_upload): Likewise.
9886 * ctf.c (ctf_write_uploaded_tp): Likewise.
9887 (SET_ARRAY_FIELD): Likewise.
9888 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9889
9890 2018-03-30 Tom Tromey <tom@tromey.com>
9891
9892 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9893 std::unique_ptr.
9894 (svr4_keep_data_in_core): Update.
9895 (svr4_read_so_list): Update.
9896
9897 2018-03-30 Tom Tromey <tom@tromey.com>
9898
9899 * windows-nat.c (handle_output_debug_string, handle_exception):
9900 Update.
9901 * target.h (target_read_string): Update.
9902 * target.c (target_read_string): Change "string" to
9903 unique_xmalloc_ptr.
9904 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9905 Update.
9906 * solib-frv.c (frv_current_sos): Update.
9907 * solib-dsbt.c (dsbt_current_sos): Update.
9908 * solib-darwin.c (darwin_current_sos): Update.
9909 * linux-thread-db.c (inferior_has_bug): Update.
9910 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9911 Update. Remove alloca.
9912 * ada-lang.c (ada_main_name): Update.
9913
9914 2018-03-30 Tom Tromey <tom@tromey.com>
9915
9916 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9917 (struct dwo_file_deleter): New.
9918 (dwo_file_up): New typedef.
9919 (open_and_init_dwo_file): Use dwo_file_up.
9920 (free_dwo_file_cleanup): Remove.
9921
9922 2018-03-30 Tom Tromey <tom@tromey.com>
9923
9924 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9925 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9926
9927 2018-03-30 Tom Tromey <tom@tromey.com>
9928
9929 * dwarf2read.c (class free_cached_comp_units): New class.
9930 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9931 (free_cached_comp_units): Remove function.
9932
9933 2018-03-30 Tom Tromey <tom@tromey.com>
9934
9935 * utils.h (make_cleanup_unpush_target): Remove.
9936 * inf-ptrace.c (struct target_unpusher): New.
9937 (target_unpush_up) New typedef.
9938 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9939 target_unpush_up.
9940 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9941
9942 2018-03-27 Tom Tromey <tom@tromey.com>
9943
9944 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9945
9946 2018-03-27 Pedro Alves <palves@redhat.com>
9947 Tom Tromey <tom@tromey.com>
9948
9949 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9950 destructor. Now a class.
9951 (gdb_readline_wrapper_cleanup): Remove function.
9952 (gdb_readline_wrapper): Remove cleanups.
9953
9954 2018-03-27 Tom Tromey <tom@tromey.com>
9955
9956 * typeprint.h (struct type_print_options) <local_typedefs,
9957 global_typedefs>: Remove "struct" keyword.
9958 (class typedef_hash_table): New class.
9959 (recursively_update_typedef_hash, add_template_parameters)
9960 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9961 (find_typedef_in_hash): Don't declare.
9962 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9963 (typedef_hash_table::recursively_update): Rename from
9964 recursively_update_typedef_hash. Now a member.
9965 (typedef_hash_table::add_template_parameters): Rename from
9966 add_template_parameters. Now a member.
9967 (typedef_hash_table::typedef_hash_table): Now a constructor;
9968 rename from create_typedef_hash.
9969 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9970 rename from free_typedef_hash.
9971 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9972 (do_free_global_table): Remove.
9973 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9974 from copy_type_recursive.
9975 (create_global_typedef_table): Remove.
9976 (typedef_hash_table::find_global_typedef): Now a member of
9977 typedef_hash_table.
9978 (typedef_hash_table::find_typedef): Rename from
9979 find_typedef_in_hash; now a member.
9980 (whatis_exp): Update.
9981 * extension.h (struct ext_lang_type_printers): Add constructor and
9982 destructor.
9983 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9984 declare.
9985 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9986 Now a constructor; rename from start_ext_lang_type_printers.
9987 (ext_lang_type_printers): Now a destructor; rename from
9988 free_ext_lang_type_printers.
9989 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9990 Update.
9991 (c_type_print_base_struct_union): Update. Remove cleanups.
9992
9993 2018-03-27 Tom Tromey <tom@tromey.com>
9994
9995 * dwarf-index-write.c: Include <cmath>.
9996
9997 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9998
9999 * NEWS: Add entry describing new "set|show varsize-limit" command.
10000 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10001 command.
10002 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10003 "set variable".
10004
10005 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10006
10007 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10008 dwarf-index-write.c
10009 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10010 * dwarf-index-common.c: New file.
10011 * dwarf-index-common.h: New file.
10012 * dwarf-index-write.c: New file.
10013 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10014 (struct dwarf2_section_info): Move from here.
10015 (dwarf2_section_info_def): Likewise.
10016 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10017 (offset_type): Likewise.
10018 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10019 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10020 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10021 (byte_swap): Likewise.
10022 (MAYBE_SWAP): Likewise.
10023 (dwarf2_per_cu_ptr): Likewise.
10024 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10025 (struct tu_stats): Likewise.
10026 (struct dwarf2_per_objfile): Likewise.
10027 (struct dwarf2_per_cu_data): Likewise.
10028 (struct signatured_type): Likewise.
10029 (sig_type_ptr): Likewise.
10030 (DEF_VEC_P (sig_type_ptr)): Likewise.
10031 (INDEX4_SUFFIX): Likewise.
10032 (INDEX5_SUFFIX): Likewise.
10033 (DEBUG_STR_SUFFIX): Likewise.
10034 (dwarf2_read_section): Make non-static.
10035 (mapped_index_string_hash): Move from here.
10036 (dwarf5_djb_hash): Likewise.
10037 (file_write): Likewise.
10038 (class data_buf): Likewise.
10039 (struct symtab_index_entry): Likewise.
10040 (struct mapped_symtab): Likewise.
10041 (find_slot): Likewise.
10042 (hash_expand): Likewise.
10043 (add_index_entry): Likewise.
10044 (uniquify_cu_indices): Likewise.
10045 (class c_str_view): Likewise.
10046 (class c_str_view_hasher): Likewise.
10047 (class vector_hasher): Likewise.
10048 (write_hash_table): Likewise.
10049 (psym_index_map): Likewise.
10050 (struct addrmap_index_data): Likewise.
10051 (add_address_entry): Likewise.
10052 (add_address_entry_worker): Likewise.
10053 (write_address_map): Likewise.
10054 (symbol_kind): Likewise.
10055 (write_psymbols): Likewise.
10056 (struct signatured_type_index_data): Likewise.
10057 (write_one_signatured_type): Likewise.
10058 (recursively_count_psymbols): Likewise.
10059 (recursively_write_psymbols): Likewise.
10060 (class debug_names): Likewise.
10061 (check_dwarf64_offsets): Likewise.
10062 (psyms_seen_size): Likewise.
10063 (write_gdbindex): Likewise.
10064 (write_debug_names): Likewise.
10065 (assert_file_size): Likewise.
10066 (write_psymtabs_to_index): Likewise.
10067 (save_gdb_index_command): Likewise.
10068 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10069 command.
10070 * dwarf2read.h: New file.
10071
10072 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10073
10074 PR gdb/22670
10075 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10076 symbol name if the CU's language stores symbol names in linkage
10077 format.
10078 * language.h (struct language_defn)
10079 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10080 all instances of this struct.
10081
10082 2018-03-26 Tom Tromey <tom@tromey.com>
10083
10084 * stack.c (backtrace_command_1): Remove verbose code.
10085
10086 2018-03-26 Tom Tromey <tom@tromey.com>
10087
10088 * python/py-framefilter.c (py_print_type): Don't catch
10089 exceptions. Return void.
10090 (py_print_value): Likewise.
10091 (py_print_single_arg): Likewise.
10092 (enumerate_args): Don't catch exceptions.
10093 (py_print_args): Likewise.
10094 (py_print_frame): Likewise.
10095 (gdbpy_apply_frame_filter): Catch exceptions here.
10096
10097 2018-03-26 Tom Tromey <tom@tromey.com>
10098
10099 * stack.c (_initialize_stack): Remove trailing newlines from help
10100 text. Add "Usage" line to "backtrace" help.
10101
10102 2018-03-26 Tom Tromey <tom@tromey.com>
10103
10104 PR python/16486:
10105 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10106
10107 2018-03-26 Tom Tromey <tom@tromey.com>
10108
10109 * python/py-framefilter.c (py_print_single_arg): Return
10110 EXT_LANG_BT_ERROR from catch.
10111
10112 2018-03-26 Tom Tromey <tom@tromey.com>
10113
10114 PR backtrace/15584:
10115 * stack.c (backtrace_command_1): Move some code into no-filters
10116 "if".
10117
10118 2018-03-26 Tom Tromey <tom@tromey.com>
10119
10120 * python/py-framefilter.c (throw_quit_or_print_exception): New
10121 function.
10122 (gdbpy_apply_frame_filter): Use it.
10123
10124 2018-03-26 Tom Tromey <tom@tromey.com>
10125
10126 PR cli/17716:
10127 * python/py-framefilter.c (py_print_type, py_print_value)
10128 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10129 RETURN_MASK_ERROR.
10130
10131 2018-03-26 Tom Tromey <tom@tromey.com>
10132
10133 * python/py-framefilter.c (enumerate_args): Use
10134 gdb::unique_xmalloc_ptr.
10135
10136 2018-03-26 Tom Tromey <tom@tromey.com>
10137
10138 * python/py-framefilter.c (py_print_frame): Return
10139 EXT_LANG_BT_OK.
10140 (gdbpy_apply_frame_filter): Update comment.
10141 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10142 Remove.
10143 <EXT_LANG_BT_NO_FILTERS>: Change value.
10144
10145 2018-03-26 Tom Tromey <tom@tromey.com>
10146
10147 PR backtrace/15582:
10148 * stack.c (backtrace_command): Parse "hide" argument.
10149 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10150 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10151 constant.
10152
10153 2018-03-26 Tom Tromey <tom@tromey.com>
10154
10155 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10156 add "flags".
10157 (backtrace_command): Remove "fulltrace", add "flags".
10158
10159 2018-03-26 Tom Tromey <tom@tromey.com>
10160
10161 * stack.c (backtrace_command): Rewrite command line parsing.
10162
10163 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10164
10165 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10166
10167 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10168
10169 * filename-seen-cache.h: Add include guard.
10170
10171 2018-03-26 Keith Seitz <keiths@redhat.com>
10172
10173 * symfile.c (place_section): Remove "struct" from section_addr_info
10174 in comment.
10175 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10176 "struct" keyword from section_addr_info.
10177
10178 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10179
10180 * regformats/regdef.h (reg): Add constructors.
10181
10182 2018-03-25 Pedro Alves <palves@redhat.com>
10183
10184 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10185 if then/else bodies in var_func_name extraction.
10186
10187 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10188
10189 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10190 lookup_minimal_symbol() to find symbol entry.
10191 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10192
10193 2018-03-23 Keith Seitz <keiths@redhat.com>
10194
10195 PR c++/22968
10196 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10197 nested type definitions for C++, too.
10198
10199 2018-03-23 Tom Tromey <tom@tromey.com>
10200
10201 * machoread.c (struct oso_el): Add a constructor. Don't define as
10202 a typedef.
10203 (macho_register_oso): Remove.
10204 (macho_symtab_read): Take a std::vector.
10205 (oso_el_compare_name): Now a std::sort comparator.
10206 (macho_symfile_read_all_oso): Take a std::vector.
10207 (macho_symfile_read): Use std::vector. Remove cleanups.
10208
10209 2018-03-22 Tom Tromey <tom@tromey.com>
10210
10211 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10212 (record_full_goto_bookmark): Use std::string.
10213
10214 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10215
10216 PR tdep/18295
10217 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10218 a single mask.
10219
10220 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10221
10222 * rs6000-tdep.c (store_insn_p): New function.
10223 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10224 and cr_reg to their unshifted values. Use store_insn_p to
10225 match LR saves using either R1 or fdata->alloca_reg. Use
10226 store_insn_p to match CR saves. Set alloca_reg_offset
10227 when alloca_reg and framep are set. Remove lr_reg shift
10228 when assigning to fdata->lr_register.
10229
10230 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10231
10232 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10233 command line args instead of emitting a warning.
10234
10235 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10236
10237 * tracepoint.h (struct static_tracepoint_marker): Initialize
10238 fields, define default constructor, move constructor and move
10239 assignment, disable the rest.
10240 <str_id, extra>: Make std::string.
10241 (release_static_tracepoint_marker): Remove.
10242 (free_current_marker): Remove.
10243 * tracepoint.c (free_current_marker): Remove.
10244 (parse_static_tracepoint_marker_definition): Adjust to
10245 std::string, use new hex2str overload.
10246 (release_static_tracepoint_marker): Remove.
10247 (print_one_static_tracepoint_marker): Get marker by reference
10248 and adjust to std::string.
10249 (info_static_tracepoint_markers_command): Adjust to std::vector
10250 changes
10251 * target.h (static_tracepoint_marker_p): Remove typedef.
10252 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10253 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10254 bool.
10255 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10256 * target-debug.h
10257 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10258 (target_debug_print_std_vector_static_tracepoint_marker): New.
10259 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10260 to...
10261 (target_debug_print_static_tracepoint_marker_p): ... this.
10262 * target-delegates.c: Re-generate.
10263 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10264 Make std::string.
10265 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10266 (decode_static_tracepoint_spec): Adjust to std::vector.
10267 (tracepoint_print_one_detail): Adjust to std::string.
10268 (strace_marker_decode_location): Adjust to std::string.
10269 (update_static_tracepoint): Adjust to std::string, remove call
10270 to release_static_tracepoint_marker.
10271 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10272 Adjust to std::vector.
10273 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10274 (remote_static_tracepoint_markers_by_strid): Adjust to
10275 std::vector.
10276 * common/rsp-low.h (hex2str): New overload with explicit count
10277 of bytes.
10278 * common/rsp-low.c (hex2str): New overload with explicit count
10279 of bytes.
10280 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10281 (_initialize_rsp_low_selftests): Add test_hex2str test.
10282 * unittests/tracepoint-selftests.c
10283 (test_parse_static_tracepoint_marker_definition): Adjust to
10284 std::string.
10285
10286 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10287
10288 * tracepoint.c (parse_static_tracepoint_marker_definition):
10289 Consider case where the definition is followed by more
10290 definitions.
10291 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10292 tracepoint-selftests.c.
10293 * unittests/tracepoint-selftests.c: New.
10294
10295 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10296
10297 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10298 Carvalho.
10299
10300 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10301
10302 * symtab.c (find_pc_sect_line): fixed indentation.
10303
10304 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10305
10306 * symtab.c (find_pc_sect_line): now uses binary search.
10307
10308 2018-03-19 Tom Tromey <tom@tromey.com>
10309
10310 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10311 "IDENT" production.
10312
10313 2018-03-19 Pedro Alves <palves@redhat.com>
10314 Tom Tromey <tom@tromey.com>
10315
10316 * unittests/observable-selftests.c: New file.
10317 * common/observable.h: New file.
10318 * observable.h: New file.
10319 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10320 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10321 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10322 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10323 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10324 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10325 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10326 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10327 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10328 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10329 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10330 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10331 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10332 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10333 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10334 tui/tui-interp.c, valops.c: Update all users.
10335 * tui/tui-hooks.c (tui_bp_created_observer)
10336 (tui_bp_deleted_observer, tui_bp_modified_observer)
10337 (tui_inferior_exit_observer, tui_before_prompt_observer)
10338 (tui_normal_stop_observer, tui_register_changed_observer):
10339 Remove.
10340 (tui_observers_token): New global.
10341 (attach_or_detach, tui_attach_detach_observers): New functions.
10342 (tui_install_hooks, tui_remove_hooks): Use
10343 tui_attach_detach_observers.
10344 * record-btrace.c (record_btrace_thread_observer): Remove.
10345 (record_btrace_thread_observer_token): New global.
10346 * observer.sh: Remove.
10347 * observer.c: Rename to observable.c.
10348 * observable.c (namespace gdb_observers): Define new objects.
10349 (observer_debug): Move into gdb_observers namespace.
10350 (struct observer, struct observer_list, xalloc_observer_list_node)
10351 (xfree_observer_list_node, generic_observer_attach)
10352 (generic_observer_detach, generic_observer_notify): Remove.
10353 (_initialize_observer): Update.
10354 Don't include observer.inc.
10355 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10356 (clean mostlyclean): Likewise.
10357 (observer.h, observer.inc): Remove targets.
10358 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10359 (COMMON_SFILES): Use observable.c, not observer.c.
10360 * .gitignore: Remove observer.h.
10361
10362 2018-03-18 Tom Tromey <tom@tromey.com>
10363
10364 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10365 gdb::def_vector.
10366 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10367
10368 2018-03-17 Tom Tromey <tom@tromey.com>
10369
10370 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10371
10372 2018-03-17 Tom Tromey <tom@tromey.com>
10373
10374 * target.c (class scoped_target_fd): New.
10375 (target_fileio_close_cleanup): Remove.
10376 (target_fileio_read_alloc_1): Use scoped_target_fd.
10377
10378 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10379
10380 * silent-rules.mk: New.
10381 * Makefile.in: Include silent-rules.mk
10382 (srcdir, VPATH, top_srcdir): Move up.
10383 (COMPILE): Add ECHO_CXX.
10384 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10385 (init.c): Add ECHO_INIT_C.
10386 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10387 (version.c): Add ECHO_GEN.
10388 (printcmd.o): Add ECHO_CXX.
10389 (target-float.o): Add ECHO_CXX.
10390 (ada-exp.o): Add ECHO_CXX.
10391 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10392 (insight$(EXEEXT)): Add ECHO_CXXLD.
10393 * gnulib/configure.ac: Add AM_SILENT_RULES.
10394 * gnulib/aclocal.m4: Re-generate.
10395 * gnulib/configure: Re-generate.
10396 * gnulib/import/Makefile.in: Re-generate.
10397
10398 2018-03-16 Tom Tromey <tom@tromey.com>
10399
10400 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10401 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10402 * utils.c (do_free_section_addr_info)
10403 (make_cleanup_free_section_addr_info): Remove.
10404 * symfile.h (struct other_sections): Add constructor.
10405 (struct section_addr_info): Remove.
10406 (section_addr_info): New typedef.
10407 (struct sym_fns) <sym_offsets>: Change type of parameter.
10408 (build_section_addr_info_from_objfile)
10409 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10410 (default_symfile_offsets, symbol_file_add)
10411 (symbol_file_add_from_bfd)
10412 (build_section_addr_info_from_section_table): Update.
10413 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10414 * symfile.c (alloc_section_addr_info): Remove.
10415 (build_section_addr_info_from_section_table): Change return type.
10416 Update.
10417 (build_section_addr_info_from_bfd)
10418 (build_section_addr_info_from_objfile): Likewise.
10419 (free_section_addr_info): Remove.
10420 (relative_addr_info_to_section_offsets): Change type of "addrs".
10421 (addrs_section_compar): Now a std::sort comparator.
10422 (addrs_section_sort): Change return type.
10423 (addr_info_make_relative): Change type of "addrs". Update.
10424 (default_symfile_offsets, syms_from_objfile_1)
10425 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10426 (symbol_file_add_separate): Update.
10427 (symbol_file_add): Change type of "addrs". Update.
10428 (add_symbol_file_command): Update. Remove cleanups.
10429 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10430 cleanups.
10431 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10432 * solib.c (solib_read_symbols): Update.
10433 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10434 * machoread.c (macho_symfile_offsets): Update.
10435 * jit.c (jit_bfd_try_read_symtab): Update.
10436
10437 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10438
10439 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10440 unittests/utils-selftests.c.
10441 * unittests/utils-selftests.c: New file.
10442
10443 2018-03-14 Tom Tromey <tom@tromey.com>
10444
10445 PR cli/14977:
10446 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10447 for NULL.
10448
10449 2018-03-14 Tom Tromey <tom@tromey.com>
10450
10451 PR cli/19918:
10452 * printcmd.c (printf_pointer): Allow "-" in format.
10453
10454 2018-03-14 Tom Tromey <tom@tromey.com>
10455
10456 * printcmd.c (_initialize_printcmd): Add usage to printf.
10457
10458 2018-03-14 Yao Qi <qiyao@sourceware.org>
10459
10460 * MAINTAINERS: Update my email address.
10461
10462 2018-03-13 Tom Tromey <tom@tromey.com>
10463
10464 * machoread.c (macho_check_dsym): Change filenamep to a
10465 std::string*.
10466 (macho_symfile_read): Update.
10467 * symfile.c (load_command): Use std::string.
10468
10469 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10470
10471 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10472 to error message string.
10473 (riscv_register_name): Use xsnprintf instead of sprintf.
10474 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10475 internal_error.
10476 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10477 error.
10478 (riscv_push_dummy_call): Likewise.
10479
10480 2018-03-12 Tom Tromey <tom@tromey.com>
10481
10482 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10483 Use gdb::byte_vector.
10484 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10485
10486 2018-03-12 Yao Qi <yao.qi@linaro.org>
10487
10488 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10489 parameter type to readable_regcache.
10490 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10491 the declaration.
10492
10493 2018-03-11 Tom Tromey <tom@tromey.com>
10494
10495 * dwarf2read.c (struct nextfield): Add initializers.
10496 (struct nextfnfield): Remove.
10497 (struct fnfieldlist): Add initializers. Remove "length" and
10498 "head", use std::vector.
10499 (struct decl_field_list): Remove.
10500 (struct field_info): Add initializers.
10501 <fields, baseclasses>: Now std::vector.
10502 <nbaseclasses, nfnfields, typedef_field_list_count,
10503 nested_types_list_count>: Remove.
10504 (dwarf2_add_field, dwarf2_add_type_defn)
10505 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10506 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10507 (process_structure_scope): Update.
10508
10509 2018-03-11 Tom Tromey <tom@tromey.com>
10510
10511 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10512 for use by std::sort.
10513 (build_type_psymtabs_1): Use std::vector.
10514
10515 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10516
10517 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10518 and LIBMPFR in the printed configuration.
10519
10520 2018-03-08 Tom Tromey <tom@tromey.com>
10521
10522 * source.c (get_filename_and_charpos): Use scoped_fd.
10523 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10524 (procfs_pidlist): Likewise.
10525 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10526 (iterate_over_mappings): Likewise.
10527
10528 2018-03-08 Tom Tromey <tom@tromey.com>
10529
10530 * infcall.c (struct call_return_meta_info)
10531 <stack_temporaries_enabled>: Remove.
10532 (get_call_return_value, call_function_by_hand_dummy): Update.
10533 * thread.c (disable_thread_stack_temporaries): Remove.
10534 (enable_thread_stack_temporaries): Remove.
10535 (thread_stack_temporaries_enabled_p): Return bool.
10536 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10537 (get_last_thread_stack_temporary): Update.
10538 * eval.c (evaluate_subexp): Update.
10539 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10540 class, not a function.
10541 (value_ptr, value_vec): Remove typedefs.
10542 (class thread_info) <stack_temporaries_enabled>: Now bool.
10543 <stack_temporaries>: Now a std::vector.
10544 (thread_stack_temporaries_enabled_p)
10545 (value_in_thread_stack_temporaries): Return bool.
10546
10547 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10548
10549 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10550 (getpkt_or_notif_sane_1): Likewise.
10551
10552 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10553
10554 * build-id.c (build_id_to_debug_bfd): Use std::string.
10555
10556 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10557
10558 * build-id.c (find_separate_debug_file_by_buildid): Return
10559 std::string.
10560 * build-id.h (find_separate_debug_file_by_buildid): Return
10561 std::string.
10562 * coffread.c (coff_symfile_read): Adjust to std::string.
10563 * elfread.c (elf_symfile_read): Adjust to std::string.
10564 * symfile.c (separate_debug_file_exists): Change parameter to
10565 std::string.
10566 (find_separate_debug_file): Return std::string.
10567 (find_separate_debug_file_by_debuglink): Return std::string.
10568 * symfile.h (find_separate_debug_file_by_debuglink): Return
10569 std::string.
10570
10571 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10572
10573 * common/xml-utils.c (xml_escape_text): Move code to...
10574 (xml_escape_text_append): ... this new function.
10575 * common/xml-utils.h (xml_escape_text_append): New declaration.
10576 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10577 New function.
10578 (_initialize_xml_utils): register test_xml_escape_text_append as
10579 a selftest.
10580
10581 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10582
10583 * defs.h: Remove MAX_REGISTER_SIZE.
10584 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10585 asserts.
10586 * python/py-unwind.c (pyuw_sniffer): Likewise.
10587
10588 2018-03-07 Tom Tromey <tom@tromey.com>
10589
10590 * linux-tdep.c (linux_info_proc): Update.
10591 * target.h (struct target_ops) <to_fileio_readlink>: Return
10592 optional<string>.
10593 (target_fileio_readlink): Return optional<string>.
10594 * remote.c (remote_hostio_readlink): Return optional<string>.
10595 * inf-child.c (inf_child_fileio_readlink): Return
10596 optional<string>.
10597 * target.c (target_fileio_readlink): Return optional<string>.
10598
10599 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10600
10601 * regcache.c (cooked_read_test): Add riscv to the list of
10602 architectures that have a save_reggroup.
10603
10604 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10605
10606 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10607 value is not a dynamic class object.
10608
10609 2018-03-06 Tom Tromey <tom@tromey.com>
10610
10611 * rust-exp.y: Formatting fixes.
10612
10613 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10614
10615 * riscv-tdep.c (riscv_register_name): Remove target description
10616 support.
10617 (riscv_gdbarch_init): Remove target description check.
10618
10619 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10620
10621 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10622 comment.
10623 * riscv-tdep.h: Likewise.
10624
10625 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10626
10627 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10628 (riscv_pseudo_register_write): Delete.
10629 (riscv_gdbarch_init): Remove all use of pseudo registers.
10630
10631 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10632
10633 * record-btrace.c (btrace_print_lines): Replace cleanup
10634 parameter with RAII equivalents.
10635 (btrace_insn_history): Replace cleanup with RAII equivalents.
10636 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10637 make_cleanup_ui_out_tuple_begin_end): Remove.
10638 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10639 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10640 make_cleanup_ui_out_list_begin_end): Remove.
10641
10642 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10643
10644 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10645 parameter types to std::vector. Use bool.
10646 (record_btrace_wait): Replace VEC(tp_t) with
10647 std::vector<thread_info *>.
10648 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10649
10650 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10651
10652 * record-btrace.c (record_btrace_disable_callback): Remove.
10653 (struct scoped_btrace_disable): New.
10654 (record_btrace_open): Use scoped_btrace_disable.
10655
10656 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10657
10658 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10659 reading values from registers.
10660
10661 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10662
10663 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10664 where appropriate.
10665
10666 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10667
10668 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10669 change parameter type. Use GDB's print functions, and use
10670 core_addr_to_string where appropriate.
10671 (riscv_push_dummy_call): Use core_addr_to_string where
10672 appropriate, update call to riscv_print_arg_location, and reindent
10673 a few lines.
10674 (riscv_return_value): Update call to riscv_print_arg_location.
10675
10676 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10677 Tim Newsome <tim@sifive.com>
10678 Albert Ou <a0u@eecs.berkeley.edu>
10679 Darius Rad <darius@bluespec.com>
10680
10681 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10682 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10683 (ALLDEPFILES): Add riscv-tdep.c
10684 * configure.tgt: Add riscv support.
10685 * riscv-tdep.c: New file.
10686 * riscv-tdep.h: New file.
10687 * NEWS: Mention new target.
10688 * MAINTAINERS: Add entry for riscv.
10689
10690 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10691
10692 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10693 fields within aggregates.
10694
10695 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10696
10697 * record-btrace.c (btrace_print_lines): Change type of flags to
10698 gdb_disassembly_flags.
10699
10700 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10701
10702 * fbsd-nat.c: Include "inf-ptrace.h".
10703 (USE_SIGTRAP_SIGINFO): Conditionally define.
10704 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10705 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10706 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10707 function.
10708 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10709 Likewise.
10710 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10711 Likewise.
10712 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10713 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10714 "supports_stopped_by_hw_breakpoint" target methods.
10715
10716 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10717
10718 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10719 * fbsd-nat.c (debug_fbsd_nat): New variable.
10720 (show_fbsd_nat_debug): New function.
10721 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10722 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10723
10724 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10725
10726 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10727 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10728 prototype.
10729 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10730 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10731 method.
10732
10733 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10734
10735 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10736 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10737
10738 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10739
10740 * charset.c (struct charset_vector): New.
10741 (charsets): Change type to charset_vector.
10742 (find_charset_names): Adjust.
10743 (add_one): Adjust.
10744 (_initialize_charset): Adjust.
10745
10746 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10747
10748 * progspace.h (struct program_space) <deleted_solibs>: Change
10749 type to std::vector<std::string>.
10750 * progspace.c (clear_program_space_solib_cache): Adjust.
10751 * breakpoint.c (print_solib_event): Adjust.
10752 (check_status_catch_solib): Adjust.
10753 * solib.c (update_solib_list): Adjust.
10754 * ui-out.h (class ui_out) <field_string>: New overload.
10755 * ui-out.c (ui_out::field_string): New overload.
10756
10757 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10758
10759 * progspace.h (struct program_space): Add constructor and
10760 destructor, initialize fields.
10761 (add_program_space): Remove.
10762 * progspace.c (add_program_space): Rename to...
10763 (program_space::program_space): ... this.
10764 (release_program_space): Rename to...
10765 (program_space::~program_space): ... this.
10766 (delete_program_space): Use delete to delete program_space.
10767 (initialize_progspace): Use new to allocate program_space.
10768 * inferior.c (add_inferior_with_spaces): Likewise.
10769 (clone_inferior_command): Likewise.
10770 * infrun.c (follow_fork_inferior): Likewise.
10771 (handle_vfork_child_exec_or_exit): Likewise.
10772
10773 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10774
10775 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10776 (delim_string_to_char_ptr_vec): Return std::vector of
10777 gdb::unique_xmalloc_ptr.
10778 (dirnames_to_char_ptr_vec_append): Take std::vector of
10779 gdb::unique_xmalloc_ptr.
10780 (dirnames_to_char_ptr_vec): Return std::vector of
10781 gdb::unique_xmalloc_ptr.
10782 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10783 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10784 (delim_string_to_char_ptr_vec): Return an std::vector of
10785 gdb::unique_xmalloc_ptr, adjust the code.
10786 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10787 gdb::unique_xmalloc_ptr, adjust the code.
10788 (dirnames_to_char_ptr_vec): Return an std::vector of
10789 gdb::unique_xmalloc_ptr, adjust the code.
10790 * auto-load.c (auto_load_safe_path_vec): Change type to
10791 std::vector of gdb::unique_xmalloc_ptr.
10792 (auto_load_expand_dir_vars): Return an std::vector of
10793 gdb::unique_xmalloc_ptr, adjust the code.
10794 (auto_load_safe_path_vec_update): Adjust.
10795 (filename_is_in_auto_load_safe_path_vec): Adjust.
10796 (auto_load_objfile_script_1): Adjust.
10797 * build-id.c (build_id_to_debug_bfd): Adjust.
10798 * linux-thread-db.c (thread_db_load_search): Adjust.
10799 * source.c (add_path): Adjust.
10800 (openp): Adjust.
10801 * symfile.c (find_separate_debug_file): Adjust.
10802 * utils.c (do_free_char_ptr_vec): Remove.
10803 (make_cleanup_free_char_ptr_vec): Remove.
10804
10805 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10806
10807 PR gdb/22907
10808 * common/pathstuff.c: Conditionally include "<windows.h>".
10809
10810 2018-03-01 Georg Sauthoff <mail@georg.so>
10811
10812 PR gdb/22888
10813 * gcore.in: Quote variables and switch interpreter to bash.
10814
10815 2018-03-01 Tom Tromey <tom@tromey.com>
10816
10817 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10818 assertion. Add assertion for discriminant_index.
10819 (quirk_rust_enum): Use correct base type name in univariant case.
10820
10821 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10822
10823 * record.c (get_call_history_modifiers): Return a
10824 record_print_flags.
10825 (cmd_record_call_history): Adjust.
10826 * record-btrace.c (record_btrace_call_history): Adjust.
10827 (record_btrace_call_history_range): Adjust.
10828 (record_btrace_call_history_from): Adjust.
10829 * target-debug.h (target_debug_print_record_print_flags): New.
10830 * target-delegates.c: Re-generate.
10831 * target.c (target_call_history): Change flags type.
10832 (target_call_history_from): Likewise.
10833 (target_call_history_range): Likewise.
10834 * target.h (struct target_ops) <target_call_history>: Likewise.
10835 (target_call_history_from): Likewise.
10836 (target_call_history_range): Likewise.
10837
10838 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10839 Simon Marchi <simon.marchi@polymtl.ca>
10840
10841 * common/common-utils.c: Include "sys/stat.h".
10842 (is_regular_file): Move here from "source.c"; change return
10843 type to "bool".
10844 * common/common-utils.h (is_regular_file): New prototype.
10845 * common/pathstuff.c (contains_dir_separator): New function.
10846 * common/pathstuff.h (contains_dir_separator): New prototype.
10847 * source.c: Don't include "sys/stat.h".
10848 (is_regular_file): Move to "common/common-utils.c".
10849
10850 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10851
10852 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10853 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10854 * auto-load.c: Include "common/pathstuff.h".
10855 * common/common-def.h (current_directory): Move here.
10856 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10857 function.
10858 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10859 prototype.
10860 * common/pathstuff.c: New file.
10861 * common/pathstuff.h: New file.
10862 * compile/compile.c: Include "common/pathstuff.h".
10863 * defs.h (current_directory): Move to "common/common-defs.h".
10864 * dwarf2read.c: Include "common/pathstuff.h".
10865 * exec.c: Likewise.
10866 * guile/scm-safe-call.c: Likewise.
10867 * linux-thread-db.c: Likewise.
10868 * main.c: Likewise.
10869 * nto-tdep.c: Likewise.
10870 * objfiles.c: Likewise.
10871 * source.c: Likewise.
10872 * symtab.c: Likewise.
10873 * utils.c: Include "common/pathstuff.h".
10874 (gdb_realpath): Move to "common/pathstuff.c".
10875 (gdb_realpath_keepfile): Likewise.
10876 (gdb_abspath): Likewise.
10877 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10878 (gdb_realpath_keepfile): Likewise.
10879 (gdb_abspath): Likewise.
10880
10881 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10882
10883 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10884 wildcard process pid for super_resume for kernels with a
10885 specific bug.
10886
10887 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10888
10889 * compile/compile.c (get_args): Add additional comments
10890 explaining function.
10891
10892 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10893 Tom Tromey <tom@tromey.com>
10894
10895 * target.h (memory_write_request_s): Remove typedef. Don't define
10896 VEC.
10897 (target_write_memory_blocks): Change argument to std::vector.
10898 (struct memory_write_request): Add constructor.
10899 * target-memory.c (compare_block_starting_address): Return bool.
10900 Change argument types.
10901 (claim_memory): Change arguments to use std::vector.
10902 (split_regular_and_flash_blocks, blocks_to_erase)
10903 (compute_garbled_blocks): Likewise.
10904 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10905 (target_write_memory_blocks): Change argument to std::vector.
10906 * symfile.c (struct load_section_data): Add constructor and
10907 destructor. Use std::vector for "requests".
10908 (struct load_progress_data): Add initializers.
10909 (load_section_callback): Update. Use "new".
10910 (clear_memory_write_data): Remove.
10911 (generic_load): Update.
10912
10913 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10914
10915 * arch/aarch64.h: Use common/tdesc.h.
10916
10917 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10918
10919 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10920 architecture with a 64-bit ABI.
10921
10922 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10923
10924 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10925 ahead of target description loading.
10926
10927 2018-02-26 Tom Tromey <tom@tromey.com>
10928
10929 * stack.c (backtrace_command_1): Update.
10930 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10931 of "flags".
10932 * python/py-framefilter.c (py_print_frame)
10933 (gdbpy_apply_frame_filter): Change type of "flags".
10934 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10935 of "flags".
10936 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10937 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10938 * extension.h (enum frame_filter_flag): Rename from
10939 frame_filter_flags.
10940 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10941 (apply_ext_lang_frame_filter): Change type of "flags".
10942 * extension.c (apply_ext_lang_frame_filter): Change type of
10943 "flags".
10944 * extension-priv.h (struct extension_language_ops)
10945 <apply_frame_filter>: Change type of "flags".
10946
10947 2018-02-26 Tom Tromey <tom@tromey.com>
10948
10949 PR python/16497:
10950 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10951 off-by-one in py_end computation.
10952 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10953 PRINT_MORE_FRAMES.
10954 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10955 constant.
10956
10957 2018-02-26 Tom Tromey <tom@tromey.com>
10958
10959 * dwarf2read.c (struct variant_field): New.
10960 (struct nextfield) <variant>: New field.
10961 (dwarf2_add_field): Handle DW_TAG_variant_part.
10962 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10963 discriminated union.
10964 (read_structure_type): Handle DW_TAG_variant_part.
10965 (handle_struct_member_die): New function, extracted from
10966 process_structure_scope. Handle DW_TAG_variant.
10967 (process_structure_scope): Handle discriminated unions. Call
10968 handle_struct_member_die.
10969
10970 2018-02-26 Tom Tromey <tom@tromey.com>
10971
10972 * rust-lang.h (rust_last_path_segment): Declare.
10973 * rust-lang.c (rust_last_path_segment): Now public. Change
10974 contract.
10975 (struct disr_info): Remove.
10976 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10977 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10978 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10979 (rust_enum_p, rust_enum_variant): New function.
10980 (rust_underscore_fields): Remove "offset" parameter.
10981 (rust_print_enum): New function.
10982 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10983 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10984 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10985 enums.
10986 (rust_internal_print_type): New function, from rust_print_type.
10987 Remove enum code.
10988 (rust_print_type): Call rust_internal_print_type.
10989 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10990 Update enum handling.
10991 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10992 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10993 (rust_union_quirks): New functions.
10994 (process_full_comp_unit, process_full_type_unit): Call
10995 rust_union_quirks.
10996 (process_structure_scope): Update rust_unions if necessary.
10997
10998 2018-02-26 Tom Tromey <tom@tromey.com>
10999
11000 * value.h (value_union_variant): Declare.
11001 * valops.c (value_union_variant): New function.
11002 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11003 (struct discriminant_info): New.
11004 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11005 enumerator.
11006 (struct main_type) <flag_discriminated_union>: New field.
11007
11008 2018-02-26 Tom Tromey <tom@tromey.com>
11009
11010 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11011 unittests/unpack-selftests.c.
11012 * unittests/unpack-selftests.c: New file.
11013 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11014
11015 2018-02-26 Yao Qi <yao.qi@linaro.org>
11016
11017 * dwarf2read.c (struct partial_die_info) <read>: New method.
11018 (read_partial_die): Remove the declaration.
11019 (load_partial_dies): Update.
11020 (partial_die_info::partial_die_info):
11021 (read_partial_die): Change it to partial_die_info::read.
11022
11023 2018-02-26 Yao Qi <yao.qi@linaro.org>
11024
11025 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11026 (fixup_partial_die): Remove declaration.
11027 (scan_partial_symbols): Update.
11028 (partial_die_parent_scope): Likewise.
11029 (partial_die_full_name): Likewise.
11030 (fixup_partial_die): Change it to partial_die_info::fixup.
11031
11032 2018-02-26 Yao Qi <yao.qi@linaro.org>
11033
11034 * dwarf2read.c (read_partial_die): Update the declaration.
11035 (load_partial_dies): Caller update.
11036 (read_partial_die): Remove one argument abbrev_len.
11037
11038 2018-02-26 Yao Qi <yao.qi@linaro.org>
11039
11040 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11041 assignment operator.
11042 (load_partial_dies): Use ctor and copy ctor.
11043 (read_partial_die): Update.
11044 (dwarf2_cu::find_partial_die): Use ctor.
11045
11046 2018-02-26 Yao Qi <yao.qi@linaro.org>
11047
11048 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11049 (find_partial_die_in_comp_unit): Change it to
11050 dwarf2_cu::find_partial_die.
11051 (find_partial_die): Update.
11052
11053 2018-02-26 Yao Qi <yao.qi@linaro.org>
11054
11055 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11056 is NULL.
11057
11058 2018-02-26 Yao Qi <yao.qi@linaro.org>
11059
11060 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11061
11062 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11063
11064 * arch/amd64.h: Use common/tdesc.h.
11065 * arch/i386.c: Likewise.
11066 * arch/i386.h: Likewise.
11067 * arch/tic6x.c: Likewise.
11068 * arch/tdesc.h: Move file from here...
11069 * common/tdesc.h: ...to here.
11070 * features/aarch64-core.c: Regenerate.
11071 * features/aarch64-fpu.c: Regenerate.
11072 * features/i386/32bit-avx.c: Regenerate.
11073 * features/i386/32bit-avx512.c: Regenerate.
11074 * features/i386/32bit-core.c: Regenerate.
11075 * features/i386/32bit-linux.c: Regenerate.
11076 * features/i386/32bit-mpx.c: Regenerate.
11077 * features/i386/32bit-pkeys.c: Regenerate.
11078 * features/i386/32bit-sse.c: Regenerate.
11079 * features/i386/64bit-avx.c: Regenerate.
11080 * features/i386/64bit-avx512.c: Regenerate.
11081 * features/i386/64bit-core.c: Regenerate.
11082 * features/i386/64bit-linux.c: Regenerate.
11083 * features/i386/64bit-mpx.c: Regenerate.
11084 * features/i386/64bit-pkeys.c: Regenerate.
11085 * features/i386/64bit-segments.c: Regenerate.
11086 * features/i386/64bit-sse.c: Regenerate.
11087 * features/i386/x32-core.c: Regenerate.
11088 * features/tic6x-c6xp.c: Regenerate.
11089 * features/tic6x-core.c: Regenerate.
11090 * features/tic6x-gp.c: Regenerate.
11091 * target-descriptions.c: Use common/tdesc.h.
11092 * target-descriptions.h: Likewise.
11093
11094 2018-02-24 Tom Tromey <tom@tromey.com>
11095
11096 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11097 (try_thread_db_load_from_dir, thread_db_load_search): Use
11098 std::string.
11099 (info_auto_load_libthread_db_compare): Return bool. Change
11100 argument types.
11101 (info_auto_load_libthread_db): Use std::vector, std::string.
11102 Remove cleanups.
11103
11104 2018-02-24 Tom Tromey <tom@tromey.com>
11105
11106 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11107 std::string.
11108 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11109 std::string*.
11110 * gdbarch.c: Rebuild.
11111 * gdbarch.h: Rebuild.
11112 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11113 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11114 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11115 std::string*.
11116
11117 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11118
11119 * gdbtypes.h (sect_offset): Change type to uint64_t.
11120 (sect_offset_str): New function.
11121 * dwarf2read.c (create_addrmap_from_aranges): Use
11122 sect_offset_str.
11123 (error_check_comp_unit_head): Likewise.
11124 (create_debug_type_hash_table): Likewise.
11125 (read_cutu_die_from_dwo): Likewise.
11126 (init_cutu_and_read_dies): Likewise.
11127 (init_cutu_and_read_dies_no_follow): Likewise.
11128 (process_psymtab_comp_unit_reader): Likewise.
11129 (partial_die_parent_scope): Likewise.
11130 (peek_die_abbrev): Likewise.
11131 (process_queue): Likewise.
11132 (dwarf2_physname): Likewise.
11133 (read_namespace_alias): Likewise.
11134 (read_import_statement): Likewise.
11135 (create_dwo_cu_reader): Likewise.
11136 (create_cus_hash_table): Likewise.
11137 (lookup_dwo_cutu): Likewise.
11138 (inherit_abstract_dies): Likewise.
11139 (read_func_scope): Likewise.
11140 (read_call_site_scope): Likewise.
11141 (dwarf2_add_member_fn): Likewise.
11142 (read_common_block): Likewise.
11143 (read_module_type): Likewise.
11144 (read_typedef): Likewise.
11145 (read_subrange_type): Likewise.
11146 (load_partial_dies): Likewise.
11147 (read_partial_die): Likewise.
11148 (find_partial_die): Likewise.
11149 (read_str_index): Likewise.
11150 (dwarf2_string_attr): Likewise.
11151 (build_error_marker_type): Likewise.
11152 (lookup_die_type): Likewise.
11153 (dump_die_shallow): Likewise.
11154 (follow_die_ref): Likewise.
11155 (dwarf2_fetch_die_loc_sect_off): Likewise.
11156 (dwarf2_fetch_constant_bytes): Likewise.
11157 (follow_die_sig): Likewise.
11158 (get_signatured_type): Likewise.
11159 (get_DW_AT_signature_type): Likewise.
11160 (dwarf2_find_containing_comp_unit): Likewise.
11161 (set_die_type): Likewise.
11162
11163 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11164
11165 * arch/aarch64.c: Include "common-defs.h".
11166 * arch/amd64.c: Likewise.
11167 * arch/i386.c: Likewise.
11168
11169 2018-02-21 Tom Tromey <tom@tromey.com>
11170
11171 * value.h: (extract_field_op): Update.
11172 * eval.c (extract_field_op): Return a const char *.
11173 * expression.h (parse_expression_for_completion): Update.
11174 * completer.c (complete_expression): Update.
11175 (add_struct_fields): Make fieldname const.
11176 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11177 (mark_completion_tag, parse_exp_in_context_1): Update.
11178 (parse_expression_for_completion): Change "name" to
11179 unique_xmalloc_ptr*.
11180
11181 2018-02-21 Tom Tromey <tom@tromey.com>
11182
11183 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11184
11185 2018-02-21 Yao Qi <yao.qi@linaro.org>
11186
11187 * avr-tdep.c (avr_read_pc): Change parameter type to
11188 readable_regcache.
11189 * gdbarch.sh (read_pc): Likewise.
11190 * gdbarch.c: Re-generated.
11191 * gdbarch.h: Re-generated.
11192 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11193 readable_regcache.
11194 * ia64-tdep.c (ia64_read_pc): Likewise.
11195 * mips-tdep.c (mips_read_pc): Likewise.
11196 * spu-tdep.c (spu_read_pc): Likewise.
11197
11198 2018-02-21 Yao Qi <yao.qi@linaro.org>
11199
11200 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11201 * regcache-dump.c: New file.
11202 * regcache.c: Move register_dump to regcache-dump.c.
11203 (maintenance_print_registers): Likewise.
11204 (maintenance_print_raw_registers): Likewise.
11205 (maintenance_print_cooked_registers): Likewise.
11206 (maintenance_print_register_groups): Likewise.
11207 (maintenance_print_remote_registers): Likewise.
11208 (_initialize_regcache): Likewise.
11209 * regcache.h (register_dump): Moved from regcache.c.
11210
11211 2018-02-21 Yao Qi <yao.qi@linaro.org>
11212
11213 * regcache.c (regcache::regcache): Update.
11214 (regcache::invalidate): Move it to detached_regcache::invalidate.
11215 (get_thread_arch_aspace_regcache): Update.
11216 (regcache::raw_update): Update.
11217 (regcache::cooked_read): Remove some code.
11218 (regcache::cooked_read_value): Likewise.
11219 (regcache::raw_write): Remove assert on m_readonly_p.
11220 (regcache::raw_supply_integer): Move it to
11221 detached_regcache::raw_supply_integer.
11222 (regcache::raw_supply_zeroed): Likewise.
11223 * regcache.h (detached_regcache) <raw_supply_integer>: New
11224 declaration.
11225 <raw_supply_zeroed, invalidate>: Likewise.
11226 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11227 <invalidate>: Likewise.
11228 <m_readonly_p>: Removed.
11229
11230 2018-02-21 Yao Qi <yao.qi@linaro.org>
11231
11232 * infcmd.c (get_return_value): Let stop_regs point to
11233 get_current_regcache.
11234 * regcache.c (regcache::regcache): Remove.
11235 (register_dump_reg_buffer): New class.
11236 (regcache_print): Adjust.
11237 * regcache.h (regcache): Remove constructors.
11238
11239 2018-02-21 Yao Qi <yao.qi@linaro.org>
11240
11241 * regcache.c (class register_dump): New class.
11242 (register_dump_regcache, register_dump_none): New class.
11243 (register_dump_remote, register_dump_groups): New class.
11244 (regcache_print): Update.
11245 * regcache.h (regcache_dump_what): Move it to regcache.c.
11246 (regcache) <dump>: Remove.
11247
11248 2018-02-21 Yao Qi <yao.qi@linaro.org>
11249
11250 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11251 reg_buffer_rw *.
11252 (jit_unwind_reg_set_impl): Call raw_supply.
11253 (jit_frame_sniffer): Use reg_buffer_rw.
11254 * record-full.c (record_full_core_regbuf): Change its type.
11255 (record_full_core_open_1): Use reg_buffer_rw.
11256 (record_full_close): Likewise.
11257 (record_full_core_fetch_registers): Use regcache->raw_supply.
11258 (record_full_core_store_registers): Likewise.
11259 * regcache.c (regcache::get_register_status): Move it to
11260 reg_buffer.
11261 (regcache_raw_set_cached_value): Remove.
11262 (regcache::raw_set_cached_value): Remove.
11263 (regcache::raw_write): Call raw_supply.
11264 (regcache::raw_supply): Move it to reg_buffer_rw.
11265 * regcache.h (regcache_raw_set_cached_value): Remove.
11266 (reg_buffer_rw): New class.
11267
11268 2018-02-21 Yao Qi <yao.qi@linaro.org>
11269
11270 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11271 readonly_detached_regcache.
11272 (dummy_frame_prev_register): Use regcache->cooked_read.
11273 * frame.c (frame_save_as_regcache): Change return type.
11274 (frame_pop): Update.
11275 * frame.h (frame_save_as_regcache): Update declaration.
11276 * inferior.h (get_infcall_suspend_state_regcache): Update
11277 declaration.
11278 * infrun.c (infcall_suspend_state) <registers>: use
11279 readonly_detached_regcache.
11280 (save_infcall_suspend_state): Don't use regcache_dup.
11281 (get_infcall_suspend_state_regcache): Change return type.
11282 * linux-fork.c (struct fork_info) <savedregs>: Change to
11283 readonly_detached_regcache.
11284 <pc>: New field.
11285 (fork_save_infrun_state): Don't use regcache_dup.
11286 (info_checkpoints_command): Adjust.
11287 * mi/mi-main.c (register_changed_p): Update declaration.
11288 (mi_cmd_data_list_changed_registers): Use
11289 readonly_detached_regcache.
11290 (register_changed_p): Change parameter type to
11291 readonly_detached_regcache.
11292 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11293 readonly_detached_regcache.
11294 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11295 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11296 New.
11297 (regcache::save): Move it to reg_buffer.
11298 (regcache::restore): Change parameter type.
11299 (regcache_dup): Remove.
11300 * regcache.h (reg_buffer) <save>: New method.
11301 (readonly_detached_regcache): New class.
11302 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11303 readonly_detached_regcache.
11304 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11305
11306 2018-02-21 Yao Qi <yao.qi@linaro.org>
11307
11308 * frame.c (frame_save_as_regcache): Use regcache method save.
11309 (frame_pop): Use regcache method restore.
11310 * infrun.c (restore_infcall_suspend_state): Likewise.
11311 * linux-fork.c (fork_load_infrun_state): Likewise.
11312 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11313 save.
11314 * regcache.c (regcache_save): Remove.
11315 (regcache::restore): More asserts.
11316 (regcache_cpy): Remove.
11317 * regcache.h (regcache_save): Remove the declaration.
11318 (regcache::restore): Move from private to public.
11319 Remove the friend declaration of regcache_cpy.
11320 (regcache_cpy): Remove declaration.
11321
11322 2018-02-21 Yao Qi <yao.qi@linaro.org>
11323
11324 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11325 parameter type to 'readable_regcache *'.
11326 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11327 * arm-tdep.c (arm_neon_quad_read): Likewise.
11328 (arm_pseudo_read): Likewise.
11329 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11330 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11331 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11332 * gdbarch.c: Re-generated.
11333 * gdbarch.h: Re-generated.
11334 * gdbarch.sh (pseudo_register_read): Change parameter type to
11335 'readable_regcache *'.
11336 (pseudo_register_read_value): Likewise.
11337 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11338 (h8300_pseudo_register_read): Likewise.
11339 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11340 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11341 (i386_pseudo_register_read_into_value): Likewise.
11342 (i386_pseudo_register_read_value): Likewise.
11343 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11344 declaration.
11345 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11346 * m32c-tdep.c (m32c_raw_read): Likewise.
11347 (m32c_read_flg): Likewise.
11348 (m32c_banked_register): Likewise.
11349 (m32c_banked_read): Likewise.
11350 (m32c_sb_read): Likewise.
11351 (m32c_part_read): Likewise.
11352 (m32c_cat_read): Likewise.
11353 (m32c_r3r2r1r0_read): Likewise.
11354 (m32c_pseudo_register_read): Likewise.
11355 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11356 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11357 (mep_pseudo_cr64_read): Likewise.
11358 (mep_pseudo_register_read): Likewise.
11359 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11360 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11361 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11362 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11363 (regcache::cooked_read): Likewise.
11364 (regcache::cooked_read_value): Likewise.
11365 (regcache_cooked_read_signed):
11366 (regcache::cooked_read): Likewise.
11367 * regcache.h (readable_regcache): New class.
11368 (regcache): Inherit readable_regcache. Move some methods to
11369 readable_regcache.
11370 * rl78-tdep.c (rl78_pseudo_register_read): Change
11371 parameter type to 'readable_regcache *'.
11372 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11373 (e500_pseudo_register_read): Change parameter type to
11374 'readable_regcache *'.
11375 (dfp_pseudo_register_read): Likewise.
11376 (vsx_pseudo_register_read): Likewise.
11377 (efpr_pseudo_register_read): Likewise.
11378 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11379 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11380 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11381 (sh64_pseudo_register_read): Likewise.
11382 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11383 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11384 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11385 (spu_pseudo_register_read): Likewise.
11386 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11387 (xtensa_pseudo_register_read): Likewise.
11388
11389 2018-02-21 Yao Qi <yao.qi@linaro.org>
11390
11391 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11392 (regcache::arch): Move it to reg_buffer::arch.
11393 (regcache::register_buffer): Likewise.
11394 (regcache::assert_regnum): Likewise.
11395 (regcache::num_raw_registers): Likewise.
11396 * regcache.h (reg_buffer): New class.
11397 (regcache): Inherit reg_buffer.
11398
11399 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11400
11401 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11402 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11403
11404 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11405
11406 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11407
11408 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11409
11410 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11411 (SFILES): Remove common/*.c files.
11412 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11413 * common/common.host: Add common reference.
11414 * configure.ac: Likewise.
11415 * configure: Regenerate.
11416
11417 2018-02-16 Yao Qi <yao.qi@linaro.org>
11418
11419 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11420 (block_initialize_namespace): Use new.
11421 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11422 (dwarf2_free_objfile): Use delete.
11423 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11424 (copy_type_recursive): Use new.
11425 * gdb_obstack.h (allocate_on_obstack): New.
11426
11427 2018-02-15 Yao Qi <yao.qi@linaro.org>
11428
11429 PR gdb/22849
11430 * inferior.c (exit_inferior_1): Reset inf->control.
11431
11432 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11433
11434 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11435 declaration.
11436
11437 2018-02-14 Pedro Alves <palves@redhat.com>
11438
11439 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11440 frame_cleanup_after_sniffer on exception.
11441
11442 2018-02-14 Tom Tromey <tom@tromey.com>
11443
11444 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11445 const.
11446 (solib_bfd_open): Make pathname const.
11447 * solib.c (solib_bfd_open): Make pathname const.
11448 * solib-spu.c (spu_bfd_fopen): Make name const.
11449 (spu_bfd_open): Make pathname const.
11450 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11451 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11452
11453 2018-02-14 Tom Tromey <tom@tromey.com>
11454
11455 * symfile.c (symfile_bfd_open): Update.
11456 * source.h (openp, source_full_path_of, find_and_open_source):
11457 Change argument type to unique_xmalloc_ptr.
11458 * source.c (openp): Take a unique_xmalloc_ptr.
11459 (source_full_path_of, find_and_open_source): Likewise.
11460 (open_source_file, symtab_to_fullname): Update.
11461 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11462 unique_xmalloc_ptr.
11463 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11464 (exec_file_find): Update.
11465 * psymtab.c (psymtab_to_fullname): Update.
11466 * nto-tdep.h (nto_find_and_open_solib): Update.
11467 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11468 unique_xmalloc_ptr.
11469 * exec.c (exec_file_attach): Update.
11470 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11471 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11472
11473 2018-02-14 Tom Tromey <tom@tromey.com>
11474
11475 * solib.c: Include source.h.
11476 * nto-tdep.c: Include source.h.
11477 * mi/mi-cmd-env.c: Include source.h.
11478 * infcmd.c: Include source.h.
11479 * exec.c: Include source.h.
11480 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11481 (add_path, directory_switch, source_path, init_source_path): Move
11482 declarations...
11483 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11484 (add_path, directory_switch, source_path, init_source_path):
11485 ...here.
11486
11487 2018-02-14 Tom Tromey <tom@tromey.com>
11488
11489 * solist.h (exec_file_find, solib_find): Return
11490 unique_xmalloc_ptr.
11491 (solib_bfd_fopen): Take a const char *.
11492 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11493 (exec_file_find, solib_find): Likewise.
11494 (solib_bfd_fopen): Do not take ownership of "pathname".
11495 (solib_bfd_open): Use unique_xmalloc_ptr.
11496 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11497 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11498 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11499 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11500
11501 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11502
11503 * ada-lang.c (name_match_type_from_name): Remove reference to
11504 ada_name_for_lookup in function's documentation.
11505 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11506
11507 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11508
11509 * defs.h (enum openp_flags): New enum.
11510 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11511 Move to enum openp_flags.
11512 (openp_flags): New enum flags.
11513 (openp): Change parameter type to openp_flags.
11514 * source.c (openp): Change parameter type to openp_flags.
11515 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11516 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11517
11518 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11519
11520 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11521 per-command.
11522
11523 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11524
11525 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11526 into...
11527 (class dwarf2_queue_guard): ...the destructor of this new class.
11528 (dw2_do_instantiate_symtab): Create instance of the new class
11529 dwarf2_queue_guard, remove cleanup.
11530
11531 2018-02-09 Tom Tromey <tom@tromey.com>
11532
11533 * source.c (find_source_lines): Don't reference past the end of
11534 the vector.
11535
11536 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11537
11538 * remote.c (remote_btrace_maybe_reopen): Change error message.
11539 * btrace.c (btrace_enable): Likewise.
11540 (parse_xml_btrace): Likewise.
11541 (parse_xml_btrace_conf): Likewise.
11542
11543 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11544
11545 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11546 (linux_enable_pt, linux_enable_bts): Call
11547 diagnose_perf_event_open_fail.
11548
11549 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11550
11551 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11552 Remove parameter and change return type. Update callers. Move it.
11553 (linux_enable_bts, linux_enable_pt): Improve error message.
11554 (linux_enable_pt): Remove zero buffer size check.
11555 (linux_enable_btrace): Improve error messages. Remove NULL return
11556 check.
11557
11558 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11559
11560 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11561 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11562 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11563 (linux_supports_pt, linux_supports_btrace): Remove.
11564 (linux_enable_bts): Call cpu_supports_bts.
11565 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11566 * remote.c (remote_supports_btrace): Remove.
11567 (init_remote_ops): Remove remote_supports_btrace.
11568 * target-delegates.c: Regenerated.
11569 * target.c (target_supports_btrace): Remove.
11570 * target.h (target_ops) <to_supports_btrace>: Remove
11571 (target_supports_btrace): Remove.
11572 * x86-linux-nat.c (x86_linux_create_target): Remove
11573 linux_supports_btrace.
11574
11575 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11576
11577 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11578 btrace failed.
11579 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11580 exception and use message in own exception.
11581
11582 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11583
11584 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11585 (perf_event_pt_event_type): Use gdb_file_up.
11586 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11587 scoped_fd, and scoped_mmap.
11588
11589 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11590
11591 * common/scoped_mmap.h: New.
11592 * unittests/scoped_mmap-selftest.c: New.
11593 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11594 unittests/scoped_mmap-selftest.c.
11595
11596 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11597
11598 * common/scoped_fd.h: New.
11599 * unittests/scoped_fd-selftest.c: New.
11600 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11601 unittests/scoped_fd-selftest.c.
11602
11603 2018-02-09 Tom Tromey <tom@tromey.com>
11604
11605 * auto-load.c (auto_load_section_scripts): Use
11606 gdb::unique_xmalloc_ptr.
11607
11608 2018-02-09 Tom Tromey <tom@tromey.com>
11609
11610 * auto-load.c (execute_script_contents): Use std::string.
11611
11612 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11613
11614 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11615 Python function, rather than a new command.
11616
11617 2018-02-08 Tom Tromey <tom@tromey.com>
11618
11619 * solib.c (solib_find_1): Use std::string.
11620 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11621
11622 2018-02-08 Tom Tromey <tom@tromey.com>
11623
11624 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11625
11626 2018-02-08 Tom Tromey <tom@tromey.com>
11627
11628 * source.c (find_source_lines): Use gdb::def_vector.
11629
11630 2018-02-08 Tom Tromey <tom@tromey.com>
11631
11632 * macrocmd.c (struct temporary_macro_definition): New.
11633 (macro_define_command): Use temporary_macro_definition. Remove
11634 cleanups.
11635 (free_macro_definition_ptr): Remove.
11636
11637 2018-02-08 Tom Tromey <tom@tromey.com>
11638
11639 * macroexp.c (maybe_expand): Use std::string.
11640
11641 2018-02-08 Tom Tromey <tom@tromey.com>
11642
11643 * macroexp.c (struct macro_buffer): Add initializers for some
11644 members.
11645 (init_buffer, init_shared_buffer, free_buffer)
11646 (free_buffer_return_text): Remove.
11647 (macro_buffer): New constructors.
11648 (~macro_buffer): New destructor.
11649 (macro_buffer::set_shared): New method.
11650 (macro_buffer::resize_buffer, macro_buffer::appendc)
11651 (macro_buffer::appendmem): Now methods, not free functions.
11652 (set_token, append_tokens_without_splicing, stringify)
11653 (macro_stringify): Update.
11654 (gather_arguments): Change return type. Remove argc_p argument,
11655 add args_ptr argument. Use std::vector.
11656 (substitute_args): Remove argc argument. Accept std::vector.
11657 (expand): Update. Use std::vector.
11658 (scan, macro_expand, macro_expand_next): Update.
11659
11660 2018-02-08 Tom Tromey <tom@tromey.com>
11661
11662 * symtab.c (default_collect_symbol_completion_matches_break_on):
11663 Use unique_xmalloc_ptr.
11664 * macroscope.h: (sal_macro_scope, user_macro_scope)
11665 (default_macro_scope): Return unique_xmalloc_ptr.
11666 * macroscope.c (sal_macro_scope, user_macro_scope)
11667 (default_macro_scope): Return unique_xmalloc_ptr.
11668 * macroexp.h (macro_expand, macro_expand_once): Return
11669 unique_xmalloc_ptr.
11670 * macroexp.c (macro_expand, macro_expand_once): Return
11671 unique_xmalloc_ptr.
11672 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11673 (info_macro_command, info_macros_command): Use
11674 unique_xmalloc_ptr.
11675 * compile/compile-c-support.c (write_macro_definitions): Use
11676 unique_xmalloc_ptr.
11677 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11678
11679 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11680
11681 * value.c (value_static_field): Assign field type instead of
11682 containing type when returning an optimized out value.
11683
11684 2018-02-06 Yao Qi <yao.qi@linaro.org>
11685
11686 * ft32-tdep.c (ft32_read_pc): Remove.
11687 (ft32_write_pc): Remove.
11688 (ft32_gdbarch_init): Update.
11689 * m32r-tdep.c (m32r_read_pc): Remove.
11690 (m32r_gdbarch_init): Update.
11691 * mep-tdep.c (mep_read_pc): Remove.
11692 (mep_gdbarch_init): Update.
11693 * microblaze-tdep.c (microblaze_write_pc): Remove.
11694 (microblaze_gdbarch_init): Update.
11695 * mn10300-tdep.c (mn10300_read_pc): Remove.
11696 (mn10300_write_pc): Remove.
11697 (mn10300_gdbarch_init): Update.
11698 * moxie-tdep.c (moxie_read_pc): Remove.
11699 (moxie_write_pc): Remove.
11700 (moxie_gdbarch_init): Update.
11701
11702 2018-02-06 Yao Qi <yao.qi@linaro.org>
11703
11704 * expprint.c (print_subexp_standard): Handle
11705 OP_F77_UNDETERMINED_ARGLIST.
11706 (dump_subexp_body_standard): Likewise.
11707
11708 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11709
11710 * target-descriptions.c (tdesc_element_visitor) Add empty
11711 implementations.
11712 (tdesc_type): Move make_gdb_type from here.
11713 (tdesc_type_builtin): Likewise.
11714 (tdesc_type_vector): Likewise.
11715 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11716 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11717 (make_gdb_type_union): Likewise.
11718 (make_gdb_type_flags): Likewise.
11719 (make_gdb_type_enum): Likewise.
11720 (make_gdb_type): New function.
11721 (tdesc_register_type): Use static make_gdb_type.
11722
11723 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11724
11725 * infcmd.c (default_print_one_register_info): Align natural-format
11726 column values consistently one under another.
11727 (pad_to_column): New function.
11728
11729 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11730
11731 * dwarf2read.c (dwarf2_physname): Move commment.
11732
11733 2018-02-01 Leszek Swirski <leszeks@google.com>
11734
11735 * varobj.c (varobj_formatted_print_options): Allow recursive
11736 pretty printing if pretty printing is enabled.
11737
11738 2018-02-01 Leszek Swirski <leszeks@google.com>
11739
11740 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11741 names after a structop as a filename.
11742
11743 2018-02-01 Yao Qi <yao.qi@linaro.org>
11744
11745 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11746 (arm_record_coproc_data_proc): Likewise.
11747
11748 2018-02-01 Yao Qi <yao.qi@linaro.org>
11749
11750 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11751
11752 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11753
11754 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11755 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11756
11757 2018-01-31 Pedro Alves <palves@redhat.com>
11758
11759 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11760 * inflow.c (child_terminal_save_inferior): Wrap reference to
11761 tcgetpgrp in HAVE_TERMIOS_H.
11762 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11763 _WIN32.
11764 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11765 always iterate over all inferiors.
11766 (gdbsim_cntrl_c): Adjust.
11767 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11768
11769 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11770
11771 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11772 index type is objfile-owned if the element type is as well.
11773
11774 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11775
11776 GDB 8.1 released.
11777
11778 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11779
11780 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11781 "features/s390x-linux64.c".
11782 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11783 s390_linux32 and s390x_linux64.
11784 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11785 default tdesc.
11786 * s390-tdep.c: Include "features/s390-linux32.c" and
11787 "features/s390x-linux64.c".
11788 (s390_tdesc_valid): Add check for tdesc_has_registers.
11789 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11790 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11791 tdesc_s390x_linux64.
11792 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11793 tdesc_s390x_linux64 to...
11794 * s390-tdep.h: ...here.
11795
11796 2018-01-30 Pedro Alves <palves@redhat.com>
11797
11798 PR gdb/13211
11799 * config.in, configure: Regenerate.
11800 * configure.ac: Check for getpgid.
11801 * go32-nat.c (go32_pass_ctrlc): New.
11802 (go32_target): Install it.
11803 * inf-child.c (inf_child_target): Install
11804 child_terminal_save_inferior, child_pass_ctrlc and
11805 child_interrupt.
11806 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11807 (inf_ptrace_target): No longer install it.
11808 * infcmd.c (interrupt_target_1): Adjust.
11809 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11810 (child_interrupt): Declare.
11811 (inferior::terminal_state): New.
11812 * inflow.c (struct terminal_info): Update comments.
11813 (inferior_process_group): Delete.
11814 (terminal_is_ours): Delete.
11815 (gdb_tty_state): New.
11816 (child_terminal_init): Adjust.
11817 (is_gdb_terminal, sharing_input_terminal_1)
11818 (sharing_input_terminal): New functions.
11819 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11820 Set the process's actual process group in the foreground if
11821 possible. Handle is_ours_for_output/is_ours distinction. Don't
11822 mark terminal as the inferior's if not sharing GDB's terminal.
11823 Don't check attach_flag.
11824 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11825 pass down a target_terminal_state.
11826 (child_terminal_save_inferior): New, factored out from ...
11827 (child_terminal_ours_1): ... this. Handle
11828 target_terminal_state::is_ours_for_output.
11829 (child_interrupt, child_pass_ctrlc): New.
11830 (inflow_inferior_exit): Clear the inferior's terminal_state.
11831 (copy_terminal_info): Copy the inferior's terminal state.
11832 (_initialize_inflow): Remove reference to terminal_is_ours.
11833 * inflow.h (inferior_process_group): Delete.
11834 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11835 * procfs.c (procfs_target): Don't install procfs_interrupt.
11836 (procfs_interrupt): Delete.
11837 * remote.c (remote_serial_quit_handler): Adjust.
11838 (remote_interrupt): Remove ptid parameter. Adjust.
11839 * target-delegates.c: Regenerate.
11840 * target.c: Include "terminal.h".
11841 (target_terminal::terminal_state): Rename to ...
11842 (target_terminal::m_terminal_state): ... this.
11843 (target_terminal::init): Adjust.
11844 (target_terminal::inferior): Adjust to per-inferior
11845 terminal_state.
11846 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11847 (target_terminal::ours, target_terminal::ours_for_output): Use
11848 target_terminal_is_ours_kind.
11849 (target_interrupt): Remove ptid parameter. Adjust.
11850 (default_target_pass_ctrlc): Adjust.
11851 * target.h (target_ops::to_terminal_save_inferior): New field.
11852 (target_ops::to_interrupt): Remove ptid_t parameter.
11853 (target_interrupt): Remove ptid_t parameter. Update comment.
11854 (target_pass_ctrlc): Update comment.
11855 * target/target.h (target_terminal_state): New scoped enum,
11856 factored out of ...
11857 (target_terminal::terminal_state): ... here.
11858 (target_terminal::inferior): Update comments.
11859 (target_terminal::restore_inferior): New.
11860 (target_terminal::is_inferior, target_terminal::is_ours)
11861 (target_terminal::is_ours_for_output): Adjust.
11862 (target_terminal::scoped_restore_terminal_state): Adjust to
11863 rename, and call restore_inferior() instead of inferior().
11864 (target_terminal::scoped_restore_terminal_state::m_state): Change
11865 type.
11866 (target_terminal::terminal_state): Rename to ...
11867 (target_terminal::m_terminal_state): ... this and change type.
11868
11869 2018-01-30 Pedro Alves <palves@redhat.com>
11870
11871 * linux-nat.c (wait_for_signal): New function.
11872 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11873 directly.
11874 (async_terminal_is_ours)
11875 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11876 (linux_nat_add_target): Don't override
11877 to_terminal_inferior/to_terminal_ours.
11878
11879 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11880
11881 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11882
11883 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11884
11885 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11886 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11887 dwarf2_per_objfile_free here.
11888 (dwarf2_per_objfile_free): Remove.
11889 (_initialize_dwarf2_read): Don't register
11890 dwarf2_per_objfile_free as a registry cleanup.
11891
11892 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11893
11894 Avoid compilation errors in MinGW native builds
11895
11896 The error is triggered by including python-internal.h, and the
11897 error message is:
11898
11899 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11900 from build-gnulib/import/math.h:27,
11901 from d:/usr/Python26/include/pyport.h:235,
11902 from d:/usr/Python26/include/Python.h:58,
11903 from python/python-internal.h:94,
11904 from python/py-arch.c:24:
11905 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11906 using ::hypot;
11907 ^~~~~
11908
11909 This happens because Python headers define 'hypot' to expand t
11910 '_hypot' in the Windows builds.
11911 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11912 'hypoth'. This avoids a compilation error.
11913
11914 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11915
11916 * MAINTAINERS (Write After Approval): Fix ordering.
11917
11918 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11919
11920 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11921
11922 2018-01-26 Alan Modra <amodra@gmail.com>
11923
11924 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11925 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11926 Remove nop. Make const. Comment.
11927 (powerpc32_plt_stub_so_2): New.
11928 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11929 Correct count. Update uses.
11930 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11931 Move common code reading PLT entry word. Correct
11932 powerpc32_plt_stub PLT address calculation.
11933 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11934 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11935 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11936 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11937 (ppc64_standard_linkage8): Likewise.
11938 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11939 Correct insns description.
11940 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11941
11942 2018-01-24 Pedro Alves <palves@redhat.com>
11943
11944 GCC PR libstdc++/83906
11945 * gdbtypes.c (operator==(const dynamic_prop &,
11946 const dynamic_prop &)): New.
11947 (operator==(const range_bounds &, const range_bounds &)): New.
11948 (check_types_equal): Use them instead of memcmp.
11949 * gdbtypes.h (operator==(const dynamic_prop &,
11950 const dynamic_prop &)): Declare.
11951 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11952 (operator==(const range_bounds &, const range_bounds &)): Declare.
11953 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11954
11955 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11956
11957 * s390-linux-tdep.c (s390_record_address_mask)
11958 (s390_record_calc_disp_common, s390_record_calc_disp)
11959 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11960 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11961 (s390_process_record): Move to s390-tdep.c.
11962 (s390_linux_init_abi_any): Adjust.
11963 * s390-tdep.c (s390_record_address_mask)
11964 (s390_record_calc_disp_common, s390_record_calc_disp)
11965 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11966 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11967 (s390_process_record): Moved from s390-linux-tdep.c
11968 (s390_gdbarch_init): Adjust.
11969
11970 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11971
11972 * s390-linux-nat.c (s390-tdep.h): New include.
11973 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11974 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11975 (ALLDEPFILES): Add s390-tdep.c.
11976 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11977 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11978 * s390-tdep.h: ...this. New file.
11979 * s390-linux-tdep.c (s390-tdep.h): New include.
11980 (_initialize_s390_tdep): Rename to...
11981 (_initialize_s390_linux_tdep): ...this and adjust.
11982 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11983 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11984 s390-tdep.h.
11985 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11986 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11987 (s390_is_partial_instruction, s390_software_single_step)
11988 (is_non_branch_ril, s390_displaced_step_copy_insn)
11989 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11990 (s390_prologue_data, s390_addr, s390_store, s390_load)
11991 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11992 (s390_register_call_saved, s390_guess_tracepoint_registers)
11993 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11994 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11995 (s390_pseudo_register_name, s390_pseudo_register_type)
11996 (s390_pseudo_register_read, s390_pseudo_register_write)
11997 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11998 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11999 (s390_addr_bits_remove, s390_address_class_type_flags)
12000 (s390_address_class_type_flags_to_name)
12001 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12002 (s390_function_arg_float, s390_function_arg_vector)
12003 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12004 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12005 (s390_frame_align, s390_register_return_value, s390_return_value)
12006 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12007 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12008 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12009 (s390_trad_frame_prev_register, s390_unwind_cache)
12010 (s390_prologue_frame_unwind_cache)
12011 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12012 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12013 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12014 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12015 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12016 (s390_frame_base_address, s390_local_base_address)
12017 (s390_frame_base, s390_gcc_target_options)
12018 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12019 (s390_validate_reg_range, s390_tdesc_valid)
12020 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12021 * s390-tdep.c: ...this. New file.
12022
12023 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12024
12025 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12026 (s390_process_record, s390_gdbarch_tdep_alloc)
12027 (s390_linux_init_abi_any): Use/set new hook.
12028
12029 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12030
12031 * s390-linux-tdep.c (osabi.h): New include.
12032 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12033 (s390_linux_init_abi_any): New functions.
12034 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12035
12036 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12037
12038 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12039 tdesc_has_registers check
12040
12041 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12042
12043 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12044 (s390_validate_reg_range): New macro.
12045 (s390_gdbarch_init): Adjust.
12046
12047 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12048
12049 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12050 (s390_gdbarch_tdep_alloc): Adjust.
12051 (s390_gdbarch_init): Adjust.
12052
12053 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12054
12055 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12056 <have_tdb>: Change type to bool.
12057 (s390_gdbarch_tdep_alloc): Adjust.
12058 (s390_gdbarch_init): Adjust.
12059
12060 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12061
12062 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12063 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12064 (s390_gdbarch_tdep_alloc): New function.
12065 (s390_gdbarch_init): Allocate tdep at start and use its fields
12066 instead of separate variables.
12067
12068 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12069
12070 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12071 when looking for cached gdbarch and add comment for remaining.
12072
12073 2018-01-22 Pedro Alves <palves@redhat.com>
12074 Sergio Durigan Junior <sergiodj@redhat.com>
12075
12076 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12077 case.
12078
12079 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12080
12081 * MAINTAINERS: Update my company e-mail address.
12082
12083 2018-01-22 Yao Qi <yao.qi@linaro.org>
12084
12085 * regcache.c (cooked_write_test): New function.
12086 (_initialize_regcache): Register the test.
12087
12088 2018-01-22 Yao Qi <yao.qi@linaro.org>
12089
12090 * ia64-tdep.c (ia64_pseudo_register_read): Call
12091 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12092 * m32c-tdep.c (m32c_cat_read): Likewise.
12093 (m32c_r3r2r1r0_read): Likewise.
12094 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12095 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12096
12097 2018-01-22 Yao Qi <yao.qi@linaro.org>
12098
12099 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12100 method raw_read instead of regcache_raw_read.
12101 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12102 * arm-tdep.c (arm_neon_quad_read): Likewise.
12103 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12104 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12105 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12106 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12107 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12108 (i386_pseudo_register_read_into_value): Likewise.
12109 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12110 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12111 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12112 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12113 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12114 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12115 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12116 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12117 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12118
12119 2018-01-22 Yao Qi <yao.qi@linaro.org>
12120
12121 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12122 * configure.tgt: Remove target mt.
12123 * mt-tdep.c: Remove.
12124 * regcache.c (cooked_read_test): Remove the check for mt.
12125
12126 2018-01-22 Yao Qi <yao.qi@linaro.org>
12127
12128 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12129 instead of gdbarch_pseudo_register_read_value.
12130
12131 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12132
12133 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12134 language is Ada.
12135
12136 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12137
12138 * linespec.c (create_sals_line_offset): Remove code that preserved
12139 the symtab_and_line's line number.
12140
12141 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12142
12143 * varobj.c (varobj_create): Don't set valid_block when creating a
12144 floating varobj.
12145
12146 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12147
12148 * varobj.c (varobj_create): Remove out of date comment.
12149
12150 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12151
12152 PR mi/20395
12153 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12154 updating innermost block.
12155 * parse.c (innermost_block_tracker::update): Take extra type
12156 parameter, and check types match before updating innermost block.
12157 (write_dollar_variable): Update innermost block for registers.
12158 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12159 (innermost_block_tracker::innermost_block_tracker): Initialise
12160 m_types member.
12161 (innermost_block_tracker::reset): Take type parameter.
12162 (innermost_block_tracker::update): Take type parameter, and pass
12163 type through as needed.
12164 (innermost_block_tracker::m_types): New member.
12165 * varobj.c (varobj_create): Pass type when reseting innermost
12166 block.
12167
12168 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12169
12170 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12171 * ada-lang.c (resolve_subexp): Likewise.
12172 * breakpoint.c (set_breakpoint_condition) Likewise.
12173 (watch_command_1) Likewise.
12174 * c-exp.y (variable): Likewise.
12175 * d-exp.y (PrimaryExpression): Likewise.
12176 * f-exp.y (variable): Likewise.
12177 * go-exp.y (variable): Likewise.
12178 * m2-exp.y (variable): Likewise.
12179 * objfiles.c (objfile::~objfile): Likewise.
12180 * p-exp.y (variable): Likewise.
12181 * parse.c (innermost_block): Change type.
12182 * parser-defs.h (class innermost_block_tracker): New.
12183 (innermost_block): Change to innermost_block_tracker.
12184 * printcmd.c (display_command): Switch to innermost_block API.
12185 (do_one_display): Likewise.
12186 * rust-exp.y (do_one_display): Likewise.
12187 * symfile.c (clear_symtab_users): Likewise.
12188 * varobj.c (varobj_create): Switch to innermost_block API, replace
12189 use of innermost_block with block stored on varobj object.
12190
12191 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12192
12193 * expression.h (innermost_block): Remove declaration.
12194 * varobj.c: Add 'parser-defs.h' include.
12195
12196 2018-01-19 Tom Tromey <tom@tromey.com>
12197
12198 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12199 symbols in the static and global blocks.
12200
12201 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12202
12203 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12204 gdb_ptrace.h, and move including gdb_wait.h ...
12205 * nat/linux-ptrace.h: ... to here.
12206
12207 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12208
12209 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12210 inf_ptrace_detach_success.
12211 (inf_ptrace_detach_success): Add inferior parameter, use it
12212 instead of inferior_ptid, pass it to detach_inferior.
12213 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12214 parameter.
12215 * inferior.c (detach_inferior): Add overload that takes an
12216 inferior object.
12217 * inferior.h (detach_inferior): Likewise.
12218 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12219 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12220 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12221
12222 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12223
12224 * target.h (struct target_ops) <to_detach>: Add inferior
12225 parameter.
12226 (target_detach): Likewise.
12227 * target.c (dispose_inferior): Pass inferior down.
12228 (target_detach): Pass inferior down. Assert that it is equal to
12229 the current inferior.
12230 * aix-thread.c (aix_thread_detach): Pass inferior down.
12231 * corefile.c (core_file_command): Pass current_inferior() down.
12232 * corelow.c (core_detach): Add inferior parameter.
12233 * darwin-nat.c (darwin_detach): Likewise.
12234 * gnu-nat.c (gnu_detach): Likewise.
12235 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12236 * infcmd.c (detach_command): Pass current_inferior() down to
12237 target_detach.
12238 * infrun.c (follow_fork_inferior): Pass parent_inf to
12239 target_detach.
12240 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12241 target_detach.
12242 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12243 * linux-thread-db.c (thread_db_detach): Likewise.
12244 * nto-procfs.c (procfs_detach): Likewise.
12245 * procfs.c (procfs_detach): Likewise.
12246 * record.c (record_detach): Likewise.
12247 * record.h (struct inferior): Forward-declare.
12248 (record_detach): Add inferior parameter.
12249 * remote-sim.c (gdbsim_detach): Likewise.
12250 * remote.c (remote_detach_1): Likewise.
12251 (remote_detach): Likewise.
12252 (extended_remote_detach): Likewise.
12253 * sol-thread.c (sol_thread_detach): Likewise.
12254 * target-debug.h (target_debug_print_inferior_p): New macro.
12255 * target-delegates.c: Re-generate.
12256 * top.c (kill_or_detach): Pass inferior down to target_detach.
12257 * windows-nat.c (windows_detach): Add inferior parameter.
12258
12259 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12260
12261 * target.h (struct target_ops) <to_detach>: Remove args
12262 parameter.
12263 (target_detach): Likewise.
12264 * target.c (dispose_inferior): Adjust.
12265 (target_detach): Remove args parameter, adjust.
12266 * aix-thread.c (aix_thread_detach): Adjust.
12267 * corefile.c (core_file_command): Adjust.
12268 * corelow.c (core_detach): Adjust.
12269 * darwin-nat.c (darwin_detach): Adjust.
12270 * gnu-nat.c (gnu_detach): Adjust.
12271 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12272 * infcmd.c (detach_command): Adjust
12273 * infrun.c (follow_fork_inferior): Adjust.
12274 (handle_vfork_child_exec_or_exit): Adjust.
12275 * linux-fork.c (linux_fork_detach): Remove args parameter.
12276 * linux-fork.h (linux_fork_detach): Likewise.
12277 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12278 * linux-thread-db.c (thread_db_detach): Likewise.
12279 * nto-procfs.c (procfs_detach): Likewise.
12280 * procfs.c (procfs_detach): Likewise.
12281 (do_detach): Remove signo parameter.
12282 * record.c (record_detach): Remove args parameter.
12283 * record.h (record_detach): Likewise.
12284 * remote-sim.c (gdbsim_detach): Likewise.
12285 * remote.c (remote_detach_1): Likewise.
12286 (remote_detach): Likewise.
12287 (extended_remote_detach): Likewise.
12288 * sol-thread.c (sol_thread_detach): Likewise.
12289 * target-delegates.c: Re-generate.
12290 * top.c (struct qt_args) <args>: Remove field.
12291 (kill_or_detach): Don't pass args.
12292 (quit_force): Don't set args.
12293 * windows-nat.c (windows_detach): Remove args parameter.
12294
12295 2018-01-19 Yao Qi <yao.qi@linaro.org>
12296
12297 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12298 (arm_linux_init_abi): Install it.
12299
12300 2018-01-19 Yao Qi <yao.qi@linaro.org>
12301
12302 * osabi.c (gdb_osabi_names): Extend the regexp for
12303 arm-linux-gnueabihf.
12304
12305 2018-01-18 Yao Qi <yao.qi@linaro.org>
12306
12307 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12308 m_abbrevs.
12309 (abbrev_table::add_abbrev): Update.
12310 (abbrev_table::lookup_abbrev): Update.
12311
12312 2018-01-18 Yao Qi <yao.qi@linaro.org>
12313
12314 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12315
12316 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12317
12318 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12319 to "std::string".
12320
12321 2018-01-17 Tom Tromey <tom@tromey.com>
12322
12323 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12324
12325 2018-01-17 Tom Tromey <tom@tromey.com>
12326
12327 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12328 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12329 (create_array_type_with_stride): Update.
12330 * dwarf2read.c (set_die_type): Update.
12331
12332 2018-01-17 Tom Tromey <tom@tromey.com>
12333
12334 * dwarf2read.c (delayed_method_info): Remove typedef.
12335 (dwarf2_cu::method_info): Now a std::vector.
12336 (add_to_method_list): Update.
12337 (free_delayed_list): Remove.
12338 (compute_delayed_physnames): Update.
12339 (process_full_comp_unit, process_full_type_unit): Clear the method
12340 list. Remove cleanups.
12341 (psymtab_include_file_name): Add name_holder parameter. Use
12342 unique_xmalloc_ptr.
12343 (dwarf_decode_lines): Update.
12344
12345 2018-01-17 Tom Tromey <tom@tromey.com>
12346 Simon Marchi <simon.marchi@ericsson.com>
12347
12348 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12349 (dwarf2_per_objfile::free_cached_comp_units)
12350 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12351 (init_cutu_and_read_dies_no_follow): Update.
12352 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12353 (dwarf2_cu::~dwarf2_cu): New.
12354 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12355 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12356
12357 2018-01-17 Tom Tromey <tom@tromey.com>
12358 Simon Marchi <simon.marchi@ericsson.com>
12359
12360 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12361 (struct die_reader_specs) <abbrev_table>: New member.
12362 (struct abbrev_table): Add constructor.
12363 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12364 <abbrev_obstack>: Now an auto_obstack.
12365 (abbrev_table_up): New typedef.
12366 (init_cu_die_reader): Add abbrev_table parameter.
12367 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12368 Add result_dwo_abbrev_table.
12369 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12370 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12371 Update.
12372 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12373 parameter.
12374 (skip_children): Update.
12375 (abbrev_table::alloc_abbrev): Rename from
12376 abbrev_table_alloc_abbrev.
12377 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12378 (abbrev_table::lookup_abbrev): Rename from
12379 abbrev_table_lookup_abbrev.
12380 (abbrev_table_read_table): Return abbrev_table_up.
12381 (abbrev_table_free, abbrev_table_free_cleanup)
12382 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12383 (load_partial_dies): Update.
12384
12385 2018-01-17 Tom Tromey <tom@tromey.com>
12386
12387 * dwarf2read.c (dwarf2_compute_name): Update comment.
12388 (read_func_scope, read_variable): Update.
12389 (new_symbol): Remove.
12390 (new_symbol_full): Rename to new_symbol.
12391
12392 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12393
12394 PR gdb/16577
12395 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12396 a warning instead of throwing an error, set section size to 0 and return
12397 NULL.
12398 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12399
12400 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12401
12402 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12403 std::string.
12404 (linux_ptrace_attach_fail_reason_string): Likewise.
12405 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12406 Likewise.
12407 (linux_ptrace_attach_fail_reason_string): Likewise.
12408 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12409
12410 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12411
12412 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12413
12414 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12415
12416 PR gdb/21559
12417 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12418 checking for fs_base/gs_base fields in struct user_regs_struct.
12419 * configure: Regenerate.
12420
12421 2018-01-17 Yao Qi <yao.qi@linaro.org>
12422
12423 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12424 function.
12425 (aarch64_linux_init_abi): Install it to gdbarch hook
12426 gcc_target_options.
12427
12428 2018-01-15 Pedro Alves <palves@redhat.com>
12429
12430 * common/signals-state-save-restore.c
12431 (save_original_signals_state): Fix typos.
12432
12433 2017-01-12 Tom Tromey <tom@tromey.com>
12434 Sergio Durigan Junior <sergiodj@redhat.com>
12435
12436 * Makefile.in (install-only): Install gdb-add-index.
12437
12438 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12439
12440 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12441
12442 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12443
12444 * infrun.c (keep_going_pass_signal): Clear step-over info when
12445 insert_breakpoints fails.
12446
12447 2018-01-11 Pedro Alves <palves@redhat.com>
12448
12449 PR gdb/22583
12450 * infrun.c (resume): Rename to ...
12451 (resume_1): ... this.
12452 (resume): Reimplement as wrapper around resume_1.
12453
12454 2018-01-11 Pedro Alves <palves@redhat.com>
12455
12456 PR remote/22597
12457 * remote.c (remote_parse_stop_reply): Default to the last-set
12458 general thread instead of to 'magic_null_ptid'.
12459
12460 2018-01-10 Pedro Alves <palves@redhat.com>
12461
12462 * language.h (language_get_symbol_name_matcher): Rename ...
12463 (get_symbol_name_matcher): ... this.
12464 * language.c (language_get_symbol_name_matcher): Ditto.
12465 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12466 callers adjusted.
12467
12468 2018-01-10 Pedro Alves <palves@redhat.com>
12469
12470 PR gdb/22670
12471 * dwarf2read.c
12472 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12473 Adjust to use language_get_symbol_name_matcher instead of
12474 language_defn::la_get_symbol_name_matcher.
12475 * language.c (language_get_symbol_name_matcher): If in Ada mode
12476 and the lookup name is a verbatim match, return Ada's matcher.
12477 * language.h (language_get_symbol_name_matcher): Adjust comment.
12478 (ada_lookup_name_info::verbatim_p):: New method.
12479
12480 2018-01-10 Pedro Alves <palves@redhat.com>
12481
12482 PR gdb/22670
12483 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12484 minsym's language is language_auto or language_cplus, pass down
12485 language_ada instead.
12486 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12487
12488 2018-01-10 Pedro Alves <palves@redhat.com>
12489
12490 PR gdb/22670
12491 * minsyms.c (linkage_name_str): New function.
12492 (iterate_over_minimal_symbols): Use it.
12493
12494 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12495
12496 * NEWS: Document that 'info proc' now works on FreeBSD.
12497
12498 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12499
12500 * configure.ac: Check for kinfo_getfile in libutil.
12501 * configure: Regenerate.
12502 * config.in: Regenerate.
12503 * fbsd-nat.c: Include "fbsd-tdep.h".
12504 (fbsd_fetch_cmdline): New.
12505 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12506 rather than calling error.
12507 (fbsd_info_proc): New.
12508 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12509 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12510 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12511
12512 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12513
12514 * fbsd-nat.c (struct free_deleter): Remove.
12515 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12516
12517 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12518
12519 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12520 NULL for an empty pathname.
12521
12522 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12523
12524 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12525 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12526 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12527 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12528 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12529 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12530 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12531 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12532 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12533 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12534 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12535 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12536 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12537 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12538 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12539
12540 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12541
12542 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12543 (gnu_xfer_auxv): New function.
12544 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12545 TARGET_OBJECT_AUXV.
12546
12547 2018-01-08 Yao Qi <yao.qi@linaro.org>
12548 Simon Marchi <simon.marchi@ericsson.com>
12549
12550 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12551 common/selftest.c.
12552 (COMMON_OBS): Remove selftest.o.
12553 * configure.ac: Append selftest-arch.c and common/selftest.c to
12554 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12555 * configure: Re-generated.
12556 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12557 GDB_SELF_TEST.
12558 (maintenance_info_selftests): Likewise.
12559
12560 2018-01-08 Xavier Roirand <roirand@adacore.com>
12561
12562 * ada-valprint.c (val_print_packed_array_elements): Use
12563 proper number of elements when printing an array indexed
12564 by an enumeration type.
12565
12566 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12567
12568 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12569 (dw2_get_file_names_reader): Adjust.
12570 (lookup_dwo_signatured_type): Adjust.
12571 (lookup_dwp_signatured_type): Adjust.
12572 (lookup_signatured_type): Adjust.
12573 (create_type_unit_group): Adjust.
12574 (get_type_unit_group): Adjust.
12575 (process_psymtab_comp_unit_reader): Adjust.
12576 (build_type_psymtabs_reader): Adjust.
12577 (scan_partial_symbols): Adjust.
12578 (add_partial_symbol): Adjust.
12579 (add_partial_subprogram): Adjust.
12580 (peek_die_abbrev): Adjust.
12581 (fixup_go_packaging): Adjust.
12582 (process_imported_unit_die): Adjust.
12583 (dwarf2_compute_name): Adjust.
12584 (dwarf2_physname): Adjust.
12585 (read_import_statement): Adjust.
12586 (handle_DW_AT_stmt_list): Adjust.
12587 (read_file_scope): Adjust.
12588 (read_func_scope): Adjust.
12589 (read_lexical_block_scope): Adjust.
12590 (read_call_site_scope): Adjust.
12591 (read_variable): Adjust.
12592 (dwarf2_rnglists_process): Adjust.
12593 (dwarf2_ranges_process): Adjust.
12594 (dwarf2_ranges_read): Adjust.
12595 (dwarf2_get_pc_bounds): Adjust.
12596 (dwarf2_record_block_ranges): Adjust.
12597 (dwarf2_add_field): Adjust.
12598 (dwarf2_add_member_fn): Adjust.
12599 (read_structure_type): Adjust.
12600 (process_structure_scope): Adjust.
12601 (read_enumeration_type): Adjust.
12602 (read_array_type): Adjust.
12603 (mark_common_block_symbol_computed): Adjust.
12604 (read_common_block): Adjust.
12605 (read_namespace_type): Adjust.
12606 (read_namespace): Adjust.
12607 (read_module_type): Adjust.
12608 (read_tag_pointer_type): Adjust.
12609 (read_tag_ptr_to_member_type): Adjust.
12610 (read_tag_string_type): Adjust.
12611 (read_subroutine_type): Adjust.
12612 (read_typedef): Adjust.
12613 (read_base_type): Adjust.
12614 (attr_to_dynamic_prop): Adjust.
12615 (read_subrange_type): Adjust.
12616 (read_unspecified_type): Adjust.
12617 (dwarf2_read_abbrevs): Adjust.
12618 (load_partial_dies): Adjust.
12619 (read_partial_die): Adjust.
12620 (find_partial_die): Adjust.
12621 (guess_partial_die_structure_name): Adjust.
12622 (fixup_partial_die): Adjust.
12623 (read_attribute_value): Adjust.
12624 (read_addr_index): Adjust.
12625 (read_addr_index_from_leb128): Adjust.
12626 (read_str_index): Adjust.
12627 (dwarf2_string_attr): Adjust.
12628 (get_debug_line_section): Adjust.
12629 (dwarf_decode_line_header): Adjust.
12630 (lnp_state_machine::check_line_address): Adjust.
12631 (dwarf_decode_lines_1): Adjust.
12632 (dwarf_decode_lines): Adjust.
12633 (dwarf2_start_symtab): Adjust.
12634 (var_decode_location): Adjust.
12635 (new_symbol_full): Adjust.
12636 (dwarf2_const_value_data): Adjust.
12637 (dwarf2_const_value_attr): Adjust.
12638 (dwarf2_const_value): Adjust.
12639 (die_type): Adjust.
12640 (die_containing_type): Adjust.
12641 (build_error_marker_type): Adjust.
12642 (lookup_die_type): Adjust.
12643 (guess_full_die_structure_name): Adjust.
12644 (anonymous_struct_prefix): Adjust.
12645 (determine_prefix): Adjust.
12646 (dwarf2_name): Adjust.
12647 (follow_die_ref_or_sig): Adjust.
12648 (follow_die_offset): Adjust.
12649 (follow_die_ref): Adjust.
12650 (follow_die_sig_1): Adjust.
12651 (follow_die_sig): Adjust.
12652 (get_signatured_type): Adjust.
12653 (get_DW_AT_signature_type): Adjust.
12654 (decode_locdesc): Adjust.
12655 (dwarf_decode_macros): Adjust.
12656 (cu_debug_loc_section): Adjust.
12657 (fill_in_loclist_baton): Adjust.
12658 (dwarf2_symbol_mark_computed): Adjust.
12659 (init_one_comp_unit): Don't assign
12660 dwarf2_cu::dwarf2_per_objfile.
12661 (set_die_type): Adjust.
12662
12663 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12664
12665 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12666 <dwarf2_per_objfile>: New field.
12667 (dwarf2_per_objfile): Remove global.
12668 (get_dwarf2_per_objfile): New function.
12669 (set_dwarf2_per_objfile): New function.
12670 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12671 dwarf2_per_objfile.
12672 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12673 (read_abbrev_offset): Likewise.
12674 (read_indirect_string): Likewise.
12675 (read_indirect_line_string): Likewise.
12676 (read_indirect_string_at_offset): Likewise.
12677 (read_indirect_string_from_dwz): Likewise.
12678 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12679 dwarf2_per_objfile.
12680 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12681 (create_all_comp_units): Change objfile parameter to
12682 dwarf2_per_objfile.
12683 (create_all_type_units): Likewise.
12684 (process_queue): Add dwarf2_per_objfile parameter.
12685 (read_and_check_comp_unit_head): Likewise.
12686 (lookup_dwo_unit_in_dwp): Likewise.
12687 (get_dwp_file): Likewise.
12688 (process_cu_includes): Likewise.
12689 (struct free_dwo_file_cleanup_data): New struct.
12690 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12691 set_dwarf2_per_objfile.
12692 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12693 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12694 context, adjust calls.
12695 (dw2_instantiate_symtab): Likewise.
12696 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12697 (dw2_get_cu): Likewise.
12698 (create_cu_from_index_list): Change objfile parameter to
12699 dwarf2_per_objfile.
12700 (create_cus_from_index_list): Get dwarf2_per_objfile from
12701 context, adjust calls.
12702 (create_cus_from_index): Likewise.
12703 (create_signatured_type_table_from_index): Change objfile
12704 parameter to dwarf2_per_objfile.
12705 (create_signatured_type_table_from_debug_names): Change objfile
12706 parameter to dwarf2_per_objfile.
12707 (create_addrmap_from_index): Likewise.
12708 (create_addrmap_from_aranges): Likewise.
12709 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12710 (dw2_setup): Remove.
12711 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12712 context.
12713 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12714 get_dwarf2_per_objfile.
12715 (dw2_forget_cached_source_info): Likewise.
12716 (dw2_map_symtabs_matching_filename): Likewise.
12717 (struct dw2_symtab_iterator) <index>: Remove.
12718 <dwarf2_per_objfile>: New field.
12719 (dw2_symtab_iter_init): Replace index parameter with
12720 dwarf2_per_objfile.
12721 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12722 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12723 (dw2_print_stats): Likewise.
12724 (dw2_dump): Likewise.
12725 (dw2_expand_symtabs_for_function): Likewise.
12726 (dw2_expand_all_symtabs): Likewise.
12727 (dw2_expand_symtabs_with_fullname): Likewise.
12728 (dw2_expand_marked_cus): Replace index and objfile parameters
12729 with dwarf2_per_objfile.
12730 (dw_expand_symtabs_matching_file_matcher): Add
12731 dwarf2_per_objfile parameter and adjust calls.
12732 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12733 adjust calls.
12734 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12735 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12736 adjust calls.
12737 (create_cus_from_debug_names_list): Replace objfile parameter
12738 with dwarf2_per_objfile and adjust calls.
12739 (create_cus_from_debug_names): Likewise.
12740 (dwarf2_read_debug_names): Likewise.
12741 (mapped_debug_names::namei_to_name): Adjust call.
12742 (dw2_debug_names_iterator::next): Likewise.
12743 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12744 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12745 (dw2_debug_names_dump): Likewise.
12746 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12747 (dw2_debug_names_expand_symtabs_matching): Likewise.
12748 (dwarf2_initialize_objfile): Likewise.
12749 (dwarf2_build_psymtabs): Likewise.
12750 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12751 this_cu.
12752 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12753 (read_and_check_comp_unit_head): Likewise.
12754 (read_abbrev_offset): Likewise.
12755 (create_debug_type_hash_table): Likewise.
12756 (create_debug_types_hash_table): Likewise.
12757 (create_all_type_units): Replace objfile parameter with
12758 dwarf2_per_objfile.
12759 (add_type_unit): Add dwarf2_per_objfile parameter.
12760 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12761 with dwarf2_per_objfile.
12762 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12763 (lookup_dwp_signatured_type): Likewise.
12764 (lookup_signatured_type): Likewise.
12765 (read_cutu_die_from_dwo): Likewise.
12766 (init_tu_and_read_dwo_dies): Likewise.
12767 (init_cutu_and_read_dies): Likewise.
12768 (init_cutu_and_read_dies_no_follow): Likewise.
12769 (allocate_type_unit_groups_table): Add objfile parameter.
12770 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12771 (get_type_unit_group): Likewise.
12772 (process_psymtab_comp_unit): Update call.
12773 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12774 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12775 (print_tu_stats): Likewise.
12776 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12777 in void* parameter.
12778 (build_type_psymtabs): Change objfile parameter to
12779 dwarf2_per_objfile.
12780 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12781 passed in void* parameter.
12782 (process_skeletonless_type_units): Change objfile parameter to
12783 dwarf2_per_objfile.
12784 (set_partial_user): Likewise.
12785 (dwarf2_build_psymtabs_hard): Likewise.
12786 (read_comp_units_from_section): Likewise.
12787 (create_all_comp_units): Likewise.
12788 (scan_partial_symbols): Update calls.
12789 (add_partial_symbol): Likewise.
12790 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12791 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12792 (process_queue): Add dwarf2_per_objfile parameter.
12793 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12794 (compute_compunit_symtab_includes): Likewise.
12795 (process_cu_includes): Add dwarf2_per_objfile parameter.
12796 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12797 (process_full_type_unit): Likewise.
12798 (process_imported_unit_die): Update call.
12799 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12800 (read_file_scope): Likewise.
12801 (allocate_dwo_file_hash_table): Add objfile parameter.
12802 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12803 (create_cus_hash_table): Likewise.
12804 (create_dwp_hash_table): Likewise.
12805 (create_dwo_unit_in_dwp_v1): Likewise.
12806 (create_dwp_v2_section): Likewise.
12807 (create_dwo_unit_in_dwp_v2): Likewise.
12808 (lookup_dwo_unit_in_dwp): Likewise.
12809 (try_open_dwop_file): Likewise.
12810 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12811 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12812 cleanup to include a reference to dwarf2_per_objfile.
12813 (open_dwp_file): Add dwarf2_per_objfile parameter.
12814 (open_and_init_dwp_file): Likewise.
12815 (get_dwp_file): Likewise.
12816 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12817 (queue_and_load_all_dwo_tus): Update call.
12818 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12819 data.
12820 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12821 (dwarf2_ranges_process): Likewise.
12822 (dwarf2_get_pc_bounds): Likewise.
12823 (mark_common_block_symbol_computed): Likewise.
12824 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12825 (dwarf2_read_abbrevs): Update call.
12826 (read_partial_die): Use dwarf2_per_objfile from cu.
12827 (find_partial_die): Likewise.
12828 (fixup_partial_die): Likewise.
12829 (read_attribute_value): Likewise.
12830 (read_indirect_string_at_offset_from): Add objfile parameter.
12831 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12832 parameter.
12833 (read_indirect_string_from_dwz): Add objfile parameter.
12834 (read_indirect_string): Add objfile parameter.
12835 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12836 (read_addr_index): Use dwarf2_per_objfile from cu.
12837 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12838 call dw2_setup.
12839 (read_str_index): Use dwarf2_per_objfile from cu.
12840 (get_debug_line_section): Likewise.
12841 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12842 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12843 (new_symbol_full): Use dwarf2_per_objfile from cu.
12844 (build_error_marker_type): Likewise.
12845 (lookup_die_type): Likewise.
12846 (determine_prefix): Likewise.
12847 (follow_die_offset): Likewise.
12848 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12849 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12850 (dwarf2_fetch_die_type_sect_off): Likewise.
12851 (dwarf2_get_die_type): Likewise.
12852 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12853 (get_signatured_type): Likewise.
12854 (get_DW_AT_signature_type): Likewise.
12855 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12856 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12857 (cu_debug_loc_section): Likewise.
12858 (fill_in_loclist_baton): Likewise.
12859 (dwarf2_symbol_mark_computed): Likewise.
12860 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12861 dwarf2_per_objfile.
12862 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12863 parameter.
12864 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12865 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12866 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12867 (set_die_type): Use dwarf2_free_objfile from cu.
12868 (get_die_type_at_offset): Likewise.
12869 (dwarf2_per_objfile_free): Don't assign global variable.
12870 (debug_names) <constructor>: Add dwarf2_per_objfile
12871 parameter, update m_debugstrlookup construction.
12872 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12873 parameter.
12874 <m_dwarf2_per_objfile>: New field.
12875 <lookup>: Use m_dwarf2_per_objfile.
12876 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12877 (psyms_seen_size): Likewise.
12878 (write_gdbindex): Replace objfile parameter with
12879 dwarf2_per_objfile.
12880 (write_debug_names): Likewise.
12881 (write_psymtabs_to_index): Likewise.
12882 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12883 calls.
12884
12885 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12886
12887 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12888 <dwarf2_per_objfile>: New field.
12889 (struct dwarf2_per_cu_data) <objfile>: Remove.
12890 <dwarf2_per_objfile>: New field.
12891 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12892 of objfile.
12893 (create_signatured_type_table_from_index): Likewise.
12894 (create_debug_type_hash_table): Likewise.
12895 (fill_in_sig_entry_from_dwo_entry): Likewise.
12896 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12897 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12898 objfile.
12899 (create_partial_symtab): Access objfile through
12900 dwarf2_per_objfile.
12901 (process_psymtab_comp_unit_reader): Likewise.
12902 (read_comp_units_from_section): Likewise.
12903 (scan_partial_symbols): Likewise.
12904 (add_partial_symbol): Likewise.
12905 (add_partial_subprogram): Likewise.
12906 (peek_die_abbrev): Likewise.
12907 (fixup_go_packaging): Likewise.
12908 (process_full_comp_unit): Likewise.
12909 (process_full_type_unit): Likewise.
12910 (process_imported_unit_die): Likewise.
12911 (dwarf2_compute_name): Likewise.
12912 (dwarf2_physname): Likewise.
12913 (read_import_statement): Likewise.
12914 (create_cus_hash_table): Assign dwarf2_physname instead of
12915 objfile.
12916 (read_func_scope): Access objfile through dwarf2_per_objfile.
12917 (read_lexical_block_scope): Likewise.
12918 (read_call_site_scope): Likewise.
12919 (read_variable): Likewise.
12920 (dwarf2_rnglists_process): Likewise.
12921 (dwarf2_ranges_process): Likewise.
12922 (dwarf2_ranges_read): Likewise.
12923 (dwarf2_record_block_ranges): Likewise.
12924 (dwarf2_add_field): Likewise.
12925 (dwarf2_add_member_fn): Likewise.
12926 (read_structure_type): Likewise.
12927 (process_structure_scope): Likewise.
12928 (read_enumeration_type): Likewise.
12929 (read_array_type): Likewise.
12930 (read_common_block): Likewise.
12931 (read_namespace_type): Likewise.
12932 (read_namespace): Likewise.
12933 (read_module_type): Likewise.
12934 (read_tag_pointer_type): Likewise.
12935 (read_tag_ptr_to_member_type): Likewise.
12936 (read_tag_string_type): Likewise.
12937 (read_subroutine_type): Likewise.
12938 (read_typedef): Likewise.
12939 (read_base_type): Likewise.
12940 (attr_to_dynamic_prop): Likewise.
12941 (read_subrange_type): Likewise.
12942 (read_unspecified_type): Likewise.
12943 (load_partial_dies): Likewise.
12944 (read_partial_die): Likewise.
12945 (find_partial_die): Likewise.
12946 (guess_partial_die_structure_name): Likewise.
12947 (fixup_partial_die): Likewise.
12948 (read_attribute_value): Likewise.
12949 (read_addr_index_from_leb128): Likewise.
12950 (dwarf2_read_addr_index): Likewise.
12951 (dwarf2_string_attr): Likewise.
12952 (lnp_state_machine::check_line_address): Likewise.
12953 (dwarf_decode_lines_1): Likewise.
12954 (dwarf_decode_lines): Likewise.
12955 (dwarf2_start_symtab): Likewise.
12956 (var_decode_location): Likewise.
12957 (new_symbol_full): Likewise.
12958 (dwarf2_const_value_data): Likewise.
12959 (dwarf2_const_value_attr): Likewise.
12960 (dwarf2_const_value): Likewise.
12961 (die_type): Likewise.
12962 (die_containing_type): Likewise.
12963 (lookup_die_type): Likewise.
12964 (guess_full_die_structure_name): Likewise.
12965 (anonymous_struct_prefix): Likewise.
12966 (dwarf2_name): Likewise.
12967 (follow_die_ref_or_sig): Likewise.
12968 (follow_die_offset): Likewise.
12969 (follow_die_ref): Likewise.
12970 (dwarf2_fetch_die_loc_sect_off): Likewise.
12971 (dwarf2_fetch_constant_bytes): Likewise.
12972 (dwarf2_fetch_die_type_sect_off): Likewise.
12973 (dwarf2_get_die_type): Likewise.
12974 (follow_die_sig): Likewise.
12975 (decode_locdesc): Likewise.
12976 (dwarf2_per_cu_objfile): Likewise.
12977 (dwarf2_per_cu_text_offset): Likewise.
12978 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12979 objfile.
12980 (set_die_type): Access objfile through
12981 dwarf2_per_objfile.
12982
12983 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12984
12985 * valprint.c (converted_character_d): Remove typedef.
12986 (DEF_VEC_O (converted_character_d)): Remove.
12987 (count_next_character): Use std::vector.
12988 (print_converted_chars_to_obstack): Likewise.
12989 (generic_printstr): Likewise.
12990
12991 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12992
12993 * xml-support.h (struct gdb_xml_value): Add constructor.
12994 <value>: Change type to unique_xmalloc_ptr.
12995 (gdb_xml_value_s): Remove typedef.
12996 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12997 (gdb_xml_element_start_handler): Change parameter type to
12998 std::vector.
12999 (xml_find_attribute): Likewise.
13000 * xml-support.c (xml_find_attribute): Change parameter type to
13001 std::vector and adjust.
13002 (gdb_xml_values_cleanup): Remove.
13003 (gdb_xml_parser::start_element): Adjust to std::vector.
13004 (xinclude_start_include): Change paraeter type to std::vector
13005 and adjust.
13006 * btrace.c (check_xml_btrace_version): Likewise.
13007 (parse_xml_btrace_block): Likewise.
13008 (parse_xml_btrace_pt_config_cpu): Likewise.
13009 (parse_xml_btrace_pt): Likewise.
13010 (parse_xml_btrace_conf_bts): Likewise.
13011 (parse_xml_btrace_conf_pt): Likewise.
13012 * memory-map.c (memory_map_start_memory): Likewise.
13013 (memory_map_start_property): Likewise.
13014 * osdata.c (osdata_start_osdata): Likewise.
13015 (osdata_start_item): Likewise.
13016 (osdata_start_column): Likewise.
13017 * remote.c (start_thread): Likewise.
13018 * solib-aix.c (library_list_start_library): Likewise.
13019 (library_list_start_list): Likewise.
13020 * solib-svr4.c (library_list_start_library): Likewise.
13021 (svr4_library_list_start_list): Likewise.
13022 * solib-target.c (library_list_start_segment): Likewise.
13023 (library_list_start_section): Likewise.
13024 (library_list_start_library): Likewise.
13025 (library_list_start_list): Likewise.
13026 * tracepoint.c (traceframe_info_start_memory): Likewise.
13027 (traceframe_info_start_tvar): Likewise.
13028 * xml-syscall.c (syscall_start_syscall): Likewise.
13029 * xml-tdesc.c (tdesc_start_target): Likewise.
13030 (tdesc_start_feature): Likewise.
13031 (tdesc_start_reg): Likewise.
13032 (tdesc_start_union): Likewise.
13033 (tdesc_start_struct): Likewise.
13034 (tdesc_start_flags): Likewise.
13035 (tdesc_start_enum): Likewise.
13036 (tdesc_start_field): Likewise.
13037 (tdesc_start_enum_value): Likewise.
13038 (tdesc_start_vector): Likewise.
13039
13040 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13041
13042 * extension.h (struct xmethod_worker) <clone>: Remove.
13043 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13044 Remove.
13045 (python_xmethod_worker::clone): Remove.
13046 * valops.c (find_overload_match): Use std::move instead of
13047 clone.
13048
13049 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13050
13051 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13052 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13053 <free_xmethod_worker_data>: Remove.
13054 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13055 <get_xmethod_arg_types>: Remove.
13056 <get_xmethod_result_type>: Remove.
13057 <invoke_xmethod>: Remove.
13058 * extension.c (new_xmethod_worker): Remove.
13059 (clone_xmethod_worker): Remove.
13060 (get_matching_xmethod_workers): Return void, pass std::vector by
13061 pointer.
13062 (get_xmethod_arg_types): Rename to...
13063 (xmethod_worker::get_arg_types): ... this, and adjust.
13064 (get_xmethod_result_type): Rename to...
13065 (xmethod_worker::get_result_type): ... this, and adjust.
13066 (invoke_xmethod): Remove.
13067 (free_xmethod_worker): Remove.
13068 (free_xmethod_worker_vec): Remove.
13069 * extension.h (enum ext_lang_rc): Move here from
13070 extension-priv.h.
13071 (struct xmethod_worker): Add constructor and destructor.
13072 <data>: Remove.
13073 <value>: Remove.
13074 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13075 virtual pure methods.
13076 <get_arg_types, get_result_type>: New methods.
13077 (xmethod_worker_ptr): Remove typedef.
13078 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13079 (xmethod_worker_vec): Remove typedef.
13080 (xmethod_worker_up): New typedef.
13081 (invoke_xmethod): Remove.
13082 (clone_xmethod_worker): Remove.
13083 (free_xmethod_worker): Remove.
13084 (free_xmethod_worker_vec): Remove.
13085 (get_xmethod_arg_types): Remove.
13086 (get_xmethod_result_type): Remove.
13087 * valops.c (find_method_list): Use std::vector, don't use
13088 intermediate vector.
13089 (value_find_oload_method_list): Use std::vector.
13090 (find_overload_match): Use std::vector.
13091 (find_oload_champ): Use std::vector.
13092 * value.c (value_free): Use operator delete.
13093 (value_of_xmethod): Rename to...
13094 (value_from_xmethod): ... this. Don't assign
13095 xmethod_worker::value, take rvalue-reference.
13096 (result_type_of_xmethod): Adjust.
13097 (call_xmethod): Adjust.
13098 * value.h: Include extension.h.
13099 (struct xmethod_worker): Don't forward-declare.
13100 (value_of_xmethod): Rename to...
13101 (value_from_xmethod): ... this, take rvalue-reference.
13102 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13103 (struct python_xmethod_worker): ... this, add constructor and
13104 destructor.
13105 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13106 (gdbpy_free_xmethod_worker_data): Rename to...
13107 (python_xmethod_worker::~python_xmethod_worker): ... this and
13108 adjust.
13109 (gdbpy_clone_xmethod_worker_data): Rename to...
13110 (python_xmethod_worker::clone): ... this and adjust.
13111 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13112 temporary vector.
13113 (gdbpy_get_xmethod_arg_types): Rename to...
13114 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13115 (gdbpy_get_xmethod_result_type): Rename to...
13116 (python_xmethod_worker::do_get_result_type): ... this and
13117 adjust.
13118 (gdbpy_invoke_xmethod): Rename to...
13119 (python_xmethod_worker::invoke): ... this and adjust.
13120 (new_python_xmethod_worker): Rename to...
13121 (python_xmethod_worker::python_xmethod_worker): ... this and
13122 adjust.
13123 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13124 Remove.
13125 (gdbpy_free_xmethod_worker_data): Remove.
13126 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13127 (gdbpy_get_xmethod_arg_types): Remove.
13128 (gdbpy_get_xmethod_result_type): Remove.
13129 (gdbpy_invoke_xmethod): Remove.
13130 * python/python.c (python_extension_ops): Remove obsolete
13131 callbacks.
13132
13133 2018-01-05 Pedro Alves <palves@redhat.com>
13134
13135 PR gdb/18653
13136 * common/signals-state-save-restore.c
13137 (save_original_signals_state): New parameter 'quiet'. Warn if we
13138 find a custom handler preinstalled, instead of internal erroring.
13139 But only warn if !quiet.
13140 * common/signals-state-save-restore.h
13141 (save_original_signals_state): New parameter 'quiet'.
13142 * main.c (captured_main_1): Move save_original_signals_state call
13143 after option handling, and pass QUIET.
13144
13145 2018-01-05 Pedro Alves <palves@redhat.com>
13146
13147 * spu-tdep.c (spu_catch_start): Pass
13148 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13149
13150 2018-01-05 Pedro Alves <palves@redhat.com>
13151
13152 PR gdb/22670
13153 * ada-lang.c (literal_symbol_name_matcher): New function.
13154 (ada_get_symbol_name_matcher): Use it for
13155 symbol_name_match_type::SEARCH_NAME.
13156 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13157 it down instead of assuming symbol_name_match_type::FULL.
13158 * block.h (block_lookup_symbol): New parameter 'match_type'.
13159 * c-valprint.c (print_unpacked_pointer): Use
13160 lookup_symbol_search_name instead of lookup_symbol.
13161 * compile/compile-object-load.c (get_out_value_type): Pass down
13162 symbol_name_match_type::SEARCH_NAME.
13163 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13164 symbol_name_match_type::FULL.
13165 * cp-support.c (cp_get_symbol_name_matcher): Handle
13166 symbol_name_match_type::SEARCH_NAME.
13167 * infrun.c (insert_exception_resume_breakpoint): Use
13168 lookup_symbol_search_name.
13169 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13170 * psymtab.c (maintenance_check_psymtabs): Use
13171 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13172 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13173 SYMBOL_SEARCH_NAME.
13174 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13175 if symbol_name_match_type::SEARCH_NAME.
13176 (lookup_symbol_in_language): Pass down
13177 symbol_name_match_type::FULL.
13178 (lookup_symbol_search_name): New.
13179 (lookup_language_this): Pass down
13180 symbol_name_match_type::SEARCH_NAME.
13181 (lookup_symbol_aux, lookup_local_symbol): New parameter
13182 'match_type'. Pass it down.
13183 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13184 (lookup_symbol_search_name): New declaration.
13185 (lookup_symbol_in_block): New 'match_type' parameter.
13186
13187 2018-01-05 Pedro Alves <palves@redhat.com>
13188
13189 PR gdb/22670
13190 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13191 ada_lookup_symbol.
13192 (ada_lookup_symbol): Reimplement in terms of
13193 ada_lookup_symbol_list, bits factored out from
13194 ada_lookup_encoded_symbol.
13195
13196 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13197
13198 * ada-exp.y (write_object_renaming): When subscripting an array
13199 using a symbol as the index, pass the block in call to
13200 ada_lookup_encoded_symbol when looking that symbol up.
13201
13202 2018-01-05 Jerome Guitton <guitton@adacore.com>
13203
13204 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13205 TYPE_INDEX_TYPE.
13206
13207 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13208
13209 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13210 the case where VALUE_LVAL (val0) is not lval_memory.
13211
13212 2018-01-05 Xavier Roirand <roirand@adacore.com>
13213
13214 * ada-valprint.c (print_optional_low_bound): Handle
13215 character-indexed array printing like boolean-indexed array
13216 printing.
13217
13218 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13219
13220 * NEWS: Create a new section for the next release branch.
13221 Rename the section of the current branch, now that it has
13222 been cut.
13223
13224 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13225
13226 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13227 * version.in: Bump version to 8.1.50.DATE-git.
13228
13229 2018-01-03 Xavier Roirand <roirand@adacore.com>
13230
13231 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13232 Add field.
13233 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13234 Add field.
13235 (default_exception_support_info) <catch_handlers_sym>: Add field.
13236 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13237 (ada_exception_name_addr_1): Add "catch handlers" handling.
13238 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13239 Update all callers.
13240 (create_excep_cond_exprs) <ex>: Add parameter.
13241 (re_set_exception): Update create_excep_cond_exprs call.
13242 (print_it_exception, print_one_exception, print_mention_exception)
13243 (print_recreate_exception): Add "catch handler" handling.
13244 (allocate_location_catch_handlers, re_set_catch_handlers)
13245 (check_status_catch_handlers, print_it_catch_handlers)
13246 (print_one_catch_handlers, print_mention_catch_handlers)
13247 (print_recreate_catch_handlers): New function.
13248 (catch_handlers_breakpoint_ops): New variable.
13249 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13250 Add parameter. Add "catch handler" handling.
13251 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13252 Add "catch handler" handling.
13253 (ada_exception_catchpoint_cond_string): Add "catch handler"
13254 handling.
13255 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13256 call.
13257 (catch_ada_handlers_command): New function.
13258 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13259 operations structure.
13260 (_initialize_ada_language): Add "catch handlers" command entry.
13261 * NEWS: Document "catch handlers" feature.
13262
13263 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13264
13265 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13266 account when creating the array type of the slice.
13267 (ada_value_slice): Likewise.
13268
13269 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13270
13271 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13272 New enum value.
13273 (create_array_type_with_stride): Add byte_stride_prop parameter.
13274 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13275 New parameter. Update all callers in this file.
13276 (array_type_has_dynamic_stride): New function.
13277 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13278 of arrays with dynamic byte strides.
13279 * dwarf2read.c (read_array_type): Add support for dynamic
13280 DW_AT_byte_stride attributes.
13281
13282 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13283
13284 * dwarf2read.c (read_unspecified_type): Treat
13285 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13286
13287 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13288
13289 Update copyright year range in all GDB files.
13290
13291 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13292
13293 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13294 and gdb/testsuite/gdb.base/step-line.c.
13295
13296 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13297
13298 * copyright.py (main): Dump the contents of
13299 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13300 even if BY_HAND is empty.
13301
13302 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13303
13304 * top.c (print_gdb_version): Update Copyright year in version
13305 message.
13306
13307 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13308
13309 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13310
13311 For older changes see ChangeLog-2017.
13312 \f
13313 Local Variables:
13314 mode: change-log
13315 left-margin: 8
13316 fill-column: 74
13317 version-control: never
13318 coding: utf-8
13319 End:
This page took 0.310435 seconds and 4 git commands to generate.