python: Fix erroneous doc about gdb.objfiles()
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2 2018-09-13 Tom Tromey <tom@tromey.com>
3
4 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
5 (pspy_get_objfiles): New function.
6 (progspace_object_methods): New.
7 (pspace_object_type): Add tp_methods callback.
8 * python/python-internal.h (build_objfiles_list): New
9 declaration.
10 * python/python.c (build_objfiles_list): New function.
11 (gdbpy_objfiles): Implement using build_objfiles_list.
12 * NEWS: Mention the Progspace.objfiles method.
13
14 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
15
16 * python/py-inferior.c (infpy_get_progspace): New function.
17 (inferior_object_getset): Add progspace property.
18 * NEWS: Mention the new property.
19
20 2018-09-13 Tom Tromey <tom@tromey.com>
21
22 PR rust/23650:
23 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
24
25 2018-09-13 Tom Tromey <tom@tromey.com>
26
27 PR rust/23626:
28 * rust-lang.c (rust_enum_variant): Now static.
29 (rust_empty_enum_p): New function.
30 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
31 Handle empty enum.
32
33 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
34
35 * python/py-inferior.c (infpy_repr): New.
36 (inferior_object_type): Register infpy_repr.
37 * python/py-objfile.c (objfpy_repr): New.
38 (objfile_object_type): Register objfpy_repr.
39
40 2018-09-12 John Baldwin <jhb@FreeBSD.org>
41
42 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
43
44 2018-09-12 John Baldwin <jhb@FreeBSD.org>
45
46 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
47 typo.
48
49 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
50
51 * common/common-utils.c: Don't include '<sys/stat.h>'.
52 (is_regular_file): Move to...
53 * common/filestuff.c (is_regular_file): ... here.
54 * common/common-utils.h (is_regular_file): Move to...
55 * common/filestuff.h (is_regular_file): ... here.
56
57 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
58
59 * skip.c (debug_skip): New variable.
60 (skiplist_entry::do_skip_file_p): Add debug output.
61 (skiplist_entry::do_skip_gfile_p): Likewise.
62 (skiplist_entry::skip_function_p): Likewise.
63 (_initialize_step_skip): Create debug command.
64 * NEWS: Mention set/show debug skip.
65
66 2018-09-11 Xavier Roirand <roirand@adacore.com>
67
68 * darwin-nat.c (should_disable_startup_with_shell):
69 New function.
70 (darwin_nat_target::create_inferior): Add call.
71
72 2018-09-11 Xavier Roirand <roirand@adacore.com>
73
74 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
75 inf_port, msg_state>: Initialize.
76 (struct darwin_thread_info) <signaled, single_step>: Change
77 type and initialize.
78 (struct darwin_thread_info) <event>: Initialize.
79
80 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
81
82 PR gdb/23555
83 PR gdb/23558
84 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
85 guesses.
86
87 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
88
89 Revert:
90 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
91
92 PR gdb/23555
93 PR gdb/23558
94 * gnulib/aclocal.m4: Regenerate.
95 * gnulib/config.in: Regenerate.
96 * gnulib/configure: Regenerate.
97 * gnulib/import/Makefile.am: Update.
98 * gnulib/import/Makefile.in: Update.
99 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
100 * gnulib/import/_Noreturn.h: ... this.
101 * gnulib/import/alloca.in.h: Update.
102 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
103 * gnulib/import/arg-nonnull.h: ... this.
104 * gnulib/import/assure.h: Update.
105 * gnulib/import/at-func.c: Update.
106 * gnulib/import/basename-lgpl.c: Update.
107 * gnulib/import/extra/snippet/c++defs.h: Rename to...
108 * gnulib/import/c++defs.h: ... this.
109 * gnulib/import/canonicalize-lgpl.c: Update.
110 * gnulib/import/cdefs.h: Update.
111 * gnulib/import/chdir-long.c: Update.
112 * gnulib/import/chdir-long.h: Update.
113 * gnulib/import/cloexec.c: Update.
114 * gnulib/import/cloexec.h: Update.
115 * gnulib/import/close.c: Update.
116 * gnulib/import/closedir.c: Update.
117 * gnulib/import/config.charset: Update.
118 * gnulib/import/dirent-private.h: Update.
119 * gnulib/import/dirent.in.h: Update.
120 * gnulib/import/dirfd.c: Update.
121 * gnulib/import/dirname-lgpl.c: Update.
122 * gnulib/import/dirname.h: Update.
123 * gnulib/import/dosname.h: Update.
124 * gnulib/import/dup-safer-flag.c: Update.
125 * gnulib/import/dup-safer.c: Update.
126 * gnulib/import/dup.c: Update.
127 * gnulib/import/dup2.c: Update.
128 * gnulib/import/errno.in.h: Update.
129 * gnulib/import/error.c: Update.
130 * gnulib/import/error.h: Update.
131 * gnulib/import/exitfail.c: Update.
132 * gnulib/import/exitfail.h: Update.
133 * gnulib/import/extra/update-copyright: Update.
134 * gnulib/import/fchdir.c: Update.
135 * gnulib/import/fcntl.c: Update.
136 * gnulib/import/fcntl.in.h: Update.
137 * gnulib/import/fd-hook.c: Update.
138 * gnulib/import/fd-hook.h: Update.
139 * gnulib/import/fd-safer-flag.c: Update.
140 * gnulib/import/fd-safer.c: Update.
141 * gnulib/import/fdopendir.c: Update.
142 * gnulib/import/filename.h: Update.
143 * gnulib/import/filenamecat-lgpl.c: Update.
144 * gnulib/import/filenamecat.h: Update.
145 * gnulib/import/flexmember.h: Update.
146 * gnulib/import/float+.h: Update.
147 * gnulib/import/float.c: Update.
148 * gnulib/import/float.in.h: Update.
149 * gnulib/import/fnmatch.c: Update.
150 * gnulib/import/fnmatch.in.h: Update.
151 * gnulib/import/fnmatch_loop.c: Update.
152 * gnulib/import/fpucw.h: Update.
153 * gnulib/import/frexp.c: Update.
154 * gnulib/import/frexpl.c: Update.
155 * gnulib/import/fstat.c: Update.
156 * gnulib/import/fstatat.c: Update.
157 * gnulib/import/getcwd-lgpl.c: Update.
158 * gnulib/import/getcwd.c: Update.
159 * gnulib/import/getdtablesize.c: Update.
160 * gnulib/import/getlogin_r.c: Update.
161 * gnulib/import/getprogname.c: Update.
162 * gnulib/import/getprogname.h: Update.
163 * gnulib/import/gettext.h: Update.
164 * gnulib/import/gettimeofday.c: Update.
165 * gnulib/import/glob-libc.h: Update.
166 * gnulib/import/glob.c: Update.
167 * gnulib/import/glob.in.h: Update.
168 * gnulib/import/glob_internal.h: Update.
169 * gnulib/import/glob_pattern_p.c: Update.
170 * gnulib/import/globfree.c: Update.
171 * gnulib/import/hard-locale.c: Update.
172 * gnulib/import/hard-locale.h: Update.
173 * gnulib/import/intprops.h: Update.
174 * gnulib/import/inttypes.in.h: Update.
175 * gnulib/import/isnan.c: Update.
176 * gnulib/import/isnand-nolibm.h: Update.
177 * gnulib/import/isnand.c: Update.
178 * gnulib/import/isnanl-nolibm.h: Update.
179 * gnulib/import/isnanl.c: Update.
180 * gnulib/import/itold.c: Update.
181 * gnulib/import/libc-config.h: Update.
182 * gnulib/import/limits.in.h: Update.
183 * gnulib/import/localcharset.c: Update.
184 * gnulib/import/localcharset.h: Update.
185 * gnulib/import/localtime-buffer.c: Update.
186 * gnulib/import/localtime-buffer.h: Update.
187 * gnulib/import/lstat.c: Update.
188 * gnulib/import/m4/00gnulib.m4: Update.
189 * gnulib/import/m4/__inline.m4: Update.
190 * gnulib/import/m4/absolute-header.m4: Update.
191 * gnulib/import/m4/alloca.m4: Update.
192 * gnulib/import/m4/builtin-expect.m4: Update.
193 * gnulib/import/m4/canonicalize.m4: Update.
194 * gnulib/import/m4/chdir-long.m4: Update.
195 * gnulib/import/m4/close.m4: Update.
196 * gnulib/import/m4/closedir.m4: Update.
197 * gnulib/import/m4/configmake.m4: Update.
198 * gnulib/import/m4/d-ino.m4: Update.
199 * gnulib/import/m4/d-type.m4: Update.
200 * gnulib/import/m4/dirent_h.m4: Update.
201 * gnulib/import/m4/dirfd.m4: Update.
202 * gnulib/import/m4/dirname.m4: Update.
203 * gnulib/import/m4/double-slash-root.m4: Update.
204 * gnulib/import/m4/dup.m4: Update.
205 * gnulib/import/m4/dup2.m4: Update.
206 * gnulib/import/m4/eealloc.m4: Update.
207 * gnulib/import/m4/environ.m4: Update.
208 * gnulib/import/m4/errno_h.m4: Update.
209 * gnulib/import/m4/error.m4: Update.
210 * gnulib/import/m4/exponentd.m4: Update.
211 * gnulib/import/m4/exponentl.m4: Update.
212 * gnulib/import/m4/extensions.m4: Update.
213 * gnulib/import/m4/extern-inline.m4: Update.
214 * gnulib/import/m4/fchdir.m4: Update.
215 * gnulib/import/m4/fcntl-o.m4: Update.
216 * gnulib/import/m4/fcntl.m4: Update.
217 * gnulib/import/m4/fcntl_h.m4: Update.
218 * gnulib/import/m4/fdopendir.m4: Update.
219 * gnulib/import/m4/filenamecat.m4: Update.
220 * gnulib/import/m4/flexmember.m4: Update.
221 * gnulib/import/m4/float_h.m4: Update.
222 * gnulib/import/m4/fnmatch.m4: Update.
223 * gnulib/import/m4/fnmatch_h.m4: Update.
224 * gnulib/import/m4/fpieee.m4: Update.
225 * gnulib/import/m4/frexp.m4: Update.
226 * gnulib/import/m4/frexpl.m4: Update.
227 * gnulib/import/m4/fstat.m4: Update.
228 * gnulib/import/m4/fstatat.m4: Update.
229 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
230 * gnulib/import/m4/getcwd-path-max.m4: Update.
231 * gnulib/import/m4/getcwd.m4: Update.
232 * gnulib/import/m4/getdtablesize.m4: Update.
233 * gnulib/import/m4/getlogin.m4: Update.
234 * gnulib/import/m4/getlogin_r.m4: Update.
235 * gnulib/import/m4/getpagesize.m4: Update.
236 * gnulib/import/m4/getprogname.m4: Update.
237 * gnulib/import/m4/gettimeofday.m4: Update.
238 * gnulib/import/m4/glibc21.m4: Update.
239 * gnulib/import/m4/glob.m4: Update.
240 * gnulib/import/m4/glob_h.m4: Update.
241 * gnulib/import/m4/gnulib-cache.m4: Update.
242 * gnulib/import/m4/gnulib-common.m4: Update.
243 * gnulib/import/m4/gnulib-comp.m4: Update.
244 * gnulib/import/m4/gnulib-tool.m4: Update.
245 * gnulib/import/m4/hard-locale.m4: Update.
246 * gnulib/import/m4/include_next.m4: Update.
247 * gnulib/import/m4/inttypes-pri.m4: Update.
248 * gnulib/import/m4/inttypes.m4: Update.
249 * gnulib/import/m4/isnand.m4: Update.
250 * gnulib/import/m4/isnanl.m4: Update.
251 * gnulib/import/m4/largefile.m4: Update.
252 * gnulib/import/m4/limits-h.m4: Update.
253 * gnulib/import/m4/localcharset.m4: Update.
254 * gnulib/import/m4/locale-fr.m4: Update.
255 * gnulib/import/m4/locale-ja.m4: Update.
256 * gnulib/import/m4/locale-zh.m4: Update.
257 * gnulib/import/m4/localtime-buffer.m4: Update.
258 * gnulib/import/m4/longlong.m4: Update.
259 * gnulib/import/m4/lstat.m4: Update.
260 * gnulib/import/m4/malloc.m4: Update.
261 * gnulib/import/m4/malloca.m4: Update.
262 * gnulib/import/m4/math_h.m4: Update.
263 * gnulib/import/m4/mbrtowc.m4: Update.
264 * gnulib/import/m4/mbsinit.m4: Update.
265 * gnulib/import/m4/mbsrtowcs.m4: Update.
266 * gnulib/import/m4/mbstate_t.m4: Update.
267 * gnulib/import/m4/memchr.m4: Update.
268 * gnulib/import/m4/memmem.m4: Update.
269 * gnulib/import/m4/mempcpy.m4: Update.
270 * gnulib/import/m4/memrchr.m4: Update.
271 * gnulib/import/m4/mkdir.m4: Update.
272 * gnulib/import/m4/mkstemp.m4: Update.
273 * gnulib/import/m4/mmap-anon.m4: Update.
274 * gnulib/import/m4/mode_t.m4: Update.
275 * gnulib/import/m4/msvc-inval.m4: Update.
276 * gnulib/import/m4/msvc-nothrow.m4: Update.
277 * gnulib/import/m4/multiarch.m4: Update.
278 * gnulib/import/m4/nocrash.m4: Update.
279 * gnulib/import/m4/off_t.m4: Update.
280 * gnulib/import/m4/onceonly.m4: Update.
281 * gnulib/import/m4/open-cloexec.m4: Update.
282 * gnulib/import/m4/open.m4: Update.
283 * gnulib/import/m4/openat.m4: Update.
284 * gnulib/import/m4/opendir.m4: Update.
285 * gnulib/import/m4/pathmax.m4: Update.
286 * gnulib/import/m4/rawmemchr.m4: Update.
287 * gnulib/import/m4/readdir.m4: Update.
288 * gnulib/import/m4/readlink.m4: Update.
289 * gnulib/import/m4/realloc.m4: Update.
290 * gnulib/import/m4/rename.m4: Update.
291 * gnulib/import/m4/rewinddir.m4: Update.
292 * gnulib/import/m4/rmdir.m4: Update.
293 * gnulib/import/m4/save-cwd.m4: Update.
294 * gnulib/import/m4/secure_getenv.m4: Update.
295 * gnulib/import/m4/setenv.m4: Update.
296 * gnulib/import/m4/signal_h.m4: Update.
297 * gnulib/import/m4/ssize_t.m4: Update.
298 * gnulib/import/m4/stat-time.m4: Update.
299 * gnulib/import/m4/stat.m4: Update.
300 * gnulib/import/m4/std-gnu11.m4: Update.
301 * gnulib/import/m4/stdbool.m4: Update.
302 * gnulib/import/m4/stddef_h.m4: Update.
303 * gnulib/import/m4/stdint.m4: Update.
304 * gnulib/import/m4/stdio_h.m4: Update.
305 * gnulib/import/m4/stdlib_h.m4: Update.
306 * gnulib/import/m4/strchrnul.m4: Update.
307 * gnulib/import/m4/strdup.m4: Update.
308 * gnulib/import/m4/strerror.m4: Update.
309 * gnulib/import/m4/string_h.m4: Update.
310 * gnulib/import/m4/strstr.m4: Update.
311 * gnulib/import/m4/strtok_r.m4: Update.
312 * gnulib/import/m4/sys_socket_h.m4: Update.
313 * gnulib/import/m4/sys_stat_h.m4: Update.
314 * gnulib/import/m4/sys_time_h.m4: Update.
315 * gnulib/import/m4/sys_types_h.m4: Update.
316 * gnulib/import/m4/tempname.m4: Update.
317 * gnulib/import/m4/time_h.m4: Update.
318 * gnulib/import/m4/unistd-safer.m4: Update.
319 * gnulib/import/m4/unistd_h.m4: Update.
320 * gnulib/import/m4/warn-on-use.m4: Update.
321 * gnulib/import/m4/wchar_h.m4: Update.
322 * gnulib/import/m4/wchar_t.m4: Update.
323 * gnulib/import/m4/wctype_h.m4: Update.
324 * gnulib/import/m4/wint_t.m4: Update.
325 * gnulib/import/malloc.c: Update.
326 * gnulib/import/malloc/scratch_buffer.h: Update.
327 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
328 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
329 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
330 * gnulib/import/malloca.c: Update.
331 * gnulib/import/malloca.h: Update.
332 * gnulib/import/malloca.valgrind: Update.
333 * gnulib/import/math.in.h: Update.
334 * gnulib/import/mbrtowc.c: Update.
335 * gnulib/import/mbsinit.c: Update.
336 * gnulib/import/mbsrtowcs-impl.h: Update.
337 * gnulib/import/mbsrtowcs-state.c: Update.
338 * gnulib/import/mbsrtowcs.c: Update.
339 * gnulib/import/memchr.c: Update.
340 * gnulib/import/memmem.c: Update.
341 * gnulib/import/mempcpy.c: Update.
342 * gnulib/import/memrchr.c: Update.
343 * gnulib/import/mkdir.c: Update.
344 * gnulib/import/mkstemp.c: Update.
345 * gnulib/import/msvc-inval.c: Update.
346 * gnulib/import/msvc-inval.h: Update.
347 * gnulib/import/msvc-nothrow.c: Update.
348 * gnulib/import/msvc-nothrow.h: Update.
349 * gnulib/import/open.c: Update.
350 * gnulib/import/openat-die.c: Update.
351 * gnulib/import/openat-priv.h: Update.
352 * gnulib/import/openat-proc.c: Update.
353 * gnulib/import/openat.c: Update.
354 * gnulib/import/openat.h: Update.
355 * gnulib/import/opendir.c: Update.
356 * gnulib/import/pathmax.h: Update.
357 * gnulib/import/pipe-safer.c: Update.
358 * gnulib/import/rawmemchr.c: Update.
359 * gnulib/import/readdir.c: Update.
360 * gnulib/import/readlink.c: Update.
361 * gnulib/import/realloc.c: Update.
362 * gnulib/import/ref-add.sin: Update.
363 * gnulib/import/ref-del.sin: Update.
364 * gnulib/import/rename.c: Update.
365 * gnulib/import/rewinddir.c: Update.
366 * gnulib/import/rmdir.c: Update.
367 * gnulib/import/same-inode.h: Update.
368 * gnulib/import/save-cwd.c: Update.
369 * gnulib/import/save-cwd.h: Update.
370 * gnulib/import/scratch_buffer.h: Update.
371 * gnulib/import/secure_getenv.c: Update.
372 * gnulib/import/setenv.c: Update.
373 * gnulib/import/signal.in.h: Update.
374 * gnulib/import/stat-time.c: Update.
375 * gnulib/import/stat-time.h: Update.
376 * gnulib/import/stat-w32.c: Update.
377 * gnulib/import/stat-w32.h: Update.
378 * gnulib/import/stat.c: Update.
379 * gnulib/import/stdbool.in.h: Update.
380 * gnulib/import/stddef.in.h: Update.
381 * gnulib/import/stdint.in.h: Update.
382 * gnulib/import/stdio.in.h: Update.
383 * gnulib/import/stdlib.in.h: Update.
384 * gnulib/import/str-two-way.h: Update.
385 * gnulib/import/strchrnul.c: Update.
386 * gnulib/import/strdup.c: Update.
387 * gnulib/import/streq.h: Update.
388 * gnulib/import/strerror-override.c: Update.
389 * gnulib/import/strerror-override.h: Update.
390 * gnulib/import/strerror.c: Update.
391 * gnulib/import/string.in.h: Update.
392 * gnulib/import/stripslash.c: Update.
393 * gnulib/import/strnlen1.c: Update.
394 * gnulib/import/strnlen1.h: Update.
395 * gnulib/import/strstr.c: Update.
396 * gnulib/import/strtok_r.c: Update.
397 * gnulib/import/sys_stat.in.h: Update.
398 * gnulib/import/sys_time.in.h: Update.
399 * gnulib/import/sys_types.in.h: Update.
400 * gnulib/import/tempname.c: Update.
401 * gnulib/import/tempname.h: Update.
402 * gnulib/import/time.in.h: Update.
403 * gnulib/import/unistd--.h: Update.
404 * gnulib/import/unistd-safer.h: Update.
405 * gnulib/import/unistd.in.h: Update.
406 * gnulib/import/unsetenv.c: Update.
407 * gnulib/import/verify.h: Update.
408 * gnulib/import/extra/snippet/warn-on-use.h: Update.
409 * gnulib/import/wchar.in.h: Update.
410 * gnulib/import/wctype.in.h: Update.
411 * gnulib/import/xalloc-oversized.h: Update.
412 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
413 "53e2c179f26a890fa6685af4b6c1397ee370433b".
414
415 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
416
417 * record-btrace.c (get_thread_current_frame): Remove
418 old_inferior_ptid.
419
420 2018-09-10 Jerome Guitton <guitton@adacore.com>
421
422 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
423 with check_tag to 1 if and only if the type is tagged and the
424 component being searched cannot been found in the current
425 view. Otherwise, always call ada_to_fixed_type with
426 check_tag to 0.
427
428 2018-09-10 Xavier Roirand <roirand@adacore.com>
429
430 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
431 declaration.
432 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
433 * ada-varobj.c (ada_varobj_get_number_of_children,
434 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
435
436 2018-09-10 Xavier Roirand <roirand@adacore.com>
437
438 * ada-valprint.c (ada_value_print): Use type instead of
439 enclosing type.
440
441 2018-09-10 Xavier Roirand <roirand@adacore.com>
442
443 * ada-lang.c (ada_value_subscript): Handle case when parameter is
444 an array of access to unconstrained array.
445
446 2018-09-10 Xavier Roirand <roirand@adacore.com>
447
448 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
449 (ada_check_typedef): Use it.
450
451 2018-09-10 Xavier Roirand <roirand@adacore.com>
452
453 * ada-varobj.c (ada_varobj_describe_struct_child)
454 (ada_varobj_describe_child): Handle union case like struct one.
455
456 2018-09-10 Tom Tromey <tom@tromey.com>
457
458 PR python/18380:
459 * python/python.c (_initialize_python): Make example in "python"
460 help work in Python 3.
461
462 2018-09-10 Eli Zaretskii <eliz@gnu.org>
463
464 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
465 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
466 $(EXEEXT) to the script, as it is not a program.
467
468 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
469
470 * python/py-prettyprint.c (pretty_print_one_value): Return
471 gdbpy_ref<>.
472 (print_string_repr): Adjust.
473 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
474 * python/python-internal.h (apply_varobj_pretty_printer): Return
475 gdbpy_ref<>.
476 * varobj.c (varobj_value_get_print_value): Adjust.
477
478 2018-09-08 Tom Tromey <tom@tromey.com>
479
480 PR python/16047:
481 * python/py-prettyprint.c (pretty_print_one_value): Check for
482 to_string method.
483
484 2018-09-08 Joel Brobecker <brobecker@adacore.com>
485
486 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
487 replace_operator_with_call.
488
489 2018-09-08 Joel Brobecker <brobecker@adacore.com>
490
491 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
492
493 2018-09-08 Joel Brobecker <brobecker@adacore.com>
494
495 * ada-typeprint.c (print_range): Print the bounds using TYPE
496 rather than its TYPE_TARGET_TYPE.
497
498 2018-09-08 Joel Brobecker <brobecker@adacore.com>
499
500 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
501 call to ada_to_fixed_value_create.
502
503 2018-09-08 Jerome Guitton <guitton@adacore.com>
504
505 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
506
507 2018-09-08 Joel Brobecker <brobecker@adacore.com>
508
509 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
510 by calls to error.
511
512 2018-09-08 Joel Brobecker <brobecker@adacore.com>
513
514 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
515 Move update of loop variable "fi".
516
517 2018-09-08 Joel Brobecker <brobecker@adacore.com>
518
519 * ada-lang.c (value_assign_to_component): In the case of
520 big-endian targets, extract the bits of the given VAL
521 using an src_offset of zero if container is not a scalar.
522
523 2018-09-06 Simon Ser <contact@emersion.fr>
524
525 PR gdb/23105
526 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
527 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
528 * fbsd-tdep.c (fbsd_make_note_desc): New.
529 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
530 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
531 * target.h (enum target_object) Add FreeBSD-specific
532 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
533
534 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
535
536 * compile/compile-c.h (generate_c_for_variable_locations):
537 Change reference to pointer.
538 * compile/compile-c-support.c (compile_program) <compute>:
539 Likewise.
540 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
541 (generate_c_for_for_one_variable): Likewise
542 (generate_c_for_variable_locations): Likewise
543 * compile/compile-c-types.c (compile_c_instance::convert_type):
544 Likewise
545 * compile/compile-cplus-symbols.c (convert_one_symbol):
546 std::move the scope passed to enter_scope.
547 * compile/compile-cplus-types.c
548 (compile_cplus_instance::enter_scope): Make parameter
549 rvalue-reference.
550 (compile_cplus_instance::new_scope): Change reference to
551 pointer.
552 (compile_cplus_instance::convert_type): Likewise
553 (compile_cplus_convert_typedef): std::move the scope passed to
554 enter_scope.
555 (compile_cplus_convert_struct_or_union): Likewise.
556 (compile_cplus_convert_enum): Likewise.
557 (compile_cplus_convert_namespace): Likewise.
558 * compile/compile-cplus.h (compile_cplus_instance)
559 <enter_scope>: Make parameter rvalue-reference.
560 * compile/compile-internal.h (compile_instance)
561 <get_cached_type>: Likewise
562 * compile/compile-loc2c.c (push): Likewise
563 (pushf): Likewise
564 (unary): Likewise
565 (binary): Likewise
566 (print_label): Likewise
567 (pushf_register_address): Likewise
568 (pushf_register): Likewise
569 (do_compile_dwarf_expr_to_c): Likewise
570 (compile_dwarf_expr_to_c): Likewise
571 (compile_dwarf_bounds_to_c): Likewise
572 * compile/compile.c (compile_instance::get_cached_type):
573 Likewise
574 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
575 (compile_dwarf_bounds_to_c): Likewise
576 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
577 (dwarf2_compile_property_to_c): Likewise
578 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
579 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
580 Likewise
581
582 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
583
584 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
585 * tui/tui-data.c (init_content_element): Don't initialize it.
586
587 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
588
589 * tui/tui-data.h (struct tui_win_info)
590 <detail::opaque>: Remove.
591 * tui/tui-data.c (init_win_info): Remove assignment.
592
593 2018-09-05 Tom Tromey <tom@tromey.com>
594
595 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
596 -Wformat-nonliteral.
597 * target-float.c (host_float_ops<T>::to_string)
598 (host_float_ops<T>::from_string): Use
599 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
600 * configure: Rebuild.
601
602 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
603
604 * printcmd.c (printf_c_string): Use
605 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
606 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
607
608 2018-09-05 Tom Tromey <tom@tromey.com>
609
610 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
611
612 2018-09-05 Tom de Vries <tdevries@suse.de>
613
614 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
615 with resolve_abstract_p == true.
616 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
617 defaulting to false. Propagate resolve_abstract_p to
618 dwarf2_fetch_die_loc_sect_off.
619 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
620 parameter, defaulting to false.
621 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
622 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
623 parameter.
624 * dwarf2read.h (struct die_info): Forward-declare.
625 (die_info_ptr): New typedef.
626 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
627
628 2018-09-05 Joel Brobecker <brobecker@adacore.com>
629
630 GDB 8.2 released.
631
632 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
633 Pedro Alves <palves@redhat.com>
634
635 * gnulib/Makefile.in (aclocal_m4_deps): Move to
636 "aclocal-m4-deps.mk". Include file here.
637 $(srcdir)/aclocal.m4: Add "configure.ac".
638 * gnulib/aclocal-m4-deps.mk: New file.
639 * gnulib/update-gnulib.sh: Automatically update
640 "aclocal-m4-deps.mk".
641
642 2018-09-04 Tom Tromey <tom@tromey.com>
643
644 * configure: Rebuild.
645 * configure.ac: Remove multi-ice code.
646
647 2018-09-04 Tom Tromey <tom@tromey.com>
648
649 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
650 (ada-exp.o): Update.
651
652 2018-09-04 Tom Tromey <tom@tromey.com>
653
654 * Makefile.in (printcmd.o, target-float.o): Remove.
655 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
656
657 2018-09-04 Tom Tromey <tom@tromey.com>
658
659 * gnulib/Makefile.in: Remove obsolete comment.
660 * Makefile.in: Remove obsolete comment.
661
662 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
663
664 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
665 line with '+'.
666
667 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
668
669 * riscv-tdep.c: Add 'prologue-value.h' include.
670 (struct riscv_unwind_cache): New struct.
671 (riscv_debug_unwinder): New global.
672 (riscv_scan_prologue): Update arguments, capture register details
673 from prologue scan.
674 (riscv_skip_prologue): Reformat arguments line, move end of
675 prologue calculation into riscv_scan_prologue.
676 (riscv_frame_cache): Update return type, create
677 riscv_unwind_cache, scan the prologue, and fill in remaining cache
678 details.
679 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
680 (riscv_frame_prev_register): Use the trad_frame within the
681 riscv_unwind_cache.
682 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
683 flag.
684
685 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
686
687 * trad-frame.h (trad_frame_set_realreg): Declare.
688 (trad_frame_set_addr): Declare.
689 * trad-frame.c (trad_frame_set_realreg): Define new function.
690 (trad_frame_set_addr): Define new function.
691 (trad_frame_set_reg_realreg): Use new function.
692 (trad_frame_set_reg_addr): Use new function.
693
694 2018-09-01 Keith Seitz <keiths@redhat.com>
695
696 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
697 pulongest instead of "%lld".
698 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
699 ATTRIBUTE_UNUSED.
700
701 2018-08-31 Tom Tromey <tom@tromey.com>
702
703 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
704 variant part type.
705
706 2018-08-31 Pedro Alves <palves@redhat.com>
707
708 * gdbarch.h: Regenerate.
709
710 2018-08-31 Pedro Alves <palves@redhat.com>
711
712 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
713 * target.h (Hardware watchpoint interfaces): Describe
714 continuable/steppable/non-steppable watchpoints.
715 * gdbarch.h, gdbarch.c: Regenerate.
716
717 2018-08-31 Pedro Alves <palves@redhat.com>
718
719 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
720 Delete.
721 * s390-linux-nat.c
722 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
723 * target.h (target_ops::have_continuable_watchpoint): Delete.
724 (target_have_continuable_watchpoint): Delete.
725 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
726 * target-delegates.c: Regenerate.
727
728 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
729
730 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
731 the files present in "gnulib/import/m4/".
732
733 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
734
735 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
736 c.sw, c.swsp, and c.sdsp.
737
738 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
739
740 * riscv-tdep.c (struct riscv_inferior_data): Delete.
741 (riscv_read_misa_reg): Don't cache value read into inferior data.
742 (riscv_new_inferior_data): Delete.
743 (riscv_inferior_data_cleanup): Delete.
744 (riscv_inferior_data): Delete.
745 (riscv_invalidate_inferior_data): Delete.
746 (_initialize_riscv_tdep): Remove initialisation of inferior data.
747
748 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
749
750 * compile/compile-cplus-types.c
751 (compile_cplus_instance::leave_scope): Take the address of scope
752 object.
753 (compile_cplus_instance::convert_qualified_base): Compare quals
754 to 0.
755
756 2018-08-30 Keith Seitz <keiths@redhat.com>
757
758 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
759 Use "%s" and host_address_to_string instead of "%p" in printf.
760
761 2018-08-29 Keith Seitz <keiths@redhat.com>
762
763 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
764 and compile-cplus-types.c.
765 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
766 * c-lang.c (cplus_language_defn): Set C++ compile functions.
767 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
768 Declare.
769 * compile/compile-c-support.c: Include compile-cplus.h.
770 (load_libcompile): Templatize.
771 (get_compile_context): "New" function.
772 (c_get_compile_context): Use get_compile_context.
773 (cplus_get_compile_context): New function.
774 (cplus_push_user_expression, cplus_pop_user_expression)
775 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
776 (cplus_compute_program): Define new structs/functions.
777 * compile/compile-cplus-symmbols.c: New file.
778 * compile/compile-cplus-types.c: New file.
779 * compile/compile-cplus.h: New file.
780 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
781 Declare.
782 * compile/compile-object-load.c (get_out_value_type): Use
783 strncmp_iw when comparing symbol names.
784 (compile_object_load): Add mst_bss and mst_data.
785 * compile/compile.c (_initialize_compile): Remove
786 -Wno-implicit-function-declaration from `compile_args'.
787 * compile/gcc-cp-plugin.h: New file.
788 * NEWS: Mention C++ compile support and new debug options.
789
790 2018-08-29 Keith Seitz <keiths@redhat.com>
791
792 * linespec.c (collect_info::add_symbol): Make virtual.
793 (struct symbol_searcher_collect_info): New struct.
794 (symbol_searcher::find_all_symbols): New method.
795 * symtab.h (class symbol_searcher): New class.
796
797 2018-08-29 Keith Seitz <keiths@redhat.com>
798
799 * linespec.c (struct linespec) <function_symbols, label_symbols>:
800 Change to vector of block_symbol. Update all users.
801 (struct collect_info) <symbols>: Likewise.
802 (collect_info::add_symbol): Take block_symbol as argument.
803 Update all callers.
804 (decode_compound_collector) <m_symbols>: Change type to vector
805 of block_symbol. Update all users.
806 (decode_compound_collector::operator ()): Change parameter type
807 to block_symbol.
808 (find_method, find_function_symbols, find_linespec_symbols)
809 (find_label_symbols_in_block, find_label_symbols): Change symbol
810 vectors to block_symbol vectors.
811 * symtab.h (symbol_found_callback_ftype): Change parameter type to
812 block_symbol.
813
814 2018-08-29 Keith Seitz <keiths@redhat.com>
815
816 * linespec.c (symbolp): Remove typedef and VEC definitions.
817 (bound_minimal_symbol_d): Likewise.
818
819 2018-08-29 Keith Seitz <keiths@redhat.com>
820
821 * linespec.c (decode_compound_collector::decode_compound_collector):
822 Remove initialization for `m_symtabs'.
823 (decode_compound_collector::release_symbols): Change return type
824 to std::vector. Update all callers.
825 (class decode_compound_collector) <m_symbols>: Change type to
826 std::vector.
827 (lookup_prefix_sym): Change return type to std::vector. Update all
828 callers.
829 (compare_symbols): Remove.
830 (std_compare_symbols): Rename to `compare_symbols'.
831 (find_method): Change `sym_classes' parameter to std::vector.
832 Update all callers. Use std::sort to sort sym_classes.
833 (find_linespec_symbols): Remove cleanup.
834
835 2018-08-29 Keith Seitz <keiths@redhat.com>
836
837 * linespec.c (struct linespec) <minimal_symbols>: Change type to
838 std::vector. Update all users.
839 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
840 (struct collect_info) <minimal_symbols>: Likewise.
841 (compare_msymbols): Return bool. Change parameters to const
842 bound_minimal_symbol references.
843 (find_method, find_function_symbols, find_linespec_symbols): Change
844 `minsyms' parameter to std::vector. Update all callers.
845
846 2018-08-29 Keith Seitz <keiths@redhat.com>
847
848 * linespec.c (struct linespec) <label_symbols>: Change type to
849 std::vector. Update all users.
850 (find_label_symbols_in_block): Change `result' parameter to
851 std::vector. Update all callers.
852 (find_label_symbols): Return std::vector. Update all callers.
853
854 2018-08-29 Keith Seitz <keiths@redhat.com>
855
856 * linespec.c (struct linespec) <function_symbols>: Change type to
857 std::vector. Update all users.
858 (struct collect_info) <function_symbols>: Likewise.
859 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
860 (std_compare_symbols): New function.
861 (find_method, find_function_symbols, find_linespec_symbols)
862 (find_label_symbols_in_block): Change `symbols' parameter to
863 std::vector. Update all callers.
864 (find_label_symbols): Likewise for `function_symbols' and
865 `label_funcs_ret'.
866
867 2018-08-29 Keith Seitz <keiths@redhat.com>
868
869 * linespec.c (symtab_vector_up): Define.
870 (struct linespec) <file_symtabs>: Change type to std::vector *.
871 Update all uses.
872 (struct collect_info) <file_symtabs>: Likewise.
873 (collect_symtabs_from_filename): Return symtab_vector_up.
874 Update all callers.
875 (decode_objc): Remove cleanup.
876 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
877 (symtab_collector::release_symtabs): Return symtab_vector_up.
878 Update all callers.
879 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
880 Update all users.
881 (collect_symtabs_from_filename, symtabs_from_filename): Return
882 symtab_vector_up. Update all callers.
883
884 2018-08-29 Tom Tromey <tom@tromey.com>
885
886 * csky-tdep.c (csky_analyze_prologue): Use
887 core_addr_to_string_nz.
888
889 2018-08-29 Tom Tromey <tom@tromey.com>
890
891 * windows-nat.c (struct xlate_exception) <them>: Change type to
892 DWORD.
893 (xlate): Fix formatting. Remove last entry.
894 (struct xlate_exception, xlate): Comment out.
895 (windows_nat_target::resume): Use ranged for.
896
897 2018-08-29 Jim Wilson <jimw@sifive.com>
898
899 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
900 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
901 of NT_PRFPREG.
902 (riscv_linux_nat_target::store_registers): Likewise.
903
904 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
905
906 PR gdb/23555
907 PR gdb/23558
908 * gnulib/aclocal.m4: Regenerate.
909 * gnulib/config.in: Regenerate.
910 * gnulib/configure: Regenerate.
911 * gnulib/import/Makefile.am: Update.
912 * gnulib/import/Makefile.in: Update.
913 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
914 * gnulib/import/_Noreturn.h: ... this.
915 * gnulib/import/alloca.in.h: Update.
916 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
917 * gnulib/import/arg-nonnull.h: ... this.
918 * gnulib/import/assure.h: Update.
919 * gnulib/import/at-func.c: Update.
920 * gnulib/import/basename-lgpl.c: Update.
921 * gnulib/import/extra/snippet/c++defs.h: Rename to...
922 * gnulib/import/c++defs.h: ... this.
923 * gnulib/import/canonicalize-lgpl.c: Update.
924 * gnulib/import/cdefs.h: Update.
925 * gnulib/import/chdir-long.c: Update.
926 * gnulib/import/chdir-long.h: Update.
927 * gnulib/import/cloexec.c: Update.
928 * gnulib/import/cloexec.h: Update.
929 * gnulib/import/close.c: Update.
930 * gnulib/import/closedir.c: Update.
931 * gnulib/import/config.charset: Update.
932 * gnulib/import/dirent-private.h: Update.
933 * gnulib/import/dirent.in.h: Update.
934 * gnulib/import/dirfd.c: Update.
935 * gnulib/import/dirname-lgpl.c: Update.
936 * gnulib/import/dirname.h: Update.
937 * gnulib/import/dosname.h: Update.
938 * gnulib/import/dup-safer-flag.c: Update.
939 * gnulib/import/dup-safer.c: Update.
940 * gnulib/import/dup.c: Update.
941 * gnulib/import/dup2.c: Update.
942 * gnulib/import/errno.in.h: Update.
943 * gnulib/import/error.c: Update.
944 * gnulib/import/error.h: Update.
945 * gnulib/import/exitfail.c: Update.
946 * gnulib/import/exitfail.h: Update.
947 * gnulib/import/extra/update-copyright: Update.
948 * gnulib/import/fchdir.c: Update.
949 * gnulib/import/fcntl.c: Update.
950 * gnulib/import/fcntl.in.h: Update.
951 * gnulib/import/fd-hook.c: Update.
952 * gnulib/import/fd-hook.h: Update.
953 * gnulib/import/fd-safer-flag.c: Update.
954 * gnulib/import/fd-safer.c: Update.
955 * gnulib/import/fdopendir.c: Update.
956 * gnulib/import/filename.h: Update.
957 * gnulib/import/filenamecat-lgpl.c: Update.
958 * gnulib/import/filenamecat.h: Update.
959 * gnulib/import/flexmember.h: Update.
960 * gnulib/import/float+.h: Update.
961 * gnulib/import/float.c: Update.
962 * gnulib/import/float.in.h: Update.
963 * gnulib/import/fnmatch.c: Update.
964 * gnulib/import/fnmatch.in.h: Update.
965 * gnulib/import/fnmatch_loop.c: Update.
966 * gnulib/import/fpucw.h: Update.
967 * gnulib/import/frexp.c: Update.
968 * gnulib/import/frexpl.c: Update.
969 * gnulib/import/fstat.c: Update.
970 * gnulib/import/fstatat.c: Update.
971 * gnulib/import/getcwd-lgpl.c: Update.
972 * gnulib/import/getcwd.c: Update.
973 * gnulib/import/getdtablesize.c: Update.
974 * gnulib/import/getlogin_r.c: Update.
975 * gnulib/import/getprogname.c: Update.
976 * gnulib/import/getprogname.h: Update.
977 * gnulib/import/gettext.h: Update.
978 * gnulib/import/gettimeofday.c: Update.
979 * gnulib/import/glob-libc.h: Update.
980 * gnulib/import/glob.c: Update.
981 * gnulib/import/glob.in.h: Update.
982 * gnulib/import/glob_internal.h: Update.
983 * gnulib/import/glob_pattern_p.c: Update.
984 * gnulib/import/globfree.c: Update.
985 * gnulib/import/hard-locale.c: Update.
986 * gnulib/import/hard-locale.h: Update.
987 * gnulib/import/intprops.h: Update.
988 * gnulib/import/inttypes.in.h: Update.
989 * gnulib/import/isnan.c: Update.
990 * gnulib/import/isnand-nolibm.h: Update.
991 * gnulib/import/isnand.c: Update.
992 * gnulib/import/isnanl-nolibm.h: Update.
993 * gnulib/import/isnanl.c: Update.
994 * gnulib/import/itold.c: Update.
995 * gnulib/import/libc-config.h: Update.
996 * gnulib/import/limits.in.h: Update.
997 * gnulib/import/localcharset.c: Update.
998 * gnulib/import/localcharset.h: Update.
999 * gnulib/import/localtime-buffer.c: Update.
1000 * gnulib/import/localtime-buffer.h: Update.
1001 * gnulib/import/lstat.c: Update.
1002 * gnulib/import/m4/00gnulib.m4: Update.
1003 * gnulib/import/m4/__inline.m4: Update.
1004 * gnulib/import/m4/absolute-header.m4: Update.
1005 * gnulib/import/m4/alloca.m4: Update.
1006 * gnulib/import/m4/builtin-expect.m4: Update.
1007 * gnulib/import/m4/canonicalize.m4: Update.
1008 * gnulib/import/m4/chdir-long.m4: Update.
1009 * gnulib/import/m4/close.m4: Update.
1010 * gnulib/import/m4/closedir.m4: Update.
1011 * gnulib/import/m4/configmake.m4: Update.
1012 * gnulib/import/m4/d-ino.m4: Update.
1013 * gnulib/import/m4/d-type.m4: Update.
1014 * gnulib/import/m4/dirent_h.m4: Update.
1015 * gnulib/import/m4/dirfd.m4: Update.
1016 * gnulib/import/m4/dirname.m4: Update.
1017 * gnulib/import/m4/double-slash-root.m4: Update.
1018 * gnulib/import/m4/dup.m4: Update.
1019 * gnulib/import/m4/dup2.m4: Update.
1020 * gnulib/import/m4/eealloc.m4: Update.
1021 * gnulib/import/m4/environ.m4: Update.
1022 * gnulib/import/m4/errno_h.m4: Update.
1023 * gnulib/import/m4/error.m4: Update.
1024 * gnulib/import/m4/exponentd.m4: Update.
1025 * gnulib/import/m4/exponentl.m4: Update.
1026 * gnulib/import/m4/extensions.m4: Update.
1027 * gnulib/import/m4/extern-inline.m4: Update.
1028 * gnulib/import/m4/fchdir.m4: Update.
1029 * gnulib/import/m4/fcntl-o.m4: Update.
1030 * gnulib/import/m4/fcntl.m4: Update.
1031 * gnulib/import/m4/fcntl_h.m4: Update.
1032 * gnulib/import/m4/fdopendir.m4: Update.
1033 * gnulib/import/m4/filenamecat.m4: Update.
1034 * gnulib/import/m4/flexmember.m4: Update.
1035 * gnulib/import/m4/float_h.m4: Update.
1036 * gnulib/import/m4/fnmatch.m4: Update.
1037 * gnulib/import/m4/fnmatch_h.m4: Update.
1038 * gnulib/import/m4/fpieee.m4: Update.
1039 * gnulib/import/m4/frexp.m4: Update.
1040 * gnulib/import/m4/frexpl.m4: Update.
1041 * gnulib/import/m4/fstat.m4: Update.
1042 * gnulib/import/m4/fstatat.m4: Update.
1043 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1044 * gnulib/import/m4/getcwd-path-max.m4: Update.
1045 * gnulib/import/m4/getcwd.m4: Update.
1046 * gnulib/import/m4/getdtablesize.m4: Update.
1047 * gnulib/import/m4/getlogin.m4: Update.
1048 * gnulib/import/m4/getlogin_r.m4: Update.
1049 * gnulib/import/m4/getpagesize.m4: Update.
1050 * gnulib/import/m4/getprogname.m4: Update.
1051 * gnulib/import/m4/gettimeofday.m4: Update.
1052 * gnulib/import/m4/glibc21.m4: Update.
1053 * gnulib/import/m4/glob.m4: Update.
1054 * gnulib/import/m4/glob_h.m4: Update.
1055 * gnulib/import/m4/gnulib-cache.m4: Update.
1056 * gnulib/import/m4/gnulib-common.m4: Update.
1057 * gnulib/import/m4/gnulib-comp.m4: Update.
1058 * gnulib/import/m4/gnulib-tool.m4: Update.
1059 * gnulib/import/m4/hard-locale.m4: Update.
1060 * gnulib/import/m4/include_next.m4: Update.
1061 * gnulib/import/m4/inttypes-pri.m4: Update.
1062 * gnulib/import/m4/inttypes.m4: Update.
1063 * gnulib/import/m4/isnand.m4: Update.
1064 * gnulib/import/m4/isnanl.m4: Update.
1065 * gnulib/import/m4/largefile.m4: Update.
1066 * gnulib/import/m4/limits-h.m4: Update.
1067 * gnulib/import/m4/localcharset.m4: Update.
1068 * gnulib/import/m4/locale-fr.m4: Update.
1069 * gnulib/import/m4/locale-ja.m4: Update.
1070 * gnulib/import/m4/locale-zh.m4: Update.
1071 * gnulib/import/m4/localtime-buffer.m4: Update.
1072 * gnulib/import/m4/longlong.m4: Update.
1073 * gnulib/import/m4/lstat.m4: Update.
1074 * gnulib/import/m4/malloc.m4: Update.
1075 * gnulib/import/m4/malloca.m4: Update.
1076 * gnulib/import/m4/math_h.m4: Update.
1077 * gnulib/import/m4/mbrtowc.m4: Update.
1078 * gnulib/import/m4/mbsinit.m4: Update.
1079 * gnulib/import/m4/mbsrtowcs.m4: Update.
1080 * gnulib/import/m4/mbstate_t.m4: Update.
1081 * gnulib/import/m4/memchr.m4: Update.
1082 * gnulib/import/m4/memmem.m4: Update.
1083 * gnulib/import/m4/mempcpy.m4: Update.
1084 * gnulib/import/m4/memrchr.m4: Update.
1085 * gnulib/import/m4/mkdir.m4: Update.
1086 * gnulib/import/m4/mkstemp.m4: Update.
1087 * gnulib/import/m4/mmap-anon.m4: Update.
1088 * gnulib/import/m4/mode_t.m4: Update.
1089 * gnulib/import/m4/msvc-inval.m4: Update.
1090 * gnulib/import/m4/msvc-nothrow.m4: Update.
1091 * gnulib/import/m4/multiarch.m4: Update.
1092 * gnulib/import/m4/nocrash.m4: Update.
1093 * gnulib/import/m4/off_t.m4: Update.
1094 * gnulib/import/m4/onceonly.m4: Update.
1095 * gnulib/import/m4/open-cloexec.m4: Update.
1096 * gnulib/import/m4/open.m4: Update.
1097 * gnulib/import/m4/openat.m4: Update.
1098 * gnulib/import/m4/opendir.m4: Update.
1099 * gnulib/import/m4/pathmax.m4: Update.
1100 * gnulib/import/m4/rawmemchr.m4: Update.
1101 * gnulib/import/m4/readdir.m4: Update.
1102 * gnulib/import/m4/readlink.m4: Update.
1103 * gnulib/import/m4/realloc.m4: Update.
1104 * gnulib/import/m4/rename.m4: Update.
1105 * gnulib/import/m4/rewinddir.m4: Update.
1106 * gnulib/import/m4/rmdir.m4: Update.
1107 * gnulib/import/m4/save-cwd.m4: Update.
1108 * gnulib/import/m4/secure_getenv.m4: Update.
1109 * gnulib/import/m4/setenv.m4: Update.
1110 * gnulib/import/m4/signal_h.m4: Update.
1111 * gnulib/import/m4/ssize_t.m4: Update.
1112 * gnulib/import/m4/stat-time.m4: Update.
1113 * gnulib/import/m4/stat.m4: Update.
1114 * gnulib/import/m4/std-gnu11.m4: Update.
1115 * gnulib/import/m4/stdbool.m4: Update.
1116 * gnulib/import/m4/stddef_h.m4: Update.
1117 * gnulib/import/m4/stdint.m4: Update.
1118 * gnulib/import/m4/stdio_h.m4: Update.
1119 * gnulib/import/m4/stdlib_h.m4: Update.
1120 * gnulib/import/m4/strchrnul.m4: Update.
1121 * gnulib/import/m4/strdup.m4: Update.
1122 * gnulib/import/m4/strerror.m4: Update.
1123 * gnulib/import/m4/string_h.m4: Update.
1124 * gnulib/import/m4/strstr.m4: Update.
1125 * gnulib/import/m4/strtok_r.m4: Update.
1126 * gnulib/import/m4/sys_socket_h.m4: Update.
1127 * gnulib/import/m4/sys_stat_h.m4: Update.
1128 * gnulib/import/m4/sys_time_h.m4: Update.
1129 * gnulib/import/m4/sys_types_h.m4: Update.
1130 * gnulib/import/m4/tempname.m4: Update.
1131 * gnulib/import/m4/time_h.m4: Update.
1132 * gnulib/import/m4/unistd-safer.m4: Update.
1133 * gnulib/import/m4/unistd_h.m4: Update.
1134 * gnulib/import/m4/warn-on-use.m4: Update.
1135 * gnulib/import/m4/wchar_h.m4: Update.
1136 * gnulib/import/m4/wchar_t.m4: Update.
1137 * gnulib/import/m4/wctype_h.m4: Update.
1138 * gnulib/import/m4/wint_t.m4: Update.
1139 * gnulib/import/malloc.c: Update.
1140 * gnulib/import/malloc/scratch_buffer.h: Update.
1141 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1142 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1143 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1144 * gnulib/import/malloca.c: Update.
1145 * gnulib/import/malloca.h: Update.
1146 * gnulib/import/malloca.valgrind: Update.
1147 * gnulib/import/math.in.h: Update.
1148 * gnulib/import/mbrtowc.c: Update.
1149 * gnulib/import/mbsinit.c: Update.
1150 * gnulib/import/mbsrtowcs-impl.h: Update.
1151 * gnulib/import/mbsrtowcs-state.c: Update.
1152 * gnulib/import/mbsrtowcs.c: Update.
1153 * gnulib/import/memchr.c: Update.
1154 * gnulib/import/memmem.c: Update.
1155 * gnulib/import/mempcpy.c: Update.
1156 * gnulib/import/memrchr.c: Update.
1157 * gnulib/import/mkdir.c: Update.
1158 * gnulib/import/mkstemp.c: Update.
1159 * gnulib/import/msvc-inval.c: Update.
1160 * gnulib/import/msvc-inval.h: Update.
1161 * gnulib/import/msvc-nothrow.c: Update.
1162 * gnulib/import/msvc-nothrow.h: Update.
1163 * gnulib/import/open.c: Update.
1164 * gnulib/import/openat-die.c: Update.
1165 * gnulib/import/openat-priv.h: Update.
1166 * gnulib/import/openat-proc.c: Update.
1167 * gnulib/import/openat.c: Update.
1168 * gnulib/import/openat.h: Update.
1169 * gnulib/import/opendir.c: Update.
1170 * gnulib/import/pathmax.h: Update.
1171 * gnulib/import/pipe-safer.c: Update.
1172 * gnulib/import/rawmemchr.c: Update.
1173 * gnulib/import/readdir.c: Update.
1174 * gnulib/import/readlink.c: Update.
1175 * gnulib/import/realloc.c: Update.
1176 * gnulib/import/ref-add.sin: Update.
1177 * gnulib/import/ref-del.sin: Update.
1178 * gnulib/import/rename.c: Update.
1179 * gnulib/import/rewinddir.c: Update.
1180 * gnulib/import/rmdir.c: Update.
1181 * gnulib/import/same-inode.h: Update.
1182 * gnulib/import/save-cwd.c: Update.
1183 * gnulib/import/save-cwd.h: Update.
1184 * gnulib/import/scratch_buffer.h: Update.
1185 * gnulib/import/secure_getenv.c: Update.
1186 * gnulib/import/setenv.c: Update.
1187 * gnulib/import/signal.in.h: Update.
1188 * gnulib/import/stat-time.c: Update.
1189 * gnulib/import/stat-time.h: Update.
1190 * gnulib/import/stat-w32.c: Update.
1191 * gnulib/import/stat-w32.h: Update.
1192 * gnulib/import/stat.c: Update.
1193 * gnulib/import/stdbool.in.h: Update.
1194 * gnulib/import/stddef.in.h: Update.
1195 * gnulib/import/stdint.in.h: Update.
1196 * gnulib/import/stdio.in.h: Update.
1197 * gnulib/import/stdlib.in.h: Update.
1198 * gnulib/import/str-two-way.h: Update.
1199 * gnulib/import/strchrnul.c: Update.
1200 * gnulib/import/strdup.c: Update.
1201 * gnulib/import/streq.h: Update.
1202 * gnulib/import/strerror-override.c: Update.
1203 * gnulib/import/strerror-override.h: Update.
1204 * gnulib/import/strerror.c: Update.
1205 * gnulib/import/string.in.h: Update.
1206 * gnulib/import/stripslash.c: Update.
1207 * gnulib/import/strnlen1.c: Update.
1208 * gnulib/import/strnlen1.h: Update.
1209 * gnulib/import/strstr.c: Update.
1210 * gnulib/import/strtok_r.c: Update.
1211 * gnulib/import/sys_stat.in.h: Update.
1212 * gnulib/import/sys_time.in.h: Update.
1213 * gnulib/import/sys_types.in.h: Update.
1214 * gnulib/import/tempname.c: Update.
1215 * gnulib/import/tempname.h: Update.
1216 * gnulib/import/time.in.h: Update.
1217 * gnulib/import/unistd--.h: Update.
1218 * gnulib/import/unistd-safer.h: Update.
1219 * gnulib/import/unistd.in.h: Update.
1220 * gnulib/import/unsetenv.c: Update.
1221 * gnulib/import/verify.h: Update.
1222 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1223 * gnulib/import/wchar.in.h: Update.
1224 * gnulib/import/wctype.in.h: Update.
1225 * gnulib/import/xalloc-oversized.h: Update.
1226 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1227 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1228
1229 2018-08-16 Gary Benson <gbenson@redhat.com>
1230
1231 PR gdb/13000:
1232 * gdb/main.c (captured_main_1): Exit with nonzero status
1233 in batch mode if the last command to be executed failed.
1234 * NEWS: Mention the above.
1235
1236 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1239 end of warning message.
1240
1241 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1242
1243 PR gdb/22943:
1244 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1245 (aarch64_extract_return_value): Use
1246 aapcs_is_vfp_call_or_return_candidate.
1247 (aarch64_return_in_memory): Likewise.
1248 (aarch64_store_return_value): Likewise.
1249
1250 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1251
1252 * aarch64-tdep.c
1253 (aapcs_is_vfp_call_or_return_candidate): Make static
1254 (pass_in_v_or_stack): Remove function.
1255 (pass_in_v_vfp_candidate): New function.
1256 (aarch64_push_dummy_call): Check for float register candidates.
1257
1258 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1259
1260 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1261 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1262 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1263
1264 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1265
1266 PR build/23399
1267 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1268 (struct ipa_sym_addresses): Rename to...
1269 (struct ipa_sym_addresses_common): ... this.
1270 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1271
1272 2018-08-28 Tom Tromey <tom@tromey.com>
1273
1274 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1275 (token_fifo): Now a std::vector.
1276 (yylex, c_parse): Update.
1277 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1278 (token_fifo): Now a std::vector.
1279 (yylex, d_parse): Update.
1280 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1281 (token_fifo): Now a std::vector.
1282 (yylex, go_parse): Update.
1283
1284 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1285
1286 * parser-defs.h (struct type_stack) <elements>: Change type to
1287 std::vector<union type_stack_elt>.
1288 <depth, size>: Remove.
1289 * parse.c (parse_exp_in_context_1): Adjust.
1290 (type_stack_reserve): Remove.
1291 (check_type_stack_depth): Remove.
1292 (insert_into_type_stack): Adjust to std::vector.
1293 (insert_type): Likewise.
1294 (push_type): Likewise.
1295 (push_type_int): Likewise.
1296 (insert_type_address_space): Likewise.
1297 (pop_type): Likewise.
1298 (pop_type_int): Likewise.
1299 (pop_typelist): Likewise.
1300 (pop_type_stack): Likewise.
1301 (append_type_stack): Likewise.
1302 (push_type_stack): Likewise.
1303 (get_type_stack): Likewise.
1304 (type_stack_cleanup): Likewise.
1305 (push_typelist): Likewise.
1306 (follow_types): Likewise.
1307 (_initialize_parse): Likewise.
1308
1309 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1310
1311 * NEWS: Mention csky target.
1312
1313 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1314 Hafiz Abid Qadeer <abidh@codesourcery.com>
1315 Don Breazeal <donb@codesourcery.com>
1316
1317 * csky-linux-tdep.c: New file.
1318 * csky-tdep.c: Likewise.
1319 * csky-tdep.h: Likewise.
1320 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1321 csky-tdep.o.
1322 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1323 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1324 * configure.tgt: Add csky support.
1325
1326 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1327
1328 * python/py-framefilter.c (py_print_frame): Print frame architecture
1329 when printing on an MI output.
1330
1331 2018-08-27 Tom Tromey <tom@tromey.com>
1332
1333 PR build/23087:
1334 * configure: Rebuild.
1335 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1336
1337 2018-08-27 Tom Tromey <tom@tromey.com>
1338
1339 * aarch64-linux-tdep.c
1340 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1341 casts to int.
1342
1343 2018-08-27 Tom Tromey <tom@tromey.com>
1344
1345 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1346 unsigned.
1347 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1348 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1349 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1350 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1351 unsigned.
1352
1353 2018-08-27 Tom Tromey <tom@tromey.com>
1354
1355 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1356 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1357
1358 2018-08-27 Tom Tromey <tom@tromey.com>
1359
1360 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1361 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1362 ULONGEST_MAX.
1363 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1364 ULONGEST_MAX.
1365 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1366 ULONGEST_MAX.
1367 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1368 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1369 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1370 ULONGEST_MAX.
1371 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1372 (ppc64_linux_sigaction_tramp_frame)
1373 (ppc32_linux_sighandler_tramp_frame)
1374 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1375 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1376 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1377 * mn10300-linux-tdep.c (am33_linux_sigframe)
1378 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1379 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1380 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1381 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1382 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1383 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1384 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1385 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1386 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1387 * microblaze-linux-tdep.c
1388 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1389 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1390 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1391 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1392 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1393 * common/common-types.h (ULONGEST_MAX): New define.
1394 (CORE_ADDR_MAX): Fix formatting.
1395 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1396 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1397 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1398 (arm_linux_rt_sigreturn_tramp_frame)
1399 (arm_eabi_linux_sigreturn_tramp_frame)
1400 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1401 (thumb2_eabi_linux_sigreturn_tramp_frame)
1402 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1403 (arm_linux_restart_syscall_tramp_frame)
1404 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1405 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1406 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1407 ULONGEST_MAX.
1408 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1409
1410 2018-08-27 Tom Tromey <tom@tromey.com>
1411
1412 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1413 CORE_ADDR_MAX.
1414 * mips-tdep.c (mips_deal_with_atomic_sequence)
1415 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1416 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1417 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1418 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1419 CORE_ADDR_MAX.
1420 * aarch64-tdep.c (aarch64_software_single_step): Use
1421 CORE_ADDR_MAX.
1422
1423 2018-08-27 Tom Tromey <tom@tromey.com>
1424
1425 * linespec.c (complete_linespec_component): Add cast to "char".
1426 * completer.c (completion_tracker::build_completion_result): Add
1427 cast to "char".
1428
1429 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1430
1431 * solist.h (struct solist, struct target_so_ops): Fix
1432 indentation.
1433
1434 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * ada-tasks.c (ada_task_info_s): Remove typedef.
1437 (DEF_VEC_O(ada_task_info_s)): Remove.
1438 (struct ada_tasks_inferior_data): Initialize fields.
1439 <task_list>: Make an std::vector.
1440 (get_ada_tasks_inferior_data): Allocate with new.
1441 (ada_get_task_number): Adjust.
1442 (get_task_number_from_id): Likewise.
1443 (valid_task_id): Likewise.
1444 (ada_get_task_info_from_ptid): Likewise.
1445 (iterate_over_live_ada_tasks): Likewise.
1446 (add_ada_task): Likewise.
1447 (read_known_tasks): Likewise.
1448 (ada_build_task_list): Likewise.
1449 (print_ada_task_info): Likewise.
1450 (info_task): Likewise.
1451 (task_command_1): Likewise.
1452
1453 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1454
1455 * ada-lang.c (add_angle_brackets): Return std::string.
1456
1457 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * python/py-threadevent.c (py_get_event_thread): Initialize
1460 pythread.
1461
1462 2018-08-24 Pedro Alves <palves@redhat.com>
1463
1464 * python/py-bpevent.c (create_breakpoint_event_object): Use
1465 copy-initialization.
1466 * python/py-continueevent.c (emit_continue_event): Use
1467 copy-initialization.
1468 * python/py-exitedevent.c (create_exited_event_object): Return a
1469 gdbpy_ref<>.
1470 (emit_exited_event): Use copy-initialization.
1471 * python/py-inferior.c (python_new_inferior)
1472 (python_inferior_deleted, add_thread_object): Use
1473 copy-initialization.
1474 * python/py-infevents.c (create_inferior_call_event_object)
1475 (create_register_changed_event_object)
1476 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1477 (emit_inferior_call_event, emit_memory_changed_event)
1478 (emit_register_changed_event): Use copy-initialization.
1479 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1480 Return a gdbpy_ref<>.
1481 (emit_new_objfile_event): Use copy-initialization.
1482 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1483 (emit_clear_objfiles_event): Use copy-initialization.
1484 * python/py-signalevent.c (create_signal_event_object): Use
1485 copy-initialization.
1486 * python/py-threadevent.c (create_thread_event_object): Use
1487 copy-initialization.
1488
1489 2018-08-24 Pedro Alves <palves@redhat.com>
1490 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 PR gdb/23379
1493 * python/py-continueevent.c: Include "gdbthread.h".
1494 (create_continue_event_object): Add intro comment. Add 'ptid'
1495 parameter. Use it to find thread to pass to
1496 create_thread_event_object.
1497 (emit_continue_event): Pass PTID down to
1498 create_continue_event_object.
1499 * python/py-event.h (py_get_event_thread): Declare.
1500 (create_thread_event_object): Remove default from 'thread'
1501 parameter.
1502 * python/py-stopevent.c (create_stop_event_object): Use
1503 py_get_event_thread.
1504 * python/py-threadevent.c (get_event_thread): Rename to ...
1505 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1506 and use it to find the thread.
1507 (create_thread_event_object): Assert that THREAD isn't null.
1508 Don't find the event thread here.
1509
1510 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1511
1512 * block.h (blockrange, blockranges): New struct declarations.
1513 (struct block): Add new field named `ranges'.
1514 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1515 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1516 macros for accessing ranges in struct block.
1517 (make_blockranges): New declaration.
1518 block.c (make_blockranges): New function.
1519 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1520 for block.
1521 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1522 * blockframe.c (cache_pc_function_block): New static global.
1523 (clear_pc_function_cache): Clear cache_pc_function_block.
1524 (find_pc_partial_function): Move comment to symtab.h. Add
1525 support for non-contiguous blocks.
1526 * cli/cli-cmds.c (block.h): Include.
1527 (print_disassembly): Handle printing of non-contiguous blocks.
1528 (disassemble_current_function): Likewise.
1529 (disassemble_command): Likewise.
1530
1531 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1532 BLOCK_START.
1533 * blockframe.c (get_pc_function_start): Likewise.
1534 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1535 (gcc_symbol_address): Likewise.
1536 * compile/compile-object-run.c (compile_object_run): Likewise.
1537 * compile/compile.c (get_expr_block_and_pc): Likewise.
1538 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1539 (func_addr_to_tail_call_list): Likewise.
1540 * findvar.c (default_read_var_value): Likewise.
1541 * inline-frame.c (inline_frame_this_id): Likewise.
1542 (skip-inline_frames): Likewise.
1543 * infcmd.c (until_next_command): Likewise.
1544 * linespec.c (convert_linespec_to_sals): Likewise.
1545 * parse.c (parse_exp_in_context_1): Likewise.
1546 * printcmd.c (build_address_symbolic): likewise.
1547 (info_address_command): Likewise.
1548 symtab.c (find_function_start_sal): Likewise.
1549 (skip_prologue_sal): Likewise.
1550 (find_function_alias_target): Likewise.
1551 (find_gnu_ifunc): Likewise.
1552 * stack.c (find_frame_funname): Likewise.
1553 * symtab.c (fixup_symbol_section): Likewise.
1554 (find_function_start_sal): Likewise.
1555 (skip_prologue_sal): Likewsie.
1556 (find_function_alias_target): Likewise.
1557 (find_gnu_ifunc): Likewise.
1558 * tracepoint.c (info_scope_command): Likewise.
1559 * value.c (value_fn_field): Likewise.
1560
1561 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1562 in place of find_pc_partial_function.
1563 * blockframe.c (find_function_entry_range_from_pc): New function.
1564 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1565 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1566 for each range in a block.
1567
1568
1569 2018-08-23 Xavier Roirand <roirand@adacore.com>
1570
1571 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1572 incrementation.
1573
1574 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1575
1576 * solib-svr4.c (read_program_headers_from_bfd): Return
1577 gdb::optional<gdb::byte_vector>.
1578 (svr4_exec_displacement): Adjust.
1579
1580 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1581
1582 * solib-svr4.c (read_program_header): Return
1583 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1584 (find_program_interpreter): Return
1585 gdb::optional<gdb::byte_vector>.
1586 (scan_dyntag_auxv): Adjust.
1587 (enable_break): Adjust.
1588 (svr4_exec_displacement): Adjust.
1589
1590 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1591
1592 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1593 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1594
1595 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1596
1597 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1598 string_vprintf.
1599 * guile/scm-utils.c (gdbscm_printf): Likewise.
1600 * serial.c (serial_printf): Likewise.
1601 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1602
1603 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1604
1605 * stack.c (print_frame): Print frame architecture when printing on
1606 an MI output.
1607 * NEWS: Mention new "arch" attribute in frame output.
1608
1609 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1610
1611 * arch/aarch64.h (aarch64_regnum): Update comment.
1612
1613 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1614
1615 * NEWS: Add SVE to 8.2 section.
1616
1617 2018-08-21 Pedro Alves <palves@redhat.com>
1618
1619 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1620 out from gdbscm_parse_function_args.
1621 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1622 gdbscm_parse_function_args_1.
1623
1624 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1625
1626 PR gdb/17816
1627 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1628 operator.
1629
1630 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1631
1632 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1633
1634 2018-08-19 Michael Spang <spang@google.com>
1635
1636 PR gdb/11786
1637 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1638 for PT_TLS segments.
1639
1640 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1641
1642 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1643 dwarf_variable_value.
1644 * dwarf2-frame.c (class dwarf_expr_executor):
1645 Add override for dwarf_variable_value.
1646 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1647 (class symbol_needs_eval_context): Likewise.
1648 (indirect_synthetic_pointer): Add forward declaration.
1649 (sect_variable_value): New function.
1650 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1651 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1652 for DW_OP_GNU_variable_value.
1653
1654 2018-08-16 Tom Tromey <tom@tromey.com>
1655
1656 * top.c (read_command_file): Update.
1657 (command_line_input): Remove "repeat" argument.
1658 * ada-lang.c (get_selections): Update.
1659 * linespec.c (decode_line_2): Update.
1660 * defs.h (command_line_input): Remove argument.
1661 * cli/cli-script.c (read_next_line): Update.
1662 * python/py-gdb-readline.c: Update.
1663
1664 2018-08-17 Tom Tromey <tom@tromey.com>
1665
1666 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1667 command_line_input.
1668
1669 2018-08-15 Tom Tromey <tom@tromey.com>
1670
1671 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1672
1673 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1674
1675 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1676 If used, use find_pc_partial_function to find address range
1677 to disassemble.
1678 * mi/mi-main.c (mi_cmd_list_features): Report
1679 "data-disassemble-a-option" feature.
1680 * NEWS: Mention new -data-disassemble option -a.
1681
1682 2018-08-13 Tom Tromey <tom@tromey.com>
1683
1684 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1685
1686 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1687
1688 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1689 (aarch64_linux_collect_sve_regset): Likewise.
1690 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1691 * regcache.h (regcache_map_entry_size): New function.
1692
1693 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1694
1695 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1696 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1697 (SVE_HEADER_VL_LENGTH): Likewise.
1698 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1699 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1700 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1701 (SVE_HEADER_SIZE_OFFSET): Likewise.
1702 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1703 (SVE_HEADER_VL_OFFSET): Likewise.
1704 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1705 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1706 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1707 (SVE_HEADER_SIZE): Likewise.
1708 (aarch64_linux_core_read_vq): Add function.
1709 (aarch64_linux_core_read_description): Check for SVE section.
1710
1711 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1712
1713 * aarch64-fbsd-tdep.c
1714 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1715 collect_size.
1716 * aarch64-linux-tdep.c
1717 (aarch64_linux_iterate_over_regset_sections): Likewise.
1718 * alpha-linux-tdep.c
1719 (alpha_linux_iterate_over_regset_sections):
1720 * alpha-nbsd-tdep.c
1721 (alphanbsd_iterate_over_regset_sections): Likewise.
1722 * amd64-fbsd-tdep.c
1723 (amd64fbsd_iterate_over_regset_sections): Likewise.
1724 * amd64-linux-tdep.c
1725 (amd64_linux_iterate_over_regset_sections): Likewise.
1726 * arm-bsd-tdep.c
1727 (armbsd_iterate_over_regset_sections): Likewise.
1728 * arm-fbsd-tdep.c
1729 (arm_fbsd_iterate_over_regset_sections): Likewise.
1730 * arm-linux-tdep.c
1731 (arm_linux_iterate_over_regset_sections): Likewise.
1732 * corelow.c (get_core_registers_cb): Likewise.
1733 (core_target::fetch_registers): Likewise.
1734 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1735 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1736 * gdbarch.h (void): Regenerate.
1737 * gdbarch.sh: Add supply_size and collect_size.
1738 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1739 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1740 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1741 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1742 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1743 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1744 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1745 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1746 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1747 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1748 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1749 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1750 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1751 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1752 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1753 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1754 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1755 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1756 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1757 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1758 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1759 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1760 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1761 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1762 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1763 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1764 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1765 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1766 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1767 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1768
1769 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1770
1771 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1772 with string_printf.
1773
1774 2018-08-10 Keith Seitz <keiths@redhat.com>
1775
1776 * compile/compile-c-support.c (add_code_header, add_code_footer):
1777 Move into policy class.
1778 (c_push_user_expression, pop_user_expression_nop)
1779 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1780 (compile_program): New host class.
1781 (c_compile_program): New typedef.
1782 (c_compute_porgram): Use c_compile_program.
1783
1784 2018-08-10 Keith Seitz <keiths@redhat.com>
1785
1786 * compile/compile-internal.h (compile_instance::~compile_instance):
1787 Remove calls to htab_delete.
1788 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1789 * compile.c (compile_instance::compile_instance): Initialize
1790 htab unique pointers.
1791 (compile_instance::get_cached_type, compile_instance::insert_type)
1792 (compile_instance::error_symbol_once): Update for unique_ptr.
1793
1794 2018-08-10 Keith Seitz <keiths@redhat.com>
1795
1796 * compile/compile-c-symbols.c (struct symbol_error)
1797 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1798 (compile_instance::insert_symbol_error)
1799 (compile_instance::error_symbol_once): Move to ...
1800 * compile/compile.c: ... here.
1801
1802 2018-08-10 Keith Seitz <keiths@redhat.com>
1803
1804 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1805 instead of `new_compile_instance'.
1806 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1807 Update description.
1808 If the symbol error map is not initialized, create it.
1809 (generate_c_for_for_one_symbol): Do not check/initialize
1810 the symbol error map.
1811 * compile/compile-c-types.c (compile_c_instance): Make a class.
1812 Update all callers.
1813 (compile_instance::compile_instance): Initialize the type cache.
1814 (get_cached_type): New function.
1815 (insert_type): Update description.
1816 (compile_c_instance::m_default_cflags): Define.
1817 (convert_type): Update description. Use get_cached_type.
1818 (delete_instance): Moved to destructor.
1819 (new_compile_instance): Moved to constructor.
1820 * compile/compile-c.h (compile_c_instance): Make class inheriting
1821 from compile_instance.
1822 <base>: Remove field.
1823 <type_map, symbol_err_map>: Move to base class.
1824 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1825 * compile/compile-internal.h (compile_instance): Make class.
1826 <type_map_t, symbol_err_map_t>: Define.
1827 <fe>: Rename to `m_gcc_fe'.
1828 <scope, block, gcc_target_options>: Add `m_' prefix.
1829 <m_type_map, m_symbol_err_map>: New fields, moved from
1830 compile_c_instance.
1831 <destroy>: Remove.
1832 (convert_type, new_compile_instance): Remove.
1833 * compile/compile.c (cleanup_compile_instance): Remove.
1834 (compile_to_object): Use unique_ptr to eliminate cleanups.
1835 (compile_instance::set_print_callback, compile_instance::version)
1836 (compile_instance::set_verbose)
1837 (compile_instance::set_driver_filename)
1838 (compile_instance::set_triplet_regexp)
1839 (compile_instance::set_arguments)
1840 (compile_instance::set_source_file)
1841 (compile_instance::compile): Define.
1842
1843 2018-08-10 Keith Seitz <keiths@redhat.com>
1844
1845 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1846 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1847 gcc-c-fe.def to define C plugin.
1848 (delete_instance): Delete `c_plugin'.
1849 (new_compile_instance): Initialize `c_plugin'.
1850 * compile/compile-c.h: Include gcc_c_plugin.h.
1851 (struct compile_c_instance) <c_plugin>: New member.
1852 * gcc-c-plugin.h: New file.
1853 Update all callers with API change.
1854
1855 2018-08-10 Keith Seitz <keiths@redhat.com>
1856
1857 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1858 (HFILES_NO_SRCDIR): ... to here.
1859 Add compile-internal.h and compile-c.h.
1860 * compile/compile-c-support.c: Include compile-c.h.
1861 * compile/compile-c-symbols.c: Include compile-c.h.
1862 (generate_c_for_variable_locations): Update comment.
1863 * compile/compile-c-types.c: Include compile-c.h.
1864 * compile/compile-c.h: New file -- moved C language declarations
1865 from other files here.
1866 * compile/compile-internal.h: Do not include hashtab.h or
1867 common/enum-flags.h.
1868 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1869 (gcc_convert_symbol, gcc_symbol_address)
1870 (generate_c_for_variable_locations, c_get_mode_for_size)
1871 (c_get_range_decl_name): Definitions moved to compile-c.h.
1872 * compile/compile-loc2c.c: Include compile-c.h.
1873
1874 2018-08-10 Keith Seitz <keiths@redhat.com>
1875
1876 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1877 (c_symbol_substitution_name): ... this.
1878 Update all callers.
1879
1880 2018-08-10 Keith Seitz <keiths@redhat.com>
1881
1882 * compile/compile-c-support.c (c_compute_program): Use
1883 unique_xmalloc_ptr to eliminate cleanup.
1884 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1885 Return a unique_xmalloc_ptr and eliminate cleanup.
1886 * compile/compile-internal.h (generate_c_for_variable_locations):
1887 Return unique_xmalloc_ptr and update description.
1888
1889 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1890
1891 * corelow.c (core_target::get_core_register_section): Rename
1892 min_size to section_min_size.
1893
1894 2018-08-09 Jim Wilson <jimw@sifive.com>
1895
1896 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1897 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1898 * NEWS: Mention new GNU/Linux RISC-V target.
1899 * configure.host: Add riscv*-*-linux*.
1900 * configure.nat: Add riscv*.
1901 * configure.tgt: Add riscv*-*-linux*.
1902 * riscv-linux-nat.c: New file.
1903 * riscv-linux-tdep.c: New file.
1904
1905 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1906
1907 * infrun.c (resume): Make static, add forward declaration.
1908 (proceed): Update header comment.
1909 * infrun.h (resume): Delete declaration.
1910
1911 2018-08-09 Tom Tromey <tom@tromey.com>
1912
1913 * riscv-tdep.h: Minor formatting fixes.
1914
1915 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1916
1917 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1918 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1919 (test_mkdir_recursive): Likewise.
1920 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1921
1922 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1923
1924 * valarith.c (value_subscripted_rvalue): If an array is not in
1925 memory, and we don't know the upper bound, then we can't know that
1926 the requested element exists or not.
1927
1928 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1929
1930 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1931 (target_options_to_string): Add comment.
1932
1933 2018-08-08 Tom Tromey <tom@tromey.com>
1934
1935 * unittests/scoped_mmap-selftests.c: Check result of "write".
1936
1937 2018-08-08 Jim Wilson <jimw@sifive.com>
1938
1939 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1940 (decode_register_index_short): New.
1941 (decode_j_type_insn, decode_cj_type_insn): New.
1942 (decode_b_type_insn, decode_cb_type_insn): New.
1943 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1944 local xlen. Check xlen when decoding ambiguous compressed insns. In
1945 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1946 is_c_sw_insn instead of is_sw_insn.
1947 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1948 (riscv_software_single_step): New.
1949 * riscv-tdep.h (riscv_software_single_step): Declare.
1950
1951 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1952 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1953
1954 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1955
1956 PR gdb/18050:
1957 * target.c (dispose_inferior): Don't dispose of inferiors that are
1958 already killed.
1959
1960 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1961
1962 * remote.c (remote_target::download_tracepoint): Change char* to
1963 const char*.
1964
1965 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1966
1967 * target.h (target_options_to_string): Return an std::string.
1968 * target.c (str_comma_list_concat_elem): Return void, use
1969 std::string.
1970 (do_option): Likewise.
1971 (target_options_to_string): Return an std::string.
1972 * linux-nat.c (linux_nat_target::wait): Adjust.
1973 * target-debug.h (target_debug_print_options): Adjust.
1974
1975 2018-08-07 Tom Tromey <tom@tromey.com>
1976
1977 * Makefile.in (CPPFLAGS): New variable.
1978 (INTERNAL_CPPFLAGS): Use it.
1979
1980 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * NEWS: Mention the index cache.
1983
1984 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1985
1986 * common/pathstuff.h (get_standard_cache_dir): New.
1987 * common/pathstuff.c (get_standard_cache_dir): New.
1988 * build-id.h (build_id_to_string): New.
1989 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1990 DEBUG_STR_SUFFIX): Move to here.
1991 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1992 DEBUG_STR_SUFFIX): Move from there.
1993 (write_psymtabs_to_index): Make non-static, add basename
1994 parameter. Write to temporary files, rename when done.
1995 (save_gdb_index_command): Adjust call to
1996 write_psymtabs_to_index.
1997 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1998 field.
1999 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2000 (get_gdb_index_contents_from_cache): New.
2001 (get_gdb_index_contents_from_cache_dwz): New.
2002 (dwarf2_initialize_objfile): Read index from cache.
2003 (dwarf2_build_psymtabs): Save to index.
2004 * dwarf-index-cache.h: New file.
2005 * dwarf-index-cache.c: New file.
2006 * dwarf-index-write.h: New file.
2007
2008 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2009
2010 * gnulib/aclocal.m4: Re-generate.
2011 * gnulib/config.in: Re-generate.
2012 * gnulib/configure: Re-generate.
2013 * gnulib/import/Makefile.am: Re-generate.
2014 * gnulib/import/Makefile.in: Re-generate.
2015 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2016 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2017 * gnulib/import/m4/mkdir.m4: New file.
2018 * gnulib/import/mkdir.c: New file.
2019 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2020 module.
2021
2022 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2023
2024 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2025 * common/scoped_mmap.c: New file.
2026 * common/scoped_mmap.h (destroy): New method.
2027 (~scoped_mmap, reset): Use destroy.
2028 (scoped_mmap): New move constructor.
2029 (mmap_file): New declaration.
2030 * unittests/scoped_mmap-selftests.c (test_normal,
2031 test_invalid_filename, run_tests): New functions.
2032 (_initialize_scoped_mmap_selftests): Register selftest.
2033
2034 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2035
2036 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2037 (read_gdb_index_from_buffer): ... this. Remove section
2038 parameter, add buffer parameter.
2039 (get_gdb_index_contents_ftype,
2040 get_gdb_index_contents_dwz_ftype): New typedefs.
2041 (dwarf2_read_gdb_index): Add callback parameters to get the
2042 index contents.
2043 (get_gdb_index_contents_from_section): New.
2044 (dwarf2_initialize_objfile): Update call to
2045 dwarf2_read_gdb_index.
2046
2047 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2048
2049 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2050 (gdb_open_cloexec): Likewise.
2051 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2052 (commandline_from_pid): Likewise.
2053 (linux_xfer_osdata_threads): Likewise.
2054 (linux_xfer_osdata_fds): Likewise.
2055 * ada-lang.c (is_package_name): Likewise.
2056 * auxv.c (procfs_xfer_auxv): Likewise.
2057 * breakpoint.c (print_one_breakpoint_location): Use
2058 uiout::field_fmt.
2059 (print_one_catch_solib): Use string_printf.
2060 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2061 (add_pe_forwarded_sym): Likewise.
2062 * dwarf2read.c (create_type_unit_group): Likewise.
2063 (build_error_marker_type): Likewise.
2064 * infcall.c (get_function_name): Likewise.
2065 * valprint.c (print_converted_chars_to_obstack): Likewise.
2066 * xtensa-tdep.c (xtensa_register_type): Likewise.
2067
2068 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2069
2070 * remote.c (remote_target::download_tracepoint): Fix format
2071 string errors.
2072
2073 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2074
2075 * tracefile.c: Include common/byte-vector.h.
2076 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2077 with trace_regblock_size if needed. Update uses of buf.
2078
2079 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2080
2081 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2082 std::vector<unsigned char>.
2083 * tracepoint.c (collection_list::collection_list): Remove
2084 m_regs_mask initializer from initializer list. Resize
2085 m_regs_mask using the largest remote register number.
2086 (collection_list::add_remote_register): Remove size check on
2087 m_regs_mask. Use at to access element.
2088 (collection_list::stringify): Change type of temp_buf to
2089 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2090 stringify the register mask. Use pack_hex_byte for the register
2091 mask.
2092
2093 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2094
2095 * tracepoint.h (class collection_list) <add_register>: Remove.
2096 <add_remote_register, add_ax_registers, add_local_register>:
2097 Declare.
2098 <add_memrange>: Add scope parameter.
2099 * tracepoint.c (encode_actions_1): Likewise.
2100 (collection_list::add_register): Rename to ...
2101 (collection_list::add_remote_register): ... this. Update
2102 comment.
2103 (collection_list::add_ax_registers, add_local_register): New
2104 methods.
2105 (collection_list::add_memrange): Add scope parameter. Call
2106 add_local_register instead of add_register.
2107 (finalize_tracepoint_aexpr): New function.
2108 (collection_list::collect_symbol): Update calls to add_memrange.
2109 Call add_local_register instead of add_register. Call
2110 add_ax_registers. Call finalize_tracepoint_aexpr.
2111 (encode_actions_1): Get remote regnos for $reg action. Call
2112 add_remote_register, add_ax_registers, and add_local_register.
2113 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2114 (validate_actionline): Call finalize_tracepoint_aexpr.
2115
2116 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2117
2118 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2119 Replace array buf with gdb::char_vector buf, of size
2120 get_remote_packet_size (). Replace references to buf and
2121 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2122 and xsnprintf with snprintf. Raise errors if the buffer is too
2123 small.
2124
2125 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2126
2127 * remote.c (remote_target::download_tracepoint): Fix the has_more
2128 predicate in the QTDP action list iteration.
2129
2130 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2131
2132 * remote.c (remote_target::download_tracepoint): Fix indentation
2133 in for block.
2134
2135 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2136
2137 * proc-api.c (_initialize_proc_api): Remove c, unused.
2138 * procfs.c (procfs_init_inferior): Remove signals, unused.
2139 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2140 unused.
2141
2142 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2143 Andrew Burgess <andrew.burgess@embecosm.com>
2144
2145 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2146 'W_STOPCODE (0)' as this could be ambiguous.
2147
2148 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2149
2150 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2151 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2152 "ai_socktype").
2153
2154 2018-08-02 Tom Tromey <tom@tromey.com>
2155
2156 PR symtab/16842.
2157 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2158 symbols.
2159 (process_structure_scope): Likewise.
2160
2161 2018-08-02 Xavier Roirand <roirand@adacore.com>
2162
2163 PR gdb/22629:
2164 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2165 kill inferior.
2166
2167 2018-08-02 Tom Tromey <tom@tromey.com>
2168
2169 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2170 (darwin_suspend_inferior, darwin_resume_inferior)
2171 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2172 (darwin_check_new_threads): Check result of get_darwin_inferior.
2173
2174 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2175
2176 GDB 8.1.1 released.
2177
2178 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2179
2180 * varobj.c (varobj_get_path_expr_parent): Report an error if
2181 parent is a dynamic varobj.
2182
2183 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2184
2185 * gnulib/aclocal.m4: Re-generate.
2186 * gnulib/config.in: Re-generate.
2187 * gnulib/configure: Re-generate.
2188 * gnulib/import/Makefile.in: Re-generate.
2189 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2190 * gnulib/import/m4/onceonly.m4: Re-generate.
2191
2192 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * target-descriptions.c (struct xml_test_tdesc): New.
2195 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2196 (record_xml_tdesc): Update.
2197 (maintenance_check_xml_descriptions): Update.
2198 * target-descriptions.h (record_xml_tdesc): Update comment.
2199
2200 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2201
2202 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2203 checking array bounds are defined.
2204
2205 2018-07-30 Tom Tromey <tom@tromey.com>
2206
2207 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2208 irreflexivity violation.
2209
2210 2018-07-30 Tom Tromey <tom@tromey.com>
2211
2212 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2213 * value.c (unpack_long): Remove lint code.
2214 * valops.c (value_ind): Remove lint code.
2215 * valarith.c (value_x_binop, value_x_unop, value_equal)
2216 (value_pos): Remove lint code.
2217
2218 2018-07-28 Tom de Vries <tdevries@suse.de>
2219
2220 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2221 with undefined upper bound as <optimized out>.
2222
2223 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2224
2225 * gcore.in: Rename variable "name" to "prefix". Expand
2226 "usage" text.
2227
2228 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2229
2230 * windows-nat.c (windows_nat_target::create_inferior): Update to
2231 call close() in global namespace.
2232
2233 2018-07-26 Tom Tromey <tom@tromey.com>
2234
2235 * dwarf-index-write.c (add_address_entry): Don't add objfile
2236 offsets.
2237 * dbxread.c (find_stab_function): Rename from
2238 find_stab_function_addr. Return a bound_minimal_symbol.
2239 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2240 Don't add objfile offsets.
2241 (end_psymtab): Use raw_text_low, raw_text_high,
2242 MSYMBOL_VALUE_RAW_ADDRESS.
2243 (read_ofile_symtab): Update.
2244 (process_one_symbol): Update.
2245 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2246 offsets.
2247 (dw2_relocate): Remove.
2248 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2249 searching addrmap.
2250 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2251 Update.
2252 (process_psymtab_comp_unit_reader, add_partial_symbol)
2253 (add_partial_subprogram, dwarf2_ranges_read): Update.
2254 (load_partial_dies): Update.
2255 (add_address_entry): Don't add objfile offsets.
2256 (dwarf2_build_include_psymtabs): Update.
2257 (create_addrmap_from_aranges): Don't add objfile offsets.
2258 (dw2_find_pc_sect_compunit_symtab): Update.
2259 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2260 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2261 Update.
2262 (parse_partial_symbols): Don't add objfile offsets. Use
2263 raw_text_low, raw_text_high. Update.
2264 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2265 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2266 or call 'relocate' quick function. Clear psymbol_map.
2267 * psympriv.h (struct partial_symbol) <address>: Add section
2268 offset.
2269 <set_unrelocated_address>: Rename from set_address.
2270 <raw_text_low, raw_text_high>: New methods.
2271 <text_low, text_high>: Add objfile parameter.
2272 (add_psymbol_to_bcache): Add 'section' parameter. Call
2273 set_unrelocated_address.
2274 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2275 (find_pc_psymbol): Update.
2276 (fixup_psymbol_section, relocate_psymtabs): Remove.
2277 (dump_psymtab, psym_functions): Update.
2278 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2279 parameter.
2280 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2281 (start_psymtab_common): Update.
2282 * symfile-debug.c (debug_qf_relocate): Remove.
2283 (debug_sym_quick_functions): Update.
2284 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2285 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2286 Update.
2287
2288 2018-07-26 Tom Tromey <tromey@redhat.com>
2289
2290 * dbxread.c (end_psymtab): Use text_high_valid and
2291 text_low_valid.
2292 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2293 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2294 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2295 Update comment.
2296 <text_low_valid, text_high_valid>: New fields.
2297 <set_text_low, set_text_high>: Update.
2298 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2299
2300 2018-07-26 Tom Tromey <tom@tromey.com>
2301
2302 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2303 Update.
2304 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2305 textlow and texthigh fields.
2306 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2307 Update.
2308 * mdebugread.c (parse_lines, parse_partial_symbols)
2309 (psymtab_to_symtab_1): Update.
2310 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2311 Rename fields. Update comment. Now private.
2312 <text_low, text_high, set_text_low, set_text_high>: New methods.
2313 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2314 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2315 (start_psymtab_common, maintenance_info_psymtabs)
2316 (maintenance_check_psymtabs): Update.
2317 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2318 texthigh fields.
2319 (scan_xcoff_symtab): Update.
2320
2321 2018-07-26 Tom Tromey <tromey@redhat.com>
2322
2323 * psympriv.h (struct partial_symbol) <unrelocated_address,
2324 address, set_address>: New methods.
2325 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2326 (fixup_psymbol_section, relocate_psymtabs): Update.
2327 (print_partial_symbols): Add 'objfile' parameter. Update.
2328 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2329 Update.
2330
2331 2018-07-26 Tom Tromey <tom@tromey.com>
2332
2333 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2334 (debug_names::write_psymbols): Update.
2335 * psympriv.h (struct partial_symbol): Derive from
2336 general_symbol_info.
2337 <obj_section>: New method.
2338 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2339 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2340 (find_pc_sect_psymbol, fixup_psymbol_section)
2341 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2342 (print_partial_symbols, recursively_search_psymtabs)
2343 (compare_psymbols, psymbol_hash, psymbol_compare)
2344 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2345 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2346
2347 2018-07-26 Tom Tromey <tromey@redhat.com>
2348
2349 * dbxread.c (end_psymtab): Remove dead code.
2350
2351 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2352
2353 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2354 DWARF unwinders are disabled.
2355 * dwarf2-frame.c: Add dwarf2read.h include.
2356 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2357 disabled.
2358 (dwarf2_frame_unwinders_enabled_p): Define.
2359 (show_dwarf_unwinders_enabled_p): New function.
2360 (_initialize_dwarf2_frame): Register switch to control DWARF
2361 unwinder use.
2362 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2363 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2364 (show_dwarf_cmdlist): Remove static keyword.
2365 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2366 (show_dwarf_cmdlist): Declare.
2367 * NEWS: Document new feature.
2368
2369 2018-07-26 Tom de Vries <tdevries@suse.de>
2370
2371 PR breakpoints/23366
2372 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2373
2374 2018-07-26 Tom de Vries <tdevries@suse.de>
2375
2376 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2377 DW_AT_count can't be translated to a dynamic prop.
2378
2379 2018-07-25 Tom de Vries <tdevries@suse.de>
2380
2381 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2382 try/catch.
2383
2384 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2385
2386 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2387
2388 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2389
2390 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2391
2392 2018-07-24 Keith Seitz <keiths@redhat.comt
2393
2394 PR symtab/23010
2395 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2396 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2397 instead of add_symbol_to_list.
2398 (read_file_scope): Call prepare_one_comp_unit before reading
2399 any other DIEs.
2400
2401 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2402
2403 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2404
2405 2018-07-24 Tom Tromey <tom@tromey.com>
2406
2407 * utils.c (malloc, realloc, free): Don't declare.
2408 * configure, config.in: Rebuild.
2409 * configure.ac: Don't check for declarations of free, malloc, or
2410 realloc.
2411
2412 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2413
2414 * aarch64-linux-nat.c
2415 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2416 variable.
2417 * arm-linux-nat.c (fetch_regs): Likewise.
2418 (store_regs): Likewise.
2419 (fetch_vfp_regs): Likewise.
2420 (store_vfp_regs): Likewise.
2421 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2422 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2423 (arm_linux_nat_target::insert_watchpoint): Likewise.
2424 (arm_linux_nat_target::remove_watchpoint): Likewise.
2425 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2426 Likewise.
2427 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2428 Likewise.
2429 * ppc-linux-nat.c (fetch_register): Likewise.
2430 (fetch_all_gp_regs): Likewise.
2431 (fetch_ppc_registers): Likewise.
2432 (store_all_gp_regs): Likewise.
2433 (store_ppc_registers): Likewise.
2434 (hwdebug_insert_point): Likewise.
2435 (can_use_watchpoint_cond_accel): Likewise.
2436 * remote-sim.c (gdb_os_write_stdout): Likewise.
2437
2438 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2439 Tom Tromey <tom@tromey.com>
2440
2441 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2442 test for it.
2443 * configure: Rebuild.
2444
2445 2018-07-22 Tom Tromey <tom@tromey.com>
2446
2447 * regformats/regdat.sh: Define xmltarget_${name} inside
2448 #ifndef IN_PROCESS_AGENT.
2449
2450 2018-07-22 Tom Tromey <tom@tromey.com>
2451
2452 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2453
2454 2018-07-22 Tom Tromey <tom@tromey.com>
2455
2456 * symfile.c (reread_symbols): Notify iter, not objfile.
2457
2458 2018-07-22 Tom Tromey <tom@tromey.com>
2459
2460 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2461 Use arch_ops.
2462 (ravenscar_thread_target::prepare_to_store): Likewise.
2463
2464 2018-07-22 Tom Tromey <tom@tromey.com>
2465
2466 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2467 unused variable. Call value_fetch_lazy when needed.
2468 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2469 Remove unused variable. Call value_fetch_lazy when needed.
2470
2471 2018-07-22 Tom Tromey <tom@tromey.com>
2472
2473 * m32c-tdep.c (mark_dma): Return void.
2474 (make_regs): Remove unused declarations.
2475
2476 2018-07-22 Tom Tromey <tom@tromey.com>
2477
2478 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2479 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2480 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2481 bkscm_get_valid_block_smob_arg_unsafe for effect.
2482
2483 2018-07-22 Tom Tromey <tom@tromey.com>
2484
2485 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2486 value_type.
2487
2488 2018-07-22 Tom Tromey <tom@tromey.com>
2489
2490 * windows-nat.c (saved_context): Conditionally define.
2491 * remote.c (remote_target::remote_btrace_maybe_reopen):
2492 Conditionally declare "warned".
2493 * inflow.c (sigquit_ours): Conditionally define.
2494 (new_tty): Move "tty" declaration inside #if.
2495 * guile/guile.c (guile_datadir): Conditionally define.
2496 * charset.c (set_be_le_names): Move some declarations inside #if.
2497 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2498 #if.
2499 (parse_xml_btrace_conf): Likewise.
2500
2501 2018-07-22 Tom Tromey <tom@tromey.com>
2502
2503 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2504
2505 2018-07-22 Tom Tromey <tom@tromey.com>
2506
2507 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2508 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2509 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2510 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2511 * stack.c (frame_apply_level_command): Remove unused variable.
2512 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2513 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2514 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2515 unused variable.
2516 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2517 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2518 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2519 variable.
2520 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2521 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2522 variable.
2523 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2524 Remove unused variable.
2525 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2526 variable.
2527 * common/tdesc.c (print_xml_feature::visit): Remove unused
2528 variable.
2529 * compile/compile-object-load.c (store_regs): Remove unused
2530 variables.
2531 * complaints.c (clear_complaints): Remove unused variable.
2532 * corelow.c (core_target_open): Remove unused variable.
2533 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2534 variable.
2535 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2536 variable.
2537 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2538 variable.
2539 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2540 variable.
2541 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2542 variable.
2543 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2544 variable.
2545 * ia64-tdep.c (examine_prologue): Remove unused variable.
2546 * infcall.c (run_inferior_call): Remove unused variable.
2547 * inferior.c (exit_inferior): Remove unused variable.
2548 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2549 * linespec.c (decode_line_2): Remove unused variable.
2550 * linux-nat.c (super_close): Remove.
2551 * linux-tdep.c (linux_info_proc): Remove unused variable.
2552 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2553 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2554 Remove unused variable.
2555 * parse.c (find_minsym_type_and_address): Remove unused variable.
2556 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2557 variable.
2558 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2559 variable.
2560 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2561 variables.
2562 * record-btrace.c (record_btrace_target::store_registers): Remove
2563 unused variable.
2564 (cmd_show_record_btrace_cpu): Remove unused variable.
2565 * riscv-tdep.c (riscv_register_reggroup_p)
2566 (riscv_push_dummy_call, riscv_return_value): Remove unused
2567 variable.
2568 * rust-exp.y (literal): Remove unused variable.
2569 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2570 unused variable.
2571 <STRUCTOP_ANONYMOUS>: Likewise.
2572 * s390-linux-tdep.c (s390_linux_init_abi_31)
2573 (s390_linux_init_abi_64): Remove unused variable.
2574 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2575 (file_select_thread, net_windows_open, _initialize_ser_windows):
2576 Remove unused variables.
2577 * symtab.c (find_pc_sect_line): Remove unused variable.
2578 * target-memory.c (compute_garbled_blocks): Remove unused
2579 variable.
2580 (target_write_memory_blocks): Remove unused variable.
2581 * target.c (target_stack::unpush): Remove unused variables.
2582 * tracepoint.c (start_tracing, all_tracepoint_actions)
2583 (merge_uploaded_trace_state_variables)
2584 (print_one_static_tracepoint_marker): Remove unused variable.
2585 * unittests/basic_string_view/element_access/char/1.cc (test01):
2586 Remove unused variable.
2587 * windows-nat.c (windows_continue, windows_add_all_dlls)
2588 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2589 Remove unused variables.
2590
2591 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2592
2593 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2594 attr_profile in HAVE_ELF.
2595 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2596 HAVE_ELF.
2597
2598 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2599
2600 * frame.c (frame_register_unwind): Change parameter name.
2601 (frame_unwind_register): Likewise.
2602 (frame_unwind_register_value): Likewise.
2603 (frame_unwind_register_signed): Likewise.
2604 (frame_unwind_register_unsigned): Likewise.
2605 * frame.h (frame_register_unwind): Likewise.
2606 (frame_unwind_register): Likewise.
2607 (frame_unwind_register_value): Likewise.
2608 (frame_unwind_register_signed): Likewise.
2609 (frame_unwind_register_unsigned): Likewise.
2610 (frame_unwind_arch): Likewise.
2611
2612 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2613
2614 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2615 ISA maintenance.
2616
2617 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2618
2619 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2620 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2621 hand.
2622
2623 2018-07-20 Keith Seitz <keiths@redhat.com>
2624
2625 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2626 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2627 m_compunit_symtab, m_language>: Add "m_" prefix.
2628 Update all uses.
2629 * buildsym.c: Update all uses.
2630
2631 2018-07-20 Tom Tromey <tom@tromey.com>
2632
2633 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2634 * buildsym.h (record_line_ftype): Remove typedef.
2635
2636 2018-07-20 Tom Tromey <tom@tromey.com>
2637
2638 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2639 (end_expandable_symtab): Likewise.
2640 (end_symtab_get_static_block): Likewise.
2641 (end_symtab_from_static_block): Likewise.
2642 * buildsym-legacy.c (augment_type_symtab): Remove.
2643 (end_expandable_symtab): Remove.
2644 (end_symtab_get_static_block): Remove.
2645 (end_symtab_from_static_block): Remove.
2646
2647 2018-07-20 Tom Tromey <tom@tromey.com>
2648
2649 * dwarf2read.c: Include buildsym.h.
2650 (struct dwarf2_cu) <builder>: New method.
2651 (fixup_go_packaging): Update.
2652 (process_full_comp_unit, process_full_type_unit): Update. Don't
2653 use scoped_free_pendings.
2654 (using_directives): Add "cu" parameter, remove "language".
2655 (read_import_statement, setup_type_unit_groups, )
2656 (read_func_scope, read_lexical_block_scope)
2657 (dwarf2_record_block_ranges, read_namespace): Update.
2658 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2659 (lnp_state_machine::handle_end_sequence): Update.
2660 (class lnp_state_machine) <m_cu>: New member.
2661 <m_record_line_callback>: Remove.
2662 <m_currently_recording_lines>: New member.
2663 (lnp_state_machine::handle_set_file): Update.
2664 (noop_record_line): Remove.
2665 (dwarf_record_line_p): Add cu parameter.
2666 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2667 (lnp_state_machine::record_line)
2668 (lnp_state_machine::lnp_state_machine)
2669 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2670 (dwarf_decode_lines): Update.
2671 (dwarf2_start_subfile): Add cu parameter.
2672 (dwarf2_start_symtab, new_symbol): Update.
2673 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2674 Remove dwarf2_per_objfile parameter.
2675 (dwarf_decode_macros): Update.
2676
2677 2018-07-20 Tom Tromey <tom@tromey.com>
2678
2679 * stabsread.c (define_symbol): Update.
2680 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2681 * dwarf2read.c (new_symbol): Update.
2682 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2683 * cp-namespace.c: Include buildsym.h.
2684 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2685 * buildsym-legacy.c (get_buildsym_compunit): New function.
2686
2687 2018-07-20 Tom Tromey <tom@tromey.com>
2688
2689 * xcoffread.c: Include buildsym-legacy.h.
2690 * windows-nat.c: Include buildsym-legacy.h.
2691 * stabsread.c: Include buildsym-legacy.h.
2692 * mdebugread.c: Include buildsym-legacy.h.
2693 * buildsym-legacy.h: New file.
2694 * buildsym-legacy.c: New file, from buildsym.c.
2695 * go32-nat.c: Include buildsym-legacy.h.
2696 * dwarf2read.c: Include buildsym-legacy.h.
2697 * dbxread.c: Include buildsym-legacy.h.
2698 * cp-namespace.c: Include buildsym-legacy.h.
2699 * coffread.c: Include buildsym-legacy.h.
2700 * buildsym.h: Move some contents to buildsym-legacy.h.
2701 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2702 buildsym-legacy.c.
2703 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2704
2705 2018-07-20 Tom Tromey <tom@tromey.com>
2706
2707 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2708 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2709 (buildsym_compunit::buildsym_compunit)
2710 (buildsym_compunit::~buildsym_compunit)
2711 (buildsym_compunit::get_macro_table): Define.
2712
2713 2018-07-20 Tom Tromey <tom@tromey.com>
2714
2715 * buildsym.c (reset_symtab_globals): Remove.
2716 (buildsym_compunit::end_symtab_from_static_block): Update.
2717 (buildsym_compunit::augment_type_symtab): Update.
2718 (end_symtab_from_static_block): Call free_buildsym_compunit.
2719 (augment_type_symtab, end_symtab, end_expandable_symtab):
2720 Likewise.
2721
2722 2018-07-20 Tom Tromey <tom@tromey.com>
2723
2724 * arch-utils.c: Do not include buildsym.h.
2725 * mipsread.c: Do not include buildsym.h.
2726 * machoread.c: Do not include buildsym.h.
2727 * elfread.c: Do not include buildsym.h.
2728
2729 2018-07-20 Tom Tromey <tom@tromey.com>
2730
2731 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2732 initialization.
2733 (buildsym_compunit): Add new constructor.
2734 (struct buildsym_compunit) <get_last_source_file, finish_block,
2735 record_block_range, start_subfile, patch_subfile_names,
2736 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2737 set_last_source_start_addr, get_last_source_start_addr,
2738 get_local_using_directives, set_local_using_directives,
2739 get_global_using_directives, outermost_context_p,
2740 get_current_context_stack, get_context_stack_depth,
2741 get_current_subfile, get_local_symbols, get_file_symbols,
2742 get_global_symbols, record_debugformat, record_producer,
2743 push_context, pop_context, end_symtab_get_static_block,
2744 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2745 New public methods.
2746 <record_pending_block, finish_block_internal, make_blockvector,
2747 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2748 private methods.
2749 Update all users.
2750
2751 2018-05-22 Tom Tromey <tom@tromey.com>
2752
2753 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2754 parameter.
2755 (finish_block_internal): Update.
2756
2757 2018-07-20 Tom Tromey <tom@tromey.com>
2758
2759 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2760 parameter.
2761 (finish_block_internal): Update.
2762
2763 2018-07-20 Tom Tromey <tom@tromey.com>
2764
2765 * buildsym.h (EXTERN): Don't define or undef.
2766 * buildsym.c (EXTERN): Don't define.
2767
2768 2018-07-20 Tom Tromey <tom@tromey.com>
2769
2770 * buildsym.c: Remove TODO comment.
2771
2772 2018-07-20 Tom Tromey <tom@tromey.com>
2773
2774 * coffread.c (coff_symtab_read): Update.
2775 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2776 (xcoff_new_init): Update.
2777 * mipsread.c (mipscoff_new_init): Update.
2778 * mdebugread.c (mdebug_build_psymtabs): Update.
2779 * elfread.c (elf_new_init): Update.
2780 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2781 Update.
2782 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2783 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2784 (stabsect_build_psymtabs): Update.
2785 * buildsym.h (buildsym_init): Don't declare.
2786 * buildsym.c: Update comment.
2787 (prepare_for_building): Remove.
2788 (start_symtab, restart_symtab): Update.
2789 (reset_symtab_globals): Update comment.
2790 (buildsym_init): Remove.
2791
2792 2018-07-20 Tom Tromey <tom@tromey.com>
2793
2794 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2795 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2796 (read_enum_type, common_block_start, common_block_end)
2797 (cleanup_undefined_types_1, finish_global_stabs): Update.
2798 * mdebugread.c (psymtab_to_symtab_1): Update.
2799 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2800 (read_lexical_block_scope, new_symbol): Update.
2801 * dbxread.c (process_one_symbol): Update.
2802 * coffread.c (coff_symtab_read, process_coff_symbol)
2803 (coff_read_enum_type): Update.
2804 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2805 declare.
2806 (get_local_symbols, get_file_symbols, get_global_symbols): New
2807 functions.
2808 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2809 m_global_symbols.
2810 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2811 (~scoped_free_pendings): Update.
2812 (finish_block, prepare_for_building, reset_symtab_globals)
2813 (end_symtab_get_static_block, end_symtab_with_blockvector)
2814 (augment_type_symtab, push_context): Update.
2815 (get_local_symbols, get_file_symbols, get_global_symbols): New
2816 functions.
2817 (buildsym_init): Update.
2818
2819 2018-07-20 Tom Tromey <tom@tromey.com>
2820
2821 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2822 (process_full_type_unit): Likewise.
2823 (dwarf2_start_symtab): Set list_in_scope.
2824
2825 2018-07-20 Tom Tromey <tom@tromey.com>
2826
2827 * dwarf2read.c (process_psymtab_comp_unit_reader)
2828 (build_type_psymtabs_reader): Do not set list_in_scope.
2829
2830 2018-07-20 Tom Tromey <tom@tromey.com>
2831
2832 * buildsym.c (free_pendings): Remove.
2833 (add_symbol_to_list, scoped_free_pendings)
2834 (finish_block_internal, buildsym_init): Update.
2835
2836 2018-07-20 Tom Tromey <tom@tromey.com>
2837
2838 * xcoffread.c (read_xcoff_symtab): Update.
2839 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2840 Update.
2841 * dbxread.c (process_one_symbol): Update.
2842 * coffread.c (coff_symtab_read): Update.
2843 * buildsym.h (finish_block): Update.
2844 * buildsym.c (finish_block): Remove "listhead" argument.
2845 (end_symtab_get_static_block): Update.
2846
2847 2018-07-20 Tom Tromey <tom@tromey.com>
2848
2849 * buildsym.h (class scoped_free_pendings): Remove constructor.
2850 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2851 method.
2852 <m_pending_block_obstack, m_pending_blocks>: New members.
2853 (pending_block_obstack, pending_blocks): Remove.
2854 (scoped_free_pendings::scoped_free_pendings): Default.
2855 (~scoped_free_pendings): Update.
2856 (free_pending_blocks): Remove.
2857 (finish_block_internal, record_pending_block, make_blockvector)
2858 (end_symtab_get_static_block, augment_type_symtab, push_context)
2859 (buildsym_init): Update.
2860
2861 2018-07-20 Tom Tromey <tom@tromey.com>
2862
2863 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2864 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2865 members.
2866 (pending_addrmap, pending_addrmap_obstack)
2867 (pending_addrmap_interesting): Remove.
2868 (scoped_free_pendings, record_block_range, make_blockvector)
2869 (prepare_for_building, reset_symtab_globals, buildsym_init):
2870 Update.
2871
2872 2018-07-20 Tom Tromey <tom@tromey.com>
2873
2874 * xcoffread.c (process_linenos): Update.
2875 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2876 * mdebugread.c (psymtab_to_symtab_1): Update.
2877 * dwarf2read.c (setup_type_unit_groups)
2878 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2879 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2880 * dbxread.c (process_one_symbol): Update.
2881 * coffread.c (coff_symtab_read, enter_linenos)
2882 (process_coff_symbol): Update.
2883 * buildsym.h (current_subfile): Don't declare.
2884 (get_current_subfile): Declare.
2885 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2886 member.
2887 (start_subfile, free_buildsym_compunit, push_subfile)
2888 (prepare_for_building, start_symtab): Update.
2889 (get_current_subfile): New function.
2890
2891 2018-07-20 Tom Tromey <tom@tromey.com>
2892
2893 * coffread.c (coff_symtab_read): Update.
2894 * xcoffread.c (read_xcoff_symtab): Update.
2895 * dwarf2read.c (new_symbol): Update.
2896 (read_func_scope, read_lexical_block_scope): Update.
2897 * dbxread.c (process_one_symbol): Update.
2898 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2899 (outermost_context_p): Remove macro.
2900 (outermost_context_p, get_current_context_stack)
2901 (get_context_stack_depth): Declare.
2902 (pop_context): Return struct context_stack.
2903 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2904 member.
2905 (context_stack_size): Remove.
2906 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2907 (prepare_for_building, end_symtab_get_static_block)
2908 (augment_type_symtab, push_context): Update.
2909 (pop_context): Return struct context_stack.
2910 (outermost_context_p, get_current_context_stack)
2911 (get_context_stack_depth): New functions.
2912 (buildsym_init): Update.
2913
2914 2018-07-20 Tom Tromey <tom@tromey.com>
2915
2916 * rust-exp.y: Now a pure parser. Update all rules.
2917 (%union): Move earlier.
2918 (current_parser, work_obstack): Remove globals.
2919 (rust_parser, ~rust_parser): Update.
2920 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2921 lex_character, lex_number, lex_string, lex_identifier,
2922 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2923 convert_name, convert_params_to_expression,
2924 convert_ast_to_expression, ast_basic_type, ast_operation,
2925 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2926 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2927 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2928 ast_array_type, ast_slice_type, ast_reference_type,
2929 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2930 (rust_parse): Update.
2931 (rustyyerror, rustyylex): Add parser parameter.
2932 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2933 (rust_lex_stringish_test, rust_lex_test_sequence)
2934 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2935 (rust_lex_test_push_back, rust_lex_tests): Update.
2936
2937 2018-07-19 Pedro Alves <palves@redhat.com>
2938
2939 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2940 gdb::unique_xmalloc_ptr.
2941 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2942 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2943 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2944 copy-initialization.
2945 * guile/scm-pretty-print.c (ppscm_print_children): Use
2946 gdb::unique_xmalloc_ptr instead of cleanups.
2947 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2948 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2949 gdb::unique_xmalloc_ptr.
2950 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2951 Adjust to use gdb::unique_xmalloc_ptr.
2952 * guile/scm-utils.c (extract_arg): Adjust.
2953 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2954 gdb::unique_xmalloc_ptr instead of a cleanup.
2955
2956 2018-07-19 Tom Tromey <tom@tromey.com>
2957
2958 * utils.c (do_value_free_to_mark)
2959 (make_cleanup_value_free_to_mark): Remove.
2960 * utils.h (make_cleanup_value_free_to_mark): Remove.
2961
2962 2018-07-19 Pedro Alves <palves@redhat.com>
2963
2964 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2965 forwarding reference.
2966
2967 2018-07-18 Pedro Alves <palves@redhat.com>
2968
2969 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2970 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2971 cleanup.
2972
2973 2018-07-18 Pedro Alves <palves@redhat.com>
2974
2975 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2976 exceptions.
2977 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2978 (gdbscm_wrap): New.
2979 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2980 directly instead of a cleanup.
2981 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2982 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2983 (vlscm_binop_gdbthrow): New, factored out from ...
2984 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2985 (vlscm_rich_compare): Use gdbscm_wrap.
2986 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2987 instead of a cleanup.
2988 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2989 cleanup.
2990 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2991 Use xfree directly instead of a cleanup.
2992 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2993 Adjust to use gdbscm_wrap and scoped_value_mark.
2994 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2995 (gdbscm_value_address, gdbscm_value_dereference)
2996 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2997 scoped_value_mark.
2998 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2999 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3000 scoped_value_mark.
3001 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3002 gdbscm_wrap and scoped_value_mark.
3003 (gdbscm_value_to_string): Use xfree directly instead of a
3004 cleanup. Move 'buffer' unique_ptr to TRY scope.
3005 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3006 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3007 scoped_value_mark.
3008 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3009 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3010 scoped_value_mark.
3011 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3012 gdbscm_wrap.
3013
3014 2018-07-18 Tom de Vries <tdevries@suse.de>
3015
3016 * findvar.c (default_read_var_value): Also resolve dynamic type for
3017 LOC_OPTIMIZED_OUT vars.
3018
3019 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3020
3021 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3022 decoding.
3023
3024 2018-07-17 Tom Tromey <tom@tromey.com>
3025
3026 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3027 (compute_enum_list, pascm_set_param_value_x)
3028 (gdbscm_parameter_value): Update.
3029 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3030 (gdbscm_scm_to_host_string): Update.
3031 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3032 Update.
3033 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3034 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3035 * guile/scm-string.c (gdbscm_scm_to_string): Return
3036 unique_xmalloc_ptr.
3037 (gdbscm_scm_to_host_string): Likewise.
3038
3039 2018-07-17 Tom Tromey <tom@tromey.com>
3040
3041 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3042 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3043 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3044 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3045 unique_xmalloc_ptr.
3046
3047 2018-07-17 Tom Tromey <tom@tromey.com>
3048
3049 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3050 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3051 Update.
3052 * guile/scm-cmd.c (cmdscm_function): Update.
3053 * guile/scm-pretty-print.c
3054 (ppscm_print_exception_unless_memory_error): Update.
3055 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3056 Return unique_xmalloc_ptr.
3057
3058 2018-07-17 Tom Tromey <tom@tromey.com>
3059
3060 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3061 Use string_printf.
3062
3063 2018-07-17 Jim Wilson <jimw@sifive.com>
3064
3065 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3066 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3067 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3068 unecessary braces after EF_RISCV_RVC test. Delete call to
3069 set_gdbarch_decr_pc_after_break.
3070
3071 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3072 RISCV_LAST_FP_REGNUM + 1.
3073 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3074
3075 2018-07-17 Tom Tromey <tom@tromey.com>
3076
3077 * configure.ac: Remove --disable-gdbcli.
3078 * configure: Rebuild.
3079 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3080 (SUBDIR_CLI_CFLAGS): Remove.
3081 (SFILES): Use SUBDIR_CLI_SRCS.
3082 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3083
3084 2018-07-17 Tom Tromey <tom@tromey.com>
3085
3086 PR gdb/18624:
3087 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3088
3089 2018-07-16 Jim Wilson <jimw@sifive.com>
3090
3091 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3092
3093 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3094
3095 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3096 variable.
3097 (libunwind_frame_sniffer): Likewise.
3098 (libunwind_frame_prev_register): Likewise.
3099 (libunwind_sigtramp_frame_sniffer): Likewise.
3100 * ia64-tdep.c (ia64_access_reg): Likewise.
3101 (ia64_access_rse_reg): Likewise.
3102 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3103 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3104
3105 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3106
3107 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3108
3109 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3110
3111 * remote-sim.c (gdbsim_target::close,
3112 gdbsim_target::mourn_inferior): Remove unused variables.
3113
3114 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3115
3116 * ia64-tdep.c (ktab_buf): New global.
3117 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3118 (get_kernel_table): Adjust.
3119
3120 2018-07-16 Tom Tromey <tom@tromey.com>
3121
3122 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3123 * dwarf2read.c (using_directives, new_symbol): Use
3124 outermost_context_p.
3125 * dbxread.c (process_one_symbol): Use outermost_context_p.
3126 * coffread.c (coff_symtab_read): Use outermost_context_p.
3127
3128 2018-07-16 Tom Tromey <tom@tromey.com>
3129
3130 * dwarf2read.c (using_directives, read_func_scope)
3131 (read_lexical_block_scope): Update.
3132 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3133 * buildsym.h (local_using_directives, global_using_directives):
3134 Don't declare.
3135 (get_local_using_directives, set_local_using_directives)
3136 (get_global_using_directives): Declare.
3137 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3138 m_global_using_directives>: New members.
3139 (finish_block_internal, prepare_for_building)
3140 (reset_symtab_globals, end_symtab_get_static_block)
3141 (push_context): Update.
3142 (get_local_using_directives, set_local_using_directives)
3143 (get_global_using_directives): New functions.
3144 (buildsym_init): Update.
3145
3146 2018-07-16 Tom Tromey <tom@tromey.com>
3147
3148 * xcoffread.c (xcoff_initial_scan): Don't call
3149 free_pending_blocks.
3150 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3151 * buildsym.h (class scoped_free_pendings): Add constructor.
3152 (free_pending_blocks): Don't declare.
3153 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3154 (free_pending_blocks): Now static.
3155
3156 2018-07-16 Tom Tromey <tom@tromey.com>
3157
3158 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3159 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3160 member.
3161 (struct subfile_stack): Remove.
3162 (subfile_stack): Remove.
3163 (push_subfile, pop_subfile, buildsym_init): Update.
3164
3165 2018-07-16 Tom Tromey <tom@tromey.com>
3166
3167 * buildsym.c (push_subfile): Use gdb_assert.
3168 (pop_subfile): Use gdb_assert.
3169
3170 2018-07-16 Tom Tromey <tom@tromey.com>
3171
3172 * buildsym.h (merge_symbol_lists): Remove.
3173 * buildsym.c (merge_symbol_lists): Remove.
3174
3175 2018-07-16 Tom Tromey <tom@tromey.com>
3176
3177 * stabsread.c (scan_file_globals): Update comment.
3178 * stabsread.h (scan_file_globals): Move from buildsym.h.
3179 * buildsym.h (scan_file_globals): Move to stabsread.h.
3180
3181 2018-07-16 Tom Tromey <tom@tromey.com>
3182
3183 * xcoffread.c (xcoff_new_init): Update.
3184 * mipsread.c (mipscoff_new_init): Update.
3185 * mdebugread.c (mdebug_build_psymtabs): Update.
3186 * elfread.c (elf_new_init): Update.
3187 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3188 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3189 * buildsym.h (buildsym_new_init): Don't declare.
3190 * buildsym.c (buildsym_new_init): Remove.
3191
3192 2018-07-16 Tom Tromey <tom@tromey.com>
3193
3194 * stabsread.h (within_function): Move from buildsym.h.
3195 * stabsread.c (start_stabs): Clear within_function.
3196 * coffread.c (coff_start_symtab): Clear within_function.
3197 * buildsym.h (within_function): Move to stabsread.h.
3198 * buildsym.c (prepare_for_building): Update.
3199
3200 2018-07-16 Tom Tromey <tom@tromey.com>
3201
3202 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3203 * dwarf2read.c (dwarf2_start_symtab): Don't set
3204 processing_gcc_compilation.
3205 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3206
3207 2018-07-16 Tom Tromey <tom@tromey.com>
3208
3209 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3210 (next_symbol_text_func): Move from buildsym.h.
3211 * stabsread.c (hashname): Move from buildsym.c.
3212 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3213 (next_symbol_text_func, hashname): Move to stabsread.h.
3214 * buildsym.c: Don't include bcache.h
3215 (hashname): Move to stasbread.c.
3216
3217 2018-07-16 Tom Tromey <tom@tromey.com>
3218
3219 * buildsym.h (context_stack_size): Don't declare.
3220 * buildsym.c (context_stack_size): New global.
3221
3222 2018-07-16 Tom Tromey <tom@tromey.com>
3223
3224 * dbxread.c (processing_acc_compilation): New global.
3225 * buildsym.h (processing_acc_compilation): Don't declare.
3226
3227 2018-07-16 Tom Tromey <tom@tromey.com>
3228
3229 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3230 * dbxread.c (read_ofile_symtab): Update.
3231 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3232 * buildsym.h (last_source_start_addr): Remove.
3233 (set_last_source_start_addr, get_last_source_start_addr):
3234 Declare.
3235 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3236 parameter.
3237 (struct buildsym_compunit) <m_last_source_start_addr>: New
3238 member.
3239 (prepare_for_building): Remove start_addr parameter.
3240 (start_symtab, restart_symtab, end_symtab_get_static_block)
3241 (end_symtab_with_blockvector): Update.
3242 (set_last_source_start_addr, get_last_source_start_addr): New
3243 functions.
3244
3245 2018-07-16 Tom Tromey <tom@tromey.com>
3246
3247 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3248 member.
3249 (have_line_numbers): Remove.
3250 (record_line, prepare_for_building, end_symtab_get_static_block)
3251 (augment_type_symtab): Update.
3252
3253 2018-07-16 Tom Tromey <tom@tromey.com>
3254
3255 * buildsym.c (~buildsym_compunit): Free the macro table.
3256 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3257 methods.
3258 <m_pending_macros>: New member.
3259 (pending_macros): Remove.
3260 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3261 (reset_symtab_globals, end_symtab_get_static_block)
3262 (end_symtab_with_blockvector, augment_type_symtab)
3263 (buildsym_init): Update.
3264
3265 2018-07-16 Tom Tromey <tom@tromey.com>
3266
3267 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3268 parameter.
3269 (buildsym_compunit::set_last_source_file): New method.
3270 <m_last_source_file>: New member.
3271 (prepare_for_building): Remove "name" parameter.
3272 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3273 (last_source_file): Remove.
3274 (set_last_source_file, get_last_source_file): Update.
3275
3276 2018-07-16 Tom Tromey <tom@tromey.com>
3277
3278 * buildsym.c (prepare_for_building): Add assert.
3279
3280 2018-07-16 Tom Tromey <tom@tromey.com>
3281
3282 * buildsym.c (~buildsym_compunit): Update.
3283 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3284 (start_subfile, patch_subfile_names)
3285 (end_symtab_with_blockvector): Update.
3286
3287 2018-07-16 Tom Tromey <tom@tromey.com>
3288
3289 * buildsym.c (struct buildsym_compunit): Add constructor,
3290 destructor, initializers.
3291 (start_buildsym_compunit): Remove.
3292 (free_buildsym_compunit): Use "delete".
3293 (start_symtab, restart_symtab): Use "new".
3294
3295 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3296
3297 * symfile.c (set_objfile_default_section_offset): Remove struct
3298 keyword.
3299
3300 2018-07-14 Stafford Horne <shorne@gmail.com>
3301
3302 * (Responsible Maintainers): Add myself as or1k maintainer.
3303
3304 2018-07-13 Tom Tromey <tom@tromey.com>
3305
3306 * symfile.c (set_objfile_default_section_offset): Use extra braces
3307 around initializer.
3308
3309 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3310
3311 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3312 non-branching basr.
3313
3314 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3315
3316 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3317 unittests/cli-utils-selftests.c
3318 * unittests/cli-utils-selftests.c: New file.
3319
3320 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3321
3322 * NEWS: Mention new commands. Mention change to 'thread apply'.
3323
3324 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3325
3326 * thread.c (thr_try_catch_cmd): New function.
3327 (thread_apply_all_command): Handle qcs flags.
3328 (thread_apply_command): Handle qcs flags.
3329 (taas_command): New function.
3330 (tfaas_command): New function.
3331 (_initialize_thread): Update to setup the new commands 'taas
3332 and 'tfaas'. Change doc string for 'thread apply'.
3333
3334 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3335
3336 * stack.c: (trailing_outermost_frame): New function, mostly
3337 extracted from backtrace_command_1.
3338 (leading_innermost_frame): New function.
3339 (backtrace_command_1): Update to call trailing_outermost_frame.
3340 (frame_apply_command_count): New function.
3341 (frame_apply_level_command): New function.
3342 (frame_apply_all_command): New function.
3343 (frame_apply_command): New function.
3344 (faas_command): New function.
3345 (frame_cmd_list): New variable.
3346 (_initialize_stack): Update to setup the new commands 'frame apply'
3347 and 'faas'.
3348
3349 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3350
3351 * cli-utils.c (number_or_range_parser::get_number): Only handle
3352 numbers or convenience var as numbers.
3353 (parse_flags): New function.
3354 (parse_flags_qcs): New function.
3355 (number_or_range_parser::finished): Ensure parsing end is detected
3356 before end of string.
3357 * cli-utils.h (parse_flags): New function.
3358 (parse_flags_qcs): New function.
3359 (number_or_range_parser): Remove m_finished bool.
3360 (number_or_range_parser::skip_range): Set m_in_range to false.
3361
3362 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3363
3364 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3365 on Windows.
3366
3367 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3368 Jan Kratochvil <jan.kratochvil@redhat.com>
3369 Paul Fertser <fercerpav@gmail.com>
3370 Tsutomu Seki <sekiriki@gmail.com>
3371 Pedro Alves <palves@redhat.com>
3372
3373 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3374 'unittests/parse-connection-spec-selftests.c'.
3375 (COMMON_SFILES): Add 'common/netstuff.c'.
3376 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3377 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3378 * common/netstuff.c: New file.
3379 * common/netstuff.h: New file.
3380 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3381 (wait_for_connect): Update comment. New parameter
3382 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3383 Use 'sock' directly instead of 'scb->fd'.
3384 (try_connect): New function, with code from 'net_open'.
3385 (net_open): Rewrite main loop to deal with multiple
3386 sockets/addresses. Handle IPv6-style hostnames; implement
3387 support for IPv6 connections.
3388 * unittests/parse-connection-spec-selftests.c: New file.
3389
3390 2018-07-11 Pedro Alves <palves@redhat.com>
3391
3392 PR gdb/23377
3393 * remote.c (remote_target::remote_detach_pid): Call
3394 set_current_process.
3395
3396 2018-07-11 Pedro Alves <palves@redhat.com>
3397
3398 * h8300-tdep.c (h8300_gdbarch_init): Remove
3399 set_gdbarch_ecoff_reg_to_regnum calls.
3400
3401 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3402
3403 PR c++/23373
3404 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3405 offsets/sizes for static members of a class/struct.
3406
3407 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3408
3409 * target-descriptions.c (tdesc_register_bitsize): Rename.
3410 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3411 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3412 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3413
3414 2018-07-10 Tom Tromey <tom@tromey.com>
3415
3416 * breakpoint.c (moribund_locations): Now static and a
3417 std::vector.
3418 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3419 (build_bpstat_chain, update_global_location_list)
3420 (breakpoint_retire_moribund): Update.
3421 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3422 VEC.
3423
3424 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3425
3426 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3427 (riscv_register_reggroup_p): Use new function, remove unneeded
3428 parenthesis.
3429 (riscv_push_dummy_call): Extend assert to compare against xlen or
3430 flen based on register type.
3431
3432 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3433
3434 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3435
3436 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3437
3438 * remote.c (show_hardware_watchpoint_limit): New function.
3439 (show_hardware_watchpoint_length_limit): New function.
3440 (show_hardware_breakpoint_limit): New function.
3441 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3442 where appropriate, update help text.
3443
3444 2018-07-09 Tom Tromey <tom@tromey.com>
3445
3446 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3447 (CLIBS): Don't mention NAT_CLIBS.
3448
3449 2018-07-09 Tom Tromey <tom@tromey.com>
3450
3451 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3452 (LIBGDB_OBS, clean mostlyclean): Update.
3453 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3454
3455 2018-07-09 Tom Tromey <tom@tromey.com>
3456
3457 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3458 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3459 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3460
3461 2018-07-09 Tom Tromey <tom@tromey.com>
3462
3463 * Makefile.in (ALLDEPFILES): Remove exec.c.
3464 (COMMON_OBS): Remove exec.o.
3465 (COMMON_SFILES): Add exec.c.
3466
3467 2018-07-09 Tom Tromey <tom@tromey.com>
3468
3469 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3470
3471 2018-07-09 Tom Tromey <tom@tromey.com>
3472
3473 * Makefile.in (clean mostlyclean): Remove stamp-version.
3474 (version.c): Depend on stamp-version.
3475 (stamp-version): New rule, from version.c rule.
3476
3477 2018-07-09 Tom Tromey <tom@tromey.com>
3478
3479 * Makefile.in (init.c): Depend on stamp-init.
3480 (stamp-init): New rule, from init.c rule.
3481 (clean mostlyclean): Remove stamp-init.
3482
3483 2018-07-09 Tom Tromey <tom@tromey.com>
3484
3485 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3486 SUBDIR_GCC_COMPILE_SRCS.
3487
3488 2018-07-09 Tom Tromey <tom@tromey.com>
3489
3490 * Makefile.in (init.c): Remove some unused sed rules.
3491
3492 2018-07-09 Tom Tromey <tom@tromey.com>
3493
3494 * Makefile.in (TSOBS): Remove.
3495 (INIT_FILES): Update.
3496 (LIBGDB_OBS): Update.
3497 (COMMON_SFILES): Add inflow.c.
3498 (SFILES): Remove inflow.c.
3499
3500 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3501
3502 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3503
3504 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3505
3506 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3507 get_saveloc_name, is_signal_frame_name, step_name,
3508 init_remote_name, create_addr_space_name,
3509 destroy_addr_space_name, search_unwind_table_name,
3510 find_dyn_list_name): Constify.
3511
3512 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3513
3514 * darwin-nat.c (darwin_pthread_kill): New function.
3515 (darwin_resume_thread): Use darwin_pthread_kill.
3516
3517 2018-07-05 Tom de Vries <tdevries@suse.de>
3518
3519 * macroexp.c (macro_buffer) <operator=>: New member function.
3520
3521 2018-07-04 Tom Tromey <tom@tromey.com>
3522
3523 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3524
3525 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3526
3527 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3528 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3529 * maint.c: Likewise.
3530 * top.c: Likewise.
3531
3532 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3533
3534 * NEWS: Create a new section for the next release branch.
3535 Rename the section of the current branch, now that it has
3536 been cut.
3537
3538 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3539
3540 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3541 * version.in: Bump version to 8.2.50.DATE-git.
3542
3543 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3544 Pedro Alves <palves@redhat.com>
3545
3546 * linux-nat.c (linux_init_ptrace): Rename to ...
3547 (linux_init_ptrace_procfs): ... this. Call
3548 linux_proc_init_warnings.
3549 (linux_nat_target::post_attach)
3550 (linux_nat_target::post_startup_inferior): Adjust.
3551 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3552 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3553
3554 2018-07-04 Tom de Vries <tdevries@suse.de>
3555
3556 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3557 check ...
3558 (read_comp_unit_head): ... here.
3559
3560 2018-07-03 Tom Tromey <tom@tromey.com>
3561
3562 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3563 (stop_tracing, tstatus_command)
3564 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3565 (print_one_static_tracepoint_marker): Update.
3566 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3567 std::vector.
3568 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3569 VEC.
3570 (all_tracepoints, static_tracepoints_here): Return std::vector.
3571
3572 2018-07-03 Tom Tromey <tom@tromey.com>
3573
3574 * common/ptid.c (ptid_equal): Remove.
3575 * common/ptid.h (ptid_equal): Don't declare.
3576 * ada-tasks.c: Update.
3577 * breakpoint.c: Update.
3578 * common/agent.c: Update.
3579 * corelow.c: Update.
3580 * darwin-nat-info.c: Update.
3581 * darwin-nat.c: Update.
3582 * dcache.c: Update.
3583 * dtrace-probe.c: Update.
3584 * dummy-frame.c: Update.
3585 * fbsd-nat.c: Update.
3586 * frame.c: Update.
3587 * gdbthread.h: Update.
3588 * gnu-nat.c: Update.
3589 * go32-nat.c: Update.
3590 * inf-loop.c: Update.
3591 * inf-ptrace.c: Update.
3592 * infcall.c: Update.
3593 * infcmd.c: Update.
3594 * inflow.c: Update.
3595 * infrun.c: Update.
3596 * linux-fork.c: Update.
3597 * linux-nat.c: Update.
3598 * linux-thread-db.c: Update.
3599 * mi/mi-cmd-var.c: Update.
3600 * mi/mi-interp.c: Update.
3601 * mi/mi-main.c: Update.
3602 * nto-procfs.c: Update.
3603 * ppc-linux-tdep.c: Update.
3604 * procfs.c: Update.
3605 * python/py-inferior.c: Update.
3606 * python/py-record-btrace.c: Update.
3607 * python/py-record.c: Update.
3608 * ravenscar-thread.c: Update.
3609 * regcache.c: Update.
3610 * remote-sim.c: Update.
3611 * remote.c: Update.
3612 * sol-thread.c: Update.
3613 * solib.c: Update.
3614 * target.c: Update.
3615 * tui/tui-stack.c: Update.
3616 * varobj.c: Update.
3617 * windows-nat.c: Update.
3618 * windows-tdep.c: Update.
3619
3620 2018-07-03 Tom Tromey <tom@tromey.com>
3621
3622 * common/ptid.c (ptid_match): Remove.
3623 * common/ptid.h (ptid_match): Don't declare.
3624 * fbsd-nat.c: Update.
3625 * infcmd.c: Update.
3626 * infrun.c: Update.
3627 * linux-nat.c: Update.
3628 * record-btrace.c: Update.
3629 * regcache.c: Update.
3630 * remote.c: Update.
3631
3632 2018-07-03 Tom Tromey <tom@tromey.com>
3633
3634 * common/ptid.c (ptid_tid_p): Remove.
3635 * common/ptid.h (ptid_tid_p): Don't declare.
3636 * sol-thread.c: Update.
3637
3638 2018-07-03 Tom Tromey <tom@tromey.com>
3639
3640 * common/ptid.c (ptid_lwp_p): Remove.
3641 * common/ptid.h (ptid_lwp_p): Don't declare.
3642 * fbsd-nat.c: Update.
3643 * linux-nat.c: Update.
3644 * nat/linux-procfs.c: Update.
3645 * nat/x86-linux-dregs.c: Update.
3646 * sol-thread.c: Update.
3647
3648 2018-07-03 Tom Tromey <tom@tromey.com>
3649
3650 * common/ptid.c (ptid_is_pid): Remove.
3651 * common/ptid.h (ptid_is_pid): Don't declare.
3652 * infrun.c: Update.
3653 * linux-nat.c: Update.
3654 * mi/mi-interp.c: Update.
3655 * remote.c: Update.
3656 * thread.c: Update.
3657
3658 2018-07-03 Tom Tromey <tom@tromey.com>
3659
3660 * common/ptid.c (ptid_get_tid): Remove.
3661 * common/ptid.h (ptid_get_tid): Don't declare.
3662 * ada-tasks.c: Update.
3663 * aix-thread.c: Update.
3664 * bsd-uthread.c: Update.
3665 * darwin-nat.c: Update.
3666 * fbsd-nat.c: Update.
3667 * i386-darwin-nat.c: Update.
3668 * infrun.c: Update.
3669 * linux-tdep.c: Update.
3670 * nto-procfs.c: Update.
3671 * ppc-ravenscar-thread.c: Update.
3672 * python/py-infthread.c: Update.
3673 * ravenscar-thread.c: Update.
3674 * sol-thread.c: Update.
3675 * sparc-ravenscar-thread.c: Update.
3676 * windows-nat.c: Update.
3677
3678 2018-07-03 Tom Tromey <tom@tromey.com>
3679
3680 * common/ptid.c (ptid_get_lwp): Remove.
3681 * common/ptid.h (ptid_get_lwp): Don't declare.
3682 * aarch64-linux-nat.c: Update.
3683 * ada-tasks.c: Update.
3684 * aix-thread.c: Update.
3685 * amd64-linux-nat.c: Update.
3686 * arm-linux-nat.c: Update.
3687 * corelow.c: Update.
3688 * fbsd-nat.c: Update.
3689 * fbsd-tdep.c: Update.
3690 * gnu-nat.c: Update.
3691 * i386-cygwin-tdep.c: Update.
3692 * i386-gnu-nat.c: Update.
3693 * i386-linux-nat.c: Update.
3694 * ia64-linux-nat.c: Update.
3695 * inf-ptrace.c: Update.
3696 * infrun.c: Update.
3697 * linux-fork.c: Update.
3698 * linux-nat.c: Update.
3699 * linux-tdep.c: Update.
3700 * linux-thread-db.c: Update.
3701 * mips-linux-nat.c: Update.
3702 * nat/aarch64-linux-hw-point.c: Update.
3703 * nat/aarch64-linux.c: Update.
3704 * nat/linux-btrace.c: Update.
3705 * nat/linux-osdata.c: Update.
3706 * nat/linux-procfs.c: Update.
3707 * nat/x86-linux-dregs.c: Update.
3708 * obsd-nat.c: Update.
3709 * ppc-fbsd-nat.c: Update.
3710 * ppc-linux-nat.c: Update.
3711 * procfs.c: Update.
3712 * python/py-infthread.c: Update.
3713 * ravenscar-thread.c: Update.
3714 * remote.c: Update.
3715 * s390-linux-nat.c: Update.
3716 * sol-thread.c: Update.
3717 * sol2-tdep.c: Update.
3718 * spu-linux-nat.c: Update.
3719 * x86-linux-nat.c: Update.
3720 * xtensa-linux-nat.c: Update.
3721
3722 2018-07-03 Tom Tromey <tom@tromey.com>
3723
3724 * common/ptid.c (ptid_get_pid): Remove.
3725 * common/ptid.h (ptid_get_pid): Don't declare.
3726 * aarch64-linux-nat.c: Update.
3727 * ada-lang.c: Update.
3728 * aix-thread.c: Update.
3729 * alpha-bsd-nat.c: Update.
3730 * amd64-fbsd-nat.c: Update.
3731 * amd64-linux-nat.c: Update.
3732 * arm-linux-nat.c: Update.
3733 * arm-nbsd-nat.c: Update.
3734 * auxv.c: Update.
3735 * break-catch-syscall.c: Update.
3736 * breakpoint.c: Update.
3737 * bsd-uthread.c: Update.
3738 * corelow.c: Update.
3739 * ctf.c: Update.
3740 * darwin-nat.c: Update.
3741 * fbsd-nat.c: Update.
3742 * fbsd-tdep.c: Update.
3743 * gcore.c: Update.
3744 * gnu-nat.c: Update.
3745 * hppa-nbsd-nat.c: Update.
3746 * hppa-obsd-nat.c: Update.
3747 * i386-fbsd-nat.c: Update.
3748 * ia64-linux-nat.c: Update.
3749 * inf-ptrace.c: Update.
3750 * infcmd.c: Update.
3751 * inferior.c: Update.
3752 * inferior.h: Update.
3753 * inflow.c: Update.
3754 * infrun.c: Update.
3755 * linux-fork.c: Update.
3756 * linux-nat.c: Update.
3757 * linux-tdep.c: Update.
3758 * linux-thread-db.c: Update.
3759 * m68k-bsd-nat.c: Update.
3760 * mi/mi-interp.c: Update.
3761 * mi/mi-main.c: Update.
3762 * mips-linux-nat.c: Update.
3763 * mips-nbsd-nat.c: Update.
3764 * mips64-obsd-nat.c: Update.
3765 * nat/aarch64-linux-hw-point.c: Update.
3766 * nat/aarch64-linux.c: Update.
3767 * nat/linux-btrace.c: Update.
3768 * nat/linux-osdata.c: Update.
3769 * nat/linux-procfs.c: Update.
3770 * nat/x86-linux-dregs.c: Update.
3771 * nto-procfs.c: Update.
3772 * obsd-nat.c: Update.
3773 * ppc-linux-nat.c: Update.
3774 * ppc-nbsd-nat.c: Update.
3775 * ppc-obsd-nat.c: Update.
3776 * proc-service.c: Update.
3777 * procfs.c: Update.
3778 * python/py-inferior.c: Update.
3779 * python/py-infthread.c: Update.
3780 * ravenscar-thread.c: Update.
3781 * record.c: Update.
3782 * remote-sim.c: Update.
3783 * remote.c: Update.
3784 * rs6000-nat.c: Update.
3785 * s390-linux-nat.c: Update.
3786 * sh-nbsd-nat.c: Update.
3787 * sol-thread.c: Update.
3788 * sparc-nat.c: Update.
3789 * sparc64-tdep.c: Update.
3790 * spu-linux-nat.c: Update.
3791 * spu-tdep.c: Update.
3792 * target-debug.h: Update.
3793 * target.c: Update.
3794 * thread.c: Update.
3795 * tid-parse.c: Update.
3796 * tracefile-tfile.c: Update.
3797 * vax-bsd-nat.c: Update.
3798 * windows-nat.c: Update.
3799 * x86-linux-nat.c: Update.
3800 * x86-nat.c: Update.
3801
3802 2018-07-03 Tom Tromey <tom@tromey.com>
3803
3804 * common/ptid.c (pid_to_ptid): Remove.
3805 * common/ptid.h (pid_to_ptid): Don't declare.
3806 * aix-thread.c: Update.
3807 * arm-linux-nat.c: Update.
3808 * common/ptid.c: Update.
3809 * common/ptid.h: Update.
3810 * corelow.c: Update.
3811 * ctf.c: Update.
3812 * darwin-nat.c: Update.
3813 * fbsd-nat.c: Update.
3814 * fork-child.c: Update.
3815 * gnu-nat.c: Update.
3816 * go32-nat.c: Update.
3817 * inf-ptrace.c: Update.
3818 * infcmd.c: Update.
3819 * inferior.c: Update.
3820 * infrun.c: Update.
3821 * linux-fork.c: Update.
3822 * linux-nat.c: Update.
3823 * nat/aarch64-linux-hw-point.c: Update.
3824 * nat/fork-inferior.c: Update.
3825 * nat/x86-linux-dregs.c: Update.
3826 * nto-procfs.c: Update.
3827 * obsd-nat.c: Update.
3828 * procfs.c: Update.
3829 * progspace.c: Update.
3830 * remote.c: Update.
3831 * rs6000-nat.c: Update.
3832 * s390-linux-nat.c: Update.
3833 * sol-thread.c: Update.
3834 * spu-linux-nat.c: Update.
3835 * target.c: Update.
3836 * top.c: Update.
3837 * tracefile-tfile.c: Update.
3838 * windows-nat.c: Update.
3839
3840 2018-07-03 Tom Tromey <tom@tromey.com>
3841
3842 * common/ptid.h (ptid_build): Don't declare.
3843 * common/ptid.c (ptid_build): Remove.
3844 * aix-thread.c: Update.
3845 * bsd-kvm.c: Update.
3846 * bsd-uthread.c: Update.
3847 * common/agent.c: Update.
3848 * common/ptid.c: Update.
3849 * common/ptid.h: Update.
3850 * corelow.c: Update.
3851 * darwin-nat.c: Update.
3852 * fbsd-nat.c: Update.
3853 * gnu-nat.c: Update.
3854 * linux-fork.c: Update.
3855 * linux-nat.c: Update.
3856 * linux-thread-db.c: Update.
3857 * nat/linux-osdata.c: Update.
3858 * nat/linux-procfs.c: Update.
3859 * nto-procfs.c: Update.
3860 * obsd-nat.c: Update.
3861 * proc-service.c: Update.
3862 * procfs.c: Update.
3863 * ravenscar-thread.c: Update.
3864 * remote-sim.c: Update.
3865 * remote.c: Update.
3866 * sol-thread.c: Update.
3867 * target.c: Update.
3868 * windows-nat.c: Update.
3869
3870 2018-07-03 Tom Tromey <tom@tromey.com>
3871
3872 * infrun.c (follow_exec): Use exit_inferior_silent.
3873 * inferior.c (exit_inferior_num_silent): Remove.
3874 * inferior.h (exit_inferior_num_silent): Don't declare.
3875
3876 2018-07-03 Tom Tromey <tom@tromey.com>
3877
3878 PR cli/23340:
3879 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3880 inferior_ptid on error.
3881
3882 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3883 Simon Marchi <simon.marchi@polymtl.ca>
3884
3885 PR tdep/8282
3886 * disasm.h (gdb_disassembler): Add
3887 `m_disassembler_options_holder'. member
3888 * disasm.c (get_all_disassembler_options): New function.
3889 (gdb_disassembler::gdb_disassembler): Use it.
3890 (gdb_buffered_insn_length_init_dis): Likewise.
3891 (gdb_buffered_insn_length): Adjust accordingly.
3892 (set_disassembler_options): Handle options with arguments.
3893 (show_disassembler_options_sfunc): Likewise. Add a leading new
3894 line if showing options with descriptions.
3895 (disassembler_options_completer): Adapt to using the
3896 `disasm_options_and_args_t' structure.
3897 * mips-tdep.c (mips_disassembler_options): New variable.
3898 (mips_disassembler_options_o32): Likewise.
3899 (mips_disassembler_options_n32): Likewise.
3900 (mips_disassembler_options_n64): Likewise.
3901 (gdb_print_insn_mips): Don't set `disassembler_options'.
3902 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3903 functions.
3904 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3905 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3906 `gdbarch_disassembler_options_implicit' and
3907 `gdbarch_valid_disassembler_options'.
3908 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3909 `disasm_options_and_args_t' structure.
3910 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3911 method.
3912 (valid_disassembler_options): Switch from `disasm_options_t' to
3913 the `disasm_options_and_args_t' structure.
3914 * NEWS: Document `set disassembler-options' support for the MIPS
3915 target.
3916 * gdbarch.h: Regenerate.
3917 * gdbarch.c: Regenerate.
3918
3919 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3920
3921 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3922
3923 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3924
3925 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3926 parameter in call to amd64_target_description.
3927 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3928 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3929 (amd64fbsd_init_abi): Likewise.
3930 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3931 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3932 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3933 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3934
3935 2018-06-29 Pedro Alves <palves@redhat.com>
3936
3937 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3938 "segments" parameter.
3939 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3940 (_initialize_amd64_tdep): Update call to
3941 amd64_create_target_description.
3942 (amd64_target_description): Add "segments" parameter. Adjust
3943 the implementation to use it.
3944 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3945 call to amd64_create_target_description.
3946 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3947 * gdb/arch/amd64.h (amd64_create_target_description): Add
3948 "segments" register.
3949 * gdb/arch/amd64.c (amd64_create_target_description): Add
3950 "segments" parameter. Call create_feature_i386_64bit_segments
3951 only if SEGMENTS is true.
3952 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3953 call to amd64_create_target_description.
3954
3955 2018-06-29 Pedro Alves <palves@redhat.com>
3956
3957 * thread.c (thread_target_id_str): New, factored out from ...
3958 (print_thread_info_1): ... here. Use it to compute the max
3959 "Target Id" column width.
3960
3961 2018-06-29 Pedro Alves <palves@redhat.com>
3962
3963 * remote.c (remote_target::extra_thread_info): Delete
3964 'display_buf' and 'n' locals. from the cache, regardless of
3965 packet mechanims is in use. Use cache for qThreadExtra and qP
3966 methods too.
3967
3968 2018-06-29 Pedro Alves <palves@redhat.com>
3969
3970 * blockframe.c (find_pc_sect_containing_function): New function.
3971 * breakpoint.c (print_breakpoint_location): Don't call
3972 find_pc_sect_function.
3973 * linespec.c (create_sals_line_offset): Record the location's
3974 symbol in the sal.
3975 * linespec.c (convert_address_location_to_sals): Fill in sal's
3976 symbol with find_pc_sect_containing_function.
3977 * symtab.c (find_function_start_sal): Rename to ...
3978 (find_function_start_sal_1): ... this.
3979 (find_function_start_sal): Reimplement as wrapper around
3980 find_function_start_sal_1, and use
3981 find_pc_sect_containing_function to fill in the sal's symbol.
3982 (find_function_start_sal(symbol*, bool)): Adjust.
3983 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3984 comments.
3985 (find_pc_sect_containing_function): Declare.
3986
3987 2018-06-29 Pedro Alves <palves@redhat.com>
3988
3989 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3990 true if the the location has no symbol.
3991
3992 2018-06-28 Tom Tromey <tom@tromey.com>
3993
3994 * NEWS: Mention --enable-codesign.
3995 * silent-rules.mk (ECHO_SIGN): New variable.
3996 * configure.ac: Add --enable-codesign.
3997 * configure: Rebuild.
3998 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3999 (gdb$(EXEEXT)): Optionally invoke codesign.
4000
4001 2018-06-28 Pedro Alves <palves@redhat.com>
4002
4003 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4004 comments.
4005 (switch_to_thread_no_regs): Adjust comment.
4006 * infcmd.c (stop_pc): Delete.
4007 (post_create_inferior, info_program_command): Replace references
4008 to stop_pc with references to thread_info->suspend.stop_pc.
4009 * inferior.h (stop_pc): Delete declaration.
4010 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4011 (handle_inferior_event_1, handle_signal_stop)
4012 (process_event_stop_test, keep_going_stepped_thread)
4013 (handle_step_into_function, handle_step_into_function_backward)
4014 (print_stop_location): Replace references to stop_pc with
4015 references to thread_info->suspend.stop_pc.
4016 (struct infcall_suspend_state) <stop_pc>: Delete field.
4017 (save_infcall_suspend_state, restore_infcall_suspend_state):
4018 Remove references to inf_stat->stop_pc.
4019 * linux-fork.c (fork_load_infrun_state): Likewise.
4020 * record-btrace.c (record_btrace_set_replay): Likewise.
4021 * record-full.c (record_full_goto_entry): Likewise.
4022 * remote.c (print_one_stopped_thread): Likewise.
4023 * target.c (target_resume): Extend comment.
4024 * thread.c (set_executing_thread): New.
4025 (set_executing): Use it.
4026 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4027 Remove references to stop_pc.
4028
4029 2018-06-28 Pedro Alves <palves@redhat.com>
4030
4031 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4032 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4033
4034 2018-06-28 Tom Tromey <tom@tromey.com>
4035
4036 * coffread.c (coff_symfile_finish): Update.
4037 * xcoffread.c (xcoff_symfile_finish): Update.
4038 * elfread.c (elf_symfile_finish): Update.
4039 * symfile.h (dwarf2_free_objfile): Don't declare.
4040 * dwarf2read.c (_initialize_dwarf2_read): Use
4041 register_objfile_data_with_cleanup.
4042 (dwarf2_free_objfile): Now static. Change signature.
4043
4044 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4045
4046 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4047 option "-o" to add-symbol-file-load to add an offset to each
4048 section's load address.
4049 * symfile.c (set_objfile_default_section_offset): New function.
4050
4051 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4052
4053 * symfile.c (add_symbol_file_command): Make sure that sections
4054 with the same name are sorted in the same order.
4055
4056 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4057
4058 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4059 require the second argument. If omitted, load sections at the
4060 addresses specified in the file.
4061
4062 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4063
4064 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4065 (_initialize_symfile): Add option "-o" to symbol-file to add an
4066 offset to each section of the symbol file.
4067
4068 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4069
4070 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4071
4072 2018-06-27 Tom Tromey <tom@tromey.com>
4073
4074 * stack.c (_initialize_stack): Update "func" help text.
4075
4076 2018-06-27 Tom Tromey <tom@tromey.com>
4077
4078 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4079 std::vector.
4080 (unwind_infopy_str, pyuw_create_unwind_info)
4081 (unwind_infopy_add_saved_register, pyuw_sniffer)
4082 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4083 Update.
4084 (struct saved_reg): Add constructor.
4085 <value>: Now a gdbpy_ref<>.
4086
4087 2018-06-27 Tom Tromey <tom@tromey.com>
4088
4089 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4090
4091 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * gdb-gdb.py.in: Format using autopep8.
4094
4095 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4096
4097 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4098 (type_lookup_function): Recognize CORE_ADDR values.
4099
4100 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4101
4102 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4103 print tag_name.
4104
4105 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4106
4107 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4108 <__lt__>: Add.
4109
4110 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4111
4112 * gdb-gdb.py: Move to...
4113 * gdb-gdb.py.in: ... here.
4114 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4115 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4116 dependencies.
4117 (distclean): Remove gdb-gdb.py when cleaning.
4118 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4119 * configure: Re-generate.
4120
4121 2018-06-27 Pedro Alves <palves@redhat.com>
4122
4123 * proc-service.c (get_ps_regcache): New.
4124 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4125 (ps_lsetfpregs): Use it.
4126
4127 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4128
4129 PR gdb/21695
4130 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4131 (dwarf_decode_lines_1): Adjust.
4132
4133 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4136 override.
4137 <info_proc>: Likewise.
4138
4139 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4140
4141 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4142 to windows_fetch_one_register, and only handle the case of
4143 fetching one register. Move the code that reloads the context
4144 and iterates over all registers if R is negative to...
4145 (windows_nat_target::fetch_registers): ... here.
4146 (do_windows_store_inferior_registers): Rename to
4147 windows_store_one_register, and only handle the case of storing
4148 one register. Move the code that handles the case where r is
4149 negative to...
4150 (windows_nat_target::store_registers) ... here.
4151
4152 2018-06-26 Tom Tromey <tom@tromey.com>
4153
4154 PR rust/22574:
4155 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4156 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4157 Update.
4158 (rust_internal_print_type): Add podata parameter.
4159 (rust_print_type): Update.
4160
4161 2018-06-26 Tom Tromey <tom@tromey.com>
4162
4163 * typeprint.h (struct print_offset_data) <update, finish,
4164 maybe_print_hole>: New methods.
4165 <indentation>: New constant.
4166 * typeprint.c (print_offset_data::indentation): Define.
4167 (print_offset_data::maybe_print_hole, print_offset_data::update)
4168 (print_offset_data::finish): Move from c-typeprint.c and rename.
4169 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4170 (print_spaces_filtered_with_print_options): Update.
4171 (c_print_type_union_field_offset, maybe_print_hole)
4172 (c_print_type_struct_field_offset): Move to typeprint.c and
4173 rename.
4174 (c_type_print_base_struct_union): Update.
4175
4176 2018-06-25 Pedro Alves <palves@redhat.com>
4177
4178 * gdbthread.h (thread_info_ref, delete_thread)
4179 (delete_thread_silent, first_thread_of_inferior)
4180 (any_thread_of_inferior, switch_to_thread)
4181 (enable_thread_stack_temporaries)
4182 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4183 (get_last_thread_stack_temporary)
4184 (value_in_thread_stack_temporaries, can_access_registers_thread):
4185 Spell out "struct thread_info" instead of just "thread_info".
4186 * inferior.h (notice_new_inferior): Likewise.
4187
4188 2018-06-25 Pedro Alves <palves@redhat.com>
4189
4190 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4191 pass thread_info pointer to delete_thread.
4192 (windows_nat_target::detach): Pass inferior pointer to
4193 detach_inferior.
4194 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4195 delete_thread.
4196 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4197 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4198 and pass a thread_info pointer to delete_thread.
4199 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4200 pass thread_info pointer to delete_thread.
4201 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4202 delete_thread_silent call.
4203 * procfs.c (procfs_target::detach): Pass inferior pointer to
4204 detach_inferior.
4205 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4206 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4207 delete_thread_silent call.
4208 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4209 pass thread_info pointer to delete_thread.
4210 (windows_nat_target::detach): Pass inferior pointer to
4211 delete_inferior.
4212
4213 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4214
4215 * regcache.c (readable_regcache::read_part): Fix asserts.
4216 (reg_buffer::raw_collect_part): New function.
4217 (regcache::write_part): Fix asserts.
4218 (reg_buffer::raw_supply_part): New function.
4219 (regcache::transfer_regset_register): New helper function.
4220 (regcache::transfer_regset): Call new functions.
4221 (regcache_supply_regset): Use gdb_byte*.
4222 (regcache::supply_regset): Likewise.
4223 (regcache_collect_regset): Likewise.
4224 (regcache::collect_regset): Likewise.
4225 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4226 (reg_buffer::raw_supply_part): Likewise.
4227 (regcache::transfer_regset_register): Likewise.
4228 (regcache::transfer_regset): Use gdb_byte*.
4229
4230 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4231
4232 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4233
4234 2018-06-21 Pedro Alves <palves@redhat.com>
4235
4236 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4237 instead of a ptid_t. All callers adjusted.
4238 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4239 adjusted.
4240 (print_ada_task_info, display_current_task_id, task_command_1):
4241 Adjust.
4242 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4243 inferior_thread.
4244 (breakpoint_kind): Adjust.
4245 (remove_breakpoints_pid): Rename to ...
4246 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4247 pointer. All callers adjusted.
4248 (bpstat_clear_actions): Use inferior_thread.
4249 (get_bpstat_thread): New.
4250 (bpstat_do_actions): Use it.
4251 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4252 to take a thread_info pointer. All callers adjusted.
4253 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4254 (breakpoint_re_set_thread): Use inferior_thread.
4255 * breakpoint.h (struct inferior): Forward declare.
4256 (bpstat_stop_status): Update.
4257 (remove_breakpoints_pid): Delete.
4258 (remove_breakpoints_inf): New.
4259 * bsd-uthread.c (bsd_uthread_target::wait)
4260 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4261 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4262 (maint_btrace_packet_history_cmd)
4263 (maint_btrace_clear_packet_history_cmd): Adjust.
4264 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4265 inferior_thread.
4266 * cli/cli-interp.c: Include "inferior.h".
4267 * common/refcounted-object.h (struct
4268 refcounted_object_ref_policy): New.
4269 * compile/compile-object-load.c: Include gdbthread.h.
4270 (store_regs): Use inferior_thread.
4271 * corelow.c (core_target::close): Use current_inferior.
4272 (core_target_open): Adjust to use first_thread_of_inferior and use
4273 the current inferior.
4274 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4275 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4276 <thread>: ... this new field. All references adjusted.
4277 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4278 Take a thread_info pointer instead of a ptid_t.
4279 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4280 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4281 thread_info pointer instead of a ptid_t.
4282 * elfread.c: Include "inferior.h".
4283 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4284 Use inferior_thread.
4285 * eval.c (evaluate_subexp): Likewise.
4286 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4287 inferior_thread.
4288 * gdb_proc_service.h (struct thread_info): Forward declare.
4289 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4290 <thread>: ... this new field. All references adjusted.
4291 * gdbarch.h, gdbarch.c: Regenerate.
4292 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4293 'thread' parameter. All implementations and callers adjusted.
4294 * gdbthread.h (thread_info) <set_running>: New method.
4295 (delete_thread, delete_thread_silent): Take a thread_info pointer
4296 instead of a ptid.
4297 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4298 (first_thread_of_process): Delete, replaced by ...
4299 (first_thread_of_inferior): ... this new function. All callers
4300 adjusted.
4301 (any_live_thread_of_process): Delete, replaced by ...
4302 (any_live_thread_of_inferior): ... this new function. All callers
4303 adjusted.
4304 (switch_to_thread, switch_to_no_thread): Declare.
4305 (is_executing): Delete.
4306 (enable_thread_stack_temporaries): Update comment.
4307 <enable_thread_stack_temporaries>: Take a thread_info pointer
4308 instead of a ptid_t. Incref the thread.
4309 <~enable_thread_stack_temporaries>: Decref the thread.
4310 <m_ptid>: Delete
4311 <m_thr>: New.
4312 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4313 (get_last_thread_stack_temporary)
4314 (value_in_thread_stack_temporaries, can_access_registers_thread):
4315 Take a thread_info pointer instead of a ptid_t. All callers
4316 adjusted.
4317 * infcall.c (get_call_return_value): Use inferior_thread.
4318 (run_inferior_call): Work with thread pointers instead of ptid_t.
4319 (call_function_by_hand_dummy): Work with thread pointers instead
4320 of ptid_t. Use thread_info_ref.
4321 * infcmd.c (proceed_thread_callback): Access thread's state
4322 directly.
4323 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4324 access thread's state directly.
4325 (continue_command): Use inferior_thread.
4326 (info_program_command): Use find_thread_ptid and access thread
4327 state directly.
4328 (proceed_after_attach_callback): Use thread state directly.
4329 (notice_new_inferior): Take a thread_info pointer instead of a
4330 ptid_t. All callers adjusted.
4331 (exit_inferior): Take an inferior pointer instead of a pid. All
4332 callers adjusted.
4333 (exit_inferior_silent): New.
4334 (detach_inferior): Delete.
4335 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4336 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4337 (detach_inferior_command, kill_inferior_command): Use
4338 find_inferior_id instead of valid_gdb_inferior_id and
4339 gdb_inferior_id_to_pid.
4340 (inferior_command): Use inferior and thread pointers.
4341 * inferior.h (struct thread_info): Forward declare.
4342 (notice_new_inferior): Take a thread_info pointer instead of a
4343 ptid_t. All callers adjusted.
4344 (detach_inferior): Delete declaration.
4345 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4346 instead of a pid. All callers adjusted.
4347 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4348 (valid_gdb_inferior_id): Delete.
4349 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4350 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4351 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4352 ...
4353 <inf>: ... this new field.
4354 <step_ptid>: Delete, replaced by ...
4355 <step_thread>: ... this new field.
4356 (get_displaced_stepping_state): Take an inferior pointer instead
4357 of a pid. All callers adjusted.
4358 (displaced_step_in_progress_any_inferior): Adjust.
4359 (displaced_step_in_progress_thread): Take a thread pointer instead
4360 of a ptid_t. All callers adjusted.
4361 (displaced_step_in_progress, add_displaced_stepping_state): Take
4362 an inferior pointer instead of a pid. All callers adjusted.
4363 (get_displaced_step_closure_by_addr): Adjust.
4364 (remove_displaced_stepping_state): Take an inferior pointer
4365 instead of a pid. All callers adjusted.
4366 (displaced_step_prepare_throw, displaced_step_prepare)
4367 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4368 All callers adjusted.
4369 (start_step_over): Adjust.
4370 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4371 displaced step queue.
4372 (do_target_resume): Adjust.
4373 (fetch_inferior_event): Use inferior_thread.
4374 (context_switch, get_inferior_stop_soon): Take an
4375 execution_control_state pointer instead of a ptid_t. All callers
4376 adjusted.
4377 (switch_to_thread_cleanup): Delete.
4378 (stop_all_threads): Use scoped_restore_current_thread.
4379 * inline-frame.c: Include "gdbthread.h".
4380 (inline_state) <inline_state>: Take a thread pointer instead of a
4381 ptid_t. All callers adjusted.
4382 <ptid>: Delete, replaced by ...
4383 <thread>: ... this new field.
4384 (find_inline_frame_state): Take a thread pointer instead of a
4385 ptid_t. All callers adjusted.
4386 (skip_inline_frames, step_into_inline_frame)
4387 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4388 pointer instead of a ptid_t. All callers adjusted.
4389 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4390 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4391 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4392 pointers directly.
4393 * linux-nat.c (get_detach_signal): Likewise.
4394 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4395 (thread_db_notice_clone): Adjust.
4396 (thread_db_find_new_threads_silently)
4397 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4398 a thread pointer instead of a ptid_t. All callers adjusted.
4399 * mi/mi-cmd-var.c: Include "inferior.h".
4400 (mi_cmd_var_update_iter): Update to use thread pointers.
4401 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4402 inferior directly.
4403 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4404 out to ...
4405 (mi_output_running): ... this new function.
4406 (mi_on_resume_1): Adjust to use it.
4407 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4408 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4409 directly.
4410 (interrupt_thread_callback): : Adjust to use thread and inferior
4411 pointers.
4412 * proc-service.c: Include "gdbthread.h".
4413 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4414 * progspace-and-thread.c: Include "inferior.h".
4415 * progspace.c: Include "inferior.h".
4416 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4417 hold a reference to an inferior_object.
4418 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4419 inferior_thread.
4420 * python/py-inferior.c (struct inferior_object): Give the type a
4421 tag name instead of a typedef.
4422 (python_on_normal_stop): No need to check if the current thread is
4423 listed.
4424 (inferior_to_inferior_object): Change return type to
4425 inferior_object. All callers adjusted.
4426 (find_thread_object): Delete, bits factored out to ...
4427 (thread_to_thread_object): ... this new function.
4428 * python/py-infthread.c (create_thread_object): Use
4429 inferior_to_inferior_object.
4430 (thpy_is_stopped): Use thread pointer directly.
4431 (gdbpy_selected_thread): Use inferior_thread.
4432 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4433 field, replaced with ...
4434 <thread>: ... this new field. All users adjusted.
4435 (btpy_insn_or_gap_new): Drop const.
4436 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4437 callers adjusted.
4438 * python/py-record.c: Include "gdbthread.h".
4439 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4440 a ptid_t. All callers adjusted.
4441 (gdbpy_current_recording): Use inferior_thread.
4442 * python/py-record.h (recpy_record_object) <ptid>: Delete
4443 field, replaced with ...
4444 <thread>: ... this new field. All users adjusted.
4445 (recpy_element_object) <ptid>: Delete
4446 field, replaced with ...
4447 <thread>: ... this new field. All users adjusted.
4448 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4449 a ptid_t. All callers adjusted.
4450 * python/py-threadevent.c: Include "gdbthread.h".
4451 (get_event_thread): Use thread_to_thread_object.
4452 * python/python-internal.h (struct inferior_object): Forward
4453 declare.
4454 (find_thread_object, find_inferior_object): Delete declarations.
4455 (thread_to_thread_object, inferior_to_inferior_object): New
4456 declarations.
4457 * record-btrace.c: Include "inferior.h".
4458 (require_btrace_thread): Use inferior_thread.
4459 (record_btrace_frame_sniffer)
4460 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4461 (get_thread_current_frame): Use scoped_restore_current_thread and
4462 switch_to_thread.
4463 (get_thread_current_frame): Use thread pointer directly.
4464 (record_btrace_replay_at_breakpoint): Use thread's inferior
4465 pointer directly.
4466 * record-full.c: Include "inferior.h".
4467 * regcache.c: Include "gdbthread.h".
4468 (get_thread_arch_regcache): Use the inferior's address space
4469 directly.
4470 (get_thread_regcache, registers_changed_thread): New.
4471 * regcache.h (get_thread_regcache(thread_info *thread)): New
4472 overload.
4473 (registers_changed_thread): New.
4474 (remote_target) <remote_detach_1>: Swap order of parameters.
4475 (remote_add_thread): <remote_add_thread>: Return the new thread.
4476 (get_remote_thread_info(ptid_t)): New overload.
4477 (remote_target::remote_notice_new_inferior): Use thread pointers
4478 directly.
4479 (remote_target::process_initial_stop_replies): Use
4480 thread_info::set_running.
4481 (remote_target::remote_detach_1, remote_target::detach)
4482 (extended_remote_target::detach): Adjust.
4483 * stack.c (frame_show_address): Use inferior_thread.
4484 * target-debug.h (target_debug_print_thread_info_pp): New.
4485 * target-delegates.c: Regenerate.
4486 * target.c (default_thread_address_space): Delete.
4487 (memory_xfer_partial_1): Use current_inferior.
4488 (target_detach): Use current_inferior.
4489 (target_thread_address_space): Delete.
4490 (generic_mourn_inferior): Use current_inferior.
4491 * target.h (struct target_ops) <thread_address_space>: Delete.
4492 (target_thread_address_space): Delete.
4493 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4494 pointers directly.
4495 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4496 thread pointer instead of a ptid_t. Adjust all callers.
4497 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4498 (first_thread_of_process): Delete, replaced by ...
4499 (first_thread_of_inferior): ... this new function. All callers
4500 adjusted.
4501 (any_thread_of_process): Rename to ...
4502 (any_thread_of_inferior): ... this, and take an inferior pointer.
4503 (any_live_thread_of_process): Rename to ...
4504 (any_live_thread_of_inferior): ... this, and take an inferior
4505 pointer.
4506 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4507 (value_in_thread_stack_temporaries)
4508 (get_last_thread_stack_temporary): Take a thread pointer instead
4509 of a ptid_t. Adjust all callers.
4510 (thread_info::set_running): New.
4511 (validate_registers_access): Use inferior_thread.
4512 (can_access_registers_ptid): Rename to ...
4513 (can_access_registers_thread): ... this, and take a thread
4514 pointer.
4515 (print_thread_info_1): Adjust to compare thread pointers instead
4516 of ptids.
4517 (switch_to_no_thread, switch_to_thread): Make extern.
4518 (scoped_restore_current_thread::~scoped_restore_current_thread):
4519 Use m_thread pointer directly.
4520 (scoped_restore_current_thread::scoped_restore_current_thread):
4521 Use inferior_thread.
4522 (thread_command): Use thread pointer directly.
4523 (thread_num_make_value_helper): Use inferior_thread.
4524 * top.c (execute_command): Use inferior_thread.
4525 * tui/tui-interp.c: Include "inferior.h".
4526 * varobj.c (varobj_create): Use inferior_thread.
4527 (value_of_root_1): Use find_thread_global_id instead of
4528 global_thread_id_to_ptid.
4529
4530 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4531
4532 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4533 possible.
4534 (regcache::write_part): Likewise.
4535 (readable_regcache::cooked_read_part): Update comment.
4536 (readable_regcache::cooked_write_part): Likewise.
4537 * regcache.h: (readable_regcache::read_part): Likewise.
4538 (regcache::write_part): Likewise.
4539
4540 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4541 Dirk Schubert <dirk.schubert@arm.com>
4542
4543 * aarch64-linux-nat.c (post_attach): New.
4544 (aarch64_linux_nat_target::post_attach): Override post_attach to
4545 record the number of hardware debug registers.
4546
4547 2018-06-20 Tom Tromey <tom@tromey.com>
4548
4549 * python/py-param.c (add_setshow_generic): Make parameters const.
4550 (parmpy_init): Update.
4551
4552 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4553
4554 * regcache.h (regcache_cooked_read_ftype): Rename to...
4555 (register_read_ftype): ...this, change type to function_view.
4556 (class reg_buffer) <save>: Remove src parameter.
4557 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4558 parameter non-const in first overload. Remove src parameter in
4559 second overload.
4560 * regcache.c (do_cooked_read): Remove.
4561 (readonly_detached_regcache::readonly_detached_regcache): Make
4562 parameter non-const, adjust call to other constructor.
4563 (reg_buffer::save): Remove src parameter.
4564 * frame.c (do_frame_register_read): Remove.
4565 (frame_save_as_regcache): Use lambda function.
4566 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4567 parameter to ppu2spu_data *.
4568 (ppu2spu_sniffer): Use lambda function.
4569
4570 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4571
4572 * record-full.c (record_full_target::insert_breakpoint): Remove
4573 "struct" keyword, add const.
4574
4575 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4576
4577 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4578 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4579 * configure.ac: Remove AC_PREREQ, add missing quoting.
4580 * gnulib/configure.ac: Modernize usage of
4581 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4582 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4583 (AUTOMAKE_VERSION): Bump to 1.15.1.
4584 * configure: Re-generate.
4585 * config.in: Re-generate.
4586 * aclocal.m4: Re-generate.
4587 * gnulib/aclocal.m4: Re-generate.
4588 * gnulib/config.in: Re-generate.
4589 * gnulib/configure: Re-generate.
4590 * gnulib/import/Makefile.in: Re-generate.
4591
4592 2018-06-19 Pedro Alves <palves@redhat.com>
4593
4594 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4595 (lookup_minimal_symbol_by_pc_section): ... here with
4596 gdb_assert_not_reached added.
4597
4598 2018-06-19 Pedro Alves <palves@redhat.com>
4599
4600 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4601 parameter with a block parameter. Compare location's block symbol
4602 with the frame's block instead of addresses.
4603 (skip_inline_frames): Pass the current block instead of the
4604 frame's address. Break out as soon as we determine the frame
4605 should not be skipped.
4606
4607 2018-06-18 Tom Tromey <tom@tromey.com>
4608
4609 * solib-aix.c (solib_aix_get_section_offsets): Return
4610 unique_xmalloc_ptr.
4611 (solib_aix_solib_create_inferior_hook): Update.
4612
4613 2018-06-18 Tom Tromey <tom@tromey.com>
4614
4615 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4616
4617 2018-06-18 Tom Tromey <tom@tromey.com>
4618
4619 * solib-frv.c (frv_relocate_main_executable): Use
4620 unique_xmalloc_ptr.
4621 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4622 unique_xmalloc_ptr.
4623
4624 2018-06-18 Tom Tromey <tom@tromey.com>
4625
4626 * objfiles.h (inhibit_section_map_updates): Update.
4627 (resume_section_map_updates, resume_section_map_updates_cleanup):
4628 Remove.
4629 * solib-svr4.c (svr4_handle_solib_event): Update.
4630 * objfiles.c (inhibit_section_map_updates): Return
4631 scoped_restore_tmpl<int>.
4632 (resume_section_map_updates, resume_section_map_updates_cleanup):
4633 Remove.
4634
4635 2018-06-18 Tom Tromey <tom@tromey.com>
4636
4637 * valprint.h (read_string): Update.
4638 * valprint.c (read_string): Change type of "buffer".
4639 (val_print_string): Update.
4640 * python/py-value.c (valpy_string): Update.
4641 * language.h (struct language_defn) <la_get_string>: Change
4642 type of "buffer".
4643 (default_get_string, c_get_string): Update.
4644 * language.c (default_get_string): Change type of "buffer".
4645 * guile/scm-value.c (gdbscm_value_to_string): Update.
4646 * c-lang.c (c_get_string): Change type of "buffer".
4647
4648 2018-06-18 Tom Tromey <tom@tromey.com>
4649
4650 * ser-mingw.c (struct pipe_state_destroyer): New.
4651 (pipe_state_up): New typedef.
4652 (cleanup_pipe_state): Remove.
4653 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4654
4655 2018-06-18 Tom Tromey <tom@tromey.com>
4656
4657 * rust-lang.h (rust_yyerror): Don't declare.
4658 * rust-lang.c (rust_language_defn): Update.
4659 * rust-exp.y (yyerror): Now static.
4660 * parse.c (parse_exp_in_context_1): Update.
4661 * p-lang.h (p_yyerror): Don't declare.
4662 * p-lang.c (p_language_defn): Update.
4663 * p-exp.y (yyerror): Now static.
4664 * opencl-lang.c (opencl_language_defn): Update.
4665 * objc-lang.c (objc_language_defn): Update.
4666 * m2-lang.h (m2_yyerror): Don't declare.
4667 * m2-lang.c (m2_language_defn): Update.
4668 * m2-exp.y (yyerror): Now static.
4669 * language.h (struct language_defn) <la_error>: Remove.
4670 * language.c (unk_lang_error): Remove.
4671 (unknown_language_defn, auto_language_defn): Remove.
4672 * go-lang.h (go_yyerror): Don't declare.
4673 * go-lang.c (go_language_defn): Update.
4674 * go-exp.y (yyerror): Now static.
4675 * f-lang.h (f_yyerror): Don't declare.
4676 * f-lang.c (f_language_defn): Update.
4677 * f-exp.y (yyerror): Now static.
4678 * d-lang.h (d_yyerror): Don't declare.
4679 * d-lang.c (d_language_defn): Update.
4680 * d-exp.y (yyerror): Now static.
4681 * c-lang.h (c_yyerror): Don't declare.
4682 * c-lang.c (c_language_defn, cplus_language_defn)
4683 (asm_language_defn, minimal_language_defn): Update.
4684 * c-exp.y (yyerror): Now static.
4685 * ada-lang.h (ada_yyerror): Don't declare.
4686 * ada-lang.c (ada_language_defn): Update.
4687 * ada-exp.y (yyerror): Now static.
4688
4689 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4690
4691 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4692 (store_sveregs_to_thread): Likewise.
4693 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4694 (aarch64_linux_store_inferior_registers): Likewise.
4695 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4696 function.
4697 (aarch64_sve_regs_copy_to_regcache): Likewise.
4698 (aarch64_sve_regs_copy_from_regcache): Likewise.
4699 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4700 declaration.
4701 (aarch64_sve_regs_copy_to_regcache): Likewise.
4702 (aarch64_sve_regs_copy_from_regcache): Likewise.
4703 (sve_context): Structure from Linux headers.
4704 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4705 (SVE_SIG_ZREG_SIZE): Likewise.
4706 (SVE_SIG_PREG_SIZE): Likewise.
4707 (SVE_SIG_FFR_SIZE): Likewise.
4708 (SVE_SIG_REGS_OFFSET): Likewise.
4709 (SVE_SIG_ZREGS_OFFSET): Likewise.
4710 (SVE_SIG_ZREG_OFFSET): Likewise.
4711 (SVE_SIG_ZREGS_SIZE): Likewise.
4712 (SVE_SIG_PREGS_OFFSET): Likewise.
4713 (SVE_SIG_PREG_OFFSET): Likewise.
4714 (SVE_SIG_PREGS_SIZE): Likewise.
4715 (SVE_SIG_FFR_OFFSET): Likewise.
4716 (SVE_SIG_REGS_SIZE): Likewise.
4717 (SVE_SIG_CONTEXT_SIZE): Likewise.
4718 (SVE_PT_REGS_MASK): Likewise.
4719 (SVE_PT_REGS_FPSIMD): Likewise.
4720 (SVE_PT_REGS_SVE): Likewise.
4721 (SVE_PT_VL_INHERIT): Likewise.
4722 (SVE_PT_VL_ONEXEC): Likewise.
4723 (SVE_PT_REGS_OFFSET): Likewise.
4724 (SVE_PT_FPSIMD_OFFSET): Likewise.
4725 (SVE_PT_FPSIMD_SIZE): Likewise.
4726 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4727 (SVE_PT_SVE_PREG_SIZE): Likewise.
4728 (SVE_PT_SVE_FFR_SIZE): Likewise.
4729 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4730 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4731 (__SVE_SIG_TO_PT): Likewise.
4732 (SVE_PT_SVE_OFFSET): Likewise.
4733 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4734 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4735 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4736 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4737 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4738 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4739 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4740 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4741 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4742 (SVE_PT_SVE_SIZE): Likewise.
4743 (SVE_PT_SIZE): Likewise.
4744 (HAS_SVE_STATE): New define.
4745
4746 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4747
4748 * nat/aarch64-sve-linux-sigcontext.h: New file.
4749 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4750 new files.
4751 (SVE_VQ_MIN): Likewise.
4752 (SVE_VQ_MAX): Likewise.
4753 (SVE_VL_MIN): Likewise.
4754 (SVE_VL_MAX): Likewise.
4755 (SVE_NUM_ZREGS): Likewise.
4756 (SVE_NUM_PREGS): Likewise.
4757 (sve_vl_valid): Likewise.
4758 (struct user_sve_header): Likewise.
4759
4760 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4761 Richard Bunt <Richard.Bunt@arm.com>
4762
4763 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4764 was requested by GDB.
4765
4766 2018-06-15 Tom de Vries <tdevries@suse.de>
4767
4768 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4769
4770 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4771
4772 * gnulib/update-gnulib.sh: Print expected versions of
4773 autoconf/aclocal.
4774
4775 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4776
4777 * arch-utils.c (default_type_align): Use type_length_units.
4778 * gdbtypes.c (type_align): Use type_length_units.
4779
4780 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4781
4782 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4783 of 'define' command.
4784
4785 2018-06-14 Tom de Vries <tdevries@suse.de>
4786
4787 PR cli/22573
4788 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4789 get_no_prettyformat_print_options.
4790
4791 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4792
4793 * sparc-nat.h: Include target.h.
4794 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4795 <fetch_registers>: Remove this argument in function call.
4796 <store_registers>: Remove this argument in function call, remove
4797 extra semicolon.
4798 <low_forget_process>: Call sparc64_forget_process instead of
4799 sparc_forget_process.
4800
4801 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4802
4803 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4804 (procfs_target::make_corefile_notes): Adjust to new
4805 target_read_alloc return type.
4806
4807 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4808 Stephen Roberts <stephen.roberts@arm.com>
4809
4810 PR gdb/22882
4811 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4812 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4813 Move should_notify_stop local into more inner scope.
4814
4815 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4816 Stephen Roberts <stephen.roberts@arm.com>
4817
4818 PR gdb/22882
4819 * infrun.c (resume_1): Add call to mark_async_event_handler.
4820
4821 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4822
4823 * infrun.c (do_target_wait): Change old version of $pc printed.
4824
4825 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4826
4827 * dwarf2read.c (read_index_from_section): Rename to...
4828 (read_gdb_index_from_section): ... this, update all callers.
4829 (dwarf2_read_index): Rename to...
4830 (dwarf2_read_gdb_index): ... this, update all callers.
4831
4832 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4833
4834 * gdb/hppa-linux-nat.c
4835 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4836 hppa_linux_nat_target::fetch_registers.
4837
4838 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4839
4840 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4841 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4842 (AARCH64_DWARF_SVE_FFR): Likewise.
4843 (AARCH64_DWARF_SVE_P0): Likewise.
4844 (AARCH64_DWARF_SVE_Z0): Likewise.
4845
4846 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4847
4848 * common/common-regcache.h (raw_compare): New function.
4849 * regcache.c (regcache::raw_compare): Likewise.
4850 * regcache.h (regcache::raw_compare): New declaration.
4851
4852 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4853
4854 * common/common-regcache.h (reg_buffer_common): New structure.
4855 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4856 (reg_buffer::raw_supply): Likewise.
4857 (reg_buffer::raw_supply_integer): Likewise.
4858 (reg_buffer::raw_supply_zeroed): Likewise.
4859 (reg_buffer::raw_collect): Likewise.
4860 (reg_buffer::raw_collect_integer): Likewise.
4861 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4862 (reg_buffer::raw_supply): Likewise.
4863 (reg_buffer::raw_supply_integer): Likewise.
4864 (reg_buffer::raw_supply_zeroed): Likewise.
4865 (reg_buffer::raw_collect): Likewise.
4866 (reg_buffer::raw_collect_integer): Likewise.
4867
4868 2018-06-10 Tom Tromey <tom@tromey.com>
4869
4870 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4871 (class remote_state) <stop_reply_queue>: Now std::vector.
4872 (remote_state::~remote_state)
4873 (remote_target::stop_reply_queue_length): Update.
4874 (struct queue_iter_param, remove_child_of_pending_fork)
4875 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4876 (check_pending_event_prevents_wildcard_vcont_callback)
4877 (remove_stop_reply_for_inferior)
4878 (remove_stop_reply_of_remote_state)
4879 (remote_notif_remove_once_on_match)
4880 (stop_reply_match_ptid_and_ws)
4881 (remote_kill_child_of_pending_fork): Remove.
4882 (remote_target::remove_new_fork_children)
4883 (remote_target::check_pending_events_prevent_wildcard_vcont)
4884 (remote_target::discard_pending_stop_replies)
4885 (remote_target::discard_pending_stop_replies_in_queue)
4886 (remote_target::remote_notif_remove_queued_reply)
4887 (remote_target::queued_stop_reply)
4888 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4889 (remote_target::wait, remote_target::kill_new_fork_children)
4890 (remote_target::async): Update.
4891
4892 2018-06-10 Tom Tromey <tom@tromey.com>
4893
4894 * record-full.c (record_full_arch_list_cleanups): Remove.
4895 (record_full_message): Use try/catch.
4896 (record_full_wait_cleanups): Remove.
4897 (record_full_wait_1): Use try/catch.
4898 (record_full_restore): Likewise.
4899
4900 2018-06-10 Tom Tromey <tom@tromey.com>
4901
4902 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4903 declare VEC. Add constructor.
4904 <in_target_beneath>: Now bool.
4905 (record_full_breakpoints): Now a std::vector, static.
4906 (record_full_sync_record_breakpoints)
4907 (record_full_init_record_breakpoints)
4908 (record_full_target::insert_breakpoint)
4909 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4910
4911 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4912
4913 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4914 * serial.c (serial_interface_lookup): Remove struct keyword.
4915
4916 2018-06-10 Tom Tromey <tom@tromey.com>
4917
4918 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4919 method.
4920 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4921 a method.
4922 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4923 method.
4924 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4925 "beneath" as a method.
4926 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4927 Use "beneath" as a method.
4928
4929 2018-06-10 Tom Tromey <tom@tromey.com>
4930
4931 * tracefile.c (struct trace_file_writer_deleter): New.
4932 <operator()>: Rename from trace_file_writer_xfree.
4933 (trace_file_writer_up): New typedef.
4934 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4935
4936 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4937
4938 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4939 <m_registers, m_register_status>: Change type to
4940 std::unique_ptr.
4941 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4942 XCNEWVEC.
4943
4944 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4945
4946 * common/common-regcache.h (enum register_status): Add
4947 underlying type "signed char".
4948 * regcache.h (reg_buffer) <m_register_status>: Change type to
4949 register_status *.
4950 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4951 register_status instead of signed char.
4952 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4953 (reg_buffer::get_register_status): Remove cast.
4954 (readable_regcache::raw_read): Remove cast.
4955 (readable_regcache::cooked_read): Remove cast.
4956
4957 2018-06-09 Tom Tromey <tom@tromey.com>
4958
4959 * source.c (reverse_search_command, forward_search_command): Use
4960 scoped_fd.
4961
4962 2018-06-09 Tom Tromey <tom@tromey.com>
4963
4964 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4965 (serial_ops_list): Now static, std::vector.
4966 (serial_interface_lookup, serial_add_interface): Update.
4967
4968 2018-06-09 Tom Tromey <tom@tromey.com>
4969
4970 * dwarf2read.c (process_cu_includes): Update.
4971 (process_full_comp_unit): Update.
4972 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4973 std::vector.
4974
4975 2018-06-08 Paul Koning <paul_koning@dell.com>
4976
4977 PR gdb/23252
4978
4979 * python/python.c (do_start_initialization):
4980 Avoid call to internal Python API.
4981 (init__gdb_module): New function.
4982
4983 2018-06-08 Gary Benson <gbenson@redhat.com>
4984
4985 * linux-thread-db.c (valprint.h): New include.
4986 (struct check_thread_db_info): New structure.
4987 (check_thread_db_on_load, tdb_testinfo): New static globals.
4988 (check_thread_db, check_thread_db_callback): New functions.
4989 (try_thread_db_load_1): Run integrity checks if requested.
4990 (maintenance_check_libthread_db): New function.
4991 (_initialize_thread_db): Register "maint check libthread-db"
4992 and "maint set/show check-libthread-db".
4993 * NEWS: Mention the above new commands.
4994
4995 2018-06-08 Tom Tromey <tom@tromey.com>
4996
4997 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4998 now a method.
4999
5000 2018-06-08 Tom Tromey <tom@tromey.com>
5001
5002 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5003
5004 2018-06-08 Tom Tromey <tom@tromey.com>
5005
5006 * common/btrace-common.h (struct btrace_data): Add constructor,
5007 destructor, move assignment operator.
5008 <empty, clear, fini>: New methods.
5009 <format>: Initialize.
5010 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5011 (btrace_data_empty): Don't declare.
5012 * common/btrace-common.c (btrace_data_init): Remove.
5013 (btrace_data::fini): Rename from btrace_data_fini.
5014 (btrace_data::empty): Rename from btrace_data_empty.
5015 (btrace_data::clear): Rename from btrace_data_clear. Return
5016 bool.
5017 * btrace.h (make_cleanup_btrace_data): Don't declare.
5018 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5019 (parse_xml_btrace): Update.
5020 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5021 (maint_btrace_clear_packet_history_cmd): Update.
5022
5023 2018-06-07 Pedro Alves <palves@redhat.com>
5024
5025 * target.h (target_ops) <beneath>: Now a method. All references
5026 updated.
5027 (class target_stack): New.
5028 * target.c (g_target_stack): New.
5029 (g_current_top_target): Delete.
5030 (current_top_target): Get the top target out of g_target_stack.
5031 (target_stack::push, target_stack::unpush): New.
5032 (push_target, unpush_target): Reimplement.
5033 (target_is_pushed): Reimplement in terms of g_target_stack.
5034 (target_ops::beneath, target_stack::find_beneath): New.
5035
5036 2018-06-07 Pedro Alves <palves@redhat.com>
5037
5038 * target.h (find_target_beneath): Delete declaration.
5039 * target.c (find_target_beneath): Delete definition.
5040 * aix-thread.c: All callers of find_target_beneath adjusted to
5041 call target_ops::beneath instead.
5042 * bsd-uthread.c: Likewise.
5043 * linux-thread-db.c: Likewise.
5044 * ravenscar-thread.c: Likewise.
5045 * sol-thread.c: Likewise.
5046 * spu-multiarch.c: Likewise.
5047
5048 2018-06-07 Pedro Alves <palves@redhat.com>
5049
5050 * target.h (target_ops) <beneath>: Now a method. All references
5051 updated.
5052 (target_ops) <m_beneath>: New.
5053 * target.c (target_ops::beneath): New.
5054 * corelow.c: Adjust all references to target_ops::beneath.
5055 * linux-thread-db.c: Likewise.
5056 * make-target-delegates: Likewise.
5057 * record-btrace.c: Likewise.
5058 * record-full.c: Likewise.
5059 * remote.c: Likewise.
5060 * target.c: Likewise.
5061 * target-delegates.c: Regenerate.
5062
5063 2018-06-07 Pedro Alves <palves@redhat.com>
5064
5065 * target.h (target_stack): Delete.
5066 (current_top_target): Declare function.
5067 * target.c (target_stack): Delete.
5068 (g_current_top_target): New.
5069 (current_top_target): New function.
5070 * auxv.c: Use current_top_target instead of target_stack
5071 throughout.
5072 * avr-tdep.c: Likewise.
5073 * breakpoint.c: Likewise.
5074 * corefile.c: Likewise.
5075 * elfread.c: Likewise.
5076 * eval.c: Likewise.
5077 * exceptions.c: Likewise.
5078 * frame.c: Likewise.
5079 * gdbarch-selftests.c: Likewise.
5080 * gnu-v3-abi.c: Likewise.
5081 * ia64-tdep.c: Likewise.
5082 * ia64-vms-tdep.c: Likewise.
5083 * infcall.c: Likewise.
5084 * infcmd.c: Likewise.
5085 * infrun.c: Likewise.
5086 * linespec.c: Likewise.
5087 * linux-tdep.c: Likewise.
5088 * minsyms.c: Likewise.
5089 * ppc-linux-nat.c: Likewise.
5090 * ppc-linux-tdep.c: Likewise.
5091 * procfs.c: Likewise.
5092 * regcache.c: Likewise.
5093 * remote.c: Likewise.
5094 * rs6000-tdep.c: Likewise.
5095 * s390-linux-nat.c: Likewise.
5096 * s390-tdep.c: Likewise.
5097 * solib-aix.c: Likewise.
5098 * solib-darwin.c: Likewise.
5099 * solib-dsbt.c: Likewise.
5100 * solib-spu.c: Likewise.
5101 * solib-svr4.c: Likewise.
5102 * solib-target.c: Likewise.
5103 * sparc-tdep.c: Likewise.
5104 * sparc64-tdep.c: Likewise.
5105 * spu-tdep.c: Likewise.
5106 * symfile.c: Likewise.
5107 * symtab.c: Likewise.
5108 * target-descriptions.c: Likewise.
5109 * target-memory.c: Likewise.
5110 * target.c: Likewise.
5111 * target.h: Likewise.
5112 * tracefile-tfile.c: Likewise.
5113 * tracepoint.c: Likewise.
5114 * valops.c: Likewise.
5115 * valprint.c: Likewise.
5116 * value.c: Likewise.
5117 * windows-tdep.c: Likewise.
5118 * mi/mi-main.c: Likewise.
5119
5120 2018-06-07 Tom Tromey <tom@tromey.com>
5121
5122 * valprint.h (build_address_symbolic): Declare.
5123 * printcmd.c (print_address_symbolic): Update.
5124 (build_address_symbolic): Change "name" and "filename" to
5125 std::string.
5126 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5127 Update.
5128 * defs.h (build_address_symbolic): Remove declaration.
5129
5130 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5131
5132 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5133 (aarch64_vnv_type): Add function.
5134 (aarch64_pseudo_register_name): Add V regs for SVE.
5135 (aarch64_pseudo_register_type): Likewise.
5136 (aarch64_pseudo_register_reggroup_p): Likewise.
5137 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5138 (aarch64_pseudo_read_value): Add V regs for SVE.
5139 (aarch64_pseudo_write_2): Use V0 offset for SVE
5140 (aarch64_pseudo_write): Add V regs for SVE.
5141 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5142
5143 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5144
5145 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5146 (sve_vl_from_vq): Likewise.
5147
5148 2018-06-05 Tom Tromey <tom@tromey.com>
5149
5150 * cli/cli-cmds.c (show_version): Update.
5151 * top.c (print_gdb_version): Add "interactive" parameter.
5152 Update.
5153 * main.c (captured_main_1): Update.
5154 * top.h (print_gdb_version): Add "interactive" parameter and a
5155 comment.
5156
5157 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5158
5159 * common/enum-flags.h: Add trailing semicolon to example in
5160 comment.
5161
5162 2018-06-05 Tom Tromey <tom@tromey.com>
5163
5164 PR cli/12326:
5165 * NEWS: Add entry about pager.
5166 * utils.c (pagination_disabled_for_command): New global.
5167 (prompt_for_continue): Allow "c" response to prompt.
5168 (reinitialize_more_filter): Clear
5169 pagination_disabled_for_command.
5170 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5171
5172 2018-06-04 Tom Tromey <tom@tromey.com>
5173
5174 * ada-lang.h (ada_lookup_symbol_list): Update.
5175 * ada-lang.c (resolve_subexp): Update.
5176 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5177 parameter.
5178 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5179 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5180 results parameter to std::vector.
5181 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5182 Update.
5183 * ada-exp.y (block_lookup): Update.
5184 (select_possible_type_sym): Change type of syms. Remove nsyms
5185 parameter.
5186 (write_var_or_type, write_name_assoc): Update.
5187
5188 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5189
5190 * windows-nat.c (windows_nat_target::xfer_partial): Return
5191 TARGET_XFER_E_IO if we need to delegate to the target beneath
5192 but BENEATH is NULL.
5193
5194 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5195
5196 * Makefile.in (config.status): Add configure.nat as a
5197 dependency.
5198
5199 2018-06-04 Tom Tromey <tom@tromey.com>
5200
5201 * cp-name-parser.y (cpname_state): Add method declarations.
5202 (HANDLE_QUAL): Update.
5203 (cpname_state::d_grab, cpname_state::fill_comp)
5204 (cpname_state::make_operator, cpname_state::make_dtor)
5205 (cpname_state::make_builtin_type, cpname_state::make_name)
5206 (cpname_state::d_qualify, cpname_state::d_int_type)
5207 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5208 (%union): Move earlier.
5209
5210 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5211
5212 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5213
5214 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5215
5216 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5217 (aarch64_pseudo_write_1): Likewise.
5218 (aarch64_pseudo_read_value): Use helper.
5219 (aarch64_pseudo_write): Likewise.
5220
5221 2018-06-04 Pedro Alves <palves@redhat.com>
5222
5223 * darwin-nat.c (darwin_ops): Delete.
5224 (darwin_attach_pid): Use get_native_target.
5225
5226 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5227
5228 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5229 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5230
5231 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5232
5233 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5234 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5235 (aarch64_gdbarch_init): Check for SVE.
5236 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5237
5238 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5239
5240 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5241 * aarch64-tdep.h (aarch64_read_description): Likewise.
5242 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5243 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5244 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5245 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5246 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5247
5248 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5249
5250 * value.c (value_fetch_lazy_bitfield): New.
5251 (value_fetch_lazy_memory): New.
5252 (value_fetch_lazy_register): New.
5253 (value_fetch_lazy): Factor out to smaller functions.
5254
5255 2018-06-01 Tom Tromey <tom@tromey.com>
5256
5257 * cp-name-parser.y (backslashable, represented): Now const.
5258
5259 2018-06-01 Tom Tromey <tom@tromey.com>
5260
5261 * cp-name-parser.y: Include parser-defs.h.
5262 (parser_fprintf): Remove declaration.
5263
5264 2018-06-01 Tom Tromey <tom@tromey.com>
5265
5266 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5267 %parse-param.
5268 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5269 (global_result): Remove globals.
5270 (struct cpname_state): New.
5271 (yyparse): Don't declare.
5272 (yylex, yyerror): Move declarations after %union.
5273 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5274 (make_name): Add state parameter.
5275 Update all callers.
5276 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5277 parameter.
5278 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5279 Update.
5280 (yylex): Add lvalp, state parameters.
5281 (yyerror): Add state parameter.
5282 (cp_demangled_name_to_comp): Update.
5283
5284 2018-06-01 Tom Tromey <tom@tromey.com>
5285
5286 * cp-name-parser.y (parser_fprintf): Declare.
5287 (GDB_YY_REMAP_PREFIX): Define.
5288 Include yy-remap.h. Don't redefine yy* identifiers.
5289
5290 2018-06-01 Tom Tromey <tom@tromey.com>
5291
5292 * python/py-type.c (typy_legacy_template_argument): Update.
5293 * cp-support.h (cp_demangled_name_to_comp): Update.
5294 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5295 parameter to be a "std::string *".
5296 (main): Update.
5297
5298 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5299
5300 * ada-lex.l: Include "diagnostics.h" instead of
5301 "common/diagnostics.h".
5302 * unittests/environ-selftests.c: Likewise.
5303 * common/diagnostics.h: Moved to ../include.
5304
5305 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5306
5307 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5308 to language_mode_manual while calling breakpoint_re_set_one.
5309
5310 2018-06-01 Tom Tromey <tom@tromey.com>
5311
5312 * valops.c (value_cast_structs, destructor_name_p): Update.
5313 * symtab.c (gdb_mangle_name): Update.
5314 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5315 Update.
5316 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5317 (pascal_object_print_value_fields, pascal_object_print_value):
5318 Update.
5319 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5320 * linespec.c (find_methods): Update.
5321 * gdbtypes.h (type_name_no_tag): Remove.
5322 (type_name_or_error): Rename from type_name_no_tag_or_error.
5323 * gdbtypes.c (type_name_no_tag): Remove.
5324 (type_name_or_error): Rename from type_name_no_tag_or_error.
5325 (lookup_struct_elt_type, check_typedef): Update.
5326 * expprint.c (print_subexp_standard): Update.
5327 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5328 * d-namespace.c (d_lookup_nested_symbol): Update.
5329 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5330 (cp_print_class_member): Update.
5331 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5332 * completer.c (add_struct_fields): Update.
5333 * c-typeprint.c (cp_type_print_derivation_info)
5334 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5335 Update.
5336 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5337 (ada_prefer_type, ada_is_exception_sym): Update.
5338
5339 2018-06-01 Tom Tromey <tom@tromey.com>
5340
5341 * valops.c (enum_constant_from_type, value_namespace_elt)
5342 (value_maybe_namespace_elt): Update.
5343 * valarith.c (find_size_for_pointer_math): Update.
5344 * target-descriptions.c (make_gdb_type): Update.
5345 * symmisc.c (print_symbol): Update.
5346 * stabsread.c (define_symbol, read_type)
5347 (complain_about_struct_wipeout, add_undefined_type)
5348 (cleanup_undefined_types_1): Update.
5349 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5350 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5351 (rust_internal_print_type, rust_composite_type)
5352 (rust_evaluate_funcall, rust_evaluate_subexp)
5353 (rust_inclusive_range_type_p): Update.
5354 * python/py-type.c (typy_get_tag): Update.
5355 * p-typeprint.c (pascal_type_print_base): Update.
5356 * mdebugread.c (parse_symbol, parse_type): Update.
5357 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5358 Update.
5359 * guile/scm-type.c (gdbscm_type_tag): Update.
5360 * go-lang.c (sixg_string_p): Update.
5361 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5362 Update.
5363 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5364 (TYPE_TAG_NAME): Remove.
5365 * gdbtypes.c (type_name_no_tag): Simplify.
5366 (check_typedef, check_types_equal, recursive_dump_type)
5367 (copy_type_recursive, arch_composite_type): Update.
5368 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5369 in summary mode when needed.
5370 * eval.c (evaluate_funcall): Update.
5371 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5372 (process_structure_scope, read_enumeration_type)
5373 (read_namespace_type, read_module_type, determine_prefix): Update.
5374 * cp-support.c (inspect_type): Update.
5375 * coffread.c (process_coff_symbol, decode_base_type): Update.
5376 * c-varobj.c (c_is_path_expr_parent): Update.
5377 * c-typeprint.c (c_type_print_base_struct_union): Update.
5378 (c_type_print_base_1): Update. Print struct/class/union/enum in
5379 summary when using C language.
5380 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5381 (gen_maybe_namespace_elt): Update.
5382 * ada-lang.c (ada_type_name): Simplify.
5383 (empty_record, ada_template_to_fixed_record_type_1)
5384 (template_to_static_fixed_type)
5385 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5386
5387 2018-06-01 Tom Tromey <tom@tromey.com>
5388
5389 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5390 c_print_type.
5391 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5392 (c_print_type): Update.
5393 (c_print_type): New overload.
5394 (c_type_print_varspec_prefix, c_type_print_args)
5395 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5396 (c_type_print_base_struct_union, c_type_print_base_1)
5397 (cp_type_print_method_args): Add "language" parameter.
5398 (c_type_print_base): Update.
5399 * c-lang.h (c_print_type): Add new overload.
5400
5401 2018-06-01 Tom Tromey <tom@tromey.com>
5402
5403 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5404 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5405
5406 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5407
5408 * aarch64-tdep.c (aarch64_sve_register_names): New const
5409 var.
5410 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5411 (AARCH64_SVE_Z_REGS_NUM): New define.
5412 (AARCH64_SVE_P_REGS_NUM): Likewise.
5413 (AARCH64_SVE_NUM_REGS): Likewise.
5414
5415 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5416
5417 * nat/linux-ptrace.h [__alpha__]
5418 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5419 definitions.
5420
5421 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5422
5423 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5424 the endianness selected.
5425 * NEWS: Document `set endian auto' mode operation update.
5426
5427 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5428
5429 * Makefile.in: Add new header.
5430 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5431 (sve_vl_from_vg): Likewise.
5432 (sve_vq_from_vl): Likewise.
5433 (sve_vl_from_vq): Likewise.
5434 (sve_vq_from_vg): Likewise.
5435 (sve_vg_from_vq): Likewise.
5436 * configure.nat: Add new c file.
5437 * nat/aarch64-sve-linux-ptrace.c: New file.
5438 * nat/aarch64-sve-linux-ptrace.h: New file.
5439
5440 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5441
5442 * aarch64-linux-nat.c (aarch64_linux_read_description):
5443 Add parmeter zero.
5444 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5445 Likewise.
5446 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5447 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5448 (aarch64_gdbarch_init): Add parmeter zero.
5449 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5450 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5451 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5452 parmeter.
5453 * doc/gdb.texinfo: Describe SVE feature
5454 * features/aarch64-sve.c: New file.
5455
5456 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5457
5458 PR gdb/23210
5459 * gdbarch.sh (significant_addr_bit): Default to zero when
5460 not set by target architecture.
5461 * gdbarch.c: Re-generated.
5462 * utils.c (address_significant): Update.
5463
5464 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5465
5466 * stack.c (func_command): Remove trailing newline in call to error.
5467
5468 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5469
5470 * regcache.h (regcache_raw_collect): Remove, update callers to
5471 use regcache::raw_collect.
5472 * regcache.c (regcache_raw_collect): Remove.
5473
5474 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5475
5476 * regcache.h (regcache_raw_supply): Remove, update callers to
5477 use detached_regcache::raw_supply.
5478 * regcache.c (regcache_raw_supply): Remove.
5479
5480 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5481
5482 * regcache.h (regcache_cooked_write_part): Remove, update
5483 callers to use regcache::cooked_write_part.
5484 * regcache.c (regcache_cooked_write_part): Remove.
5485
5486 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5487
5488 * regcache.h (regcache_cooked_read_part): Remove, update callers
5489 to use readable_regcache::cooked_read_part.
5490 * regcache.c (regcache_cooked_read_part): Remove.
5491
5492 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5493
5494 * regcache.h (regcache_cooked_read_value): Remove, update
5495 callers to use readable_regcache::cooked_read_value.
5496 * regcache.c (regcache_cooked_read_value): Remove.
5497
5498 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5499
5500 * regcache.h (regcache_cooked_write): Remove, update callers to
5501 use regcache::cooked_write.
5502 * regcache.c (regcache_cooked_write): Remove.
5503
5504 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5505
5506 * regcache.h (regcache_invalidate): Remove, update callers to
5507 use detached_regcache::invalidate instead.
5508 * regcache.c (regcache_invalidate): Remove.
5509
5510 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5511
5512 * regcache.h (regcache_raw_write_part): Remove, update callers
5513 to use regcache::raw_write_part instead.
5514 * regcache.c (regcache_raw_write_part): Remove.
5515
5516 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5517
5518 * regcache.h (regcache_raw_read_part): Remove, update callers to
5519 use readable_regcache::raw_read_part instead.
5520 * regcache.c (regcache_raw_read_part): Remove.
5521
5522 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5523
5524 * regcache.h (regcache_cooked_read): Remove, update callers to
5525 use readable_regcache::cooked_read instead.
5526 * regcache.c (regcache_cooked_read): Remove.
5527
5528 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5529
5530 * regcache.h (regcache_raw_write): Remove, update callers to use
5531 regcache::raw_write instead.
5532 * regcache.c (regcache_raw_write): Remove.
5533
5534 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5535
5536 * regcache.h (regcache_raw_read): Remove, update callers to use
5537 readable_regcache::raw_read instead.
5538 * regcache.c (regcache_raw_read): Remove.
5539
5540 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5541
5542 * regcache.h (regcache_raw_update): Remove, update callers to
5543 use readable_regcache::raw_update instead.
5544 * regcache.c (regcache_raw_update): Remove.
5545
5546 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5547
5548 * regcache.h (regcache_register_status): Remove, update callers
5549 to use reg_buffer::get_register_status directly instead.
5550 * regcache.c (regcache_register_status): Remove.
5551
5552 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5553
5554 * regcache.h (regcache_get_ptid): Remove, update all callers to
5555 call regcache::ptid instead.
5556 * regcache.c (regcache_get_ptid): Remove.
5557
5558 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5559
5560 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5561
5562 2018-05-30 Pedro Alves <palves@redhat.com>
5563
5564 * common/common-exceptions.h (exception_rethrow): Use
5565 ATTRIBUTE_NORETURN.
5566
5567 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5568
5569 * breakpoint.c (print_solib_event, check_status_catch_solib):
5570 Remove struct keyword in range-based for loops.
5571 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5572 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5573 Likewise.
5574 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5575 Likewise.
5576 * symfile.c (addr_info_make_relative): Likewise.
5577 * thread.c (value_in_thread_stack_temporaries): Likewise.
5578
5579 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5580
5581 PR gdb/16841
5582 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5583 aggregate type to get its real type before accessing it.
5584
5585 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5586
5587 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5588 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5589 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5590 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5591 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5592 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5593 * printcmd.c (info_address_command): Likewise.
5594
5595 2018-05-29 Tom Tromey <tom@tromey.com>
5596
5597 * windows-nat.c (handle_exception): Update fall-through comment.
5598
5599 2018-05-29 Tom Tromey <tom@tromey.com>
5600
5601 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5602 (struct program_space) <added_solibs>: Now a std::vector.
5603 * breakpoint.c (print_solib_event): Update.
5604 (check_status_catch_solib): Update.
5605 * progspace.c (clear_program_space_solib_cache): Update.
5606 * solib.c (update_solib_list): Update.
5607
5608 2018-05-29 Tom Tromey <tom@tromey.com>
5609
5610 * python/py-type.c (typy_richcompare): Update.
5611 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5612 * gdbtypes.h (types_deeply_equal): Return bool.
5613 (types_equal): Likewise.
5614 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5615 declare VEC.
5616 (check_types_equal): Change worklist to std::vector. Return
5617 bool.
5618 (struct type_equality_entry): Add constructor.
5619 (compare_maybe_null_strings): Return bool.
5620 (check_types_worklist): Return bool. Change worklist to
5621 std::vector.
5622 (types_deeply_equal): Use std::vector.
5623 (types_equal): Return bool.
5624 (compare_maybe_null_strings): Simplify.
5625
5626 2018-05-29 Tom Tromey <tom@tromey.com>
5627
5628 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5629
5630 2018-05-29 Tom Tromey <tom@tromey.com>
5631
5632 * objc-lang.h: Don't include cp-support.h.
5633 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5634 declare VEC.
5635
5636 2018-05-27 Tom Tromey <tom@tromey.com>
5637
5638 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5639
5640 2018-05-25 Tom Tromey <tom@tromey.com>
5641
5642 * value.c (value::location): Initialize.
5643
5644 2018-05-25 Tom Tromey <tom@tromey.com>
5645
5646 * dbxread.c (init_bincl_list): Remove.
5647 (bincl_list): Now a std::vector.
5648 (bincls_allocated, next_bincl): Remove.
5649 (free_bincl_list, do_free_bincl_list_cleanup)
5650 (make_cleanup_free_bincl_list): Remove.
5651 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5652 unique_xmalloc_ptr.
5653 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5654 (struct header_file_location): Add constructor.
5655 (add_bincl_to_list): Remove.
5656
5657 2018-05-25 Tom Tromey <tom@tromey.com>
5658
5659 * tui/tui.c (tui_enable): Update.
5660 * mi/mi-interp.c (mi_interp::init): Update.
5661 * interps.h (class interp) <name>: New method.
5662 <m_name>: Rename from name.
5663 (~scoped_restore_interp): Update.
5664 * interps.c (interp::interp): Update.
5665 (interp_add, interp_set, interp_lookup_existing)
5666 (current_interp_named_p): Update.
5667
5668 2018-05-25 Tom Tromey <tom@tromey.com>
5669
5670 * interps.c (interp_name): Remove.
5671 * mi/mi-interp.c (mi_interp::init): Update.
5672 * interps.h (interp_name): Remove.
5673 (~scoped_restore_interp): Update.
5674 * tui/tui.c (tui_enable): Update.
5675
5676 2018-05-25 Tom Tromey <tom@tromey.com>
5677
5678 * utils.c (fputs_maybe_filtered): Update.
5679 * linespec.c (decode_line_full): Update.
5680 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5681 (mi_print_breakpoint_for_event, mi_solib_loaded)
5682 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5683 (mi_user_selected_context_changed): Update.
5684 * mi/mi-main.c (mi_execute_command): Update.
5685 * cli/cli-script.c (execute_control_command): Update.
5686 * python/python.c (execute_gdb_command): Update.
5687 * solib.c (info_sharedlibrary_command): Update.
5688 * interps.c (interp_ui_out): Remove.
5689 * interps.h (interp_ui_out): Remove.
5690
5691 2018-05-25 Tom Tromey <tom@tromey.com>
5692
5693 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5694 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5695 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5696
5697 2018-05-25 Tom Tromey <tom@tromey.com>
5698
5699 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5700 * interps.c (interp_exec): Use scoped_restore.
5701
5702 2018-05-25 Tom Tromey <tom@tromey.com>
5703
5704 * remote.c (remote_target::remote_file_get): Use
5705 gdb::byte_vector.
5706 (remote_target::remote_file_put): Likewise.
5707
5708 2018-05-25 Tom Tromey <tom@tromey.com>
5709
5710 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5711 a std::string.
5712 (get_pe_section_index, add_pe_exported_sym): Update.
5713 (read_pe_exported_syms): Use gdb::def_vector.
5714
5715 2018-05-25 Tom Tromey <tom@tromey.com>
5716
5717 * frame.c (remove_prev_frame): Remove.
5718 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5719
5720 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5721
5722 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5723 Remove prototypes.
5724 * mips-linux-nat.c (supply_fpregset): Always call
5725 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5726 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5727 `mips_fill_fpregset'.
5728 * mips-linux-tdep.c (mips_supply_fpregset)
5729 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5730 (mips_fill_fpregset_wrapper): Remove functions.
5731 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5732 (mips_linux_fpregset): Remove variable.
5733 (mips_linux_iterate_over_regset_sections): Use
5734 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5735 (mips_linux_o32_sigframe_init): Remove comment.
5736
5737 2018-05-25 Pedro Alves <palves@redhat.com>
5738
5739 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5740 (struct readahead_cache, struct packet_reg, struct
5741 remote_arch_state, class remote_state): Move higher up in the
5742 file.
5743 (remote_target::m_remote_state): Now an object instead of a pointer.
5744 (remote_target::get_remote_state): Adjust.
5745
5746 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5747
5748 * stack.c (select_and_print_frame): Delete.
5749 (struct function_bounds): Move struct within function.
5750 (func_command): Most content moved into new function
5751 find_frame_for_function, use new function, print result, add
5752 function comment.
5753 (find_frame_for_function): New function, now returns a result.
5754
5755 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5756
5757 * stack.c (iterate_over_block_arg_vars): Fix comment.
5758 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5759
5760 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5761
5762 PR gdb/23203
5763 * frame.c
5764 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5765 Define.
5766 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5767 Define.
5768 * frame.h (class scoped_restore_selected_frame): New class.
5769 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5770 of any exception, use scoped_restore_selected_frame to restore the
5771 frame instead.
5772
5773 2018-05-24 Pedro Alves <palves@redhat.com>
5774
5775 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5776 override.
5777
5778 2018-05-23 Tom Tromey <tom@tromey.com>
5779
5780 * complaints.c (struct complaints): Remove.
5781 (symfile_complaint_book): Remove.
5782 (series): New global.
5783 (complaint_internal): Update.
5784 (clear_complaints): Update.
5785
5786 2018-05-23 Tom Tromey <tom@tromey.com>
5787
5788 * complaints.c (counters): New global.
5789 (struct complain): Remove.
5790 (struct complaints) <root>: Remove.
5791 (complaint_sentinel): Remove.
5792 (symfile_complaint_book): Update.
5793 (find_complaint) Remove.
5794 (complaint_internal, clear_complaints): Update.
5795
5796 2018-05-23 Tom Tromey <tom@tromey.com>
5797
5798 * complaints.c (struct complain) <file, line>: Remove.
5799 (find_complaint): Remove file, line parameters.
5800 (complaint_internal): Update.
5801
5802 2018-05-23 Tom Tromey <tom@tromey.com>
5803
5804 * complaints.c (vcomplaint): Remove.
5805 (complaint_internal) Merge in contents of vcomplaint.
5806
5807 2018-05-23 Tom Tromey <tom@tromey.com>
5808
5809 * complaints.c (struct complaints) <explanation>: Remove.
5810 (symfile_explanations): Remove.
5811 (symfile_complaint_book): Update.
5812 (vcomplaint): Update.
5813 (struct explanation): Remove.
5814
5815 2018-05-23 Tom Tromey <tom@tromey.com>
5816
5817 * complaints.c (symfile_complaints): Remove.
5818 (complaint_internal): Remove "complaints" parameter.
5819 (clear_complaints, vcomplaint): Remove "c" parameter.
5820 (get_complaints): Remove.
5821 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5822 (dwarf2_debug_line_missing_file_complaint)
5823 (dwarf2_debug_line_missing_end_sequence_complaint)
5824 (dwarf2_complex_location_expr_complaint)
5825 (dwarf2_const_value_length_mismatch_complaint)
5826 (dwarf2_section_buffer_overflow_complaint)
5827 (dwarf2_macro_malformed_definition_complaint)
5828 (dwarf2_invalid_attrib_class_complaint)
5829 (create_addrmap_from_index, dw2_symtab_iter_next)
5830 (dw2_expand_marked_cus)
5831 (dw2_debug_names_iterator::find_vec_in_debug_names)
5832 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5833 (create_debug_type_hash_table, init_cutu_and_read_dies)
5834 (partial_die_parent_scope, add_partial_enumeration)
5835 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5836 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5837 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5838 (create_cus_hash_table, create_dwp_hash_table)
5839 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5840 (dwarf2_rnglists_process, dwarf2_ranges_process)
5841 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5842 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5843 (handle_struct_member_die, process_structure_scope)
5844 (read_array_type, read_common_block, read_module_type)
5845 (read_tag_pointer_type, read_typedef, read_base_type)
5846 (read_subrange_type, load_partial_dies, partial_die_info::read)
5847 (partial_die_info::read, partial_die_info::read)
5848 (partial_die_info::read, read_checked_initial_length_and_offset)
5849 (dwarf2_string_attr, read_formatted_entries)
5850 (dwarf_decode_line_header)
5851 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5852 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5853 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5854 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5855 (get_signatured_type, get_DW_AT_signature_type)
5856 (decode_locdesc, file_file_name, consume_improper_spaces)
5857 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5858 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5859 (dwarf2_symbol_mark_computed, set_die_type)
5860 (read_attribute_value): Update.
5861 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5862 Update.
5863 * dbxread.c (unknown_symtype_complaint)
5864 (lbrac_mismatch_complaint, repeated_header_complaint)
5865 (set_namestring, function_outside_compilation_unit_complaint)
5866 (read_dbx_symtab, process_one_symbol): Update.
5867 * gdbtypes.c (stub_noname_complaint): Update.
5868 * windows-nat.c (handle_unload_dll): Update.
5869 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5870 (decode_base_type): Update.
5871 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5872 (eb_complaint, record_include_begin, record_include_end)
5873 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5874 (process_xcoff_symbol, read_symbol)
5875 (function_outside_compilation_unit_complaint)
5876 (scan_xcoff_symtab): Update.
5877 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5878 * buildsym.c (finish_block_internal, make_blockvector)
5879 (end_symtab_get_static_block, augment_type_symtab): Update.
5880 * dtrace-probe.c (dtrace_process_dof)
5881 (dtrace_static_probe_ops::get_probes): Update.
5882 * complaints.h (struct complaint): Don't declare.
5883 (symfile_complaints): Remove.
5884 (complaint_internal): Remove "complaints" parameter.
5885 (complaint): Likewise.
5886 (clear_complaints): Likewise.
5887 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5888 (reread_symbols): Update.
5889 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5890 (dwarf2_frame_cache, decode_frame_entry): Update.
5891 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5892 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5893 (info_selectors_command): Update.
5894 * macrotab.c (macro_include, check_for_redefinition)
5895 (macro_undef): Update.
5896 * objfiles.c (filter_overlapping_sections): Update.
5897 * stabsread.c (invalid_cpp_abbrev_complaint)
5898 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5899 (define_symbol, error_type, read_type, rs6000_builtin_type)
5900 (stabs_method_name_from_physname, read_member_functions)
5901 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5902 (attach_fields_to_type, complain_about_struct_wipeout)
5903 (read_range_type, read_args, common_block_start)
5904 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5905 Update.
5906 * mdebugread.c (index_complaint, unknown_ext_complaint)
5907 (basic_type_complaint, bad_tag_guess_complaint)
5908 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5909 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5910 (parse_procedure, parse_lines)
5911 (function_outside_compilation_unit_complaint)
5912 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5913 (bad_tag_guess_complaint, reg_value_complaint): Update.
5914 * cp-support.c (demangled_name_complaint): Update.
5915 * macroscope.c (sal_macro_scope): Update.
5916 * dwarf-index-write.c (class debug_names): Update.
5917
5918 2018-05-23 Tom Tromey <tom@tromey.com>
5919
5920 * complaints.c (clear_complaints): Remove "noisy" parameter.
5921 * complaints.h (clear_complaints): Update.
5922 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5923 (reread_symbols): Update.
5924
5925 2018-05-23 Tom Tromey <tom@tromey.com>
5926
5927 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5928 SUBSEQUENT_MESSAGE.
5929 (vcomplaint, clear_complaints): Update.
5930 (symfile_explanations): Remove some messages.
5931
5932 2018-05-23 Tom Tromey <tom@tromey.com>
5933
5934 * complaints.c (internal_complaint): Remove.
5935 * complaints.h (internal_complaint): Remove.
5936
5937 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5938
5939 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5940
5941 2018-05-22 Pedro Alves <palves@redhat.com>
5942
5943 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5944 (remote_fileio_badfd, remote_fileio_return_errno)
5945 (remote_fileio_return_success, remote_fileio_func_open)
5946 (remote_fileio_func_open, remote_fileio_func_close)
5947 (remote_fileio_func_read, remote_fileio_func_write)
5948 (remote_fileio_func_lseek, remote_fileio_func_rename)
5949 (remote_fileio_func_unlink, remote_fileio_func_stat)
5950 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5951 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5952 remote_target parameter.
5953 (remote_fio_func_map) <func>: Add remote_target parameter.
5954 (do_remote_fileio_request, remote_fileio_request):
5955 * remote-fileio.h (remote_fileio_request):
5956 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5957 remote_target parameter.
5958 (remote_notif_process, handle_notification): Adjust to pass down
5959 the remote.
5960 (remote_notif_state_allocate): Add remote_target parameter. Save
5961 it.
5962 * remote-notif.h (struct remote_target): Forward declare.
5963 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5964 remote_target parameter.
5965 (struct remote_notif_state) <remote>: New field.
5966 (remote_notif_ack, remote_notif_parse): Add remote_target
5967 parameter.
5968 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5969 remote_target parameter.
5970 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5971 (threads_listing_context, rmt_thread_action, protocol_feature)
5972 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5973 (packet_result, struct threads_listing_context, remote_state):
5974 Move definitions and declarations higher up.
5975 (remote_target) <~remote_target>: Declare.
5976 (remote_download_command_source, remote_file_put, remote_file_get)
5977 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5978 (remote_hostio_pread_vFile, remote_hostio_send_command)
5979 (remote_hostio_set_filesystem, remote_hostio_open)
5980 (remote_hostio_close, remote_hostio_unlink, remote_state)
5981 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5982 (get_memory_write_packet_size, get_memory_read_packet_size)
5983 (append_pending_thread_resumptions, remote_detach_1)
5984 (append_resumption, remote_resume_with_vcont)
5985 (add_current_inferior_and_thread, wait_ns, wait_as)
5986 (process_stop_reply, remote_notice_new_inferior)
5987 (process_initial_stop_replies, remote_add_thread)
5988 (btrace_sync_conf, remote_btrace_maybe_reopen)
5989 (remove_new_fork_children, kill_new_fork_children)
5990 (discard_pending_stop_replies, stop_reply_queue_length)
5991 (check_pending_events_prevent_wildcard_vcont)
5992 (discard_pending_stop_replies_in_queue, stop_reply)
5993 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5994 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5995 (remote_interrupt_as, remote_interrupt_ns)
5996 (remote_get_noisy_reply, remote_query_attached)
5997 (remote_add_inferior, remote_current_thread, get_current_thread)
5998 (set_thread, set_general_thread, set_continue_thread)
5999 (set_general_process, write_ptid)
6000 (remote_unpack_thread_info_response, remote_get_threadinfo)
6001 (parse_threadlist_response, remote_get_threadlist)
6002 (remote_threadlist_iterator, remote_get_threads_with_ql)
6003 (remote_get_threads_with_qxfer)
6004 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6005 (get_offsets, remote_check_symbols, remote_supported_packet)
6006 (remote_query_supported, remote_packet_size)
6007 (remote_serial_quit_handler, remote_detach_pid)
6008 (remote_vcont_probe, remote_resume_with_hc)
6009 (send_interrupt_sequence, interrupt_query)
6010 (remote_notif_get_pending_events, fetch_register_using_p)
6011 (send_g_packet, process_g_packet, fetch_registers_using_g)
6012 (store_register_using_P, store_registers_using_G)
6013 (set_remote_traceframe, check_binary_download)
6014 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6015 (remote_xfer_live_readonly_partial, remote_read_bytes)
6016 (remote_send_printf, remote_flash_write, readchar)
6017 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6018 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6019 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6020 (extended_remote_disable_randomization, extended_remote_run)
6021 (send_environment_packet, extended_remote_environment_support)
6022 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6023 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6024 (packet_command): Now methods of ...
6025 (remote_target): ... this class.
6026 (m_remote_state) <remote_target>: New field.
6027 (struct remote_state) <stop_reply_queue,
6028 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6029 fields.
6030 (remote_state::remote_state): Allocate stop_reply_queue.
6031 (remote_state): Delete global.
6032 (get_remote_state_raw): Delete.
6033 (remote_target::get_remote_state): Allocate m_remote_state on
6034 demand.
6035 (get_current_remote_target): New.
6036 (remote_ops, extended_remote_ops): Delete.
6037 (wait_forever_enabled_p, remote_async_inferior_event_token):
6038 Delete, moved to struct remote_state.
6039 (remote_target::close): Delete self. Destruction bits split to
6040 ...
6041 (remote_target::~remote_target): ... this.
6042 (show_memory_packet_size): Adjust to use
6043 get_current_remote_target.
6044 (struct protocol_feature) <func>: Add remote_target parameter.
6045 All callers adjusted.
6046 (curr_quit_handler_target): New.
6047 (remote_serial_quit_handler): Reimplement.
6048 (remote_target::open_1): Adjust to use get_current_remote_target.
6049 Heap-allocate remote_target/extended_remote_target instances.
6050 (vcont_builder::vcont_builder): Add remote_target parameter, and
6051 save it in m_remote. All callers adjusted.
6052 (vcont_builder::m_remote): New field.
6053 (vcont_builder::restart, vcont_builder::flush)
6054 (vcont_builder::push_action): Use it.
6055 (remote_target::commit_resume): Use it.
6056 (struct queue_iter_param) <remote>: New field.
6057 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6058 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6059 (check_pending_event_prevents_wildcard_vcont_callback)
6060 (remote_target::check_pending_events_prevent_wildcard_vcont)
6061 (remote_target::discard_pending_stop_replies)
6062 (remote_target::discard_pending_stop_replies_in_queue)
6063 (remote_target::remote_notif_remove_queued_reply): Fill in
6064 'remote' field.
6065 (remote_notif_get_pending_events): New.
6066 (remote_target::readchar, remote_target::remote_serial_write):
6067 Save/restore curr_quit_handler_target.
6068 (putpkt): New.
6069 (kill_new_fork_children): Fill in 'remote' field.
6070 (packet_command): Use get_current_remote_target, defer to
6071 remote_target method of same name.
6072 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6073 parameter, and save it in m_remote. All callers adjusted.
6074 (scoped_remote_fd::release): Use m_remote.
6075 (scoped_remote_fd::m_remote): New field.
6076 (remote_file_put, remote_file_get, remote_file_delete): Use
6077 get_current_remote_target, defer to remote_target method of same
6078 name.
6079 (remote_btrace_reset): Add remote_state paremeter. Update all
6080 callers.
6081 (remote_async_inferior_event_handler). Pass down 'data'.
6082 (remote_new_objfile): Use get_current_remote_target.
6083 (remote_target::vcont_r_supported): New.
6084 (set_range_stepping): Use get_current_remote_target and
6085 remote_target::vcont_r_supported.
6086 (_initialize_remote): Don't allocate 'remote_state' and
6087 'stop_reply_queue' globals.
6088 * remote.h (struct remote_target): Forward declare.
6089 (getpkt, putpkt, remote_notif_get_pending_events): Add
6090 'remote_target' parameter.
6091
6092 2018-05-22 Pedro Alves <palves@redhat.com>
6093
6094 * remote.c (vcont_builder): Now a class. Make all data members
6095 private.
6096 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6097 Declare methods.
6098 (vcont_builder_restart): Rename to ...
6099 (vcont_builder::restart): ... this.
6100 (vcont_builder_flush): Rename to ...
6101 (vcont_builder::flush): ... this.
6102 (vcont_builder_push_action): Rename to ...
6103 (vcont_builder::push_action): ... this.
6104 (remote_target::commit_resume): Adjust.
6105
6106 2018-05-22 Pedro Alves <palves@redhat.com>
6107
6108 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6109 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6110 (get_fixed_memory_packet_size): New.
6111 (get_memory_packet_size): Use it.
6112 (set_memory_packet_size): Don't override the config size with
6113 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6114 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6115 Don't refer to get_memory_packet_size if not connected to a remote
6116 target. Show "(default)" if configured size is 0.
6117
6118 2018-05-22 Pedro Alves <palves@redhat.com>
6119
6120 * remote.c (remote_target::mourn_inferior): Move
6121 discard_pending_stop_replies call here from ...
6122 (_initialize_remote): ... here.
6123
6124 2018-05-22 Pedro Alves <palves@redhat.com>
6125
6126 * remote.c (compare_section_command): Remove set_general_process
6127 call.
6128
6129 2018-05-22 Pedro Alves <palves@redhat.com>
6130
6131 * remote.c (struct packet_reg, struct remote_arch_state):
6132 Move higher up in the file.
6133 (remote_state) <m_arch_states>: Store remote_arch_state values
6134 instead of remote_arch_state pointers.
6135 (remote_state::get_remote_arch_state): Adjust.
6136
6137 2018-05-22 Pedro Alves <palves@redhat.com>
6138
6139 * remote.c: Include <unordered_map>.
6140 (remote_state): Now a class.
6141 (remote_state) <get_remote_arch_state>: Declare method.
6142 <get_remote_arch_state>: New field.
6143 (remote_arch_state) <remote_arch_state>: Declare ctor.
6144 <regs>: Now a unique_ptr.
6145 (remote_gdbarch_data_handle): Delete.
6146 (get_remote_arch_state): Delete.
6147 (remote_state::get_remote_arch_state): New.
6148 (get_remote_state): Adjust to call remote_state's
6149 get_remote_arch_state method.
6150 (init_remote_state): Delete, bits factored out to ...
6151 (remote_arch_state::remote_arch_state): ... this new method.
6152 (get_remote_packet_size, get_memory_packet_size)
6153 (process_g_packet, remote_target::fetch_registers)
6154 (remote_target::prepare_to_store, store_registers_using_G)
6155 (remote_target::store_registers, remote_target::get_trace_status):
6156 Adjust to call remote_state's method.
6157 (_initialize_remote): Remove reference to
6158 remote_gdbarch_data_handle.
6159
6160 2018-05-22 Pedro Alves <palves@redhat.com>
6161
6162 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6163 pread>: New method declarations.
6164 (remote_target::open_1): Adjust.
6165 (readahead_cache_invalidate): Rename to ...
6166 (readahead_cache::invalidate): ... this, and adjust to be a class
6167 method.
6168 (readahead_cache_invalidate_fd): Rename to ...
6169 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6170 class method.
6171 (remote_hostio_pwrite): Adjust.
6172 (remote_hostio_pread_from_cache): Rename to ...
6173 (readahead_cache::pread): ... this, and adjust to be a class
6174 method.
6175 (remote_hostio_close): Adjust.
6176
6177 2018-05-22 Pedro Alves <palves@redhat.com>
6178
6179 * remote.c (remote_hostio_close_cleanup): Delete.
6180 (class scoped_remote_fd): New.
6181 (remote_file_put, remote_file_get): Use it.
6182
6183 2018-05-22 Pedro Alves <palves@redhat.com>
6184
6185 (struct vCont_action_support): Use bool and initialize all fields.
6186 (struct readahead_cache): Initialize all fields.
6187 (remote_state): Use bool and initialize all fields.
6188 (remote_state::remote_state, remote_state::~remote_state): New.
6189 (new_remote_state): Delete.
6190 (_initialize_remote): Use new to allocate remote_state.
6191
6192 2018-05-22 Pedro Alves <palves@redhat.com>
6193 張俊芝 <zjz@zjz.name>
6194
6195 PR gdb/22973
6196 * c-exp.y: Include "c-support.h".
6197 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6198 of tolower. Use c_ident_is_alpha to scan names.
6199 * c-lang.c: Include "c-support.h".
6200 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6201 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6202 * c-support.h: New file, with bits factored out from ...
6203 * cp-name-parser.y: ... this file.
6204 Include "c-support.h".
6205 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6206 c-support.h and renamed.
6207 (symbol_end, yylex): Adjust.
6208
6209 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6210
6211 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6212 parameter type to CORE_ADDR.
6213 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6214 parameter type in declaration to CORE_ADDR.
6215 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6216 target_auxv_search to get AT_HWCAP and use the result to get the
6217 target description.
6218 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6219 to CORE_ADDR. Remove the cast of the return value to unsigned
6220 long. Fix error predicate of target_auxv_search.
6221 (ppc_linux_nat_target::read_description): Change the type of the
6222 hwcap variable to CORE_ADDR.
6223
6224 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6225
6226 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6227 if the size of fpscr is larger than 32 bits.
6228
6229 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6230
6231 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6232 (ppc32_linux_vsxregmap): New global.
6233 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6234 regcache_supply_regset, and regcache_collect_regset.
6235 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6236 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6237 (fetch_vsx_register, store_vsx_register): Remove.
6238 (fetch_vsx_registers): Add regno parameter. Get regset using
6239 ppc_linux_vsxregset. Use regset to supply registers.
6240 (store_vsx_registers): Add regno parameter. Get regset using
6241 ppc_linux_vsxregset. Use regset to collect registers.
6242 (fetch_register): Call fetch_vsx_registers instead of
6243 fetch_vsx_register.
6244 (store_register): Call store_vsx_registers instead of
6245 store_vsx_register.
6246 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6247 new regno parameter.
6248 (store_ppc_registers): Call store_vsx_registers with -1 for the
6249 new regno parameter.
6250 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6251 (ppc_collect_vsxregset): Remove.
6252
6253 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6254
6255 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6256 offset fields.
6257 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6258 for vector register offset fields.
6259 (ppc64_fbsd_reg_offsets): Likewise.
6260 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6261 to vector register offset fields.
6262 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6263 to vector register offset fields.
6264 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6265 vector register offset fields.
6266 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6267 initializers for vector register offset fields.
6268 (rs6000_aix64_reg_offsets): Likewise.
6269 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6270 (ppc_supply_vrregset): Remove.
6271 (ppc_collect_vrregset): Remove.
6272 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6273 (ppc_linux_vrregset) : New function.
6274 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6275 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6276 (ppc32_linux_vrregset): Remove.
6277 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6278 and use result instead of ppc32_linux_vrregset.
6279 (ppc32_linux_reg_offsets): Remove initializers for vector register
6280 offset fields.
6281 (ppc64_linux_reg_offsets): Likewise.
6282 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6283 * ppc-linux-nat.c: Include regset.h.
6284 (gdb_vrregset_t): Adjust comment to account for little-endian
6285 mode.
6286 (supply_vrregset, fill_vrregset): Remove.
6287 (fetch_altivec_register, store_altivec_register): Remove.
6288 (fetch_altivec_registers): Add regno parameter. Get regset using
6289 ppc_linux_vrregset. Use regset to supply registers.
6290 (store_altivec_registers): Add regno parameter. Get regset using
6291 ppc_linux_vrregset. Use regset to collect registers.
6292 (fetch_register): Call fetch_altivec_registers instead of
6293 fetch_altivec_register.
6294 (store_register): Call store_altivec_registers instead of
6295 store_altivec_register.
6296 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6297 the new regno parameter.
6298 (store_ppc_registers): Call store_altivec_registers with -1 for
6299 the new regno parameter.
6300
6301 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6302
6303 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6304 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6305 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6306 (gdb_vrregset_t): Change array type size to
6307 PPC_LINUX_SIZEOF_VRREGSET.
6308 (gdb_vsxregset_t): Change array type size to
6309 PPC_LINUX_SIZEOF_VSXREGSET.
6310 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6311 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6312 PPC_LINUX_SIZEOF_VSXREGSET.
6313
6314 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6315
6316 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6317 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6318 nat/ppc-linux.c.
6319 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6320 ppc_linux_target_wordsize with tid.
6321 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6322 wordsize with tid.
6323 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6324 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6325 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6326 tid parameter. Remove static specifier.
6327 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6328 (ppc_linux_target_wordsize): New declaration.
6329
6330 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6331
6332 * arch/ppc-linux-common.c: New file.
6333 * arch/ppc-linux-common.h: New file.
6334 * arch/ppc-linux-tdesc.h: New file.
6335 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6336 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6337 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6338 arch/ppc-linux-tdesc.h.
6339 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6340 arch/ppc-linux-tdesc.h.
6341 (ppc_linux_nat_target::read_description): Remove target
6342 description matching code. Fill a ppc_linux_features struct and
6343 call ppc_linux_match_description with it. Move comment about ISA
6344 2.05 to ppc-linux-common.c.
6345 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6346 arch/ppc-linux-tdesc.h.
6347 (ppc_linux_core_read_description): Remove target description
6348 matching code. Fill a ppc_linux_features struct and call
6349 ppc_linux_match_description with it.
6350 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6351 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6352 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6353 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6354 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6355 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6356 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6357 (tdesc_powerpc_e500l): Remove.
6358
6359 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6360
6361 * ada-lang.c (catch_assert_command): Pass empty string instead
6362 of NULL for excep_string argument.
6363
6364 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6365
6366 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6367 the width of the requested register exceeds the width of the
6368 `ptrace' data type.
6369
6370 2018-05-21 Tom Tromey <tom@tromey.com>
6371
6372 * printcmd.c (output_command): Remove.
6373 (output_command_const): Rename to output_command.
6374 * valprint.h (output_command): Rename from output_command_const.
6375 * tracepoint.c (trace_dump_actions): Call output_command.
6376
6377 2018-05-21 Tom Tromey <tom@tromey.com>
6378
6379 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6380 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6381 * ada-lang.h (create_ada_exception_catchpoint): Update.
6382 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6383 std::string.
6384 (create_excep_cond_exprs, ~ada_catchpoint)
6385 (should_stop_exception, print_one_exception)
6386 (print_mention_exception, print_recreate_exception): Update.
6387 (ada_get_next_arg): Remove.
6388 (catch_ada_exception_command_split): Use std::string. Change type
6389 of "excep_string", "cond_string".
6390 (catch_ada_exception_command): Update.
6391 (create_ada_exception_catchpoint): Change type of excep_string.
6392 (ada_exception_sal): Remove excep_string parameter.
6393 (~ada_catchpoint): Remove.
6394
6395 2018-05-21 Tom Tromey <tom@tromey.com>
6396
6397 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6398 cleanup.
6399
6400 2018-05-21 Tom Tromey <tom@tromey.com>
6401
6402 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6403 Return unique_xmalloc_ptr.
6404 (print_it_exception): Update.
6405
6406 2018-05-21 Tom Tromey <tom@tromey.com>
6407
6408 * tracepoint.c (trace_dump_actions): Use std::string.
6409
6410 2018-05-21 Tom Tromey <tom@tromey.com>
6411
6412 * symfile.c (reread_symbols): Use std::string for original_name.
6413
6414 2018-05-21 Tom Tromey <tom@tromey.com>
6415
6416 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6417 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6418 constructor.
6419
6420 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6421
6422 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6423 instance to...
6424 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6425 * objfiles.c (get_objfile_bfd_data): Allocate
6426 objfile_per_bfd_storage with obstack_new when allocating on
6427 obstack.
6428
6429 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6430
6431 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6432 OBSTACK_ZALLOC.
6433 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6434 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6435 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6436 (add_pending): Likewise.
6437 (parse_symbol): Likewise.
6438 (parse_partial_symbols): Likewise.
6439 (psymtab_to_symtab_1): Likewise.
6440 (new_psymtab): Likewise.
6441 (elfmdebug_build_psymtabs): Likewise.
6442 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6443 * objfiles.c (get_objfile_bfd_data): Likewise.
6444 (objfile_register_static_link): Likewise.
6445 * psymtab.c (allocate_psymtab): Likewise.
6446 * stabsread.c (read_member_functions): Likewise.
6447 * xcoffread.c (xcoff_end_psymtab): Likewise.
6448
6449 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6450
6451 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6452 compiler supports std::is_trivially_constructible.
6453 * common/poison.h: Include obstack.h.
6454 (IsMallocable): Define to is_trivially_constructible if the
6455 compiler supports it, define to true_type otherwise.
6456 (xobnew): New.
6457 (XOBNEW): Redefine.
6458 (xobnewvec): New.
6459 (XOBNEWVEC): Redefine.
6460 * gdb_obstack.h (obstack_zalloc): New.
6461 (OBSTACK_ZALLOC): Redefine.
6462 (obstack_calloc): New.
6463 (OBSTACK_CALLOC): Redefine.
6464 (obstack_new): New.
6465 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6466 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6467 gdbarch.c.
6468 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6469 obstack_calloc/obstack_zalloc.
6470 (gdbarch_obstack_zalloc): Remove.
6471 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6472
6473 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6474
6475 * stack.c (backtrace_command_1): Remove useless variable int i.
6476
6477 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6478
6479 * stack.c (print_frame_info): Fix comment.
6480
6481 2018-05-18 Tom Tromey <tom@tromey.com>
6482
6483 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6484 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6485 (~dwarf2_per_objfile): Update
6486 (dwarf2_get_dwz_file): Use new.
6487 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6488 unique_ptr.
6489
6490 2018-05-18 Tom Tromey <tom@tromey.com>
6491
6492 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6493 unique_ptr.
6494 * dwarf2read.c (struct dwp_file): Add constructor and
6495 initializers.
6496 (open_and_init_dwp_file): Return a unique_ptr.
6497 (dwarf2_per_objfile, create_dwp_hash_table)
6498 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6499 (lookup_dwo_unit_in_dwp): Update.
6500 (open_and_init_dwp_file, get_dwp_file): Update.
6501
6502 2018-05-18 Tom Tromey <tom@tromey.com>
6503
6504 * dwarf2read.c (dwarf2_per_objfile): Update.
6505 (struct mapped_index): Add initializers.
6506 (dwarf2_read_index): Use new.
6507 (dw2_symtab_iter_init): Update.
6508 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6509 unique_ptr.
6510
6511 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6512
6513 * dwarf2read.c (mapped_index) <total_size>: Remove.
6514
6515 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6516
6517 * unittests/format_pieces-selftests.c (test_format_specifier):
6518 Add ARI comments.
6519
6520 2018-05-18 Tom Tromey <tom@tromey.com>
6521
6522 * c-typeprint.c (maybe_print_hole): New function.
6523 (c_print_type_struct_field_offset): Update.
6524 (c_type_print_base_struct_union): Call maybe_print_hole.
6525
6526 2018-05-17 Keith Seitz <keiths@redhat.com>
6527
6528 * breakpoint.c (build_bpstat_chain): New function, moved from
6529 bpstat_stop_status.
6530 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6531 If no stop chain is passed, call build_bpstat_chain to build it.
6532 * breakpoint.h (build_bpstat_chain): Declare.
6533 (bpstat_stop_status): Move documentation here from breakpoint.c.
6534 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6535 build the stop chain and pass it to skip_inline_frames.
6536 Pass this stop chain to bpstat_stop_status.
6537 * inline-frame.c: Include breakpoint.h.
6538 (stopped_by_user_bp_inline_frame): New function.
6539 (skip_inline_frames): Add parameter `stop_chain'.
6540 Move documention to inline-frame.h.
6541 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6542 whether the frame should be elided.
6543 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6544 Add moved documentation and update for new parameter.
6545
6546 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6547
6548 PR cli/14975
6549 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6550 unittests/format_pieces-selftests.c.
6551 * common/format.h (format_piece) <operator==>: New.
6552 (format_pieces) <operator[]>: Remove.
6553 * common/format.c (format_pieces::format_pieces): Handle \e.
6554 * unittests/format_pieces-selftests.c: New.
6555
6556 2018-05-17 Tom Tromey <tom@tromey.com>
6557
6558 PR symtab/23010:
6559 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6560 (dw2_instantiate_symtab): Add skip_partial parameter.
6561 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6562 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6563 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6564 (dw2_expand_symtabs_matching_one)
6565 (dw2_find_pc_sect_compunit_symtab)
6566 (dw2_debug_names_lookup_symbol)
6567 (dw2_debug_names_expand_symtabs_for_function): Update.
6568 (init_cutu_and_read_dies): Add skip_partial parameter.
6569 (process_psymtab_comp_unit, build_type_psymtabs_1)
6570 (process_skeletonless_type_unit, load_partial_comp_unit)
6571 (psymtab_to_symtab_1): Update.
6572 (load_full_comp_unit): Add skip_partial parameter.
6573 (process_imported_unit_die, dwarf2_read_addr_index)
6574 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6575 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6576 (read_signatured_type): Update.
6577
6578 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6579
6580 * value.c (release_value): Remove unused variable.
6581 (record_latest_value): Likewise.
6582 (access_value_history): Likewise.
6583 (preserve_values): Likewise.
6584
6585 2018-05-17 Tom Tromey <tom@tromey.com>
6586
6587 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6588 Initialize.
6589
6590 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6591
6592 PR gdb/22286
6593 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6594 Also handle registers whose width is not a multiple of
6595 PTRACE_TYPE_RET.
6596 (linux_nat_trad_target::store_register): Likewise.
6597
6598 2018-05-16 Tom Tromey <tom@tromey.com>
6599
6600 * gdbcore.h (core_bfd): Redefine.
6601 * corelow.c (core_target::close): Update.
6602 (core_target_open): Update.
6603 * progspace.h (struct program_space) <cbfd>: Now a
6604 gdb_bfd_ref_ptr.
6605
6606 2018-05-16 Tom Tromey <tom@tromey.com>
6607
6608 PR cli/19551:
6609 * symfile-add-flags.h (enum symfile_add_flags)
6610 <SYMFILE_NOT_FILENAME>: New constant.
6611 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6612 objfile name from BFD.
6613 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6614 * minidebug.c (find_separate_debug_file_in_section): Put
6615 ".gnu_debugdata" into BFD's file name.
6616
6617 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6618
6619 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6620 Remove.
6621
6622 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6623
6624 PR binutils/21446
6625 * aarch64-tdep.c (aarch64_analyze_prologue,
6626 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6627 Indicate not interested in errors.
6628
6629 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6630
6631 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6632 Supply the MIPS_ZERO_REGNUM register.
6633
6634 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6635
6636 * mips-tdep.c (mask_address_var): Make variable static.
6637
6638 2018-05-14 Tom Tromey <tom@tromey.com>
6639
6640 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6641
6642 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6643
6644 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6645 FXSAVE_ADDR for the mxcsr register.
6646
6647 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6648
6649 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6650
6651 2018-05-11 Pedro Alves <palves@redhat.com>
6652
6653 * corelow.c (core_target) <core_target>: No longer inline.
6654 Initialize m_core_gdbarch, m_core_vec and build the section table
6655 here.
6656 <~core_target>: New.
6657 <core_gdbarch, get_core_register_section>: New methods.
6658 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6659 factored out from ...
6660 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6661 (core_ops): Delete.
6662 (sniff_core_bfd): Add gdbarch parameter.
6663 (core_close): Delete, merged into ...
6664 (core_target::close): ... here. Delete self.
6665 (core_close_cleanup): Delete.
6666 (core_target_open): Allocate a core_target on the heap. Use a
6667 unique_ptr instead of a cleanup. Bits moved into the core_target
6668 ctor. Adjust to use core_target methods instead of globals.
6669 (get_core_register_section): Rename to ...
6670 (core_target::get_core_register_section): ... this and adjust.
6671 (struct get_core_registers_cb_data): New.
6672 (get_core_registers_cb): Use it. Use bool.
6673 (core_target::fetch_registers, core_target::files_info)
6674 (core_target::xfer_partial, core_target::read_description)
6675 (core_target::pid_to, core_target::thread_name): Adjust to
6676 reference class fields instead of globals.
6677 * target.h (struct target_ops_deleter, target_ops_up): New.
6678
6679 2018-05-11 Pedro Alves <palves@redhat.com>
6680
6681 * corefile.c (core_file_command): Move to corelow.c.
6682 * corelow.c (the_core_target): Delete.
6683 (core_file_command): Moved from corefile.c. Check exec_bfd
6684 instead of the_core_target. Use target_detach instead of calling
6685 into the_core_target directly.
6686 (maybe_say_no_core_file_now): New.
6687 (core_target::detach): Use it.
6688 (_initialize_corelow): Remove references to the_core_target.
6689 * gdbcore.h (the_core_target): Delete.
6690
6691 2018-05-11 Tom Tromey <tromey@redhat.com>
6692 Pedro Alves <palves@redhat.com>
6693
6694 * corefile.c (core_bfd): Remove.
6695 * gdbcore.h (core_bfd): Now a macro.
6696 * progspace.h (struct program_space) <cbfd>: New field.
6697
6698 2018-05-11 Tom Tromey <tom@tromey.com>
6699
6700 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6701 gdb::def_vector.
6702
6703 2018-05-10 Tom Tromey <tom@tromey.com>
6704
6705 * configure: Rebuild.
6706 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6707
6708 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6709
6710 PR server/23158:
6711 * regformats/regdat.sh: Adjust script, following the addition
6712 of the new expedite_regs parameter to init_target_desc.
6713
6714 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6715
6716 PR gdb/23127
6717 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6718 set_gdbarch_significant_addr_bit.
6719 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6720 set_gdbarch_significant_addr_bit.
6721 * utils.c (address_significant): Update to sign extend addr.
6722
6723 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6724
6725 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6726 (xtensa_linux_init_abi): Limit tdep->num_regs by
6727 tdep->num_nopriv_regs.
6728 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6729 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6730 not initialized.
6731
6732 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6733
6734 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6735
6736 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6737
6738 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6739 (I387_MXCSR_INIT_VAL): New constant.
6740 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6741 buffer if it was supplied by the inferior.
6742 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6743 (i387_xsave_get_clear_bv): New function.
6744 (i387_supply_xsave): Only read x87 control registers from the
6745 xsave buffer if the feature is enabled, and the state will have
6746 been written, otherwise, provide a suitable default.
6747 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6748 including x87 control registers. Update control registers if they
6749 have changed from the default value, and mark features as enabled
6750 as required.
6751 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6752
6753 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6754
6755 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6756
6757 2018-05-07 Tom Tromey <tom@tromey.com>
6758
6759 * configure: Rebuild.
6760 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6761
6762 2018-05-07 Tom Tromey <tom@tromey.com>
6763
6764 PR tdep/20362:
6765 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6766 bit. Use correct value for VDIV.
6767
6768 2018-05-04 Tom Tromey <tom@tromey.com>
6769
6770 * configure: Rebuild.
6771 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6772
6773 2018-05-04 Tom Tromey <tom@tromey.com>
6774
6775 * linux-record.c (record_linux_system_call) <case
6776 RECORD_SYS_RECVFROM>: Add "break".
6777
6778 2018-05-04 Tom Tromey <tom@tromey.com>
6779
6780 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6781 Add missing "break".
6782 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6783 Add missing "break".
6784
6785 2018-05-04 Tom Tromey <tom@tromey.com>
6786
6787 * rs6000-tdep.c (ppc_process_record_op4)
6788 (ppc_process_record_op63): Add fall-through comment.
6789
6790 2018-05-04 Tom Tromey <tom@tromey.com>
6791
6792 * i386-tdep.c (i386_process_record): Add fall-through comment.
6793
6794 2018-05-04 Tom Tromey <tom@tromey.com>
6795
6796 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6797 comment.
6798
6799 2018-05-04 Tom Tromey <tom@tromey.com>
6800
6801 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6802 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6803 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6804 comment.
6805 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6806 comment.
6807 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6808 comment.
6809
6810 2018-05-04 Tom Tromey <tom@tromey.com>
6811
6812 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6813
6814 2018-05-04 Tom Tromey <tom@tromey.com>
6815
6816 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6817 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6818 * symfile.c (section_is_mapped): Fix fall-through comment.
6819 * stabsread.c (define_symbol, read_member_functions): Fix
6820 fall-through comment.
6821 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6822 comment.
6823 * remote.c (remote_wait_as): Fix fall-through comment.
6824 * p-exp.y (yylex): Fix fall-through comment.
6825 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6826 comment.
6827 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6828 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6829 * jv-exp.y (yylex): Fix fall-through comment.
6830 * go-exp.y (lex_one_token): Fix fall-through comment.
6831 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6832 fall-through comment.
6833 * f-exp.y (yylex): Fix fall-through comment.
6834 * dwarf2read.c (process_die): Fix fall-through comments.
6835 * dbxread.c (process_one_symbol): Fix fall-through comment.
6836 * d-exp.y (lex_one_token): Fix fall-through comment.
6837 * cp-name-parser.y (yylex): Fix fall-through comment.
6838 * coffread.c (coff_symtab_read): Fix fall-through comment.
6839 * c-exp.y (lex_one_token): Fix fall-through comment.
6840 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6841 comment.
6842 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6843 comment.
6844
6845 2018-05-04 Tom Tromey <tom@tromey.com>
6846
6847 PR python/22730:
6848 * NEWS: Mention gdb.execute change.
6849 * gdbcmd.h (execute_control_command): Don't declare.
6850 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6851 execute_control_commands, execute_control_commands_to_string.
6852 * cli/cli-script.h (execute_control_commands)
6853 (execute_control_commands_to_string): Declare.
6854 (execute_control_command): Add from_tty parameter.
6855 * cli/cli-script.c (execute_control_commands)
6856 (execute_control_commands_to_string): New functions.
6857 (execute_user_command): Use execute_control_commands.
6858 (execute_control_command_1): Add "from_tty" parameter. Update.
6859 (execute_control_command): Likewise.
6860
6861 2018-05-04 Tom Tromey <tom@tromey.com>
6862
6863 PR python/22731:
6864 * NEWS: Mention that breakpoint commands are writable.
6865 * python/py-breakpoint.c (bppy_set_commands): New function.
6866 (breakpoint_object_getset) <"commands">: Use it.
6867
6868 2018-05-04 Tom Tromey <tom@tromey.com>
6869
6870 * tracepoint.c (actions_command): Update.
6871 * mi/mi-cmd-break.c (mi_command_line_array)
6872 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6873 (mi_read_next_line): Remove.
6874 (mi_cmd_break_commands): Update.
6875 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6876 function_view.
6877 * cli/cli-script.c (get_command_line): Update.
6878 (process_next_line): Use function_view. Constify.
6879 (recurse_read_control_structure, read_command_lines)
6880 (read_command_lines_1): Change argument types to function_view.
6881 (do_define_command, document_command): Update.
6882 * breakpoint.h (check_tracepoint_command): Don't declare.
6883 * breakpoint.c (check_tracepoint_command): Remove.
6884 (commands_command_1, create_tracepoint_from_upload): Update.
6885
6886 2018-05-04 Tom Tromey <tom@tromey.com>
6887
6888 PR gdb/11750:
6889 * cli/cli-script.h (enum command_control_type) <define_control>:
6890 New constant.
6891 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6892 (build_command_line, execute_control_command_1)
6893 (process_next_line): Likewise.
6894 (do_define_command): New function, extracted from define_command.
6895 (define_command): Use it.
6896
6897 2018-05-04 Tom Tromey <tom@tromey.com>
6898
6899 * tracepoint.c (actions_command): Update.
6900 * cli/cli-script.h (read_command_lines): Update.
6901 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6902 (MAX_TMPBUF): Remove define.
6903 (define_command): Use string_printf.
6904 (document_command): Likewise.
6905 * breakpoint.c (commands_command_1): Update.
6906
6907 2018-05-04 Tom Tromey <tom@tromey.com>
6908
6909 * top.c (execute_command): Update.
6910 * cli/cli-script.h (print_command_lines): Now varargs.
6911 * cli/cli-script.c (print_command_lines): Now varargs.
6912 (execute_control_command_1) <case while_control, case if_control>:
6913 Update.
6914
6915 2018-05-04 Tom Tromey <tom@tromey.com>
6916
6917 * tracepoint.c (all_tracepoint_actions): Rename from
6918 all_tracepoint_actions_and_cleanup. Change return type.
6919 (actions_command, encode_actions_1, encode_actions)
6920 (trace_dump_actions, tdump_command): Update.
6921 * remote.c (remote_download_command_source): Update.
6922 * python/python.c (gdbpy_eval_from_control_command)
6923 (python_command, python_interactive_command): Update.
6924 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6925 * guile/guile.c (guile_command)
6926 (gdbscm_eval_from_control_command, guile_command): Update.
6927 * compile/compile.c (compile_code_command)
6928 (compile_print_command, compile_to_object): Update.
6929 * cli/cli-script.h (struct command_lines_deleter): New.
6930 (counted_command_line): New typedef.
6931 (struct command_line): Add constructor, destructor.
6932 <body_list>: Remove.
6933 <body_list_0, body_list_1>: New members.
6934 (command_line_up): Remove typedef.
6935 (read_command_lines, read_command_lines_1, get_command_line):
6936 Update.
6937 (copy_command_lines): Don't declare.
6938 * cli/cli-script.c (build_command_line): Use "new".
6939 (get_command_line): Return counted_command_line.
6940 (print_command_lines, execute_user_command)
6941 (execute_control_command_1, while_command, if_command): Update.
6942 (realloc_body_list): Remove.
6943 (process_next_line, recurse_read_control_structure): Update.
6944 (read_command_lines, read_command_lines_1): Return counted_command_line.
6945 (free_command_lines): Use "delete".
6946 (copy_command_lines): Remove.
6947 (define_command, document_command, show_user_1): Update.
6948 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6949 a counted_command_line.
6950 * breakpoint.h (counted_command_line): Remove typedef.
6951 (breakpoint_set_commands): Update.
6952 * breakpoint.c (check_no_tracepoint_commands)
6953 (validate_commands_for_breakpoint): Update.
6954 (breakpoint_set_commands): Change commands to be a
6955 counted_command_line.
6956 (commands_command_1, update_dprintf_command_list)
6957 (create_tracepoint_from_upload): Update.
6958
6959 2018-05-04 Tom Tromey <tom@tromey.com>
6960
6961 * cli/cli-decode.h (cmd_list_element): New constructor.
6962 (~cmd_list_element): New destructor.
6963 (struct cmd_list_element): Add initializers.
6964 * cli/cli-decode.c (do_add_cmd): Use "new".
6965 (delete_cmd): Use "delete".
6966
6967 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6968 Pedro Alves <palves@redhat.com>
6969
6970 PR breakpoints/19806 and support for PR external/20207.
6971 * NEWS: Mention Aarch64 watchpoint improvements.
6972 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6973 watchpoints and PR external/20207 watchpoints.
6974 * nat/aarch64-linux-hw-point.c
6975 (kernel_supports_any_contiguous_range): New.
6976 (aarch64_watchpoint_offset): New.
6977 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6978 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6979 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6980 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6981 next_addr_orig_p. Support PR external/20207 watchpoints.
6982 (aarch64_downgrade_regs): New.
6983 (aarch64_dr_state_insert_one_point): New parameters offset and
6984 addr_orig.
6985 (aarch64_dr_state_remove_one_point): Likewise.
6986 (aarch64_handle_breakpoint): Update caller.
6987 (aarch64_handle_aligned_watchpoint): Likewise.
6988 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6989 aligned_offset.
6990 (aarch64_linux_set_debug_regs): Remove const from state. Call
6991 aarch64_downgrade_regs.
6992 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6993 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6994 (DR_CONTROL_MASK): ... this.
6995 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6996 (unsigned int aarch64_watchpoint_offset): New prototype.
6997 (aarch64_linux_set_debug_regs): Remove const from state.
6998 * utils.c (align_up, align_down): Move to ...
6999 * common/common-utils.c (align_up, align_down): ... here.
7000 * utils.h (align_up, align_down): Move to ...
7001 * common/common-utils.h (align_up, align_down): ... here.
7002
7003 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7004
7005 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7006 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7007 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7008 Re-implement to match the ABI as summarized in GCC's
7009 gcc/config/sparc/sparc.c. All callers updated.
7010 (sparc32_store_arguments): Remove assertion.
7011
7012 2018-05-04 Tom Tromey <tom@tromey.com>
7013
7014 * printcmd.c: Don't include tui.h.
7015 (decode_format): Use skip_spaces.
7016
7017 2018-05-04 Tom Tromey <tom@tromey.com>
7018
7019 PR gdb/22619:
7020 * printcmd.c (last_count): New global.
7021 (x_command): Use saved count when repeating.
7022
7023 2018-05-04 Tom Tromey <tom@tromey.com>
7024
7025 * nto-procfs.c (do_closedir_cleanup): Remove.
7026 (procfs_pidlist): Use gdb_dir_up.
7027 * procfs.c (do_closedir_cleanup): Remove.
7028 (proc_update_threads): Use gdb_dir_up.
7029 * common/filestuff.h (struct gdb_dir_deleter): New.
7030 (gdb_dir_up): New typedef.
7031
7032 2018-05-04 Tom Tromey <tom@tromey.com>
7033
7034 * ada-lang.c (print_mention_exception): Use std::string.
7035
7036 2018-05-04 Tom Tromey <tom@tromey.com>
7037
7038 * ada-lang.c (create_excep_cond_exprs): Update.
7039 (ada_exception_catchpoint_cond_string): Use std::string.
7040
7041 2018-05-04 Tom Tromey <tom@tromey.com>
7042
7043 * ada-lang.c (xget_renaming_scope): Return std::string.
7044 (old_renaming_is_invisible): Update.
7045
7046 2018-05-04 Tom Tromey <tom@tromey.com>
7047
7048 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7049 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7050
7051 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7052
7053 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7054
7055 2018-05-04 Tom Tromey <tom@tromey.com>
7056
7057 * remote.c (remote_query_supported_append): Change type.
7058 (remote_check_symbols): Update.
7059
7060 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7061
7062 PR gdb/11420
7063 * configure.ac: Prepend libpython.
7064 * python/python-config.py: Likewise.
7065 * configure: Regenerate.
7066
7067 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7068
7069 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7070
7071 2018-05-03 Pedro Alves <palves@redhat.com>
7072
7073 * s390-linux-nat.c
7074 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7075 override. Write 'true' instead of '1'.
7076 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7077 declaration.
7078
7079 2018-05-02 Pedro Alves <palves@redhat.com>
7080
7081 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7082 add_inf_child_target.
7083 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7084 add_inf_child_target.
7085 * aix-thread.c (aix_thread_target_info): New.
7086 (aix_thread_target) <shortname, longname, doc>: Delete.
7087 <info>: New.
7088 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7089 add_inf_child_target.
7090 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7091 add_inf_child_target.
7092 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7093 add_inf_child_target.
7094 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7095 add_inf_child_target.
7096 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7097 add_inf_child_target.
7098 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7099 add_inf_child_target.
7100 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7101 add_inf_child_target.
7102 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7103 add_inf_child_target.
7104 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7105 add_inf_child_target.
7106 * bfd-target.c (target_bfd_target_info): New.
7107 (target_bfd) <shortname, longname, doc>: Delete.
7108 <info>: New.
7109 * bsd-kvm.c (bsd_kvm_target_info): New.
7110 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7111 <info>: New.
7112 (bsd_kvm_target::open): Rename to ...
7113 (bsd_kvm_target_open): ... this. Adjust.
7114 * bsd-uthread.c (bsd_uthread_target_info): New.
7115 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7116 <info>: New.
7117 * corefile.c (core_file_command): Adjust.
7118 * corelow.c (core_target_info): New.
7119 (core_target) <shortname, longname, doc>: Delete.
7120 <info>: New.
7121 (core_target::open): Rename to ...
7122 (core_target_open): ... this. Adjust.
7123 * ctf.c (ctf_target_info): New.
7124 (ctf_target) <shortname, longname, doc>: Delete.
7125 <info>: New.
7126 (ctf_target::open): Rename to ...
7127 (ctf_target_open): ... this.
7128 (_initialize_ctf): Adjust.
7129 * exec.c (exec_target_info): New.
7130 (exec_target) <shortname, longname, doc>: Delete.
7131 <info>: New.
7132 (exec_target::open): Rename to ...
7133 (exec_target_open): ... this.
7134 * gdbcore.h (core_target_open): Declare.
7135 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7136 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7137 add_inf_child_target.
7138 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7139 add_inf_child_target.
7140 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7141 add_inf_child_target.
7142 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7143 add_inf_child_target.
7144 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7145 add_inf_child_target.
7146 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7147 add_inf_child_target.
7148 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7149 add_inf_child_target.
7150 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7151 add_inf_child_target.
7152 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7153 add_inf_child_target.
7154 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7155 add_inf_child_target.
7156 * inf-child.c (inf_child_target_info): New.
7157 (inf_child_target::info): New.
7158 (inf_child_open_target): Remove 'target' parameter. Use
7159 get_native_target instead.
7160 (inf_child_target::open): Delete.
7161 (add_inf_child_target): New.
7162 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7163 Delete.
7164 <info>: New.
7165 (add_inf_child_target): Declare.
7166 (inf_child_open_target): Declare.
7167 * linux-thread-db.c (thread_db_target_info): New.
7168 (thread_db_target) <shortname, longname, doc>: Delete.
7169 <info>: New.
7170 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7171 add_inf_child_target.
7172 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7173 add_inf_child_target.
7174 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7175 add_inf_child_target.
7176 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7177 add_inf_child_target.
7178 * make-target-delegates (print_class): Adjust.
7179 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7180 add_inf_child_target.
7181 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7182 add_inf_child_target.
7183 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7184 add_inf_child_target.
7185 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7186 add_inf_child_target.
7187 * nto-procfs.c (nto_native_target_info): New.
7188 (nto_procfs_target_native) <shortname, longname, doc>:
7189 Delete.
7190 <info>: New.
7191 (nto_procfs_target_info): New.
7192 (nto_procfs_target_procfs) <shortname, longname, doc>:
7193 Delete.
7194 <info>: New.
7195 (init_procfs_targets): Adjust.
7196 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7197 add_inf_child_target.
7198 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7199 add_inf_child_target.
7200 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7201 add_inf_child_target.
7202 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7203 add_inf_child_target.
7204 * ravenscar-thread.c (ravenscar_target_info): New.
7205 (ravenscar_thread_target) <shortname, longname, doc>:
7206 Delete.
7207 <info>: New.
7208 * record-btrace.c (record_btrace_target_info):
7209 (record_btrace_target) <shortname, longname, doc>: Delete.
7210 <info>: New.
7211 (record_btrace_target::open): Rename to ...
7212 (record_btrace_target_open): ... this. Adjust.
7213 * record-full.c (record_longname, record_doc): New.
7214 (record_full_base_target) <shortname, longname, doc>: Delete.
7215 <info>: New.
7216 (record_full_target_info): New.
7217 (record_full_target): <shortname>: Delete.
7218 <info>: New.
7219 (record_full_core_open_1, record_full_open_1): Update comments.
7220 (record_full_base_target::open): Rename to ...
7221 (record_full_open): ... this.
7222 (cmd_record_full_restore): Update.
7223 (_initialize_record_full): Update.
7224 * remote-sim.c (remote_sim_target_info): New.
7225 (gdbsim_target) <shortname, longname, doc>: Delete.
7226 <info>: New.
7227 (gdbsim_target::open): Rename to ...
7228 (gdbsim_target_open): ... this.
7229 (_initialize_remote_sim): Adjust.
7230 * remote.c (remote_doc): New.
7231 (remote_target_info): New.
7232 (remote_target) <shortname, longname, doc>: Delete.
7233 <info>: New.
7234 (extended_remote_target_info): New.
7235 (extended_remote_target) <shortname, longname, doc>: Delete.
7236 <info>: New.
7237 (remote_target::open_1): Make static. Adjust.
7238 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7239 * s390-linux-nat.c (_initialize_s390_nat): Use
7240 add_inf_child_target.
7241 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7242 add_inf_child_target.
7243 * sol-thread.c (thread_db_target_info): New.
7244 (sol_thread_target) <shortname, longname, doc>: Delete.
7245 <info>: New.
7246 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7247 add_inf_child_target.
7248 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7249 add_inf_child_target.
7250 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7251 add_inf_child_target.
7252 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7253 add_inf_child_target.
7254 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7255 add_inf_child_target.
7256 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7257 add_inf_child_target.
7258 * spu-linux-nat.c (_initialize_spu_nat): Use
7259 add_inf_child_target.
7260 * spu-multiarch.c (spu_multiarch_target_info): New.
7261 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7262 <info>: New.
7263 * target-delegates.c: Regenerate.
7264 * target.c: Include <unordered_map>.
7265 (target_ops_p): Delete.
7266 (DEF_VEC_P(target_ops_p)): Delete.
7267 (target_factories): New.
7268 (test_target_info): New.
7269 (test_target_ops::info): New.
7270 (open_target): Adjust to use target_factories.
7271 (add_target_with_completer): Rename to ...
7272 (add_target): ... this. Change prototype. Register target_info
7273 and open callback in target_factories. Register target_info in
7274 command context instead of target_ops.
7275 (add_target): Delete old implementation.
7276 (add_deprecated_target_alias): Change prototype. Adjust.
7277 (the_native_target): New.
7278 (set_native_target, get_native_target): New.
7279 (find_default_run_target): Use the_native_target.
7280 (find_attach_target, find_run_target): Simplify.
7281 (target_ops::open): Delete.
7282 (dummy_target_info): New.
7283 (dummy_target::shortname, dummy_target::longname)
7284 (dummy_target::doc): Delete.
7285 (dummy_target::info): New.
7286 (debug_target::shortname, debug_target::longname)
7287 (debug_target::doc): Delete.
7288 (debug_target::info): New.
7289 * target.h (struct target_info): New.
7290 (target_ops::~target_ops): Add comment.
7291 (target_ops::info): New.
7292 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7293 longer virtual. Implement in terms of target_info.
7294 (set_native_target, get_native_target): Declare.
7295 (target_open_ftype): New.
7296 (add_target, add_target_with_completer)
7297 (add_deprecated_target_alias): Change prototype.
7298 (test_target) <shortname, longname, doc>: Delete.
7299 <info>: New.
7300 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7301 add_inf_child_target.
7302 * tracefile-tfile.c (tfile_target_info): New.
7303 (tfile_target) <shortname, longname, doc>: Delete.
7304 <info>: New.
7305 (tfile_target::open): Rename to ...
7306 (tfile_target_open): ... this.
7307 (_initialize_tracefile_tfile): Adjust.
7308 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7309 add_inf_child_target.
7310 * windows-nat.c (_initialize_windows_nat): Use
7311 add_inf_child_target.
7312 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7313 add_inf_child_target.
7314
7315 2018-05-02 Pedro Alves <palves@redhat.com>
7316
7317 * linux-nat.h (linux_nat_target) <low_new_thread,
7318 low_delete_thread, low_new_fork, low_forget_process,
7319 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7320 New virtual methods.
7321 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7322 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7323 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7324 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7325 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7326 Delete.
7327 * linux-fork.c (delete_fork): Adjust to call low method.
7328 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7329 (linux_nat_new_fork, linux_nat_forget_process_hook)
7330 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7331 (linux_nat_status_is_event):
7332 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7333 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7334 to call low method.
7335 (sigtrap_is_event): Rename to ...
7336 (linux_nat_target::low_status_is_event): ... this.
7337 (linux_nat_set_status_is_event): Delete.
7338 (save_stop_reason, linux_nat_wait_1)
7339 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7340 low methods.
7341 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7342 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7343 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7344 (linux_nat_set_prepare_to_resume): Delete.
7345 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7346 low virtual methods.
7347 * amd64-linux-nat.c: Likewise.
7348 * arm-linux-nat.c: Likewise.
7349 * i386-linux-nat.c: Likewise.
7350 * ia64-linux-nat.c: Likewise.
7351 * mips-linux-nat.c: Likewise.
7352 * ppc-linux-nat.c: Likewise.
7353 * s390-linux-nat.c: Likewise.
7354 * sparc64-linux-nat.c: Likewise.
7355 * x86-linux-nat.c: Likewise.
7356 * x86-linux-nat.h: Include "nat/x86-linux.h".
7357 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7358 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7359 Override methods.
7360
7361 2018-05-02 Pedro Alves <palves@redhat.com>
7362
7363 * target.h (target_ops)
7364 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7365 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7366 stopped_by_watchpoint, have_continuable_watchpoint,
7367 stopped_data_address, watchpoint_addr_within_range,
7368 can_accel_watchpoint_condition, can_run, thread_alive,
7369 has_all_memory, has_memory, has_stack, has_registers,
7370 has_execution, can_async_p, is_async_p, supports_non_stop,
7371 always_non_stop_p, can_execute_reverse, supports_multi_process,
7372 supports_enable_disable_tracepoint,
7373 supports_disable_randomization, supports_string_tracing,
7374 supports_evaluation_of_breakpoint_conditions,
7375 can_run_breakpoint_commands, filesystem_is_local,
7376 can_download_tracepoint, get_trace_state_variable_value,
7377 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7378 record_is_replaying, record_will_replay,
7379 augmented_libraries_svr4_read>: Adjust to return bool.
7380 * aarch64-linux-nat.c: All implementations adjusted.
7381 * aix-thread.c: All implementations adjusted.
7382 * arm-linux-nat.c: All implementations adjusted.
7383 * breakpoint.c: All implementations adjusted.
7384 * bsd-kvm.c: All implementations adjusted.
7385 * bsd-uthread.c: All implementations adjusted.
7386 * corelow.c: All implementations adjusted.
7387 * ctf.c: All implementations adjusted.
7388 * darwin-nat.c: All implementations adjusted.
7389 * darwin-nat.h: All implementations adjusted.
7390 * exec.c: All implementations adjusted.
7391 * fbsd-nat.c: All implementations adjusted.
7392 * fbsd-nat.h: All implementations adjusted.
7393 * gnu-nat.c: All implementations adjusted.
7394 * gnu-nat.h: All implementations adjusted.
7395 * go32-nat.c: All implementations adjusted.
7396 * ia64-linux-nat.c: All implementations adjusted.
7397 * inf-child.c: All implementations adjusted.
7398 * inf-child.h: All implementations adjusted.
7399 * inf-ptrace.c: All implementations adjusted.
7400 * inf-ptrace.h: All implementations adjusted.
7401 * linux-nat.c: All implementations adjusted.
7402 * linux-nat.h: All implementations adjusted.
7403 * mips-linux-nat.c: All implementations adjusted.
7404 * nto-procfs.c: All implementations adjusted.
7405 * ppc-linux-nat.c: All implementations adjusted.
7406 * procfs.c: All implementations adjusted.
7407 * ravenscar-thread.c: All implementations adjusted.
7408 * record-btrace.c: All implementations adjusted.
7409 * record-full.c: All implementations adjusted.
7410 * remote-sim.c: All implementations adjusted.
7411 * remote.c: All implementations adjusted.
7412 * s390-linux-nat.c: All implementations adjusted.
7413 * sol-thread.c: All implementations adjusted.
7414 * spu-multiarch.c: All implementations adjusted.
7415 * target-delegates.c: All implementations adjusted.
7416 * target.c: All implementations adjusted.
7417 * target.h: All implementations adjusted.
7418 * tracefile-tfile.c: All implementations adjusted.
7419 * tracefile.c: All implementations adjusted.
7420 * tracefile.h: All implementations adjusted.
7421 * windows-nat.c: All implementations adjusted.
7422 * x86-linux-nat.h: All implementations adjusted.
7423 * x86-nat.h: All implementations adjusted.
7424
7425 2018-05-02 Pedro Alves <palves@redhat.com>
7426
7427 * make-target-delegates (scan_target_h): Don't trim lines here.
7428 Replace sequences of tabs and/or whitespace with a single
7429 whitespace.
7430 (top level, parsing methods): Trim each line before processing it
7431 here.
7432
7433 2018-05-02 Pedro Alves <palves@redhat.com>
7434 John Baldwin <jhb@freebsd.org>
7435
7436 * target.h (enum strata) <debug_stratum>: New.
7437 (struct target_ops) <all delegation methods>: Replace by C++
7438 virtual methods, and drop "to_" prefix. All references updated
7439 throughout.
7440 <to_shortname, to_longname, to_doc, to_data,
7441 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7442 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7443 virtual methods. All references updated throughout.
7444 <can_attach, supports_terminal_ours, can_create_inferior,
7445 get_thread_control_capabilities, attach_no_wait>: New
7446 virtual methods.
7447 <insert_breakpoint, remove_breakpoint>: Now
7448 TARGET_DEFAULT_NORETURN methods.
7449 <info_proc>: Now returns bool.
7450 <to_magic>: Delete.
7451 (OPS_MAGIC): Delete.
7452 (current_target): Delete. All references replaced by references
7453 to ...
7454 (target_stack): ... this. New.
7455 (target_shortname, target_longname): Adjust.
7456 (target_can_run): Now a function declaration.
7457 (default_child_has_all_memory, default_child_has_memory)
7458 (default_child_has_stack, default_child_has_registers)
7459 (default_child_has_execution): Remove target_ops parameter.
7460 (complete_target_initialization): Delete.
7461 (memory_breakpoint_target): New template class.
7462 (test_target_ops): Refactor as a C++ class with virtual methods.
7463 * make-target-delegates (NAME_PART): Tighten.
7464 (POINTER_PART, CP_SYMBOL): New.
7465 (SIMPLE_RETURN_PART): Reimplement.
7466 (VEC_RETURN_PART): Expect less.
7467 (RETURN_PART, VIRTUAL_PART): New.
7468 (METHOD): Adjust to C++ virtual methods.
7469 (scan_target_h): Remove reference to C99.
7470 (dname): Output "target_ops::" prefix.
7471 (write_function_header): Adjust to output a C++ class method.
7472 (write_declaration): New.
7473 (write_delegator): Adjust to output a C++ class method.
7474 (tdname): Output "dummy_target::" prefix.
7475 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7476 method.
7477 (tdefault_names, debug_names): Delete.
7478 (return_types, tdefaults, styles, argtypes_array): New.
7479 (top level): All methods are delegators.
7480 (print_class): New.
7481 (top level): Print dummy_target and debug_target classes.
7482 * target-delegates.c: Regenerate.
7483 * target-debug.h (target_debug_print_enum_info_proc_what)
7484 (target_debug_print_thread_control_capabilities)
7485 (target_debug_print_thread_info_p): New.
7486 * target.c (dummy_target): Delete.
7487 (the_dummy_target, the_debug_target): New.
7488 (target_stack): Now extern.
7489 (set_targetdebug): Push/unpush debug target.
7490 (default_child_has_all_memory, default_child_has_memory)
7491 (default_child_has_stack, default_child_has_registers)
7492 (default_child_has_execution): Remove target_ops parameter.
7493 (complete_target_initialization): Delete.
7494 (add_target_with_completer): No longer call
7495 complete_target_initialization.
7496 (target_supports_terminal_ours): Use regular delegation.
7497 (update_current_target): Delete.
7498 (push_target): No longer check magic number. Don't call
7499 update_current_target.
7500 (unpush_target): Don't call update_current_target.
7501 (target_is_pushed): No longer check magic number.
7502 (target_require_runnable): Skip for all stratums over
7503 process_stratum.
7504 (target_ops::info_proc): New.
7505 (target_info_proc): Use find_target_at and
7506 find_default_run_target.
7507 (target_supports_disable_randomization): Use regular delegation.
7508 (target_get_osdata): Use find_target_at.
7509 (target_ops::open, target_ops::close, target_ops::can_attach)
7510 (target_ops::attach, target_ops::can_create_inferior)
7511 (target_ops::create_inferior, target_ops::can_run)
7512 (target_can_run): New.
7513 (default_fileio_target): Use regular delegation.
7514 (target_ops::fileio_open, target_ops::fileio_pwrite)
7515 (target_ops::fileio_pread, target_ops::fileio_fstat)
7516 (target_ops::fileio_close, target_ops::fileio_unlink)
7517 (target_ops::fileio_readlink): New.
7518 (target_fileio_open_1, target_fileio_unlink)
7519 (target_fileio_readlink): Always call the target method. Handle
7520 FILEIO_ENOSYS.
7521 (return_zero, return_zero_has_execution): Delete.
7522 (init_dummy_target): Delete.
7523 (dummy_target::dummy_target, dummy_target::shortname)
7524 (dummy_target::longname, dummy_target::doc)
7525 (debug_target::debug_target, debug_target::shortname)
7526 (debug_target::longname, debug_target::doc): New.
7527 (target_supports_delete_record): Use regular delegation.
7528 (setup_target_debug): Delete.
7529 (maintenance_print_target_stack): Skip debug_stratum.
7530 (initialize_targets): Instantiate the_dummy_target and
7531 the_debug_target.
7532 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7533 use target_stack.
7534 (target_auxv_search, fprint_target_auxv): Adjust.
7535 (info_auxv_command): Adjust to use target_stack.
7536 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7537 * exceptions.c (print_flush): Handle a NULL target_stack.
7538 * regcache.c (target_ops_no_register): Refactor as class with
7539 virtual methods.
7540
7541 * exec.c (exec_target): New class.
7542 (exec_ops): Now an exec_target.
7543 (exec_open, exec_close_1, exec_get_section_table)
7544 (exec_xfer_partial, exec_files_info, exec_has_memory)
7545 (exec_make_note_section): Refactor as exec_target methods.
7546 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7547 Delete.
7548 (exec_target::find_memory_regions): New.
7549 (_initialize_exec): Don't call init_exec_ops.
7550 * gdbcore.h (exec_file_clear): Delete.
7551
7552 * corefile.c (core_target): Delete.
7553 (core_file_command): Adjust.
7554 * corelow.c (core_target): New class.
7555 (the_core_target): New.
7556 (core_close): Remove target_ops parameter.
7557 (core_close_cleanup): Adjust.
7558 (core_target::close): New.
7559 (core_open, core_detach, get_core_registers, core_files_info)
7560 (core_xfer_partial, core_thread_alive, core_read_description)
7561 (core_pid_to_str, core_thread_name, core_has_memory)
7562 (core_has_stack, core_has_registers, core_info_proc): Rework as
7563 core_target methods.
7564 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7565 (_initialize_corelow): Initialize the_core_target.
7566 * gdbcore.h (core_target): Delete.
7567 (the_core_target): New.
7568
7569 * ctf.c: (ctf_target): New class.
7570 (ctf_ops): Now a ctf_target.
7571 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7572 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7573 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7574 methods.
7575 (init_ctf_ops): Delete.
7576 (_initialize_ctf): Don't call it.
7577 * tracefile-tfile.c (tfile_target): New class.
7578 (tfile_ops): Now a tfile_target.
7579 (tfile_open, tfile_close, tfile_files_info)
7580 (tfile_get_tracepoint_status, tfile_trace_find)
7581 (tfile_fetch_registers, tfile_xfer_partial)
7582 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7583 Refactor as tfile_target methods.
7584 (tfile_xfer_partial_features): Remove target_ops parameter.
7585 (init_tfile_ops): Delete.
7586 (_initialize_tracefile_tfile): Don't call it.
7587 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7588 (tracefile_has_stack, tracefile_has_registers)
7589 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7590 tracefile_target methods.
7591 (init_tracefile_ops): Delete.
7592 (tracefile_target::tracefile_target): New.
7593 * tracefile.h: Include "target.h".
7594 (tracefile_target): New class.
7595 (init_tracefile_ops): Delete.
7596
7597 * spu-multiarch.c (spu_multiarch_target): New class.
7598 (spu_ops): Now a spu_multiarch_target.
7599 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7600 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7601 (spu_search_memory, spu_mourn_inferior): Refactor as
7602 spu_multiarch_target methods.
7603 (init_spu_ops): Delete.
7604 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7605 complete_target_initialization.
7606
7607 * ravenscar-thread.c (ravenscar_thread_target): New class.
7608 (ravenscar_ops): Now a ravenscar_thread_target.
7609 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7610 (ravenscar_thread_alive, ravenscar_pid_to_str)
7611 (ravenscar_fetch_registers, ravenscar_store_registers)
7612 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7613 (ravenscar_stopped_by_hw_breakpoint)
7614 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7615 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7616 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7617 methods.
7618 (init_ravenscar_thread_ops): Delete.
7619 (_initialize_ravenscar): Remove references to
7620 init_ravenscar_thread_ops and complete_target_initialization.
7621
7622 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7623 (bsd_uthread_target): New class.
7624 (bsd_uthread_ops): Now a bsd_uthread_target.
7625 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7626 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7627 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7628 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7629 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7630 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7631 (bsd_uthread_target): Delete function.
7632 (_initialize_bsd_uthread): Remove reference to
7633 complete_target_initialization.
7634
7635 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7636 (target_bfd): ... this new class.
7637 (target_bfd_xfer_partial, target_bfd_get_section_table)
7638 (target_bfd_close): Refactor as target_bfd methods.
7639 (target_bfd::~target_bfd): New.
7640 (target_bfd_reopen): Adjust.
7641 (target_bfd::close): New.
7642
7643 * record-btrace.c (record_btrace_target): New class.
7644 (record_btrace_ops): Now a record_btrace_target.
7645 (record_btrace_open, record_btrace_stop_recording)
7646 (record_btrace_disconnect, record_btrace_close)
7647 (record_btrace_async, record_btrace_info)
7648 (record_btrace_insn_history, record_btrace_insn_history_range)
7649 (record_btrace_insn_history_from, record_btrace_call_history)
7650 (record_btrace_call_history_range)
7651 (record_btrace_call_history_from, record_btrace_record_method)
7652 (record_btrace_is_replaying, record_btrace_will_replay)
7653 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7654 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7655 (record_btrace_store_registers, record_btrace_prepare_to_store)
7656 (record_btrace_to_get_unwinder)
7657 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7658 (record_btrace_commit_resume, record_btrace_wait)
7659 (record_btrace_stop, record_btrace_can_execute_reverse)
7660 (record_btrace_stopped_by_sw_breakpoint)
7661 (record_btrace_supports_stopped_by_sw_breakpoint)
7662 (record_btrace_stopped_by_hw_breakpoint)
7663 (record_btrace_supports_stopped_by_hw_breakpoint)
7664 (record_btrace_update_thread_list, record_btrace_thread_alive)
7665 (record_btrace_goto_begin, record_btrace_goto_end)
7666 (record_btrace_goto, record_btrace_stop_replaying_all)
7667 (record_btrace_execution_direction)
7668 (record_btrace_prepare_to_generate_core)
7669 (record_btrace_done_generating_core): Refactor as
7670 record_btrace_target methods.
7671 (init_record_btrace_ops): Delete.
7672 (_initialize_record_btrace): Remove reference to
7673 init_record_btrace_ops.
7674 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7675 the execution_direction global.
7676 (record_full_base_target, record_full_target)
7677 (record_full_core_target): New classes.
7678 (record_full_ops): Now a record_full_target.
7679 (record_full_core_ops): Now a record_full_core_target.
7680 (record_full_target::detach, record_full_target::disconnect)
7681 (record_full_core_target::disconnect)
7682 (record_full_target::mourn_inferior, record_full_target::kill):
7683 New.
7684 (record_full_open, record_full_close, record_full_async): Refactor
7685 as methods of the record_full_base_target class.
7686 (record_full_resume, record_full_commit_resume): Refactor
7687 as methods of the record_full_target class.
7688 (record_full_wait, record_full_stopped_by_watchpoint)
7689 (record_full_stopped_data_address)
7690 (record_full_stopped_by_sw_breakpoint)
7691 (record_full_supports_stopped_by_sw_breakpoint)
7692 (record_full_stopped_by_hw_breakpoint)
7693 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7694 methods of the record_full_base_target class.
7695 (record_full_store_registers, record_full_xfer_partial)
7696 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7697 Refactor as methods of the record_full_target class.
7698 (record_full_can_execute_reverse, record_full_get_bookmark)
7699 (record_full_goto_bookmark, record_full_execution_direction)
7700 (record_full_record_method, record_full_info, record_full_delete)
7701 (record_full_is_replaying, record_full_will_replay)
7702 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7703 (record_full_stop_replaying): Refactor as methods of the
7704 record_full_base_target class.
7705 (record_full_core_resume, record_full_core_kill)
7706 (record_full_core_fetch_registers)
7707 (record_full_core_prepare_to_store)
7708 (record_full_core_store_registers, record_full_core_xfer_partial)
7709 (record_full_core_insert_breakpoint)
7710 (record_full_core_remove_breakpoint)
7711 (record_full_core_has_execution): Refactor
7712 as methods of the record_full_core_target class.
7713 (record_full_base_target::supports_delete_record): New.
7714 (init_record_full_ops): Delete.
7715 (init_record_full_core_ops): Delete.
7716 (record_full_save): Refactor as method of the
7717 record_full_base_target class.
7718 (_initialize_record_full): Remove references to
7719 init_record_full_ops and init_record_full_core_ops.
7720
7721 * remote.c (remote_target, extended_remote_target): New classes.
7722 (remote_ops): Now a remote_target.
7723 (extended_remote_ops): Now an extended_remote_target.
7724 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7725 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7726 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7727 (remote_pass_signals, remote_set_syscall_catchpoint)
7728 (remote_program_signals, )
7729 (remote_thread_always_alive): Remove target_ops parameter.
7730 (remote_thread_alive, remote_thread_name)
7731 (remote_update_thread_list, remote_threads_extra_info)
7732 (remote_static_tracepoint_marker_at)
7733 (remote_static_tracepoint_markers_by_strid)
7734 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7735 (remote_open): Refactor as methods of remote_target.
7736 (extended_remote_open, extended_remote_detach)
7737 (extended_remote_attach, extended_remote_post_attach):
7738 (extended_remote_supports_disable_randomization)
7739 (extended_remote_create_inferior): : Refactor as method of
7740 extended_remote_target.
7741 (remote_set_permissions, remote_open_1, remote_detach)
7742 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7743 (remote_resume, remote_commit_resume, remote_stop)
7744 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7745 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7746 (remote_prepare_to_store, remote_store_registers)
7747 (remote_flash_erase, remote_flash_done, remote_files_info)
7748 (remote_kill, remote_mourn, remote_insert_breakpoint)
7749 (remote_remove_breakpoint, remote_insert_watchpoint)
7750 (remote_watchpoint_addr_within_range)
7751 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7752 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7753 (remote_supports_stopped_by_sw_breakpoint)
7754 (remote_stopped_by_hw_breakpoint)
7755 (remote_supports_stopped_by_hw_breakpoint)
7756 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7757 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7758 (remote_verify_memory): Refactor as methods of remote_target.
7759 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7760 parameter.
7761 (remote_xfer_partial, remote_get_memory_xfer_limit)
7762 (remote_search_memory, remote_rcmd, remote_memory_map)
7763 (remote_pid_to_str, remote_get_thread_local_address)
7764 (remote_get_tib_address, remote_read_description): Refactor as
7765 methods of remote_target.
7766 (remote_target::fileio_open, remote_target::fileio_pwrite)
7767 (remote_target::fileio_pread, remote_target::fileio_close): New.
7768 (remote_hostio_readlink, remote_hostio_fstat)
7769 (remote_filesystem_is_local, remote_can_execute_reverse)
7770 (remote_supports_non_stop, remote_supports_disable_randomization)
7771 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7772 (remote_supports_enable_disable_tracepoint)
7773 (remote_supports_string_tracing)
7774 (remote_can_run_breakpoint_commands, remote_trace_init)
7775 (remote_download_tracepoint, remote_can_download_tracepoint)
7776 (remote_download_trace_state_variable, remote_enable_tracepoint)
7777 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7778 (remote_trace_start, remote_get_trace_status)
7779 (remote_get_tracepoint_status, remote_trace_stop)
7780 (remote_trace_find, remote_get_trace_state_variable_value)
7781 (remote_save_trace_data, remote_get_raw_trace_data)
7782 (remote_set_disconnected_tracing, remote_core_of_thread)
7783 (remote_set_circular_trace_buffer, remote_traceframe_info)
7784 (remote_get_min_fast_tracepoint_insn_len)
7785 (remote_set_trace_buffer_size, remote_set_trace_notes)
7786 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7787 (remote_disable_btrace, remote_teardown_btrace)
7788 (remote_read_btrace, remote_btrace_conf)
7789 (remote_augmented_libraries_svr4_read, remote_load)
7790 (remote_pid_to_exec_file, remote_can_do_single_step)
7791 (remote_execution_direction, remote_thread_handle_to_thread_info):
7792 Refactor as methods of remote_target.
7793 (init_remote_ops, init_extended_remote_ops): Delete.
7794 (remote_can_async_p, remote_is_async_p, remote_async)
7795 (remote_thread_events, remote_upload_tracepoints)
7796 (remote_upload_trace_state_variables): Refactor as methods of
7797 remote_target.
7798 (_initialize_remote): Remove references to init_remote_ops and
7799 init_extended_remote_ops.
7800
7801 * remote-sim.c (gdbsim_target): New class.
7802 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7803 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7804 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7805 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7806 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7807 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7808 Refactor as methods of gdbsim_target.
7809 (gdbsim_ops): Now a gdbsim_target.
7810 (init_gdbsim_ops): Delete.
7811 (gdbsim_cntrl_c): Adjust.
7812 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7813
7814 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7815 (the_amd64_linux_nat_target): New.
7816 (amd64_linux_fetch_inferior_registers)
7817 (amd64_linux_store_inferior_registers): Refactor as methods of
7818 amd64_linux_nat_target.
7819 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7820 * i386-linux-nat.c: Don't include "linux-nat.h".
7821 (i386_linux_nat_target): New class.
7822 (the_i386_linux_nat_target): New.
7823 (i386_linux_fetch_inferior_registers)
7824 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7825 as methods of i386_linux_nat_target.
7826 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7827 * inf-child.c (inf_child_ops): Delete.
7828 (inf_child_fetch_inferior_registers)
7829 (inf_child_store_inferior_registers): Delete.
7830 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7831 methods of inf_child_target.
7832 (inf_child_target::supports_terminal_ours)
7833 (inf_child_target::terminal_init)
7834 (inf_child_target::terminal_inferior)
7835 (inf_child_target::terminal_ours_for_output)
7836 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7837 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7838 New.
7839 (inf_child_open, inf_child_disconnect, inf_child_close)
7840 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7841 (inf_child_post_startup_inferior, inf_child_can_run)
7842 (inf_child_pid_to_exec_file): Refactor as methods of
7843 inf_child_target.
7844 (inf_child_follow_fork): Delete.
7845 (inf_child_target::can_create_inferior)
7846 (inf_child_target::can_attach): New.
7847 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7848 (inf_child_target::has_stack, inf_child_target::has_registers)
7849 (inf_child_target::has_execution): New.
7850 (inf_child_fileio_open, inf_child_fileio_pwrite)
7851 (inf_child_fileio_pread, inf_child_fileio_fstat)
7852 (inf_child_fileio_close, inf_child_fileio_unlink)
7853 (inf_child_fileio_readlink, inf_child_use_agent)
7854 (inf_child_can_use_agent): Refactor as methods of
7855 inf_child_target.
7856 (return_zero, inf_child_target): Delete.
7857 (inf_child_target::inf_child_target): New.
7858 * inf-child.h: Include "target.h".
7859 (inf_child_target): Delete function prototype.
7860 (inf_child_target): New class.
7861 (inf_child_open_target, inf_child_mourn_inferior)
7862 (inf_child_maybe_unpush_target): Delete.
7863 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7864 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7865 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7866 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7867 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7868 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7869 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7870 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7871 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7872 methods of inf_ptrace_target.
7873 (inf_ptrace_target): Delete function.
7874 * inf-ptrace.h: Include "inf-child.h".
7875 (inf_ptrace_target): Delete function declaration.
7876 (inf_ptrace_target): New class.
7877 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7878 * linux-nat.c (linux_target): New.
7879 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7880 (linux_nat_target::~linux_nat_target): New.
7881 (linux_child_post_attach, linux_child_post_startup_inferior)
7882 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7883 (linux_child_remove_fork_catchpoint)
7884 (linux_child_insert_vfork_catchpoint)
7885 (linux_child_remove_vfork_catchpoint)
7886 (linux_child_insert_exec_catchpoint)
7887 (linux_child_remove_exec_catchpoint)
7888 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7889 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7890 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7891 (linux_nat_stopped_data_address)
7892 (linux_nat_stopped_by_sw_breakpoint)
7893 (linux_nat_supports_stopped_by_sw_breakpoint)
7894 (linux_nat_stopped_by_hw_breakpoint)
7895 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7896 (linux_nat_kill, linux_nat_mourn_inferior)
7897 (linux_nat_xfer_partial, linux_nat_thread_alive)
7898 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7899 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7900 (linux_child_static_tracepoint_markers_by_strid)
7901 (linux_nat_is_async_p, linux_nat_can_async_p)
7902 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7903 (linux_nat_supports_multi_process)
7904 (linux_nat_supports_disable_randomization, linux_nat_async)
7905 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7906 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7907 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7908 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7909 methods of linux_nat_target.
7910 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7911 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7912 parameter.
7913 (check_stopped_by_watchpoint): Adjust.
7914 (linux_xfer_partial): Delete.
7915 (linux_target_install_ops, linux_target, linux_nat_add_target):
7916 Delete.
7917 (linux_nat_target::linux_nat_target): New.
7918 * linux-nat.h: Include "inf-ptrace.h".
7919 (linux_nat_target): New.
7920 (linux_target, linux_target_install_ops, linux_nat_add_target):
7921 Delete function declarations.
7922 (linux_target): Declare global.
7923 * linux-thread-db.c (thread_db_target): New.
7924 (thread_db_target::thread_db_target): New.
7925 (thread_db_ops): Delete.
7926 (the_thread_db_target): New.
7927 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7928 (thread_db_update_thread_list, thread_db_pid_to_str)
7929 (thread_db_extra_thread_info)
7930 (thread_db_thread_handle_to_thread_info)
7931 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7932 (thread_db_resume): Refactor as methods of thread_db_target.
7933 (init_thread_db_ops): Delete.
7934 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7935 * x86-linux-nat.c: Don't include "linux-nat.h".
7936 (super_post_startup_inferior): Delete.
7937 (x86_linux_nat_target::~x86_linux_nat_target): New.
7938 (x86_linux_child_post_startup_inferior)
7939 (x86_linux_read_description, x86_linux_enable_btrace)
7940 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7941 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7942 methods of x86_linux_nat_target.
7943 (x86_linux_create_target): Delete. Bits folded ...
7944 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7945 pointer.
7946 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7947 (x86_linux_nat_target): New class.
7948 (x86_linux_create_target): Delete.
7949 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7950 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7951 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7952 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7953 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7954 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7955 make extern.
7956 (x86_use_watchpoints): Delete.
7957 * x86-nat.h: Include "breakpoint.h" and "target.h".
7958 (x86_use_watchpoints): Delete.
7959 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7960 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7961 (x86_insert_watchpoint, x86_remove_watchpoint)
7962 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7963 (x86_stopped_by_hw_breakpoint): New declarations.
7964 (x86_nat_target): New template class.
7965
7966 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7967 (the_ppc_linux_nat_target): New.
7968 (ppc_linux_fetch_inferior_registers)
7969 (ppc_linux_can_use_hw_breakpoint)
7970 (ppc_linux_region_ok_for_hw_watchpoint)
7971 (ppc_linux_ranged_break_num_registers)
7972 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7973 (ppc_linux_insert_mask_watchpoint)
7974 (ppc_linux_remove_mask_watchpoint)
7975 (ppc_linux_can_accel_watchpoint_condition)
7976 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7977 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7978 (ppc_linux_watchpoint_addr_within_range)
7979 (ppc_linux_masked_watch_num_registers)
7980 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7981 (ppc_linux_read_description): Refactor as methods of
7982 ppc_linux_nat_target.
7983 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7984
7985 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7986 (procfs_target): New class.
7987 (the_procfs_target): New.
7988 (procfs_target): Delete function.
7989 (procfs_auxv_parse, procfs_attach, procfs_detach)
7990 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7991 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7992 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7993 (procfs_create_inferior, procfs_update_thread_list)
7994 (procfs_thread_alive, procfs_pid_to_str)
7995 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7996 (procfs_stopped_data_address, procfs_insert_watchpoint)
7997 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7998 (proc_find_memory_regions, procfs_info_proc)
7999 (procfs_make_note_section): Refactor as methods of procfs_target.
8000 (_initialize_procfs): Adjust.
8001 * sol-thread.c (sol_thread_target): New class.
8002 (sol_thread_ops): Now a sol_thread_target.
8003 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8004 (sol_thread_fetch_registers, sol_thread_store_registers)
8005 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8006 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8007 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8008 (init_sol_thread_ops): Delete.
8009 (_initialize_sol_thread): Adjust. Remove references to
8010 init_sol_thread_ops and complete_target_initialization.
8011
8012 * windows-nat.c (windows_nat_target): New class.
8013 (windows_fetch_inferior_registers)
8014 (windows_store_inferior_registers, windows_resume, windows_wait)
8015 (windows_attach, windows_detach, windows_pid_to_exec_file)
8016 (windows_files_info, windows_create_inferior)
8017 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8018 (windows_close, windows_pid_to_str, windows_xfer_partial)
8019 (windows_get_tib_address, windows_get_ada_task_ptid)
8020 (windows_thread_name, windows_thread_alive): Refactor as
8021 windows_nat_target methods.
8022 (do_initial_windows_stuff): Adjust.
8023 (windows_target): Delete function.
8024 (_initialize_windows_nat): Adjust.
8025
8026 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8027 (darwin_mourn_inferior, darwin_kill_inferior)
8028 (darwin_create_inferior, darwin_attach, darwin_detach)
8029 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8030 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8031 (darwin_supports_multi_process): Refactor as darwin_nat_target
8032 methods.
8033 (darwin_resume_to, darwin_files_info): Delete.
8034 (_initialize_darwin_inferior): Rename to ...
8035 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8036 * darwin-nat.h: Include "inf-child.h".
8037 (darwin_nat_target): New class.
8038 (darwin_complete_target): Delete.
8039 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8040 (darwin_target): New.
8041 (i386_darwin_fetch_inferior_registers)
8042 (i386_darwin_store_inferior_registers): Refactor as methods of
8043 darwin_nat_target.
8044 (darwin_complete_target): Delete, with ...
8045 (_initialize_i386_darwin_nat): ... bits factored out here.
8046
8047 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8048 (the_alpha_linux_nat_target): New.
8049 (alpha_linux_register_u_offset): Refactor as
8050 alpha_linux_nat_target method.
8051 (_initialize_alpha_linux_nat): Adjust.
8052 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8053 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8054 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8055 methods of linux_nat_trad_target.
8056 (linux_trad_target): Delete.
8057 * linux-nat-trad.h (linux_trad_target): Delete function.
8058 (linux_nat_trad_target): New class.
8059 * mips-linux-nat.c (mips_linux_nat_target): New class.
8060 (super_fetch_registers, super_store_registers, super_close):
8061 Delete.
8062 (the_mips_linux_nat_target): New.
8063 (mips64_linux_regsets_fetch_registers)
8064 (mips64_linux_regsets_store_registers)
8065 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8066 (mips_linux_register_u_offset, mips_linux_read_description)
8067 (mips_linux_can_use_hw_breakpoint)
8068 (mips_linux_stopped_by_watchpoint)
8069 (mips_linux_stopped_data_address)
8070 (mips_linux_region_ok_for_hw_watchpoint)
8071 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8072 (mips_linux_close): Refactor as methods of mips_linux_nat.
8073 (_initialize_mips_linux_nat): Adjust to C++ification.
8074
8075 * aix-thread.c (aix_thread_target): New class.
8076 (aix_thread_ops): Now an aix_thread_target.
8077 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8078 (aix_thread_fetch_registers, aix_thread_store_registers)
8079 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8080 (aix_thread_thread_alive, aix_thread_pid_to_str)
8081 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8082 Refactor as methods of aix_thread_target.
8083 (init_aix_thread_ops): Delete.
8084 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8085 and complete_target_initialization.
8086 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8087 (rs6000_nat_target): New class.
8088 (the_rs6000_nat_target): New.
8089 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8090 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8091 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8092 (super_create_inferior): Delete.
8093 (_initialize_rs6000_nat): Adjust to C++ification.
8094
8095 * arm-linux-nat.c (arm_linux_nat_target): New class.
8096 (the_arm_linux_nat_target): New.
8097 (arm_linux_fetch_inferior_registers)
8098 (arm_linux_store_inferior_registers, arm_linux_read_description)
8099 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8100 (arm_linux_remove_hw_breakpoint)
8101 (arm_linux_region_ok_for_hw_watchpoint)
8102 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8103 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8104 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8105 arm_linux_nat_target.
8106 (_initialize_arm_linux_nat): Adjust to C++ification.
8107
8108 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8109 (the_aarch64_linux_nat_target): New.
8110 (aarch64_linux_fetch_inferior_registers)
8111 (aarch64_linux_store_inferior_registers)
8112 (aarch64_linux_child_post_startup_inferior)
8113 (aarch64_linux_read_description)
8114 (aarch64_linux_can_use_hw_breakpoint)
8115 (aarch64_linux_insert_hw_breakpoint)
8116 (aarch64_linux_remove_hw_breakpoint)
8117 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8118 (aarch64_linux_region_ok_for_hw_watchpoint)
8119 (aarch64_linux_stopped_data_address)
8120 (aarch64_linux_stopped_by_watchpoint)
8121 (aarch64_linux_watchpoint_addr_within_range)
8122 (aarch64_linux_can_do_single_step): Refactor as methods of
8123 aarch64_linux_nat_target.
8124 (super_post_startup_inferior): Delete.
8125 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8126
8127 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8128 (the_hppa_linux_nat_target): New.
8129 (hppa_linux_fetch_inferior_registers)
8130 (hppa_linux_store_inferior_registers): Refactor as methods of
8131 hppa_linux_nat_target.
8132 (_initialize_hppa_linux_nat): Adjust to C++ification.
8133
8134 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8135 (the_ia64_linux_nat_target): New.
8136 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8137 (ia64_linux_stopped_data_address)
8138 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8139 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8140 ia64_linux_nat_target methods.
8141 (super_xfer_partial): Delete.
8142 (_initialize_ia64_linux_nat): Adjust to C++ification.
8143
8144 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8145 (the_m32r_linux_nat_target): New.
8146 (m32r_linux_fetch_inferior_registers)
8147 (m32r_linux_store_inferior_registers): Refactor as
8148 m32r_linux_nat_target methods.
8149 (_initialize_m32r_linux_nat): Adjust to C++ification.
8150
8151 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8152 (the_m68k_linux_nat_target): New.
8153 (m68k_linux_fetch_inferior_registers)
8154 (m68k_linux_store_inferior_registers): Refactor as
8155 m68k_linux_nat_target methods.
8156 (_initialize_m68k_linux_nat): Adjust to C++ification.
8157
8158 * s390-linux-nat.c (s390_linux_nat_target): New class.
8159 (the_s390_linux_nat_target): New.
8160 (s390_linux_fetch_inferior_registers)
8161 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8162 (s390_insert_watchpoint, s390_remove_watchpoint)
8163 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8164 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8165 (s390_auxv_parse, s390_read_description): Refactor as methods of
8166 s390_linux_nat_target.
8167 (_initialize_s390_nat): Adjust to C++ification.
8168
8169 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8170 (the_sparc_linux_nat_target): New.
8171 (_initialize_sparc_linux_nat): Adjust to C++ification.
8172 * sparc-nat.c (sparc_fetch_inferior_registers)
8173 (sparc_store_inferior_registers): Remove target_ops parameter.
8174 * sparc-nat.h (sparc_fetch_inferior_registers)
8175 (sparc_store_inferior_registers): Remove target_ops parameter.
8176 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8177 (the_sparc64_linux_nat_target): New.
8178 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8179
8180 * spu-linux-nat.c (spu_linux_nat_target): New class.
8181 (the_spu_linux_nat_target): New.
8182 (spu_child_post_startup_inferior, spu_child_post_attach)
8183 (spu_child_wait, spu_fetch_inferior_registers)
8184 (spu_store_inferior_registers, spu_xfer_partial)
8185 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8186 methods.
8187 (_initialize_spu_nat): Adjust to C++ification.
8188
8189 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8190 (the_tilegx_linux_nat_target): New.
8191 (fetch_inferior_registers, store_inferior_registers):
8192 Refactor as methods.
8193 (_initialize_tile_linux_nat): Adjust to C++ification.
8194
8195 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8196 (the_xtensa_linux_nat_target): New.
8197 (xtensa_linux_fetch_inferior_registers)
8198 (xtensa_linux_store_inferior_registers): Refactor as
8199 xtensa_linux_nat_target methods.
8200 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8201
8202 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8203 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8204 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8205 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8206 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8207 (fbsd_stopped_by_sw_breakpoint)
8208 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8209 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8210 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8211 (fbsd_post_startup_inferior, fbsd_post_attach)
8212 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8213 (fbsd_set_syscall_catchpoint)
8214 (super_xfer_partial, super_resume, super_wait)
8215 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8216 (fbsd_handle_debug_trap): Remove target_ops parameter.
8217 (fbsd_nat_add_target): Delete.
8218 * fbsd-nat.h: Include "inf-ptrace.h".
8219 (fbsd_nat_add_target): Delete.
8220 (USE_SIGTRAP_SIGINFO): Define.
8221 (fbsd_nat_target): New class.
8222
8223 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8224 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8225 (amd64bsd_target): Delete.
8226 * amd64-bsd-nat.h: New file.
8227 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8228 "x86-bsd-nat.h".
8229 (amd64_fbsd_nat_target): New class.
8230 (the_amd64_fbsd_nat_target): New.
8231 (amd64fbsd_read_description): Refactor as method of
8232 amd64_fbsd_nat_target.
8233 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8234 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8235 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8236 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8237 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8238 (i386bsd_target): Delete.
8239 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8240 (i386bsd_fetch_inferior_registers)
8241 (i386bsd_store_inferior_registers): Declare.
8242 (i386_bsd_nat_target): New class.
8243 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8244 (the_i386_fbsd_nat_target): New.
8245 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8246 i386_fbsd_nat_target methods.
8247 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8248 (_initialize_i386fbsd_nat): Adjust to C++ification.
8249 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8250 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8251 (_initialize_x86_bsd_nat): Adjust to C++ification.
8252 * x86-bsd-nat.h: Include "x86-nat.h".
8253 (x86bsd_target): Delete declaration.
8254 (x86bsd_nat_target): New class.
8255
8256 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8257 (the_aarch64_fbsd_nat_target): New.
8258 (aarch64_fbsd_fetch_inferior_registers)
8259 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8260 aarch64_fbsd_nat_target.
8261 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8262 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8263 (the_alpha_bsd_nat_target): New.
8264 (alphabsd_fetch_inferior_registers)
8265 (alphabsd_store_inferior_registers): Refactor as
8266 alpha_bsd_nat_target methods.
8267 (_initialize_alphabsd_nat): Refactor as methods of
8268 alpha_bsd_nat_target.
8269 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8270 (the_amd64_nbsd_nat_target): New.
8271 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8272 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8273 (the_amd64_obsd_nat_target): New.
8274 (_initialize_amd64obsd_nat): Adjust to C++ification.
8275 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8276 (the_arm_fbsd_nat_target): New.
8277 (arm_fbsd_fetch_inferior_registers)
8278 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8279 (_initialize_arm_fbsd_nat): Refactor as methods of
8280 arm_fbsd_nat_target.
8281 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8282 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8283 (the_arm_netbsd_nat_target): New.
8284 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8285 arm_netbsd_nat_target.
8286 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8287 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8288 (the_hppa_nbsd_nat_target): New.
8289 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8290 hppa_nbsd_nat_target methods.
8291 (_initialize_hppanbsd_nat): Adjust to C++ification.
8292 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8293 (the_hppa_obsd_nat_target): New.
8294 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8295 methods of hppa_obsd_nat_target.
8296 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8297 add_target.
8298 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8299 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8300 add_target.
8301 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8302 (_initialize_i386obsd_nat): Use add_target.
8303 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8304 (the_m68k_bsd_nat_target): New.
8305 (m68kbsd_fetch_inferior_registers)
8306 (m68kbsd_store_inferior_registers): Refactor as methods of
8307 m68k_bsd_nat_target.
8308 (_initialize_m68kbsd_nat): Adjust to C++ification.
8309 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8310 (the_mips_fbsd_nat_target): New.
8311 (mips_fbsd_fetch_inferior_registers)
8312 (mips_fbsd_store_inferior_registers): Refactor as methods of
8313 mips_fbsd_nat_target.
8314 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8315 add_target.
8316 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8317 (the_mips_nbsd_nat_target): New.
8318 (mipsnbsd_fetch_inferior_registers)
8319 (mipsnbsd_store_inferior_registers): Refactor as methods of
8320 mips_nbsd_nat_target.
8321 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8322 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8323 (the_mips64_obsd_nat_target): New.
8324 (mips64obsd_fetch_inferior_registers)
8325 (mips64obsd_store_inferior_registers): Refactor as methods of
8326 mips64_obsd_nat_target.
8327 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8328 add_target.
8329 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8330 nbsd_nat_target.
8331 * nbsd-nat.h: Include "inf-ptrace.h".
8332 (nbsd_nat_target): New class.
8333 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8334 (obsd_wait): Refactor as methods of obsd_nat_target.
8335 (obsd_add_target): Delete.
8336 * obsd-nat.h: Include "inf-ptrace.h".
8337 (obsd_nat_target): New class.
8338 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8339 (the_ppc_fbsd_nat_target): New.
8340 (ppcfbsd_fetch_inferior_registers)
8341 (ppcfbsd_store_inferior_registers): Refactor as methods of
8342 ppc_fbsd_nat_target.
8343 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8344 add_target.
8345 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8346 (the_ppc_nbsd_nat_target): New.
8347 (ppcnbsd_fetch_inferior_registers)
8348 (ppcnbsd_store_inferior_registers): Refactor as methods of
8349 ppc_nbsd_nat_target.
8350 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8351 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8352 (the_ppc_obsd_nat_target): New.
8353 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8354 methods of ppc_obsd_nat_target.
8355 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8356 add_target.
8357 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8358 (the_sh_nbsd_nat_target): New.
8359 (shnbsd_fetch_inferior_registers)
8360 (shnbsd_store_inferior_registers): Refactor as methods of
8361 sh_nbsd_nat_target.
8362 (_initialize_shnbsd_nat): Adjust to C++ification.
8363 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8364 (inf_ptrace_xfer_partial): Delete.
8365 (sparc_xfer_partial, sparc_target): Delete.
8366 * sparc-nat.h (sparc_fetch_inferior_registers)
8367 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8368 (sparc_target): Delete function declaration.
8369 (sparc_target): New template class.
8370 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8371 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8372 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8373 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8374 add_target.
8375 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8376 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8377 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8378 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8379 add_target.
8380 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8381 (the_vax_bsd_nat_target): New.
8382 (vaxbsd_fetch_inferior_registers)
8383 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8384 methods.
8385 (_initialize_vaxbsd_nat): Adjust to C++ification.
8386
8387 * bsd-kvm.c (bsd_kvm_target): New class.
8388 (bsd_kvm_ops): Now a bsd_kvm_target.
8389 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8390 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8391 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8392 bsd_kvm_target.
8393 (bsd_kvm_return_one): Delete.
8394 (bsd_kvm_add_target): Adjust to C++ification.
8395
8396 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8397 (nto_procfs_target_procfs): New classes.
8398 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8399 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8400 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8401 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8402 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8403 (procfs_remove_hw_breakpoint, procfs_resume)
8404 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8405 (procfs_kill_inferior, procfs_store_registers)
8406 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8407 as methods of nto_procfs_target.
8408 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8409 (nto_native_ops): Delete.
8410 (procfs_open, procfs_native_open): Delete.
8411 (nto_native_ops): Now an nto_procfs_target_native.
8412 (init_procfs_targets): Adjust to C++ification.
8413 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8414 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8415 Refactor as methods of nto_procfs_target.
8416
8417 * go32-nat.c (go32_nat_target): New class.
8418 (the_go32_nat_target): New.
8419 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8420 (go32_store_registers, go32_xfer_partial, go32_files_info)
8421 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8422 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8423 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8424 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8425 (go32_target): Delete.
8426 (_initialize_go32_nat): Adjust to C++ification.
8427
8428 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8429 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8430 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8431 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8432 gnu_nat_target.
8433 (gnu_target): Delete.
8434 * gnu-nat.h (gnu_target): Delete.
8435 (gnu_nat_target): New class.
8436 * i386-gnu-nat.c (gnu_base_target): New.
8437 (i386_gnu_nat_target): New class.
8438 (the_i386_gnu_nat_target): New.
8439 (_initialize_i386gnu_nat): Adjust to C++ification.
8440
8441 2018-05-02 Pedro Alves <palves@redhat.com>
8442
8443 * bfd-target.c (target_bfd_xclose): Rename to ...
8444 (target_bfd_close): ... this.
8445 (target_bfd_reopen): Adjust.
8446 * target.c (target_close): Remove references to to_xclose.
8447 * target.h (target_ops::to_xclose): Delete.
8448 (target_ops::to_close): Update comments.
8449
8450 2018-05-02 Pedro Alves <palves@redhat.com>
8451
8452 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8453 "linux-nat.h".
8454 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8455 * inf-ptrace.c (inf_ptrace_register_u_offset)
8456 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8457 (inf_ptrace_store_register, inf_ptrace_store_registers)
8458 (inf_ptrace_trad_target): Move to ...
8459 * linux-nat-trad.c: ... this new file.
8460 * linux-nat-trad.h: New file.
8461 * linux-nat.c (linux_target_install_ops): Make extern.
8462 (linux_trad_target): Delete.
8463 * linux-nat.h (linux_trad_target): Delete declaration.
8464 (linux_target_install_ops): Declare.
8465 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8466 "linux-nat.h".
8467
8468 2018-05-02 Pedro Alves <palves@redhat.com>
8469
8470 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8471 procfs_target/add_target here.
8472 * procfs.c (procfs_target): Make static.
8473 (_initialize_procfs): Call add_target here.
8474 * procfs.h (struct target_ops): Remove forward declaration.
8475 (procfs_target): Remove declaration.
8476 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8477
8478 2018-05-02 Pedro Alves <palves@redhat.com>
8479
8480 * procfs.c (procfs_stopped_by_watchpoint)
8481 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8482 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8483 Forward declare.
8484 (procfs_use_watchpoints): Delete, move contents...
8485 (procfs_target): ... here.
8486 * procfs.h (procfs_use_watchpoints): Delete declaration.
8487 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8488 procfs_use_watchpoints.
8489 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8490 procfs_use_watchpoints.
8491
8492 2018-05-02 Tom Tromey <tom@tromey.com>
8493
8494 PR python/20084:
8495 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8496 and var_zuinteger_unlimited.
8497 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8498 and PARAM_ZUINTEGER_UNLIMITED.
8499 (set_parameter_value): Handle var_zuinteger and
8500 var_zuinteger_unlimited.
8501 (add_setshow_generic): Likewise.
8502 (parmpy_init): Likewise.
8503
8504 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8505
8506 PR rust/23124
8507 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8508 pointer is not null before dereferencing it.
8509
8510 2018-04-30 Tom Tromey <tom@tromey.com>
8511
8512 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8513 is_mi_like_p.
8514
8515 2018-04-30 Tom Tromey <tom@tromey.com>
8516
8517 * breakpoint.c (mention): Remove use of is_mi_like_p.
8518 (print_mention_ranged_breakpoint): Likewise.
8519 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8520 of is_mi_like_p.
8521
8522 2018-04-30 Tom Tromey <tom@tromey.com>
8523
8524 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8525
8526 2018-04-30 Tom Tromey <tom@tromey.com>
8527
8528 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8529 (info_spu_event_command): Remove some uses of is_mi_like_p.
8530
8531 2018-04-30 Tom Tromey <tom@tromey.com>
8532
8533 * python/py-framefilter.c (py_print_single_arg)
8534 (enumerate_locals, py_print_args, py_print_frame): Remove some
8535 uses of is_mi_like_p.
8536
8537 2018-04-30 Tom Tromey <tom@tromey.com>
8538
8539 * ui-out.c: Update.
8540 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8541 * ui-out.h (ui_out::is_mi_like_p): Now const.
8542 (ui_out::do_is_mi_like_p): Now const.
8543 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8544
8545 2018-04-30 Tom Tromey <tom@tromey.com>
8546
8547 * varobj.c (varobj_set_visualizer): Use new_reference.
8548 * python/python.c (gdbpy_decode_line): Use new_reference.
8549 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8550 new_reference.
8551
8552 2018-04-30 Tom Tromey <tom@tromey.com>
8553
8554 * varobj.c (install_new_value): Use new_reference.
8555 * value.h (value_incref): Return void. Swap intro comment with
8556 value_decref.
8557 * value.c (set_value_parent): Use new_reference.
8558 (value_incref): Return void. Update intro comment.
8559 (release_value): Use new_reference.
8560 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8561
8562 2018-04-30 Tom Tromey <tom@tromey.com>
8563
8564 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8565 * gdb_bfd.h (new_bfd_ref): Remove.
8566 (gdb_bfd_open): Update comment.
8567 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8568 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8569 (gdb_bfd_fdopenr): Use new_reference.
8570 * exec.c (exec_file_attach): Use new_reference.
8571
8572 2018-04-30 Tom Tromey <tom@tromey.com>
8573
8574 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8575 method.
8576
8577 2018-04-30 Tom Tromey <tom@tromey.com>
8578
8579 * jit.c (jit_read_code_entry): Use type_align.
8580 * i386-tdep.c (i386_gdbarch_init): Don't call
8581 set_gdbarch_long_long_align_bit.
8582 * gdbarch.sh: Remove long_long_align_bit.
8583 * gdbarch.c, gdbarch.h: Rebuild.
8584 * arc-tdep.c (arc_type_align): New function.
8585 (arc_gdbarch_init): Use arc_type_align. Don't call
8586 set_gdbarch_long_long_align_bit.
8587
8588 2018-04-30 Tom Tromey <tom@tromey.com>
8589
8590 * rust-lang.c (rust_type_alignment): Remove.
8591 (rust_composite_type): Use type_align.
8592
8593 2018-04-30 Tom Tromey <tom@tromey.com>
8594
8595 * NEWS: Mention Type.align.
8596 * python/py-type.c (typy_get_alignof): New function.
8597 (type_object_getset): Add "alignof".
8598
8599 2018-04-30 Tom Tromey <tom@tromey.com>
8600
8601 PR exp/17095:
8602 * NEWS: Update.
8603 * std-operator.def (UNOP_ALIGNOF): New operator.
8604 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8605 New.
8606 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8607 * c-lang.c (c_op_print_tab): Add alignof.
8608 * c-exp.y (ALIGNOF): New token.
8609 (exp): Add "ALIGNOF" production.
8610 (ident_tokens): Add _Alignof and alignof.
8611
8612 2018-04-30 Tom Tromey <tom@tromey.com>
8613
8614 * i386-tdep.c (i386_type_align): New function.
8615 (i386_gdbarch_init): Update.
8616 * gdbarch.sh (type_align): New method.
8617 * gdbarch.c, gdbarch.h: Rebuild.
8618 * arch-utils.h (default_type_align): Declare.
8619 * arch-utils.c (default_type_align): New function.
8620 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8621 (struct type) <align_log2>: New field.
8622 <instance_flags>: Now a bitfield.
8623 (TYPE_RAW_ALIGN): New macro.
8624 (type_align, type_raw_align, set_type_align): Declare.
8625 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8626 functions.
8627 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8628 (get_alignment, maybe_set_alignment): New functions.
8629 (read_structure_type, read_enumeration_type, read_array_type)
8630 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8631 (read_subrange_type, read_base_type): Set type alignment.
8632
8633 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8634
8635 * dwarf2read.c (read_index_from_section): Use bool.
8636
8637 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8638
8639 PR gdb/22950
8640 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8641 with #ifdef.
8642
8643 2018-04-29 John Reiser <jreiser@BitWagon.com>
8644
8645 PR build/22873
8646 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8647 last step, and do it atomically.
8648
8649 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8650
8651 * compile/compile-c-types.c (convert_int, convert_float):
8652 Update for C FE v1.
8653
8654 2018-04-27 Tom Tromey <tom@tromey.com>
8655
8656 PR rust/22545:
8657 * rust-lang.c (rust_inclusive_range_type_p): New function.
8658 (rust_range): Handle inclusive ranges.
8659 (rust_compute_range): Likewise.
8660 * rust-exp.y (struct rust_op) <inclusive>: New field.
8661 (DOTDOTEQ): New constant.
8662 (range_expr): Add "..=" productions.
8663 (operator_tokens): Add "..=" token.
8664 (ast_range): Add "inclusive" parameter.
8665 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8666 ranges.
8667 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8668 bounds values.
8669 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8670 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8671 Update comments.
8672 * expprint.c (print_subexp_standard): Handle new bounds values.
8673 (dump_subexp_body_standard): Likewise.
8674
8675 2018-04-27 Tom Tromey <tom@tromey.com>
8676
8677 * configure: Rebuild.
8678 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8679 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8680 "OVERRIDE".
8681 (class symbol_needs_eval_context): Likewise.
8682 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8683 (mock_mapped_index::symbol_name_at): Use "override". Remove
8684 "virtual".
8685 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8686 "override".
8687 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8688 * aarch64-tdep.c (instruction_reader::read): Use "override".
8689 (instruction_reader_test::read): Likewise.
8690 * arm-tdep.c (instruction_reader::read): Use "override".
8691 (instruction_reader_thumb::read): Likewise.
8692
8693 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8694
8695 PR remote/9665
8696 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8697 instead of remote_send.
8698 (remote_send): Remove.
8699
8700 2018-04-26 Pedro Alves <palves@redhat.com>
8701
8702 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8703 find_function_start_sal instead of find_pc_line.
8704
8705 2018-04-26 Pedro Alves <palves@redhat.com>
8706
8707 * breakpoint.c (set_breakpoint_location_function): Handle
8708 mst_data_gnu_ifunc.
8709 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8710 * elfread.c (elf_symtab_read): Give data symbols with
8711 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8712 (elf_rel_plt_read): Update comment.
8713 * linespec.c (convert_linespec_to_sals): Handle
8714 mst_data_gnu_ifunc.
8715 (minsym_found): Handle mst_data_gnu_ifunc.
8716 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8717 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8718 * parse.c (find_minsym_type_and_address): Handle
8719 mst_data_gnu_ifunc.
8720 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8721 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8722 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8723 comment.
8724 <mst_data_gnu_ifunc>: New enumerator.
8725
8726 2018-04-26 Pedro Alves <palves@redhat.com>
8727
8728 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8729 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8730 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8731 Handle it.
8732 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8733 (lookup_minimal_symbol_by_pc): Adjust.
8734 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8735 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8736 * minsyms.h (lookup_msym_prefer): New enum.
8737 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8738 parameter by a lookup_msym_prefer parameter.
8739
8740 2018-04-26 Pedro Alves <palves@redhat.com>
8741
8742 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8743 ends in "@plt" instead of looking at the symbol's section.
8744
8745 2018-04-26 Pedro Alves <palves@redhat.com>
8746
8747 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8748 all references.
8749 (find_pc_partial_function_gnu_ifunc): Rename to ...
8750 (find_pc_partial_function): ... this, and remove references to
8751 'is_gnu_ifunc_p'.
8752 (find_pc_partial_function): Delete old implementation.
8753 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8754
8755 2018-04-26 Pedro Alves <palves@redhat.com>
8756
8757 * linespec.c (struct bound_minimal_symbol_search_key): New.
8758 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8759 skip first line if we found a GNU ifunc minimal symbol by name.
8760 (compare_msymbols): Change parameters to work with a destructured
8761 lhs minsym.
8762 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8763 functions.
8764
8765 2018-04-26 Pedro Alves <palves@redhat.com>
8766
8767 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8768 ifunc targets here. Instead, if we have an ifunc minsym, use its
8769 address/name.
8770 (add_location_to_breakpoint): Store the minsym and the objfile in
8771 the breakpoint location.
8772 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8773 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8774 Record the minsym in the sal.
8775 * symtab.h (symtab_and_line) <msymbol>: New field.
8776
8777 2018-04-26 Pedro Alves <palves@redhat.com>
8778
8779 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8780 unless we actually resolved the ifunc.
8781
8782 2018-04-26 Pedro Alves <palves@redhat.com>
8783
8784 * c-exp.y (variable production): Prefer ifunc minsyms over
8785 regular function symbols.
8786 * symtab.c (find_gnu_ifunc): New function.
8787 * minsyms.h (lookup_msym_prefer): New enum.
8788 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8789 parameter by a lookup_msym_prefer parameter.
8790 * symtab.h (find_gnu_ifunc): New declaration.
8791
8792 2018-04-26 Pedro Alves <palves@redhat.com>
8793
8794 * blockframe.c (find_gnu_ifunc_target_type): New function.
8795 (find_function_type): New.
8796 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8797 return a value with a memory address.
8798 (eval_call): For calls to GNU ifunc functions, try to find the
8799 type of the target function from the type that the resolver
8800 returns.
8801 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8802 symbols.
8803 * infcall.c (find_function_return_type): Delete.
8804 (find_function_addr): Add 'function_type' parameter. For calls to
8805 GNU ifunc functions, try to find the type of the target function
8806 from the type that the resolver returns, and return it via
8807 FUNCTION_TYPE.
8808 (call_function_by_hand_dummy): Adjust to use the function type
8809 returned by find_function_addr.
8810 (find_function_addr): Add 'function_type' parameter and move
8811 description here.
8812 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8813 declarations.
8814
8815 2018-04-26 Pedro Alves <palves@redhat.com>
8816
8817 * c-exp.y (variable production): Skip finding an alias for ifunc
8818 symbols.
8819
8820 2018-04-26 Pedro Alves <palves@redhat.com>
8821
8822 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8823
8824 2018-04-25 Pedro Alves <palves@redhat.com>
8825
8826 * infcmd.c (kill_command): Print the pid as string, not the whole
8827 thread's ptid. Add comment. s/has been killed/killed/ in output
8828 message.
8829 * remote.c (remote_detach_1): Print the pid as string, not the
8830 whole thread's ptid.
8831
8832 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8833 Sergio Durigan Junior <sergiodj@redhat.com>
8834 Pedro Alves <palves@redhat.com>
8835
8836 * infcmd.c (kill_command): Print message when inferior has
8837 been killed.
8838 * inferior.c (print_inferior_events): Remove 'static'. Set as
8839 '1'.
8840 (add_inferior): Improve message printed when
8841 'print_inferior_events' is on.
8842 (exit_inferior): Remove message printed when
8843 'print_inferior_events' is on.
8844 (detach_inferior): Improve message printed when
8845 'print_inferior_events' is on.
8846 (initialize_inferiors): Use 'add_inferior_silent' to set
8847 'current_inferior_'.
8848 * inferior.h (print_inferior_events): Declare here as
8849 'extern'.
8850 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8851 '[Detaching...]' messages when 'print_inferior_events' is on.
8852 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8853 as prefix/suffix for messages. Remove periods. Fix erroneous
8854 'Detaching after fork from child...', replace it by '... from
8855 parent...'.
8856 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8857 prefix/suffix when printing 'Detaching...' messages. Print
8858 them when 'print_inferior_events' is on.
8859 * remote.c (remote_detach_1): Print message when detaching
8860 from inferior and '!is_fork_parent'.
8861
8862 2018-04-24 Tom Tromey <tom@tromey.com>
8863
8864 * cli-out.h: Reindent.
8865
8866 2018-04-24 Tom Tromey <tom@tromey.com>
8867
8868 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8869 (cli_ui_out::do_field_string): Use fputs_filtered.
8870 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8871
8872 2018-04-23 Tom Tromey <tom@tromey.com>
8873
8874 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8875 gdb::unique_xmalloc_ptr.
8876
8877 2018-04-23 Tom Tromey <tom@tromey.com>
8878
8879 * configure: Rebuild.
8880
8881 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8882
8883 PR gdb/23095
8884 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8885 prepare_for_testing. Set normal_bp to r_debug_state if target
8886 is bsd.
8887
8888 2018-04-21 Pedro Alves <palves@redhat.com>
8889 Rajendra SY <rajendra.sy@gmail.com>
8890
8891 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8892 * remote.c (extended_remote_attach): In all-stop mode, mark the
8893 thread as executing.
8894
8895 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8896
8897 * thread.c (thread_apply_all_command): Fix comment.
8898 (thread_command): Fix comment.
8899
8900 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8901
8902 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8903 parameter.
8904 * features/aarch64-core.c (create_feature_aarch64_core):
8905 Regenerate.
8906 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8907 Likewise.
8908 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8909 Likewise.
8910 * features/i386/32bit-avx512.c
8911 (create_feature_i386_32bit_avx512): Likewise.
8912 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8913 Likewise.
8914 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8915 Likewise.
8916 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8917 Likewise.
8918 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8919 Likewise.
8920 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8921 Likewise.
8922 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8923 Likewise.
8924 * features/i386/64bit-avx512.c
8925 (create_feature_i386_64bit_avx512): Likewise.
8926 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8927 Likewise.
8928 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8929 Likewise.
8930 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8931 Likewise.
8932 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8933 Likewise.
8934 * features/i386/64bit-segments.c
8935 (create_feature_i386_64bit_segments): Likewise.
8936 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8937 Likewise.
8938 * features/i386/x32-core.c
8939 (create_feature_i386_x32_core): Likewise.
8940 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8941 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8942 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8943 * target-descriptions.c: In generated code, don't pass xml
8944 filename.
8945
8946 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8947
8948 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8949 (print_xml_feature::visit_post): Likewise.
8950 (print_xml_feature::visit): Likewise.
8951 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8952 (print_xml_feature): Add new class.
8953 * regformats/regdat.sh: Null xmltarget on feature targets.
8954 * target-descriptions.c (struct target_desc): Add xmltarget.
8955 (maintenance_check_tdesc_xml_convert): Add unittest function.
8956 (tdesc_get_features_xml): Add function to get xml.
8957 (maintenance_check_xml_descriptions): Test xml generation.
8958 * xml-tdesc.c (string_read_description_xml): Add function.
8959 * xml-tdesc.h (string_read_description_xml): Add declaration.
8960
8961 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8962
8963 * features/Makefile: Add feature marker to targets with new style
8964 target descriptions.
8965 * regformats/aarch64.dat: Regenerate.
8966 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8967 * regformats/i386/amd64-avx-linux.dat: Likewise.
8968 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8969 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8970 * regformats/i386/amd64-linux.dat: Likewise.
8971 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8972 * regformats/i386/amd64.dat: Likewise.
8973 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8974 * regformats/i386/i386-avx-linux.dat: Likewise.
8975 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8976 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8977 * regformats/i386/i386-linux.dat: Likewise.
8978 * regformats/i386/i386-mmx-linux.dat: Likewise.
8979 * regformats/i386/i386-mpx-linux.dat: Likewise.
8980 * regformats/i386/i386.dat: Likewise.
8981 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8982 * regformats/i386/x32-avx-linux.dat: Likewise.
8983 * regformats/i386/x32-linux.dat: Likewise.
8984 * regformats/tic6x-c62x-linux.dat: Likewise.
8985 * regformats/tic6x-c64x-linux.dat: Likewise.
8986 * regformats/tic6x-c64xp-linux.dat: Likewise.
8987 * regformats/regdat.sh: Parse feature marker.
8988
8989 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8990
8991 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8992 (tdesc_osabi_name): Likewise.
8993 * target-descriptions.c (tdesc_architecture_name): Add new
8994 function.
8995 (tdesc_osabi_name): Likewise.
8996
8997 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8998
8999 * common/tdesc.c (tdesc_predefined_type): Move to here.
9000 (tdesc_named_type): Likewise.
9001 (tdesc_create_vector): Likewise.
9002 (tdesc_create_struct): Likewise.
9003 (tdesc_set_struct_size): Likewise.
9004 (tdesc_create_union): Likewise.
9005 (tdesc_create_flags): Likewise.
9006 (tdesc_create_enum): Likewise.
9007 (tdesc_add_field): Likewise.
9008 (tdesc_add_typed_bitfield): Likewise.
9009 (tdesc_add_bitfield): Likewise.
9010 (tdesc_add_flag): Likewise.
9011 (tdesc_add_enum_value): Likewise.
9012 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9013 (struct tdesc_type_vector): Likewise.
9014 (struct tdesc_type_field): Likewise.
9015 (struct tdesc_type_with_fields): Likewise.
9016 (tdesc_create_enum): Add declaration.
9017 (tdesc_add_typed_bitfield): Likewise.
9018 (tdesc_add_enum_value): Likewise.
9019 * target-descriptions.c (tdesc_type_field): Move from here.
9020 (tdesc_type_builtin): Likewise.
9021 (tdesc_type_vector): Likewise.
9022 (tdesc_type_with_fields): Likewise.
9023 (tdesc_predefined_types): Likewise.
9024 (tdesc_named_type): Likewise.
9025 (tdesc_create_vector): Likewise.
9026 (tdesc_create_struct): Likewise.
9027 (tdesc_set_struct_size): Likewise.
9028 (tdesc_create_union): Likewise.
9029 (tdesc_create_flags): Likewise.
9030 (tdesc_create_enum): Likewise.
9031 (tdesc_add_field): Likewise.
9032 (tdesc_add_typed_bitfield): Likewise.
9033 (tdesc_add_bitfield): Likewise.
9034 (tdesc_add_flag): Likewise.
9035 (tdesc_add_enum_value): Likewise.
9036 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9037 (tdesc_add_typed_bitfield): Likewise.
9038 (tdesc_add_enum_value): Likewise.
9039
9040 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9041
9042 * common/tdesc.c (tdesc_feature::accept): Move to here.
9043 (tdesc_feature::operator==): Likewise.
9044 (tdesc_create_reg): Likewise.
9045 * common/tdesc.h (tdesc_type_kind): Likewise.
9046 (struct tdesc_type): Likewise.
9047 (struct tdesc_feature): Likewise.
9048 * regformats/regdat.sh: Create a feature.
9049 * target-descriptions.c (tdesc_type_kind): Move from here.
9050 (tdesc_type): Likewise.
9051 (tdesc_type_up): Likewise.
9052 (tdesc_feature): Likewise.
9053 (tdesc_create_reg): Likewise.
9054
9055 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9056
9057 * Makefile.in: Add arch/tdesc.c
9058 * common/tdesc.c: New file.
9059 * common/tdesc.h (tdesc_element_visitor): Move to here.
9060 (tdesc_element): Likewise.
9061 (tdesc_reg): Likewise.
9062 (tdesc_reg_up): Likewise.
9063 * regformats/regdef.h (reg): Add offset to constructors.
9064 * target-descriptions.c (tdesc_element_visitor): Move from here.
9065 (tdesc_element): Likewise.
9066 (tdesc_reg): Likewise.
9067 (tdesc_reg_up): Likewise.
9068
9069 2018-04-17 Tom Tromey <tom@tromey.com>
9070
9071 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9072 discriminant field.
9073
9074 2018-04-17 Tom Tromey <tom@tromey.com>
9075
9076 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9077
9078 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9079
9080 * symtab.c (print_symbol_info): Skip printing filename and line
9081 number when `last' is NULL.
9082 (symtab_symbol_info): Use empty string instead of NULL for first
9083 invocation of print_symbol_info.
9084 (rbreak_command): Pass NULL to `last' parameter of
9085 print_symbol_info.
9086
9087 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9088
9089 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9090 instead of nullptr.
9091
9092 2018-04-16 Pedro Alves <palves@redhat.com>
9093
9094 * MAINTAINERS (sh): Remove.
9095 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9096 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9097 (ALLDEPFILES): Remove sh64-tdep.c.
9098 * NEWS: Mentions that support for SH-5/SH64 is removed.
9099 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9100 (sh*-*-openbsd*): Ditto.
9101 (sh64-*-elf*): Remove.
9102 (sh*): Remove.
9103 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9104 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9105 * sh-tdep.c: No longer include "sh64-tdep.h".
9106 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9107 * sh64-tdep.c, sh64-tdep.h: Remove files.
9108
9109 2018-04-16 Pedro Alves <palves@redhat.com>
9110
9111 * MAINTAINERS: Remove m88k.
9112 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9113 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9114 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9115 * NEWS: Mention that support for m88k was removed.
9116 * configure.host (m88*-*-*): Remove support.
9117 * configure.nat (m88k-*-*): Remove support.
9118 * configure.tgt (m88*-*-openbsd*): Remove.
9119 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9120
9121 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9122
9123 * configure.tgt (x86_tobjs): New variable.
9124 (amd64_tobjs, i386_tobjs): Use it.
9125
9126 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9127
9128 * symtab.c (print_symbol_info): Precede the symbol definition by
9129 the line number when available.
9130 * NEWS: Advertise this enhancement.
9131
9132 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9133
9134 * NEWS (New options): announce set/show record btrace cpu.
9135 * btrace.c: Include record-btrace.h.
9136 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9137 the vendor is unknown.
9138 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9139 Maybe overwrite the btrace configuration's cpu.
9140 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9141 (btrace_fetch): Add cpu parameter. Update callers.
9142 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9143 Maybe overwrite the btrace configuration's cpu. Skip enabling
9144 errata workarounds if the vendor is unknown.
9145 * python/py-record-btrace.c: Include record-btrace.h.
9146 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9147 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9148 * record-btrace.c (record_btrace_cpu_state_kind): New.
9149 (record_btrace_cpu): New.
9150 (set_record_btrace_cpu_cmdlist): New.
9151 (record_btrace_get_cpu): New.
9152 (require_btrace_thread, record_btrace_info)
9153 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9154 (cmd_set_record_btrace_cpu_none): New.
9155 (cmd_set_record_btrace_cpu_auto): New.
9156 (cmd_set_record_btrace_cpu): New.
9157 (cmd_show_record_btrace_cpu): New.
9158 (_initialize_record_btrace): Initialize set/show record btrace cpu
9159 commands.
9160 * record-btrace.h (record_btrace_get_cpu): New.
9161
9162 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9163
9164 * record.c (set_record_command): Fix typo in message.
9165
9166 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9167
9168 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9169
9170 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9171
9172 * infrun.c (process_event_stop_test): Call
9173 gdbarch_in_indirect_branch_thunk.
9174 * gdbarch.sh (in_indirect_branch_thunk): New.
9175 * gdbarch.c: Regenerated.
9176 * gdbarch.h: Regenerated.
9177 * x86-tdep.h: New.
9178 * x86-tdep.c: New.
9179 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9180 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9181 (ALLDEPFILES): Add x86-tdep.c.
9182 * arch-utils.h (default_in_indirect_branch_thunk): New.
9183 * arch-utils.c (default_in_indirect_branch_thunk): New.
9184 * i386-tdep: Include x86-tdep.h.
9185 (i386_in_indirect_branch_thunk): New.
9186 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9187 function.
9188 * amd64-tdep: Include x86-tdep.h.
9189 (amd64_in_indirect_branch_thunk): New.
9190 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9191
9192 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9193
9194 PR gdb/23053
9195 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9196 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9197 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9198 regression.
9199
9200 2018-04-12 Tom Tromey <tom@tromey.com>
9201
9202 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9203 (rust_evaluate_subexp): Likewise.
9204
9205 2018-04-12 Pedro Alves <palves@redhat.com>
9206
9207 * procfs.c (procfs_detach): Make forward declaration's prototype
9208 match definition's protototype.
9209 (proc_get_LDT_entry): Remove stale do_cleanups call.
9210
9211 2018-04-12 Pedro Alves <palves@redhat.com>
9212
9213 * target.h (target_ops::to_has_exited): Delete.
9214 (target_has_exited): Delete.
9215 * target-delegates.c: Regenerate.
9216
9217 2018-04-11 Pedro Alves <palves@redhat.com>
9218
9219 * target.c (fileio_fh_t::t): Add comment.
9220 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9221 (target_fileio_close): Handle a NULL target.
9222 (invalidate_fileio_fh): New.
9223 (target_close): Call it.
9224 * remote.c (remote_hostio_send_command): No longer check whether
9225 remote_desc is open.
9226
9227 2018-04-11 Pedro Alves <palves@redhat.com>
9228
9229 * target.c (fileio_fh_t): Make it a named struct instead of a
9230 typedef.
9231 (fileio_fh_t::is_closed): New method.
9232 (DEF_VEC_O (fileio_fh_t)): Remove.
9233 (fileio_fhandles): Now a std::vector.
9234 (is_closed_fileio_fh): Delete.
9235 (acquire_fileio_fd): Adjust. Rename parameters.
9236 (release_fileio_fd): Adjust.
9237 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9238 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9239 (target_fileio_close): Adjust.
9240
9241 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9242
9243 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9244 index.
9245
9246 2018-04-10 Pedro Alves <palves@redhat.com>
9247
9248 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9249 (scoped_finish_thread_state): New class.
9250 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9251 cleanup.
9252 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9253 (fetch_inferior_event, normal_stop): Likewise.
9254 * thread.c (finish_thread_state_cleanup): Delete.
9255
9256 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9257 Pedro Alves <palves@redhat.com>
9258
9259 * value.c: Include "selftest.h" and "common/array-view.h".
9260 (struct range) <operator ==>: New.
9261 (test_ranges_contain): New.
9262 (check_ranges_vector): New.
9263 (test_insert_into_bit_range_vector): New.
9264 (_initialize_values): Register selftests.
9265 * common/array-view.h (operator==, operator!=): New.
9266
9267 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9268
9269 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9270 an iterator.
9271 * inline-frame.c: Include <algorithm>.
9272 (struct inline_state): Add constructor.
9273 (inline_state_s): Remove.
9274 (DEF_VEC_O(inline_state_s)): Remove.
9275 (inline_states): Change type to std::vector.
9276 (find_inline_frame_state): Adjust to std::vector.
9277 (allocate_inline_frame_state): Remove.
9278 (clear_inline_frame_state): Adjust to std::vector.
9279 (skip_inline_frames): Adjust to std::vector.
9280
9281 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9282
9283 * tracepoint.h (struct trace_state_variable): Add constructor.
9284 <name>: Change type to std::string.
9285 * tracepoint.c (tsv_s): Remove.
9286 (DEF_VEC_O(tsv_s)): Remove.
9287 (tvariables): Change to std::vector.
9288 (create_trace_state_variable): Adjust to std::vector.
9289 (find_trace_state_variable): Likewise.
9290 (find_trace_state_variable_by_number): Likewise.
9291 (delete_trace_state_variable): Likewise.
9292 (trace_variable_command): Adjust to std::string.
9293 (delete_trace_variable_command): Likewise.
9294 (tvariables_info_1): Adjust to std::vector.
9295 (save_trace_state_variables): Likewise.
9296 (start_tracing): Likewise.
9297 (merge_uploaded_trace_state_variables): Adjust to std::vector
9298 and std::string.
9299 * target.h (struct target_ops)
9300 <to_download_trace_state_variable>: Pass reference to
9301 trace_state_variable.
9302 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9303 * target-delegates.c: Re-generate.
9304 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9305 (mi_tsv_deleted): Likewise.
9306 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9307 * remote.c (remote_download_trace_state_variable): Change
9308 pointer to reference and adjust.
9309 * make-target-delegates (parse_argtypes): Handle references.
9310 (write_function_header): Likewise.
9311 (munge_type): Likewise.
9312
9313 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9314
9315 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9316 string_view-selftests.c.
9317 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9318 testsuite.
9319 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9320 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9321 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9322 * unittests/basic_string_view/element_access/char/1.cc:
9323 Likewise.
9324 * unittests/basic_string_view/element_access/char/empty.cc:
9325 Likewise.
9326 * unittests/basic_string_view/element_access/char/front_back.cc:
9327 Likewise.
9328 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9329 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9330 Likewise.
9331 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9332 Likewise.
9333 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9334 Likewise.
9335 * unittests/basic_string_view/operations/compare/char/1.cc:
9336 Likewise.
9337 * unittests/basic_string_view/operations/compare/char/13650.cc:
9338 Likewise.
9339 * unittests/basic_string_view/operations/copy/char/1.cc:
9340 Likewise.
9341 * unittests/basic_string_view/operations/data/char/1.cc:
9342 Likewise.
9343 * unittests/basic_string_view/operations/find/char/1.cc:
9344 Likewise.
9345 * unittests/basic_string_view/operations/find/char/2.cc:
9346 Likewise.
9347 * unittests/basic_string_view/operations/find/char/3.cc:
9348 Likewise.
9349 * unittests/basic_string_view/operations/find/char/4.cc:
9350 Likewise.
9351 * unittests/basic_string_view/operations/rfind/char/1.cc:
9352 Likewise.
9353 * unittests/basic_string_view/operations/rfind/char/2.cc:
9354 Likewise.
9355 * unittests/basic_string_view/operations/rfind/char/3.cc:
9356 Likewise.
9357 * unittests/basic_string_view/operations/substr/char/1.cc:
9358 Likewise.
9359 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9360 * unittests/string_view-selftests.c: New file.
9361
9362 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9363
9364 * unittests/basic_string_view/capacity/1.cc: New file.
9365 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9366 * unittests/basic_string_view/cons/char/1.cc: New file.
9367 * unittests/basic_string_view/cons/char/2.cc: New file.
9368 * unittests/basic_string_view/cons/char/3.cc: New file.
9369 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9370 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9371 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9372 * unittests/basic_string_view/element_access/char/1.cc: New file.
9373 * unittests/basic_string_view/element_access/char/2.cc: New file.
9374 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9375 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9376 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9377 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9378 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9379 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9380 * unittests/basic_string_view/include.cc: New file.
9381 * unittests/basic_string_view/inserters/char/1.cc: New file.
9382 * unittests/basic_string_view/inserters/char/2.cc: New file.
9383 * unittests/basic_string_view/inserters/char/3.cc: New file.
9384 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9385 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9386 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9387 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9388 * unittests/basic_string_view/literals/types.cc: New file.
9389 * unittests/basic_string_view/literals/values.cc: New file.
9390 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9391 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9392 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9393 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9394 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9395 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9396 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9397 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9398 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9399 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9400 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9401 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9402 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9403 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9404 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9405 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9406 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9407 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9408 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9409 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9410 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9411 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9412 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9413 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9414 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9415 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9416 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9417 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9418 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9419 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9420 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9421 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9422 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9423 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9424 * unittests/basic_string_view/operators/char/2.cc: New file.
9425 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9426 * unittests/basic_string_view/range_access/char/1.cc: New file.
9427 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9428 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9429 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9430 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9431 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9432 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9433 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9434 * unittests/basic_string_view/typedefs.cc: New file.
9435 * unittests/basic_string_view/types/1.cc: New file.
9436
9437 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9438
9439 * common/gdb_string_view.h: Remove libstdc++ implementation
9440 details, adjust to gdb reality.
9441 * common/gdb_string_view.tcc: Likewise.
9442 * cli/cli-script.c (struct string_view): Remove.
9443 (user_args) <m_args>: Change element type to gdb::string_view.
9444 (user_args::insert_args): Adjust.
9445
9446 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9447
9448 * common/gdb_string_view.h: New file.
9449 * common/gdb_string_view.tcc: New file.
9450
9451 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9452
9453 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9454 * configure: Re-generate.
9455
9456 2018-04-09 Pedro Alves <palves@redhat.com>
9457
9458 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9459 (set_target_gdbarch): Call
9460 gdb::observers::architecture_changed.notify instead of
9461 observer_notify_architecture_changed.
9462
9463 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9464
9465 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9466 (do_restore_current_traceframe_cleanup): Remove.
9467 (restore_current_traceframe_cleanup_dtor): Remove.
9468 (make_cleanup_restore_current_traceframe): Remove.
9469 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9470 New.
9471 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9472 * infrun.c (fetch_inferior_event): Use
9473 scoped_restore_current_traceframe.
9474
9475 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9476
9477 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9478 Remove.
9479 <n_allocated_type_units>: Remove.
9480 <all_type_units>: Change to std::vector.
9481 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9482 to std::vector change.
9483 (dwarf2_per_objfile::get_cutu): Likewise.
9484 (dwarf2_per_objfile::get_tu): Likewise.
9485 (create_signatured_type_table_from_index): Likewise.
9486 (create_signatured_type_table_from_debug_names): Likewise.
9487 (dw2_symtab_iter_next): Likewise.
9488 (dw2_print_stats): Likewise.
9489 (dw2_expand_all_symtabs): Likewise.
9490 (dw2_expand_marked_cus): Likewise.
9491 (dw2_debug_names_iterator::next): Likewise.
9492 (dwarf2_initialize_objfile): Likewise.
9493 (add_signatured_type_cu_to_table): Likewise.
9494 (create_all_type_units): Likewise.
9495 (add_type_unit): Likewise.
9496 (struct tu_abbrev_offset): Add constructor.
9497 (build_type_psymtabs_1): Adjust to std::vector change.
9498 (print_tu_stats): Likewise.
9499 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9500 (write_debug_names): Likewise.
9501
9502 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9503
9504 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9505 Make an std::vector.
9506 <n_comp_units>: Remove.
9507 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9508 to std::vector change.
9509 (dwarf2_per_objfile::get_cutu): Likewise.
9510 (dwarf2_per_objfile::get_cu): Likewise.
9511 (create_cus_from_index): Likewise.
9512 (create_addrmap_from_index): Likewise.
9513 (create_addrmap_from_aranges): Likewise.
9514 (dwarf2_read_index): Likewise.
9515 (dw2_find_last_source_symtab): Likewise.
9516 (dw2_map_symtabs_matching_filename): Likewise.
9517 (dw2_symtab_iter_next): Likewise.
9518 (dw2_print_stats): Likewise.
9519 (dw2_expand_all_symtabs): Likewise.
9520 (dw2_expand_symtabs_with_fullname): Likewise.
9521 (dw2_expand_marked_cus): Likewise.
9522 (dw2_map_symbol_filenames): Likewise.
9523 (create_cus_from_debug_names): Likewise.
9524 (dwarf2_read_debug_names): Likewise.
9525 (dw2_debug_names_iterator::next): Likewise.
9526 (dwarf2_initialize_objfile): Likewise.
9527 (set_partial_user): Likewise.
9528 (dwarf2_build_psymtabs_hard): Likewise.
9529 (read_comp_units_from_section): Remove arguments, adjust to
9530 std::vector change.
9531 (create_all_comp_units): Adjust to std::vector and
9532 read_comp_units_from_section changes.
9533 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9534 change.
9535 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9536 (psyms_seen_size): Likewise.
9537 (write_gdbindex): Likewise.
9538 (write_debug_names): Likewise.
9539
9540 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9541
9542 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9543 with dwarf2_per_objfile.
9544 (create_cus_from_index): Likewise.
9545 (create_signatured_type_table_from_index): Likewise.
9546 (dwarf2_read_index): Likewise.
9547 (dwarf2_initialize_objfile): Likewise.
9548 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9549 per_cu rather than get_dwarf2_per_objfile.
9550
9551 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9552
9553 * dwarf2read.h (struct signatured_type): Forward declare.
9554 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9555 New methods.
9556 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9557 (dw2_get_cutu): ...this.
9558 (dwarf2_per_objfile::get_cu): Rename from...
9559 (dw2_get_cu): ...this.
9560 (dwarf2_per_objfile::get_tu): New.
9561 (create_addrmap_from_index): Adjust.
9562 (create_addrmap_from_aranges): Adjust.
9563 (dw2_find_last_source_symtab): Adjust.
9564 (dw2_map_symtabs_matching_filename): Adjust.
9565 (dw2_symtab_iter_next): Adjust.
9566 (dw2_print_stats): Adjust.
9567 (dw2_expand_all_symtabs): Adjust.
9568 (dw2_expand_symtabs_with_fullname): Adjust.
9569 (dw2_expand_marked_cus): Adjust.
9570 (dw_expand_symtabs_matching_file_matcher): Adjust.
9571 (dw2_map_symbol_filenames): Adjust.
9572 (dw2_debug_names_iterator::next): Adjust.
9573 (dwarf2_initialize_objfile): Adjust.
9574 (set_partial_user): Adjust.
9575 (dwarf2_build_psymtabs_hard): Adjust.
9576
9577 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9578
9579 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9580 Remove unused variables.
9581 (dw2_map_symtabs_matching_filename): Likewise.
9582 (dwarf2_record_block_ranges): Likewise.
9583 (dwarf2_read_addr_index): Likewise.
9584 (follow_die_offset): Likewise.
9585
9586 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9587
9588 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9589 to symbol_file_add_main.
9590
9591 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9592
9593 PR mi/22299
9594 * mi/mi-console.c (do_fputc_async_safe): New.
9595 (mi_console_file::write_async_safe): New.
9596 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9597 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9598 New.
9599 * ui-file.c (ui_file::putstrn): Adjust call to
9600 fputstrn_unfiltered.
9601 * utils.c (printchar): Replace do_fputs and do_fprintf
9602 parameters by do_fputc.
9603 (fputstr_filtered): Adjust call to printchar.
9604 (fputstr_unfiltered): Likewise.
9605 (fputstrn_filtered): Likewise.
9606 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9607 printchar.
9608 * utils.h (do_fputc_ftype): New typedef.
9609 (fputstrn_unfiltered): Add do_fputc parameter.
9610
9611 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9612
9613 * regformats/i386/i386-avx.dat: Remove.
9614
9615 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9616
9617 PR gdb/22979
9618 * amd64-tdep.c (amd64_none_init_abi): New function.
9619 (amd64_x32_none_init_abi): New function.
9620 (_initialize_amd64_tdep): Register handlers for x86-64 and
9621 x64_32 with GDB_OSABI_NONE.
9622 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9623 GDB_OSABI_NONE osabi.
9624
9625 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9626
9627 PR gdb/22980
9628 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9629 GDB_OSABI_NONE.
9630 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9631 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9632
9633 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9634
9635 * common/byte-vector.h (char_vector): New type.
9636 * target.h (target_read_alloc): Return
9637 gdb::optional<byte_vector>.
9638 (target_read_stralloc): Return gdb::optional<char_vector>.
9639 (target_get_osdata): Return gdb::optional<char_vector>.
9640 * target.c (target_read_alloc_1): Templatize. Replacement
9641 manual memory management with vector.
9642 (target_read_alloc): Change return type, adjust.
9643 (target_read_stralloc): Change return type, adjust.
9644 (target_get_osdata): Change return type, adjust.
9645 * auxv.c (struct auxv_info) <length>: Remove.
9646 <data>: Change type to gdb::optional<byte_vector>.
9647 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9648 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9649 (target_auxv_search): Adjust.
9650 (fprint_target_auxv): Adjust.
9651 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9652 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9653 (linux_make_corefile_notes): Adjust.
9654 * osdata.c (get_osdata): Adjust.
9655 * remote.c (remote_get_threads_with_qxfer): Adjust.
9656 (remote_memory_map): Adjust.
9657 (remote_traceframe_info): Adjust.
9658 (btrace_read_config): Adjust.
9659 (remote_read_btrace): Adjust.
9660 (remote_pid_to_exec_file): Adjust.
9661 * solib-aix.c (solib_aix_get_library_list): Adjust.
9662 * solib-dsbt.c (decode_loadmap): Don't free buf.
9663 (dsbt_get_initial_loadmaps): Adjust.
9664 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9665 * solib-target.c (solib_target_current_sos): Adjust.
9666 * tracepoint.c (sdata_make_value): Adjust.
9667 * xml-support.c (xinclude_start_include): Adjust.
9668 (xml_fetch_content_from_file): Adjust.
9669 * xml-support.h (xml_fetch_another): Change return type.
9670 (xml_fetch_content_from_file): Change return type.
9671 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9672 * xml-tdesc.c (file_read_description_xml): Adjust.
9673 (fetch_available_features_from_target): Change return type.
9674 (target_fetch_description_xml): Adjust.
9675 (target_read_description_xml): Adjust.
9676
9677 2018-04-06 Tom Tromey <tom@tromey.com>
9678
9679 * value.c (~value): Update.
9680 (struct value) <contents>: Now unique_xmalloc_ptr.
9681 (value_contents_bits_eq, allocate_value_contents)
9682 (value_contents_raw, value_contents_all_raw)
9683 (value_contents_for_printing, value_contents_for_printing_const)
9684 (set_value_enclosing_type): Update.
9685
9686 2018-04-06 Tom Tromey <tom@tromey.com>
9687
9688 * value.c (range_s): Remove typedef, VEC.
9689 (struct range): Add operator<.
9690 (range_lessthan): Remove.
9691 (ranges_contain): Change type.
9692 (~value): Update.
9693 (struct value) <unavailable, optimized_out>: Now std::vector.
9694 (value_entirely_available)
9695 (value_entirely_covered_by_range_vector)
9696 (value_entirely_unavailable, value_entirely_optimized_out):
9697 Update.
9698 (insert_into_bit_range_vector): Change argument type.
9699 (find_first_range_overlap): Likewise.
9700 (struct ranges_and_idx, value_contents_bits_eq)
9701 (require_not_optimized_out, require_available): Update.
9702 (ranges_copy_adjusted): Change argument types.
9703 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9704
9705 2018-04-06 Tom Tromey <tom@tromey.com>
9706
9707 * value.c (~value): Update.
9708 (struct value) <parent>: Now a value_ref_ptr.
9709 (value_parent, set_value_parent, value_address, value_copy):
9710 Update.
9711
9712 2018-04-06 Tom Tromey <tom@tromey.com>
9713
9714 * value.c (struct value): Add constructor, destructor, and member
9715 initializers.
9716 (allocate_value_lazy, value_decref): Update.
9717
9718 2018-04-06 Tom Tromey <tom@tromey.com>
9719
9720 * value.c (struct value) <released, next>: Remove.
9721 (all_values): Now a std::vector.
9722 (allocate_value_lazy): Update.
9723 (value_next): Remove.
9724 (value_mark, value_free_to_mark, release_value)
9725 (value_release_to_mark): Update.
9726
9727 2018-04-06 Tom Tromey <tom@tromey.com>
9728
9729 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9730 (free_value_chain): Remove.
9731 * value.c (free_value_chain): Remove.
9732 (value_release_to_mark): Return a std::vector.
9733 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9734 std::vector.
9735 (check_condition): Update.
9736 * eval.c (fetch_subexp_value): Change "val_chain" to a
9737 std::vector.
9738 * breakpoint.c (update_watchpoint): Update.
9739 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9740
9741 2018-04-06 Tom Tromey <tom@tromey.com>
9742
9743 * value.h (free_all_values): Remove.
9744 * value.c (free_all_values): Remove.
9745
9746 2018-04-06 Tom Tromey <tom@tromey.com>
9747
9748 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9749 (value_history_chain, value_history_count): Remove.
9750 (value_history): New global.
9751 (record_latest_value, access_value_history, show_values)
9752 (preserve_values): Update.
9753
9754 2018-04-06 Tom Tromey <tom@tromey.com>
9755
9756 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9757 * varobj.c (varobj_set_display_format, varobj_set_value)
9758 (install_default_visualizer, construct_visualizer)
9759 (install_new_value, ~varobj, varobj_get_value_type)
9760 (my_value_of_variable, varobj_editable_p): Update.
9761 * c-varobj.c (c_describe_child, c_value_of_variable)
9762 (cplus_number_of_children, cplus_describe_child): Update.
9763 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9764 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9765 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9766
9767 2018-04-06 Tom Tromey <tom@tromey.com>
9768
9769 * printcmd.c (last_examine_address): Change type to
9770 value_ref_ptr.
9771 (do_examine, x_command): Update.
9772
9773 2018-04-06 Tom Tromey <tom@tromey.com>
9774
9775 * value.c (release_value): Update.
9776 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9777 (struct bpstats) <val>: Now a value_ref_ptr.
9778 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9779 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9780 (~watchpoint, print_it_watchpoint, watch_command_1)
9781 (invalidate_bp_value_on_memory_change): Update.
9782
9783 2018-04-06 Tom Tromey <tom@tromey.com>
9784
9785 * varobj.c (varobj_clear_saved_item)
9786 (update_dynamic_varobj_children, install_new_value, ~varobj):
9787 Update.
9788 * value.h (value_incref): Move declaration earlier.
9789 (value_decref): Rename from value_free.
9790 (struct value_ref_policy): New.
9791 (value_ref_ptr): New typedef.
9792 (struct value_deleter): Remove.
9793 (gdb_value_up): Remove typedef.
9794 (release_value): Change return type.
9795 (release_value_or_incref): Remove.
9796 * value.c (set_value_parent): Update.
9797 (value_incref): Change return type.
9798 (value_decref): Rename from value_free.
9799 (value_free_to_mark, free_all_values, free_value_chain): Update.
9800 (release_value): Return value_ref_ptr.
9801 (release_value_or_incref): Remove.
9802 (record_latest_value, set_internalvar, clear_internalvar):
9803 Update.
9804 * stack.c (info_frame_command): Don't call value_free.
9805 * python/py-value.c (valpy_dealloc, valpy_new)
9806 (value_to_value_object): Update.
9807 * printcmd.c (do_examine): Update.
9808 * opencl-lang.c (lval_func_free_closure): Update.
9809 * mi/mi-main.c (register_changed_p): Don't call value_free.
9810 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9811 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9812 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9813 value_free.
9814 * guile/scm-value.c (vlscm_free_value_smob)
9815 (vlscm_scm_from_value): Update.
9816 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9817 (frame_unwind_register_unsigned, get_frame_register_bytes)
9818 (put_frame_register_bytes): Don't call value_free.
9819 * findvar.c (address_from_register): Don't call value_free.
9820 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9821 * dwarf2loc.c (entry_data_value_free_closure)
9822 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9823 (dwarf2_evaluate_loc_desc_full): Update.
9824 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9825 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9826 (~watchpoint, watch_command_1)
9827 (invalidate_bp_value_on_memory_change): Update.
9828 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9829
9830 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9831
9832 PR gdb/23022
9833 * warning.m4: Add -Wno-error=deprecated-register.
9834 * configure: Re-generate.
9835
9836 2018-04-05 Tom Tromey <tom@tromey.com>
9837
9838 * linespec.h: Remove include of "vec.h".
9839
9840 2018-04-05 Tom Tromey <tom@tromey.com>
9841
9842 * linespec.c (typep): Remove typedef.
9843 (find_methods, find_superclass_methods): Take a std::vector.
9844 (find_method): Use std::vector.
9845
9846 2018-04-05 Tom Tromey <tom@tromey.com>
9847
9848 * utils.c (compare_strings): Remove.
9849 * utils.h (compare_strings): Remove.
9850 * objc-lang.h (find_imps): Update.
9851 * objc-lang.c (find_methods): Take a std::vector.
9852 (uniquify_strings, find_imps): Likewise.
9853 * linespec.c (find_methods): Take a std::vector.
9854 (decode_objc): Use std::vector.
9855 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9856 a std::vector.
9857 (find_method, find_function_symbols): Use std::vector.
9858
9859 2018-04-05 Tom Tromey <tom@tromey.com>
9860
9861 * completer.c (completion_tracker::completion_tracker): Remove
9862 cast.
9863 (completion_tracker::discard_completions): Likewise.
9864 * breakpoint.c (ambiguous_names_p): Remove cast.
9865 * ada-lang.c (_initialize_ada_language): Remove cast.
9866 * utils.h (streq): Update.
9867 (streq_hash): Add new declaration.
9868 * utils.c (streq): Return bool.
9869 (streq_hash): New function.
9870
9871 2018-04-05 Tom Tromey <tom@tromey.com>
9872
9873 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9874 Remove a string copy.
9875
9876 2018-04-05 Tom Tromey <tom@tromey.com>
9877
9878 * linespec.c (filter_results): Use std::vector.
9879 (decode_line_2, decode_line_full): Update.
9880
9881 2018-04-05 Tom Tromey <tom@tromey.com>
9882
9883 * linespec.c (canonical_to_fullform): Return std::string.
9884 (filter_results): Update.
9885 (struct decode_line_2_item): Add constructor.
9886 <fullform, displayform>: Now std::string.
9887 (decode_line_2_compare_items): Now a std::sort comparator.
9888 (decode_line_2): Update.
9889
9890 2018-04-05 Tom Tromey <tom@tromey.com>
9891
9892 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9893 (unexpected_linespec_error): Update.
9894 (linespec_parse_basic, parse_linespec): Update.
9895
9896 2018-04-05 Tom Tromey <tom@tromey.com>
9897
9898 * linespec.c (linespec_parse_basic): Reindent.
9899
9900 2018-04-05 Tom Tromey <tom@tromey.com>
9901
9902 * minsyms.h (iterate_over_minimal_symbols): Update.
9903 * minsyms.c (iterate_over_minimal_symbols): Take a
9904 gdb::function_view.
9905 * linespec.c (struct collect_minsyms): Remove.
9906 (compare_msyms): Now a std::sort comparator.
9907 (add_minsym): Add parameters.
9908 (search_minsyms_for_name): Update. Use std::vector.
9909
9910 2018-04-03 Tom Tromey <tom@tromey.com>
9911
9912 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9913 gdb::byte_vector.
9914
9915 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9916
9917 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9918
9919 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9920
9921 PR gdb/16959
9922 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9923 printing static type.
9924
9925 2018-04-01 Tom Tromey <tom@tromey.com>
9926
9927 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9928 (rs6000_xfer_shared_libraries): Update.
9929
9930 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9931
9932 * common/gdb_vecs.h (char_ptr): Remove.
9933 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9934
9935 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9936
9937 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9938 with std::vector.
9939 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9940
9941 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9942
9943 * tracepoint.h (struct uploaded_tp): Initialize fields.
9944 <actions, step_actions, cmd_strings>: Change type to
9945 std::vector<char *>.
9946 * tracepoint.c (get_uploaded_tp): Allocate with new.
9947 (free_uploaded_tps): Free with delete.
9948 (parse_tracepoint_definition): Adjust to std::vector change.
9949 * breakpoint.c (read_uploaded_action): Likewise.
9950 (create_tracepoint_from_upload): Likewise.
9951 * ctf.c (ctf_write_uploaded_tp): Likewise.
9952 (SET_ARRAY_FIELD): Likewise.
9953 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9954
9955 2018-03-30 Tom Tromey <tom@tromey.com>
9956
9957 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9958 std::unique_ptr.
9959 (svr4_keep_data_in_core): Update.
9960 (svr4_read_so_list): Update.
9961
9962 2018-03-30 Tom Tromey <tom@tromey.com>
9963
9964 * windows-nat.c (handle_output_debug_string, handle_exception):
9965 Update.
9966 * target.h (target_read_string): Update.
9967 * target.c (target_read_string): Change "string" to
9968 unique_xmalloc_ptr.
9969 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9970 Update.
9971 * solib-frv.c (frv_current_sos): Update.
9972 * solib-dsbt.c (dsbt_current_sos): Update.
9973 * solib-darwin.c (darwin_current_sos): Update.
9974 * linux-thread-db.c (inferior_has_bug): Update.
9975 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9976 Update. Remove alloca.
9977 * ada-lang.c (ada_main_name): Update.
9978
9979 2018-03-30 Tom Tromey <tom@tromey.com>
9980
9981 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9982 (struct dwo_file_deleter): New.
9983 (dwo_file_up): New typedef.
9984 (open_and_init_dwo_file): Use dwo_file_up.
9985 (free_dwo_file_cleanup): Remove.
9986
9987 2018-03-30 Tom Tromey <tom@tromey.com>
9988
9989 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9990 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9991
9992 2018-03-30 Tom Tromey <tom@tromey.com>
9993
9994 * dwarf2read.c (class free_cached_comp_units): New class.
9995 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9996 (free_cached_comp_units): Remove function.
9997
9998 2018-03-30 Tom Tromey <tom@tromey.com>
9999
10000 * utils.h (make_cleanup_unpush_target): Remove.
10001 * inf-ptrace.c (struct target_unpusher): New.
10002 (target_unpush_up) New typedef.
10003 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10004 target_unpush_up.
10005 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10006
10007 2018-03-27 Tom Tromey <tom@tromey.com>
10008
10009 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10010
10011 2018-03-27 Pedro Alves <palves@redhat.com>
10012 Tom Tromey <tom@tromey.com>
10013
10014 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10015 destructor. Now a class.
10016 (gdb_readline_wrapper_cleanup): Remove function.
10017 (gdb_readline_wrapper): Remove cleanups.
10018
10019 2018-03-27 Tom Tromey <tom@tromey.com>
10020
10021 * typeprint.h (struct type_print_options) <local_typedefs,
10022 global_typedefs>: Remove "struct" keyword.
10023 (class typedef_hash_table): New class.
10024 (recursively_update_typedef_hash, add_template_parameters)
10025 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10026 (find_typedef_in_hash): Don't declare.
10027 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10028 (typedef_hash_table::recursively_update): Rename from
10029 recursively_update_typedef_hash. Now a member.
10030 (typedef_hash_table::add_template_parameters): Rename from
10031 add_template_parameters. Now a member.
10032 (typedef_hash_table::typedef_hash_table): Now a constructor;
10033 rename from create_typedef_hash.
10034 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10035 rename from free_typedef_hash.
10036 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10037 (do_free_global_table): Remove.
10038 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10039 from copy_type_recursive.
10040 (create_global_typedef_table): Remove.
10041 (typedef_hash_table::find_global_typedef): Now a member of
10042 typedef_hash_table.
10043 (typedef_hash_table::find_typedef): Rename from
10044 find_typedef_in_hash; now a member.
10045 (whatis_exp): Update.
10046 * extension.h (struct ext_lang_type_printers): Add constructor and
10047 destructor.
10048 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10049 declare.
10050 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10051 Now a constructor; rename from start_ext_lang_type_printers.
10052 (ext_lang_type_printers): Now a destructor; rename from
10053 free_ext_lang_type_printers.
10054 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10055 Update.
10056 (c_type_print_base_struct_union): Update. Remove cleanups.
10057
10058 2018-03-27 Tom Tromey <tom@tromey.com>
10059
10060 * dwarf-index-write.c: Include <cmath>.
10061
10062 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10063
10064 * NEWS: Add entry describing new "set|show varsize-limit" command.
10065 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10066 command.
10067 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10068 "set variable".
10069
10070 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10071
10072 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10073 dwarf-index-write.c
10074 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10075 * dwarf-index-common.c: New file.
10076 * dwarf-index-common.h: New file.
10077 * dwarf-index-write.c: New file.
10078 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10079 (struct dwarf2_section_info): Move from here.
10080 (dwarf2_section_info_def): Likewise.
10081 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10082 (offset_type): Likewise.
10083 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10084 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10085 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10086 (byte_swap): Likewise.
10087 (MAYBE_SWAP): Likewise.
10088 (dwarf2_per_cu_ptr): Likewise.
10089 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10090 (struct tu_stats): Likewise.
10091 (struct dwarf2_per_objfile): Likewise.
10092 (struct dwarf2_per_cu_data): Likewise.
10093 (struct signatured_type): Likewise.
10094 (sig_type_ptr): Likewise.
10095 (DEF_VEC_P (sig_type_ptr)): Likewise.
10096 (INDEX4_SUFFIX): Likewise.
10097 (INDEX5_SUFFIX): Likewise.
10098 (DEBUG_STR_SUFFIX): Likewise.
10099 (dwarf2_read_section): Make non-static.
10100 (mapped_index_string_hash): Move from here.
10101 (dwarf5_djb_hash): Likewise.
10102 (file_write): Likewise.
10103 (class data_buf): Likewise.
10104 (struct symtab_index_entry): Likewise.
10105 (struct mapped_symtab): Likewise.
10106 (find_slot): Likewise.
10107 (hash_expand): Likewise.
10108 (add_index_entry): Likewise.
10109 (uniquify_cu_indices): Likewise.
10110 (class c_str_view): Likewise.
10111 (class c_str_view_hasher): Likewise.
10112 (class vector_hasher): Likewise.
10113 (write_hash_table): Likewise.
10114 (psym_index_map): Likewise.
10115 (struct addrmap_index_data): Likewise.
10116 (add_address_entry): Likewise.
10117 (add_address_entry_worker): Likewise.
10118 (write_address_map): Likewise.
10119 (symbol_kind): Likewise.
10120 (write_psymbols): Likewise.
10121 (struct signatured_type_index_data): Likewise.
10122 (write_one_signatured_type): Likewise.
10123 (recursively_count_psymbols): Likewise.
10124 (recursively_write_psymbols): Likewise.
10125 (class debug_names): Likewise.
10126 (check_dwarf64_offsets): Likewise.
10127 (psyms_seen_size): Likewise.
10128 (write_gdbindex): Likewise.
10129 (write_debug_names): Likewise.
10130 (assert_file_size): Likewise.
10131 (write_psymtabs_to_index): Likewise.
10132 (save_gdb_index_command): Likewise.
10133 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10134 command.
10135 * dwarf2read.h: New file.
10136
10137 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10138
10139 PR gdb/22670
10140 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10141 symbol name if the CU's language stores symbol names in linkage
10142 format.
10143 * language.h (struct language_defn)
10144 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10145 all instances of this struct.
10146
10147 2018-03-26 Tom Tromey <tom@tromey.com>
10148
10149 * stack.c (backtrace_command_1): Remove verbose code.
10150
10151 2018-03-26 Tom Tromey <tom@tromey.com>
10152
10153 * python/py-framefilter.c (py_print_type): Don't catch
10154 exceptions. Return void.
10155 (py_print_value): Likewise.
10156 (py_print_single_arg): Likewise.
10157 (enumerate_args): Don't catch exceptions.
10158 (py_print_args): Likewise.
10159 (py_print_frame): Likewise.
10160 (gdbpy_apply_frame_filter): Catch exceptions here.
10161
10162 2018-03-26 Tom Tromey <tom@tromey.com>
10163
10164 * stack.c (_initialize_stack): Remove trailing newlines from help
10165 text. Add "Usage" line to "backtrace" help.
10166
10167 2018-03-26 Tom Tromey <tom@tromey.com>
10168
10169 PR python/16486:
10170 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10171
10172 2018-03-26 Tom Tromey <tom@tromey.com>
10173
10174 * python/py-framefilter.c (py_print_single_arg): Return
10175 EXT_LANG_BT_ERROR from catch.
10176
10177 2018-03-26 Tom Tromey <tom@tromey.com>
10178
10179 PR backtrace/15584:
10180 * stack.c (backtrace_command_1): Move some code into no-filters
10181 "if".
10182
10183 2018-03-26 Tom Tromey <tom@tromey.com>
10184
10185 * python/py-framefilter.c (throw_quit_or_print_exception): New
10186 function.
10187 (gdbpy_apply_frame_filter): Use it.
10188
10189 2018-03-26 Tom Tromey <tom@tromey.com>
10190
10191 PR cli/17716:
10192 * python/py-framefilter.c (py_print_type, py_print_value)
10193 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10194 RETURN_MASK_ERROR.
10195
10196 2018-03-26 Tom Tromey <tom@tromey.com>
10197
10198 * python/py-framefilter.c (enumerate_args): Use
10199 gdb::unique_xmalloc_ptr.
10200
10201 2018-03-26 Tom Tromey <tom@tromey.com>
10202
10203 * python/py-framefilter.c (py_print_frame): Return
10204 EXT_LANG_BT_OK.
10205 (gdbpy_apply_frame_filter): Update comment.
10206 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10207 Remove.
10208 <EXT_LANG_BT_NO_FILTERS>: Change value.
10209
10210 2018-03-26 Tom Tromey <tom@tromey.com>
10211
10212 PR backtrace/15582:
10213 * stack.c (backtrace_command): Parse "hide" argument.
10214 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10215 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10216 constant.
10217
10218 2018-03-26 Tom Tromey <tom@tromey.com>
10219
10220 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10221 add "flags".
10222 (backtrace_command): Remove "fulltrace", add "flags".
10223
10224 2018-03-26 Tom Tromey <tom@tromey.com>
10225
10226 * stack.c (backtrace_command): Rewrite command line parsing.
10227
10228 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10229
10230 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10231
10232 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10233
10234 * filename-seen-cache.h: Add include guard.
10235
10236 2018-03-26 Keith Seitz <keiths@redhat.com>
10237
10238 * symfile.c (place_section): Remove "struct" from section_addr_info
10239 in comment.
10240 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10241 "struct" keyword from section_addr_info.
10242
10243 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10244
10245 * regformats/regdef.h (reg): Add constructors.
10246
10247 2018-03-25 Pedro Alves <palves@redhat.com>
10248
10249 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10250 if then/else bodies in var_func_name extraction.
10251
10252 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10253
10254 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10255 lookup_minimal_symbol() to find symbol entry.
10256 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10257
10258 2018-03-23 Keith Seitz <keiths@redhat.com>
10259
10260 PR c++/22968
10261 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10262 nested type definitions for C++, too.
10263
10264 2018-03-23 Tom Tromey <tom@tromey.com>
10265
10266 * machoread.c (struct oso_el): Add a constructor. Don't define as
10267 a typedef.
10268 (macho_register_oso): Remove.
10269 (macho_symtab_read): Take a std::vector.
10270 (oso_el_compare_name): Now a std::sort comparator.
10271 (macho_symfile_read_all_oso): Take a std::vector.
10272 (macho_symfile_read): Use std::vector. Remove cleanups.
10273
10274 2018-03-22 Tom Tromey <tom@tromey.com>
10275
10276 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10277 (record_full_goto_bookmark): Use std::string.
10278
10279 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10280
10281 PR tdep/18295
10282 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10283 a single mask.
10284
10285 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10286
10287 * rs6000-tdep.c (store_insn_p): New function.
10288 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10289 and cr_reg to their unshifted values. Use store_insn_p to
10290 match LR saves using either R1 or fdata->alloca_reg. Use
10291 store_insn_p to match CR saves. Set alloca_reg_offset
10292 when alloca_reg and framep are set. Remove lr_reg shift
10293 when assigning to fdata->lr_register.
10294
10295 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10296
10297 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10298 command line args instead of emitting a warning.
10299
10300 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10301
10302 * tracepoint.h (struct static_tracepoint_marker): Initialize
10303 fields, define default constructor, move constructor and move
10304 assignment, disable the rest.
10305 <str_id, extra>: Make std::string.
10306 (release_static_tracepoint_marker): Remove.
10307 (free_current_marker): Remove.
10308 * tracepoint.c (free_current_marker): Remove.
10309 (parse_static_tracepoint_marker_definition): Adjust to
10310 std::string, use new hex2str overload.
10311 (release_static_tracepoint_marker): Remove.
10312 (print_one_static_tracepoint_marker): Get marker by reference
10313 and adjust to std::string.
10314 (info_static_tracepoint_markers_command): Adjust to std::vector
10315 changes
10316 * target.h (static_tracepoint_marker_p): Remove typedef.
10317 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10318 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10319 bool.
10320 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10321 * target-debug.h
10322 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10323 (target_debug_print_std_vector_static_tracepoint_marker): New.
10324 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10325 to...
10326 (target_debug_print_static_tracepoint_marker_p): ... this.
10327 * target-delegates.c: Re-generate.
10328 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10329 Make std::string.
10330 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10331 (decode_static_tracepoint_spec): Adjust to std::vector.
10332 (tracepoint_print_one_detail): Adjust to std::string.
10333 (strace_marker_decode_location): Adjust to std::string.
10334 (update_static_tracepoint): Adjust to std::string, remove call
10335 to release_static_tracepoint_marker.
10336 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10337 Adjust to std::vector.
10338 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10339 (remote_static_tracepoint_markers_by_strid): Adjust to
10340 std::vector.
10341 * common/rsp-low.h (hex2str): New overload with explicit count
10342 of bytes.
10343 * common/rsp-low.c (hex2str): New overload with explicit count
10344 of bytes.
10345 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10346 (_initialize_rsp_low_selftests): Add test_hex2str test.
10347 * unittests/tracepoint-selftests.c
10348 (test_parse_static_tracepoint_marker_definition): Adjust to
10349 std::string.
10350
10351 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10352
10353 * tracepoint.c (parse_static_tracepoint_marker_definition):
10354 Consider case where the definition is followed by more
10355 definitions.
10356 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10357 tracepoint-selftests.c.
10358 * unittests/tracepoint-selftests.c: New.
10359
10360 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10361
10362 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10363 Carvalho.
10364
10365 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10366
10367 * symtab.c (find_pc_sect_line): fixed indentation.
10368
10369 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10370
10371 * symtab.c (find_pc_sect_line): now uses binary search.
10372
10373 2018-03-19 Tom Tromey <tom@tromey.com>
10374
10375 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10376 "IDENT" production.
10377
10378 2018-03-19 Pedro Alves <palves@redhat.com>
10379 Tom Tromey <tom@tromey.com>
10380
10381 * unittests/observable-selftests.c: New file.
10382 * common/observable.h: New file.
10383 * observable.h: New file.
10384 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10385 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10386 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10387 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10388 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10389 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10390 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10391 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10392 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10393 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10394 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10395 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10396 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10397 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10398 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10399 tui/tui-interp.c, valops.c: Update all users.
10400 * tui/tui-hooks.c (tui_bp_created_observer)
10401 (tui_bp_deleted_observer, tui_bp_modified_observer)
10402 (tui_inferior_exit_observer, tui_before_prompt_observer)
10403 (tui_normal_stop_observer, tui_register_changed_observer):
10404 Remove.
10405 (tui_observers_token): New global.
10406 (attach_or_detach, tui_attach_detach_observers): New functions.
10407 (tui_install_hooks, tui_remove_hooks): Use
10408 tui_attach_detach_observers.
10409 * record-btrace.c (record_btrace_thread_observer): Remove.
10410 (record_btrace_thread_observer_token): New global.
10411 * observer.sh: Remove.
10412 * observer.c: Rename to observable.c.
10413 * observable.c (namespace gdb_observers): Define new objects.
10414 (observer_debug): Move into gdb_observers namespace.
10415 (struct observer, struct observer_list, xalloc_observer_list_node)
10416 (xfree_observer_list_node, generic_observer_attach)
10417 (generic_observer_detach, generic_observer_notify): Remove.
10418 (_initialize_observer): Update.
10419 Don't include observer.inc.
10420 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10421 (clean mostlyclean): Likewise.
10422 (observer.h, observer.inc): Remove targets.
10423 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10424 (COMMON_SFILES): Use observable.c, not observer.c.
10425 * .gitignore: Remove observer.h.
10426
10427 2018-03-18 Tom Tromey <tom@tromey.com>
10428
10429 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10430 gdb::def_vector.
10431 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10432
10433 2018-03-17 Tom Tromey <tom@tromey.com>
10434
10435 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10436
10437 2018-03-17 Tom Tromey <tom@tromey.com>
10438
10439 * target.c (class scoped_target_fd): New.
10440 (target_fileio_close_cleanup): Remove.
10441 (target_fileio_read_alloc_1): Use scoped_target_fd.
10442
10443 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10444
10445 * silent-rules.mk: New.
10446 * Makefile.in: Include silent-rules.mk
10447 (srcdir, VPATH, top_srcdir): Move up.
10448 (COMPILE): Add ECHO_CXX.
10449 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10450 (init.c): Add ECHO_INIT_C.
10451 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10452 (version.c): Add ECHO_GEN.
10453 (printcmd.o): Add ECHO_CXX.
10454 (target-float.o): Add ECHO_CXX.
10455 (ada-exp.o): Add ECHO_CXX.
10456 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10457 (insight$(EXEEXT)): Add ECHO_CXXLD.
10458 * gnulib/configure.ac: Add AM_SILENT_RULES.
10459 * gnulib/aclocal.m4: Re-generate.
10460 * gnulib/configure: Re-generate.
10461 * gnulib/import/Makefile.in: Re-generate.
10462
10463 2018-03-16 Tom Tromey <tom@tromey.com>
10464
10465 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10466 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10467 * utils.c (do_free_section_addr_info)
10468 (make_cleanup_free_section_addr_info): Remove.
10469 * symfile.h (struct other_sections): Add constructor.
10470 (struct section_addr_info): Remove.
10471 (section_addr_info): New typedef.
10472 (struct sym_fns) <sym_offsets>: Change type of parameter.
10473 (build_section_addr_info_from_objfile)
10474 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10475 (default_symfile_offsets, symbol_file_add)
10476 (symbol_file_add_from_bfd)
10477 (build_section_addr_info_from_section_table): Update.
10478 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10479 * symfile.c (alloc_section_addr_info): Remove.
10480 (build_section_addr_info_from_section_table): Change return type.
10481 Update.
10482 (build_section_addr_info_from_bfd)
10483 (build_section_addr_info_from_objfile): Likewise.
10484 (free_section_addr_info): Remove.
10485 (relative_addr_info_to_section_offsets): Change type of "addrs".
10486 (addrs_section_compar): Now a std::sort comparator.
10487 (addrs_section_sort): Change return type.
10488 (addr_info_make_relative): Change type of "addrs". Update.
10489 (default_symfile_offsets, syms_from_objfile_1)
10490 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10491 (symbol_file_add_separate): Update.
10492 (symbol_file_add): Change type of "addrs". Update.
10493 (add_symbol_file_command): Update. Remove cleanups.
10494 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10495 cleanups.
10496 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10497 * solib.c (solib_read_symbols): Update.
10498 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10499 * machoread.c (macho_symfile_offsets): Update.
10500 * jit.c (jit_bfd_try_read_symtab): Update.
10501
10502 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10503
10504 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10505 unittests/utils-selftests.c.
10506 * unittests/utils-selftests.c: New file.
10507
10508 2018-03-14 Tom Tromey <tom@tromey.com>
10509
10510 PR cli/14977:
10511 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10512 for NULL.
10513
10514 2018-03-14 Tom Tromey <tom@tromey.com>
10515
10516 PR cli/19918:
10517 * printcmd.c (printf_pointer): Allow "-" in format.
10518
10519 2018-03-14 Tom Tromey <tom@tromey.com>
10520
10521 * printcmd.c (_initialize_printcmd): Add usage to printf.
10522
10523 2018-03-14 Yao Qi <qiyao@sourceware.org>
10524
10525 * MAINTAINERS: Update my email address.
10526
10527 2018-03-13 Tom Tromey <tom@tromey.com>
10528
10529 * machoread.c (macho_check_dsym): Change filenamep to a
10530 std::string*.
10531 (macho_symfile_read): Update.
10532 * symfile.c (load_command): Use std::string.
10533
10534 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10535
10536 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10537 to error message string.
10538 (riscv_register_name): Use xsnprintf instead of sprintf.
10539 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10540 internal_error.
10541 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10542 error.
10543 (riscv_push_dummy_call): Likewise.
10544
10545 2018-03-12 Tom Tromey <tom@tromey.com>
10546
10547 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10548 Use gdb::byte_vector.
10549 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10550
10551 2018-03-12 Yao Qi <yao.qi@linaro.org>
10552
10553 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10554 parameter type to readable_regcache.
10555 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10556 the declaration.
10557
10558 2018-03-11 Tom Tromey <tom@tromey.com>
10559
10560 * dwarf2read.c (struct nextfield): Add initializers.
10561 (struct nextfnfield): Remove.
10562 (struct fnfieldlist): Add initializers. Remove "length" and
10563 "head", use std::vector.
10564 (struct decl_field_list): Remove.
10565 (struct field_info): Add initializers.
10566 <fields, baseclasses>: Now std::vector.
10567 <nbaseclasses, nfnfields, typedef_field_list_count,
10568 nested_types_list_count>: Remove.
10569 (dwarf2_add_field, dwarf2_add_type_defn)
10570 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10571 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10572 (process_structure_scope): Update.
10573
10574 2018-03-11 Tom Tromey <tom@tromey.com>
10575
10576 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10577 for use by std::sort.
10578 (build_type_psymtabs_1): Use std::vector.
10579
10580 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10581
10582 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10583 and LIBMPFR in the printed configuration.
10584
10585 2018-03-08 Tom Tromey <tom@tromey.com>
10586
10587 * source.c (get_filename_and_charpos): Use scoped_fd.
10588 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10589 (procfs_pidlist): Likewise.
10590 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10591 (iterate_over_mappings): Likewise.
10592
10593 2018-03-08 Tom Tromey <tom@tromey.com>
10594
10595 * infcall.c (struct call_return_meta_info)
10596 <stack_temporaries_enabled>: Remove.
10597 (get_call_return_value, call_function_by_hand_dummy): Update.
10598 * thread.c (disable_thread_stack_temporaries): Remove.
10599 (enable_thread_stack_temporaries): Remove.
10600 (thread_stack_temporaries_enabled_p): Return bool.
10601 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10602 (get_last_thread_stack_temporary): Update.
10603 * eval.c (evaluate_subexp): Update.
10604 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10605 class, not a function.
10606 (value_ptr, value_vec): Remove typedefs.
10607 (class thread_info) <stack_temporaries_enabled>: Now bool.
10608 <stack_temporaries>: Now a std::vector.
10609 (thread_stack_temporaries_enabled_p)
10610 (value_in_thread_stack_temporaries): Return bool.
10611
10612 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10613
10614 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10615 (getpkt_or_notif_sane_1): Likewise.
10616
10617 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10618
10619 * build-id.c (build_id_to_debug_bfd): Use std::string.
10620
10621 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10622
10623 * build-id.c (find_separate_debug_file_by_buildid): Return
10624 std::string.
10625 * build-id.h (find_separate_debug_file_by_buildid): Return
10626 std::string.
10627 * coffread.c (coff_symfile_read): Adjust to std::string.
10628 * elfread.c (elf_symfile_read): Adjust to std::string.
10629 * symfile.c (separate_debug_file_exists): Change parameter to
10630 std::string.
10631 (find_separate_debug_file): Return std::string.
10632 (find_separate_debug_file_by_debuglink): Return std::string.
10633 * symfile.h (find_separate_debug_file_by_debuglink): Return
10634 std::string.
10635
10636 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10637
10638 * common/xml-utils.c (xml_escape_text): Move code to...
10639 (xml_escape_text_append): ... this new function.
10640 * common/xml-utils.h (xml_escape_text_append): New declaration.
10641 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10642 New function.
10643 (_initialize_xml_utils): register test_xml_escape_text_append as
10644 a selftest.
10645
10646 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10647
10648 * defs.h: Remove MAX_REGISTER_SIZE.
10649 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10650 asserts.
10651 * python/py-unwind.c (pyuw_sniffer): Likewise.
10652
10653 2018-03-07 Tom Tromey <tom@tromey.com>
10654
10655 * linux-tdep.c (linux_info_proc): Update.
10656 * target.h (struct target_ops) <to_fileio_readlink>: Return
10657 optional<string>.
10658 (target_fileio_readlink): Return optional<string>.
10659 * remote.c (remote_hostio_readlink): Return optional<string>.
10660 * inf-child.c (inf_child_fileio_readlink): Return
10661 optional<string>.
10662 * target.c (target_fileio_readlink): Return optional<string>.
10663
10664 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10665
10666 * regcache.c (cooked_read_test): Add riscv to the list of
10667 architectures that have a save_reggroup.
10668
10669 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10670
10671 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10672 value is not a dynamic class object.
10673
10674 2018-03-06 Tom Tromey <tom@tromey.com>
10675
10676 * rust-exp.y: Formatting fixes.
10677
10678 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10679
10680 * riscv-tdep.c (riscv_register_name): Remove target description
10681 support.
10682 (riscv_gdbarch_init): Remove target description check.
10683
10684 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10685
10686 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10687 comment.
10688 * riscv-tdep.h: Likewise.
10689
10690 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10691
10692 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10693 (riscv_pseudo_register_write): Delete.
10694 (riscv_gdbarch_init): Remove all use of pseudo registers.
10695
10696 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10697
10698 * record-btrace.c (btrace_print_lines): Replace cleanup
10699 parameter with RAII equivalents.
10700 (btrace_insn_history): Replace cleanup with RAII equivalents.
10701 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10702 make_cleanup_ui_out_tuple_begin_end): Remove.
10703 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10704 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10705 make_cleanup_ui_out_list_begin_end): Remove.
10706
10707 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10708
10709 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10710 parameter types to std::vector. Use bool.
10711 (record_btrace_wait): Replace VEC(tp_t) with
10712 std::vector<thread_info *>.
10713 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10714
10715 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10716
10717 * record-btrace.c (record_btrace_disable_callback): Remove.
10718 (struct scoped_btrace_disable): New.
10719 (record_btrace_open): Use scoped_btrace_disable.
10720
10721 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10722
10723 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10724 reading values from registers.
10725
10726 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10727
10728 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10729 where appropriate.
10730
10731 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10732
10733 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10734 change parameter type. Use GDB's print functions, and use
10735 core_addr_to_string where appropriate.
10736 (riscv_push_dummy_call): Use core_addr_to_string where
10737 appropriate, update call to riscv_print_arg_location, and reindent
10738 a few lines.
10739 (riscv_return_value): Update call to riscv_print_arg_location.
10740
10741 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10742 Tim Newsome <tim@sifive.com>
10743 Albert Ou <a0u@eecs.berkeley.edu>
10744 Darius Rad <darius@bluespec.com>
10745
10746 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10747 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10748 (ALLDEPFILES): Add riscv-tdep.c
10749 * configure.tgt: Add riscv support.
10750 * riscv-tdep.c: New file.
10751 * riscv-tdep.h: New file.
10752 * NEWS: Mention new target.
10753 * MAINTAINERS: Add entry for riscv.
10754
10755 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10756
10757 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10758 fields within aggregates.
10759
10760 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10761
10762 * record-btrace.c (btrace_print_lines): Change type of flags to
10763 gdb_disassembly_flags.
10764
10765 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10766
10767 * fbsd-nat.c: Include "inf-ptrace.h".
10768 (USE_SIGTRAP_SIGINFO): Conditionally define.
10769 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10770 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10771 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10772 function.
10773 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10774 Likewise.
10775 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10776 Likewise.
10777 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10778 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10779 "supports_stopped_by_hw_breakpoint" target methods.
10780
10781 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10782
10783 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10784 * fbsd-nat.c (debug_fbsd_nat): New variable.
10785 (show_fbsd_nat_debug): New function.
10786 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10787 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10788
10789 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10790
10791 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10792 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10793 prototype.
10794 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10795 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10796 method.
10797
10798 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10799
10800 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10801 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10802
10803 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10804
10805 * charset.c (struct charset_vector): New.
10806 (charsets): Change type to charset_vector.
10807 (find_charset_names): Adjust.
10808 (add_one): Adjust.
10809 (_initialize_charset): Adjust.
10810
10811 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10812
10813 * progspace.h (struct program_space) <deleted_solibs>: Change
10814 type to std::vector<std::string>.
10815 * progspace.c (clear_program_space_solib_cache): Adjust.
10816 * breakpoint.c (print_solib_event): Adjust.
10817 (check_status_catch_solib): Adjust.
10818 * solib.c (update_solib_list): Adjust.
10819 * ui-out.h (class ui_out) <field_string>: New overload.
10820 * ui-out.c (ui_out::field_string): New overload.
10821
10822 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10823
10824 * progspace.h (struct program_space): Add constructor and
10825 destructor, initialize fields.
10826 (add_program_space): Remove.
10827 * progspace.c (add_program_space): Rename to...
10828 (program_space::program_space): ... this.
10829 (release_program_space): Rename to...
10830 (program_space::~program_space): ... this.
10831 (delete_program_space): Use delete to delete program_space.
10832 (initialize_progspace): Use new to allocate program_space.
10833 * inferior.c (add_inferior_with_spaces): Likewise.
10834 (clone_inferior_command): Likewise.
10835 * infrun.c (follow_fork_inferior): Likewise.
10836 (handle_vfork_child_exec_or_exit): Likewise.
10837
10838 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10839
10840 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10841 (delim_string_to_char_ptr_vec): Return std::vector of
10842 gdb::unique_xmalloc_ptr.
10843 (dirnames_to_char_ptr_vec_append): Take std::vector of
10844 gdb::unique_xmalloc_ptr.
10845 (dirnames_to_char_ptr_vec): Return std::vector of
10846 gdb::unique_xmalloc_ptr.
10847 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10848 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10849 (delim_string_to_char_ptr_vec): Return an std::vector of
10850 gdb::unique_xmalloc_ptr, adjust the code.
10851 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10852 gdb::unique_xmalloc_ptr, adjust the code.
10853 (dirnames_to_char_ptr_vec): Return an std::vector of
10854 gdb::unique_xmalloc_ptr, adjust the code.
10855 * auto-load.c (auto_load_safe_path_vec): Change type to
10856 std::vector of gdb::unique_xmalloc_ptr.
10857 (auto_load_expand_dir_vars): Return an std::vector of
10858 gdb::unique_xmalloc_ptr, adjust the code.
10859 (auto_load_safe_path_vec_update): Adjust.
10860 (filename_is_in_auto_load_safe_path_vec): Adjust.
10861 (auto_load_objfile_script_1): Adjust.
10862 * build-id.c (build_id_to_debug_bfd): Adjust.
10863 * linux-thread-db.c (thread_db_load_search): Adjust.
10864 * source.c (add_path): Adjust.
10865 (openp): Adjust.
10866 * symfile.c (find_separate_debug_file): Adjust.
10867 * utils.c (do_free_char_ptr_vec): Remove.
10868 (make_cleanup_free_char_ptr_vec): Remove.
10869
10870 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10871
10872 PR gdb/22907
10873 * common/pathstuff.c: Conditionally include "<windows.h>".
10874
10875 2018-03-01 Georg Sauthoff <mail@georg.so>
10876
10877 PR gdb/22888
10878 * gcore.in: Quote variables and switch interpreter to bash.
10879
10880 2018-03-01 Tom Tromey <tom@tromey.com>
10881
10882 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10883 assertion. Add assertion for discriminant_index.
10884 (quirk_rust_enum): Use correct base type name in univariant case.
10885
10886 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10887
10888 * record.c (get_call_history_modifiers): Return a
10889 record_print_flags.
10890 (cmd_record_call_history): Adjust.
10891 * record-btrace.c (record_btrace_call_history): Adjust.
10892 (record_btrace_call_history_range): Adjust.
10893 (record_btrace_call_history_from): Adjust.
10894 * target-debug.h (target_debug_print_record_print_flags): New.
10895 * target-delegates.c: Re-generate.
10896 * target.c (target_call_history): Change flags type.
10897 (target_call_history_from): Likewise.
10898 (target_call_history_range): Likewise.
10899 * target.h (struct target_ops) <target_call_history>: Likewise.
10900 (target_call_history_from): Likewise.
10901 (target_call_history_range): Likewise.
10902
10903 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10904 Simon Marchi <simon.marchi@polymtl.ca>
10905
10906 * common/common-utils.c: Include "sys/stat.h".
10907 (is_regular_file): Move here from "source.c"; change return
10908 type to "bool".
10909 * common/common-utils.h (is_regular_file): New prototype.
10910 * common/pathstuff.c (contains_dir_separator): New function.
10911 * common/pathstuff.h (contains_dir_separator): New prototype.
10912 * source.c: Don't include "sys/stat.h".
10913 (is_regular_file): Move to "common/common-utils.c".
10914
10915 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10916
10917 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10918 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10919 * auto-load.c: Include "common/pathstuff.h".
10920 * common/common-def.h (current_directory): Move here.
10921 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10922 function.
10923 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10924 prototype.
10925 * common/pathstuff.c: New file.
10926 * common/pathstuff.h: New file.
10927 * compile/compile.c: Include "common/pathstuff.h".
10928 * defs.h (current_directory): Move to "common/common-defs.h".
10929 * dwarf2read.c: Include "common/pathstuff.h".
10930 * exec.c: Likewise.
10931 * guile/scm-safe-call.c: Likewise.
10932 * linux-thread-db.c: Likewise.
10933 * main.c: Likewise.
10934 * nto-tdep.c: Likewise.
10935 * objfiles.c: Likewise.
10936 * source.c: Likewise.
10937 * symtab.c: Likewise.
10938 * utils.c: Include "common/pathstuff.h".
10939 (gdb_realpath): Move to "common/pathstuff.c".
10940 (gdb_realpath_keepfile): Likewise.
10941 (gdb_abspath): Likewise.
10942 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10943 (gdb_realpath_keepfile): Likewise.
10944 (gdb_abspath): Likewise.
10945
10946 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10947
10948 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10949 wildcard process pid for super_resume for kernels with a
10950 specific bug.
10951
10952 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10953
10954 * compile/compile.c (get_args): Add additional comments
10955 explaining function.
10956
10957 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10958 Tom Tromey <tom@tromey.com>
10959
10960 * target.h (memory_write_request_s): Remove typedef. Don't define
10961 VEC.
10962 (target_write_memory_blocks): Change argument to std::vector.
10963 (struct memory_write_request): Add constructor.
10964 * target-memory.c (compare_block_starting_address): Return bool.
10965 Change argument types.
10966 (claim_memory): Change arguments to use std::vector.
10967 (split_regular_and_flash_blocks, blocks_to_erase)
10968 (compute_garbled_blocks): Likewise.
10969 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10970 (target_write_memory_blocks): Change argument to std::vector.
10971 * symfile.c (struct load_section_data): Add constructor and
10972 destructor. Use std::vector for "requests".
10973 (struct load_progress_data): Add initializers.
10974 (load_section_callback): Update. Use "new".
10975 (clear_memory_write_data): Remove.
10976 (generic_load): Update.
10977
10978 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10979
10980 * arch/aarch64.h: Use common/tdesc.h.
10981
10982 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10983
10984 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10985 architecture with a 64-bit ABI.
10986
10987 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10988
10989 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10990 ahead of target description loading.
10991
10992 2018-02-26 Tom Tromey <tom@tromey.com>
10993
10994 * stack.c (backtrace_command_1): Update.
10995 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10996 of "flags".
10997 * python/py-framefilter.c (py_print_frame)
10998 (gdbpy_apply_frame_filter): Change type of "flags".
10999 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11000 of "flags".
11001 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11002 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11003 * extension.h (enum frame_filter_flag): Rename from
11004 frame_filter_flags.
11005 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11006 (apply_ext_lang_frame_filter): Change type of "flags".
11007 * extension.c (apply_ext_lang_frame_filter): Change type of
11008 "flags".
11009 * extension-priv.h (struct extension_language_ops)
11010 <apply_frame_filter>: Change type of "flags".
11011
11012 2018-02-26 Tom Tromey <tom@tromey.com>
11013
11014 PR python/16497:
11015 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11016 off-by-one in py_end computation.
11017 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11018 PRINT_MORE_FRAMES.
11019 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11020 constant.
11021
11022 2018-02-26 Tom Tromey <tom@tromey.com>
11023
11024 * dwarf2read.c (struct variant_field): New.
11025 (struct nextfield) <variant>: New field.
11026 (dwarf2_add_field): Handle DW_TAG_variant_part.
11027 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11028 discriminated union.
11029 (read_structure_type): Handle DW_TAG_variant_part.
11030 (handle_struct_member_die): New function, extracted from
11031 process_structure_scope. Handle DW_TAG_variant.
11032 (process_structure_scope): Handle discriminated unions. Call
11033 handle_struct_member_die.
11034
11035 2018-02-26 Tom Tromey <tom@tromey.com>
11036
11037 * rust-lang.h (rust_last_path_segment): Declare.
11038 * rust-lang.c (rust_last_path_segment): Now public. Change
11039 contract.
11040 (struct disr_info): Remove.
11041 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11042 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11043 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11044 (rust_enum_p, rust_enum_variant): New function.
11045 (rust_underscore_fields): Remove "offset" parameter.
11046 (rust_print_enum): New function.
11047 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11048 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11049 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11050 enums.
11051 (rust_internal_print_type): New function, from rust_print_type.
11052 Remove enum code.
11053 (rust_print_type): Call rust_internal_print_type.
11054 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11055 Update enum handling.
11056 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11057 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11058 (rust_union_quirks): New functions.
11059 (process_full_comp_unit, process_full_type_unit): Call
11060 rust_union_quirks.
11061 (process_structure_scope): Update rust_unions if necessary.
11062
11063 2018-02-26 Tom Tromey <tom@tromey.com>
11064
11065 * value.h (value_union_variant): Declare.
11066 * valops.c (value_union_variant): New function.
11067 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11068 (struct discriminant_info): New.
11069 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11070 enumerator.
11071 (struct main_type) <flag_discriminated_union>: New field.
11072
11073 2018-02-26 Tom Tromey <tom@tromey.com>
11074
11075 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11076 unittests/unpack-selftests.c.
11077 * unittests/unpack-selftests.c: New file.
11078 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11079
11080 2018-02-26 Yao Qi <yao.qi@linaro.org>
11081
11082 * dwarf2read.c (struct partial_die_info) <read>: New method.
11083 (read_partial_die): Remove the declaration.
11084 (load_partial_dies): Update.
11085 (partial_die_info::partial_die_info):
11086 (read_partial_die): Change it to partial_die_info::read.
11087
11088 2018-02-26 Yao Qi <yao.qi@linaro.org>
11089
11090 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11091 (fixup_partial_die): Remove declaration.
11092 (scan_partial_symbols): Update.
11093 (partial_die_parent_scope): Likewise.
11094 (partial_die_full_name): Likewise.
11095 (fixup_partial_die): Change it to partial_die_info::fixup.
11096
11097 2018-02-26 Yao Qi <yao.qi@linaro.org>
11098
11099 * dwarf2read.c (read_partial_die): Update the declaration.
11100 (load_partial_dies): Caller update.
11101 (read_partial_die): Remove one argument abbrev_len.
11102
11103 2018-02-26 Yao Qi <yao.qi@linaro.org>
11104
11105 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11106 assignment operator.
11107 (load_partial_dies): Use ctor and copy ctor.
11108 (read_partial_die): Update.
11109 (dwarf2_cu::find_partial_die): Use ctor.
11110
11111 2018-02-26 Yao Qi <yao.qi@linaro.org>
11112
11113 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11114 (find_partial_die_in_comp_unit): Change it to
11115 dwarf2_cu::find_partial_die.
11116 (find_partial_die): Update.
11117
11118 2018-02-26 Yao Qi <yao.qi@linaro.org>
11119
11120 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11121 is NULL.
11122
11123 2018-02-26 Yao Qi <yao.qi@linaro.org>
11124
11125 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11126
11127 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11128
11129 * arch/amd64.h: Use common/tdesc.h.
11130 * arch/i386.c: Likewise.
11131 * arch/i386.h: Likewise.
11132 * arch/tic6x.c: Likewise.
11133 * arch/tdesc.h: Move file from here...
11134 * common/tdesc.h: ...to here.
11135 * features/aarch64-core.c: Regenerate.
11136 * features/aarch64-fpu.c: Regenerate.
11137 * features/i386/32bit-avx.c: Regenerate.
11138 * features/i386/32bit-avx512.c: Regenerate.
11139 * features/i386/32bit-core.c: Regenerate.
11140 * features/i386/32bit-linux.c: Regenerate.
11141 * features/i386/32bit-mpx.c: Regenerate.
11142 * features/i386/32bit-pkeys.c: Regenerate.
11143 * features/i386/32bit-sse.c: Regenerate.
11144 * features/i386/64bit-avx.c: Regenerate.
11145 * features/i386/64bit-avx512.c: Regenerate.
11146 * features/i386/64bit-core.c: Regenerate.
11147 * features/i386/64bit-linux.c: Regenerate.
11148 * features/i386/64bit-mpx.c: Regenerate.
11149 * features/i386/64bit-pkeys.c: Regenerate.
11150 * features/i386/64bit-segments.c: Regenerate.
11151 * features/i386/64bit-sse.c: Regenerate.
11152 * features/i386/x32-core.c: Regenerate.
11153 * features/tic6x-c6xp.c: Regenerate.
11154 * features/tic6x-core.c: Regenerate.
11155 * features/tic6x-gp.c: Regenerate.
11156 * target-descriptions.c: Use common/tdesc.h.
11157 * target-descriptions.h: Likewise.
11158
11159 2018-02-24 Tom Tromey <tom@tromey.com>
11160
11161 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11162 (try_thread_db_load_from_dir, thread_db_load_search): Use
11163 std::string.
11164 (info_auto_load_libthread_db_compare): Return bool. Change
11165 argument types.
11166 (info_auto_load_libthread_db): Use std::vector, std::string.
11167 Remove cleanups.
11168
11169 2018-02-24 Tom Tromey <tom@tromey.com>
11170
11171 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11172 std::string.
11173 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11174 std::string*.
11175 * gdbarch.c: Rebuild.
11176 * gdbarch.h: Rebuild.
11177 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11178 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11179 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11180 std::string*.
11181
11182 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11183
11184 * gdbtypes.h (sect_offset): Change type to uint64_t.
11185 (sect_offset_str): New function.
11186 * dwarf2read.c (create_addrmap_from_aranges): Use
11187 sect_offset_str.
11188 (error_check_comp_unit_head): Likewise.
11189 (create_debug_type_hash_table): Likewise.
11190 (read_cutu_die_from_dwo): Likewise.
11191 (init_cutu_and_read_dies): Likewise.
11192 (init_cutu_and_read_dies_no_follow): Likewise.
11193 (process_psymtab_comp_unit_reader): Likewise.
11194 (partial_die_parent_scope): Likewise.
11195 (peek_die_abbrev): Likewise.
11196 (process_queue): Likewise.
11197 (dwarf2_physname): Likewise.
11198 (read_namespace_alias): Likewise.
11199 (read_import_statement): Likewise.
11200 (create_dwo_cu_reader): Likewise.
11201 (create_cus_hash_table): Likewise.
11202 (lookup_dwo_cutu): Likewise.
11203 (inherit_abstract_dies): Likewise.
11204 (read_func_scope): Likewise.
11205 (read_call_site_scope): Likewise.
11206 (dwarf2_add_member_fn): Likewise.
11207 (read_common_block): Likewise.
11208 (read_module_type): Likewise.
11209 (read_typedef): Likewise.
11210 (read_subrange_type): Likewise.
11211 (load_partial_dies): Likewise.
11212 (read_partial_die): Likewise.
11213 (find_partial_die): Likewise.
11214 (read_str_index): Likewise.
11215 (dwarf2_string_attr): Likewise.
11216 (build_error_marker_type): Likewise.
11217 (lookup_die_type): Likewise.
11218 (dump_die_shallow): Likewise.
11219 (follow_die_ref): Likewise.
11220 (dwarf2_fetch_die_loc_sect_off): Likewise.
11221 (dwarf2_fetch_constant_bytes): Likewise.
11222 (follow_die_sig): Likewise.
11223 (get_signatured_type): Likewise.
11224 (get_DW_AT_signature_type): Likewise.
11225 (dwarf2_find_containing_comp_unit): Likewise.
11226 (set_die_type): Likewise.
11227
11228 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11229
11230 * arch/aarch64.c: Include "common-defs.h".
11231 * arch/amd64.c: Likewise.
11232 * arch/i386.c: Likewise.
11233
11234 2018-02-21 Tom Tromey <tom@tromey.com>
11235
11236 * value.h: (extract_field_op): Update.
11237 * eval.c (extract_field_op): Return a const char *.
11238 * expression.h (parse_expression_for_completion): Update.
11239 * completer.c (complete_expression): Update.
11240 (add_struct_fields): Make fieldname const.
11241 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11242 (mark_completion_tag, parse_exp_in_context_1): Update.
11243 (parse_expression_for_completion): Change "name" to
11244 unique_xmalloc_ptr*.
11245
11246 2018-02-21 Tom Tromey <tom@tromey.com>
11247
11248 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11249
11250 2018-02-21 Yao Qi <yao.qi@linaro.org>
11251
11252 * avr-tdep.c (avr_read_pc): Change parameter type to
11253 readable_regcache.
11254 * gdbarch.sh (read_pc): Likewise.
11255 * gdbarch.c: Re-generated.
11256 * gdbarch.h: Re-generated.
11257 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11258 readable_regcache.
11259 * ia64-tdep.c (ia64_read_pc): Likewise.
11260 * mips-tdep.c (mips_read_pc): Likewise.
11261 * spu-tdep.c (spu_read_pc): Likewise.
11262
11263 2018-02-21 Yao Qi <yao.qi@linaro.org>
11264
11265 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11266 * regcache-dump.c: New file.
11267 * regcache.c: Move register_dump to regcache-dump.c.
11268 (maintenance_print_registers): Likewise.
11269 (maintenance_print_raw_registers): Likewise.
11270 (maintenance_print_cooked_registers): Likewise.
11271 (maintenance_print_register_groups): Likewise.
11272 (maintenance_print_remote_registers): Likewise.
11273 (_initialize_regcache): Likewise.
11274 * regcache.h (register_dump): Moved from regcache.c.
11275
11276 2018-02-21 Yao Qi <yao.qi@linaro.org>
11277
11278 * regcache.c (regcache::regcache): Update.
11279 (regcache::invalidate): Move it to detached_regcache::invalidate.
11280 (get_thread_arch_aspace_regcache): Update.
11281 (regcache::raw_update): Update.
11282 (regcache::cooked_read): Remove some code.
11283 (regcache::cooked_read_value): Likewise.
11284 (regcache::raw_write): Remove assert on m_readonly_p.
11285 (regcache::raw_supply_integer): Move it to
11286 detached_regcache::raw_supply_integer.
11287 (regcache::raw_supply_zeroed): Likewise.
11288 * regcache.h (detached_regcache) <raw_supply_integer>: New
11289 declaration.
11290 <raw_supply_zeroed, invalidate>: Likewise.
11291 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11292 <invalidate>: Likewise.
11293 <m_readonly_p>: Removed.
11294
11295 2018-02-21 Yao Qi <yao.qi@linaro.org>
11296
11297 * infcmd.c (get_return_value): Let stop_regs point to
11298 get_current_regcache.
11299 * regcache.c (regcache::regcache): Remove.
11300 (register_dump_reg_buffer): New class.
11301 (regcache_print): Adjust.
11302 * regcache.h (regcache): Remove constructors.
11303
11304 2018-02-21 Yao Qi <yao.qi@linaro.org>
11305
11306 * regcache.c (class register_dump): New class.
11307 (register_dump_regcache, register_dump_none): New class.
11308 (register_dump_remote, register_dump_groups): New class.
11309 (regcache_print): Update.
11310 * regcache.h (regcache_dump_what): Move it to regcache.c.
11311 (regcache) <dump>: Remove.
11312
11313 2018-02-21 Yao Qi <yao.qi@linaro.org>
11314
11315 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11316 reg_buffer_rw *.
11317 (jit_unwind_reg_set_impl): Call raw_supply.
11318 (jit_frame_sniffer): Use reg_buffer_rw.
11319 * record-full.c (record_full_core_regbuf): Change its type.
11320 (record_full_core_open_1): Use reg_buffer_rw.
11321 (record_full_close): Likewise.
11322 (record_full_core_fetch_registers): Use regcache->raw_supply.
11323 (record_full_core_store_registers): Likewise.
11324 * regcache.c (regcache::get_register_status): Move it to
11325 reg_buffer.
11326 (regcache_raw_set_cached_value): Remove.
11327 (regcache::raw_set_cached_value): Remove.
11328 (regcache::raw_write): Call raw_supply.
11329 (regcache::raw_supply): Move it to reg_buffer_rw.
11330 * regcache.h (regcache_raw_set_cached_value): Remove.
11331 (reg_buffer_rw): New class.
11332
11333 2018-02-21 Yao Qi <yao.qi@linaro.org>
11334
11335 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11336 readonly_detached_regcache.
11337 (dummy_frame_prev_register): Use regcache->cooked_read.
11338 * frame.c (frame_save_as_regcache): Change return type.
11339 (frame_pop): Update.
11340 * frame.h (frame_save_as_regcache): Update declaration.
11341 * inferior.h (get_infcall_suspend_state_regcache): Update
11342 declaration.
11343 * infrun.c (infcall_suspend_state) <registers>: use
11344 readonly_detached_regcache.
11345 (save_infcall_suspend_state): Don't use regcache_dup.
11346 (get_infcall_suspend_state_regcache): Change return type.
11347 * linux-fork.c (struct fork_info) <savedregs>: Change to
11348 readonly_detached_regcache.
11349 <pc>: New field.
11350 (fork_save_infrun_state): Don't use regcache_dup.
11351 (info_checkpoints_command): Adjust.
11352 * mi/mi-main.c (register_changed_p): Update declaration.
11353 (mi_cmd_data_list_changed_registers): Use
11354 readonly_detached_regcache.
11355 (register_changed_p): Change parameter type to
11356 readonly_detached_regcache.
11357 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11358 readonly_detached_regcache.
11359 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11360 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11361 New.
11362 (regcache::save): Move it to reg_buffer.
11363 (regcache::restore): Change parameter type.
11364 (regcache_dup): Remove.
11365 * regcache.h (reg_buffer) <save>: New method.
11366 (readonly_detached_regcache): New class.
11367 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11368 readonly_detached_regcache.
11369 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11370
11371 2018-02-21 Yao Qi <yao.qi@linaro.org>
11372
11373 * frame.c (frame_save_as_regcache): Use regcache method save.
11374 (frame_pop): Use regcache method restore.
11375 * infrun.c (restore_infcall_suspend_state): Likewise.
11376 * linux-fork.c (fork_load_infrun_state): Likewise.
11377 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11378 save.
11379 * regcache.c (regcache_save): Remove.
11380 (regcache::restore): More asserts.
11381 (regcache_cpy): Remove.
11382 * regcache.h (regcache_save): Remove the declaration.
11383 (regcache::restore): Move from private to public.
11384 Remove the friend declaration of regcache_cpy.
11385 (regcache_cpy): Remove declaration.
11386
11387 2018-02-21 Yao Qi <yao.qi@linaro.org>
11388
11389 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11390 parameter type to 'readable_regcache *'.
11391 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11392 * arm-tdep.c (arm_neon_quad_read): Likewise.
11393 (arm_pseudo_read): Likewise.
11394 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11395 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11396 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11397 * gdbarch.c: Re-generated.
11398 * gdbarch.h: Re-generated.
11399 * gdbarch.sh (pseudo_register_read): Change parameter type to
11400 'readable_regcache *'.
11401 (pseudo_register_read_value): Likewise.
11402 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11403 (h8300_pseudo_register_read): Likewise.
11404 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11405 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11406 (i386_pseudo_register_read_into_value): Likewise.
11407 (i386_pseudo_register_read_value): Likewise.
11408 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11409 declaration.
11410 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11411 * m32c-tdep.c (m32c_raw_read): Likewise.
11412 (m32c_read_flg): Likewise.
11413 (m32c_banked_register): Likewise.
11414 (m32c_banked_read): Likewise.
11415 (m32c_sb_read): Likewise.
11416 (m32c_part_read): Likewise.
11417 (m32c_cat_read): Likewise.
11418 (m32c_r3r2r1r0_read): Likewise.
11419 (m32c_pseudo_register_read): Likewise.
11420 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11421 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11422 (mep_pseudo_cr64_read): Likewise.
11423 (mep_pseudo_register_read): Likewise.
11424 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11425 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11426 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11427 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11428 (regcache::cooked_read): Likewise.
11429 (regcache::cooked_read_value): Likewise.
11430 (regcache_cooked_read_signed):
11431 (regcache::cooked_read): Likewise.
11432 * regcache.h (readable_regcache): New class.
11433 (regcache): Inherit readable_regcache. Move some methods to
11434 readable_regcache.
11435 * rl78-tdep.c (rl78_pseudo_register_read): Change
11436 parameter type to 'readable_regcache *'.
11437 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11438 (e500_pseudo_register_read): Change parameter type to
11439 'readable_regcache *'.
11440 (dfp_pseudo_register_read): Likewise.
11441 (vsx_pseudo_register_read): Likewise.
11442 (efpr_pseudo_register_read): Likewise.
11443 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11444 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11445 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11446 (sh64_pseudo_register_read): Likewise.
11447 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11448 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11449 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11450 (spu_pseudo_register_read): Likewise.
11451 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11452 (xtensa_pseudo_register_read): Likewise.
11453
11454 2018-02-21 Yao Qi <yao.qi@linaro.org>
11455
11456 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11457 (regcache::arch): Move it to reg_buffer::arch.
11458 (regcache::register_buffer): Likewise.
11459 (regcache::assert_regnum): Likewise.
11460 (regcache::num_raw_registers): Likewise.
11461 * regcache.h (reg_buffer): New class.
11462 (regcache): Inherit reg_buffer.
11463
11464 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11465
11466 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11467 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11468
11469 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11470
11471 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11472
11473 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11474
11475 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11476 (SFILES): Remove common/*.c files.
11477 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11478 * common/common.host: Add common reference.
11479 * configure.ac: Likewise.
11480 * configure: Regenerate.
11481
11482 2018-02-16 Yao Qi <yao.qi@linaro.org>
11483
11484 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11485 (block_initialize_namespace): Use new.
11486 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11487 (dwarf2_free_objfile): Use delete.
11488 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11489 (copy_type_recursive): Use new.
11490 * gdb_obstack.h (allocate_on_obstack): New.
11491
11492 2018-02-15 Yao Qi <yao.qi@linaro.org>
11493
11494 PR gdb/22849
11495 * inferior.c (exit_inferior_1): Reset inf->control.
11496
11497 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11498
11499 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11500 declaration.
11501
11502 2018-02-14 Pedro Alves <palves@redhat.com>
11503
11504 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11505 frame_cleanup_after_sniffer on exception.
11506
11507 2018-02-14 Tom Tromey <tom@tromey.com>
11508
11509 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11510 const.
11511 (solib_bfd_open): Make pathname const.
11512 * solib.c (solib_bfd_open): Make pathname const.
11513 * solib-spu.c (spu_bfd_fopen): Make name const.
11514 (spu_bfd_open): Make pathname const.
11515 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11516 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11517
11518 2018-02-14 Tom Tromey <tom@tromey.com>
11519
11520 * symfile.c (symfile_bfd_open): Update.
11521 * source.h (openp, source_full_path_of, find_and_open_source):
11522 Change argument type to unique_xmalloc_ptr.
11523 * source.c (openp): Take a unique_xmalloc_ptr.
11524 (source_full_path_of, find_and_open_source): Likewise.
11525 (open_source_file, symtab_to_fullname): Update.
11526 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11527 unique_xmalloc_ptr.
11528 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11529 (exec_file_find): Update.
11530 * psymtab.c (psymtab_to_fullname): Update.
11531 * nto-tdep.h (nto_find_and_open_solib): Update.
11532 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11533 unique_xmalloc_ptr.
11534 * exec.c (exec_file_attach): Update.
11535 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11536 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11537
11538 2018-02-14 Tom Tromey <tom@tromey.com>
11539
11540 * solib.c: Include source.h.
11541 * nto-tdep.c: Include source.h.
11542 * mi/mi-cmd-env.c: Include source.h.
11543 * infcmd.c: Include source.h.
11544 * exec.c: Include source.h.
11545 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11546 (add_path, directory_switch, source_path, init_source_path): Move
11547 declarations...
11548 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11549 (add_path, directory_switch, source_path, init_source_path):
11550 ...here.
11551
11552 2018-02-14 Tom Tromey <tom@tromey.com>
11553
11554 * solist.h (exec_file_find, solib_find): Return
11555 unique_xmalloc_ptr.
11556 (solib_bfd_fopen): Take a const char *.
11557 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11558 (exec_file_find, solib_find): Likewise.
11559 (solib_bfd_fopen): Do not take ownership of "pathname".
11560 (solib_bfd_open): Use unique_xmalloc_ptr.
11561 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11562 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11563 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11564 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11565
11566 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11567
11568 * ada-lang.c (name_match_type_from_name): Remove reference to
11569 ada_name_for_lookup in function's documentation.
11570 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11571
11572 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11573
11574 * defs.h (enum openp_flags): New enum.
11575 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11576 Move to enum openp_flags.
11577 (openp_flags): New enum flags.
11578 (openp): Change parameter type to openp_flags.
11579 * source.c (openp): Change parameter type to openp_flags.
11580 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11581 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11582
11583 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11584
11585 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11586 per-command.
11587
11588 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11589
11590 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11591 into...
11592 (class dwarf2_queue_guard): ...the destructor of this new class.
11593 (dw2_do_instantiate_symtab): Create instance of the new class
11594 dwarf2_queue_guard, remove cleanup.
11595
11596 2018-02-09 Tom Tromey <tom@tromey.com>
11597
11598 * source.c (find_source_lines): Don't reference past the end of
11599 the vector.
11600
11601 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11602
11603 * remote.c (remote_btrace_maybe_reopen): Change error message.
11604 * btrace.c (btrace_enable): Likewise.
11605 (parse_xml_btrace): Likewise.
11606 (parse_xml_btrace_conf): Likewise.
11607
11608 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11609
11610 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11611 (linux_enable_pt, linux_enable_bts): Call
11612 diagnose_perf_event_open_fail.
11613
11614 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11615
11616 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11617 Remove parameter and change return type. Update callers. Move it.
11618 (linux_enable_bts, linux_enable_pt): Improve error message.
11619 (linux_enable_pt): Remove zero buffer size check.
11620 (linux_enable_btrace): Improve error messages. Remove NULL return
11621 check.
11622
11623 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11624
11625 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11626 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11627 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11628 (linux_supports_pt, linux_supports_btrace): Remove.
11629 (linux_enable_bts): Call cpu_supports_bts.
11630 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11631 * remote.c (remote_supports_btrace): Remove.
11632 (init_remote_ops): Remove remote_supports_btrace.
11633 * target-delegates.c: Regenerated.
11634 * target.c (target_supports_btrace): Remove.
11635 * target.h (target_ops) <to_supports_btrace>: Remove
11636 (target_supports_btrace): Remove.
11637 * x86-linux-nat.c (x86_linux_create_target): Remove
11638 linux_supports_btrace.
11639
11640 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11641
11642 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11643 btrace failed.
11644 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11645 exception and use message in own exception.
11646
11647 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11648
11649 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11650 (perf_event_pt_event_type): Use gdb_file_up.
11651 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11652 scoped_fd, and scoped_mmap.
11653
11654 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11655
11656 * common/scoped_mmap.h: New.
11657 * unittests/scoped_mmap-selftest.c: New.
11658 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11659 unittests/scoped_mmap-selftest.c.
11660
11661 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11662
11663 * common/scoped_fd.h: New.
11664 * unittests/scoped_fd-selftest.c: New.
11665 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11666 unittests/scoped_fd-selftest.c.
11667
11668 2018-02-09 Tom Tromey <tom@tromey.com>
11669
11670 * auto-load.c (auto_load_section_scripts): Use
11671 gdb::unique_xmalloc_ptr.
11672
11673 2018-02-09 Tom Tromey <tom@tromey.com>
11674
11675 * auto-load.c (execute_script_contents): Use std::string.
11676
11677 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11678
11679 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11680 Python function, rather than a new command.
11681
11682 2018-02-08 Tom Tromey <tom@tromey.com>
11683
11684 * solib.c (solib_find_1): Use std::string.
11685 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11686
11687 2018-02-08 Tom Tromey <tom@tromey.com>
11688
11689 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11690
11691 2018-02-08 Tom Tromey <tom@tromey.com>
11692
11693 * source.c (find_source_lines): Use gdb::def_vector.
11694
11695 2018-02-08 Tom Tromey <tom@tromey.com>
11696
11697 * macrocmd.c (struct temporary_macro_definition): New.
11698 (macro_define_command): Use temporary_macro_definition. Remove
11699 cleanups.
11700 (free_macro_definition_ptr): Remove.
11701
11702 2018-02-08 Tom Tromey <tom@tromey.com>
11703
11704 * macroexp.c (maybe_expand): Use std::string.
11705
11706 2018-02-08 Tom Tromey <tom@tromey.com>
11707
11708 * macroexp.c (struct macro_buffer): Add initializers for some
11709 members.
11710 (init_buffer, init_shared_buffer, free_buffer)
11711 (free_buffer_return_text): Remove.
11712 (macro_buffer): New constructors.
11713 (~macro_buffer): New destructor.
11714 (macro_buffer::set_shared): New method.
11715 (macro_buffer::resize_buffer, macro_buffer::appendc)
11716 (macro_buffer::appendmem): Now methods, not free functions.
11717 (set_token, append_tokens_without_splicing, stringify)
11718 (macro_stringify): Update.
11719 (gather_arguments): Change return type. Remove argc_p argument,
11720 add args_ptr argument. Use std::vector.
11721 (substitute_args): Remove argc argument. Accept std::vector.
11722 (expand): Update. Use std::vector.
11723 (scan, macro_expand, macro_expand_next): Update.
11724
11725 2018-02-08 Tom Tromey <tom@tromey.com>
11726
11727 * symtab.c (default_collect_symbol_completion_matches_break_on):
11728 Use unique_xmalloc_ptr.
11729 * macroscope.h: (sal_macro_scope, user_macro_scope)
11730 (default_macro_scope): Return unique_xmalloc_ptr.
11731 * macroscope.c (sal_macro_scope, user_macro_scope)
11732 (default_macro_scope): Return unique_xmalloc_ptr.
11733 * macroexp.h (macro_expand, macro_expand_once): Return
11734 unique_xmalloc_ptr.
11735 * macroexp.c (macro_expand, macro_expand_once): Return
11736 unique_xmalloc_ptr.
11737 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11738 (info_macro_command, info_macros_command): Use
11739 unique_xmalloc_ptr.
11740 * compile/compile-c-support.c (write_macro_definitions): Use
11741 unique_xmalloc_ptr.
11742 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11743
11744 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11745
11746 * value.c (value_static_field): Assign field type instead of
11747 containing type when returning an optimized out value.
11748
11749 2018-02-06 Yao Qi <yao.qi@linaro.org>
11750
11751 * ft32-tdep.c (ft32_read_pc): Remove.
11752 (ft32_write_pc): Remove.
11753 (ft32_gdbarch_init): Update.
11754 * m32r-tdep.c (m32r_read_pc): Remove.
11755 (m32r_gdbarch_init): Update.
11756 * mep-tdep.c (mep_read_pc): Remove.
11757 (mep_gdbarch_init): Update.
11758 * microblaze-tdep.c (microblaze_write_pc): Remove.
11759 (microblaze_gdbarch_init): Update.
11760 * mn10300-tdep.c (mn10300_read_pc): Remove.
11761 (mn10300_write_pc): Remove.
11762 (mn10300_gdbarch_init): Update.
11763 * moxie-tdep.c (moxie_read_pc): Remove.
11764 (moxie_write_pc): Remove.
11765 (moxie_gdbarch_init): Update.
11766
11767 2018-02-06 Yao Qi <yao.qi@linaro.org>
11768
11769 * expprint.c (print_subexp_standard): Handle
11770 OP_F77_UNDETERMINED_ARGLIST.
11771 (dump_subexp_body_standard): Likewise.
11772
11773 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11774
11775 * target-descriptions.c (tdesc_element_visitor) Add empty
11776 implementations.
11777 (tdesc_type): Move make_gdb_type from here.
11778 (tdesc_type_builtin): Likewise.
11779 (tdesc_type_vector): Likewise.
11780 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11781 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11782 (make_gdb_type_union): Likewise.
11783 (make_gdb_type_flags): Likewise.
11784 (make_gdb_type_enum): Likewise.
11785 (make_gdb_type): New function.
11786 (tdesc_register_type): Use static make_gdb_type.
11787
11788 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11789
11790 * infcmd.c (default_print_one_register_info): Align natural-format
11791 column values consistently one under another.
11792 (pad_to_column): New function.
11793
11794 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11795
11796 * dwarf2read.c (dwarf2_physname): Move commment.
11797
11798 2018-02-01 Leszek Swirski <leszeks@google.com>
11799
11800 * varobj.c (varobj_formatted_print_options): Allow recursive
11801 pretty printing if pretty printing is enabled.
11802
11803 2018-02-01 Leszek Swirski <leszeks@google.com>
11804
11805 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11806 names after a structop as a filename.
11807
11808 2018-02-01 Yao Qi <yao.qi@linaro.org>
11809
11810 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11811 (arm_record_coproc_data_proc): Likewise.
11812
11813 2018-02-01 Yao Qi <yao.qi@linaro.org>
11814
11815 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11816
11817 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11818
11819 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11820 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11821
11822 2018-01-31 Pedro Alves <palves@redhat.com>
11823
11824 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11825 * inflow.c (child_terminal_save_inferior): Wrap reference to
11826 tcgetpgrp in HAVE_TERMIOS_H.
11827 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11828 _WIN32.
11829 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11830 always iterate over all inferiors.
11831 (gdbsim_cntrl_c): Adjust.
11832 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11833
11834 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11835
11836 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11837 index type is objfile-owned if the element type is as well.
11838
11839 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11840
11841 GDB 8.1 released.
11842
11843 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11844
11845 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11846 "features/s390x-linux64.c".
11847 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11848 s390_linux32 and s390x_linux64.
11849 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11850 default tdesc.
11851 * s390-tdep.c: Include "features/s390-linux32.c" and
11852 "features/s390x-linux64.c".
11853 (s390_tdesc_valid): Add check for tdesc_has_registers.
11854 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11855 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11856 tdesc_s390x_linux64.
11857 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11858 tdesc_s390x_linux64 to...
11859 * s390-tdep.h: ...here.
11860
11861 2018-01-30 Pedro Alves <palves@redhat.com>
11862
11863 PR gdb/13211
11864 * config.in, configure: Regenerate.
11865 * configure.ac: Check for getpgid.
11866 * go32-nat.c (go32_pass_ctrlc): New.
11867 (go32_target): Install it.
11868 * inf-child.c (inf_child_target): Install
11869 child_terminal_save_inferior, child_pass_ctrlc and
11870 child_interrupt.
11871 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11872 (inf_ptrace_target): No longer install it.
11873 * infcmd.c (interrupt_target_1): Adjust.
11874 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11875 (child_interrupt): Declare.
11876 (inferior::terminal_state): New.
11877 * inflow.c (struct terminal_info): Update comments.
11878 (inferior_process_group): Delete.
11879 (terminal_is_ours): Delete.
11880 (gdb_tty_state): New.
11881 (child_terminal_init): Adjust.
11882 (is_gdb_terminal, sharing_input_terminal_1)
11883 (sharing_input_terminal): New functions.
11884 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11885 Set the process's actual process group in the foreground if
11886 possible. Handle is_ours_for_output/is_ours distinction. Don't
11887 mark terminal as the inferior's if not sharing GDB's terminal.
11888 Don't check attach_flag.
11889 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11890 pass down a target_terminal_state.
11891 (child_terminal_save_inferior): New, factored out from ...
11892 (child_terminal_ours_1): ... this. Handle
11893 target_terminal_state::is_ours_for_output.
11894 (child_interrupt, child_pass_ctrlc): New.
11895 (inflow_inferior_exit): Clear the inferior's terminal_state.
11896 (copy_terminal_info): Copy the inferior's terminal state.
11897 (_initialize_inflow): Remove reference to terminal_is_ours.
11898 * inflow.h (inferior_process_group): Delete.
11899 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11900 * procfs.c (procfs_target): Don't install procfs_interrupt.
11901 (procfs_interrupt): Delete.
11902 * remote.c (remote_serial_quit_handler): Adjust.
11903 (remote_interrupt): Remove ptid parameter. Adjust.
11904 * target-delegates.c: Regenerate.
11905 * target.c: Include "terminal.h".
11906 (target_terminal::terminal_state): Rename to ...
11907 (target_terminal::m_terminal_state): ... this.
11908 (target_terminal::init): Adjust.
11909 (target_terminal::inferior): Adjust to per-inferior
11910 terminal_state.
11911 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11912 (target_terminal::ours, target_terminal::ours_for_output): Use
11913 target_terminal_is_ours_kind.
11914 (target_interrupt): Remove ptid parameter. Adjust.
11915 (default_target_pass_ctrlc): Adjust.
11916 * target.h (target_ops::to_terminal_save_inferior): New field.
11917 (target_ops::to_interrupt): Remove ptid_t parameter.
11918 (target_interrupt): Remove ptid_t parameter. Update comment.
11919 (target_pass_ctrlc): Update comment.
11920 * target/target.h (target_terminal_state): New scoped enum,
11921 factored out of ...
11922 (target_terminal::terminal_state): ... here.
11923 (target_terminal::inferior): Update comments.
11924 (target_terminal::restore_inferior): New.
11925 (target_terminal::is_inferior, target_terminal::is_ours)
11926 (target_terminal::is_ours_for_output): Adjust.
11927 (target_terminal::scoped_restore_terminal_state): Adjust to
11928 rename, and call restore_inferior() instead of inferior().
11929 (target_terminal::scoped_restore_terminal_state::m_state): Change
11930 type.
11931 (target_terminal::terminal_state): Rename to ...
11932 (target_terminal::m_terminal_state): ... this and change type.
11933
11934 2018-01-30 Pedro Alves <palves@redhat.com>
11935
11936 * linux-nat.c (wait_for_signal): New function.
11937 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11938 directly.
11939 (async_terminal_is_ours)
11940 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11941 (linux_nat_add_target): Don't override
11942 to_terminal_inferior/to_terminal_ours.
11943
11944 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11945
11946 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11947
11948 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11949
11950 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11951 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11952 dwarf2_per_objfile_free here.
11953 (dwarf2_per_objfile_free): Remove.
11954 (_initialize_dwarf2_read): Don't register
11955 dwarf2_per_objfile_free as a registry cleanup.
11956
11957 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11958
11959 Avoid compilation errors in MinGW native builds
11960
11961 The error is triggered by including python-internal.h, and the
11962 error message is:
11963
11964 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11965 from build-gnulib/import/math.h:27,
11966 from d:/usr/Python26/include/pyport.h:235,
11967 from d:/usr/Python26/include/Python.h:58,
11968 from python/python-internal.h:94,
11969 from python/py-arch.c:24:
11970 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11971 using ::hypot;
11972 ^~~~~
11973
11974 This happens because Python headers define 'hypot' to expand t
11975 '_hypot' in the Windows builds.
11976 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11977 'hypoth'. This avoids a compilation error.
11978
11979 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11980
11981 * MAINTAINERS (Write After Approval): Fix ordering.
11982
11983 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11984
11985 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11986
11987 2018-01-26 Alan Modra <amodra@gmail.com>
11988
11989 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11990 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11991 Remove nop. Make const. Comment.
11992 (powerpc32_plt_stub_so_2): New.
11993 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11994 Correct count. Update uses.
11995 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11996 Move common code reading PLT entry word. Correct
11997 powerpc32_plt_stub PLT address calculation.
11998 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11999 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12000 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12001 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12002 (ppc64_standard_linkage8): Likewise.
12003 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12004 Correct insns description.
12005 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12006
12007 2018-01-24 Pedro Alves <palves@redhat.com>
12008
12009 GCC PR libstdc++/83906
12010 * gdbtypes.c (operator==(const dynamic_prop &,
12011 const dynamic_prop &)): New.
12012 (operator==(const range_bounds &, const range_bounds &)): New.
12013 (check_types_equal): Use them instead of memcmp.
12014 * gdbtypes.h (operator==(const dynamic_prop &,
12015 const dynamic_prop &)): Declare.
12016 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12017 (operator==(const range_bounds &, const range_bounds &)): Declare.
12018 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12019
12020 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12021
12022 * s390-linux-tdep.c (s390_record_address_mask)
12023 (s390_record_calc_disp_common, s390_record_calc_disp)
12024 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12025 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12026 (s390_process_record): Move to s390-tdep.c.
12027 (s390_linux_init_abi_any): Adjust.
12028 * s390-tdep.c (s390_record_address_mask)
12029 (s390_record_calc_disp_common, s390_record_calc_disp)
12030 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12031 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12032 (s390_process_record): Moved from s390-linux-tdep.c
12033 (s390_gdbarch_init): Adjust.
12034
12035 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12036
12037 * s390-linux-nat.c (s390-tdep.h): New include.
12038 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12039 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12040 (ALLDEPFILES): Add s390-tdep.c.
12041 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12042 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12043 * s390-tdep.h: ...this. New file.
12044 * s390-linux-tdep.c (s390-tdep.h): New include.
12045 (_initialize_s390_tdep): Rename to...
12046 (_initialize_s390_linux_tdep): ...this and adjust.
12047 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12048 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12049 s390-tdep.h.
12050 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12051 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12052 (s390_is_partial_instruction, s390_software_single_step)
12053 (is_non_branch_ril, s390_displaced_step_copy_insn)
12054 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12055 (s390_prologue_data, s390_addr, s390_store, s390_load)
12056 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12057 (s390_register_call_saved, s390_guess_tracepoint_registers)
12058 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12059 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12060 (s390_pseudo_register_name, s390_pseudo_register_type)
12061 (s390_pseudo_register_read, s390_pseudo_register_write)
12062 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12063 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12064 (s390_addr_bits_remove, s390_address_class_type_flags)
12065 (s390_address_class_type_flags_to_name)
12066 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12067 (s390_function_arg_float, s390_function_arg_vector)
12068 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12069 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12070 (s390_frame_align, s390_register_return_value, s390_return_value)
12071 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12072 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12073 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12074 (s390_trad_frame_prev_register, s390_unwind_cache)
12075 (s390_prologue_frame_unwind_cache)
12076 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12077 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12078 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12079 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12080 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12081 (s390_frame_base_address, s390_local_base_address)
12082 (s390_frame_base, s390_gcc_target_options)
12083 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12084 (s390_validate_reg_range, s390_tdesc_valid)
12085 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12086 * s390-tdep.c: ...this. New file.
12087
12088 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12089
12090 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12091 (s390_process_record, s390_gdbarch_tdep_alloc)
12092 (s390_linux_init_abi_any): Use/set new hook.
12093
12094 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12095
12096 * s390-linux-tdep.c (osabi.h): New include.
12097 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12098 (s390_linux_init_abi_any): New functions.
12099 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12100
12101 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12102
12103 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12104 tdesc_has_registers check
12105
12106 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12107
12108 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12109 (s390_validate_reg_range): New macro.
12110 (s390_gdbarch_init): Adjust.
12111
12112 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12113
12114 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12115 (s390_gdbarch_tdep_alloc): Adjust.
12116 (s390_gdbarch_init): Adjust.
12117
12118 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12119
12120 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12121 <have_tdb>: Change type to bool.
12122 (s390_gdbarch_tdep_alloc): Adjust.
12123 (s390_gdbarch_init): Adjust.
12124
12125 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12126
12127 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12128 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12129 (s390_gdbarch_tdep_alloc): New function.
12130 (s390_gdbarch_init): Allocate tdep at start and use its fields
12131 instead of separate variables.
12132
12133 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12134
12135 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12136 when looking for cached gdbarch and add comment for remaining.
12137
12138 2018-01-22 Pedro Alves <palves@redhat.com>
12139 Sergio Durigan Junior <sergiodj@redhat.com>
12140
12141 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12142 case.
12143
12144 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12145
12146 * MAINTAINERS: Update my company e-mail address.
12147
12148 2018-01-22 Yao Qi <yao.qi@linaro.org>
12149
12150 * regcache.c (cooked_write_test): New function.
12151 (_initialize_regcache): Register the test.
12152
12153 2018-01-22 Yao Qi <yao.qi@linaro.org>
12154
12155 * ia64-tdep.c (ia64_pseudo_register_read): Call
12156 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12157 * m32c-tdep.c (m32c_cat_read): Likewise.
12158 (m32c_r3r2r1r0_read): Likewise.
12159 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12160 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12161
12162 2018-01-22 Yao Qi <yao.qi@linaro.org>
12163
12164 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12165 method raw_read instead of regcache_raw_read.
12166 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12167 * arm-tdep.c (arm_neon_quad_read): Likewise.
12168 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12169 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12170 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12171 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12172 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12173 (i386_pseudo_register_read_into_value): Likewise.
12174 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12175 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12176 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12177 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12178 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12179 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12180 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12181 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12182 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12183
12184 2018-01-22 Yao Qi <yao.qi@linaro.org>
12185
12186 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12187 * configure.tgt: Remove target mt.
12188 * mt-tdep.c: Remove.
12189 * regcache.c (cooked_read_test): Remove the check for mt.
12190
12191 2018-01-22 Yao Qi <yao.qi@linaro.org>
12192
12193 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12194 instead of gdbarch_pseudo_register_read_value.
12195
12196 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12197
12198 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12199 language is Ada.
12200
12201 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12202
12203 * linespec.c (create_sals_line_offset): Remove code that preserved
12204 the symtab_and_line's line number.
12205
12206 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12207
12208 * varobj.c (varobj_create): Don't set valid_block when creating a
12209 floating varobj.
12210
12211 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12212
12213 * varobj.c (varobj_create): Remove out of date comment.
12214
12215 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12216
12217 PR mi/20395
12218 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12219 updating innermost block.
12220 * parse.c (innermost_block_tracker::update): Take extra type
12221 parameter, and check types match before updating innermost block.
12222 (write_dollar_variable): Update innermost block for registers.
12223 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12224 (innermost_block_tracker::innermost_block_tracker): Initialise
12225 m_types member.
12226 (innermost_block_tracker::reset): Take type parameter.
12227 (innermost_block_tracker::update): Take type parameter, and pass
12228 type through as needed.
12229 (innermost_block_tracker::m_types): New member.
12230 * varobj.c (varobj_create): Pass type when reseting innermost
12231 block.
12232
12233 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12234
12235 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12236 * ada-lang.c (resolve_subexp): Likewise.
12237 * breakpoint.c (set_breakpoint_condition) Likewise.
12238 (watch_command_1) Likewise.
12239 * c-exp.y (variable): Likewise.
12240 * d-exp.y (PrimaryExpression): Likewise.
12241 * f-exp.y (variable): Likewise.
12242 * go-exp.y (variable): Likewise.
12243 * m2-exp.y (variable): Likewise.
12244 * objfiles.c (objfile::~objfile): Likewise.
12245 * p-exp.y (variable): Likewise.
12246 * parse.c (innermost_block): Change type.
12247 * parser-defs.h (class innermost_block_tracker): New.
12248 (innermost_block): Change to innermost_block_tracker.
12249 * printcmd.c (display_command): Switch to innermost_block API.
12250 (do_one_display): Likewise.
12251 * rust-exp.y (do_one_display): Likewise.
12252 * symfile.c (clear_symtab_users): Likewise.
12253 * varobj.c (varobj_create): Switch to innermost_block API, replace
12254 use of innermost_block with block stored on varobj object.
12255
12256 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12257
12258 * expression.h (innermost_block): Remove declaration.
12259 * varobj.c: Add 'parser-defs.h' include.
12260
12261 2018-01-19 Tom Tromey <tom@tromey.com>
12262
12263 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12264 symbols in the static and global blocks.
12265
12266 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12267
12268 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12269 gdb_ptrace.h, and move including gdb_wait.h ...
12270 * nat/linux-ptrace.h: ... to here.
12271
12272 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12273
12274 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12275 inf_ptrace_detach_success.
12276 (inf_ptrace_detach_success): Add inferior parameter, use it
12277 instead of inferior_ptid, pass it to detach_inferior.
12278 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12279 parameter.
12280 * inferior.c (detach_inferior): Add overload that takes an
12281 inferior object.
12282 * inferior.h (detach_inferior): Likewise.
12283 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12284 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12285 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12286
12287 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12288
12289 * target.h (struct target_ops) <to_detach>: Add inferior
12290 parameter.
12291 (target_detach): Likewise.
12292 * target.c (dispose_inferior): Pass inferior down.
12293 (target_detach): Pass inferior down. Assert that it is equal to
12294 the current inferior.
12295 * aix-thread.c (aix_thread_detach): Pass inferior down.
12296 * corefile.c (core_file_command): Pass current_inferior() down.
12297 * corelow.c (core_detach): Add inferior parameter.
12298 * darwin-nat.c (darwin_detach): Likewise.
12299 * gnu-nat.c (gnu_detach): Likewise.
12300 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12301 * infcmd.c (detach_command): Pass current_inferior() down to
12302 target_detach.
12303 * infrun.c (follow_fork_inferior): Pass parent_inf to
12304 target_detach.
12305 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12306 target_detach.
12307 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12308 * linux-thread-db.c (thread_db_detach): Likewise.
12309 * nto-procfs.c (procfs_detach): Likewise.
12310 * procfs.c (procfs_detach): Likewise.
12311 * record.c (record_detach): Likewise.
12312 * record.h (struct inferior): Forward-declare.
12313 (record_detach): Add inferior parameter.
12314 * remote-sim.c (gdbsim_detach): Likewise.
12315 * remote.c (remote_detach_1): Likewise.
12316 (remote_detach): Likewise.
12317 (extended_remote_detach): Likewise.
12318 * sol-thread.c (sol_thread_detach): Likewise.
12319 * target-debug.h (target_debug_print_inferior_p): New macro.
12320 * target-delegates.c: Re-generate.
12321 * top.c (kill_or_detach): Pass inferior down to target_detach.
12322 * windows-nat.c (windows_detach): Add inferior parameter.
12323
12324 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12325
12326 * target.h (struct target_ops) <to_detach>: Remove args
12327 parameter.
12328 (target_detach): Likewise.
12329 * target.c (dispose_inferior): Adjust.
12330 (target_detach): Remove args parameter, adjust.
12331 * aix-thread.c (aix_thread_detach): Adjust.
12332 * corefile.c (core_file_command): Adjust.
12333 * corelow.c (core_detach): Adjust.
12334 * darwin-nat.c (darwin_detach): Adjust.
12335 * gnu-nat.c (gnu_detach): Adjust.
12336 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12337 * infcmd.c (detach_command): Adjust
12338 * infrun.c (follow_fork_inferior): Adjust.
12339 (handle_vfork_child_exec_or_exit): Adjust.
12340 * linux-fork.c (linux_fork_detach): Remove args parameter.
12341 * linux-fork.h (linux_fork_detach): Likewise.
12342 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12343 * linux-thread-db.c (thread_db_detach): Likewise.
12344 * nto-procfs.c (procfs_detach): Likewise.
12345 * procfs.c (procfs_detach): Likewise.
12346 (do_detach): Remove signo parameter.
12347 * record.c (record_detach): Remove args parameter.
12348 * record.h (record_detach): Likewise.
12349 * remote-sim.c (gdbsim_detach): Likewise.
12350 * remote.c (remote_detach_1): Likewise.
12351 (remote_detach): Likewise.
12352 (extended_remote_detach): Likewise.
12353 * sol-thread.c (sol_thread_detach): Likewise.
12354 * target-delegates.c: Re-generate.
12355 * top.c (struct qt_args) <args>: Remove field.
12356 (kill_or_detach): Don't pass args.
12357 (quit_force): Don't set args.
12358 * windows-nat.c (windows_detach): Remove args parameter.
12359
12360 2018-01-19 Yao Qi <yao.qi@linaro.org>
12361
12362 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12363 (arm_linux_init_abi): Install it.
12364
12365 2018-01-19 Yao Qi <yao.qi@linaro.org>
12366
12367 * osabi.c (gdb_osabi_names): Extend the regexp for
12368 arm-linux-gnueabihf.
12369
12370 2018-01-18 Yao Qi <yao.qi@linaro.org>
12371
12372 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12373 m_abbrevs.
12374 (abbrev_table::add_abbrev): Update.
12375 (abbrev_table::lookup_abbrev): Update.
12376
12377 2018-01-18 Yao Qi <yao.qi@linaro.org>
12378
12379 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12380
12381 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12382
12383 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12384 to "std::string".
12385
12386 2018-01-17 Tom Tromey <tom@tromey.com>
12387
12388 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12389
12390 2018-01-17 Tom Tromey <tom@tromey.com>
12391
12392 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12393 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12394 (create_array_type_with_stride): Update.
12395 * dwarf2read.c (set_die_type): Update.
12396
12397 2018-01-17 Tom Tromey <tom@tromey.com>
12398
12399 * dwarf2read.c (delayed_method_info): Remove typedef.
12400 (dwarf2_cu::method_info): Now a std::vector.
12401 (add_to_method_list): Update.
12402 (free_delayed_list): Remove.
12403 (compute_delayed_physnames): Update.
12404 (process_full_comp_unit, process_full_type_unit): Clear the method
12405 list. Remove cleanups.
12406 (psymtab_include_file_name): Add name_holder parameter. Use
12407 unique_xmalloc_ptr.
12408 (dwarf_decode_lines): Update.
12409
12410 2018-01-17 Tom Tromey <tom@tromey.com>
12411 Simon Marchi <simon.marchi@ericsson.com>
12412
12413 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12414 (dwarf2_per_objfile::free_cached_comp_units)
12415 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12416 (init_cutu_and_read_dies_no_follow): Update.
12417 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12418 (dwarf2_cu::~dwarf2_cu): New.
12419 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12420 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12421
12422 2018-01-17 Tom Tromey <tom@tromey.com>
12423 Simon Marchi <simon.marchi@ericsson.com>
12424
12425 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12426 (struct die_reader_specs) <abbrev_table>: New member.
12427 (struct abbrev_table): Add constructor.
12428 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12429 <abbrev_obstack>: Now an auto_obstack.
12430 (abbrev_table_up): New typedef.
12431 (init_cu_die_reader): Add abbrev_table parameter.
12432 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12433 Add result_dwo_abbrev_table.
12434 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12435 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12436 Update.
12437 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12438 parameter.
12439 (skip_children): Update.
12440 (abbrev_table::alloc_abbrev): Rename from
12441 abbrev_table_alloc_abbrev.
12442 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12443 (abbrev_table::lookup_abbrev): Rename from
12444 abbrev_table_lookup_abbrev.
12445 (abbrev_table_read_table): Return abbrev_table_up.
12446 (abbrev_table_free, abbrev_table_free_cleanup)
12447 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12448 (load_partial_dies): Update.
12449
12450 2018-01-17 Tom Tromey <tom@tromey.com>
12451
12452 * dwarf2read.c (dwarf2_compute_name): Update comment.
12453 (read_func_scope, read_variable): Update.
12454 (new_symbol): Remove.
12455 (new_symbol_full): Rename to new_symbol.
12456
12457 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12458
12459 PR gdb/16577
12460 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12461 a warning instead of throwing an error, set section size to 0 and return
12462 NULL.
12463 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12464
12465 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12466
12467 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12468 std::string.
12469 (linux_ptrace_attach_fail_reason_string): Likewise.
12470 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12471 Likewise.
12472 (linux_ptrace_attach_fail_reason_string): Likewise.
12473 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12474
12475 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12476
12477 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12478
12479 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12480
12481 PR gdb/21559
12482 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12483 checking for fs_base/gs_base fields in struct user_regs_struct.
12484 * configure: Regenerate.
12485
12486 2018-01-17 Yao Qi <yao.qi@linaro.org>
12487
12488 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12489 function.
12490 (aarch64_linux_init_abi): Install it to gdbarch hook
12491 gcc_target_options.
12492
12493 2018-01-15 Pedro Alves <palves@redhat.com>
12494
12495 * common/signals-state-save-restore.c
12496 (save_original_signals_state): Fix typos.
12497
12498 2017-01-12 Tom Tromey <tom@tromey.com>
12499 Sergio Durigan Junior <sergiodj@redhat.com>
12500
12501 * Makefile.in (install-only): Install gdb-add-index.
12502
12503 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12504
12505 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12506
12507 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12508
12509 * infrun.c (keep_going_pass_signal): Clear step-over info when
12510 insert_breakpoints fails.
12511
12512 2018-01-11 Pedro Alves <palves@redhat.com>
12513
12514 PR gdb/22583
12515 * infrun.c (resume): Rename to ...
12516 (resume_1): ... this.
12517 (resume): Reimplement as wrapper around resume_1.
12518
12519 2018-01-11 Pedro Alves <palves@redhat.com>
12520
12521 PR remote/22597
12522 * remote.c (remote_parse_stop_reply): Default to the last-set
12523 general thread instead of to 'magic_null_ptid'.
12524
12525 2018-01-10 Pedro Alves <palves@redhat.com>
12526
12527 * language.h (language_get_symbol_name_matcher): Rename ...
12528 (get_symbol_name_matcher): ... this.
12529 * language.c (language_get_symbol_name_matcher): Ditto.
12530 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12531 callers adjusted.
12532
12533 2018-01-10 Pedro Alves <palves@redhat.com>
12534
12535 PR gdb/22670
12536 * dwarf2read.c
12537 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12538 Adjust to use language_get_symbol_name_matcher instead of
12539 language_defn::la_get_symbol_name_matcher.
12540 * language.c (language_get_symbol_name_matcher): If in Ada mode
12541 and the lookup name is a verbatim match, return Ada's matcher.
12542 * language.h (language_get_symbol_name_matcher): Adjust comment.
12543 (ada_lookup_name_info::verbatim_p):: New method.
12544
12545 2018-01-10 Pedro Alves <palves@redhat.com>
12546
12547 PR gdb/22670
12548 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12549 minsym's language is language_auto or language_cplus, pass down
12550 language_ada instead.
12551 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12552
12553 2018-01-10 Pedro Alves <palves@redhat.com>
12554
12555 PR gdb/22670
12556 * minsyms.c (linkage_name_str): New function.
12557 (iterate_over_minimal_symbols): Use it.
12558
12559 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12560
12561 * NEWS: Document that 'info proc' now works on FreeBSD.
12562
12563 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12564
12565 * configure.ac: Check for kinfo_getfile in libutil.
12566 * configure: Regenerate.
12567 * config.in: Regenerate.
12568 * fbsd-nat.c: Include "fbsd-tdep.h".
12569 (fbsd_fetch_cmdline): New.
12570 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12571 rather than calling error.
12572 (fbsd_info_proc): New.
12573 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12574 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12575 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12576
12577 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12578
12579 * fbsd-nat.c (struct free_deleter): Remove.
12580 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12581
12582 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12583
12584 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12585 NULL for an empty pathname.
12586
12587 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12588
12589 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12590 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12591 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12592 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12593 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12594 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12595 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12596 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12597 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12598 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12599 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12600 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12601 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12602 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12603 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12604
12605 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12606
12607 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12608 (gnu_xfer_auxv): New function.
12609 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12610 TARGET_OBJECT_AUXV.
12611
12612 2018-01-08 Yao Qi <yao.qi@linaro.org>
12613 Simon Marchi <simon.marchi@ericsson.com>
12614
12615 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12616 common/selftest.c.
12617 (COMMON_OBS): Remove selftest.o.
12618 * configure.ac: Append selftest-arch.c and common/selftest.c to
12619 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12620 * configure: Re-generated.
12621 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12622 GDB_SELF_TEST.
12623 (maintenance_info_selftests): Likewise.
12624
12625 2018-01-08 Xavier Roirand <roirand@adacore.com>
12626
12627 * ada-valprint.c (val_print_packed_array_elements): Use
12628 proper number of elements when printing an array indexed
12629 by an enumeration type.
12630
12631 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12632
12633 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12634 (dw2_get_file_names_reader): Adjust.
12635 (lookup_dwo_signatured_type): Adjust.
12636 (lookup_dwp_signatured_type): Adjust.
12637 (lookup_signatured_type): Adjust.
12638 (create_type_unit_group): Adjust.
12639 (get_type_unit_group): Adjust.
12640 (process_psymtab_comp_unit_reader): Adjust.
12641 (build_type_psymtabs_reader): Adjust.
12642 (scan_partial_symbols): Adjust.
12643 (add_partial_symbol): Adjust.
12644 (add_partial_subprogram): Adjust.
12645 (peek_die_abbrev): Adjust.
12646 (fixup_go_packaging): Adjust.
12647 (process_imported_unit_die): Adjust.
12648 (dwarf2_compute_name): Adjust.
12649 (dwarf2_physname): Adjust.
12650 (read_import_statement): Adjust.
12651 (handle_DW_AT_stmt_list): Adjust.
12652 (read_file_scope): Adjust.
12653 (read_func_scope): Adjust.
12654 (read_lexical_block_scope): Adjust.
12655 (read_call_site_scope): Adjust.
12656 (read_variable): Adjust.
12657 (dwarf2_rnglists_process): Adjust.
12658 (dwarf2_ranges_process): Adjust.
12659 (dwarf2_ranges_read): Adjust.
12660 (dwarf2_get_pc_bounds): Adjust.
12661 (dwarf2_record_block_ranges): Adjust.
12662 (dwarf2_add_field): Adjust.
12663 (dwarf2_add_member_fn): Adjust.
12664 (read_structure_type): Adjust.
12665 (process_structure_scope): Adjust.
12666 (read_enumeration_type): Adjust.
12667 (read_array_type): Adjust.
12668 (mark_common_block_symbol_computed): Adjust.
12669 (read_common_block): Adjust.
12670 (read_namespace_type): Adjust.
12671 (read_namespace): Adjust.
12672 (read_module_type): Adjust.
12673 (read_tag_pointer_type): Adjust.
12674 (read_tag_ptr_to_member_type): Adjust.
12675 (read_tag_string_type): Adjust.
12676 (read_subroutine_type): Adjust.
12677 (read_typedef): Adjust.
12678 (read_base_type): Adjust.
12679 (attr_to_dynamic_prop): Adjust.
12680 (read_subrange_type): Adjust.
12681 (read_unspecified_type): Adjust.
12682 (dwarf2_read_abbrevs): Adjust.
12683 (load_partial_dies): Adjust.
12684 (read_partial_die): Adjust.
12685 (find_partial_die): Adjust.
12686 (guess_partial_die_structure_name): Adjust.
12687 (fixup_partial_die): Adjust.
12688 (read_attribute_value): Adjust.
12689 (read_addr_index): Adjust.
12690 (read_addr_index_from_leb128): Adjust.
12691 (read_str_index): Adjust.
12692 (dwarf2_string_attr): Adjust.
12693 (get_debug_line_section): Adjust.
12694 (dwarf_decode_line_header): Adjust.
12695 (lnp_state_machine::check_line_address): Adjust.
12696 (dwarf_decode_lines_1): Adjust.
12697 (dwarf_decode_lines): Adjust.
12698 (dwarf2_start_symtab): Adjust.
12699 (var_decode_location): Adjust.
12700 (new_symbol_full): Adjust.
12701 (dwarf2_const_value_data): Adjust.
12702 (dwarf2_const_value_attr): Adjust.
12703 (dwarf2_const_value): Adjust.
12704 (die_type): Adjust.
12705 (die_containing_type): Adjust.
12706 (build_error_marker_type): Adjust.
12707 (lookup_die_type): Adjust.
12708 (guess_full_die_structure_name): Adjust.
12709 (anonymous_struct_prefix): Adjust.
12710 (determine_prefix): Adjust.
12711 (dwarf2_name): Adjust.
12712 (follow_die_ref_or_sig): Adjust.
12713 (follow_die_offset): Adjust.
12714 (follow_die_ref): Adjust.
12715 (follow_die_sig_1): Adjust.
12716 (follow_die_sig): Adjust.
12717 (get_signatured_type): Adjust.
12718 (get_DW_AT_signature_type): Adjust.
12719 (decode_locdesc): Adjust.
12720 (dwarf_decode_macros): Adjust.
12721 (cu_debug_loc_section): Adjust.
12722 (fill_in_loclist_baton): Adjust.
12723 (dwarf2_symbol_mark_computed): Adjust.
12724 (init_one_comp_unit): Don't assign
12725 dwarf2_cu::dwarf2_per_objfile.
12726 (set_die_type): Adjust.
12727
12728 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12729
12730 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12731 <dwarf2_per_objfile>: New field.
12732 (dwarf2_per_objfile): Remove global.
12733 (get_dwarf2_per_objfile): New function.
12734 (set_dwarf2_per_objfile): New function.
12735 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12736 dwarf2_per_objfile.
12737 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12738 (read_abbrev_offset): Likewise.
12739 (read_indirect_string): Likewise.
12740 (read_indirect_line_string): Likewise.
12741 (read_indirect_string_at_offset): Likewise.
12742 (read_indirect_string_from_dwz): Likewise.
12743 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12744 dwarf2_per_objfile.
12745 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12746 (create_all_comp_units): Change objfile parameter to
12747 dwarf2_per_objfile.
12748 (create_all_type_units): Likewise.
12749 (process_queue): Add dwarf2_per_objfile parameter.
12750 (read_and_check_comp_unit_head): Likewise.
12751 (lookup_dwo_unit_in_dwp): Likewise.
12752 (get_dwp_file): Likewise.
12753 (process_cu_includes): Likewise.
12754 (struct free_dwo_file_cleanup_data): New struct.
12755 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12756 set_dwarf2_per_objfile.
12757 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12758 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12759 context, adjust calls.
12760 (dw2_instantiate_symtab): Likewise.
12761 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12762 (dw2_get_cu): Likewise.
12763 (create_cu_from_index_list): Change objfile parameter to
12764 dwarf2_per_objfile.
12765 (create_cus_from_index_list): Get dwarf2_per_objfile from
12766 context, adjust calls.
12767 (create_cus_from_index): Likewise.
12768 (create_signatured_type_table_from_index): Change objfile
12769 parameter to dwarf2_per_objfile.
12770 (create_signatured_type_table_from_debug_names): Change objfile
12771 parameter to dwarf2_per_objfile.
12772 (create_addrmap_from_index): Likewise.
12773 (create_addrmap_from_aranges): Likewise.
12774 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12775 (dw2_setup): Remove.
12776 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12777 context.
12778 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12779 get_dwarf2_per_objfile.
12780 (dw2_forget_cached_source_info): Likewise.
12781 (dw2_map_symtabs_matching_filename): Likewise.
12782 (struct dw2_symtab_iterator) <index>: Remove.
12783 <dwarf2_per_objfile>: New field.
12784 (dw2_symtab_iter_init): Replace index parameter with
12785 dwarf2_per_objfile.
12786 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12787 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12788 (dw2_print_stats): Likewise.
12789 (dw2_dump): Likewise.
12790 (dw2_expand_symtabs_for_function): Likewise.
12791 (dw2_expand_all_symtabs): Likewise.
12792 (dw2_expand_symtabs_with_fullname): Likewise.
12793 (dw2_expand_marked_cus): Replace index and objfile parameters
12794 with dwarf2_per_objfile.
12795 (dw_expand_symtabs_matching_file_matcher): Add
12796 dwarf2_per_objfile parameter and adjust calls.
12797 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12798 adjust calls.
12799 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12800 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12801 adjust calls.
12802 (create_cus_from_debug_names_list): Replace objfile parameter
12803 with dwarf2_per_objfile and adjust calls.
12804 (create_cus_from_debug_names): Likewise.
12805 (dwarf2_read_debug_names): Likewise.
12806 (mapped_debug_names::namei_to_name): Adjust call.
12807 (dw2_debug_names_iterator::next): Likewise.
12808 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12809 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12810 (dw2_debug_names_dump): Likewise.
12811 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12812 (dw2_debug_names_expand_symtabs_matching): Likewise.
12813 (dwarf2_initialize_objfile): Likewise.
12814 (dwarf2_build_psymtabs): Likewise.
12815 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12816 this_cu.
12817 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12818 (read_and_check_comp_unit_head): Likewise.
12819 (read_abbrev_offset): Likewise.
12820 (create_debug_type_hash_table): Likewise.
12821 (create_debug_types_hash_table): Likewise.
12822 (create_all_type_units): Replace objfile parameter with
12823 dwarf2_per_objfile.
12824 (add_type_unit): Add dwarf2_per_objfile parameter.
12825 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12826 with dwarf2_per_objfile.
12827 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12828 (lookup_dwp_signatured_type): Likewise.
12829 (lookup_signatured_type): Likewise.
12830 (read_cutu_die_from_dwo): Likewise.
12831 (init_tu_and_read_dwo_dies): Likewise.
12832 (init_cutu_and_read_dies): Likewise.
12833 (init_cutu_and_read_dies_no_follow): Likewise.
12834 (allocate_type_unit_groups_table): Add objfile parameter.
12835 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12836 (get_type_unit_group): Likewise.
12837 (process_psymtab_comp_unit): Update call.
12838 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12839 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12840 (print_tu_stats): Likewise.
12841 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12842 in void* parameter.
12843 (build_type_psymtabs): Change objfile parameter to
12844 dwarf2_per_objfile.
12845 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12846 passed in void* parameter.
12847 (process_skeletonless_type_units): Change objfile parameter to
12848 dwarf2_per_objfile.
12849 (set_partial_user): Likewise.
12850 (dwarf2_build_psymtabs_hard): Likewise.
12851 (read_comp_units_from_section): Likewise.
12852 (create_all_comp_units): Likewise.
12853 (scan_partial_symbols): Update calls.
12854 (add_partial_symbol): Likewise.
12855 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12856 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12857 (process_queue): Add dwarf2_per_objfile parameter.
12858 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12859 (compute_compunit_symtab_includes): Likewise.
12860 (process_cu_includes): Add dwarf2_per_objfile parameter.
12861 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12862 (process_full_type_unit): Likewise.
12863 (process_imported_unit_die): Update call.
12864 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12865 (read_file_scope): Likewise.
12866 (allocate_dwo_file_hash_table): Add objfile parameter.
12867 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12868 (create_cus_hash_table): Likewise.
12869 (create_dwp_hash_table): Likewise.
12870 (create_dwo_unit_in_dwp_v1): Likewise.
12871 (create_dwp_v2_section): Likewise.
12872 (create_dwo_unit_in_dwp_v2): Likewise.
12873 (lookup_dwo_unit_in_dwp): Likewise.
12874 (try_open_dwop_file): Likewise.
12875 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12876 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12877 cleanup to include a reference to dwarf2_per_objfile.
12878 (open_dwp_file): Add dwarf2_per_objfile parameter.
12879 (open_and_init_dwp_file): Likewise.
12880 (get_dwp_file): Likewise.
12881 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12882 (queue_and_load_all_dwo_tus): Update call.
12883 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12884 data.
12885 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12886 (dwarf2_ranges_process): Likewise.
12887 (dwarf2_get_pc_bounds): Likewise.
12888 (mark_common_block_symbol_computed): Likewise.
12889 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12890 (dwarf2_read_abbrevs): Update call.
12891 (read_partial_die): Use dwarf2_per_objfile from cu.
12892 (find_partial_die): Likewise.
12893 (fixup_partial_die): Likewise.
12894 (read_attribute_value): Likewise.
12895 (read_indirect_string_at_offset_from): Add objfile parameter.
12896 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12897 parameter.
12898 (read_indirect_string_from_dwz): Add objfile parameter.
12899 (read_indirect_string): Add objfile parameter.
12900 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12901 (read_addr_index): Use dwarf2_per_objfile from cu.
12902 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12903 call dw2_setup.
12904 (read_str_index): Use dwarf2_per_objfile from cu.
12905 (get_debug_line_section): Likewise.
12906 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12907 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12908 (new_symbol_full): Use dwarf2_per_objfile from cu.
12909 (build_error_marker_type): Likewise.
12910 (lookup_die_type): Likewise.
12911 (determine_prefix): Likewise.
12912 (follow_die_offset): Likewise.
12913 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12914 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12915 (dwarf2_fetch_die_type_sect_off): Likewise.
12916 (dwarf2_get_die_type): Likewise.
12917 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12918 (get_signatured_type): Likewise.
12919 (get_DW_AT_signature_type): Likewise.
12920 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12921 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12922 (cu_debug_loc_section): Likewise.
12923 (fill_in_loclist_baton): Likewise.
12924 (dwarf2_symbol_mark_computed): Likewise.
12925 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12926 dwarf2_per_objfile.
12927 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12928 parameter.
12929 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12930 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12931 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12932 (set_die_type): Use dwarf2_free_objfile from cu.
12933 (get_die_type_at_offset): Likewise.
12934 (dwarf2_per_objfile_free): Don't assign global variable.
12935 (debug_names) <constructor>: Add dwarf2_per_objfile
12936 parameter, update m_debugstrlookup construction.
12937 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12938 parameter.
12939 <m_dwarf2_per_objfile>: New field.
12940 <lookup>: Use m_dwarf2_per_objfile.
12941 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12942 (psyms_seen_size): Likewise.
12943 (write_gdbindex): Replace objfile parameter with
12944 dwarf2_per_objfile.
12945 (write_debug_names): Likewise.
12946 (write_psymtabs_to_index): Likewise.
12947 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12948 calls.
12949
12950 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12951
12952 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12953 <dwarf2_per_objfile>: New field.
12954 (struct dwarf2_per_cu_data) <objfile>: Remove.
12955 <dwarf2_per_objfile>: New field.
12956 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12957 of objfile.
12958 (create_signatured_type_table_from_index): Likewise.
12959 (create_debug_type_hash_table): Likewise.
12960 (fill_in_sig_entry_from_dwo_entry): Likewise.
12961 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12962 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12963 objfile.
12964 (create_partial_symtab): Access objfile through
12965 dwarf2_per_objfile.
12966 (process_psymtab_comp_unit_reader): Likewise.
12967 (read_comp_units_from_section): Likewise.
12968 (scan_partial_symbols): Likewise.
12969 (add_partial_symbol): Likewise.
12970 (add_partial_subprogram): Likewise.
12971 (peek_die_abbrev): Likewise.
12972 (fixup_go_packaging): Likewise.
12973 (process_full_comp_unit): Likewise.
12974 (process_full_type_unit): Likewise.
12975 (process_imported_unit_die): Likewise.
12976 (dwarf2_compute_name): Likewise.
12977 (dwarf2_physname): Likewise.
12978 (read_import_statement): Likewise.
12979 (create_cus_hash_table): Assign dwarf2_physname instead of
12980 objfile.
12981 (read_func_scope): Access objfile through dwarf2_per_objfile.
12982 (read_lexical_block_scope): Likewise.
12983 (read_call_site_scope): Likewise.
12984 (read_variable): Likewise.
12985 (dwarf2_rnglists_process): Likewise.
12986 (dwarf2_ranges_process): Likewise.
12987 (dwarf2_ranges_read): Likewise.
12988 (dwarf2_record_block_ranges): Likewise.
12989 (dwarf2_add_field): Likewise.
12990 (dwarf2_add_member_fn): Likewise.
12991 (read_structure_type): Likewise.
12992 (process_structure_scope): Likewise.
12993 (read_enumeration_type): Likewise.
12994 (read_array_type): Likewise.
12995 (read_common_block): Likewise.
12996 (read_namespace_type): Likewise.
12997 (read_namespace): Likewise.
12998 (read_module_type): Likewise.
12999 (read_tag_pointer_type): Likewise.
13000 (read_tag_ptr_to_member_type): Likewise.
13001 (read_tag_string_type): Likewise.
13002 (read_subroutine_type): Likewise.
13003 (read_typedef): Likewise.
13004 (read_base_type): Likewise.
13005 (attr_to_dynamic_prop): Likewise.
13006 (read_subrange_type): Likewise.
13007 (read_unspecified_type): Likewise.
13008 (load_partial_dies): Likewise.
13009 (read_partial_die): Likewise.
13010 (find_partial_die): Likewise.
13011 (guess_partial_die_structure_name): Likewise.
13012 (fixup_partial_die): Likewise.
13013 (read_attribute_value): Likewise.
13014 (read_addr_index_from_leb128): Likewise.
13015 (dwarf2_read_addr_index): Likewise.
13016 (dwarf2_string_attr): Likewise.
13017 (lnp_state_machine::check_line_address): Likewise.
13018 (dwarf_decode_lines_1): Likewise.
13019 (dwarf_decode_lines): Likewise.
13020 (dwarf2_start_symtab): Likewise.
13021 (var_decode_location): Likewise.
13022 (new_symbol_full): Likewise.
13023 (dwarf2_const_value_data): Likewise.
13024 (dwarf2_const_value_attr): Likewise.
13025 (dwarf2_const_value): Likewise.
13026 (die_type): Likewise.
13027 (die_containing_type): Likewise.
13028 (lookup_die_type): Likewise.
13029 (guess_full_die_structure_name): Likewise.
13030 (anonymous_struct_prefix): Likewise.
13031 (dwarf2_name): Likewise.
13032 (follow_die_ref_or_sig): Likewise.
13033 (follow_die_offset): Likewise.
13034 (follow_die_ref): Likewise.
13035 (dwarf2_fetch_die_loc_sect_off): Likewise.
13036 (dwarf2_fetch_constant_bytes): Likewise.
13037 (dwarf2_fetch_die_type_sect_off): Likewise.
13038 (dwarf2_get_die_type): Likewise.
13039 (follow_die_sig): Likewise.
13040 (decode_locdesc): Likewise.
13041 (dwarf2_per_cu_objfile): Likewise.
13042 (dwarf2_per_cu_text_offset): Likewise.
13043 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13044 objfile.
13045 (set_die_type): Access objfile through
13046 dwarf2_per_objfile.
13047
13048 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13049
13050 * valprint.c (converted_character_d): Remove typedef.
13051 (DEF_VEC_O (converted_character_d)): Remove.
13052 (count_next_character): Use std::vector.
13053 (print_converted_chars_to_obstack): Likewise.
13054 (generic_printstr): Likewise.
13055
13056 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13057
13058 * xml-support.h (struct gdb_xml_value): Add constructor.
13059 <value>: Change type to unique_xmalloc_ptr.
13060 (gdb_xml_value_s): Remove typedef.
13061 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13062 (gdb_xml_element_start_handler): Change parameter type to
13063 std::vector.
13064 (xml_find_attribute): Likewise.
13065 * xml-support.c (xml_find_attribute): Change parameter type to
13066 std::vector and adjust.
13067 (gdb_xml_values_cleanup): Remove.
13068 (gdb_xml_parser::start_element): Adjust to std::vector.
13069 (xinclude_start_include): Change paraeter type to std::vector
13070 and adjust.
13071 * btrace.c (check_xml_btrace_version): Likewise.
13072 (parse_xml_btrace_block): Likewise.
13073 (parse_xml_btrace_pt_config_cpu): Likewise.
13074 (parse_xml_btrace_pt): Likewise.
13075 (parse_xml_btrace_conf_bts): Likewise.
13076 (parse_xml_btrace_conf_pt): Likewise.
13077 * memory-map.c (memory_map_start_memory): Likewise.
13078 (memory_map_start_property): Likewise.
13079 * osdata.c (osdata_start_osdata): Likewise.
13080 (osdata_start_item): Likewise.
13081 (osdata_start_column): Likewise.
13082 * remote.c (start_thread): Likewise.
13083 * solib-aix.c (library_list_start_library): Likewise.
13084 (library_list_start_list): Likewise.
13085 * solib-svr4.c (library_list_start_library): Likewise.
13086 (svr4_library_list_start_list): Likewise.
13087 * solib-target.c (library_list_start_segment): Likewise.
13088 (library_list_start_section): Likewise.
13089 (library_list_start_library): Likewise.
13090 (library_list_start_list): Likewise.
13091 * tracepoint.c (traceframe_info_start_memory): Likewise.
13092 (traceframe_info_start_tvar): Likewise.
13093 * xml-syscall.c (syscall_start_syscall): Likewise.
13094 * xml-tdesc.c (tdesc_start_target): Likewise.
13095 (tdesc_start_feature): Likewise.
13096 (tdesc_start_reg): Likewise.
13097 (tdesc_start_union): Likewise.
13098 (tdesc_start_struct): Likewise.
13099 (tdesc_start_flags): Likewise.
13100 (tdesc_start_enum): Likewise.
13101 (tdesc_start_field): Likewise.
13102 (tdesc_start_enum_value): Likewise.
13103 (tdesc_start_vector): Likewise.
13104
13105 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13106
13107 * extension.h (struct xmethod_worker) <clone>: Remove.
13108 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13109 Remove.
13110 (python_xmethod_worker::clone): Remove.
13111 * valops.c (find_overload_match): Use std::move instead of
13112 clone.
13113
13114 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13115
13116 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13117 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13118 <free_xmethod_worker_data>: Remove.
13119 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13120 <get_xmethod_arg_types>: Remove.
13121 <get_xmethod_result_type>: Remove.
13122 <invoke_xmethod>: Remove.
13123 * extension.c (new_xmethod_worker): Remove.
13124 (clone_xmethod_worker): Remove.
13125 (get_matching_xmethod_workers): Return void, pass std::vector by
13126 pointer.
13127 (get_xmethod_arg_types): Rename to...
13128 (xmethod_worker::get_arg_types): ... this, and adjust.
13129 (get_xmethod_result_type): Rename to...
13130 (xmethod_worker::get_result_type): ... this, and adjust.
13131 (invoke_xmethod): Remove.
13132 (free_xmethod_worker): Remove.
13133 (free_xmethod_worker_vec): Remove.
13134 * extension.h (enum ext_lang_rc): Move here from
13135 extension-priv.h.
13136 (struct xmethod_worker): Add constructor and destructor.
13137 <data>: Remove.
13138 <value>: Remove.
13139 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13140 virtual pure methods.
13141 <get_arg_types, get_result_type>: New methods.
13142 (xmethod_worker_ptr): Remove typedef.
13143 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13144 (xmethod_worker_vec): Remove typedef.
13145 (xmethod_worker_up): New typedef.
13146 (invoke_xmethod): Remove.
13147 (clone_xmethod_worker): Remove.
13148 (free_xmethod_worker): Remove.
13149 (free_xmethod_worker_vec): Remove.
13150 (get_xmethod_arg_types): Remove.
13151 (get_xmethod_result_type): Remove.
13152 * valops.c (find_method_list): Use std::vector, don't use
13153 intermediate vector.
13154 (value_find_oload_method_list): Use std::vector.
13155 (find_overload_match): Use std::vector.
13156 (find_oload_champ): Use std::vector.
13157 * value.c (value_free): Use operator delete.
13158 (value_of_xmethod): Rename to...
13159 (value_from_xmethod): ... this. Don't assign
13160 xmethod_worker::value, take rvalue-reference.
13161 (result_type_of_xmethod): Adjust.
13162 (call_xmethod): Adjust.
13163 * value.h: Include extension.h.
13164 (struct xmethod_worker): Don't forward-declare.
13165 (value_of_xmethod): Rename to...
13166 (value_from_xmethod): ... this, take rvalue-reference.
13167 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13168 (struct python_xmethod_worker): ... this, add constructor and
13169 destructor.
13170 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13171 (gdbpy_free_xmethod_worker_data): Rename to...
13172 (python_xmethod_worker::~python_xmethod_worker): ... this and
13173 adjust.
13174 (gdbpy_clone_xmethod_worker_data): Rename to...
13175 (python_xmethod_worker::clone): ... this and adjust.
13176 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13177 temporary vector.
13178 (gdbpy_get_xmethod_arg_types): Rename to...
13179 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13180 (gdbpy_get_xmethod_result_type): Rename to...
13181 (python_xmethod_worker::do_get_result_type): ... this and
13182 adjust.
13183 (gdbpy_invoke_xmethod): Rename to...
13184 (python_xmethod_worker::invoke): ... this and adjust.
13185 (new_python_xmethod_worker): Rename to...
13186 (python_xmethod_worker::python_xmethod_worker): ... this and
13187 adjust.
13188 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13189 Remove.
13190 (gdbpy_free_xmethod_worker_data): Remove.
13191 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13192 (gdbpy_get_xmethod_arg_types): Remove.
13193 (gdbpy_get_xmethod_result_type): Remove.
13194 (gdbpy_invoke_xmethod): Remove.
13195 * python/python.c (python_extension_ops): Remove obsolete
13196 callbacks.
13197
13198 2018-01-05 Pedro Alves <palves@redhat.com>
13199
13200 PR gdb/18653
13201 * common/signals-state-save-restore.c
13202 (save_original_signals_state): New parameter 'quiet'. Warn if we
13203 find a custom handler preinstalled, instead of internal erroring.
13204 But only warn if !quiet.
13205 * common/signals-state-save-restore.h
13206 (save_original_signals_state): New parameter 'quiet'.
13207 * main.c (captured_main_1): Move save_original_signals_state call
13208 after option handling, and pass QUIET.
13209
13210 2018-01-05 Pedro Alves <palves@redhat.com>
13211
13212 * spu-tdep.c (spu_catch_start): Pass
13213 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13214
13215 2018-01-05 Pedro Alves <palves@redhat.com>
13216
13217 PR gdb/22670
13218 * ada-lang.c (literal_symbol_name_matcher): New function.
13219 (ada_get_symbol_name_matcher): Use it for
13220 symbol_name_match_type::SEARCH_NAME.
13221 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13222 it down instead of assuming symbol_name_match_type::FULL.
13223 * block.h (block_lookup_symbol): New parameter 'match_type'.
13224 * c-valprint.c (print_unpacked_pointer): Use
13225 lookup_symbol_search_name instead of lookup_symbol.
13226 * compile/compile-object-load.c (get_out_value_type): Pass down
13227 symbol_name_match_type::SEARCH_NAME.
13228 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13229 symbol_name_match_type::FULL.
13230 * cp-support.c (cp_get_symbol_name_matcher): Handle
13231 symbol_name_match_type::SEARCH_NAME.
13232 * infrun.c (insert_exception_resume_breakpoint): Use
13233 lookup_symbol_search_name.
13234 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13235 * psymtab.c (maintenance_check_psymtabs): Use
13236 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13237 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13238 SYMBOL_SEARCH_NAME.
13239 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13240 if symbol_name_match_type::SEARCH_NAME.
13241 (lookup_symbol_in_language): Pass down
13242 symbol_name_match_type::FULL.
13243 (lookup_symbol_search_name): New.
13244 (lookup_language_this): Pass down
13245 symbol_name_match_type::SEARCH_NAME.
13246 (lookup_symbol_aux, lookup_local_symbol): New parameter
13247 'match_type'. Pass it down.
13248 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13249 (lookup_symbol_search_name): New declaration.
13250 (lookup_symbol_in_block): New 'match_type' parameter.
13251
13252 2018-01-05 Pedro Alves <palves@redhat.com>
13253
13254 PR gdb/22670
13255 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13256 ada_lookup_symbol.
13257 (ada_lookup_symbol): Reimplement in terms of
13258 ada_lookup_symbol_list, bits factored out from
13259 ada_lookup_encoded_symbol.
13260
13261 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13262
13263 * ada-exp.y (write_object_renaming): When subscripting an array
13264 using a symbol as the index, pass the block in call to
13265 ada_lookup_encoded_symbol when looking that symbol up.
13266
13267 2018-01-05 Jerome Guitton <guitton@adacore.com>
13268
13269 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13270 TYPE_INDEX_TYPE.
13271
13272 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13273
13274 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13275 the case where VALUE_LVAL (val0) is not lval_memory.
13276
13277 2018-01-05 Xavier Roirand <roirand@adacore.com>
13278
13279 * ada-valprint.c (print_optional_low_bound): Handle
13280 character-indexed array printing like boolean-indexed array
13281 printing.
13282
13283 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13284
13285 * NEWS: Create a new section for the next release branch.
13286 Rename the section of the current branch, now that it has
13287 been cut.
13288
13289 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13290
13291 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13292 * version.in: Bump version to 8.1.50.DATE-git.
13293
13294 2018-01-03 Xavier Roirand <roirand@adacore.com>
13295
13296 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13297 Add field.
13298 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13299 Add field.
13300 (default_exception_support_info) <catch_handlers_sym>: Add field.
13301 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13302 (ada_exception_name_addr_1): Add "catch handlers" handling.
13303 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13304 Update all callers.
13305 (create_excep_cond_exprs) <ex>: Add parameter.
13306 (re_set_exception): Update create_excep_cond_exprs call.
13307 (print_it_exception, print_one_exception, print_mention_exception)
13308 (print_recreate_exception): Add "catch handler" handling.
13309 (allocate_location_catch_handlers, re_set_catch_handlers)
13310 (check_status_catch_handlers, print_it_catch_handlers)
13311 (print_one_catch_handlers, print_mention_catch_handlers)
13312 (print_recreate_catch_handlers): New function.
13313 (catch_handlers_breakpoint_ops): New variable.
13314 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13315 Add parameter. Add "catch handler" handling.
13316 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13317 Add "catch handler" handling.
13318 (ada_exception_catchpoint_cond_string): Add "catch handler"
13319 handling.
13320 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13321 call.
13322 (catch_ada_handlers_command): New function.
13323 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13324 operations structure.
13325 (_initialize_ada_language): Add "catch handlers" command entry.
13326 * NEWS: Document "catch handlers" feature.
13327
13328 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13329
13330 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13331 account when creating the array type of the slice.
13332 (ada_value_slice): Likewise.
13333
13334 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13335
13336 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13337 New enum value.
13338 (create_array_type_with_stride): Add byte_stride_prop parameter.
13339 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13340 New parameter. Update all callers in this file.
13341 (array_type_has_dynamic_stride): New function.
13342 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13343 of arrays with dynamic byte strides.
13344 * dwarf2read.c (read_array_type): Add support for dynamic
13345 DW_AT_byte_stride attributes.
13346
13347 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13348
13349 * dwarf2read.c (read_unspecified_type): Treat
13350 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13351
13352 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13353
13354 Update copyright year range in all GDB files.
13355
13356 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13357
13358 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13359 and gdb/testsuite/gdb.base/step-line.c.
13360
13361 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13362
13363 * copyright.py (main): Dump the contents of
13364 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13365 even if BY_HAND is empty.
13366
13367 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13368
13369 * top.c (print_gdb_version): Update Copyright year in version
13370 message.
13371
13372 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13373
13374 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13375
13376 For older changes see ChangeLog-2017.
13377 \f
13378 Local Variables:
13379 mode: change-log
13380 left-margin: 8
13381 fill-column: 74
13382 version-control: never
13383 coding: utf-8
13384 End:
This page took 0.309914 seconds and 4 git commands to generate.