1 2018-08-29 Tom Tromey <tom@tromey.com>
3 * csky-tdep.c (csky_analyze_prologue): Use
4 core_addr_to_string_nz.
6 2018-08-29 Tom Tromey <tom@tromey.com>
8 * windows-nat.c (struct xlate_exception) <them>: Change type to
10 (xlate): Fix formatting. Remove last entry.
11 (struct xlate_exception, xlate): Comment out.
12 (windows_nat_target::resume): Use ranged for.
14 2018-08-29 Jim Wilson <jimw@sifive.com>
16 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
17 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
19 (riscv_linux_nat_target::store_registers): Likewise.
21 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
25 * gnulib/aclocal.m4: Regenerate.
26 * gnulib/config.in: Regenerate.
27 * gnulib/configure: Regenerate.
28 * gnulib/import/Makefile.am: Update.
29 * gnulib/import/Makefile.in: Update.
30 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
31 * gnulib/import/_Noreturn.h: ... this.
32 * gnulib/import/alloca.in.h: Update.
33 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
34 * gnulib/import/arg-nonnull.h: ... this.
35 * gnulib/import/assure.h: Update.
36 * gnulib/import/at-func.c: Update.
37 * gnulib/import/basename-lgpl.c: Update.
38 * gnulib/import/extra/snippet/c++defs.h: Rename to...
39 * gnulib/import/c++defs.h: ... this.
40 * gnulib/import/canonicalize-lgpl.c: Update.
41 * gnulib/import/cdefs.h: Update.
42 * gnulib/import/chdir-long.c: Update.
43 * gnulib/import/chdir-long.h: Update.
44 * gnulib/import/cloexec.c: Update.
45 * gnulib/import/cloexec.h: Update.
46 * gnulib/import/close.c: Update.
47 * gnulib/import/closedir.c: Update.
48 * gnulib/import/config.charset: Update.
49 * gnulib/import/dirent-private.h: Update.
50 * gnulib/import/dirent.in.h: Update.
51 * gnulib/import/dirfd.c: Update.
52 * gnulib/import/dirname-lgpl.c: Update.
53 * gnulib/import/dirname.h: Update.
54 * gnulib/import/dosname.h: Update.
55 * gnulib/import/dup-safer-flag.c: Update.
56 * gnulib/import/dup-safer.c: Update.
57 * gnulib/import/dup.c: Update.
58 * gnulib/import/dup2.c: Update.
59 * gnulib/import/errno.in.h: Update.
60 * gnulib/import/error.c: Update.
61 * gnulib/import/error.h: Update.
62 * gnulib/import/exitfail.c: Update.
63 * gnulib/import/exitfail.h: Update.
64 * gnulib/import/extra/update-copyright: Update.
65 * gnulib/import/fchdir.c: Update.
66 * gnulib/import/fcntl.c: Update.
67 * gnulib/import/fcntl.in.h: Update.
68 * gnulib/import/fd-hook.c: Update.
69 * gnulib/import/fd-hook.h: Update.
70 * gnulib/import/fd-safer-flag.c: Update.
71 * gnulib/import/fd-safer.c: Update.
72 * gnulib/import/fdopendir.c: Update.
73 * gnulib/import/filename.h: Update.
74 * gnulib/import/filenamecat-lgpl.c: Update.
75 * gnulib/import/filenamecat.h: Update.
76 * gnulib/import/flexmember.h: Update.
77 * gnulib/import/float+.h: Update.
78 * gnulib/import/float.c: Update.
79 * gnulib/import/float.in.h: Update.
80 * gnulib/import/fnmatch.c: Update.
81 * gnulib/import/fnmatch.in.h: Update.
82 * gnulib/import/fnmatch_loop.c: Update.
83 * gnulib/import/fpucw.h: Update.
84 * gnulib/import/frexp.c: Update.
85 * gnulib/import/frexpl.c: Update.
86 * gnulib/import/fstat.c: Update.
87 * gnulib/import/fstatat.c: Update.
88 * gnulib/import/getcwd-lgpl.c: Update.
89 * gnulib/import/getcwd.c: Update.
90 * gnulib/import/getdtablesize.c: Update.
91 * gnulib/import/getlogin_r.c: Update.
92 * gnulib/import/getprogname.c: Update.
93 * gnulib/import/getprogname.h: Update.
94 * gnulib/import/gettext.h: Update.
95 * gnulib/import/gettimeofday.c: Update.
96 * gnulib/import/glob-libc.h: Update.
97 * gnulib/import/glob.c: Update.
98 * gnulib/import/glob.in.h: Update.
99 * gnulib/import/glob_internal.h: Update.
100 * gnulib/import/glob_pattern_p.c: Update.
101 * gnulib/import/globfree.c: Update.
102 * gnulib/import/hard-locale.c: Update.
103 * gnulib/import/hard-locale.h: Update.
104 * gnulib/import/intprops.h: Update.
105 * gnulib/import/inttypes.in.h: Update.
106 * gnulib/import/isnan.c: Update.
107 * gnulib/import/isnand-nolibm.h: Update.
108 * gnulib/import/isnand.c: Update.
109 * gnulib/import/isnanl-nolibm.h: Update.
110 * gnulib/import/isnanl.c: Update.
111 * gnulib/import/itold.c: Update.
112 * gnulib/import/libc-config.h: Update.
113 * gnulib/import/limits.in.h: Update.
114 * gnulib/import/localcharset.c: Update.
115 * gnulib/import/localcharset.h: Update.
116 * gnulib/import/localtime-buffer.c: Update.
117 * gnulib/import/localtime-buffer.h: Update.
118 * gnulib/import/lstat.c: Update.
119 * gnulib/import/m4/00gnulib.m4: Update.
120 * gnulib/import/m4/__inline.m4: Update.
121 * gnulib/import/m4/absolute-header.m4: Update.
122 * gnulib/import/m4/alloca.m4: Update.
123 * gnulib/import/m4/builtin-expect.m4: Update.
124 * gnulib/import/m4/canonicalize.m4: Update.
125 * gnulib/import/m4/chdir-long.m4: Update.
126 * gnulib/import/m4/close.m4: Update.
127 * gnulib/import/m4/closedir.m4: Update.
128 * gnulib/import/m4/configmake.m4: Update.
129 * gnulib/import/m4/d-ino.m4: Update.
130 * gnulib/import/m4/d-type.m4: Update.
131 * gnulib/import/m4/dirent_h.m4: Update.
132 * gnulib/import/m4/dirfd.m4: Update.
133 * gnulib/import/m4/dirname.m4: Update.
134 * gnulib/import/m4/double-slash-root.m4: Update.
135 * gnulib/import/m4/dup.m4: Update.
136 * gnulib/import/m4/dup2.m4: Update.
137 * gnulib/import/m4/eealloc.m4: Update.
138 * gnulib/import/m4/environ.m4: Update.
139 * gnulib/import/m4/errno_h.m4: Update.
140 * gnulib/import/m4/error.m4: Update.
141 * gnulib/import/m4/exponentd.m4: Update.
142 * gnulib/import/m4/exponentl.m4: Update.
143 * gnulib/import/m4/extensions.m4: Update.
144 * gnulib/import/m4/extern-inline.m4: Update.
145 * gnulib/import/m4/fchdir.m4: Update.
146 * gnulib/import/m4/fcntl-o.m4: Update.
147 * gnulib/import/m4/fcntl.m4: Update.
148 * gnulib/import/m4/fcntl_h.m4: Update.
149 * gnulib/import/m4/fdopendir.m4: Update.
150 * gnulib/import/m4/filenamecat.m4: Update.
151 * gnulib/import/m4/flexmember.m4: Update.
152 * gnulib/import/m4/float_h.m4: Update.
153 * gnulib/import/m4/fnmatch.m4: Update.
154 * gnulib/import/m4/fnmatch_h.m4: Update.
155 * gnulib/import/m4/fpieee.m4: Update.
156 * gnulib/import/m4/frexp.m4: Update.
157 * gnulib/import/m4/frexpl.m4: Update.
158 * gnulib/import/m4/fstat.m4: Update.
159 * gnulib/import/m4/fstatat.m4: Update.
160 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
161 * gnulib/import/m4/getcwd-path-max.m4: Update.
162 * gnulib/import/m4/getcwd.m4: Update.
163 * gnulib/import/m4/getdtablesize.m4: Update.
164 * gnulib/import/m4/getlogin.m4: Update.
165 * gnulib/import/m4/getlogin_r.m4: Update.
166 * gnulib/import/m4/getpagesize.m4: Update.
167 * gnulib/import/m4/getprogname.m4: Update.
168 * gnulib/import/m4/gettimeofday.m4: Update.
169 * gnulib/import/m4/glibc21.m4: Update.
170 * gnulib/import/m4/glob.m4: Update.
171 * gnulib/import/m4/glob_h.m4: Update.
172 * gnulib/import/m4/gnulib-cache.m4: Update.
173 * gnulib/import/m4/gnulib-common.m4: Update.
174 * gnulib/import/m4/gnulib-comp.m4: Update.
175 * gnulib/import/m4/gnulib-tool.m4: Update.
176 * gnulib/import/m4/hard-locale.m4: Update.
177 * gnulib/import/m4/include_next.m4: Update.
178 * gnulib/import/m4/inttypes-pri.m4: Update.
179 * gnulib/import/m4/inttypes.m4: Update.
180 * gnulib/import/m4/isnand.m4: Update.
181 * gnulib/import/m4/isnanl.m4: Update.
182 * gnulib/import/m4/largefile.m4: Update.
183 * gnulib/import/m4/limits-h.m4: Update.
184 * gnulib/import/m4/localcharset.m4: Update.
185 * gnulib/import/m4/locale-fr.m4: Update.
186 * gnulib/import/m4/locale-ja.m4: Update.
187 * gnulib/import/m4/locale-zh.m4: Update.
188 * gnulib/import/m4/localtime-buffer.m4: Update.
189 * gnulib/import/m4/longlong.m4: Update.
190 * gnulib/import/m4/lstat.m4: Update.
191 * gnulib/import/m4/malloc.m4: Update.
192 * gnulib/import/m4/malloca.m4: Update.
193 * gnulib/import/m4/math_h.m4: Update.
194 * gnulib/import/m4/mbrtowc.m4: Update.
195 * gnulib/import/m4/mbsinit.m4: Update.
196 * gnulib/import/m4/mbsrtowcs.m4: Update.
197 * gnulib/import/m4/mbstate_t.m4: Update.
198 * gnulib/import/m4/memchr.m4: Update.
199 * gnulib/import/m4/memmem.m4: Update.
200 * gnulib/import/m4/mempcpy.m4: Update.
201 * gnulib/import/m4/memrchr.m4: Update.
202 * gnulib/import/m4/mkdir.m4: Update.
203 * gnulib/import/m4/mkstemp.m4: Update.
204 * gnulib/import/m4/mmap-anon.m4: Update.
205 * gnulib/import/m4/mode_t.m4: Update.
206 * gnulib/import/m4/msvc-inval.m4: Update.
207 * gnulib/import/m4/msvc-nothrow.m4: Update.
208 * gnulib/import/m4/multiarch.m4: Update.
209 * gnulib/import/m4/nocrash.m4: Update.
210 * gnulib/import/m4/off_t.m4: Update.
211 * gnulib/import/m4/onceonly.m4: Update.
212 * gnulib/import/m4/open-cloexec.m4: Update.
213 * gnulib/import/m4/open.m4: Update.
214 * gnulib/import/m4/openat.m4: Update.
215 * gnulib/import/m4/opendir.m4: Update.
216 * gnulib/import/m4/pathmax.m4: Update.
217 * gnulib/import/m4/rawmemchr.m4: Update.
218 * gnulib/import/m4/readdir.m4: Update.
219 * gnulib/import/m4/readlink.m4: Update.
220 * gnulib/import/m4/realloc.m4: Update.
221 * gnulib/import/m4/rename.m4: Update.
222 * gnulib/import/m4/rewinddir.m4: Update.
223 * gnulib/import/m4/rmdir.m4: Update.
224 * gnulib/import/m4/save-cwd.m4: Update.
225 * gnulib/import/m4/secure_getenv.m4: Update.
226 * gnulib/import/m4/setenv.m4: Update.
227 * gnulib/import/m4/signal_h.m4: Update.
228 * gnulib/import/m4/ssize_t.m4: Update.
229 * gnulib/import/m4/stat-time.m4: Update.
230 * gnulib/import/m4/stat.m4: Update.
231 * gnulib/import/m4/std-gnu11.m4: Update.
232 * gnulib/import/m4/stdbool.m4: Update.
233 * gnulib/import/m4/stddef_h.m4: Update.
234 * gnulib/import/m4/stdint.m4: Update.
235 * gnulib/import/m4/stdio_h.m4: Update.
236 * gnulib/import/m4/stdlib_h.m4: Update.
237 * gnulib/import/m4/strchrnul.m4: Update.
238 * gnulib/import/m4/strdup.m4: Update.
239 * gnulib/import/m4/strerror.m4: Update.
240 * gnulib/import/m4/string_h.m4: Update.
241 * gnulib/import/m4/strstr.m4: Update.
242 * gnulib/import/m4/strtok_r.m4: Update.
243 * gnulib/import/m4/sys_socket_h.m4: Update.
244 * gnulib/import/m4/sys_stat_h.m4: Update.
245 * gnulib/import/m4/sys_time_h.m4: Update.
246 * gnulib/import/m4/sys_types_h.m4: Update.
247 * gnulib/import/m4/tempname.m4: Update.
248 * gnulib/import/m4/time_h.m4: Update.
249 * gnulib/import/m4/unistd-safer.m4: Update.
250 * gnulib/import/m4/unistd_h.m4: Update.
251 * gnulib/import/m4/warn-on-use.m4: Update.
252 * gnulib/import/m4/wchar_h.m4: Update.
253 * gnulib/import/m4/wchar_t.m4: Update.
254 * gnulib/import/m4/wctype_h.m4: Update.
255 * gnulib/import/m4/wint_t.m4: Update.
256 * gnulib/import/malloc.c: Update.
257 * gnulib/import/malloc/scratch_buffer.h: Update.
258 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
259 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
260 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
261 * gnulib/import/malloca.c: Update.
262 * gnulib/import/malloca.h: Update.
263 * gnulib/import/malloca.valgrind: Update.
264 * gnulib/import/math.in.h: Update.
265 * gnulib/import/mbrtowc.c: Update.
266 * gnulib/import/mbsinit.c: Update.
267 * gnulib/import/mbsrtowcs-impl.h: Update.
268 * gnulib/import/mbsrtowcs-state.c: Update.
269 * gnulib/import/mbsrtowcs.c: Update.
270 * gnulib/import/memchr.c: Update.
271 * gnulib/import/memmem.c: Update.
272 * gnulib/import/mempcpy.c: Update.
273 * gnulib/import/memrchr.c: Update.
274 * gnulib/import/mkdir.c: Update.
275 * gnulib/import/mkstemp.c: Update.
276 * gnulib/import/msvc-inval.c: Update.
277 * gnulib/import/msvc-inval.h: Update.
278 * gnulib/import/msvc-nothrow.c: Update.
279 * gnulib/import/msvc-nothrow.h: Update.
280 * gnulib/import/open.c: Update.
281 * gnulib/import/openat-die.c: Update.
282 * gnulib/import/openat-priv.h: Update.
283 * gnulib/import/openat-proc.c: Update.
284 * gnulib/import/openat.c: Update.
285 * gnulib/import/openat.h: Update.
286 * gnulib/import/opendir.c: Update.
287 * gnulib/import/pathmax.h: Update.
288 * gnulib/import/pipe-safer.c: Update.
289 * gnulib/import/rawmemchr.c: Update.
290 * gnulib/import/readdir.c: Update.
291 * gnulib/import/readlink.c: Update.
292 * gnulib/import/realloc.c: Update.
293 * gnulib/import/ref-add.sin: Update.
294 * gnulib/import/ref-del.sin: Update.
295 * gnulib/import/rename.c: Update.
296 * gnulib/import/rewinddir.c: Update.
297 * gnulib/import/rmdir.c: Update.
298 * gnulib/import/same-inode.h: Update.
299 * gnulib/import/save-cwd.c: Update.
300 * gnulib/import/save-cwd.h: Update.
301 * gnulib/import/scratch_buffer.h: Update.
302 * gnulib/import/secure_getenv.c: Update.
303 * gnulib/import/setenv.c: Update.
304 * gnulib/import/signal.in.h: Update.
305 * gnulib/import/stat-time.c: Update.
306 * gnulib/import/stat-time.h: Update.
307 * gnulib/import/stat-w32.c: Update.
308 * gnulib/import/stat-w32.h: Update.
309 * gnulib/import/stat.c: Update.
310 * gnulib/import/stdbool.in.h: Update.
311 * gnulib/import/stddef.in.h: Update.
312 * gnulib/import/stdint.in.h: Update.
313 * gnulib/import/stdio.in.h: Update.
314 * gnulib/import/stdlib.in.h: Update.
315 * gnulib/import/str-two-way.h: Update.
316 * gnulib/import/strchrnul.c: Update.
317 * gnulib/import/strdup.c: Update.
318 * gnulib/import/streq.h: Update.
319 * gnulib/import/strerror-override.c: Update.
320 * gnulib/import/strerror-override.h: Update.
321 * gnulib/import/strerror.c: Update.
322 * gnulib/import/string.in.h: Update.
323 * gnulib/import/stripslash.c: Update.
324 * gnulib/import/strnlen1.c: Update.
325 * gnulib/import/strnlen1.h: Update.
326 * gnulib/import/strstr.c: Update.
327 * gnulib/import/strtok_r.c: Update.
328 * gnulib/import/sys_stat.in.h: Update.
329 * gnulib/import/sys_time.in.h: Update.
330 * gnulib/import/sys_types.in.h: Update.
331 * gnulib/import/tempname.c: Update.
332 * gnulib/import/tempname.h: Update.
333 * gnulib/import/time.in.h: Update.
334 * gnulib/import/unistd--.h: Update.
335 * gnulib/import/unistd-safer.h: Update.
336 * gnulib/import/unistd.in.h: Update.
337 * gnulib/import/unsetenv.c: Update.
338 * gnulib/import/verify.h: Update.
339 * gnulib/import/extra/snippet/warn-on-use.h: Update.
340 * gnulib/import/wchar.in.h: Update.
341 * gnulib/import/wctype.in.h: Update.
342 * gnulib/import/xalloc-oversized.h: Update.
343 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
344 "53e2c179f26a890fa6685af4b6c1397ee370433b".
346 2018-08-16 Gary Benson <gbenson@redhat.com>
349 * gdb/main.c (captured_main_1): Exit with nonzero status
350 in batch mode if the last command to be executed failed.
351 * NEWS: Mention the above.
353 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
355 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
356 end of warning message.
358 2018-08-29 Alan Hayward <alan.hayward@arm.com>
361 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
362 (aarch64_extract_return_value): Use
363 aapcs_is_vfp_call_or_return_candidate.
364 (aarch64_return_in_memory): Likewise.
365 (aarch64_store_return_value): Likewise.
367 2018-08-29 Alan Hayward <alan.hayward@arm.com>
370 (aapcs_is_vfp_call_or_return_candidate): Make static
371 (pass_in_v_or_stack): Remove function.
372 (pass_in_v_vfp_candidate): New function.
373 (aarch64_push_dummy_call): Check for float register candidates.
375 2018-08-29 Alan Hayward <alan.hayward@arm.com>
377 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
378 (aapcs_is_vfp_call_or_return_candidate_1): New function.
379 (aapcs_is_vfp_call_or_return_candidate): Likewise.
381 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
384 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
385 (struct ipa_sym_addresses): Rename to...
386 (struct ipa_sym_addresses_common): ... this.
387 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
389 2018-08-28 Tom Tromey <tom@tromey.com>
391 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
392 (token_fifo): Now a std::vector.
393 (yylex, c_parse): Update.
394 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
395 (token_fifo): Now a std::vector.
396 (yylex, d_parse): Update.
397 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
398 (token_fifo): Now a std::vector.
399 (yylex, go_parse): Update.
401 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
403 * parser-defs.h (struct type_stack) <elements>: Change type to
404 std::vector<union type_stack_elt>.
405 <depth, size>: Remove.
406 * parse.c (parse_exp_in_context_1): Adjust.
407 (type_stack_reserve): Remove.
408 (check_type_stack_depth): Remove.
409 (insert_into_type_stack): Adjust to std::vector.
410 (insert_type): Likewise.
411 (push_type): Likewise.
412 (push_type_int): Likewise.
413 (insert_type_address_space): Likewise.
414 (pop_type): Likewise.
415 (pop_type_int): Likewise.
416 (pop_typelist): Likewise.
417 (pop_type_stack): Likewise.
418 (append_type_stack): Likewise.
419 (push_type_stack): Likewise.
420 (get_type_stack): Likewise.
421 (type_stack_cleanup): Likewise.
422 (push_typelist): Likewise.
423 (follow_types): Likewise.
424 (_initialize_parse): Likewise.
426 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
428 * NEWS: Mention csky target.
430 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
431 Hafiz Abid Qadeer <abidh@codesourcery.com>
432 Don Breazeal <donb@codesourcery.com>
434 * csky-linux-tdep.c: New file.
435 * csky-tdep.c: Likewise.
436 * csky-tdep.h: Likewise.
437 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
439 (HFILES_NO_SRCDIR): Add csky-tdep.h.
440 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
441 * configure.tgt: Add csky support.
443 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
445 * python/py-framefilter.c (py_print_frame): Print frame architecture
446 when printing on an MI output.
448 2018-08-27 Tom Tromey <tom@tromey.com>
451 * configure: Rebuild.
452 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
454 2018-08-27 Tom Tromey <tom@tromey.com>
456 * aarch64-linux-tdep.c
457 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
460 2018-08-27 Tom Tromey <tom@tromey.com>
462 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
464 (ppc64_standard_linkage1, ppc64_standard_linkage2)
465 (ppc64_standard_linkage3, ppc64_standard_linkage4)
466 (ppc64_standard_linkage5, ppc64_standard_linkage6)
467 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
470 2018-08-27 Tom Tromey <tom@tromey.com>
472 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
473 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
475 2018-08-27 Tom Tromey <tom@tromey.com>
477 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
478 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
480 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
482 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
484 * sparc-linux-tdep.c (sparc32_linux_sigframe)
485 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
486 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
488 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
489 (ppc64_linux_sigaction_tramp_frame)
490 (ppc32_linux_sighandler_tramp_frame)
491 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
492 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
493 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
494 * mn10300-linux-tdep.c (am33_linux_sigframe)
495 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
496 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
497 * mips-linux-tdep.c (mips_linux_o32_sigframe)
498 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
499 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
500 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
501 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
502 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
503 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
504 * microblaze-linux-tdep.c
505 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
506 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
507 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
508 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
509 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
510 * common/common-types.h (ULONGEST_MAX): New define.
511 (CORE_ADDR_MAX): Fix formatting.
512 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
513 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
514 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
515 (arm_linux_rt_sigreturn_tramp_frame)
516 (arm_eabi_linux_sigreturn_tramp_frame)
517 (arm_eabi_linux_rt_sigreturn_tramp_frame)
518 (thumb2_eabi_linux_sigreturn_tramp_frame)
519 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
520 (arm_linux_restart_syscall_tramp_frame)
521 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
522 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
523 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
525 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
527 2018-08-27 Tom Tromey <tom@tromey.com>
529 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
531 * mips-tdep.c (mips_deal_with_atomic_sequence)
532 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
533 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
534 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
535 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
537 * aarch64-tdep.c (aarch64_software_single_step): Use
540 2018-08-27 Tom Tromey <tom@tromey.com>
542 * linespec.c (complete_linespec_component): Add cast to "char".
543 * completer.c (completion_tracker::build_completion_result): Add
546 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
548 * solist.h (struct solist, struct target_so_ops): Fix
551 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
553 * ada-tasks.c (ada_task_info_s): Remove typedef.
554 (DEF_VEC_O(ada_task_info_s)): Remove.
555 (struct ada_tasks_inferior_data): Initialize fields.
556 <task_list>: Make an std::vector.
557 (get_ada_tasks_inferior_data): Allocate with new.
558 (ada_get_task_number): Adjust.
559 (get_task_number_from_id): Likewise.
560 (valid_task_id): Likewise.
561 (ada_get_task_info_from_ptid): Likewise.
562 (iterate_over_live_ada_tasks): Likewise.
563 (add_ada_task): Likewise.
564 (read_known_tasks): Likewise.
565 (ada_build_task_list): Likewise.
566 (print_ada_task_info): Likewise.
567 (info_task): Likewise.
568 (task_command_1): Likewise.
570 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
572 * ada-lang.c (add_angle_brackets): Return std::string.
574 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
576 * python/py-threadevent.c (py_get_event_thread): Initialize
579 2018-08-24 Pedro Alves <palves@redhat.com>
581 * python/py-bpevent.c (create_breakpoint_event_object): Use
583 * python/py-continueevent.c (emit_continue_event): Use
585 * python/py-exitedevent.c (create_exited_event_object): Return a
587 (emit_exited_event): Use copy-initialization.
588 * python/py-inferior.c (python_new_inferior)
589 (python_inferior_deleted, add_thread_object): Use
591 * python/py-infevents.c (create_inferior_call_event_object)
592 (create_register_changed_event_object)
593 (create_memory_changed_event_object): Return a gdbpy_ref<>.
594 (emit_inferior_call_event, emit_memory_changed_event)
595 (emit_register_changed_event): Use copy-initialization.
596 * python/py-newobjfileevent.c (create_new_objfile_event_object):
597 Return a gdbpy_ref<>.
598 (emit_new_objfile_event): Use copy-initialization.
599 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
600 (emit_clear_objfiles_event): Use copy-initialization.
601 * python/py-signalevent.c (create_signal_event_object): Use
603 * python/py-threadevent.c (create_thread_event_object): Use
606 2018-08-24 Pedro Alves <palves@redhat.com>
607 Simon Marchi <simon.marchi@ericsson.com>
610 * python/py-continueevent.c: Include "gdbthread.h".
611 (create_continue_event_object): Add intro comment. Add 'ptid'
612 parameter. Use it to find thread to pass to
613 create_thread_event_object.
614 (emit_continue_event): Pass PTID down to
615 create_continue_event_object.
616 * python/py-event.h (py_get_event_thread): Declare.
617 (create_thread_event_object): Remove default from 'thread'
619 * python/py-stopevent.c (create_stop_event_object): Use
621 * python/py-threadevent.c (get_event_thread): Rename to ...
622 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
623 and use it to find the thread.
624 (create_thread_event_object): Assert that THREAD isn't null.
625 Don't find the event thread here.
627 2018-08-23 Kevin Buettner <kevinb@redhat.com>
629 * block.h (blockrange, blockranges): New struct declarations.
630 (struct block): Add new field named `ranges'.
631 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
632 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
633 macros for accessing ranges in struct block.
634 (make_blockranges): New declaration.
635 block.c (make_blockranges): New function.
636 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
638 * symtab.h (find_pc_partial_function): Add new parameter `block'.
639 * blockframe.c (cache_pc_function_block): New static global.
640 (clear_pc_function_cache): Clear cache_pc_function_block.
641 (find_pc_partial_function): Move comment to symtab.h. Add
642 support for non-contiguous blocks.
643 * cli/cli-cmds.c (block.h): Include.
644 (print_disassembly): Handle printing of non-contiguous blocks.
645 (disassemble_current_function): Likewise.
646 (disassemble_command): Likewise.
648 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
650 * blockframe.c (get_pc_function_start): Likewise.
651 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
652 (gcc_symbol_address): Likewise.
653 * compile/compile-object-run.c (compile_object_run): Likewise.
654 * compile/compile.c (get_expr_block_and_pc): Likewise.
655 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
656 (func_addr_to_tail_call_list): Likewise.
657 * findvar.c (default_read_var_value): Likewise.
658 * inline-frame.c (inline_frame_this_id): Likewise.
659 (skip-inline_frames): Likewise.
660 * infcmd.c (until_next_command): Likewise.
661 * linespec.c (convert_linespec_to_sals): Likewise.
662 * parse.c (parse_exp_in_context_1): Likewise.
663 * printcmd.c (build_address_symbolic): likewise.
664 (info_address_command): Likewise.
665 symtab.c (find_function_start_sal): Likewise.
666 (skip_prologue_sal): Likewise.
667 (find_function_alias_target): Likewise.
668 (find_gnu_ifunc): Likewise.
669 * stack.c (find_frame_funname): Likewise.
670 * symtab.c (fixup_symbol_section): Likewise.
671 (find_function_start_sal): Likewise.
672 (skip_prologue_sal): Likewsie.
673 (find_function_alias_target): Likewise.
674 (find_gnu_ifunc): Likewise.
675 * tracepoint.c (info_scope_command): Likewise.
676 * value.c (value_fn_field): Likewise.
678 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
679 in place of find_pc_partial_function.
680 * blockframe.c (find_function_entry_range_from_pc): New function.
681 * symtab.h (find_function_entry_range_from_pc): Declare and document.
682 * objfiles.c (objfile_relocate1): Relocate start and end addresses
683 for each range in a block.
686 2018-08-23 Xavier Roirand <roirand@adacore.com>
688 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
691 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
693 * solib-svr4.c (read_program_headers_from_bfd): Return
694 gdb::optional<gdb::byte_vector>.
695 (svr4_exec_displacement): Adjust.
697 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
699 * solib-svr4.c (read_program_header): Return
700 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
701 (find_program_interpreter): Return
702 gdb::optional<gdb::byte_vector>.
703 (scan_dyntag_auxv): Adjust.
704 (enable_break): Adjust.
705 (svr4_exec_displacement): Adjust.
707 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
709 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
710 * inf-child.c (inf_child_target::terminal_save_inferior): New.
712 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
714 * guile/scm-string.c (gdbscm_scm_from_printf): Use
716 * guile/scm-utils.c (gdbscm_printf): Likewise.
717 * serial.c (serial_printf): Likewise.
718 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
720 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
722 * stack.c (print_frame): Print frame architecture when printing on
724 * NEWS: Mention new "arch" attribute in frame output.
726 2018-08-21 Alan Hayward <alan.hayward@arm.com>
728 * arch/aarch64.h (aarch64_regnum): Update comment.
730 2018-08-21 Alan Hayward <alan.hayward@arm.com>
732 * NEWS: Add SVE to 8.2 section.
734 2018-08-21 Pedro Alves <palves@redhat.com>
736 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
737 out from gdbscm_parse_function_args.
738 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
739 gdbscm_parse_function_args_1.
741 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
744 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
747 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
749 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
751 2018-08-19 Michael Spang <spang@google.com>
754 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
757 2018-08-18 Kevin Buettner <kevinb@redhat.com>
759 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
760 dwarf_variable_value.
761 * dwarf2-frame.c (class dwarf_expr_executor):
762 Add override for dwarf_variable_value.
763 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
764 (class symbol_needs_eval_context): Likewise.
765 (indirect_synthetic_pointer): Add forward declaration.
766 (sect_variable_value): New function.
767 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
768 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
769 for DW_OP_GNU_variable_value.
771 2018-08-16 Tom Tromey <tom@tromey.com>
773 * top.c (read_command_file): Update.
774 (command_line_input): Remove "repeat" argument.
775 * ada-lang.c (get_selections): Update.
776 * linespec.c (decode_line_2): Update.
777 * defs.h (command_line_input): Remove argument.
778 * cli/cli-script.c (read_next_line): Update.
779 * python/py-gdb-readline.c: Update.
781 2018-08-17 Tom Tromey <tom@tromey.com>
783 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
786 2018-08-15 Tom Tromey <tom@tromey.com>
788 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
790 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
792 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
793 If used, use find_pc_partial_function to find address range
795 * mi/mi-main.c (mi_cmd_list_features): Report
796 "data-disassemble-a-option" feature.
797 * NEWS: Mention new -data-disassemble option -a.
799 2018-08-13 Tom Tromey <tom@tromey.com>
801 * common/common-defs.h (_FORTIFY_SOURCE): Define.
803 2018-08-13 Alan Hayward <alan.hayward@arm.com>
805 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
806 (aarch64_linux_collect_sve_regset): Likewise.
807 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
808 * regcache.h (regcache_map_entry_size): New function.
810 2018-08-13 Alan Hayward <alan.hayward@arm.com>
812 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
813 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
814 (SVE_HEADER_VL_LENGTH): Likewise.
815 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
816 (SVE_HEADER_FLAGS_LENGTH): Likewise.
817 (SVE_HEADER_RESERVED_LENGTH): Likewise.
818 (SVE_HEADER_SIZE_OFFSET): Likewise.
819 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
820 (SVE_HEADER_VL_OFFSET): Likewise.
821 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
822 (SVE_HEADER_FLAGS_OFFSET): Likewise.
823 (SVE_HEADER_RESERVED_OFFSET): Likewise.
824 (SVE_HEADER_SIZE): Likewise.
825 (aarch64_linux_core_read_vq): Add function.
826 (aarch64_linux_core_read_description): Check for SVE section.
828 2018-08-13 Alan Hayward <alan.hayward@arm.com>
830 * aarch64-fbsd-tdep.c
831 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
833 * aarch64-linux-tdep.c
834 (aarch64_linux_iterate_over_regset_sections): Likewise.
836 (alpha_linux_iterate_over_regset_sections):
838 (alphanbsd_iterate_over_regset_sections): Likewise.
840 (amd64fbsd_iterate_over_regset_sections): Likewise.
842 (amd64_linux_iterate_over_regset_sections): Likewise.
844 (armbsd_iterate_over_regset_sections): Likewise.
846 (arm_fbsd_iterate_over_regset_sections): Likewise.
848 (arm_linux_iterate_over_regset_sections): Likewise.
849 * corelow.c (get_core_registers_cb): Likewise.
850 (core_target::fetch_registers): Likewise.
851 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
852 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
853 * gdbarch.h (void): Regenerate.
854 * gdbarch.sh: Add supply_size and collect_size.
855 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
856 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
857 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
858 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
859 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
860 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
861 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
862 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
863 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
864 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
865 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
866 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
867 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
868 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
869 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
870 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
871 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
872 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
873 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
874 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
875 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
876 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
877 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
878 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
879 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
880 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
881 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
882 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
883 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
884 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
886 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
888 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
891 2018-08-10 Keith Seitz <keiths@redhat.com>
893 * compile/compile-c-support.c (add_code_header, add_code_footer):
894 Move into policy class.
895 (c_push_user_expression, pop_user_expression_nop)
896 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
897 (compile_program): New host class.
898 (c_compile_program): New typedef.
899 (c_compute_porgram): Use c_compile_program.
901 2018-08-10 Keith Seitz <keiths@redhat.com>
903 * compile/compile-internal.h (compile_instance::~compile_instance):
904 Remove calls to htab_delete.
905 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
906 * compile.c (compile_instance::compile_instance): Initialize
907 htab unique pointers.
908 (compile_instance::get_cached_type, compile_instance::insert_type)
909 (compile_instance::error_symbol_once): Update for unique_ptr.
911 2018-08-10 Keith Seitz <keiths@redhat.com>
913 * compile/compile-c-symbols.c (struct symbol_error)
914 (hash_symbol_error, eq_symbol_error, del_symbol_error)
915 (compile_instance::insert_symbol_error)
916 (compile_instance::error_symbol_once): Move to ...
917 * compile/compile.c: ... here.
919 2018-08-10 Keith Seitz <keiths@redhat.com>
921 * compile/compile-c-support.c (c_get_compile_context): Use `new'
922 instead of `new_compile_instance'.
923 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
925 If the symbol error map is not initialized, create it.
926 (generate_c_for_for_one_symbol): Do not check/initialize
927 the symbol error map.
928 * compile/compile-c-types.c (compile_c_instance): Make a class.
930 (compile_instance::compile_instance): Initialize the type cache.
931 (get_cached_type): New function.
932 (insert_type): Update description.
933 (compile_c_instance::m_default_cflags): Define.
934 (convert_type): Update description. Use get_cached_type.
935 (delete_instance): Moved to destructor.
936 (new_compile_instance): Moved to constructor.
937 * compile/compile-c.h (compile_c_instance): Make class inheriting
938 from compile_instance.
939 <base>: Remove field.
940 <type_map, symbol_err_map>: Move to base class.
941 <c_plugin>: Rename to `m_plugin' and remove pointer type.
942 * compile/compile-internal.h (compile_instance): Make class.
943 <type_map_t, symbol_err_map_t>: Define.
944 <fe>: Rename to `m_gcc_fe'.
945 <scope, block, gcc_target_options>: Add `m_' prefix.
946 <m_type_map, m_symbol_err_map>: New fields, moved from
949 (convert_type, new_compile_instance): Remove.
950 * compile/compile.c (cleanup_compile_instance): Remove.
951 (compile_to_object): Use unique_ptr to eliminate cleanups.
952 (compile_instance::set_print_callback, compile_instance::version)
953 (compile_instance::set_verbose)
954 (compile_instance::set_driver_filename)
955 (compile_instance::set_triplet_regexp)
956 (compile_instance::set_arguments)
957 (compile_instance::set_source_file)
958 (compile_instance::compile): Define.
960 2018-08-10 Keith Seitz <keiths@redhat.com>
962 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
963 * compile/compile-c-types.c: Define GCC_METHODN macros and include
964 gcc-c-fe.def to define C plugin.
965 (delete_instance): Delete `c_plugin'.
966 (new_compile_instance): Initialize `c_plugin'.
967 * compile/compile-c.h: Include gcc_c_plugin.h.
968 (struct compile_c_instance) <c_plugin>: New member.
969 * gcc-c-plugin.h: New file.
970 Update all callers with API change.
972 2018-08-10 Keith Seitz <keiths@redhat.com>
974 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
975 (HFILES_NO_SRCDIR): ... to here.
976 Add compile-internal.h and compile-c.h.
977 * compile/compile-c-support.c: Include compile-c.h.
978 * compile/compile-c-symbols.c: Include compile-c.h.
979 (generate_c_for_variable_locations): Update comment.
980 * compile/compile-c-types.c: Include compile-c.h.
981 * compile/compile-c.h: New file -- moved C language declarations
982 from other files here.
983 * compile/compile-internal.h: Do not include hashtab.h or
985 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
986 (gcc_convert_symbol, gcc_symbol_address)
987 (generate_c_for_variable_locations, c_get_mode_for_size)
988 (c_get_range_decl_name): Definitions moved to compile-c.h.
989 * compile/compile-loc2c.c: Include compile-c.h.
991 2018-08-10 Keith Seitz <keiths@redhat.com>
993 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
994 (c_symbol_substitution_name): ... this.
997 2018-08-10 Keith Seitz <keiths@redhat.com>
999 * compile/compile-c-support.c (c_compute_program): Use
1000 unique_xmalloc_ptr to eliminate cleanup.
1001 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1002 Return a unique_xmalloc_ptr and eliminate cleanup.
1003 * compile/compile-internal.h (generate_c_for_variable_locations):
1004 Return unique_xmalloc_ptr and update description.
1006 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1008 * corelow.c (core_target::get_core_register_section): Rename
1009 min_size to section_min_size.
1011 2018-08-09 Jim Wilson <jimw@sifive.com>
1013 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1014 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1015 * NEWS: Mention new GNU/Linux RISC-V target.
1016 * configure.host: Add riscv*-*-linux*.
1017 * configure.nat: Add riscv*.
1018 * configure.tgt: Add riscv*-*-linux*.
1019 * riscv-linux-nat.c: New file.
1020 * riscv-linux-tdep.c: New file.
1022 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1024 * infrun.c (resume): Make static, add forward declaration.
1025 (proceed): Update header comment.
1026 * infrun.h (resume): Delete declaration.
1028 2018-08-09 Tom Tromey <tom@tromey.com>
1030 * riscv-tdep.h: Minor formatting fixes.
1032 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1034 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1035 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1036 (test_mkdir_recursive): Likewise.
1037 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1039 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1041 * valarith.c (value_subscripted_rvalue): If an array is not in
1042 memory, and we don't know the upper bound, then we can't know that
1043 the requested element exists or not.
1045 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1047 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1048 (target_options_to_string): Add comment.
1050 2018-08-08 Tom Tromey <tom@tromey.com>
1052 * unittests/scoped_mmap-selftests.c: Check result of "write".
1054 2018-08-08 Jim Wilson <jimw@sifive.com>
1056 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1057 (decode_register_index_short): New.
1058 (decode_j_type_insn, decode_cj_type_insn): New.
1059 (decode_b_type_insn, decode_cb_type_insn): New.
1060 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1061 local xlen. Check xlen when decoding ambiguous compressed insns. In
1062 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1063 is_c_sw_insn instead of is_sw_insn.
1064 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1065 (riscv_software_single_step): New.
1066 * riscv-tdep.h (riscv_software_single_step): Declare.
1068 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1069 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1071 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1074 * target.c (dispose_inferior): Don't dispose of inferiors that are
1077 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1079 * remote.c (remote_target::download_tracepoint): Change char* to
1082 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1084 * target.h (target_options_to_string): Return an std::string.
1085 * target.c (str_comma_list_concat_elem): Return void, use
1087 (do_option): Likewise.
1088 (target_options_to_string): Return an std::string.
1089 * linux-nat.c (linux_nat_target::wait): Adjust.
1090 * target-debug.h (target_debug_print_options): Adjust.
1092 2018-08-07 Tom Tromey <tom@tromey.com>
1094 * Makefile.in (CPPFLAGS): New variable.
1095 (INTERNAL_CPPFLAGS): Use it.
1097 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1099 * NEWS: Mention the index cache.
1101 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1103 * common/pathstuff.h (get_standard_cache_dir): New.
1104 * common/pathstuff.c (get_standard_cache_dir): New.
1105 * build-id.h (build_id_to_string): New.
1106 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1107 DEBUG_STR_SUFFIX): Move to here.
1108 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1109 DEBUG_STR_SUFFIX): Move from there.
1110 (write_psymtabs_to_index): Make non-static, add basename
1111 parameter. Write to temporary files, rename when done.
1112 (save_gdb_index_command): Adjust call to
1113 write_psymtabs_to_index.
1114 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1116 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1117 (get_gdb_index_contents_from_cache): New.
1118 (get_gdb_index_contents_from_cache_dwz): New.
1119 (dwarf2_initialize_objfile): Read index from cache.
1120 (dwarf2_build_psymtabs): Save to index.
1121 * dwarf-index-cache.h: New file.
1122 * dwarf-index-cache.c: New file.
1123 * dwarf-index-write.h: New file.
1125 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1127 * gnulib/aclocal.m4: Re-generate.
1128 * gnulib/config.in: Re-generate.
1129 * gnulib/configure: Re-generate.
1130 * gnulib/import/Makefile.am: Re-generate.
1131 * gnulib/import/Makefile.in: Re-generate.
1132 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1133 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1134 * gnulib/import/m4/mkdir.m4: New file.
1135 * gnulib/import/mkdir.c: New file.
1136 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1139 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1141 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1142 * common/scoped_mmap.c: New file.
1143 * common/scoped_mmap.h (destroy): New method.
1144 (~scoped_mmap, reset): Use destroy.
1145 (scoped_mmap): New move constructor.
1146 (mmap_file): New declaration.
1147 * unittests/scoped_mmap-selftests.c (test_normal,
1148 test_invalid_filename, run_tests): New functions.
1149 (_initialize_scoped_mmap_selftests): Register selftest.
1151 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1153 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1154 (read_gdb_index_from_buffer): ... this. Remove section
1155 parameter, add buffer parameter.
1156 (get_gdb_index_contents_ftype,
1157 get_gdb_index_contents_dwz_ftype): New typedefs.
1158 (dwarf2_read_gdb_index): Add callback parameters to get the
1160 (get_gdb_index_contents_from_section): New.
1161 (dwarf2_initialize_objfile): Update call to
1162 dwarf2_read_gdb_index.
1164 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1166 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1167 (gdb_open_cloexec): Likewise.
1168 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1169 (commandline_from_pid): Likewise.
1170 (linux_xfer_osdata_threads): Likewise.
1171 (linux_xfer_osdata_fds): Likewise.
1172 * ada-lang.c (is_package_name): Likewise.
1173 * auxv.c (procfs_xfer_auxv): Likewise.
1174 * breakpoint.c (print_one_breakpoint_location): Use
1176 (print_one_catch_solib): Use string_printf.
1177 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1178 (add_pe_forwarded_sym): Likewise.
1179 * dwarf2read.c (create_type_unit_group): Likewise.
1180 (build_error_marker_type): Likewise.
1181 * infcall.c (get_function_name): Likewise.
1182 * valprint.c (print_converted_chars_to_obstack): Likewise.
1183 * xtensa-tdep.c (xtensa_register_type): Likewise.
1185 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1187 * remote.c (remote_target::download_tracepoint): Fix format
1190 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1192 * tracefile.c: Include common/byte-vector.h.
1193 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1194 with trace_regblock_size if needed. Update uses of buf.
1196 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1198 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1199 std::vector<unsigned char>.
1200 * tracepoint.c (collection_list::collection_list): Remove
1201 m_regs_mask initializer from initializer list. Resize
1202 m_regs_mask using the largest remote register number.
1203 (collection_list::add_remote_register): Remove size check on
1204 m_regs_mask. Use at to access element.
1205 (collection_list::stringify): Change type of temp_buf to
1206 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1207 stringify the register mask. Use pack_hex_byte for the register
1210 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1212 * tracepoint.h (class collection_list) <add_register>: Remove.
1213 <add_remote_register, add_ax_registers, add_local_register>:
1215 <add_memrange>: Add scope parameter.
1216 * tracepoint.c (encode_actions_1): Likewise.
1217 (collection_list::add_register): Rename to ...
1218 (collection_list::add_remote_register): ... this. Update
1220 (collection_list::add_ax_registers, add_local_register): New
1222 (collection_list::add_memrange): Add scope parameter. Call
1223 add_local_register instead of add_register.
1224 (finalize_tracepoint_aexpr): New function.
1225 (collection_list::collect_symbol): Update calls to add_memrange.
1226 Call add_local_register instead of add_register. Call
1227 add_ax_registers. Call finalize_tracepoint_aexpr.
1228 (encode_actions_1): Get remote regnos for $reg action. Call
1229 add_remote_register, add_ax_registers, and add_local_register.
1230 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1231 (validate_actionline): Call finalize_tracepoint_aexpr.
1233 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1235 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1236 Replace array buf with gdb::char_vector buf, of size
1237 get_remote_packet_size (). Replace references to buf and
1238 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1239 and xsnprintf with snprintf. Raise errors if the buffer is too
1242 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1244 * remote.c (remote_target::download_tracepoint): Fix the has_more
1245 predicate in the QTDP action list iteration.
1247 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1249 * remote.c (remote_target::download_tracepoint): Fix indentation
1252 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1254 * proc-api.c (_initialize_proc_api): Remove c, unused.
1255 * procfs.c (procfs_init_inferior): Remove signals, unused.
1256 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1259 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1260 Andrew Burgess <andrew.burgess@embecosm.com>
1262 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1263 'W_STOPCODE (0)' as this could be ambiguous.
1265 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1267 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1268 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1271 2018-08-02 Tom Tromey <tom@tromey.com>
1274 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1276 (process_structure_scope): Likewise.
1278 2018-08-02 Xavier Roirand <roirand@adacore.com>
1281 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1284 2018-08-02 Tom Tromey <tom@tromey.com>
1286 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1287 (darwin_suspend_inferior, darwin_resume_inferior)
1288 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1289 (darwin_check_new_threads): Check result of get_darwin_inferior.
1291 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1295 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1297 * varobj.c (varobj_get_path_expr_parent): Report an error if
1298 parent is a dynamic varobj.
1300 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1302 * gnulib/aclocal.m4: Re-generate.
1303 * gnulib/config.in: Re-generate.
1304 * gnulib/configure: Re-generate.
1305 * gnulib/import/Makefile.in: Re-generate.
1306 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1307 * gnulib/import/m4/onceonly.m4: Re-generate.
1309 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1311 * target-descriptions.c (struct xml_test_tdesc): New.
1312 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1313 (record_xml_tdesc): Update.
1314 (maintenance_check_xml_descriptions): Update.
1315 * target-descriptions.h (record_xml_tdesc): Update comment.
1317 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1319 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1320 checking array bounds are defined.
1322 2018-07-30 Tom Tromey <tom@tromey.com>
1324 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1325 irreflexivity violation.
1327 2018-07-30 Tom Tromey <tom@tromey.com>
1329 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1330 * value.c (unpack_long): Remove lint code.
1331 * valops.c (value_ind): Remove lint code.
1332 * valarith.c (value_x_binop, value_x_unop, value_equal)
1333 (value_pos): Remove lint code.
1335 2018-07-28 Tom de Vries <tdevries@suse.de>
1337 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1338 with undefined upper bound as <optimized out>.
1340 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1342 * gcore.in: Rename variable "name" to "prefix". Expand
1345 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1347 * windows-nat.c (windows_nat_target::create_inferior): Update to
1348 call close() in global namespace.
1350 2018-07-26 Tom Tromey <tom@tromey.com>
1352 * dwarf-index-write.c (add_address_entry): Don't add objfile
1354 * dbxread.c (find_stab_function): Rename from
1355 find_stab_function_addr. Return a bound_minimal_symbol.
1356 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1357 Don't add objfile offsets.
1358 (end_psymtab): Use raw_text_low, raw_text_high,
1359 MSYMBOL_VALUE_RAW_ADDRESS.
1360 (read_ofile_symtab): Update.
1361 (process_one_symbol): Update.
1362 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1364 (dw2_relocate): Remove.
1365 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1367 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1369 (process_psymtab_comp_unit_reader, add_partial_symbol)
1370 (add_partial_subprogram, dwarf2_ranges_read): Update.
1371 (load_partial_dies): Update.
1372 (add_address_entry): Don't add objfile offsets.
1373 (dwarf2_build_include_psymtabs): Update.
1374 (create_addrmap_from_aranges): Don't add objfile offsets.
1375 (dw2_find_pc_sect_compunit_symtab): Update.
1376 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1377 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1379 (parse_partial_symbols): Don't add objfile offsets. Use
1380 raw_text_low, raw_text_high. Update.
1381 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1382 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1383 or call 'relocate' quick function. Clear psymbol_map.
1384 * psympriv.h (struct partial_symbol) <address>: Add section
1386 <set_unrelocated_address>: Rename from set_address.
1387 <raw_text_low, raw_text_high>: New methods.
1388 <text_low, text_high>: Add objfile parameter.
1389 (add_psymbol_to_bcache): Add 'section' parameter. Call
1390 set_unrelocated_address.
1391 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1392 (find_pc_psymbol): Update.
1393 (fixup_psymbol_section, relocate_psymtabs): Remove.
1394 (dump_psymtab, psym_functions): Update.
1395 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1397 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1398 (start_psymtab_common): Update.
1399 * symfile-debug.c (debug_qf_relocate): Remove.
1400 (debug_sym_quick_functions): Update.
1401 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1402 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1405 2018-07-26 Tom Tromey <tromey@redhat.com>
1407 * dbxread.c (end_psymtab): Use text_high_valid and
1409 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1410 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1411 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1413 <text_low_valid, text_high_valid>: New fields.
1414 <set_text_low, set_text_high>: Update.
1415 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1417 2018-07-26 Tom Tromey <tom@tromey.com>
1419 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1421 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1422 textlow and texthigh fields.
1423 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1425 * mdebugread.c (parse_lines, parse_partial_symbols)
1426 (psymtab_to_symtab_1): Update.
1427 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1428 Rename fields. Update comment. Now private.
1429 <text_low, text_high, set_text_low, set_text_high>: New methods.
1430 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1431 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1432 (start_psymtab_common, maintenance_info_psymtabs)
1433 (maintenance_check_psymtabs): Update.
1434 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1436 (scan_xcoff_symtab): Update.
1438 2018-07-26 Tom Tromey <tromey@redhat.com>
1440 * psympriv.h (struct partial_symbol) <unrelocated_address,
1441 address, set_address>: New methods.
1442 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1443 (fixup_psymbol_section, relocate_psymtabs): Update.
1444 (print_partial_symbols): Add 'objfile' parameter. Update.
1445 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1448 2018-07-26 Tom Tromey <tom@tromey.com>
1450 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1451 (debug_names::write_psymbols): Update.
1452 * psympriv.h (struct partial_symbol): Derive from
1453 general_symbol_info.
1454 <obj_section>: New method.
1455 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1456 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1457 (find_pc_sect_psymbol, fixup_psymbol_section)
1458 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1459 (print_partial_symbols, recursively_search_psymtabs)
1460 (compare_psymbols, psymbol_hash, psymbol_compare)
1461 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1462 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1464 2018-07-26 Tom Tromey <tromey@redhat.com>
1466 * dbxread.c (end_psymtab): Remove dead code.
1468 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1470 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1471 DWARF unwinders are disabled.
1472 * dwarf2-frame.c: Add dwarf2read.h include.
1473 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1475 (dwarf2_frame_unwinders_enabled_p): Define.
1476 (show_dwarf_unwinders_enabled_p): New function.
1477 (_initialize_dwarf2_frame): Register switch to control DWARF
1479 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1480 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1481 (show_dwarf_cmdlist): Remove static keyword.
1482 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1483 (show_dwarf_cmdlist): Declare.
1484 * NEWS: Document new feature.
1486 2018-07-26 Tom de Vries <tdevries@suse.de>
1488 PR breakpoints/23366
1489 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1491 2018-07-26 Tom de Vries <tdevries@suse.de>
1493 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1494 DW_AT_count can't be translated to a dynamic prop.
1496 2018-07-25 Tom de Vries <tdevries@suse.de>
1498 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1501 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1503 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1505 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1507 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1509 2018-07-24 Keith Seitz <keiths@redhat.comt
1512 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1513 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1514 instead of add_symbol_to_list.
1515 (read_file_scope): Call prepare_one_comp_unit before reading
1518 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1520 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1522 2018-07-24 Tom Tromey <tom@tromey.com>
1524 * utils.c (malloc, realloc, free): Don't declare.
1525 * configure, config.in: Rebuild.
1526 * configure.ac: Don't check for declarations of free, malloc, or
1529 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1531 * aarch64-linux-nat.c
1532 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1534 * arm-linux-nat.c (fetch_regs): Likewise.
1535 (store_regs): Likewise.
1536 (fetch_vfp_regs): Likewise.
1537 (store_vfp_regs): Likewise.
1538 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1539 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1540 (arm_linux_nat_target::insert_watchpoint): Likewise.
1541 (arm_linux_nat_target::remove_watchpoint): Likewise.
1542 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1544 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1546 * ppc-linux-nat.c (fetch_register): Likewise.
1547 (fetch_all_gp_regs): Likewise.
1548 (fetch_ppc_registers): Likewise.
1549 (store_all_gp_regs): Likewise.
1550 (store_ppc_registers): Likewise.
1551 (hwdebug_insert_point): Likewise.
1552 (can_use_watchpoint_cond_accel): Likewise.
1553 * remote-sim.c (gdb_os_write_stdout): Likewise.
1555 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1556 Tom Tromey <tom@tromey.com>
1558 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1560 * configure: Rebuild.
1562 2018-07-22 Tom Tromey <tom@tromey.com>
1564 * regformats/regdat.sh: Define xmltarget_${name} inside
1565 #ifndef IN_PROCESS_AGENT.
1567 2018-07-22 Tom Tromey <tom@tromey.com>
1569 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1571 2018-07-22 Tom Tromey <tom@tromey.com>
1573 * symfile.c (reread_symbols): Notify iter, not objfile.
1575 2018-07-22 Tom Tromey <tom@tromey.com>
1577 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1579 (ravenscar_thread_target::prepare_to_store): Likewise.
1581 2018-07-22 Tom Tromey <tom@tromey.com>
1583 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1584 unused variable. Call value_fetch_lazy when needed.
1585 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1586 Remove unused variable. Call value_fetch_lazy when needed.
1588 2018-07-22 Tom Tromey <tom@tromey.com>
1590 * m32c-tdep.c (mark_dma): Return void.
1591 (make_regs): Remove unused declarations.
1593 2018-07-22 Tom Tromey <tom@tromey.com>
1595 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1596 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1597 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1598 bkscm_get_valid_block_smob_arg_unsafe for effect.
1600 2018-07-22 Tom Tromey <tom@tromey.com>
1602 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1605 2018-07-22 Tom Tromey <tom@tromey.com>
1607 * windows-nat.c (saved_context): Conditionally define.
1608 * remote.c (remote_target::remote_btrace_maybe_reopen):
1609 Conditionally declare "warned".
1610 * inflow.c (sigquit_ours): Conditionally define.
1611 (new_tty): Move "tty" declaration inside #if.
1612 * guile/guile.c (guile_datadir): Conditionally define.
1613 * charset.c (set_be_le_names): Move some declarations inside #if.
1614 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1616 (parse_xml_btrace_conf): Likewise.
1618 2018-07-22 Tom Tromey <tom@tromey.com>
1620 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1622 2018-07-22 Tom Tromey <tom@tromey.com>
1624 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1625 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1626 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1627 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1628 * stack.c (frame_apply_level_command): Remove unused variable.
1629 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1630 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1631 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1633 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1634 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1635 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1637 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1638 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1640 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1641 Remove unused variable.
1642 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1644 * common/tdesc.c (print_xml_feature::visit): Remove unused
1646 * compile/compile-object-load.c (store_regs): Remove unused
1648 * complaints.c (clear_complaints): Remove unused variable.
1649 * corelow.c (core_target_open): Remove unused variable.
1650 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1652 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1654 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1656 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1658 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1660 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1662 * ia64-tdep.c (examine_prologue): Remove unused variable.
1663 * infcall.c (run_inferior_call): Remove unused variable.
1664 * inferior.c (exit_inferior): Remove unused variable.
1665 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1666 * linespec.c (decode_line_2): Remove unused variable.
1667 * linux-nat.c (super_close): Remove.
1668 * linux-tdep.c (linux_info_proc): Remove unused variable.
1669 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1670 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1671 Remove unused variable.
1672 * parse.c (find_minsym_type_and_address): Remove unused variable.
1673 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1675 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1677 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1679 * record-btrace.c (record_btrace_target::store_registers): Remove
1681 (cmd_show_record_btrace_cpu): Remove unused variable.
1682 * riscv-tdep.c (riscv_register_reggroup_p)
1683 (riscv_push_dummy_call, riscv_return_value): Remove unused
1685 * rust-exp.y (literal): Remove unused variable.
1686 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1688 <STRUCTOP_ANONYMOUS>: Likewise.
1689 * s390-linux-tdep.c (s390_linux_init_abi_31)
1690 (s390_linux_init_abi_64): Remove unused variable.
1691 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1692 (file_select_thread, net_windows_open, _initialize_ser_windows):
1693 Remove unused variables.
1694 * symtab.c (find_pc_sect_line): Remove unused variable.
1695 * target-memory.c (compute_garbled_blocks): Remove unused
1697 (target_write_memory_blocks): Remove unused variable.
1698 * target.c (target_stack::unpush): Remove unused variables.
1699 * tracepoint.c (start_tracing, all_tracepoint_actions)
1700 (merge_uploaded_trace_state_variables)
1701 (print_one_static_tracepoint_marker): Remove unused variable.
1702 * unittests/basic_string_view/element_access/char/1.cc (test01):
1703 Remove unused variable.
1704 * windows-nat.c (windows_continue, windows_add_all_dlls)
1705 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1706 Remove unused variables.
1708 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1710 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1711 attr_profile in HAVE_ELF.
1712 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1715 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1717 * frame.c (frame_register_unwind): Change parameter name.
1718 (frame_unwind_register): Likewise.
1719 (frame_unwind_register_value): Likewise.
1720 (frame_unwind_register_signed): Likewise.
1721 (frame_unwind_register_unsigned): Likewise.
1722 * frame.h (frame_register_unwind): Likewise.
1723 (frame_unwind_register): Likewise.
1724 (frame_unwind_register_value): Likewise.
1725 (frame_unwind_register_signed): Likewise.
1726 (frame_unwind_register_unsigned): Likewise.
1727 (frame_unwind_arch): Likewise.
1729 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1731 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1734 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1736 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1737 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1740 2018-07-20 Keith Seitz <keiths@redhat.com>
1742 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1743 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1744 m_compunit_symtab, m_language>: Add "m_" prefix.
1746 * buildsym.c: Update all uses.
1748 2018-07-20 Tom Tromey <tom@tromey.com>
1750 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1751 * buildsym.h (record_line_ftype): Remove typedef.
1753 2018-07-20 Tom Tromey <tom@tromey.com>
1755 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1756 (end_expandable_symtab): Likewise.
1757 (end_symtab_get_static_block): Likewise.
1758 (end_symtab_from_static_block): Likewise.
1759 * buildsym-legacy.c (augment_type_symtab): Remove.
1760 (end_expandable_symtab): Remove.
1761 (end_symtab_get_static_block): Remove.
1762 (end_symtab_from_static_block): Remove.
1764 2018-07-20 Tom Tromey <tom@tromey.com>
1766 * dwarf2read.c: Include buildsym.h.
1767 (struct dwarf2_cu) <builder>: New method.
1768 (fixup_go_packaging): Update.
1769 (process_full_comp_unit, process_full_type_unit): Update. Don't
1770 use scoped_free_pendings.
1771 (using_directives): Add "cu" parameter, remove "language".
1772 (read_import_statement, setup_type_unit_groups, )
1773 (read_func_scope, read_lexical_block_scope)
1774 (dwarf2_record_block_ranges, read_namespace): Update.
1775 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1776 (lnp_state_machine::handle_end_sequence): Update.
1777 (class lnp_state_machine) <m_cu>: New member.
1778 <m_record_line_callback>: Remove.
1779 <m_currently_recording_lines>: New member.
1780 (lnp_state_machine::handle_set_file): Update.
1781 (noop_record_line): Remove.
1782 (dwarf_record_line_p): Add cu parameter.
1783 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1784 (lnp_state_machine::record_line)
1785 (lnp_state_machine::lnp_state_machine)
1786 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1787 (dwarf_decode_lines): Update.
1788 (dwarf2_start_subfile): Add cu parameter.
1789 (dwarf2_start_symtab, new_symbol): Update.
1790 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1791 Remove dwarf2_per_objfile parameter.
1792 (dwarf_decode_macros): Update.
1794 2018-07-20 Tom Tromey <tom@tromey.com>
1796 * stabsread.c (define_symbol): Update.
1797 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1798 * dwarf2read.c (new_symbol): Update.
1799 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1800 * cp-namespace.c: Include buildsym.h.
1801 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1802 * buildsym-legacy.c (get_buildsym_compunit): New function.
1804 2018-07-20 Tom Tromey <tom@tromey.com>
1806 * xcoffread.c: Include buildsym-legacy.h.
1807 * windows-nat.c: Include buildsym-legacy.h.
1808 * stabsread.c: Include buildsym-legacy.h.
1809 * mdebugread.c: Include buildsym-legacy.h.
1810 * buildsym-legacy.h: New file.
1811 * buildsym-legacy.c: New file, from buildsym.c.
1812 * go32-nat.c: Include buildsym-legacy.h.
1813 * dwarf2read.c: Include buildsym-legacy.h.
1814 * dbxread.c: Include buildsym-legacy.h.
1815 * cp-namespace.c: Include buildsym-legacy.h.
1816 * coffread.c: Include buildsym-legacy.h.
1817 * buildsym.h: Move some contents to buildsym-legacy.h.
1818 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1820 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1822 2018-07-20 Tom Tromey <tom@tromey.com>
1824 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1825 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1826 (buildsym_compunit::buildsym_compunit)
1827 (buildsym_compunit::~buildsym_compunit)
1828 (buildsym_compunit::get_macro_table): Define.
1830 2018-07-20 Tom Tromey <tom@tromey.com>
1832 * buildsym.c (reset_symtab_globals): Remove.
1833 (buildsym_compunit::end_symtab_from_static_block): Update.
1834 (buildsym_compunit::augment_type_symtab): Update.
1835 (end_symtab_from_static_block): Call free_buildsym_compunit.
1836 (augment_type_symtab, end_symtab, end_expandable_symtab):
1839 2018-07-20 Tom Tromey <tom@tromey.com>
1841 * arch-utils.c: Do not include buildsym.h.
1842 * mipsread.c: Do not include buildsym.h.
1843 * machoread.c: Do not include buildsym.h.
1844 * elfread.c: Do not include buildsym.h.
1846 2018-07-20 Tom Tromey <tom@tromey.com>
1848 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1850 (buildsym_compunit): Add new constructor.
1851 (struct buildsym_compunit) <get_last_source_file, finish_block,
1852 record_block_range, start_subfile, patch_subfile_names,
1853 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1854 set_last_source_start_addr, get_last_source_start_addr,
1855 get_local_using_directives, set_local_using_directives,
1856 get_global_using_directives, outermost_context_p,
1857 get_current_context_stack, get_context_stack_depth,
1858 get_current_subfile, get_local_symbols, get_file_symbols,
1859 get_global_symbols, record_debugformat, record_producer,
1860 push_context, pop_context, end_symtab_get_static_block,
1861 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1863 <record_pending_block, finish_block_internal, make_blockvector,
1864 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1868 2018-05-22 Tom Tromey <tom@tromey.com>
1870 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1872 (finish_block_internal): Update.
1874 2018-07-20 Tom Tromey <tom@tromey.com>
1876 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1878 (finish_block_internal): Update.
1880 2018-07-20 Tom Tromey <tom@tromey.com>
1882 * buildsym.h (EXTERN): Don't define or undef.
1883 * buildsym.c (EXTERN): Don't define.
1885 2018-07-20 Tom Tromey <tom@tromey.com>
1887 * buildsym.c: Remove TODO comment.
1889 2018-07-20 Tom Tromey <tom@tromey.com>
1891 * coffread.c (coff_symtab_read): Update.
1892 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1893 (xcoff_new_init): Update.
1894 * mipsread.c (mipscoff_new_init): Update.
1895 * mdebugread.c (mdebug_build_psymtabs): Update.
1896 * elfread.c (elf_new_init): Update.
1897 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1899 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1900 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1901 (stabsect_build_psymtabs): Update.
1902 * buildsym.h (buildsym_init): Don't declare.
1903 * buildsym.c: Update comment.
1904 (prepare_for_building): Remove.
1905 (start_symtab, restart_symtab): Update.
1906 (reset_symtab_globals): Update comment.
1907 (buildsym_init): Remove.
1909 2018-07-20 Tom Tromey <tom@tromey.com>
1911 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1912 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1913 (read_enum_type, common_block_start, common_block_end)
1914 (cleanup_undefined_types_1, finish_global_stabs): Update.
1915 * mdebugread.c (psymtab_to_symtab_1): Update.
1916 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1917 (read_lexical_block_scope, new_symbol): Update.
1918 * dbxread.c (process_one_symbol): Update.
1919 * coffread.c (coff_symtab_read, process_coff_symbol)
1920 (coff_read_enum_type): Update.
1921 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1923 (get_local_symbols, get_file_symbols, get_global_symbols): New
1925 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1927 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1928 (~scoped_free_pendings): Update.
1929 (finish_block, prepare_for_building, reset_symtab_globals)
1930 (end_symtab_get_static_block, end_symtab_with_blockvector)
1931 (augment_type_symtab, push_context): Update.
1932 (get_local_symbols, get_file_symbols, get_global_symbols): New
1934 (buildsym_init): Update.
1936 2018-07-20 Tom Tromey <tom@tromey.com>
1938 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1939 (process_full_type_unit): Likewise.
1940 (dwarf2_start_symtab): Set list_in_scope.
1942 2018-07-20 Tom Tromey <tom@tromey.com>
1944 * dwarf2read.c (process_psymtab_comp_unit_reader)
1945 (build_type_psymtabs_reader): Do not set list_in_scope.
1947 2018-07-20 Tom Tromey <tom@tromey.com>
1949 * buildsym.c (free_pendings): Remove.
1950 (add_symbol_to_list, scoped_free_pendings)
1951 (finish_block_internal, buildsym_init): Update.
1953 2018-07-20 Tom Tromey <tom@tromey.com>
1955 * xcoffread.c (read_xcoff_symtab): Update.
1956 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1958 * dbxread.c (process_one_symbol): Update.
1959 * coffread.c (coff_symtab_read): Update.
1960 * buildsym.h (finish_block): Update.
1961 * buildsym.c (finish_block): Remove "listhead" argument.
1962 (end_symtab_get_static_block): Update.
1964 2018-07-20 Tom Tromey <tom@tromey.com>
1966 * buildsym.h (class scoped_free_pendings): Remove constructor.
1967 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1969 <m_pending_block_obstack, m_pending_blocks>: New members.
1970 (pending_block_obstack, pending_blocks): Remove.
1971 (scoped_free_pendings::scoped_free_pendings): Default.
1972 (~scoped_free_pendings): Update.
1973 (free_pending_blocks): Remove.
1974 (finish_block_internal, record_pending_block, make_blockvector)
1975 (end_symtab_get_static_block, augment_type_symtab, push_context)
1976 (buildsym_init): Update.
1978 2018-07-20 Tom Tromey <tom@tromey.com>
1980 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1981 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1983 (pending_addrmap, pending_addrmap_obstack)
1984 (pending_addrmap_interesting): Remove.
1985 (scoped_free_pendings, record_block_range, make_blockvector)
1986 (prepare_for_building, reset_symtab_globals, buildsym_init):
1989 2018-07-20 Tom Tromey <tom@tromey.com>
1991 * xcoffread.c (process_linenos): Update.
1992 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1993 * mdebugread.c (psymtab_to_symtab_1): Update.
1994 * dwarf2read.c (setup_type_unit_groups)
1995 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1996 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1997 * dbxread.c (process_one_symbol): Update.
1998 * coffread.c (coff_symtab_read, enter_linenos)
1999 (process_coff_symbol): Update.
2000 * buildsym.h (current_subfile): Don't declare.
2001 (get_current_subfile): Declare.
2002 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2004 (start_subfile, free_buildsym_compunit, push_subfile)
2005 (prepare_for_building, start_symtab): Update.
2006 (get_current_subfile): New function.
2008 2018-07-20 Tom Tromey <tom@tromey.com>
2010 * coffread.c (coff_symtab_read): Update.
2011 * xcoffread.c (read_xcoff_symtab): Update.
2012 * dwarf2read.c (new_symbol): Update.
2013 (read_func_scope, read_lexical_block_scope): Update.
2014 * dbxread.c (process_one_symbol): Update.
2015 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2016 (outermost_context_p): Remove macro.
2017 (outermost_context_p, get_current_context_stack)
2018 (get_context_stack_depth): Declare.
2019 (pop_context): Return struct context_stack.
2020 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2022 (context_stack_size): Remove.
2023 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2024 (prepare_for_building, end_symtab_get_static_block)
2025 (augment_type_symtab, push_context): Update.
2026 (pop_context): Return struct context_stack.
2027 (outermost_context_p, get_current_context_stack)
2028 (get_context_stack_depth): New functions.
2029 (buildsym_init): Update.
2031 2018-07-20 Tom Tromey <tom@tromey.com>
2033 * rust-exp.y: Now a pure parser. Update all rules.
2034 (%union): Move earlier.
2035 (current_parser, work_obstack): Remove globals.
2036 (rust_parser, ~rust_parser): Update.
2037 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2038 lex_character, lex_number, lex_string, lex_identifier,
2039 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2040 convert_name, convert_params_to_expression,
2041 convert_ast_to_expression, ast_basic_type, ast_operation,
2042 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2043 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2044 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2045 ast_array_type, ast_slice_type, ast_reference_type,
2046 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2047 (rust_parse): Update.
2048 (rustyyerror, rustyylex): Add parser parameter.
2049 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2050 (rust_lex_stringish_test, rust_lex_test_sequence)
2051 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2052 (rust_lex_test_push_back, rust_lex_tests): Update.
2054 2018-07-19 Pedro Alves <palves@redhat.com>
2056 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2057 gdb::unique_xmalloc_ptr.
2058 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2059 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2060 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2061 copy-initialization.
2062 * guile/scm-pretty-print.c (ppscm_print_children): Use
2063 gdb::unique_xmalloc_ptr instead of cleanups.
2064 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2065 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2066 gdb::unique_xmalloc_ptr.
2067 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2068 Adjust to use gdb::unique_xmalloc_ptr.
2069 * guile/scm-utils.c (extract_arg): Adjust.
2070 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2071 gdb::unique_xmalloc_ptr instead of a cleanup.
2073 2018-07-19 Tom Tromey <tom@tromey.com>
2075 * utils.c (do_value_free_to_mark)
2076 (make_cleanup_value_free_to_mark): Remove.
2077 * utils.h (make_cleanup_value_free_to_mark): Remove.
2079 2018-07-19 Pedro Alves <palves@redhat.com>
2081 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2082 forwarding reference.
2084 2018-07-18 Pedro Alves <palves@redhat.com>
2086 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2087 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2090 2018-07-18 Pedro Alves <palves@redhat.com>
2092 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2094 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2096 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2097 directly instead of a cleanup.
2098 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2099 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2100 (vlscm_binop_gdbthrow): New, factored out from ...
2101 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2102 (vlscm_rich_compare): Use gdbscm_wrap.
2103 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2104 instead of a cleanup.
2105 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2107 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2108 Use xfree directly instead of a cleanup.
2109 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2110 Adjust to use gdbscm_wrap and scoped_value_mark.
2111 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2112 (gdbscm_value_address, gdbscm_value_dereference)
2113 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2115 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2116 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2118 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2119 gdbscm_wrap and scoped_value_mark.
2120 (gdbscm_value_to_string): Use xfree directly instead of a
2121 cleanup. Move 'buffer' unique_ptr to TRY scope.
2122 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2123 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2125 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2126 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2128 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2131 2018-07-18 Tom de Vries <tdevries@suse.de>
2133 * findvar.c (default_read_var_value): Also resolve dynamic type for
2134 LOC_OPTIMIZED_OUT vars.
2136 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2138 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2141 2018-07-17 Tom Tromey <tom@tromey.com>
2143 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2144 (compute_enum_list, pascm_set_param_value_x)
2145 (gdbscm_parameter_value): Update.
2146 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2147 (gdbscm_scm_to_host_string): Update.
2148 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2150 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2151 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2152 * guile/scm-string.c (gdbscm_scm_to_string): Return
2154 (gdbscm_scm_to_host_string): Likewise.
2156 2018-07-17 Tom Tromey <tom@tromey.com>
2158 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2159 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2160 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2161 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2164 2018-07-17 Tom Tromey <tom@tromey.com>
2166 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2167 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2169 * guile/scm-cmd.c (cmdscm_function): Update.
2170 * guile/scm-pretty-print.c
2171 (ppscm_print_exception_unless_memory_error): Update.
2172 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2173 Return unique_xmalloc_ptr.
2175 2018-07-17 Tom Tromey <tom@tromey.com>
2177 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2180 2018-07-17 Jim Wilson <jimw@sifive.com>
2182 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2183 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2184 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2185 unecessary braces after EF_RISCV_RVC test. Delete call to
2186 set_gdbarch_decr_pc_after_break.
2188 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2189 RISCV_LAST_FP_REGNUM + 1.
2190 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2192 2018-07-17 Tom Tromey <tom@tromey.com>
2194 * configure.ac: Remove --disable-gdbcli.
2195 * configure: Rebuild.
2196 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2197 (SUBDIR_CLI_CFLAGS): Remove.
2198 (SFILES): Use SUBDIR_CLI_SRCS.
2199 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2201 2018-07-17 Tom Tromey <tom@tromey.com>
2204 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2206 2018-07-16 Jim Wilson <jimw@sifive.com>
2208 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2210 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2212 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2214 (libunwind_frame_sniffer): Likewise.
2215 (libunwind_frame_prev_register): Likewise.
2216 (libunwind_sigtramp_frame_sniffer): Likewise.
2217 * ia64-tdep.c (ia64_access_reg): Likewise.
2218 (ia64_access_rse_reg): Likewise.
2219 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2220 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2222 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2224 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2226 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2228 * remote-sim.c (gdbsim_target::close,
2229 gdbsim_target::mourn_inferior): Remove unused variables.
2231 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2233 * ia64-tdep.c (ktab_buf): New global.
2234 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2235 (get_kernel_table): Adjust.
2237 2018-07-16 Tom Tromey <tom@tromey.com>
2239 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2240 * dwarf2read.c (using_directives, new_symbol): Use
2241 outermost_context_p.
2242 * dbxread.c (process_one_symbol): Use outermost_context_p.
2243 * coffread.c (coff_symtab_read): Use outermost_context_p.
2245 2018-07-16 Tom Tromey <tom@tromey.com>
2247 * dwarf2read.c (using_directives, read_func_scope)
2248 (read_lexical_block_scope): Update.
2249 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2250 * buildsym.h (local_using_directives, global_using_directives):
2252 (get_local_using_directives, set_local_using_directives)
2253 (get_global_using_directives): Declare.
2254 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2255 m_global_using_directives>: New members.
2256 (finish_block_internal, prepare_for_building)
2257 (reset_symtab_globals, end_symtab_get_static_block)
2258 (push_context): Update.
2259 (get_local_using_directives, set_local_using_directives)
2260 (get_global_using_directives): New functions.
2261 (buildsym_init): Update.
2263 2018-07-16 Tom Tromey <tom@tromey.com>
2265 * xcoffread.c (xcoff_initial_scan): Don't call
2266 free_pending_blocks.
2267 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2268 * buildsym.h (class scoped_free_pendings): Add constructor.
2269 (free_pending_blocks): Don't declare.
2270 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2271 (free_pending_blocks): Now static.
2273 2018-07-16 Tom Tromey <tom@tromey.com>
2275 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2276 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2278 (struct subfile_stack): Remove.
2279 (subfile_stack): Remove.
2280 (push_subfile, pop_subfile, buildsym_init): Update.
2282 2018-07-16 Tom Tromey <tom@tromey.com>
2284 * buildsym.c (push_subfile): Use gdb_assert.
2285 (pop_subfile): Use gdb_assert.
2287 2018-07-16 Tom Tromey <tom@tromey.com>
2289 * buildsym.h (merge_symbol_lists): Remove.
2290 * buildsym.c (merge_symbol_lists): Remove.
2292 2018-07-16 Tom Tromey <tom@tromey.com>
2294 * stabsread.c (scan_file_globals): Update comment.
2295 * stabsread.h (scan_file_globals): Move from buildsym.h.
2296 * buildsym.h (scan_file_globals): Move to stabsread.h.
2298 2018-07-16 Tom Tromey <tom@tromey.com>
2300 * xcoffread.c (xcoff_new_init): Update.
2301 * mipsread.c (mipscoff_new_init): Update.
2302 * mdebugread.c (mdebug_build_psymtabs): Update.
2303 * elfread.c (elf_new_init): Update.
2304 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2305 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2306 * buildsym.h (buildsym_new_init): Don't declare.
2307 * buildsym.c (buildsym_new_init): Remove.
2309 2018-07-16 Tom Tromey <tom@tromey.com>
2311 * stabsread.h (within_function): Move from buildsym.h.
2312 * stabsread.c (start_stabs): Clear within_function.
2313 * coffread.c (coff_start_symtab): Clear within_function.
2314 * buildsym.h (within_function): Move to stabsread.h.
2315 * buildsym.c (prepare_for_building): Update.
2317 2018-07-16 Tom Tromey <tom@tromey.com>
2319 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2320 * dwarf2read.c (dwarf2_start_symtab): Don't set
2321 processing_gcc_compilation.
2322 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2324 2018-07-16 Tom Tromey <tom@tromey.com>
2326 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2327 (next_symbol_text_func): Move from buildsym.h.
2328 * stabsread.c (hashname): Move from buildsym.c.
2329 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2330 (next_symbol_text_func, hashname): Move to stabsread.h.
2331 * buildsym.c: Don't include bcache.h
2332 (hashname): Move to stasbread.c.
2334 2018-07-16 Tom Tromey <tom@tromey.com>
2336 * buildsym.h (context_stack_size): Don't declare.
2337 * buildsym.c (context_stack_size): New global.
2339 2018-07-16 Tom Tromey <tom@tromey.com>
2341 * dbxread.c (processing_acc_compilation): New global.
2342 * buildsym.h (processing_acc_compilation): Don't declare.
2344 2018-07-16 Tom Tromey <tom@tromey.com>
2346 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2347 * dbxread.c (read_ofile_symtab): Update.
2348 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2349 * buildsym.h (last_source_start_addr): Remove.
2350 (set_last_source_start_addr, get_last_source_start_addr):
2352 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2354 (struct buildsym_compunit) <m_last_source_start_addr>: New
2356 (prepare_for_building): Remove start_addr parameter.
2357 (start_symtab, restart_symtab, end_symtab_get_static_block)
2358 (end_symtab_with_blockvector): Update.
2359 (set_last_source_start_addr, get_last_source_start_addr): New
2362 2018-07-16 Tom Tromey <tom@tromey.com>
2364 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2366 (have_line_numbers): Remove.
2367 (record_line, prepare_for_building, end_symtab_get_static_block)
2368 (augment_type_symtab): Update.
2370 2018-07-16 Tom Tromey <tom@tromey.com>
2372 * buildsym.c (~buildsym_compunit): Free the macro table.
2373 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2375 <m_pending_macros>: New member.
2376 (pending_macros): Remove.
2377 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2378 (reset_symtab_globals, end_symtab_get_static_block)
2379 (end_symtab_with_blockvector, augment_type_symtab)
2380 (buildsym_init): Update.
2382 2018-07-16 Tom Tromey <tom@tromey.com>
2384 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2386 (buildsym_compunit::set_last_source_file): New method.
2387 <m_last_source_file>: New member.
2388 (prepare_for_building): Remove "name" parameter.
2389 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2390 (last_source_file): Remove.
2391 (set_last_source_file, get_last_source_file): Update.
2393 2018-07-16 Tom Tromey <tom@tromey.com>
2395 * buildsym.c (prepare_for_building): Add assert.
2397 2018-07-16 Tom Tromey <tom@tromey.com>
2399 * buildsym.c (~buildsym_compunit): Update.
2400 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2401 (start_subfile, patch_subfile_names)
2402 (end_symtab_with_blockvector): Update.
2404 2018-07-16 Tom Tromey <tom@tromey.com>
2406 * buildsym.c (struct buildsym_compunit): Add constructor,
2407 destructor, initializers.
2408 (start_buildsym_compunit): Remove.
2409 (free_buildsym_compunit): Use "delete".
2410 (start_symtab, restart_symtab): Use "new".
2412 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2414 * symfile.c (set_objfile_default_section_offset): Remove struct
2417 2018-07-14 Stafford Horne <shorne@gmail.com>
2419 * (Responsible Maintainers): Add myself as or1k maintainer.
2421 2018-07-13 Tom Tromey <tom@tromey.com>
2423 * symfile.c (set_objfile_default_section_offset): Use extra braces
2426 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2428 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2431 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2433 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2434 unittests/cli-utils-selftests.c
2435 * unittests/cli-utils-selftests.c: New file.
2437 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2439 * NEWS: Mention new commands. Mention change to 'thread apply'.
2441 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2443 * thread.c (thr_try_catch_cmd): New function.
2444 (thread_apply_all_command): Handle qcs flags.
2445 (thread_apply_command): Handle qcs flags.
2446 (taas_command): New function.
2447 (tfaas_command): New function.
2448 (_initialize_thread): Update to setup the new commands 'taas
2449 and 'tfaas'. Change doc string for 'thread apply'.
2451 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2453 * stack.c: (trailing_outermost_frame): New function, mostly
2454 extracted from backtrace_command_1.
2455 (leading_innermost_frame): New function.
2456 (backtrace_command_1): Update to call trailing_outermost_frame.
2457 (frame_apply_command_count): New function.
2458 (frame_apply_level_command): New function.
2459 (frame_apply_all_command): New function.
2460 (frame_apply_command): New function.
2461 (faas_command): New function.
2462 (frame_cmd_list): New variable.
2463 (_initialize_stack): Update to setup the new commands 'frame apply'
2466 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2468 * cli-utils.c (number_or_range_parser::get_number): Only handle
2469 numbers or convenience var as numbers.
2470 (parse_flags): New function.
2471 (parse_flags_qcs): New function.
2472 (number_or_range_parser::finished): Ensure parsing end is detected
2473 before end of string.
2474 * cli-utils.h (parse_flags): New function.
2475 (parse_flags_qcs): New function.
2476 (number_or_range_parser): Remove m_finished bool.
2477 (number_or_range_parser::skip_range): Set m_in_range to false.
2479 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2481 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2484 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2485 Jan Kratochvil <jan.kratochvil@redhat.com>
2486 Paul Fertser <fercerpav@gmail.com>
2487 Tsutomu Seki <sekiriki@gmail.com>
2488 Pedro Alves <palves@redhat.com>
2490 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2491 'unittests/parse-connection-spec-selftests.c'.
2492 (COMMON_SFILES): Add 'common/netstuff.c'.
2493 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2494 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2495 * common/netstuff.c: New file.
2496 * common/netstuff.h: New file.
2497 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2498 (wait_for_connect): Update comment. New parameter
2499 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2500 Use 'sock' directly instead of 'scb->fd'.
2501 (try_connect): New function, with code from 'net_open'.
2502 (net_open): Rewrite main loop to deal with multiple
2503 sockets/addresses. Handle IPv6-style hostnames; implement
2504 support for IPv6 connections.
2505 * unittests/parse-connection-spec-selftests.c: New file.
2507 2018-07-11 Pedro Alves <palves@redhat.com>
2510 * remote.c (remote_target::remote_detach_pid): Call
2511 set_current_process.
2513 2018-07-11 Pedro Alves <palves@redhat.com>
2515 * h8300-tdep.c (h8300_gdbarch_init): Remove
2516 set_gdbarch_ecoff_reg_to_regnum calls.
2518 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2521 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2522 offsets/sizes for static members of a class/struct.
2524 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2526 * target-descriptions.c (tdesc_register_bitsize): Rename.
2527 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2528 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2529 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2531 2018-07-10 Tom Tromey <tom@tromey.com>
2533 * breakpoint.c (moribund_locations): Now static and a
2535 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2536 (build_bpstat_chain, update_global_location_list)
2537 (breakpoint_retire_moribund): Update.
2538 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2541 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2543 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2544 (riscv_register_reggroup_p): Use new function, remove unneeded
2546 (riscv_push_dummy_call): Extend assert to compare against xlen or
2547 flen based on register type.
2549 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2551 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2553 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2555 * remote.c (show_hardware_watchpoint_limit): New function.
2556 (show_hardware_watchpoint_length_limit): New function.
2557 (show_hardware_breakpoint_limit): New function.
2558 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2559 where appropriate, update help text.
2561 2018-07-09 Tom Tromey <tom@tromey.com>
2563 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2564 (CLIBS): Don't mention NAT_CLIBS.
2566 2018-07-09 Tom Tromey <tom@tromey.com>
2568 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2569 (LIBGDB_OBS, clean mostlyclean): Update.
2570 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2572 2018-07-09 Tom Tromey <tom@tromey.com>
2574 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2575 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2576 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2578 2018-07-09 Tom Tromey <tom@tromey.com>
2580 * Makefile.in (ALLDEPFILES): Remove exec.c.
2581 (COMMON_OBS): Remove exec.o.
2582 (COMMON_SFILES): Add exec.c.
2584 2018-07-09 Tom Tromey <tom@tromey.com>
2586 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2588 2018-07-09 Tom Tromey <tom@tromey.com>
2590 * Makefile.in (clean mostlyclean): Remove stamp-version.
2591 (version.c): Depend on stamp-version.
2592 (stamp-version): New rule, from version.c rule.
2594 2018-07-09 Tom Tromey <tom@tromey.com>
2596 * Makefile.in (init.c): Depend on stamp-init.
2597 (stamp-init): New rule, from init.c rule.
2598 (clean mostlyclean): Remove stamp-init.
2600 2018-07-09 Tom Tromey <tom@tromey.com>
2602 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2603 SUBDIR_GCC_COMPILE_SRCS.
2605 2018-07-09 Tom Tromey <tom@tromey.com>
2607 * Makefile.in (init.c): Remove some unused sed rules.
2609 2018-07-09 Tom Tromey <tom@tromey.com>
2611 * Makefile.in (TSOBS): Remove.
2612 (INIT_FILES): Update.
2613 (LIBGDB_OBS): Update.
2614 (COMMON_SFILES): Add inflow.c.
2615 (SFILES): Remove inflow.c.
2617 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2619 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2621 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2623 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2624 get_saveloc_name, is_signal_frame_name, step_name,
2625 init_remote_name, create_addr_space_name,
2626 destroy_addr_space_name, search_unwind_table_name,
2627 find_dyn_list_name): Constify.
2629 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2631 * darwin-nat.c (darwin_pthread_kill): New function.
2632 (darwin_resume_thread): Use darwin_pthread_kill.
2634 2018-07-05 Tom de Vries <tdevries@suse.de>
2636 * macroexp.c (macro_buffer) <operator=>: New member function.
2638 2018-07-04 Tom Tromey <tom@tromey.com>
2640 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2642 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2644 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2645 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2646 * maint.c: Likewise.
2649 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2651 * NEWS: Create a new section for the next release branch.
2652 Rename the section of the current branch, now that it has
2655 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2657 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2658 * version.in: Bump version to 8.2.50.DATE-git.
2660 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2661 Pedro Alves <palves@redhat.com>
2663 * linux-nat.c (linux_init_ptrace): Rename to ...
2664 (linux_init_ptrace_procfs): ... this. Call
2665 linux_proc_init_warnings.
2666 (linux_nat_target::post_attach)
2667 (linux_nat_target::post_startup_inferior): Adjust.
2668 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2669 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2671 2018-07-04 Tom de Vries <tdevries@suse.de>
2673 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2675 (read_comp_unit_head): ... here.
2677 2018-07-03 Tom Tromey <tom@tromey.com>
2679 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2680 (stop_tracing, tstatus_command)
2681 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2682 (print_one_static_tracepoint_marker): Update.
2683 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2685 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2687 (all_tracepoints, static_tracepoints_here): Return std::vector.
2689 2018-07-03 Tom Tromey <tom@tromey.com>
2691 * common/ptid.c (ptid_equal): Remove.
2692 * common/ptid.h (ptid_equal): Don't declare.
2693 * ada-tasks.c: Update.
2694 * breakpoint.c: Update.
2695 * common/agent.c: Update.
2696 * corelow.c: Update.
2697 * darwin-nat-info.c: Update.
2698 * darwin-nat.c: Update.
2700 * dtrace-probe.c: Update.
2701 * dummy-frame.c: Update.
2702 * fbsd-nat.c: Update.
2704 * gdbthread.h: Update.
2705 * gnu-nat.c: Update.
2706 * go32-nat.c: Update.
2707 * inf-loop.c: Update.
2708 * inf-ptrace.c: Update.
2709 * infcall.c: Update.
2713 * linux-fork.c: Update.
2714 * linux-nat.c: Update.
2715 * linux-thread-db.c: Update.
2716 * mi/mi-cmd-var.c: Update.
2717 * mi/mi-interp.c: Update.
2718 * mi/mi-main.c: Update.
2719 * nto-procfs.c: Update.
2720 * ppc-linux-tdep.c: Update.
2722 * python/py-inferior.c: Update.
2723 * python/py-record-btrace.c: Update.
2724 * python/py-record.c: Update.
2725 * ravenscar-thread.c: Update.
2726 * regcache.c: Update.
2727 * remote-sim.c: Update.
2729 * sol-thread.c: Update.
2732 * tui/tui-stack.c: Update.
2734 * windows-nat.c: Update.
2735 * windows-tdep.c: Update.
2737 2018-07-03 Tom Tromey <tom@tromey.com>
2739 * common/ptid.c (ptid_match): Remove.
2740 * common/ptid.h (ptid_match): Don't declare.
2741 * fbsd-nat.c: Update.
2744 * linux-nat.c: Update.
2745 * record-btrace.c: Update.
2746 * regcache.c: Update.
2749 2018-07-03 Tom Tromey <tom@tromey.com>
2751 * common/ptid.c (ptid_tid_p): Remove.
2752 * common/ptid.h (ptid_tid_p): Don't declare.
2753 * sol-thread.c: Update.
2755 2018-07-03 Tom Tromey <tom@tromey.com>
2757 * common/ptid.c (ptid_lwp_p): Remove.
2758 * common/ptid.h (ptid_lwp_p): Don't declare.
2759 * fbsd-nat.c: Update.
2760 * linux-nat.c: Update.
2761 * nat/linux-procfs.c: Update.
2762 * nat/x86-linux-dregs.c: Update.
2763 * sol-thread.c: Update.
2765 2018-07-03 Tom Tromey <tom@tromey.com>
2767 * common/ptid.c (ptid_is_pid): Remove.
2768 * common/ptid.h (ptid_is_pid): Don't declare.
2770 * linux-nat.c: Update.
2771 * mi/mi-interp.c: Update.
2775 2018-07-03 Tom Tromey <tom@tromey.com>
2777 * common/ptid.c (ptid_get_tid): Remove.
2778 * common/ptid.h (ptid_get_tid): Don't declare.
2779 * ada-tasks.c: Update.
2780 * aix-thread.c: Update.
2781 * bsd-uthread.c: Update.
2782 * darwin-nat.c: Update.
2783 * fbsd-nat.c: Update.
2784 * i386-darwin-nat.c: Update.
2786 * linux-tdep.c: Update.
2787 * nto-procfs.c: Update.
2788 * ppc-ravenscar-thread.c: Update.
2789 * python/py-infthread.c: Update.
2790 * ravenscar-thread.c: Update.
2791 * sol-thread.c: Update.
2792 * sparc-ravenscar-thread.c: Update.
2793 * windows-nat.c: Update.
2795 2018-07-03 Tom Tromey <tom@tromey.com>
2797 * common/ptid.c (ptid_get_lwp): Remove.
2798 * common/ptid.h (ptid_get_lwp): Don't declare.
2799 * aarch64-linux-nat.c: Update.
2800 * ada-tasks.c: Update.
2801 * aix-thread.c: Update.
2802 * amd64-linux-nat.c: Update.
2803 * arm-linux-nat.c: Update.
2804 * corelow.c: Update.
2805 * fbsd-nat.c: Update.
2806 * fbsd-tdep.c: Update.
2807 * gnu-nat.c: Update.
2808 * i386-cygwin-tdep.c: Update.
2809 * i386-gnu-nat.c: Update.
2810 * i386-linux-nat.c: Update.
2811 * ia64-linux-nat.c: Update.
2812 * inf-ptrace.c: Update.
2814 * linux-fork.c: Update.
2815 * linux-nat.c: Update.
2816 * linux-tdep.c: Update.
2817 * linux-thread-db.c: Update.
2818 * mips-linux-nat.c: Update.
2819 * nat/aarch64-linux-hw-point.c: Update.
2820 * nat/aarch64-linux.c: Update.
2821 * nat/linux-btrace.c: Update.
2822 * nat/linux-osdata.c: Update.
2823 * nat/linux-procfs.c: Update.
2824 * nat/x86-linux-dregs.c: Update.
2825 * obsd-nat.c: Update.
2826 * ppc-fbsd-nat.c: Update.
2827 * ppc-linux-nat.c: Update.
2829 * python/py-infthread.c: Update.
2830 * ravenscar-thread.c: Update.
2832 * s390-linux-nat.c: Update.
2833 * sol-thread.c: Update.
2834 * sol2-tdep.c: Update.
2835 * spu-linux-nat.c: Update.
2836 * x86-linux-nat.c: Update.
2837 * xtensa-linux-nat.c: Update.
2839 2018-07-03 Tom Tromey <tom@tromey.com>
2841 * common/ptid.c (ptid_get_pid): Remove.
2842 * common/ptid.h (ptid_get_pid): Don't declare.
2843 * aarch64-linux-nat.c: Update.
2844 * ada-lang.c: Update.
2845 * aix-thread.c: Update.
2846 * alpha-bsd-nat.c: Update.
2847 * amd64-fbsd-nat.c: Update.
2848 * amd64-linux-nat.c: Update.
2849 * arm-linux-nat.c: Update.
2850 * arm-nbsd-nat.c: Update.
2852 * break-catch-syscall.c: Update.
2853 * breakpoint.c: Update.
2854 * bsd-uthread.c: Update.
2855 * corelow.c: Update.
2857 * darwin-nat.c: Update.
2858 * fbsd-nat.c: Update.
2859 * fbsd-tdep.c: Update.
2861 * gnu-nat.c: Update.
2862 * hppa-nbsd-nat.c: Update.
2863 * hppa-obsd-nat.c: Update.
2864 * i386-fbsd-nat.c: Update.
2865 * ia64-linux-nat.c: Update.
2866 * inf-ptrace.c: Update.
2868 * inferior.c: Update.
2869 * inferior.h: Update.
2872 * linux-fork.c: Update.
2873 * linux-nat.c: Update.
2874 * linux-tdep.c: Update.
2875 * linux-thread-db.c: Update.
2876 * m68k-bsd-nat.c: Update.
2877 * mi/mi-interp.c: Update.
2878 * mi/mi-main.c: Update.
2879 * mips-linux-nat.c: Update.
2880 * mips-nbsd-nat.c: Update.
2881 * mips64-obsd-nat.c: Update.
2882 * nat/aarch64-linux-hw-point.c: Update.
2883 * nat/aarch64-linux.c: Update.
2884 * nat/linux-btrace.c: Update.
2885 * nat/linux-osdata.c: Update.
2886 * nat/linux-procfs.c: Update.
2887 * nat/x86-linux-dregs.c: Update.
2888 * nto-procfs.c: Update.
2889 * obsd-nat.c: Update.
2890 * ppc-linux-nat.c: Update.
2891 * ppc-nbsd-nat.c: Update.
2892 * ppc-obsd-nat.c: Update.
2893 * proc-service.c: Update.
2895 * python/py-inferior.c: Update.
2896 * python/py-infthread.c: Update.
2897 * ravenscar-thread.c: Update.
2899 * remote-sim.c: Update.
2901 * rs6000-nat.c: Update.
2902 * s390-linux-nat.c: Update.
2903 * sh-nbsd-nat.c: Update.
2904 * sol-thread.c: Update.
2905 * sparc-nat.c: Update.
2906 * sparc64-tdep.c: Update.
2907 * spu-linux-nat.c: Update.
2908 * spu-tdep.c: Update.
2909 * target-debug.h: Update.
2912 * tid-parse.c: Update.
2913 * tracefile-tfile.c: Update.
2914 * vax-bsd-nat.c: Update.
2915 * windows-nat.c: Update.
2916 * x86-linux-nat.c: Update.
2917 * x86-nat.c: Update.
2919 2018-07-03 Tom Tromey <tom@tromey.com>
2921 * common/ptid.c (pid_to_ptid): Remove.
2922 * common/ptid.h (pid_to_ptid): Don't declare.
2923 * aix-thread.c: Update.
2924 * arm-linux-nat.c: Update.
2925 * common/ptid.c: Update.
2926 * common/ptid.h: Update.
2927 * corelow.c: Update.
2929 * darwin-nat.c: Update.
2930 * fbsd-nat.c: Update.
2931 * fork-child.c: Update.
2932 * gnu-nat.c: Update.
2933 * go32-nat.c: Update.
2934 * inf-ptrace.c: Update.
2936 * inferior.c: Update.
2938 * linux-fork.c: Update.
2939 * linux-nat.c: Update.
2940 * nat/aarch64-linux-hw-point.c: Update.
2941 * nat/fork-inferior.c: Update.
2942 * nat/x86-linux-dregs.c: Update.
2943 * nto-procfs.c: Update.
2944 * obsd-nat.c: Update.
2946 * progspace.c: Update.
2948 * rs6000-nat.c: Update.
2949 * s390-linux-nat.c: Update.
2950 * sol-thread.c: Update.
2951 * spu-linux-nat.c: Update.
2954 * tracefile-tfile.c: Update.
2955 * windows-nat.c: Update.
2957 2018-07-03 Tom Tromey <tom@tromey.com>
2959 * common/ptid.h (ptid_build): Don't declare.
2960 * common/ptid.c (ptid_build): Remove.
2961 * aix-thread.c: Update.
2962 * bsd-kvm.c: Update.
2963 * bsd-uthread.c: Update.
2964 * common/agent.c: Update.
2965 * common/ptid.c: Update.
2966 * common/ptid.h: Update.
2967 * corelow.c: Update.
2968 * darwin-nat.c: Update.
2969 * fbsd-nat.c: Update.
2970 * gnu-nat.c: Update.
2971 * linux-fork.c: Update.
2972 * linux-nat.c: Update.
2973 * linux-thread-db.c: Update.
2974 * nat/linux-osdata.c: Update.
2975 * nat/linux-procfs.c: Update.
2976 * nto-procfs.c: Update.
2977 * obsd-nat.c: Update.
2978 * proc-service.c: Update.
2980 * ravenscar-thread.c: Update.
2981 * remote-sim.c: Update.
2983 * sol-thread.c: Update.
2985 * windows-nat.c: Update.
2987 2018-07-03 Tom Tromey <tom@tromey.com>
2989 * infrun.c (follow_exec): Use exit_inferior_silent.
2990 * inferior.c (exit_inferior_num_silent): Remove.
2991 * inferior.h (exit_inferior_num_silent): Don't declare.
2993 2018-07-03 Tom Tromey <tom@tromey.com>
2996 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2997 inferior_ptid on error.
2999 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3000 Simon Marchi <simon.marchi@polymtl.ca>
3003 * disasm.h (gdb_disassembler): Add
3004 `m_disassembler_options_holder'. member
3005 * disasm.c (get_all_disassembler_options): New function.
3006 (gdb_disassembler::gdb_disassembler): Use it.
3007 (gdb_buffered_insn_length_init_dis): Likewise.
3008 (gdb_buffered_insn_length): Adjust accordingly.
3009 (set_disassembler_options): Handle options with arguments.
3010 (show_disassembler_options_sfunc): Likewise. Add a leading new
3011 line if showing options with descriptions.
3012 (disassembler_options_completer): Adapt to using the
3013 `disasm_options_and_args_t' structure.
3014 * mips-tdep.c (mips_disassembler_options): New variable.
3015 (mips_disassembler_options_o32): Likewise.
3016 (mips_disassembler_options_n32): Likewise.
3017 (mips_disassembler_options_n64): Likewise.
3018 (gdb_print_insn_mips): Don't set `disassembler_options'.
3019 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3021 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3022 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3023 `gdbarch_disassembler_options_implicit' and
3024 `gdbarch_valid_disassembler_options'.
3025 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3026 `disasm_options_and_args_t' structure.
3027 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3029 (valid_disassembler_options): Switch from `disasm_options_t' to
3030 the `disasm_options_and_args_t' structure.
3031 * NEWS: Document `set disassembler-options' support for the MIPS
3033 * gdbarch.h: Regenerate.
3034 * gdbarch.c: Regenerate.
3036 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3038 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3040 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3042 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3043 parameter in call to amd64_target_description.
3044 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3045 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3046 (amd64fbsd_init_abi): Likewise.
3047 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3048 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3049 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3050 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3052 2018-06-29 Pedro Alves <palves@redhat.com>
3054 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3055 "segments" parameter.
3056 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3057 (_initialize_amd64_tdep): Update call to
3058 amd64_create_target_description.
3059 (amd64_target_description): Add "segments" parameter. Adjust
3060 the implementation to use it.
3061 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3062 call to amd64_create_target_description.
3063 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3064 * gdb/arch/amd64.h (amd64_create_target_description): Add
3065 "segments" register.
3066 * gdb/arch/amd64.c (amd64_create_target_description): Add
3067 "segments" parameter. Call create_feature_i386_64bit_segments
3068 only if SEGMENTS is true.
3069 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3070 call to amd64_create_target_description.
3072 2018-06-29 Pedro Alves <palves@redhat.com>
3074 * thread.c (thread_target_id_str): New, factored out from ...
3075 (print_thread_info_1): ... here. Use it to compute the max
3076 "Target Id" column width.
3078 2018-06-29 Pedro Alves <palves@redhat.com>
3080 * remote.c (remote_target::extra_thread_info): Delete
3081 'display_buf' and 'n' locals. from the cache, regardless of
3082 packet mechanims is in use. Use cache for qThreadExtra and qP
3085 2018-06-29 Pedro Alves <palves@redhat.com>
3087 * blockframe.c (find_pc_sect_containing_function): New function.
3088 * breakpoint.c (print_breakpoint_location): Don't call
3089 find_pc_sect_function.
3090 * linespec.c (create_sals_line_offset): Record the location's
3092 * linespec.c (convert_address_location_to_sals): Fill in sal's
3093 symbol with find_pc_sect_containing_function.
3094 * symtab.c (find_function_start_sal): Rename to ...
3095 (find_function_start_sal_1): ... this.
3096 (find_function_start_sal): Reimplement as wrapper around
3097 find_function_start_sal_1, and use
3098 find_pc_sect_containing_function to fill in the sal's symbol.
3099 (find_function_start_sal(symbol*, bool)): Adjust.
3100 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3102 (find_pc_sect_containing_function): Declare.
3104 2018-06-29 Pedro Alves <palves@redhat.com>
3106 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3107 true if the the location has no symbol.
3109 2018-06-28 Tom Tromey <tom@tromey.com>
3111 * NEWS: Mention --enable-codesign.
3112 * silent-rules.mk (ECHO_SIGN): New variable.
3113 * configure.ac: Add --enable-codesign.
3114 * configure: Rebuild.
3115 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3116 (gdb$(EXEEXT)): Optionally invoke codesign.
3118 2018-06-28 Pedro Alves <palves@redhat.com>
3120 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3122 (switch_to_thread_no_regs): Adjust comment.
3123 * infcmd.c (stop_pc): Delete.
3124 (post_create_inferior, info_program_command): Replace references
3125 to stop_pc with references to thread_info->suspend.stop_pc.
3126 * inferior.h (stop_pc): Delete declaration.
3127 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3128 (handle_inferior_event_1, handle_signal_stop)
3129 (process_event_stop_test, keep_going_stepped_thread)
3130 (handle_step_into_function, handle_step_into_function_backward)
3131 (print_stop_location): Replace references to stop_pc with
3132 references to thread_info->suspend.stop_pc.
3133 (struct infcall_suspend_state) <stop_pc>: Delete field.
3134 (save_infcall_suspend_state, restore_infcall_suspend_state):
3135 Remove references to inf_stat->stop_pc.
3136 * linux-fork.c (fork_load_infrun_state): Likewise.
3137 * record-btrace.c (record_btrace_set_replay): Likewise.
3138 * record-full.c (record_full_goto_entry): Likewise.
3139 * remote.c (print_one_stopped_thread): Likewise.
3140 * target.c (target_resume): Extend comment.
3141 * thread.c (set_executing_thread): New.
3142 (set_executing): Use it.
3143 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3144 Remove references to stop_pc.
3146 2018-06-28 Pedro Alves <palves@redhat.com>
3148 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3149 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3151 2018-06-28 Tom Tromey <tom@tromey.com>
3153 * coffread.c (coff_symfile_finish): Update.
3154 * xcoffread.c (xcoff_symfile_finish): Update.
3155 * elfread.c (elf_symfile_finish): Update.
3156 * symfile.h (dwarf2_free_objfile): Don't declare.
3157 * dwarf2read.c (_initialize_dwarf2_read): Use
3158 register_objfile_data_with_cleanup.
3159 (dwarf2_free_objfile): Now static. Change signature.
3161 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3163 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3164 option "-o" to add-symbol-file-load to add an offset to each
3165 section's load address.
3166 * symfile.c (set_objfile_default_section_offset): New function.
3168 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3170 * symfile.c (add_symbol_file_command): Make sure that sections
3171 with the same name are sorted in the same order.
3173 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3175 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3176 require the second argument. If omitted, load sections at the
3177 addresses specified in the file.
3179 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3181 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3182 (_initialize_symfile): Add option "-o" to symbol-file to add an
3183 offset to each section of the symbol file.
3185 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3187 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3189 2018-06-27 Tom Tromey <tom@tromey.com>
3191 * stack.c (_initialize_stack): Update "func" help text.
3193 2018-06-27 Tom Tromey <tom@tromey.com>
3195 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3197 (unwind_infopy_str, pyuw_create_unwind_info)
3198 (unwind_infopy_add_saved_register, pyuw_sniffer)
3199 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3201 (struct saved_reg): Add constructor.
3202 <value>: Now a gdbpy_ref<>.
3204 2018-06-27 Tom Tromey <tom@tromey.com>
3206 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3208 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3210 * gdb-gdb.py.in: Format using autopep8.
3212 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3214 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3215 (type_lookup_function): Recognize CORE_ADDR values.
3217 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3219 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3222 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3224 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3227 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3229 * gdb-gdb.py: Move to...
3230 * gdb-gdb.py.in: ... here.
3231 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3232 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3234 (distclean): Remove gdb-gdb.py when cleaning.
3235 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3236 * configure: Re-generate.
3238 2018-06-27 Pedro Alves <palves@redhat.com>
3240 * proc-service.c (get_ps_regcache): New.
3241 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3242 (ps_lsetfpregs): Use it.
3244 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3247 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3248 (dwarf_decode_lines_1): Adjust.
3250 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3252 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3254 <info_proc>: Likewise.
3256 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3258 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3259 to windows_fetch_one_register, and only handle the case of
3260 fetching one register. Move the code that reloads the context
3261 and iterates over all registers if R is negative to...
3262 (windows_nat_target::fetch_registers): ... here.
3263 (do_windows_store_inferior_registers): Rename to
3264 windows_store_one_register, and only handle the case of storing
3265 one register. Move the code that handles the case where r is
3267 (windows_nat_target::store_registers) ... here.
3269 2018-06-26 Tom Tromey <tom@tromey.com>
3272 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3273 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3275 (rust_internal_print_type): Add podata parameter.
3276 (rust_print_type): Update.
3278 2018-06-26 Tom Tromey <tom@tromey.com>
3280 * typeprint.h (struct print_offset_data) <update, finish,
3281 maybe_print_hole>: New methods.
3282 <indentation>: New constant.
3283 * typeprint.c (print_offset_data::indentation): Define.
3284 (print_offset_data::maybe_print_hole, print_offset_data::update)
3285 (print_offset_data::finish): Move from c-typeprint.c and rename.
3286 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3287 (print_spaces_filtered_with_print_options): Update.
3288 (c_print_type_union_field_offset, maybe_print_hole)
3289 (c_print_type_struct_field_offset): Move to typeprint.c and
3291 (c_type_print_base_struct_union): Update.
3293 2018-06-25 Pedro Alves <palves@redhat.com>
3295 * gdbthread.h (thread_info_ref, delete_thread)
3296 (delete_thread_silent, first_thread_of_inferior)
3297 (any_thread_of_inferior, switch_to_thread)
3298 (enable_thread_stack_temporaries)
3299 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3300 (get_last_thread_stack_temporary)
3301 (value_in_thread_stack_temporaries, can_access_registers_thread):
3302 Spell out "struct thread_info" instead of just "thread_info".
3303 * inferior.h (notice_new_inferior): Likewise.
3305 2018-06-25 Pedro Alves <palves@redhat.com>
3307 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3308 pass thread_info pointer to delete_thread.
3309 (windows_nat_target::detach): Pass inferior pointer to
3311 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3313 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3314 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3315 and pass a thread_info pointer to delete_thread.
3316 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3317 pass thread_info pointer to delete_thread.
3318 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3319 delete_thread_silent call.
3320 * procfs.c (procfs_target::detach): Pass inferior pointer to
3322 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3323 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3324 delete_thread_silent call.
3325 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3326 pass thread_info pointer to delete_thread.
3327 (windows_nat_target::detach): Pass inferior pointer to
3330 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3332 * regcache.c (readable_regcache::read_part): Fix asserts.
3333 (reg_buffer::raw_collect_part): New function.
3334 (regcache::write_part): Fix asserts.
3335 (reg_buffer::raw_supply_part): New function.
3336 (regcache::transfer_regset_register): New helper function.
3337 (regcache::transfer_regset): Call new functions.
3338 (regcache_supply_regset): Use gdb_byte*.
3339 (regcache::supply_regset): Likewise.
3340 (regcache_collect_regset): Likewise.
3341 (regcache::collect_regset): Likewise.
3342 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3343 (reg_buffer::raw_supply_part): Likewise.
3344 (regcache::transfer_regset_register): Likewise.
3345 (regcache::transfer_regset): Use gdb_byte*.
3347 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3349 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3351 2018-06-21 Pedro Alves <palves@redhat.com>
3353 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3354 instead of a ptid_t. All callers adjusted.
3355 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3357 (print_ada_task_info, display_current_task_id, task_command_1):
3359 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3361 (breakpoint_kind): Adjust.
3362 (remove_breakpoints_pid): Rename to ...
3363 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3364 pointer. All callers adjusted.
3365 (bpstat_clear_actions): Use inferior_thread.
3366 (get_bpstat_thread): New.
3367 (bpstat_do_actions): Use it.
3368 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3369 to take a thread_info pointer. All callers adjusted.
3370 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3371 (breakpoint_re_set_thread): Use inferior_thread.
3372 * breakpoint.h (struct inferior): Forward declare.
3373 (bpstat_stop_status): Update.
3374 (remove_breakpoints_pid): Delete.
3375 (remove_breakpoints_inf): New.
3376 * bsd-uthread.c (bsd_uthread_target::wait)
3377 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3378 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3379 (maint_btrace_packet_history_cmd)
3380 (maint_btrace_clear_packet_history_cmd): Adjust.
3381 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3383 * cli/cli-interp.c: Include "inferior.h".
3384 * common/refcounted-object.h (struct
3385 refcounted_object_ref_policy): New.
3386 * compile/compile-object-load.c: Include gdbthread.h.
3387 (store_regs): Use inferior_thread.
3388 * corelow.c (core_target::close): Use current_inferior.
3389 (core_target_open): Adjust to use first_thread_of_inferior and use
3390 the current inferior.
3391 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3392 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3393 <thread>: ... this new field. All references adjusted.
3394 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3395 Take a thread_info pointer instead of a ptid_t.
3396 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3397 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3398 thread_info pointer instead of a ptid_t.
3399 * elfread.c: Include "inferior.h".
3400 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3401 Use inferior_thread.
3402 * eval.c (evaluate_subexp): Likewise.
3403 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3405 * gdb_proc_service.h (struct thread_info): Forward declare.
3406 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3407 <thread>: ... this new field. All references adjusted.
3408 * gdbarch.h, gdbarch.c: Regenerate.
3409 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3410 'thread' parameter. All implementations and callers adjusted.
3411 * gdbthread.h (thread_info) <set_running>: New method.
3412 (delete_thread, delete_thread_silent): Take a thread_info pointer
3414 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3415 (first_thread_of_process): Delete, replaced by ...
3416 (first_thread_of_inferior): ... this new function. All callers
3418 (any_live_thread_of_process): Delete, replaced by ...
3419 (any_live_thread_of_inferior): ... this new function. All callers
3421 (switch_to_thread, switch_to_no_thread): Declare.
3422 (is_executing): Delete.
3423 (enable_thread_stack_temporaries): Update comment.
3424 <enable_thread_stack_temporaries>: Take a thread_info pointer
3425 instead of a ptid_t. Incref the thread.
3426 <~enable_thread_stack_temporaries>: Decref the thread.
3429 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3430 (get_last_thread_stack_temporary)
3431 (value_in_thread_stack_temporaries, can_access_registers_thread):
3432 Take a thread_info pointer instead of a ptid_t. All callers
3434 * infcall.c (get_call_return_value): Use inferior_thread.
3435 (run_inferior_call): Work with thread pointers instead of ptid_t.
3436 (call_function_by_hand_dummy): Work with thread pointers instead
3437 of ptid_t. Use thread_info_ref.
3438 * infcmd.c (proceed_thread_callback): Access thread's state
3440 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3441 access thread's state directly.
3442 (continue_command): Use inferior_thread.
3443 (info_program_command): Use find_thread_ptid and access thread
3445 (proceed_after_attach_callback): Use thread state directly.
3446 (notice_new_inferior): Take a thread_info pointer instead of a
3447 ptid_t. All callers adjusted.
3448 (exit_inferior): Take an inferior pointer instead of a pid. All
3450 (exit_inferior_silent): New.
3451 (detach_inferior): Delete.
3452 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3453 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3454 (detach_inferior_command, kill_inferior_command): Use
3455 find_inferior_id instead of valid_gdb_inferior_id and
3456 gdb_inferior_id_to_pid.
3457 (inferior_command): Use inferior and thread pointers.
3458 * inferior.h (struct thread_info): Forward declare.
3459 (notice_new_inferior): Take a thread_info pointer instead of a
3460 ptid_t. All callers adjusted.
3461 (detach_inferior): Delete declaration.
3462 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3463 instead of a pid. All callers adjusted.
3464 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3465 (valid_gdb_inferior_id): Delete.
3466 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3467 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3468 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3470 <inf>: ... this new field.
3471 <step_ptid>: Delete, replaced by ...
3472 <step_thread>: ... this new field.
3473 (get_displaced_stepping_state): Take an inferior pointer instead
3474 of a pid. All callers adjusted.
3475 (displaced_step_in_progress_any_inferior): Adjust.
3476 (displaced_step_in_progress_thread): Take a thread pointer instead
3477 of a ptid_t. All callers adjusted.
3478 (displaced_step_in_progress, add_displaced_stepping_state): Take
3479 an inferior pointer instead of a pid. All callers adjusted.
3480 (get_displaced_step_closure_by_addr): Adjust.
3481 (remove_displaced_stepping_state): Take an inferior pointer
3482 instead of a pid. All callers adjusted.
3483 (displaced_step_prepare_throw, displaced_step_prepare)
3484 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3485 All callers adjusted.
3486 (start_step_over): Adjust.
3487 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3488 displaced step queue.
3489 (do_target_resume): Adjust.
3490 (fetch_inferior_event): Use inferior_thread.
3491 (context_switch, get_inferior_stop_soon): Take an
3492 execution_control_state pointer instead of a ptid_t. All callers
3494 (switch_to_thread_cleanup): Delete.
3495 (stop_all_threads): Use scoped_restore_current_thread.
3496 * inline-frame.c: Include "gdbthread.h".
3497 (inline_state) <inline_state>: Take a thread pointer instead of a
3498 ptid_t. All callers adjusted.
3499 <ptid>: Delete, replaced by ...
3500 <thread>: ... this new field.
3501 (find_inline_frame_state): Take a thread pointer instead of a
3502 ptid_t. All callers adjusted.
3503 (skip_inline_frames, step_into_inline_frame)
3504 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3505 pointer instead of a ptid_t. All callers adjusted.
3506 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3507 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3508 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3510 * linux-nat.c (get_detach_signal): Likewise.
3511 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3512 (thread_db_notice_clone): Adjust.
3513 (thread_db_find_new_threads_silently)
3514 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3515 a thread pointer instead of a ptid_t. All callers adjusted.
3516 * mi/mi-cmd-var.c: Include "inferior.h".
3517 (mi_cmd_var_update_iter): Update to use thread pointers.
3518 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3520 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3522 (mi_output_running): ... this new function.
3523 (mi_on_resume_1): Adjust to use it.
3524 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3525 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3527 (interrupt_thread_callback): : Adjust to use thread and inferior
3529 * proc-service.c: Include "gdbthread.h".
3530 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3531 * progspace-and-thread.c: Include "inferior.h".
3532 * progspace.c: Include "inferior.h".
3533 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3534 hold a reference to an inferior_object.
3535 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3537 * python/py-inferior.c (struct inferior_object): Give the type a
3538 tag name instead of a typedef.
3539 (python_on_normal_stop): No need to check if the current thread is
3541 (inferior_to_inferior_object): Change return type to
3542 inferior_object. All callers adjusted.
3543 (find_thread_object): Delete, bits factored out to ...
3544 (thread_to_thread_object): ... this new function.
3545 * python/py-infthread.c (create_thread_object): Use
3546 inferior_to_inferior_object.
3547 (thpy_is_stopped): Use thread pointer directly.
3548 (gdbpy_selected_thread): Use inferior_thread.
3549 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3550 field, replaced with ...
3551 <thread>: ... this new field. All users adjusted.
3552 (btpy_insn_or_gap_new): Drop const.
3553 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3555 * python/py-record.c: Include "gdbthread.h".
3556 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3557 a ptid_t. All callers adjusted.
3558 (gdbpy_current_recording): Use inferior_thread.
3559 * python/py-record.h (recpy_record_object) <ptid>: Delete
3560 field, replaced with ...
3561 <thread>: ... this new field. All users adjusted.
3562 (recpy_element_object) <ptid>: Delete
3563 field, replaced with ...
3564 <thread>: ... this new field. All users adjusted.
3565 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3566 a ptid_t. All callers adjusted.
3567 * python/py-threadevent.c: Include "gdbthread.h".
3568 (get_event_thread): Use thread_to_thread_object.
3569 * python/python-internal.h (struct inferior_object): Forward
3571 (find_thread_object, find_inferior_object): Delete declarations.
3572 (thread_to_thread_object, inferior_to_inferior_object): New
3574 * record-btrace.c: Include "inferior.h".
3575 (require_btrace_thread): Use inferior_thread.
3576 (record_btrace_frame_sniffer)
3577 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3578 (get_thread_current_frame): Use scoped_restore_current_thread and
3580 (get_thread_current_frame): Use thread pointer directly.
3581 (record_btrace_replay_at_breakpoint): Use thread's inferior
3583 * record-full.c: Include "inferior.h".
3584 * regcache.c: Include "gdbthread.h".
3585 (get_thread_arch_regcache): Use the inferior's address space
3587 (get_thread_regcache, registers_changed_thread): New.
3588 * regcache.h (get_thread_regcache(thread_info *thread)): New
3590 (registers_changed_thread): New.
3591 (remote_target) <remote_detach_1>: Swap order of parameters.
3592 (remote_add_thread): <remote_add_thread>: Return the new thread.
3593 (get_remote_thread_info(ptid_t)): New overload.
3594 (remote_target::remote_notice_new_inferior): Use thread pointers
3596 (remote_target::process_initial_stop_replies): Use
3597 thread_info::set_running.
3598 (remote_target::remote_detach_1, remote_target::detach)
3599 (extended_remote_target::detach): Adjust.
3600 * stack.c (frame_show_address): Use inferior_thread.
3601 * target-debug.h (target_debug_print_thread_info_pp): New.
3602 * target-delegates.c: Regenerate.
3603 * target.c (default_thread_address_space): Delete.
3604 (memory_xfer_partial_1): Use current_inferior.
3605 (target_detach): Use current_inferior.
3606 (target_thread_address_space): Delete.
3607 (generic_mourn_inferior): Use current_inferior.
3608 * target.h (struct target_ops) <thread_address_space>: Delete.
3609 (target_thread_address_space): Delete.
3610 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3612 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3613 thread pointer instead of a ptid_t. Adjust all callers.
3614 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3615 (first_thread_of_process): Delete, replaced by ...
3616 (first_thread_of_inferior): ... this new function. All callers
3618 (any_thread_of_process): Rename to ...
3619 (any_thread_of_inferior): ... this, and take an inferior pointer.
3620 (any_live_thread_of_process): Rename to ...
3621 (any_live_thread_of_inferior): ... this, and take an inferior
3623 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3624 (value_in_thread_stack_temporaries)
3625 (get_last_thread_stack_temporary): Take a thread pointer instead
3626 of a ptid_t. Adjust all callers.
3627 (thread_info::set_running): New.
3628 (validate_registers_access): Use inferior_thread.
3629 (can_access_registers_ptid): Rename to ...
3630 (can_access_registers_thread): ... this, and take a thread
3632 (print_thread_info_1): Adjust to compare thread pointers instead
3634 (switch_to_no_thread, switch_to_thread): Make extern.
3635 (scoped_restore_current_thread::~scoped_restore_current_thread):
3636 Use m_thread pointer directly.
3637 (scoped_restore_current_thread::scoped_restore_current_thread):
3638 Use inferior_thread.
3639 (thread_command): Use thread pointer directly.
3640 (thread_num_make_value_helper): Use inferior_thread.
3641 * top.c (execute_command): Use inferior_thread.
3642 * tui/tui-interp.c: Include "inferior.h".
3643 * varobj.c (varobj_create): Use inferior_thread.
3644 (value_of_root_1): Use find_thread_global_id instead of
3645 global_thread_id_to_ptid.
3647 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3649 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3651 (regcache::write_part): Likewise.
3652 (readable_regcache::cooked_read_part): Update comment.
3653 (readable_regcache::cooked_write_part): Likewise.
3654 * regcache.h: (readable_regcache::read_part): Likewise.
3655 (regcache::write_part): Likewise.
3657 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3658 Dirk Schubert <dirk.schubert@arm.com>
3660 * aarch64-linux-nat.c (post_attach): New.
3661 (aarch64_linux_nat_target::post_attach): Override post_attach to
3662 record the number of hardware debug registers.
3664 2018-06-20 Tom Tromey <tom@tromey.com>
3666 * python/py-param.c (add_setshow_generic): Make parameters const.
3667 (parmpy_init): Update.
3669 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3671 * regcache.h (regcache_cooked_read_ftype): Rename to...
3672 (register_read_ftype): ...this, change type to function_view.
3673 (class reg_buffer) <save>: Remove src parameter.
3674 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3675 parameter non-const in first overload. Remove src parameter in
3677 * regcache.c (do_cooked_read): Remove.
3678 (readonly_detached_regcache::readonly_detached_regcache): Make
3679 parameter non-const, adjust call to other constructor.
3680 (reg_buffer::save): Remove src parameter.
3681 * frame.c (do_frame_register_read): Remove.
3682 (frame_save_as_regcache): Use lambda function.
3683 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3684 parameter to ppu2spu_data *.
3685 (ppu2spu_sniffer): Use lambda function.
3687 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3689 * record-full.c (record_full_target::insert_breakpoint): Remove
3690 "struct" keyword, add const.
3692 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3694 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3695 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3696 * configure.ac: Remove AC_PREREQ, add missing quoting.
3697 * gnulib/configure.ac: Modernize usage of
3698 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3699 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3700 (AUTOMAKE_VERSION): Bump to 1.15.1.
3701 * configure: Re-generate.
3702 * config.in: Re-generate.
3703 * aclocal.m4: Re-generate.
3704 * gnulib/aclocal.m4: Re-generate.
3705 * gnulib/config.in: Re-generate.
3706 * gnulib/configure: Re-generate.
3707 * gnulib/import/Makefile.in: Re-generate.
3709 2018-06-19 Pedro Alves <palves@redhat.com>
3711 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3712 (lookup_minimal_symbol_by_pc_section): ... here with
3713 gdb_assert_not_reached added.
3715 2018-06-19 Pedro Alves <palves@redhat.com>
3717 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3718 parameter with a block parameter. Compare location's block symbol
3719 with the frame's block instead of addresses.
3720 (skip_inline_frames): Pass the current block instead of the
3721 frame's address. Break out as soon as we determine the frame
3722 should not be skipped.
3724 2018-06-18 Tom Tromey <tom@tromey.com>
3726 * solib-aix.c (solib_aix_get_section_offsets): Return
3728 (solib_aix_solib_create_inferior_hook): Update.
3730 2018-06-18 Tom Tromey <tom@tromey.com>
3732 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3734 2018-06-18 Tom Tromey <tom@tromey.com>
3736 * solib-frv.c (frv_relocate_main_executable): Use
3738 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3741 2018-06-18 Tom Tromey <tom@tromey.com>
3743 * objfiles.h (inhibit_section_map_updates): Update.
3744 (resume_section_map_updates, resume_section_map_updates_cleanup):
3746 * solib-svr4.c (svr4_handle_solib_event): Update.
3747 * objfiles.c (inhibit_section_map_updates): Return
3748 scoped_restore_tmpl<int>.
3749 (resume_section_map_updates, resume_section_map_updates_cleanup):
3752 2018-06-18 Tom Tromey <tom@tromey.com>
3754 * valprint.h (read_string): Update.
3755 * valprint.c (read_string): Change type of "buffer".
3756 (val_print_string): Update.
3757 * python/py-value.c (valpy_string): Update.
3758 * language.h (struct language_defn) <la_get_string>: Change
3760 (default_get_string, c_get_string): Update.
3761 * language.c (default_get_string): Change type of "buffer".
3762 * guile/scm-value.c (gdbscm_value_to_string): Update.
3763 * c-lang.c (c_get_string): Change type of "buffer".
3765 2018-06-18 Tom Tromey <tom@tromey.com>
3767 * ser-mingw.c (struct pipe_state_destroyer): New.
3768 (pipe_state_up): New typedef.
3769 (cleanup_pipe_state): Remove.
3770 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3772 2018-06-18 Tom Tromey <tom@tromey.com>
3774 * rust-lang.h (rust_yyerror): Don't declare.
3775 * rust-lang.c (rust_language_defn): Update.
3776 * rust-exp.y (yyerror): Now static.
3777 * parse.c (parse_exp_in_context_1): Update.
3778 * p-lang.h (p_yyerror): Don't declare.
3779 * p-lang.c (p_language_defn): Update.
3780 * p-exp.y (yyerror): Now static.
3781 * opencl-lang.c (opencl_language_defn): Update.
3782 * objc-lang.c (objc_language_defn): Update.
3783 * m2-lang.h (m2_yyerror): Don't declare.
3784 * m2-lang.c (m2_language_defn): Update.
3785 * m2-exp.y (yyerror): Now static.
3786 * language.h (struct language_defn) <la_error>: Remove.
3787 * language.c (unk_lang_error): Remove.
3788 (unknown_language_defn, auto_language_defn): Remove.
3789 * go-lang.h (go_yyerror): Don't declare.
3790 * go-lang.c (go_language_defn): Update.
3791 * go-exp.y (yyerror): Now static.
3792 * f-lang.h (f_yyerror): Don't declare.
3793 * f-lang.c (f_language_defn): Update.
3794 * f-exp.y (yyerror): Now static.
3795 * d-lang.h (d_yyerror): Don't declare.
3796 * d-lang.c (d_language_defn): Update.
3797 * d-exp.y (yyerror): Now static.
3798 * c-lang.h (c_yyerror): Don't declare.
3799 * c-lang.c (c_language_defn, cplus_language_defn)
3800 (asm_language_defn, minimal_language_defn): Update.
3801 * c-exp.y (yyerror): Now static.
3802 * ada-lang.h (ada_yyerror): Don't declare.
3803 * ada-lang.c (ada_language_defn): Update.
3804 * ada-exp.y (yyerror): Now static.
3806 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3808 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3809 (store_sveregs_to_thread): Likewise.
3810 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3811 (aarch64_linux_store_inferior_registers): Likewise.
3812 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3814 (aarch64_sve_regs_copy_to_regcache): Likewise.
3815 (aarch64_sve_regs_copy_from_regcache): Likewise.
3816 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3818 (aarch64_sve_regs_copy_to_regcache): Likewise.
3819 (aarch64_sve_regs_copy_from_regcache): Likewise.
3820 (sve_context): Structure from Linux headers.
3821 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3822 (SVE_SIG_ZREG_SIZE): Likewise.
3823 (SVE_SIG_PREG_SIZE): Likewise.
3824 (SVE_SIG_FFR_SIZE): Likewise.
3825 (SVE_SIG_REGS_OFFSET): Likewise.
3826 (SVE_SIG_ZREGS_OFFSET): Likewise.
3827 (SVE_SIG_ZREG_OFFSET): Likewise.
3828 (SVE_SIG_ZREGS_SIZE): Likewise.
3829 (SVE_SIG_PREGS_OFFSET): Likewise.
3830 (SVE_SIG_PREG_OFFSET): Likewise.
3831 (SVE_SIG_PREGS_SIZE): Likewise.
3832 (SVE_SIG_FFR_OFFSET): Likewise.
3833 (SVE_SIG_REGS_SIZE): Likewise.
3834 (SVE_SIG_CONTEXT_SIZE): Likewise.
3835 (SVE_PT_REGS_MASK): Likewise.
3836 (SVE_PT_REGS_FPSIMD): Likewise.
3837 (SVE_PT_REGS_SVE): Likewise.
3838 (SVE_PT_VL_INHERIT): Likewise.
3839 (SVE_PT_VL_ONEXEC): Likewise.
3840 (SVE_PT_REGS_OFFSET): Likewise.
3841 (SVE_PT_FPSIMD_OFFSET): Likewise.
3842 (SVE_PT_FPSIMD_SIZE): Likewise.
3843 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3844 (SVE_PT_SVE_PREG_SIZE): Likewise.
3845 (SVE_PT_SVE_FFR_SIZE): Likewise.
3846 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3847 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3848 (__SVE_SIG_TO_PT): Likewise.
3849 (SVE_PT_SVE_OFFSET): Likewise.
3850 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3851 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3852 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3853 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3854 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3855 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3856 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3857 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3858 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3859 (SVE_PT_SVE_SIZE): Likewise.
3860 (SVE_PT_SIZE): Likewise.
3861 (HAS_SVE_STATE): New define.
3863 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3865 * nat/aarch64-sve-linux-sigcontext.h: New file.
3866 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3868 (SVE_VQ_MIN): Likewise.
3869 (SVE_VQ_MAX): Likewise.
3870 (SVE_VL_MIN): Likewise.
3871 (SVE_VL_MAX): Likewise.
3872 (SVE_NUM_ZREGS): Likewise.
3873 (SVE_NUM_PREGS): Likewise.
3874 (sve_vl_valid): Likewise.
3875 (struct user_sve_header): Likewise.
3877 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3878 Richard Bunt <Richard.Bunt@arm.com>
3880 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3881 was requested by GDB.
3883 2018-06-15 Tom de Vries <tdevries@suse.de>
3885 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3887 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3889 * gnulib/update-gnulib.sh: Print expected versions of
3892 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3894 * arch-utils.c (default_type_align): Use type_length_units.
3895 * gdbtypes.c (type_align): Use type_length_units.
3897 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3899 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3900 of 'define' command.
3902 2018-06-14 Tom de Vries <tdevries@suse.de>
3905 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3906 get_no_prettyformat_print_options.
3908 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3910 * sparc-nat.h: Include target.h.
3911 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3912 <fetch_registers>: Remove this argument in function call.
3913 <store_registers>: Remove this argument in function call, remove
3915 <low_forget_process>: Call sparc64_forget_process instead of
3916 sparc_forget_process.
3918 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3920 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3921 (procfs_target::make_corefile_notes): Adjust to new
3922 target_read_alloc return type.
3924 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3925 Stephen Roberts <stephen.roberts@arm.com>
3928 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3929 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3930 Move should_notify_stop local into more inner scope.
3932 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3933 Stephen Roberts <stephen.roberts@arm.com>
3936 * infrun.c (resume_1): Add call to mark_async_event_handler.
3938 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3940 * infrun.c (do_target_wait): Change old version of $pc printed.
3942 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3944 * dwarf2read.c (read_index_from_section): Rename to...
3945 (read_gdb_index_from_section): ... this, update all callers.
3946 (dwarf2_read_index): Rename to...
3947 (dwarf2_read_gdb_index): ... this, update all callers.
3949 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3951 * gdb/hppa-linux-nat.c
3952 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3953 hppa_linux_nat_target::fetch_registers.
3955 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3957 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3958 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3959 (AARCH64_DWARF_SVE_FFR): Likewise.
3960 (AARCH64_DWARF_SVE_P0): Likewise.
3961 (AARCH64_DWARF_SVE_Z0): Likewise.
3963 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3965 * common/common-regcache.h (raw_compare): New function.
3966 * regcache.c (regcache::raw_compare): Likewise.
3967 * regcache.h (regcache::raw_compare): New declaration.
3969 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3971 * common/common-regcache.h (reg_buffer_common): New structure.
3972 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3973 (reg_buffer::raw_supply): Likewise.
3974 (reg_buffer::raw_supply_integer): Likewise.
3975 (reg_buffer::raw_supply_zeroed): Likewise.
3976 (reg_buffer::raw_collect): Likewise.
3977 (reg_buffer::raw_collect_integer): Likewise.
3978 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3979 (reg_buffer::raw_supply): Likewise.
3980 (reg_buffer::raw_supply_integer): Likewise.
3981 (reg_buffer::raw_supply_zeroed): Likewise.
3982 (reg_buffer::raw_collect): Likewise.
3983 (reg_buffer::raw_collect_integer): Likewise.
3985 2018-06-10 Tom Tromey <tom@tromey.com>
3987 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3988 (class remote_state) <stop_reply_queue>: Now std::vector.
3989 (remote_state::~remote_state)
3990 (remote_target::stop_reply_queue_length): Update.
3991 (struct queue_iter_param, remove_child_of_pending_fork)
3992 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3993 (check_pending_event_prevents_wildcard_vcont_callback)
3994 (remove_stop_reply_for_inferior)
3995 (remove_stop_reply_of_remote_state)
3996 (remote_notif_remove_once_on_match)
3997 (stop_reply_match_ptid_and_ws)
3998 (remote_kill_child_of_pending_fork): Remove.
3999 (remote_target::remove_new_fork_children)
4000 (remote_target::check_pending_events_prevent_wildcard_vcont)
4001 (remote_target::discard_pending_stop_replies)
4002 (remote_target::discard_pending_stop_replies_in_queue)
4003 (remote_target::remote_notif_remove_queued_reply)
4004 (remote_target::queued_stop_reply)
4005 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4006 (remote_target::wait, remote_target::kill_new_fork_children)
4007 (remote_target::async): Update.
4009 2018-06-10 Tom Tromey <tom@tromey.com>
4011 * record-full.c (record_full_arch_list_cleanups): Remove.
4012 (record_full_message): Use try/catch.
4013 (record_full_wait_cleanups): Remove.
4014 (record_full_wait_1): Use try/catch.
4015 (record_full_restore): Likewise.
4017 2018-06-10 Tom Tromey <tom@tromey.com>
4019 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4020 declare VEC. Add constructor.
4021 <in_target_beneath>: Now bool.
4022 (record_full_breakpoints): Now a std::vector, static.
4023 (record_full_sync_record_breakpoints)
4024 (record_full_init_record_breakpoints)
4025 (record_full_target::insert_breakpoint)
4026 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4028 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4030 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4031 * serial.c (serial_interface_lookup): Remove struct keyword.
4033 2018-06-10 Tom Tromey <tom@tromey.com>
4035 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4037 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4039 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4041 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4042 "beneath" as a method.
4043 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4044 Use "beneath" as a method.
4046 2018-06-10 Tom Tromey <tom@tromey.com>
4048 * tracefile.c (struct trace_file_writer_deleter): New.
4049 <operator()>: Rename from trace_file_writer_xfree.
4050 (trace_file_writer_up): New typedef.
4051 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4053 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4055 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4056 <m_registers, m_register_status>: Change type to
4058 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4061 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4063 * common/common-regcache.h (enum register_status): Add
4064 underlying type "signed char".
4065 * regcache.h (reg_buffer) <m_register_status>: Change type to
4067 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4068 register_status instead of signed char.
4069 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4070 (reg_buffer::get_register_status): Remove cast.
4071 (readable_regcache::raw_read): Remove cast.
4072 (readable_regcache::cooked_read): Remove cast.
4074 2018-06-09 Tom Tromey <tom@tromey.com>
4076 * source.c (reverse_search_command, forward_search_command): Use
4079 2018-06-09 Tom Tromey <tom@tromey.com>
4081 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4082 (serial_ops_list): Now static, std::vector.
4083 (serial_interface_lookup, serial_add_interface): Update.
4085 2018-06-09 Tom Tromey <tom@tromey.com>
4087 * dwarf2read.c (process_cu_includes): Update.
4088 (process_full_comp_unit): Update.
4089 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4092 2018-06-08 Paul Koning <paul_koning@dell.com>
4096 * python/python.c (do_start_initialization):
4097 Avoid call to internal Python API.
4098 (init__gdb_module): New function.
4100 2018-06-08 Gary Benson <gbenson@redhat.com>
4102 * linux-thread-db.c (valprint.h): New include.
4103 (struct check_thread_db_info): New structure.
4104 (check_thread_db_on_load, tdb_testinfo): New static globals.
4105 (check_thread_db, check_thread_db_callback): New functions.
4106 (try_thread_db_load_1): Run integrity checks if requested.
4107 (maintenance_check_libthread_db): New function.
4108 (_initialize_thread_db): Register "maint check libthread-db"
4109 and "maint set/show check-libthread-db".
4110 * NEWS: Mention the above new commands.
4112 2018-06-08 Tom Tromey <tom@tromey.com>
4114 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4117 2018-06-08 Tom Tromey <tom@tromey.com>
4119 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4121 2018-06-08 Tom Tromey <tom@tromey.com>
4123 * common/btrace-common.h (struct btrace_data): Add constructor,
4124 destructor, move assignment operator.
4125 <empty, clear, fini>: New methods.
4126 <format>: Initialize.
4127 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4128 (btrace_data_empty): Don't declare.
4129 * common/btrace-common.c (btrace_data_init): Remove.
4130 (btrace_data::fini): Rename from btrace_data_fini.
4131 (btrace_data::empty): Rename from btrace_data_empty.
4132 (btrace_data::clear): Rename from btrace_data_clear. Return
4134 * btrace.h (make_cleanup_btrace_data): Don't declare.
4135 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4136 (parse_xml_btrace): Update.
4137 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4138 (maint_btrace_clear_packet_history_cmd): Update.
4140 2018-06-07 Pedro Alves <palves@redhat.com>
4142 * target.h (target_ops) <beneath>: Now a method. All references
4144 (class target_stack): New.
4145 * target.c (g_target_stack): New.
4146 (g_current_top_target): Delete.
4147 (current_top_target): Get the top target out of g_target_stack.
4148 (target_stack::push, target_stack::unpush): New.
4149 (push_target, unpush_target): Reimplement.
4150 (target_is_pushed): Reimplement in terms of g_target_stack.
4151 (target_ops::beneath, target_stack::find_beneath): New.
4153 2018-06-07 Pedro Alves <palves@redhat.com>
4155 * target.h (find_target_beneath): Delete declaration.
4156 * target.c (find_target_beneath): Delete definition.
4157 * aix-thread.c: All callers of find_target_beneath adjusted to
4158 call target_ops::beneath instead.
4159 * bsd-uthread.c: Likewise.
4160 * linux-thread-db.c: Likewise.
4161 * ravenscar-thread.c: Likewise.
4162 * sol-thread.c: Likewise.
4163 * spu-multiarch.c: Likewise.
4165 2018-06-07 Pedro Alves <palves@redhat.com>
4167 * target.h (target_ops) <beneath>: Now a method. All references
4169 (target_ops) <m_beneath>: New.
4170 * target.c (target_ops::beneath): New.
4171 * corelow.c: Adjust all references to target_ops::beneath.
4172 * linux-thread-db.c: Likewise.
4173 * make-target-delegates: Likewise.
4174 * record-btrace.c: Likewise.
4175 * record-full.c: Likewise.
4176 * remote.c: Likewise.
4177 * target.c: Likewise.
4178 * target-delegates.c: Regenerate.
4180 2018-06-07 Pedro Alves <palves@redhat.com>
4182 * target.h (target_stack): Delete.
4183 (current_top_target): Declare function.
4184 * target.c (target_stack): Delete.
4185 (g_current_top_target): New.
4186 (current_top_target): New function.
4187 * auxv.c: Use current_top_target instead of target_stack
4189 * avr-tdep.c: Likewise.
4190 * breakpoint.c: Likewise.
4191 * corefile.c: Likewise.
4192 * elfread.c: Likewise.
4194 * exceptions.c: Likewise.
4195 * frame.c: Likewise.
4196 * gdbarch-selftests.c: Likewise.
4197 * gnu-v3-abi.c: Likewise.
4198 * ia64-tdep.c: Likewise.
4199 * ia64-vms-tdep.c: Likewise.
4200 * infcall.c: Likewise.
4201 * infcmd.c: Likewise.
4202 * infrun.c: Likewise.
4203 * linespec.c: Likewise.
4204 * linux-tdep.c: Likewise.
4205 * minsyms.c: Likewise.
4206 * ppc-linux-nat.c: Likewise.
4207 * ppc-linux-tdep.c: Likewise.
4208 * procfs.c: Likewise.
4209 * regcache.c: Likewise.
4210 * remote.c: Likewise.
4211 * rs6000-tdep.c: Likewise.
4212 * s390-linux-nat.c: Likewise.
4213 * s390-tdep.c: Likewise.
4214 * solib-aix.c: Likewise.
4215 * solib-darwin.c: Likewise.
4216 * solib-dsbt.c: Likewise.
4217 * solib-spu.c: Likewise.
4218 * solib-svr4.c: Likewise.
4219 * solib-target.c: Likewise.
4220 * sparc-tdep.c: Likewise.
4221 * sparc64-tdep.c: Likewise.
4222 * spu-tdep.c: Likewise.
4223 * symfile.c: Likewise.
4224 * symtab.c: Likewise.
4225 * target-descriptions.c: Likewise.
4226 * target-memory.c: Likewise.
4227 * target.c: Likewise.
4228 * target.h: Likewise.
4229 * tracefile-tfile.c: Likewise.
4230 * tracepoint.c: Likewise.
4231 * valops.c: Likewise.
4232 * valprint.c: Likewise.
4233 * value.c: Likewise.
4234 * windows-tdep.c: Likewise.
4235 * mi/mi-main.c: Likewise.
4237 2018-06-07 Tom Tromey <tom@tromey.com>
4239 * valprint.h (build_address_symbolic): Declare.
4240 * printcmd.c (print_address_symbolic): Update.
4241 (build_address_symbolic): Change "name" and "filename" to
4243 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4245 * defs.h (build_address_symbolic): Remove declaration.
4247 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4249 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4250 (aarch64_vnv_type): Add function.
4251 (aarch64_pseudo_register_name): Add V regs for SVE.
4252 (aarch64_pseudo_register_type): Likewise.
4253 (aarch64_pseudo_register_reggroup_p): Likewise.
4254 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4255 (aarch64_pseudo_read_value): Add V regs for SVE.
4256 (aarch64_pseudo_write_2): Use V0 offset for SVE
4257 (aarch64_pseudo_write): Add V regs for SVE.
4258 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4260 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4262 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4263 (sve_vl_from_vq): Likewise.
4265 2018-06-05 Tom Tromey <tom@tromey.com>
4267 * cli/cli-cmds.c (show_version): Update.
4268 * top.c (print_gdb_version): Add "interactive" parameter.
4270 * main.c (captured_main_1): Update.
4271 * top.h (print_gdb_version): Add "interactive" parameter and a
4274 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4276 * common/enum-flags.h: Add trailing semicolon to example in
4279 2018-06-05 Tom Tromey <tom@tromey.com>
4282 * NEWS: Add entry about pager.
4283 * utils.c (pagination_disabled_for_command): New global.
4284 (prompt_for_continue): Allow "c" response to prompt.
4285 (reinitialize_more_filter): Clear
4286 pagination_disabled_for_command.
4287 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4289 2018-06-04 Tom Tromey <tom@tromey.com>
4291 * ada-lang.h (ada_lookup_symbol_list): Update.
4292 * ada-lang.c (resolve_subexp): Update.
4293 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4295 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4296 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4297 results parameter to std::vector.
4298 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4300 * ada-exp.y (block_lookup): Update.
4301 (select_possible_type_sym): Change type of syms. Remove nsyms
4303 (write_var_or_type, write_name_assoc): Update.
4305 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4307 * windows-nat.c (windows_nat_target::xfer_partial): Return
4308 TARGET_XFER_E_IO if we need to delegate to the target beneath
4309 but BENEATH is NULL.
4311 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4313 * Makefile.in (config.status): Add configure.nat as a
4316 2018-06-04 Tom Tromey <tom@tromey.com>
4318 * cp-name-parser.y (cpname_state): Add method declarations.
4319 (HANDLE_QUAL): Update.
4320 (cpname_state::d_grab, cpname_state::fill_comp)
4321 (cpname_state::make_operator, cpname_state::make_dtor)
4322 (cpname_state::make_builtin_type, cpname_state::make_name)
4323 (cpname_state::d_qualify, cpname_state::d_int_type)
4324 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4325 (%union): Move earlier.
4327 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4329 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4331 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4333 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4334 (aarch64_pseudo_write_1): Likewise.
4335 (aarch64_pseudo_read_value): Use helper.
4336 (aarch64_pseudo_write): Likewise.
4338 2018-06-04 Pedro Alves <palves@redhat.com>
4340 * darwin-nat.c (darwin_ops): Delete.
4341 (darwin_attach_pid): Use get_native_target.
4343 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4345 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4346 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4348 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4350 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4351 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4352 (aarch64_gdbarch_init): Check for SVE.
4353 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4355 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4357 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4358 * aarch64-tdep.h (aarch64_read_description): Likewise.
4359 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4360 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4361 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4362 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4363 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4365 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4367 * value.c (value_fetch_lazy_bitfield): New.
4368 (value_fetch_lazy_memory): New.
4369 (value_fetch_lazy_register): New.
4370 (value_fetch_lazy): Factor out to smaller functions.
4372 2018-06-01 Tom Tromey <tom@tromey.com>
4374 * cp-name-parser.y (backslashable, represented): Now const.
4376 2018-06-01 Tom Tromey <tom@tromey.com>
4378 * cp-name-parser.y: Include parser-defs.h.
4379 (parser_fprintf): Remove declaration.
4381 2018-06-01 Tom Tromey <tom@tromey.com>
4383 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4385 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4386 (global_result): Remove globals.
4387 (struct cpname_state): New.
4388 (yyparse): Don't declare.
4389 (yylex, yyerror): Move declarations after %union.
4390 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4391 (make_name): Add state parameter.
4393 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4395 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4397 (yylex): Add lvalp, state parameters.
4398 (yyerror): Add state parameter.
4399 (cp_demangled_name_to_comp): Update.
4401 2018-06-01 Tom Tromey <tom@tromey.com>
4403 * cp-name-parser.y (parser_fprintf): Declare.
4404 (GDB_YY_REMAP_PREFIX): Define.
4405 Include yy-remap.h. Don't redefine yy* identifiers.
4407 2018-06-01 Tom Tromey <tom@tromey.com>
4409 * python/py-type.c (typy_legacy_template_argument): Update.
4410 * cp-support.h (cp_demangled_name_to_comp): Update.
4411 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4412 parameter to be a "std::string *".
4415 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4417 * ada-lex.l: Include "diagnostics.h" instead of
4418 "common/diagnostics.h".
4419 * unittests/environ-selftests.c: Likewise.
4420 * common/diagnostics.h: Moved to ../include.
4422 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4424 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4425 to language_mode_manual while calling breakpoint_re_set_one.
4427 2018-06-01 Tom Tromey <tom@tromey.com>
4429 * valops.c (value_cast_structs, destructor_name_p): Update.
4430 * symtab.c (gdb_mangle_name): Update.
4431 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4433 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4434 (pascal_object_print_value_fields, pascal_object_print_value):
4436 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4437 * linespec.c (find_methods): Update.
4438 * gdbtypes.h (type_name_no_tag): Remove.
4439 (type_name_or_error): Rename from type_name_no_tag_or_error.
4440 * gdbtypes.c (type_name_no_tag): Remove.
4441 (type_name_or_error): Rename from type_name_no_tag_or_error.
4442 (lookup_struct_elt_type, check_typedef): Update.
4443 * expprint.c (print_subexp_standard): Update.
4444 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4445 * d-namespace.c (d_lookup_nested_symbol): Update.
4446 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4447 (cp_print_class_member): Update.
4448 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4449 * completer.c (add_struct_fields): Update.
4450 * c-typeprint.c (cp_type_print_derivation_info)
4451 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4453 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4454 (ada_prefer_type, ada_is_exception_sym): Update.
4456 2018-06-01 Tom Tromey <tom@tromey.com>
4458 * valops.c (enum_constant_from_type, value_namespace_elt)
4459 (value_maybe_namespace_elt): Update.
4460 * valarith.c (find_size_for_pointer_math): Update.
4461 * target-descriptions.c (make_gdb_type): Update.
4462 * symmisc.c (print_symbol): Update.
4463 * stabsread.c (define_symbol, read_type)
4464 (complain_about_struct_wipeout, add_undefined_type)
4465 (cleanup_undefined_types_1): Update.
4466 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4467 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4468 (rust_internal_print_type, rust_composite_type)
4469 (rust_evaluate_funcall, rust_evaluate_subexp)
4470 (rust_inclusive_range_type_p): Update.
4471 * python/py-type.c (typy_get_tag): Update.
4472 * p-typeprint.c (pascal_type_print_base): Update.
4473 * mdebugread.c (parse_symbol, parse_type): Update.
4474 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4476 * guile/scm-type.c (gdbscm_type_tag): Update.
4477 * go-lang.c (sixg_string_p): Update.
4478 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4480 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4481 (TYPE_TAG_NAME): Remove.
4482 * gdbtypes.c (type_name_no_tag): Simplify.
4483 (check_typedef, check_types_equal, recursive_dump_type)
4484 (copy_type_recursive, arch_composite_type): Update.
4485 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4486 in summary mode when needed.
4487 * eval.c (evaluate_funcall): Update.
4488 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4489 (process_structure_scope, read_enumeration_type)
4490 (read_namespace_type, read_module_type, determine_prefix): Update.
4491 * cp-support.c (inspect_type): Update.
4492 * coffread.c (process_coff_symbol, decode_base_type): Update.
4493 * c-varobj.c (c_is_path_expr_parent): Update.
4494 * c-typeprint.c (c_type_print_base_struct_union): Update.
4495 (c_type_print_base_1): Update. Print struct/class/union/enum in
4496 summary when using C language.
4497 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4498 (gen_maybe_namespace_elt): Update.
4499 * ada-lang.c (ada_type_name): Simplify.
4500 (empty_record, ada_template_to_fixed_record_type_1)
4501 (template_to_static_fixed_type)
4502 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4504 2018-06-01 Tom Tromey <tom@tromey.com>
4506 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4508 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4509 (c_print_type): Update.
4510 (c_print_type): New overload.
4511 (c_type_print_varspec_prefix, c_type_print_args)
4512 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4513 (c_type_print_base_struct_union, c_type_print_base_1)
4514 (cp_type_print_method_args): Add "language" parameter.
4515 (c_type_print_base): Update.
4516 * c-lang.h (c_print_type): Add new overload.
4518 2018-06-01 Tom Tromey <tom@tromey.com>
4520 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4521 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4523 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4525 * aarch64-tdep.c (aarch64_sve_register_names): New const
4527 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4528 (AARCH64_SVE_Z_REGS_NUM): New define.
4529 (AARCH64_SVE_P_REGS_NUM): Likewise.
4530 (AARCH64_SVE_NUM_REGS): Likewise.
4532 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4534 * nat/linux-ptrace.h [__alpha__]
4535 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4538 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4540 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4541 the endianness selected.
4542 * NEWS: Document `set endian auto' mode operation update.
4544 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4546 * Makefile.in: Add new header.
4547 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4548 (sve_vl_from_vg): Likewise.
4549 (sve_vq_from_vl): Likewise.
4550 (sve_vl_from_vq): Likewise.
4551 (sve_vq_from_vg): Likewise.
4552 (sve_vg_from_vq): Likewise.
4553 * configure.nat: Add new c file.
4554 * nat/aarch64-sve-linux-ptrace.c: New file.
4555 * nat/aarch64-sve-linux-ptrace.h: New file.
4557 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4559 * aarch64-linux-nat.c (aarch64_linux_read_description):
4561 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4563 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4564 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4565 (aarch64_gdbarch_init): Add parmeter zero.
4566 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4567 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4568 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4570 * doc/gdb.texinfo: Describe SVE feature
4571 * features/aarch64-sve.c: New file.
4573 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4576 * gdbarch.sh (significant_addr_bit): Default to zero when
4577 not set by target architecture.
4578 * gdbarch.c: Re-generated.
4579 * utils.c (address_significant): Update.
4581 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4583 * stack.c (func_command): Remove trailing newline in call to error.
4585 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4587 * regcache.h (regcache_raw_collect): Remove, update callers to
4588 use regcache::raw_collect.
4589 * regcache.c (regcache_raw_collect): Remove.
4591 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4593 * regcache.h (regcache_raw_supply): Remove, update callers to
4594 use detached_regcache::raw_supply.
4595 * regcache.c (regcache_raw_supply): Remove.
4597 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4599 * regcache.h (regcache_cooked_write_part): Remove, update
4600 callers to use regcache::cooked_write_part.
4601 * regcache.c (regcache_cooked_write_part): Remove.
4603 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4605 * regcache.h (regcache_cooked_read_part): Remove, update callers
4606 to use readable_regcache::cooked_read_part.
4607 * regcache.c (regcache_cooked_read_part): Remove.
4609 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4611 * regcache.h (regcache_cooked_read_value): Remove, update
4612 callers to use readable_regcache::cooked_read_value.
4613 * regcache.c (regcache_cooked_read_value): Remove.
4615 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4617 * regcache.h (regcache_cooked_write): Remove, update callers to
4618 use regcache::cooked_write.
4619 * regcache.c (regcache_cooked_write): Remove.
4621 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4623 * regcache.h (regcache_invalidate): Remove, update callers to
4624 use detached_regcache::invalidate instead.
4625 * regcache.c (regcache_invalidate): Remove.
4627 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4629 * regcache.h (regcache_raw_write_part): Remove, update callers
4630 to use regcache::raw_write_part instead.
4631 * regcache.c (regcache_raw_write_part): Remove.
4633 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4635 * regcache.h (regcache_raw_read_part): Remove, update callers to
4636 use readable_regcache::raw_read_part instead.
4637 * regcache.c (regcache_raw_read_part): Remove.
4639 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4641 * regcache.h (regcache_cooked_read): Remove, update callers to
4642 use readable_regcache::cooked_read instead.
4643 * regcache.c (regcache_cooked_read): Remove.
4645 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4647 * regcache.h (regcache_raw_write): Remove, update callers to use
4648 regcache::raw_write instead.
4649 * regcache.c (regcache_raw_write): Remove.
4651 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4653 * regcache.h (regcache_raw_read): Remove, update callers to use
4654 readable_regcache::raw_read instead.
4655 * regcache.c (regcache_raw_read): Remove.
4657 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4659 * regcache.h (regcache_raw_update): Remove, update callers to
4660 use readable_regcache::raw_update instead.
4661 * regcache.c (regcache_raw_update): Remove.
4663 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4665 * regcache.h (regcache_register_status): Remove, update callers
4666 to use reg_buffer::get_register_status directly instead.
4667 * regcache.c (regcache_register_status): Remove.
4669 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4671 * regcache.h (regcache_get_ptid): Remove, update all callers to
4672 call regcache::ptid instead.
4673 * regcache.c (regcache_get_ptid): Remove.
4675 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4677 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4679 2018-05-30 Pedro Alves <palves@redhat.com>
4681 * common/common-exceptions.h (exception_rethrow): Use
4684 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4686 * breakpoint.c (print_solib_event, check_status_catch_solib):
4687 Remove struct keyword in range-based for loops.
4688 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4689 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4691 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4693 * symfile.c (addr_info_make_relative): Likewise.
4694 * thread.c (value_in_thread_stack_temporaries): Likewise.
4696 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4699 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4700 aggregate type to get its real type before accessing it.
4702 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4704 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4705 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4706 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4707 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4708 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4709 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4710 * printcmd.c (info_address_command): Likewise.
4712 2018-05-29 Tom Tromey <tom@tromey.com>
4714 * windows-nat.c (handle_exception): Update fall-through comment.
4716 2018-05-29 Tom Tromey <tom@tromey.com>
4718 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4719 (struct program_space) <added_solibs>: Now a std::vector.
4720 * breakpoint.c (print_solib_event): Update.
4721 (check_status_catch_solib): Update.
4722 * progspace.c (clear_program_space_solib_cache): Update.
4723 * solib.c (update_solib_list): Update.
4725 2018-05-29 Tom Tromey <tom@tromey.com>
4727 * python/py-type.c (typy_richcompare): Update.
4728 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4729 * gdbtypes.h (types_deeply_equal): Return bool.
4730 (types_equal): Likewise.
4731 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4733 (check_types_equal): Change worklist to std::vector. Return
4735 (struct type_equality_entry): Add constructor.
4736 (compare_maybe_null_strings): Return bool.
4737 (check_types_worklist): Return bool. Change worklist to
4739 (types_deeply_equal): Use std::vector.
4740 (types_equal): Return bool.
4741 (compare_maybe_null_strings): Simplify.
4743 2018-05-29 Tom Tromey <tom@tromey.com>
4745 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4747 2018-05-29 Tom Tromey <tom@tromey.com>
4749 * objc-lang.h: Don't include cp-support.h.
4750 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4753 2018-05-27 Tom Tromey <tom@tromey.com>
4755 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4757 2018-05-25 Tom Tromey <tom@tromey.com>
4759 * value.c (value::location): Initialize.
4761 2018-05-25 Tom Tromey <tom@tromey.com>
4763 * dbxread.c (init_bincl_list): Remove.
4764 (bincl_list): Now a std::vector.
4765 (bincls_allocated, next_bincl): Remove.
4766 (free_bincl_list, do_free_bincl_list_cleanup)
4767 (make_cleanup_free_bincl_list): Remove.
4768 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4770 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4771 (struct header_file_location): Add constructor.
4772 (add_bincl_to_list): Remove.
4774 2018-05-25 Tom Tromey <tom@tromey.com>
4776 * tui/tui.c (tui_enable): Update.
4777 * mi/mi-interp.c (mi_interp::init): Update.
4778 * interps.h (class interp) <name>: New method.
4779 <m_name>: Rename from name.
4780 (~scoped_restore_interp): Update.
4781 * interps.c (interp::interp): Update.
4782 (interp_add, interp_set, interp_lookup_existing)
4783 (current_interp_named_p): Update.
4785 2018-05-25 Tom Tromey <tom@tromey.com>
4787 * interps.c (interp_name): Remove.
4788 * mi/mi-interp.c (mi_interp::init): Update.
4789 * interps.h (interp_name): Remove.
4790 (~scoped_restore_interp): Update.
4791 * tui/tui.c (tui_enable): Update.
4793 2018-05-25 Tom Tromey <tom@tromey.com>
4795 * utils.c (fputs_maybe_filtered): Update.
4796 * linespec.c (decode_line_full): Update.
4797 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4798 (mi_print_breakpoint_for_event, mi_solib_loaded)
4799 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4800 (mi_user_selected_context_changed): Update.
4801 * mi/mi-main.c (mi_execute_command): Update.
4802 * cli/cli-script.c (execute_control_command): Update.
4803 * python/python.c (execute_gdb_command): Update.
4804 * solib.c (info_sharedlibrary_command): Update.
4805 * interps.c (interp_ui_out): Remove.
4806 * interps.h (interp_ui_out): Remove.
4808 2018-05-25 Tom Tromey <tom@tromey.com>
4810 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4811 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4812 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4814 2018-05-25 Tom Tromey <tom@tromey.com>
4816 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4817 * interps.c (interp_exec): Use scoped_restore.
4819 2018-05-25 Tom Tromey <tom@tromey.com>
4821 * remote.c (remote_target::remote_file_get): Use
4823 (remote_target::remote_file_put): Likewise.
4825 2018-05-25 Tom Tromey <tom@tromey.com>
4827 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4829 (get_pe_section_index, add_pe_exported_sym): Update.
4830 (read_pe_exported_syms): Use gdb::def_vector.
4832 2018-05-25 Tom Tromey <tom@tromey.com>
4834 * frame.c (remove_prev_frame): Remove.
4835 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4837 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4839 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4841 * mips-linux-nat.c (supply_fpregset): Always call
4842 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4843 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4844 `mips_fill_fpregset'.
4845 * mips-linux-tdep.c (mips_supply_fpregset)
4846 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4847 (mips_fill_fpregset_wrapper): Remove functions.
4848 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4849 (mips_linux_fpregset): Remove variable.
4850 (mips_linux_iterate_over_regset_sections): Use
4851 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4852 (mips_linux_o32_sigframe_init): Remove comment.
4854 2018-05-25 Pedro Alves <palves@redhat.com>
4856 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4857 (struct readahead_cache, struct packet_reg, struct
4858 remote_arch_state, class remote_state): Move higher up in the
4860 (remote_target::m_remote_state): Now an object instead of a pointer.
4861 (remote_target::get_remote_state): Adjust.
4863 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4865 * stack.c (select_and_print_frame): Delete.
4866 (struct function_bounds): Move struct within function.
4867 (func_command): Most content moved into new function
4868 find_frame_for_function, use new function, print result, add
4870 (find_frame_for_function): New function, now returns a result.
4872 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4874 * stack.c (iterate_over_block_arg_vars): Fix comment.
4875 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4877 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4881 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4883 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4885 * frame.h (class scoped_restore_selected_frame): New class.
4886 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4887 of any exception, use scoped_restore_selected_frame to restore the
4890 2018-05-24 Pedro Alves <palves@redhat.com>
4892 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4895 2018-05-23 Tom Tromey <tom@tromey.com>
4897 * complaints.c (struct complaints): Remove.
4898 (symfile_complaint_book): Remove.
4899 (series): New global.
4900 (complaint_internal): Update.
4901 (clear_complaints): Update.
4903 2018-05-23 Tom Tromey <tom@tromey.com>
4905 * complaints.c (counters): New global.
4906 (struct complain): Remove.
4907 (struct complaints) <root>: Remove.
4908 (complaint_sentinel): Remove.
4909 (symfile_complaint_book): Update.
4910 (find_complaint) Remove.
4911 (complaint_internal, clear_complaints): Update.
4913 2018-05-23 Tom Tromey <tom@tromey.com>
4915 * complaints.c (struct complain) <file, line>: Remove.
4916 (find_complaint): Remove file, line parameters.
4917 (complaint_internal): Update.
4919 2018-05-23 Tom Tromey <tom@tromey.com>
4921 * complaints.c (vcomplaint): Remove.
4922 (complaint_internal) Merge in contents of vcomplaint.
4924 2018-05-23 Tom Tromey <tom@tromey.com>
4926 * complaints.c (struct complaints) <explanation>: Remove.
4927 (symfile_explanations): Remove.
4928 (symfile_complaint_book): Update.
4929 (vcomplaint): Update.
4930 (struct explanation): Remove.
4932 2018-05-23 Tom Tromey <tom@tromey.com>
4934 * complaints.c (symfile_complaints): Remove.
4935 (complaint_internal): Remove "complaints" parameter.
4936 (clear_complaints, vcomplaint): Remove "c" parameter.
4937 (get_complaints): Remove.
4938 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4939 (dwarf2_debug_line_missing_file_complaint)
4940 (dwarf2_debug_line_missing_end_sequence_complaint)
4941 (dwarf2_complex_location_expr_complaint)
4942 (dwarf2_const_value_length_mismatch_complaint)
4943 (dwarf2_section_buffer_overflow_complaint)
4944 (dwarf2_macro_malformed_definition_complaint)
4945 (dwarf2_invalid_attrib_class_complaint)
4946 (create_addrmap_from_index, dw2_symtab_iter_next)
4947 (dw2_expand_marked_cus)
4948 (dw2_debug_names_iterator::find_vec_in_debug_names)
4949 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4950 (create_debug_type_hash_table, init_cutu_and_read_dies)
4951 (partial_die_parent_scope, add_partial_enumeration)
4952 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4953 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4954 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4955 (create_cus_hash_table, create_dwp_hash_table)
4956 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4957 (dwarf2_rnglists_process, dwarf2_ranges_process)
4958 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4959 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4960 (handle_struct_member_die, process_structure_scope)
4961 (read_array_type, read_common_block, read_module_type)
4962 (read_tag_pointer_type, read_typedef, read_base_type)
4963 (read_subrange_type, load_partial_dies, partial_die_info::read)
4964 (partial_die_info::read, partial_die_info::read)
4965 (partial_die_info::read, read_checked_initial_length_and_offset)
4966 (dwarf2_string_attr, read_formatted_entries)
4967 (dwarf_decode_line_header)
4968 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4969 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4970 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4971 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4972 (get_signatured_type, get_DW_AT_signature_type)
4973 (decode_locdesc, file_file_name, consume_improper_spaces)
4974 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4975 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4976 (dwarf2_symbol_mark_computed, set_die_type)
4977 (read_attribute_value): Update.
4978 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4980 * dbxread.c (unknown_symtype_complaint)
4981 (lbrac_mismatch_complaint, repeated_header_complaint)
4982 (set_namestring, function_outside_compilation_unit_complaint)
4983 (read_dbx_symtab, process_one_symbol): Update.
4984 * gdbtypes.c (stub_noname_complaint): Update.
4985 * windows-nat.c (handle_unload_dll): Update.
4986 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4987 (decode_base_type): Update.
4988 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4989 (eb_complaint, record_include_begin, record_include_end)
4990 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4991 (process_xcoff_symbol, read_symbol)
4992 (function_outside_compilation_unit_complaint)
4993 (scan_xcoff_symtab): Update.
4994 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4995 * buildsym.c (finish_block_internal, make_blockvector)
4996 (end_symtab_get_static_block, augment_type_symtab): Update.
4997 * dtrace-probe.c (dtrace_process_dof)
4998 (dtrace_static_probe_ops::get_probes): Update.
4999 * complaints.h (struct complaint): Don't declare.
5000 (symfile_complaints): Remove.
5001 (complaint_internal): Remove "complaints" parameter.
5002 (complaint): Likewise.
5003 (clear_complaints): Likewise.
5004 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5005 (reread_symbols): Update.
5006 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5007 (dwarf2_frame_cache, decode_frame_entry): Update.
5008 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5009 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5010 (info_selectors_command): Update.
5011 * macrotab.c (macro_include, check_for_redefinition)
5012 (macro_undef): Update.
5013 * objfiles.c (filter_overlapping_sections): Update.
5014 * stabsread.c (invalid_cpp_abbrev_complaint)
5015 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5016 (define_symbol, error_type, read_type, rs6000_builtin_type)
5017 (stabs_method_name_from_physname, read_member_functions)
5018 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5019 (attach_fields_to_type, complain_about_struct_wipeout)
5020 (read_range_type, read_args, common_block_start)
5021 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5023 * mdebugread.c (index_complaint, unknown_ext_complaint)
5024 (basic_type_complaint, bad_tag_guess_complaint)
5025 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5026 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5027 (parse_procedure, parse_lines)
5028 (function_outside_compilation_unit_complaint)
5029 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5030 (bad_tag_guess_complaint, reg_value_complaint): Update.
5031 * cp-support.c (demangled_name_complaint): Update.
5032 * macroscope.c (sal_macro_scope): Update.
5033 * dwarf-index-write.c (class debug_names): Update.
5035 2018-05-23 Tom Tromey <tom@tromey.com>
5037 * complaints.c (clear_complaints): Remove "noisy" parameter.
5038 * complaints.h (clear_complaints): Update.
5039 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5040 (reread_symbols): Update.
5042 2018-05-23 Tom Tromey <tom@tromey.com>
5044 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5046 (vcomplaint, clear_complaints): Update.
5047 (symfile_explanations): Remove some messages.
5049 2018-05-23 Tom Tromey <tom@tromey.com>
5051 * complaints.c (internal_complaint): Remove.
5052 * complaints.h (internal_complaint): Remove.
5054 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5056 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5058 2018-05-22 Pedro Alves <palves@redhat.com>
5060 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5061 (remote_fileio_badfd, remote_fileio_return_errno)
5062 (remote_fileio_return_success, remote_fileio_func_open)
5063 (remote_fileio_func_open, remote_fileio_func_close)
5064 (remote_fileio_func_read, remote_fileio_func_write)
5065 (remote_fileio_func_lseek, remote_fileio_func_rename)
5066 (remote_fileio_func_unlink, remote_fileio_func_stat)
5067 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5068 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5069 remote_target parameter.
5070 (remote_fio_func_map) <func>: Add remote_target parameter.
5071 (do_remote_fileio_request, remote_fileio_request):
5072 * remote-fileio.h (remote_fileio_request):
5073 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5074 remote_target parameter.
5075 (remote_notif_process, handle_notification): Adjust to pass down
5077 (remote_notif_state_allocate): Add remote_target parameter. Save
5079 * remote-notif.h (struct remote_target): Forward declare.
5080 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5081 remote_target parameter.
5082 (struct remote_notif_state) <remote>: New field.
5083 (remote_notif_ack, remote_notif_parse): Add remote_target
5085 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5086 remote_target parameter.
5087 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5088 (threads_listing_context, rmt_thread_action, protocol_feature)
5089 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5090 (packet_result, struct threads_listing_context, remote_state):
5091 Move definitions and declarations higher up.
5092 (remote_target) <~remote_target>: Declare.
5093 (remote_download_command_source, remote_file_put, remote_file_get)
5094 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5095 (remote_hostio_pread_vFile, remote_hostio_send_command)
5096 (remote_hostio_set_filesystem, remote_hostio_open)
5097 (remote_hostio_close, remote_hostio_unlink, remote_state)
5098 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5099 (get_memory_write_packet_size, get_memory_read_packet_size)
5100 (append_pending_thread_resumptions, remote_detach_1)
5101 (append_resumption, remote_resume_with_vcont)
5102 (add_current_inferior_and_thread, wait_ns, wait_as)
5103 (process_stop_reply, remote_notice_new_inferior)
5104 (process_initial_stop_replies, remote_add_thread)
5105 (btrace_sync_conf, remote_btrace_maybe_reopen)
5106 (remove_new_fork_children, kill_new_fork_children)
5107 (discard_pending_stop_replies, stop_reply_queue_length)
5108 (check_pending_events_prevent_wildcard_vcont)
5109 (discard_pending_stop_replies_in_queue, stop_reply)
5110 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5111 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5112 (remote_interrupt_as, remote_interrupt_ns)
5113 (remote_get_noisy_reply, remote_query_attached)
5114 (remote_add_inferior, remote_current_thread, get_current_thread)
5115 (set_thread, set_general_thread, set_continue_thread)
5116 (set_general_process, write_ptid)
5117 (remote_unpack_thread_info_response, remote_get_threadinfo)
5118 (parse_threadlist_response, remote_get_threadlist)
5119 (remote_threadlist_iterator, remote_get_threads_with_ql)
5120 (remote_get_threads_with_qxfer)
5121 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5122 (get_offsets, remote_check_symbols, remote_supported_packet)
5123 (remote_query_supported, remote_packet_size)
5124 (remote_serial_quit_handler, remote_detach_pid)
5125 (remote_vcont_probe, remote_resume_with_hc)
5126 (send_interrupt_sequence, interrupt_query)
5127 (remote_notif_get_pending_events, fetch_register_using_p)
5128 (send_g_packet, process_g_packet, fetch_registers_using_g)
5129 (store_register_using_P, store_registers_using_G)
5130 (set_remote_traceframe, check_binary_download)
5131 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5132 (remote_xfer_live_readonly_partial, remote_read_bytes)
5133 (remote_send_printf, remote_flash_write, readchar)
5134 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5135 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5136 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5137 (extended_remote_disable_randomization, extended_remote_run)
5138 (send_environment_packet, extended_remote_environment_support)
5139 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5140 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5141 (packet_command): Now methods of ...
5142 (remote_target): ... this class.
5143 (m_remote_state) <remote_target>: New field.
5144 (struct remote_state) <stop_reply_queue,
5145 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5147 (remote_state::remote_state): Allocate stop_reply_queue.
5148 (remote_state): Delete global.
5149 (get_remote_state_raw): Delete.
5150 (remote_target::get_remote_state): Allocate m_remote_state on
5152 (get_current_remote_target): New.
5153 (remote_ops, extended_remote_ops): Delete.
5154 (wait_forever_enabled_p, remote_async_inferior_event_token):
5155 Delete, moved to struct remote_state.
5156 (remote_target::close): Delete self. Destruction bits split to
5158 (remote_target::~remote_target): ... this.
5159 (show_memory_packet_size): Adjust to use
5160 get_current_remote_target.
5161 (struct protocol_feature) <func>: Add remote_target parameter.
5162 All callers adjusted.
5163 (curr_quit_handler_target): New.
5164 (remote_serial_quit_handler): Reimplement.
5165 (remote_target::open_1): Adjust to use get_current_remote_target.
5166 Heap-allocate remote_target/extended_remote_target instances.
5167 (vcont_builder::vcont_builder): Add remote_target parameter, and
5168 save it in m_remote. All callers adjusted.
5169 (vcont_builder::m_remote): New field.
5170 (vcont_builder::restart, vcont_builder::flush)
5171 (vcont_builder::push_action): Use it.
5172 (remote_target::commit_resume): Use it.
5173 (struct queue_iter_param) <remote>: New field.
5174 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5175 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5176 (check_pending_event_prevents_wildcard_vcont_callback)
5177 (remote_target::check_pending_events_prevent_wildcard_vcont)
5178 (remote_target::discard_pending_stop_replies)
5179 (remote_target::discard_pending_stop_replies_in_queue)
5180 (remote_target::remote_notif_remove_queued_reply): Fill in
5182 (remote_notif_get_pending_events): New.
5183 (remote_target::readchar, remote_target::remote_serial_write):
5184 Save/restore curr_quit_handler_target.
5186 (kill_new_fork_children): Fill in 'remote' field.
5187 (packet_command): Use get_current_remote_target, defer to
5188 remote_target method of same name.
5189 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5190 parameter, and save it in m_remote. All callers adjusted.
5191 (scoped_remote_fd::release): Use m_remote.
5192 (scoped_remote_fd::m_remote): New field.
5193 (remote_file_put, remote_file_get, remote_file_delete): Use
5194 get_current_remote_target, defer to remote_target method of same
5196 (remote_btrace_reset): Add remote_state paremeter. Update all
5198 (remote_async_inferior_event_handler). Pass down 'data'.
5199 (remote_new_objfile): Use get_current_remote_target.
5200 (remote_target::vcont_r_supported): New.
5201 (set_range_stepping): Use get_current_remote_target and
5202 remote_target::vcont_r_supported.
5203 (_initialize_remote): Don't allocate 'remote_state' and
5204 'stop_reply_queue' globals.
5205 * remote.h (struct remote_target): Forward declare.
5206 (getpkt, putpkt, remote_notif_get_pending_events): Add
5207 'remote_target' parameter.
5209 2018-05-22 Pedro Alves <palves@redhat.com>
5211 * remote.c (vcont_builder): Now a class. Make all data members
5213 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5215 (vcont_builder_restart): Rename to ...
5216 (vcont_builder::restart): ... this.
5217 (vcont_builder_flush): Rename to ...
5218 (vcont_builder::flush): ... this.
5219 (vcont_builder_push_action): Rename to ...
5220 (vcont_builder::push_action): ... this.
5221 (remote_target::commit_resume): Adjust.
5223 2018-05-22 Pedro Alves <palves@redhat.com>
5225 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5226 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5227 (get_fixed_memory_packet_size): New.
5228 (get_memory_packet_size): Use it.
5229 (set_memory_packet_size): Don't override the config size with
5230 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5231 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5232 Don't refer to get_memory_packet_size if not connected to a remote
5233 target. Show "(default)" if configured size is 0.
5235 2018-05-22 Pedro Alves <palves@redhat.com>
5237 * remote.c (remote_target::mourn_inferior): Move
5238 discard_pending_stop_replies call here from ...
5239 (_initialize_remote): ... here.
5241 2018-05-22 Pedro Alves <palves@redhat.com>
5243 * remote.c (compare_section_command): Remove set_general_process
5246 2018-05-22 Pedro Alves <palves@redhat.com>
5248 * remote.c (struct packet_reg, struct remote_arch_state):
5249 Move higher up in the file.
5250 (remote_state) <m_arch_states>: Store remote_arch_state values
5251 instead of remote_arch_state pointers.
5252 (remote_state::get_remote_arch_state): Adjust.
5254 2018-05-22 Pedro Alves <palves@redhat.com>
5256 * remote.c: Include <unordered_map>.
5257 (remote_state): Now a class.
5258 (remote_state) <get_remote_arch_state>: Declare method.
5259 <get_remote_arch_state>: New field.
5260 (remote_arch_state) <remote_arch_state>: Declare ctor.
5261 <regs>: Now a unique_ptr.
5262 (remote_gdbarch_data_handle): Delete.
5263 (get_remote_arch_state): Delete.
5264 (remote_state::get_remote_arch_state): New.
5265 (get_remote_state): Adjust to call remote_state's
5266 get_remote_arch_state method.
5267 (init_remote_state): Delete, bits factored out to ...
5268 (remote_arch_state::remote_arch_state): ... this new method.
5269 (get_remote_packet_size, get_memory_packet_size)
5270 (process_g_packet, remote_target::fetch_registers)
5271 (remote_target::prepare_to_store, store_registers_using_G)
5272 (remote_target::store_registers, remote_target::get_trace_status):
5273 Adjust to call remote_state's method.
5274 (_initialize_remote): Remove reference to
5275 remote_gdbarch_data_handle.
5277 2018-05-22 Pedro Alves <palves@redhat.com>
5279 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5280 pread>: New method declarations.
5281 (remote_target::open_1): Adjust.
5282 (readahead_cache_invalidate): Rename to ...
5283 (readahead_cache::invalidate): ... this, and adjust to be a class
5285 (readahead_cache_invalidate_fd): Rename to ...
5286 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5288 (remote_hostio_pwrite): Adjust.
5289 (remote_hostio_pread_from_cache): Rename to ...
5290 (readahead_cache::pread): ... this, and adjust to be a class
5292 (remote_hostio_close): Adjust.
5294 2018-05-22 Pedro Alves <palves@redhat.com>
5296 * remote.c (remote_hostio_close_cleanup): Delete.
5297 (class scoped_remote_fd): New.
5298 (remote_file_put, remote_file_get): Use it.
5300 2018-05-22 Pedro Alves <palves@redhat.com>
5302 (struct vCont_action_support): Use bool and initialize all fields.
5303 (struct readahead_cache): Initialize all fields.
5304 (remote_state): Use bool and initialize all fields.
5305 (remote_state::remote_state, remote_state::~remote_state): New.
5306 (new_remote_state): Delete.
5307 (_initialize_remote): Use new to allocate remote_state.
5309 2018-05-22 Pedro Alves <palves@redhat.com>
5313 * c-exp.y: Include "c-support.h".
5314 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5315 of tolower. Use c_ident_is_alpha to scan names.
5316 * c-lang.c: Include "c-support.h".
5317 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5318 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5319 * c-support.h: New file, with bits factored out from ...
5320 * cp-name-parser.y: ... this file.
5321 Include "c-support.h".
5322 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5323 c-support.h and renamed.
5324 (symbol_end, yylex): Adjust.
5326 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5328 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5329 parameter type to CORE_ADDR.
5330 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5331 parameter type in declaration to CORE_ADDR.
5332 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5333 target_auxv_search to get AT_HWCAP and use the result to get the
5335 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5336 to CORE_ADDR. Remove the cast of the return value to unsigned
5337 long. Fix error predicate of target_auxv_search.
5338 (ppc_linux_nat_target::read_description): Change the type of the
5339 hwcap variable to CORE_ADDR.
5341 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5343 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5344 if the size of fpscr is larger than 32 bits.
5346 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5348 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5349 (ppc32_linux_vsxregmap): New global.
5350 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5351 regcache_supply_regset, and regcache_collect_regset.
5352 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5353 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5354 (fetch_vsx_register, store_vsx_register): Remove.
5355 (fetch_vsx_registers): Add regno parameter. Get regset using
5356 ppc_linux_vsxregset. Use regset to supply registers.
5357 (store_vsx_registers): Add regno parameter. Get regset using
5358 ppc_linux_vsxregset. Use regset to collect registers.
5359 (fetch_register): Call fetch_vsx_registers instead of
5361 (store_register): Call store_vsx_registers instead of
5363 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5364 new regno parameter.
5365 (store_ppc_registers): Call store_vsx_registers with -1 for the
5366 new regno parameter.
5367 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5368 (ppc_collect_vsxregset): Remove.
5370 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5372 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5374 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5375 for vector register offset fields.
5376 (ppc64_fbsd_reg_offsets): Likewise.
5377 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5378 to vector register offset fields.
5379 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5380 to vector register offset fields.
5381 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5382 vector register offset fields.
5383 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5384 initializers for vector register offset fields.
5385 (rs6000_aix64_reg_offsets): Likewise.
5386 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5387 (ppc_supply_vrregset): Remove.
5388 (ppc_collect_vrregset): Remove.
5389 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5390 (ppc_linux_vrregset) : New function.
5391 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5392 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5393 (ppc32_linux_vrregset): Remove.
5394 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5395 and use result instead of ppc32_linux_vrregset.
5396 (ppc32_linux_reg_offsets): Remove initializers for vector register
5398 (ppc64_linux_reg_offsets): Likewise.
5399 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5400 * ppc-linux-nat.c: Include regset.h.
5401 (gdb_vrregset_t): Adjust comment to account for little-endian
5403 (supply_vrregset, fill_vrregset): Remove.
5404 (fetch_altivec_register, store_altivec_register): Remove.
5405 (fetch_altivec_registers): Add regno parameter. Get regset using
5406 ppc_linux_vrregset. Use regset to supply registers.
5407 (store_altivec_registers): Add regno parameter. Get regset using
5408 ppc_linux_vrregset. Use regset to collect registers.
5409 (fetch_register): Call fetch_altivec_registers instead of
5410 fetch_altivec_register.
5411 (store_register): Call store_altivec_registers instead of
5412 store_altivec_register.
5413 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5414 the new regno parameter.
5415 (store_ppc_registers): Call store_altivec_registers with -1 for
5416 the new regno parameter.
5418 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5420 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5421 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5422 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5423 (gdb_vrregset_t): Change array type size to
5424 PPC_LINUX_SIZEOF_VRREGSET.
5425 (gdb_vsxregset_t): Change array type size to
5426 PPC_LINUX_SIZEOF_VSXREGSET.
5427 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5428 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5429 PPC_LINUX_SIZEOF_VSXREGSET.
5431 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5433 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5434 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5436 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5437 ppc_linux_target_wordsize with tid.
5438 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5440 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5441 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5442 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5443 tid parameter. Remove static specifier.
5444 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5445 (ppc_linux_target_wordsize): New declaration.
5447 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5449 * arch/ppc-linux-common.c: New file.
5450 * arch/ppc-linux-common.h: New file.
5451 * arch/ppc-linux-tdesc.h: New file.
5452 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5453 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5454 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5455 arch/ppc-linux-tdesc.h.
5456 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5457 arch/ppc-linux-tdesc.h.
5458 (ppc_linux_nat_target::read_description): Remove target
5459 description matching code. Fill a ppc_linux_features struct and
5460 call ppc_linux_match_description with it. Move comment about ISA
5461 2.05 to ppc-linux-common.c.
5462 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5463 arch/ppc-linux-tdesc.h.
5464 (ppc_linux_core_read_description): Remove target description
5465 matching code. Fill a ppc_linux_features struct and call
5466 ppc_linux_match_description with it.
5467 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5468 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5469 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5470 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5471 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5472 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5473 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5474 (tdesc_powerpc_e500l): Remove.
5476 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5478 * ada-lang.c (catch_assert_command): Pass empty string instead
5479 of NULL for excep_string argument.
5481 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5483 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5484 the width of the requested register exceeds the width of the
5487 2018-05-21 Tom Tromey <tom@tromey.com>
5489 * printcmd.c (output_command): Remove.
5490 (output_command_const): Rename to output_command.
5491 * valprint.h (output_command): Rename from output_command_const.
5492 * tracepoint.c (trace_dump_actions): Call output_command.
5494 2018-05-21 Tom Tromey <tom@tromey.com>
5496 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5497 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5498 * ada-lang.h (create_ada_exception_catchpoint): Update.
5499 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5501 (create_excep_cond_exprs, ~ada_catchpoint)
5502 (should_stop_exception, print_one_exception)
5503 (print_mention_exception, print_recreate_exception): Update.
5504 (ada_get_next_arg): Remove.
5505 (catch_ada_exception_command_split): Use std::string. Change type
5506 of "excep_string", "cond_string".
5507 (catch_ada_exception_command): Update.
5508 (create_ada_exception_catchpoint): Change type of excep_string.
5509 (ada_exception_sal): Remove excep_string parameter.
5510 (~ada_catchpoint): Remove.
5512 2018-05-21 Tom Tromey <tom@tromey.com>
5514 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5517 2018-05-21 Tom Tromey <tom@tromey.com>
5519 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5520 Return unique_xmalloc_ptr.
5521 (print_it_exception): Update.
5523 2018-05-21 Tom Tromey <tom@tromey.com>
5525 * tracepoint.c (trace_dump_actions): Use std::string.
5527 2018-05-21 Tom Tromey <tom@tromey.com>
5529 * symfile.c (reread_symbols): Use std::string for original_name.
5531 2018-05-21 Tom Tromey <tom@tromey.com>
5533 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5534 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5537 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5539 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5541 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5542 * objfiles.c (get_objfile_bfd_data): Allocate
5543 objfile_per_bfd_storage with obstack_new when allocating on
5546 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5548 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5550 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5551 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5552 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5553 (add_pending): Likewise.
5554 (parse_symbol): Likewise.
5555 (parse_partial_symbols): Likewise.
5556 (psymtab_to_symtab_1): Likewise.
5557 (new_psymtab): Likewise.
5558 (elfmdebug_build_psymtabs): Likewise.
5559 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5560 * objfiles.c (get_objfile_bfd_data): Likewise.
5561 (objfile_register_static_link): Likewise.
5562 * psymtab.c (allocate_psymtab): Likewise.
5563 * stabsread.c (read_member_functions): Likewise.
5564 * xcoffread.c (xcoff_end_psymtab): Likewise.
5566 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5568 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5569 compiler supports std::is_trivially_constructible.
5570 * common/poison.h: Include obstack.h.
5571 (IsMallocable): Define to is_trivially_constructible if the
5572 compiler supports it, define to true_type otherwise.
5576 (XOBNEWVEC): Redefine.
5577 * gdb_obstack.h (obstack_zalloc): New.
5578 (OBSTACK_ZALLOC): Redefine.
5579 (obstack_calloc): New.
5580 (OBSTACK_CALLOC): Redefine.
5582 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5583 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5585 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5586 obstack_calloc/obstack_zalloc.
5587 (gdbarch_obstack_zalloc): Remove.
5588 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5590 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5592 * stack.c (backtrace_command_1): Remove useless variable int i.
5594 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5596 * stack.c (print_frame_info): Fix comment.
5598 2018-05-18 Tom Tromey <tom@tromey.com>
5600 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5601 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5602 (~dwarf2_per_objfile): Update
5603 (dwarf2_get_dwz_file): Use new.
5604 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5607 2018-05-18 Tom Tromey <tom@tromey.com>
5609 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5611 * dwarf2read.c (struct dwp_file): Add constructor and
5613 (open_and_init_dwp_file): Return a unique_ptr.
5614 (dwarf2_per_objfile, create_dwp_hash_table)
5615 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5616 (lookup_dwo_unit_in_dwp): Update.
5617 (open_and_init_dwp_file, get_dwp_file): Update.
5619 2018-05-18 Tom Tromey <tom@tromey.com>
5621 * dwarf2read.c (dwarf2_per_objfile): Update.
5622 (struct mapped_index): Add initializers.
5623 (dwarf2_read_index): Use new.
5624 (dw2_symtab_iter_init): Update.
5625 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5628 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5630 * dwarf2read.c (mapped_index) <total_size>: Remove.
5632 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5634 * unittests/format_pieces-selftests.c (test_format_specifier):
5637 2018-05-18 Tom Tromey <tom@tromey.com>
5639 * c-typeprint.c (maybe_print_hole): New function.
5640 (c_print_type_struct_field_offset): Update.
5641 (c_type_print_base_struct_union): Call maybe_print_hole.
5643 2018-05-17 Keith Seitz <keiths@redhat.com>
5645 * breakpoint.c (build_bpstat_chain): New function, moved from
5647 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5648 If no stop chain is passed, call build_bpstat_chain to build it.
5649 * breakpoint.h (build_bpstat_chain): Declare.
5650 (bpstat_stop_status): Move documentation here from breakpoint.c.
5651 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5652 build the stop chain and pass it to skip_inline_frames.
5653 Pass this stop chain to bpstat_stop_status.
5654 * inline-frame.c: Include breakpoint.h.
5655 (stopped_by_user_bp_inline_frame): New function.
5656 (skip_inline_frames): Add parameter `stop_chain'.
5657 Move documention to inline-frame.h.
5658 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5659 whether the frame should be elided.
5660 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5661 Add moved documentation and update for new parameter.
5663 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5666 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5667 unittests/format_pieces-selftests.c.
5668 * common/format.h (format_piece) <operator==>: New.
5669 (format_pieces) <operator[]>: Remove.
5670 * common/format.c (format_pieces::format_pieces): Handle \e.
5671 * unittests/format_pieces-selftests.c: New.
5673 2018-05-17 Tom Tromey <tom@tromey.com>
5676 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5677 (dw2_instantiate_symtab): Add skip_partial parameter.
5678 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5679 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5680 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5681 (dw2_expand_symtabs_matching_one)
5682 (dw2_find_pc_sect_compunit_symtab)
5683 (dw2_debug_names_lookup_symbol)
5684 (dw2_debug_names_expand_symtabs_for_function): Update.
5685 (init_cutu_and_read_dies): Add skip_partial parameter.
5686 (process_psymtab_comp_unit, build_type_psymtabs_1)
5687 (process_skeletonless_type_unit, load_partial_comp_unit)
5688 (psymtab_to_symtab_1): Update.
5689 (load_full_comp_unit): Add skip_partial parameter.
5690 (process_imported_unit_die, dwarf2_read_addr_index)
5691 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5692 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5693 (read_signatured_type): Update.
5695 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5697 * value.c (release_value): Remove unused variable.
5698 (record_latest_value): Likewise.
5699 (access_value_history): Likewise.
5700 (preserve_values): Likewise.
5702 2018-05-17 Tom Tromey <tom@tromey.com>
5704 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5707 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5710 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5711 Also handle registers whose width is not a multiple of
5713 (linux_nat_trad_target::store_register): Likewise.
5715 2018-05-16 Tom Tromey <tom@tromey.com>
5717 * gdbcore.h (core_bfd): Redefine.
5718 * corelow.c (core_target::close): Update.
5719 (core_target_open): Update.
5720 * progspace.h (struct program_space) <cbfd>: Now a
5723 2018-05-16 Tom Tromey <tom@tromey.com>
5726 * symfile-add-flags.h (enum symfile_add_flags)
5727 <SYMFILE_NOT_FILENAME>: New constant.
5728 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5729 objfile name from BFD.
5730 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5731 * minidebug.c (find_separate_debug_file_in_section): Put
5732 ".gnu_debugdata" into BFD's file name.
5734 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5736 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5739 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5742 * aarch64-tdep.c (aarch64_analyze_prologue,
5743 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5744 Indicate not interested in errors.
5746 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5748 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5749 Supply the MIPS_ZERO_REGNUM register.
5751 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5753 * mips-tdep.c (mask_address_var): Make variable static.
5755 2018-05-14 Tom Tromey <tom@tromey.com>
5757 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5759 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5761 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5762 FXSAVE_ADDR for the mxcsr register.
5764 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5766 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5768 2018-05-11 Pedro Alves <palves@redhat.com>
5770 * corelow.c (core_target) <core_target>: No longer inline.
5771 Initialize m_core_gdbarch, m_core_vec and build the section table
5773 <~core_target>: New.
5774 <core_gdbarch, get_core_register_section>: New methods.
5775 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5776 factored out from ...
5777 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5779 (sniff_core_bfd): Add gdbarch parameter.
5780 (core_close): Delete, merged into ...
5781 (core_target::close): ... here. Delete self.
5782 (core_close_cleanup): Delete.
5783 (core_target_open): Allocate a core_target on the heap. Use a
5784 unique_ptr instead of a cleanup. Bits moved into the core_target
5785 ctor. Adjust to use core_target methods instead of globals.
5786 (get_core_register_section): Rename to ...
5787 (core_target::get_core_register_section): ... this and adjust.
5788 (struct get_core_registers_cb_data): New.
5789 (get_core_registers_cb): Use it. Use bool.
5790 (core_target::fetch_registers, core_target::files_info)
5791 (core_target::xfer_partial, core_target::read_description)
5792 (core_target::pid_to, core_target::thread_name): Adjust to
5793 reference class fields instead of globals.
5794 * target.h (struct target_ops_deleter, target_ops_up): New.
5796 2018-05-11 Pedro Alves <palves@redhat.com>
5798 * corefile.c (core_file_command): Move to corelow.c.
5799 * corelow.c (the_core_target): Delete.
5800 (core_file_command): Moved from corefile.c. Check exec_bfd
5801 instead of the_core_target. Use target_detach instead of calling
5802 into the_core_target directly.
5803 (maybe_say_no_core_file_now): New.
5804 (core_target::detach): Use it.
5805 (_initialize_corelow): Remove references to the_core_target.
5806 * gdbcore.h (the_core_target): Delete.
5808 2018-05-11 Tom Tromey <tromey@redhat.com>
5809 Pedro Alves <palves@redhat.com>
5811 * corefile.c (core_bfd): Remove.
5812 * gdbcore.h (core_bfd): Now a macro.
5813 * progspace.h (struct program_space) <cbfd>: New field.
5815 2018-05-11 Tom Tromey <tom@tromey.com>
5817 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5820 2018-05-10 Tom Tromey <tom@tromey.com>
5822 * configure: Rebuild.
5823 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5825 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5828 * regformats/regdat.sh: Adjust script, following the addition
5829 of the new expedite_regs parameter to init_target_desc.
5831 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5834 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5835 set_gdbarch_significant_addr_bit.
5836 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5837 set_gdbarch_significant_addr_bit.
5838 * utils.c (address_significant): Update to sign extend addr.
5840 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5842 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5843 (xtensa_linux_init_abi): Limit tdep->num_regs by
5844 tdep->num_nopriv_regs.
5845 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5846 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5849 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5851 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5853 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5855 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5856 (I387_MXCSR_INIT_VAL): New constant.
5857 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5858 buffer if it was supplied by the inferior.
5859 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5860 (i387_xsave_get_clear_bv): New function.
5861 (i387_supply_xsave): Only read x87 control registers from the
5862 xsave buffer if the feature is enabled, and the state will have
5863 been written, otherwise, provide a suitable default.
5864 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5865 including x87 control registers. Update control registers if they
5866 have changed from the default value, and mark features as enabled
5868 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5870 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5872 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5874 2018-05-07 Tom Tromey <tom@tromey.com>
5876 * configure: Rebuild.
5877 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5879 2018-05-07 Tom Tromey <tom@tromey.com>
5882 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5883 bit. Use correct value for VDIV.
5885 2018-05-04 Tom Tromey <tom@tromey.com>
5887 * configure: Rebuild.
5888 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5890 2018-05-04 Tom Tromey <tom@tromey.com>
5892 * linux-record.c (record_linux_system_call) <case
5893 RECORD_SYS_RECVFROM>: Add "break".
5895 2018-05-04 Tom Tromey <tom@tromey.com>
5897 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5898 Add missing "break".
5899 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5900 Add missing "break".
5902 2018-05-04 Tom Tromey <tom@tromey.com>
5904 * rs6000-tdep.c (ppc_process_record_op4)
5905 (ppc_process_record_op63): Add fall-through comment.
5907 2018-05-04 Tom Tromey <tom@tromey.com>
5909 * i386-tdep.c (i386_process_record): Add fall-through comment.
5911 2018-05-04 Tom Tromey <tom@tromey.com>
5913 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5916 2018-05-04 Tom Tromey <tom@tromey.com>
5918 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5919 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5920 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5922 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5924 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5927 2018-05-04 Tom Tromey <tom@tromey.com>
5929 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5931 2018-05-04 Tom Tromey <tom@tromey.com>
5933 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5934 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5935 * symfile.c (section_is_mapped): Fix fall-through comment.
5936 * stabsread.c (define_symbol, read_member_functions): Fix
5937 fall-through comment.
5938 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5940 * remote.c (remote_wait_as): Fix fall-through comment.
5941 * p-exp.y (yylex): Fix fall-through comment.
5942 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5944 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5945 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5946 * jv-exp.y (yylex): Fix fall-through comment.
5947 * go-exp.y (lex_one_token): Fix fall-through comment.
5948 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5949 fall-through comment.
5950 * f-exp.y (yylex): Fix fall-through comment.
5951 * dwarf2read.c (process_die): Fix fall-through comments.
5952 * dbxread.c (process_one_symbol): Fix fall-through comment.
5953 * d-exp.y (lex_one_token): Fix fall-through comment.
5954 * cp-name-parser.y (yylex): Fix fall-through comment.
5955 * coffread.c (coff_symtab_read): Fix fall-through comment.
5956 * c-exp.y (lex_one_token): Fix fall-through comment.
5957 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5959 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5962 2018-05-04 Tom Tromey <tom@tromey.com>
5965 * NEWS: Mention gdb.execute change.
5966 * gdbcmd.h (execute_control_command): Don't declare.
5967 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5968 execute_control_commands, execute_control_commands_to_string.
5969 * cli/cli-script.h (execute_control_commands)
5970 (execute_control_commands_to_string): Declare.
5971 (execute_control_command): Add from_tty parameter.
5972 * cli/cli-script.c (execute_control_commands)
5973 (execute_control_commands_to_string): New functions.
5974 (execute_user_command): Use execute_control_commands.
5975 (execute_control_command_1): Add "from_tty" parameter. Update.
5976 (execute_control_command): Likewise.
5978 2018-05-04 Tom Tromey <tom@tromey.com>
5981 * NEWS: Mention that breakpoint commands are writable.
5982 * python/py-breakpoint.c (bppy_set_commands): New function.
5983 (breakpoint_object_getset) <"commands">: Use it.
5985 2018-05-04 Tom Tromey <tom@tromey.com>
5987 * tracepoint.c (actions_command): Update.
5988 * mi/mi-cmd-break.c (mi_command_line_array)
5989 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5990 (mi_read_next_line): Remove.
5991 (mi_cmd_break_commands): Update.
5992 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5994 * cli/cli-script.c (get_command_line): Update.
5995 (process_next_line): Use function_view. Constify.
5996 (recurse_read_control_structure, read_command_lines)
5997 (read_command_lines_1): Change argument types to function_view.
5998 (do_define_command, document_command): Update.
5999 * breakpoint.h (check_tracepoint_command): Don't declare.
6000 * breakpoint.c (check_tracepoint_command): Remove.
6001 (commands_command_1, create_tracepoint_from_upload): Update.
6003 2018-05-04 Tom Tromey <tom@tromey.com>
6006 * cli/cli-script.h (enum command_control_type) <define_control>:
6008 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6009 (build_command_line, execute_control_command_1)
6010 (process_next_line): Likewise.
6011 (do_define_command): New function, extracted from define_command.
6012 (define_command): Use it.
6014 2018-05-04 Tom Tromey <tom@tromey.com>
6016 * tracepoint.c (actions_command): Update.
6017 * cli/cli-script.h (read_command_lines): Update.
6018 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6019 (MAX_TMPBUF): Remove define.
6020 (define_command): Use string_printf.
6021 (document_command): Likewise.
6022 * breakpoint.c (commands_command_1): Update.
6024 2018-05-04 Tom Tromey <tom@tromey.com>
6026 * top.c (execute_command): Update.
6027 * cli/cli-script.h (print_command_lines): Now varargs.
6028 * cli/cli-script.c (print_command_lines): Now varargs.
6029 (execute_control_command_1) <case while_control, case if_control>:
6032 2018-05-04 Tom Tromey <tom@tromey.com>
6034 * tracepoint.c (all_tracepoint_actions): Rename from
6035 all_tracepoint_actions_and_cleanup. Change return type.
6036 (actions_command, encode_actions_1, encode_actions)
6037 (trace_dump_actions, tdump_command): Update.
6038 * remote.c (remote_download_command_source): Update.
6039 * python/python.c (gdbpy_eval_from_control_command)
6040 (python_command, python_interactive_command): Update.
6041 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6042 * guile/guile.c (guile_command)
6043 (gdbscm_eval_from_control_command, guile_command): Update.
6044 * compile/compile.c (compile_code_command)
6045 (compile_print_command, compile_to_object): Update.
6046 * cli/cli-script.h (struct command_lines_deleter): New.
6047 (counted_command_line): New typedef.
6048 (struct command_line): Add constructor, destructor.
6049 <body_list>: Remove.
6050 <body_list_0, body_list_1>: New members.
6051 (command_line_up): Remove typedef.
6052 (read_command_lines, read_command_lines_1, get_command_line):
6054 (copy_command_lines): Don't declare.
6055 * cli/cli-script.c (build_command_line): Use "new".
6056 (get_command_line): Return counted_command_line.
6057 (print_command_lines, execute_user_command)
6058 (execute_control_command_1, while_command, if_command): Update.
6059 (realloc_body_list): Remove.
6060 (process_next_line, recurse_read_control_structure): Update.
6061 (read_command_lines, read_command_lines_1): Return counted_command_line.
6062 (free_command_lines): Use "delete".
6063 (copy_command_lines): Remove.
6064 (define_command, document_command, show_user_1): Update.
6065 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6066 a counted_command_line.
6067 * breakpoint.h (counted_command_line): Remove typedef.
6068 (breakpoint_set_commands): Update.
6069 * breakpoint.c (check_no_tracepoint_commands)
6070 (validate_commands_for_breakpoint): Update.
6071 (breakpoint_set_commands): Change commands to be a
6072 counted_command_line.
6073 (commands_command_1, update_dprintf_command_list)
6074 (create_tracepoint_from_upload): Update.
6076 2018-05-04 Tom Tromey <tom@tromey.com>
6078 * cli/cli-decode.h (cmd_list_element): New constructor.
6079 (~cmd_list_element): New destructor.
6080 (struct cmd_list_element): Add initializers.
6081 * cli/cli-decode.c (do_add_cmd): Use "new".
6082 (delete_cmd): Use "delete".
6084 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6085 Pedro Alves <palves@redhat.com>
6087 PR breakpoints/19806 and support for PR external/20207.
6088 * NEWS: Mention Aarch64 watchpoint improvements.
6089 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6090 watchpoints and PR external/20207 watchpoints.
6091 * nat/aarch64-linux-hw-point.c
6092 (kernel_supports_any_contiguous_range): New.
6093 (aarch64_watchpoint_offset): New.
6094 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6095 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6096 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6097 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6098 next_addr_orig_p. Support PR external/20207 watchpoints.
6099 (aarch64_downgrade_regs): New.
6100 (aarch64_dr_state_insert_one_point): New parameters offset and
6102 (aarch64_dr_state_remove_one_point): Likewise.
6103 (aarch64_handle_breakpoint): Update caller.
6104 (aarch64_handle_aligned_watchpoint): Likewise.
6105 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6107 (aarch64_linux_set_debug_regs): Remove const from state. Call
6108 aarch64_downgrade_regs.
6109 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6110 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6111 (DR_CONTROL_MASK): ... this.
6112 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6113 (unsigned int aarch64_watchpoint_offset): New prototype.
6114 (aarch64_linux_set_debug_regs): Remove const from state.
6115 * utils.c (align_up, align_down): Move to ...
6116 * common/common-utils.c (align_up, align_down): ... here.
6117 * utils.h (align_up, align_down): Move to ...
6118 * common/common-utils.h (align_up, align_down): ... here.
6120 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6122 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6123 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6124 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6125 Re-implement to match the ABI as summarized in GCC's
6126 gcc/config/sparc/sparc.c. All callers updated.
6127 (sparc32_store_arguments): Remove assertion.
6129 2018-05-04 Tom Tromey <tom@tromey.com>
6131 * printcmd.c: Don't include tui.h.
6132 (decode_format): Use skip_spaces.
6134 2018-05-04 Tom Tromey <tom@tromey.com>
6137 * printcmd.c (last_count): New global.
6138 (x_command): Use saved count when repeating.
6140 2018-05-04 Tom Tromey <tom@tromey.com>
6142 * nto-procfs.c (do_closedir_cleanup): Remove.
6143 (procfs_pidlist): Use gdb_dir_up.
6144 * procfs.c (do_closedir_cleanup): Remove.
6145 (proc_update_threads): Use gdb_dir_up.
6146 * common/filestuff.h (struct gdb_dir_deleter): New.
6147 (gdb_dir_up): New typedef.
6149 2018-05-04 Tom Tromey <tom@tromey.com>
6151 * ada-lang.c (print_mention_exception): Use std::string.
6153 2018-05-04 Tom Tromey <tom@tromey.com>
6155 * ada-lang.c (create_excep_cond_exprs): Update.
6156 (ada_exception_catchpoint_cond_string): Use std::string.
6158 2018-05-04 Tom Tromey <tom@tromey.com>
6160 * ada-lang.c (xget_renaming_scope): Return std::string.
6161 (old_renaming_is_invisible): Update.
6163 2018-05-04 Tom Tromey <tom@tromey.com>
6165 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6166 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6168 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6170 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6172 2018-05-04 Tom Tromey <tom@tromey.com>
6174 * remote.c (remote_query_supported_append): Change type.
6175 (remote_check_symbols): Update.
6177 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6180 * configure.ac: Prepend libpython.
6181 * python/python-config.py: Likewise.
6182 * configure: Regenerate.
6184 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6186 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6188 2018-05-03 Pedro Alves <palves@redhat.com>
6191 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6192 override. Write 'true' instead of '1'.
6193 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6196 2018-05-02 Pedro Alves <palves@redhat.com>
6198 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6199 add_inf_child_target.
6200 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6201 add_inf_child_target.
6202 * aix-thread.c (aix_thread_target_info): New.
6203 (aix_thread_target) <shortname, longname, doc>: Delete.
6205 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6206 add_inf_child_target.
6207 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6208 add_inf_child_target.
6209 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6210 add_inf_child_target.
6211 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6212 add_inf_child_target.
6213 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6214 add_inf_child_target.
6215 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6216 add_inf_child_target.
6217 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6218 add_inf_child_target.
6219 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6220 add_inf_child_target.
6221 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6222 add_inf_child_target.
6223 * bfd-target.c (target_bfd_target_info): New.
6224 (target_bfd) <shortname, longname, doc>: Delete.
6226 * bsd-kvm.c (bsd_kvm_target_info): New.
6227 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6229 (bsd_kvm_target::open): Rename to ...
6230 (bsd_kvm_target_open): ... this. Adjust.
6231 * bsd-uthread.c (bsd_uthread_target_info): New.
6232 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6234 * corefile.c (core_file_command): Adjust.
6235 * corelow.c (core_target_info): New.
6236 (core_target) <shortname, longname, doc>: Delete.
6238 (core_target::open): Rename to ...
6239 (core_target_open): ... this. Adjust.
6240 * ctf.c (ctf_target_info): New.
6241 (ctf_target) <shortname, longname, doc>: Delete.
6243 (ctf_target::open): Rename to ...
6244 (ctf_target_open): ... this.
6245 (_initialize_ctf): Adjust.
6246 * exec.c (exec_target_info): New.
6247 (exec_target) <shortname, longname, doc>: Delete.
6249 (exec_target::open): Rename to ...
6250 (exec_target_open): ... this.
6251 * gdbcore.h (core_target_open): Declare.
6252 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6253 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6254 add_inf_child_target.
6255 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6256 add_inf_child_target.
6257 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6258 add_inf_child_target.
6259 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6260 add_inf_child_target.
6261 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6262 add_inf_child_target.
6263 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6264 add_inf_child_target.
6265 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6266 add_inf_child_target.
6267 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6268 add_inf_child_target.
6269 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6270 add_inf_child_target.
6271 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6272 add_inf_child_target.
6273 * inf-child.c (inf_child_target_info): New.
6274 (inf_child_target::info): New.
6275 (inf_child_open_target): Remove 'target' parameter. Use
6276 get_native_target instead.
6277 (inf_child_target::open): Delete.
6278 (add_inf_child_target): New.
6279 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6282 (add_inf_child_target): Declare.
6283 (inf_child_open_target): Declare.
6284 * linux-thread-db.c (thread_db_target_info): New.
6285 (thread_db_target) <shortname, longname, doc>: Delete.
6287 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6288 add_inf_child_target.
6289 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6290 add_inf_child_target.
6291 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6292 add_inf_child_target.
6293 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6294 add_inf_child_target.
6295 * make-target-delegates (print_class): Adjust.
6296 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6297 add_inf_child_target.
6298 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6299 add_inf_child_target.
6300 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6301 add_inf_child_target.
6302 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6303 add_inf_child_target.
6304 * nto-procfs.c (nto_native_target_info): New.
6305 (nto_procfs_target_native) <shortname, longname, doc>:
6308 (nto_procfs_target_info): New.
6309 (nto_procfs_target_procfs) <shortname, longname, doc>:
6312 (init_procfs_targets): Adjust.
6313 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6314 add_inf_child_target.
6315 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6316 add_inf_child_target.
6317 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6318 add_inf_child_target.
6319 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6320 add_inf_child_target.
6321 * ravenscar-thread.c (ravenscar_target_info): New.
6322 (ravenscar_thread_target) <shortname, longname, doc>:
6325 * record-btrace.c (record_btrace_target_info):
6326 (record_btrace_target) <shortname, longname, doc>: Delete.
6328 (record_btrace_target::open): Rename to ...
6329 (record_btrace_target_open): ... this. Adjust.
6330 * record-full.c (record_longname, record_doc): New.
6331 (record_full_base_target) <shortname, longname, doc>: Delete.
6333 (record_full_target_info): New.
6334 (record_full_target): <shortname>: Delete.
6336 (record_full_core_open_1, record_full_open_1): Update comments.
6337 (record_full_base_target::open): Rename to ...
6338 (record_full_open): ... this.
6339 (cmd_record_full_restore): Update.
6340 (_initialize_record_full): Update.
6341 * remote-sim.c (remote_sim_target_info): New.
6342 (gdbsim_target) <shortname, longname, doc>: Delete.
6344 (gdbsim_target::open): Rename to ...
6345 (gdbsim_target_open): ... this.
6346 (_initialize_remote_sim): Adjust.
6347 * remote.c (remote_doc): New.
6348 (remote_target_info): New.
6349 (remote_target) <shortname, longname, doc>: Delete.
6351 (extended_remote_target_info): New.
6352 (extended_remote_target) <shortname, longname, doc>: Delete.
6354 (remote_target::open_1): Make static. Adjust.
6355 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6356 * s390-linux-nat.c (_initialize_s390_nat): Use
6357 add_inf_child_target.
6358 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6359 add_inf_child_target.
6360 * sol-thread.c (thread_db_target_info): New.
6361 (sol_thread_target) <shortname, longname, doc>: Delete.
6363 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6364 add_inf_child_target.
6365 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6366 add_inf_child_target.
6367 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6368 add_inf_child_target.
6369 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6370 add_inf_child_target.
6371 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6372 add_inf_child_target.
6373 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6374 add_inf_child_target.
6375 * spu-linux-nat.c (_initialize_spu_nat): Use
6376 add_inf_child_target.
6377 * spu-multiarch.c (spu_multiarch_target_info): New.
6378 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6380 * target-delegates.c: Regenerate.
6381 * target.c: Include <unordered_map>.
6382 (target_ops_p): Delete.
6383 (DEF_VEC_P(target_ops_p)): Delete.
6384 (target_factories): New.
6385 (test_target_info): New.
6386 (test_target_ops::info): New.
6387 (open_target): Adjust to use target_factories.
6388 (add_target_with_completer): Rename to ...
6389 (add_target): ... this. Change prototype. Register target_info
6390 and open callback in target_factories. Register target_info in
6391 command context instead of target_ops.
6392 (add_target): Delete old implementation.
6393 (add_deprecated_target_alias): Change prototype. Adjust.
6394 (the_native_target): New.
6395 (set_native_target, get_native_target): New.
6396 (find_default_run_target): Use the_native_target.
6397 (find_attach_target, find_run_target): Simplify.
6398 (target_ops::open): Delete.
6399 (dummy_target_info): New.
6400 (dummy_target::shortname, dummy_target::longname)
6401 (dummy_target::doc): Delete.
6402 (dummy_target::info): New.
6403 (debug_target::shortname, debug_target::longname)
6404 (debug_target::doc): Delete.
6405 (debug_target::info): New.
6406 * target.h (struct target_info): New.
6407 (target_ops::~target_ops): Add comment.
6408 (target_ops::info): New.
6409 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6410 longer virtual. Implement in terms of target_info.
6411 (set_native_target, get_native_target): Declare.
6412 (target_open_ftype): New.
6413 (add_target, add_target_with_completer)
6414 (add_deprecated_target_alias): Change prototype.
6415 (test_target) <shortname, longname, doc>: Delete.
6417 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6418 add_inf_child_target.
6419 * tracefile-tfile.c (tfile_target_info): New.
6420 (tfile_target) <shortname, longname, doc>: Delete.
6422 (tfile_target::open): Rename to ...
6423 (tfile_target_open): ... this.
6424 (_initialize_tracefile_tfile): Adjust.
6425 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6426 add_inf_child_target.
6427 * windows-nat.c (_initialize_windows_nat): Use
6428 add_inf_child_target.
6429 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6430 add_inf_child_target.
6432 2018-05-02 Pedro Alves <palves@redhat.com>
6434 * linux-nat.h (linux_nat_target) <low_new_thread,
6435 low_delete_thread, low_new_fork, low_forget_process,
6436 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6437 New virtual methods.
6438 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6439 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6440 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6441 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6442 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6444 * linux-fork.c (delete_fork): Adjust to call low method.
6445 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6446 (linux_nat_new_fork, linux_nat_forget_process_hook)
6447 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6448 (linux_nat_status_is_event):
6449 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6450 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6452 (sigtrap_is_event): Rename to ...
6453 (linux_nat_target::low_status_is_event): ... this.
6454 (linux_nat_set_status_is_event): Delete.
6455 (save_stop_reason, linux_nat_wait_1)
6456 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6458 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6459 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6460 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6461 (linux_nat_set_prepare_to_resume): Delete.
6462 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6463 low virtual methods.
6464 * amd64-linux-nat.c: Likewise.
6465 * arm-linux-nat.c: Likewise.
6466 * i386-linux-nat.c: Likewise.
6467 * ia64-linux-nat.c: Likewise.
6468 * mips-linux-nat.c: Likewise.
6469 * ppc-linux-nat.c: Likewise.
6470 * s390-linux-nat.c: Likewise.
6471 * sparc64-linux-nat.c: Likewise.
6472 * x86-linux-nat.c: Likewise.
6473 * x86-linux-nat.h: Include "nat/x86-linux.h".
6474 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6475 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6478 2018-05-02 Pedro Alves <palves@redhat.com>
6480 * target.h (target_ops)
6481 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6482 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6483 stopped_by_watchpoint, have_continuable_watchpoint,
6484 stopped_data_address, watchpoint_addr_within_range,
6485 can_accel_watchpoint_condition, can_run, thread_alive,
6486 has_all_memory, has_memory, has_stack, has_registers,
6487 has_execution, can_async_p, is_async_p, supports_non_stop,
6488 always_non_stop_p, can_execute_reverse, supports_multi_process,
6489 supports_enable_disable_tracepoint,
6490 supports_disable_randomization, supports_string_tracing,
6491 supports_evaluation_of_breakpoint_conditions,
6492 can_run_breakpoint_commands, filesystem_is_local,
6493 can_download_tracepoint, get_trace_state_variable_value,
6494 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6495 record_is_replaying, record_will_replay,
6496 augmented_libraries_svr4_read>: Adjust to return bool.
6497 * aarch64-linux-nat.c: All implementations adjusted.
6498 * aix-thread.c: All implementations adjusted.
6499 * arm-linux-nat.c: All implementations adjusted.
6500 * breakpoint.c: All implementations adjusted.
6501 * bsd-kvm.c: All implementations adjusted.
6502 * bsd-uthread.c: All implementations adjusted.
6503 * corelow.c: All implementations adjusted.
6504 * ctf.c: All implementations adjusted.
6505 * darwin-nat.c: All implementations adjusted.
6506 * darwin-nat.h: All implementations adjusted.
6507 * exec.c: All implementations adjusted.
6508 * fbsd-nat.c: All implementations adjusted.
6509 * fbsd-nat.h: All implementations adjusted.
6510 * gnu-nat.c: All implementations adjusted.
6511 * gnu-nat.h: All implementations adjusted.
6512 * go32-nat.c: All implementations adjusted.
6513 * ia64-linux-nat.c: All implementations adjusted.
6514 * inf-child.c: All implementations adjusted.
6515 * inf-child.h: All implementations adjusted.
6516 * inf-ptrace.c: All implementations adjusted.
6517 * inf-ptrace.h: All implementations adjusted.
6518 * linux-nat.c: All implementations adjusted.
6519 * linux-nat.h: All implementations adjusted.
6520 * mips-linux-nat.c: All implementations adjusted.
6521 * nto-procfs.c: All implementations adjusted.
6522 * ppc-linux-nat.c: All implementations adjusted.
6523 * procfs.c: All implementations adjusted.
6524 * ravenscar-thread.c: All implementations adjusted.
6525 * record-btrace.c: All implementations adjusted.
6526 * record-full.c: All implementations adjusted.
6527 * remote-sim.c: All implementations adjusted.
6528 * remote.c: All implementations adjusted.
6529 * s390-linux-nat.c: All implementations adjusted.
6530 * sol-thread.c: All implementations adjusted.
6531 * spu-multiarch.c: All implementations adjusted.
6532 * target-delegates.c: All implementations adjusted.
6533 * target.c: All implementations adjusted.
6534 * target.h: All implementations adjusted.
6535 * tracefile-tfile.c: All implementations adjusted.
6536 * tracefile.c: All implementations adjusted.
6537 * tracefile.h: All implementations adjusted.
6538 * windows-nat.c: All implementations adjusted.
6539 * x86-linux-nat.h: All implementations adjusted.
6540 * x86-nat.h: All implementations adjusted.
6542 2018-05-02 Pedro Alves <palves@redhat.com>
6544 * make-target-delegates (scan_target_h): Don't trim lines here.
6545 Replace sequences of tabs and/or whitespace with a single
6547 (top level, parsing methods): Trim each line before processing it
6550 2018-05-02 Pedro Alves <palves@redhat.com>
6551 John Baldwin <jhb@freebsd.org>
6553 * target.h (enum strata) <debug_stratum>: New.
6554 (struct target_ops) <all delegation methods>: Replace by C++
6555 virtual methods, and drop "to_" prefix. All references updated
6557 <to_shortname, to_longname, to_doc, to_data,
6558 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6559 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6560 virtual methods. All references updated throughout.
6561 <can_attach, supports_terminal_ours, can_create_inferior,
6562 get_thread_control_capabilities, attach_no_wait>: New
6564 <insert_breakpoint, remove_breakpoint>: Now
6565 TARGET_DEFAULT_NORETURN methods.
6566 <info_proc>: Now returns bool.
6568 (OPS_MAGIC): Delete.
6569 (current_target): Delete. All references replaced by references
6571 (target_stack): ... this. New.
6572 (target_shortname, target_longname): Adjust.
6573 (target_can_run): Now a function declaration.
6574 (default_child_has_all_memory, default_child_has_memory)
6575 (default_child_has_stack, default_child_has_registers)
6576 (default_child_has_execution): Remove target_ops parameter.
6577 (complete_target_initialization): Delete.
6578 (memory_breakpoint_target): New template class.
6579 (test_target_ops): Refactor as a C++ class with virtual methods.
6580 * make-target-delegates (NAME_PART): Tighten.
6581 (POINTER_PART, CP_SYMBOL): New.
6582 (SIMPLE_RETURN_PART): Reimplement.
6583 (VEC_RETURN_PART): Expect less.
6584 (RETURN_PART, VIRTUAL_PART): New.
6585 (METHOD): Adjust to C++ virtual methods.
6586 (scan_target_h): Remove reference to C99.
6587 (dname): Output "target_ops::" prefix.
6588 (write_function_header): Adjust to output a C++ class method.
6589 (write_declaration): New.
6590 (write_delegator): Adjust to output a C++ class method.
6591 (tdname): Output "dummy_target::" prefix.
6592 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6594 (tdefault_names, debug_names): Delete.
6595 (return_types, tdefaults, styles, argtypes_array): New.
6596 (top level): All methods are delegators.
6598 (top level): Print dummy_target and debug_target classes.
6599 * target-delegates.c: Regenerate.
6600 * target-debug.h (target_debug_print_enum_info_proc_what)
6601 (target_debug_print_thread_control_capabilities)
6602 (target_debug_print_thread_info_p): New.
6603 * target.c (dummy_target): Delete.
6604 (the_dummy_target, the_debug_target): New.
6605 (target_stack): Now extern.
6606 (set_targetdebug): Push/unpush debug target.
6607 (default_child_has_all_memory, default_child_has_memory)
6608 (default_child_has_stack, default_child_has_registers)
6609 (default_child_has_execution): Remove target_ops parameter.
6610 (complete_target_initialization): Delete.
6611 (add_target_with_completer): No longer call
6612 complete_target_initialization.
6613 (target_supports_terminal_ours): Use regular delegation.
6614 (update_current_target): Delete.
6615 (push_target): No longer check magic number. Don't call
6616 update_current_target.
6617 (unpush_target): Don't call update_current_target.
6618 (target_is_pushed): No longer check magic number.
6619 (target_require_runnable): Skip for all stratums over
6621 (target_ops::info_proc): New.
6622 (target_info_proc): Use find_target_at and
6623 find_default_run_target.
6624 (target_supports_disable_randomization): Use regular delegation.
6625 (target_get_osdata): Use find_target_at.
6626 (target_ops::open, target_ops::close, target_ops::can_attach)
6627 (target_ops::attach, target_ops::can_create_inferior)
6628 (target_ops::create_inferior, target_ops::can_run)
6629 (target_can_run): New.
6630 (default_fileio_target): Use regular delegation.
6631 (target_ops::fileio_open, target_ops::fileio_pwrite)
6632 (target_ops::fileio_pread, target_ops::fileio_fstat)
6633 (target_ops::fileio_close, target_ops::fileio_unlink)
6634 (target_ops::fileio_readlink): New.
6635 (target_fileio_open_1, target_fileio_unlink)
6636 (target_fileio_readlink): Always call the target method. Handle
6638 (return_zero, return_zero_has_execution): Delete.
6639 (init_dummy_target): Delete.
6640 (dummy_target::dummy_target, dummy_target::shortname)
6641 (dummy_target::longname, dummy_target::doc)
6642 (debug_target::debug_target, debug_target::shortname)
6643 (debug_target::longname, debug_target::doc): New.
6644 (target_supports_delete_record): Use regular delegation.
6645 (setup_target_debug): Delete.
6646 (maintenance_print_target_stack): Skip debug_stratum.
6647 (initialize_targets): Instantiate the_dummy_target and
6649 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6651 (target_auxv_search, fprint_target_auxv): Adjust.
6652 (info_auxv_command): Adjust to use target_stack.
6653 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6654 * exceptions.c (print_flush): Handle a NULL target_stack.
6655 * regcache.c (target_ops_no_register): Refactor as class with
6658 * exec.c (exec_target): New class.
6659 (exec_ops): Now an exec_target.
6660 (exec_open, exec_close_1, exec_get_section_table)
6661 (exec_xfer_partial, exec_files_info, exec_has_memory)
6662 (exec_make_note_section): Refactor as exec_target methods.
6663 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6665 (exec_target::find_memory_regions): New.
6666 (_initialize_exec): Don't call init_exec_ops.
6667 * gdbcore.h (exec_file_clear): Delete.
6669 * corefile.c (core_target): Delete.
6670 (core_file_command): Adjust.
6671 * corelow.c (core_target): New class.
6672 (the_core_target): New.
6673 (core_close): Remove target_ops parameter.
6674 (core_close_cleanup): Adjust.
6675 (core_target::close): New.
6676 (core_open, core_detach, get_core_registers, core_files_info)
6677 (core_xfer_partial, core_thread_alive, core_read_description)
6678 (core_pid_to_str, core_thread_name, core_has_memory)
6679 (core_has_stack, core_has_registers, core_info_proc): Rework as
6680 core_target methods.
6681 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6682 (_initialize_corelow): Initialize the_core_target.
6683 * gdbcore.h (core_target): Delete.
6684 (the_core_target): New.
6686 * ctf.c: (ctf_target): New class.
6687 (ctf_ops): Now a ctf_target.
6688 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6689 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6690 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6692 (init_ctf_ops): Delete.
6693 (_initialize_ctf): Don't call it.
6694 * tracefile-tfile.c (tfile_target): New class.
6695 (tfile_ops): Now a tfile_target.
6696 (tfile_open, tfile_close, tfile_files_info)
6697 (tfile_get_tracepoint_status, tfile_trace_find)
6698 (tfile_fetch_registers, tfile_xfer_partial)
6699 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6700 Refactor as tfile_target methods.
6701 (tfile_xfer_partial_features): Remove target_ops parameter.
6702 (init_tfile_ops): Delete.
6703 (_initialize_tracefile_tfile): Don't call it.
6704 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6705 (tracefile_has_stack, tracefile_has_registers)
6706 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6707 tracefile_target methods.
6708 (init_tracefile_ops): Delete.
6709 (tracefile_target::tracefile_target): New.
6710 * tracefile.h: Include "target.h".
6711 (tracefile_target): New class.
6712 (init_tracefile_ops): Delete.
6714 * spu-multiarch.c (spu_multiarch_target): New class.
6715 (spu_ops): Now a spu_multiarch_target.
6716 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6717 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6718 (spu_search_memory, spu_mourn_inferior): Refactor as
6719 spu_multiarch_target methods.
6720 (init_spu_ops): Delete.
6721 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6722 complete_target_initialization.
6724 * ravenscar-thread.c (ravenscar_thread_target): New class.
6725 (ravenscar_ops): Now a ravenscar_thread_target.
6726 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6727 (ravenscar_thread_alive, ravenscar_pid_to_str)
6728 (ravenscar_fetch_registers, ravenscar_store_registers)
6729 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6730 (ravenscar_stopped_by_hw_breakpoint)
6731 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6732 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6733 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6735 (init_ravenscar_thread_ops): Delete.
6736 (_initialize_ravenscar): Remove references to
6737 init_ravenscar_thread_ops and complete_target_initialization.
6739 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6740 (bsd_uthread_target): New class.
6741 (bsd_uthread_ops): Now a bsd_uthread_target.
6742 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6743 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6744 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6745 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6746 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6747 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6748 (bsd_uthread_target): Delete function.
6749 (_initialize_bsd_uthread): Remove reference to
6750 complete_target_initialization.
6752 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6753 (target_bfd): ... this new class.
6754 (target_bfd_xfer_partial, target_bfd_get_section_table)
6755 (target_bfd_close): Refactor as target_bfd methods.
6756 (target_bfd::~target_bfd): New.
6757 (target_bfd_reopen): Adjust.
6758 (target_bfd::close): New.
6760 * record-btrace.c (record_btrace_target): New class.
6761 (record_btrace_ops): Now a record_btrace_target.
6762 (record_btrace_open, record_btrace_stop_recording)
6763 (record_btrace_disconnect, record_btrace_close)
6764 (record_btrace_async, record_btrace_info)
6765 (record_btrace_insn_history, record_btrace_insn_history_range)
6766 (record_btrace_insn_history_from, record_btrace_call_history)
6767 (record_btrace_call_history_range)
6768 (record_btrace_call_history_from, record_btrace_record_method)
6769 (record_btrace_is_replaying, record_btrace_will_replay)
6770 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6771 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6772 (record_btrace_store_registers, record_btrace_prepare_to_store)
6773 (record_btrace_to_get_unwinder)
6774 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6775 (record_btrace_commit_resume, record_btrace_wait)
6776 (record_btrace_stop, record_btrace_can_execute_reverse)
6777 (record_btrace_stopped_by_sw_breakpoint)
6778 (record_btrace_supports_stopped_by_sw_breakpoint)
6779 (record_btrace_stopped_by_hw_breakpoint)
6780 (record_btrace_supports_stopped_by_hw_breakpoint)
6781 (record_btrace_update_thread_list, record_btrace_thread_alive)
6782 (record_btrace_goto_begin, record_btrace_goto_end)
6783 (record_btrace_goto, record_btrace_stop_replaying_all)
6784 (record_btrace_execution_direction)
6785 (record_btrace_prepare_to_generate_core)
6786 (record_btrace_done_generating_core): Refactor as
6787 record_btrace_target methods.
6788 (init_record_btrace_ops): Delete.
6789 (_initialize_record_btrace): Remove reference to
6790 init_record_btrace_ops.
6791 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6792 the execution_direction global.
6793 (record_full_base_target, record_full_target)
6794 (record_full_core_target): New classes.
6795 (record_full_ops): Now a record_full_target.
6796 (record_full_core_ops): Now a record_full_core_target.
6797 (record_full_target::detach, record_full_target::disconnect)
6798 (record_full_core_target::disconnect)
6799 (record_full_target::mourn_inferior, record_full_target::kill):
6801 (record_full_open, record_full_close, record_full_async): Refactor
6802 as methods of the record_full_base_target class.
6803 (record_full_resume, record_full_commit_resume): Refactor
6804 as methods of the record_full_target class.
6805 (record_full_wait, record_full_stopped_by_watchpoint)
6806 (record_full_stopped_data_address)
6807 (record_full_stopped_by_sw_breakpoint)
6808 (record_full_supports_stopped_by_sw_breakpoint)
6809 (record_full_stopped_by_hw_breakpoint)
6810 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6811 methods of the record_full_base_target class.
6812 (record_full_store_registers, record_full_xfer_partial)
6813 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6814 Refactor as methods of the record_full_target class.
6815 (record_full_can_execute_reverse, record_full_get_bookmark)
6816 (record_full_goto_bookmark, record_full_execution_direction)
6817 (record_full_record_method, record_full_info, record_full_delete)
6818 (record_full_is_replaying, record_full_will_replay)
6819 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6820 (record_full_stop_replaying): Refactor as methods of the
6821 record_full_base_target class.
6822 (record_full_core_resume, record_full_core_kill)
6823 (record_full_core_fetch_registers)
6824 (record_full_core_prepare_to_store)
6825 (record_full_core_store_registers, record_full_core_xfer_partial)
6826 (record_full_core_insert_breakpoint)
6827 (record_full_core_remove_breakpoint)
6828 (record_full_core_has_execution): Refactor
6829 as methods of the record_full_core_target class.
6830 (record_full_base_target::supports_delete_record): New.
6831 (init_record_full_ops): Delete.
6832 (init_record_full_core_ops): Delete.
6833 (record_full_save): Refactor as method of the
6834 record_full_base_target class.
6835 (_initialize_record_full): Remove references to
6836 init_record_full_ops and init_record_full_core_ops.
6838 * remote.c (remote_target, extended_remote_target): New classes.
6839 (remote_ops): Now a remote_target.
6840 (extended_remote_ops): Now an extended_remote_target.
6841 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6842 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6843 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6844 (remote_pass_signals, remote_set_syscall_catchpoint)
6845 (remote_program_signals, )
6846 (remote_thread_always_alive): Remove target_ops parameter.
6847 (remote_thread_alive, remote_thread_name)
6848 (remote_update_thread_list, remote_threads_extra_info)
6849 (remote_static_tracepoint_marker_at)
6850 (remote_static_tracepoint_markers_by_strid)
6851 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6852 (remote_open): Refactor as methods of remote_target.
6853 (extended_remote_open, extended_remote_detach)
6854 (extended_remote_attach, extended_remote_post_attach):
6855 (extended_remote_supports_disable_randomization)
6856 (extended_remote_create_inferior): : Refactor as method of
6857 extended_remote_target.
6858 (remote_set_permissions, remote_open_1, remote_detach)
6859 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6860 (remote_resume, remote_commit_resume, remote_stop)
6861 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6862 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6863 (remote_prepare_to_store, remote_store_registers)
6864 (remote_flash_erase, remote_flash_done, remote_files_info)
6865 (remote_kill, remote_mourn, remote_insert_breakpoint)
6866 (remote_remove_breakpoint, remote_insert_watchpoint)
6867 (remote_watchpoint_addr_within_range)
6868 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6869 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6870 (remote_supports_stopped_by_sw_breakpoint)
6871 (remote_stopped_by_hw_breakpoint)
6872 (remote_supports_stopped_by_hw_breakpoint)
6873 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6874 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6875 (remote_verify_memory): Refactor as methods of remote_target.
6876 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6878 (remote_xfer_partial, remote_get_memory_xfer_limit)
6879 (remote_search_memory, remote_rcmd, remote_memory_map)
6880 (remote_pid_to_str, remote_get_thread_local_address)
6881 (remote_get_tib_address, remote_read_description): Refactor as
6882 methods of remote_target.
6883 (remote_target::fileio_open, remote_target::fileio_pwrite)
6884 (remote_target::fileio_pread, remote_target::fileio_close): New.
6885 (remote_hostio_readlink, remote_hostio_fstat)
6886 (remote_filesystem_is_local, remote_can_execute_reverse)
6887 (remote_supports_non_stop, remote_supports_disable_randomization)
6888 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6889 (remote_supports_enable_disable_tracepoint)
6890 (remote_supports_string_tracing)
6891 (remote_can_run_breakpoint_commands, remote_trace_init)
6892 (remote_download_tracepoint, remote_can_download_tracepoint)
6893 (remote_download_trace_state_variable, remote_enable_tracepoint)
6894 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6895 (remote_trace_start, remote_get_trace_status)
6896 (remote_get_tracepoint_status, remote_trace_stop)
6897 (remote_trace_find, remote_get_trace_state_variable_value)
6898 (remote_save_trace_data, remote_get_raw_trace_data)
6899 (remote_set_disconnected_tracing, remote_core_of_thread)
6900 (remote_set_circular_trace_buffer, remote_traceframe_info)
6901 (remote_get_min_fast_tracepoint_insn_len)
6902 (remote_set_trace_buffer_size, remote_set_trace_notes)
6903 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6904 (remote_disable_btrace, remote_teardown_btrace)
6905 (remote_read_btrace, remote_btrace_conf)
6906 (remote_augmented_libraries_svr4_read, remote_load)
6907 (remote_pid_to_exec_file, remote_can_do_single_step)
6908 (remote_execution_direction, remote_thread_handle_to_thread_info):
6909 Refactor as methods of remote_target.
6910 (init_remote_ops, init_extended_remote_ops): Delete.
6911 (remote_can_async_p, remote_is_async_p, remote_async)
6912 (remote_thread_events, remote_upload_tracepoints)
6913 (remote_upload_trace_state_variables): Refactor as methods of
6915 (_initialize_remote): Remove references to init_remote_ops and
6916 init_extended_remote_ops.
6918 * remote-sim.c (gdbsim_target): New class.
6919 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6920 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6921 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6922 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6923 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6924 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6925 Refactor as methods of gdbsim_target.
6926 (gdbsim_ops): Now a gdbsim_target.
6927 (init_gdbsim_ops): Delete.
6928 (gdbsim_cntrl_c): Adjust.
6929 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6931 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6932 (the_amd64_linux_nat_target): New.
6933 (amd64_linux_fetch_inferior_registers)
6934 (amd64_linux_store_inferior_registers): Refactor as methods of
6935 amd64_linux_nat_target.
6936 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6937 * i386-linux-nat.c: Don't include "linux-nat.h".
6938 (i386_linux_nat_target): New class.
6939 (the_i386_linux_nat_target): New.
6940 (i386_linux_fetch_inferior_registers)
6941 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6942 as methods of i386_linux_nat_target.
6943 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6944 * inf-child.c (inf_child_ops): Delete.
6945 (inf_child_fetch_inferior_registers)
6946 (inf_child_store_inferior_registers): Delete.
6947 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6948 methods of inf_child_target.
6949 (inf_child_target::supports_terminal_ours)
6950 (inf_child_target::terminal_init)
6951 (inf_child_target::terminal_inferior)
6952 (inf_child_target::terminal_ours_for_output)
6953 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6954 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6956 (inf_child_open, inf_child_disconnect, inf_child_close)
6957 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6958 (inf_child_post_startup_inferior, inf_child_can_run)
6959 (inf_child_pid_to_exec_file): Refactor as methods of
6961 (inf_child_follow_fork): Delete.
6962 (inf_child_target::can_create_inferior)
6963 (inf_child_target::can_attach): New.
6964 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6965 (inf_child_target::has_stack, inf_child_target::has_registers)
6966 (inf_child_target::has_execution): New.
6967 (inf_child_fileio_open, inf_child_fileio_pwrite)
6968 (inf_child_fileio_pread, inf_child_fileio_fstat)
6969 (inf_child_fileio_close, inf_child_fileio_unlink)
6970 (inf_child_fileio_readlink, inf_child_use_agent)
6971 (inf_child_can_use_agent): Refactor as methods of
6973 (return_zero, inf_child_target): Delete.
6974 (inf_child_target::inf_child_target): New.
6975 * inf-child.h: Include "target.h".
6976 (inf_child_target): Delete function prototype.
6977 (inf_child_target): New class.
6978 (inf_child_open_target, inf_child_mourn_inferior)
6979 (inf_child_maybe_unpush_target): Delete.
6980 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6981 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6982 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6983 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6984 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6985 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6986 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6987 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6988 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6989 methods of inf_ptrace_target.
6990 (inf_ptrace_target): Delete function.
6991 * inf-ptrace.h: Include "inf-child.h".
6992 (inf_ptrace_target): Delete function declaration.
6993 (inf_ptrace_target): New class.
6994 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6995 * linux-nat.c (linux_target): New.
6996 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6997 (linux_nat_target::~linux_nat_target): New.
6998 (linux_child_post_attach, linux_child_post_startup_inferior)
6999 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7000 (linux_child_remove_fork_catchpoint)
7001 (linux_child_insert_vfork_catchpoint)
7002 (linux_child_remove_vfork_catchpoint)
7003 (linux_child_insert_exec_catchpoint)
7004 (linux_child_remove_exec_catchpoint)
7005 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7006 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7007 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7008 (linux_nat_stopped_data_address)
7009 (linux_nat_stopped_by_sw_breakpoint)
7010 (linux_nat_supports_stopped_by_sw_breakpoint)
7011 (linux_nat_stopped_by_hw_breakpoint)
7012 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7013 (linux_nat_kill, linux_nat_mourn_inferior)
7014 (linux_nat_xfer_partial, linux_nat_thread_alive)
7015 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7016 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7017 (linux_child_static_tracepoint_markers_by_strid)
7018 (linux_nat_is_async_p, linux_nat_can_async_p)
7019 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7020 (linux_nat_supports_multi_process)
7021 (linux_nat_supports_disable_randomization, linux_nat_async)
7022 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7023 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7024 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7025 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7026 methods of linux_nat_target.
7027 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7028 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7030 (check_stopped_by_watchpoint): Adjust.
7031 (linux_xfer_partial): Delete.
7032 (linux_target_install_ops, linux_target, linux_nat_add_target):
7034 (linux_nat_target::linux_nat_target): New.
7035 * linux-nat.h: Include "inf-ptrace.h".
7036 (linux_nat_target): New.
7037 (linux_target, linux_target_install_ops, linux_nat_add_target):
7038 Delete function declarations.
7039 (linux_target): Declare global.
7040 * linux-thread-db.c (thread_db_target): New.
7041 (thread_db_target::thread_db_target): New.
7042 (thread_db_ops): Delete.
7043 (the_thread_db_target): New.
7044 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7045 (thread_db_update_thread_list, thread_db_pid_to_str)
7046 (thread_db_extra_thread_info)
7047 (thread_db_thread_handle_to_thread_info)
7048 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7049 (thread_db_resume): Refactor as methods of thread_db_target.
7050 (init_thread_db_ops): Delete.
7051 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7052 * x86-linux-nat.c: Don't include "linux-nat.h".
7053 (super_post_startup_inferior): Delete.
7054 (x86_linux_nat_target::~x86_linux_nat_target): New.
7055 (x86_linux_child_post_startup_inferior)
7056 (x86_linux_read_description, x86_linux_enable_btrace)
7057 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7058 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7059 methods of x86_linux_nat_target.
7060 (x86_linux_create_target): Delete. Bits folded ...
7061 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7063 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7064 (x86_linux_nat_target): New class.
7065 (x86_linux_create_target): Delete.
7066 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7067 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7068 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7069 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7070 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7071 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7073 (x86_use_watchpoints): Delete.
7074 * x86-nat.h: Include "breakpoint.h" and "target.h".
7075 (x86_use_watchpoints): Delete.
7076 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7077 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7078 (x86_insert_watchpoint, x86_remove_watchpoint)
7079 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7080 (x86_stopped_by_hw_breakpoint): New declarations.
7081 (x86_nat_target): New template class.
7083 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7084 (the_ppc_linux_nat_target): New.
7085 (ppc_linux_fetch_inferior_registers)
7086 (ppc_linux_can_use_hw_breakpoint)
7087 (ppc_linux_region_ok_for_hw_watchpoint)
7088 (ppc_linux_ranged_break_num_registers)
7089 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7090 (ppc_linux_insert_mask_watchpoint)
7091 (ppc_linux_remove_mask_watchpoint)
7092 (ppc_linux_can_accel_watchpoint_condition)
7093 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7094 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7095 (ppc_linux_watchpoint_addr_within_range)
7096 (ppc_linux_masked_watch_num_registers)
7097 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7098 (ppc_linux_read_description): Refactor as methods of
7099 ppc_linux_nat_target.
7100 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7102 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7103 (procfs_target): New class.
7104 (the_procfs_target): New.
7105 (procfs_target): Delete function.
7106 (procfs_auxv_parse, procfs_attach, procfs_detach)
7107 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7108 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7109 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7110 (procfs_create_inferior, procfs_update_thread_list)
7111 (procfs_thread_alive, procfs_pid_to_str)
7112 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7113 (procfs_stopped_data_address, procfs_insert_watchpoint)
7114 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7115 (proc_find_memory_regions, procfs_info_proc)
7116 (procfs_make_note_section): Refactor as methods of procfs_target.
7117 (_initialize_procfs): Adjust.
7118 * sol-thread.c (sol_thread_target): New class.
7119 (sol_thread_ops): Now a sol_thread_target.
7120 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7121 (sol_thread_fetch_registers, sol_thread_store_registers)
7122 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7123 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7124 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7125 (init_sol_thread_ops): Delete.
7126 (_initialize_sol_thread): Adjust. Remove references to
7127 init_sol_thread_ops and complete_target_initialization.
7129 * windows-nat.c (windows_nat_target): New class.
7130 (windows_fetch_inferior_registers)
7131 (windows_store_inferior_registers, windows_resume, windows_wait)
7132 (windows_attach, windows_detach, windows_pid_to_exec_file)
7133 (windows_files_info, windows_create_inferior)
7134 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7135 (windows_close, windows_pid_to_str, windows_xfer_partial)
7136 (windows_get_tib_address, windows_get_ada_task_ptid)
7137 (windows_thread_name, windows_thread_alive): Refactor as
7138 windows_nat_target methods.
7139 (do_initial_windows_stuff): Adjust.
7140 (windows_target): Delete function.
7141 (_initialize_windows_nat): Adjust.
7143 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7144 (darwin_mourn_inferior, darwin_kill_inferior)
7145 (darwin_create_inferior, darwin_attach, darwin_detach)
7146 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7147 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7148 (darwin_supports_multi_process): Refactor as darwin_nat_target
7150 (darwin_resume_to, darwin_files_info): Delete.
7151 (_initialize_darwin_inferior): Rename to ...
7152 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7153 * darwin-nat.h: Include "inf-child.h".
7154 (darwin_nat_target): New class.
7155 (darwin_complete_target): Delete.
7156 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7157 (darwin_target): New.
7158 (i386_darwin_fetch_inferior_registers)
7159 (i386_darwin_store_inferior_registers): Refactor as methods of
7161 (darwin_complete_target): Delete, with ...
7162 (_initialize_i386_darwin_nat): ... bits factored out here.
7164 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7165 (the_alpha_linux_nat_target): New.
7166 (alpha_linux_register_u_offset): Refactor as
7167 alpha_linux_nat_target method.
7168 (_initialize_alpha_linux_nat): Adjust.
7169 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7170 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7171 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7172 methods of linux_nat_trad_target.
7173 (linux_trad_target): Delete.
7174 * linux-nat-trad.h (linux_trad_target): Delete function.
7175 (linux_nat_trad_target): New class.
7176 * mips-linux-nat.c (mips_linux_nat_target): New class.
7177 (super_fetch_registers, super_store_registers, super_close):
7179 (the_mips_linux_nat_target): New.
7180 (mips64_linux_regsets_fetch_registers)
7181 (mips64_linux_regsets_store_registers)
7182 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7183 (mips_linux_register_u_offset, mips_linux_read_description)
7184 (mips_linux_can_use_hw_breakpoint)
7185 (mips_linux_stopped_by_watchpoint)
7186 (mips_linux_stopped_data_address)
7187 (mips_linux_region_ok_for_hw_watchpoint)
7188 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7189 (mips_linux_close): Refactor as methods of mips_linux_nat.
7190 (_initialize_mips_linux_nat): Adjust to C++ification.
7192 * aix-thread.c (aix_thread_target): New class.
7193 (aix_thread_ops): Now an aix_thread_target.
7194 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7195 (aix_thread_fetch_registers, aix_thread_store_registers)
7196 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7197 (aix_thread_thread_alive, aix_thread_pid_to_str)
7198 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7199 Refactor as methods of aix_thread_target.
7200 (init_aix_thread_ops): Delete.
7201 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7202 and complete_target_initialization.
7203 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7204 (rs6000_nat_target): New class.
7205 (the_rs6000_nat_target): New.
7206 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7207 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7208 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7209 (super_create_inferior): Delete.
7210 (_initialize_rs6000_nat): Adjust to C++ification.
7212 * arm-linux-nat.c (arm_linux_nat_target): New class.
7213 (the_arm_linux_nat_target): New.
7214 (arm_linux_fetch_inferior_registers)
7215 (arm_linux_store_inferior_registers, arm_linux_read_description)
7216 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7217 (arm_linux_remove_hw_breakpoint)
7218 (arm_linux_region_ok_for_hw_watchpoint)
7219 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7220 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7221 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7222 arm_linux_nat_target.
7223 (_initialize_arm_linux_nat): Adjust to C++ification.
7225 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7226 (the_aarch64_linux_nat_target): New.
7227 (aarch64_linux_fetch_inferior_registers)
7228 (aarch64_linux_store_inferior_registers)
7229 (aarch64_linux_child_post_startup_inferior)
7230 (aarch64_linux_read_description)
7231 (aarch64_linux_can_use_hw_breakpoint)
7232 (aarch64_linux_insert_hw_breakpoint)
7233 (aarch64_linux_remove_hw_breakpoint)
7234 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7235 (aarch64_linux_region_ok_for_hw_watchpoint)
7236 (aarch64_linux_stopped_data_address)
7237 (aarch64_linux_stopped_by_watchpoint)
7238 (aarch64_linux_watchpoint_addr_within_range)
7239 (aarch64_linux_can_do_single_step): Refactor as methods of
7240 aarch64_linux_nat_target.
7241 (super_post_startup_inferior): Delete.
7242 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7244 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7245 (the_hppa_linux_nat_target): New.
7246 (hppa_linux_fetch_inferior_registers)
7247 (hppa_linux_store_inferior_registers): Refactor as methods of
7248 hppa_linux_nat_target.
7249 (_initialize_hppa_linux_nat): Adjust to C++ification.
7251 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7252 (the_ia64_linux_nat_target): New.
7253 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7254 (ia64_linux_stopped_data_address)
7255 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7256 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7257 ia64_linux_nat_target methods.
7258 (super_xfer_partial): Delete.
7259 (_initialize_ia64_linux_nat): Adjust to C++ification.
7261 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7262 (the_m32r_linux_nat_target): New.
7263 (m32r_linux_fetch_inferior_registers)
7264 (m32r_linux_store_inferior_registers): Refactor as
7265 m32r_linux_nat_target methods.
7266 (_initialize_m32r_linux_nat): Adjust to C++ification.
7268 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7269 (the_m68k_linux_nat_target): New.
7270 (m68k_linux_fetch_inferior_registers)
7271 (m68k_linux_store_inferior_registers): Refactor as
7272 m68k_linux_nat_target methods.
7273 (_initialize_m68k_linux_nat): Adjust to C++ification.
7275 * s390-linux-nat.c (s390_linux_nat_target): New class.
7276 (the_s390_linux_nat_target): New.
7277 (s390_linux_fetch_inferior_registers)
7278 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7279 (s390_insert_watchpoint, s390_remove_watchpoint)
7280 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7281 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7282 (s390_auxv_parse, s390_read_description): Refactor as methods of
7283 s390_linux_nat_target.
7284 (_initialize_s390_nat): Adjust to C++ification.
7286 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7287 (the_sparc_linux_nat_target): New.
7288 (_initialize_sparc_linux_nat): Adjust to C++ification.
7289 * sparc-nat.c (sparc_fetch_inferior_registers)
7290 (sparc_store_inferior_registers): Remove target_ops parameter.
7291 * sparc-nat.h (sparc_fetch_inferior_registers)
7292 (sparc_store_inferior_registers): Remove target_ops parameter.
7293 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7294 (the_sparc64_linux_nat_target): New.
7295 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7297 * spu-linux-nat.c (spu_linux_nat_target): New class.
7298 (the_spu_linux_nat_target): New.
7299 (spu_child_post_startup_inferior, spu_child_post_attach)
7300 (spu_child_wait, spu_fetch_inferior_registers)
7301 (spu_store_inferior_registers, spu_xfer_partial)
7302 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7304 (_initialize_spu_nat): Adjust to C++ification.
7306 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7307 (the_tilegx_linux_nat_target): New.
7308 (fetch_inferior_registers, store_inferior_registers):
7309 Refactor as methods.
7310 (_initialize_tile_linux_nat): Adjust to C++ification.
7312 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7313 (the_xtensa_linux_nat_target): New.
7314 (xtensa_linux_fetch_inferior_registers)
7315 (xtensa_linux_store_inferior_registers): Refactor as
7316 xtensa_linux_nat_target methods.
7317 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7319 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7320 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7321 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7322 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7323 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7324 (fbsd_stopped_by_sw_breakpoint)
7325 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7326 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7327 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7328 (fbsd_post_startup_inferior, fbsd_post_attach)
7329 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7330 (fbsd_set_syscall_catchpoint)
7331 (super_xfer_partial, super_resume, super_wait)
7332 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7333 (fbsd_handle_debug_trap): Remove target_ops parameter.
7334 (fbsd_nat_add_target): Delete.
7335 * fbsd-nat.h: Include "inf-ptrace.h".
7336 (fbsd_nat_add_target): Delete.
7337 (USE_SIGTRAP_SIGINFO): Define.
7338 (fbsd_nat_target): New class.
7340 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7341 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7342 (amd64bsd_target): Delete.
7343 * amd64-bsd-nat.h: New file.
7344 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7346 (amd64_fbsd_nat_target): New class.
7347 (the_amd64_fbsd_nat_target): New.
7348 (amd64fbsd_read_description): Refactor as method of
7349 amd64_fbsd_nat_target.
7350 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7351 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7352 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7353 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7354 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7355 (i386bsd_target): Delete.
7356 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7357 (i386bsd_fetch_inferior_registers)
7358 (i386bsd_store_inferior_registers): Declare.
7359 (i386_bsd_nat_target): New class.
7360 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7361 (the_i386_fbsd_nat_target): New.
7362 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7363 i386_fbsd_nat_target methods.
7364 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7365 (_initialize_i386fbsd_nat): Adjust to C++ification.
7366 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7367 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7368 (_initialize_x86_bsd_nat): Adjust to C++ification.
7369 * x86-bsd-nat.h: Include "x86-nat.h".
7370 (x86bsd_target): Delete declaration.
7371 (x86bsd_nat_target): New class.
7373 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7374 (the_aarch64_fbsd_nat_target): New.
7375 (aarch64_fbsd_fetch_inferior_registers)
7376 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7377 aarch64_fbsd_nat_target.
7378 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7379 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7380 (the_alpha_bsd_nat_target): New.
7381 (alphabsd_fetch_inferior_registers)
7382 (alphabsd_store_inferior_registers): Refactor as
7383 alpha_bsd_nat_target methods.
7384 (_initialize_alphabsd_nat): Refactor as methods of
7385 alpha_bsd_nat_target.
7386 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7387 (the_amd64_nbsd_nat_target): New.
7388 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7389 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7390 (the_amd64_obsd_nat_target): New.
7391 (_initialize_amd64obsd_nat): Adjust to C++ification.
7392 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7393 (the_arm_fbsd_nat_target): New.
7394 (arm_fbsd_fetch_inferior_registers)
7395 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7396 (_initialize_arm_fbsd_nat): Refactor as methods of
7397 arm_fbsd_nat_target.
7398 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7399 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7400 (the_arm_netbsd_nat_target): New.
7401 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7402 arm_netbsd_nat_target.
7403 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7404 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7405 (the_hppa_nbsd_nat_target): New.
7406 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7407 hppa_nbsd_nat_target methods.
7408 (_initialize_hppanbsd_nat): Adjust to C++ification.
7409 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7410 (the_hppa_obsd_nat_target): New.
7411 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7412 methods of hppa_obsd_nat_target.
7413 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7415 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7416 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7418 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7419 (_initialize_i386obsd_nat): Use add_target.
7420 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7421 (the_m68k_bsd_nat_target): New.
7422 (m68kbsd_fetch_inferior_registers)
7423 (m68kbsd_store_inferior_registers): Refactor as methods of
7424 m68k_bsd_nat_target.
7425 (_initialize_m68kbsd_nat): Adjust to C++ification.
7426 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7427 (the_mips_fbsd_nat_target): New.
7428 (mips_fbsd_fetch_inferior_registers)
7429 (mips_fbsd_store_inferior_registers): Refactor as methods of
7430 mips_fbsd_nat_target.
7431 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7433 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7434 (the_mips_nbsd_nat_target): New.
7435 (mipsnbsd_fetch_inferior_registers)
7436 (mipsnbsd_store_inferior_registers): Refactor as methods of
7437 mips_nbsd_nat_target.
7438 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7439 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7440 (the_mips64_obsd_nat_target): New.
7441 (mips64obsd_fetch_inferior_registers)
7442 (mips64obsd_store_inferior_registers): Refactor as methods of
7443 mips64_obsd_nat_target.
7444 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7446 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7448 * nbsd-nat.h: Include "inf-ptrace.h".
7449 (nbsd_nat_target): New class.
7450 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7451 (obsd_wait): Refactor as methods of obsd_nat_target.
7452 (obsd_add_target): Delete.
7453 * obsd-nat.h: Include "inf-ptrace.h".
7454 (obsd_nat_target): New class.
7455 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7456 (the_ppc_fbsd_nat_target): New.
7457 (ppcfbsd_fetch_inferior_registers)
7458 (ppcfbsd_store_inferior_registers): Refactor as methods of
7459 ppc_fbsd_nat_target.
7460 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7462 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7463 (the_ppc_nbsd_nat_target): New.
7464 (ppcnbsd_fetch_inferior_registers)
7465 (ppcnbsd_store_inferior_registers): Refactor as methods of
7466 ppc_nbsd_nat_target.
7467 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7468 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7469 (the_ppc_obsd_nat_target): New.
7470 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7471 methods of ppc_obsd_nat_target.
7472 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7474 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7475 (the_sh_nbsd_nat_target): New.
7476 (shnbsd_fetch_inferior_registers)
7477 (shnbsd_store_inferior_registers): Refactor as methods of
7479 (_initialize_shnbsd_nat): Adjust to C++ification.
7480 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7481 (inf_ptrace_xfer_partial): Delete.
7482 (sparc_xfer_partial, sparc_target): Delete.
7483 * sparc-nat.h (sparc_fetch_inferior_registers)
7484 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7485 (sparc_target): Delete function declaration.
7486 (sparc_target): New template class.
7487 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7488 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7489 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7490 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7492 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7493 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7494 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7495 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7497 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7498 (the_vax_bsd_nat_target): New.
7499 (vaxbsd_fetch_inferior_registers)
7500 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7502 (_initialize_vaxbsd_nat): Adjust to C++ification.
7504 * bsd-kvm.c (bsd_kvm_target): New class.
7505 (bsd_kvm_ops): Now a bsd_kvm_target.
7506 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7507 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7508 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7510 (bsd_kvm_return_one): Delete.
7511 (bsd_kvm_add_target): Adjust to C++ification.
7513 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7514 (nto_procfs_target_procfs): New classes.
7515 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7516 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7517 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7518 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7519 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7520 (procfs_remove_hw_breakpoint, procfs_resume)
7521 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7522 (procfs_kill_inferior, procfs_store_registers)
7523 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7524 as methods of nto_procfs_target.
7525 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7526 (nto_native_ops): Delete.
7527 (procfs_open, procfs_native_open): Delete.
7528 (nto_native_ops): Now an nto_procfs_target_native.
7529 (init_procfs_targets): Adjust to C++ification.
7530 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7531 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7532 Refactor as methods of nto_procfs_target.
7534 * go32-nat.c (go32_nat_target): New class.
7535 (the_go32_nat_target): New.
7536 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7537 (go32_store_registers, go32_xfer_partial, go32_files_info)
7538 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7539 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7540 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7541 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7542 (go32_target): Delete.
7543 (_initialize_go32_nat): Adjust to C++ification.
7545 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7546 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7547 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7548 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7550 (gnu_target): Delete.
7551 * gnu-nat.h (gnu_target): Delete.
7552 (gnu_nat_target): New class.
7553 * i386-gnu-nat.c (gnu_base_target): New.
7554 (i386_gnu_nat_target): New class.
7555 (the_i386_gnu_nat_target): New.
7556 (_initialize_i386gnu_nat): Adjust to C++ification.
7558 2018-05-02 Pedro Alves <palves@redhat.com>
7560 * bfd-target.c (target_bfd_xclose): Rename to ...
7561 (target_bfd_close): ... this.
7562 (target_bfd_reopen): Adjust.
7563 * target.c (target_close): Remove references to to_xclose.
7564 * target.h (target_ops::to_xclose): Delete.
7565 (target_ops::to_close): Update comments.
7567 2018-05-02 Pedro Alves <palves@redhat.com>
7569 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7571 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7572 * inf-ptrace.c (inf_ptrace_register_u_offset)
7573 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7574 (inf_ptrace_store_register, inf_ptrace_store_registers)
7575 (inf_ptrace_trad_target): Move to ...
7576 * linux-nat-trad.c: ... this new file.
7577 * linux-nat-trad.h: New file.
7578 * linux-nat.c (linux_target_install_ops): Make extern.
7579 (linux_trad_target): Delete.
7580 * linux-nat.h (linux_trad_target): Delete declaration.
7581 (linux_target_install_ops): Declare.
7582 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7585 2018-05-02 Pedro Alves <palves@redhat.com>
7587 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7588 procfs_target/add_target here.
7589 * procfs.c (procfs_target): Make static.
7590 (_initialize_procfs): Call add_target here.
7591 * procfs.h (struct target_ops): Remove forward declaration.
7592 (procfs_target): Remove declaration.
7593 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7595 2018-05-02 Pedro Alves <palves@redhat.com>
7597 * procfs.c (procfs_stopped_by_watchpoint)
7598 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7599 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7601 (procfs_use_watchpoints): Delete, move contents...
7602 (procfs_target): ... here.
7603 * procfs.h (procfs_use_watchpoints): Delete declaration.
7604 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7605 procfs_use_watchpoints.
7606 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7607 procfs_use_watchpoints.
7609 2018-05-02 Tom Tromey <tom@tromey.com>
7612 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7613 and var_zuinteger_unlimited.
7614 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7615 and PARAM_ZUINTEGER_UNLIMITED.
7616 (set_parameter_value): Handle var_zuinteger and
7617 var_zuinteger_unlimited.
7618 (add_setshow_generic): Likewise.
7619 (parmpy_init): Likewise.
7621 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7624 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7625 pointer is not null before dereferencing it.
7627 2018-04-30 Tom Tromey <tom@tromey.com>
7629 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7632 2018-04-30 Tom Tromey <tom@tromey.com>
7634 * breakpoint.c (mention): Remove use of is_mi_like_p.
7635 (print_mention_ranged_breakpoint): Likewise.
7636 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7639 2018-04-30 Tom Tromey <tom@tromey.com>
7641 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7643 2018-04-30 Tom Tromey <tom@tromey.com>
7645 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7646 (info_spu_event_command): Remove some uses of is_mi_like_p.
7648 2018-04-30 Tom Tromey <tom@tromey.com>
7650 * python/py-framefilter.c (py_print_single_arg)
7651 (enumerate_locals, py_print_args, py_print_frame): Remove some
7652 uses of is_mi_like_p.
7654 2018-04-30 Tom Tromey <tom@tromey.com>
7657 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7658 * ui-out.h (ui_out::is_mi_like_p): Now const.
7659 (ui_out::do_is_mi_like_p): Now const.
7660 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7662 2018-04-30 Tom Tromey <tom@tromey.com>
7664 * varobj.c (varobj_set_visualizer): Use new_reference.
7665 * python/python.c (gdbpy_decode_line): Use new_reference.
7666 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7669 2018-04-30 Tom Tromey <tom@tromey.com>
7671 * varobj.c (install_new_value): Use new_reference.
7672 * value.h (value_incref): Return void. Swap intro comment with
7674 * value.c (set_value_parent): Use new_reference.
7675 (value_incref): Return void. Update intro comment.
7676 (release_value): Use new_reference.
7677 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7679 2018-04-30 Tom Tromey <tom@tromey.com>
7681 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7682 * gdb_bfd.h (new_bfd_ref): Remove.
7683 (gdb_bfd_open): Update comment.
7684 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7685 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7686 (gdb_bfd_fdopenr): Use new_reference.
7687 * exec.c (exec_file_attach): Use new_reference.
7689 2018-04-30 Tom Tromey <tom@tromey.com>
7691 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7694 2018-04-30 Tom Tromey <tom@tromey.com>
7696 * jit.c (jit_read_code_entry): Use type_align.
7697 * i386-tdep.c (i386_gdbarch_init): Don't call
7698 set_gdbarch_long_long_align_bit.
7699 * gdbarch.sh: Remove long_long_align_bit.
7700 * gdbarch.c, gdbarch.h: Rebuild.
7701 * arc-tdep.c (arc_type_align): New function.
7702 (arc_gdbarch_init): Use arc_type_align. Don't call
7703 set_gdbarch_long_long_align_bit.
7705 2018-04-30 Tom Tromey <tom@tromey.com>
7707 * rust-lang.c (rust_type_alignment): Remove.
7708 (rust_composite_type): Use type_align.
7710 2018-04-30 Tom Tromey <tom@tromey.com>
7712 * NEWS: Mention Type.align.
7713 * python/py-type.c (typy_get_alignof): New function.
7714 (type_object_getset): Add "alignof".
7716 2018-04-30 Tom Tromey <tom@tromey.com>
7720 * std-operator.def (UNOP_ALIGNOF): New operator.
7721 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7723 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7724 * c-lang.c (c_op_print_tab): Add alignof.
7725 * c-exp.y (ALIGNOF): New token.
7726 (exp): Add "ALIGNOF" production.
7727 (ident_tokens): Add _Alignof and alignof.
7729 2018-04-30 Tom Tromey <tom@tromey.com>
7731 * i386-tdep.c (i386_type_align): New function.
7732 (i386_gdbarch_init): Update.
7733 * gdbarch.sh (type_align): New method.
7734 * gdbarch.c, gdbarch.h: Rebuild.
7735 * arch-utils.h (default_type_align): Declare.
7736 * arch-utils.c (default_type_align): New function.
7737 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7738 (struct type) <align_log2>: New field.
7739 <instance_flags>: Now a bitfield.
7740 (TYPE_RAW_ALIGN): New macro.
7741 (type_align, type_raw_align, set_type_align): Declare.
7742 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7744 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7745 (get_alignment, maybe_set_alignment): New functions.
7746 (read_structure_type, read_enumeration_type, read_array_type)
7747 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7748 (read_subrange_type, read_base_type): Set type alignment.
7750 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7752 * dwarf2read.c (read_index_from_section): Use bool.
7754 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7757 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7760 2018-04-29 John Reiser <jreiser@BitWagon.com>
7763 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7764 last step, and do it atomically.
7766 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7768 * compile/compile-c-types.c (convert_int, convert_float):
7771 2018-04-27 Tom Tromey <tom@tromey.com>
7774 * rust-lang.c (rust_inclusive_range_type_p): New function.
7775 (rust_range): Handle inclusive ranges.
7776 (rust_compute_range): Likewise.
7777 * rust-exp.y (struct rust_op) <inclusive>: New field.
7778 (DOTDOTEQ): New constant.
7779 (range_expr): Add "..=" productions.
7780 (operator_tokens): Add "..=" token.
7781 (ast_range): Add "inclusive" parameter.
7782 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7784 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7786 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7787 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7789 * expprint.c (print_subexp_standard): Handle new bounds values.
7790 (dump_subexp_body_standard): Likewise.
7792 2018-04-27 Tom Tromey <tom@tromey.com>
7794 * configure: Rebuild.
7795 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7796 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7798 (class symbol_needs_eval_context): Likewise.
7799 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7800 (mock_mapped_index::symbol_name_at): Use "override". Remove
7802 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7804 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7805 * aarch64-tdep.c (instruction_reader::read): Use "override".
7806 (instruction_reader_test::read): Likewise.
7807 * arm-tdep.c (instruction_reader::read): Use "override".
7808 (instruction_reader_thumb::read): Likewise.
7810 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7813 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7814 instead of remote_send.
7815 (remote_send): Remove.
7817 2018-04-26 Pedro Alves <palves@redhat.com>
7819 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7820 find_function_start_sal instead of find_pc_line.
7822 2018-04-26 Pedro Alves <palves@redhat.com>
7824 * breakpoint.c (set_breakpoint_location_function): Handle
7826 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7827 * elfread.c (elf_symtab_read): Give data symbols with
7828 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7829 (elf_rel_plt_read): Update comment.
7830 * linespec.c (convert_linespec_to_sals): Handle
7832 (minsym_found): Handle mst_data_gnu_ifunc.
7833 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7834 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7835 * parse.c (find_minsym_type_and_address): Handle
7837 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7838 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7839 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7841 <mst_data_gnu_ifunc>: New enumerator.
7843 2018-04-26 Pedro Alves <palves@redhat.com>
7845 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7846 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7847 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7849 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7850 (lookup_minimal_symbol_by_pc): Adjust.
7851 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7852 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7853 * minsyms.h (lookup_msym_prefer): New enum.
7854 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7855 parameter by a lookup_msym_prefer parameter.
7857 2018-04-26 Pedro Alves <palves@redhat.com>
7859 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7860 ends in "@plt" instead of looking at the symbol's section.
7862 2018-04-26 Pedro Alves <palves@redhat.com>
7864 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7866 (find_pc_partial_function_gnu_ifunc): Rename to ...
7867 (find_pc_partial_function): ... this, and remove references to
7869 (find_pc_partial_function): Delete old implementation.
7870 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7872 2018-04-26 Pedro Alves <palves@redhat.com>
7874 * linespec.c (struct bound_minimal_symbol_search_key): New.
7875 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7876 skip first line if we found a GNU ifunc minimal symbol by name.
7877 (compare_msymbols): Change parameters to work with a destructured
7879 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7882 2018-04-26 Pedro Alves <palves@redhat.com>
7884 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7885 ifunc targets here. Instead, if we have an ifunc minsym, use its
7887 (add_location_to_breakpoint): Store the minsym and the objfile in
7888 the breakpoint location.
7889 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7890 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7891 Record the minsym in the sal.
7892 * symtab.h (symtab_and_line) <msymbol>: New field.
7894 2018-04-26 Pedro Alves <palves@redhat.com>
7896 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7897 unless we actually resolved the ifunc.
7899 2018-04-26 Pedro Alves <palves@redhat.com>
7901 * c-exp.y (variable production): Prefer ifunc minsyms over
7902 regular function symbols.
7903 * symtab.c (find_gnu_ifunc): New function.
7904 * minsyms.h (lookup_msym_prefer): New enum.
7905 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7906 parameter by a lookup_msym_prefer parameter.
7907 * symtab.h (find_gnu_ifunc): New declaration.
7909 2018-04-26 Pedro Alves <palves@redhat.com>
7911 * blockframe.c (find_gnu_ifunc_target_type): New function.
7912 (find_function_type): New.
7913 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7914 return a value with a memory address.
7915 (eval_call): For calls to GNU ifunc functions, try to find the
7916 type of the target function from the type that the resolver
7918 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7920 * infcall.c (find_function_return_type): Delete.
7921 (find_function_addr): Add 'function_type' parameter. For calls to
7922 GNU ifunc functions, try to find the type of the target function
7923 from the type that the resolver returns, and return it via
7925 (call_function_by_hand_dummy): Adjust to use the function type
7926 returned by find_function_addr.
7927 (find_function_addr): Add 'function_type' parameter and move
7929 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7932 2018-04-26 Pedro Alves <palves@redhat.com>
7934 * c-exp.y (variable production): Skip finding an alias for ifunc
7937 2018-04-26 Pedro Alves <palves@redhat.com>
7939 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7941 2018-04-25 Pedro Alves <palves@redhat.com>
7943 * infcmd.c (kill_command): Print the pid as string, not the whole
7944 thread's ptid. Add comment. s/has been killed/killed/ in output
7946 * remote.c (remote_detach_1): Print the pid as string, not the
7947 whole thread's ptid.
7949 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7950 Sergio Durigan Junior <sergiodj@redhat.com>
7951 Pedro Alves <palves@redhat.com>
7953 * infcmd.c (kill_command): Print message when inferior has
7955 * inferior.c (print_inferior_events): Remove 'static'. Set as
7957 (add_inferior): Improve message printed when
7958 'print_inferior_events' is on.
7959 (exit_inferior): Remove message printed when
7960 'print_inferior_events' is on.
7961 (detach_inferior): Improve message printed when
7962 'print_inferior_events' is on.
7963 (initialize_inferiors): Use 'add_inferior_silent' to set
7964 'current_inferior_'.
7965 * inferior.h (print_inferior_events): Declare here as
7967 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7968 '[Detaching...]' messages when 'print_inferior_events' is on.
7969 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7970 as prefix/suffix for messages. Remove periods. Fix erroneous
7971 'Detaching after fork from child...', replace it by '... from
7973 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7974 prefix/suffix when printing 'Detaching...' messages. Print
7975 them when 'print_inferior_events' is on.
7976 * remote.c (remote_detach_1): Print message when detaching
7977 from inferior and '!is_fork_parent'.
7979 2018-04-24 Tom Tromey <tom@tromey.com>
7981 * cli-out.h: Reindent.
7983 2018-04-24 Tom Tromey <tom@tromey.com>
7985 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7986 (cli_ui_out::do_field_string): Use fputs_filtered.
7987 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7989 2018-04-23 Tom Tromey <tom@tromey.com>
7991 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7992 gdb::unique_xmalloc_ptr.
7994 2018-04-23 Tom Tromey <tom@tromey.com>
7996 * configure: Rebuild.
7998 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8001 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8002 prepare_for_testing. Set normal_bp to r_debug_state if target
8005 2018-04-21 Pedro Alves <palves@redhat.com>
8006 Rajendra SY <rajendra.sy@gmail.com>
8008 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8009 * remote.c (extended_remote_attach): In all-stop mode, mark the
8010 thread as executing.
8012 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8014 * thread.c (thread_apply_all_command): Fix comment.
8015 (thread_command): Fix comment.
8017 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8019 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8021 * features/aarch64-core.c (create_feature_aarch64_core):
8023 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8025 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8027 * features/i386/32bit-avx512.c
8028 (create_feature_i386_32bit_avx512): Likewise.
8029 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8031 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8033 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8035 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8037 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8039 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8041 * features/i386/64bit-avx512.c
8042 (create_feature_i386_64bit_avx512): Likewise.
8043 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8045 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8047 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8049 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8051 * features/i386/64bit-segments.c
8052 (create_feature_i386_64bit_segments): Likewise.
8053 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8055 * features/i386/x32-core.c
8056 (create_feature_i386_x32_core): Likewise.
8057 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8058 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8059 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8060 * target-descriptions.c: In generated code, don't pass xml
8063 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8065 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8066 (print_xml_feature::visit_post): Likewise.
8067 (print_xml_feature::visit): Likewise.
8068 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8069 (print_xml_feature): Add new class.
8070 * regformats/regdat.sh: Null xmltarget on feature targets.
8071 * target-descriptions.c (struct target_desc): Add xmltarget.
8072 (maintenance_check_tdesc_xml_convert): Add unittest function.
8073 (tdesc_get_features_xml): Add function to get xml.
8074 (maintenance_check_xml_descriptions): Test xml generation.
8075 * xml-tdesc.c (string_read_description_xml): Add function.
8076 * xml-tdesc.h (string_read_description_xml): Add declaration.
8078 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8080 * features/Makefile: Add feature marker to targets with new style
8081 target descriptions.
8082 * regformats/aarch64.dat: Regenerate.
8083 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8084 * regformats/i386/amd64-avx-linux.dat: Likewise.
8085 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8086 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8087 * regformats/i386/amd64-linux.dat: Likewise.
8088 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8089 * regformats/i386/amd64.dat: Likewise.
8090 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8091 * regformats/i386/i386-avx-linux.dat: Likewise.
8092 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8093 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8094 * regformats/i386/i386-linux.dat: Likewise.
8095 * regformats/i386/i386-mmx-linux.dat: Likewise.
8096 * regformats/i386/i386-mpx-linux.dat: Likewise.
8097 * regformats/i386/i386.dat: Likewise.
8098 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8099 * regformats/i386/x32-avx-linux.dat: Likewise.
8100 * regformats/i386/x32-linux.dat: Likewise.
8101 * regformats/tic6x-c62x-linux.dat: Likewise.
8102 * regformats/tic6x-c64x-linux.dat: Likewise.
8103 * regformats/tic6x-c64xp-linux.dat: Likewise.
8104 * regformats/regdat.sh: Parse feature marker.
8106 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8108 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8109 (tdesc_osabi_name): Likewise.
8110 * target-descriptions.c (tdesc_architecture_name): Add new
8112 (tdesc_osabi_name): Likewise.
8114 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8116 * common/tdesc.c (tdesc_predefined_type): Move to here.
8117 (tdesc_named_type): Likewise.
8118 (tdesc_create_vector): Likewise.
8119 (tdesc_create_struct): Likewise.
8120 (tdesc_set_struct_size): Likewise.
8121 (tdesc_create_union): Likewise.
8122 (tdesc_create_flags): Likewise.
8123 (tdesc_create_enum): Likewise.
8124 (tdesc_add_field): Likewise.
8125 (tdesc_add_typed_bitfield): Likewise.
8126 (tdesc_add_bitfield): Likewise.
8127 (tdesc_add_flag): Likewise.
8128 (tdesc_add_enum_value): Likewise.
8129 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8130 (struct tdesc_type_vector): Likewise.
8131 (struct tdesc_type_field): Likewise.
8132 (struct tdesc_type_with_fields): Likewise.
8133 (tdesc_create_enum): Add declaration.
8134 (tdesc_add_typed_bitfield): Likewise.
8135 (tdesc_add_enum_value): Likewise.
8136 * target-descriptions.c (tdesc_type_field): Move from here.
8137 (tdesc_type_builtin): Likewise.
8138 (tdesc_type_vector): Likewise.
8139 (tdesc_type_with_fields): Likewise.
8140 (tdesc_predefined_types): Likewise.
8141 (tdesc_named_type): Likewise.
8142 (tdesc_create_vector): Likewise.
8143 (tdesc_create_struct): Likewise.
8144 (tdesc_set_struct_size): Likewise.
8145 (tdesc_create_union): Likewise.
8146 (tdesc_create_flags): Likewise.
8147 (tdesc_create_enum): Likewise.
8148 (tdesc_add_field): Likewise.
8149 (tdesc_add_typed_bitfield): Likewise.
8150 (tdesc_add_bitfield): Likewise.
8151 (tdesc_add_flag): Likewise.
8152 (tdesc_add_enum_value): Likewise.
8153 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8154 (tdesc_add_typed_bitfield): Likewise.
8155 (tdesc_add_enum_value): Likewise.
8157 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8159 * common/tdesc.c (tdesc_feature::accept): Move to here.
8160 (tdesc_feature::operator==): Likewise.
8161 (tdesc_create_reg): Likewise.
8162 * common/tdesc.h (tdesc_type_kind): Likewise.
8163 (struct tdesc_type): Likewise.
8164 (struct tdesc_feature): Likewise.
8165 * regformats/regdat.sh: Create a feature.
8166 * target-descriptions.c (tdesc_type_kind): Move from here.
8167 (tdesc_type): Likewise.
8168 (tdesc_type_up): Likewise.
8169 (tdesc_feature): Likewise.
8170 (tdesc_create_reg): Likewise.
8172 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8174 * Makefile.in: Add arch/tdesc.c
8175 * common/tdesc.c: New file.
8176 * common/tdesc.h (tdesc_element_visitor): Move to here.
8177 (tdesc_element): Likewise.
8178 (tdesc_reg): Likewise.
8179 (tdesc_reg_up): Likewise.
8180 * regformats/regdef.h (reg): Add offset to constructors.
8181 * target-descriptions.c (tdesc_element_visitor): Move from here.
8182 (tdesc_element): Likewise.
8183 (tdesc_reg): Likewise.
8184 (tdesc_reg_up): Likewise.
8186 2018-04-17 Tom Tromey <tom@tromey.com>
8188 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8191 2018-04-17 Tom Tromey <tom@tromey.com>
8193 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8195 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8197 * symtab.c (print_symbol_info): Skip printing filename and line
8198 number when `last' is NULL.
8199 (symtab_symbol_info): Use empty string instead of NULL for first
8200 invocation of print_symbol_info.
8201 (rbreak_command): Pass NULL to `last' parameter of
8204 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8206 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8209 2018-04-16 Pedro Alves <palves@redhat.com>
8211 * MAINTAINERS (sh): Remove.
8212 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8213 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8214 (ALLDEPFILES): Remove sh64-tdep.c.
8215 * NEWS: Mentions that support for SH-5/SH64 is removed.
8216 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8217 (sh*-*-openbsd*): Ditto.
8218 (sh64-*-elf*): Remove.
8220 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8221 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8222 * sh-tdep.c: No longer include "sh64-tdep.h".
8223 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8224 * sh64-tdep.c, sh64-tdep.h: Remove files.
8226 2018-04-16 Pedro Alves <palves@redhat.com>
8228 * MAINTAINERS: Remove m88k.
8229 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8230 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8231 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8232 * NEWS: Mention that support for m88k was removed.
8233 * configure.host (m88*-*-*): Remove support.
8234 * configure.nat (m88k-*-*): Remove support.
8235 * configure.tgt (m88*-*-openbsd*): Remove.
8236 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8238 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8240 * configure.tgt (x86_tobjs): New variable.
8241 (amd64_tobjs, i386_tobjs): Use it.
8243 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8245 * symtab.c (print_symbol_info): Precede the symbol definition by
8246 the line number when available.
8247 * NEWS: Advertise this enhancement.
8249 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8251 * NEWS (New options): announce set/show record btrace cpu.
8252 * btrace.c: Include record-btrace.h.
8253 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8254 the vendor is unknown.
8255 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8256 Maybe overwrite the btrace configuration's cpu.
8257 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8258 (btrace_fetch): Add cpu parameter. Update callers.
8259 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8260 Maybe overwrite the btrace configuration's cpu. Skip enabling
8261 errata workarounds if the vendor is unknown.
8262 * python/py-record-btrace.c: Include record-btrace.h.
8263 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8264 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8265 * record-btrace.c (record_btrace_cpu_state_kind): New.
8266 (record_btrace_cpu): New.
8267 (set_record_btrace_cpu_cmdlist): New.
8268 (record_btrace_get_cpu): New.
8269 (require_btrace_thread, record_btrace_info)
8270 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8271 (cmd_set_record_btrace_cpu_none): New.
8272 (cmd_set_record_btrace_cpu_auto): New.
8273 (cmd_set_record_btrace_cpu): New.
8274 (cmd_show_record_btrace_cpu): New.
8275 (_initialize_record_btrace): Initialize set/show record btrace cpu
8277 * record-btrace.h (record_btrace_get_cpu): New.
8279 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8281 * record.c (set_record_command): Fix typo in message.
8283 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8285 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8287 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8289 * infrun.c (process_event_stop_test): Call
8290 gdbarch_in_indirect_branch_thunk.
8291 * gdbarch.sh (in_indirect_branch_thunk): New.
8292 * gdbarch.c: Regenerated.
8293 * gdbarch.h: Regenerated.
8296 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8297 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8298 (ALLDEPFILES): Add x86-tdep.c.
8299 * arch-utils.h (default_in_indirect_branch_thunk): New.
8300 * arch-utils.c (default_in_indirect_branch_thunk): New.
8301 * i386-tdep: Include x86-tdep.h.
8302 (i386_in_indirect_branch_thunk): New.
8303 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8305 * amd64-tdep: Include x86-tdep.h.
8306 (amd64_in_indirect_branch_thunk): New.
8307 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8309 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8312 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8313 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8314 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8317 2018-04-12 Tom Tromey <tom@tromey.com>
8319 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8320 (rust_evaluate_subexp): Likewise.
8322 2018-04-12 Pedro Alves <palves@redhat.com>
8324 * procfs.c (procfs_detach): Make forward declaration's prototype
8325 match definition's protototype.
8326 (proc_get_LDT_entry): Remove stale do_cleanups call.
8328 2018-04-12 Pedro Alves <palves@redhat.com>
8330 * target.h (target_ops::to_has_exited): Delete.
8331 (target_has_exited): Delete.
8332 * target-delegates.c: Regenerate.
8334 2018-04-11 Pedro Alves <palves@redhat.com>
8336 * target.c (fileio_fh_t::t): Add comment.
8337 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8338 (target_fileio_close): Handle a NULL target.
8339 (invalidate_fileio_fh): New.
8340 (target_close): Call it.
8341 * remote.c (remote_hostio_send_command): No longer check whether
8342 remote_desc is open.
8344 2018-04-11 Pedro Alves <palves@redhat.com>
8346 * target.c (fileio_fh_t): Make it a named struct instead of a
8348 (fileio_fh_t::is_closed): New method.
8349 (DEF_VEC_O (fileio_fh_t)): Remove.
8350 (fileio_fhandles): Now a std::vector.
8351 (is_closed_fileio_fh): Delete.
8352 (acquire_fileio_fd): Adjust. Rename parameters.
8353 (release_fileio_fd): Adjust.
8354 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8355 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8356 (target_fileio_close): Adjust.
8358 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8360 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8363 2018-04-10 Pedro Alves <palves@redhat.com>
8365 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8366 (scoped_finish_thread_state): New class.
8367 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8369 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8370 (fetch_inferior_event, normal_stop): Likewise.
8371 * thread.c (finish_thread_state_cleanup): Delete.
8373 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8374 Pedro Alves <palves@redhat.com>
8376 * value.c: Include "selftest.h" and "common/array-view.h".
8377 (struct range) <operator ==>: New.
8378 (test_ranges_contain): New.
8379 (check_ranges_vector): New.
8380 (test_insert_into_bit_range_vector): New.
8381 (_initialize_values): Register selftests.
8382 * common/array-view.h (operator==, operator!=): New.
8384 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8386 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8388 * inline-frame.c: Include <algorithm>.
8389 (struct inline_state): Add constructor.
8390 (inline_state_s): Remove.
8391 (DEF_VEC_O(inline_state_s)): Remove.
8392 (inline_states): Change type to std::vector.
8393 (find_inline_frame_state): Adjust to std::vector.
8394 (allocate_inline_frame_state): Remove.
8395 (clear_inline_frame_state): Adjust to std::vector.
8396 (skip_inline_frames): Adjust to std::vector.
8398 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8400 * tracepoint.h (struct trace_state_variable): Add constructor.
8401 <name>: Change type to std::string.
8402 * tracepoint.c (tsv_s): Remove.
8403 (DEF_VEC_O(tsv_s)): Remove.
8404 (tvariables): Change to std::vector.
8405 (create_trace_state_variable): Adjust to std::vector.
8406 (find_trace_state_variable): Likewise.
8407 (find_trace_state_variable_by_number): Likewise.
8408 (delete_trace_state_variable): Likewise.
8409 (trace_variable_command): Adjust to std::string.
8410 (delete_trace_variable_command): Likewise.
8411 (tvariables_info_1): Adjust to std::vector.
8412 (save_trace_state_variables): Likewise.
8413 (start_tracing): Likewise.
8414 (merge_uploaded_trace_state_variables): Adjust to std::vector
8416 * target.h (struct target_ops)
8417 <to_download_trace_state_variable>: Pass reference to
8418 trace_state_variable.
8419 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8420 * target-delegates.c: Re-generate.
8421 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8422 (mi_tsv_deleted): Likewise.
8423 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8424 * remote.c (remote_download_trace_state_variable): Change
8425 pointer to reference and adjust.
8426 * make-target-delegates (parse_argtypes): Handle references.
8427 (write_function_header): Likewise.
8428 (munge_type): Likewise.
8430 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8432 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8433 string_view-selftests.c.
8434 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8436 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8437 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8438 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8439 * unittests/basic_string_view/element_access/char/1.cc:
8441 * unittests/basic_string_view/element_access/char/empty.cc:
8443 * unittests/basic_string_view/element_access/char/front_back.cc:
8445 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8446 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8448 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8450 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8452 * unittests/basic_string_view/operations/compare/char/1.cc:
8454 * unittests/basic_string_view/operations/compare/char/13650.cc:
8456 * unittests/basic_string_view/operations/copy/char/1.cc:
8458 * unittests/basic_string_view/operations/data/char/1.cc:
8460 * unittests/basic_string_view/operations/find/char/1.cc:
8462 * unittests/basic_string_view/operations/find/char/2.cc:
8464 * unittests/basic_string_view/operations/find/char/3.cc:
8466 * unittests/basic_string_view/operations/find/char/4.cc:
8468 * unittests/basic_string_view/operations/rfind/char/1.cc:
8470 * unittests/basic_string_view/operations/rfind/char/2.cc:
8472 * unittests/basic_string_view/operations/rfind/char/3.cc:
8474 * unittests/basic_string_view/operations/substr/char/1.cc:
8476 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8477 * unittests/string_view-selftests.c: New file.
8479 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8481 * unittests/basic_string_view/capacity/1.cc: New file.
8482 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8483 * unittests/basic_string_view/cons/char/1.cc: New file.
8484 * unittests/basic_string_view/cons/char/2.cc: New file.
8485 * unittests/basic_string_view/cons/char/3.cc: New file.
8486 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8487 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8488 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8489 * unittests/basic_string_view/element_access/char/1.cc: New file.
8490 * unittests/basic_string_view/element_access/char/2.cc: New file.
8491 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8492 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8493 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8494 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8495 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8496 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8497 * unittests/basic_string_view/include.cc: New file.
8498 * unittests/basic_string_view/inserters/char/1.cc: New file.
8499 * unittests/basic_string_view/inserters/char/2.cc: New file.
8500 * unittests/basic_string_view/inserters/char/3.cc: New file.
8501 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8502 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8503 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8504 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8505 * unittests/basic_string_view/literals/types.cc: New file.
8506 * unittests/basic_string_view/literals/values.cc: New file.
8507 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8508 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8509 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8510 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8511 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8512 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8513 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8514 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8515 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8516 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8517 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8518 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8519 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8520 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8521 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8522 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8523 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8524 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8525 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8526 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8527 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8528 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8529 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8530 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8531 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8532 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8533 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8534 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8535 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8536 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8537 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8538 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8539 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8540 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8541 * unittests/basic_string_view/operators/char/2.cc: New file.
8542 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8543 * unittests/basic_string_view/range_access/char/1.cc: New file.
8544 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8545 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8546 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8547 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8548 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8549 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8550 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8551 * unittests/basic_string_view/typedefs.cc: New file.
8552 * unittests/basic_string_view/types/1.cc: New file.
8554 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8556 * common/gdb_string_view.h: Remove libstdc++ implementation
8557 details, adjust to gdb reality.
8558 * common/gdb_string_view.tcc: Likewise.
8559 * cli/cli-script.c (struct string_view): Remove.
8560 (user_args) <m_args>: Change element type to gdb::string_view.
8561 (user_args::insert_args): Adjust.
8563 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8565 * common/gdb_string_view.h: New file.
8566 * common/gdb_string_view.tcc: New file.
8568 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8570 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8571 * configure: Re-generate.
8573 2018-04-09 Pedro Alves <palves@redhat.com>
8575 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8576 (set_target_gdbarch): Call
8577 gdb::observers::architecture_changed.notify instead of
8578 observer_notify_architecture_changed.
8580 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8582 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8583 (do_restore_current_traceframe_cleanup): Remove.
8584 (restore_current_traceframe_cleanup_dtor): Remove.
8585 (make_cleanup_restore_current_traceframe): Remove.
8586 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8588 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8589 * infrun.c (fetch_inferior_event): Use
8590 scoped_restore_current_traceframe.
8592 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8594 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8596 <n_allocated_type_units>: Remove.
8597 <all_type_units>: Change to std::vector.
8598 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8599 to std::vector change.
8600 (dwarf2_per_objfile::get_cutu): Likewise.
8601 (dwarf2_per_objfile::get_tu): Likewise.
8602 (create_signatured_type_table_from_index): Likewise.
8603 (create_signatured_type_table_from_debug_names): Likewise.
8604 (dw2_symtab_iter_next): Likewise.
8605 (dw2_print_stats): Likewise.
8606 (dw2_expand_all_symtabs): Likewise.
8607 (dw2_expand_marked_cus): Likewise.
8608 (dw2_debug_names_iterator::next): Likewise.
8609 (dwarf2_initialize_objfile): Likewise.
8610 (add_signatured_type_cu_to_table): Likewise.
8611 (create_all_type_units): Likewise.
8612 (add_type_unit): Likewise.
8613 (struct tu_abbrev_offset): Add constructor.
8614 (build_type_psymtabs_1): Adjust to std::vector change.
8615 (print_tu_stats): Likewise.
8616 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8617 (write_debug_names): Likewise.
8619 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8621 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8622 Make an std::vector.
8623 <n_comp_units>: Remove.
8624 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8625 to std::vector change.
8626 (dwarf2_per_objfile::get_cutu): Likewise.
8627 (dwarf2_per_objfile::get_cu): Likewise.
8628 (create_cus_from_index): Likewise.
8629 (create_addrmap_from_index): Likewise.
8630 (create_addrmap_from_aranges): Likewise.
8631 (dwarf2_read_index): Likewise.
8632 (dw2_find_last_source_symtab): Likewise.
8633 (dw2_map_symtabs_matching_filename): Likewise.
8634 (dw2_symtab_iter_next): Likewise.
8635 (dw2_print_stats): Likewise.
8636 (dw2_expand_all_symtabs): Likewise.
8637 (dw2_expand_symtabs_with_fullname): Likewise.
8638 (dw2_expand_marked_cus): Likewise.
8639 (dw2_map_symbol_filenames): Likewise.
8640 (create_cus_from_debug_names): Likewise.
8641 (dwarf2_read_debug_names): Likewise.
8642 (dw2_debug_names_iterator::next): Likewise.
8643 (dwarf2_initialize_objfile): Likewise.
8644 (set_partial_user): Likewise.
8645 (dwarf2_build_psymtabs_hard): Likewise.
8646 (read_comp_units_from_section): Remove arguments, adjust to
8648 (create_all_comp_units): Adjust to std::vector and
8649 read_comp_units_from_section changes.
8650 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8652 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8653 (psyms_seen_size): Likewise.
8654 (write_gdbindex): Likewise.
8655 (write_debug_names): Likewise.
8657 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8659 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8660 with dwarf2_per_objfile.
8661 (create_cus_from_index): Likewise.
8662 (create_signatured_type_table_from_index): Likewise.
8663 (dwarf2_read_index): Likewise.
8664 (dwarf2_initialize_objfile): Likewise.
8665 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8666 per_cu rather than get_dwarf2_per_objfile.
8668 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8670 * dwarf2read.h (struct signatured_type): Forward declare.
8671 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8673 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8674 (dw2_get_cutu): ...this.
8675 (dwarf2_per_objfile::get_cu): Rename from...
8676 (dw2_get_cu): ...this.
8677 (dwarf2_per_objfile::get_tu): New.
8678 (create_addrmap_from_index): Adjust.
8679 (create_addrmap_from_aranges): Adjust.
8680 (dw2_find_last_source_symtab): Adjust.
8681 (dw2_map_symtabs_matching_filename): Adjust.
8682 (dw2_symtab_iter_next): Adjust.
8683 (dw2_print_stats): Adjust.
8684 (dw2_expand_all_symtabs): Adjust.
8685 (dw2_expand_symtabs_with_fullname): Adjust.
8686 (dw2_expand_marked_cus): Adjust.
8687 (dw_expand_symtabs_matching_file_matcher): Adjust.
8688 (dw2_map_symbol_filenames): Adjust.
8689 (dw2_debug_names_iterator::next): Adjust.
8690 (dwarf2_initialize_objfile): Adjust.
8691 (set_partial_user): Adjust.
8692 (dwarf2_build_psymtabs_hard): Adjust.
8694 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8696 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8697 Remove unused variables.
8698 (dw2_map_symtabs_matching_filename): Likewise.
8699 (dwarf2_record_block_ranges): Likewise.
8700 (dwarf2_read_addr_index): Likewise.
8701 (follow_die_offset): Likewise.
8703 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8705 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8706 to symbol_file_add_main.
8708 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8711 * mi/mi-console.c (do_fputc_async_safe): New.
8712 (mi_console_file::write_async_safe): New.
8713 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8714 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8716 * ui-file.c (ui_file::putstrn): Adjust call to
8717 fputstrn_unfiltered.
8718 * utils.c (printchar): Replace do_fputs and do_fprintf
8719 parameters by do_fputc.
8720 (fputstr_filtered): Adjust call to printchar.
8721 (fputstr_unfiltered): Likewise.
8722 (fputstrn_filtered): Likewise.
8723 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8725 * utils.h (do_fputc_ftype): New typedef.
8726 (fputstrn_unfiltered): Add do_fputc parameter.
8728 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8730 * regformats/i386/i386-avx.dat: Remove.
8732 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8735 * amd64-tdep.c (amd64_none_init_abi): New function.
8736 (amd64_x32_none_init_abi): New function.
8737 (_initialize_amd64_tdep): Register handlers for x86-64 and
8738 x64_32 with GDB_OSABI_NONE.
8739 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8740 GDB_OSABI_NONE osabi.
8742 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8745 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8747 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8748 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8750 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8752 * common/byte-vector.h (char_vector): New type.
8753 * target.h (target_read_alloc): Return
8754 gdb::optional<byte_vector>.
8755 (target_read_stralloc): Return gdb::optional<char_vector>.
8756 (target_get_osdata): Return gdb::optional<char_vector>.
8757 * target.c (target_read_alloc_1): Templatize. Replacement
8758 manual memory management with vector.
8759 (target_read_alloc): Change return type, adjust.
8760 (target_read_stralloc): Change return type, adjust.
8761 (target_get_osdata): Change return type, adjust.
8762 * auxv.c (struct auxv_info) <length>: Remove.
8763 <data>: Change type to gdb::optional<byte_vector>.
8764 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8765 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8766 (target_auxv_search): Adjust.
8767 (fprint_target_auxv): Adjust.
8768 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8769 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8770 (linux_make_corefile_notes): Adjust.
8771 * osdata.c (get_osdata): Adjust.
8772 * remote.c (remote_get_threads_with_qxfer): Adjust.
8773 (remote_memory_map): Adjust.
8774 (remote_traceframe_info): Adjust.
8775 (btrace_read_config): Adjust.
8776 (remote_read_btrace): Adjust.
8777 (remote_pid_to_exec_file): Adjust.
8778 * solib-aix.c (solib_aix_get_library_list): Adjust.
8779 * solib-dsbt.c (decode_loadmap): Don't free buf.
8780 (dsbt_get_initial_loadmaps): Adjust.
8781 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8782 * solib-target.c (solib_target_current_sos): Adjust.
8783 * tracepoint.c (sdata_make_value): Adjust.
8784 * xml-support.c (xinclude_start_include): Adjust.
8785 (xml_fetch_content_from_file): Adjust.
8786 * xml-support.h (xml_fetch_another): Change return type.
8787 (xml_fetch_content_from_file): Change return type.
8788 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8789 * xml-tdesc.c (file_read_description_xml): Adjust.
8790 (fetch_available_features_from_target): Change return type.
8791 (target_fetch_description_xml): Adjust.
8792 (target_read_description_xml): Adjust.
8794 2018-04-06 Tom Tromey <tom@tromey.com>
8796 * value.c (~value): Update.
8797 (struct value) <contents>: Now unique_xmalloc_ptr.
8798 (value_contents_bits_eq, allocate_value_contents)
8799 (value_contents_raw, value_contents_all_raw)
8800 (value_contents_for_printing, value_contents_for_printing_const)
8801 (set_value_enclosing_type): Update.
8803 2018-04-06 Tom Tromey <tom@tromey.com>
8805 * value.c (range_s): Remove typedef, VEC.
8806 (struct range): Add operator<.
8807 (range_lessthan): Remove.
8808 (ranges_contain): Change type.
8810 (struct value) <unavailable, optimized_out>: Now std::vector.
8811 (value_entirely_available)
8812 (value_entirely_covered_by_range_vector)
8813 (value_entirely_unavailable, value_entirely_optimized_out):
8815 (insert_into_bit_range_vector): Change argument type.
8816 (find_first_range_overlap): Likewise.
8817 (struct ranges_and_idx, value_contents_bits_eq)
8818 (require_not_optimized_out, require_available): Update.
8819 (ranges_copy_adjusted): Change argument types.
8820 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8822 2018-04-06 Tom Tromey <tom@tromey.com>
8824 * value.c (~value): Update.
8825 (struct value) <parent>: Now a value_ref_ptr.
8826 (value_parent, set_value_parent, value_address, value_copy):
8829 2018-04-06 Tom Tromey <tom@tromey.com>
8831 * value.c (struct value): Add constructor, destructor, and member
8833 (allocate_value_lazy, value_decref): Update.
8835 2018-04-06 Tom Tromey <tom@tromey.com>
8837 * value.c (struct value) <released, next>: Remove.
8838 (all_values): Now a std::vector.
8839 (allocate_value_lazy): Update.
8840 (value_next): Remove.
8841 (value_mark, value_free_to_mark, release_value)
8842 (value_release_to_mark): Update.
8844 2018-04-06 Tom Tromey <tom@tromey.com>
8846 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8847 (free_value_chain): Remove.
8848 * value.c (free_value_chain): Remove.
8849 (value_release_to_mark): Return a std::vector.
8850 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8852 (check_condition): Update.
8853 * eval.c (fetch_subexp_value): Change "val_chain" to a
8855 * breakpoint.c (update_watchpoint): Update.
8856 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8858 2018-04-06 Tom Tromey <tom@tromey.com>
8860 * value.h (free_all_values): Remove.
8861 * value.c (free_all_values): Remove.
8863 2018-04-06 Tom Tromey <tom@tromey.com>
8865 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8866 (value_history_chain, value_history_count): Remove.
8867 (value_history): New global.
8868 (record_latest_value, access_value_history, show_values)
8869 (preserve_values): Update.
8871 2018-04-06 Tom Tromey <tom@tromey.com>
8873 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8874 * varobj.c (varobj_set_display_format, varobj_set_value)
8875 (install_default_visualizer, construct_visualizer)
8876 (install_new_value, ~varobj, varobj_get_value_type)
8877 (my_value_of_variable, varobj_editable_p): Update.
8878 * c-varobj.c (c_describe_child, c_value_of_variable)
8879 (cplus_number_of_children, cplus_describe_child): Update.
8880 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8881 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8882 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8884 2018-04-06 Tom Tromey <tom@tromey.com>
8886 * printcmd.c (last_examine_address): Change type to
8888 (do_examine, x_command): Update.
8890 2018-04-06 Tom Tromey <tom@tromey.com>
8892 * value.c (release_value): Update.
8893 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8894 (struct bpstats) <val>: Now a value_ref_ptr.
8895 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8896 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8897 (~watchpoint, print_it_watchpoint, watch_command_1)
8898 (invalidate_bp_value_on_memory_change): Update.
8900 2018-04-06 Tom Tromey <tom@tromey.com>
8902 * varobj.c (varobj_clear_saved_item)
8903 (update_dynamic_varobj_children, install_new_value, ~varobj):
8905 * value.h (value_incref): Move declaration earlier.
8906 (value_decref): Rename from value_free.
8907 (struct value_ref_policy): New.
8908 (value_ref_ptr): New typedef.
8909 (struct value_deleter): Remove.
8910 (gdb_value_up): Remove typedef.
8911 (release_value): Change return type.
8912 (release_value_or_incref): Remove.
8913 * value.c (set_value_parent): Update.
8914 (value_incref): Change return type.
8915 (value_decref): Rename from value_free.
8916 (value_free_to_mark, free_all_values, free_value_chain): Update.
8917 (release_value): Return value_ref_ptr.
8918 (release_value_or_incref): Remove.
8919 (record_latest_value, set_internalvar, clear_internalvar):
8921 * stack.c (info_frame_command): Don't call value_free.
8922 * python/py-value.c (valpy_dealloc, valpy_new)
8923 (value_to_value_object): Update.
8924 * printcmd.c (do_examine): Update.
8925 * opencl-lang.c (lval_func_free_closure): Update.
8926 * mi/mi-main.c (register_changed_p): Don't call value_free.
8927 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8928 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8929 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8931 * guile/scm-value.c (vlscm_free_value_smob)
8932 (vlscm_scm_from_value): Update.
8933 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8934 (frame_unwind_register_unsigned, get_frame_register_bytes)
8935 (put_frame_register_bytes): Don't call value_free.
8936 * findvar.c (address_from_register): Don't call value_free.
8937 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8938 * dwarf2loc.c (entry_data_value_free_closure)
8939 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8940 (dwarf2_evaluate_loc_desc_full): Update.
8941 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8942 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8943 (~watchpoint, watch_command_1)
8944 (invalidate_bp_value_on_memory_change): Update.
8945 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8947 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8950 * warning.m4: Add -Wno-error=deprecated-register.
8951 * configure: Re-generate.
8953 2018-04-05 Tom Tromey <tom@tromey.com>
8955 * linespec.h: Remove include of "vec.h".
8957 2018-04-05 Tom Tromey <tom@tromey.com>
8959 * linespec.c (typep): Remove typedef.
8960 (find_methods, find_superclass_methods): Take a std::vector.
8961 (find_method): Use std::vector.
8963 2018-04-05 Tom Tromey <tom@tromey.com>
8965 * utils.c (compare_strings): Remove.
8966 * utils.h (compare_strings): Remove.
8967 * objc-lang.h (find_imps): Update.
8968 * objc-lang.c (find_methods): Take a std::vector.
8969 (uniquify_strings, find_imps): Likewise.
8970 * linespec.c (find_methods): Take a std::vector.
8971 (decode_objc): Use std::vector.
8972 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8974 (find_method, find_function_symbols): Use std::vector.
8976 2018-04-05 Tom Tromey <tom@tromey.com>
8978 * completer.c (completion_tracker::completion_tracker): Remove
8980 (completion_tracker::discard_completions): Likewise.
8981 * breakpoint.c (ambiguous_names_p): Remove cast.
8982 * ada-lang.c (_initialize_ada_language): Remove cast.
8983 * utils.h (streq): Update.
8984 (streq_hash): Add new declaration.
8985 * utils.c (streq): Return bool.
8986 (streq_hash): New function.
8988 2018-04-05 Tom Tromey <tom@tromey.com>
8990 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8991 Remove a string copy.
8993 2018-04-05 Tom Tromey <tom@tromey.com>
8995 * linespec.c (filter_results): Use std::vector.
8996 (decode_line_2, decode_line_full): Update.
8998 2018-04-05 Tom Tromey <tom@tromey.com>
9000 * linespec.c (canonical_to_fullform): Return std::string.
9001 (filter_results): Update.
9002 (struct decode_line_2_item): Add constructor.
9003 <fullform, displayform>: Now std::string.
9004 (decode_line_2_compare_items): Now a std::sort comparator.
9005 (decode_line_2): Update.
9007 2018-04-05 Tom Tromey <tom@tromey.com>
9009 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9010 (unexpected_linespec_error): Update.
9011 (linespec_parse_basic, parse_linespec): Update.
9013 2018-04-05 Tom Tromey <tom@tromey.com>
9015 * linespec.c (linespec_parse_basic): Reindent.
9017 2018-04-05 Tom Tromey <tom@tromey.com>
9019 * minsyms.h (iterate_over_minimal_symbols): Update.
9020 * minsyms.c (iterate_over_minimal_symbols): Take a
9022 * linespec.c (struct collect_minsyms): Remove.
9023 (compare_msyms): Now a std::sort comparator.
9024 (add_minsym): Add parameters.
9025 (search_minsyms_for_name): Update. Use std::vector.
9027 2018-04-03 Tom Tromey <tom@tromey.com>
9029 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9032 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9034 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9036 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9039 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9040 printing static type.
9042 2018-04-01 Tom Tromey <tom@tromey.com>
9044 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9045 (rs6000_xfer_shared_libraries): Update.
9047 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9049 * common/gdb_vecs.h (char_ptr): Remove.
9050 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9052 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9054 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9056 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9058 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9060 * tracepoint.h (struct uploaded_tp): Initialize fields.
9061 <actions, step_actions, cmd_strings>: Change type to
9062 std::vector<char *>.
9063 * tracepoint.c (get_uploaded_tp): Allocate with new.
9064 (free_uploaded_tps): Free with delete.
9065 (parse_tracepoint_definition): Adjust to std::vector change.
9066 * breakpoint.c (read_uploaded_action): Likewise.
9067 (create_tracepoint_from_upload): Likewise.
9068 * ctf.c (ctf_write_uploaded_tp): Likewise.
9069 (SET_ARRAY_FIELD): Likewise.
9070 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9072 2018-03-30 Tom Tromey <tom@tromey.com>
9074 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9076 (svr4_keep_data_in_core): Update.
9077 (svr4_read_so_list): Update.
9079 2018-03-30 Tom Tromey <tom@tromey.com>
9081 * windows-nat.c (handle_output_debug_string, handle_exception):
9083 * target.h (target_read_string): Update.
9084 * target.c (target_read_string): Change "string" to
9086 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9088 * solib-frv.c (frv_current_sos): Update.
9089 * solib-dsbt.c (dsbt_current_sos): Update.
9090 * solib-darwin.c (darwin_current_sos): Update.
9091 * linux-thread-db.c (inferior_has_bug): Update.
9092 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9093 Update. Remove alloca.
9094 * ada-lang.c (ada_main_name): Update.
9096 2018-03-30 Tom Tromey <tom@tromey.com>
9098 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9099 (struct dwo_file_deleter): New.
9100 (dwo_file_up): New typedef.
9101 (open_and_init_dwo_file): Use dwo_file_up.
9102 (free_dwo_file_cleanup): Remove.
9104 2018-03-30 Tom Tromey <tom@tromey.com>
9106 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9107 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9109 2018-03-30 Tom Tromey <tom@tromey.com>
9111 * dwarf2read.c (class free_cached_comp_units): New class.
9112 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9113 (free_cached_comp_units): Remove function.
9115 2018-03-30 Tom Tromey <tom@tromey.com>
9117 * utils.h (make_cleanup_unpush_target): Remove.
9118 * inf-ptrace.c (struct target_unpusher): New.
9119 (target_unpush_up) New typedef.
9120 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9122 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9124 2018-03-27 Tom Tromey <tom@tromey.com>
9126 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9128 2018-03-27 Pedro Alves <palves@redhat.com>
9129 Tom Tromey <tom@tromey.com>
9131 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9132 destructor. Now a class.
9133 (gdb_readline_wrapper_cleanup): Remove function.
9134 (gdb_readline_wrapper): Remove cleanups.
9136 2018-03-27 Tom Tromey <tom@tromey.com>
9138 * typeprint.h (struct type_print_options) <local_typedefs,
9139 global_typedefs>: Remove "struct" keyword.
9140 (class typedef_hash_table): New class.
9141 (recursively_update_typedef_hash, add_template_parameters)
9142 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9143 (find_typedef_in_hash): Don't declare.
9144 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9145 (typedef_hash_table::recursively_update): Rename from
9146 recursively_update_typedef_hash. Now a member.
9147 (typedef_hash_table::add_template_parameters): Rename from
9148 add_template_parameters. Now a member.
9149 (typedef_hash_table::typedef_hash_table): Now a constructor;
9150 rename from create_typedef_hash.
9151 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9152 rename from free_typedef_hash.
9153 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9154 (do_free_global_table): Remove.
9155 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9156 from copy_type_recursive.
9157 (create_global_typedef_table): Remove.
9158 (typedef_hash_table::find_global_typedef): Now a member of
9160 (typedef_hash_table::find_typedef): Rename from
9161 find_typedef_in_hash; now a member.
9162 (whatis_exp): Update.
9163 * extension.h (struct ext_lang_type_printers): Add constructor and
9165 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9167 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9168 Now a constructor; rename from start_ext_lang_type_printers.
9169 (ext_lang_type_printers): Now a destructor; rename from
9170 free_ext_lang_type_printers.
9171 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9173 (c_type_print_base_struct_union): Update. Remove cleanups.
9175 2018-03-27 Tom Tromey <tom@tromey.com>
9177 * dwarf-index-write.c: Include <cmath>.
9179 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9181 * NEWS: Add entry describing new "set|show varsize-limit" command.
9182 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9184 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9187 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9189 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9191 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9192 * dwarf-index-common.c: New file.
9193 * dwarf-index-common.h: New file.
9194 * dwarf-index-write.c: New file.
9195 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9196 (struct dwarf2_section_info): Move from here.
9197 (dwarf2_section_info_def): Likewise.
9198 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9199 (offset_type): Likewise.
9200 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9201 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9202 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9203 (byte_swap): Likewise.
9204 (MAYBE_SWAP): Likewise.
9205 (dwarf2_per_cu_ptr): Likewise.
9206 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9207 (struct tu_stats): Likewise.
9208 (struct dwarf2_per_objfile): Likewise.
9209 (struct dwarf2_per_cu_data): Likewise.
9210 (struct signatured_type): Likewise.
9211 (sig_type_ptr): Likewise.
9212 (DEF_VEC_P (sig_type_ptr)): Likewise.
9213 (INDEX4_SUFFIX): Likewise.
9214 (INDEX5_SUFFIX): Likewise.
9215 (DEBUG_STR_SUFFIX): Likewise.
9216 (dwarf2_read_section): Make non-static.
9217 (mapped_index_string_hash): Move from here.
9218 (dwarf5_djb_hash): Likewise.
9219 (file_write): Likewise.
9220 (class data_buf): Likewise.
9221 (struct symtab_index_entry): Likewise.
9222 (struct mapped_symtab): Likewise.
9223 (find_slot): Likewise.
9224 (hash_expand): Likewise.
9225 (add_index_entry): Likewise.
9226 (uniquify_cu_indices): Likewise.
9227 (class c_str_view): Likewise.
9228 (class c_str_view_hasher): Likewise.
9229 (class vector_hasher): Likewise.
9230 (write_hash_table): Likewise.
9231 (psym_index_map): Likewise.
9232 (struct addrmap_index_data): Likewise.
9233 (add_address_entry): Likewise.
9234 (add_address_entry_worker): Likewise.
9235 (write_address_map): Likewise.
9236 (symbol_kind): Likewise.
9237 (write_psymbols): Likewise.
9238 (struct signatured_type_index_data): Likewise.
9239 (write_one_signatured_type): Likewise.
9240 (recursively_count_psymbols): Likewise.
9241 (recursively_write_psymbols): Likewise.
9242 (class debug_names): Likewise.
9243 (check_dwarf64_offsets): Likewise.
9244 (psyms_seen_size): Likewise.
9245 (write_gdbindex): Likewise.
9246 (write_debug_names): Likewise.
9247 (assert_file_size): Likewise.
9248 (write_psymtabs_to_index): Likewise.
9249 (save_gdb_index_command): Likewise.
9250 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9252 * dwarf2read.h: New file.
9254 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9257 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9258 symbol name if the CU's language stores symbol names in linkage
9260 * language.h (struct language_defn)
9261 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9262 all instances of this struct.
9264 2018-03-26 Tom Tromey <tom@tromey.com>
9266 * stack.c (backtrace_command_1): Remove verbose code.
9268 2018-03-26 Tom Tromey <tom@tromey.com>
9270 * python/py-framefilter.c (py_print_type): Don't catch
9271 exceptions. Return void.
9272 (py_print_value): Likewise.
9273 (py_print_single_arg): Likewise.
9274 (enumerate_args): Don't catch exceptions.
9275 (py_print_args): Likewise.
9276 (py_print_frame): Likewise.
9277 (gdbpy_apply_frame_filter): Catch exceptions here.
9279 2018-03-26 Tom Tromey <tom@tromey.com>
9281 * stack.c (_initialize_stack): Remove trailing newlines from help
9282 text. Add "Usage" line to "backtrace" help.
9284 2018-03-26 Tom Tromey <tom@tromey.com>
9287 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9289 2018-03-26 Tom Tromey <tom@tromey.com>
9291 * python/py-framefilter.c (py_print_single_arg): Return
9292 EXT_LANG_BT_ERROR from catch.
9294 2018-03-26 Tom Tromey <tom@tromey.com>
9297 * stack.c (backtrace_command_1): Move some code into no-filters
9300 2018-03-26 Tom Tromey <tom@tromey.com>
9302 * python/py-framefilter.c (throw_quit_or_print_exception): New
9304 (gdbpy_apply_frame_filter): Use it.
9306 2018-03-26 Tom Tromey <tom@tromey.com>
9309 * python/py-framefilter.c (py_print_type, py_print_value)
9310 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9313 2018-03-26 Tom Tromey <tom@tromey.com>
9315 * python/py-framefilter.c (enumerate_args): Use
9316 gdb::unique_xmalloc_ptr.
9318 2018-03-26 Tom Tromey <tom@tromey.com>
9320 * python/py-framefilter.c (py_print_frame): Return
9322 (gdbpy_apply_frame_filter): Update comment.
9323 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9325 <EXT_LANG_BT_NO_FILTERS>: Change value.
9327 2018-03-26 Tom Tromey <tom@tromey.com>
9330 * stack.c (backtrace_command): Parse "hide" argument.
9331 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9332 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9335 2018-03-26 Tom Tromey <tom@tromey.com>
9337 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9339 (backtrace_command): Remove "fulltrace", add "flags".
9341 2018-03-26 Tom Tromey <tom@tromey.com>
9343 * stack.c (backtrace_command): Rewrite command line parsing.
9345 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9347 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9349 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9351 * filename-seen-cache.h: Add include guard.
9353 2018-03-26 Keith Seitz <keiths@redhat.com>
9355 * symfile.c (place_section): Remove "struct" from section_addr_info
9357 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9358 "struct" keyword from section_addr_info.
9360 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9362 * regformats/regdef.h (reg): Add constructors.
9364 2018-03-25 Pedro Alves <palves@redhat.com>
9366 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9367 if then/else bodies in var_func_name extraction.
9369 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9371 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9372 lookup_minimal_symbol() to find symbol entry.
9373 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9375 2018-03-23 Keith Seitz <keiths@redhat.com>
9378 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9379 nested type definitions for C++, too.
9381 2018-03-23 Tom Tromey <tom@tromey.com>
9383 * machoread.c (struct oso_el): Add a constructor. Don't define as
9385 (macho_register_oso): Remove.
9386 (macho_symtab_read): Take a std::vector.
9387 (oso_el_compare_name): Now a std::sort comparator.
9388 (macho_symfile_read_all_oso): Take a std::vector.
9389 (macho_symfile_read): Use std::vector. Remove cleanups.
9391 2018-03-22 Tom Tromey <tom@tromey.com>
9393 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9394 (record_full_goto_bookmark): Use std::string.
9396 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9399 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9402 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9404 * rs6000-tdep.c (store_insn_p): New function.
9405 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9406 and cr_reg to their unshifted values. Use store_insn_p to
9407 match LR saves using either R1 or fdata->alloca_reg. Use
9408 store_insn_p to match CR saves. Set alloca_reg_offset
9409 when alloca_reg and framep are set. Remove lr_reg shift
9410 when assigning to fdata->lr_register.
9412 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9414 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9415 command line args instead of emitting a warning.
9417 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9419 * tracepoint.h (struct static_tracepoint_marker): Initialize
9420 fields, define default constructor, move constructor and move
9421 assignment, disable the rest.
9422 <str_id, extra>: Make std::string.
9423 (release_static_tracepoint_marker): Remove.
9424 (free_current_marker): Remove.
9425 * tracepoint.c (free_current_marker): Remove.
9426 (parse_static_tracepoint_marker_definition): Adjust to
9427 std::string, use new hex2str overload.
9428 (release_static_tracepoint_marker): Remove.
9429 (print_one_static_tracepoint_marker): Get marker by reference
9430 and adjust to std::string.
9431 (info_static_tracepoint_markers_command): Adjust to std::vector
9433 * target.h (static_tracepoint_marker_p): Remove typedef.
9434 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9435 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9437 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9439 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9440 (target_debug_print_std_vector_static_tracepoint_marker): New.
9441 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9443 (target_debug_print_static_tracepoint_marker_p): ... this.
9444 * target-delegates.c: Re-generate.
9445 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9447 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9448 (decode_static_tracepoint_spec): Adjust to std::vector.
9449 (tracepoint_print_one_detail): Adjust to std::string.
9450 (strace_marker_decode_location): Adjust to std::string.
9451 (update_static_tracepoint): Adjust to std::string, remove call
9452 to release_static_tracepoint_marker.
9453 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9454 Adjust to std::vector.
9455 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9456 (remote_static_tracepoint_markers_by_strid): Adjust to
9458 * common/rsp-low.h (hex2str): New overload with explicit count
9460 * common/rsp-low.c (hex2str): New overload with explicit count
9462 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9463 (_initialize_rsp_low_selftests): Add test_hex2str test.
9464 * unittests/tracepoint-selftests.c
9465 (test_parse_static_tracepoint_marker_definition): Adjust to
9468 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9470 * tracepoint.c (parse_static_tracepoint_marker_definition):
9471 Consider case where the definition is followed by more
9473 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9474 tracepoint-selftests.c.
9475 * unittests/tracepoint-selftests.c: New.
9477 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9479 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9482 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9484 * symtab.c (find_pc_sect_line): fixed indentation.
9486 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9488 * symtab.c (find_pc_sect_line): now uses binary search.
9490 2018-03-19 Tom Tromey <tom@tromey.com>
9492 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9495 2018-03-19 Pedro Alves <palves@redhat.com>
9496 Tom Tromey <tom@tromey.com>
9498 * unittests/observable-selftests.c: New file.
9499 * common/observable.h: New file.
9500 * observable.h: New file.
9501 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9502 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9503 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9504 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9505 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9506 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9507 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9508 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9509 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9510 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9511 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9512 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9513 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9514 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9515 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9516 tui/tui-interp.c, valops.c: Update all users.
9517 * tui/tui-hooks.c (tui_bp_created_observer)
9518 (tui_bp_deleted_observer, tui_bp_modified_observer)
9519 (tui_inferior_exit_observer, tui_before_prompt_observer)
9520 (tui_normal_stop_observer, tui_register_changed_observer):
9522 (tui_observers_token): New global.
9523 (attach_or_detach, tui_attach_detach_observers): New functions.
9524 (tui_install_hooks, tui_remove_hooks): Use
9525 tui_attach_detach_observers.
9526 * record-btrace.c (record_btrace_thread_observer): Remove.
9527 (record_btrace_thread_observer_token): New global.
9528 * observer.sh: Remove.
9529 * observer.c: Rename to observable.c.
9530 * observable.c (namespace gdb_observers): Define new objects.
9531 (observer_debug): Move into gdb_observers namespace.
9532 (struct observer, struct observer_list, xalloc_observer_list_node)
9533 (xfree_observer_list_node, generic_observer_attach)
9534 (generic_observer_detach, generic_observer_notify): Remove.
9535 (_initialize_observer): Update.
9536 Don't include observer.inc.
9537 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9538 (clean mostlyclean): Likewise.
9539 (observer.h, observer.inc): Remove targets.
9540 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9541 (COMMON_SFILES): Use observable.c, not observer.c.
9542 * .gitignore: Remove observer.h.
9544 2018-03-18 Tom Tromey <tom@tromey.com>
9546 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9548 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9550 2018-03-17 Tom Tromey <tom@tromey.com>
9552 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9554 2018-03-17 Tom Tromey <tom@tromey.com>
9556 * target.c (class scoped_target_fd): New.
9557 (target_fileio_close_cleanup): Remove.
9558 (target_fileio_read_alloc_1): Use scoped_target_fd.
9560 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9562 * silent-rules.mk: New.
9563 * Makefile.in: Include silent-rules.mk
9564 (srcdir, VPATH, top_srcdir): Move up.
9565 (COMPILE): Add ECHO_CXX.
9566 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9567 (init.c): Add ECHO_INIT_C.
9568 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9569 (version.c): Add ECHO_GEN.
9570 (printcmd.o): Add ECHO_CXX.
9571 (target-float.o): Add ECHO_CXX.
9572 (ada-exp.o): Add ECHO_CXX.
9573 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9574 (insight$(EXEEXT)): Add ECHO_CXXLD.
9575 * gnulib/configure.ac: Add AM_SILENT_RULES.
9576 * gnulib/aclocal.m4: Re-generate.
9577 * gnulib/configure: Re-generate.
9578 * gnulib/import/Makefile.in: Re-generate.
9580 2018-03-16 Tom Tromey <tom@tromey.com>
9582 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9583 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9584 * utils.c (do_free_section_addr_info)
9585 (make_cleanup_free_section_addr_info): Remove.
9586 * symfile.h (struct other_sections): Add constructor.
9587 (struct section_addr_info): Remove.
9588 (section_addr_info): New typedef.
9589 (struct sym_fns) <sym_offsets>: Change type of parameter.
9590 (build_section_addr_info_from_objfile)
9591 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9592 (default_symfile_offsets, symbol_file_add)
9593 (symbol_file_add_from_bfd)
9594 (build_section_addr_info_from_section_table): Update.
9595 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9596 * symfile.c (alloc_section_addr_info): Remove.
9597 (build_section_addr_info_from_section_table): Change return type.
9599 (build_section_addr_info_from_bfd)
9600 (build_section_addr_info_from_objfile): Likewise.
9601 (free_section_addr_info): Remove.
9602 (relative_addr_info_to_section_offsets): Change type of "addrs".
9603 (addrs_section_compar): Now a std::sort comparator.
9604 (addrs_section_sort): Change return type.
9605 (addr_info_make_relative): Change type of "addrs". Update.
9606 (default_symfile_offsets, syms_from_objfile_1)
9607 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9608 (symbol_file_add_separate): Update.
9609 (symbol_file_add): Change type of "addrs". Update.
9610 (add_symbol_file_command): Update. Remove cleanups.
9611 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9613 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9614 * solib.c (solib_read_symbols): Update.
9615 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9616 * machoread.c (macho_symfile_offsets): Update.
9617 * jit.c (jit_bfd_try_read_symtab): Update.
9619 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9621 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9622 unittests/utils-selftests.c.
9623 * unittests/utils-selftests.c: New file.
9625 2018-03-14 Tom Tromey <tom@tromey.com>
9628 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9631 2018-03-14 Tom Tromey <tom@tromey.com>
9634 * printcmd.c (printf_pointer): Allow "-" in format.
9636 2018-03-14 Tom Tromey <tom@tromey.com>
9638 * printcmd.c (_initialize_printcmd): Add usage to printf.
9640 2018-03-14 Yao Qi <qiyao@sourceware.org>
9642 * MAINTAINERS: Update my email address.
9644 2018-03-13 Tom Tromey <tom@tromey.com>
9646 * machoread.c (macho_check_dsym): Change filenamep to a
9648 (macho_symfile_read): Update.
9649 * symfile.c (load_command): Use std::string.
9651 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9653 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9654 to error message string.
9655 (riscv_register_name): Use xsnprintf instead of sprintf.
9656 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9658 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9660 (riscv_push_dummy_call): Likewise.
9662 2018-03-12 Tom Tromey <tom@tromey.com>
9664 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9665 Use gdb::byte_vector.
9666 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9668 2018-03-12 Yao Qi <yao.qi@linaro.org>
9670 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9671 parameter type to readable_regcache.
9672 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9675 2018-03-11 Tom Tromey <tom@tromey.com>
9677 * dwarf2read.c (struct nextfield): Add initializers.
9678 (struct nextfnfield): Remove.
9679 (struct fnfieldlist): Add initializers. Remove "length" and
9680 "head", use std::vector.
9681 (struct decl_field_list): Remove.
9682 (struct field_info): Add initializers.
9683 <fields, baseclasses>: Now std::vector.
9684 <nbaseclasses, nfnfields, typedef_field_list_count,
9685 nested_types_list_count>: Remove.
9686 (dwarf2_add_field, dwarf2_add_type_defn)
9687 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9688 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9689 (process_structure_scope): Update.
9691 2018-03-11 Tom Tromey <tom@tromey.com>
9693 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9694 for use by std::sort.
9695 (build_type_psymtabs_1): Use std::vector.
9697 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9699 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9700 and LIBMPFR in the printed configuration.
9702 2018-03-08 Tom Tromey <tom@tromey.com>
9704 * source.c (get_filename_and_charpos): Use scoped_fd.
9705 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9706 (procfs_pidlist): Likewise.
9707 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9708 (iterate_over_mappings): Likewise.
9710 2018-03-08 Tom Tromey <tom@tromey.com>
9712 * infcall.c (struct call_return_meta_info)
9713 <stack_temporaries_enabled>: Remove.
9714 (get_call_return_value, call_function_by_hand_dummy): Update.
9715 * thread.c (disable_thread_stack_temporaries): Remove.
9716 (enable_thread_stack_temporaries): Remove.
9717 (thread_stack_temporaries_enabled_p): Return bool.
9718 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9719 (get_last_thread_stack_temporary): Update.
9720 * eval.c (evaluate_subexp): Update.
9721 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9722 class, not a function.
9723 (value_ptr, value_vec): Remove typedefs.
9724 (class thread_info) <stack_temporaries_enabled>: Now bool.
9725 <stack_temporaries>: Now a std::vector.
9726 (thread_stack_temporaries_enabled_p)
9727 (value_in_thread_stack_temporaries): Return bool.
9729 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9731 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9732 (getpkt_or_notif_sane_1): Likewise.
9734 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9736 * build-id.c (build_id_to_debug_bfd): Use std::string.
9738 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9740 * build-id.c (find_separate_debug_file_by_buildid): Return
9742 * build-id.h (find_separate_debug_file_by_buildid): Return
9744 * coffread.c (coff_symfile_read): Adjust to std::string.
9745 * elfread.c (elf_symfile_read): Adjust to std::string.
9746 * symfile.c (separate_debug_file_exists): Change parameter to
9748 (find_separate_debug_file): Return std::string.
9749 (find_separate_debug_file_by_debuglink): Return std::string.
9750 * symfile.h (find_separate_debug_file_by_debuglink): Return
9753 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9755 * common/xml-utils.c (xml_escape_text): Move code to...
9756 (xml_escape_text_append): ... this new function.
9757 * common/xml-utils.h (xml_escape_text_append): New declaration.
9758 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9760 (_initialize_xml_utils): register test_xml_escape_text_append as
9763 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9765 * defs.h: Remove MAX_REGISTER_SIZE.
9766 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9768 * python/py-unwind.c (pyuw_sniffer): Likewise.
9770 2018-03-07 Tom Tromey <tom@tromey.com>
9772 * linux-tdep.c (linux_info_proc): Update.
9773 * target.h (struct target_ops) <to_fileio_readlink>: Return
9775 (target_fileio_readlink): Return optional<string>.
9776 * remote.c (remote_hostio_readlink): Return optional<string>.
9777 * inf-child.c (inf_child_fileio_readlink): Return
9779 * target.c (target_fileio_readlink): Return optional<string>.
9781 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9783 * regcache.c (cooked_read_test): Add riscv to the list of
9784 architectures that have a save_reggroup.
9786 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9788 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9789 value is not a dynamic class object.
9791 2018-03-06 Tom Tromey <tom@tromey.com>
9793 * rust-exp.y: Formatting fixes.
9795 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9797 * riscv-tdep.c (riscv_register_name): Remove target description
9799 (riscv_gdbarch_init): Remove target description check.
9801 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9803 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9805 * riscv-tdep.h: Likewise.
9807 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9809 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9810 (riscv_pseudo_register_write): Delete.
9811 (riscv_gdbarch_init): Remove all use of pseudo registers.
9813 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9815 * record-btrace.c (btrace_print_lines): Replace cleanup
9816 parameter with RAII equivalents.
9817 (btrace_insn_history): Replace cleanup with RAII equivalents.
9818 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9819 make_cleanup_ui_out_tuple_begin_end): Remove.
9820 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9821 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9822 make_cleanup_ui_out_list_begin_end): Remove.
9824 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9826 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9827 parameter types to std::vector. Use bool.
9828 (record_btrace_wait): Replace VEC(tp_t) with
9829 std::vector<thread_info *>.
9830 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9832 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9834 * record-btrace.c (record_btrace_disable_callback): Remove.
9835 (struct scoped_btrace_disable): New.
9836 (record_btrace_open): Use scoped_btrace_disable.
9838 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9840 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9841 reading values from registers.
9843 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9845 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9848 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9850 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9851 change parameter type. Use GDB's print functions, and use
9852 core_addr_to_string where appropriate.
9853 (riscv_push_dummy_call): Use core_addr_to_string where
9854 appropriate, update call to riscv_print_arg_location, and reindent
9856 (riscv_return_value): Update call to riscv_print_arg_location.
9858 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9859 Tim Newsome <tim@sifive.com>
9860 Albert Ou <a0u@eecs.berkeley.edu>
9861 Darius Rad <darius@bluespec.com>
9863 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9864 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9865 (ALLDEPFILES): Add riscv-tdep.c
9866 * configure.tgt: Add riscv support.
9867 * riscv-tdep.c: New file.
9868 * riscv-tdep.h: New file.
9869 * NEWS: Mention new target.
9870 * MAINTAINERS: Add entry for riscv.
9872 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9874 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9875 fields within aggregates.
9877 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9879 * record-btrace.c (btrace_print_lines): Change type of flags to
9880 gdb_disassembly_flags.
9882 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9884 * fbsd-nat.c: Include "inf-ptrace.h".
9885 (USE_SIGTRAP_SIGINFO): Conditionally define.
9886 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9887 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9888 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9890 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9892 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9894 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9895 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9896 "supports_stopped_by_hw_breakpoint" target methods.
9898 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9900 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9901 * fbsd-nat.c (debug_fbsd_nat): New variable.
9902 (show_fbsd_nat_debug): New function.
9903 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9904 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9906 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9908 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9909 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9911 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9912 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9915 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9917 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9918 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9920 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9922 * charset.c (struct charset_vector): New.
9923 (charsets): Change type to charset_vector.
9924 (find_charset_names): Adjust.
9926 (_initialize_charset): Adjust.
9928 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9930 * progspace.h (struct program_space) <deleted_solibs>: Change
9931 type to std::vector<std::string>.
9932 * progspace.c (clear_program_space_solib_cache): Adjust.
9933 * breakpoint.c (print_solib_event): Adjust.
9934 (check_status_catch_solib): Adjust.
9935 * solib.c (update_solib_list): Adjust.
9936 * ui-out.h (class ui_out) <field_string>: New overload.
9937 * ui-out.c (ui_out::field_string): New overload.
9939 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9941 * progspace.h (struct program_space): Add constructor and
9942 destructor, initialize fields.
9943 (add_program_space): Remove.
9944 * progspace.c (add_program_space): Rename to...
9945 (program_space::program_space): ... this.
9946 (release_program_space): Rename to...
9947 (program_space::~program_space): ... this.
9948 (delete_program_space): Use delete to delete program_space.
9949 (initialize_progspace): Use new to allocate program_space.
9950 * inferior.c (add_inferior_with_spaces): Likewise.
9951 (clone_inferior_command): Likewise.
9952 * infrun.c (follow_fork_inferior): Likewise.
9953 (handle_vfork_child_exec_or_exit): Likewise.
9955 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9957 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9958 (delim_string_to_char_ptr_vec): Return std::vector of
9959 gdb::unique_xmalloc_ptr.
9960 (dirnames_to_char_ptr_vec_append): Take std::vector of
9961 gdb::unique_xmalloc_ptr.
9962 (dirnames_to_char_ptr_vec): Return std::vector of
9963 gdb::unique_xmalloc_ptr.
9964 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9965 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9966 (delim_string_to_char_ptr_vec): Return an std::vector of
9967 gdb::unique_xmalloc_ptr, adjust the code.
9968 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9969 gdb::unique_xmalloc_ptr, adjust the code.
9970 (dirnames_to_char_ptr_vec): Return an std::vector of
9971 gdb::unique_xmalloc_ptr, adjust the code.
9972 * auto-load.c (auto_load_safe_path_vec): Change type to
9973 std::vector of gdb::unique_xmalloc_ptr.
9974 (auto_load_expand_dir_vars): Return an std::vector of
9975 gdb::unique_xmalloc_ptr, adjust the code.
9976 (auto_load_safe_path_vec_update): Adjust.
9977 (filename_is_in_auto_load_safe_path_vec): Adjust.
9978 (auto_load_objfile_script_1): Adjust.
9979 * build-id.c (build_id_to_debug_bfd): Adjust.
9980 * linux-thread-db.c (thread_db_load_search): Adjust.
9981 * source.c (add_path): Adjust.
9983 * symfile.c (find_separate_debug_file): Adjust.
9984 * utils.c (do_free_char_ptr_vec): Remove.
9985 (make_cleanup_free_char_ptr_vec): Remove.
9987 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9990 * common/pathstuff.c: Conditionally include "<windows.h>".
9992 2018-03-01 Georg Sauthoff <mail@georg.so>
9995 * gcore.in: Quote variables and switch interpreter to bash.
9997 2018-03-01 Tom Tromey <tom@tromey.com>
9999 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10000 assertion. Add assertion for discriminant_index.
10001 (quirk_rust_enum): Use correct base type name in univariant case.
10003 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10005 * record.c (get_call_history_modifiers): Return a
10006 record_print_flags.
10007 (cmd_record_call_history): Adjust.
10008 * record-btrace.c (record_btrace_call_history): Adjust.
10009 (record_btrace_call_history_range): Adjust.
10010 (record_btrace_call_history_from): Adjust.
10011 * target-debug.h (target_debug_print_record_print_flags): New.
10012 * target-delegates.c: Re-generate.
10013 * target.c (target_call_history): Change flags type.
10014 (target_call_history_from): Likewise.
10015 (target_call_history_range): Likewise.
10016 * target.h (struct target_ops) <target_call_history>: Likewise.
10017 (target_call_history_from): Likewise.
10018 (target_call_history_range): Likewise.
10020 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10021 Simon Marchi <simon.marchi@polymtl.ca>
10023 * common/common-utils.c: Include "sys/stat.h".
10024 (is_regular_file): Move here from "source.c"; change return
10026 * common/common-utils.h (is_regular_file): New prototype.
10027 * common/pathstuff.c (contains_dir_separator): New function.
10028 * common/pathstuff.h (contains_dir_separator): New prototype.
10029 * source.c: Don't include "sys/stat.h".
10030 (is_regular_file): Move to "common/common-utils.c".
10032 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10034 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10035 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10036 * auto-load.c: Include "common/pathstuff.h".
10037 * common/common-def.h (current_directory): Move here.
10038 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10040 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10042 * common/pathstuff.c: New file.
10043 * common/pathstuff.h: New file.
10044 * compile/compile.c: Include "common/pathstuff.h".
10045 * defs.h (current_directory): Move to "common/common-defs.h".
10046 * dwarf2read.c: Include "common/pathstuff.h".
10047 * exec.c: Likewise.
10048 * guile/scm-safe-call.c: Likewise.
10049 * linux-thread-db.c: Likewise.
10050 * main.c: Likewise.
10051 * nto-tdep.c: Likewise.
10052 * objfiles.c: Likewise.
10053 * source.c: Likewise.
10054 * symtab.c: Likewise.
10055 * utils.c: Include "common/pathstuff.h".
10056 (gdb_realpath): Move to "common/pathstuff.c".
10057 (gdb_realpath_keepfile): Likewise.
10058 (gdb_abspath): Likewise.
10059 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10060 (gdb_realpath_keepfile): Likewise.
10061 (gdb_abspath): Likewise.
10063 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10065 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10066 wildcard process pid for super_resume for kernels with a
10069 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10071 * compile/compile.c (get_args): Add additional comments
10072 explaining function.
10074 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10075 Tom Tromey <tom@tromey.com>
10077 * target.h (memory_write_request_s): Remove typedef. Don't define
10079 (target_write_memory_blocks): Change argument to std::vector.
10080 (struct memory_write_request): Add constructor.
10081 * target-memory.c (compare_block_starting_address): Return bool.
10082 Change argument types.
10083 (claim_memory): Change arguments to use std::vector.
10084 (split_regular_and_flash_blocks, blocks_to_erase)
10085 (compute_garbled_blocks): Likewise.
10086 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10087 (target_write_memory_blocks): Change argument to std::vector.
10088 * symfile.c (struct load_section_data): Add constructor and
10089 destructor. Use std::vector for "requests".
10090 (struct load_progress_data): Add initializers.
10091 (load_section_callback): Update. Use "new".
10092 (clear_memory_write_data): Remove.
10093 (generic_load): Update.
10095 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10097 * arch/aarch64.h: Use common/tdesc.h.
10099 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10101 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10102 architecture with a 64-bit ABI.
10104 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10106 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10107 ahead of target description loading.
10109 2018-02-26 Tom Tromey <tom@tromey.com>
10111 * stack.c (backtrace_command_1): Update.
10112 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10114 * python/py-framefilter.c (py_print_frame)
10115 (gdbpy_apply_frame_filter): Change type of "flags".
10116 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10118 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10119 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10120 * extension.h (enum frame_filter_flag): Rename from
10121 frame_filter_flags.
10122 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10123 (apply_ext_lang_frame_filter): Change type of "flags".
10124 * extension.c (apply_ext_lang_frame_filter): Change type of
10126 * extension-priv.h (struct extension_language_ops)
10127 <apply_frame_filter>: Change type of "flags".
10129 2018-02-26 Tom Tromey <tom@tromey.com>
10132 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10133 off-by-one in py_end computation.
10134 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10136 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10139 2018-02-26 Tom Tromey <tom@tromey.com>
10141 * dwarf2read.c (struct variant_field): New.
10142 (struct nextfield) <variant>: New field.
10143 (dwarf2_add_field): Handle DW_TAG_variant_part.
10144 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10145 discriminated union.
10146 (read_structure_type): Handle DW_TAG_variant_part.
10147 (handle_struct_member_die): New function, extracted from
10148 process_structure_scope. Handle DW_TAG_variant.
10149 (process_structure_scope): Handle discriminated unions. Call
10150 handle_struct_member_die.
10152 2018-02-26 Tom Tromey <tom@tromey.com>
10154 * rust-lang.h (rust_last_path_segment): Declare.
10155 * rust-lang.c (rust_last_path_segment): Now public. Change
10157 (struct disr_info): Remove.
10158 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10159 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10160 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10161 (rust_enum_p, rust_enum_variant): New function.
10162 (rust_underscore_fields): Remove "offset" parameter.
10163 (rust_print_enum): New function.
10164 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10165 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10166 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10168 (rust_internal_print_type): New function, from rust_print_type.
10170 (rust_print_type): Call rust_internal_print_type.
10171 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10172 Update enum handling.
10173 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10174 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10175 (rust_union_quirks): New functions.
10176 (process_full_comp_unit, process_full_type_unit): Call
10178 (process_structure_scope): Update rust_unions if necessary.
10180 2018-02-26 Tom Tromey <tom@tromey.com>
10182 * value.h (value_union_variant): Declare.
10183 * valops.c (value_union_variant): New function.
10184 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10185 (struct discriminant_info): New.
10186 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10188 (struct main_type) <flag_discriminated_union>: New field.
10190 2018-02-26 Tom Tromey <tom@tromey.com>
10192 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10193 unittests/unpack-selftests.c.
10194 * unittests/unpack-selftests.c: New file.
10195 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10197 2018-02-26 Yao Qi <yao.qi@linaro.org>
10199 * dwarf2read.c (struct partial_die_info) <read>: New method.
10200 (read_partial_die): Remove the declaration.
10201 (load_partial_dies): Update.
10202 (partial_die_info::partial_die_info):
10203 (read_partial_die): Change it to partial_die_info::read.
10205 2018-02-26 Yao Qi <yao.qi@linaro.org>
10207 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10208 (fixup_partial_die): Remove declaration.
10209 (scan_partial_symbols): Update.
10210 (partial_die_parent_scope): Likewise.
10211 (partial_die_full_name): Likewise.
10212 (fixup_partial_die): Change it to partial_die_info::fixup.
10214 2018-02-26 Yao Qi <yao.qi@linaro.org>
10216 * dwarf2read.c (read_partial_die): Update the declaration.
10217 (load_partial_dies): Caller update.
10218 (read_partial_die): Remove one argument abbrev_len.
10220 2018-02-26 Yao Qi <yao.qi@linaro.org>
10222 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10223 assignment operator.
10224 (load_partial_dies): Use ctor and copy ctor.
10225 (read_partial_die): Update.
10226 (dwarf2_cu::find_partial_die): Use ctor.
10228 2018-02-26 Yao Qi <yao.qi@linaro.org>
10230 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10231 (find_partial_die_in_comp_unit): Change it to
10232 dwarf2_cu::find_partial_die.
10233 (find_partial_die): Update.
10235 2018-02-26 Yao Qi <yao.qi@linaro.org>
10237 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10240 2018-02-26 Yao Qi <yao.qi@linaro.org>
10242 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10244 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10246 * arch/amd64.h: Use common/tdesc.h.
10247 * arch/i386.c: Likewise.
10248 * arch/i386.h: Likewise.
10249 * arch/tic6x.c: Likewise.
10250 * arch/tdesc.h: Move file from here...
10251 * common/tdesc.h: ...to here.
10252 * features/aarch64-core.c: Regenerate.
10253 * features/aarch64-fpu.c: Regenerate.
10254 * features/i386/32bit-avx.c: Regenerate.
10255 * features/i386/32bit-avx512.c: Regenerate.
10256 * features/i386/32bit-core.c: Regenerate.
10257 * features/i386/32bit-linux.c: Regenerate.
10258 * features/i386/32bit-mpx.c: Regenerate.
10259 * features/i386/32bit-pkeys.c: Regenerate.
10260 * features/i386/32bit-sse.c: Regenerate.
10261 * features/i386/64bit-avx.c: Regenerate.
10262 * features/i386/64bit-avx512.c: Regenerate.
10263 * features/i386/64bit-core.c: Regenerate.
10264 * features/i386/64bit-linux.c: Regenerate.
10265 * features/i386/64bit-mpx.c: Regenerate.
10266 * features/i386/64bit-pkeys.c: Regenerate.
10267 * features/i386/64bit-segments.c: Regenerate.
10268 * features/i386/64bit-sse.c: Regenerate.
10269 * features/i386/x32-core.c: Regenerate.
10270 * features/tic6x-c6xp.c: Regenerate.
10271 * features/tic6x-core.c: Regenerate.
10272 * features/tic6x-gp.c: Regenerate.
10273 * target-descriptions.c: Use common/tdesc.h.
10274 * target-descriptions.h: Likewise.
10276 2018-02-24 Tom Tromey <tom@tromey.com>
10278 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10279 (try_thread_db_load_from_dir, thread_db_load_search): Use
10281 (info_auto_load_libthread_db_compare): Return bool. Change
10283 (info_auto_load_libthread_db): Use std::vector, std::string.
10286 2018-02-24 Tom Tromey <tom@tromey.com>
10288 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10290 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10292 * gdbarch.c: Rebuild.
10293 * gdbarch.h: Rebuild.
10294 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10295 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10296 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10299 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10301 * gdbtypes.h (sect_offset): Change type to uint64_t.
10302 (sect_offset_str): New function.
10303 * dwarf2read.c (create_addrmap_from_aranges): Use
10305 (error_check_comp_unit_head): Likewise.
10306 (create_debug_type_hash_table): Likewise.
10307 (read_cutu_die_from_dwo): Likewise.
10308 (init_cutu_and_read_dies): Likewise.
10309 (init_cutu_and_read_dies_no_follow): Likewise.
10310 (process_psymtab_comp_unit_reader): Likewise.
10311 (partial_die_parent_scope): Likewise.
10312 (peek_die_abbrev): Likewise.
10313 (process_queue): Likewise.
10314 (dwarf2_physname): Likewise.
10315 (read_namespace_alias): Likewise.
10316 (read_import_statement): Likewise.
10317 (create_dwo_cu_reader): Likewise.
10318 (create_cus_hash_table): Likewise.
10319 (lookup_dwo_cutu): Likewise.
10320 (inherit_abstract_dies): Likewise.
10321 (read_func_scope): Likewise.
10322 (read_call_site_scope): Likewise.
10323 (dwarf2_add_member_fn): Likewise.
10324 (read_common_block): Likewise.
10325 (read_module_type): Likewise.
10326 (read_typedef): Likewise.
10327 (read_subrange_type): Likewise.
10328 (load_partial_dies): Likewise.
10329 (read_partial_die): Likewise.
10330 (find_partial_die): Likewise.
10331 (read_str_index): Likewise.
10332 (dwarf2_string_attr): Likewise.
10333 (build_error_marker_type): Likewise.
10334 (lookup_die_type): Likewise.
10335 (dump_die_shallow): Likewise.
10336 (follow_die_ref): Likewise.
10337 (dwarf2_fetch_die_loc_sect_off): Likewise.
10338 (dwarf2_fetch_constant_bytes): Likewise.
10339 (follow_die_sig): Likewise.
10340 (get_signatured_type): Likewise.
10341 (get_DW_AT_signature_type): Likewise.
10342 (dwarf2_find_containing_comp_unit): Likewise.
10343 (set_die_type): Likewise.
10345 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10347 * arch/aarch64.c: Include "common-defs.h".
10348 * arch/amd64.c: Likewise.
10349 * arch/i386.c: Likewise.
10351 2018-02-21 Tom Tromey <tom@tromey.com>
10353 * value.h: (extract_field_op): Update.
10354 * eval.c (extract_field_op): Return a const char *.
10355 * expression.h (parse_expression_for_completion): Update.
10356 * completer.c (complete_expression): Update.
10357 (add_struct_fields): Make fieldname const.
10358 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10359 (mark_completion_tag, parse_exp_in_context_1): Update.
10360 (parse_expression_for_completion): Change "name" to
10361 unique_xmalloc_ptr*.
10363 2018-02-21 Tom Tromey <tom@tromey.com>
10365 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10367 2018-02-21 Yao Qi <yao.qi@linaro.org>
10369 * avr-tdep.c (avr_read_pc): Change parameter type to
10371 * gdbarch.sh (read_pc): Likewise.
10372 * gdbarch.c: Re-generated.
10373 * gdbarch.h: Re-generated.
10374 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10376 * ia64-tdep.c (ia64_read_pc): Likewise.
10377 * mips-tdep.c (mips_read_pc): Likewise.
10378 * spu-tdep.c (spu_read_pc): Likewise.
10380 2018-02-21 Yao Qi <yao.qi@linaro.org>
10382 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10383 * regcache-dump.c: New file.
10384 * regcache.c: Move register_dump to regcache-dump.c.
10385 (maintenance_print_registers): Likewise.
10386 (maintenance_print_raw_registers): Likewise.
10387 (maintenance_print_cooked_registers): Likewise.
10388 (maintenance_print_register_groups): Likewise.
10389 (maintenance_print_remote_registers): Likewise.
10390 (_initialize_regcache): Likewise.
10391 * regcache.h (register_dump): Moved from regcache.c.
10393 2018-02-21 Yao Qi <yao.qi@linaro.org>
10395 * regcache.c (regcache::regcache): Update.
10396 (regcache::invalidate): Move it to detached_regcache::invalidate.
10397 (get_thread_arch_aspace_regcache): Update.
10398 (regcache::raw_update): Update.
10399 (regcache::cooked_read): Remove some code.
10400 (regcache::cooked_read_value): Likewise.
10401 (regcache::raw_write): Remove assert on m_readonly_p.
10402 (regcache::raw_supply_integer): Move it to
10403 detached_regcache::raw_supply_integer.
10404 (regcache::raw_supply_zeroed): Likewise.
10405 * regcache.h (detached_regcache) <raw_supply_integer>: New
10407 <raw_supply_zeroed, invalidate>: Likewise.
10408 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10409 <invalidate>: Likewise.
10410 <m_readonly_p>: Removed.
10412 2018-02-21 Yao Qi <yao.qi@linaro.org>
10414 * infcmd.c (get_return_value): Let stop_regs point to
10415 get_current_regcache.
10416 * regcache.c (regcache::regcache): Remove.
10417 (register_dump_reg_buffer): New class.
10418 (regcache_print): Adjust.
10419 * regcache.h (regcache): Remove constructors.
10421 2018-02-21 Yao Qi <yao.qi@linaro.org>
10423 * regcache.c (class register_dump): New class.
10424 (register_dump_regcache, register_dump_none): New class.
10425 (register_dump_remote, register_dump_groups): New class.
10426 (regcache_print): Update.
10427 * regcache.h (regcache_dump_what): Move it to regcache.c.
10428 (regcache) <dump>: Remove.
10430 2018-02-21 Yao Qi <yao.qi@linaro.org>
10432 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10434 (jit_unwind_reg_set_impl): Call raw_supply.
10435 (jit_frame_sniffer): Use reg_buffer_rw.
10436 * record-full.c (record_full_core_regbuf): Change its type.
10437 (record_full_core_open_1): Use reg_buffer_rw.
10438 (record_full_close): Likewise.
10439 (record_full_core_fetch_registers): Use regcache->raw_supply.
10440 (record_full_core_store_registers): Likewise.
10441 * regcache.c (regcache::get_register_status): Move it to
10443 (regcache_raw_set_cached_value): Remove.
10444 (regcache::raw_set_cached_value): Remove.
10445 (regcache::raw_write): Call raw_supply.
10446 (regcache::raw_supply): Move it to reg_buffer_rw.
10447 * regcache.h (regcache_raw_set_cached_value): Remove.
10448 (reg_buffer_rw): New class.
10450 2018-02-21 Yao Qi <yao.qi@linaro.org>
10452 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10453 readonly_detached_regcache.
10454 (dummy_frame_prev_register): Use regcache->cooked_read.
10455 * frame.c (frame_save_as_regcache): Change return type.
10456 (frame_pop): Update.
10457 * frame.h (frame_save_as_regcache): Update declaration.
10458 * inferior.h (get_infcall_suspend_state_regcache): Update
10460 * infrun.c (infcall_suspend_state) <registers>: use
10461 readonly_detached_regcache.
10462 (save_infcall_suspend_state): Don't use regcache_dup.
10463 (get_infcall_suspend_state_regcache): Change return type.
10464 * linux-fork.c (struct fork_info) <savedregs>: Change to
10465 readonly_detached_regcache.
10467 (fork_save_infrun_state): Don't use regcache_dup.
10468 (info_checkpoints_command): Adjust.
10469 * mi/mi-main.c (register_changed_p): Update declaration.
10470 (mi_cmd_data_list_changed_registers): Use
10471 readonly_detached_regcache.
10472 (register_changed_p): Change parameter type to
10473 readonly_detached_regcache.
10474 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10475 readonly_detached_regcache.
10476 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10477 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10479 (regcache::save): Move it to reg_buffer.
10480 (regcache::restore): Change parameter type.
10481 (regcache_dup): Remove.
10482 * regcache.h (reg_buffer) <save>: New method.
10483 (readonly_detached_regcache): New class.
10484 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10485 readonly_detached_regcache.
10486 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10488 2018-02-21 Yao Qi <yao.qi@linaro.org>
10490 * frame.c (frame_save_as_regcache): Use regcache method save.
10491 (frame_pop): Use regcache method restore.
10492 * infrun.c (restore_infcall_suspend_state): Likewise.
10493 * linux-fork.c (fork_load_infrun_state): Likewise.
10494 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10496 * regcache.c (regcache_save): Remove.
10497 (regcache::restore): More asserts.
10498 (regcache_cpy): Remove.
10499 * regcache.h (regcache_save): Remove the declaration.
10500 (regcache::restore): Move from private to public.
10501 Remove the friend declaration of regcache_cpy.
10502 (regcache_cpy): Remove declaration.
10504 2018-02-21 Yao Qi <yao.qi@linaro.org>
10506 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10507 parameter type to 'readable_regcache *'.
10508 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10509 * arm-tdep.c (arm_neon_quad_read): Likewise.
10510 (arm_pseudo_read): Likewise.
10511 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10512 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10513 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10514 * gdbarch.c: Re-generated.
10515 * gdbarch.h: Re-generated.
10516 * gdbarch.sh (pseudo_register_read): Change parameter type to
10517 'readable_regcache *'.
10518 (pseudo_register_read_value): Likewise.
10519 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10520 (h8300_pseudo_register_read): Likewise.
10521 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10522 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10523 (i386_pseudo_register_read_into_value): Likewise.
10524 (i386_pseudo_register_read_value): Likewise.
10525 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10527 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10528 * m32c-tdep.c (m32c_raw_read): Likewise.
10529 (m32c_read_flg): Likewise.
10530 (m32c_banked_register): Likewise.
10531 (m32c_banked_read): Likewise.
10532 (m32c_sb_read): Likewise.
10533 (m32c_part_read): Likewise.
10534 (m32c_cat_read): Likewise.
10535 (m32c_r3r2r1r0_read): Likewise.
10536 (m32c_pseudo_register_read): Likewise.
10537 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10538 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10539 (mep_pseudo_cr64_read): Likewise.
10540 (mep_pseudo_register_read): Likewise.
10541 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10542 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10543 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10544 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10545 (regcache::cooked_read): Likewise.
10546 (regcache::cooked_read_value): Likewise.
10547 (regcache_cooked_read_signed):
10548 (regcache::cooked_read): Likewise.
10549 * regcache.h (readable_regcache): New class.
10550 (regcache): Inherit readable_regcache. Move some methods to
10552 * rl78-tdep.c (rl78_pseudo_register_read): Change
10553 parameter type to 'readable_regcache *'.
10554 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10555 (e500_pseudo_register_read): Change parameter type to
10556 'readable_regcache *'.
10557 (dfp_pseudo_register_read): Likewise.
10558 (vsx_pseudo_register_read): Likewise.
10559 (efpr_pseudo_register_read): Likewise.
10560 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10561 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10562 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10563 (sh64_pseudo_register_read): Likewise.
10564 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10565 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10566 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10567 (spu_pseudo_register_read): Likewise.
10568 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10569 (xtensa_pseudo_register_read): Likewise.
10571 2018-02-21 Yao Qi <yao.qi@linaro.org>
10573 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10574 (regcache::arch): Move it to reg_buffer::arch.
10575 (regcache::register_buffer): Likewise.
10576 (regcache::assert_regnum): Likewise.
10577 (regcache::num_raw_registers): Likewise.
10578 * regcache.h (reg_buffer): New class.
10579 (regcache): Inherit reg_buffer.
10581 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10583 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10584 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10586 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10588 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10590 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10592 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10593 (SFILES): Remove common/*.c files.
10594 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10595 * common/common.host: Add common reference.
10596 * configure.ac: Likewise.
10597 * configure: Regenerate.
10599 2018-02-16 Yao Qi <yao.qi@linaro.org>
10601 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10602 (block_initialize_namespace): Use new.
10603 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10604 (dwarf2_free_objfile): Use delete.
10605 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10606 (copy_type_recursive): Use new.
10607 * gdb_obstack.h (allocate_on_obstack): New.
10609 2018-02-15 Yao Qi <yao.qi@linaro.org>
10612 * inferior.c (exit_inferior_1): Reset inf->control.
10614 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10616 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10619 2018-02-14 Pedro Alves <palves@redhat.com>
10621 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10622 frame_cleanup_after_sniffer on exception.
10624 2018-02-14 Tom Tromey <tom@tromey.com>
10626 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10628 (solib_bfd_open): Make pathname const.
10629 * solib.c (solib_bfd_open): Make pathname const.
10630 * solib-spu.c (spu_bfd_fopen): Make name const.
10631 (spu_bfd_open): Make pathname const.
10632 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10633 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10635 2018-02-14 Tom Tromey <tom@tromey.com>
10637 * symfile.c (symfile_bfd_open): Update.
10638 * source.h (openp, source_full_path_of, find_and_open_source):
10639 Change argument type to unique_xmalloc_ptr.
10640 * source.c (openp): Take a unique_xmalloc_ptr.
10641 (source_full_path_of, find_and_open_source): Likewise.
10642 (open_source_file, symtab_to_fullname): Update.
10643 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10644 unique_xmalloc_ptr.
10645 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10646 (exec_file_find): Update.
10647 * psymtab.c (psymtab_to_fullname): Update.
10648 * nto-tdep.h (nto_find_and_open_solib): Update.
10649 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10650 unique_xmalloc_ptr.
10651 * exec.c (exec_file_attach): Update.
10652 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10653 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10655 2018-02-14 Tom Tromey <tom@tromey.com>
10657 * solib.c: Include source.h.
10658 * nto-tdep.c: Include source.h.
10659 * mi/mi-cmd-env.c: Include source.h.
10660 * infcmd.c: Include source.h.
10661 * exec.c: Include source.h.
10662 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10663 (add_path, directory_switch, source_path, init_source_path): Move
10665 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10666 (add_path, directory_switch, source_path, init_source_path):
10669 2018-02-14 Tom Tromey <tom@tromey.com>
10671 * solist.h (exec_file_find, solib_find): Return
10672 unique_xmalloc_ptr.
10673 (solib_bfd_fopen): Take a const char *.
10674 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10675 (exec_file_find, solib_find): Likewise.
10676 (solib_bfd_fopen): Do not take ownership of "pathname".
10677 (solib_bfd_open): Use unique_xmalloc_ptr.
10678 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10679 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10680 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10681 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10683 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10685 * ada-lang.c (name_match_type_from_name): Remove reference to
10686 ada_name_for_lookup in function's documentation.
10687 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10689 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10691 * defs.h (enum openp_flags): New enum.
10692 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10693 Move to enum openp_flags.
10694 (openp_flags): New enum flags.
10695 (openp): Change parameter type to openp_flags.
10696 * source.c (openp): Change parameter type to openp_flags.
10697 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10698 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10700 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10702 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10705 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10707 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10709 (class dwarf2_queue_guard): ...the destructor of this new class.
10710 (dw2_do_instantiate_symtab): Create instance of the new class
10711 dwarf2_queue_guard, remove cleanup.
10713 2018-02-09 Tom Tromey <tom@tromey.com>
10715 * source.c (find_source_lines): Don't reference past the end of
10718 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10720 * remote.c (remote_btrace_maybe_reopen): Change error message.
10721 * btrace.c (btrace_enable): Likewise.
10722 (parse_xml_btrace): Likewise.
10723 (parse_xml_btrace_conf): Likewise.
10725 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10727 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10728 (linux_enable_pt, linux_enable_bts): Call
10729 diagnose_perf_event_open_fail.
10731 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10733 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10734 Remove parameter and change return type. Update callers. Move it.
10735 (linux_enable_bts, linux_enable_pt): Improve error message.
10736 (linux_enable_pt): Remove zero buffer size check.
10737 (linux_enable_btrace): Improve error messages. Remove NULL return
10740 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10742 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10743 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10744 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10745 (linux_supports_pt, linux_supports_btrace): Remove.
10746 (linux_enable_bts): Call cpu_supports_bts.
10747 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10748 * remote.c (remote_supports_btrace): Remove.
10749 (init_remote_ops): Remove remote_supports_btrace.
10750 * target-delegates.c: Regenerated.
10751 * target.c (target_supports_btrace): Remove.
10752 * target.h (target_ops) <to_supports_btrace>: Remove
10753 (target_supports_btrace): Remove.
10754 * x86-linux-nat.c (x86_linux_create_target): Remove
10755 linux_supports_btrace.
10757 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10759 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10761 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10762 exception and use message in own exception.
10764 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10766 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10767 (perf_event_pt_event_type): Use gdb_file_up.
10768 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10769 scoped_fd, and scoped_mmap.
10771 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10773 * common/scoped_mmap.h: New.
10774 * unittests/scoped_mmap-selftest.c: New.
10775 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10776 unittests/scoped_mmap-selftest.c.
10778 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10780 * common/scoped_fd.h: New.
10781 * unittests/scoped_fd-selftest.c: New.
10782 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10783 unittests/scoped_fd-selftest.c.
10785 2018-02-09 Tom Tromey <tom@tromey.com>
10787 * auto-load.c (auto_load_section_scripts): Use
10788 gdb::unique_xmalloc_ptr.
10790 2018-02-09 Tom Tromey <tom@tromey.com>
10792 * auto-load.c (execute_script_contents): Use std::string.
10794 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10796 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10797 Python function, rather than a new command.
10799 2018-02-08 Tom Tromey <tom@tromey.com>
10801 * solib.c (solib_find_1): Use std::string.
10802 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10804 2018-02-08 Tom Tromey <tom@tromey.com>
10806 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10808 2018-02-08 Tom Tromey <tom@tromey.com>
10810 * source.c (find_source_lines): Use gdb::def_vector.
10812 2018-02-08 Tom Tromey <tom@tromey.com>
10814 * macrocmd.c (struct temporary_macro_definition): New.
10815 (macro_define_command): Use temporary_macro_definition. Remove
10817 (free_macro_definition_ptr): Remove.
10819 2018-02-08 Tom Tromey <tom@tromey.com>
10821 * macroexp.c (maybe_expand): Use std::string.
10823 2018-02-08 Tom Tromey <tom@tromey.com>
10825 * macroexp.c (struct macro_buffer): Add initializers for some
10827 (init_buffer, init_shared_buffer, free_buffer)
10828 (free_buffer_return_text): Remove.
10829 (macro_buffer): New constructors.
10830 (~macro_buffer): New destructor.
10831 (macro_buffer::set_shared): New method.
10832 (macro_buffer::resize_buffer, macro_buffer::appendc)
10833 (macro_buffer::appendmem): Now methods, not free functions.
10834 (set_token, append_tokens_without_splicing, stringify)
10835 (macro_stringify): Update.
10836 (gather_arguments): Change return type. Remove argc_p argument,
10837 add args_ptr argument. Use std::vector.
10838 (substitute_args): Remove argc argument. Accept std::vector.
10839 (expand): Update. Use std::vector.
10840 (scan, macro_expand, macro_expand_next): Update.
10842 2018-02-08 Tom Tromey <tom@tromey.com>
10844 * symtab.c (default_collect_symbol_completion_matches_break_on):
10845 Use unique_xmalloc_ptr.
10846 * macroscope.h: (sal_macro_scope, user_macro_scope)
10847 (default_macro_scope): Return unique_xmalloc_ptr.
10848 * macroscope.c (sal_macro_scope, user_macro_scope)
10849 (default_macro_scope): Return unique_xmalloc_ptr.
10850 * macroexp.h (macro_expand, macro_expand_once): Return
10851 unique_xmalloc_ptr.
10852 * macroexp.c (macro_expand, macro_expand_once): Return
10853 unique_xmalloc_ptr.
10854 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10855 (info_macro_command, info_macros_command): Use
10856 unique_xmalloc_ptr.
10857 * compile/compile-c-support.c (write_macro_definitions): Use
10858 unique_xmalloc_ptr.
10859 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10861 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10863 * value.c (value_static_field): Assign field type instead of
10864 containing type when returning an optimized out value.
10866 2018-02-06 Yao Qi <yao.qi@linaro.org>
10868 * ft32-tdep.c (ft32_read_pc): Remove.
10869 (ft32_write_pc): Remove.
10870 (ft32_gdbarch_init): Update.
10871 * m32r-tdep.c (m32r_read_pc): Remove.
10872 (m32r_gdbarch_init): Update.
10873 * mep-tdep.c (mep_read_pc): Remove.
10874 (mep_gdbarch_init): Update.
10875 * microblaze-tdep.c (microblaze_write_pc): Remove.
10876 (microblaze_gdbarch_init): Update.
10877 * mn10300-tdep.c (mn10300_read_pc): Remove.
10878 (mn10300_write_pc): Remove.
10879 (mn10300_gdbarch_init): Update.
10880 * moxie-tdep.c (moxie_read_pc): Remove.
10881 (moxie_write_pc): Remove.
10882 (moxie_gdbarch_init): Update.
10884 2018-02-06 Yao Qi <yao.qi@linaro.org>
10886 * expprint.c (print_subexp_standard): Handle
10887 OP_F77_UNDETERMINED_ARGLIST.
10888 (dump_subexp_body_standard): Likewise.
10890 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10892 * target-descriptions.c (tdesc_element_visitor) Add empty
10894 (tdesc_type): Move make_gdb_type from here.
10895 (tdesc_type_builtin): Likewise.
10896 (tdesc_type_vector): Likewise.
10897 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10898 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10899 (make_gdb_type_union): Likewise.
10900 (make_gdb_type_flags): Likewise.
10901 (make_gdb_type_enum): Likewise.
10902 (make_gdb_type): New function.
10903 (tdesc_register_type): Use static make_gdb_type.
10905 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10907 * infcmd.c (default_print_one_register_info): Align natural-format
10908 column values consistently one under another.
10909 (pad_to_column): New function.
10911 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10913 * dwarf2read.c (dwarf2_physname): Move commment.
10915 2018-02-01 Leszek Swirski <leszeks@google.com>
10917 * varobj.c (varobj_formatted_print_options): Allow recursive
10918 pretty printing if pretty printing is enabled.
10920 2018-02-01 Leszek Swirski <leszeks@google.com>
10922 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10923 names after a structop as a filename.
10925 2018-02-01 Yao Qi <yao.qi@linaro.org>
10927 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10928 (arm_record_coproc_data_proc): Likewise.
10930 2018-02-01 Yao Qi <yao.qi@linaro.org>
10932 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10934 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10936 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10937 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10939 2018-01-31 Pedro Alves <palves@redhat.com>
10941 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10942 * inflow.c (child_terminal_save_inferior): Wrap reference to
10943 tcgetpgrp in HAVE_TERMIOS_H.
10944 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10946 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10947 always iterate over all inferiors.
10948 (gdbsim_cntrl_c): Adjust.
10949 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10951 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10953 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10954 index type is objfile-owned if the element type is as well.
10956 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10960 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10962 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10963 "features/s390x-linux64.c".
10964 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10965 s390_linux32 and s390x_linux64.
10966 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10968 * s390-tdep.c: Include "features/s390-linux32.c" and
10969 "features/s390x-linux64.c".
10970 (s390_tdesc_valid): Add check for tdesc_has_registers.
10971 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10972 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10973 tdesc_s390x_linux64.
10974 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10975 tdesc_s390x_linux64 to...
10976 * s390-tdep.h: ...here.
10978 2018-01-30 Pedro Alves <palves@redhat.com>
10981 * config.in, configure: Regenerate.
10982 * configure.ac: Check for getpgid.
10983 * go32-nat.c (go32_pass_ctrlc): New.
10984 (go32_target): Install it.
10985 * inf-child.c (inf_child_target): Install
10986 child_terminal_save_inferior, child_pass_ctrlc and
10988 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10989 (inf_ptrace_target): No longer install it.
10990 * infcmd.c (interrupt_target_1): Adjust.
10991 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10992 (child_interrupt): Declare.
10993 (inferior::terminal_state): New.
10994 * inflow.c (struct terminal_info): Update comments.
10995 (inferior_process_group): Delete.
10996 (terminal_is_ours): Delete.
10997 (gdb_tty_state): New.
10998 (child_terminal_init): Adjust.
10999 (is_gdb_terminal, sharing_input_terminal_1)
11000 (sharing_input_terminal): New functions.
11001 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11002 Set the process's actual process group in the foreground if
11003 possible. Handle is_ours_for_output/is_ours distinction. Don't
11004 mark terminal as the inferior's if not sharing GDB's terminal.
11005 Don't check attach_flag.
11006 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11007 pass down a target_terminal_state.
11008 (child_terminal_save_inferior): New, factored out from ...
11009 (child_terminal_ours_1): ... this. Handle
11010 target_terminal_state::is_ours_for_output.
11011 (child_interrupt, child_pass_ctrlc): New.
11012 (inflow_inferior_exit): Clear the inferior's terminal_state.
11013 (copy_terminal_info): Copy the inferior's terminal state.
11014 (_initialize_inflow): Remove reference to terminal_is_ours.
11015 * inflow.h (inferior_process_group): Delete.
11016 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11017 * procfs.c (procfs_target): Don't install procfs_interrupt.
11018 (procfs_interrupt): Delete.
11019 * remote.c (remote_serial_quit_handler): Adjust.
11020 (remote_interrupt): Remove ptid parameter. Adjust.
11021 * target-delegates.c: Regenerate.
11022 * target.c: Include "terminal.h".
11023 (target_terminal::terminal_state): Rename to ...
11024 (target_terminal::m_terminal_state): ... this.
11025 (target_terminal::init): Adjust.
11026 (target_terminal::inferior): Adjust to per-inferior
11028 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11029 (target_terminal::ours, target_terminal::ours_for_output): Use
11030 target_terminal_is_ours_kind.
11031 (target_interrupt): Remove ptid parameter. Adjust.
11032 (default_target_pass_ctrlc): Adjust.
11033 * target.h (target_ops::to_terminal_save_inferior): New field.
11034 (target_ops::to_interrupt): Remove ptid_t parameter.
11035 (target_interrupt): Remove ptid_t parameter. Update comment.
11036 (target_pass_ctrlc): Update comment.
11037 * target/target.h (target_terminal_state): New scoped enum,
11038 factored out of ...
11039 (target_terminal::terminal_state): ... here.
11040 (target_terminal::inferior): Update comments.
11041 (target_terminal::restore_inferior): New.
11042 (target_terminal::is_inferior, target_terminal::is_ours)
11043 (target_terminal::is_ours_for_output): Adjust.
11044 (target_terminal::scoped_restore_terminal_state): Adjust to
11045 rename, and call restore_inferior() instead of inferior().
11046 (target_terminal::scoped_restore_terminal_state::m_state): Change
11048 (target_terminal::terminal_state): Rename to ...
11049 (target_terminal::m_terminal_state): ... this and change type.
11051 2018-01-30 Pedro Alves <palves@redhat.com>
11053 * linux-nat.c (wait_for_signal): New function.
11054 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11056 (async_terminal_is_ours)
11057 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11058 (linux_nat_add_target): Don't override
11059 to_terminal_inferior/to_terminal_ours.
11061 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11063 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11065 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11067 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11068 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11069 dwarf2_per_objfile_free here.
11070 (dwarf2_per_objfile_free): Remove.
11071 (_initialize_dwarf2_read): Don't register
11072 dwarf2_per_objfile_free as a registry cleanup.
11074 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11076 Avoid compilation errors in MinGW native builds
11078 The error is triggered by including python-internal.h, and the
11081 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11082 from build-gnulib/import/math.h:27,
11083 from d:/usr/Python26/include/pyport.h:235,
11084 from d:/usr/Python26/include/Python.h:58,
11085 from python/python-internal.h:94,
11086 from python/py-arch.c:24:
11087 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11091 This happens because Python headers define 'hypot' to expand t
11092 '_hypot' in the Windows builds.
11093 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11094 'hypoth'. This avoids a compilation error.
11096 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11098 * MAINTAINERS (Write After Approval): Fix ordering.
11100 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11102 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11104 2018-01-26 Alan Modra <amodra@gmail.com>
11106 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11107 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11108 Remove nop. Make const. Comment.
11109 (powerpc32_plt_stub_so_2): New.
11110 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11111 Correct count. Update uses.
11112 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11113 Move common code reading PLT entry word. Correct
11114 powerpc32_plt_stub PLT address calculation.
11115 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11116 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11117 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11118 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11119 (ppc64_standard_linkage8): Likewise.
11120 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11121 Correct insns description.
11122 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11124 2018-01-24 Pedro Alves <palves@redhat.com>
11126 GCC PR libstdc++/83906
11127 * gdbtypes.c (operator==(const dynamic_prop &,
11128 const dynamic_prop &)): New.
11129 (operator==(const range_bounds &, const range_bounds &)): New.
11130 (check_types_equal): Use them instead of memcmp.
11131 * gdbtypes.h (operator==(const dynamic_prop &,
11132 const dynamic_prop &)): Declare.
11133 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11134 (operator==(const range_bounds &, const range_bounds &)): Declare.
11135 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11137 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11139 * s390-linux-tdep.c (s390_record_address_mask)
11140 (s390_record_calc_disp_common, s390_record_calc_disp)
11141 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11142 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11143 (s390_process_record): Move to s390-tdep.c.
11144 (s390_linux_init_abi_any): Adjust.
11145 * s390-tdep.c (s390_record_address_mask)
11146 (s390_record_calc_disp_common, s390_record_calc_disp)
11147 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11148 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11149 (s390_process_record): Moved from s390-linux-tdep.c
11150 (s390_gdbarch_init): Adjust.
11152 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11154 * s390-linux-nat.c (s390-tdep.h): New include.
11155 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11156 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11157 (ALLDEPFILES): Add s390-tdep.c.
11158 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11159 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11160 * s390-tdep.h: ...this. New file.
11161 * s390-linux-tdep.c (s390-tdep.h): New include.
11162 (_initialize_s390_tdep): Rename to...
11163 (_initialize_s390_linux_tdep): ...this and adjust.
11164 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11165 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11167 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11168 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11169 (s390_is_partial_instruction, s390_software_single_step)
11170 (is_non_branch_ril, s390_displaced_step_copy_insn)
11171 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11172 (s390_prologue_data, s390_addr, s390_store, s390_load)
11173 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11174 (s390_register_call_saved, s390_guess_tracepoint_registers)
11175 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11176 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11177 (s390_pseudo_register_name, s390_pseudo_register_type)
11178 (s390_pseudo_register_read, s390_pseudo_register_write)
11179 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11180 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11181 (s390_addr_bits_remove, s390_address_class_type_flags)
11182 (s390_address_class_type_flags_to_name)
11183 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11184 (s390_function_arg_float, s390_function_arg_vector)
11185 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11186 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11187 (s390_frame_align, s390_register_return_value, s390_return_value)
11188 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11189 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11190 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11191 (s390_trad_frame_prev_register, s390_unwind_cache)
11192 (s390_prologue_frame_unwind_cache)
11193 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11194 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11195 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11196 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11197 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11198 (s390_frame_base_address, s390_local_base_address)
11199 (s390_frame_base, s390_gcc_target_options)
11200 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11201 (s390_validate_reg_range, s390_tdesc_valid)
11202 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11203 * s390-tdep.c: ...this. New file.
11205 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11207 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11208 (s390_process_record, s390_gdbarch_tdep_alloc)
11209 (s390_linux_init_abi_any): Use/set new hook.
11211 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11213 * s390-linux-tdep.c (osabi.h): New include.
11214 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11215 (s390_linux_init_abi_any): New functions.
11216 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11218 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11220 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11221 tdesc_has_registers check
11223 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11225 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11226 (s390_validate_reg_range): New macro.
11227 (s390_gdbarch_init): Adjust.
11229 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11231 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11232 (s390_gdbarch_tdep_alloc): Adjust.
11233 (s390_gdbarch_init): Adjust.
11235 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11237 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11238 <have_tdb>: Change type to bool.
11239 (s390_gdbarch_tdep_alloc): Adjust.
11240 (s390_gdbarch_init): Adjust.
11242 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11244 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11245 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11246 (s390_gdbarch_tdep_alloc): New function.
11247 (s390_gdbarch_init): Allocate tdep at start and use its fields
11248 instead of separate variables.
11250 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11252 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11253 when looking for cached gdbarch and add comment for remaining.
11255 2018-01-22 Pedro Alves <palves@redhat.com>
11256 Sergio Durigan Junior <sergiodj@redhat.com>
11258 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11261 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11263 * MAINTAINERS: Update my company e-mail address.
11265 2018-01-22 Yao Qi <yao.qi@linaro.org>
11267 * regcache.c (cooked_write_test): New function.
11268 (_initialize_regcache): Register the test.
11270 2018-01-22 Yao Qi <yao.qi@linaro.org>
11272 * ia64-tdep.c (ia64_pseudo_register_read): Call
11273 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11274 * m32c-tdep.c (m32c_cat_read): Likewise.
11275 (m32c_r3r2r1r0_read): Likewise.
11276 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11277 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11279 2018-01-22 Yao Qi <yao.qi@linaro.org>
11281 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11282 method raw_read instead of regcache_raw_read.
11283 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11284 * arm-tdep.c (arm_neon_quad_read): Likewise.
11285 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11286 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11287 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11288 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11289 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11290 (i386_pseudo_register_read_into_value): Likewise.
11291 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11292 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11293 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11294 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11295 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11296 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11297 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11298 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11299 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11301 2018-01-22 Yao Qi <yao.qi@linaro.org>
11303 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11304 * configure.tgt: Remove target mt.
11305 * mt-tdep.c: Remove.
11306 * regcache.c (cooked_read_test): Remove the check for mt.
11308 2018-01-22 Yao Qi <yao.qi@linaro.org>
11310 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11311 instead of gdbarch_pseudo_register_read_value.
11313 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11315 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11318 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11320 * linespec.c (create_sals_line_offset): Remove code that preserved
11321 the symtab_and_line's line number.
11323 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11325 * varobj.c (varobj_create): Don't set valid_block when creating a
11328 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11330 * varobj.c (varobj_create): Remove out of date comment.
11332 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11335 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11336 updating innermost block.
11337 * parse.c (innermost_block_tracker::update): Take extra type
11338 parameter, and check types match before updating innermost block.
11339 (write_dollar_variable): Update innermost block for registers.
11340 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11341 (innermost_block_tracker::innermost_block_tracker): Initialise
11343 (innermost_block_tracker::reset): Take type parameter.
11344 (innermost_block_tracker::update): Take type parameter, and pass
11345 type through as needed.
11346 (innermost_block_tracker::m_types): New member.
11347 * varobj.c (varobj_create): Pass type when reseting innermost
11350 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11352 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11353 * ada-lang.c (resolve_subexp): Likewise.
11354 * breakpoint.c (set_breakpoint_condition) Likewise.
11355 (watch_command_1) Likewise.
11356 * c-exp.y (variable): Likewise.
11357 * d-exp.y (PrimaryExpression): Likewise.
11358 * f-exp.y (variable): Likewise.
11359 * go-exp.y (variable): Likewise.
11360 * m2-exp.y (variable): Likewise.
11361 * objfiles.c (objfile::~objfile): Likewise.
11362 * p-exp.y (variable): Likewise.
11363 * parse.c (innermost_block): Change type.
11364 * parser-defs.h (class innermost_block_tracker): New.
11365 (innermost_block): Change to innermost_block_tracker.
11366 * printcmd.c (display_command): Switch to innermost_block API.
11367 (do_one_display): Likewise.
11368 * rust-exp.y (do_one_display): Likewise.
11369 * symfile.c (clear_symtab_users): Likewise.
11370 * varobj.c (varobj_create): Switch to innermost_block API, replace
11371 use of innermost_block with block stored on varobj object.
11373 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11375 * expression.h (innermost_block): Remove declaration.
11376 * varobj.c: Add 'parser-defs.h' include.
11378 2018-01-19 Tom Tromey <tom@tromey.com>
11380 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11381 symbols in the static and global blocks.
11383 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11385 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11386 gdb_ptrace.h, and move including gdb_wait.h ...
11387 * nat/linux-ptrace.h: ... to here.
11389 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11391 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11392 inf_ptrace_detach_success.
11393 (inf_ptrace_detach_success): Add inferior parameter, use it
11394 instead of inferior_ptid, pass it to detach_inferior.
11395 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11397 * inferior.c (detach_inferior): Add overload that takes an
11399 * inferior.h (detach_inferior): Likewise.
11400 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11401 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11402 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11404 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11406 * target.h (struct target_ops) <to_detach>: Add inferior
11408 (target_detach): Likewise.
11409 * target.c (dispose_inferior): Pass inferior down.
11410 (target_detach): Pass inferior down. Assert that it is equal to
11411 the current inferior.
11412 * aix-thread.c (aix_thread_detach): Pass inferior down.
11413 * corefile.c (core_file_command): Pass current_inferior() down.
11414 * corelow.c (core_detach): Add inferior parameter.
11415 * darwin-nat.c (darwin_detach): Likewise.
11416 * gnu-nat.c (gnu_detach): Likewise.
11417 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11418 * infcmd.c (detach_command): Pass current_inferior() down to
11420 * infrun.c (follow_fork_inferior): Pass parent_inf to
11422 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11424 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11425 * linux-thread-db.c (thread_db_detach): Likewise.
11426 * nto-procfs.c (procfs_detach): Likewise.
11427 * procfs.c (procfs_detach): Likewise.
11428 * record.c (record_detach): Likewise.
11429 * record.h (struct inferior): Forward-declare.
11430 (record_detach): Add inferior parameter.
11431 * remote-sim.c (gdbsim_detach): Likewise.
11432 * remote.c (remote_detach_1): Likewise.
11433 (remote_detach): Likewise.
11434 (extended_remote_detach): Likewise.
11435 * sol-thread.c (sol_thread_detach): Likewise.
11436 * target-debug.h (target_debug_print_inferior_p): New macro.
11437 * target-delegates.c: Re-generate.
11438 * top.c (kill_or_detach): Pass inferior down to target_detach.
11439 * windows-nat.c (windows_detach): Add inferior parameter.
11441 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11443 * target.h (struct target_ops) <to_detach>: Remove args
11445 (target_detach): Likewise.
11446 * target.c (dispose_inferior): Adjust.
11447 (target_detach): Remove args parameter, adjust.
11448 * aix-thread.c (aix_thread_detach): Adjust.
11449 * corefile.c (core_file_command): Adjust.
11450 * corelow.c (core_detach): Adjust.
11451 * darwin-nat.c (darwin_detach): Adjust.
11452 * gnu-nat.c (gnu_detach): Adjust.
11453 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11454 * infcmd.c (detach_command): Adjust
11455 * infrun.c (follow_fork_inferior): Adjust.
11456 (handle_vfork_child_exec_or_exit): Adjust.
11457 * linux-fork.c (linux_fork_detach): Remove args parameter.
11458 * linux-fork.h (linux_fork_detach): Likewise.
11459 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11460 * linux-thread-db.c (thread_db_detach): Likewise.
11461 * nto-procfs.c (procfs_detach): Likewise.
11462 * procfs.c (procfs_detach): Likewise.
11463 (do_detach): Remove signo parameter.
11464 * record.c (record_detach): Remove args parameter.
11465 * record.h (record_detach): Likewise.
11466 * remote-sim.c (gdbsim_detach): Likewise.
11467 * remote.c (remote_detach_1): Likewise.
11468 (remote_detach): Likewise.
11469 (extended_remote_detach): Likewise.
11470 * sol-thread.c (sol_thread_detach): Likewise.
11471 * target-delegates.c: Re-generate.
11472 * top.c (struct qt_args) <args>: Remove field.
11473 (kill_or_detach): Don't pass args.
11474 (quit_force): Don't set args.
11475 * windows-nat.c (windows_detach): Remove args parameter.
11477 2018-01-19 Yao Qi <yao.qi@linaro.org>
11479 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11480 (arm_linux_init_abi): Install it.
11482 2018-01-19 Yao Qi <yao.qi@linaro.org>
11484 * osabi.c (gdb_osabi_names): Extend the regexp for
11485 arm-linux-gnueabihf.
11487 2018-01-18 Yao Qi <yao.qi@linaro.org>
11489 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11491 (abbrev_table::add_abbrev): Update.
11492 (abbrev_table::lookup_abbrev): Update.
11494 2018-01-18 Yao Qi <yao.qi@linaro.org>
11496 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11498 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11500 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11503 2018-01-17 Tom Tromey <tom@tromey.com>
11505 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11507 2018-01-17 Tom Tromey <tom@tromey.com>
11509 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11510 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11511 (create_array_type_with_stride): Update.
11512 * dwarf2read.c (set_die_type): Update.
11514 2018-01-17 Tom Tromey <tom@tromey.com>
11516 * dwarf2read.c (delayed_method_info): Remove typedef.
11517 (dwarf2_cu::method_info): Now a std::vector.
11518 (add_to_method_list): Update.
11519 (free_delayed_list): Remove.
11520 (compute_delayed_physnames): Update.
11521 (process_full_comp_unit, process_full_type_unit): Clear the method
11522 list. Remove cleanups.
11523 (psymtab_include_file_name): Add name_holder parameter. Use
11524 unique_xmalloc_ptr.
11525 (dwarf_decode_lines): Update.
11527 2018-01-17 Tom Tromey <tom@tromey.com>
11528 Simon Marchi <simon.marchi@ericsson.com>
11530 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11531 (dwarf2_per_objfile::free_cached_comp_units)
11532 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11533 (init_cutu_and_read_dies_no_follow): Update.
11534 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11535 (dwarf2_cu::~dwarf2_cu): New.
11536 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11537 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11539 2018-01-17 Tom Tromey <tom@tromey.com>
11540 Simon Marchi <simon.marchi@ericsson.com>
11542 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11543 (struct die_reader_specs) <abbrev_table>: New member.
11544 (struct abbrev_table): Add constructor.
11545 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11546 <abbrev_obstack>: Now an auto_obstack.
11547 (abbrev_table_up): New typedef.
11548 (init_cu_die_reader): Add abbrev_table parameter.
11549 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11550 Add result_dwo_abbrev_table.
11551 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11552 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11554 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11556 (skip_children): Update.
11557 (abbrev_table::alloc_abbrev): Rename from
11558 abbrev_table_alloc_abbrev.
11559 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11560 (abbrev_table::lookup_abbrev): Rename from
11561 abbrev_table_lookup_abbrev.
11562 (abbrev_table_read_table): Return abbrev_table_up.
11563 (abbrev_table_free, abbrev_table_free_cleanup)
11564 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11565 (load_partial_dies): Update.
11567 2018-01-17 Tom Tromey <tom@tromey.com>
11569 * dwarf2read.c (dwarf2_compute_name): Update comment.
11570 (read_func_scope, read_variable): Update.
11571 (new_symbol): Remove.
11572 (new_symbol_full): Rename to new_symbol.
11574 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11577 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11578 a warning instead of throwing an error, set section size to 0 and return
11580 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11582 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11584 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11586 (linux_ptrace_attach_fail_reason_string): Likewise.
11587 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11589 (linux_ptrace_attach_fail_reason_string): Likewise.
11590 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11592 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11594 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11596 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11599 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11600 checking for fs_base/gs_base fields in struct user_regs_struct.
11601 * configure: Regenerate.
11603 2018-01-17 Yao Qi <yao.qi@linaro.org>
11605 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11607 (aarch64_linux_init_abi): Install it to gdbarch hook
11608 gcc_target_options.
11610 2018-01-15 Pedro Alves <palves@redhat.com>
11612 * common/signals-state-save-restore.c
11613 (save_original_signals_state): Fix typos.
11615 2017-01-12 Tom Tromey <tom@tromey.com>
11616 Sergio Durigan Junior <sergiodj@redhat.com>
11618 * Makefile.in (install-only): Install gdb-add-index.
11620 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11622 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11624 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11626 * infrun.c (keep_going_pass_signal): Clear step-over info when
11627 insert_breakpoints fails.
11629 2018-01-11 Pedro Alves <palves@redhat.com>
11632 * infrun.c (resume): Rename to ...
11633 (resume_1): ... this.
11634 (resume): Reimplement as wrapper around resume_1.
11636 2018-01-11 Pedro Alves <palves@redhat.com>
11639 * remote.c (remote_parse_stop_reply): Default to the last-set
11640 general thread instead of to 'magic_null_ptid'.
11642 2018-01-10 Pedro Alves <palves@redhat.com>
11644 * language.h (language_get_symbol_name_matcher): Rename ...
11645 (get_symbol_name_matcher): ... this.
11646 * language.c (language_get_symbol_name_matcher): Ditto.
11647 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11650 2018-01-10 Pedro Alves <palves@redhat.com>
11654 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11655 Adjust to use language_get_symbol_name_matcher instead of
11656 language_defn::la_get_symbol_name_matcher.
11657 * language.c (language_get_symbol_name_matcher): If in Ada mode
11658 and the lookup name is a verbatim match, return Ada's matcher.
11659 * language.h (language_get_symbol_name_matcher): Adjust comment.
11660 (ada_lookup_name_info::verbatim_p):: New method.
11662 2018-01-10 Pedro Alves <palves@redhat.com>
11665 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11666 minsym's language is language_auto or language_cplus, pass down
11667 language_ada instead.
11668 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11670 2018-01-10 Pedro Alves <palves@redhat.com>
11673 * minsyms.c (linkage_name_str): New function.
11674 (iterate_over_minimal_symbols): Use it.
11676 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11678 * NEWS: Document that 'info proc' now works on FreeBSD.
11680 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11682 * configure.ac: Check for kinfo_getfile in libutil.
11683 * configure: Regenerate.
11684 * config.in: Regenerate.
11685 * fbsd-nat.c: Include "fbsd-tdep.h".
11686 (fbsd_fetch_cmdline): New.
11687 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11688 rather than calling error.
11689 (fbsd_info_proc): New.
11690 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11691 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11692 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11694 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11696 * fbsd-nat.c (struct free_deleter): Remove.
11697 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11699 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11701 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11702 NULL for an empty pathname.
11704 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11706 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11707 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11708 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11709 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11710 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11711 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11712 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11713 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11714 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11715 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11716 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11717 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11718 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11719 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11720 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11722 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11724 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11725 (gnu_xfer_auxv): New function.
11726 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11727 TARGET_OBJECT_AUXV.
11729 2018-01-08 Yao Qi <yao.qi@linaro.org>
11730 Simon Marchi <simon.marchi@ericsson.com>
11732 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11734 (COMMON_OBS): Remove selftest.o.
11735 * configure.ac: Append selftest-arch.c and common/selftest.c to
11736 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11737 * configure: Re-generated.
11738 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11740 (maintenance_info_selftests): Likewise.
11742 2018-01-08 Xavier Roirand <roirand@adacore.com>
11744 * ada-valprint.c (val_print_packed_array_elements): Use
11745 proper number of elements when printing an array indexed
11746 by an enumeration type.
11748 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11750 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11751 (dw2_get_file_names_reader): Adjust.
11752 (lookup_dwo_signatured_type): Adjust.
11753 (lookup_dwp_signatured_type): Adjust.
11754 (lookup_signatured_type): Adjust.
11755 (create_type_unit_group): Adjust.
11756 (get_type_unit_group): Adjust.
11757 (process_psymtab_comp_unit_reader): Adjust.
11758 (build_type_psymtabs_reader): Adjust.
11759 (scan_partial_symbols): Adjust.
11760 (add_partial_symbol): Adjust.
11761 (add_partial_subprogram): Adjust.
11762 (peek_die_abbrev): Adjust.
11763 (fixup_go_packaging): Adjust.
11764 (process_imported_unit_die): Adjust.
11765 (dwarf2_compute_name): Adjust.
11766 (dwarf2_physname): Adjust.
11767 (read_import_statement): Adjust.
11768 (handle_DW_AT_stmt_list): Adjust.
11769 (read_file_scope): Adjust.
11770 (read_func_scope): Adjust.
11771 (read_lexical_block_scope): Adjust.
11772 (read_call_site_scope): Adjust.
11773 (read_variable): Adjust.
11774 (dwarf2_rnglists_process): Adjust.
11775 (dwarf2_ranges_process): Adjust.
11776 (dwarf2_ranges_read): Adjust.
11777 (dwarf2_get_pc_bounds): Adjust.
11778 (dwarf2_record_block_ranges): Adjust.
11779 (dwarf2_add_field): Adjust.
11780 (dwarf2_add_member_fn): Adjust.
11781 (read_structure_type): Adjust.
11782 (process_structure_scope): Adjust.
11783 (read_enumeration_type): Adjust.
11784 (read_array_type): Adjust.
11785 (mark_common_block_symbol_computed): Adjust.
11786 (read_common_block): Adjust.
11787 (read_namespace_type): Adjust.
11788 (read_namespace): Adjust.
11789 (read_module_type): Adjust.
11790 (read_tag_pointer_type): Adjust.
11791 (read_tag_ptr_to_member_type): Adjust.
11792 (read_tag_string_type): Adjust.
11793 (read_subroutine_type): Adjust.
11794 (read_typedef): Adjust.
11795 (read_base_type): Adjust.
11796 (attr_to_dynamic_prop): Adjust.
11797 (read_subrange_type): Adjust.
11798 (read_unspecified_type): Adjust.
11799 (dwarf2_read_abbrevs): Adjust.
11800 (load_partial_dies): Adjust.
11801 (read_partial_die): Adjust.
11802 (find_partial_die): Adjust.
11803 (guess_partial_die_structure_name): Adjust.
11804 (fixup_partial_die): Adjust.
11805 (read_attribute_value): Adjust.
11806 (read_addr_index): Adjust.
11807 (read_addr_index_from_leb128): Adjust.
11808 (read_str_index): Adjust.
11809 (dwarf2_string_attr): Adjust.
11810 (get_debug_line_section): Adjust.
11811 (dwarf_decode_line_header): Adjust.
11812 (lnp_state_machine::check_line_address): Adjust.
11813 (dwarf_decode_lines_1): Adjust.
11814 (dwarf_decode_lines): Adjust.
11815 (dwarf2_start_symtab): Adjust.
11816 (var_decode_location): Adjust.
11817 (new_symbol_full): Adjust.
11818 (dwarf2_const_value_data): Adjust.
11819 (dwarf2_const_value_attr): Adjust.
11820 (dwarf2_const_value): Adjust.
11821 (die_type): Adjust.
11822 (die_containing_type): Adjust.
11823 (build_error_marker_type): Adjust.
11824 (lookup_die_type): Adjust.
11825 (guess_full_die_structure_name): Adjust.
11826 (anonymous_struct_prefix): Adjust.
11827 (determine_prefix): Adjust.
11828 (dwarf2_name): Adjust.
11829 (follow_die_ref_or_sig): Adjust.
11830 (follow_die_offset): Adjust.
11831 (follow_die_ref): Adjust.
11832 (follow_die_sig_1): Adjust.
11833 (follow_die_sig): Adjust.
11834 (get_signatured_type): Adjust.
11835 (get_DW_AT_signature_type): Adjust.
11836 (decode_locdesc): Adjust.
11837 (dwarf_decode_macros): Adjust.
11838 (cu_debug_loc_section): Adjust.
11839 (fill_in_loclist_baton): Adjust.
11840 (dwarf2_symbol_mark_computed): Adjust.
11841 (init_one_comp_unit): Don't assign
11842 dwarf2_cu::dwarf2_per_objfile.
11843 (set_die_type): Adjust.
11845 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11847 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11848 <dwarf2_per_objfile>: New field.
11849 (dwarf2_per_objfile): Remove global.
11850 (get_dwarf2_per_objfile): New function.
11851 (set_dwarf2_per_objfile): New function.
11852 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11853 dwarf2_per_objfile.
11854 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11855 (read_abbrev_offset): Likewise.
11856 (read_indirect_string): Likewise.
11857 (read_indirect_line_string): Likewise.
11858 (read_indirect_string_at_offset): Likewise.
11859 (read_indirect_string_from_dwz): Likewise.
11860 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11861 dwarf2_per_objfile.
11862 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11863 (create_all_comp_units): Change objfile parameter to
11864 dwarf2_per_objfile.
11865 (create_all_type_units): Likewise.
11866 (process_queue): Add dwarf2_per_objfile parameter.
11867 (read_and_check_comp_unit_head): Likewise.
11868 (lookup_dwo_unit_in_dwp): Likewise.
11869 (get_dwp_file): Likewise.
11870 (process_cu_includes): Likewise.
11871 (struct free_dwo_file_cleanup_data): New struct.
11872 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11873 set_dwarf2_per_objfile.
11874 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11875 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11876 context, adjust calls.
11877 (dw2_instantiate_symtab): Likewise.
11878 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11879 (dw2_get_cu): Likewise.
11880 (create_cu_from_index_list): Change objfile parameter to
11881 dwarf2_per_objfile.
11882 (create_cus_from_index_list): Get dwarf2_per_objfile from
11883 context, adjust calls.
11884 (create_cus_from_index): Likewise.
11885 (create_signatured_type_table_from_index): Change objfile
11886 parameter to dwarf2_per_objfile.
11887 (create_signatured_type_table_from_debug_names): Change objfile
11888 parameter to dwarf2_per_objfile.
11889 (create_addrmap_from_index): Likewise.
11890 (create_addrmap_from_aranges): Likewise.
11891 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11892 (dw2_setup): Remove.
11893 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11895 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11896 get_dwarf2_per_objfile.
11897 (dw2_forget_cached_source_info): Likewise.
11898 (dw2_map_symtabs_matching_filename): Likewise.
11899 (struct dw2_symtab_iterator) <index>: Remove.
11900 <dwarf2_per_objfile>: New field.
11901 (dw2_symtab_iter_init): Replace index parameter with
11902 dwarf2_per_objfile.
11903 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11904 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11905 (dw2_print_stats): Likewise.
11906 (dw2_dump): Likewise.
11907 (dw2_expand_symtabs_for_function): Likewise.
11908 (dw2_expand_all_symtabs): Likewise.
11909 (dw2_expand_symtabs_with_fullname): Likewise.
11910 (dw2_expand_marked_cus): Replace index and objfile parameters
11911 with dwarf2_per_objfile.
11912 (dw_expand_symtabs_matching_file_matcher): Add
11913 dwarf2_per_objfile parameter and adjust calls.
11914 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11916 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11917 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11919 (create_cus_from_debug_names_list): Replace objfile parameter
11920 with dwarf2_per_objfile and adjust calls.
11921 (create_cus_from_debug_names): Likewise.
11922 (dwarf2_read_debug_names): Likewise.
11923 (mapped_debug_names::namei_to_name): Adjust call.
11924 (dw2_debug_names_iterator::next): Likewise.
11925 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11926 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11927 (dw2_debug_names_dump): Likewise.
11928 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11929 (dw2_debug_names_expand_symtabs_matching): Likewise.
11930 (dwarf2_initialize_objfile): Likewise.
11931 (dwarf2_build_psymtabs): Likewise.
11932 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11934 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11935 (read_and_check_comp_unit_head): Likewise.
11936 (read_abbrev_offset): Likewise.
11937 (create_debug_type_hash_table): Likewise.
11938 (create_debug_types_hash_table): Likewise.
11939 (create_all_type_units): Replace objfile parameter with
11940 dwarf2_per_objfile.
11941 (add_type_unit): Add dwarf2_per_objfile parameter.
11942 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11943 with dwarf2_per_objfile.
11944 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11945 (lookup_dwp_signatured_type): Likewise.
11946 (lookup_signatured_type): Likewise.
11947 (read_cutu_die_from_dwo): Likewise.
11948 (init_tu_and_read_dwo_dies): Likewise.
11949 (init_cutu_and_read_dies): Likewise.
11950 (init_cutu_and_read_dies_no_follow): Likewise.
11951 (allocate_type_unit_groups_table): Add objfile parameter.
11952 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11953 (get_type_unit_group): Likewise.
11954 (process_psymtab_comp_unit): Update call.
11955 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11956 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11957 (print_tu_stats): Likewise.
11958 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11959 in void* parameter.
11960 (build_type_psymtabs): Change objfile parameter to
11961 dwarf2_per_objfile.
11962 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11963 passed in void* parameter.
11964 (process_skeletonless_type_units): Change objfile parameter to
11965 dwarf2_per_objfile.
11966 (set_partial_user): Likewise.
11967 (dwarf2_build_psymtabs_hard): Likewise.
11968 (read_comp_units_from_section): Likewise.
11969 (create_all_comp_units): Likewise.
11970 (scan_partial_symbols): Update calls.
11971 (add_partial_symbol): Likewise.
11972 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11973 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11974 (process_queue): Add dwarf2_per_objfile parameter.
11975 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11976 (compute_compunit_symtab_includes): Likewise.
11977 (process_cu_includes): Add dwarf2_per_objfile parameter.
11978 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11979 (process_full_type_unit): Likewise.
11980 (process_imported_unit_die): Update call.
11981 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11982 (read_file_scope): Likewise.
11983 (allocate_dwo_file_hash_table): Add objfile parameter.
11984 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11985 (create_cus_hash_table): Likewise.
11986 (create_dwp_hash_table): Likewise.
11987 (create_dwo_unit_in_dwp_v1): Likewise.
11988 (create_dwp_v2_section): Likewise.
11989 (create_dwo_unit_in_dwp_v2): Likewise.
11990 (lookup_dwo_unit_in_dwp): Likewise.
11991 (try_open_dwop_file): Likewise.
11992 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11993 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11994 cleanup to include a reference to dwarf2_per_objfile.
11995 (open_dwp_file): Add dwarf2_per_objfile parameter.
11996 (open_and_init_dwp_file): Likewise.
11997 (get_dwp_file): Likewise.
11998 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11999 (queue_and_load_all_dwo_tus): Update call.
12000 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12002 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12003 (dwarf2_ranges_process): Likewise.
12004 (dwarf2_get_pc_bounds): Likewise.
12005 (mark_common_block_symbol_computed): Likewise.
12006 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12007 (dwarf2_read_abbrevs): Update call.
12008 (read_partial_die): Use dwarf2_per_objfile from cu.
12009 (find_partial_die): Likewise.
12010 (fixup_partial_die): Likewise.
12011 (read_attribute_value): Likewise.
12012 (read_indirect_string_at_offset_from): Add objfile parameter.
12013 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12015 (read_indirect_string_from_dwz): Add objfile parameter.
12016 (read_indirect_string): Add objfile parameter.
12017 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12018 (read_addr_index): Use dwarf2_per_objfile from cu.
12019 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12021 (read_str_index): Use dwarf2_per_objfile from cu.
12022 (get_debug_line_section): Likewise.
12023 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12024 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12025 (new_symbol_full): Use dwarf2_per_objfile from cu.
12026 (build_error_marker_type): Likewise.
12027 (lookup_die_type): Likewise.
12028 (determine_prefix): Likewise.
12029 (follow_die_offset): Likewise.
12030 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12031 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12032 (dwarf2_fetch_die_type_sect_off): Likewise.
12033 (dwarf2_get_die_type): Likewise.
12034 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12035 (get_signatured_type): Likewise.
12036 (get_DW_AT_signature_type): Likewise.
12037 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12038 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12039 (cu_debug_loc_section): Likewise.
12040 (fill_in_loclist_baton): Likewise.
12041 (dwarf2_symbol_mark_computed): Likewise.
12042 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12043 dwarf2_per_objfile.
12044 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12046 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12047 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12048 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12049 (set_die_type): Use dwarf2_free_objfile from cu.
12050 (get_die_type_at_offset): Likewise.
12051 (dwarf2_per_objfile_free): Don't assign global variable.
12052 (debug_names) <constructor>: Add dwarf2_per_objfile
12053 parameter, update m_debugstrlookup construction.
12054 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12056 <m_dwarf2_per_objfile>: New field.
12057 <lookup>: Use m_dwarf2_per_objfile.
12058 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12059 (psyms_seen_size): Likewise.
12060 (write_gdbindex): Replace objfile parameter with
12061 dwarf2_per_objfile.
12062 (write_debug_names): Likewise.
12063 (write_psymtabs_to_index): Likewise.
12064 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12067 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12069 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12070 <dwarf2_per_objfile>: New field.
12071 (struct dwarf2_per_cu_data) <objfile>: Remove.
12072 <dwarf2_per_objfile>: New field.
12073 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12075 (create_signatured_type_table_from_index): Likewise.
12076 (create_debug_type_hash_table): Likewise.
12077 (fill_in_sig_entry_from_dwo_entry): Likewise.
12078 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12079 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12081 (create_partial_symtab): Access objfile through
12082 dwarf2_per_objfile.
12083 (process_psymtab_comp_unit_reader): Likewise.
12084 (read_comp_units_from_section): Likewise.
12085 (scan_partial_symbols): Likewise.
12086 (add_partial_symbol): Likewise.
12087 (add_partial_subprogram): Likewise.
12088 (peek_die_abbrev): Likewise.
12089 (fixup_go_packaging): Likewise.
12090 (process_full_comp_unit): Likewise.
12091 (process_full_type_unit): Likewise.
12092 (process_imported_unit_die): Likewise.
12093 (dwarf2_compute_name): Likewise.
12094 (dwarf2_physname): Likewise.
12095 (read_import_statement): Likewise.
12096 (create_cus_hash_table): Assign dwarf2_physname instead of
12098 (read_func_scope): Access objfile through dwarf2_per_objfile.
12099 (read_lexical_block_scope): Likewise.
12100 (read_call_site_scope): Likewise.
12101 (read_variable): Likewise.
12102 (dwarf2_rnglists_process): Likewise.
12103 (dwarf2_ranges_process): Likewise.
12104 (dwarf2_ranges_read): Likewise.
12105 (dwarf2_record_block_ranges): Likewise.
12106 (dwarf2_add_field): Likewise.
12107 (dwarf2_add_member_fn): Likewise.
12108 (read_structure_type): Likewise.
12109 (process_structure_scope): Likewise.
12110 (read_enumeration_type): Likewise.
12111 (read_array_type): Likewise.
12112 (read_common_block): Likewise.
12113 (read_namespace_type): Likewise.
12114 (read_namespace): Likewise.
12115 (read_module_type): Likewise.
12116 (read_tag_pointer_type): Likewise.
12117 (read_tag_ptr_to_member_type): Likewise.
12118 (read_tag_string_type): Likewise.
12119 (read_subroutine_type): Likewise.
12120 (read_typedef): Likewise.
12121 (read_base_type): Likewise.
12122 (attr_to_dynamic_prop): Likewise.
12123 (read_subrange_type): Likewise.
12124 (read_unspecified_type): Likewise.
12125 (load_partial_dies): Likewise.
12126 (read_partial_die): Likewise.
12127 (find_partial_die): Likewise.
12128 (guess_partial_die_structure_name): Likewise.
12129 (fixup_partial_die): Likewise.
12130 (read_attribute_value): Likewise.
12131 (read_addr_index_from_leb128): Likewise.
12132 (dwarf2_read_addr_index): Likewise.
12133 (dwarf2_string_attr): Likewise.
12134 (lnp_state_machine::check_line_address): Likewise.
12135 (dwarf_decode_lines_1): Likewise.
12136 (dwarf_decode_lines): Likewise.
12137 (dwarf2_start_symtab): Likewise.
12138 (var_decode_location): Likewise.
12139 (new_symbol_full): Likewise.
12140 (dwarf2_const_value_data): Likewise.
12141 (dwarf2_const_value_attr): Likewise.
12142 (dwarf2_const_value): Likewise.
12143 (die_type): Likewise.
12144 (die_containing_type): Likewise.
12145 (lookup_die_type): Likewise.
12146 (guess_full_die_structure_name): Likewise.
12147 (anonymous_struct_prefix): Likewise.
12148 (dwarf2_name): Likewise.
12149 (follow_die_ref_or_sig): Likewise.
12150 (follow_die_offset): Likewise.
12151 (follow_die_ref): Likewise.
12152 (dwarf2_fetch_die_loc_sect_off): Likewise.
12153 (dwarf2_fetch_constant_bytes): Likewise.
12154 (dwarf2_fetch_die_type_sect_off): Likewise.
12155 (dwarf2_get_die_type): Likewise.
12156 (follow_die_sig): Likewise.
12157 (decode_locdesc): Likewise.
12158 (dwarf2_per_cu_objfile): Likewise.
12159 (dwarf2_per_cu_text_offset): Likewise.
12160 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12162 (set_die_type): Access objfile through
12163 dwarf2_per_objfile.
12165 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12167 * valprint.c (converted_character_d): Remove typedef.
12168 (DEF_VEC_O (converted_character_d)): Remove.
12169 (count_next_character): Use std::vector.
12170 (print_converted_chars_to_obstack): Likewise.
12171 (generic_printstr): Likewise.
12173 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12175 * xml-support.h (struct gdb_xml_value): Add constructor.
12176 <value>: Change type to unique_xmalloc_ptr.
12177 (gdb_xml_value_s): Remove typedef.
12178 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12179 (gdb_xml_element_start_handler): Change parameter type to
12181 (xml_find_attribute): Likewise.
12182 * xml-support.c (xml_find_attribute): Change parameter type to
12183 std::vector and adjust.
12184 (gdb_xml_values_cleanup): Remove.
12185 (gdb_xml_parser::start_element): Adjust to std::vector.
12186 (xinclude_start_include): Change paraeter type to std::vector
12188 * btrace.c (check_xml_btrace_version): Likewise.
12189 (parse_xml_btrace_block): Likewise.
12190 (parse_xml_btrace_pt_config_cpu): Likewise.
12191 (parse_xml_btrace_pt): Likewise.
12192 (parse_xml_btrace_conf_bts): Likewise.
12193 (parse_xml_btrace_conf_pt): Likewise.
12194 * memory-map.c (memory_map_start_memory): Likewise.
12195 (memory_map_start_property): Likewise.
12196 * osdata.c (osdata_start_osdata): Likewise.
12197 (osdata_start_item): Likewise.
12198 (osdata_start_column): Likewise.
12199 * remote.c (start_thread): Likewise.
12200 * solib-aix.c (library_list_start_library): Likewise.
12201 (library_list_start_list): Likewise.
12202 * solib-svr4.c (library_list_start_library): Likewise.
12203 (svr4_library_list_start_list): Likewise.
12204 * solib-target.c (library_list_start_segment): Likewise.
12205 (library_list_start_section): Likewise.
12206 (library_list_start_library): Likewise.
12207 (library_list_start_list): Likewise.
12208 * tracepoint.c (traceframe_info_start_memory): Likewise.
12209 (traceframe_info_start_tvar): Likewise.
12210 * xml-syscall.c (syscall_start_syscall): Likewise.
12211 * xml-tdesc.c (tdesc_start_target): Likewise.
12212 (tdesc_start_feature): Likewise.
12213 (tdesc_start_reg): Likewise.
12214 (tdesc_start_union): Likewise.
12215 (tdesc_start_struct): Likewise.
12216 (tdesc_start_flags): Likewise.
12217 (tdesc_start_enum): Likewise.
12218 (tdesc_start_field): Likewise.
12219 (tdesc_start_enum_value): Likewise.
12220 (tdesc_start_vector): Likewise.
12222 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12224 * extension.h (struct xmethod_worker) <clone>: Remove.
12225 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12227 (python_xmethod_worker::clone): Remove.
12228 * valops.c (find_overload_match): Use std::move instead of
12231 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12233 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12234 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12235 <free_xmethod_worker_data>: Remove.
12236 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12237 <get_xmethod_arg_types>: Remove.
12238 <get_xmethod_result_type>: Remove.
12239 <invoke_xmethod>: Remove.
12240 * extension.c (new_xmethod_worker): Remove.
12241 (clone_xmethod_worker): Remove.
12242 (get_matching_xmethod_workers): Return void, pass std::vector by
12244 (get_xmethod_arg_types): Rename to...
12245 (xmethod_worker::get_arg_types): ... this, and adjust.
12246 (get_xmethod_result_type): Rename to...
12247 (xmethod_worker::get_result_type): ... this, and adjust.
12248 (invoke_xmethod): Remove.
12249 (free_xmethod_worker): Remove.
12250 (free_xmethod_worker_vec): Remove.
12251 * extension.h (enum ext_lang_rc): Move here from
12253 (struct xmethod_worker): Add constructor and destructor.
12256 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12257 virtual pure methods.
12258 <get_arg_types, get_result_type>: New methods.
12259 (xmethod_worker_ptr): Remove typedef.
12260 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12261 (xmethod_worker_vec): Remove typedef.
12262 (xmethod_worker_up): New typedef.
12263 (invoke_xmethod): Remove.
12264 (clone_xmethod_worker): Remove.
12265 (free_xmethod_worker): Remove.
12266 (free_xmethod_worker_vec): Remove.
12267 (get_xmethod_arg_types): Remove.
12268 (get_xmethod_result_type): Remove.
12269 * valops.c (find_method_list): Use std::vector, don't use
12270 intermediate vector.
12271 (value_find_oload_method_list): Use std::vector.
12272 (find_overload_match): Use std::vector.
12273 (find_oload_champ): Use std::vector.
12274 * value.c (value_free): Use operator delete.
12275 (value_of_xmethod): Rename to...
12276 (value_from_xmethod): ... this. Don't assign
12277 xmethod_worker::value, take rvalue-reference.
12278 (result_type_of_xmethod): Adjust.
12279 (call_xmethod): Adjust.
12280 * value.h: Include extension.h.
12281 (struct xmethod_worker): Don't forward-declare.
12282 (value_of_xmethod): Rename to...
12283 (value_from_xmethod): ... this, take rvalue-reference.
12284 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12285 (struct python_xmethod_worker): ... this, add constructor and
12287 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12288 (gdbpy_free_xmethod_worker_data): Rename to...
12289 (python_xmethod_worker::~python_xmethod_worker): ... this and
12291 (gdbpy_clone_xmethod_worker_data): Rename to...
12292 (python_xmethod_worker::clone): ... this and adjust.
12293 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12295 (gdbpy_get_xmethod_arg_types): Rename to...
12296 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12297 (gdbpy_get_xmethod_result_type): Rename to...
12298 (python_xmethod_worker::do_get_result_type): ... this and
12300 (gdbpy_invoke_xmethod): Rename to...
12301 (python_xmethod_worker::invoke): ... this and adjust.
12302 (new_python_xmethod_worker): Rename to...
12303 (python_xmethod_worker::python_xmethod_worker): ... this and
12305 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12307 (gdbpy_free_xmethod_worker_data): Remove.
12308 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12309 (gdbpy_get_xmethod_arg_types): Remove.
12310 (gdbpy_get_xmethod_result_type): Remove.
12311 (gdbpy_invoke_xmethod): Remove.
12312 * python/python.c (python_extension_ops): Remove obsolete
12315 2018-01-05 Pedro Alves <palves@redhat.com>
12318 * common/signals-state-save-restore.c
12319 (save_original_signals_state): New parameter 'quiet'. Warn if we
12320 find a custom handler preinstalled, instead of internal erroring.
12321 But only warn if !quiet.
12322 * common/signals-state-save-restore.h
12323 (save_original_signals_state): New parameter 'quiet'.
12324 * main.c (captured_main_1): Move save_original_signals_state call
12325 after option handling, and pass QUIET.
12327 2018-01-05 Pedro Alves <palves@redhat.com>
12329 * spu-tdep.c (spu_catch_start): Pass
12330 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12332 2018-01-05 Pedro Alves <palves@redhat.com>
12335 * ada-lang.c (literal_symbol_name_matcher): New function.
12336 (ada_get_symbol_name_matcher): Use it for
12337 symbol_name_match_type::SEARCH_NAME.
12338 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12339 it down instead of assuming symbol_name_match_type::FULL.
12340 * block.h (block_lookup_symbol): New parameter 'match_type'.
12341 * c-valprint.c (print_unpacked_pointer): Use
12342 lookup_symbol_search_name instead of lookup_symbol.
12343 * compile/compile-object-load.c (get_out_value_type): Pass down
12344 symbol_name_match_type::SEARCH_NAME.
12345 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12346 symbol_name_match_type::FULL.
12347 * cp-support.c (cp_get_symbol_name_matcher): Handle
12348 symbol_name_match_type::SEARCH_NAME.
12349 * infrun.c (insert_exception_resume_breakpoint): Use
12350 lookup_symbol_search_name.
12351 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12352 * psymtab.c (maintenance_check_psymtabs): Use
12353 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12354 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12355 SYMBOL_SEARCH_NAME.
12356 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12357 if symbol_name_match_type::SEARCH_NAME.
12358 (lookup_symbol_in_language): Pass down
12359 symbol_name_match_type::FULL.
12360 (lookup_symbol_search_name): New.
12361 (lookup_language_this): Pass down
12362 symbol_name_match_type::SEARCH_NAME.
12363 (lookup_symbol_aux, lookup_local_symbol): New parameter
12364 'match_type'. Pass it down.
12365 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12366 (lookup_symbol_search_name): New declaration.
12367 (lookup_symbol_in_block): New 'match_type' parameter.
12369 2018-01-05 Pedro Alves <palves@redhat.com>
12372 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12374 (ada_lookup_symbol): Reimplement in terms of
12375 ada_lookup_symbol_list, bits factored out from
12376 ada_lookup_encoded_symbol.
12378 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12380 * ada-exp.y (write_object_renaming): When subscripting an array
12381 using a symbol as the index, pass the block in call to
12382 ada_lookup_encoded_symbol when looking that symbol up.
12384 2018-01-05 Jerome Guitton <guitton@adacore.com>
12386 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12389 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12391 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12392 the case where VALUE_LVAL (val0) is not lval_memory.
12394 2018-01-05 Xavier Roirand <roirand@adacore.com>
12396 * ada-valprint.c (print_optional_low_bound): Handle
12397 character-indexed array printing like boolean-indexed array
12400 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12402 * NEWS: Create a new section for the next release branch.
12403 Rename the section of the current branch, now that it has
12406 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12408 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12409 * version.in: Bump version to 8.1.50.DATE-git.
12411 2018-01-03 Xavier Roirand <roirand@adacore.com>
12413 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12415 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12417 (default_exception_support_info) <catch_handlers_sym>: Add field.
12418 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12419 (ada_exception_name_addr_1): Add "catch handlers" handling.
12420 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12421 Update all callers.
12422 (create_excep_cond_exprs) <ex>: Add parameter.
12423 (re_set_exception): Update create_excep_cond_exprs call.
12424 (print_it_exception, print_one_exception, print_mention_exception)
12425 (print_recreate_exception): Add "catch handler" handling.
12426 (allocate_location_catch_handlers, re_set_catch_handlers)
12427 (check_status_catch_handlers, print_it_catch_handlers)
12428 (print_one_catch_handlers, print_mention_catch_handlers)
12429 (print_recreate_catch_handlers): New function.
12430 (catch_handlers_breakpoint_ops): New variable.
12431 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12432 Add parameter. Add "catch handler" handling.
12433 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12434 Add "catch handler" handling.
12435 (ada_exception_catchpoint_cond_string): Add "catch handler"
12437 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12439 (catch_ada_handlers_command): New function.
12440 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12441 operations structure.
12442 (_initialize_ada_language): Add "catch handlers" command entry.
12443 * NEWS: Document "catch handlers" feature.
12445 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12447 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12448 account when creating the array type of the slice.
12449 (ada_value_slice): Likewise.
12451 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12453 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12455 (create_array_type_with_stride): Add byte_stride_prop parameter.
12456 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12457 New parameter. Update all callers in this file.
12458 (array_type_has_dynamic_stride): New function.
12459 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12460 of arrays with dynamic byte strides.
12461 * dwarf2read.c (read_array_type): Add support for dynamic
12462 DW_AT_byte_stride attributes.
12464 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12466 * dwarf2read.c (read_unspecified_type): Treat
12467 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12469 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12471 Update copyright year range in all GDB files.
12473 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12475 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12476 and gdb/testsuite/gdb.base/step-line.c.
12478 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12480 * copyright.py (main): Dump the contents of
12481 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12482 even if BY_HAND is empty.
12484 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12486 * top.c (print_gdb_version): Update Copyright year in version
12489 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12491 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12493 For older changes see ChangeLog-2017.
12499 version-control: never