1 2018-08-29 Keith Seitz <keiths@redhat.com>
3 * linespec.c (symtab_vector_up): Define.
4 (struct linespec) <file_symtabs>: Change type to std::vector *.
6 (struct collect_info) <file_symtabs>: Likewise.
7 (collect_symtabs_from_filename): Return symtab_vector_up.
9 (decode_objc): Remove cleanup.
10 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
11 (symtab_collector::release_symtabs): Return symtab_vector_up.
13 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
15 (collect_symtabs_from_filename, symtabs_from_filename): Return
16 symtab_vector_up. Update all callers.
18 2018-08-29 Tom Tromey <tom@tromey.com>
20 * csky-tdep.c (csky_analyze_prologue): Use
21 core_addr_to_string_nz.
23 2018-08-29 Tom Tromey <tom@tromey.com>
25 * windows-nat.c (struct xlate_exception) <them>: Change type to
27 (xlate): Fix formatting. Remove last entry.
28 (struct xlate_exception, xlate): Comment out.
29 (windows_nat_target::resume): Use ranged for.
31 2018-08-29 Jim Wilson <jimw@sifive.com>
33 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
34 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
36 (riscv_linux_nat_target::store_registers): Likewise.
38 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
42 * gnulib/aclocal.m4: Regenerate.
43 * gnulib/config.in: Regenerate.
44 * gnulib/configure: Regenerate.
45 * gnulib/import/Makefile.am: Update.
46 * gnulib/import/Makefile.in: Update.
47 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
48 * gnulib/import/_Noreturn.h: ... this.
49 * gnulib/import/alloca.in.h: Update.
50 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
51 * gnulib/import/arg-nonnull.h: ... this.
52 * gnulib/import/assure.h: Update.
53 * gnulib/import/at-func.c: Update.
54 * gnulib/import/basename-lgpl.c: Update.
55 * gnulib/import/extra/snippet/c++defs.h: Rename to...
56 * gnulib/import/c++defs.h: ... this.
57 * gnulib/import/canonicalize-lgpl.c: Update.
58 * gnulib/import/cdefs.h: Update.
59 * gnulib/import/chdir-long.c: Update.
60 * gnulib/import/chdir-long.h: Update.
61 * gnulib/import/cloexec.c: Update.
62 * gnulib/import/cloexec.h: Update.
63 * gnulib/import/close.c: Update.
64 * gnulib/import/closedir.c: Update.
65 * gnulib/import/config.charset: Update.
66 * gnulib/import/dirent-private.h: Update.
67 * gnulib/import/dirent.in.h: Update.
68 * gnulib/import/dirfd.c: Update.
69 * gnulib/import/dirname-lgpl.c: Update.
70 * gnulib/import/dirname.h: Update.
71 * gnulib/import/dosname.h: Update.
72 * gnulib/import/dup-safer-flag.c: Update.
73 * gnulib/import/dup-safer.c: Update.
74 * gnulib/import/dup.c: Update.
75 * gnulib/import/dup2.c: Update.
76 * gnulib/import/errno.in.h: Update.
77 * gnulib/import/error.c: Update.
78 * gnulib/import/error.h: Update.
79 * gnulib/import/exitfail.c: Update.
80 * gnulib/import/exitfail.h: Update.
81 * gnulib/import/extra/update-copyright: Update.
82 * gnulib/import/fchdir.c: Update.
83 * gnulib/import/fcntl.c: Update.
84 * gnulib/import/fcntl.in.h: Update.
85 * gnulib/import/fd-hook.c: Update.
86 * gnulib/import/fd-hook.h: Update.
87 * gnulib/import/fd-safer-flag.c: Update.
88 * gnulib/import/fd-safer.c: Update.
89 * gnulib/import/fdopendir.c: Update.
90 * gnulib/import/filename.h: Update.
91 * gnulib/import/filenamecat-lgpl.c: Update.
92 * gnulib/import/filenamecat.h: Update.
93 * gnulib/import/flexmember.h: Update.
94 * gnulib/import/float+.h: Update.
95 * gnulib/import/float.c: Update.
96 * gnulib/import/float.in.h: Update.
97 * gnulib/import/fnmatch.c: Update.
98 * gnulib/import/fnmatch.in.h: Update.
99 * gnulib/import/fnmatch_loop.c: Update.
100 * gnulib/import/fpucw.h: Update.
101 * gnulib/import/frexp.c: Update.
102 * gnulib/import/frexpl.c: Update.
103 * gnulib/import/fstat.c: Update.
104 * gnulib/import/fstatat.c: Update.
105 * gnulib/import/getcwd-lgpl.c: Update.
106 * gnulib/import/getcwd.c: Update.
107 * gnulib/import/getdtablesize.c: Update.
108 * gnulib/import/getlogin_r.c: Update.
109 * gnulib/import/getprogname.c: Update.
110 * gnulib/import/getprogname.h: Update.
111 * gnulib/import/gettext.h: Update.
112 * gnulib/import/gettimeofday.c: Update.
113 * gnulib/import/glob-libc.h: Update.
114 * gnulib/import/glob.c: Update.
115 * gnulib/import/glob.in.h: Update.
116 * gnulib/import/glob_internal.h: Update.
117 * gnulib/import/glob_pattern_p.c: Update.
118 * gnulib/import/globfree.c: Update.
119 * gnulib/import/hard-locale.c: Update.
120 * gnulib/import/hard-locale.h: Update.
121 * gnulib/import/intprops.h: Update.
122 * gnulib/import/inttypes.in.h: Update.
123 * gnulib/import/isnan.c: Update.
124 * gnulib/import/isnand-nolibm.h: Update.
125 * gnulib/import/isnand.c: Update.
126 * gnulib/import/isnanl-nolibm.h: Update.
127 * gnulib/import/isnanl.c: Update.
128 * gnulib/import/itold.c: Update.
129 * gnulib/import/libc-config.h: Update.
130 * gnulib/import/limits.in.h: Update.
131 * gnulib/import/localcharset.c: Update.
132 * gnulib/import/localcharset.h: Update.
133 * gnulib/import/localtime-buffer.c: Update.
134 * gnulib/import/localtime-buffer.h: Update.
135 * gnulib/import/lstat.c: Update.
136 * gnulib/import/m4/00gnulib.m4: Update.
137 * gnulib/import/m4/__inline.m4: Update.
138 * gnulib/import/m4/absolute-header.m4: Update.
139 * gnulib/import/m4/alloca.m4: Update.
140 * gnulib/import/m4/builtin-expect.m4: Update.
141 * gnulib/import/m4/canonicalize.m4: Update.
142 * gnulib/import/m4/chdir-long.m4: Update.
143 * gnulib/import/m4/close.m4: Update.
144 * gnulib/import/m4/closedir.m4: Update.
145 * gnulib/import/m4/configmake.m4: Update.
146 * gnulib/import/m4/d-ino.m4: Update.
147 * gnulib/import/m4/d-type.m4: Update.
148 * gnulib/import/m4/dirent_h.m4: Update.
149 * gnulib/import/m4/dirfd.m4: Update.
150 * gnulib/import/m4/dirname.m4: Update.
151 * gnulib/import/m4/double-slash-root.m4: Update.
152 * gnulib/import/m4/dup.m4: Update.
153 * gnulib/import/m4/dup2.m4: Update.
154 * gnulib/import/m4/eealloc.m4: Update.
155 * gnulib/import/m4/environ.m4: Update.
156 * gnulib/import/m4/errno_h.m4: Update.
157 * gnulib/import/m4/error.m4: Update.
158 * gnulib/import/m4/exponentd.m4: Update.
159 * gnulib/import/m4/exponentl.m4: Update.
160 * gnulib/import/m4/extensions.m4: Update.
161 * gnulib/import/m4/extern-inline.m4: Update.
162 * gnulib/import/m4/fchdir.m4: Update.
163 * gnulib/import/m4/fcntl-o.m4: Update.
164 * gnulib/import/m4/fcntl.m4: Update.
165 * gnulib/import/m4/fcntl_h.m4: Update.
166 * gnulib/import/m4/fdopendir.m4: Update.
167 * gnulib/import/m4/filenamecat.m4: Update.
168 * gnulib/import/m4/flexmember.m4: Update.
169 * gnulib/import/m4/float_h.m4: Update.
170 * gnulib/import/m4/fnmatch.m4: Update.
171 * gnulib/import/m4/fnmatch_h.m4: Update.
172 * gnulib/import/m4/fpieee.m4: Update.
173 * gnulib/import/m4/frexp.m4: Update.
174 * gnulib/import/m4/frexpl.m4: Update.
175 * gnulib/import/m4/fstat.m4: Update.
176 * gnulib/import/m4/fstatat.m4: Update.
177 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
178 * gnulib/import/m4/getcwd-path-max.m4: Update.
179 * gnulib/import/m4/getcwd.m4: Update.
180 * gnulib/import/m4/getdtablesize.m4: Update.
181 * gnulib/import/m4/getlogin.m4: Update.
182 * gnulib/import/m4/getlogin_r.m4: Update.
183 * gnulib/import/m4/getpagesize.m4: Update.
184 * gnulib/import/m4/getprogname.m4: Update.
185 * gnulib/import/m4/gettimeofday.m4: Update.
186 * gnulib/import/m4/glibc21.m4: Update.
187 * gnulib/import/m4/glob.m4: Update.
188 * gnulib/import/m4/glob_h.m4: Update.
189 * gnulib/import/m4/gnulib-cache.m4: Update.
190 * gnulib/import/m4/gnulib-common.m4: Update.
191 * gnulib/import/m4/gnulib-comp.m4: Update.
192 * gnulib/import/m4/gnulib-tool.m4: Update.
193 * gnulib/import/m4/hard-locale.m4: Update.
194 * gnulib/import/m4/include_next.m4: Update.
195 * gnulib/import/m4/inttypes-pri.m4: Update.
196 * gnulib/import/m4/inttypes.m4: Update.
197 * gnulib/import/m4/isnand.m4: Update.
198 * gnulib/import/m4/isnanl.m4: Update.
199 * gnulib/import/m4/largefile.m4: Update.
200 * gnulib/import/m4/limits-h.m4: Update.
201 * gnulib/import/m4/localcharset.m4: Update.
202 * gnulib/import/m4/locale-fr.m4: Update.
203 * gnulib/import/m4/locale-ja.m4: Update.
204 * gnulib/import/m4/locale-zh.m4: Update.
205 * gnulib/import/m4/localtime-buffer.m4: Update.
206 * gnulib/import/m4/longlong.m4: Update.
207 * gnulib/import/m4/lstat.m4: Update.
208 * gnulib/import/m4/malloc.m4: Update.
209 * gnulib/import/m4/malloca.m4: Update.
210 * gnulib/import/m4/math_h.m4: Update.
211 * gnulib/import/m4/mbrtowc.m4: Update.
212 * gnulib/import/m4/mbsinit.m4: Update.
213 * gnulib/import/m4/mbsrtowcs.m4: Update.
214 * gnulib/import/m4/mbstate_t.m4: Update.
215 * gnulib/import/m4/memchr.m4: Update.
216 * gnulib/import/m4/memmem.m4: Update.
217 * gnulib/import/m4/mempcpy.m4: Update.
218 * gnulib/import/m4/memrchr.m4: Update.
219 * gnulib/import/m4/mkdir.m4: Update.
220 * gnulib/import/m4/mkstemp.m4: Update.
221 * gnulib/import/m4/mmap-anon.m4: Update.
222 * gnulib/import/m4/mode_t.m4: Update.
223 * gnulib/import/m4/msvc-inval.m4: Update.
224 * gnulib/import/m4/msvc-nothrow.m4: Update.
225 * gnulib/import/m4/multiarch.m4: Update.
226 * gnulib/import/m4/nocrash.m4: Update.
227 * gnulib/import/m4/off_t.m4: Update.
228 * gnulib/import/m4/onceonly.m4: Update.
229 * gnulib/import/m4/open-cloexec.m4: Update.
230 * gnulib/import/m4/open.m4: Update.
231 * gnulib/import/m4/openat.m4: Update.
232 * gnulib/import/m4/opendir.m4: Update.
233 * gnulib/import/m4/pathmax.m4: Update.
234 * gnulib/import/m4/rawmemchr.m4: Update.
235 * gnulib/import/m4/readdir.m4: Update.
236 * gnulib/import/m4/readlink.m4: Update.
237 * gnulib/import/m4/realloc.m4: Update.
238 * gnulib/import/m4/rename.m4: Update.
239 * gnulib/import/m4/rewinddir.m4: Update.
240 * gnulib/import/m4/rmdir.m4: Update.
241 * gnulib/import/m4/save-cwd.m4: Update.
242 * gnulib/import/m4/secure_getenv.m4: Update.
243 * gnulib/import/m4/setenv.m4: Update.
244 * gnulib/import/m4/signal_h.m4: Update.
245 * gnulib/import/m4/ssize_t.m4: Update.
246 * gnulib/import/m4/stat-time.m4: Update.
247 * gnulib/import/m4/stat.m4: Update.
248 * gnulib/import/m4/std-gnu11.m4: Update.
249 * gnulib/import/m4/stdbool.m4: Update.
250 * gnulib/import/m4/stddef_h.m4: Update.
251 * gnulib/import/m4/stdint.m4: Update.
252 * gnulib/import/m4/stdio_h.m4: Update.
253 * gnulib/import/m4/stdlib_h.m4: Update.
254 * gnulib/import/m4/strchrnul.m4: Update.
255 * gnulib/import/m4/strdup.m4: Update.
256 * gnulib/import/m4/strerror.m4: Update.
257 * gnulib/import/m4/string_h.m4: Update.
258 * gnulib/import/m4/strstr.m4: Update.
259 * gnulib/import/m4/strtok_r.m4: Update.
260 * gnulib/import/m4/sys_socket_h.m4: Update.
261 * gnulib/import/m4/sys_stat_h.m4: Update.
262 * gnulib/import/m4/sys_time_h.m4: Update.
263 * gnulib/import/m4/sys_types_h.m4: Update.
264 * gnulib/import/m4/tempname.m4: Update.
265 * gnulib/import/m4/time_h.m4: Update.
266 * gnulib/import/m4/unistd-safer.m4: Update.
267 * gnulib/import/m4/unistd_h.m4: Update.
268 * gnulib/import/m4/warn-on-use.m4: Update.
269 * gnulib/import/m4/wchar_h.m4: Update.
270 * gnulib/import/m4/wchar_t.m4: Update.
271 * gnulib/import/m4/wctype_h.m4: Update.
272 * gnulib/import/m4/wint_t.m4: Update.
273 * gnulib/import/malloc.c: Update.
274 * gnulib/import/malloc/scratch_buffer.h: Update.
275 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
276 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
277 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
278 * gnulib/import/malloca.c: Update.
279 * gnulib/import/malloca.h: Update.
280 * gnulib/import/malloca.valgrind: Update.
281 * gnulib/import/math.in.h: Update.
282 * gnulib/import/mbrtowc.c: Update.
283 * gnulib/import/mbsinit.c: Update.
284 * gnulib/import/mbsrtowcs-impl.h: Update.
285 * gnulib/import/mbsrtowcs-state.c: Update.
286 * gnulib/import/mbsrtowcs.c: Update.
287 * gnulib/import/memchr.c: Update.
288 * gnulib/import/memmem.c: Update.
289 * gnulib/import/mempcpy.c: Update.
290 * gnulib/import/memrchr.c: Update.
291 * gnulib/import/mkdir.c: Update.
292 * gnulib/import/mkstemp.c: Update.
293 * gnulib/import/msvc-inval.c: Update.
294 * gnulib/import/msvc-inval.h: Update.
295 * gnulib/import/msvc-nothrow.c: Update.
296 * gnulib/import/msvc-nothrow.h: Update.
297 * gnulib/import/open.c: Update.
298 * gnulib/import/openat-die.c: Update.
299 * gnulib/import/openat-priv.h: Update.
300 * gnulib/import/openat-proc.c: Update.
301 * gnulib/import/openat.c: Update.
302 * gnulib/import/openat.h: Update.
303 * gnulib/import/opendir.c: Update.
304 * gnulib/import/pathmax.h: Update.
305 * gnulib/import/pipe-safer.c: Update.
306 * gnulib/import/rawmemchr.c: Update.
307 * gnulib/import/readdir.c: Update.
308 * gnulib/import/readlink.c: Update.
309 * gnulib/import/realloc.c: Update.
310 * gnulib/import/ref-add.sin: Update.
311 * gnulib/import/ref-del.sin: Update.
312 * gnulib/import/rename.c: Update.
313 * gnulib/import/rewinddir.c: Update.
314 * gnulib/import/rmdir.c: Update.
315 * gnulib/import/same-inode.h: Update.
316 * gnulib/import/save-cwd.c: Update.
317 * gnulib/import/save-cwd.h: Update.
318 * gnulib/import/scratch_buffer.h: Update.
319 * gnulib/import/secure_getenv.c: Update.
320 * gnulib/import/setenv.c: Update.
321 * gnulib/import/signal.in.h: Update.
322 * gnulib/import/stat-time.c: Update.
323 * gnulib/import/stat-time.h: Update.
324 * gnulib/import/stat-w32.c: Update.
325 * gnulib/import/stat-w32.h: Update.
326 * gnulib/import/stat.c: Update.
327 * gnulib/import/stdbool.in.h: Update.
328 * gnulib/import/stddef.in.h: Update.
329 * gnulib/import/stdint.in.h: Update.
330 * gnulib/import/stdio.in.h: Update.
331 * gnulib/import/stdlib.in.h: Update.
332 * gnulib/import/str-two-way.h: Update.
333 * gnulib/import/strchrnul.c: Update.
334 * gnulib/import/strdup.c: Update.
335 * gnulib/import/streq.h: Update.
336 * gnulib/import/strerror-override.c: Update.
337 * gnulib/import/strerror-override.h: Update.
338 * gnulib/import/strerror.c: Update.
339 * gnulib/import/string.in.h: Update.
340 * gnulib/import/stripslash.c: Update.
341 * gnulib/import/strnlen1.c: Update.
342 * gnulib/import/strnlen1.h: Update.
343 * gnulib/import/strstr.c: Update.
344 * gnulib/import/strtok_r.c: Update.
345 * gnulib/import/sys_stat.in.h: Update.
346 * gnulib/import/sys_time.in.h: Update.
347 * gnulib/import/sys_types.in.h: Update.
348 * gnulib/import/tempname.c: Update.
349 * gnulib/import/tempname.h: Update.
350 * gnulib/import/time.in.h: Update.
351 * gnulib/import/unistd--.h: Update.
352 * gnulib/import/unistd-safer.h: Update.
353 * gnulib/import/unistd.in.h: Update.
354 * gnulib/import/unsetenv.c: Update.
355 * gnulib/import/verify.h: Update.
356 * gnulib/import/extra/snippet/warn-on-use.h: Update.
357 * gnulib/import/wchar.in.h: Update.
358 * gnulib/import/wctype.in.h: Update.
359 * gnulib/import/xalloc-oversized.h: Update.
360 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
361 "53e2c179f26a890fa6685af4b6c1397ee370433b".
363 2018-08-16 Gary Benson <gbenson@redhat.com>
366 * gdb/main.c (captured_main_1): Exit with nonzero status
367 in batch mode if the last command to be executed failed.
368 * NEWS: Mention the above.
370 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
372 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
373 end of warning message.
375 2018-08-29 Alan Hayward <alan.hayward@arm.com>
378 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
379 (aarch64_extract_return_value): Use
380 aapcs_is_vfp_call_or_return_candidate.
381 (aarch64_return_in_memory): Likewise.
382 (aarch64_store_return_value): Likewise.
384 2018-08-29 Alan Hayward <alan.hayward@arm.com>
387 (aapcs_is_vfp_call_or_return_candidate): Make static
388 (pass_in_v_or_stack): Remove function.
389 (pass_in_v_vfp_candidate): New function.
390 (aarch64_push_dummy_call): Check for float register candidates.
392 2018-08-29 Alan Hayward <alan.hayward@arm.com>
394 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
395 (aapcs_is_vfp_call_or_return_candidate_1): New function.
396 (aapcs_is_vfp_call_or_return_candidate): Likewise.
398 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
401 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
402 (struct ipa_sym_addresses): Rename to...
403 (struct ipa_sym_addresses_common): ... this.
404 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
406 2018-08-28 Tom Tromey <tom@tromey.com>
408 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
409 (token_fifo): Now a std::vector.
410 (yylex, c_parse): Update.
411 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
412 (token_fifo): Now a std::vector.
413 (yylex, d_parse): Update.
414 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
415 (token_fifo): Now a std::vector.
416 (yylex, go_parse): Update.
418 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
420 * parser-defs.h (struct type_stack) <elements>: Change type to
421 std::vector<union type_stack_elt>.
422 <depth, size>: Remove.
423 * parse.c (parse_exp_in_context_1): Adjust.
424 (type_stack_reserve): Remove.
425 (check_type_stack_depth): Remove.
426 (insert_into_type_stack): Adjust to std::vector.
427 (insert_type): Likewise.
428 (push_type): Likewise.
429 (push_type_int): Likewise.
430 (insert_type_address_space): Likewise.
431 (pop_type): Likewise.
432 (pop_type_int): Likewise.
433 (pop_typelist): Likewise.
434 (pop_type_stack): Likewise.
435 (append_type_stack): Likewise.
436 (push_type_stack): Likewise.
437 (get_type_stack): Likewise.
438 (type_stack_cleanup): Likewise.
439 (push_typelist): Likewise.
440 (follow_types): Likewise.
441 (_initialize_parse): Likewise.
443 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
445 * NEWS: Mention csky target.
447 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
448 Hafiz Abid Qadeer <abidh@codesourcery.com>
449 Don Breazeal <donb@codesourcery.com>
451 * csky-linux-tdep.c: New file.
452 * csky-tdep.c: Likewise.
453 * csky-tdep.h: Likewise.
454 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
456 (HFILES_NO_SRCDIR): Add csky-tdep.h.
457 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
458 * configure.tgt: Add csky support.
460 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
462 * python/py-framefilter.c (py_print_frame): Print frame architecture
463 when printing on an MI output.
465 2018-08-27 Tom Tromey <tom@tromey.com>
468 * configure: Rebuild.
469 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
471 2018-08-27 Tom Tromey <tom@tromey.com>
473 * aarch64-linux-tdep.c
474 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
477 2018-08-27 Tom Tromey <tom@tromey.com>
479 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
481 (ppc64_standard_linkage1, ppc64_standard_linkage2)
482 (ppc64_standard_linkage3, ppc64_standard_linkage4)
483 (ppc64_standard_linkage5, ppc64_standard_linkage6)
484 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
487 2018-08-27 Tom Tromey <tom@tromey.com>
489 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
490 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
492 2018-08-27 Tom Tromey <tom@tromey.com>
494 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
495 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
497 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
499 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
501 * sparc-linux-tdep.c (sparc32_linux_sigframe)
502 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
503 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
505 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
506 (ppc64_linux_sigaction_tramp_frame)
507 (ppc32_linux_sighandler_tramp_frame)
508 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
509 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
510 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
511 * mn10300-linux-tdep.c (am33_linux_sigframe)
512 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
513 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
514 * mips-linux-tdep.c (mips_linux_o32_sigframe)
515 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
516 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
517 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
518 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
519 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
520 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
521 * microblaze-linux-tdep.c
522 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
523 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
524 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
525 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
526 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
527 * common/common-types.h (ULONGEST_MAX): New define.
528 (CORE_ADDR_MAX): Fix formatting.
529 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
530 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
531 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
532 (arm_linux_rt_sigreturn_tramp_frame)
533 (arm_eabi_linux_sigreturn_tramp_frame)
534 (arm_eabi_linux_rt_sigreturn_tramp_frame)
535 (thumb2_eabi_linux_sigreturn_tramp_frame)
536 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
537 (arm_linux_restart_syscall_tramp_frame)
538 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
539 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
540 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
542 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
544 2018-08-27 Tom Tromey <tom@tromey.com>
546 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
548 * mips-tdep.c (mips_deal_with_atomic_sequence)
549 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
550 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
551 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
552 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
554 * aarch64-tdep.c (aarch64_software_single_step): Use
557 2018-08-27 Tom Tromey <tom@tromey.com>
559 * linespec.c (complete_linespec_component): Add cast to "char".
560 * completer.c (completion_tracker::build_completion_result): Add
563 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
565 * solist.h (struct solist, struct target_so_ops): Fix
568 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
570 * ada-tasks.c (ada_task_info_s): Remove typedef.
571 (DEF_VEC_O(ada_task_info_s)): Remove.
572 (struct ada_tasks_inferior_data): Initialize fields.
573 <task_list>: Make an std::vector.
574 (get_ada_tasks_inferior_data): Allocate with new.
575 (ada_get_task_number): Adjust.
576 (get_task_number_from_id): Likewise.
577 (valid_task_id): Likewise.
578 (ada_get_task_info_from_ptid): Likewise.
579 (iterate_over_live_ada_tasks): Likewise.
580 (add_ada_task): Likewise.
581 (read_known_tasks): Likewise.
582 (ada_build_task_list): Likewise.
583 (print_ada_task_info): Likewise.
584 (info_task): Likewise.
585 (task_command_1): Likewise.
587 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
589 * ada-lang.c (add_angle_brackets): Return std::string.
591 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
593 * python/py-threadevent.c (py_get_event_thread): Initialize
596 2018-08-24 Pedro Alves <palves@redhat.com>
598 * python/py-bpevent.c (create_breakpoint_event_object): Use
600 * python/py-continueevent.c (emit_continue_event): Use
602 * python/py-exitedevent.c (create_exited_event_object): Return a
604 (emit_exited_event): Use copy-initialization.
605 * python/py-inferior.c (python_new_inferior)
606 (python_inferior_deleted, add_thread_object): Use
608 * python/py-infevents.c (create_inferior_call_event_object)
609 (create_register_changed_event_object)
610 (create_memory_changed_event_object): Return a gdbpy_ref<>.
611 (emit_inferior_call_event, emit_memory_changed_event)
612 (emit_register_changed_event): Use copy-initialization.
613 * python/py-newobjfileevent.c (create_new_objfile_event_object):
614 Return a gdbpy_ref<>.
615 (emit_new_objfile_event): Use copy-initialization.
616 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
617 (emit_clear_objfiles_event): Use copy-initialization.
618 * python/py-signalevent.c (create_signal_event_object): Use
620 * python/py-threadevent.c (create_thread_event_object): Use
623 2018-08-24 Pedro Alves <palves@redhat.com>
624 Simon Marchi <simon.marchi@ericsson.com>
627 * python/py-continueevent.c: Include "gdbthread.h".
628 (create_continue_event_object): Add intro comment. Add 'ptid'
629 parameter. Use it to find thread to pass to
630 create_thread_event_object.
631 (emit_continue_event): Pass PTID down to
632 create_continue_event_object.
633 * python/py-event.h (py_get_event_thread): Declare.
634 (create_thread_event_object): Remove default from 'thread'
636 * python/py-stopevent.c (create_stop_event_object): Use
638 * python/py-threadevent.c (get_event_thread): Rename to ...
639 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
640 and use it to find the thread.
641 (create_thread_event_object): Assert that THREAD isn't null.
642 Don't find the event thread here.
644 2018-08-23 Kevin Buettner <kevinb@redhat.com>
646 * block.h (blockrange, blockranges): New struct declarations.
647 (struct block): Add new field named `ranges'.
648 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
649 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
650 macros for accessing ranges in struct block.
651 (make_blockranges): New declaration.
652 block.c (make_blockranges): New function.
653 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
655 * symtab.h (find_pc_partial_function): Add new parameter `block'.
656 * blockframe.c (cache_pc_function_block): New static global.
657 (clear_pc_function_cache): Clear cache_pc_function_block.
658 (find_pc_partial_function): Move comment to symtab.h. Add
659 support for non-contiguous blocks.
660 * cli/cli-cmds.c (block.h): Include.
661 (print_disassembly): Handle printing of non-contiguous blocks.
662 (disassemble_current_function): Likewise.
663 (disassemble_command): Likewise.
665 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
667 * blockframe.c (get_pc_function_start): Likewise.
668 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
669 (gcc_symbol_address): Likewise.
670 * compile/compile-object-run.c (compile_object_run): Likewise.
671 * compile/compile.c (get_expr_block_and_pc): Likewise.
672 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
673 (func_addr_to_tail_call_list): Likewise.
674 * findvar.c (default_read_var_value): Likewise.
675 * inline-frame.c (inline_frame_this_id): Likewise.
676 (skip-inline_frames): Likewise.
677 * infcmd.c (until_next_command): Likewise.
678 * linespec.c (convert_linespec_to_sals): Likewise.
679 * parse.c (parse_exp_in_context_1): Likewise.
680 * printcmd.c (build_address_symbolic): likewise.
681 (info_address_command): Likewise.
682 symtab.c (find_function_start_sal): Likewise.
683 (skip_prologue_sal): Likewise.
684 (find_function_alias_target): Likewise.
685 (find_gnu_ifunc): Likewise.
686 * stack.c (find_frame_funname): Likewise.
687 * symtab.c (fixup_symbol_section): Likewise.
688 (find_function_start_sal): Likewise.
689 (skip_prologue_sal): Likewsie.
690 (find_function_alias_target): Likewise.
691 (find_gnu_ifunc): Likewise.
692 * tracepoint.c (info_scope_command): Likewise.
693 * value.c (value_fn_field): Likewise.
695 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
696 in place of find_pc_partial_function.
697 * blockframe.c (find_function_entry_range_from_pc): New function.
698 * symtab.h (find_function_entry_range_from_pc): Declare and document.
699 * objfiles.c (objfile_relocate1): Relocate start and end addresses
700 for each range in a block.
703 2018-08-23 Xavier Roirand <roirand@adacore.com>
705 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
708 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
710 * solib-svr4.c (read_program_headers_from_bfd): Return
711 gdb::optional<gdb::byte_vector>.
712 (svr4_exec_displacement): Adjust.
714 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
716 * solib-svr4.c (read_program_header): Return
717 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
718 (find_program_interpreter): Return
719 gdb::optional<gdb::byte_vector>.
720 (scan_dyntag_auxv): Adjust.
721 (enable_break): Adjust.
722 (svr4_exec_displacement): Adjust.
724 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
726 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
727 * inf-child.c (inf_child_target::terminal_save_inferior): New.
729 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
731 * guile/scm-string.c (gdbscm_scm_from_printf): Use
733 * guile/scm-utils.c (gdbscm_printf): Likewise.
734 * serial.c (serial_printf): Likewise.
735 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
737 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
739 * stack.c (print_frame): Print frame architecture when printing on
741 * NEWS: Mention new "arch" attribute in frame output.
743 2018-08-21 Alan Hayward <alan.hayward@arm.com>
745 * arch/aarch64.h (aarch64_regnum): Update comment.
747 2018-08-21 Alan Hayward <alan.hayward@arm.com>
749 * NEWS: Add SVE to 8.2 section.
751 2018-08-21 Pedro Alves <palves@redhat.com>
753 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
754 out from gdbscm_parse_function_args.
755 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
756 gdbscm_parse_function_args_1.
758 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
761 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
764 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
766 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
768 2018-08-19 Michael Spang <spang@google.com>
771 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
774 2018-08-18 Kevin Buettner <kevinb@redhat.com>
776 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
777 dwarf_variable_value.
778 * dwarf2-frame.c (class dwarf_expr_executor):
779 Add override for dwarf_variable_value.
780 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
781 (class symbol_needs_eval_context): Likewise.
782 (indirect_synthetic_pointer): Add forward declaration.
783 (sect_variable_value): New function.
784 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
785 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
786 for DW_OP_GNU_variable_value.
788 2018-08-16 Tom Tromey <tom@tromey.com>
790 * top.c (read_command_file): Update.
791 (command_line_input): Remove "repeat" argument.
792 * ada-lang.c (get_selections): Update.
793 * linespec.c (decode_line_2): Update.
794 * defs.h (command_line_input): Remove argument.
795 * cli/cli-script.c (read_next_line): Update.
796 * python/py-gdb-readline.c: Update.
798 2018-08-17 Tom Tromey <tom@tromey.com>
800 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
803 2018-08-15 Tom Tromey <tom@tromey.com>
805 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
807 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
809 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
810 If used, use find_pc_partial_function to find address range
812 * mi/mi-main.c (mi_cmd_list_features): Report
813 "data-disassemble-a-option" feature.
814 * NEWS: Mention new -data-disassemble option -a.
816 2018-08-13 Tom Tromey <tom@tromey.com>
818 * common/common-defs.h (_FORTIFY_SOURCE): Define.
820 2018-08-13 Alan Hayward <alan.hayward@arm.com>
822 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
823 (aarch64_linux_collect_sve_regset): Likewise.
824 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
825 * regcache.h (regcache_map_entry_size): New function.
827 2018-08-13 Alan Hayward <alan.hayward@arm.com>
829 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
830 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
831 (SVE_HEADER_VL_LENGTH): Likewise.
832 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
833 (SVE_HEADER_FLAGS_LENGTH): Likewise.
834 (SVE_HEADER_RESERVED_LENGTH): Likewise.
835 (SVE_HEADER_SIZE_OFFSET): Likewise.
836 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
837 (SVE_HEADER_VL_OFFSET): Likewise.
838 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
839 (SVE_HEADER_FLAGS_OFFSET): Likewise.
840 (SVE_HEADER_RESERVED_OFFSET): Likewise.
841 (SVE_HEADER_SIZE): Likewise.
842 (aarch64_linux_core_read_vq): Add function.
843 (aarch64_linux_core_read_description): Check for SVE section.
845 2018-08-13 Alan Hayward <alan.hayward@arm.com>
847 * aarch64-fbsd-tdep.c
848 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
850 * aarch64-linux-tdep.c
851 (aarch64_linux_iterate_over_regset_sections): Likewise.
853 (alpha_linux_iterate_over_regset_sections):
855 (alphanbsd_iterate_over_regset_sections): Likewise.
857 (amd64fbsd_iterate_over_regset_sections): Likewise.
859 (amd64_linux_iterate_over_regset_sections): Likewise.
861 (armbsd_iterate_over_regset_sections): Likewise.
863 (arm_fbsd_iterate_over_regset_sections): Likewise.
865 (arm_linux_iterate_over_regset_sections): Likewise.
866 * corelow.c (get_core_registers_cb): Likewise.
867 (core_target::fetch_registers): Likewise.
868 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
869 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
870 * gdbarch.h (void): Regenerate.
871 * gdbarch.sh: Add supply_size and collect_size.
872 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
873 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
874 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
875 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
876 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
877 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
878 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
879 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
880 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
881 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
882 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
883 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
884 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
885 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
886 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
887 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
888 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
889 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
890 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
891 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
892 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
893 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
894 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
895 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
896 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
897 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
898 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
899 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
900 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
901 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
903 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
905 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
908 2018-08-10 Keith Seitz <keiths@redhat.com>
910 * compile/compile-c-support.c (add_code_header, add_code_footer):
911 Move into policy class.
912 (c_push_user_expression, pop_user_expression_nop)
913 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
914 (compile_program): New host class.
915 (c_compile_program): New typedef.
916 (c_compute_porgram): Use c_compile_program.
918 2018-08-10 Keith Seitz <keiths@redhat.com>
920 * compile/compile-internal.h (compile_instance::~compile_instance):
921 Remove calls to htab_delete.
922 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
923 * compile.c (compile_instance::compile_instance): Initialize
924 htab unique pointers.
925 (compile_instance::get_cached_type, compile_instance::insert_type)
926 (compile_instance::error_symbol_once): Update for unique_ptr.
928 2018-08-10 Keith Seitz <keiths@redhat.com>
930 * compile/compile-c-symbols.c (struct symbol_error)
931 (hash_symbol_error, eq_symbol_error, del_symbol_error)
932 (compile_instance::insert_symbol_error)
933 (compile_instance::error_symbol_once): Move to ...
934 * compile/compile.c: ... here.
936 2018-08-10 Keith Seitz <keiths@redhat.com>
938 * compile/compile-c-support.c (c_get_compile_context): Use `new'
939 instead of `new_compile_instance'.
940 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
942 If the symbol error map is not initialized, create it.
943 (generate_c_for_for_one_symbol): Do not check/initialize
944 the symbol error map.
945 * compile/compile-c-types.c (compile_c_instance): Make a class.
947 (compile_instance::compile_instance): Initialize the type cache.
948 (get_cached_type): New function.
949 (insert_type): Update description.
950 (compile_c_instance::m_default_cflags): Define.
951 (convert_type): Update description. Use get_cached_type.
952 (delete_instance): Moved to destructor.
953 (new_compile_instance): Moved to constructor.
954 * compile/compile-c.h (compile_c_instance): Make class inheriting
955 from compile_instance.
956 <base>: Remove field.
957 <type_map, symbol_err_map>: Move to base class.
958 <c_plugin>: Rename to `m_plugin' and remove pointer type.
959 * compile/compile-internal.h (compile_instance): Make class.
960 <type_map_t, symbol_err_map_t>: Define.
961 <fe>: Rename to `m_gcc_fe'.
962 <scope, block, gcc_target_options>: Add `m_' prefix.
963 <m_type_map, m_symbol_err_map>: New fields, moved from
966 (convert_type, new_compile_instance): Remove.
967 * compile/compile.c (cleanup_compile_instance): Remove.
968 (compile_to_object): Use unique_ptr to eliminate cleanups.
969 (compile_instance::set_print_callback, compile_instance::version)
970 (compile_instance::set_verbose)
971 (compile_instance::set_driver_filename)
972 (compile_instance::set_triplet_regexp)
973 (compile_instance::set_arguments)
974 (compile_instance::set_source_file)
975 (compile_instance::compile): Define.
977 2018-08-10 Keith Seitz <keiths@redhat.com>
979 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
980 * compile/compile-c-types.c: Define GCC_METHODN macros and include
981 gcc-c-fe.def to define C plugin.
982 (delete_instance): Delete `c_plugin'.
983 (new_compile_instance): Initialize `c_plugin'.
984 * compile/compile-c.h: Include gcc_c_plugin.h.
985 (struct compile_c_instance) <c_plugin>: New member.
986 * gcc-c-plugin.h: New file.
987 Update all callers with API change.
989 2018-08-10 Keith Seitz <keiths@redhat.com>
991 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
992 (HFILES_NO_SRCDIR): ... to here.
993 Add compile-internal.h and compile-c.h.
994 * compile/compile-c-support.c: Include compile-c.h.
995 * compile/compile-c-symbols.c: Include compile-c.h.
996 (generate_c_for_variable_locations): Update comment.
997 * compile/compile-c-types.c: Include compile-c.h.
998 * compile/compile-c.h: New file -- moved C language declarations
999 from other files here.
1000 * compile/compile-internal.h: Do not include hashtab.h or
1001 common/enum-flags.h.
1002 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1003 (gcc_convert_symbol, gcc_symbol_address)
1004 (generate_c_for_variable_locations, c_get_mode_for_size)
1005 (c_get_range_decl_name): Definitions moved to compile-c.h.
1006 * compile/compile-loc2c.c: Include compile-c.h.
1008 2018-08-10 Keith Seitz <keiths@redhat.com>
1010 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1011 (c_symbol_substitution_name): ... this.
1014 2018-08-10 Keith Seitz <keiths@redhat.com>
1016 * compile/compile-c-support.c (c_compute_program): Use
1017 unique_xmalloc_ptr to eliminate cleanup.
1018 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1019 Return a unique_xmalloc_ptr and eliminate cleanup.
1020 * compile/compile-internal.h (generate_c_for_variable_locations):
1021 Return unique_xmalloc_ptr and update description.
1023 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1025 * corelow.c (core_target::get_core_register_section): Rename
1026 min_size to section_min_size.
1028 2018-08-09 Jim Wilson <jimw@sifive.com>
1030 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1031 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1032 * NEWS: Mention new GNU/Linux RISC-V target.
1033 * configure.host: Add riscv*-*-linux*.
1034 * configure.nat: Add riscv*.
1035 * configure.tgt: Add riscv*-*-linux*.
1036 * riscv-linux-nat.c: New file.
1037 * riscv-linux-tdep.c: New file.
1039 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1041 * infrun.c (resume): Make static, add forward declaration.
1042 (proceed): Update header comment.
1043 * infrun.h (resume): Delete declaration.
1045 2018-08-09 Tom Tromey <tom@tromey.com>
1047 * riscv-tdep.h: Minor formatting fixes.
1049 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1051 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1052 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1053 (test_mkdir_recursive): Likewise.
1054 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1056 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1058 * valarith.c (value_subscripted_rvalue): If an array is not in
1059 memory, and we don't know the upper bound, then we can't know that
1060 the requested element exists or not.
1062 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1064 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1065 (target_options_to_string): Add comment.
1067 2018-08-08 Tom Tromey <tom@tromey.com>
1069 * unittests/scoped_mmap-selftests.c: Check result of "write".
1071 2018-08-08 Jim Wilson <jimw@sifive.com>
1073 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1074 (decode_register_index_short): New.
1075 (decode_j_type_insn, decode_cj_type_insn): New.
1076 (decode_b_type_insn, decode_cb_type_insn): New.
1077 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1078 local xlen. Check xlen when decoding ambiguous compressed insns. In
1079 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1080 is_c_sw_insn instead of is_sw_insn.
1081 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1082 (riscv_software_single_step): New.
1083 * riscv-tdep.h (riscv_software_single_step): Declare.
1085 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1086 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1088 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1091 * target.c (dispose_inferior): Don't dispose of inferiors that are
1094 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1096 * remote.c (remote_target::download_tracepoint): Change char* to
1099 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1101 * target.h (target_options_to_string): Return an std::string.
1102 * target.c (str_comma_list_concat_elem): Return void, use
1104 (do_option): Likewise.
1105 (target_options_to_string): Return an std::string.
1106 * linux-nat.c (linux_nat_target::wait): Adjust.
1107 * target-debug.h (target_debug_print_options): Adjust.
1109 2018-08-07 Tom Tromey <tom@tromey.com>
1111 * Makefile.in (CPPFLAGS): New variable.
1112 (INTERNAL_CPPFLAGS): Use it.
1114 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1116 * NEWS: Mention the index cache.
1118 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1120 * common/pathstuff.h (get_standard_cache_dir): New.
1121 * common/pathstuff.c (get_standard_cache_dir): New.
1122 * build-id.h (build_id_to_string): New.
1123 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1124 DEBUG_STR_SUFFIX): Move to here.
1125 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1126 DEBUG_STR_SUFFIX): Move from there.
1127 (write_psymtabs_to_index): Make non-static, add basename
1128 parameter. Write to temporary files, rename when done.
1129 (save_gdb_index_command): Adjust call to
1130 write_psymtabs_to_index.
1131 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1133 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1134 (get_gdb_index_contents_from_cache): New.
1135 (get_gdb_index_contents_from_cache_dwz): New.
1136 (dwarf2_initialize_objfile): Read index from cache.
1137 (dwarf2_build_psymtabs): Save to index.
1138 * dwarf-index-cache.h: New file.
1139 * dwarf-index-cache.c: New file.
1140 * dwarf-index-write.h: New file.
1142 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1144 * gnulib/aclocal.m4: Re-generate.
1145 * gnulib/config.in: Re-generate.
1146 * gnulib/configure: Re-generate.
1147 * gnulib/import/Makefile.am: Re-generate.
1148 * gnulib/import/Makefile.in: Re-generate.
1149 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1150 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1151 * gnulib/import/m4/mkdir.m4: New file.
1152 * gnulib/import/mkdir.c: New file.
1153 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1156 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1158 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1159 * common/scoped_mmap.c: New file.
1160 * common/scoped_mmap.h (destroy): New method.
1161 (~scoped_mmap, reset): Use destroy.
1162 (scoped_mmap): New move constructor.
1163 (mmap_file): New declaration.
1164 * unittests/scoped_mmap-selftests.c (test_normal,
1165 test_invalid_filename, run_tests): New functions.
1166 (_initialize_scoped_mmap_selftests): Register selftest.
1168 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1170 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1171 (read_gdb_index_from_buffer): ... this. Remove section
1172 parameter, add buffer parameter.
1173 (get_gdb_index_contents_ftype,
1174 get_gdb_index_contents_dwz_ftype): New typedefs.
1175 (dwarf2_read_gdb_index): Add callback parameters to get the
1177 (get_gdb_index_contents_from_section): New.
1178 (dwarf2_initialize_objfile): Update call to
1179 dwarf2_read_gdb_index.
1181 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1183 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1184 (gdb_open_cloexec): Likewise.
1185 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1186 (commandline_from_pid): Likewise.
1187 (linux_xfer_osdata_threads): Likewise.
1188 (linux_xfer_osdata_fds): Likewise.
1189 * ada-lang.c (is_package_name): Likewise.
1190 * auxv.c (procfs_xfer_auxv): Likewise.
1191 * breakpoint.c (print_one_breakpoint_location): Use
1193 (print_one_catch_solib): Use string_printf.
1194 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1195 (add_pe_forwarded_sym): Likewise.
1196 * dwarf2read.c (create_type_unit_group): Likewise.
1197 (build_error_marker_type): Likewise.
1198 * infcall.c (get_function_name): Likewise.
1199 * valprint.c (print_converted_chars_to_obstack): Likewise.
1200 * xtensa-tdep.c (xtensa_register_type): Likewise.
1202 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1204 * remote.c (remote_target::download_tracepoint): Fix format
1207 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1209 * tracefile.c: Include common/byte-vector.h.
1210 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1211 with trace_regblock_size if needed. Update uses of buf.
1213 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1215 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1216 std::vector<unsigned char>.
1217 * tracepoint.c (collection_list::collection_list): Remove
1218 m_regs_mask initializer from initializer list. Resize
1219 m_regs_mask using the largest remote register number.
1220 (collection_list::add_remote_register): Remove size check on
1221 m_regs_mask. Use at to access element.
1222 (collection_list::stringify): Change type of temp_buf to
1223 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1224 stringify the register mask. Use pack_hex_byte for the register
1227 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1229 * tracepoint.h (class collection_list) <add_register>: Remove.
1230 <add_remote_register, add_ax_registers, add_local_register>:
1232 <add_memrange>: Add scope parameter.
1233 * tracepoint.c (encode_actions_1): Likewise.
1234 (collection_list::add_register): Rename to ...
1235 (collection_list::add_remote_register): ... this. Update
1237 (collection_list::add_ax_registers, add_local_register): New
1239 (collection_list::add_memrange): Add scope parameter. Call
1240 add_local_register instead of add_register.
1241 (finalize_tracepoint_aexpr): New function.
1242 (collection_list::collect_symbol): Update calls to add_memrange.
1243 Call add_local_register instead of add_register. Call
1244 add_ax_registers. Call finalize_tracepoint_aexpr.
1245 (encode_actions_1): Get remote regnos for $reg action. Call
1246 add_remote_register, add_ax_registers, and add_local_register.
1247 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1248 (validate_actionline): Call finalize_tracepoint_aexpr.
1250 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1252 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1253 Replace array buf with gdb::char_vector buf, of size
1254 get_remote_packet_size (). Replace references to buf and
1255 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1256 and xsnprintf with snprintf. Raise errors if the buffer is too
1259 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1261 * remote.c (remote_target::download_tracepoint): Fix the has_more
1262 predicate in the QTDP action list iteration.
1264 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1266 * remote.c (remote_target::download_tracepoint): Fix indentation
1269 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1271 * proc-api.c (_initialize_proc_api): Remove c, unused.
1272 * procfs.c (procfs_init_inferior): Remove signals, unused.
1273 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1276 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1277 Andrew Burgess <andrew.burgess@embecosm.com>
1279 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1280 'W_STOPCODE (0)' as this could be ambiguous.
1282 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1284 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1285 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1288 2018-08-02 Tom Tromey <tom@tromey.com>
1291 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1293 (process_structure_scope): Likewise.
1295 2018-08-02 Xavier Roirand <roirand@adacore.com>
1298 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1301 2018-08-02 Tom Tromey <tom@tromey.com>
1303 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1304 (darwin_suspend_inferior, darwin_resume_inferior)
1305 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1306 (darwin_check_new_threads): Check result of get_darwin_inferior.
1308 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1312 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1314 * varobj.c (varobj_get_path_expr_parent): Report an error if
1315 parent is a dynamic varobj.
1317 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1319 * gnulib/aclocal.m4: Re-generate.
1320 * gnulib/config.in: Re-generate.
1321 * gnulib/configure: Re-generate.
1322 * gnulib/import/Makefile.in: Re-generate.
1323 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1324 * gnulib/import/m4/onceonly.m4: Re-generate.
1326 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1328 * target-descriptions.c (struct xml_test_tdesc): New.
1329 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1330 (record_xml_tdesc): Update.
1331 (maintenance_check_xml_descriptions): Update.
1332 * target-descriptions.h (record_xml_tdesc): Update comment.
1334 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1336 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1337 checking array bounds are defined.
1339 2018-07-30 Tom Tromey <tom@tromey.com>
1341 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1342 irreflexivity violation.
1344 2018-07-30 Tom Tromey <tom@tromey.com>
1346 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1347 * value.c (unpack_long): Remove lint code.
1348 * valops.c (value_ind): Remove lint code.
1349 * valarith.c (value_x_binop, value_x_unop, value_equal)
1350 (value_pos): Remove lint code.
1352 2018-07-28 Tom de Vries <tdevries@suse.de>
1354 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1355 with undefined upper bound as <optimized out>.
1357 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1359 * gcore.in: Rename variable "name" to "prefix". Expand
1362 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1364 * windows-nat.c (windows_nat_target::create_inferior): Update to
1365 call close() in global namespace.
1367 2018-07-26 Tom Tromey <tom@tromey.com>
1369 * dwarf-index-write.c (add_address_entry): Don't add objfile
1371 * dbxread.c (find_stab_function): Rename from
1372 find_stab_function_addr. Return a bound_minimal_symbol.
1373 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1374 Don't add objfile offsets.
1375 (end_psymtab): Use raw_text_low, raw_text_high,
1376 MSYMBOL_VALUE_RAW_ADDRESS.
1377 (read_ofile_symtab): Update.
1378 (process_one_symbol): Update.
1379 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1381 (dw2_relocate): Remove.
1382 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1384 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1386 (process_psymtab_comp_unit_reader, add_partial_symbol)
1387 (add_partial_subprogram, dwarf2_ranges_read): Update.
1388 (load_partial_dies): Update.
1389 (add_address_entry): Don't add objfile offsets.
1390 (dwarf2_build_include_psymtabs): Update.
1391 (create_addrmap_from_aranges): Don't add objfile offsets.
1392 (dw2_find_pc_sect_compunit_symtab): Update.
1393 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1394 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1396 (parse_partial_symbols): Don't add objfile offsets. Use
1397 raw_text_low, raw_text_high. Update.
1398 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1399 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1400 or call 'relocate' quick function. Clear psymbol_map.
1401 * psympriv.h (struct partial_symbol) <address>: Add section
1403 <set_unrelocated_address>: Rename from set_address.
1404 <raw_text_low, raw_text_high>: New methods.
1405 <text_low, text_high>: Add objfile parameter.
1406 (add_psymbol_to_bcache): Add 'section' parameter. Call
1407 set_unrelocated_address.
1408 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1409 (find_pc_psymbol): Update.
1410 (fixup_psymbol_section, relocate_psymtabs): Remove.
1411 (dump_psymtab, psym_functions): Update.
1412 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1414 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1415 (start_psymtab_common): Update.
1416 * symfile-debug.c (debug_qf_relocate): Remove.
1417 (debug_sym_quick_functions): Update.
1418 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1419 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1422 2018-07-26 Tom Tromey <tromey@redhat.com>
1424 * dbxread.c (end_psymtab): Use text_high_valid and
1426 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1427 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1428 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1430 <text_low_valid, text_high_valid>: New fields.
1431 <set_text_low, set_text_high>: Update.
1432 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1434 2018-07-26 Tom Tromey <tom@tromey.com>
1436 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1438 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1439 textlow and texthigh fields.
1440 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1442 * mdebugread.c (parse_lines, parse_partial_symbols)
1443 (psymtab_to_symtab_1): Update.
1444 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1445 Rename fields. Update comment. Now private.
1446 <text_low, text_high, set_text_low, set_text_high>: New methods.
1447 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1448 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1449 (start_psymtab_common, maintenance_info_psymtabs)
1450 (maintenance_check_psymtabs): Update.
1451 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1453 (scan_xcoff_symtab): Update.
1455 2018-07-26 Tom Tromey <tromey@redhat.com>
1457 * psympriv.h (struct partial_symbol) <unrelocated_address,
1458 address, set_address>: New methods.
1459 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1460 (fixup_psymbol_section, relocate_psymtabs): Update.
1461 (print_partial_symbols): Add 'objfile' parameter. Update.
1462 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1465 2018-07-26 Tom Tromey <tom@tromey.com>
1467 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1468 (debug_names::write_psymbols): Update.
1469 * psympriv.h (struct partial_symbol): Derive from
1470 general_symbol_info.
1471 <obj_section>: New method.
1472 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1473 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1474 (find_pc_sect_psymbol, fixup_psymbol_section)
1475 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1476 (print_partial_symbols, recursively_search_psymtabs)
1477 (compare_psymbols, psymbol_hash, psymbol_compare)
1478 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1479 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1481 2018-07-26 Tom Tromey <tromey@redhat.com>
1483 * dbxread.c (end_psymtab): Remove dead code.
1485 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1487 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1488 DWARF unwinders are disabled.
1489 * dwarf2-frame.c: Add dwarf2read.h include.
1490 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1492 (dwarf2_frame_unwinders_enabled_p): Define.
1493 (show_dwarf_unwinders_enabled_p): New function.
1494 (_initialize_dwarf2_frame): Register switch to control DWARF
1496 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1497 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1498 (show_dwarf_cmdlist): Remove static keyword.
1499 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1500 (show_dwarf_cmdlist): Declare.
1501 * NEWS: Document new feature.
1503 2018-07-26 Tom de Vries <tdevries@suse.de>
1505 PR breakpoints/23366
1506 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1508 2018-07-26 Tom de Vries <tdevries@suse.de>
1510 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1511 DW_AT_count can't be translated to a dynamic prop.
1513 2018-07-25 Tom de Vries <tdevries@suse.de>
1515 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1518 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1520 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1522 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1524 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1526 2018-07-24 Keith Seitz <keiths@redhat.comt
1529 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1530 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1531 instead of add_symbol_to_list.
1532 (read_file_scope): Call prepare_one_comp_unit before reading
1535 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1537 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1539 2018-07-24 Tom Tromey <tom@tromey.com>
1541 * utils.c (malloc, realloc, free): Don't declare.
1542 * configure, config.in: Rebuild.
1543 * configure.ac: Don't check for declarations of free, malloc, or
1546 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1548 * aarch64-linux-nat.c
1549 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1551 * arm-linux-nat.c (fetch_regs): Likewise.
1552 (store_regs): Likewise.
1553 (fetch_vfp_regs): Likewise.
1554 (store_vfp_regs): Likewise.
1555 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1556 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1557 (arm_linux_nat_target::insert_watchpoint): Likewise.
1558 (arm_linux_nat_target::remove_watchpoint): Likewise.
1559 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1561 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1563 * ppc-linux-nat.c (fetch_register): Likewise.
1564 (fetch_all_gp_regs): Likewise.
1565 (fetch_ppc_registers): Likewise.
1566 (store_all_gp_regs): Likewise.
1567 (store_ppc_registers): Likewise.
1568 (hwdebug_insert_point): Likewise.
1569 (can_use_watchpoint_cond_accel): Likewise.
1570 * remote-sim.c (gdb_os_write_stdout): Likewise.
1572 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1573 Tom Tromey <tom@tromey.com>
1575 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1577 * configure: Rebuild.
1579 2018-07-22 Tom Tromey <tom@tromey.com>
1581 * regformats/regdat.sh: Define xmltarget_${name} inside
1582 #ifndef IN_PROCESS_AGENT.
1584 2018-07-22 Tom Tromey <tom@tromey.com>
1586 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1588 2018-07-22 Tom Tromey <tom@tromey.com>
1590 * symfile.c (reread_symbols): Notify iter, not objfile.
1592 2018-07-22 Tom Tromey <tom@tromey.com>
1594 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1596 (ravenscar_thread_target::prepare_to_store): Likewise.
1598 2018-07-22 Tom Tromey <tom@tromey.com>
1600 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1601 unused variable. Call value_fetch_lazy when needed.
1602 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1603 Remove unused variable. Call value_fetch_lazy when needed.
1605 2018-07-22 Tom Tromey <tom@tromey.com>
1607 * m32c-tdep.c (mark_dma): Return void.
1608 (make_regs): Remove unused declarations.
1610 2018-07-22 Tom Tromey <tom@tromey.com>
1612 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1613 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1614 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1615 bkscm_get_valid_block_smob_arg_unsafe for effect.
1617 2018-07-22 Tom Tromey <tom@tromey.com>
1619 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1622 2018-07-22 Tom Tromey <tom@tromey.com>
1624 * windows-nat.c (saved_context): Conditionally define.
1625 * remote.c (remote_target::remote_btrace_maybe_reopen):
1626 Conditionally declare "warned".
1627 * inflow.c (sigquit_ours): Conditionally define.
1628 (new_tty): Move "tty" declaration inside #if.
1629 * guile/guile.c (guile_datadir): Conditionally define.
1630 * charset.c (set_be_le_names): Move some declarations inside #if.
1631 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1633 (parse_xml_btrace_conf): Likewise.
1635 2018-07-22 Tom Tromey <tom@tromey.com>
1637 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1639 2018-07-22 Tom Tromey <tom@tromey.com>
1641 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1642 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1643 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1644 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1645 * stack.c (frame_apply_level_command): Remove unused variable.
1646 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1647 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1648 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1650 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1651 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1652 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1654 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1655 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1657 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1658 Remove unused variable.
1659 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1661 * common/tdesc.c (print_xml_feature::visit): Remove unused
1663 * compile/compile-object-load.c (store_regs): Remove unused
1665 * complaints.c (clear_complaints): Remove unused variable.
1666 * corelow.c (core_target_open): Remove unused variable.
1667 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1669 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1671 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1673 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1675 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1677 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1679 * ia64-tdep.c (examine_prologue): Remove unused variable.
1680 * infcall.c (run_inferior_call): Remove unused variable.
1681 * inferior.c (exit_inferior): Remove unused variable.
1682 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1683 * linespec.c (decode_line_2): Remove unused variable.
1684 * linux-nat.c (super_close): Remove.
1685 * linux-tdep.c (linux_info_proc): Remove unused variable.
1686 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1687 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1688 Remove unused variable.
1689 * parse.c (find_minsym_type_and_address): Remove unused variable.
1690 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1692 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1694 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1696 * record-btrace.c (record_btrace_target::store_registers): Remove
1698 (cmd_show_record_btrace_cpu): Remove unused variable.
1699 * riscv-tdep.c (riscv_register_reggroup_p)
1700 (riscv_push_dummy_call, riscv_return_value): Remove unused
1702 * rust-exp.y (literal): Remove unused variable.
1703 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1705 <STRUCTOP_ANONYMOUS>: Likewise.
1706 * s390-linux-tdep.c (s390_linux_init_abi_31)
1707 (s390_linux_init_abi_64): Remove unused variable.
1708 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1709 (file_select_thread, net_windows_open, _initialize_ser_windows):
1710 Remove unused variables.
1711 * symtab.c (find_pc_sect_line): Remove unused variable.
1712 * target-memory.c (compute_garbled_blocks): Remove unused
1714 (target_write_memory_blocks): Remove unused variable.
1715 * target.c (target_stack::unpush): Remove unused variables.
1716 * tracepoint.c (start_tracing, all_tracepoint_actions)
1717 (merge_uploaded_trace_state_variables)
1718 (print_one_static_tracepoint_marker): Remove unused variable.
1719 * unittests/basic_string_view/element_access/char/1.cc (test01):
1720 Remove unused variable.
1721 * windows-nat.c (windows_continue, windows_add_all_dlls)
1722 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1723 Remove unused variables.
1725 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1727 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1728 attr_profile in HAVE_ELF.
1729 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1732 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1734 * frame.c (frame_register_unwind): Change parameter name.
1735 (frame_unwind_register): Likewise.
1736 (frame_unwind_register_value): Likewise.
1737 (frame_unwind_register_signed): Likewise.
1738 (frame_unwind_register_unsigned): Likewise.
1739 * frame.h (frame_register_unwind): Likewise.
1740 (frame_unwind_register): Likewise.
1741 (frame_unwind_register_value): Likewise.
1742 (frame_unwind_register_signed): Likewise.
1743 (frame_unwind_register_unsigned): Likewise.
1744 (frame_unwind_arch): Likewise.
1746 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1748 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1751 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1753 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1754 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1757 2018-07-20 Keith Seitz <keiths@redhat.com>
1759 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1760 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1761 m_compunit_symtab, m_language>: Add "m_" prefix.
1763 * buildsym.c: Update all uses.
1765 2018-07-20 Tom Tromey <tom@tromey.com>
1767 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1768 * buildsym.h (record_line_ftype): Remove typedef.
1770 2018-07-20 Tom Tromey <tom@tromey.com>
1772 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1773 (end_expandable_symtab): Likewise.
1774 (end_symtab_get_static_block): Likewise.
1775 (end_symtab_from_static_block): Likewise.
1776 * buildsym-legacy.c (augment_type_symtab): Remove.
1777 (end_expandable_symtab): Remove.
1778 (end_symtab_get_static_block): Remove.
1779 (end_symtab_from_static_block): Remove.
1781 2018-07-20 Tom Tromey <tom@tromey.com>
1783 * dwarf2read.c: Include buildsym.h.
1784 (struct dwarf2_cu) <builder>: New method.
1785 (fixup_go_packaging): Update.
1786 (process_full_comp_unit, process_full_type_unit): Update. Don't
1787 use scoped_free_pendings.
1788 (using_directives): Add "cu" parameter, remove "language".
1789 (read_import_statement, setup_type_unit_groups, )
1790 (read_func_scope, read_lexical_block_scope)
1791 (dwarf2_record_block_ranges, read_namespace): Update.
1792 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1793 (lnp_state_machine::handle_end_sequence): Update.
1794 (class lnp_state_machine) <m_cu>: New member.
1795 <m_record_line_callback>: Remove.
1796 <m_currently_recording_lines>: New member.
1797 (lnp_state_machine::handle_set_file): Update.
1798 (noop_record_line): Remove.
1799 (dwarf_record_line_p): Add cu parameter.
1800 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1801 (lnp_state_machine::record_line)
1802 (lnp_state_machine::lnp_state_machine)
1803 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1804 (dwarf_decode_lines): Update.
1805 (dwarf2_start_subfile): Add cu parameter.
1806 (dwarf2_start_symtab, new_symbol): Update.
1807 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1808 Remove dwarf2_per_objfile parameter.
1809 (dwarf_decode_macros): Update.
1811 2018-07-20 Tom Tromey <tom@tromey.com>
1813 * stabsread.c (define_symbol): Update.
1814 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1815 * dwarf2read.c (new_symbol): Update.
1816 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1817 * cp-namespace.c: Include buildsym.h.
1818 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1819 * buildsym-legacy.c (get_buildsym_compunit): New function.
1821 2018-07-20 Tom Tromey <tom@tromey.com>
1823 * xcoffread.c: Include buildsym-legacy.h.
1824 * windows-nat.c: Include buildsym-legacy.h.
1825 * stabsread.c: Include buildsym-legacy.h.
1826 * mdebugread.c: Include buildsym-legacy.h.
1827 * buildsym-legacy.h: New file.
1828 * buildsym-legacy.c: New file, from buildsym.c.
1829 * go32-nat.c: Include buildsym-legacy.h.
1830 * dwarf2read.c: Include buildsym-legacy.h.
1831 * dbxread.c: Include buildsym-legacy.h.
1832 * cp-namespace.c: Include buildsym-legacy.h.
1833 * coffread.c: Include buildsym-legacy.h.
1834 * buildsym.h: Move some contents to buildsym-legacy.h.
1835 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1837 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1839 2018-07-20 Tom Tromey <tom@tromey.com>
1841 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1842 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1843 (buildsym_compunit::buildsym_compunit)
1844 (buildsym_compunit::~buildsym_compunit)
1845 (buildsym_compunit::get_macro_table): Define.
1847 2018-07-20 Tom Tromey <tom@tromey.com>
1849 * buildsym.c (reset_symtab_globals): Remove.
1850 (buildsym_compunit::end_symtab_from_static_block): Update.
1851 (buildsym_compunit::augment_type_symtab): Update.
1852 (end_symtab_from_static_block): Call free_buildsym_compunit.
1853 (augment_type_symtab, end_symtab, end_expandable_symtab):
1856 2018-07-20 Tom Tromey <tom@tromey.com>
1858 * arch-utils.c: Do not include buildsym.h.
1859 * mipsread.c: Do not include buildsym.h.
1860 * machoread.c: Do not include buildsym.h.
1861 * elfread.c: Do not include buildsym.h.
1863 2018-07-20 Tom Tromey <tom@tromey.com>
1865 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1867 (buildsym_compunit): Add new constructor.
1868 (struct buildsym_compunit) <get_last_source_file, finish_block,
1869 record_block_range, start_subfile, patch_subfile_names,
1870 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1871 set_last_source_start_addr, get_last_source_start_addr,
1872 get_local_using_directives, set_local_using_directives,
1873 get_global_using_directives, outermost_context_p,
1874 get_current_context_stack, get_context_stack_depth,
1875 get_current_subfile, get_local_symbols, get_file_symbols,
1876 get_global_symbols, record_debugformat, record_producer,
1877 push_context, pop_context, end_symtab_get_static_block,
1878 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1880 <record_pending_block, finish_block_internal, make_blockvector,
1881 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1885 2018-05-22 Tom Tromey <tom@tromey.com>
1887 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1889 (finish_block_internal): Update.
1891 2018-07-20 Tom Tromey <tom@tromey.com>
1893 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1895 (finish_block_internal): Update.
1897 2018-07-20 Tom Tromey <tom@tromey.com>
1899 * buildsym.h (EXTERN): Don't define or undef.
1900 * buildsym.c (EXTERN): Don't define.
1902 2018-07-20 Tom Tromey <tom@tromey.com>
1904 * buildsym.c: Remove TODO comment.
1906 2018-07-20 Tom Tromey <tom@tromey.com>
1908 * coffread.c (coff_symtab_read): Update.
1909 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1910 (xcoff_new_init): Update.
1911 * mipsread.c (mipscoff_new_init): Update.
1912 * mdebugread.c (mdebug_build_psymtabs): Update.
1913 * elfread.c (elf_new_init): Update.
1914 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1916 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1917 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1918 (stabsect_build_psymtabs): Update.
1919 * buildsym.h (buildsym_init): Don't declare.
1920 * buildsym.c: Update comment.
1921 (prepare_for_building): Remove.
1922 (start_symtab, restart_symtab): Update.
1923 (reset_symtab_globals): Update comment.
1924 (buildsym_init): Remove.
1926 2018-07-20 Tom Tromey <tom@tromey.com>
1928 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1929 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1930 (read_enum_type, common_block_start, common_block_end)
1931 (cleanup_undefined_types_1, finish_global_stabs): Update.
1932 * mdebugread.c (psymtab_to_symtab_1): Update.
1933 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1934 (read_lexical_block_scope, new_symbol): Update.
1935 * dbxread.c (process_one_symbol): Update.
1936 * coffread.c (coff_symtab_read, process_coff_symbol)
1937 (coff_read_enum_type): Update.
1938 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1940 (get_local_symbols, get_file_symbols, get_global_symbols): New
1942 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1944 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1945 (~scoped_free_pendings): Update.
1946 (finish_block, prepare_for_building, reset_symtab_globals)
1947 (end_symtab_get_static_block, end_symtab_with_blockvector)
1948 (augment_type_symtab, push_context): Update.
1949 (get_local_symbols, get_file_symbols, get_global_symbols): New
1951 (buildsym_init): Update.
1953 2018-07-20 Tom Tromey <tom@tromey.com>
1955 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1956 (process_full_type_unit): Likewise.
1957 (dwarf2_start_symtab): Set list_in_scope.
1959 2018-07-20 Tom Tromey <tom@tromey.com>
1961 * dwarf2read.c (process_psymtab_comp_unit_reader)
1962 (build_type_psymtabs_reader): Do not set list_in_scope.
1964 2018-07-20 Tom Tromey <tom@tromey.com>
1966 * buildsym.c (free_pendings): Remove.
1967 (add_symbol_to_list, scoped_free_pendings)
1968 (finish_block_internal, buildsym_init): Update.
1970 2018-07-20 Tom Tromey <tom@tromey.com>
1972 * xcoffread.c (read_xcoff_symtab): Update.
1973 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1975 * dbxread.c (process_one_symbol): Update.
1976 * coffread.c (coff_symtab_read): Update.
1977 * buildsym.h (finish_block): Update.
1978 * buildsym.c (finish_block): Remove "listhead" argument.
1979 (end_symtab_get_static_block): Update.
1981 2018-07-20 Tom Tromey <tom@tromey.com>
1983 * buildsym.h (class scoped_free_pendings): Remove constructor.
1984 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1986 <m_pending_block_obstack, m_pending_blocks>: New members.
1987 (pending_block_obstack, pending_blocks): Remove.
1988 (scoped_free_pendings::scoped_free_pendings): Default.
1989 (~scoped_free_pendings): Update.
1990 (free_pending_blocks): Remove.
1991 (finish_block_internal, record_pending_block, make_blockvector)
1992 (end_symtab_get_static_block, augment_type_symtab, push_context)
1993 (buildsym_init): Update.
1995 2018-07-20 Tom Tromey <tom@tromey.com>
1997 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1998 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2000 (pending_addrmap, pending_addrmap_obstack)
2001 (pending_addrmap_interesting): Remove.
2002 (scoped_free_pendings, record_block_range, make_blockvector)
2003 (prepare_for_building, reset_symtab_globals, buildsym_init):
2006 2018-07-20 Tom Tromey <tom@tromey.com>
2008 * xcoffread.c (process_linenos): Update.
2009 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2010 * mdebugread.c (psymtab_to_symtab_1): Update.
2011 * dwarf2read.c (setup_type_unit_groups)
2012 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2013 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2014 * dbxread.c (process_one_symbol): Update.
2015 * coffread.c (coff_symtab_read, enter_linenos)
2016 (process_coff_symbol): Update.
2017 * buildsym.h (current_subfile): Don't declare.
2018 (get_current_subfile): Declare.
2019 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2021 (start_subfile, free_buildsym_compunit, push_subfile)
2022 (prepare_for_building, start_symtab): Update.
2023 (get_current_subfile): New function.
2025 2018-07-20 Tom Tromey <tom@tromey.com>
2027 * coffread.c (coff_symtab_read): Update.
2028 * xcoffread.c (read_xcoff_symtab): Update.
2029 * dwarf2read.c (new_symbol): Update.
2030 (read_func_scope, read_lexical_block_scope): Update.
2031 * dbxread.c (process_one_symbol): Update.
2032 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2033 (outermost_context_p): Remove macro.
2034 (outermost_context_p, get_current_context_stack)
2035 (get_context_stack_depth): Declare.
2036 (pop_context): Return struct context_stack.
2037 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2039 (context_stack_size): Remove.
2040 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2041 (prepare_for_building, end_symtab_get_static_block)
2042 (augment_type_symtab, push_context): Update.
2043 (pop_context): Return struct context_stack.
2044 (outermost_context_p, get_current_context_stack)
2045 (get_context_stack_depth): New functions.
2046 (buildsym_init): Update.
2048 2018-07-20 Tom Tromey <tom@tromey.com>
2050 * rust-exp.y: Now a pure parser. Update all rules.
2051 (%union): Move earlier.
2052 (current_parser, work_obstack): Remove globals.
2053 (rust_parser, ~rust_parser): Update.
2054 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2055 lex_character, lex_number, lex_string, lex_identifier,
2056 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2057 convert_name, convert_params_to_expression,
2058 convert_ast_to_expression, ast_basic_type, ast_operation,
2059 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2060 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2061 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2062 ast_array_type, ast_slice_type, ast_reference_type,
2063 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2064 (rust_parse): Update.
2065 (rustyyerror, rustyylex): Add parser parameter.
2066 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2067 (rust_lex_stringish_test, rust_lex_test_sequence)
2068 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2069 (rust_lex_test_push_back, rust_lex_tests): Update.
2071 2018-07-19 Pedro Alves <palves@redhat.com>
2073 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2074 gdb::unique_xmalloc_ptr.
2075 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2076 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2077 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2078 copy-initialization.
2079 * guile/scm-pretty-print.c (ppscm_print_children): Use
2080 gdb::unique_xmalloc_ptr instead of cleanups.
2081 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2082 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2083 gdb::unique_xmalloc_ptr.
2084 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2085 Adjust to use gdb::unique_xmalloc_ptr.
2086 * guile/scm-utils.c (extract_arg): Adjust.
2087 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2088 gdb::unique_xmalloc_ptr instead of a cleanup.
2090 2018-07-19 Tom Tromey <tom@tromey.com>
2092 * utils.c (do_value_free_to_mark)
2093 (make_cleanup_value_free_to_mark): Remove.
2094 * utils.h (make_cleanup_value_free_to_mark): Remove.
2096 2018-07-19 Pedro Alves <palves@redhat.com>
2098 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2099 forwarding reference.
2101 2018-07-18 Pedro Alves <palves@redhat.com>
2103 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2104 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2107 2018-07-18 Pedro Alves <palves@redhat.com>
2109 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2111 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2113 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2114 directly instead of a cleanup.
2115 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2116 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2117 (vlscm_binop_gdbthrow): New, factored out from ...
2118 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2119 (vlscm_rich_compare): Use gdbscm_wrap.
2120 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2121 instead of a cleanup.
2122 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2124 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2125 Use xfree directly instead of a cleanup.
2126 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2127 Adjust to use gdbscm_wrap and scoped_value_mark.
2128 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2129 (gdbscm_value_address, gdbscm_value_dereference)
2130 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2132 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2133 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2135 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2136 gdbscm_wrap and scoped_value_mark.
2137 (gdbscm_value_to_string): Use xfree directly instead of a
2138 cleanup. Move 'buffer' unique_ptr to TRY scope.
2139 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2140 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2142 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2143 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2145 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2148 2018-07-18 Tom de Vries <tdevries@suse.de>
2150 * findvar.c (default_read_var_value): Also resolve dynamic type for
2151 LOC_OPTIMIZED_OUT vars.
2153 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2155 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2158 2018-07-17 Tom Tromey <tom@tromey.com>
2160 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2161 (compute_enum_list, pascm_set_param_value_x)
2162 (gdbscm_parameter_value): Update.
2163 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2164 (gdbscm_scm_to_host_string): Update.
2165 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2167 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2168 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2169 * guile/scm-string.c (gdbscm_scm_to_string): Return
2171 (gdbscm_scm_to_host_string): Likewise.
2173 2018-07-17 Tom Tromey <tom@tromey.com>
2175 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2176 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2177 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2178 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2181 2018-07-17 Tom Tromey <tom@tromey.com>
2183 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2184 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2186 * guile/scm-cmd.c (cmdscm_function): Update.
2187 * guile/scm-pretty-print.c
2188 (ppscm_print_exception_unless_memory_error): Update.
2189 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2190 Return unique_xmalloc_ptr.
2192 2018-07-17 Tom Tromey <tom@tromey.com>
2194 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2197 2018-07-17 Jim Wilson <jimw@sifive.com>
2199 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2200 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2201 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2202 unecessary braces after EF_RISCV_RVC test. Delete call to
2203 set_gdbarch_decr_pc_after_break.
2205 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2206 RISCV_LAST_FP_REGNUM + 1.
2207 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2209 2018-07-17 Tom Tromey <tom@tromey.com>
2211 * configure.ac: Remove --disable-gdbcli.
2212 * configure: Rebuild.
2213 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2214 (SUBDIR_CLI_CFLAGS): Remove.
2215 (SFILES): Use SUBDIR_CLI_SRCS.
2216 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2218 2018-07-17 Tom Tromey <tom@tromey.com>
2221 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2223 2018-07-16 Jim Wilson <jimw@sifive.com>
2225 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2227 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2229 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2231 (libunwind_frame_sniffer): Likewise.
2232 (libunwind_frame_prev_register): Likewise.
2233 (libunwind_sigtramp_frame_sniffer): Likewise.
2234 * ia64-tdep.c (ia64_access_reg): Likewise.
2235 (ia64_access_rse_reg): Likewise.
2236 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2237 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2239 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2241 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2243 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2245 * remote-sim.c (gdbsim_target::close,
2246 gdbsim_target::mourn_inferior): Remove unused variables.
2248 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2250 * ia64-tdep.c (ktab_buf): New global.
2251 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2252 (get_kernel_table): Adjust.
2254 2018-07-16 Tom Tromey <tom@tromey.com>
2256 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2257 * dwarf2read.c (using_directives, new_symbol): Use
2258 outermost_context_p.
2259 * dbxread.c (process_one_symbol): Use outermost_context_p.
2260 * coffread.c (coff_symtab_read): Use outermost_context_p.
2262 2018-07-16 Tom Tromey <tom@tromey.com>
2264 * dwarf2read.c (using_directives, read_func_scope)
2265 (read_lexical_block_scope): Update.
2266 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2267 * buildsym.h (local_using_directives, global_using_directives):
2269 (get_local_using_directives, set_local_using_directives)
2270 (get_global_using_directives): Declare.
2271 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2272 m_global_using_directives>: New members.
2273 (finish_block_internal, prepare_for_building)
2274 (reset_symtab_globals, end_symtab_get_static_block)
2275 (push_context): Update.
2276 (get_local_using_directives, set_local_using_directives)
2277 (get_global_using_directives): New functions.
2278 (buildsym_init): Update.
2280 2018-07-16 Tom Tromey <tom@tromey.com>
2282 * xcoffread.c (xcoff_initial_scan): Don't call
2283 free_pending_blocks.
2284 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2285 * buildsym.h (class scoped_free_pendings): Add constructor.
2286 (free_pending_blocks): Don't declare.
2287 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2288 (free_pending_blocks): Now static.
2290 2018-07-16 Tom Tromey <tom@tromey.com>
2292 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2293 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2295 (struct subfile_stack): Remove.
2296 (subfile_stack): Remove.
2297 (push_subfile, pop_subfile, buildsym_init): Update.
2299 2018-07-16 Tom Tromey <tom@tromey.com>
2301 * buildsym.c (push_subfile): Use gdb_assert.
2302 (pop_subfile): Use gdb_assert.
2304 2018-07-16 Tom Tromey <tom@tromey.com>
2306 * buildsym.h (merge_symbol_lists): Remove.
2307 * buildsym.c (merge_symbol_lists): Remove.
2309 2018-07-16 Tom Tromey <tom@tromey.com>
2311 * stabsread.c (scan_file_globals): Update comment.
2312 * stabsread.h (scan_file_globals): Move from buildsym.h.
2313 * buildsym.h (scan_file_globals): Move to stabsread.h.
2315 2018-07-16 Tom Tromey <tom@tromey.com>
2317 * xcoffread.c (xcoff_new_init): Update.
2318 * mipsread.c (mipscoff_new_init): Update.
2319 * mdebugread.c (mdebug_build_psymtabs): Update.
2320 * elfread.c (elf_new_init): Update.
2321 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2322 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2323 * buildsym.h (buildsym_new_init): Don't declare.
2324 * buildsym.c (buildsym_new_init): Remove.
2326 2018-07-16 Tom Tromey <tom@tromey.com>
2328 * stabsread.h (within_function): Move from buildsym.h.
2329 * stabsread.c (start_stabs): Clear within_function.
2330 * coffread.c (coff_start_symtab): Clear within_function.
2331 * buildsym.h (within_function): Move to stabsread.h.
2332 * buildsym.c (prepare_for_building): Update.
2334 2018-07-16 Tom Tromey <tom@tromey.com>
2336 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2337 * dwarf2read.c (dwarf2_start_symtab): Don't set
2338 processing_gcc_compilation.
2339 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2341 2018-07-16 Tom Tromey <tom@tromey.com>
2343 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2344 (next_symbol_text_func): Move from buildsym.h.
2345 * stabsread.c (hashname): Move from buildsym.c.
2346 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2347 (next_symbol_text_func, hashname): Move to stabsread.h.
2348 * buildsym.c: Don't include bcache.h
2349 (hashname): Move to stasbread.c.
2351 2018-07-16 Tom Tromey <tom@tromey.com>
2353 * buildsym.h (context_stack_size): Don't declare.
2354 * buildsym.c (context_stack_size): New global.
2356 2018-07-16 Tom Tromey <tom@tromey.com>
2358 * dbxread.c (processing_acc_compilation): New global.
2359 * buildsym.h (processing_acc_compilation): Don't declare.
2361 2018-07-16 Tom Tromey <tom@tromey.com>
2363 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2364 * dbxread.c (read_ofile_symtab): Update.
2365 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2366 * buildsym.h (last_source_start_addr): Remove.
2367 (set_last_source_start_addr, get_last_source_start_addr):
2369 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2371 (struct buildsym_compunit) <m_last_source_start_addr>: New
2373 (prepare_for_building): Remove start_addr parameter.
2374 (start_symtab, restart_symtab, end_symtab_get_static_block)
2375 (end_symtab_with_blockvector): Update.
2376 (set_last_source_start_addr, get_last_source_start_addr): New
2379 2018-07-16 Tom Tromey <tom@tromey.com>
2381 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2383 (have_line_numbers): Remove.
2384 (record_line, prepare_for_building, end_symtab_get_static_block)
2385 (augment_type_symtab): Update.
2387 2018-07-16 Tom Tromey <tom@tromey.com>
2389 * buildsym.c (~buildsym_compunit): Free the macro table.
2390 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2392 <m_pending_macros>: New member.
2393 (pending_macros): Remove.
2394 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2395 (reset_symtab_globals, end_symtab_get_static_block)
2396 (end_symtab_with_blockvector, augment_type_symtab)
2397 (buildsym_init): Update.
2399 2018-07-16 Tom Tromey <tom@tromey.com>
2401 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2403 (buildsym_compunit::set_last_source_file): New method.
2404 <m_last_source_file>: New member.
2405 (prepare_for_building): Remove "name" parameter.
2406 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2407 (last_source_file): Remove.
2408 (set_last_source_file, get_last_source_file): Update.
2410 2018-07-16 Tom Tromey <tom@tromey.com>
2412 * buildsym.c (prepare_for_building): Add assert.
2414 2018-07-16 Tom Tromey <tom@tromey.com>
2416 * buildsym.c (~buildsym_compunit): Update.
2417 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2418 (start_subfile, patch_subfile_names)
2419 (end_symtab_with_blockvector): Update.
2421 2018-07-16 Tom Tromey <tom@tromey.com>
2423 * buildsym.c (struct buildsym_compunit): Add constructor,
2424 destructor, initializers.
2425 (start_buildsym_compunit): Remove.
2426 (free_buildsym_compunit): Use "delete".
2427 (start_symtab, restart_symtab): Use "new".
2429 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2431 * symfile.c (set_objfile_default_section_offset): Remove struct
2434 2018-07-14 Stafford Horne <shorne@gmail.com>
2436 * (Responsible Maintainers): Add myself as or1k maintainer.
2438 2018-07-13 Tom Tromey <tom@tromey.com>
2440 * symfile.c (set_objfile_default_section_offset): Use extra braces
2443 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2445 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2448 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2450 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2451 unittests/cli-utils-selftests.c
2452 * unittests/cli-utils-selftests.c: New file.
2454 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2456 * NEWS: Mention new commands. Mention change to 'thread apply'.
2458 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2460 * thread.c (thr_try_catch_cmd): New function.
2461 (thread_apply_all_command): Handle qcs flags.
2462 (thread_apply_command): Handle qcs flags.
2463 (taas_command): New function.
2464 (tfaas_command): New function.
2465 (_initialize_thread): Update to setup the new commands 'taas
2466 and 'tfaas'. Change doc string for 'thread apply'.
2468 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2470 * stack.c: (trailing_outermost_frame): New function, mostly
2471 extracted from backtrace_command_1.
2472 (leading_innermost_frame): New function.
2473 (backtrace_command_1): Update to call trailing_outermost_frame.
2474 (frame_apply_command_count): New function.
2475 (frame_apply_level_command): New function.
2476 (frame_apply_all_command): New function.
2477 (frame_apply_command): New function.
2478 (faas_command): New function.
2479 (frame_cmd_list): New variable.
2480 (_initialize_stack): Update to setup the new commands 'frame apply'
2483 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2485 * cli-utils.c (number_or_range_parser::get_number): Only handle
2486 numbers or convenience var as numbers.
2487 (parse_flags): New function.
2488 (parse_flags_qcs): New function.
2489 (number_or_range_parser::finished): Ensure parsing end is detected
2490 before end of string.
2491 * cli-utils.h (parse_flags): New function.
2492 (parse_flags_qcs): New function.
2493 (number_or_range_parser): Remove m_finished bool.
2494 (number_or_range_parser::skip_range): Set m_in_range to false.
2496 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2498 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2501 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2502 Jan Kratochvil <jan.kratochvil@redhat.com>
2503 Paul Fertser <fercerpav@gmail.com>
2504 Tsutomu Seki <sekiriki@gmail.com>
2505 Pedro Alves <palves@redhat.com>
2507 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2508 'unittests/parse-connection-spec-selftests.c'.
2509 (COMMON_SFILES): Add 'common/netstuff.c'.
2510 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2511 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2512 * common/netstuff.c: New file.
2513 * common/netstuff.h: New file.
2514 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2515 (wait_for_connect): Update comment. New parameter
2516 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2517 Use 'sock' directly instead of 'scb->fd'.
2518 (try_connect): New function, with code from 'net_open'.
2519 (net_open): Rewrite main loop to deal with multiple
2520 sockets/addresses. Handle IPv6-style hostnames; implement
2521 support for IPv6 connections.
2522 * unittests/parse-connection-spec-selftests.c: New file.
2524 2018-07-11 Pedro Alves <palves@redhat.com>
2527 * remote.c (remote_target::remote_detach_pid): Call
2528 set_current_process.
2530 2018-07-11 Pedro Alves <palves@redhat.com>
2532 * h8300-tdep.c (h8300_gdbarch_init): Remove
2533 set_gdbarch_ecoff_reg_to_regnum calls.
2535 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2538 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2539 offsets/sizes for static members of a class/struct.
2541 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2543 * target-descriptions.c (tdesc_register_bitsize): Rename.
2544 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2545 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2546 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2548 2018-07-10 Tom Tromey <tom@tromey.com>
2550 * breakpoint.c (moribund_locations): Now static and a
2552 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2553 (build_bpstat_chain, update_global_location_list)
2554 (breakpoint_retire_moribund): Update.
2555 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2558 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2560 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2561 (riscv_register_reggroup_p): Use new function, remove unneeded
2563 (riscv_push_dummy_call): Extend assert to compare against xlen or
2564 flen based on register type.
2566 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2568 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2570 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2572 * remote.c (show_hardware_watchpoint_limit): New function.
2573 (show_hardware_watchpoint_length_limit): New function.
2574 (show_hardware_breakpoint_limit): New function.
2575 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2576 where appropriate, update help text.
2578 2018-07-09 Tom Tromey <tom@tromey.com>
2580 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2581 (CLIBS): Don't mention NAT_CLIBS.
2583 2018-07-09 Tom Tromey <tom@tromey.com>
2585 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2586 (LIBGDB_OBS, clean mostlyclean): Update.
2587 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2589 2018-07-09 Tom Tromey <tom@tromey.com>
2591 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2592 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2593 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2595 2018-07-09 Tom Tromey <tom@tromey.com>
2597 * Makefile.in (ALLDEPFILES): Remove exec.c.
2598 (COMMON_OBS): Remove exec.o.
2599 (COMMON_SFILES): Add exec.c.
2601 2018-07-09 Tom Tromey <tom@tromey.com>
2603 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2605 2018-07-09 Tom Tromey <tom@tromey.com>
2607 * Makefile.in (clean mostlyclean): Remove stamp-version.
2608 (version.c): Depend on stamp-version.
2609 (stamp-version): New rule, from version.c rule.
2611 2018-07-09 Tom Tromey <tom@tromey.com>
2613 * Makefile.in (init.c): Depend on stamp-init.
2614 (stamp-init): New rule, from init.c rule.
2615 (clean mostlyclean): Remove stamp-init.
2617 2018-07-09 Tom Tromey <tom@tromey.com>
2619 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2620 SUBDIR_GCC_COMPILE_SRCS.
2622 2018-07-09 Tom Tromey <tom@tromey.com>
2624 * Makefile.in (init.c): Remove some unused sed rules.
2626 2018-07-09 Tom Tromey <tom@tromey.com>
2628 * Makefile.in (TSOBS): Remove.
2629 (INIT_FILES): Update.
2630 (LIBGDB_OBS): Update.
2631 (COMMON_SFILES): Add inflow.c.
2632 (SFILES): Remove inflow.c.
2634 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2636 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2638 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2640 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2641 get_saveloc_name, is_signal_frame_name, step_name,
2642 init_remote_name, create_addr_space_name,
2643 destroy_addr_space_name, search_unwind_table_name,
2644 find_dyn_list_name): Constify.
2646 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2648 * darwin-nat.c (darwin_pthread_kill): New function.
2649 (darwin_resume_thread): Use darwin_pthread_kill.
2651 2018-07-05 Tom de Vries <tdevries@suse.de>
2653 * macroexp.c (macro_buffer) <operator=>: New member function.
2655 2018-07-04 Tom Tromey <tom@tromey.com>
2657 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2659 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2661 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2662 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2663 * maint.c: Likewise.
2666 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2668 * NEWS: Create a new section for the next release branch.
2669 Rename the section of the current branch, now that it has
2672 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2674 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2675 * version.in: Bump version to 8.2.50.DATE-git.
2677 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2678 Pedro Alves <palves@redhat.com>
2680 * linux-nat.c (linux_init_ptrace): Rename to ...
2681 (linux_init_ptrace_procfs): ... this. Call
2682 linux_proc_init_warnings.
2683 (linux_nat_target::post_attach)
2684 (linux_nat_target::post_startup_inferior): Adjust.
2685 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2686 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2688 2018-07-04 Tom de Vries <tdevries@suse.de>
2690 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2692 (read_comp_unit_head): ... here.
2694 2018-07-03 Tom Tromey <tom@tromey.com>
2696 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2697 (stop_tracing, tstatus_command)
2698 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2699 (print_one_static_tracepoint_marker): Update.
2700 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2702 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2704 (all_tracepoints, static_tracepoints_here): Return std::vector.
2706 2018-07-03 Tom Tromey <tom@tromey.com>
2708 * common/ptid.c (ptid_equal): Remove.
2709 * common/ptid.h (ptid_equal): Don't declare.
2710 * ada-tasks.c: Update.
2711 * breakpoint.c: Update.
2712 * common/agent.c: Update.
2713 * corelow.c: Update.
2714 * darwin-nat-info.c: Update.
2715 * darwin-nat.c: Update.
2717 * dtrace-probe.c: Update.
2718 * dummy-frame.c: Update.
2719 * fbsd-nat.c: Update.
2721 * gdbthread.h: Update.
2722 * gnu-nat.c: Update.
2723 * go32-nat.c: Update.
2724 * inf-loop.c: Update.
2725 * inf-ptrace.c: Update.
2726 * infcall.c: Update.
2730 * linux-fork.c: Update.
2731 * linux-nat.c: Update.
2732 * linux-thread-db.c: Update.
2733 * mi/mi-cmd-var.c: Update.
2734 * mi/mi-interp.c: Update.
2735 * mi/mi-main.c: Update.
2736 * nto-procfs.c: Update.
2737 * ppc-linux-tdep.c: Update.
2739 * python/py-inferior.c: Update.
2740 * python/py-record-btrace.c: Update.
2741 * python/py-record.c: Update.
2742 * ravenscar-thread.c: Update.
2743 * regcache.c: Update.
2744 * remote-sim.c: Update.
2746 * sol-thread.c: Update.
2749 * tui/tui-stack.c: Update.
2751 * windows-nat.c: Update.
2752 * windows-tdep.c: Update.
2754 2018-07-03 Tom Tromey <tom@tromey.com>
2756 * common/ptid.c (ptid_match): Remove.
2757 * common/ptid.h (ptid_match): Don't declare.
2758 * fbsd-nat.c: Update.
2761 * linux-nat.c: Update.
2762 * record-btrace.c: Update.
2763 * regcache.c: Update.
2766 2018-07-03 Tom Tromey <tom@tromey.com>
2768 * common/ptid.c (ptid_tid_p): Remove.
2769 * common/ptid.h (ptid_tid_p): Don't declare.
2770 * sol-thread.c: Update.
2772 2018-07-03 Tom Tromey <tom@tromey.com>
2774 * common/ptid.c (ptid_lwp_p): Remove.
2775 * common/ptid.h (ptid_lwp_p): Don't declare.
2776 * fbsd-nat.c: Update.
2777 * linux-nat.c: Update.
2778 * nat/linux-procfs.c: Update.
2779 * nat/x86-linux-dregs.c: Update.
2780 * sol-thread.c: Update.
2782 2018-07-03 Tom Tromey <tom@tromey.com>
2784 * common/ptid.c (ptid_is_pid): Remove.
2785 * common/ptid.h (ptid_is_pid): Don't declare.
2787 * linux-nat.c: Update.
2788 * mi/mi-interp.c: Update.
2792 2018-07-03 Tom Tromey <tom@tromey.com>
2794 * common/ptid.c (ptid_get_tid): Remove.
2795 * common/ptid.h (ptid_get_tid): Don't declare.
2796 * ada-tasks.c: Update.
2797 * aix-thread.c: Update.
2798 * bsd-uthread.c: Update.
2799 * darwin-nat.c: Update.
2800 * fbsd-nat.c: Update.
2801 * i386-darwin-nat.c: Update.
2803 * linux-tdep.c: Update.
2804 * nto-procfs.c: Update.
2805 * ppc-ravenscar-thread.c: Update.
2806 * python/py-infthread.c: Update.
2807 * ravenscar-thread.c: Update.
2808 * sol-thread.c: Update.
2809 * sparc-ravenscar-thread.c: Update.
2810 * windows-nat.c: Update.
2812 2018-07-03 Tom Tromey <tom@tromey.com>
2814 * common/ptid.c (ptid_get_lwp): Remove.
2815 * common/ptid.h (ptid_get_lwp): Don't declare.
2816 * aarch64-linux-nat.c: Update.
2817 * ada-tasks.c: Update.
2818 * aix-thread.c: Update.
2819 * amd64-linux-nat.c: Update.
2820 * arm-linux-nat.c: Update.
2821 * corelow.c: Update.
2822 * fbsd-nat.c: Update.
2823 * fbsd-tdep.c: Update.
2824 * gnu-nat.c: Update.
2825 * i386-cygwin-tdep.c: Update.
2826 * i386-gnu-nat.c: Update.
2827 * i386-linux-nat.c: Update.
2828 * ia64-linux-nat.c: Update.
2829 * inf-ptrace.c: Update.
2831 * linux-fork.c: Update.
2832 * linux-nat.c: Update.
2833 * linux-tdep.c: Update.
2834 * linux-thread-db.c: Update.
2835 * mips-linux-nat.c: Update.
2836 * nat/aarch64-linux-hw-point.c: Update.
2837 * nat/aarch64-linux.c: Update.
2838 * nat/linux-btrace.c: Update.
2839 * nat/linux-osdata.c: Update.
2840 * nat/linux-procfs.c: Update.
2841 * nat/x86-linux-dregs.c: Update.
2842 * obsd-nat.c: Update.
2843 * ppc-fbsd-nat.c: Update.
2844 * ppc-linux-nat.c: Update.
2846 * python/py-infthread.c: Update.
2847 * ravenscar-thread.c: Update.
2849 * s390-linux-nat.c: Update.
2850 * sol-thread.c: Update.
2851 * sol2-tdep.c: Update.
2852 * spu-linux-nat.c: Update.
2853 * x86-linux-nat.c: Update.
2854 * xtensa-linux-nat.c: Update.
2856 2018-07-03 Tom Tromey <tom@tromey.com>
2858 * common/ptid.c (ptid_get_pid): Remove.
2859 * common/ptid.h (ptid_get_pid): Don't declare.
2860 * aarch64-linux-nat.c: Update.
2861 * ada-lang.c: Update.
2862 * aix-thread.c: Update.
2863 * alpha-bsd-nat.c: Update.
2864 * amd64-fbsd-nat.c: Update.
2865 * amd64-linux-nat.c: Update.
2866 * arm-linux-nat.c: Update.
2867 * arm-nbsd-nat.c: Update.
2869 * break-catch-syscall.c: Update.
2870 * breakpoint.c: Update.
2871 * bsd-uthread.c: Update.
2872 * corelow.c: Update.
2874 * darwin-nat.c: Update.
2875 * fbsd-nat.c: Update.
2876 * fbsd-tdep.c: Update.
2878 * gnu-nat.c: Update.
2879 * hppa-nbsd-nat.c: Update.
2880 * hppa-obsd-nat.c: Update.
2881 * i386-fbsd-nat.c: Update.
2882 * ia64-linux-nat.c: Update.
2883 * inf-ptrace.c: Update.
2885 * inferior.c: Update.
2886 * inferior.h: Update.
2889 * linux-fork.c: Update.
2890 * linux-nat.c: Update.
2891 * linux-tdep.c: Update.
2892 * linux-thread-db.c: Update.
2893 * m68k-bsd-nat.c: Update.
2894 * mi/mi-interp.c: Update.
2895 * mi/mi-main.c: Update.
2896 * mips-linux-nat.c: Update.
2897 * mips-nbsd-nat.c: Update.
2898 * mips64-obsd-nat.c: Update.
2899 * nat/aarch64-linux-hw-point.c: Update.
2900 * nat/aarch64-linux.c: Update.
2901 * nat/linux-btrace.c: Update.
2902 * nat/linux-osdata.c: Update.
2903 * nat/linux-procfs.c: Update.
2904 * nat/x86-linux-dregs.c: Update.
2905 * nto-procfs.c: Update.
2906 * obsd-nat.c: Update.
2907 * ppc-linux-nat.c: Update.
2908 * ppc-nbsd-nat.c: Update.
2909 * ppc-obsd-nat.c: Update.
2910 * proc-service.c: Update.
2912 * python/py-inferior.c: Update.
2913 * python/py-infthread.c: Update.
2914 * ravenscar-thread.c: Update.
2916 * remote-sim.c: Update.
2918 * rs6000-nat.c: Update.
2919 * s390-linux-nat.c: Update.
2920 * sh-nbsd-nat.c: Update.
2921 * sol-thread.c: Update.
2922 * sparc-nat.c: Update.
2923 * sparc64-tdep.c: Update.
2924 * spu-linux-nat.c: Update.
2925 * spu-tdep.c: Update.
2926 * target-debug.h: Update.
2929 * tid-parse.c: Update.
2930 * tracefile-tfile.c: Update.
2931 * vax-bsd-nat.c: Update.
2932 * windows-nat.c: Update.
2933 * x86-linux-nat.c: Update.
2934 * x86-nat.c: Update.
2936 2018-07-03 Tom Tromey <tom@tromey.com>
2938 * common/ptid.c (pid_to_ptid): Remove.
2939 * common/ptid.h (pid_to_ptid): Don't declare.
2940 * aix-thread.c: Update.
2941 * arm-linux-nat.c: Update.
2942 * common/ptid.c: Update.
2943 * common/ptid.h: Update.
2944 * corelow.c: Update.
2946 * darwin-nat.c: Update.
2947 * fbsd-nat.c: Update.
2948 * fork-child.c: Update.
2949 * gnu-nat.c: Update.
2950 * go32-nat.c: Update.
2951 * inf-ptrace.c: Update.
2953 * inferior.c: Update.
2955 * linux-fork.c: Update.
2956 * linux-nat.c: Update.
2957 * nat/aarch64-linux-hw-point.c: Update.
2958 * nat/fork-inferior.c: Update.
2959 * nat/x86-linux-dregs.c: Update.
2960 * nto-procfs.c: Update.
2961 * obsd-nat.c: Update.
2963 * progspace.c: Update.
2965 * rs6000-nat.c: Update.
2966 * s390-linux-nat.c: Update.
2967 * sol-thread.c: Update.
2968 * spu-linux-nat.c: Update.
2971 * tracefile-tfile.c: Update.
2972 * windows-nat.c: Update.
2974 2018-07-03 Tom Tromey <tom@tromey.com>
2976 * common/ptid.h (ptid_build): Don't declare.
2977 * common/ptid.c (ptid_build): Remove.
2978 * aix-thread.c: Update.
2979 * bsd-kvm.c: Update.
2980 * bsd-uthread.c: Update.
2981 * common/agent.c: Update.
2982 * common/ptid.c: Update.
2983 * common/ptid.h: Update.
2984 * corelow.c: Update.
2985 * darwin-nat.c: Update.
2986 * fbsd-nat.c: Update.
2987 * gnu-nat.c: Update.
2988 * linux-fork.c: Update.
2989 * linux-nat.c: Update.
2990 * linux-thread-db.c: Update.
2991 * nat/linux-osdata.c: Update.
2992 * nat/linux-procfs.c: Update.
2993 * nto-procfs.c: Update.
2994 * obsd-nat.c: Update.
2995 * proc-service.c: Update.
2997 * ravenscar-thread.c: Update.
2998 * remote-sim.c: Update.
3000 * sol-thread.c: Update.
3002 * windows-nat.c: Update.
3004 2018-07-03 Tom Tromey <tom@tromey.com>
3006 * infrun.c (follow_exec): Use exit_inferior_silent.
3007 * inferior.c (exit_inferior_num_silent): Remove.
3008 * inferior.h (exit_inferior_num_silent): Don't declare.
3010 2018-07-03 Tom Tromey <tom@tromey.com>
3013 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3014 inferior_ptid on error.
3016 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3017 Simon Marchi <simon.marchi@polymtl.ca>
3020 * disasm.h (gdb_disassembler): Add
3021 `m_disassembler_options_holder'. member
3022 * disasm.c (get_all_disassembler_options): New function.
3023 (gdb_disassembler::gdb_disassembler): Use it.
3024 (gdb_buffered_insn_length_init_dis): Likewise.
3025 (gdb_buffered_insn_length): Adjust accordingly.
3026 (set_disassembler_options): Handle options with arguments.
3027 (show_disassembler_options_sfunc): Likewise. Add a leading new
3028 line if showing options with descriptions.
3029 (disassembler_options_completer): Adapt to using the
3030 `disasm_options_and_args_t' structure.
3031 * mips-tdep.c (mips_disassembler_options): New variable.
3032 (mips_disassembler_options_o32): Likewise.
3033 (mips_disassembler_options_n32): Likewise.
3034 (mips_disassembler_options_n64): Likewise.
3035 (gdb_print_insn_mips): Don't set `disassembler_options'.
3036 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3038 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3039 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3040 `gdbarch_disassembler_options_implicit' and
3041 `gdbarch_valid_disassembler_options'.
3042 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3043 `disasm_options_and_args_t' structure.
3044 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3046 (valid_disassembler_options): Switch from `disasm_options_t' to
3047 the `disasm_options_and_args_t' structure.
3048 * NEWS: Document `set disassembler-options' support for the MIPS
3050 * gdbarch.h: Regenerate.
3051 * gdbarch.c: Regenerate.
3053 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3055 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3057 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3059 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3060 parameter in call to amd64_target_description.
3061 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3062 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3063 (amd64fbsd_init_abi): Likewise.
3064 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3065 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3066 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3067 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3069 2018-06-29 Pedro Alves <palves@redhat.com>
3071 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3072 "segments" parameter.
3073 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3074 (_initialize_amd64_tdep): Update call to
3075 amd64_create_target_description.
3076 (amd64_target_description): Add "segments" parameter. Adjust
3077 the implementation to use it.
3078 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3079 call to amd64_create_target_description.
3080 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3081 * gdb/arch/amd64.h (amd64_create_target_description): Add
3082 "segments" register.
3083 * gdb/arch/amd64.c (amd64_create_target_description): Add
3084 "segments" parameter. Call create_feature_i386_64bit_segments
3085 only if SEGMENTS is true.
3086 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3087 call to amd64_create_target_description.
3089 2018-06-29 Pedro Alves <palves@redhat.com>
3091 * thread.c (thread_target_id_str): New, factored out from ...
3092 (print_thread_info_1): ... here. Use it to compute the max
3093 "Target Id" column width.
3095 2018-06-29 Pedro Alves <palves@redhat.com>
3097 * remote.c (remote_target::extra_thread_info): Delete
3098 'display_buf' and 'n' locals. from the cache, regardless of
3099 packet mechanims is in use. Use cache for qThreadExtra and qP
3102 2018-06-29 Pedro Alves <palves@redhat.com>
3104 * blockframe.c (find_pc_sect_containing_function): New function.
3105 * breakpoint.c (print_breakpoint_location): Don't call
3106 find_pc_sect_function.
3107 * linespec.c (create_sals_line_offset): Record the location's
3109 * linespec.c (convert_address_location_to_sals): Fill in sal's
3110 symbol with find_pc_sect_containing_function.
3111 * symtab.c (find_function_start_sal): Rename to ...
3112 (find_function_start_sal_1): ... this.
3113 (find_function_start_sal): Reimplement as wrapper around
3114 find_function_start_sal_1, and use
3115 find_pc_sect_containing_function to fill in the sal's symbol.
3116 (find_function_start_sal(symbol*, bool)): Adjust.
3117 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3119 (find_pc_sect_containing_function): Declare.
3121 2018-06-29 Pedro Alves <palves@redhat.com>
3123 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3124 true if the the location has no symbol.
3126 2018-06-28 Tom Tromey <tom@tromey.com>
3128 * NEWS: Mention --enable-codesign.
3129 * silent-rules.mk (ECHO_SIGN): New variable.
3130 * configure.ac: Add --enable-codesign.
3131 * configure: Rebuild.
3132 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3133 (gdb$(EXEEXT)): Optionally invoke codesign.
3135 2018-06-28 Pedro Alves <palves@redhat.com>
3137 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3139 (switch_to_thread_no_regs): Adjust comment.
3140 * infcmd.c (stop_pc): Delete.
3141 (post_create_inferior, info_program_command): Replace references
3142 to stop_pc with references to thread_info->suspend.stop_pc.
3143 * inferior.h (stop_pc): Delete declaration.
3144 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3145 (handle_inferior_event_1, handle_signal_stop)
3146 (process_event_stop_test, keep_going_stepped_thread)
3147 (handle_step_into_function, handle_step_into_function_backward)
3148 (print_stop_location): Replace references to stop_pc with
3149 references to thread_info->suspend.stop_pc.
3150 (struct infcall_suspend_state) <stop_pc>: Delete field.
3151 (save_infcall_suspend_state, restore_infcall_suspend_state):
3152 Remove references to inf_stat->stop_pc.
3153 * linux-fork.c (fork_load_infrun_state): Likewise.
3154 * record-btrace.c (record_btrace_set_replay): Likewise.
3155 * record-full.c (record_full_goto_entry): Likewise.
3156 * remote.c (print_one_stopped_thread): Likewise.
3157 * target.c (target_resume): Extend comment.
3158 * thread.c (set_executing_thread): New.
3159 (set_executing): Use it.
3160 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3161 Remove references to stop_pc.
3163 2018-06-28 Pedro Alves <palves@redhat.com>
3165 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3166 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3168 2018-06-28 Tom Tromey <tom@tromey.com>
3170 * coffread.c (coff_symfile_finish): Update.
3171 * xcoffread.c (xcoff_symfile_finish): Update.
3172 * elfread.c (elf_symfile_finish): Update.
3173 * symfile.h (dwarf2_free_objfile): Don't declare.
3174 * dwarf2read.c (_initialize_dwarf2_read): Use
3175 register_objfile_data_with_cleanup.
3176 (dwarf2_free_objfile): Now static. Change signature.
3178 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3180 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3181 option "-o" to add-symbol-file-load to add an offset to each
3182 section's load address.
3183 * symfile.c (set_objfile_default_section_offset): New function.
3185 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3187 * symfile.c (add_symbol_file_command): Make sure that sections
3188 with the same name are sorted in the same order.
3190 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3192 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3193 require the second argument. If omitted, load sections at the
3194 addresses specified in the file.
3196 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3198 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3199 (_initialize_symfile): Add option "-o" to symbol-file to add an
3200 offset to each section of the symbol file.
3202 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3204 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3206 2018-06-27 Tom Tromey <tom@tromey.com>
3208 * stack.c (_initialize_stack): Update "func" help text.
3210 2018-06-27 Tom Tromey <tom@tromey.com>
3212 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3214 (unwind_infopy_str, pyuw_create_unwind_info)
3215 (unwind_infopy_add_saved_register, pyuw_sniffer)
3216 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3218 (struct saved_reg): Add constructor.
3219 <value>: Now a gdbpy_ref<>.
3221 2018-06-27 Tom Tromey <tom@tromey.com>
3223 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3225 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3227 * gdb-gdb.py.in: Format using autopep8.
3229 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3231 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3232 (type_lookup_function): Recognize CORE_ADDR values.
3234 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3236 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3239 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3241 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3244 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3246 * gdb-gdb.py: Move to...
3247 * gdb-gdb.py.in: ... here.
3248 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3249 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3251 (distclean): Remove gdb-gdb.py when cleaning.
3252 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3253 * configure: Re-generate.
3255 2018-06-27 Pedro Alves <palves@redhat.com>
3257 * proc-service.c (get_ps_regcache): New.
3258 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3259 (ps_lsetfpregs): Use it.
3261 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3264 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3265 (dwarf_decode_lines_1): Adjust.
3267 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3269 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3271 <info_proc>: Likewise.
3273 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3275 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3276 to windows_fetch_one_register, and only handle the case of
3277 fetching one register. Move the code that reloads the context
3278 and iterates over all registers if R is negative to...
3279 (windows_nat_target::fetch_registers): ... here.
3280 (do_windows_store_inferior_registers): Rename to
3281 windows_store_one_register, and only handle the case of storing
3282 one register. Move the code that handles the case where r is
3284 (windows_nat_target::store_registers) ... here.
3286 2018-06-26 Tom Tromey <tom@tromey.com>
3289 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3290 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3292 (rust_internal_print_type): Add podata parameter.
3293 (rust_print_type): Update.
3295 2018-06-26 Tom Tromey <tom@tromey.com>
3297 * typeprint.h (struct print_offset_data) <update, finish,
3298 maybe_print_hole>: New methods.
3299 <indentation>: New constant.
3300 * typeprint.c (print_offset_data::indentation): Define.
3301 (print_offset_data::maybe_print_hole, print_offset_data::update)
3302 (print_offset_data::finish): Move from c-typeprint.c and rename.
3303 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3304 (print_spaces_filtered_with_print_options): Update.
3305 (c_print_type_union_field_offset, maybe_print_hole)
3306 (c_print_type_struct_field_offset): Move to typeprint.c and
3308 (c_type_print_base_struct_union): Update.
3310 2018-06-25 Pedro Alves <palves@redhat.com>
3312 * gdbthread.h (thread_info_ref, delete_thread)
3313 (delete_thread_silent, first_thread_of_inferior)
3314 (any_thread_of_inferior, switch_to_thread)
3315 (enable_thread_stack_temporaries)
3316 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3317 (get_last_thread_stack_temporary)
3318 (value_in_thread_stack_temporaries, can_access_registers_thread):
3319 Spell out "struct thread_info" instead of just "thread_info".
3320 * inferior.h (notice_new_inferior): Likewise.
3322 2018-06-25 Pedro Alves <palves@redhat.com>
3324 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3325 pass thread_info pointer to delete_thread.
3326 (windows_nat_target::detach): Pass inferior pointer to
3328 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3330 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3331 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3332 and pass a thread_info pointer to delete_thread.
3333 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3334 pass thread_info pointer to delete_thread.
3335 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3336 delete_thread_silent call.
3337 * procfs.c (procfs_target::detach): Pass inferior pointer to
3339 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3340 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3341 delete_thread_silent call.
3342 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3343 pass thread_info pointer to delete_thread.
3344 (windows_nat_target::detach): Pass inferior pointer to
3347 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3349 * regcache.c (readable_regcache::read_part): Fix asserts.
3350 (reg_buffer::raw_collect_part): New function.
3351 (regcache::write_part): Fix asserts.
3352 (reg_buffer::raw_supply_part): New function.
3353 (regcache::transfer_regset_register): New helper function.
3354 (regcache::transfer_regset): Call new functions.
3355 (regcache_supply_regset): Use gdb_byte*.
3356 (regcache::supply_regset): Likewise.
3357 (regcache_collect_regset): Likewise.
3358 (regcache::collect_regset): Likewise.
3359 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3360 (reg_buffer::raw_supply_part): Likewise.
3361 (regcache::transfer_regset_register): Likewise.
3362 (regcache::transfer_regset): Use gdb_byte*.
3364 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3366 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3368 2018-06-21 Pedro Alves <palves@redhat.com>
3370 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3371 instead of a ptid_t. All callers adjusted.
3372 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3374 (print_ada_task_info, display_current_task_id, task_command_1):
3376 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3378 (breakpoint_kind): Adjust.
3379 (remove_breakpoints_pid): Rename to ...
3380 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3381 pointer. All callers adjusted.
3382 (bpstat_clear_actions): Use inferior_thread.
3383 (get_bpstat_thread): New.
3384 (bpstat_do_actions): Use it.
3385 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3386 to take a thread_info pointer. All callers adjusted.
3387 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3388 (breakpoint_re_set_thread): Use inferior_thread.
3389 * breakpoint.h (struct inferior): Forward declare.
3390 (bpstat_stop_status): Update.
3391 (remove_breakpoints_pid): Delete.
3392 (remove_breakpoints_inf): New.
3393 * bsd-uthread.c (bsd_uthread_target::wait)
3394 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3395 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3396 (maint_btrace_packet_history_cmd)
3397 (maint_btrace_clear_packet_history_cmd): Adjust.
3398 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3400 * cli/cli-interp.c: Include "inferior.h".
3401 * common/refcounted-object.h (struct
3402 refcounted_object_ref_policy): New.
3403 * compile/compile-object-load.c: Include gdbthread.h.
3404 (store_regs): Use inferior_thread.
3405 * corelow.c (core_target::close): Use current_inferior.
3406 (core_target_open): Adjust to use first_thread_of_inferior and use
3407 the current inferior.
3408 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3409 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3410 <thread>: ... this new field. All references adjusted.
3411 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3412 Take a thread_info pointer instead of a ptid_t.
3413 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3414 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3415 thread_info pointer instead of a ptid_t.
3416 * elfread.c: Include "inferior.h".
3417 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3418 Use inferior_thread.
3419 * eval.c (evaluate_subexp): Likewise.
3420 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3422 * gdb_proc_service.h (struct thread_info): Forward declare.
3423 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3424 <thread>: ... this new field. All references adjusted.
3425 * gdbarch.h, gdbarch.c: Regenerate.
3426 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3427 'thread' parameter. All implementations and callers adjusted.
3428 * gdbthread.h (thread_info) <set_running>: New method.
3429 (delete_thread, delete_thread_silent): Take a thread_info pointer
3431 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3432 (first_thread_of_process): Delete, replaced by ...
3433 (first_thread_of_inferior): ... this new function. All callers
3435 (any_live_thread_of_process): Delete, replaced by ...
3436 (any_live_thread_of_inferior): ... this new function. All callers
3438 (switch_to_thread, switch_to_no_thread): Declare.
3439 (is_executing): Delete.
3440 (enable_thread_stack_temporaries): Update comment.
3441 <enable_thread_stack_temporaries>: Take a thread_info pointer
3442 instead of a ptid_t. Incref the thread.
3443 <~enable_thread_stack_temporaries>: Decref the thread.
3446 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3447 (get_last_thread_stack_temporary)
3448 (value_in_thread_stack_temporaries, can_access_registers_thread):
3449 Take a thread_info pointer instead of a ptid_t. All callers
3451 * infcall.c (get_call_return_value): Use inferior_thread.
3452 (run_inferior_call): Work with thread pointers instead of ptid_t.
3453 (call_function_by_hand_dummy): Work with thread pointers instead
3454 of ptid_t. Use thread_info_ref.
3455 * infcmd.c (proceed_thread_callback): Access thread's state
3457 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3458 access thread's state directly.
3459 (continue_command): Use inferior_thread.
3460 (info_program_command): Use find_thread_ptid and access thread
3462 (proceed_after_attach_callback): Use thread state directly.
3463 (notice_new_inferior): Take a thread_info pointer instead of a
3464 ptid_t. All callers adjusted.
3465 (exit_inferior): Take an inferior pointer instead of a pid. All
3467 (exit_inferior_silent): New.
3468 (detach_inferior): Delete.
3469 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3470 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3471 (detach_inferior_command, kill_inferior_command): Use
3472 find_inferior_id instead of valid_gdb_inferior_id and
3473 gdb_inferior_id_to_pid.
3474 (inferior_command): Use inferior and thread pointers.
3475 * inferior.h (struct thread_info): Forward declare.
3476 (notice_new_inferior): Take a thread_info pointer instead of a
3477 ptid_t. All callers adjusted.
3478 (detach_inferior): Delete declaration.
3479 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3480 instead of a pid. All callers adjusted.
3481 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3482 (valid_gdb_inferior_id): Delete.
3483 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3484 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3485 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3487 <inf>: ... this new field.
3488 <step_ptid>: Delete, replaced by ...
3489 <step_thread>: ... this new field.
3490 (get_displaced_stepping_state): Take an inferior pointer instead
3491 of a pid. All callers adjusted.
3492 (displaced_step_in_progress_any_inferior): Adjust.
3493 (displaced_step_in_progress_thread): Take a thread pointer instead
3494 of a ptid_t. All callers adjusted.
3495 (displaced_step_in_progress, add_displaced_stepping_state): Take
3496 an inferior pointer instead of a pid. All callers adjusted.
3497 (get_displaced_step_closure_by_addr): Adjust.
3498 (remove_displaced_stepping_state): Take an inferior pointer
3499 instead of a pid. All callers adjusted.
3500 (displaced_step_prepare_throw, displaced_step_prepare)
3501 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3502 All callers adjusted.
3503 (start_step_over): Adjust.
3504 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3505 displaced step queue.
3506 (do_target_resume): Adjust.
3507 (fetch_inferior_event): Use inferior_thread.
3508 (context_switch, get_inferior_stop_soon): Take an
3509 execution_control_state pointer instead of a ptid_t. All callers
3511 (switch_to_thread_cleanup): Delete.
3512 (stop_all_threads): Use scoped_restore_current_thread.
3513 * inline-frame.c: Include "gdbthread.h".
3514 (inline_state) <inline_state>: Take a thread pointer instead of a
3515 ptid_t. All callers adjusted.
3516 <ptid>: Delete, replaced by ...
3517 <thread>: ... this new field.
3518 (find_inline_frame_state): Take a thread pointer instead of a
3519 ptid_t. All callers adjusted.
3520 (skip_inline_frames, step_into_inline_frame)
3521 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3522 pointer instead of a ptid_t. All callers adjusted.
3523 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3524 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3525 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3527 * linux-nat.c (get_detach_signal): Likewise.
3528 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3529 (thread_db_notice_clone): Adjust.
3530 (thread_db_find_new_threads_silently)
3531 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3532 a thread pointer instead of a ptid_t. All callers adjusted.
3533 * mi/mi-cmd-var.c: Include "inferior.h".
3534 (mi_cmd_var_update_iter): Update to use thread pointers.
3535 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3537 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3539 (mi_output_running): ... this new function.
3540 (mi_on_resume_1): Adjust to use it.
3541 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3542 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3544 (interrupt_thread_callback): : Adjust to use thread and inferior
3546 * proc-service.c: Include "gdbthread.h".
3547 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3548 * progspace-and-thread.c: Include "inferior.h".
3549 * progspace.c: Include "inferior.h".
3550 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3551 hold a reference to an inferior_object.
3552 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3554 * python/py-inferior.c (struct inferior_object): Give the type a
3555 tag name instead of a typedef.
3556 (python_on_normal_stop): No need to check if the current thread is
3558 (inferior_to_inferior_object): Change return type to
3559 inferior_object. All callers adjusted.
3560 (find_thread_object): Delete, bits factored out to ...
3561 (thread_to_thread_object): ... this new function.
3562 * python/py-infthread.c (create_thread_object): Use
3563 inferior_to_inferior_object.
3564 (thpy_is_stopped): Use thread pointer directly.
3565 (gdbpy_selected_thread): Use inferior_thread.
3566 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3567 field, replaced with ...
3568 <thread>: ... this new field. All users adjusted.
3569 (btpy_insn_or_gap_new): Drop const.
3570 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3572 * python/py-record.c: Include "gdbthread.h".
3573 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3574 a ptid_t. All callers adjusted.
3575 (gdbpy_current_recording): Use inferior_thread.
3576 * python/py-record.h (recpy_record_object) <ptid>: Delete
3577 field, replaced with ...
3578 <thread>: ... this new field. All users adjusted.
3579 (recpy_element_object) <ptid>: Delete
3580 field, replaced with ...
3581 <thread>: ... this new field. All users adjusted.
3582 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3583 a ptid_t. All callers adjusted.
3584 * python/py-threadevent.c: Include "gdbthread.h".
3585 (get_event_thread): Use thread_to_thread_object.
3586 * python/python-internal.h (struct inferior_object): Forward
3588 (find_thread_object, find_inferior_object): Delete declarations.
3589 (thread_to_thread_object, inferior_to_inferior_object): New
3591 * record-btrace.c: Include "inferior.h".
3592 (require_btrace_thread): Use inferior_thread.
3593 (record_btrace_frame_sniffer)
3594 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3595 (get_thread_current_frame): Use scoped_restore_current_thread and
3597 (get_thread_current_frame): Use thread pointer directly.
3598 (record_btrace_replay_at_breakpoint): Use thread's inferior
3600 * record-full.c: Include "inferior.h".
3601 * regcache.c: Include "gdbthread.h".
3602 (get_thread_arch_regcache): Use the inferior's address space
3604 (get_thread_regcache, registers_changed_thread): New.
3605 * regcache.h (get_thread_regcache(thread_info *thread)): New
3607 (registers_changed_thread): New.
3608 (remote_target) <remote_detach_1>: Swap order of parameters.
3609 (remote_add_thread): <remote_add_thread>: Return the new thread.
3610 (get_remote_thread_info(ptid_t)): New overload.
3611 (remote_target::remote_notice_new_inferior): Use thread pointers
3613 (remote_target::process_initial_stop_replies): Use
3614 thread_info::set_running.
3615 (remote_target::remote_detach_1, remote_target::detach)
3616 (extended_remote_target::detach): Adjust.
3617 * stack.c (frame_show_address): Use inferior_thread.
3618 * target-debug.h (target_debug_print_thread_info_pp): New.
3619 * target-delegates.c: Regenerate.
3620 * target.c (default_thread_address_space): Delete.
3621 (memory_xfer_partial_1): Use current_inferior.
3622 (target_detach): Use current_inferior.
3623 (target_thread_address_space): Delete.
3624 (generic_mourn_inferior): Use current_inferior.
3625 * target.h (struct target_ops) <thread_address_space>: Delete.
3626 (target_thread_address_space): Delete.
3627 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3629 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3630 thread pointer instead of a ptid_t. Adjust all callers.
3631 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3632 (first_thread_of_process): Delete, replaced by ...
3633 (first_thread_of_inferior): ... this new function. All callers
3635 (any_thread_of_process): Rename to ...
3636 (any_thread_of_inferior): ... this, and take an inferior pointer.
3637 (any_live_thread_of_process): Rename to ...
3638 (any_live_thread_of_inferior): ... this, and take an inferior
3640 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3641 (value_in_thread_stack_temporaries)
3642 (get_last_thread_stack_temporary): Take a thread pointer instead
3643 of a ptid_t. Adjust all callers.
3644 (thread_info::set_running): New.
3645 (validate_registers_access): Use inferior_thread.
3646 (can_access_registers_ptid): Rename to ...
3647 (can_access_registers_thread): ... this, and take a thread
3649 (print_thread_info_1): Adjust to compare thread pointers instead
3651 (switch_to_no_thread, switch_to_thread): Make extern.
3652 (scoped_restore_current_thread::~scoped_restore_current_thread):
3653 Use m_thread pointer directly.
3654 (scoped_restore_current_thread::scoped_restore_current_thread):
3655 Use inferior_thread.
3656 (thread_command): Use thread pointer directly.
3657 (thread_num_make_value_helper): Use inferior_thread.
3658 * top.c (execute_command): Use inferior_thread.
3659 * tui/tui-interp.c: Include "inferior.h".
3660 * varobj.c (varobj_create): Use inferior_thread.
3661 (value_of_root_1): Use find_thread_global_id instead of
3662 global_thread_id_to_ptid.
3664 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3666 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3668 (regcache::write_part): Likewise.
3669 (readable_regcache::cooked_read_part): Update comment.
3670 (readable_regcache::cooked_write_part): Likewise.
3671 * regcache.h: (readable_regcache::read_part): Likewise.
3672 (regcache::write_part): Likewise.
3674 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3675 Dirk Schubert <dirk.schubert@arm.com>
3677 * aarch64-linux-nat.c (post_attach): New.
3678 (aarch64_linux_nat_target::post_attach): Override post_attach to
3679 record the number of hardware debug registers.
3681 2018-06-20 Tom Tromey <tom@tromey.com>
3683 * python/py-param.c (add_setshow_generic): Make parameters const.
3684 (parmpy_init): Update.
3686 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3688 * regcache.h (regcache_cooked_read_ftype): Rename to...
3689 (register_read_ftype): ...this, change type to function_view.
3690 (class reg_buffer) <save>: Remove src parameter.
3691 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3692 parameter non-const in first overload. Remove src parameter in
3694 * regcache.c (do_cooked_read): Remove.
3695 (readonly_detached_regcache::readonly_detached_regcache): Make
3696 parameter non-const, adjust call to other constructor.
3697 (reg_buffer::save): Remove src parameter.
3698 * frame.c (do_frame_register_read): Remove.
3699 (frame_save_as_regcache): Use lambda function.
3700 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3701 parameter to ppu2spu_data *.
3702 (ppu2spu_sniffer): Use lambda function.
3704 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3706 * record-full.c (record_full_target::insert_breakpoint): Remove
3707 "struct" keyword, add const.
3709 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3711 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3712 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3713 * configure.ac: Remove AC_PREREQ, add missing quoting.
3714 * gnulib/configure.ac: Modernize usage of
3715 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3716 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3717 (AUTOMAKE_VERSION): Bump to 1.15.1.
3718 * configure: Re-generate.
3719 * config.in: Re-generate.
3720 * aclocal.m4: Re-generate.
3721 * gnulib/aclocal.m4: Re-generate.
3722 * gnulib/config.in: Re-generate.
3723 * gnulib/configure: Re-generate.
3724 * gnulib/import/Makefile.in: Re-generate.
3726 2018-06-19 Pedro Alves <palves@redhat.com>
3728 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3729 (lookup_minimal_symbol_by_pc_section): ... here with
3730 gdb_assert_not_reached added.
3732 2018-06-19 Pedro Alves <palves@redhat.com>
3734 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3735 parameter with a block parameter. Compare location's block symbol
3736 with the frame's block instead of addresses.
3737 (skip_inline_frames): Pass the current block instead of the
3738 frame's address. Break out as soon as we determine the frame
3739 should not be skipped.
3741 2018-06-18 Tom Tromey <tom@tromey.com>
3743 * solib-aix.c (solib_aix_get_section_offsets): Return
3745 (solib_aix_solib_create_inferior_hook): Update.
3747 2018-06-18 Tom Tromey <tom@tromey.com>
3749 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3751 2018-06-18 Tom Tromey <tom@tromey.com>
3753 * solib-frv.c (frv_relocate_main_executable): Use
3755 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3758 2018-06-18 Tom Tromey <tom@tromey.com>
3760 * objfiles.h (inhibit_section_map_updates): Update.
3761 (resume_section_map_updates, resume_section_map_updates_cleanup):
3763 * solib-svr4.c (svr4_handle_solib_event): Update.
3764 * objfiles.c (inhibit_section_map_updates): Return
3765 scoped_restore_tmpl<int>.
3766 (resume_section_map_updates, resume_section_map_updates_cleanup):
3769 2018-06-18 Tom Tromey <tom@tromey.com>
3771 * valprint.h (read_string): Update.
3772 * valprint.c (read_string): Change type of "buffer".
3773 (val_print_string): Update.
3774 * python/py-value.c (valpy_string): Update.
3775 * language.h (struct language_defn) <la_get_string>: Change
3777 (default_get_string, c_get_string): Update.
3778 * language.c (default_get_string): Change type of "buffer".
3779 * guile/scm-value.c (gdbscm_value_to_string): Update.
3780 * c-lang.c (c_get_string): Change type of "buffer".
3782 2018-06-18 Tom Tromey <tom@tromey.com>
3784 * ser-mingw.c (struct pipe_state_destroyer): New.
3785 (pipe_state_up): New typedef.
3786 (cleanup_pipe_state): Remove.
3787 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3789 2018-06-18 Tom Tromey <tom@tromey.com>
3791 * rust-lang.h (rust_yyerror): Don't declare.
3792 * rust-lang.c (rust_language_defn): Update.
3793 * rust-exp.y (yyerror): Now static.
3794 * parse.c (parse_exp_in_context_1): Update.
3795 * p-lang.h (p_yyerror): Don't declare.
3796 * p-lang.c (p_language_defn): Update.
3797 * p-exp.y (yyerror): Now static.
3798 * opencl-lang.c (opencl_language_defn): Update.
3799 * objc-lang.c (objc_language_defn): Update.
3800 * m2-lang.h (m2_yyerror): Don't declare.
3801 * m2-lang.c (m2_language_defn): Update.
3802 * m2-exp.y (yyerror): Now static.
3803 * language.h (struct language_defn) <la_error>: Remove.
3804 * language.c (unk_lang_error): Remove.
3805 (unknown_language_defn, auto_language_defn): Remove.
3806 * go-lang.h (go_yyerror): Don't declare.
3807 * go-lang.c (go_language_defn): Update.
3808 * go-exp.y (yyerror): Now static.
3809 * f-lang.h (f_yyerror): Don't declare.
3810 * f-lang.c (f_language_defn): Update.
3811 * f-exp.y (yyerror): Now static.
3812 * d-lang.h (d_yyerror): Don't declare.
3813 * d-lang.c (d_language_defn): Update.
3814 * d-exp.y (yyerror): Now static.
3815 * c-lang.h (c_yyerror): Don't declare.
3816 * c-lang.c (c_language_defn, cplus_language_defn)
3817 (asm_language_defn, minimal_language_defn): Update.
3818 * c-exp.y (yyerror): Now static.
3819 * ada-lang.h (ada_yyerror): Don't declare.
3820 * ada-lang.c (ada_language_defn): Update.
3821 * ada-exp.y (yyerror): Now static.
3823 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3825 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3826 (store_sveregs_to_thread): Likewise.
3827 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3828 (aarch64_linux_store_inferior_registers): Likewise.
3829 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3831 (aarch64_sve_regs_copy_to_regcache): Likewise.
3832 (aarch64_sve_regs_copy_from_regcache): Likewise.
3833 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3835 (aarch64_sve_regs_copy_to_regcache): Likewise.
3836 (aarch64_sve_regs_copy_from_regcache): Likewise.
3837 (sve_context): Structure from Linux headers.
3838 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3839 (SVE_SIG_ZREG_SIZE): Likewise.
3840 (SVE_SIG_PREG_SIZE): Likewise.
3841 (SVE_SIG_FFR_SIZE): Likewise.
3842 (SVE_SIG_REGS_OFFSET): Likewise.
3843 (SVE_SIG_ZREGS_OFFSET): Likewise.
3844 (SVE_SIG_ZREG_OFFSET): Likewise.
3845 (SVE_SIG_ZREGS_SIZE): Likewise.
3846 (SVE_SIG_PREGS_OFFSET): Likewise.
3847 (SVE_SIG_PREG_OFFSET): Likewise.
3848 (SVE_SIG_PREGS_SIZE): Likewise.
3849 (SVE_SIG_FFR_OFFSET): Likewise.
3850 (SVE_SIG_REGS_SIZE): Likewise.
3851 (SVE_SIG_CONTEXT_SIZE): Likewise.
3852 (SVE_PT_REGS_MASK): Likewise.
3853 (SVE_PT_REGS_FPSIMD): Likewise.
3854 (SVE_PT_REGS_SVE): Likewise.
3855 (SVE_PT_VL_INHERIT): Likewise.
3856 (SVE_PT_VL_ONEXEC): Likewise.
3857 (SVE_PT_REGS_OFFSET): Likewise.
3858 (SVE_PT_FPSIMD_OFFSET): Likewise.
3859 (SVE_PT_FPSIMD_SIZE): Likewise.
3860 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3861 (SVE_PT_SVE_PREG_SIZE): Likewise.
3862 (SVE_PT_SVE_FFR_SIZE): Likewise.
3863 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3864 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3865 (__SVE_SIG_TO_PT): Likewise.
3866 (SVE_PT_SVE_OFFSET): Likewise.
3867 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3868 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3869 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3870 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3871 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3872 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3873 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3874 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3875 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3876 (SVE_PT_SVE_SIZE): Likewise.
3877 (SVE_PT_SIZE): Likewise.
3878 (HAS_SVE_STATE): New define.
3880 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3882 * nat/aarch64-sve-linux-sigcontext.h: New file.
3883 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3885 (SVE_VQ_MIN): Likewise.
3886 (SVE_VQ_MAX): Likewise.
3887 (SVE_VL_MIN): Likewise.
3888 (SVE_VL_MAX): Likewise.
3889 (SVE_NUM_ZREGS): Likewise.
3890 (SVE_NUM_PREGS): Likewise.
3891 (sve_vl_valid): Likewise.
3892 (struct user_sve_header): Likewise.
3894 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3895 Richard Bunt <Richard.Bunt@arm.com>
3897 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3898 was requested by GDB.
3900 2018-06-15 Tom de Vries <tdevries@suse.de>
3902 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3904 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3906 * gnulib/update-gnulib.sh: Print expected versions of
3909 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3911 * arch-utils.c (default_type_align): Use type_length_units.
3912 * gdbtypes.c (type_align): Use type_length_units.
3914 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3916 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3917 of 'define' command.
3919 2018-06-14 Tom de Vries <tdevries@suse.de>
3922 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3923 get_no_prettyformat_print_options.
3925 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3927 * sparc-nat.h: Include target.h.
3928 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3929 <fetch_registers>: Remove this argument in function call.
3930 <store_registers>: Remove this argument in function call, remove
3932 <low_forget_process>: Call sparc64_forget_process instead of
3933 sparc_forget_process.
3935 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3937 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3938 (procfs_target::make_corefile_notes): Adjust to new
3939 target_read_alloc return type.
3941 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3942 Stephen Roberts <stephen.roberts@arm.com>
3945 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3946 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3947 Move should_notify_stop local into more inner scope.
3949 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3950 Stephen Roberts <stephen.roberts@arm.com>
3953 * infrun.c (resume_1): Add call to mark_async_event_handler.
3955 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3957 * infrun.c (do_target_wait): Change old version of $pc printed.
3959 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3961 * dwarf2read.c (read_index_from_section): Rename to...
3962 (read_gdb_index_from_section): ... this, update all callers.
3963 (dwarf2_read_index): Rename to...
3964 (dwarf2_read_gdb_index): ... this, update all callers.
3966 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3968 * gdb/hppa-linux-nat.c
3969 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3970 hppa_linux_nat_target::fetch_registers.
3972 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3974 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3975 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3976 (AARCH64_DWARF_SVE_FFR): Likewise.
3977 (AARCH64_DWARF_SVE_P0): Likewise.
3978 (AARCH64_DWARF_SVE_Z0): Likewise.
3980 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3982 * common/common-regcache.h (raw_compare): New function.
3983 * regcache.c (regcache::raw_compare): Likewise.
3984 * regcache.h (regcache::raw_compare): New declaration.
3986 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3988 * common/common-regcache.h (reg_buffer_common): New structure.
3989 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3990 (reg_buffer::raw_supply): Likewise.
3991 (reg_buffer::raw_supply_integer): Likewise.
3992 (reg_buffer::raw_supply_zeroed): Likewise.
3993 (reg_buffer::raw_collect): Likewise.
3994 (reg_buffer::raw_collect_integer): Likewise.
3995 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3996 (reg_buffer::raw_supply): Likewise.
3997 (reg_buffer::raw_supply_integer): Likewise.
3998 (reg_buffer::raw_supply_zeroed): Likewise.
3999 (reg_buffer::raw_collect): Likewise.
4000 (reg_buffer::raw_collect_integer): Likewise.
4002 2018-06-10 Tom Tromey <tom@tromey.com>
4004 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4005 (class remote_state) <stop_reply_queue>: Now std::vector.
4006 (remote_state::~remote_state)
4007 (remote_target::stop_reply_queue_length): Update.
4008 (struct queue_iter_param, remove_child_of_pending_fork)
4009 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4010 (check_pending_event_prevents_wildcard_vcont_callback)
4011 (remove_stop_reply_for_inferior)
4012 (remove_stop_reply_of_remote_state)
4013 (remote_notif_remove_once_on_match)
4014 (stop_reply_match_ptid_and_ws)
4015 (remote_kill_child_of_pending_fork): Remove.
4016 (remote_target::remove_new_fork_children)
4017 (remote_target::check_pending_events_prevent_wildcard_vcont)
4018 (remote_target::discard_pending_stop_replies)
4019 (remote_target::discard_pending_stop_replies_in_queue)
4020 (remote_target::remote_notif_remove_queued_reply)
4021 (remote_target::queued_stop_reply)
4022 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4023 (remote_target::wait, remote_target::kill_new_fork_children)
4024 (remote_target::async): Update.
4026 2018-06-10 Tom Tromey <tom@tromey.com>
4028 * record-full.c (record_full_arch_list_cleanups): Remove.
4029 (record_full_message): Use try/catch.
4030 (record_full_wait_cleanups): Remove.
4031 (record_full_wait_1): Use try/catch.
4032 (record_full_restore): Likewise.
4034 2018-06-10 Tom Tromey <tom@tromey.com>
4036 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4037 declare VEC. Add constructor.
4038 <in_target_beneath>: Now bool.
4039 (record_full_breakpoints): Now a std::vector, static.
4040 (record_full_sync_record_breakpoints)
4041 (record_full_init_record_breakpoints)
4042 (record_full_target::insert_breakpoint)
4043 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4045 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4047 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4048 * serial.c (serial_interface_lookup): Remove struct keyword.
4050 2018-06-10 Tom Tromey <tom@tromey.com>
4052 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4054 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4056 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4058 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4059 "beneath" as a method.
4060 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4061 Use "beneath" as a method.
4063 2018-06-10 Tom Tromey <tom@tromey.com>
4065 * tracefile.c (struct trace_file_writer_deleter): New.
4066 <operator()>: Rename from trace_file_writer_xfree.
4067 (trace_file_writer_up): New typedef.
4068 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4070 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4072 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4073 <m_registers, m_register_status>: Change type to
4075 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4078 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4080 * common/common-regcache.h (enum register_status): Add
4081 underlying type "signed char".
4082 * regcache.h (reg_buffer) <m_register_status>: Change type to
4084 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4085 register_status instead of signed char.
4086 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4087 (reg_buffer::get_register_status): Remove cast.
4088 (readable_regcache::raw_read): Remove cast.
4089 (readable_regcache::cooked_read): Remove cast.
4091 2018-06-09 Tom Tromey <tom@tromey.com>
4093 * source.c (reverse_search_command, forward_search_command): Use
4096 2018-06-09 Tom Tromey <tom@tromey.com>
4098 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4099 (serial_ops_list): Now static, std::vector.
4100 (serial_interface_lookup, serial_add_interface): Update.
4102 2018-06-09 Tom Tromey <tom@tromey.com>
4104 * dwarf2read.c (process_cu_includes): Update.
4105 (process_full_comp_unit): Update.
4106 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4109 2018-06-08 Paul Koning <paul_koning@dell.com>
4113 * python/python.c (do_start_initialization):
4114 Avoid call to internal Python API.
4115 (init__gdb_module): New function.
4117 2018-06-08 Gary Benson <gbenson@redhat.com>
4119 * linux-thread-db.c (valprint.h): New include.
4120 (struct check_thread_db_info): New structure.
4121 (check_thread_db_on_load, tdb_testinfo): New static globals.
4122 (check_thread_db, check_thread_db_callback): New functions.
4123 (try_thread_db_load_1): Run integrity checks if requested.
4124 (maintenance_check_libthread_db): New function.
4125 (_initialize_thread_db): Register "maint check libthread-db"
4126 and "maint set/show check-libthread-db".
4127 * NEWS: Mention the above new commands.
4129 2018-06-08 Tom Tromey <tom@tromey.com>
4131 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4134 2018-06-08 Tom Tromey <tom@tromey.com>
4136 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4138 2018-06-08 Tom Tromey <tom@tromey.com>
4140 * common/btrace-common.h (struct btrace_data): Add constructor,
4141 destructor, move assignment operator.
4142 <empty, clear, fini>: New methods.
4143 <format>: Initialize.
4144 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4145 (btrace_data_empty): Don't declare.
4146 * common/btrace-common.c (btrace_data_init): Remove.
4147 (btrace_data::fini): Rename from btrace_data_fini.
4148 (btrace_data::empty): Rename from btrace_data_empty.
4149 (btrace_data::clear): Rename from btrace_data_clear. Return
4151 * btrace.h (make_cleanup_btrace_data): Don't declare.
4152 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4153 (parse_xml_btrace): Update.
4154 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4155 (maint_btrace_clear_packet_history_cmd): Update.
4157 2018-06-07 Pedro Alves <palves@redhat.com>
4159 * target.h (target_ops) <beneath>: Now a method. All references
4161 (class target_stack): New.
4162 * target.c (g_target_stack): New.
4163 (g_current_top_target): Delete.
4164 (current_top_target): Get the top target out of g_target_stack.
4165 (target_stack::push, target_stack::unpush): New.
4166 (push_target, unpush_target): Reimplement.
4167 (target_is_pushed): Reimplement in terms of g_target_stack.
4168 (target_ops::beneath, target_stack::find_beneath): New.
4170 2018-06-07 Pedro Alves <palves@redhat.com>
4172 * target.h (find_target_beneath): Delete declaration.
4173 * target.c (find_target_beneath): Delete definition.
4174 * aix-thread.c: All callers of find_target_beneath adjusted to
4175 call target_ops::beneath instead.
4176 * bsd-uthread.c: Likewise.
4177 * linux-thread-db.c: Likewise.
4178 * ravenscar-thread.c: Likewise.
4179 * sol-thread.c: Likewise.
4180 * spu-multiarch.c: Likewise.
4182 2018-06-07 Pedro Alves <palves@redhat.com>
4184 * target.h (target_ops) <beneath>: Now a method. All references
4186 (target_ops) <m_beneath>: New.
4187 * target.c (target_ops::beneath): New.
4188 * corelow.c: Adjust all references to target_ops::beneath.
4189 * linux-thread-db.c: Likewise.
4190 * make-target-delegates: Likewise.
4191 * record-btrace.c: Likewise.
4192 * record-full.c: Likewise.
4193 * remote.c: Likewise.
4194 * target.c: Likewise.
4195 * target-delegates.c: Regenerate.
4197 2018-06-07 Pedro Alves <palves@redhat.com>
4199 * target.h (target_stack): Delete.
4200 (current_top_target): Declare function.
4201 * target.c (target_stack): Delete.
4202 (g_current_top_target): New.
4203 (current_top_target): New function.
4204 * auxv.c: Use current_top_target instead of target_stack
4206 * avr-tdep.c: Likewise.
4207 * breakpoint.c: Likewise.
4208 * corefile.c: Likewise.
4209 * elfread.c: Likewise.
4211 * exceptions.c: Likewise.
4212 * frame.c: Likewise.
4213 * gdbarch-selftests.c: Likewise.
4214 * gnu-v3-abi.c: Likewise.
4215 * ia64-tdep.c: Likewise.
4216 * ia64-vms-tdep.c: Likewise.
4217 * infcall.c: Likewise.
4218 * infcmd.c: Likewise.
4219 * infrun.c: Likewise.
4220 * linespec.c: Likewise.
4221 * linux-tdep.c: Likewise.
4222 * minsyms.c: Likewise.
4223 * ppc-linux-nat.c: Likewise.
4224 * ppc-linux-tdep.c: Likewise.
4225 * procfs.c: Likewise.
4226 * regcache.c: Likewise.
4227 * remote.c: Likewise.
4228 * rs6000-tdep.c: Likewise.
4229 * s390-linux-nat.c: Likewise.
4230 * s390-tdep.c: Likewise.
4231 * solib-aix.c: Likewise.
4232 * solib-darwin.c: Likewise.
4233 * solib-dsbt.c: Likewise.
4234 * solib-spu.c: Likewise.
4235 * solib-svr4.c: Likewise.
4236 * solib-target.c: Likewise.
4237 * sparc-tdep.c: Likewise.
4238 * sparc64-tdep.c: Likewise.
4239 * spu-tdep.c: Likewise.
4240 * symfile.c: Likewise.
4241 * symtab.c: Likewise.
4242 * target-descriptions.c: Likewise.
4243 * target-memory.c: Likewise.
4244 * target.c: Likewise.
4245 * target.h: Likewise.
4246 * tracefile-tfile.c: Likewise.
4247 * tracepoint.c: Likewise.
4248 * valops.c: Likewise.
4249 * valprint.c: Likewise.
4250 * value.c: Likewise.
4251 * windows-tdep.c: Likewise.
4252 * mi/mi-main.c: Likewise.
4254 2018-06-07 Tom Tromey <tom@tromey.com>
4256 * valprint.h (build_address_symbolic): Declare.
4257 * printcmd.c (print_address_symbolic): Update.
4258 (build_address_symbolic): Change "name" and "filename" to
4260 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4262 * defs.h (build_address_symbolic): Remove declaration.
4264 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4266 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4267 (aarch64_vnv_type): Add function.
4268 (aarch64_pseudo_register_name): Add V regs for SVE.
4269 (aarch64_pseudo_register_type): Likewise.
4270 (aarch64_pseudo_register_reggroup_p): Likewise.
4271 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4272 (aarch64_pseudo_read_value): Add V regs for SVE.
4273 (aarch64_pseudo_write_2): Use V0 offset for SVE
4274 (aarch64_pseudo_write): Add V regs for SVE.
4275 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4277 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4279 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4280 (sve_vl_from_vq): Likewise.
4282 2018-06-05 Tom Tromey <tom@tromey.com>
4284 * cli/cli-cmds.c (show_version): Update.
4285 * top.c (print_gdb_version): Add "interactive" parameter.
4287 * main.c (captured_main_1): Update.
4288 * top.h (print_gdb_version): Add "interactive" parameter and a
4291 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4293 * common/enum-flags.h: Add trailing semicolon to example in
4296 2018-06-05 Tom Tromey <tom@tromey.com>
4299 * NEWS: Add entry about pager.
4300 * utils.c (pagination_disabled_for_command): New global.
4301 (prompt_for_continue): Allow "c" response to prompt.
4302 (reinitialize_more_filter): Clear
4303 pagination_disabled_for_command.
4304 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4306 2018-06-04 Tom Tromey <tom@tromey.com>
4308 * ada-lang.h (ada_lookup_symbol_list): Update.
4309 * ada-lang.c (resolve_subexp): Update.
4310 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4312 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4313 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4314 results parameter to std::vector.
4315 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4317 * ada-exp.y (block_lookup): Update.
4318 (select_possible_type_sym): Change type of syms. Remove nsyms
4320 (write_var_or_type, write_name_assoc): Update.
4322 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4324 * windows-nat.c (windows_nat_target::xfer_partial): Return
4325 TARGET_XFER_E_IO if we need to delegate to the target beneath
4326 but BENEATH is NULL.
4328 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4330 * Makefile.in (config.status): Add configure.nat as a
4333 2018-06-04 Tom Tromey <tom@tromey.com>
4335 * cp-name-parser.y (cpname_state): Add method declarations.
4336 (HANDLE_QUAL): Update.
4337 (cpname_state::d_grab, cpname_state::fill_comp)
4338 (cpname_state::make_operator, cpname_state::make_dtor)
4339 (cpname_state::make_builtin_type, cpname_state::make_name)
4340 (cpname_state::d_qualify, cpname_state::d_int_type)
4341 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4342 (%union): Move earlier.
4344 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4346 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4348 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4350 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4351 (aarch64_pseudo_write_1): Likewise.
4352 (aarch64_pseudo_read_value): Use helper.
4353 (aarch64_pseudo_write): Likewise.
4355 2018-06-04 Pedro Alves <palves@redhat.com>
4357 * darwin-nat.c (darwin_ops): Delete.
4358 (darwin_attach_pid): Use get_native_target.
4360 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4362 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4363 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4365 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4367 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4368 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4369 (aarch64_gdbarch_init): Check for SVE.
4370 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4372 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4374 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4375 * aarch64-tdep.h (aarch64_read_description): Likewise.
4376 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4377 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4378 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4379 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4380 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4382 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4384 * value.c (value_fetch_lazy_bitfield): New.
4385 (value_fetch_lazy_memory): New.
4386 (value_fetch_lazy_register): New.
4387 (value_fetch_lazy): Factor out to smaller functions.
4389 2018-06-01 Tom Tromey <tom@tromey.com>
4391 * cp-name-parser.y (backslashable, represented): Now const.
4393 2018-06-01 Tom Tromey <tom@tromey.com>
4395 * cp-name-parser.y: Include parser-defs.h.
4396 (parser_fprintf): Remove declaration.
4398 2018-06-01 Tom Tromey <tom@tromey.com>
4400 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4402 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4403 (global_result): Remove globals.
4404 (struct cpname_state): New.
4405 (yyparse): Don't declare.
4406 (yylex, yyerror): Move declarations after %union.
4407 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4408 (make_name): Add state parameter.
4410 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4412 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4414 (yylex): Add lvalp, state parameters.
4415 (yyerror): Add state parameter.
4416 (cp_demangled_name_to_comp): Update.
4418 2018-06-01 Tom Tromey <tom@tromey.com>
4420 * cp-name-parser.y (parser_fprintf): Declare.
4421 (GDB_YY_REMAP_PREFIX): Define.
4422 Include yy-remap.h. Don't redefine yy* identifiers.
4424 2018-06-01 Tom Tromey <tom@tromey.com>
4426 * python/py-type.c (typy_legacy_template_argument): Update.
4427 * cp-support.h (cp_demangled_name_to_comp): Update.
4428 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4429 parameter to be a "std::string *".
4432 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4434 * ada-lex.l: Include "diagnostics.h" instead of
4435 "common/diagnostics.h".
4436 * unittests/environ-selftests.c: Likewise.
4437 * common/diagnostics.h: Moved to ../include.
4439 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4441 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4442 to language_mode_manual while calling breakpoint_re_set_one.
4444 2018-06-01 Tom Tromey <tom@tromey.com>
4446 * valops.c (value_cast_structs, destructor_name_p): Update.
4447 * symtab.c (gdb_mangle_name): Update.
4448 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4450 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4451 (pascal_object_print_value_fields, pascal_object_print_value):
4453 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4454 * linespec.c (find_methods): Update.
4455 * gdbtypes.h (type_name_no_tag): Remove.
4456 (type_name_or_error): Rename from type_name_no_tag_or_error.
4457 * gdbtypes.c (type_name_no_tag): Remove.
4458 (type_name_or_error): Rename from type_name_no_tag_or_error.
4459 (lookup_struct_elt_type, check_typedef): Update.
4460 * expprint.c (print_subexp_standard): Update.
4461 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4462 * d-namespace.c (d_lookup_nested_symbol): Update.
4463 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4464 (cp_print_class_member): Update.
4465 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4466 * completer.c (add_struct_fields): Update.
4467 * c-typeprint.c (cp_type_print_derivation_info)
4468 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4470 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4471 (ada_prefer_type, ada_is_exception_sym): Update.
4473 2018-06-01 Tom Tromey <tom@tromey.com>
4475 * valops.c (enum_constant_from_type, value_namespace_elt)
4476 (value_maybe_namespace_elt): Update.
4477 * valarith.c (find_size_for_pointer_math): Update.
4478 * target-descriptions.c (make_gdb_type): Update.
4479 * symmisc.c (print_symbol): Update.
4480 * stabsread.c (define_symbol, read_type)
4481 (complain_about_struct_wipeout, add_undefined_type)
4482 (cleanup_undefined_types_1): Update.
4483 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4484 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4485 (rust_internal_print_type, rust_composite_type)
4486 (rust_evaluate_funcall, rust_evaluate_subexp)
4487 (rust_inclusive_range_type_p): Update.
4488 * python/py-type.c (typy_get_tag): Update.
4489 * p-typeprint.c (pascal_type_print_base): Update.
4490 * mdebugread.c (parse_symbol, parse_type): Update.
4491 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4493 * guile/scm-type.c (gdbscm_type_tag): Update.
4494 * go-lang.c (sixg_string_p): Update.
4495 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4497 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4498 (TYPE_TAG_NAME): Remove.
4499 * gdbtypes.c (type_name_no_tag): Simplify.
4500 (check_typedef, check_types_equal, recursive_dump_type)
4501 (copy_type_recursive, arch_composite_type): Update.
4502 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4503 in summary mode when needed.
4504 * eval.c (evaluate_funcall): Update.
4505 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4506 (process_structure_scope, read_enumeration_type)
4507 (read_namespace_type, read_module_type, determine_prefix): Update.
4508 * cp-support.c (inspect_type): Update.
4509 * coffread.c (process_coff_symbol, decode_base_type): Update.
4510 * c-varobj.c (c_is_path_expr_parent): Update.
4511 * c-typeprint.c (c_type_print_base_struct_union): Update.
4512 (c_type_print_base_1): Update. Print struct/class/union/enum in
4513 summary when using C language.
4514 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4515 (gen_maybe_namespace_elt): Update.
4516 * ada-lang.c (ada_type_name): Simplify.
4517 (empty_record, ada_template_to_fixed_record_type_1)
4518 (template_to_static_fixed_type)
4519 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4521 2018-06-01 Tom Tromey <tom@tromey.com>
4523 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4525 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4526 (c_print_type): Update.
4527 (c_print_type): New overload.
4528 (c_type_print_varspec_prefix, c_type_print_args)
4529 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4530 (c_type_print_base_struct_union, c_type_print_base_1)
4531 (cp_type_print_method_args): Add "language" parameter.
4532 (c_type_print_base): Update.
4533 * c-lang.h (c_print_type): Add new overload.
4535 2018-06-01 Tom Tromey <tom@tromey.com>
4537 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4538 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4540 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4542 * aarch64-tdep.c (aarch64_sve_register_names): New const
4544 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4545 (AARCH64_SVE_Z_REGS_NUM): New define.
4546 (AARCH64_SVE_P_REGS_NUM): Likewise.
4547 (AARCH64_SVE_NUM_REGS): Likewise.
4549 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4551 * nat/linux-ptrace.h [__alpha__]
4552 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4555 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4557 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4558 the endianness selected.
4559 * NEWS: Document `set endian auto' mode operation update.
4561 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4563 * Makefile.in: Add new header.
4564 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4565 (sve_vl_from_vg): Likewise.
4566 (sve_vq_from_vl): Likewise.
4567 (sve_vl_from_vq): Likewise.
4568 (sve_vq_from_vg): Likewise.
4569 (sve_vg_from_vq): Likewise.
4570 * configure.nat: Add new c file.
4571 * nat/aarch64-sve-linux-ptrace.c: New file.
4572 * nat/aarch64-sve-linux-ptrace.h: New file.
4574 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4576 * aarch64-linux-nat.c (aarch64_linux_read_description):
4578 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4580 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4581 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4582 (aarch64_gdbarch_init): Add parmeter zero.
4583 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4584 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4585 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4587 * doc/gdb.texinfo: Describe SVE feature
4588 * features/aarch64-sve.c: New file.
4590 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4593 * gdbarch.sh (significant_addr_bit): Default to zero when
4594 not set by target architecture.
4595 * gdbarch.c: Re-generated.
4596 * utils.c (address_significant): Update.
4598 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4600 * stack.c (func_command): Remove trailing newline in call to error.
4602 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4604 * regcache.h (regcache_raw_collect): Remove, update callers to
4605 use regcache::raw_collect.
4606 * regcache.c (regcache_raw_collect): Remove.
4608 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4610 * regcache.h (regcache_raw_supply): Remove, update callers to
4611 use detached_regcache::raw_supply.
4612 * regcache.c (regcache_raw_supply): Remove.
4614 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4616 * regcache.h (regcache_cooked_write_part): Remove, update
4617 callers to use regcache::cooked_write_part.
4618 * regcache.c (regcache_cooked_write_part): Remove.
4620 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4622 * regcache.h (regcache_cooked_read_part): Remove, update callers
4623 to use readable_regcache::cooked_read_part.
4624 * regcache.c (regcache_cooked_read_part): Remove.
4626 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4628 * regcache.h (regcache_cooked_read_value): Remove, update
4629 callers to use readable_regcache::cooked_read_value.
4630 * regcache.c (regcache_cooked_read_value): Remove.
4632 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4634 * regcache.h (regcache_cooked_write): Remove, update callers to
4635 use regcache::cooked_write.
4636 * regcache.c (regcache_cooked_write): Remove.
4638 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4640 * regcache.h (regcache_invalidate): Remove, update callers to
4641 use detached_regcache::invalidate instead.
4642 * regcache.c (regcache_invalidate): Remove.
4644 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4646 * regcache.h (regcache_raw_write_part): Remove, update callers
4647 to use regcache::raw_write_part instead.
4648 * regcache.c (regcache_raw_write_part): Remove.
4650 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4652 * regcache.h (regcache_raw_read_part): Remove, update callers to
4653 use readable_regcache::raw_read_part instead.
4654 * regcache.c (regcache_raw_read_part): Remove.
4656 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4658 * regcache.h (regcache_cooked_read): Remove, update callers to
4659 use readable_regcache::cooked_read instead.
4660 * regcache.c (regcache_cooked_read): Remove.
4662 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4664 * regcache.h (regcache_raw_write): Remove, update callers to use
4665 regcache::raw_write instead.
4666 * regcache.c (regcache_raw_write): Remove.
4668 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4670 * regcache.h (regcache_raw_read): Remove, update callers to use
4671 readable_regcache::raw_read instead.
4672 * regcache.c (regcache_raw_read): Remove.
4674 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4676 * regcache.h (regcache_raw_update): Remove, update callers to
4677 use readable_regcache::raw_update instead.
4678 * regcache.c (regcache_raw_update): Remove.
4680 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4682 * regcache.h (regcache_register_status): Remove, update callers
4683 to use reg_buffer::get_register_status directly instead.
4684 * regcache.c (regcache_register_status): Remove.
4686 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4688 * regcache.h (regcache_get_ptid): Remove, update all callers to
4689 call regcache::ptid instead.
4690 * regcache.c (regcache_get_ptid): Remove.
4692 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4694 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4696 2018-05-30 Pedro Alves <palves@redhat.com>
4698 * common/common-exceptions.h (exception_rethrow): Use
4701 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4703 * breakpoint.c (print_solib_event, check_status_catch_solib):
4704 Remove struct keyword in range-based for loops.
4705 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4706 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4708 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4710 * symfile.c (addr_info_make_relative): Likewise.
4711 * thread.c (value_in_thread_stack_temporaries): Likewise.
4713 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4716 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4717 aggregate type to get its real type before accessing it.
4719 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4721 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4722 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4723 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4724 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4725 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4726 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4727 * printcmd.c (info_address_command): Likewise.
4729 2018-05-29 Tom Tromey <tom@tromey.com>
4731 * windows-nat.c (handle_exception): Update fall-through comment.
4733 2018-05-29 Tom Tromey <tom@tromey.com>
4735 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4736 (struct program_space) <added_solibs>: Now a std::vector.
4737 * breakpoint.c (print_solib_event): Update.
4738 (check_status_catch_solib): Update.
4739 * progspace.c (clear_program_space_solib_cache): Update.
4740 * solib.c (update_solib_list): Update.
4742 2018-05-29 Tom Tromey <tom@tromey.com>
4744 * python/py-type.c (typy_richcompare): Update.
4745 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4746 * gdbtypes.h (types_deeply_equal): Return bool.
4747 (types_equal): Likewise.
4748 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4750 (check_types_equal): Change worklist to std::vector. Return
4752 (struct type_equality_entry): Add constructor.
4753 (compare_maybe_null_strings): Return bool.
4754 (check_types_worklist): Return bool. Change worklist to
4756 (types_deeply_equal): Use std::vector.
4757 (types_equal): Return bool.
4758 (compare_maybe_null_strings): Simplify.
4760 2018-05-29 Tom Tromey <tom@tromey.com>
4762 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4764 2018-05-29 Tom Tromey <tom@tromey.com>
4766 * objc-lang.h: Don't include cp-support.h.
4767 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4770 2018-05-27 Tom Tromey <tom@tromey.com>
4772 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4774 2018-05-25 Tom Tromey <tom@tromey.com>
4776 * value.c (value::location): Initialize.
4778 2018-05-25 Tom Tromey <tom@tromey.com>
4780 * dbxread.c (init_bincl_list): Remove.
4781 (bincl_list): Now a std::vector.
4782 (bincls_allocated, next_bincl): Remove.
4783 (free_bincl_list, do_free_bincl_list_cleanup)
4784 (make_cleanup_free_bincl_list): Remove.
4785 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4787 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4788 (struct header_file_location): Add constructor.
4789 (add_bincl_to_list): Remove.
4791 2018-05-25 Tom Tromey <tom@tromey.com>
4793 * tui/tui.c (tui_enable): Update.
4794 * mi/mi-interp.c (mi_interp::init): Update.
4795 * interps.h (class interp) <name>: New method.
4796 <m_name>: Rename from name.
4797 (~scoped_restore_interp): Update.
4798 * interps.c (interp::interp): Update.
4799 (interp_add, interp_set, interp_lookup_existing)
4800 (current_interp_named_p): Update.
4802 2018-05-25 Tom Tromey <tom@tromey.com>
4804 * interps.c (interp_name): Remove.
4805 * mi/mi-interp.c (mi_interp::init): Update.
4806 * interps.h (interp_name): Remove.
4807 (~scoped_restore_interp): Update.
4808 * tui/tui.c (tui_enable): Update.
4810 2018-05-25 Tom Tromey <tom@tromey.com>
4812 * utils.c (fputs_maybe_filtered): Update.
4813 * linespec.c (decode_line_full): Update.
4814 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4815 (mi_print_breakpoint_for_event, mi_solib_loaded)
4816 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4817 (mi_user_selected_context_changed): Update.
4818 * mi/mi-main.c (mi_execute_command): Update.
4819 * cli/cli-script.c (execute_control_command): Update.
4820 * python/python.c (execute_gdb_command): Update.
4821 * solib.c (info_sharedlibrary_command): Update.
4822 * interps.c (interp_ui_out): Remove.
4823 * interps.h (interp_ui_out): Remove.
4825 2018-05-25 Tom Tromey <tom@tromey.com>
4827 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4828 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4829 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4831 2018-05-25 Tom Tromey <tom@tromey.com>
4833 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4834 * interps.c (interp_exec): Use scoped_restore.
4836 2018-05-25 Tom Tromey <tom@tromey.com>
4838 * remote.c (remote_target::remote_file_get): Use
4840 (remote_target::remote_file_put): Likewise.
4842 2018-05-25 Tom Tromey <tom@tromey.com>
4844 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4846 (get_pe_section_index, add_pe_exported_sym): Update.
4847 (read_pe_exported_syms): Use gdb::def_vector.
4849 2018-05-25 Tom Tromey <tom@tromey.com>
4851 * frame.c (remove_prev_frame): Remove.
4852 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4854 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4856 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4858 * mips-linux-nat.c (supply_fpregset): Always call
4859 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4860 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4861 `mips_fill_fpregset'.
4862 * mips-linux-tdep.c (mips_supply_fpregset)
4863 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4864 (mips_fill_fpregset_wrapper): Remove functions.
4865 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4866 (mips_linux_fpregset): Remove variable.
4867 (mips_linux_iterate_over_regset_sections): Use
4868 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4869 (mips_linux_o32_sigframe_init): Remove comment.
4871 2018-05-25 Pedro Alves <palves@redhat.com>
4873 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4874 (struct readahead_cache, struct packet_reg, struct
4875 remote_arch_state, class remote_state): Move higher up in the
4877 (remote_target::m_remote_state): Now an object instead of a pointer.
4878 (remote_target::get_remote_state): Adjust.
4880 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4882 * stack.c (select_and_print_frame): Delete.
4883 (struct function_bounds): Move struct within function.
4884 (func_command): Most content moved into new function
4885 find_frame_for_function, use new function, print result, add
4887 (find_frame_for_function): New function, now returns a result.
4889 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4891 * stack.c (iterate_over_block_arg_vars): Fix comment.
4892 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4894 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4898 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4900 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4902 * frame.h (class scoped_restore_selected_frame): New class.
4903 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4904 of any exception, use scoped_restore_selected_frame to restore the
4907 2018-05-24 Pedro Alves <palves@redhat.com>
4909 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4912 2018-05-23 Tom Tromey <tom@tromey.com>
4914 * complaints.c (struct complaints): Remove.
4915 (symfile_complaint_book): Remove.
4916 (series): New global.
4917 (complaint_internal): Update.
4918 (clear_complaints): Update.
4920 2018-05-23 Tom Tromey <tom@tromey.com>
4922 * complaints.c (counters): New global.
4923 (struct complain): Remove.
4924 (struct complaints) <root>: Remove.
4925 (complaint_sentinel): Remove.
4926 (symfile_complaint_book): Update.
4927 (find_complaint) Remove.
4928 (complaint_internal, clear_complaints): Update.
4930 2018-05-23 Tom Tromey <tom@tromey.com>
4932 * complaints.c (struct complain) <file, line>: Remove.
4933 (find_complaint): Remove file, line parameters.
4934 (complaint_internal): Update.
4936 2018-05-23 Tom Tromey <tom@tromey.com>
4938 * complaints.c (vcomplaint): Remove.
4939 (complaint_internal) Merge in contents of vcomplaint.
4941 2018-05-23 Tom Tromey <tom@tromey.com>
4943 * complaints.c (struct complaints) <explanation>: Remove.
4944 (symfile_explanations): Remove.
4945 (symfile_complaint_book): Update.
4946 (vcomplaint): Update.
4947 (struct explanation): Remove.
4949 2018-05-23 Tom Tromey <tom@tromey.com>
4951 * complaints.c (symfile_complaints): Remove.
4952 (complaint_internal): Remove "complaints" parameter.
4953 (clear_complaints, vcomplaint): Remove "c" parameter.
4954 (get_complaints): Remove.
4955 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4956 (dwarf2_debug_line_missing_file_complaint)
4957 (dwarf2_debug_line_missing_end_sequence_complaint)
4958 (dwarf2_complex_location_expr_complaint)
4959 (dwarf2_const_value_length_mismatch_complaint)
4960 (dwarf2_section_buffer_overflow_complaint)
4961 (dwarf2_macro_malformed_definition_complaint)
4962 (dwarf2_invalid_attrib_class_complaint)
4963 (create_addrmap_from_index, dw2_symtab_iter_next)
4964 (dw2_expand_marked_cus)
4965 (dw2_debug_names_iterator::find_vec_in_debug_names)
4966 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4967 (create_debug_type_hash_table, init_cutu_and_read_dies)
4968 (partial_die_parent_scope, add_partial_enumeration)
4969 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4970 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4971 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4972 (create_cus_hash_table, create_dwp_hash_table)
4973 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4974 (dwarf2_rnglists_process, dwarf2_ranges_process)
4975 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4976 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4977 (handle_struct_member_die, process_structure_scope)
4978 (read_array_type, read_common_block, read_module_type)
4979 (read_tag_pointer_type, read_typedef, read_base_type)
4980 (read_subrange_type, load_partial_dies, partial_die_info::read)
4981 (partial_die_info::read, partial_die_info::read)
4982 (partial_die_info::read, read_checked_initial_length_and_offset)
4983 (dwarf2_string_attr, read_formatted_entries)
4984 (dwarf_decode_line_header)
4985 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4986 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4987 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4988 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4989 (get_signatured_type, get_DW_AT_signature_type)
4990 (decode_locdesc, file_file_name, consume_improper_spaces)
4991 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4992 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4993 (dwarf2_symbol_mark_computed, set_die_type)
4994 (read_attribute_value): Update.
4995 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4997 * dbxread.c (unknown_symtype_complaint)
4998 (lbrac_mismatch_complaint, repeated_header_complaint)
4999 (set_namestring, function_outside_compilation_unit_complaint)
5000 (read_dbx_symtab, process_one_symbol): Update.
5001 * gdbtypes.c (stub_noname_complaint): Update.
5002 * windows-nat.c (handle_unload_dll): Update.
5003 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5004 (decode_base_type): Update.
5005 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5006 (eb_complaint, record_include_begin, record_include_end)
5007 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5008 (process_xcoff_symbol, read_symbol)
5009 (function_outside_compilation_unit_complaint)
5010 (scan_xcoff_symtab): Update.
5011 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5012 * buildsym.c (finish_block_internal, make_blockvector)
5013 (end_symtab_get_static_block, augment_type_symtab): Update.
5014 * dtrace-probe.c (dtrace_process_dof)
5015 (dtrace_static_probe_ops::get_probes): Update.
5016 * complaints.h (struct complaint): Don't declare.
5017 (symfile_complaints): Remove.
5018 (complaint_internal): Remove "complaints" parameter.
5019 (complaint): Likewise.
5020 (clear_complaints): Likewise.
5021 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5022 (reread_symbols): Update.
5023 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5024 (dwarf2_frame_cache, decode_frame_entry): Update.
5025 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5026 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5027 (info_selectors_command): Update.
5028 * macrotab.c (macro_include, check_for_redefinition)
5029 (macro_undef): Update.
5030 * objfiles.c (filter_overlapping_sections): Update.
5031 * stabsread.c (invalid_cpp_abbrev_complaint)
5032 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5033 (define_symbol, error_type, read_type, rs6000_builtin_type)
5034 (stabs_method_name_from_physname, read_member_functions)
5035 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5036 (attach_fields_to_type, complain_about_struct_wipeout)
5037 (read_range_type, read_args, common_block_start)
5038 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5040 * mdebugread.c (index_complaint, unknown_ext_complaint)
5041 (basic_type_complaint, bad_tag_guess_complaint)
5042 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5043 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5044 (parse_procedure, parse_lines)
5045 (function_outside_compilation_unit_complaint)
5046 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5047 (bad_tag_guess_complaint, reg_value_complaint): Update.
5048 * cp-support.c (demangled_name_complaint): Update.
5049 * macroscope.c (sal_macro_scope): Update.
5050 * dwarf-index-write.c (class debug_names): Update.
5052 2018-05-23 Tom Tromey <tom@tromey.com>
5054 * complaints.c (clear_complaints): Remove "noisy" parameter.
5055 * complaints.h (clear_complaints): Update.
5056 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5057 (reread_symbols): Update.
5059 2018-05-23 Tom Tromey <tom@tromey.com>
5061 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5063 (vcomplaint, clear_complaints): Update.
5064 (symfile_explanations): Remove some messages.
5066 2018-05-23 Tom Tromey <tom@tromey.com>
5068 * complaints.c (internal_complaint): Remove.
5069 * complaints.h (internal_complaint): Remove.
5071 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5073 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5075 2018-05-22 Pedro Alves <palves@redhat.com>
5077 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5078 (remote_fileio_badfd, remote_fileio_return_errno)
5079 (remote_fileio_return_success, remote_fileio_func_open)
5080 (remote_fileio_func_open, remote_fileio_func_close)
5081 (remote_fileio_func_read, remote_fileio_func_write)
5082 (remote_fileio_func_lseek, remote_fileio_func_rename)
5083 (remote_fileio_func_unlink, remote_fileio_func_stat)
5084 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5085 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5086 remote_target parameter.
5087 (remote_fio_func_map) <func>: Add remote_target parameter.
5088 (do_remote_fileio_request, remote_fileio_request):
5089 * remote-fileio.h (remote_fileio_request):
5090 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5091 remote_target parameter.
5092 (remote_notif_process, handle_notification): Adjust to pass down
5094 (remote_notif_state_allocate): Add remote_target parameter. Save
5096 * remote-notif.h (struct remote_target): Forward declare.
5097 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5098 remote_target parameter.
5099 (struct remote_notif_state) <remote>: New field.
5100 (remote_notif_ack, remote_notif_parse): Add remote_target
5102 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5103 remote_target parameter.
5104 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5105 (threads_listing_context, rmt_thread_action, protocol_feature)
5106 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5107 (packet_result, struct threads_listing_context, remote_state):
5108 Move definitions and declarations higher up.
5109 (remote_target) <~remote_target>: Declare.
5110 (remote_download_command_source, remote_file_put, remote_file_get)
5111 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5112 (remote_hostio_pread_vFile, remote_hostio_send_command)
5113 (remote_hostio_set_filesystem, remote_hostio_open)
5114 (remote_hostio_close, remote_hostio_unlink, remote_state)
5115 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5116 (get_memory_write_packet_size, get_memory_read_packet_size)
5117 (append_pending_thread_resumptions, remote_detach_1)
5118 (append_resumption, remote_resume_with_vcont)
5119 (add_current_inferior_and_thread, wait_ns, wait_as)
5120 (process_stop_reply, remote_notice_new_inferior)
5121 (process_initial_stop_replies, remote_add_thread)
5122 (btrace_sync_conf, remote_btrace_maybe_reopen)
5123 (remove_new_fork_children, kill_new_fork_children)
5124 (discard_pending_stop_replies, stop_reply_queue_length)
5125 (check_pending_events_prevent_wildcard_vcont)
5126 (discard_pending_stop_replies_in_queue, stop_reply)
5127 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5128 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5129 (remote_interrupt_as, remote_interrupt_ns)
5130 (remote_get_noisy_reply, remote_query_attached)
5131 (remote_add_inferior, remote_current_thread, get_current_thread)
5132 (set_thread, set_general_thread, set_continue_thread)
5133 (set_general_process, write_ptid)
5134 (remote_unpack_thread_info_response, remote_get_threadinfo)
5135 (parse_threadlist_response, remote_get_threadlist)
5136 (remote_threadlist_iterator, remote_get_threads_with_ql)
5137 (remote_get_threads_with_qxfer)
5138 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5139 (get_offsets, remote_check_symbols, remote_supported_packet)
5140 (remote_query_supported, remote_packet_size)
5141 (remote_serial_quit_handler, remote_detach_pid)
5142 (remote_vcont_probe, remote_resume_with_hc)
5143 (send_interrupt_sequence, interrupt_query)
5144 (remote_notif_get_pending_events, fetch_register_using_p)
5145 (send_g_packet, process_g_packet, fetch_registers_using_g)
5146 (store_register_using_P, store_registers_using_G)
5147 (set_remote_traceframe, check_binary_download)
5148 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5149 (remote_xfer_live_readonly_partial, remote_read_bytes)
5150 (remote_send_printf, remote_flash_write, readchar)
5151 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5152 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5153 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5154 (extended_remote_disable_randomization, extended_remote_run)
5155 (send_environment_packet, extended_remote_environment_support)
5156 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5157 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5158 (packet_command): Now methods of ...
5159 (remote_target): ... this class.
5160 (m_remote_state) <remote_target>: New field.
5161 (struct remote_state) <stop_reply_queue,
5162 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5164 (remote_state::remote_state): Allocate stop_reply_queue.
5165 (remote_state): Delete global.
5166 (get_remote_state_raw): Delete.
5167 (remote_target::get_remote_state): Allocate m_remote_state on
5169 (get_current_remote_target): New.
5170 (remote_ops, extended_remote_ops): Delete.
5171 (wait_forever_enabled_p, remote_async_inferior_event_token):
5172 Delete, moved to struct remote_state.
5173 (remote_target::close): Delete self. Destruction bits split to
5175 (remote_target::~remote_target): ... this.
5176 (show_memory_packet_size): Adjust to use
5177 get_current_remote_target.
5178 (struct protocol_feature) <func>: Add remote_target parameter.
5179 All callers adjusted.
5180 (curr_quit_handler_target): New.
5181 (remote_serial_quit_handler): Reimplement.
5182 (remote_target::open_1): Adjust to use get_current_remote_target.
5183 Heap-allocate remote_target/extended_remote_target instances.
5184 (vcont_builder::vcont_builder): Add remote_target parameter, and
5185 save it in m_remote. All callers adjusted.
5186 (vcont_builder::m_remote): New field.
5187 (vcont_builder::restart, vcont_builder::flush)
5188 (vcont_builder::push_action): Use it.
5189 (remote_target::commit_resume): Use it.
5190 (struct queue_iter_param) <remote>: New field.
5191 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5192 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5193 (check_pending_event_prevents_wildcard_vcont_callback)
5194 (remote_target::check_pending_events_prevent_wildcard_vcont)
5195 (remote_target::discard_pending_stop_replies)
5196 (remote_target::discard_pending_stop_replies_in_queue)
5197 (remote_target::remote_notif_remove_queued_reply): Fill in
5199 (remote_notif_get_pending_events): New.
5200 (remote_target::readchar, remote_target::remote_serial_write):
5201 Save/restore curr_quit_handler_target.
5203 (kill_new_fork_children): Fill in 'remote' field.
5204 (packet_command): Use get_current_remote_target, defer to
5205 remote_target method of same name.
5206 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5207 parameter, and save it in m_remote. All callers adjusted.
5208 (scoped_remote_fd::release): Use m_remote.
5209 (scoped_remote_fd::m_remote): New field.
5210 (remote_file_put, remote_file_get, remote_file_delete): Use
5211 get_current_remote_target, defer to remote_target method of same
5213 (remote_btrace_reset): Add remote_state paremeter. Update all
5215 (remote_async_inferior_event_handler). Pass down 'data'.
5216 (remote_new_objfile): Use get_current_remote_target.
5217 (remote_target::vcont_r_supported): New.
5218 (set_range_stepping): Use get_current_remote_target and
5219 remote_target::vcont_r_supported.
5220 (_initialize_remote): Don't allocate 'remote_state' and
5221 'stop_reply_queue' globals.
5222 * remote.h (struct remote_target): Forward declare.
5223 (getpkt, putpkt, remote_notif_get_pending_events): Add
5224 'remote_target' parameter.
5226 2018-05-22 Pedro Alves <palves@redhat.com>
5228 * remote.c (vcont_builder): Now a class. Make all data members
5230 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5232 (vcont_builder_restart): Rename to ...
5233 (vcont_builder::restart): ... this.
5234 (vcont_builder_flush): Rename to ...
5235 (vcont_builder::flush): ... this.
5236 (vcont_builder_push_action): Rename to ...
5237 (vcont_builder::push_action): ... this.
5238 (remote_target::commit_resume): Adjust.
5240 2018-05-22 Pedro Alves <palves@redhat.com>
5242 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5243 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5244 (get_fixed_memory_packet_size): New.
5245 (get_memory_packet_size): Use it.
5246 (set_memory_packet_size): Don't override the config size with
5247 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5248 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5249 Don't refer to get_memory_packet_size if not connected to a remote
5250 target. Show "(default)" if configured size is 0.
5252 2018-05-22 Pedro Alves <palves@redhat.com>
5254 * remote.c (remote_target::mourn_inferior): Move
5255 discard_pending_stop_replies call here from ...
5256 (_initialize_remote): ... here.
5258 2018-05-22 Pedro Alves <palves@redhat.com>
5260 * remote.c (compare_section_command): Remove set_general_process
5263 2018-05-22 Pedro Alves <palves@redhat.com>
5265 * remote.c (struct packet_reg, struct remote_arch_state):
5266 Move higher up in the file.
5267 (remote_state) <m_arch_states>: Store remote_arch_state values
5268 instead of remote_arch_state pointers.
5269 (remote_state::get_remote_arch_state): Adjust.
5271 2018-05-22 Pedro Alves <palves@redhat.com>
5273 * remote.c: Include <unordered_map>.
5274 (remote_state): Now a class.
5275 (remote_state) <get_remote_arch_state>: Declare method.
5276 <get_remote_arch_state>: New field.
5277 (remote_arch_state) <remote_arch_state>: Declare ctor.
5278 <regs>: Now a unique_ptr.
5279 (remote_gdbarch_data_handle): Delete.
5280 (get_remote_arch_state): Delete.
5281 (remote_state::get_remote_arch_state): New.
5282 (get_remote_state): Adjust to call remote_state's
5283 get_remote_arch_state method.
5284 (init_remote_state): Delete, bits factored out to ...
5285 (remote_arch_state::remote_arch_state): ... this new method.
5286 (get_remote_packet_size, get_memory_packet_size)
5287 (process_g_packet, remote_target::fetch_registers)
5288 (remote_target::prepare_to_store, store_registers_using_G)
5289 (remote_target::store_registers, remote_target::get_trace_status):
5290 Adjust to call remote_state's method.
5291 (_initialize_remote): Remove reference to
5292 remote_gdbarch_data_handle.
5294 2018-05-22 Pedro Alves <palves@redhat.com>
5296 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5297 pread>: New method declarations.
5298 (remote_target::open_1): Adjust.
5299 (readahead_cache_invalidate): Rename to ...
5300 (readahead_cache::invalidate): ... this, and adjust to be a class
5302 (readahead_cache_invalidate_fd): Rename to ...
5303 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5305 (remote_hostio_pwrite): Adjust.
5306 (remote_hostio_pread_from_cache): Rename to ...
5307 (readahead_cache::pread): ... this, and adjust to be a class
5309 (remote_hostio_close): Adjust.
5311 2018-05-22 Pedro Alves <palves@redhat.com>
5313 * remote.c (remote_hostio_close_cleanup): Delete.
5314 (class scoped_remote_fd): New.
5315 (remote_file_put, remote_file_get): Use it.
5317 2018-05-22 Pedro Alves <palves@redhat.com>
5319 (struct vCont_action_support): Use bool and initialize all fields.
5320 (struct readahead_cache): Initialize all fields.
5321 (remote_state): Use bool and initialize all fields.
5322 (remote_state::remote_state, remote_state::~remote_state): New.
5323 (new_remote_state): Delete.
5324 (_initialize_remote): Use new to allocate remote_state.
5326 2018-05-22 Pedro Alves <palves@redhat.com>
5330 * c-exp.y: Include "c-support.h".
5331 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5332 of tolower. Use c_ident_is_alpha to scan names.
5333 * c-lang.c: Include "c-support.h".
5334 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5335 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5336 * c-support.h: New file, with bits factored out from ...
5337 * cp-name-parser.y: ... this file.
5338 Include "c-support.h".
5339 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5340 c-support.h and renamed.
5341 (symbol_end, yylex): Adjust.
5343 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5345 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5346 parameter type to CORE_ADDR.
5347 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5348 parameter type in declaration to CORE_ADDR.
5349 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5350 target_auxv_search to get AT_HWCAP and use the result to get the
5352 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5353 to CORE_ADDR. Remove the cast of the return value to unsigned
5354 long. Fix error predicate of target_auxv_search.
5355 (ppc_linux_nat_target::read_description): Change the type of the
5356 hwcap variable to CORE_ADDR.
5358 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5360 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5361 if the size of fpscr is larger than 32 bits.
5363 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5365 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5366 (ppc32_linux_vsxregmap): New global.
5367 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5368 regcache_supply_regset, and regcache_collect_regset.
5369 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5370 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5371 (fetch_vsx_register, store_vsx_register): Remove.
5372 (fetch_vsx_registers): Add regno parameter. Get regset using
5373 ppc_linux_vsxregset. Use regset to supply registers.
5374 (store_vsx_registers): Add regno parameter. Get regset using
5375 ppc_linux_vsxregset. Use regset to collect registers.
5376 (fetch_register): Call fetch_vsx_registers instead of
5378 (store_register): Call store_vsx_registers instead of
5380 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5381 new regno parameter.
5382 (store_ppc_registers): Call store_vsx_registers with -1 for the
5383 new regno parameter.
5384 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5385 (ppc_collect_vsxregset): Remove.
5387 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5389 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5391 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5392 for vector register offset fields.
5393 (ppc64_fbsd_reg_offsets): Likewise.
5394 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5395 to vector register offset fields.
5396 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5397 to vector register offset fields.
5398 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5399 vector register offset fields.
5400 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5401 initializers for vector register offset fields.
5402 (rs6000_aix64_reg_offsets): Likewise.
5403 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5404 (ppc_supply_vrregset): Remove.
5405 (ppc_collect_vrregset): Remove.
5406 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5407 (ppc_linux_vrregset) : New function.
5408 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5409 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5410 (ppc32_linux_vrregset): Remove.
5411 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5412 and use result instead of ppc32_linux_vrregset.
5413 (ppc32_linux_reg_offsets): Remove initializers for vector register
5415 (ppc64_linux_reg_offsets): Likewise.
5416 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5417 * ppc-linux-nat.c: Include regset.h.
5418 (gdb_vrregset_t): Adjust comment to account for little-endian
5420 (supply_vrregset, fill_vrregset): Remove.
5421 (fetch_altivec_register, store_altivec_register): Remove.
5422 (fetch_altivec_registers): Add regno parameter. Get regset using
5423 ppc_linux_vrregset. Use regset to supply registers.
5424 (store_altivec_registers): Add regno parameter. Get regset using
5425 ppc_linux_vrregset. Use regset to collect registers.
5426 (fetch_register): Call fetch_altivec_registers instead of
5427 fetch_altivec_register.
5428 (store_register): Call store_altivec_registers instead of
5429 store_altivec_register.
5430 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5431 the new regno parameter.
5432 (store_ppc_registers): Call store_altivec_registers with -1 for
5433 the new regno parameter.
5435 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5437 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5438 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5439 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5440 (gdb_vrregset_t): Change array type size to
5441 PPC_LINUX_SIZEOF_VRREGSET.
5442 (gdb_vsxregset_t): Change array type size to
5443 PPC_LINUX_SIZEOF_VSXREGSET.
5444 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5445 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5446 PPC_LINUX_SIZEOF_VSXREGSET.
5448 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5450 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5451 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5453 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5454 ppc_linux_target_wordsize with tid.
5455 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5457 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5458 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5459 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5460 tid parameter. Remove static specifier.
5461 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5462 (ppc_linux_target_wordsize): New declaration.
5464 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5466 * arch/ppc-linux-common.c: New file.
5467 * arch/ppc-linux-common.h: New file.
5468 * arch/ppc-linux-tdesc.h: New file.
5469 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5470 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5471 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5472 arch/ppc-linux-tdesc.h.
5473 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5474 arch/ppc-linux-tdesc.h.
5475 (ppc_linux_nat_target::read_description): Remove target
5476 description matching code. Fill a ppc_linux_features struct and
5477 call ppc_linux_match_description with it. Move comment about ISA
5478 2.05 to ppc-linux-common.c.
5479 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5480 arch/ppc-linux-tdesc.h.
5481 (ppc_linux_core_read_description): Remove target description
5482 matching code. Fill a ppc_linux_features struct and call
5483 ppc_linux_match_description with it.
5484 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5485 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5486 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5487 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5488 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5489 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5490 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5491 (tdesc_powerpc_e500l): Remove.
5493 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5495 * ada-lang.c (catch_assert_command): Pass empty string instead
5496 of NULL for excep_string argument.
5498 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5500 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5501 the width of the requested register exceeds the width of the
5504 2018-05-21 Tom Tromey <tom@tromey.com>
5506 * printcmd.c (output_command): Remove.
5507 (output_command_const): Rename to output_command.
5508 * valprint.h (output_command): Rename from output_command_const.
5509 * tracepoint.c (trace_dump_actions): Call output_command.
5511 2018-05-21 Tom Tromey <tom@tromey.com>
5513 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5514 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5515 * ada-lang.h (create_ada_exception_catchpoint): Update.
5516 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5518 (create_excep_cond_exprs, ~ada_catchpoint)
5519 (should_stop_exception, print_one_exception)
5520 (print_mention_exception, print_recreate_exception): Update.
5521 (ada_get_next_arg): Remove.
5522 (catch_ada_exception_command_split): Use std::string. Change type
5523 of "excep_string", "cond_string".
5524 (catch_ada_exception_command): Update.
5525 (create_ada_exception_catchpoint): Change type of excep_string.
5526 (ada_exception_sal): Remove excep_string parameter.
5527 (~ada_catchpoint): Remove.
5529 2018-05-21 Tom Tromey <tom@tromey.com>
5531 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5534 2018-05-21 Tom Tromey <tom@tromey.com>
5536 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5537 Return unique_xmalloc_ptr.
5538 (print_it_exception): Update.
5540 2018-05-21 Tom Tromey <tom@tromey.com>
5542 * tracepoint.c (trace_dump_actions): Use std::string.
5544 2018-05-21 Tom Tromey <tom@tromey.com>
5546 * symfile.c (reread_symbols): Use std::string for original_name.
5548 2018-05-21 Tom Tromey <tom@tromey.com>
5550 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5551 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5554 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5556 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5558 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5559 * objfiles.c (get_objfile_bfd_data): Allocate
5560 objfile_per_bfd_storage with obstack_new when allocating on
5563 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5565 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5567 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5568 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5569 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5570 (add_pending): Likewise.
5571 (parse_symbol): Likewise.
5572 (parse_partial_symbols): Likewise.
5573 (psymtab_to_symtab_1): Likewise.
5574 (new_psymtab): Likewise.
5575 (elfmdebug_build_psymtabs): Likewise.
5576 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5577 * objfiles.c (get_objfile_bfd_data): Likewise.
5578 (objfile_register_static_link): Likewise.
5579 * psymtab.c (allocate_psymtab): Likewise.
5580 * stabsread.c (read_member_functions): Likewise.
5581 * xcoffread.c (xcoff_end_psymtab): Likewise.
5583 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5585 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5586 compiler supports std::is_trivially_constructible.
5587 * common/poison.h: Include obstack.h.
5588 (IsMallocable): Define to is_trivially_constructible if the
5589 compiler supports it, define to true_type otherwise.
5593 (XOBNEWVEC): Redefine.
5594 * gdb_obstack.h (obstack_zalloc): New.
5595 (OBSTACK_ZALLOC): Redefine.
5596 (obstack_calloc): New.
5597 (OBSTACK_CALLOC): Redefine.
5599 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5600 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5602 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5603 obstack_calloc/obstack_zalloc.
5604 (gdbarch_obstack_zalloc): Remove.
5605 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5607 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5609 * stack.c (backtrace_command_1): Remove useless variable int i.
5611 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5613 * stack.c (print_frame_info): Fix comment.
5615 2018-05-18 Tom Tromey <tom@tromey.com>
5617 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5618 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5619 (~dwarf2_per_objfile): Update
5620 (dwarf2_get_dwz_file): Use new.
5621 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5624 2018-05-18 Tom Tromey <tom@tromey.com>
5626 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5628 * dwarf2read.c (struct dwp_file): Add constructor and
5630 (open_and_init_dwp_file): Return a unique_ptr.
5631 (dwarf2_per_objfile, create_dwp_hash_table)
5632 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5633 (lookup_dwo_unit_in_dwp): Update.
5634 (open_and_init_dwp_file, get_dwp_file): Update.
5636 2018-05-18 Tom Tromey <tom@tromey.com>
5638 * dwarf2read.c (dwarf2_per_objfile): Update.
5639 (struct mapped_index): Add initializers.
5640 (dwarf2_read_index): Use new.
5641 (dw2_symtab_iter_init): Update.
5642 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5645 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5647 * dwarf2read.c (mapped_index) <total_size>: Remove.
5649 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5651 * unittests/format_pieces-selftests.c (test_format_specifier):
5654 2018-05-18 Tom Tromey <tom@tromey.com>
5656 * c-typeprint.c (maybe_print_hole): New function.
5657 (c_print_type_struct_field_offset): Update.
5658 (c_type_print_base_struct_union): Call maybe_print_hole.
5660 2018-05-17 Keith Seitz <keiths@redhat.com>
5662 * breakpoint.c (build_bpstat_chain): New function, moved from
5664 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5665 If no stop chain is passed, call build_bpstat_chain to build it.
5666 * breakpoint.h (build_bpstat_chain): Declare.
5667 (bpstat_stop_status): Move documentation here from breakpoint.c.
5668 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5669 build the stop chain and pass it to skip_inline_frames.
5670 Pass this stop chain to bpstat_stop_status.
5671 * inline-frame.c: Include breakpoint.h.
5672 (stopped_by_user_bp_inline_frame): New function.
5673 (skip_inline_frames): Add parameter `stop_chain'.
5674 Move documention to inline-frame.h.
5675 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5676 whether the frame should be elided.
5677 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5678 Add moved documentation and update for new parameter.
5680 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5683 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5684 unittests/format_pieces-selftests.c.
5685 * common/format.h (format_piece) <operator==>: New.
5686 (format_pieces) <operator[]>: Remove.
5687 * common/format.c (format_pieces::format_pieces): Handle \e.
5688 * unittests/format_pieces-selftests.c: New.
5690 2018-05-17 Tom Tromey <tom@tromey.com>
5693 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5694 (dw2_instantiate_symtab): Add skip_partial parameter.
5695 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5696 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5697 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5698 (dw2_expand_symtabs_matching_one)
5699 (dw2_find_pc_sect_compunit_symtab)
5700 (dw2_debug_names_lookup_symbol)
5701 (dw2_debug_names_expand_symtabs_for_function): Update.
5702 (init_cutu_and_read_dies): Add skip_partial parameter.
5703 (process_psymtab_comp_unit, build_type_psymtabs_1)
5704 (process_skeletonless_type_unit, load_partial_comp_unit)
5705 (psymtab_to_symtab_1): Update.
5706 (load_full_comp_unit): Add skip_partial parameter.
5707 (process_imported_unit_die, dwarf2_read_addr_index)
5708 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5709 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5710 (read_signatured_type): Update.
5712 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5714 * value.c (release_value): Remove unused variable.
5715 (record_latest_value): Likewise.
5716 (access_value_history): Likewise.
5717 (preserve_values): Likewise.
5719 2018-05-17 Tom Tromey <tom@tromey.com>
5721 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5724 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5727 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5728 Also handle registers whose width is not a multiple of
5730 (linux_nat_trad_target::store_register): Likewise.
5732 2018-05-16 Tom Tromey <tom@tromey.com>
5734 * gdbcore.h (core_bfd): Redefine.
5735 * corelow.c (core_target::close): Update.
5736 (core_target_open): Update.
5737 * progspace.h (struct program_space) <cbfd>: Now a
5740 2018-05-16 Tom Tromey <tom@tromey.com>
5743 * symfile-add-flags.h (enum symfile_add_flags)
5744 <SYMFILE_NOT_FILENAME>: New constant.
5745 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5746 objfile name from BFD.
5747 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5748 * minidebug.c (find_separate_debug_file_in_section): Put
5749 ".gnu_debugdata" into BFD's file name.
5751 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5753 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5756 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5759 * aarch64-tdep.c (aarch64_analyze_prologue,
5760 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5761 Indicate not interested in errors.
5763 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5765 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5766 Supply the MIPS_ZERO_REGNUM register.
5768 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5770 * mips-tdep.c (mask_address_var): Make variable static.
5772 2018-05-14 Tom Tromey <tom@tromey.com>
5774 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5776 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5778 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5779 FXSAVE_ADDR for the mxcsr register.
5781 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5783 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5785 2018-05-11 Pedro Alves <palves@redhat.com>
5787 * corelow.c (core_target) <core_target>: No longer inline.
5788 Initialize m_core_gdbarch, m_core_vec and build the section table
5790 <~core_target>: New.
5791 <core_gdbarch, get_core_register_section>: New methods.
5792 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5793 factored out from ...
5794 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5796 (sniff_core_bfd): Add gdbarch parameter.
5797 (core_close): Delete, merged into ...
5798 (core_target::close): ... here. Delete self.
5799 (core_close_cleanup): Delete.
5800 (core_target_open): Allocate a core_target on the heap. Use a
5801 unique_ptr instead of a cleanup. Bits moved into the core_target
5802 ctor. Adjust to use core_target methods instead of globals.
5803 (get_core_register_section): Rename to ...
5804 (core_target::get_core_register_section): ... this and adjust.
5805 (struct get_core_registers_cb_data): New.
5806 (get_core_registers_cb): Use it. Use bool.
5807 (core_target::fetch_registers, core_target::files_info)
5808 (core_target::xfer_partial, core_target::read_description)
5809 (core_target::pid_to, core_target::thread_name): Adjust to
5810 reference class fields instead of globals.
5811 * target.h (struct target_ops_deleter, target_ops_up): New.
5813 2018-05-11 Pedro Alves <palves@redhat.com>
5815 * corefile.c (core_file_command): Move to corelow.c.
5816 * corelow.c (the_core_target): Delete.
5817 (core_file_command): Moved from corefile.c. Check exec_bfd
5818 instead of the_core_target. Use target_detach instead of calling
5819 into the_core_target directly.
5820 (maybe_say_no_core_file_now): New.
5821 (core_target::detach): Use it.
5822 (_initialize_corelow): Remove references to the_core_target.
5823 * gdbcore.h (the_core_target): Delete.
5825 2018-05-11 Tom Tromey <tromey@redhat.com>
5826 Pedro Alves <palves@redhat.com>
5828 * corefile.c (core_bfd): Remove.
5829 * gdbcore.h (core_bfd): Now a macro.
5830 * progspace.h (struct program_space) <cbfd>: New field.
5832 2018-05-11 Tom Tromey <tom@tromey.com>
5834 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5837 2018-05-10 Tom Tromey <tom@tromey.com>
5839 * configure: Rebuild.
5840 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5842 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5845 * regformats/regdat.sh: Adjust script, following the addition
5846 of the new expedite_regs parameter to init_target_desc.
5848 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5851 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5852 set_gdbarch_significant_addr_bit.
5853 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5854 set_gdbarch_significant_addr_bit.
5855 * utils.c (address_significant): Update to sign extend addr.
5857 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5859 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5860 (xtensa_linux_init_abi): Limit tdep->num_regs by
5861 tdep->num_nopriv_regs.
5862 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5863 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5866 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5868 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5870 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5872 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5873 (I387_MXCSR_INIT_VAL): New constant.
5874 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5875 buffer if it was supplied by the inferior.
5876 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5877 (i387_xsave_get_clear_bv): New function.
5878 (i387_supply_xsave): Only read x87 control registers from the
5879 xsave buffer if the feature is enabled, and the state will have
5880 been written, otherwise, provide a suitable default.
5881 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5882 including x87 control registers. Update control registers if they
5883 have changed from the default value, and mark features as enabled
5885 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5887 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5889 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5891 2018-05-07 Tom Tromey <tom@tromey.com>
5893 * configure: Rebuild.
5894 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5896 2018-05-07 Tom Tromey <tom@tromey.com>
5899 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5900 bit. Use correct value for VDIV.
5902 2018-05-04 Tom Tromey <tom@tromey.com>
5904 * configure: Rebuild.
5905 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5907 2018-05-04 Tom Tromey <tom@tromey.com>
5909 * linux-record.c (record_linux_system_call) <case
5910 RECORD_SYS_RECVFROM>: Add "break".
5912 2018-05-04 Tom Tromey <tom@tromey.com>
5914 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5915 Add missing "break".
5916 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5917 Add missing "break".
5919 2018-05-04 Tom Tromey <tom@tromey.com>
5921 * rs6000-tdep.c (ppc_process_record_op4)
5922 (ppc_process_record_op63): Add fall-through comment.
5924 2018-05-04 Tom Tromey <tom@tromey.com>
5926 * i386-tdep.c (i386_process_record): Add fall-through comment.
5928 2018-05-04 Tom Tromey <tom@tromey.com>
5930 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5933 2018-05-04 Tom Tromey <tom@tromey.com>
5935 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5936 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5937 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5939 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5941 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5944 2018-05-04 Tom Tromey <tom@tromey.com>
5946 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5948 2018-05-04 Tom Tromey <tom@tromey.com>
5950 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5951 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5952 * symfile.c (section_is_mapped): Fix fall-through comment.
5953 * stabsread.c (define_symbol, read_member_functions): Fix
5954 fall-through comment.
5955 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5957 * remote.c (remote_wait_as): Fix fall-through comment.
5958 * p-exp.y (yylex): Fix fall-through comment.
5959 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5961 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5962 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5963 * jv-exp.y (yylex): Fix fall-through comment.
5964 * go-exp.y (lex_one_token): Fix fall-through comment.
5965 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5966 fall-through comment.
5967 * f-exp.y (yylex): Fix fall-through comment.
5968 * dwarf2read.c (process_die): Fix fall-through comments.
5969 * dbxread.c (process_one_symbol): Fix fall-through comment.
5970 * d-exp.y (lex_one_token): Fix fall-through comment.
5971 * cp-name-parser.y (yylex): Fix fall-through comment.
5972 * coffread.c (coff_symtab_read): Fix fall-through comment.
5973 * c-exp.y (lex_one_token): Fix fall-through comment.
5974 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5976 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5979 2018-05-04 Tom Tromey <tom@tromey.com>
5982 * NEWS: Mention gdb.execute change.
5983 * gdbcmd.h (execute_control_command): Don't declare.
5984 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5985 execute_control_commands, execute_control_commands_to_string.
5986 * cli/cli-script.h (execute_control_commands)
5987 (execute_control_commands_to_string): Declare.
5988 (execute_control_command): Add from_tty parameter.
5989 * cli/cli-script.c (execute_control_commands)
5990 (execute_control_commands_to_string): New functions.
5991 (execute_user_command): Use execute_control_commands.
5992 (execute_control_command_1): Add "from_tty" parameter. Update.
5993 (execute_control_command): Likewise.
5995 2018-05-04 Tom Tromey <tom@tromey.com>
5998 * NEWS: Mention that breakpoint commands are writable.
5999 * python/py-breakpoint.c (bppy_set_commands): New function.
6000 (breakpoint_object_getset) <"commands">: Use it.
6002 2018-05-04 Tom Tromey <tom@tromey.com>
6004 * tracepoint.c (actions_command): Update.
6005 * mi/mi-cmd-break.c (mi_command_line_array)
6006 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6007 (mi_read_next_line): Remove.
6008 (mi_cmd_break_commands): Update.
6009 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6011 * cli/cli-script.c (get_command_line): Update.
6012 (process_next_line): Use function_view. Constify.
6013 (recurse_read_control_structure, read_command_lines)
6014 (read_command_lines_1): Change argument types to function_view.
6015 (do_define_command, document_command): Update.
6016 * breakpoint.h (check_tracepoint_command): Don't declare.
6017 * breakpoint.c (check_tracepoint_command): Remove.
6018 (commands_command_1, create_tracepoint_from_upload): Update.
6020 2018-05-04 Tom Tromey <tom@tromey.com>
6023 * cli/cli-script.h (enum command_control_type) <define_control>:
6025 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6026 (build_command_line, execute_control_command_1)
6027 (process_next_line): Likewise.
6028 (do_define_command): New function, extracted from define_command.
6029 (define_command): Use it.
6031 2018-05-04 Tom Tromey <tom@tromey.com>
6033 * tracepoint.c (actions_command): Update.
6034 * cli/cli-script.h (read_command_lines): Update.
6035 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6036 (MAX_TMPBUF): Remove define.
6037 (define_command): Use string_printf.
6038 (document_command): Likewise.
6039 * breakpoint.c (commands_command_1): Update.
6041 2018-05-04 Tom Tromey <tom@tromey.com>
6043 * top.c (execute_command): Update.
6044 * cli/cli-script.h (print_command_lines): Now varargs.
6045 * cli/cli-script.c (print_command_lines): Now varargs.
6046 (execute_control_command_1) <case while_control, case if_control>:
6049 2018-05-04 Tom Tromey <tom@tromey.com>
6051 * tracepoint.c (all_tracepoint_actions): Rename from
6052 all_tracepoint_actions_and_cleanup. Change return type.
6053 (actions_command, encode_actions_1, encode_actions)
6054 (trace_dump_actions, tdump_command): Update.
6055 * remote.c (remote_download_command_source): Update.
6056 * python/python.c (gdbpy_eval_from_control_command)
6057 (python_command, python_interactive_command): Update.
6058 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6059 * guile/guile.c (guile_command)
6060 (gdbscm_eval_from_control_command, guile_command): Update.
6061 * compile/compile.c (compile_code_command)
6062 (compile_print_command, compile_to_object): Update.
6063 * cli/cli-script.h (struct command_lines_deleter): New.
6064 (counted_command_line): New typedef.
6065 (struct command_line): Add constructor, destructor.
6066 <body_list>: Remove.
6067 <body_list_0, body_list_1>: New members.
6068 (command_line_up): Remove typedef.
6069 (read_command_lines, read_command_lines_1, get_command_line):
6071 (copy_command_lines): Don't declare.
6072 * cli/cli-script.c (build_command_line): Use "new".
6073 (get_command_line): Return counted_command_line.
6074 (print_command_lines, execute_user_command)
6075 (execute_control_command_1, while_command, if_command): Update.
6076 (realloc_body_list): Remove.
6077 (process_next_line, recurse_read_control_structure): Update.
6078 (read_command_lines, read_command_lines_1): Return counted_command_line.
6079 (free_command_lines): Use "delete".
6080 (copy_command_lines): Remove.
6081 (define_command, document_command, show_user_1): Update.
6082 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6083 a counted_command_line.
6084 * breakpoint.h (counted_command_line): Remove typedef.
6085 (breakpoint_set_commands): Update.
6086 * breakpoint.c (check_no_tracepoint_commands)
6087 (validate_commands_for_breakpoint): Update.
6088 (breakpoint_set_commands): Change commands to be a
6089 counted_command_line.
6090 (commands_command_1, update_dprintf_command_list)
6091 (create_tracepoint_from_upload): Update.
6093 2018-05-04 Tom Tromey <tom@tromey.com>
6095 * cli/cli-decode.h (cmd_list_element): New constructor.
6096 (~cmd_list_element): New destructor.
6097 (struct cmd_list_element): Add initializers.
6098 * cli/cli-decode.c (do_add_cmd): Use "new".
6099 (delete_cmd): Use "delete".
6101 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6102 Pedro Alves <palves@redhat.com>
6104 PR breakpoints/19806 and support for PR external/20207.
6105 * NEWS: Mention Aarch64 watchpoint improvements.
6106 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6107 watchpoints and PR external/20207 watchpoints.
6108 * nat/aarch64-linux-hw-point.c
6109 (kernel_supports_any_contiguous_range): New.
6110 (aarch64_watchpoint_offset): New.
6111 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6112 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6113 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6114 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6115 next_addr_orig_p. Support PR external/20207 watchpoints.
6116 (aarch64_downgrade_regs): New.
6117 (aarch64_dr_state_insert_one_point): New parameters offset and
6119 (aarch64_dr_state_remove_one_point): Likewise.
6120 (aarch64_handle_breakpoint): Update caller.
6121 (aarch64_handle_aligned_watchpoint): Likewise.
6122 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6124 (aarch64_linux_set_debug_regs): Remove const from state. Call
6125 aarch64_downgrade_regs.
6126 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6127 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6128 (DR_CONTROL_MASK): ... this.
6129 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6130 (unsigned int aarch64_watchpoint_offset): New prototype.
6131 (aarch64_linux_set_debug_regs): Remove const from state.
6132 * utils.c (align_up, align_down): Move to ...
6133 * common/common-utils.c (align_up, align_down): ... here.
6134 * utils.h (align_up, align_down): Move to ...
6135 * common/common-utils.h (align_up, align_down): ... here.
6137 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6139 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6140 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6141 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6142 Re-implement to match the ABI as summarized in GCC's
6143 gcc/config/sparc/sparc.c. All callers updated.
6144 (sparc32_store_arguments): Remove assertion.
6146 2018-05-04 Tom Tromey <tom@tromey.com>
6148 * printcmd.c: Don't include tui.h.
6149 (decode_format): Use skip_spaces.
6151 2018-05-04 Tom Tromey <tom@tromey.com>
6154 * printcmd.c (last_count): New global.
6155 (x_command): Use saved count when repeating.
6157 2018-05-04 Tom Tromey <tom@tromey.com>
6159 * nto-procfs.c (do_closedir_cleanup): Remove.
6160 (procfs_pidlist): Use gdb_dir_up.
6161 * procfs.c (do_closedir_cleanup): Remove.
6162 (proc_update_threads): Use gdb_dir_up.
6163 * common/filestuff.h (struct gdb_dir_deleter): New.
6164 (gdb_dir_up): New typedef.
6166 2018-05-04 Tom Tromey <tom@tromey.com>
6168 * ada-lang.c (print_mention_exception): Use std::string.
6170 2018-05-04 Tom Tromey <tom@tromey.com>
6172 * ada-lang.c (create_excep_cond_exprs): Update.
6173 (ada_exception_catchpoint_cond_string): Use std::string.
6175 2018-05-04 Tom Tromey <tom@tromey.com>
6177 * ada-lang.c (xget_renaming_scope): Return std::string.
6178 (old_renaming_is_invisible): Update.
6180 2018-05-04 Tom Tromey <tom@tromey.com>
6182 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6183 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6185 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6187 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6189 2018-05-04 Tom Tromey <tom@tromey.com>
6191 * remote.c (remote_query_supported_append): Change type.
6192 (remote_check_symbols): Update.
6194 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6197 * configure.ac: Prepend libpython.
6198 * python/python-config.py: Likewise.
6199 * configure: Regenerate.
6201 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6203 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6205 2018-05-03 Pedro Alves <palves@redhat.com>
6208 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6209 override. Write 'true' instead of '1'.
6210 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6213 2018-05-02 Pedro Alves <palves@redhat.com>
6215 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6216 add_inf_child_target.
6217 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6218 add_inf_child_target.
6219 * aix-thread.c (aix_thread_target_info): New.
6220 (aix_thread_target) <shortname, longname, doc>: Delete.
6222 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6223 add_inf_child_target.
6224 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6225 add_inf_child_target.
6226 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6227 add_inf_child_target.
6228 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6229 add_inf_child_target.
6230 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6231 add_inf_child_target.
6232 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6233 add_inf_child_target.
6234 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6235 add_inf_child_target.
6236 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6237 add_inf_child_target.
6238 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6239 add_inf_child_target.
6240 * bfd-target.c (target_bfd_target_info): New.
6241 (target_bfd) <shortname, longname, doc>: Delete.
6243 * bsd-kvm.c (bsd_kvm_target_info): New.
6244 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6246 (bsd_kvm_target::open): Rename to ...
6247 (bsd_kvm_target_open): ... this. Adjust.
6248 * bsd-uthread.c (bsd_uthread_target_info): New.
6249 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6251 * corefile.c (core_file_command): Adjust.
6252 * corelow.c (core_target_info): New.
6253 (core_target) <shortname, longname, doc>: Delete.
6255 (core_target::open): Rename to ...
6256 (core_target_open): ... this. Adjust.
6257 * ctf.c (ctf_target_info): New.
6258 (ctf_target) <shortname, longname, doc>: Delete.
6260 (ctf_target::open): Rename to ...
6261 (ctf_target_open): ... this.
6262 (_initialize_ctf): Adjust.
6263 * exec.c (exec_target_info): New.
6264 (exec_target) <shortname, longname, doc>: Delete.
6266 (exec_target::open): Rename to ...
6267 (exec_target_open): ... this.
6268 * gdbcore.h (core_target_open): Declare.
6269 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6270 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6271 add_inf_child_target.
6272 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6273 add_inf_child_target.
6274 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6275 add_inf_child_target.
6276 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6277 add_inf_child_target.
6278 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6279 add_inf_child_target.
6280 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6281 add_inf_child_target.
6282 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6283 add_inf_child_target.
6284 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6285 add_inf_child_target.
6286 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6287 add_inf_child_target.
6288 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6289 add_inf_child_target.
6290 * inf-child.c (inf_child_target_info): New.
6291 (inf_child_target::info): New.
6292 (inf_child_open_target): Remove 'target' parameter. Use
6293 get_native_target instead.
6294 (inf_child_target::open): Delete.
6295 (add_inf_child_target): New.
6296 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6299 (add_inf_child_target): Declare.
6300 (inf_child_open_target): Declare.
6301 * linux-thread-db.c (thread_db_target_info): New.
6302 (thread_db_target) <shortname, longname, doc>: Delete.
6304 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6305 add_inf_child_target.
6306 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6307 add_inf_child_target.
6308 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6309 add_inf_child_target.
6310 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6311 add_inf_child_target.
6312 * make-target-delegates (print_class): Adjust.
6313 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6314 add_inf_child_target.
6315 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6316 add_inf_child_target.
6317 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6318 add_inf_child_target.
6319 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6320 add_inf_child_target.
6321 * nto-procfs.c (nto_native_target_info): New.
6322 (nto_procfs_target_native) <shortname, longname, doc>:
6325 (nto_procfs_target_info): New.
6326 (nto_procfs_target_procfs) <shortname, longname, doc>:
6329 (init_procfs_targets): Adjust.
6330 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6331 add_inf_child_target.
6332 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6333 add_inf_child_target.
6334 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6335 add_inf_child_target.
6336 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6337 add_inf_child_target.
6338 * ravenscar-thread.c (ravenscar_target_info): New.
6339 (ravenscar_thread_target) <shortname, longname, doc>:
6342 * record-btrace.c (record_btrace_target_info):
6343 (record_btrace_target) <shortname, longname, doc>: Delete.
6345 (record_btrace_target::open): Rename to ...
6346 (record_btrace_target_open): ... this. Adjust.
6347 * record-full.c (record_longname, record_doc): New.
6348 (record_full_base_target) <shortname, longname, doc>: Delete.
6350 (record_full_target_info): New.
6351 (record_full_target): <shortname>: Delete.
6353 (record_full_core_open_1, record_full_open_1): Update comments.
6354 (record_full_base_target::open): Rename to ...
6355 (record_full_open): ... this.
6356 (cmd_record_full_restore): Update.
6357 (_initialize_record_full): Update.
6358 * remote-sim.c (remote_sim_target_info): New.
6359 (gdbsim_target) <shortname, longname, doc>: Delete.
6361 (gdbsim_target::open): Rename to ...
6362 (gdbsim_target_open): ... this.
6363 (_initialize_remote_sim): Adjust.
6364 * remote.c (remote_doc): New.
6365 (remote_target_info): New.
6366 (remote_target) <shortname, longname, doc>: Delete.
6368 (extended_remote_target_info): New.
6369 (extended_remote_target) <shortname, longname, doc>: Delete.
6371 (remote_target::open_1): Make static. Adjust.
6372 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6373 * s390-linux-nat.c (_initialize_s390_nat): Use
6374 add_inf_child_target.
6375 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6376 add_inf_child_target.
6377 * sol-thread.c (thread_db_target_info): New.
6378 (sol_thread_target) <shortname, longname, doc>: Delete.
6380 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6381 add_inf_child_target.
6382 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6383 add_inf_child_target.
6384 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6385 add_inf_child_target.
6386 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6387 add_inf_child_target.
6388 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6389 add_inf_child_target.
6390 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6391 add_inf_child_target.
6392 * spu-linux-nat.c (_initialize_spu_nat): Use
6393 add_inf_child_target.
6394 * spu-multiarch.c (spu_multiarch_target_info): New.
6395 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6397 * target-delegates.c: Regenerate.
6398 * target.c: Include <unordered_map>.
6399 (target_ops_p): Delete.
6400 (DEF_VEC_P(target_ops_p)): Delete.
6401 (target_factories): New.
6402 (test_target_info): New.
6403 (test_target_ops::info): New.
6404 (open_target): Adjust to use target_factories.
6405 (add_target_with_completer): Rename to ...
6406 (add_target): ... this. Change prototype. Register target_info
6407 and open callback in target_factories. Register target_info in
6408 command context instead of target_ops.
6409 (add_target): Delete old implementation.
6410 (add_deprecated_target_alias): Change prototype. Adjust.
6411 (the_native_target): New.
6412 (set_native_target, get_native_target): New.
6413 (find_default_run_target): Use the_native_target.
6414 (find_attach_target, find_run_target): Simplify.
6415 (target_ops::open): Delete.
6416 (dummy_target_info): New.
6417 (dummy_target::shortname, dummy_target::longname)
6418 (dummy_target::doc): Delete.
6419 (dummy_target::info): New.
6420 (debug_target::shortname, debug_target::longname)
6421 (debug_target::doc): Delete.
6422 (debug_target::info): New.
6423 * target.h (struct target_info): New.
6424 (target_ops::~target_ops): Add comment.
6425 (target_ops::info): New.
6426 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6427 longer virtual. Implement in terms of target_info.
6428 (set_native_target, get_native_target): Declare.
6429 (target_open_ftype): New.
6430 (add_target, add_target_with_completer)
6431 (add_deprecated_target_alias): Change prototype.
6432 (test_target) <shortname, longname, doc>: Delete.
6434 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6435 add_inf_child_target.
6436 * tracefile-tfile.c (tfile_target_info): New.
6437 (tfile_target) <shortname, longname, doc>: Delete.
6439 (tfile_target::open): Rename to ...
6440 (tfile_target_open): ... this.
6441 (_initialize_tracefile_tfile): Adjust.
6442 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6443 add_inf_child_target.
6444 * windows-nat.c (_initialize_windows_nat): Use
6445 add_inf_child_target.
6446 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6447 add_inf_child_target.
6449 2018-05-02 Pedro Alves <palves@redhat.com>
6451 * linux-nat.h (linux_nat_target) <low_new_thread,
6452 low_delete_thread, low_new_fork, low_forget_process,
6453 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6454 New virtual methods.
6455 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6456 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6457 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6458 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6459 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6461 * linux-fork.c (delete_fork): Adjust to call low method.
6462 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6463 (linux_nat_new_fork, linux_nat_forget_process_hook)
6464 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6465 (linux_nat_status_is_event):
6466 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6467 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6469 (sigtrap_is_event): Rename to ...
6470 (linux_nat_target::low_status_is_event): ... this.
6471 (linux_nat_set_status_is_event): Delete.
6472 (save_stop_reason, linux_nat_wait_1)
6473 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6475 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6476 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6477 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6478 (linux_nat_set_prepare_to_resume): Delete.
6479 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6480 low virtual methods.
6481 * amd64-linux-nat.c: Likewise.
6482 * arm-linux-nat.c: Likewise.
6483 * i386-linux-nat.c: Likewise.
6484 * ia64-linux-nat.c: Likewise.
6485 * mips-linux-nat.c: Likewise.
6486 * ppc-linux-nat.c: Likewise.
6487 * s390-linux-nat.c: Likewise.
6488 * sparc64-linux-nat.c: Likewise.
6489 * x86-linux-nat.c: Likewise.
6490 * x86-linux-nat.h: Include "nat/x86-linux.h".
6491 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6492 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6495 2018-05-02 Pedro Alves <palves@redhat.com>
6497 * target.h (target_ops)
6498 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6499 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6500 stopped_by_watchpoint, have_continuable_watchpoint,
6501 stopped_data_address, watchpoint_addr_within_range,
6502 can_accel_watchpoint_condition, can_run, thread_alive,
6503 has_all_memory, has_memory, has_stack, has_registers,
6504 has_execution, can_async_p, is_async_p, supports_non_stop,
6505 always_non_stop_p, can_execute_reverse, supports_multi_process,
6506 supports_enable_disable_tracepoint,
6507 supports_disable_randomization, supports_string_tracing,
6508 supports_evaluation_of_breakpoint_conditions,
6509 can_run_breakpoint_commands, filesystem_is_local,
6510 can_download_tracepoint, get_trace_state_variable_value,
6511 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6512 record_is_replaying, record_will_replay,
6513 augmented_libraries_svr4_read>: Adjust to return bool.
6514 * aarch64-linux-nat.c: All implementations adjusted.
6515 * aix-thread.c: All implementations adjusted.
6516 * arm-linux-nat.c: All implementations adjusted.
6517 * breakpoint.c: All implementations adjusted.
6518 * bsd-kvm.c: All implementations adjusted.
6519 * bsd-uthread.c: All implementations adjusted.
6520 * corelow.c: All implementations adjusted.
6521 * ctf.c: All implementations adjusted.
6522 * darwin-nat.c: All implementations adjusted.
6523 * darwin-nat.h: All implementations adjusted.
6524 * exec.c: All implementations adjusted.
6525 * fbsd-nat.c: All implementations adjusted.
6526 * fbsd-nat.h: All implementations adjusted.
6527 * gnu-nat.c: All implementations adjusted.
6528 * gnu-nat.h: All implementations adjusted.
6529 * go32-nat.c: All implementations adjusted.
6530 * ia64-linux-nat.c: All implementations adjusted.
6531 * inf-child.c: All implementations adjusted.
6532 * inf-child.h: All implementations adjusted.
6533 * inf-ptrace.c: All implementations adjusted.
6534 * inf-ptrace.h: All implementations adjusted.
6535 * linux-nat.c: All implementations adjusted.
6536 * linux-nat.h: All implementations adjusted.
6537 * mips-linux-nat.c: All implementations adjusted.
6538 * nto-procfs.c: All implementations adjusted.
6539 * ppc-linux-nat.c: All implementations adjusted.
6540 * procfs.c: All implementations adjusted.
6541 * ravenscar-thread.c: All implementations adjusted.
6542 * record-btrace.c: All implementations adjusted.
6543 * record-full.c: All implementations adjusted.
6544 * remote-sim.c: All implementations adjusted.
6545 * remote.c: All implementations adjusted.
6546 * s390-linux-nat.c: All implementations adjusted.
6547 * sol-thread.c: All implementations adjusted.
6548 * spu-multiarch.c: All implementations adjusted.
6549 * target-delegates.c: All implementations adjusted.
6550 * target.c: All implementations adjusted.
6551 * target.h: All implementations adjusted.
6552 * tracefile-tfile.c: All implementations adjusted.
6553 * tracefile.c: All implementations adjusted.
6554 * tracefile.h: All implementations adjusted.
6555 * windows-nat.c: All implementations adjusted.
6556 * x86-linux-nat.h: All implementations adjusted.
6557 * x86-nat.h: All implementations adjusted.
6559 2018-05-02 Pedro Alves <palves@redhat.com>
6561 * make-target-delegates (scan_target_h): Don't trim lines here.
6562 Replace sequences of tabs and/or whitespace with a single
6564 (top level, parsing methods): Trim each line before processing it
6567 2018-05-02 Pedro Alves <palves@redhat.com>
6568 John Baldwin <jhb@freebsd.org>
6570 * target.h (enum strata) <debug_stratum>: New.
6571 (struct target_ops) <all delegation methods>: Replace by C++
6572 virtual methods, and drop "to_" prefix. All references updated
6574 <to_shortname, to_longname, to_doc, to_data,
6575 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6576 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6577 virtual methods. All references updated throughout.
6578 <can_attach, supports_terminal_ours, can_create_inferior,
6579 get_thread_control_capabilities, attach_no_wait>: New
6581 <insert_breakpoint, remove_breakpoint>: Now
6582 TARGET_DEFAULT_NORETURN methods.
6583 <info_proc>: Now returns bool.
6585 (OPS_MAGIC): Delete.
6586 (current_target): Delete. All references replaced by references
6588 (target_stack): ... this. New.
6589 (target_shortname, target_longname): Adjust.
6590 (target_can_run): Now a function declaration.
6591 (default_child_has_all_memory, default_child_has_memory)
6592 (default_child_has_stack, default_child_has_registers)
6593 (default_child_has_execution): Remove target_ops parameter.
6594 (complete_target_initialization): Delete.
6595 (memory_breakpoint_target): New template class.
6596 (test_target_ops): Refactor as a C++ class with virtual methods.
6597 * make-target-delegates (NAME_PART): Tighten.
6598 (POINTER_PART, CP_SYMBOL): New.
6599 (SIMPLE_RETURN_PART): Reimplement.
6600 (VEC_RETURN_PART): Expect less.
6601 (RETURN_PART, VIRTUAL_PART): New.
6602 (METHOD): Adjust to C++ virtual methods.
6603 (scan_target_h): Remove reference to C99.
6604 (dname): Output "target_ops::" prefix.
6605 (write_function_header): Adjust to output a C++ class method.
6606 (write_declaration): New.
6607 (write_delegator): Adjust to output a C++ class method.
6608 (tdname): Output "dummy_target::" prefix.
6609 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6611 (tdefault_names, debug_names): Delete.
6612 (return_types, tdefaults, styles, argtypes_array): New.
6613 (top level): All methods are delegators.
6615 (top level): Print dummy_target and debug_target classes.
6616 * target-delegates.c: Regenerate.
6617 * target-debug.h (target_debug_print_enum_info_proc_what)
6618 (target_debug_print_thread_control_capabilities)
6619 (target_debug_print_thread_info_p): New.
6620 * target.c (dummy_target): Delete.
6621 (the_dummy_target, the_debug_target): New.
6622 (target_stack): Now extern.
6623 (set_targetdebug): Push/unpush debug target.
6624 (default_child_has_all_memory, default_child_has_memory)
6625 (default_child_has_stack, default_child_has_registers)
6626 (default_child_has_execution): Remove target_ops parameter.
6627 (complete_target_initialization): Delete.
6628 (add_target_with_completer): No longer call
6629 complete_target_initialization.
6630 (target_supports_terminal_ours): Use regular delegation.
6631 (update_current_target): Delete.
6632 (push_target): No longer check magic number. Don't call
6633 update_current_target.
6634 (unpush_target): Don't call update_current_target.
6635 (target_is_pushed): No longer check magic number.
6636 (target_require_runnable): Skip for all stratums over
6638 (target_ops::info_proc): New.
6639 (target_info_proc): Use find_target_at and
6640 find_default_run_target.
6641 (target_supports_disable_randomization): Use regular delegation.
6642 (target_get_osdata): Use find_target_at.
6643 (target_ops::open, target_ops::close, target_ops::can_attach)
6644 (target_ops::attach, target_ops::can_create_inferior)
6645 (target_ops::create_inferior, target_ops::can_run)
6646 (target_can_run): New.
6647 (default_fileio_target): Use regular delegation.
6648 (target_ops::fileio_open, target_ops::fileio_pwrite)
6649 (target_ops::fileio_pread, target_ops::fileio_fstat)
6650 (target_ops::fileio_close, target_ops::fileio_unlink)
6651 (target_ops::fileio_readlink): New.
6652 (target_fileio_open_1, target_fileio_unlink)
6653 (target_fileio_readlink): Always call the target method. Handle
6655 (return_zero, return_zero_has_execution): Delete.
6656 (init_dummy_target): Delete.
6657 (dummy_target::dummy_target, dummy_target::shortname)
6658 (dummy_target::longname, dummy_target::doc)
6659 (debug_target::debug_target, debug_target::shortname)
6660 (debug_target::longname, debug_target::doc): New.
6661 (target_supports_delete_record): Use regular delegation.
6662 (setup_target_debug): Delete.
6663 (maintenance_print_target_stack): Skip debug_stratum.
6664 (initialize_targets): Instantiate the_dummy_target and
6666 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6668 (target_auxv_search, fprint_target_auxv): Adjust.
6669 (info_auxv_command): Adjust to use target_stack.
6670 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6671 * exceptions.c (print_flush): Handle a NULL target_stack.
6672 * regcache.c (target_ops_no_register): Refactor as class with
6675 * exec.c (exec_target): New class.
6676 (exec_ops): Now an exec_target.
6677 (exec_open, exec_close_1, exec_get_section_table)
6678 (exec_xfer_partial, exec_files_info, exec_has_memory)
6679 (exec_make_note_section): Refactor as exec_target methods.
6680 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6682 (exec_target::find_memory_regions): New.
6683 (_initialize_exec): Don't call init_exec_ops.
6684 * gdbcore.h (exec_file_clear): Delete.
6686 * corefile.c (core_target): Delete.
6687 (core_file_command): Adjust.
6688 * corelow.c (core_target): New class.
6689 (the_core_target): New.
6690 (core_close): Remove target_ops parameter.
6691 (core_close_cleanup): Adjust.
6692 (core_target::close): New.
6693 (core_open, core_detach, get_core_registers, core_files_info)
6694 (core_xfer_partial, core_thread_alive, core_read_description)
6695 (core_pid_to_str, core_thread_name, core_has_memory)
6696 (core_has_stack, core_has_registers, core_info_proc): Rework as
6697 core_target methods.
6698 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6699 (_initialize_corelow): Initialize the_core_target.
6700 * gdbcore.h (core_target): Delete.
6701 (the_core_target): New.
6703 * ctf.c: (ctf_target): New class.
6704 (ctf_ops): Now a ctf_target.
6705 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6706 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6707 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6709 (init_ctf_ops): Delete.
6710 (_initialize_ctf): Don't call it.
6711 * tracefile-tfile.c (tfile_target): New class.
6712 (tfile_ops): Now a tfile_target.
6713 (tfile_open, tfile_close, tfile_files_info)
6714 (tfile_get_tracepoint_status, tfile_trace_find)
6715 (tfile_fetch_registers, tfile_xfer_partial)
6716 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6717 Refactor as tfile_target methods.
6718 (tfile_xfer_partial_features): Remove target_ops parameter.
6719 (init_tfile_ops): Delete.
6720 (_initialize_tracefile_tfile): Don't call it.
6721 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6722 (tracefile_has_stack, tracefile_has_registers)
6723 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6724 tracefile_target methods.
6725 (init_tracefile_ops): Delete.
6726 (tracefile_target::tracefile_target): New.
6727 * tracefile.h: Include "target.h".
6728 (tracefile_target): New class.
6729 (init_tracefile_ops): Delete.
6731 * spu-multiarch.c (spu_multiarch_target): New class.
6732 (spu_ops): Now a spu_multiarch_target.
6733 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6734 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6735 (spu_search_memory, spu_mourn_inferior): Refactor as
6736 spu_multiarch_target methods.
6737 (init_spu_ops): Delete.
6738 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6739 complete_target_initialization.
6741 * ravenscar-thread.c (ravenscar_thread_target): New class.
6742 (ravenscar_ops): Now a ravenscar_thread_target.
6743 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6744 (ravenscar_thread_alive, ravenscar_pid_to_str)
6745 (ravenscar_fetch_registers, ravenscar_store_registers)
6746 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6747 (ravenscar_stopped_by_hw_breakpoint)
6748 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6749 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6750 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6752 (init_ravenscar_thread_ops): Delete.
6753 (_initialize_ravenscar): Remove references to
6754 init_ravenscar_thread_ops and complete_target_initialization.
6756 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6757 (bsd_uthread_target): New class.
6758 (bsd_uthread_ops): Now a bsd_uthread_target.
6759 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6760 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6761 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6762 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6763 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6764 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6765 (bsd_uthread_target): Delete function.
6766 (_initialize_bsd_uthread): Remove reference to
6767 complete_target_initialization.
6769 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6770 (target_bfd): ... this new class.
6771 (target_bfd_xfer_partial, target_bfd_get_section_table)
6772 (target_bfd_close): Refactor as target_bfd methods.
6773 (target_bfd::~target_bfd): New.
6774 (target_bfd_reopen): Adjust.
6775 (target_bfd::close): New.
6777 * record-btrace.c (record_btrace_target): New class.
6778 (record_btrace_ops): Now a record_btrace_target.
6779 (record_btrace_open, record_btrace_stop_recording)
6780 (record_btrace_disconnect, record_btrace_close)
6781 (record_btrace_async, record_btrace_info)
6782 (record_btrace_insn_history, record_btrace_insn_history_range)
6783 (record_btrace_insn_history_from, record_btrace_call_history)
6784 (record_btrace_call_history_range)
6785 (record_btrace_call_history_from, record_btrace_record_method)
6786 (record_btrace_is_replaying, record_btrace_will_replay)
6787 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6788 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6789 (record_btrace_store_registers, record_btrace_prepare_to_store)
6790 (record_btrace_to_get_unwinder)
6791 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6792 (record_btrace_commit_resume, record_btrace_wait)
6793 (record_btrace_stop, record_btrace_can_execute_reverse)
6794 (record_btrace_stopped_by_sw_breakpoint)
6795 (record_btrace_supports_stopped_by_sw_breakpoint)
6796 (record_btrace_stopped_by_hw_breakpoint)
6797 (record_btrace_supports_stopped_by_hw_breakpoint)
6798 (record_btrace_update_thread_list, record_btrace_thread_alive)
6799 (record_btrace_goto_begin, record_btrace_goto_end)
6800 (record_btrace_goto, record_btrace_stop_replaying_all)
6801 (record_btrace_execution_direction)
6802 (record_btrace_prepare_to_generate_core)
6803 (record_btrace_done_generating_core): Refactor as
6804 record_btrace_target methods.
6805 (init_record_btrace_ops): Delete.
6806 (_initialize_record_btrace): Remove reference to
6807 init_record_btrace_ops.
6808 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6809 the execution_direction global.
6810 (record_full_base_target, record_full_target)
6811 (record_full_core_target): New classes.
6812 (record_full_ops): Now a record_full_target.
6813 (record_full_core_ops): Now a record_full_core_target.
6814 (record_full_target::detach, record_full_target::disconnect)
6815 (record_full_core_target::disconnect)
6816 (record_full_target::mourn_inferior, record_full_target::kill):
6818 (record_full_open, record_full_close, record_full_async): Refactor
6819 as methods of the record_full_base_target class.
6820 (record_full_resume, record_full_commit_resume): Refactor
6821 as methods of the record_full_target class.
6822 (record_full_wait, record_full_stopped_by_watchpoint)
6823 (record_full_stopped_data_address)
6824 (record_full_stopped_by_sw_breakpoint)
6825 (record_full_supports_stopped_by_sw_breakpoint)
6826 (record_full_stopped_by_hw_breakpoint)
6827 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6828 methods of the record_full_base_target class.
6829 (record_full_store_registers, record_full_xfer_partial)
6830 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6831 Refactor as methods of the record_full_target class.
6832 (record_full_can_execute_reverse, record_full_get_bookmark)
6833 (record_full_goto_bookmark, record_full_execution_direction)
6834 (record_full_record_method, record_full_info, record_full_delete)
6835 (record_full_is_replaying, record_full_will_replay)
6836 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6837 (record_full_stop_replaying): Refactor as methods of the
6838 record_full_base_target class.
6839 (record_full_core_resume, record_full_core_kill)
6840 (record_full_core_fetch_registers)
6841 (record_full_core_prepare_to_store)
6842 (record_full_core_store_registers, record_full_core_xfer_partial)
6843 (record_full_core_insert_breakpoint)
6844 (record_full_core_remove_breakpoint)
6845 (record_full_core_has_execution): Refactor
6846 as methods of the record_full_core_target class.
6847 (record_full_base_target::supports_delete_record): New.
6848 (init_record_full_ops): Delete.
6849 (init_record_full_core_ops): Delete.
6850 (record_full_save): Refactor as method of the
6851 record_full_base_target class.
6852 (_initialize_record_full): Remove references to
6853 init_record_full_ops and init_record_full_core_ops.
6855 * remote.c (remote_target, extended_remote_target): New classes.
6856 (remote_ops): Now a remote_target.
6857 (extended_remote_ops): Now an extended_remote_target.
6858 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6859 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6860 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6861 (remote_pass_signals, remote_set_syscall_catchpoint)
6862 (remote_program_signals, )
6863 (remote_thread_always_alive): Remove target_ops parameter.
6864 (remote_thread_alive, remote_thread_name)
6865 (remote_update_thread_list, remote_threads_extra_info)
6866 (remote_static_tracepoint_marker_at)
6867 (remote_static_tracepoint_markers_by_strid)
6868 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6869 (remote_open): Refactor as methods of remote_target.
6870 (extended_remote_open, extended_remote_detach)
6871 (extended_remote_attach, extended_remote_post_attach):
6872 (extended_remote_supports_disable_randomization)
6873 (extended_remote_create_inferior): : Refactor as method of
6874 extended_remote_target.
6875 (remote_set_permissions, remote_open_1, remote_detach)
6876 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6877 (remote_resume, remote_commit_resume, remote_stop)
6878 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6879 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6880 (remote_prepare_to_store, remote_store_registers)
6881 (remote_flash_erase, remote_flash_done, remote_files_info)
6882 (remote_kill, remote_mourn, remote_insert_breakpoint)
6883 (remote_remove_breakpoint, remote_insert_watchpoint)
6884 (remote_watchpoint_addr_within_range)
6885 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6886 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6887 (remote_supports_stopped_by_sw_breakpoint)
6888 (remote_stopped_by_hw_breakpoint)
6889 (remote_supports_stopped_by_hw_breakpoint)
6890 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6891 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6892 (remote_verify_memory): Refactor as methods of remote_target.
6893 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6895 (remote_xfer_partial, remote_get_memory_xfer_limit)
6896 (remote_search_memory, remote_rcmd, remote_memory_map)
6897 (remote_pid_to_str, remote_get_thread_local_address)
6898 (remote_get_tib_address, remote_read_description): Refactor as
6899 methods of remote_target.
6900 (remote_target::fileio_open, remote_target::fileio_pwrite)
6901 (remote_target::fileio_pread, remote_target::fileio_close): New.
6902 (remote_hostio_readlink, remote_hostio_fstat)
6903 (remote_filesystem_is_local, remote_can_execute_reverse)
6904 (remote_supports_non_stop, remote_supports_disable_randomization)
6905 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6906 (remote_supports_enable_disable_tracepoint)
6907 (remote_supports_string_tracing)
6908 (remote_can_run_breakpoint_commands, remote_trace_init)
6909 (remote_download_tracepoint, remote_can_download_tracepoint)
6910 (remote_download_trace_state_variable, remote_enable_tracepoint)
6911 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6912 (remote_trace_start, remote_get_trace_status)
6913 (remote_get_tracepoint_status, remote_trace_stop)
6914 (remote_trace_find, remote_get_trace_state_variable_value)
6915 (remote_save_trace_data, remote_get_raw_trace_data)
6916 (remote_set_disconnected_tracing, remote_core_of_thread)
6917 (remote_set_circular_trace_buffer, remote_traceframe_info)
6918 (remote_get_min_fast_tracepoint_insn_len)
6919 (remote_set_trace_buffer_size, remote_set_trace_notes)
6920 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6921 (remote_disable_btrace, remote_teardown_btrace)
6922 (remote_read_btrace, remote_btrace_conf)
6923 (remote_augmented_libraries_svr4_read, remote_load)
6924 (remote_pid_to_exec_file, remote_can_do_single_step)
6925 (remote_execution_direction, remote_thread_handle_to_thread_info):
6926 Refactor as methods of remote_target.
6927 (init_remote_ops, init_extended_remote_ops): Delete.
6928 (remote_can_async_p, remote_is_async_p, remote_async)
6929 (remote_thread_events, remote_upload_tracepoints)
6930 (remote_upload_trace_state_variables): Refactor as methods of
6932 (_initialize_remote): Remove references to init_remote_ops and
6933 init_extended_remote_ops.
6935 * remote-sim.c (gdbsim_target): New class.
6936 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6937 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6938 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6939 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6940 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6941 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6942 Refactor as methods of gdbsim_target.
6943 (gdbsim_ops): Now a gdbsim_target.
6944 (init_gdbsim_ops): Delete.
6945 (gdbsim_cntrl_c): Adjust.
6946 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6948 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6949 (the_amd64_linux_nat_target): New.
6950 (amd64_linux_fetch_inferior_registers)
6951 (amd64_linux_store_inferior_registers): Refactor as methods of
6952 amd64_linux_nat_target.
6953 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6954 * i386-linux-nat.c: Don't include "linux-nat.h".
6955 (i386_linux_nat_target): New class.
6956 (the_i386_linux_nat_target): New.
6957 (i386_linux_fetch_inferior_registers)
6958 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6959 as methods of i386_linux_nat_target.
6960 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6961 * inf-child.c (inf_child_ops): Delete.
6962 (inf_child_fetch_inferior_registers)
6963 (inf_child_store_inferior_registers): Delete.
6964 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6965 methods of inf_child_target.
6966 (inf_child_target::supports_terminal_ours)
6967 (inf_child_target::terminal_init)
6968 (inf_child_target::terminal_inferior)
6969 (inf_child_target::terminal_ours_for_output)
6970 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6971 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6973 (inf_child_open, inf_child_disconnect, inf_child_close)
6974 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6975 (inf_child_post_startup_inferior, inf_child_can_run)
6976 (inf_child_pid_to_exec_file): Refactor as methods of
6978 (inf_child_follow_fork): Delete.
6979 (inf_child_target::can_create_inferior)
6980 (inf_child_target::can_attach): New.
6981 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6982 (inf_child_target::has_stack, inf_child_target::has_registers)
6983 (inf_child_target::has_execution): New.
6984 (inf_child_fileio_open, inf_child_fileio_pwrite)
6985 (inf_child_fileio_pread, inf_child_fileio_fstat)
6986 (inf_child_fileio_close, inf_child_fileio_unlink)
6987 (inf_child_fileio_readlink, inf_child_use_agent)
6988 (inf_child_can_use_agent): Refactor as methods of
6990 (return_zero, inf_child_target): Delete.
6991 (inf_child_target::inf_child_target): New.
6992 * inf-child.h: Include "target.h".
6993 (inf_child_target): Delete function prototype.
6994 (inf_child_target): New class.
6995 (inf_child_open_target, inf_child_mourn_inferior)
6996 (inf_child_maybe_unpush_target): Delete.
6997 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6998 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6999 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7000 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7001 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7002 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7003 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7004 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7005 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7006 methods of inf_ptrace_target.
7007 (inf_ptrace_target): Delete function.
7008 * inf-ptrace.h: Include "inf-child.h".
7009 (inf_ptrace_target): Delete function declaration.
7010 (inf_ptrace_target): New class.
7011 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7012 * linux-nat.c (linux_target): New.
7013 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7014 (linux_nat_target::~linux_nat_target): New.
7015 (linux_child_post_attach, linux_child_post_startup_inferior)
7016 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7017 (linux_child_remove_fork_catchpoint)
7018 (linux_child_insert_vfork_catchpoint)
7019 (linux_child_remove_vfork_catchpoint)
7020 (linux_child_insert_exec_catchpoint)
7021 (linux_child_remove_exec_catchpoint)
7022 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7023 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7024 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7025 (linux_nat_stopped_data_address)
7026 (linux_nat_stopped_by_sw_breakpoint)
7027 (linux_nat_supports_stopped_by_sw_breakpoint)
7028 (linux_nat_stopped_by_hw_breakpoint)
7029 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7030 (linux_nat_kill, linux_nat_mourn_inferior)
7031 (linux_nat_xfer_partial, linux_nat_thread_alive)
7032 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7033 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7034 (linux_child_static_tracepoint_markers_by_strid)
7035 (linux_nat_is_async_p, linux_nat_can_async_p)
7036 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7037 (linux_nat_supports_multi_process)
7038 (linux_nat_supports_disable_randomization, linux_nat_async)
7039 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7040 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7041 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7042 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7043 methods of linux_nat_target.
7044 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7045 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7047 (check_stopped_by_watchpoint): Adjust.
7048 (linux_xfer_partial): Delete.
7049 (linux_target_install_ops, linux_target, linux_nat_add_target):
7051 (linux_nat_target::linux_nat_target): New.
7052 * linux-nat.h: Include "inf-ptrace.h".
7053 (linux_nat_target): New.
7054 (linux_target, linux_target_install_ops, linux_nat_add_target):
7055 Delete function declarations.
7056 (linux_target): Declare global.
7057 * linux-thread-db.c (thread_db_target): New.
7058 (thread_db_target::thread_db_target): New.
7059 (thread_db_ops): Delete.
7060 (the_thread_db_target): New.
7061 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7062 (thread_db_update_thread_list, thread_db_pid_to_str)
7063 (thread_db_extra_thread_info)
7064 (thread_db_thread_handle_to_thread_info)
7065 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7066 (thread_db_resume): Refactor as methods of thread_db_target.
7067 (init_thread_db_ops): Delete.
7068 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7069 * x86-linux-nat.c: Don't include "linux-nat.h".
7070 (super_post_startup_inferior): Delete.
7071 (x86_linux_nat_target::~x86_linux_nat_target): New.
7072 (x86_linux_child_post_startup_inferior)
7073 (x86_linux_read_description, x86_linux_enable_btrace)
7074 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7075 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7076 methods of x86_linux_nat_target.
7077 (x86_linux_create_target): Delete. Bits folded ...
7078 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7080 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7081 (x86_linux_nat_target): New class.
7082 (x86_linux_create_target): Delete.
7083 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7084 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7085 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7086 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7087 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7088 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7090 (x86_use_watchpoints): Delete.
7091 * x86-nat.h: Include "breakpoint.h" and "target.h".
7092 (x86_use_watchpoints): Delete.
7093 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7094 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7095 (x86_insert_watchpoint, x86_remove_watchpoint)
7096 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7097 (x86_stopped_by_hw_breakpoint): New declarations.
7098 (x86_nat_target): New template class.
7100 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7101 (the_ppc_linux_nat_target): New.
7102 (ppc_linux_fetch_inferior_registers)
7103 (ppc_linux_can_use_hw_breakpoint)
7104 (ppc_linux_region_ok_for_hw_watchpoint)
7105 (ppc_linux_ranged_break_num_registers)
7106 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7107 (ppc_linux_insert_mask_watchpoint)
7108 (ppc_linux_remove_mask_watchpoint)
7109 (ppc_linux_can_accel_watchpoint_condition)
7110 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7111 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7112 (ppc_linux_watchpoint_addr_within_range)
7113 (ppc_linux_masked_watch_num_registers)
7114 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7115 (ppc_linux_read_description): Refactor as methods of
7116 ppc_linux_nat_target.
7117 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7119 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7120 (procfs_target): New class.
7121 (the_procfs_target): New.
7122 (procfs_target): Delete function.
7123 (procfs_auxv_parse, procfs_attach, procfs_detach)
7124 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7125 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7126 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7127 (procfs_create_inferior, procfs_update_thread_list)
7128 (procfs_thread_alive, procfs_pid_to_str)
7129 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7130 (procfs_stopped_data_address, procfs_insert_watchpoint)
7131 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7132 (proc_find_memory_regions, procfs_info_proc)
7133 (procfs_make_note_section): Refactor as methods of procfs_target.
7134 (_initialize_procfs): Adjust.
7135 * sol-thread.c (sol_thread_target): New class.
7136 (sol_thread_ops): Now a sol_thread_target.
7137 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7138 (sol_thread_fetch_registers, sol_thread_store_registers)
7139 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7140 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7141 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7142 (init_sol_thread_ops): Delete.
7143 (_initialize_sol_thread): Adjust. Remove references to
7144 init_sol_thread_ops and complete_target_initialization.
7146 * windows-nat.c (windows_nat_target): New class.
7147 (windows_fetch_inferior_registers)
7148 (windows_store_inferior_registers, windows_resume, windows_wait)
7149 (windows_attach, windows_detach, windows_pid_to_exec_file)
7150 (windows_files_info, windows_create_inferior)
7151 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7152 (windows_close, windows_pid_to_str, windows_xfer_partial)
7153 (windows_get_tib_address, windows_get_ada_task_ptid)
7154 (windows_thread_name, windows_thread_alive): Refactor as
7155 windows_nat_target methods.
7156 (do_initial_windows_stuff): Adjust.
7157 (windows_target): Delete function.
7158 (_initialize_windows_nat): Adjust.
7160 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7161 (darwin_mourn_inferior, darwin_kill_inferior)
7162 (darwin_create_inferior, darwin_attach, darwin_detach)
7163 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7164 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7165 (darwin_supports_multi_process): Refactor as darwin_nat_target
7167 (darwin_resume_to, darwin_files_info): Delete.
7168 (_initialize_darwin_inferior): Rename to ...
7169 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7170 * darwin-nat.h: Include "inf-child.h".
7171 (darwin_nat_target): New class.
7172 (darwin_complete_target): Delete.
7173 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7174 (darwin_target): New.
7175 (i386_darwin_fetch_inferior_registers)
7176 (i386_darwin_store_inferior_registers): Refactor as methods of
7178 (darwin_complete_target): Delete, with ...
7179 (_initialize_i386_darwin_nat): ... bits factored out here.
7181 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7182 (the_alpha_linux_nat_target): New.
7183 (alpha_linux_register_u_offset): Refactor as
7184 alpha_linux_nat_target method.
7185 (_initialize_alpha_linux_nat): Adjust.
7186 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7187 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7188 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7189 methods of linux_nat_trad_target.
7190 (linux_trad_target): Delete.
7191 * linux-nat-trad.h (linux_trad_target): Delete function.
7192 (linux_nat_trad_target): New class.
7193 * mips-linux-nat.c (mips_linux_nat_target): New class.
7194 (super_fetch_registers, super_store_registers, super_close):
7196 (the_mips_linux_nat_target): New.
7197 (mips64_linux_regsets_fetch_registers)
7198 (mips64_linux_regsets_store_registers)
7199 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7200 (mips_linux_register_u_offset, mips_linux_read_description)
7201 (mips_linux_can_use_hw_breakpoint)
7202 (mips_linux_stopped_by_watchpoint)
7203 (mips_linux_stopped_data_address)
7204 (mips_linux_region_ok_for_hw_watchpoint)
7205 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7206 (mips_linux_close): Refactor as methods of mips_linux_nat.
7207 (_initialize_mips_linux_nat): Adjust to C++ification.
7209 * aix-thread.c (aix_thread_target): New class.
7210 (aix_thread_ops): Now an aix_thread_target.
7211 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7212 (aix_thread_fetch_registers, aix_thread_store_registers)
7213 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7214 (aix_thread_thread_alive, aix_thread_pid_to_str)
7215 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7216 Refactor as methods of aix_thread_target.
7217 (init_aix_thread_ops): Delete.
7218 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7219 and complete_target_initialization.
7220 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7221 (rs6000_nat_target): New class.
7222 (the_rs6000_nat_target): New.
7223 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7224 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7225 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7226 (super_create_inferior): Delete.
7227 (_initialize_rs6000_nat): Adjust to C++ification.
7229 * arm-linux-nat.c (arm_linux_nat_target): New class.
7230 (the_arm_linux_nat_target): New.
7231 (arm_linux_fetch_inferior_registers)
7232 (arm_linux_store_inferior_registers, arm_linux_read_description)
7233 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7234 (arm_linux_remove_hw_breakpoint)
7235 (arm_linux_region_ok_for_hw_watchpoint)
7236 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7237 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7238 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7239 arm_linux_nat_target.
7240 (_initialize_arm_linux_nat): Adjust to C++ification.
7242 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7243 (the_aarch64_linux_nat_target): New.
7244 (aarch64_linux_fetch_inferior_registers)
7245 (aarch64_linux_store_inferior_registers)
7246 (aarch64_linux_child_post_startup_inferior)
7247 (aarch64_linux_read_description)
7248 (aarch64_linux_can_use_hw_breakpoint)
7249 (aarch64_linux_insert_hw_breakpoint)
7250 (aarch64_linux_remove_hw_breakpoint)
7251 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7252 (aarch64_linux_region_ok_for_hw_watchpoint)
7253 (aarch64_linux_stopped_data_address)
7254 (aarch64_linux_stopped_by_watchpoint)
7255 (aarch64_linux_watchpoint_addr_within_range)
7256 (aarch64_linux_can_do_single_step): Refactor as methods of
7257 aarch64_linux_nat_target.
7258 (super_post_startup_inferior): Delete.
7259 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7261 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7262 (the_hppa_linux_nat_target): New.
7263 (hppa_linux_fetch_inferior_registers)
7264 (hppa_linux_store_inferior_registers): Refactor as methods of
7265 hppa_linux_nat_target.
7266 (_initialize_hppa_linux_nat): Adjust to C++ification.
7268 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7269 (the_ia64_linux_nat_target): New.
7270 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7271 (ia64_linux_stopped_data_address)
7272 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7273 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7274 ia64_linux_nat_target methods.
7275 (super_xfer_partial): Delete.
7276 (_initialize_ia64_linux_nat): Adjust to C++ification.
7278 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7279 (the_m32r_linux_nat_target): New.
7280 (m32r_linux_fetch_inferior_registers)
7281 (m32r_linux_store_inferior_registers): Refactor as
7282 m32r_linux_nat_target methods.
7283 (_initialize_m32r_linux_nat): Adjust to C++ification.
7285 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7286 (the_m68k_linux_nat_target): New.
7287 (m68k_linux_fetch_inferior_registers)
7288 (m68k_linux_store_inferior_registers): Refactor as
7289 m68k_linux_nat_target methods.
7290 (_initialize_m68k_linux_nat): Adjust to C++ification.
7292 * s390-linux-nat.c (s390_linux_nat_target): New class.
7293 (the_s390_linux_nat_target): New.
7294 (s390_linux_fetch_inferior_registers)
7295 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7296 (s390_insert_watchpoint, s390_remove_watchpoint)
7297 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7298 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7299 (s390_auxv_parse, s390_read_description): Refactor as methods of
7300 s390_linux_nat_target.
7301 (_initialize_s390_nat): Adjust to C++ification.
7303 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7304 (the_sparc_linux_nat_target): New.
7305 (_initialize_sparc_linux_nat): Adjust to C++ification.
7306 * sparc-nat.c (sparc_fetch_inferior_registers)
7307 (sparc_store_inferior_registers): Remove target_ops parameter.
7308 * sparc-nat.h (sparc_fetch_inferior_registers)
7309 (sparc_store_inferior_registers): Remove target_ops parameter.
7310 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7311 (the_sparc64_linux_nat_target): New.
7312 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7314 * spu-linux-nat.c (spu_linux_nat_target): New class.
7315 (the_spu_linux_nat_target): New.
7316 (spu_child_post_startup_inferior, spu_child_post_attach)
7317 (spu_child_wait, spu_fetch_inferior_registers)
7318 (spu_store_inferior_registers, spu_xfer_partial)
7319 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7321 (_initialize_spu_nat): Adjust to C++ification.
7323 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7324 (the_tilegx_linux_nat_target): New.
7325 (fetch_inferior_registers, store_inferior_registers):
7326 Refactor as methods.
7327 (_initialize_tile_linux_nat): Adjust to C++ification.
7329 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7330 (the_xtensa_linux_nat_target): New.
7331 (xtensa_linux_fetch_inferior_registers)
7332 (xtensa_linux_store_inferior_registers): Refactor as
7333 xtensa_linux_nat_target methods.
7334 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7336 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7337 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7338 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7339 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7340 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7341 (fbsd_stopped_by_sw_breakpoint)
7342 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7343 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7344 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7345 (fbsd_post_startup_inferior, fbsd_post_attach)
7346 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7347 (fbsd_set_syscall_catchpoint)
7348 (super_xfer_partial, super_resume, super_wait)
7349 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7350 (fbsd_handle_debug_trap): Remove target_ops parameter.
7351 (fbsd_nat_add_target): Delete.
7352 * fbsd-nat.h: Include "inf-ptrace.h".
7353 (fbsd_nat_add_target): Delete.
7354 (USE_SIGTRAP_SIGINFO): Define.
7355 (fbsd_nat_target): New class.
7357 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7358 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7359 (amd64bsd_target): Delete.
7360 * amd64-bsd-nat.h: New file.
7361 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7363 (amd64_fbsd_nat_target): New class.
7364 (the_amd64_fbsd_nat_target): New.
7365 (amd64fbsd_read_description): Refactor as method of
7366 amd64_fbsd_nat_target.
7367 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7368 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7369 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7370 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7371 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7372 (i386bsd_target): Delete.
7373 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7374 (i386bsd_fetch_inferior_registers)
7375 (i386bsd_store_inferior_registers): Declare.
7376 (i386_bsd_nat_target): New class.
7377 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7378 (the_i386_fbsd_nat_target): New.
7379 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7380 i386_fbsd_nat_target methods.
7381 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7382 (_initialize_i386fbsd_nat): Adjust to C++ification.
7383 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7384 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7385 (_initialize_x86_bsd_nat): Adjust to C++ification.
7386 * x86-bsd-nat.h: Include "x86-nat.h".
7387 (x86bsd_target): Delete declaration.
7388 (x86bsd_nat_target): New class.
7390 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7391 (the_aarch64_fbsd_nat_target): New.
7392 (aarch64_fbsd_fetch_inferior_registers)
7393 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7394 aarch64_fbsd_nat_target.
7395 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7396 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7397 (the_alpha_bsd_nat_target): New.
7398 (alphabsd_fetch_inferior_registers)
7399 (alphabsd_store_inferior_registers): Refactor as
7400 alpha_bsd_nat_target methods.
7401 (_initialize_alphabsd_nat): Refactor as methods of
7402 alpha_bsd_nat_target.
7403 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7404 (the_amd64_nbsd_nat_target): New.
7405 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7406 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7407 (the_amd64_obsd_nat_target): New.
7408 (_initialize_amd64obsd_nat): Adjust to C++ification.
7409 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7410 (the_arm_fbsd_nat_target): New.
7411 (arm_fbsd_fetch_inferior_registers)
7412 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7413 (_initialize_arm_fbsd_nat): Refactor as methods of
7414 arm_fbsd_nat_target.
7415 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7416 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7417 (the_arm_netbsd_nat_target): New.
7418 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7419 arm_netbsd_nat_target.
7420 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7421 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7422 (the_hppa_nbsd_nat_target): New.
7423 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7424 hppa_nbsd_nat_target methods.
7425 (_initialize_hppanbsd_nat): Adjust to C++ification.
7426 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7427 (the_hppa_obsd_nat_target): New.
7428 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7429 methods of hppa_obsd_nat_target.
7430 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7432 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7433 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7435 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7436 (_initialize_i386obsd_nat): Use add_target.
7437 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7438 (the_m68k_bsd_nat_target): New.
7439 (m68kbsd_fetch_inferior_registers)
7440 (m68kbsd_store_inferior_registers): Refactor as methods of
7441 m68k_bsd_nat_target.
7442 (_initialize_m68kbsd_nat): Adjust to C++ification.
7443 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7444 (the_mips_fbsd_nat_target): New.
7445 (mips_fbsd_fetch_inferior_registers)
7446 (mips_fbsd_store_inferior_registers): Refactor as methods of
7447 mips_fbsd_nat_target.
7448 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7450 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7451 (the_mips_nbsd_nat_target): New.
7452 (mipsnbsd_fetch_inferior_registers)
7453 (mipsnbsd_store_inferior_registers): Refactor as methods of
7454 mips_nbsd_nat_target.
7455 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7456 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7457 (the_mips64_obsd_nat_target): New.
7458 (mips64obsd_fetch_inferior_registers)
7459 (mips64obsd_store_inferior_registers): Refactor as methods of
7460 mips64_obsd_nat_target.
7461 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7463 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7465 * nbsd-nat.h: Include "inf-ptrace.h".
7466 (nbsd_nat_target): New class.
7467 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7468 (obsd_wait): Refactor as methods of obsd_nat_target.
7469 (obsd_add_target): Delete.
7470 * obsd-nat.h: Include "inf-ptrace.h".
7471 (obsd_nat_target): New class.
7472 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7473 (the_ppc_fbsd_nat_target): New.
7474 (ppcfbsd_fetch_inferior_registers)
7475 (ppcfbsd_store_inferior_registers): Refactor as methods of
7476 ppc_fbsd_nat_target.
7477 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7479 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7480 (the_ppc_nbsd_nat_target): New.
7481 (ppcnbsd_fetch_inferior_registers)
7482 (ppcnbsd_store_inferior_registers): Refactor as methods of
7483 ppc_nbsd_nat_target.
7484 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7485 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7486 (the_ppc_obsd_nat_target): New.
7487 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7488 methods of ppc_obsd_nat_target.
7489 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7491 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7492 (the_sh_nbsd_nat_target): New.
7493 (shnbsd_fetch_inferior_registers)
7494 (shnbsd_store_inferior_registers): Refactor as methods of
7496 (_initialize_shnbsd_nat): Adjust to C++ification.
7497 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7498 (inf_ptrace_xfer_partial): Delete.
7499 (sparc_xfer_partial, sparc_target): Delete.
7500 * sparc-nat.h (sparc_fetch_inferior_registers)
7501 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7502 (sparc_target): Delete function declaration.
7503 (sparc_target): New template class.
7504 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7505 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7506 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7507 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7509 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7510 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7511 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7512 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7514 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7515 (the_vax_bsd_nat_target): New.
7516 (vaxbsd_fetch_inferior_registers)
7517 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7519 (_initialize_vaxbsd_nat): Adjust to C++ification.
7521 * bsd-kvm.c (bsd_kvm_target): New class.
7522 (bsd_kvm_ops): Now a bsd_kvm_target.
7523 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7524 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7525 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7527 (bsd_kvm_return_one): Delete.
7528 (bsd_kvm_add_target): Adjust to C++ification.
7530 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7531 (nto_procfs_target_procfs): New classes.
7532 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7533 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7534 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7535 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7536 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7537 (procfs_remove_hw_breakpoint, procfs_resume)
7538 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7539 (procfs_kill_inferior, procfs_store_registers)
7540 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7541 as methods of nto_procfs_target.
7542 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7543 (nto_native_ops): Delete.
7544 (procfs_open, procfs_native_open): Delete.
7545 (nto_native_ops): Now an nto_procfs_target_native.
7546 (init_procfs_targets): Adjust to C++ification.
7547 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7548 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7549 Refactor as methods of nto_procfs_target.
7551 * go32-nat.c (go32_nat_target): New class.
7552 (the_go32_nat_target): New.
7553 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7554 (go32_store_registers, go32_xfer_partial, go32_files_info)
7555 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7556 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7557 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7558 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7559 (go32_target): Delete.
7560 (_initialize_go32_nat): Adjust to C++ification.
7562 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7563 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7564 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7565 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7567 (gnu_target): Delete.
7568 * gnu-nat.h (gnu_target): Delete.
7569 (gnu_nat_target): New class.
7570 * i386-gnu-nat.c (gnu_base_target): New.
7571 (i386_gnu_nat_target): New class.
7572 (the_i386_gnu_nat_target): New.
7573 (_initialize_i386gnu_nat): Adjust to C++ification.
7575 2018-05-02 Pedro Alves <palves@redhat.com>
7577 * bfd-target.c (target_bfd_xclose): Rename to ...
7578 (target_bfd_close): ... this.
7579 (target_bfd_reopen): Adjust.
7580 * target.c (target_close): Remove references to to_xclose.
7581 * target.h (target_ops::to_xclose): Delete.
7582 (target_ops::to_close): Update comments.
7584 2018-05-02 Pedro Alves <palves@redhat.com>
7586 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7588 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7589 * inf-ptrace.c (inf_ptrace_register_u_offset)
7590 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7591 (inf_ptrace_store_register, inf_ptrace_store_registers)
7592 (inf_ptrace_trad_target): Move to ...
7593 * linux-nat-trad.c: ... this new file.
7594 * linux-nat-trad.h: New file.
7595 * linux-nat.c (linux_target_install_ops): Make extern.
7596 (linux_trad_target): Delete.
7597 * linux-nat.h (linux_trad_target): Delete declaration.
7598 (linux_target_install_ops): Declare.
7599 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7602 2018-05-02 Pedro Alves <palves@redhat.com>
7604 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7605 procfs_target/add_target here.
7606 * procfs.c (procfs_target): Make static.
7607 (_initialize_procfs): Call add_target here.
7608 * procfs.h (struct target_ops): Remove forward declaration.
7609 (procfs_target): Remove declaration.
7610 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7612 2018-05-02 Pedro Alves <palves@redhat.com>
7614 * procfs.c (procfs_stopped_by_watchpoint)
7615 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7616 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7618 (procfs_use_watchpoints): Delete, move contents...
7619 (procfs_target): ... here.
7620 * procfs.h (procfs_use_watchpoints): Delete declaration.
7621 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7622 procfs_use_watchpoints.
7623 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7624 procfs_use_watchpoints.
7626 2018-05-02 Tom Tromey <tom@tromey.com>
7629 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7630 and var_zuinteger_unlimited.
7631 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7632 and PARAM_ZUINTEGER_UNLIMITED.
7633 (set_parameter_value): Handle var_zuinteger and
7634 var_zuinteger_unlimited.
7635 (add_setshow_generic): Likewise.
7636 (parmpy_init): Likewise.
7638 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7641 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7642 pointer is not null before dereferencing it.
7644 2018-04-30 Tom Tromey <tom@tromey.com>
7646 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7649 2018-04-30 Tom Tromey <tom@tromey.com>
7651 * breakpoint.c (mention): Remove use of is_mi_like_p.
7652 (print_mention_ranged_breakpoint): Likewise.
7653 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7656 2018-04-30 Tom Tromey <tom@tromey.com>
7658 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7660 2018-04-30 Tom Tromey <tom@tromey.com>
7662 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7663 (info_spu_event_command): Remove some uses of is_mi_like_p.
7665 2018-04-30 Tom Tromey <tom@tromey.com>
7667 * python/py-framefilter.c (py_print_single_arg)
7668 (enumerate_locals, py_print_args, py_print_frame): Remove some
7669 uses of is_mi_like_p.
7671 2018-04-30 Tom Tromey <tom@tromey.com>
7674 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7675 * ui-out.h (ui_out::is_mi_like_p): Now const.
7676 (ui_out::do_is_mi_like_p): Now const.
7677 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7679 2018-04-30 Tom Tromey <tom@tromey.com>
7681 * varobj.c (varobj_set_visualizer): Use new_reference.
7682 * python/python.c (gdbpy_decode_line): Use new_reference.
7683 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7686 2018-04-30 Tom Tromey <tom@tromey.com>
7688 * varobj.c (install_new_value): Use new_reference.
7689 * value.h (value_incref): Return void. Swap intro comment with
7691 * value.c (set_value_parent): Use new_reference.
7692 (value_incref): Return void. Update intro comment.
7693 (release_value): Use new_reference.
7694 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7696 2018-04-30 Tom Tromey <tom@tromey.com>
7698 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7699 * gdb_bfd.h (new_bfd_ref): Remove.
7700 (gdb_bfd_open): Update comment.
7701 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7702 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7703 (gdb_bfd_fdopenr): Use new_reference.
7704 * exec.c (exec_file_attach): Use new_reference.
7706 2018-04-30 Tom Tromey <tom@tromey.com>
7708 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7711 2018-04-30 Tom Tromey <tom@tromey.com>
7713 * jit.c (jit_read_code_entry): Use type_align.
7714 * i386-tdep.c (i386_gdbarch_init): Don't call
7715 set_gdbarch_long_long_align_bit.
7716 * gdbarch.sh: Remove long_long_align_bit.
7717 * gdbarch.c, gdbarch.h: Rebuild.
7718 * arc-tdep.c (arc_type_align): New function.
7719 (arc_gdbarch_init): Use arc_type_align. Don't call
7720 set_gdbarch_long_long_align_bit.
7722 2018-04-30 Tom Tromey <tom@tromey.com>
7724 * rust-lang.c (rust_type_alignment): Remove.
7725 (rust_composite_type): Use type_align.
7727 2018-04-30 Tom Tromey <tom@tromey.com>
7729 * NEWS: Mention Type.align.
7730 * python/py-type.c (typy_get_alignof): New function.
7731 (type_object_getset): Add "alignof".
7733 2018-04-30 Tom Tromey <tom@tromey.com>
7737 * std-operator.def (UNOP_ALIGNOF): New operator.
7738 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7740 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7741 * c-lang.c (c_op_print_tab): Add alignof.
7742 * c-exp.y (ALIGNOF): New token.
7743 (exp): Add "ALIGNOF" production.
7744 (ident_tokens): Add _Alignof and alignof.
7746 2018-04-30 Tom Tromey <tom@tromey.com>
7748 * i386-tdep.c (i386_type_align): New function.
7749 (i386_gdbarch_init): Update.
7750 * gdbarch.sh (type_align): New method.
7751 * gdbarch.c, gdbarch.h: Rebuild.
7752 * arch-utils.h (default_type_align): Declare.
7753 * arch-utils.c (default_type_align): New function.
7754 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7755 (struct type) <align_log2>: New field.
7756 <instance_flags>: Now a bitfield.
7757 (TYPE_RAW_ALIGN): New macro.
7758 (type_align, type_raw_align, set_type_align): Declare.
7759 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7761 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7762 (get_alignment, maybe_set_alignment): New functions.
7763 (read_structure_type, read_enumeration_type, read_array_type)
7764 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7765 (read_subrange_type, read_base_type): Set type alignment.
7767 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7769 * dwarf2read.c (read_index_from_section): Use bool.
7771 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7774 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7777 2018-04-29 John Reiser <jreiser@BitWagon.com>
7780 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7781 last step, and do it atomically.
7783 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7785 * compile/compile-c-types.c (convert_int, convert_float):
7788 2018-04-27 Tom Tromey <tom@tromey.com>
7791 * rust-lang.c (rust_inclusive_range_type_p): New function.
7792 (rust_range): Handle inclusive ranges.
7793 (rust_compute_range): Likewise.
7794 * rust-exp.y (struct rust_op) <inclusive>: New field.
7795 (DOTDOTEQ): New constant.
7796 (range_expr): Add "..=" productions.
7797 (operator_tokens): Add "..=" token.
7798 (ast_range): Add "inclusive" parameter.
7799 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7801 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7803 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7804 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7806 * expprint.c (print_subexp_standard): Handle new bounds values.
7807 (dump_subexp_body_standard): Likewise.
7809 2018-04-27 Tom Tromey <tom@tromey.com>
7811 * configure: Rebuild.
7812 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7813 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7815 (class symbol_needs_eval_context): Likewise.
7816 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7817 (mock_mapped_index::symbol_name_at): Use "override". Remove
7819 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7821 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7822 * aarch64-tdep.c (instruction_reader::read): Use "override".
7823 (instruction_reader_test::read): Likewise.
7824 * arm-tdep.c (instruction_reader::read): Use "override".
7825 (instruction_reader_thumb::read): Likewise.
7827 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7830 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7831 instead of remote_send.
7832 (remote_send): Remove.
7834 2018-04-26 Pedro Alves <palves@redhat.com>
7836 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7837 find_function_start_sal instead of find_pc_line.
7839 2018-04-26 Pedro Alves <palves@redhat.com>
7841 * breakpoint.c (set_breakpoint_location_function): Handle
7843 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7844 * elfread.c (elf_symtab_read): Give data symbols with
7845 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7846 (elf_rel_plt_read): Update comment.
7847 * linespec.c (convert_linespec_to_sals): Handle
7849 (minsym_found): Handle mst_data_gnu_ifunc.
7850 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7851 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7852 * parse.c (find_minsym_type_and_address): Handle
7854 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7855 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7856 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7858 <mst_data_gnu_ifunc>: New enumerator.
7860 2018-04-26 Pedro Alves <palves@redhat.com>
7862 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7863 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7864 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7866 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7867 (lookup_minimal_symbol_by_pc): Adjust.
7868 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7869 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7870 * minsyms.h (lookup_msym_prefer): New enum.
7871 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7872 parameter by a lookup_msym_prefer parameter.
7874 2018-04-26 Pedro Alves <palves@redhat.com>
7876 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7877 ends in "@plt" instead of looking at the symbol's section.
7879 2018-04-26 Pedro Alves <palves@redhat.com>
7881 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7883 (find_pc_partial_function_gnu_ifunc): Rename to ...
7884 (find_pc_partial_function): ... this, and remove references to
7886 (find_pc_partial_function): Delete old implementation.
7887 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7889 2018-04-26 Pedro Alves <palves@redhat.com>
7891 * linespec.c (struct bound_minimal_symbol_search_key): New.
7892 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7893 skip first line if we found a GNU ifunc minimal symbol by name.
7894 (compare_msymbols): Change parameters to work with a destructured
7896 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7899 2018-04-26 Pedro Alves <palves@redhat.com>
7901 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7902 ifunc targets here. Instead, if we have an ifunc minsym, use its
7904 (add_location_to_breakpoint): Store the minsym and the objfile in
7905 the breakpoint location.
7906 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7907 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7908 Record the minsym in the sal.
7909 * symtab.h (symtab_and_line) <msymbol>: New field.
7911 2018-04-26 Pedro Alves <palves@redhat.com>
7913 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7914 unless we actually resolved the ifunc.
7916 2018-04-26 Pedro Alves <palves@redhat.com>
7918 * c-exp.y (variable production): Prefer ifunc minsyms over
7919 regular function symbols.
7920 * symtab.c (find_gnu_ifunc): New function.
7921 * minsyms.h (lookup_msym_prefer): New enum.
7922 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7923 parameter by a lookup_msym_prefer parameter.
7924 * symtab.h (find_gnu_ifunc): New declaration.
7926 2018-04-26 Pedro Alves <palves@redhat.com>
7928 * blockframe.c (find_gnu_ifunc_target_type): New function.
7929 (find_function_type): New.
7930 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7931 return a value with a memory address.
7932 (eval_call): For calls to GNU ifunc functions, try to find the
7933 type of the target function from the type that the resolver
7935 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7937 * infcall.c (find_function_return_type): Delete.
7938 (find_function_addr): Add 'function_type' parameter. For calls to
7939 GNU ifunc functions, try to find the type of the target function
7940 from the type that the resolver returns, and return it via
7942 (call_function_by_hand_dummy): Adjust to use the function type
7943 returned by find_function_addr.
7944 (find_function_addr): Add 'function_type' parameter and move
7946 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7949 2018-04-26 Pedro Alves <palves@redhat.com>
7951 * c-exp.y (variable production): Skip finding an alias for ifunc
7954 2018-04-26 Pedro Alves <palves@redhat.com>
7956 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7958 2018-04-25 Pedro Alves <palves@redhat.com>
7960 * infcmd.c (kill_command): Print the pid as string, not the whole
7961 thread's ptid. Add comment. s/has been killed/killed/ in output
7963 * remote.c (remote_detach_1): Print the pid as string, not the
7964 whole thread's ptid.
7966 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7967 Sergio Durigan Junior <sergiodj@redhat.com>
7968 Pedro Alves <palves@redhat.com>
7970 * infcmd.c (kill_command): Print message when inferior has
7972 * inferior.c (print_inferior_events): Remove 'static'. Set as
7974 (add_inferior): Improve message printed when
7975 'print_inferior_events' is on.
7976 (exit_inferior): Remove message printed when
7977 'print_inferior_events' is on.
7978 (detach_inferior): Improve message printed when
7979 'print_inferior_events' is on.
7980 (initialize_inferiors): Use 'add_inferior_silent' to set
7981 'current_inferior_'.
7982 * inferior.h (print_inferior_events): Declare here as
7984 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7985 '[Detaching...]' messages when 'print_inferior_events' is on.
7986 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7987 as prefix/suffix for messages. Remove periods. Fix erroneous
7988 'Detaching after fork from child...', replace it by '... from
7990 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7991 prefix/suffix when printing 'Detaching...' messages. Print
7992 them when 'print_inferior_events' is on.
7993 * remote.c (remote_detach_1): Print message when detaching
7994 from inferior and '!is_fork_parent'.
7996 2018-04-24 Tom Tromey <tom@tromey.com>
7998 * cli-out.h: Reindent.
8000 2018-04-24 Tom Tromey <tom@tromey.com>
8002 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8003 (cli_ui_out::do_field_string): Use fputs_filtered.
8004 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8006 2018-04-23 Tom Tromey <tom@tromey.com>
8008 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8009 gdb::unique_xmalloc_ptr.
8011 2018-04-23 Tom Tromey <tom@tromey.com>
8013 * configure: Rebuild.
8015 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8018 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8019 prepare_for_testing. Set normal_bp to r_debug_state if target
8022 2018-04-21 Pedro Alves <palves@redhat.com>
8023 Rajendra SY <rajendra.sy@gmail.com>
8025 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8026 * remote.c (extended_remote_attach): In all-stop mode, mark the
8027 thread as executing.
8029 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8031 * thread.c (thread_apply_all_command): Fix comment.
8032 (thread_command): Fix comment.
8034 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8036 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8038 * features/aarch64-core.c (create_feature_aarch64_core):
8040 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8042 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8044 * features/i386/32bit-avx512.c
8045 (create_feature_i386_32bit_avx512): Likewise.
8046 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8048 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8050 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8052 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8054 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8056 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8058 * features/i386/64bit-avx512.c
8059 (create_feature_i386_64bit_avx512): Likewise.
8060 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8062 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8064 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8066 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8068 * features/i386/64bit-segments.c
8069 (create_feature_i386_64bit_segments): Likewise.
8070 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8072 * features/i386/x32-core.c
8073 (create_feature_i386_x32_core): Likewise.
8074 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8075 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8076 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8077 * target-descriptions.c: In generated code, don't pass xml
8080 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8082 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8083 (print_xml_feature::visit_post): Likewise.
8084 (print_xml_feature::visit): Likewise.
8085 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8086 (print_xml_feature): Add new class.
8087 * regformats/regdat.sh: Null xmltarget on feature targets.
8088 * target-descriptions.c (struct target_desc): Add xmltarget.
8089 (maintenance_check_tdesc_xml_convert): Add unittest function.
8090 (tdesc_get_features_xml): Add function to get xml.
8091 (maintenance_check_xml_descriptions): Test xml generation.
8092 * xml-tdesc.c (string_read_description_xml): Add function.
8093 * xml-tdesc.h (string_read_description_xml): Add declaration.
8095 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8097 * features/Makefile: Add feature marker to targets with new style
8098 target descriptions.
8099 * regformats/aarch64.dat: Regenerate.
8100 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8101 * regformats/i386/amd64-avx-linux.dat: Likewise.
8102 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8103 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8104 * regformats/i386/amd64-linux.dat: Likewise.
8105 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8106 * regformats/i386/amd64.dat: Likewise.
8107 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8108 * regformats/i386/i386-avx-linux.dat: Likewise.
8109 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8110 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8111 * regformats/i386/i386-linux.dat: Likewise.
8112 * regformats/i386/i386-mmx-linux.dat: Likewise.
8113 * regformats/i386/i386-mpx-linux.dat: Likewise.
8114 * regformats/i386/i386.dat: Likewise.
8115 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8116 * regformats/i386/x32-avx-linux.dat: Likewise.
8117 * regformats/i386/x32-linux.dat: Likewise.
8118 * regformats/tic6x-c62x-linux.dat: Likewise.
8119 * regformats/tic6x-c64x-linux.dat: Likewise.
8120 * regformats/tic6x-c64xp-linux.dat: Likewise.
8121 * regformats/regdat.sh: Parse feature marker.
8123 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8125 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8126 (tdesc_osabi_name): Likewise.
8127 * target-descriptions.c (tdesc_architecture_name): Add new
8129 (tdesc_osabi_name): Likewise.
8131 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8133 * common/tdesc.c (tdesc_predefined_type): Move to here.
8134 (tdesc_named_type): Likewise.
8135 (tdesc_create_vector): Likewise.
8136 (tdesc_create_struct): Likewise.
8137 (tdesc_set_struct_size): Likewise.
8138 (tdesc_create_union): Likewise.
8139 (tdesc_create_flags): Likewise.
8140 (tdesc_create_enum): Likewise.
8141 (tdesc_add_field): Likewise.
8142 (tdesc_add_typed_bitfield): Likewise.
8143 (tdesc_add_bitfield): Likewise.
8144 (tdesc_add_flag): Likewise.
8145 (tdesc_add_enum_value): Likewise.
8146 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8147 (struct tdesc_type_vector): Likewise.
8148 (struct tdesc_type_field): Likewise.
8149 (struct tdesc_type_with_fields): Likewise.
8150 (tdesc_create_enum): Add declaration.
8151 (tdesc_add_typed_bitfield): Likewise.
8152 (tdesc_add_enum_value): Likewise.
8153 * target-descriptions.c (tdesc_type_field): Move from here.
8154 (tdesc_type_builtin): Likewise.
8155 (tdesc_type_vector): Likewise.
8156 (tdesc_type_with_fields): Likewise.
8157 (tdesc_predefined_types): Likewise.
8158 (tdesc_named_type): Likewise.
8159 (tdesc_create_vector): Likewise.
8160 (tdesc_create_struct): Likewise.
8161 (tdesc_set_struct_size): Likewise.
8162 (tdesc_create_union): Likewise.
8163 (tdesc_create_flags): Likewise.
8164 (tdesc_create_enum): Likewise.
8165 (tdesc_add_field): Likewise.
8166 (tdesc_add_typed_bitfield): Likewise.
8167 (tdesc_add_bitfield): Likewise.
8168 (tdesc_add_flag): Likewise.
8169 (tdesc_add_enum_value): Likewise.
8170 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8171 (tdesc_add_typed_bitfield): Likewise.
8172 (tdesc_add_enum_value): Likewise.
8174 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8176 * common/tdesc.c (tdesc_feature::accept): Move to here.
8177 (tdesc_feature::operator==): Likewise.
8178 (tdesc_create_reg): Likewise.
8179 * common/tdesc.h (tdesc_type_kind): Likewise.
8180 (struct tdesc_type): Likewise.
8181 (struct tdesc_feature): Likewise.
8182 * regformats/regdat.sh: Create a feature.
8183 * target-descriptions.c (tdesc_type_kind): Move from here.
8184 (tdesc_type): Likewise.
8185 (tdesc_type_up): Likewise.
8186 (tdesc_feature): Likewise.
8187 (tdesc_create_reg): Likewise.
8189 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8191 * Makefile.in: Add arch/tdesc.c
8192 * common/tdesc.c: New file.
8193 * common/tdesc.h (tdesc_element_visitor): Move to here.
8194 (tdesc_element): Likewise.
8195 (tdesc_reg): Likewise.
8196 (tdesc_reg_up): Likewise.
8197 * regformats/regdef.h (reg): Add offset to constructors.
8198 * target-descriptions.c (tdesc_element_visitor): Move from here.
8199 (tdesc_element): Likewise.
8200 (tdesc_reg): Likewise.
8201 (tdesc_reg_up): Likewise.
8203 2018-04-17 Tom Tromey <tom@tromey.com>
8205 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8208 2018-04-17 Tom Tromey <tom@tromey.com>
8210 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8212 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8214 * symtab.c (print_symbol_info): Skip printing filename and line
8215 number when `last' is NULL.
8216 (symtab_symbol_info): Use empty string instead of NULL for first
8217 invocation of print_symbol_info.
8218 (rbreak_command): Pass NULL to `last' parameter of
8221 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8223 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8226 2018-04-16 Pedro Alves <palves@redhat.com>
8228 * MAINTAINERS (sh): Remove.
8229 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8230 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8231 (ALLDEPFILES): Remove sh64-tdep.c.
8232 * NEWS: Mentions that support for SH-5/SH64 is removed.
8233 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8234 (sh*-*-openbsd*): Ditto.
8235 (sh64-*-elf*): Remove.
8237 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8238 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8239 * sh-tdep.c: No longer include "sh64-tdep.h".
8240 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8241 * sh64-tdep.c, sh64-tdep.h: Remove files.
8243 2018-04-16 Pedro Alves <palves@redhat.com>
8245 * MAINTAINERS: Remove m88k.
8246 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8247 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8248 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8249 * NEWS: Mention that support for m88k was removed.
8250 * configure.host (m88*-*-*): Remove support.
8251 * configure.nat (m88k-*-*): Remove support.
8252 * configure.tgt (m88*-*-openbsd*): Remove.
8253 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8255 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8257 * configure.tgt (x86_tobjs): New variable.
8258 (amd64_tobjs, i386_tobjs): Use it.
8260 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8262 * symtab.c (print_symbol_info): Precede the symbol definition by
8263 the line number when available.
8264 * NEWS: Advertise this enhancement.
8266 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8268 * NEWS (New options): announce set/show record btrace cpu.
8269 * btrace.c: Include record-btrace.h.
8270 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8271 the vendor is unknown.
8272 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8273 Maybe overwrite the btrace configuration's cpu.
8274 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8275 (btrace_fetch): Add cpu parameter. Update callers.
8276 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8277 Maybe overwrite the btrace configuration's cpu. Skip enabling
8278 errata workarounds if the vendor is unknown.
8279 * python/py-record-btrace.c: Include record-btrace.h.
8280 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8281 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8282 * record-btrace.c (record_btrace_cpu_state_kind): New.
8283 (record_btrace_cpu): New.
8284 (set_record_btrace_cpu_cmdlist): New.
8285 (record_btrace_get_cpu): New.
8286 (require_btrace_thread, record_btrace_info)
8287 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8288 (cmd_set_record_btrace_cpu_none): New.
8289 (cmd_set_record_btrace_cpu_auto): New.
8290 (cmd_set_record_btrace_cpu): New.
8291 (cmd_show_record_btrace_cpu): New.
8292 (_initialize_record_btrace): Initialize set/show record btrace cpu
8294 * record-btrace.h (record_btrace_get_cpu): New.
8296 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8298 * record.c (set_record_command): Fix typo in message.
8300 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8302 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8304 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8306 * infrun.c (process_event_stop_test): Call
8307 gdbarch_in_indirect_branch_thunk.
8308 * gdbarch.sh (in_indirect_branch_thunk): New.
8309 * gdbarch.c: Regenerated.
8310 * gdbarch.h: Regenerated.
8313 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8314 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8315 (ALLDEPFILES): Add x86-tdep.c.
8316 * arch-utils.h (default_in_indirect_branch_thunk): New.
8317 * arch-utils.c (default_in_indirect_branch_thunk): New.
8318 * i386-tdep: Include x86-tdep.h.
8319 (i386_in_indirect_branch_thunk): New.
8320 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8322 * amd64-tdep: Include x86-tdep.h.
8323 (amd64_in_indirect_branch_thunk): New.
8324 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8326 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8329 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8330 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8331 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8334 2018-04-12 Tom Tromey <tom@tromey.com>
8336 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8337 (rust_evaluate_subexp): Likewise.
8339 2018-04-12 Pedro Alves <palves@redhat.com>
8341 * procfs.c (procfs_detach): Make forward declaration's prototype
8342 match definition's protototype.
8343 (proc_get_LDT_entry): Remove stale do_cleanups call.
8345 2018-04-12 Pedro Alves <palves@redhat.com>
8347 * target.h (target_ops::to_has_exited): Delete.
8348 (target_has_exited): Delete.
8349 * target-delegates.c: Regenerate.
8351 2018-04-11 Pedro Alves <palves@redhat.com>
8353 * target.c (fileio_fh_t::t): Add comment.
8354 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8355 (target_fileio_close): Handle a NULL target.
8356 (invalidate_fileio_fh): New.
8357 (target_close): Call it.
8358 * remote.c (remote_hostio_send_command): No longer check whether
8359 remote_desc is open.
8361 2018-04-11 Pedro Alves <palves@redhat.com>
8363 * target.c (fileio_fh_t): Make it a named struct instead of a
8365 (fileio_fh_t::is_closed): New method.
8366 (DEF_VEC_O (fileio_fh_t)): Remove.
8367 (fileio_fhandles): Now a std::vector.
8368 (is_closed_fileio_fh): Delete.
8369 (acquire_fileio_fd): Adjust. Rename parameters.
8370 (release_fileio_fd): Adjust.
8371 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8372 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8373 (target_fileio_close): Adjust.
8375 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8377 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8380 2018-04-10 Pedro Alves <palves@redhat.com>
8382 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8383 (scoped_finish_thread_state): New class.
8384 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8386 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8387 (fetch_inferior_event, normal_stop): Likewise.
8388 * thread.c (finish_thread_state_cleanup): Delete.
8390 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8391 Pedro Alves <palves@redhat.com>
8393 * value.c: Include "selftest.h" and "common/array-view.h".
8394 (struct range) <operator ==>: New.
8395 (test_ranges_contain): New.
8396 (check_ranges_vector): New.
8397 (test_insert_into_bit_range_vector): New.
8398 (_initialize_values): Register selftests.
8399 * common/array-view.h (operator==, operator!=): New.
8401 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8403 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8405 * inline-frame.c: Include <algorithm>.
8406 (struct inline_state): Add constructor.
8407 (inline_state_s): Remove.
8408 (DEF_VEC_O(inline_state_s)): Remove.
8409 (inline_states): Change type to std::vector.
8410 (find_inline_frame_state): Adjust to std::vector.
8411 (allocate_inline_frame_state): Remove.
8412 (clear_inline_frame_state): Adjust to std::vector.
8413 (skip_inline_frames): Adjust to std::vector.
8415 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8417 * tracepoint.h (struct trace_state_variable): Add constructor.
8418 <name>: Change type to std::string.
8419 * tracepoint.c (tsv_s): Remove.
8420 (DEF_VEC_O(tsv_s)): Remove.
8421 (tvariables): Change to std::vector.
8422 (create_trace_state_variable): Adjust to std::vector.
8423 (find_trace_state_variable): Likewise.
8424 (find_trace_state_variable_by_number): Likewise.
8425 (delete_trace_state_variable): Likewise.
8426 (trace_variable_command): Adjust to std::string.
8427 (delete_trace_variable_command): Likewise.
8428 (tvariables_info_1): Adjust to std::vector.
8429 (save_trace_state_variables): Likewise.
8430 (start_tracing): Likewise.
8431 (merge_uploaded_trace_state_variables): Adjust to std::vector
8433 * target.h (struct target_ops)
8434 <to_download_trace_state_variable>: Pass reference to
8435 trace_state_variable.
8436 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8437 * target-delegates.c: Re-generate.
8438 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8439 (mi_tsv_deleted): Likewise.
8440 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8441 * remote.c (remote_download_trace_state_variable): Change
8442 pointer to reference and adjust.
8443 * make-target-delegates (parse_argtypes): Handle references.
8444 (write_function_header): Likewise.
8445 (munge_type): Likewise.
8447 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8449 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8450 string_view-selftests.c.
8451 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8453 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8454 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8455 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8456 * unittests/basic_string_view/element_access/char/1.cc:
8458 * unittests/basic_string_view/element_access/char/empty.cc:
8460 * unittests/basic_string_view/element_access/char/front_back.cc:
8462 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8463 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8465 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8467 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8469 * unittests/basic_string_view/operations/compare/char/1.cc:
8471 * unittests/basic_string_view/operations/compare/char/13650.cc:
8473 * unittests/basic_string_view/operations/copy/char/1.cc:
8475 * unittests/basic_string_view/operations/data/char/1.cc:
8477 * unittests/basic_string_view/operations/find/char/1.cc:
8479 * unittests/basic_string_view/operations/find/char/2.cc:
8481 * unittests/basic_string_view/operations/find/char/3.cc:
8483 * unittests/basic_string_view/operations/find/char/4.cc:
8485 * unittests/basic_string_view/operations/rfind/char/1.cc:
8487 * unittests/basic_string_view/operations/rfind/char/2.cc:
8489 * unittests/basic_string_view/operations/rfind/char/3.cc:
8491 * unittests/basic_string_view/operations/substr/char/1.cc:
8493 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8494 * unittests/string_view-selftests.c: New file.
8496 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8498 * unittests/basic_string_view/capacity/1.cc: New file.
8499 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8500 * unittests/basic_string_view/cons/char/1.cc: New file.
8501 * unittests/basic_string_view/cons/char/2.cc: New file.
8502 * unittests/basic_string_view/cons/char/3.cc: New file.
8503 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8504 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8505 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8506 * unittests/basic_string_view/element_access/char/1.cc: New file.
8507 * unittests/basic_string_view/element_access/char/2.cc: New file.
8508 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8509 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8510 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8511 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8512 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8513 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8514 * unittests/basic_string_view/include.cc: New file.
8515 * unittests/basic_string_view/inserters/char/1.cc: New file.
8516 * unittests/basic_string_view/inserters/char/2.cc: New file.
8517 * unittests/basic_string_view/inserters/char/3.cc: New file.
8518 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8519 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8520 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8521 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8522 * unittests/basic_string_view/literals/types.cc: New file.
8523 * unittests/basic_string_view/literals/values.cc: New file.
8524 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8525 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8526 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8527 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8528 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8529 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8530 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8531 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8532 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8533 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8534 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8535 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8536 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8537 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8538 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8539 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8540 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8541 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8542 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8543 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8544 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8545 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8546 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8547 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8548 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8549 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8550 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8551 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8552 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8553 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8554 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8555 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8556 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8557 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8558 * unittests/basic_string_view/operators/char/2.cc: New file.
8559 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8560 * unittests/basic_string_view/range_access/char/1.cc: New file.
8561 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8562 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8563 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8564 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8565 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8566 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8567 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8568 * unittests/basic_string_view/typedefs.cc: New file.
8569 * unittests/basic_string_view/types/1.cc: New file.
8571 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8573 * common/gdb_string_view.h: Remove libstdc++ implementation
8574 details, adjust to gdb reality.
8575 * common/gdb_string_view.tcc: Likewise.
8576 * cli/cli-script.c (struct string_view): Remove.
8577 (user_args) <m_args>: Change element type to gdb::string_view.
8578 (user_args::insert_args): Adjust.
8580 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8582 * common/gdb_string_view.h: New file.
8583 * common/gdb_string_view.tcc: New file.
8585 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8587 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8588 * configure: Re-generate.
8590 2018-04-09 Pedro Alves <palves@redhat.com>
8592 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8593 (set_target_gdbarch): Call
8594 gdb::observers::architecture_changed.notify instead of
8595 observer_notify_architecture_changed.
8597 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8599 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8600 (do_restore_current_traceframe_cleanup): Remove.
8601 (restore_current_traceframe_cleanup_dtor): Remove.
8602 (make_cleanup_restore_current_traceframe): Remove.
8603 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8605 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8606 * infrun.c (fetch_inferior_event): Use
8607 scoped_restore_current_traceframe.
8609 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8611 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8613 <n_allocated_type_units>: Remove.
8614 <all_type_units>: Change to std::vector.
8615 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8616 to std::vector change.
8617 (dwarf2_per_objfile::get_cutu): Likewise.
8618 (dwarf2_per_objfile::get_tu): Likewise.
8619 (create_signatured_type_table_from_index): Likewise.
8620 (create_signatured_type_table_from_debug_names): Likewise.
8621 (dw2_symtab_iter_next): Likewise.
8622 (dw2_print_stats): Likewise.
8623 (dw2_expand_all_symtabs): Likewise.
8624 (dw2_expand_marked_cus): Likewise.
8625 (dw2_debug_names_iterator::next): Likewise.
8626 (dwarf2_initialize_objfile): Likewise.
8627 (add_signatured_type_cu_to_table): Likewise.
8628 (create_all_type_units): Likewise.
8629 (add_type_unit): Likewise.
8630 (struct tu_abbrev_offset): Add constructor.
8631 (build_type_psymtabs_1): Adjust to std::vector change.
8632 (print_tu_stats): Likewise.
8633 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8634 (write_debug_names): Likewise.
8636 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8638 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8639 Make an std::vector.
8640 <n_comp_units>: Remove.
8641 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8642 to std::vector change.
8643 (dwarf2_per_objfile::get_cutu): Likewise.
8644 (dwarf2_per_objfile::get_cu): Likewise.
8645 (create_cus_from_index): Likewise.
8646 (create_addrmap_from_index): Likewise.
8647 (create_addrmap_from_aranges): Likewise.
8648 (dwarf2_read_index): Likewise.
8649 (dw2_find_last_source_symtab): Likewise.
8650 (dw2_map_symtabs_matching_filename): Likewise.
8651 (dw2_symtab_iter_next): Likewise.
8652 (dw2_print_stats): Likewise.
8653 (dw2_expand_all_symtabs): Likewise.
8654 (dw2_expand_symtabs_with_fullname): Likewise.
8655 (dw2_expand_marked_cus): Likewise.
8656 (dw2_map_symbol_filenames): Likewise.
8657 (create_cus_from_debug_names): Likewise.
8658 (dwarf2_read_debug_names): Likewise.
8659 (dw2_debug_names_iterator::next): Likewise.
8660 (dwarf2_initialize_objfile): Likewise.
8661 (set_partial_user): Likewise.
8662 (dwarf2_build_psymtabs_hard): Likewise.
8663 (read_comp_units_from_section): Remove arguments, adjust to
8665 (create_all_comp_units): Adjust to std::vector and
8666 read_comp_units_from_section changes.
8667 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8669 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8670 (psyms_seen_size): Likewise.
8671 (write_gdbindex): Likewise.
8672 (write_debug_names): Likewise.
8674 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8676 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8677 with dwarf2_per_objfile.
8678 (create_cus_from_index): Likewise.
8679 (create_signatured_type_table_from_index): Likewise.
8680 (dwarf2_read_index): Likewise.
8681 (dwarf2_initialize_objfile): Likewise.
8682 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8683 per_cu rather than get_dwarf2_per_objfile.
8685 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8687 * dwarf2read.h (struct signatured_type): Forward declare.
8688 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8690 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8691 (dw2_get_cutu): ...this.
8692 (dwarf2_per_objfile::get_cu): Rename from...
8693 (dw2_get_cu): ...this.
8694 (dwarf2_per_objfile::get_tu): New.
8695 (create_addrmap_from_index): Adjust.
8696 (create_addrmap_from_aranges): Adjust.
8697 (dw2_find_last_source_symtab): Adjust.
8698 (dw2_map_symtabs_matching_filename): Adjust.
8699 (dw2_symtab_iter_next): Adjust.
8700 (dw2_print_stats): Adjust.
8701 (dw2_expand_all_symtabs): Adjust.
8702 (dw2_expand_symtabs_with_fullname): Adjust.
8703 (dw2_expand_marked_cus): Adjust.
8704 (dw_expand_symtabs_matching_file_matcher): Adjust.
8705 (dw2_map_symbol_filenames): Adjust.
8706 (dw2_debug_names_iterator::next): Adjust.
8707 (dwarf2_initialize_objfile): Adjust.
8708 (set_partial_user): Adjust.
8709 (dwarf2_build_psymtabs_hard): Adjust.
8711 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8713 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8714 Remove unused variables.
8715 (dw2_map_symtabs_matching_filename): Likewise.
8716 (dwarf2_record_block_ranges): Likewise.
8717 (dwarf2_read_addr_index): Likewise.
8718 (follow_die_offset): Likewise.
8720 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8722 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8723 to symbol_file_add_main.
8725 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8728 * mi/mi-console.c (do_fputc_async_safe): New.
8729 (mi_console_file::write_async_safe): New.
8730 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8731 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8733 * ui-file.c (ui_file::putstrn): Adjust call to
8734 fputstrn_unfiltered.
8735 * utils.c (printchar): Replace do_fputs and do_fprintf
8736 parameters by do_fputc.
8737 (fputstr_filtered): Adjust call to printchar.
8738 (fputstr_unfiltered): Likewise.
8739 (fputstrn_filtered): Likewise.
8740 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8742 * utils.h (do_fputc_ftype): New typedef.
8743 (fputstrn_unfiltered): Add do_fputc parameter.
8745 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8747 * regformats/i386/i386-avx.dat: Remove.
8749 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8752 * amd64-tdep.c (amd64_none_init_abi): New function.
8753 (amd64_x32_none_init_abi): New function.
8754 (_initialize_amd64_tdep): Register handlers for x86-64 and
8755 x64_32 with GDB_OSABI_NONE.
8756 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8757 GDB_OSABI_NONE osabi.
8759 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8762 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8764 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8765 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8767 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8769 * common/byte-vector.h (char_vector): New type.
8770 * target.h (target_read_alloc): Return
8771 gdb::optional<byte_vector>.
8772 (target_read_stralloc): Return gdb::optional<char_vector>.
8773 (target_get_osdata): Return gdb::optional<char_vector>.
8774 * target.c (target_read_alloc_1): Templatize. Replacement
8775 manual memory management with vector.
8776 (target_read_alloc): Change return type, adjust.
8777 (target_read_stralloc): Change return type, adjust.
8778 (target_get_osdata): Change return type, adjust.
8779 * auxv.c (struct auxv_info) <length>: Remove.
8780 <data>: Change type to gdb::optional<byte_vector>.
8781 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8782 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8783 (target_auxv_search): Adjust.
8784 (fprint_target_auxv): Adjust.
8785 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8786 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8787 (linux_make_corefile_notes): Adjust.
8788 * osdata.c (get_osdata): Adjust.
8789 * remote.c (remote_get_threads_with_qxfer): Adjust.
8790 (remote_memory_map): Adjust.
8791 (remote_traceframe_info): Adjust.
8792 (btrace_read_config): Adjust.
8793 (remote_read_btrace): Adjust.
8794 (remote_pid_to_exec_file): Adjust.
8795 * solib-aix.c (solib_aix_get_library_list): Adjust.
8796 * solib-dsbt.c (decode_loadmap): Don't free buf.
8797 (dsbt_get_initial_loadmaps): Adjust.
8798 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8799 * solib-target.c (solib_target_current_sos): Adjust.
8800 * tracepoint.c (sdata_make_value): Adjust.
8801 * xml-support.c (xinclude_start_include): Adjust.
8802 (xml_fetch_content_from_file): Adjust.
8803 * xml-support.h (xml_fetch_another): Change return type.
8804 (xml_fetch_content_from_file): Change return type.
8805 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8806 * xml-tdesc.c (file_read_description_xml): Adjust.
8807 (fetch_available_features_from_target): Change return type.
8808 (target_fetch_description_xml): Adjust.
8809 (target_read_description_xml): Adjust.
8811 2018-04-06 Tom Tromey <tom@tromey.com>
8813 * value.c (~value): Update.
8814 (struct value) <contents>: Now unique_xmalloc_ptr.
8815 (value_contents_bits_eq, allocate_value_contents)
8816 (value_contents_raw, value_contents_all_raw)
8817 (value_contents_for_printing, value_contents_for_printing_const)
8818 (set_value_enclosing_type): Update.
8820 2018-04-06 Tom Tromey <tom@tromey.com>
8822 * value.c (range_s): Remove typedef, VEC.
8823 (struct range): Add operator<.
8824 (range_lessthan): Remove.
8825 (ranges_contain): Change type.
8827 (struct value) <unavailable, optimized_out>: Now std::vector.
8828 (value_entirely_available)
8829 (value_entirely_covered_by_range_vector)
8830 (value_entirely_unavailable, value_entirely_optimized_out):
8832 (insert_into_bit_range_vector): Change argument type.
8833 (find_first_range_overlap): Likewise.
8834 (struct ranges_and_idx, value_contents_bits_eq)
8835 (require_not_optimized_out, require_available): Update.
8836 (ranges_copy_adjusted): Change argument types.
8837 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8839 2018-04-06 Tom Tromey <tom@tromey.com>
8841 * value.c (~value): Update.
8842 (struct value) <parent>: Now a value_ref_ptr.
8843 (value_parent, set_value_parent, value_address, value_copy):
8846 2018-04-06 Tom Tromey <tom@tromey.com>
8848 * value.c (struct value): Add constructor, destructor, and member
8850 (allocate_value_lazy, value_decref): Update.
8852 2018-04-06 Tom Tromey <tom@tromey.com>
8854 * value.c (struct value) <released, next>: Remove.
8855 (all_values): Now a std::vector.
8856 (allocate_value_lazy): Update.
8857 (value_next): Remove.
8858 (value_mark, value_free_to_mark, release_value)
8859 (value_release_to_mark): Update.
8861 2018-04-06 Tom Tromey <tom@tromey.com>
8863 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8864 (free_value_chain): Remove.
8865 * value.c (free_value_chain): Remove.
8866 (value_release_to_mark): Return a std::vector.
8867 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8869 (check_condition): Update.
8870 * eval.c (fetch_subexp_value): Change "val_chain" to a
8872 * breakpoint.c (update_watchpoint): Update.
8873 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8875 2018-04-06 Tom Tromey <tom@tromey.com>
8877 * value.h (free_all_values): Remove.
8878 * value.c (free_all_values): Remove.
8880 2018-04-06 Tom Tromey <tom@tromey.com>
8882 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8883 (value_history_chain, value_history_count): Remove.
8884 (value_history): New global.
8885 (record_latest_value, access_value_history, show_values)
8886 (preserve_values): Update.
8888 2018-04-06 Tom Tromey <tom@tromey.com>
8890 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8891 * varobj.c (varobj_set_display_format, varobj_set_value)
8892 (install_default_visualizer, construct_visualizer)
8893 (install_new_value, ~varobj, varobj_get_value_type)
8894 (my_value_of_variable, varobj_editable_p): Update.
8895 * c-varobj.c (c_describe_child, c_value_of_variable)
8896 (cplus_number_of_children, cplus_describe_child): Update.
8897 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8898 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8899 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8901 2018-04-06 Tom Tromey <tom@tromey.com>
8903 * printcmd.c (last_examine_address): Change type to
8905 (do_examine, x_command): Update.
8907 2018-04-06 Tom Tromey <tom@tromey.com>
8909 * value.c (release_value): Update.
8910 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8911 (struct bpstats) <val>: Now a value_ref_ptr.
8912 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8913 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8914 (~watchpoint, print_it_watchpoint, watch_command_1)
8915 (invalidate_bp_value_on_memory_change): Update.
8917 2018-04-06 Tom Tromey <tom@tromey.com>
8919 * varobj.c (varobj_clear_saved_item)
8920 (update_dynamic_varobj_children, install_new_value, ~varobj):
8922 * value.h (value_incref): Move declaration earlier.
8923 (value_decref): Rename from value_free.
8924 (struct value_ref_policy): New.
8925 (value_ref_ptr): New typedef.
8926 (struct value_deleter): Remove.
8927 (gdb_value_up): Remove typedef.
8928 (release_value): Change return type.
8929 (release_value_or_incref): Remove.
8930 * value.c (set_value_parent): Update.
8931 (value_incref): Change return type.
8932 (value_decref): Rename from value_free.
8933 (value_free_to_mark, free_all_values, free_value_chain): Update.
8934 (release_value): Return value_ref_ptr.
8935 (release_value_or_incref): Remove.
8936 (record_latest_value, set_internalvar, clear_internalvar):
8938 * stack.c (info_frame_command): Don't call value_free.
8939 * python/py-value.c (valpy_dealloc, valpy_new)
8940 (value_to_value_object): Update.
8941 * printcmd.c (do_examine): Update.
8942 * opencl-lang.c (lval_func_free_closure): Update.
8943 * mi/mi-main.c (register_changed_p): Don't call value_free.
8944 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8945 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8946 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8948 * guile/scm-value.c (vlscm_free_value_smob)
8949 (vlscm_scm_from_value): Update.
8950 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8951 (frame_unwind_register_unsigned, get_frame_register_bytes)
8952 (put_frame_register_bytes): Don't call value_free.
8953 * findvar.c (address_from_register): Don't call value_free.
8954 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8955 * dwarf2loc.c (entry_data_value_free_closure)
8956 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8957 (dwarf2_evaluate_loc_desc_full): Update.
8958 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8959 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8960 (~watchpoint, watch_command_1)
8961 (invalidate_bp_value_on_memory_change): Update.
8962 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8964 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8967 * warning.m4: Add -Wno-error=deprecated-register.
8968 * configure: Re-generate.
8970 2018-04-05 Tom Tromey <tom@tromey.com>
8972 * linespec.h: Remove include of "vec.h".
8974 2018-04-05 Tom Tromey <tom@tromey.com>
8976 * linespec.c (typep): Remove typedef.
8977 (find_methods, find_superclass_methods): Take a std::vector.
8978 (find_method): Use std::vector.
8980 2018-04-05 Tom Tromey <tom@tromey.com>
8982 * utils.c (compare_strings): Remove.
8983 * utils.h (compare_strings): Remove.
8984 * objc-lang.h (find_imps): Update.
8985 * objc-lang.c (find_methods): Take a std::vector.
8986 (uniquify_strings, find_imps): Likewise.
8987 * linespec.c (find_methods): Take a std::vector.
8988 (decode_objc): Use std::vector.
8989 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8991 (find_method, find_function_symbols): Use std::vector.
8993 2018-04-05 Tom Tromey <tom@tromey.com>
8995 * completer.c (completion_tracker::completion_tracker): Remove
8997 (completion_tracker::discard_completions): Likewise.
8998 * breakpoint.c (ambiguous_names_p): Remove cast.
8999 * ada-lang.c (_initialize_ada_language): Remove cast.
9000 * utils.h (streq): Update.
9001 (streq_hash): Add new declaration.
9002 * utils.c (streq): Return bool.
9003 (streq_hash): New function.
9005 2018-04-05 Tom Tromey <tom@tromey.com>
9007 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9008 Remove a string copy.
9010 2018-04-05 Tom Tromey <tom@tromey.com>
9012 * linespec.c (filter_results): Use std::vector.
9013 (decode_line_2, decode_line_full): Update.
9015 2018-04-05 Tom Tromey <tom@tromey.com>
9017 * linespec.c (canonical_to_fullform): Return std::string.
9018 (filter_results): Update.
9019 (struct decode_line_2_item): Add constructor.
9020 <fullform, displayform>: Now std::string.
9021 (decode_line_2_compare_items): Now a std::sort comparator.
9022 (decode_line_2): Update.
9024 2018-04-05 Tom Tromey <tom@tromey.com>
9026 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9027 (unexpected_linespec_error): Update.
9028 (linespec_parse_basic, parse_linespec): Update.
9030 2018-04-05 Tom Tromey <tom@tromey.com>
9032 * linespec.c (linespec_parse_basic): Reindent.
9034 2018-04-05 Tom Tromey <tom@tromey.com>
9036 * minsyms.h (iterate_over_minimal_symbols): Update.
9037 * minsyms.c (iterate_over_minimal_symbols): Take a
9039 * linespec.c (struct collect_minsyms): Remove.
9040 (compare_msyms): Now a std::sort comparator.
9041 (add_minsym): Add parameters.
9042 (search_minsyms_for_name): Update. Use std::vector.
9044 2018-04-03 Tom Tromey <tom@tromey.com>
9046 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9049 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9051 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9053 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9056 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9057 printing static type.
9059 2018-04-01 Tom Tromey <tom@tromey.com>
9061 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9062 (rs6000_xfer_shared_libraries): Update.
9064 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9066 * common/gdb_vecs.h (char_ptr): Remove.
9067 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9069 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9071 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9073 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9075 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9077 * tracepoint.h (struct uploaded_tp): Initialize fields.
9078 <actions, step_actions, cmd_strings>: Change type to
9079 std::vector<char *>.
9080 * tracepoint.c (get_uploaded_tp): Allocate with new.
9081 (free_uploaded_tps): Free with delete.
9082 (parse_tracepoint_definition): Adjust to std::vector change.
9083 * breakpoint.c (read_uploaded_action): Likewise.
9084 (create_tracepoint_from_upload): Likewise.
9085 * ctf.c (ctf_write_uploaded_tp): Likewise.
9086 (SET_ARRAY_FIELD): Likewise.
9087 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9089 2018-03-30 Tom Tromey <tom@tromey.com>
9091 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9093 (svr4_keep_data_in_core): Update.
9094 (svr4_read_so_list): Update.
9096 2018-03-30 Tom Tromey <tom@tromey.com>
9098 * windows-nat.c (handle_output_debug_string, handle_exception):
9100 * target.h (target_read_string): Update.
9101 * target.c (target_read_string): Change "string" to
9103 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9105 * solib-frv.c (frv_current_sos): Update.
9106 * solib-dsbt.c (dsbt_current_sos): Update.
9107 * solib-darwin.c (darwin_current_sos): Update.
9108 * linux-thread-db.c (inferior_has_bug): Update.
9109 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9110 Update. Remove alloca.
9111 * ada-lang.c (ada_main_name): Update.
9113 2018-03-30 Tom Tromey <tom@tromey.com>
9115 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9116 (struct dwo_file_deleter): New.
9117 (dwo_file_up): New typedef.
9118 (open_and_init_dwo_file): Use dwo_file_up.
9119 (free_dwo_file_cleanup): Remove.
9121 2018-03-30 Tom Tromey <tom@tromey.com>
9123 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9124 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9126 2018-03-30 Tom Tromey <tom@tromey.com>
9128 * dwarf2read.c (class free_cached_comp_units): New class.
9129 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9130 (free_cached_comp_units): Remove function.
9132 2018-03-30 Tom Tromey <tom@tromey.com>
9134 * utils.h (make_cleanup_unpush_target): Remove.
9135 * inf-ptrace.c (struct target_unpusher): New.
9136 (target_unpush_up) New typedef.
9137 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9139 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9141 2018-03-27 Tom Tromey <tom@tromey.com>
9143 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9145 2018-03-27 Pedro Alves <palves@redhat.com>
9146 Tom Tromey <tom@tromey.com>
9148 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9149 destructor. Now a class.
9150 (gdb_readline_wrapper_cleanup): Remove function.
9151 (gdb_readline_wrapper): Remove cleanups.
9153 2018-03-27 Tom Tromey <tom@tromey.com>
9155 * typeprint.h (struct type_print_options) <local_typedefs,
9156 global_typedefs>: Remove "struct" keyword.
9157 (class typedef_hash_table): New class.
9158 (recursively_update_typedef_hash, add_template_parameters)
9159 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9160 (find_typedef_in_hash): Don't declare.
9161 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9162 (typedef_hash_table::recursively_update): Rename from
9163 recursively_update_typedef_hash. Now a member.
9164 (typedef_hash_table::add_template_parameters): Rename from
9165 add_template_parameters. Now a member.
9166 (typedef_hash_table::typedef_hash_table): Now a constructor;
9167 rename from create_typedef_hash.
9168 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9169 rename from free_typedef_hash.
9170 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9171 (do_free_global_table): Remove.
9172 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9173 from copy_type_recursive.
9174 (create_global_typedef_table): Remove.
9175 (typedef_hash_table::find_global_typedef): Now a member of
9177 (typedef_hash_table::find_typedef): Rename from
9178 find_typedef_in_hash; now a member.
9179 (whatis_exp): Update.
9180 * extension.h (struct ext_lang_type_printers): Add constructor and
9182 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9184 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9185 Now a constructor; rename from start_ext_lang_type_printers.
9186 (ext_lang_type_printers): Now a destructor; rename from
9187 free_ext_lang_type_printers.
9188 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9190 (c_type_print_base_struct_union): Update. Remove cleanups.
9192 2018-03-27 Tom Tromey <tom@tromey.com>
9194 * dwarf-index-write.c: Include <cmath>.
9196 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9198 * NEWS: Add entry describing new "set|show varsize-limit" command.
9199 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9201 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9204 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9206 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9208 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9209 * dwarf-index-common.c: New file.
9210 * dwarf-index-common.h: New file.
9211 * dwarf-index-write.c: New file.
9212 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9213 (struct dwarf2_section_info): Move from here.
9214 (dwarf2_section_info_def): Likewise.
9215 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9216 (offset_type): Likewise.
9217 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9218 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9219 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9220 (byte_swap): Likewise.
9221 (MAYBE_SWAP): Likewise.
9222 (dwarf2_per_cu_ptr): Likewise.
9223 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9224 (struct tu_stats): Likewise.
9225 (struct dwarf2_per_objfile): Likewise.
9226 (struct dwarf2_per_cu_data): Likewise.
9227 (struct signatured_type): Likewise.
9228 (sig_type_ptr): Likewise.
9229 (DEF_VEC_P (sig_type_ptr)): Likewise.
9230 (INDEX4_SUFFIX): Likewise.
9231 (INDEX5_SUFFIX): Likewise.
9232 (DEBUG_STR_SUFFIX): Likewise.
9233 (dwarf2_read_section): Make non-static.
9234 (mapped_index_string_hash): Move from here.
9235 (dwarf5_djb_hash): Likewise.
9236 (file_write): Likewise.
9237 (class data_buf): Likewise.
9238 (struct symtab_index_entry): Likewise.
9239 (struct mapped_symtab): Likewise.
9240 (find_slot): Likewise.
9241 (hash_expand): Likewise.
9242 (add_index_entry): Likewise.
9243 (uniquify_cu_indices): Likewise.
9244 (class c_str_view): Likewise.
9245 (class c_str_view_hasher): Likewise.
9246 (class vector_hasher): Likewise.
9247 (write_hash_table): Likewise.
9248 (psym_index_map): Likewise.
9249 (struct addrmap_index_data): Likewise.
9250 (add_address_entry): Likewise.
9251 (add_address_entry_worker): Likewise.
9252 (write_address_map): Likewise.
9253 (symbol_kind): Likewise.
9254 (write_psymbols): Likewise.
9255 (struct signatured_type_index_data): Likewise.
9256 (write_one_signatured_type): Likewise.
9257 (recursively_count_psymbols): Likewise.
9258 (recursively_write_psymbols): Likewise.
9259 (class debug_names): Likewise.
9260 (check_dwarf64_offsets): Likewise.
9261 (psyms_seen_size): Likewise.
9262 (write_gdbindex): Likewise.
9263 (write_debug_names): Likewise.
9264 (assert_file_size): Likewise.
9265 (write_psymtabs_to_index): Likewise.
9266 (save_gdb_index_command): Likewise.
9267 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9269 * dwarf2read.h: New file.
9271 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9274 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9275 symbol name if the CU's language stores symbol names in linkage
9277 * language.h (struct language_defn)
9278 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9279 all instances of this struct.
9281 2018-03-26 Tom Tromey <tom@tromey.com>
9283 * stack.c (backtrace_command_1): Remove verbose code.
9285 2018-03-26 Tom Tromey <tom@tromey.com>
9287 * python/py-framefilter.c (py_print_type): Don't catch
9288 exceptions. Return void.
9289 (py_print_value): Likewise.
9290 (py_print_single_arg): Likewise.
9291 (enumerate_args): Don't catch exceptions.
9292 (py_print_args): Likewise.
9293 (py_print_frame): Likewise.
9294 (gdbpy_apply_frame_filter): Catch exceptions here.
9296 2018-03-26 Tom Tromey <tom@tromey.com>
9298 * stack.c (_initialize_stack): Remove trailing newlines from help
9299 text. Add "Usage" line to "backtrace" help.
9301 2018-03-26 Tom Tromey <tom@tromey.com>
9304 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9306 2018-03-26 Tom Tromey <tom@tromey.com>
9308 * python/py-framefilter.c (py_print_single_arg): Return
9309 EXT_LANG_BT_ERROR from catch.
9311 2018-03-26 Tom Tromey <tom@tromey.com>
9314 * stack.c (backtrace_command_1): Move some code into no-filters
9317 2018-03-26 Tom Tromey <tom@tromey.com>
9319 * python/py-framefilter.c (throw_quit_or_print_exception): New
9321 (gdbpy_apply_frame_filter): Use it.
9323 2018-03-26 Tom Tromey <tom@tromey.com>
9326 * python/py-framefilter.c (py_print_type, py_print_value)
9327 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9330 2018-03-26 Tom Tromey <tom@tromey.com>
9332 * python/py-framefilter.c (enumerate_args): Use
9333 gdb::unique_xmalloc_ptr.
9335 2018-03-26 Tom Tromey <tom@tromey.com>
9337 * python/py-framefilter.c (py_print_frame): Return
9339 (gdbpy_apply_frame_filter): Update comment.
9340 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9342 <EXT_LANG_BT_NO_FILTERS>: Change value.
9344 2018-03-26 Tom Tromey <tom@tromey.com>
9347 * stack.c (backtrace_command): Parse "hide" argument.
9348 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9349 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9352 2018-03-26 Tom Tromey <tom@tromey.com>
9354 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9356 (backtrace_command): Remove "fulltrace", add "flags".
9358 2018-03-26 Tom Tromey <tom@tromey.com>
9360 * stack.c (backtrace_command): Rewrite command line parsing.
9362 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9364 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9366 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9368 * filename-seen-cache.h: Add include guard.
9370 2018-03-26 Keith Seitz <keiths@redhat.com>
9372 * symfile.c (place_section): Remove "struct" from section_addr_info
9374 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9375 "struct" keyword from section_addr_info.
9377 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9379 * regformats/regdef.h (reg): Add constructors.
9381 2018-03-25 Pedro Alves <palves@redhat.com>
9383 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9384 if then/else bodies in var_func_name extraction.
9386 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9388 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9389 lookup_minimal_symbol() to find symbol entry.
9390 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9392 2018-03-23 Keith Seitz <keiths@redhat.com>
9395 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9396 nested type definitions for C++, too.
9398 2018-03-23 Tom Tromey <tom@tromey.com>
9400 * machoread.c (struct oso_el): Add a constructor. Don't define as
9402 (macho_register_oso): Remove.
9403 (macho_symtab_read): Take a std::vector.
9404 (oso_el_compare_name): Now a std::sort comparator.
9405 (macho_symfile_read_all_oso): Take a std::vector.
9406 (macho_symfile_read): Use std::vector. Remove cleanups.
9408 2018-03-22 Tom Tromey <tom@tromey.com>
9410 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9411 (record_full_goto_bookmark): Use std::string.
9413 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9416 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9419 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9421 * rs6000-tdep.c (store_insn_p): New function.
9422 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9423 and cr_reg to their unshifted values. Use store_insn_p to
9424 match LR saves using either R1 or fdata->alloca_reg. Use
9425 store_insn_p to match CR saves. Set alloca_reg_offset
9426 when alloca_reg and framep are set. Remove lr_reg shift
9427 when assigning to fdata->lr_register.
9429 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9431 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9432 command line args instead of emitting a warning.
9434 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9436 * tracepoint.h (struct static_tracepoint_marker): Initialize
9437 fields, define default constructor, move constructor and move
9438 assignment, disable the rest.
9439 <str_id, extra>: Make std::string.
9440 (release_static_tracepoint_marker): Remove.
9441 (free_current_marker): Remove.
9442 * tracepoint.c (free_current_marker): Remove.
9443 (parse_static_tracepoint_marker_definition): Adjust to
9444 std::string, use new hex2str overload.
9445 (release_static_tracepoint_marker): Remove.
9446 (print_one_static_tracepoint_marker): Get marker by reference
9447 and adjust to std::string.
9448 (info_static_tracepoint_markers_command): Adjust to std::vector
9450 * target.h (static_tracepoint_marker_p): Remove typedef.
9451 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9452 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9454 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9456 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9457 (target_debug_print_std_vector_static_tracepoint_marker): New.
9458 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9460 (target_debug_print_static_tracepoint_marker_p): ... this.
9461 * target-delegates.c: Re-generate.
9462 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9464 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9465 (decode_static_tracepoint_spec): Adjust to std::vector.
9466 (tracepoint_print_one_detail): Adjust to std::string.
9467 (strace_marker_decode_location): Adjust to std::string.
9468 (update_static_tracepoint): Adjust to std::string, remove call
9469 to release_static_tracepoint_marker.
9470 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9471 Adjust to std::vector.
9472 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9473 (remote_static_tracepoint_markers_by_strid): Adjust to
9475 * common/rsp-low.h (hex2str): New overload with explicit count
9477 * common/rsp-low.c (hex2str): New overload with explicit count
9479 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9480 (_initialize_rsp_low_selftests): Add test_hex2str test.
9481 * unittests/tracepoint-selftests.c
9482 (test_parse_static_tracepoint_marker_definition): Adjust to
9485 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9487 * tracepoint.c (parse_static_tracepoint_marker_definition):
9488 Consider case where the definition is followed by more
9490 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9491 tracepoint-selftests.c.
9492 * unittests/tracepoint-selftests.c: New.
9494 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9496 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9499 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9501 * symtab.c (find_pc_sect_line): fixed indentation.
9503 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9505 * symtab.c (find_pc_sect_line): now uses binary search.
9507 2018-03-19 Tom Tromey <tom@tromey.com>
9509 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9512 2018-03-19 Pedro Alves <palves@redhat.com>
9513 Tom Tromey <tom@tromey.com>
9515 * unittests/observable-selftests.c: New file.
9516 * common/observable.h: New file.
9517 * observable.h: New file.
9518 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9519 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9520 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9521 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9522 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9523 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9524 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9525 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9526 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9527 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9528 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9529 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9530 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9531 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9532 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9533 tui/tui-interp.c, valops.c: Update all users.
9534 * tui/tui-hooks.c (tui_bp_created_observer)
9535 (tui_bp_deleted_observer, tui_bp_modified_observer)
9536 (tui_inferior_exit_observer, tui_before_prompt_observer)
9537 (tui_normal_stop_observer, tui_register_changed_observer):
9539 (tui_observers_token): New global.
9540 (attach_or_detach, tui_attach_detach_observers): New functions.
9541 (tui_install_hooks, tui_remove_hooks): Use
9542 tui_attach_detach_observers.
9543 * record-btrace.c (record_btrace_thread_observer): Remove.
9544 (record_btrace_thread_observer_token): New global.
9545 * observer.sh: Remove.
9546 * observer.c: Rename to observable.c.
9547 * observable.c (namespace gdb_observers): Define new objects.
9548 (observer_debug): Move into gdb_observers namespace.
9549 (struct observer, struct observer_list, xalloc_observer_list_node)
9550 (xfree_observer_list_node, generic_observer_attach)
9551 (generic_observer_detach, generic_observer_notify): Remove.
9552 (_initialize_observer): Update.
9553 Don't include observer.inc.
9554 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9555 (clean mostlyclean): Likewise.
9556 (observer.h, observer.inc): Remove targets.
9557 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9558 (COMMON_SFILES): Use observable.c, not observer.c.
9559 * .gitignore: Remove observer.h.
9561 2018-03-18 Tom Tromey <tom@tromey.com>
9563 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9565 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9567 2018-03-17 Tom Tromey <tom@tromey.com>
9569 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9571 2018-03-17 Tom Tromey <tom@tromey.com>
9573 * target.c (class scoped_target_fd): New.
9574 (target_fileio_close_cleanup): Remove.
9575 (target_fileio_read_alloc_1): Use scoped_target_fd.
9577 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9579 * silent-rules.mk: New.
9580 * Makefile.in: Include silent-rules.mk
9581 (srcdir, VPATH, top_srcdir): Move up.
9582 (COMPILE): Add ECHO_CXX.
9583 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9584 (init.c): Add ECHO_INIT_C.
9585 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9586 (version.c): Add ECHO_GEN.
9587 (printcmd.o): Add ECHO_CXX.
9588 (target-float.o): Add ECHO_CXX.
9589 (ada-exp.o): Add ECHO_CXX.
9590 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9591 (insight$(EXEEXT)): Add ECHO_CXXLD.
9592 * gnulib/configure.ac: Add AM_SILENT_RULES.
9593 * gnulib/aclocal.m4: Re-generate.
9594 * gnulib/configure: Re-generate.
9595 * gnulib/import/Makefile.in: Re-generate.
9597 2018-03-16 Tom Tromey <tom@tromey.com>
9599 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9600 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9601 * utils.c (do_free_section_addr_info)
9602 (make_cleanup_free_section_addr_info): Remove.
9603 * symfile.h (struct other_sections): Add constructor.
9604 (struct section_addr_info): Remove.
9605 (section_addr_info): New typedef.
9606 (struct sym_fns) <sym_offsets>: Change type of parameter.
9607 (build_section_addr_info_from_objfile)
9608 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9609 (default_symfile_offsets, symbol_file_add)
9610 (symbol_file_add_from_bfd)
9611 (build_section_addr_info_from_section_table): Update.
9612 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9613 * symfile.c (alloc_section_addr_info): Remove.
9614 (build_section_addr_info_from_section_table): Change return type.
9616 (build_section_addr_info_from_bfd)
9617 (build_section_addr_info_from_objfile): Likewise.
9618 (free_section_addr_info): Remove.
9619 (relative_addr_info_to_section_offsets): Change type of "addrs".
9620 (addrs_section_compar): Now a std::sort comparator.
9621 (addrs_section_sort): Change return type.
9622 (addr_info_make_relative): Change type of "addrs". Update.
9623 (default_symfile_offsets, syms_from_objfile_1)
9624 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9625 (symbol_file_add_separate): Update.
9626 (symbol_file_add): Change type of "addrs". Update.
9627 (add_symbol_file_command): Update. Remove cleanups.
9628 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9630 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9631 * solib.c (solib_read_symbols): Update.
9632 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9633 * machoread.c (macho_symfile_offsets): Update.
9634 * jit.c (jit_bfd_try_read_symtab): Update.
9636 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9638 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9639 unittests/utils-selftests.c.
9640 * unittests/utils-selftests.c: New file.
9642 2018-03-14 Tom Tromey <tom@tromey.com>
9645 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9648 2018-03-14 Tom Tromey <tom@tromey.com>
9651 * printcmd.c (printf_pointer): Allow "-" in format.
9653 2018-03-14 Tom Tromey <tom@tromey.com>
9655 * printcmd.c (_initialize_printcmd): Add usage to printf.
9657 2018-03-14 Yao Qi <qiyao@sourceware.org>
9659 * MAINTAINERS: Update my email address.
9661 2018-03-13 Tom Tromey <tom@tromey.com>
9663 * machoread.c (macho_check_dsym): Change filenamep to a
9665 (macho_symfile_read): Update.
9666 * symfile.c (load_command): Use std::string.
9668 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9670 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9671 to error message string.
9672 (riscv_register_name): Use xsnprintf instead of sprintf.
9673 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9675 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9677 (riscv_push_dummy_call): Likewise.
9679 2018-03-12 Tom Tromey <tom@tromey.com>
9681 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9682 Use gdb::byte_vector.
9683 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9685 2018-03-12 Yao Qi <yao.qi@linaro.org>
9687 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9688 parameter type to readable_regcache.
9689 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9692 2018-03-11 Tom Tromey <tom@tromey.com>
9694 * dwarf2read.c (struct nextfield): Add initializers.
9695 (struct nextfnfield): Remove.
9696 (struct fnfieldlist): Add initializers. Remove "length" and
9697 "head", use std::vector.
9698 (struct decl_field_list): Remove.
9699 (struct field_info): Add initializers.
9700 <fields, baseclasses>: Now std::vector.
9701 <nbaseclasses, nfnfields, typedef_field_list_count,
9702 nested_types_list_count>: Remove.
9703 (dwarf2_add_field, dwarf2_add_type_defn)
9704 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9705 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9706 (process_structure_scope): Update.
9708 2018-03-11 Tom Tromey <tom@tromey.com>
9710 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9711 for use by std::sort.
9712 (build_type_psymtabs_1): Use std::vector.
9714 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9716 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9717 and LIBMPFR in the printed configuration.
9719 2018-03-08 Tom Tromey <tom@tromey.com>
9721 * source.c (get_filename_and_charpos): Use scoped_fd.
9722 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9723 (procfs_pidlist): Likewise.
9724 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9725 (iterate_over_mappings): Likewise.
9727 2018-03-08 Tom Tromey <tom@tromey.com>
9729 * infcall.c (struct call_return_meta_info)
9730 <stack_temporaries_enabled>: Remove.
9731 (get_call_return_value, call_function_by_hand_dummy): Update.
9732 * thread.c (disable_thread_stack_temporaries): Remove.
9733 (enable_thread_stack_temporaries): Remove.
9734 (thread_stack_temporaries_enabled_p): Return bool.
9735 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9736 (get_last_thread_stack_temporary): Update.
9737 * eval.c (evaluate_subexp): Update.
9738 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9739 class, not a function.
9740 (value_ptr, value_vec): Remove typedefs.
9741 (class thread_info) <stack_temporaries_enabled>: Now bool.
9742 <stack_temporaries>: Now a std::vector.
9743 (thread_stack_temporaries_enabled_p)
9744 (value_in_thread_stack_temporaries): Return bool.
9746 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9748 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9749 (getpkt_or_notif_sane_1): Likewise.
9751 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9753 * build-id.c (build_id_to_debug_bfd): Use std::string.
9755 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9757 * build-id.c (find_separate_debug_file_by_buildid): Return
9759 * build-id.h (find_separate_debug_file_by_buildid): Return
9761 * coffread.c (coff_symfile_read): Adjust to std::string.
9762 * elfread.c (elf_symfile_read): Adjust to std::string.
9763 * symfile.c (separate_debug_file_exists): Change parameter to
9765 (find_separate_debug_file): Return std::string.
9766 (find_separate_debug_file_by_debuglink): Return std::string.
9767 * symfile.h (find_separate_debug_file_by_debuglink): Return
9770 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9772 * common/xml-utils.c (xml_escape_text): Move code to...
9773 (xml_escape_text_append): ... this new function.
9774 * common/xml-utils.h (xml_escape_text_append): New declaration.
9775 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9777 (_initialize_xml_utils): register test_xml_escape_text_append as
9780 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9782 * defs.h: Remove MAX_REGISTER_SIZE.
9783 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9785 * python/py-unwind.c (pyuw_sniffer): Likewise.
9787 2018-03-07 Tom Tromey <tom@tromey.com>
9789 * linux-tdep.c (linux_info_proc): Update.
9790 * target.h (struct target_ops) <to_fileio_readlink>: Return
9792 (target_fileio_readlink): Return optional<string>.
9793 * remote.c (remote_hostio_readlink): Return optional<string>.
9794 * inf-child.c (inf_child_fileio_readlink): Return
9796 * target.c (target_fileio_readlink): Return optional<string>.
9798 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9800 * regcache.c (cooked_read_test): Add riscv to the list of
9801 architectures that have a save_reggroup.
9803 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9805 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9806 value is not a dynamic class object.
9808 2018-03-06 Tom Tromey <tom@tromey.com>
9810 * rust-exp.y: Formatting fixes.
9812 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9814 * riscv-tdep.c (riscv_register_name): Remove target description
9816 (riscv_gdbarch_init): Remove target description check.
9818 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9820 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9822 * riscv-tdep.h: Likewise.
9824 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9826 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9827 (riscv_pseudo_register_write): Delete.
9828 (riscv_gdbarch_init): Remove all use of pseudo registers.
9830 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9832 * record-btrace.c (btrace_print_lines): Replace cleanup
9833 parameter with RAII equivalents.
9834 (btrace_insn_history): Replace cleanup with RAII equivalents.
9835 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9836 make_cleanup_ui_out_tuple_begin_end): Remove.
9837 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9838 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9839 make_cleanup_ui_out_list_begin_end): Remove.
9841 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9843 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9844 parameter types to std::vector. Use bool.
9845 (record_btrace_wait): Replace VEC(tp_t) with
9846 std::vector<thread_info *>.
9847 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9849 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9851 * record-btrace.c (record_btrace_disable_callback): Remove.
9852 (struct scoped_btrace_disable): New.
9853 (record_btrace_open): Use scoped_btrace_disable.
9855 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9857 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9858 reading values from registers.
9860 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9862 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9865 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9867 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9868 change parameter type. Use GDB's print functions, and use
9869 core_addr_to_string where appropriate.
9870 (riscv_push_dummy_call): Use core_addr_to_string where
9871 appropriate, update call to riscv_print_arg_location, and reindent
9873 (riscv_return_value): Update call to riscv_print_arg_location.
9875 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9876 Tim Newsome <tim@sifive.com>
9877 Albert Ou <a0u@eecs.berkeley.edu>
9878 Darius Rad <darius@bluespec.com>
9880 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9881 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9882 (ALLDEPFILES): Add riscv-tdep.c
9883 * configure.tgt: Add riscv support.
9884 * riscv-tdep.c: New file.
9885 * riscv-tdep.h: New file.
9886 * NEWS: Mention new target.
9887 * MAINTAINERS: Add entry for riscv.
9889 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9891 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9892 fields within aggregates.
9894 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9896 * record-btrace.c (btrace_print_lines): Change type of flags to
9897 gdb_disassembly_flags.
9899 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9901 * fbsd-nat.c: Include "inf-ptrace.h".
9902 (USE_SIGTRAP_SIGINFO): Conditionally define.
9903 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9904 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9905 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9907 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9909 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9911 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9912 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9913 "supports_stopped_by_hw_breakpoint" target methods.
9915 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9917 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9918 * fbsd-nat.c (debug_fbsd_nat): New variable.
9919 (show_fbsd_nat_debug): New function.
9920 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9921 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9923 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9925 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9926 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9928 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9929 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9932 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9934 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9935 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9937 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9939 * charset.c (struct charset_vector): New.
9940 (charsets): Change type to charset_vector.
9941 (find_charset_names): Adjust.
9943 (_initialize_charset): Adjust.
9945 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9947 * progspace.h (struct program_space) <deleted_solibs>: Change
9948 type to std::vector<std::string>.
9949 * progspace.c (clear_program_space_solib_cache): Adjust.
9950 * breakpoint.c (print_solib_event): Adjust.
9951 (check_status_catch_solib): Adjust.
9952 * solib.c (update_solib_list): Adjust.
9953 * ui-out.h (class ui_out) <field_string>: New overload.
9954 * ui-out.c (ui_out::field_string): New overload.
9956 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9958 * progspace.h (struct program_space): Add constructor and
9959 destructor, initialize fields.
9960 (add_program_space): Remove.
9961 * progspace.c (add_program_space): Rename to...
9962 (program_space::program_space): ... this.
9963 (release_program_space): Rename to...
9964 (program_space::~program_space): ... this.
9965 (delete_program_space): Use delete to delete program_space.
9966 (initialize_progspace): Use new to allocate program_space.
9967 * inferior.c (add_inferior_with_spaces): Likewise.
9968 (clone_inferior_command): Likewise.
9969 * infrun.c (follow_fork_inferior): Likewise.
9970 (handle_vfork_child_exec_or_exit): Likewise.
9972 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9974 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9975 (delim_string_to_char_ptr_vec): Return std::vector of
9976 gdb::unique_xmalloc_ptr.
9977 (dirnames_to_char_ptr_vec_append): Take std::vector of
9978 gdb::unique_xmalloc_ptr.
9979 (dirnames_to_char_ptr_vec): Return std::vector of
9980 gdb::unique_xmalloc_ptr.
9981 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9982 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9983 (delim_string_to_char_ptr_vec): Return an std::vector of
9984 gdb::unique_xmalloc_ptr, adjust the code.
9985 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9986 gdb::unique_xmalloc_ptr, adjust the code.
9987 (dirnames_to_char_ptr_vec): Return an std::vector of
9988 gdb::unique_xmalloc_ptr, adjust the code.
9989 * auto-load.c (auto_load_safe_path_vec): Change type to
9990 std::vector of gdb::unique_xmalloc_ptr.
9991 (auto_load_expand_dir_vars): Return an std::vector of
9992 gdb::unique_xmalloc_ptr, adjust the code.
9993 (auto_load_safe_path_vec_update): Adjust.
9994 (filename_is_in_auto_load_safe_path_vec): Adjust.
9995 (auto_load_objfile_script_1): Adjust.
9996 * build-id.c (build_id_to_debug_bfd): Adjust.
9997 * linux-thread-db.c (thread_db_load_search): Adjust.
9998 * source.c (add_path): Adjust.
10000 * symfile.c (find_separate_debug_file): Adjust.
10001 * utils.c (do_free_char_ptr_vec): Remove.
10002 (make_cleanup_free_char_ptr_vec): Remove.
10004 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10007 * common/pathstuff.c: Conditionally include "<windows.h>".
10009 2018-03-01 Georg Sauthoff <mail@georg.so>
10012 * gcore.in: Quote variables and switch interpreter to bash.
10014 2018-03-01 Tom Tromey <tom@tromey.com>
10016 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10017 assertion. Add assertion for discriminant_index.
10018 (quirk_rust_enum): Use correct base type name in univariant case.
10020 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10022 * record.c (get_call_history_modifiers): Return a
10023 record_print_flags.
10024 (cmd_record_call_history): Adjust.
10025 * record-btrace.c (record_btrace_call_history): Adjust.
10026 (record_btrace_call_history_range): Adjust.
10027 (record_btrace_call_history_from): Adjust.
10028 * target-debug.h (target_debug_print_record_print_flags): New.
10029 * target-delegates.c: Re-generate.
10030 * target.c (target_call_history): Change flags type.
10031 (target_call_history_from): Likewise.
10032 (target_call_history_range): Likewise.
10033 * target.h (struct target_ops) <target_call_history>: Likewise.
10034 (target_call_history_from): Likewise.
10035 (target_call_history_range): Likewise.
10037 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10038 Simon Marchi <simon.marchi@polymtl.ca>
10040 * common/common-utils.c: Include "sys/stat.h".
10041 (is_regular_file): Move here from "source.c"; change return
10043 * common/common-utils.h (is_regular_file): New prototype.
10044 * common/pathstuff.c (contains_dir_separator): New function.
10045 * common/pathstuff.h (contains_dir_separator): New prototype.
10046 * source.c: Don't include "sys/stat.h".
10047 (is_regular_file): Move to "common/common-utils.c".
10049 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10051 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10052 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10053 * auto-load.c: Include "common/pathstuff.h".
10054 * common/common-def.h (current_directory): Move here.
10055 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10057 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10059 * common/pathstuff.c: New file.
10060 * common/pathstuff.h: New file.
10061 * compile/compile.c: Include "common/pathstuff.h".
10062 * defs.h (current_directory): Move to "common/common-defs.h".
10063 * dwarf2read.c: Include "common/pathstuff.h".
10064 * exec.c: Likewise.
10065 * guile/scm-safe-call.c: Likewise.
10066 * linux-thread-db.c: Likewise.
10067 * main.c: Likewise.
10068 * nto-tdep.c: Likewise.
10069 * objfiles.c: Likewise.
10070 * source.c: Likewise.
10071 * symtab.c: Likewise.
10072 * utils.c: Include "common/pathstuff.h".
10073 (gdb_realpath): Move to "common/pathstuff.c".
10074 (gdb_realpath_keepfile): Likewise.
10075 (gdb_abspath): Likewise.
10076 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10077 (gdb_realpath_keepfile): Likewise.
10078 (gdb_abspath): Likewise.
10080 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10082 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10083 wildcard process pid for super_resume for kernels with a
10086 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10088 * compile/compile.c (get_args): Add additional comments
10089 explaining function.
10091 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10092 Tom Tromey <tom@tromey.com>
10094 * target.h (memory_write_request_s): Remove typedef. Don't define
10096 (target_write_memory_blocks): Change argument to std::vector.
10097 (struct memory_write_request): Add constructor.
10098 * target-memory.c (compare_block_starting_address): Return bool.
10099 Change argument types.
10100 (claim_memory): Change arguments to use std::vector.
10101 (split_regular_and_flash_blocks, blocks_to_erase)
10102 (compute_garbled_blocks): Likewise.
10103 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10104 (target_write_memory_blocks): Change argument to std::vector.
10105 * symfile.c (struct load_section_data): Add constructor and
10106 destructor. Use std::vector for "requests".
10107 (struct load_progress_data): Add initializers.
10108 (load_section_callback): Update. Use "new".
10109 (clear_memory_write_data): Remove.
10110 (generic_load): Update.
10112 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10114 * arch/aarch64.h: Use common/tdesc.h.
10116 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10118 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10119 architecture with a 64-bit ABI.
10121 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10123 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10124 ahead of target description loading.
10126 2018-02-26 Tom Tromey <tom@tromey.com>
10128 * stack.c (backtrace_command_1): Update.
10129 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10131 * python/py-framefilter.c (py_print_frame)
10132 (gdbpy_apply_frame_filter): Change type of "flags".
10133 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10135 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10136 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10137 * extension.h (enum frame_filter_flag): Rename from
10138 frame_filter_flags.
10139 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10140 (apply_ext_lang_frame_filter): Change type of "flags".
10141 * extension.c (apply_ext_lang_frame_filter): Change type of
10143 * extension-priv.h (struct extension_language_ops)
10144 <apply_frame_filter>: Change type of "flags".
10146 2018-02-26 Tom Tromey <tom@tromey.com>
10149 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10150 off-by-one in py_end computation.
10151 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10153 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10156 2018-02-26 Tom Tromey <tom@tromey.com>
10158 * dwarf2read.c (struct variant_field): New.
10159 (struct nextfield) <variant>: New field.
10160 (dwarf2_add_field): Handle DW_TAG_variant_part.
10161 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10162 discriminated union.
10163 (read_structure_type): Handle DW_TAG_variant_part.
10164 (handle_struct_member_die): New function, extracted from
10165 process_structure_scope. Handle DW_TAG_variant.
10166 (process_structure_scope): Handle discriminated unions. Call
10167 handle_struct_member_die.
10169 2018-02-26 Tom Tromey <tom@tromey.com>
10171 * rust-lang.h (rust_last_path_segment): Declare.
10172 * rust-lang.c (rust_last_path_segment): Now public. Change
10174 (struct disr_info): Remove.
10175 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10176 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10177 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10178 (rust_enum_p, rust_enum_variant): New function.
10179 (rust_underscore_fields): Remove "offset" parameter.
10180 (rust_print_enum): New function.
10181 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10182 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10183 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10185 (rust_internal_print_type): New function, from rust_print_type.
10187 (rust_print_type): Call rust_internal_print_type.
10188 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10189 Update enum handling.
10190 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10191 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10192 (rust_union_quirks): New functions.
10193 (process_full_comp_unit, process_full_type_unit): Call
10195 (process_structure_scope): Update rust_unions if necessary.
10197 2018-02-26 Tom Tromey <tom@tromey.com>
10199 * value.h (value_union_variant): Declare.
10200 * valops.c (value_union_variant): New function.
10201 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10202 (struct discriminant_info): New.
10203 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10205 (struct main_type) <flag_discriminated_union>: New field.
10207 2018-02-26 Tom Tromey <tom@tromey.com>
10209 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10210 unittests/unpack-selftests.c.
10211 * unittests/unpack-selftests.c: New file.
10212 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10214 2018-02-26 Yao Qi <yao.qi@linaro.org>
10216 * dwarf2read.c (struct partial_die_info) <read>: New method.
10217 (read_partial_die): Remove the declaration.
10218 (load_partial_dies): Update.
10219 (partial_die_info::partial_die_info):
10220 (read_partial_die): Change it to partial_die_info::read.
10222 2018-02-26 Yao Qi <yao.qi@linaro.org>
10224 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10225 (fixup_partial_die): Remove declaration.
10226 (scan_partial_symbols): Update.
10227 (partial_die_parent_scope): Likewise.
10228 (partial_die_full_name): Likewise.
10229 (fixup_partial_die): Change it to partial_die_info::fixup.
10231 2018-02-26 Yao Qi <yao.qi@linaro.org>
10233 * dwarf2read.c (read_partial_die): Update the declaration.
10234 (load_partial_dies): Caller update.
10235 (read_partial_die): Remove one argument abbrev_len.
10237 2018-02-26 Yao Qi <yao.qi@linaro.org>
10239 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10240 assignment operator.
10241 (load_partial_dies): Use ctor and copy ctor.
10242 (read_partial_die): Update.
10243 (dwarf2_cu::find_partial_die): Use ctor.
10245 2018-02-26 Yao Qi <yao.qi@linaro.org>
10247 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10248 (find_partial_die_in_comp_unit): Change it to
10249 dwarf2_cu::find_partial_die.
10250 (find_partial_die): Update.
10252 2018-02-26 Yao Qi <yao.qi@linaro.org>
10254 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10257 2018-02-26 Yao Qi <yao.qi@linaro.org>
10259 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10261 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10263 * arch/amd64.h: Use common/tdesc.h.
10264 * arch/i386.c: Likewise.
10265 * arch/i386.h: Likewise.
10266 * arch/tic6x.c: Likewise.
10267 * arch/tdesc.h: Move file from here...
10268 * common/tdesc.h: ...to here.
10269 * features/aarch64-core.c: Regenerate.
10270 * features/aarch64-fpu.c: Regenerate.
10271 * features/i386/32bit-avx.c: Regenerate.
10272 * features/i386/32bit-avx512.c: Regenerate.
10273 * features/i386/32bit-core.c: Regenerate.
10274 * features/i386/32bit-linux.c: Regenerate.
10275 * features/i386/32bit-mpx.c: Regenerate.
10276 * features/i386/32bit-pkeys.c: Regenerate.
10277 * features/i386/32bit-sse.c: Regenerate.
10278 * features/i386/64bit-avx.c: Regenerate.
10279 * features/i386/64bit-avx512.c: Regenerate.
10280 * features/i386/64bit-core.c: Regenerate.
10281 * features/i386/64bit-linux.c: Regenerate.
10282 * features/i386/64bit-mpx.c: Regenerate.
10283 * features/i386/64bit-pkeys.c: Regenerate.
10284 * features/i386/64bit-segments.c: Regenerate.
10285 * features/i386/64bit-sse.c: Regenerate.
10286 * features/i386/x32-core.c: Regenerate.
10287 * features/tic6x-c6xp.c: Regenerate.
10288 * features/tic6x-core.c: Regenerate.
10289 * features/tic6x-gp.c: Regenerate.
10290 * target-descriptions.c: Use common/tdesc.h.
10291 * target-descriptions.h: Likewise.
10293 2018-02-24 Tom Tromey <tom@tromey.com>
10295 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10296 (try_thread_db_load_from_dir, thread_db_load_search): Use
10298 (info_auto_load_libthread_db_compare): Return bool. Change
10300 (info_auto_load_libthread_db): Use std::vector, std::string.
10303 2018-02-24 Tom Tromey <tom@tromey.com>
10305 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10307 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10309 * gdbarch.c: Rebuild.
10310 * gdbarch.h: Rebuild.
10311 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10312 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10313 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10316 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10318 * gdbtypes.h (sect_offset): Change type to uint64_t.
10319 (sect_offset_str): New function.
10320 * dwarf2read.c (create_addrmap_from_aranges): Use
10322 (error_check_comp_unit_head): Likewise.
10323 (create_debug_type_hash_table): Likewise.
10324 (read_cutu_die_from_dwo): Likewise.
10325 (init_cutu_and_read_dies): Likewise.
10326 (init_cutu_and_read_dies_no_follow): Likewise.
10327 (process_psymtab_comp_unit_reader): Likewise.
10328 (partial_die_parent_scope): Likewise.
10329 (peek_die_abbrev): Likewise.
10330 (process_queue): Likewise.
10331 (dwarf2_physname): Likewise.
10332 (read_namespace_alias): Likewise.
10333 (read_import_statement): Likewise.
10334 (create_dwo_cu_reader): Likewise.
10335 (create_cus_hash_table): Likewise.
10336 (lookup_dwo_cutu): Likewise.
10337 (inherit_abstract_dies): Likewise.
10338 (read_func_scope): Likewise.
10339 (read_call_site_scope): Likewise.
10340 (dwarf2_add_member_fn): Likewise.
10341 (read_common_block): Likewise.
10342 (read_module_type): Likewise.
10343 (read_typedef): Likewise.
10344 (read_subrange_type): Likewise.
10345 (load_partial_dies): Likewise.
10346 (read_partial_die): Likewise.
10347 (find_partial_die): Likewise.
10348 (read_str_index): Likewise.
10349 (dwarf2_string_attr): Likewise.
10350 (build_error_marker_type): Likewise.
10351 (lookup_die_type): Likewise.
10352 (dump_die_shallow): Likewise.
10353 (follow_die_ref): Likewise.
10354 (dwarf2_fetch_die_loc_sect_off): Likewise.
10355 (dwarf2_fetch_constant_bytes): Likewise.
10356 (follow_die_sig): Likewise.
10357 (get_signatured_type): Likewise.
10358 (get_DW_AT_signature_type): Likewise.
10359 (dwarf2_find_containing_comp_unit): Likewise.
10360 (set_die_type): Likewise.
10362 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10364 * arch/aarch64.c: Include "common-defs.h".
10365 * arch/amd64.c: Likewise.
10366 * arch/i386.c: Likewise.
10368 2018-02-21 Tom Tromey <tom@tromey.com>
10370 * value.h: (extract_field_op): Update.
10371 * eval.c (extract_field_op): Return a const char *.
10372 * expression.h (parse_expression_for_completion): Update.
10373 * completer.c (complete_expression): Update.
10374 (add_struct_fields): Make fieldname const.
10375 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10376 (mark_completion_tag, parse_exp_in_context_1): Update.
10377 (parse_expression_for_completion): Change "name" to
10378 unique_xmalloc_ptr*.
10380 2018-02-21 Tom Tromey <tom@tromey.com>
10382 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10384 2018-02-21 Yao Qi <yao.qi@linaro.org>
10386 * avr-tdep.c (avr_read_pc): Change parameter type to
10388 * gdbarch.sh (read_pc): Likewise.
10389 * gdbarch.c: Re-generated.
10390 * gdbarch.h: Re-generated.
10391 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10393 * ia64-tdep.c (ia64_read_pc): Likewise.
10394 * mips-tdep.c (mips_read_pc): Likewise.
10395 * spu-tdep.c (spu_read_pc): Likewise.
10397 2018-02-21 Yao Qi <yao.qi@linaro.org>
10399 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10400 * regcache-dump.c: New file.
10401 * regcache.c: Move register_dump to regcache-dump.c.
10402 (maintenance_print_registers): Likewise.
10403 (maintenance_print_raw_registers): Likewise.
10404 (maintenance_print_cooked_registers): Likewise.
10405 (maintenance_print_register_groups): Likewise.
10406 (maintenance_print_remote_registers): Likewise.
10407 (_initialize_regcache): Likewise.
10408 * regcache.h (register_dump): Moved from regcache.c.
10410 2018-02-21 Yao Qi <yao.qi@linaro.org>
10412 * regcache.c (regcache::regcache): Update.
10413 (regcache::invalidate): Move it to detached_regcache::invalidate.
10414 (get_thread_arch_aspace_regcache): Update.
10415 (regcache::raw_update): Update.
10416 (regcache::cooked_read): Remove some code.
10417 (regcache::cooked_read_value): Likewise.
10418 (regcache::raw_write): Remove assert on m_readonly_p.
10419 (regcache::raw_supply_integer): Move it to
10420 detached_regcache::raw_supply_integer.
10421 (regcache::raw_supply_zeroed): Likewise.
10422 * regcache.h (detached_regcache) <raw_supply_integer>: New
10424 <raw_supply_zeroed, invalidate>: Likewise.
10425 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10426 <invalidate>: Likewise.
10427 <m_readonly_p>: Removed.
10429 2018-02-21 Yao Qi <yao.qi@linaro.org>
10431 * infcmd.c (get_return_value): Let stop_regs point to
10432 get_current_regcache.
10433 * regcache.c (regcache::regcache): Remove.
10434 (register_dump_reg_buffer): New class.
10435 (regcache_print): Adjust.
10436 * regcache.h (regcache): Remove constructors.
10438 2018-02-21 Yao Qi <yao.qi@linaro.org>
10440 * regcache.c (class register_dump): New class.
10441 (register_dump_regcache, register_dump_none): New class.
10442 (register_dump_remote, register_dump_groups): New class.
10443 (regcache_print): Update.
10444 * regcache.h (regcache_dump_what): Move it to regcache.c.
10445 (regcache) <dump>: Remove.
10447 2018-02-21 Yao Qi <yao.qi@linaro.org>
10449 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10451 (jit_unwind_reg_set_impl): Call raw_supply.
10452 (jit_frame_sniffer): Use reg_buffer_rw.
10453 * record-full.c (record_full_core_regbuf): Change its type.
10454 (record_full_core_open_1): Use reg_buffer_rw.
10455 (record_full_close): Likewise.
10456 (record_full_core_fetch_registers): Use regcache->raw_supply.
10457 (record_full_core_store_registers): Likewise.
10458 * regcache.c (regcache::get_register_status): Move it to
10460 (regcache_raw_set_cached_value): Remove.
10461 (regcache::raw_set_cached_value): Remove.
10462 (regcache::raw_write): Call raw_supply.
10463 (regcache::raw_supply): Move it to reg_buffer_rw.
10464 * regcache.h (regcache_raw_set_cached_value): Remove.
10465 (reg_buffer_rw): New class.
10467 2018-02-21 Yao Qi <yao.qi@linaro.org>
10469 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10470 readonly_detached_regcache.
10471 (dummy_frame_prev_register): Use regcache->cooked_read.
10472 * frame.c (frame_save_as_regcache): Change return type.
10473 (frame_pop): Update.
10474 * frame.h (frame_save_as_regcache): Update declaration.
10475 * inferior.h (get_infcall_suspend_state_regcache): Update
10477 * infrun.c (infcall_suspend_state) <registers>: use
10478 readonly_detached_regcache.
10479 (save_infcall_suspend_state): Don't use regcache_dup.
10480 (get_infcall_suspend_state_regcache): Change return type.
10481 * linux-fork.c (struct fork_info) <savedregs>: Change to
10482 readonly_detached_regcache.
10484 (fork_save_infrun_state): Don't use regcache_dup.
10485 (info_checkpoints_command): Adjust.
10486 * mi/mi-main.c (register_changed_p): Update declaration.
10487 (mi_cmd_data_list_changed_registers): Use
10488 readonly_detached_regcache.
10489 (register_changed_p): Change parameter type to
10490 readonly_detached_regcache.
10491 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10492 readonly_detached_regcache.
10493 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10494 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10496 (regcache::save): Move it to reg_buffer.
10497 (regcache::restore): Change parameter type.
10498 (regcache_dup): Remove.
10499 * regcache.h (reg_buffer) <save>: New method.
10500 (readonly_detached_regcache): New class.
10501 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10502 readonly_detached_regcache.
10503 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10505 2018-02-21 Yao Qi <yao.qi@linaro.org>
10507 * frame.c (frame_save_as_regcache): Use regcache method save.
10508 (frame_pop): Use regcache method restore.
10509 * infrun.c (restore_infcall_suspend_state): Likewise.
10510 * linux-fork.c (fork_load_infrun_state): Likewise.
10511 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10513 * regcache.c (regcache_save): Remove.
10514 (regcache::restore): More asserts.
10515 (regcache_cpy): Remove.
10516 * regcache.h (regcache_save): Remove the declaration.
10517 (regcache::restore): Move from private to public.
10518 Remove the friend declaration of regcache_cpy.
10519 (regcache_cpy): Remove declaration.
10521 2018-02-21 Yao Qi <yao.qi@linaro.org>
10523 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10524 parameter type to 'readable_regcache *'.
10525 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10526 * arm-tdep.c (arm_neon_quad_read): Likewise.
10527 (arm_pseudo_read): Likewise.
10528 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10529 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10530 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10531 * gdbarch.c: Re-generated.
10532 * gdbarch.h: Re-generated.
10533 * gdbarch.sh (pseudo_register_read): Change parameter type to
10534 'readable_regcache *'.
10535 (pseudo_register_read_value): Likewise.
10536 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10537 (h8300_pseudo_register_read): Likewise.
10538 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10539 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10540 (i386_pseudo_register_read_into_value): Likewise.
10541 (i386_pseudo_register_read_value): Likewise.
10542 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10544 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10545 * m32c-tdep.c (m32c_raw_read): Likewise.
10546 (m32c_read_flg): Likewise.
10547 (m32c_banked_register): Likewise.
10548 (m32c_banked_read): Likewise.
10549 (m32c_sb_read): Likewise.
10550 (m32c_part_read): Likewise.
10551 (m32c_cat_read): Likewise.
10552 (m32c_r3r2r1r0_read): Likewise.
10553 (m32c_pseudo_register_read): Likewise.
10554 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10555 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10556 (mep_pseudo_cr64_read): Likewise.
10557 (mep_pseudo_register_read): Likewise.
10558 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10559 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10560 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10561 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10562 (regcache::cooked_read): Likewise.
10563 (regcache::cooked_read_value): Likewise.
10564 (regcache_cooked_read_signed):
10565 (regcache::cooked_read): Likewise.
10566 * regcache.h (readable_regcache): New class.
10567 (regcache): Inherit readable_regcache. Move some methods to
10569 * rl78-tdep.c (rl78_pseudo_register_read): Change
10570 parameter type to 'readable_regcache *'.
10571 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10572 (e500_pseudo_register_read): Change parameter type to
10573 'readable_regcache *'.
10574 (dfp_pseudo_register_read): Likewise.
10575 (vsx_pseudo_register_read): Likewise.
10576 (efpr_pseudo_register_read): Likewise.
10577 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10578 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10579 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10580 (sh64_pseudo_register_read): Likewise.
10581 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10582 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10583 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10584 (spu_pseudo_register_read): Likewise.
10585 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10586 (xtensa_pseudo_register_read): Likewise.
10588 2018-02-21 Yao Qi <yao.qi@linaro.org>
10590 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10591 (regcache::arch): Move it to reg_buffer::arch.
10592 (regcache::register_buffer): Likewise.
10593 (regcache::assert_regnum): Likewise.
10594 (regcache::num_raw_registers): Likewise.
10595 * regcache.h (reg_buffer): New class.
10596 (regcache): Inherit reg_buffer.
10598 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10600 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10601 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10603 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10605 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10607 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10609 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10610 (SFILES): Remove common/*.c files.
10611 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10612 * common/common.host: Add common reference.
10613 * configure.ac: Likewise.
10614 * configure: Regenerate.
10616 2018-02-16 Yao Qi <yao.qi@linaro.org>
10618 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10619 (block_initialize_namespace): Use new.
10620 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10621 (dwarf2_free_objfile): Use delete.
10622 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10623 (copy_type_recursive): Use new.
10624 * gdb_obstack.h (allocate_on_obstack): New.
10626 2018-02-15 Yao Qi <yao.qi@linaro.org>
10629 * inferior.c (exit_inferior_1): Reset inf->control.
10631 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10633 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10636 2018-02-14 Pedro Alves <palves@redhat.com>
10638 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10639 frame_cleanup_after_sniffer on exception.
10641 2018-02-14 Tom Tromey <tom@tromey.com>
10643 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10645 (solib_bfd_open): Make pathname const.
10646 * solib.c (solib_bfd_open): Make pathname const.
10647 * solib-spu.c (spu_bfd_fopen): Make name const.
10648 (spu_bfd_open): Make pathname const.
10649 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10650 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10652 2018-02-14 Tom Tromey <tom@tromey.com>
10654 * symfile.c (symfile_bfd_open): Update.
10655 * source.h (openp, source_full_path_of, find_and_open_source):
10656 Change argument type to unique_xmalloc_ptr.
10657 * source.c (openp): Take a unique_xmalloc_ptr.
10658 (source_full_path_of, find_and_open_source): Likewise.
10659 (open_source_file, symtab_to_fullname): Update.
10660 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10661 unique_xmalloc_ptr.
10662 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10663 (exec_file_find): Update.
10664 * psymtab.c (psymtab_to_fullname): Update.
10665 * nto-tdep.h (nto_find_and_open_solib): Update.
10666 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10667 unique_xmalloc_ptr.
10668 * exec.c (exec_file_attach): Update.
10669 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10670 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10672 2018-02-14 Tom Tromey <tom@tromey.com>
10674 * solib.c: Include source.h.
10675 * nto-tdep.c: Include source.h.
10676 * mi/mi-cmd-env.c: Include source.h.
10677 * infcmd.c: Include source.h.
10678 * exec.c: Include source.h.
10679 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10680 (add_path, directory_switch, source_path, init_source_path): Move
10682 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10683 (add_path, directory_switch, source_path, init_source_path):
10686 2018-02-14 Tom Tromey <tom@tromey.com>
10688 * solist.h (exec_file_find, solib_find): Return
10689 unique_xmalloc_ptr.
10690 (solib_bfd_fopen): Take a const char *.
10691 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10692 (exec_file_find, solib_find): Likewise.
10693 (solib_bfd_fopen): Do not take ownership of "pathname".
10694 (solib_bfd_open): Use unique_xmalloc_ptr.
10695 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10696 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10697 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10698 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10700 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10702 * ada-lang.c (name_match_type_from_name): Remove reference to
10703 ada_name_for_lookup in function's documentation.
10704 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10706 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10708 * defs.h (enum openp_flags): New enum.
10709 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10710 Move to enum openp_flags.
10711 (openp_flags): New enum flags.
10712 (openp): Change parameter type to openp_flags.
10713 * source.c (openp): Change parameter type to openp_flags.
10714 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10715 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10717 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10719 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10722 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10724 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10726 (class dwarf2_queue_guard): ...the destructor of this new class.
10727 (dw2_do_instantiate_symtab): Create instance of the new class
10728 dwarf2_queue_guard, remove cleanup.
10730 2018-02-09 Tom Tromey <tom@tromey.com>
10732 * source.c (find_source_lines): Don't reference past the end of
10735 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10737 * remote.c (remote_btrace_maybe_reopen): Change error message.
10738 * btrace.c (btrace_enable): Likewise.
10739 (parse_xml_btrace): Likewise.
10740 (parse_xml_btrace_conf): Likewise.
10742 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10744 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10745 (linux_enable_pt, linux_enable_bts): Call
10746 diagnose_perf_event_open_fail.
10748 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10750 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10751 Remove parameter and change return type. Update callers. Move it.
10752 (linux_enable_bts, linux_enable_pt): Improve error message.
10753 (linux_enable_pt): Remove zero buffer size check.
10754 (linux_enable_btrace): Improve error messages. Remove NULL return
10757 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10759 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10760 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10761 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10762 (linux_supports_pt, linux_supports_btrace): Remove.
10763 (linux_enable_bts): Call cpu_supports_bts.
10764 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10765 * remote.c (remote_supports_btrace): Remove.
10766 (init_remote_ops): Remove remote_supports_btrace.
10767 * target-delegates.c: Regenerated.
10768 * target.c (target_supports_btrace): Remove.
10769 * target.h (target_ops) <to_supports_btrace>: Remove
10770 (target_supports_btrace): Remove.
10771 * x86-linux-nat.c (x86_linux_create_target): Remove
10772 linux_supports_btrace.
10774 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10776 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10778 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10779 exception and use message in own exception.
10781 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10783 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10784 (perf_event_pt_event_type): Use gdb_file_up.
10785 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10786 scoped_fd, and scoped_mmap.
10788 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10790 * common/scoped_mmap.h: New.
10791 * unittests/scoped_mmap-selftest.c: New.
10792 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10793 unittests/scoped_mmap-selftest.c.
10795 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10797 * common/scoped_fd.h: New.
10798 * unittests/scoped_fd-selftest.c: New.
10799 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10800 unittests/scoped_fd-selftest.c.
10802 2018-02-09 Tom Tromey <tom@tromey.com>
10804 * auto-load.c (auto_load_section_scripts): Use
10805 gdb::unique_xmalloc_ptr.
10807 2018-02-09 Tom Tromey <tom@tromey.com>
10809 * auto-load.c (execute_script_contents): Use std::string.
10811 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10813 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10814 Python function, rather than a new command.
10816 2018-02-08 Tom Tromey <tom@tromey.com>
10818 * solib.c (solib_find_1): Use std::string.
10819 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10821 2018-02-08 Tom Tromey <tom@tromey.com>
10823 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10825 2018-02-08 Tom Tromey <tom@tromey.com>
10827 * source.c (find_source_lines): Use gdb::def_vector.
10829 2018-02-08 Tom Tromey <tom@tromey.com>
10831 * macrocmd.c (struct temporary_macro_definition): New.
10832 (macro_define_command): Use temporary_macro_definition. Remove
10834 (free_macro_definition_ptr): Remove.
10836 2018-02-08 Tom Tromey <tom@tromey.com>
10838 * macroexp.c (maybe_expand): Use std::string.
10840 2018-02-08 Tom Tromey <tom@tromey.com>
10842 * macroexp.c (struct macro_buffer): Add initializers for some
10844 (init_buffer, init_shared_buffer, free_buffer)
10845 (free_buffer_return_text): Remove.
10846 (macro_buffer): New constructors.
10847 (~macro_buffer): New destructor.
10848 (macro_buffer::set_shared): New method.
10849 (macro_buffer::resize_buffer, macro_buffer::appendc)
10850 (macro_buffer::appendmem): Now methods, not free functions.
10851 (set_token, append_tokens_without_splicing, stringify)
10852 (macro_stringify): Update.
10853 (gather_arguments): Change return type. Remove argc_p argument,
10854 add args_ptr argument. Use std::vector.
10855 (substitute_args): Remove argc argument. Accept std::vector.
10856 (expand): Update. Use std::vector.
10857 (scan, macro_expand, macro_expand_next): Update.
10859 2018-02-08 Tom Tromey <tom@tromey.com>
10861 * symtab.c (default_collect_symbol_completion_matches_break_on):
10862 Use unique_xmalloc_ptr.
10863 * macroscope.h: (sal_macro_scope, user_macro_scope)
10864 (default_macro_scope): Return unique_xmalloc_ptr.
10865 * macroscope.c (sal_macro_scope, user_macro_scope)
10866 (default_macro_scope): Return unique_xmalloc_ptr.
10867 * macroexp.h (macro_expand, macro_expand_once): Return
10868 unique_xmalloc_ptr.
10869 * macroexp.c (macro_expand, macro_expand_once): Return
10870 unique_xmalloc_ptr.
10871 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10872 (info_macro_command, info_macros_command): Use
10873 unique_xmalloc_ptr.
10874 * compile/compile-c-support.c (write_macro_definitions): Use
10875 unique_xmalloc_ptr.
10876 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10878 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10880 * value.c (value_static_field): Assign field type instead of
10881 containing type when returning an optimized out value.
10883 2018-02-06 Yao Qi <yao.qi@linaro.org>
10885 * ft32-tdep.c (ft32_read_pc): Remove.
10886 (ft32_write_pc): Remove.
10887 (ft32_gdbarch_init): Update.
10888 * m32r-tdep.c (m32r_read_pc): Remove.
10889 (m32r_gdbarch_init): Update.
10890 * mep-tdep.c (mep_read_pc): Remove.
10891 (mep_gdbarch_init): Update.
10892 * microblaze-tdep.c (microblaze_write_pc): Remove.
10893 (microblaze_gdbarch_init): Update.
10894 * mn10300-tdep.c (mn10300_read_pc): Remove.
10895 (mn10300_write_pc): Remove.
10896 (mn10300_gdbarch_init): Update.
10897 * moxie-tdep.c (moxie_read_pc): Remove.
10898 (moxie_write_pc): Remove.
10899 (moxie_gdbarch_init): Update.
10901 2018-02-06 Yao Qi <yao.qi@linaro.org>
10903 * expprint.c (print_subexp_standard): Handle
10904 OP_F77_UNDETERMINED_ARGLIST.
10905 (dump_subexp_body_standard): Likewise.
10907 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10909 * target-descriptions.c (tdesc_element_visitor) Add empty
10911 (tdesc_type): Move make_gdb_type from here.
10912 (tdesc_type_builtin): Likewise.
10913 (tdesc_type_vector): Likewise.
10914 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10915 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10916 (make_gdb_type_union): Likewise.
10917 (make_gdb_type_flags): Likewise.
10918 (make_gdb_type_enum): Likewise.
10919 (make_gdb_type): New function.
10920 (tdesc_register_type): Use static make_gdb_type.
10922 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10924 * infcmd.c (default_print_one_register_info): Align natural-format
10925 column values consistently one under another.
10926 (pad_to_column): New function.
10928 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10930 * dwarf2read.c (dwarf2_physname): Move commment.
10932 2018-02-01 Leszek Swirski <leszeks@google.com>
10934 * varobj.c (varobj_formatted_print_options): Allow recursive
10935 pretty printing if pretty printing is enabled.
10937 2018-02-01 Leszek Swirski <leszeks@google.com>
10939 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10940 names after a structop as a filename.
10942 2018-02-01 Yao Qi <yao.qi@linaro.org>
10944 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10945 (arm_record_coproc_data_proc): Likewise.
10947 2018-02-01 Yao Qi <yao.qi@linaro.org>
10949 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10951 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10953 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10954 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10956 2018-01-31 Pedro Alves <palves@redhat.com>
10958 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10959 * inflow.c (child_terminal_save_inferior): Wrap reference to
10960 tcgetpgrp in HAVE_TERMIOS_H.
10961 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10963 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10964 always iterate over all inferiors.
10965 (gdbsim_cntrl_c): Adjust.
10966 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10968 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10970 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10971 index type is objfile-owned if the element type is as well.
10973 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10977 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10979 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10980 "features/s390x-linux64.c".
10981 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10982 s390_linux32 and s390x_linux64.
10983 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10985 * s390-tdep.c: Include "features/s390-linux32.c" and
10986 "features/s390x-linux64.c".
10987 (s390_tdesc_valid): Add check for tdesc_has_registers.
10988 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10989 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10990 tdesc_s390x_linux64.
10991 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10992 tdesc_s390x_linux64 to...
10993 * s390-tdep.h: ...here.
10995 2018-01-30 Pedro Alves <palves@redhat.com>
10998 * config.in, configure: Regenerate.
10999 * configure.ac: Check for getpgid.
11000 * go32-nat.c (go32_pass_ctrlc): New.
11001 (go32_target): Install it.
11002 * inf-child.c (inf_child_target): Install
11003 child_terminal_save_inferior, child_pass_ctrlc and
11005 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11006 (inf_ptrace_target): No longer install it.
11007 * infcmd.c (interrupt_target_1): Adjust.
11008 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11009 (child_interrupt): Declare.
11010 (inferior::terminal_state): New.
11011 * inflow.c (struct terminal_info): Update comments.
11012 (inferior_process_group): Delete.
11013 (terminal_is_ours): Delete.
11014 (gdb_tty_state): New.
11015 (child_terminal_init): Adjust.
11016 (is_gdb_terminal, sharing_input_terminal_1)
11017 (sharing_input_terminal): New functions.
11018 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11019 Set the process's actual process group in the foreground if
11020 possible. Handle is_ours_for_output/is_ours distinction. Don't
11021 mark terminal as the inferior's if not sharing GDB's terminal.
11022 Don't check attach_flag.
11023 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11024 pass down a target_terminal_state.
11025 (child_terminal_save_inferior): New, factored out from ...
11026 (child_terminal_ours_1): ... this. Handle
11027 target_terminal_state::is_ours_for_output.
11028 (child_interrupt, child_pass_ctrlc): New.
11029 (inflow_inferior_exit): Clear the inferior's terminal_state.
11030 (copy_terminal_info): Copy the inferior's terminal state.
11031 (_initialize_inflow): Remove reference to terminal_is_ours.
11032 * inflow.h (inferior_process_group): Delete.
11033 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11034 * procfs.c (procfs_target): Don't install procfs_interrupt.
11035 (procfs_interrupt): Delete.
11036 * remote.c (remote_serial_quit_handler): Adjust.
11037 (remote_interrupt): Remove ptid parameter. Adjust.
11038 * target-delegates.c: Regenerate.
11039 * target.c: Include "terminal.h".
11040 (target_terminal::terminal_state): Rename to ...
11041 (target_terminal::m_terminal_state): ... this.
11042 (target_terminal::init): Adjust.
11043 (target_terminal::inferior): Adjust to per-inferior
11045 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11046 (target_terminal::ours, target_terminal::ours_for_output): Use
11047 target_terminal_is_ours_kind.
11048 (target_interrupt): Remove ptid parameter. Adjust.
11049 (default_target_pass_ctrlc): Adjust.
11050 * target.h (target_ops::to_terminal_save_inferior): New field.
11051 (target_ops::to_interrupt): Remove ptid_t parameter.
11052 (target_interrupt): Remove ptid_t parameter. Update comment.
11053 (target_pass_ctrlc): Update comment.
11054 * target/target.h (target_terminal_state): New scoped enum,
11055 factored out of ...
11056 (target_terminal::terminal_state): ... here.
11057 (target_terminal::inferior): Update comments.
11058 (target_terminal::restore_inferior): New.
11059 (target_terminal::is_inferior, target_terminal::is_ours)
11060 (target_terminal::is_ours_for_output): Adjust.
11061 (target_terminal::scoped_restore_terminal_state): Adjust to
11062 rename, and call restore_inferior() instead of inferior().
11063 (target_terminal::scoped_restore_terminal_state::m_state): Change
11065 (target_terminal::terminal_state): Rename to ...
11066 (target_terminal::m_terminal_state): ... this and change type.
11068 2018-01-30 Pedro Alves <palves@redhat.com>
11070 * linux-nat.c (wait_for_signal): New function.
11071 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11073 (async_terminal_is_ours)
11074 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11075 (linux_nat_add_target): Don't override
11076 to_terminal_inferior/to_terminal_ours.
11078 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11080 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11082 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11084 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11085 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11086 dwarf2_per_objfile_free here.
11087 (dwarf2_per_objfile_free): Remove.
11088 (_initialize_dwarf2_read): Don't register
11089 dwarf2_per_objfile_free as a registry cleanup.
11091 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11093 Avoid compilation errors in MinGW native builds
11095 The error is triggered by including python-internal.h, and the
11098 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11099 from build-gnulib/import/math.h:27,
11100 from d:/usr/Python26/include/pyport.h:235,
11101 from d:/usr/Python26/include/Python.h:58,
11102 from python/python-internal.h:94,
11103 from python/py-arch.c:24:
11104 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11108 This happens because Python headers define 'hypot' to expand t
11109 '_hypot' in the Windows builds.
11110 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11111 'hypoth'. This avoids a compilation error.
11113 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11115 * MAINTAINERS (Write After Approval): Fix ordering.
11117 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11119 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11121 2018-01-26 Alan Modra <amodra@gmail.com>
11123 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11124 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11125 Remove nop. Make const. Comment.
11126 (powerpc32_plt_stub_so_2): New.
11127 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11128 Correct count. Update uses.
11129 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11130 Move common code reading PLT entry word. Correct
11131 powerpc32_plt_stub PLT address calculation.
11132 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11133 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11134 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11135 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11136 (ppc64_standard_linkage8): Likewise.
11137 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11138 Correct insns description.
11139 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11141 2018-01-24 Pedro Alves <palves@redhat.com>
11143 GCC PR libstdc++/83906
11144 * gdbtypes.c (operator==(const dynamic_prop &,
11145 const dynamic_prop &)): New.
11146 (operator==(const range_bounds &, const range_bounds &)): New.
11147 (check_types_equal): Use them instead of memcmp.
11148 * gdbtypes.h (operator==(const dynamic_prop &,
11149 const dynamic_prop &)): Declare.
11150 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11151 (operator==(const range_bounds &, const range_bounds &)): Declare.
11152 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11154 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11156 * s390-linux-tdep.c (s390_record_address_mask)
11157 (s390_record_calc_disp_common, s390_record_calc_disp)
11158 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11159 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11160 (s390_process_record): Move to s390-tdep.c.
11161 (s390_linux_init_abi_any): Adjust.
11162 * s390-tdep.c (s390_record_address_mask)
11163 (s390_record_calc_disp_common, s390_record_calc_disp)
11164 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11165 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11166 (s390_process_record): Moved from s390-linux-tdep.c
11167 (s390_gdbarch_init): Adjust.
11169 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11171 * s390-linux-nat.c (s390-tdep.h): New include.
11172 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11173 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11174 (ALLDEPFILES): Add s390-tdep.c.
11175 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11176 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11177 * s390-tdep.h: ...this. New file.
11178 * s390-linux-tdep.c (s390-tdep.h): New include.
11179 (_initialize_s390_tdep): Rename to...
11180 (_initialize_s390_linux_tdep): ...this and adjust.
11181 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11182 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11184 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11185 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11186 (s390_is_partial_instruction, s390_software_single_step)
11187 (is_non_branch_ril, s390_displaced_step_copy_insn)
11188 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11189 (s390_prologue_data, s390_addr, s390_store, s390_load)
11190 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11191 (s390_register_call_saved, s390_guess_tracepoint_registers)
11192 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11193 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11194 (s390_pseudo_register_name, s390_pseudo_register_type)
11195 (s390_pseudo_register_read, s390_pseudo_register_write)
11196 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11197 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11198 (s390_addr_bits_remove, s390_address_class_type_flags)
11199 (s390_address_class_type_flags_to_name)
11200 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11201 (s390_function_arg_float, s390_function_arg_vector)
11202 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11203 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11204 (s390_frame_align, s390_register_return_value, s390_return_value)
11205 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11206 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11207 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11208 (s390_trad_frame_prev_register, s390_unwind_cache)
11209 (s390_prologue_frame_unwind_cache)
11210 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11211 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11212 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11213 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11214 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11215 (s390_frame_base_address, s390_local_base_address)
11216 (s390_frame_base, s390_gcc_target_options)
11217 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11218 (s390_validate_reg_range, s390_tdesc_valid)
11219 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11220 * s390-tdep.c: ...this. New file.
11222 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11224 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11225 (s390_process_record, s390_gdbarch_tdep_alloc)
11226 (s390_linux_init_abi_any): Use/set new hook.
11228 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11230 * s390-linux-tdep.c (osabi.h): New include.
11231 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11232 (s390_linux_init_abi_any): New functions.
11233 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11235 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11237 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11238 tdesc_has_registers check
11240 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11242 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11243 (s390_validate_reg_range): New macro.
11244 (s390_gdbarch_init): Adjust.
11246 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11248 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11249 (s390_gdbarch_tdep_alloc): Adjust.
11250 (s390_gdbarch_init): Adjust.
11252 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11254 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11255 <have_tdb>: Change type to bool.
11256 (s390_gdbarch_tdep_alloc): Adjust.
11257 (s390_gdbarch_init): Adjust.
11259 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11261 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11262 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11263 (s390_gdbarch_tdep_alloc): New function.
11264 (s390_gdbarch_init): Allocate tdep at start and use its fields
11265 instead of separate variables.
11267 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11269 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11270 when looking for cached gdbarch and add comment for remaining.
11272 2018-01-22 Pedro Alves <palves@redhat.com>
11273 Sergio Durigan Junior <sergiodj@redhat.com>
11275 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11278 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11280 * MAINTAINERS: Update my company e-mail address.
11282 2018-01-22 Yao Qi <yao.qi@linaro.org>
11284 * regcache.c (cooked_write_test): New function.
11285 (_initialize_regcache): Register the test.
11287 2018-01-22 Yao Qi <yao.qi@linaro.org>
11289 * ia64-tdep.c (ia64_pseudo_register_read): Call
11290 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11291 * m32c-tdep.c (m32c_cat_read): Likewise.
11292 (m32c_r3r2r1r0_read): Likewise.
11293 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11294 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11296 2018-01-22 Yao Qi <yao.qi@linaro.org>
11298 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11299 method raw_read instead of regcache_raw_read.
11300 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11301 * arm-tdep.c (arm_neon_quad_read): Likewise.
11302 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11303 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11304 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11305 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11306 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11307 (i386_pseudo_register_read_into_value): Likewise.
11308 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11309 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11310 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11311 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11312 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11313 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11314 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11315 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11316 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11318 2018-01-22 Yao Qi <yao.qi@linaro.org>
11320 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11321 * configure.tgt: Remove target mt.
11322 * mt-tdep.c: Remove.
11323 * regcache.c (cooked_read_test): Remove the check for mt.
11325 2018-01-22 Yao Qi <yao.qi@linaro.org>
11327 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11328 instead of gdbarch_pseudo_register_read_value.
11330 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11332 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11335 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11337 * linespec.c (create_sals_line_offset): Remove code that preserved
11338 the symtab_and_line's line number.
11340 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11342 * varobj.c (varobj_create): Don't set valid_block when creating a
11345 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11347 * varobj.c (varobj_create): Remove out of date comment.
11349 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11352 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11353 updating innermost block.
11354 * parse.c (innermost_block_tracker::update): Take extra type
11355 parameter, and check types match before updating innermost block.
11356 (write_dollar_variable): Update innermost block for registers.
11357 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11358 (innermost_block_tracker::innermost_block_tracker): Initialise
11360 (innermost_block_tracker::reset): Take type parameter.
11361 (innermost_block_tracker::update): Take type parameter, and pass
11362 type through as needed.
11363 (innermost_block_tracker::m_types): New member.
11364 * varobj.c (varobj_create): Pass type when reseting innermost
11367 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11369 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11370 * ada-lang.c (resolve_subexp): Likewise.
11371 * breakpoint.c (set_breakpoint_condition) Likewise.
11372 (watch_command_1) Likewise.
11373 * c-exp.y (variable): Likewise.
11374 * d-exp.y (PrimaryExpression): Likewise.
11375 * f-exp.y (variable): Likewise.
11376 * go-exp.y (variable): Likewise.
11377 * m2-exp.y (variable): Likewise.
11378 * objfiles.c (objfile::~objfile): Likewise.
11379 * p-exp.y (variable): Likewise.
11380 * parse.c (innermost_block): Change type.
11381 * parser-defs.h (class innermost_block_tracker): New.
11382 (innermost_block): Change to innermost_block_tracker.
11383 * printcmd.c (display_command): Switch to innermost_block API.
11384 (do_one_display): Likewise.
11385 * rust-exp.y (do_one_display): Likewise.
11386 * symfile.c (clear_symtab_users): Likewise.
11387 * varobj.c (varobj_create): Switch to innermost_block API, replace
11388 use of innermost_block with block stored on varobj object.
11390 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11392 * expression.h (innermost_block): Remove declaration.
11393 * varobj.c: Add 'parser-defs.h' include.
11395 2018-01-19 Tom Tromey <tom@tromey.com>
11397 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11398 symbols in the static and global blocks.
11400 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11402 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11403 gdb_ptrace.h, and move including gdb_wait.h ...
11404 * nat/linux-ptrace.h: ... to here.
11406 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11408 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11409 inf_ptrace_detach_success.
11410 (inf_ptrace_detach_success): Add inferior parameter, use it
11411 instead of inferior_ptid, pass it to detach_inferior.
11412 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11414 * inferior.c (detach_inferior): Add overload that takes an
11416 * inferior.h (detach_inferior): Likewise.
11417 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11418 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11419 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11421 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11423 * target.h (struct target_ops) <to_detach>: Add inferior
11425 (target_detach): Likewise.
11426 * target.c (dispose_inferior): Pass inferior down.
11427 (target_detach): Pass inferior down. Assert that it is equal to
11428 the current inferior.
11429 * aix-thread.c (aix_thread_detach): Pass inferior down.
11430 * corefile.c (core_file_command): Pass current_inferior() down.
11431 * corelow.c (core_detach): Add inferior parameter.
11432 * darwin-nat.c (darwin_detach): Likewise.
11433 * gnu-nat.c (gnu_detach): Likewise.
11434 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11435 * infcmd.c (detach_command): Pass current_inferior() down to
11437 * infrun.c (follow_fork_inferior): Pass parent_inf to
11439 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11441 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11442 * linux-thread-db.c (thread_db_detach): Likewise.
11443 * nto-procfs.c (procfs_detach): Likewise.
11444 * procfs.c (procfs_detach): Likewise.
11445 * record.c (record_detach): Likewise.
11446 * record.h (struct inferior): Forward-declare.
11447 (record_detach): Add inferior parameter.
11448 * remote-sim.c (gdbsim_detach): Likewise.
11449 * remote.c (remote_detach_1): Likewise.
11450 (remote_detach): Likewise.
11451 (extended_remote_detach): Likewise.
11452 * sol-thread.c (sol_thread_detach): Likewise.
11453 * target-debug.h (target_debug_print_inferior_p): New macro.
11454 * target-delegates.c: Re-generate.
11455 * top.c (kill_or_detach): Pass inferior down to target_detach.
11456 * windows-nat.c (windows_detach): Add inferior parameter.
11458 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11460 * target.h (struct target_ops) <to_detach>: Remove args
11462 (target_detach): Likewise.
11463 * target.c (dispose_inferior): Adjust.
11464 (target_detach): Remove args parameter, adjust.
11465 * aix-thread.c (aix_thread_detach): Adjust.
11466 * corefile.c (core_file_command): Adjust.
11467 * corelow.c (core_detach): Adjust.
11468 * darwin-nat.c (darwin_detach): Adjust.
11469 * gnu-nat.c (gnu_detach): Adjust.
11470 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11471 * infcmd.c (detach_command): Adjust
11472 * infrun.c (follow_fork_inferior): Adjust.
11473 (handle_vfork_child_exec_or_exit): Adjust.
11474 * linux-fork.c (linux_fork_detach): Remove args parameter.
11475 * linux-fork.h (linux_fork_detach): Likewise.
11476 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11477 * linux-thread-db.c (thread_db_detach): Likewise.
11478 * nto-procfs.c (procfs_detach): Likewise.
11479 * procfs.c (procfs_detach): Likewise.
11480 (do_detach): Remove signo parameter.
11481 * record.c (record_detach): Remove args parameter.
11482 * record.h (record_detach): Likewise.
11483 * remote-sim.c (gdbsim_detach): Likewise.
11484 * remote.c (remote_detach_1): Likewise.
11485 (remote_detach): Likewise.
11486 (extended_remote_detach): Likewise.
11487 * sol-thread.c (sol_thread_detach): Likewise.
11488 * target-delegates.c: Re-generate.
11489 * top.c (struct qt_args) <args>: Remove field.
11490 (kill_or_detach): Don't pass args.
11491 (quit_force): Don't set args.
11492 * windows-nat.c (windows_detach): Remove args parameter.
11494 2018-01-19 Yao Qi <yao.qi@linaro.org>
11496 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11497 (arm_linux_init_abi): Install it.
11499 2018-01-19 Yao Qi <yao.qi@linaro.org>
11501 * osabi.c (gdb_osabi_names): Extend the regexp for
11502 arm-linux-gnueabihf.
11504 2018-01-18 Yao Qi <yao.qi@linaro.org>
11506 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11508 (abbrev_table::add_abbrev): Update.
11509 (abbrev_table::lookup_abbrev): Update.
11511 2018-01-18 Yao Qi <yao.qi@linaro.org>
11513 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11515 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11517 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11520 2018-01-17 Tom Tromey <tom@tromey.com>
11522 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11524 2018-01-17 Tom Tromey <tom@tromey.com>
11526 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11527 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11528 (create_array_type_with_stride): Update.
11529 * dwarf2read.c (set_die_type): Update.
11531 2018-01-17 Tom Tromey <tom@tromey.com>
11533 * dwarf2read.c (delayed_method_info): Remove typedef.
11534 (dwarf2_cu::method_info): Now a std::vector.
11535 (add_to_method_list): Update.
11536 (free_delayed_list): Remove.
11537 (compute_delayed_physnames): Update.
11538 (process_full_comp_unit, process_full_type_unit): Clear the method
11539 list. Remove cleanups.
11540 (psymtab_include_file_name): Add name_holder parameter. Use
11541 unique_xmalloc_ptr.
11542 (dwarf_decode_lines): Update.
11544 2018-01-17 Tom Tromey <tom@tromey.com>
11545 Simon Marchi <simon.marchi@ericsson.com>
11547 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11548 (dwarf2_per_objfile::free_cached_comp_units)
11549 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11550 (init_cutu_and_read_dies_no_follow): Update.
11551 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11552 (dwarf2_cu::~dwarf2_cu): New.
11553 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11554 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11556 2018-01-17 Tom Tromey <tom@tromey.com>
11557 Simon Marchi <simon.marchi@ericsson.com>
11559 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11560 (struct die_reader_specs) <abbrev_table>: New member.
11561 (struct abbrev_table): Add constructor.
11562 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11563 <abbrev_obstack>: Now an auto_obstack.
11564 (abbrev_table_up): New typedef.
11565 (init_cu_die_reader): Add abbrev_table parameter.
11566 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11567 Add result_dwo_abbrev_table.
11568 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11569 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11571 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11573 (skip_children): Update.
11574 (abbrev_table::alloc_abbrev): Rename from
11575 abbrev_table_alloc_abbrev.
11576 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11577 (abbrev_table::lookup_abbrev): Rename from
11578 abbrev_table_lookup_abbrev.
11579 (abbrev_table_read_table): Return abbrev_table_up.
11580 (abbrev_table_free, abbrev_table_free_cleanup)
11581 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11582 (load_partial_dies): Update.
11584 2018-01-17 Tom Tromey <tom@tromey.com>
11586 * dwarf2read.c (dwarf2_compute_name): Update comment.
11587 (read_func_scope, read_variable): Update.
11588 (new_symbol): Remove.
11589 (new_symbol_full): Rename to new_symbol.
11591 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11594 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11595 a warning instead of throwing an error, set section size to 0 and return
11597 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11599 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11601 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11603 (linux_ptrace_attach_fail_reason_string): Likewise.
11604 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11606 (linux_ptrace_attach_fail_reason_string): Likewise.
11607 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11609 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11611 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11613 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11616 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11617 checking for fs_base/gs_base fields in struct user_regs_struct.
11618 * configure: Regenerate.
11620 2018-01-17 Yao Qi <yao.qi@linaro.org>
11622 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11624 (aarch64_linux_init_abi): Install it to gdbarch hook
11625 gcc_target_options.
11627 2018-01-15 Pedro Alves <palves@redhat.com>
11629 * common/signals-state-save-restore.c
11630 (save_original_signals_state): Fix typos.
11632 2017-01-12 Tom Tromey <tom@tromey.com>
11633 Sergio Durigan Junior <sergiodj@redhat.com>
11635 * Makefile.in (install-only): Install gdb-add-index.
11637 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11639 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11641 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11643 * infrun.c (keep_going_pass_signal): Clear step-over info when
11644 insert_breakpoints fails.
11646 2018-01-11 Pedro Alves <palves@redhat.com>
11649 * infrun.c (resume): Rename to ...
11650 (resume_1): ... this.
11651 (resume): Reimplement as wrapper around resume_1.
11653 2018-01-11 Pedro Alves <palves@redhat.com>
11656 * remote.c (remote_parse_stop_reply): Default to the last-set
11657 general thread instead of to 'magic_null_ptid'.
11659 2018-01-10 Pedro Alves <palves@redhat.com>
11661 * language.h (language_get_symbol_name_matcher): Rename ...
11662 (get_symbol_name_matcher): ... this.
11663 * language.c (language_get_symbol_name_matcher): Ditto.
11664 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11667 2018-01-10 Pedro Alves <palves@redhat.com>
11671 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11672 Adjust to use language_get_symbol_name_matcher instead of
11673 language_defn::la_get_symbol_name_matcher.
11674 * language.c (language_get_symbol_name_matcher): If in Ada mode
11675 and the lookup name is a verbatim match, return Ada's matcher.
11676 * language.h (language_get_symbol_name_matcher): Adjust comment.
11677 (ada_lookup_name_info::verbatim_p):: New method.
11679 2018-01-10 Pedro Alves <palves@redhat.com>
11682 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11683 minsym's language is language_auto or language_cplus, pass down
11684 language_ada instead.
11685 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11687 2018-01-10 Pedro Alves <palves@redhat.com>
11690 * minsyms.c (linkage_name_str): New function.
11691 (iterate_over_minimal_symbols): Use it.
11693 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11695 * NEWS: Document that 'info proc' now works on FreeBSD.
11697 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11699 * configure.ac: Check for kinfo_getfile in libutil.
11700 * configure: Regenerate.
11701 * config.in: Regenerate.
11702 * fbsd-nat.c: Include "fbsd-tdep.h".
11703 (fbsd_fetch_cmdline): New.
11704 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11705 rather than calling error.
11706 (fbsd_info_proc): New.
11707 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11708 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11709 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11711 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11713 * fbsd-nat.c (struct free_deleter): Remove.
11714 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11716 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11718 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11719 NULL for an empty pathname.
11721 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11723 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11724 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11725 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11726 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11727 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11728 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11729 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11730 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11731 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11732 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11733 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11734 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11735 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11736 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11737 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11739 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11741 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11742 (gnu_xfer_auxv): New function.
11743 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11744 TARGET_OBJECT_AUXV.
11746 2018-01-08 Yao Qi <yao.qi@linaro.org>
11747 Simon Marchi <simon.marchi@ericsson.com>
11749 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11751 (COMMON_OBS): Remove selftest.o.
11752 * configure.ac: Append selftest-arch.c and common/selftest.c to
11753 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11754 * configure: Re-generated.
11755 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11757 (maintenance_info_selftests): Likewise.
11759 2018-01-08 Xavier Roirand <roirand@adacore.com>
11761 * ada-valprint.c (val_print_packed_array_elements): Use
11762 proper number of elements when printing an array indexed
11763 by an enumeration type.
11765 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11767 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11768 (dw2_get_file_names_reader): Adjust.
11769 (lookup_dwo_signatured_type): Adjust.
11770 (lookup_dwp_signatured_type): Adjust.
11771 (lookup_signatured_type): Adjust.
11772 (create_type_unit_group): Adjust.
11773 (get_type_unit_group): Adjust.
11774 (process_psymtab_comp_unit_reader): Adjust.
11775 (build_type_psymtabs_reader): Adjust.
11776 (scan_partial_symbols): Adjust.
11777 (add_partial_symbol): Adjust.
11778 (add_partial_subprogram): Adjust.
11779 (peek_die_abbrev): Adjust.
11780 (fixup_go_packaging): Adjust.
11781 (process_imported_unit_die): Adjust.
11782 (dwarf2_compute_name): Adjust.
11783 (dwarf2_physname): Adjust.
11784 (read_import_statement): Adjust.
11785 (handle_DW_AT_stmt_list): Adjust.
11786 (read_file_scope): Adjust.
11787 (read_func_scope): Adjust.
11788 (read_lexical_block_scope): Adjust.
11789 (read_call_site_scope): Adjust.
11790 (read_variable): Adjust.
11791 (dwarf2_rnglists_process): Adjust.
11792 (dwarf2_ranges_process): Adjust.
11793 (dwarf2_ranges_read): Adjust.
11794 (dwarf2_get_pc_bounds): Adjust.
11795 (dwarf2_record_block_ranges): Adjust.
11796 (dwarf2_add_field): Adjust.
11797 (dwarf2_add_member_fn): Adjust.
11798 (read_structure_type): Adjust.
11799 (process_structure_scope): Adjust.
11800 (read_enumeration_type): Adjust.
11801 (read_array_type): Adjust.
11802 (mark_common_block_symbol_computed): Adjust.
11803 (read_common_block): Adjust.
11804 (read_namespace_type): Adjust.
11805 (read_namespace): Adjust.
11806 (read_module_type): Adjust.
11807 (read_tag_pointer_type): Adjust.
11808 (read_tag_ptr_to_member_type): Adjust.
11809 (read_tag_string_type): Adjust.
11810 (read_subroutine_type): Adjust.
11811 (read_typedef): Adjust.
11812 (read_base_type): Adjust.
11813 (attr_to_dynamic_prop): Adjust.
11814 (read_subrange_type): Adjust.
11815 (read_unspecified_type): Adjust.
11816 (dwarf2_read_abbrevs): Adjust.
11817 (load_partial_dies): Adjust.
11818 (read_partial_die): Adjust.
11819 (find_partial_die): Adjust.
11820 (guess_partial_die_structure_name): Adjust.
11821 (fixup_partial_die): Adjust.
11822 (read_attribute_value): Adjust.
11823 (read_addr_index): Adjust.
11824 (read_addr_index_from_leb128): Adjust.
11825 (read_str_index): Adjust.
11826 (dwarf2_string_attr): Adjust.
11827 (get_debug_line_section): Adjust.
11828 (dwarf_decode_line_header): Adjust.
11829 (lnp_state_machine::check_line_address): Adjust.
11830 (dwarf_decode_lines_1): Adjust.
11831 (dwarf_decode_lines): Adjust.
11832 (dwarf2_start_symtab): Adjust.
11833 (var_decode_location): Adjust.
11834 (new_symbol_full): Adjust.
11835 (dwarf2_const_value_data): Adjust.
11836 (dwarf2_const_value_attr): Adjust.
11837 (dwarf2_const_value): Adjust.
11838 (die_type): Adjust.
11839 (die_containing_type): Adjust.
11840 (build_error_marker_type): Adjust.
11841 (lookup_die_type): Adjust.
11842 (guess_full_die_structure_name): Adjust.
11843 (anonymous_struct_prefix): Adjust.
11844 (determine_prefix): Adjust.
11845 (dwarf2_name): Adjust.
11846 (follow_die_ref_or_sig): Adjust.
11847 (follow_die_offset): Adjust.
11848 (follow_die_ref): Adjust.
11849 (follow_die_sig_1): Adjust.
11850 (follow_die_sig): Adjust.
11851 (get_signatured_type): Adjust.
11852 (get_DW_AT_signature_type): Adjust.
11853 (decode_locdesc): Adjust.
11854 (dwarf_decode_macros): Adjust.
11855 (cu_debug_loc_section): Adjust.
11856 (fill_in_loclist_baton): Adjust.
11857 (dwarf2_symbol_mark_computed): Adjust.
11858 (init_one_comp_unit): Don't assign
11859 dwarf2_cu::dwarf2_per_objfile.
11860 (set_die_type): Adjust.
11862 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11864 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11865 <dwarf2_per_objfile>: New field.
11866 (dwarf2_per_objfile): Remove global.
11867 (get_dwarf2_per_objfile): New function.
11868 (set_dwarf2_per_objfile): New function.
11869 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11870 dwarf2_per_objfile.
11871 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11872 (read_abbrev_offset): Likewise.
11873 (read_indirect_string): Likewise.
11874 (read_indirect_line_string): Likewise.
11875 (read_indirect_string_at_offset): Likewise.
11876 (read_indirect_string_from_dwz): Likewise.
11877 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11878 dwarf2_per_objfile.
11879 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11880 (create_all_comp_units): Change objfile parameter to
11881 dwarf2_per_objfile.
11882 (create_all_type_units): Likewise.
11883 (process_queue): Add dwarf2_per_objfile parameter.
11884 (read_and_check_comp_unit_head): Likewise.
11885 (lookup_dwo_unit_in_dwp): Likewise.
11886 (get_dwp_file): Likewise.
11887 (process_cu_includes): Likewise.
11888 (struct free_dwo_file_cleanup_data): New struct.
11889 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11890 set_dwarf2_per_objfile.
11891 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11892 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11893 context, adjust calls.
11894 (dw2_instantiate_symtab): Likewise.
11895 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11896 (dw2_get_cu): Likewise.
11897 (create_cu_from_index_list): Change objfile parameter to
11898 dwarf2_per_objfile.
11899 (create_cus_from_index_list): Get dwarf2_per_objfile from
11900 context, adjust calls.
11901 (create_cus_from_index): Likewise.
11902 (create_signatured_type_table_from_index): Change objfile
11903 parameter to dwarf2_per_objfile.
11904 (create_signatured_type_table_from_debug_names): Change objfile
11905 parameter to dwarf2_per_objfile.
11906 (create_addrmap_from_index): Likewise.
11907 (create_addrmap_from_aranges): Likewise.
11908 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11909 (dw2_setup): Remove.
11910 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11912 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11913 get_dwarf2_per_objfile.
11914 (dw2_forget_cached_source_info): Likewise.
11915 (dw2_map_symtabs_matching_filename): Likewise.
11916 (struct dw2_symtab_iterator) <index>: Remove.
11917 <dwarf2_per_objfile>: New field.
11918 (dw2_symtab_iter_init): Replace index parameter with
11919 dwarf2_per_objfile.
11920 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11921 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11922 (dw2_print_stats): Likewise.
11923 (dw2_dump): Likewise.
11924 (dw2_expand_symtabs_for_function): Likewise.
11925 (dw2_expand_all_symtabs): Likewise.
11926 (dw2_expand_symtabs_with_fullname): Likewise.
11927 (dw2_expand_marked_cus): Replace index and objfile parameters
11928 with dwarf2_per_objfile.
11929 (dw_expand_symtabs_matching_file_matcher): Add
11930 dwarf2_per_objfile parameter and adjust calls.
11931 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11933 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11934 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11936 (create_cus_from_debug_names_list): Replace objfile parameter
11937 with dwarf2_per_objfile and adjust calls.
11938 (create_cus_from_debug_names): Likewise.
11939 (dwarf2_read_debug_names): Likewise.
11940 (mapped_debug_names::namei_to_name): Adjust call.
11941 (dw2_debug_names_iterator::next): Likewise.
11942 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11943 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11944 (dw2_debug_names_dump): Likewise.
11945 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11946 (dw2_debug_names_expand_symtabs_matching): Likewise.
11947 (dwarf2_initialize_objfile): Likewise.
11948 (dwarf2_build_psymtabs): Likewise.
11949 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11951 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11952 (read_and_check_comp_unit_head): Likewise.
11953 (read_abbrev_offset): Likewise.
11954 (create_debug_type_hash_table): Likewise.
11955 (create_debug_types_hash_table): Likewise.
11956 (create_all_type_units): Replace objfile parameter with
11957 dwarf2_per_objfile.
11958 (add_type_unit): Add dwarf2_per_objfile parameter.
11959 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11960 with dwarf2_per_objfile.
11961 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11962 (lookup_dwp_signatured_type): Likewise.
11963 (lookup_signatured_type): Likewise.
11964 (read_cutu_die_from_dwo): Likewise.
11965 (init_tu_and_read_dwo_dies): Likewise.
11966 (init_cutu_and_read_dies): Likewise.
11967 (init_cutu_and_read_dies_no_follow): Likewise.
11968 (allocate_type_unit_groups_table): Add objfile parameter.
11969 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11970 (get_type_unit_group): Likewise.
11971 (process_psymtab_comp_unit): Update call.
11972 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11973 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11974 (print_tu_stats): Likewise.
11975 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11976 in void* parameter.
11977 (build_type_psymtabs): Change objfile parameter to
11978 dwarf2_per_objfile.
11979 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11980 passed in void* parameter.
11981 (process_skeletonless_type_units): Change objfile parameter to
11982 dwarf2_per_objfile.
11983 (set_partial_user): Likewise.
11984 (dwarf2_build_psymtabs_hard): Likewise.
11985 (read_comp_units_from_section): Likewise.
11986 (create_all_comp_units): Likewise.
11987 (scan_partial_symbols): Update calls.
11988 (add_partial_symbol): Likewise.
11989 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11990 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11991 (process_queue): Add dwarf2_per_objfile parameter.
11992 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11993 (compute_compunit_symtab_includes): Likewise.
11994 (process_cu_includes): Add dwarf2_per_objfile parameter.
11995 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11996 (process_full_type_unit): Likewise.
11997 (process_imported_unit_die): Update call.
11998 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11999 (read_file_scope): Likewise.
12000 (allocate_dwo_file_hash_table): Add objfile parameter.
12001 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12002 (create_cus_hash_table): Likewise.
12003 (create_dwp_hash_table): Likewise.
12004 (create_dwo_unit_in_dwp_v1): Likewise.
12005 (create_dwp_v2_section): Likewise.
12006 (create_dwo_unit_in_dwp_v2): Likewise.
12007 (lookup_dwo_unit_in_dwp): Likewise.
12008 (try_open_dwop_file): Likewise.
12009 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12010 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12011 cleanup to include a reference to dwarf2_per_objfile.
12012 (open_dwp_file): Add dwarf2_per_objfile parameter.
12013 (open_and_init_dwp_file): Likewise.
12014 (get_dwp_file): Likewise.
12015 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12016 (queue_and_load_all_dwo_tus): Update call.
12017 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12019 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12020 (dwarf2_ranges_process): Likewise.
12021 (dwarf2_get_pc_bounds): Likewise.
12022 (mark_common_block_symbol_computed): Likewise.
12023 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12024 (dwarf2_read_abbrevs): Update call.
12025 (read_partial_die): Use dwarf2_per_objfile from cu.
12026 (find_partial_die): Likewise.
12027 (fixup_partial_die): Likewise.
12028 (read_attribute_value): Likewise.
12029 (read_indirect_string_at_offset_from): Add objfile parameter.
12030 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12032 (read_indirect_string_from_dwz): Add objfile parameter.
12033 (read_indirect_string): Add objfile parameter.
12034 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12035 (read_addr_index): Use dwarf2_per_objfile from cu.
12036 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12038 (read_str_index): Use dwarf2_per_objfile from cu.
12039 (get_debug_line_section): Likewise.
12040 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12041 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12042 (new_symbol_full): Use dwarf2_per_objfile from cu.
12043 (build_error_marker_type): Likewise.
12044 (lookup_die_type): Likewise.
12045 (determine_prefix): Likewise.
12046 (follow_die_offset): Likewise.
12047 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12048 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12049 (dwarf2_fetch_die_type_sect_off): Likewise.
12050 (dwarf2_get_die_type): Likewise.
12051 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12052 (get_signatured_type): Likewise.
12053 (get_DW_AT_signature_type): Likewise.
12054 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12055 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12056 (cu_debug_loc_section): Likewise.
12057 (fill_in_loclist_baton): Likewise.
12058 (dwarf2_symbol_mark_computed): Likewise.
12059 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12060 dwarf2_per_objfile.
12061 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12063 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12064 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12065 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12066 (set_die_type): Use dwarf2_free_objfile from cu.
12067 (get_die_type_at_offset): Likewise.
12068 (dwarf2_per_objfile_free): Don't assign global variable.
12069 (debug_names) <constructor>: Add dwarf2_per_objfile
12070 parameter, update m_debugstrlookup construction.
12071 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12073 <m_dwarf2_per_objfile>: New field.
12074 <lookup>: Use m_dwarf2_per_objfile.
12075 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12076 (psyms_seen_size): Likewise.
12077 (write_gdbindex): Replace objfile parameter with
12078 dwarf2_per_objfile.
12079 (write_debug_names): Likewise.
12080 (write_psymtabs_to_index): Likewise.
12081 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12084 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12086 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12087 <dwarf2_per_objfile>: New field.
12088 (struct dwarf2_per_cu_data) <objfile>: Remove.
12089 <dwarf2_per_objfile>: New field.
12090 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12092 (create_signatured_type_table_from_index): Likewise.
12093 (create_debug_type_hash_table): Likewise.
12094 (fill_in_sig_entry_from_dwo_entry): Likewise.
12095 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12096 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12098 (create_partial_symtab): Access objfile through
12099 dwarf2_per_objfile.
12100 (process_psymtab_comp_unit_reader): Likewise.
12101 (read_comp_units_from_section): Likewise.
12102 (scan_partial_symbols): Likewise.
12103 (add_partial_symbol): Likewise.
12104 (add_partial_subprogram): Likewise.
12105 (peek_die_abbrev): Likewise.
12106 (fixup_go_packaging): Likewise.
12107 (process_full_comp_unit): Likewise.
12108 (process_full_type_unit): Likewise.
12109 (process_imported_unit_die): Likewise.
12110 (dwarf2_compute_name): Likewise.
12111 (dwarf2_physname): Likewise.
12112 (read_import_statement): Likewise.
12113 (create_cus_hash_table): Assign dwarf2_physname instead of
12115 (read_func_scope): Access objfile through dwarf2_per_objfile.
12116 (read_lexical_block_scope): Likewise.
12117 (read_call_site_scope): Likewise.
12118 (read_variable): Likewise.
12119 (dwarf2_rnglists_process): Likewise.
12120 (dwarf2_ranges_process): Likewise.
12121 (dwarf2_ranges_read): Likewise.
12122 (dwarf2_record_block_ranges): Likewise.
12123 (dwarf2_add_field): Likewise.
12124 (dwarf2_add_member_fn): Likewise.
12125 (read_structure_type): Likewise.
12126 (process_structure_scope): Likewise.
12127 (read_enumeration_type): Likewise.
12128 (read_array_type): Likewise.
12129 (read_common_block): Likewise.
12130 (read_namespace_type): Likewise.
12131 (read_namespace): Likewise.
12132 (read_module_type): Likewise.
12133 (read_tag_pointer_type): Likewise.
12134 (read_tag_ptr_to_member_type): Likewise.
12135 (read_tag_string_type): Likewise.
12136 (read_subroutine_type): Likewise.
12137 (read_typedef): Likewise.
12138 (read_base_type): Likewise.
12139 (attr_to_dynamic_prop): Likewise.
12140 (read_subrange_type): Likewise.
12141 (read_unspecified_type): Likewise.
12142 (load_partial_dies): Likewise.
12143 (read_partial_die): Likewise.
12144 (find_partial_die): Likewise.
12145 (guess_partial_die_structure_name): Likewise.
12146 (fixup_partial_die): Likewise.
12147 (read_attribute_value): Likewise.
12148 (read_addr_index_from_leb128): Likewise.
12149 (dwarf2_read_addr_index): Likewise.
12150 (dwarf2_string_attr): Likewise.
12151 (lnp_state_machine::check_line_address): Likewise.
12152 (dwarf_decode_lines_1): Likewise.
12153 (dwarf_decode_lines): Likewise.
12154 (dwarf2_start_symtab): Likewise.
12155 (var_decode_location): Likewise.
12156 (new_symbol_full): Likewise.
12157 (dwarf2_const_value_data): Likewise.
12158 (dwarf2_const_value_attr): Likewise.
12159 (dwarf2_const_value): Likewise.
12160 (die_type): Likewise.
12161 (die_containing_type): Likewise.
12162 (lookup_die_type): Likewise.
12163 (guess_full_die_structure_name): Likewise.
12164 (anonymous_struct_prefix): Likewise.
12165 (dwarf2_name): Likewise.
12166 (follow_die_ref_or_sig): Likewise.
12167 (follow_die_offset): Likewise.
12168 (follow_die_ref): Likewise.
12169 (dwarf2_fetch_die_loc_sect_off): Likewise.
12170 (dwarf2_fetch_constant_bytes): Likewise.
12171 (dwarf2_fetch_die_type_sect_off): Likewise.
12172 (dwarf2_get_die_type): Likewise.
12173 (follow_die_sig): Likewise.
12174 (decode_locdesc): Likewise.
12175 (dwarf2_per_cu_objfile): Likewise.
12176 (dwarf2_per_cu_text_offset): Likewise.
12177 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12179 (set_die_type): Access objfile through
12180 dwarf2_per_objfile.
12182 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12184 * valprint.c (converted_character_d): Remove typedef.
12185 (DEF_VEC_O (converted_character_d)): Remove.
12186 (count_next_character): Use std::vector.
12187 (print_converted_chars_to_obstack): Likewise.
12188 (generic_printstr): Likewise.
12190 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12192 * xml-support.h (struct gdb_xml_value): Add constructor.
12193 <value>: Change type to unique_xmalloc_ptr.
12194 (gdb_xml_value_s): Remove typedef.
12195 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12196 (gdb_xml_element_start_handler): Change parameter type to
12198 (xml_find_attribute): Likewise.
12199 * xml-support.c (xml_find_attribute): Change parameter type to
12200 std::vector and adjust.
12201 (gdb_xml_values_cleanup): Remove.
12202 (gdb_xml_parser::start_element): Adjust to std::vector.
12203 (xinclude_start_include): Change paraeter type to std::vector
12205 * btrace.c (check_xml_btrace_version): Likewise.
12206 (parse_xml_btrace_block): Likewise.
12207 (parse_xml_btrace_pt_config_cpu): Likewise.
12208 (parse_xml_btrace_pt): Likewise.
12209 (parse_xml_btrace_conf_bts): Likewise.
12210 (parse_xml_btrace_conf_pt): Likewise.
12211 * memory-map.c (memory_map_start_memory): Likewise.
12212 (memory_map_start_property): Likewise.
12213 * osdata.c (osdata_start_osdata): Likewise.
12214 (osdata_start_item): Likewise.
12215 (osdata_start_column): Likewise.
12216 * remote.c (start_thread): Likewise.
12217 * solib-aix.c (library_list_start_library): Likewise.
12218 (library_list_start_list): Likewise.
12219 * solib-svr4.c (library_list_start_library): Likewise.
12220 (svr4_library_list_start_list): Likewise.
12221 * solib-target.c (library_list_start_segment): Likewise.
12222 (library_list_start_section): Likewise.
12223 (library_list_start_library): Likewise.
12224 (library_list_start_list): Likewise.
12225 * tracepoint.c (traceframe_info_start_memory): Likewise.
12226 (traceframe_info_start_tvar): Likewise.
12227 * xml-syscall.c (syscall_start_syscall): Likewise.
12228 * xml-tdesc.c (tdesc_start_target): Likewise.
12229 (tdesc_start_feature): Likewise.
12230 (tdesc_start_reg): Likewise.
12231 (tdesc_start_union): Likewise.
12232 (tdesc_start_struct): Likewise.
12233 (tdesc_start_flags): Likewise.
12234 (tdesc_start_enum): Likewise.
12235 (tdesc_start_field): Likewise.
12236 (tdesc_start_enum_value): Likewise.
12237 (tdesc_start_vector): Likewise.
12239 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12241 * extension.h (struct xmethod_worker) <clone>: Remove.
12242 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12244 (python_xmethod_worker::clone): Remove.
12245 * valops.c (find_overload_match): Use std::move instead of
12248 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12250 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12251 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12252 <free_xmethod_worker_data>: Remove.
12253 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12254 <get_xmethod_arg_types>: Remove.
12255 <get_xmethod_result_type>: Remove.
12256 <invoke_xmethod>: Remove.
12257 * extension.c (new_xmethod_worker): Remove.
12258 (clone_xmethod_worker): Remove.
12259 (get_matching_xmethod_workers): Return void, pass std::vector by
12261 (get_xmethod_arg_types): Rename to...
12262 (xmethod_worker::get_arg_types): ... this, and adjust.
12263 (get_xmethod_result_type): Rename to...
12264 (xmethod_worker::get_result_type): ... this, and adjust.
12265 (invoke_xmethod): Remove.
12266 (free_xmethod_worker): Remove.
12267 (free_xmethod_worker_vec): Remove.
12268 * extension.h (enum ext_lang_rc): Move here from
12270 (struct xmethod_worker): Add constructor and destructor.
12273 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12274 virtual pure methods.
12275 <get_arg_types, get_result_type>: New methods.
12276 (xmethod_worker_ptr): Remove typedef.
12277 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12278 (xmethod_worker_vec): Remove typedef.
12279 (xmethod_worker_up): New typedef.
12280 (invoke_xmethod): Remove.
12281 (clone_xmethod_worker): Remove.
12282 (free_xmethod_worker): Remove.
12283 (free_xmethod_worker_vec): Remove.
12284 (get_xmethod_arg_types): Remove.
12285 (get_xmethod_result_type): Remove.
12286 * valops.c (find_method_list): Use std::vector, don't use
12287 intermediate vector.
12288 (value_find_oload_method_list): Use std::vector.
12289 (find_overload_match): Use std::vector.
12290 (find_oload_champ): Use std::vector.
12291 * value.c (value_free): Use operator delete.
12292 (value_of_xmethod): Rename to...
12293 (value_from_xmethod): ... this. Don't assign
12294 xmethod_worker::value, take rvalue-reference.
12295 (result_type_of_xmethod): Adjust.
12296 (call_xmethod): Adjust.
12297 * value.h: Include extension.h.
12298 (struct xmethod_worker): Don't forward-declare.
12299 (value_of_xmethod): Rename to...
12300 (value_from_xmethod): ... this, take rvalue-reference.
12301 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12302 (struct python_xmethod_worker): ... this, add constructor and
12304 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12305 (gdbpy_free_xmethod_worker_data): Rename to...
12306 (python_xmethod_worker::~python_xmethod_worker): ... this and
12308 (gdbpy_clone_xmethod_worker_data): Rename to...
12309 (python_xmethod_worker::clone): ... this and adjust.
12310 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12312 (gdbpy_get_xmethod_arg_types): Rename to...
12313 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12314 (gdbpy_get_xmethod_result_type): Rename to...
12315 (python_xmethod_worker::do_get_result_type): ... this and
12317 (gdbpy_invoke_xmethod): Rename to...
12318 (python_xmethod_worker::invoke): ... this and adjust.
12319 (new_python_xmethod_worker): Rename to...
12320 (python_xmethod_worker::python_xmethod_worker): ... this and
12322 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12324 (gdbpy_free_xmethod_worker_data): Remove.
12325 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12326 (gdbpy_get_xmethod_arg_types): Remove.
12327 (gdbpy_get_xmethod_result_type): Remove.
12328 (gdbpy_invoke_xmethod): Remove.
12329 * python/python.c (python_extension_ops): Remove obsolete
12332 2018-01-05 Pedro Alves <palves@redhat.com>
12335 * common/signals-state-save-restore.c
12336 (save_original_signals_state): New parameter 'quiet'. Warn if we
12337 find a custom handler preinstalled, instead of internal erroring.
12338 But only warn if !quiet.
12339 * common/signals-state-save-restore.h
12340 (save_original_signals_state): New parameter 'quiet'.
12341 * main.c (captured_main_1): Move save_original_signals_state call
12342 after option handling, and pass QUIET.
12344 2018-01-05 Pedro Alves <palves@redhat.com>
12346 * spu-tdep.c (spu_catch_start): Pass
12347 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12349 2018-01-05 Pedro Alves <palves@redhat.com>
12352 * ada-lang.c (literal_symbol_name_matcher): New function.
12353 (ada_get_symbol_name_matcher): Use it for
12354 symbol_name_match_type::SEARCH_NAME.
12355 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12356 it down instead of assuming symbol_name_match_type::FULL.
12357 * block.h (block_lookup_symbol): New parameter 'match_type'.
12358 * c-valprint.c (print_unpacked_pointer): Use
12359 lookup_symbol_search_name instead of lookup_symbol.
12360 * compile/compile-object-load.c (get_out_value_type): Pass down
12361 symbol_name_match_type::SEARCH_NAME.
12362 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12363 symbol_name_match_type::FULL.
12364 * cp-support.c (cp_get_symbol_name_matcher): Handle
12365 symbol_name_match_type::SEARCH_NAME.
12366 * infrun.c (insert_exception_resume_breakpoint): Use
12367 lookup_symbol_search_name.
12368 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12369 * psymtab.c (maintenance_check_psymtabs): Use
12370 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12371 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12372 SYMBOL_SEARCH_NAME.
12373 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12374 if symbol_name_match_type::SEARCH_NAME.
12375 (lookup_symbol_in_language): Pass down
12376 symbol_name_match_type::FULL.
12377 (lookup_symbol_search_name): New.
12378 (lookup_language_this): Pass down
12379 symbol_name_match_type::SEARCH_NAME.
12380 (lookup_symbol_aux, lookup_local_symbol): New parameter
12381 'match_type'. Pass it down.
12382 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12383 (lookup_symbol_search_name): New declaration.
12384 (lookup_symbol_in_block): New 'match_type' parameter.
12386 2018-01-05 Pedro Alves <palves@redhat.com>
12389 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12391 (ada_lookup_symbol): Reimplement in terms of
12392 ada_lookup_symbol_list, bits factored out from
12393 ada_lookup_encoded_symbol.
12395 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12397 * ada-exp.y (write_object_renaming): When subscripting an array
12398 using a symbol as the index, pass the block in call to
12399 ada_lookup_encoded_symbol when looking that symbol up.
12401 2018-01-05 Jerome Guitton <guitton@adacore.com>
12403 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12406 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12408 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12409 the case where VALUE_LVAL (val0) is not lval_memory.
12411 2018-01-05 Xavier Roirand <roirand@adacore.com>
12413 * ada-valprint.c (print_optional_low_bound): Handle
12414 character-indexed array printing like boolean-indexed array
12417 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12419 * NEWS: Create a new section for the next release branch.
12420 Rename the section of the current branch, now that it has
12423 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12425 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12426 * version.in: Bump version to 8.1.50.DATE-git.
12428 2018-01-03 Xavier Roirand <roirand@adacore.com>
12430 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12432 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12434 (default_exception_support_info) <catch_handlers_sym>: Add field.
12435 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12436 (ada_exception_name_addr_1): Add "catch handlers" handling.
12437 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12438 Update all callers.
12439 (create_excep_cond_exprs) <ex>: Add parameter.
12440 (re_set_exception): Update create_excep_cond_exprs call.
12441 (print_it_exception, print_one_exception, print_mention_exception)
12442 (print_recreate_exception): Add "catch handler" handling.
12443 (allocate_location_catch_handlers, re_set_catch_handlers)
12444 (check_status_catch_handlers, print_it_catch_handlers)
12445 (print_one_catch_handlers, print_mention_catch_handlers)
12446 (print_recreate_catch_handlers): New function.
12447 (catch_handlers_breakpoint_ops): New variable.
12448 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12449 Add parameter. Add "catch handler" handling.
12450 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12451 Add "catch handler" handling.
12452 (ada_exception_catchpoint_cond_string): Add "catch handler"
12454 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12456 (catch_ada_handlers_command): New function.
12457 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12458 operations structure.
12459 (_initialize_ada_language): Add "catch handlers" command entry.
12460 * NEWS: Document "catch handlers" feature.
12462 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12464 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12465 account when creating the array type of the slice.
12466 (ada_value_slice): Likewise.
12468 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12470 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12472 (create_array_type_with_stride): Add byte_stride_prop parameter.
12473 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12474 New parameter. Update all callers in this file.
12475 (array_type_has_dynamic_stride): New function.
12476 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12477 of arrays with dynamic byte strides.
12478 * dwarf2read.c (read_array_type): Add support for dynamic
12479 DW_AT_byte_stride attributes.
12481 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12483 * dwarf2read.c (read_unspecified_type): Treat
12484 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12486 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12488 Update copyright year range in all GDB files.
12490 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12492 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12493 and gdb/testsuite/gdb.base/step-line.c.
12495 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12497 * copyright.py (main): Dump the contents of
12498 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12499 even if BY_HAND is empty.
12501 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12503 * top.c (print_gdb_version): Update Copyright year in version
12506 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12508 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12510 For older changes see ChangeLog-2017.
12516 version-control: never