1 2018-08-29 Keith Seitz <keiths@redhat.com>
3 * linespec.c (decode_compound_collector::decode_compound_collector):
4 Remove initialization for `m_symtabs'.
5 (decode_compound_collector::release_symbols): Change return type
6 to std::vector. Update all callers.
7 (class decode_compound_collector) <m_symbols>: Change type to
9 (lookup_prefix_sym): Change return type to std::vector. Update all
11 (compare_symbols): Remove.
12 (std_compare_symbols): Rename to `compare_symbols'.
13 (find_method): Change `sym_classes' parameter to std::vector.
14 Update all callers. Use std::sort to sort sym_classes.
15 (find_linespec_symbols): Remove cleanup.
17 2018-08-29 Keith Seitz <keiths@redhat.com>
19 * linespec.c (struct linespec) <minimal_symbols>: Change type to
20 std::vector. Update all users.
21 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
22 (struct collect_info) <minimal_symbols>: Likewise.
23 (compare_msymbols): Return bool. Change parameters to const
24 bound_minimal_symbol references.
25 (find_method, find_function_symbols, find_linespec_symbols): Change
26 `minsyms' parameter to std::vector. Update all callers.
28 2018-08-29 Keith Seitz <keiths@redhat.com>
30 * linespec.c (struct linespec) <label_symbols>: Change type to
31 std::vector. Update all users.
32 (find_label_symbols_in_block): Change `result' parameter to
33 std::vector. Update all callers.
34 (find_label_symbols): Return std::vector. Update all callers.
36 2018-08-29 Keith Seitz <keiths@redhat.com>
38 * linespec.c (struct linespec) <function_symbols>: Change type to
39 std::vector. Update all users.
40 (struct collect_info) <function_symbols>: Likewise.
41 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
42 (std_compare_symbols): New function.
43 (find_method, find_function_symbols, find_linespec_symbols)
44 (find_label_symbols_in_block): Change `symbols' parameter to
45 std::vector. Update all callers.
46 (find_label_symbols): Likewise for `function_symbols' and
49 2018-08-29 Keith Seitz <keiths@redhat.com>
51 * linespec.c (symtab_vector_up): Define.
52 (struct linespec) <file_symtabs>: Change type to std::vector *.
54 (struct collect_info) <file_symtabs>: Likewise.
55 (collect_symtabs_from_filename): Return symtab_vector_up.
57 (decode_objc): Remove cleanup.
58 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
59 (symtab_collector::release_symtabs): Return symtab_vector_up.
61 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
63 (collect_symtabs_from_filename, symtabs_from_filename): Return
64 symtab_vector_up. Update all callers.
66 2018-08-29 Tom Tromey <tom@tromey.com>
68 * csky-tdep.c (csky_analyze_prologue): Use
69 core_addr_to_string_nz.
71 2018-08-29 Tom Tromey <tom@tromey.com>
73 * windows-nat.c (struct xlate_exception) <them>: Change type to
75 (xlate): Fix formatting. Remove last entry.
76 (struct xlate_exception, xlate): Comment out.
77 (windows_nat_target::resume): Use ranged for.
79 2018-08-29 Jim Wilson <jimw@sifive.com>
81 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
82 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
84 (riscv_linux_nat_target::store_registers): Likewise.
86 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
90 * gnulib/aclocal.m4: Regenerate.
91 * gnulib/config.in: Regenerate.
92 * gnulib/configure: Regenerate.
93 * gnulib/import/Makefile.am: Update.
94 * gnulib/import/Makefile.in: Update.
95 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
96 * gnulib/import/_Noreturn.h: ... this.
97 * gnulib/import/alloca.in.h: Update.
98 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
99 * gnulib/import/arg-nonnull.h: ... this.
100 * gnulib/import/assure.h: Update.
101 * gnulib/import/at-func.c: Update.
102 * gnulib/import/basename-lgpl.c: Update.
103 * gnulib/import/extra/snippet/c++defs.h: Rename to...
104 * gnulib/import/c++defs.h: ... this.
105 * gnulib/import/canonicalize-lgpl.c: Update.
106 * gnulib/import/cdefs.h: Update.
107 * gnulib/import/chdir-long.c: Update.
108 * gnulib/import/chdir-long.h: Update.
109 * gnulib/import/cloexec.c: Update.
110 * gnulib/import/cloexec.h: Update.
111 * gnulib/import/close.c: Update.
112 * gnulib/import/closedir.c: Update.
113 * gnulib/import/config.charset: Update.
114 * gnulib/import/dirent-private.h: Update.
115 * gnulib/import/dirent.in.h: Update.
116 * gnulib/import/dirfd.c: Update.
117 * gnulib/import/dirname-lgpl.c: Update.
118 * gnulib/import/dirname.h: Update.
119 * gnulib/import/dosname.h: Update.
120 * gnulib/import/dup-safer-flag.c: Update.
121 * gnulib/import/dup-safer.c: Update.
122 * gnulib/import/dup.c: Update.
123 * gnulib/import/dup2.c: Update.
124 * gnulib/import/errno.in.h: Update.
125 * gnulib/import/error.c: Update.
126 * gnulib/import/error.h: Update.
127 * gnulib/import/exitfail.c: Update.
128 * gnulib/import/exitfail.h: Update.
129 * gnulib/import/extra/update-copyright: Update.
130 * gnulib/import/fchdir.c: Update.
131 * gnulib/import/fcntl.c: Update.
132 * gnulib/import/fcntl.in.h: Update.
133 * gnulib/import/fd-hook.c: Update.
134 * gnulib/import/fd-hook.h: Update.
135 * gnulib/import/fd-safer-flag.c: Update.
136 * gnulib/import/fd-safer.c: Update.
137 * gnulib/import/fdopendir.c: Update.
138 * gnulib/import/filename.h: Update.
139 * gnulib/import/filenamecat-lgpl.c: Update.
140 * gnulib/import/filenamecat.h: Update.
141 * gnulib/import/flexmember.h: Update.
142 * gnulib/import/float+.h: Update.
143 * gnulib/import/float.c: Update.
144 * gnulib/import/float.in.h: Update.
145 * gnulib/import/fnmatch.c: Update.
146 * gnulib/import/fnmatch.in.h: Update.
147 * gnulib/import/fnmatch_loop.c: Update.
148 * gnulib/import/fpucw.h: Update.
149 * gnulib/import/frexp.c: Update.
150 * gnulib/import/frexpl.c: Update.
151 * gnulib/import/fstat.c: Update.
152 * gnulib/import/fstatat.c: Update.
153 * gnulib/import/getcwd-lgpl.c: Update.
154 * gnulib/import/getcwd.c: Update.
155 * gnulib/import/getdtablesize.c: Update.
156 * gnulib/import/getlogin_r.c: Update.
157 * gnulib/import/getprogname.c: Update.
158 * gnulib/import/getprogname.h: Update.
159 * gnulib/import/gettext.h: Update.
160 * gnulib/import/gettimeofday.c: Update.
161 * gnulib/import/glob-libc.h: Update.
162 * gnulib/import/glob.c: Update.
163 * gnulib/import/glob.in.h: Update.
164 * gnulib/import/glob_internal.h: Update.
165 * gnulib/import/glob_pattern_p.c: Update.
166 * gnulib/import/globfree.c: Update.
167 * gnulib/import/hard-locale.c: Update.
168 * gnulib/import/hard-locale.h: Update.
169 * gnulib/import/intprops.h: Update.
170 * gnulib/import/inttypes.in.h: Update.
171 * gnulib/import/isnan.c: Update.
172 * gnulib/import/isnand-nolibm.h: Update.
173 * gnulib/import/isnand.c: Update.
174 * gnulib/import/isnanl-nolibm.h: Update.
175 * gnulib/import/isnanl.c: Update.
176 * gnulib/import/itold.c: Update.
177 * gnulib/import/libc-config.h: Update.
178 * gnulib/import/limits.in.h: Update.
179 * gnulib/import/localcharset.c: Update.
180 * gnulib/import/localcharset.h: Update.
181 * gnulib/import/localtime-buffer.c: Update.
182 * gnulib/import/localtime-buffer.h: Update.
183 * gnulib/import/lstat.c: Update.
184 * gnulib/import/m4/00gnulib.m4: Update.
185 * gnulib/import/m4/__inline.m4: Update.
186 * gnulib/import/m4/absolute-header.m4: Update.
187 * gnulib/import/m4/alloca.m4: Update.
188 * gnulib/import/m4/builtin-expect.m4: Update.
189 * gnulib/import/m4/canonicalize.m4: Update.
190 * gnulib/import/m4/chdir-long.m4: Update.
191 * gnulib/import/m4/close.m4: Update.
192 * gnulib/import/m4/closedir.m4: Update.
193 * gnulib/import/m4/configmake.m4: Update.
194 * gnulib/import/m4/d-ino.m4: Update.
195 * gnulib/import/m4/d-type.m4: Update.
196 * gnulib/import/m4/dirent_h.m4: Update.
197 * gnulib/import/m4/dirfd.m4: Update.
198 * gnulib/import/m4/dirname.m4: Update.
199 * gnulib/import/m4/double-slash-root.m4: Update.
200 * gnulib/import/m4/dup.m4: Update.
201 * gnulib/import/m4/dup2.m4: Update.
202 * gnulib/import/m4/eealloc.m4: Update.
203 * gnulib/import/m4/environ.m4: Update.
204 * gnulib/import/m4/errno_h.m4: Update.
205 * gnulib/import/m4/error.m4: Update.
206 * gnulib/import/m4/exponentd.m4: Update.
207 * gnulib/import/m4/exponentl.m4: Update.
208 * gnulib/import/m4/extensions.m4: Update.
209 * gnulib/import/m4/extern-inline.m4: Update.
210 * gnulib/import/m4/fchdir.m4: Update.
211 * gnulib/import/m4/fcntl-o.m4: Update.
212 * gnulib/import/m4/fcntl.m4: Update.
213 * gnulib/import/m4/fcntl_h.m4: Update.
214 * gnulib/import/m4/fdopendir.m4: Update.
215 * gnulib/import/m4/filenamecat.m4: Update.
216 * gnulib/import/m4/flexmember.m4: Update.
217 * gnulib/import/m4/float_h.m4: Update.
218 * gnulib/import/m4/fnmatch.m4: Update.
219 * gnulib/import/m4/fnmatch_h.m4: Update.
220 * gnulib/import/m4/fpieee.m4: Update.
221 * gnulib/import/m4/frexp.m4: Update.
222 * gnulib/import/m4/frexpl.m4: Update.
223 * gnulib/import/m4/fstat.m4: Update.
224 * gnulib/import/m4/fstatat.m4: Update.
225 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
226 * gnulib/import/m4/getcwd-path-max.m4: Update.
227 * gnulib/import/m4/getcwd.m4: Update.
228 * gnulib/import/m4/getdtablesize.m4: Update.
229 * gnulib/import/m4/getlogin.m4: Update.
230 * gnulib/import/m4/getlogin_r.m4: Update.
231 * gnulib/import/m4/getpagesize.m4: Update.
232 * gnulib/import/m4/getprogname.m4: Update.
233 * gnulib/import/m4/gettimeofday.m4: Update.
234 * gnulib/import/m4/glibc21.m4: Update.
235 * gnulib/import/m4/glob.m4: Update.
236 * gnulib/import/m4/glob_h.m4: Update.
237 * gnulib/import/m4/gnulib-cache.m4: Update.
238 * gnulib/import/m4/gnulib-common.m4: Update.
239 * gnulib/import/m4/gnulib-comp.m4: Update.
240 * gnulib/import/m4/gnulib-tool.m4: Update.
241 * gnulib/import/m4/hard-locale.m4: Update.
242 * gnulib/import/m4/include_next.m4: Update.
243 * gnulib/import/m4/inttypes-pri.m4: Update.
244 * gnulib/import/m4/inttypes.m4: Update.
245 * gnulib/import/m4/isnand.m4: Update.
246 * gnulib/import/m4/isnanl.m4: Update.
247 * gnulib/import/m4/largefile.m4: Update.
248 * gnulib/import/m4/limits-h.m4: Update.
249 * gnulib/import/m4/localcharset.m4: Update.
250 * gnulib/import/m4/locale-fr.m4: Update.
251 * gnulib/import/m4/locale-ja.m4: Update.
252 * gnulib/import/m4/locale-zh.m4: Update.
253 * gnulib/import/m4/localtime-buffer.m4: Update.
254 * gnulib/import/m4/longlong.m4: Update.
255 * gnulib/import/m4/lstat.m4: Update.
256 * gnulib/import/m4/malloc.m4: Update.
257 * gnulib/import/m4/malloca.m4: Update.
258 * gnulib/import/m4/math_h.m4: Update.
259 * gnulib/import/m4/mbrtowc.m4: Update.
260 * gnulib/import/m4/mbsinit.m4: Update.
261 * gnulib/import/m4/mbsrtowcs.m4: Update.
262 * gnulib/import/m4/mbstate_t.m4: Update.
263 * gnulib/import/m4/memchr.m4: Update.
264 * gnulib/import/m4/memmem.m4: Update.
265 * gnulib/import/m4/mempcpy.m4: Update.
266 * gnulib/import/m4/memrchr.m4: Update.
267 * gnulib/import/m4/mkdir.m4: Update.
268 * gnulib/import/m4/mkstemp.m4: Update.
269 * gnulib/import/m4/mmap-anon.m4: Update.
270 * gnulib/import/m4/mode_t.m4: Update.
271 * gnulib/import/m4/msvc-inval.m4: Update.
272 * gnulib/import/m4/msvc-nothrow.m4: Update.
273 * gnulib/import/m4/multiarch.m4: Update.
274 * gnulib/import/m4/nocrash.m4: Update.
275 * gnulib/import/m4/off_t.m4: Update.
276 * gnulib/import/m4/onceonly.m4: Update.
277 * gnulib/import/m4/open-cloexec.m4: Update.
278 * gnulib/import/m4/open.m4: Update.
279 * gnulib/import/m4/openat.m4: Update.
280 * gnulib/import/m4/opendir.m4: Update.
281 * gnulib/import/m4/pathmax.m4: Update.
282 * gnulib/import/m4/rawmemchr.m4: Update.
283 * gnulib/import/m4/readdir.m4: Update.
284 * gnulib/import/m4/readlink.m4: Update.
285 * gnulib/import/m4/realloc.m4: Update.
286 * gnulib/import/m4/rename.m4: Update.
287 * gnulib/import/m4/rewinddir.m4: Update.
288 * gnulib/import/m4/rmdir.m4: Update.
289 * gnulib/import/m4/save-cwd.m4: Update.
290 * gnulib/import/m4/secure_getenv.m4: Update.
291 * gnulib/import/m4/setenv.m4: Update.
292 * gnulib/import/m4/signal_h.m4: Update.
293 * gnulib/import/m4/ssize_t.m4: Update.
294 * gnulib/import/m4/stat-time.m4: Update.
295 * gnulib/import/m4/stat.m4: Update.
296 * gnulib/import/m4/std-gnu11.m4: Update.
297 * gnulib/import/m4/stdbool.m4: Update.
298 * gnulib/import/m4/stddef_h.m4: Update.
299 * gnulib/import/m4/stdint.m4: Update.
300 * gnulib/import/m4/stdio_h.m4: Update.
301 * gnulib/import/m4/stdlib_h.m4: Update.
302 * gnulib/import/m4/strchrnul.m4: Update.
303 * gnulib/import/m4/strdup.m4: Update.
304 * gnulib/import/m4/strerror.m4: Update.
305 * gnulib/import/m4/string_h.m4: Update.
306 * gnulib/import/m4/strstr.m4: Update.
307 * gnulib/import/m4/strtok_r.m4: Update.
308 * gnulib/import/m4/sys_socket_h.m4: Update.
309 * gnulib/import/m4/sys_stat_h.m4: Update.
310 * gnulib/import/m4/sys_time_h.m4: Update.
311 * gnulib/import/m4/sys_types_h.m4: Update.
312 * gnulib/import/m4/tempname.m4: Update.
313 * gnulib/import/m4/time_h.m4: Update.
314 * gnulib/import/m4/unistd-safer.m4: Update.
315 * gnulib/import/m4/unistd_h.m4: Update.
316 * gnulib/import/m4/warn-on-use.m4: Update.
317 * gnulib/import/m4/wchar_h.m4: Update.
318 * gnulib/import/m4/wchar_t.m4: Update.
319 * gnulib/import/m4/wctype_h.m4: Update.
320 * gnulib/import/m4/wint_t.m4: Update.
321 * gnulib/import/malloc.c: Update.
322 * gnulib/import/malloc/scratch_buffer.h: Update.
323 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
324 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
325 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
326 * gnulib/import/malloca.c: Update.
327 * gnulib/import/malloca.h: Update.
328 * gnulib/import/malloca.valgrind: Update.
329 * gnulib/import/math.in.h: Update.
330 * gnulib/import/mbrtowc.c: Update.
331 * gnulib/import/mbsinit.c: Update.
332 * gnulib/import/mbsrtowcs-impl.h: Update.
333 * gnulib/import/mbsrtowcs-state.c: Update.
334 * gnulib/import/mbsrtowcs.c: Update.
335 * gnulib/import/memchr.c: Update.
336 * gnulib/import/memmem.c: Update.
337 * gnulib/import/mempcpy.c: Update.
338 * gnulib/import/memrchr.c: Update.
339 * gnulib/import/mkdir.c: Update.
340 * gnulib/import/mkstemp.c: Update.
341 * gnulib/import/msvc-inval.c: Update.
342 * gnulib/import/msvc-inval.h: Update.
343 * gnulib/import/msvc-nothrow.c: Update.
344 * gnulib/import/msvc-nothrow.h: Update.
345 * gnulib/import/open.c: Update.
346 * gnulib/import/openat-die.c: Update.
347 * gnulib/import/openat-priv.h: Update.
348 * gnulib/import/openat-proc.c: Update.
349 * gnulib/import/openat.c: Update.
350 * gnulib/import/openat.h: Update.
351 * gnulib/import/opendir.c: Update.
352 * gnulib/import/pathmax.h: Update.
353 * gnulib/import/pipe-safer.c: Update.
354 * gnulib/import/rawmemchr.c: Update.
355 * gnulib/import/readdir.c: Update.
356 * gnulib/import/readlink.c: Update.
357 * gnulib/import/realloc.c: Update.
358 * gnulib/import/ref-add.sin: Update.
359 * gnulib/import/ref-del.sin: Update.
360 * gnulib/import/rename.c: Update.
361 * gnulib/import/rewinddir.c: Update.
362 * gnulib/import/rmdir.c: Update.
363 * gnulib/import/same-inode.h: Update.
364 * gnulib/import/save-cwd.c: Update.
365 * gnulib/import/save-cwd.h: Update.
366 * gnulib/import/scratch_buffer.h: Update.
367 * gnulib/import/secure_getenv.c: Update.
368 * gnulib/import/setenv.c: Update.
369 * gnulib/import/signal.in.h: Update.
370 * gnulib/import/stat-time.c: Update.
371 * gnulib/import/stat-time.h: Update.
372 * gnulib/import/stat-w32.c: Update.
373 * gnulib/import/stat-w32.h: Update.
374 * gnulib/import/stat.c: Update.
375 * gnulib/import/stdbool.in.h: Update.
376 * gnulib/import/stddef.in.h: Update.
377 * gnulib/import/stdint.in.h: Update.
378 * gnulib/import/stdio.in.h: Update.
379 * gnulib/import/stdlib.in.h: Update.
380 * gnulib/import/str-two-way.h: Update.
381 * gnulib/import/strchrnul.c: Update.
382 * gnulib/import/strdup.c: Update.
383 * gnulib/import/streq.h: Update.
384 * gnulib/import/strerror-override.c: Update.
385 * gnulib/import/strerror-override.h: Update.
386 * gnulib/import/strerror.c: Update.
387 * gnulib/import/string.in.h: Update.
388 * gnulib/import/stripslash.c: Update.
389 * gnulib/import/strnlen1.c: Update.
390 * gnulib/import/strnlen1.h: Update.
391 * gnulib/import/strstr.c: Update.
392 * gnulib/import/strtok_r.c: Update.
393 * gnulib/import/sys_stat.in.h: Update.
394 * gnulib/import/sys_time.in.h: Update.
395 * gnulib/import/sys_types.in.h: Update.
396 * gnulib/import/tempname.c: Update.
397 * gnulib/import/tempname.h: Update.
398 * gnulib/import/time.in.h: Update.
399 * gnulib/import/unistd--.h: Update.
400 * gnulib/import/unistd-safer.h: Update.
401 * gnulib/import/unistd.in.h: Update.
402 * gnulib/import/unsetenv.c: Update.
403 * gnulib/import/verify.h: Update.
404 * gnulib/import/extra/snippet/warn-on-use.h: Update.
405 * gnulib/import/wchar.in.h: Update.
406 * gnulib/import/wctype.in.h: Update.
407 * gnulib/import/xalloc-oversized.h: Update.
408 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
409 "53e2c179f26a890fa6685af4b6c1397ee370433b".
411 2018-08-16 Gary Benson <gbenson@redhat.com>
414 * gdb/main.c (captured_main_1): Exit with nonzero status
415 in batch mode if the last command to be executed failed.
416 * NEWS: Mention the above.
418 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
420 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
421 end of warning message.
423 2018-08-29 Alan Hayward <alan.hayward@arm.com>
426 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
427 (aarch64_extract_return_value): Use
428 aapcs_is_vfp_call_or_return_candidate.
429 (aarch64_return_in_memory): Likewise.
430 (aarch64_store_return_value): Likewise.
432 2018-08-29 Alan Hayward <alan.hayward@arm.com>
435 (aapcs_is_vfp_call_or_return_candidate): Make static
436 (pass_in_v_or_stack): Remove function.
437 (pass_in_v_vfp_candidate): New function.
438 (aarch64_push_dummy_call): Check for float register candidates.
440 2018-08-29 Alan Hayward <alan.hayward@arm.com>
442 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
443 (aapcs_is_vfp_call_or_return_candidate_1): New function.
444 (aapcs_is_vfp_call_or_return_candidate): Likewise.
446 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
449 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
450 (struct ipa_sym_addresses): Rename to...
451 (struct ipa_sym_addresses_common): ... this.
452 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
454 2018-08-28 Tom Tromey <tom@tromey.com>
456 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
457 (token_fifo): Now a std::vector.
458 (yylex, c_parse): Update.
459 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
460 (token_fifo): Now a std::vector.
461 (yylex, d_parse): Update.
462 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
463 (token_fifo): Now a std::vector.
464 (yylex, go_parse): Update.
466 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
468 * parser-defs.h (struct type_stack) <elements>: Change type to
469 std::vector<union type_stack_elt>.
470 <depth, size>: Remove.
471 * parse.c (parse_exp_in_context_1): Adjust.
472 (type_stack_reserve): Remove.
473 (check_type_stack_depth): Remove.
474 (insert_into_type_stack): Adjust to std::vector.
475 (insert_type): Likewise.
476 (push_type): Likewise.
477 (push_type_int): Likewise.
478 (insert_type_address_space): Likewise.
479 (pop_type): Likewise.
480 (pop_type_int): Likewise.
481 (pop_typelist): Likewise.
482 (pop_type_stack): Likewise.
483 (append_type_stack): Likewise.
484 (push_type_stack): Likewise.
485 (get_type_stack): Likewise.
486 (type_stack_cleanup): Likewise.
487 (push_typelist): Likewise.
488 (follow_types): Likewise.
489 (_initialize_parse): Likewise.
491 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
493 * NEWS: Mention csky target.
495 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
496 Hafiz Abid Qadeer <abidh@codesourcery.com>
497 Don Breazeal <donb@codesourcery.com>
499 * csky-linux-tdep.c: New file.
500 * csky-tdep.c: Likewise.
501 * csky-tdep.h: Likewise.
502 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
504 (HFILES_NO_SRCDIR): Add csky-tdep.h.
505 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
506 * configure.tgt: Add csky support.
508 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
510 * python/py-framefilter.c (py_print_frame): Print frame architecture
511 when printing on an MI output.
513 2018-08-27 Tom Tromey <tom@tromey.com>
516 * configure: Rebuild.
517 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
519 2018-08-27 Tom Tromey <tom@tromey.com>
521 * aarch64-linux-tdep.c
522 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
525 2018-08-27 Tom Tromey <tom@tromey.com>
527 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
529 (ppc64_standard_linkage1, ppc64_standard_linkage2)
530 (ppc64_standard_linkage3, ppc64_standard_linkage4)
531 (ppc64_standard_linkage5, ppc64_standard_linkage6)
532 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
535 2018-08-27 Tom Tromey <tom@tromey.com>
537 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
538 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
540 2018-08-27 Tom Tromey <tom@tromey.com>
542 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
543 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
545 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
547 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
549 * sparc-linux-tdep.c (sparc32_linux_sigframe)
550 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
551 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
553 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
554 (ppc64_linux_sigaction_tramp_frame)
555 (ppc32_linux_sighandler_tramp_frame)
556 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
557 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
558 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
559 * mn10300-linux-tdep.c (am33_linux_sigframe)
560 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
561 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
562 * mips-linux-tdep.c (mips_linux_o32_sigframe)
563 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
564 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
565 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
566 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
567 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
568 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
569 * microblaze-linux-tdep.c
570 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
571 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
572 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
573 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
574 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
575 * common/common-types.h (ULONGEST_MAX): New define.
576 (CORE_ADDR_MAX): Fix formatting.
577 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
578 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
579 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
580 (arm_linux_rt_sigreturn_tramp_frame)
581 (arm_eabi_linux_sigreturn_tramp_frame)
582 (arm_eabi_linux_rt_sigreturn_tramp_frame)
583 (thumb2_eabi_linux_sigreturn_tramp_frame)
584 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
585 (arm_linux_restart_syscall_tramp_frame)
586 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
587 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
588 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
590 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
592 2018-08-27 Tom Tromey <tom@tromey.com>
594 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
596 * mips-tdep.c (mips_deal_with_atomic_sequence)
597 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
598 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
599 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
600 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
602 * aarch64-tdep.c (aarch64_software_single_step): Use
605 2018-08-27 Tom Tromey <tom@tromey.com>
607 * linespec.c (complete_linespec_component): Add cast to "char".
608 * completer.c (completion_tracker::build_completion_result): Add
611 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
613 * solist.h (struct solist, struct target_so_ops): Fix
616 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
618 * ada-tasks.c (ada_task_info_s): Remove typedef.
619 (DEF_VEC_O(ada_task_info_s)): Remove.
620 (struct ada_tasks_inferior_data): Initialize fields.
621 <task_list>: Make an std::vector.
622 (get_ada_tasks_inferior_data): Allocate with new.
623 (ada_get_task_number): Adjust.
624 (get_task_number_from_id): Likewise.
625 (valid_task_id): Likewise.
626 (ada_get_task_info_from_ptid): Likewise.
627 (iterate_over_live_ada_tasks): Likewise.
628 (add_ada_task): Likewise.
629 (read_known_tasks): Likewise.
630 (ada_build_task_list): Likewise.
631 (print_ada_task_info): Likewise.
632 (info_task): Likewise.
633 (task_command_1): Likewise.
635 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
637 * ada-lang.c (add_angle_brackets): Return std::string.
639 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
641 * python/py-threadevent.c (py_get_event_thread): Initialize
644 2018-08-24 Pedro Alves <palves@redhat.com>
646 * python/py-bpevent.c (create_breakpoint_event_object): Use
648 * python/py-continueevent.c (emit_continue_event): Use
650 * python/py-exitedevent.c (create_exited_event_object): Return a
652 (emit_exited_event): Use copy-initialization.
653 * python/py-inferior.c (python_new_inferior)
654 (python_inferior_deleted, add_thread_object): Use
656 * python/py-infevents.c (create_inferior_call_event_object)
657 (create_register_changed_event_object)
658 (create_memory_changed_event_object): Return a gdbpy_ref<>.
659 (emit_inferior_call_event, emit_memory_changed_event)
660 (emit_register_changed_event): Use copy-initialization.
661 * python/py-newobjfileevent.c (create_new_objfile_event_object):
662 Return a gdbpy_ref<>.
663 (emit_new_objfile_event): Use copy-initialization.
664 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
665 (emit_clear_objfiles_event): Use copy-initialization.
666 * python/py-signalevent.c (create_signal_event_object): Use
668 * python/py-threadevent.c (create_thread_event_object): Use
671 2018-08-24 Pedro Alves <palves@redhat.com>
672 Simon Marchi <simon.marchi@ericsson.com>
675 * python/py-continueevent.c: Include "gdbthread.h".
676 (create_continue_event_object): Add intro comment. Add 'ptid'
677 parameter. Use it to find thread to pass to
678 create_thread_event_object.
679 (emit_continue_event): Pass PTID down to
680 create_continue_event_object.
681 * python/py-event.h (py_get_event_thread): Declare.
682 (create_thread_event_object): Remove default from 'thread'
684 * python/py-stopevent.c (create_stop_event_object): Use
686 * python/py-threadevent.c (get_event_thread): Rename to ...
687 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
688 and use it to find the thread.
689 (create_thread_event_object): Assert that THREAD isn't null.
690 Don't find the event thread here.
692 2018-08-23 Kevin Buettner <kevinb@redhat.com>
694 * block.h (blockrange, blockranges): New struct declarations.
695 (struct block): Add new field named `ranges'.
696 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
697 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
698 macros for accessing ranges in struct block.
699 (make_blockranges): New declaration.
700 block.c (make_blockranges): New function.
701 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
703 * symtab.h (find_pc_partial_function): Add new parameter `block'.
704 * blockframe.c (cache_pc_function_block): New static global.
705 (clear_pc_function_cache): Clear cache_pc_function_block.
706 (find_pc_partial_function): Move comment to symtab.h. Add
707 support for non-contiguous blocks.
708 * cli/cli-cmds.c (block.h): Include.
709 (print_disassembly): Handle printing of non-contiguous blocks.
710 (disassemble_current_function): Likewise.
711 (disassemble_command): Likewise.
713 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
715 * blockframe.c (get_pc_function_start): Likewise.
716 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
717 (gcc_symbol_address): Likewise.
718 * compile/compile-object-run.c (compile_object_run): Likewise.
719 * compile/compile.c (get_expr_block_and_pc): Likewise.
720 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
721 (func_addr_to_tail_call_list): Likewise.
722 * findvar.c (default_read_var_value): Likewise.
723 * inline-frame.c (inline_frame_this_id): Likewise.
724 (skip-inline_frames): Likewise.
725 * infcmd.c (until_next_command): Likewise.
726 * linespec.c (convert_linespec_to_sals): Likewise.
727 * parse.c (parse_exp_in_context_1): Likewise.
728 * printcmd.c (build_address_symbolic): likewise.
729 (info_address_command): Likewise.
730 symtab.c (find_function_start_sal): Likewise.
731 (skip_prologue_sal): Likewise.
732 (find_function_alias_target): Likewise.
733 (find_gnu_ifunc): Likewise.
734 * stack.c (find_frame_funname): Likewise.
735 * symtab.c (fixup_symbol_section): Likewise.
736 (find_function_start_sal): Likewise.
737 (skip_prologue_sal): Likewsie.
738 (find_function_alias_target): Likewise.
739 (find_gnu_ifunc): Likewise.
740 * tracepoint.c (info_scope_command): Likewise.
741 * value.c (value_fn_field): Likewise.
743 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
744 in place of find_pc_partial_function.
745 * blockframe.c (find_function_entry_range_from_pc): New function.
746 * symtab.h (find_function_entry_range_from_pc): Declare and document.
747 * objfiles.c (objfile_relocate1): Relocate start and end addresses
748 for each range in a block.
751 2018-08-23 Xavier Roirand <roirand@adacore.com>
753 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
756 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
758 * solib-svr4.c (read_program_headers_from_bfd): Return
759 gdb::optional<gdb::byte_vector>.
760 (svr4_exec_displacement): Adjust.
762 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
764 * solib-svr4.c (read_program_header): Return
765 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
766 (find_program_interpreter): Return
767 gdb::optional<gdb::byte_vector>.
768 (scan_dyntag_auxv): Adjust.
769 (enable_break): Adjust.
770 (svr4_exec_displacement): Adjust.
772 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
774 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
775 * inf-child.c (inf_child_target::terminal_save_inferior): New.
777 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
779 * guile/scm-string.c (gdbscm_scm_from_printf): Use
781 * guile/scm-utils.c (gdbscm_printf): Likewise.
782 * serial.c (serial_printf): Likewise.
783 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
785 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
787 * stack.c (print_frame): Print frame architecture when printing on
789 * NEWS: Mention new "arch" attribute in frame output.
791 2018-08-21 Alan Hayward <alan.hayward@arm.com>
793 * arch/aarch64.h (aarch64_regnum): Update comment.
795 2018-08-21 Alan Hayward <alan.hayward@arm.com>
797 * NEWS: Add SVE to 8.2 section.
799 2018-08-21 Pedro Alves <palves@redhat.com>
801 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
802 out from gdbscm_parse_function_args.
803 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
804 gdbscm_parse_function_args_1.
806 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
809 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
812 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
814 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
816 2018-08-19 Michael Spang <spang@google.com>
819 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
822 2018-08-18 Kevin Buettner <kevinb@redhat.com>
824 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
825 dwarf_variable_value.
826 * dwarf2-frame.c (class dwarf_expr_executor):
827 Add override for dwarf_variable_value.
828 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
829 (class symbol_needs_eval_context): Likewise.
830 (indirect_synthetic_pointer): Add forward declaration.
831 (sect_variable_value): New function.
832 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
833 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
834 for DW_OP_GNU_variable_value.
836 2018-08-16 Tom Tromey <tom@tromey.com>
838 * top.c (read_command_file): Update.
839 (command_line_input): Remove "repeat" argument.
840 * ada-lang.c (get_selections): Update.
841 * linespec.c (decode_line_2): Update.
842 * defs.h (command_line_input): Remove argument.
843 * cli/cli-script.c (read_next_line): Update.
844 * python/py-gdb-readline.c: Update.
846 2018-08-17 Tom Tromey <tom@tromey.com>
848 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
851 2018-08-15 Tom Tromey <tom@tromey.com>
853 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
855 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
857 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
858 If used, use find_pc_partial_function to find address range
860 * mi/mi-main.c (mi_cmd_list_features): Report
861 "data-disassemble-a-option" feature.
862 * NEWS: Mention new -data-disassemble option -a.
864 2018-08-13 Tom Tromey <tom@tromey.com>
866 * common/common-defs.h (_FORTIFY_SOURCE): Define.
868 2018-08-13 Alan Hayward <alan.hayward@arm.com>
870 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
871 (aarch64_linux_collect_sve_regset): Likewise.
872 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
873 * regcache.h (regcache_map_entry_size): New function.
875 2018-08-13 Alan Hayward <alan.hayward@arm.com>
877 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
878 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
879 (SVE_HEADER_VL_LENGTH): Likewise.
880 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
881 (SVE_HEADER_FLAGS_LENGTH): Likewise.
882 (SVE_HEADER_RESERVED_LENGTH): Likewise.
883 (SVE_HEADER_SIZE_OFFSET): Likewise.
884 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
885 (SVE_HEADER_VL_OFFSET): Likewise.
886 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
887 (SVE_HEADER_FLAGS_OFFSET): Likewise.
888 (SVE_HEADER_RESERVED_OFFSET): Likewise.
889 (SVE_HEADER_SIZE): Likewise.
890 (aarch64_linux_core_read_vq): Add function.
891 (aarch64_linux_core_read_description): Check for SVE section.
893 2018-08-13 Alan Hayward <alan.hayward@arm.com>
895 * aarch64-fbsd-tdep.c
896 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
898 * aarch64-linux-tdep.c
899 (aarch64_linux_iterate_over_regset_sections): Likewise.
901 (alpha_linux_iterate_over_regset_sections):
903 (alphanbsd_iterate_over_regset_sections): Likewise.
905 (amd64fbsd_iterate_over_regset_sections): Likewise.
907 (amd64_linux_iterate_over_regset_sections): Likewise.
909 (armbsd_iterate_over_regset_sections): Likewise.
911 (arm_fbsd_iterate_over_regset_sections): Likewise.
913 (arm_linux_iterate_over_regset_sections): Likewise.
914 * corelow.c (get_core_registers_cb): Likewise.
915 (core_target::fetch_registers): Likewise.
916 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
917 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
918 * gdbarch.h (void): Regenerate.
919 * gdbarch.sh: Add supply_size and collect_size.
920 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
921 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
922 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
923 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
924 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
925 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
926 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
927 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
928 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
929 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
930 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
931 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
932 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
933 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
934 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
935 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
936 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
937 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
938 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
939 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
940 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
941 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
942 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
943 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
944 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
945 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
946 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
947 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
948 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
949 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
951 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
953 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
956 2018-08-10 Keith Seitz <keiths@redhat.com>
958 * compile/compile-c-support.c (add_code_header, add_code_footer):
959 Move into policy class.
960 (c_push_user_expression, pop_user_expression_nop)
961 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
962 (compile_program): New host class.
963 (c_compile_program): New typedef.
964 (c_compute_porgram): Use c_compile_program.
966 2018-08-10 Keith Seitz <keiths@redhat.com>
968 * compile/compile-internal.h (compile_instance::~compile_instance):
969 Remove calls to htab_delete.
970 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
971 * compile.c (compile_instance::compile_instance): Initialize
972 htab unique pointers.
973 (compile_instance::get_cached_type, compile_instance::insert_type)
974 (compile_instance::error_symbol_once): Update for unique_ptr.
976 2018-08-10 Keith Seitz <keiths@redhat.com>
978 * compile/compile-c-symbols.c (struct symbol_error)
979 (hash_symbol_error, eq_symbol_error, del_symbol_error)
980 (compile_instance::insert_symbol_error)
981 (compile_instance::error_symbol_once): Move to ...
982 * compile/compile.c: ... here.
984 2018-08-10 Keith Seitz <keiths@redhat.com>
986 * compile/compile-c-support.c (c_get_compile_context): Use `new'
987 instead of `new_compile_instance'.
988 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
990 If the symbol error map is not initialized, create it.
991 (generate_c_for_for_one_symbol): Do not check/initialize
992 the symbol error map.
993 * compile/compile-c-types.c (compile_c_instance): Make a class.
995 (compile_instance::compile_instance): Initialize the type cache.
996 (get_cached_type): New function.
997 (insert_type): Update description.
998 (compile_c_instance::m_default_cflags): Define.
999 (convert_type): Update description. Use get_cached_type.
1000 (delete_instance): Moved to destructor.
1001 (new_compile_instance): Moved to constructor.
1002 * compile/compile-c.h (compile_c_instance): Make class inheriting
1003 from compile_instance.
1004 <base>: Remove field.
1005 <type_map, symbol_err_map>: Move to base class.
1006 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1007 * compile/compile-internal.h (compile_instance): Make class.
1008 <type_map_t, symbol_err_map_t>: Define.
1009 <fe>: Rename to `m_gcc_fe'.
1010 <scope, block, gcc_target_options>: Add `m_' prefix.
1011 <m_type_map, m_symbol_err_map>: New fields, moved from
1014 (convert_type, new_compile_instance): Remove.
1015 * compile/compile.c (cleanup_compile_instance): Remove.
1016 (compile_to_object): Use unique_ptr to eliminate cleanups.
1017 (compile_instance::set_print_callback, compile_instance::version)
1018 (compile_instance::set_verbose)
1019 (compile_instance::set_driver_filename)
1020 (compile_instance::set_triplet_regexp)
1021 (compile_instance::set_arguments)
1022 (compile_instance::set_source_file)
1023 (compile_instance::compile): Define.
1025 2018-08-10 Keith Seitz <keiths@redhat.com>
1027 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1028 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1029 gcc-c-fe.def to define C plugin.
1030 (delete_instance): Delete `c_plugin'.
1031 (new_compile_instance): Initialize `c_plugin'.
1032 * compile/compile-c.h: Include gcc_c_plugin.h.
1033 (struct compile_c_instance) <c_plugin>: New member.
1034 * gcc-c-plugin.h: New file.
1035 Update all callers with API change.
1037 2018-08-10 Keith Seitz <keiths@redhat.com>
1039 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1040 (HFILES_NO_SRCDIR): ... to here.
1041 Add compile-internal.h and compile-c.h.
1042 * compile/compile-c-support.c: Include compile-c.h.
1043 * compile/compile-c-symbols.c: Include compile-c.h.
1044 (generate_c_for_variable_locations): Update comment.
1045 * compile/compile-c-types.c: Include compile-c.h.
1046 * compile/compile-c.h: New file -- moved C language declarations
1047 from other files here.
1048 * compile/compile-internal.h: Do not include hashtab.h or
1049 common/enum-flags.h.
1050 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1051 (gcc_convert_symbol, gcc_symbol_address)
1052 (generate_c_for_variable_locations, c_get_mode_for_size)
1053 (c_get_range_decl_name): Definitions moved to compile-c.h.
1054 * compile/compile-loc2c.c: Include compile-c.h.
1056 2018-08-10 Keith Seitz <keiths@redhat.com>
1058 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1059 (c_symbol_substitution_name): ... this.
1062 2018-08-10 Keith Seitz <keiths@redhat.com>
1064 * compile/compile-c-support.c (c_compute_program): Use
1065 unique_xmalloc_ptr to eliminate cleanup.
1066 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1067 Return a unique_xmalloc_ptr and eliminate cleanup.
1068 * compile/compile-internal.h (generate_c_for_variable_locations):
1069 Return unique_xmalloc_ptr and update description.
1071 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1073 * corelow.c (core_target::get_core_register_section): Rename
1074 min_size to section_min_size.
1076 2018-08-09 Jim Wilson <jimw@sifive.com>
1078 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1079 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1080 * NEWS: Mention new GNU/Linux RISC-V target.
1081 * configure.host: Add riscv*-*-linux*.
1082 * configure.nat: Add riscv*.
1083 * configure.tgt: Add riscv*-*-linux*.
1084 * riscv-linux-nat.c: New file.
1085 * riscv-linux-tdep.c: New file.
1087 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1089 * infrun.c (resume): Make static, add forward declaration.
1090 (proceed): Update header comment.
1091 * infrun.h (resume): Delete declaration.
1093 2018-08-09 Tom Tromey <tom@tromey.com>
1095 * riscv-tdep.h: Minor formatting fixes.
1097 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1099 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1100 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1101 (test_mkdir_recursive): Likewise.
1102 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1104 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1106 * valarith.c (value_subscripted_rvalue): If an array is not in
1107 memory, and we don't know the upper bound, then we can't know that
1108 the requested element exists or not.
1110 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1112 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1113 (target_options_to_string): Add comment.
1115 2018-08-08 Tom Tromey <tom@tromey.com>
1117 * unittests/scoped_mmap-selftests.c: Check result of "write".
1119 2018-08-08 Jim Wilson <jimw@sifive.com>
1121 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1122 (decode_register_index_short): New.
1123 (decode_j_type_insn, decode_cj_type_insn): New.
1124 (decode_b_type_insn, decode_cb_type_insn): New.
1125 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1126 local xlen. Check xlen when decoding ambiguous compressed insns. In
1127 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1128 is_c_sw_insn instead of is_sw_insn.
1129 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1130 (riscv_software_single_step): New.
1131 * riscv-tdep.h (riscv_software_single_step): Declare.
1133 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1134 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1136 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1139 * target.c (dispose_inferior): Don't dispose of inferiors that are
1142 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1144 * remote.c (remote_target::download_tracepoint): Change char* to
1147 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1149 * target.h (target_options_to_string): Return an std::string.
1150 * target.c (str_comma_list_concat_elem): Return void, use
1152 (do_option): Likewise.
1153 (target_options_to_string): Return an std::string.
1154 * linux-nat.c (linux_nat_target::wait): Adjust.
1155 * target-debug.h (target_debug_print_options): Adjust.
1157 2018-08-07 Tom Tromey <tom@tromey.com>
1159 * Makefile.in (CPPFLAGS): New variable.
1160 (INTERNAL_CPPFLAGS): Use it.
1162 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1164 * NEWS: Mention the index cache.
1166 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1168 * common/pathstuff.h (get_standard_cache_dir): New.
1169 * common/pathstuff.c (get_standard_cache_dir): New.
1170 * build-id.h (build_id_to_string): New.
1171 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1172 DEBUG_STR_SUFFIX): Move to here.
1173 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1174 DEBUG_STR_SUFFIX): Move from there.
1175 (write_psymtabs_to_index): Make non-static, add basename
1176 parameter. Write to temporary files, rename when done.
1177 (save_gdb_index_command): Adjust call to
1178 write_psymtabs_to_index.
1179 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1181 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1182 (get_gdb_index_contents_from_cache): New.
1183 (get_gdb_index_contents_from_cache_dwz): New.
1184 (dwarf2_initialize_objfile): Read index from cache.
1185 (dwarf2_build_psymtabs): Save to index.
1186 * dwarf-index-cache.h: New file.
1187 * dwarf-index-cache.c: New file.
1188 * dwarf-index-write.h: New file.
1190 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1192 * gnulib/aclocal.m4: Re-generate.
1193 * gnulib/config.in: Re-generate.
1194 * gnulib/configure: Re-generate.
1195 * gnulib/import/Makefile.am: Re-generate.
1196 * gnulib/import/Makefile.in: Re-generate.
1197 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1198 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1199 * gnulib/import/m4/mkdir.m4: New file.
1200 * gnulib/import/mkdir.c: New file.
1201 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1204 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1206 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1207 * common/scoped_mmap.c: New file.
1208 * common/scoped_mmap.h (destroy): New method.
1209 (~scoped_mmap, reset): Use destroy.
1210 (scoped_mmap): New move constructor.
1211 (mmap_file): New declaration.
1212 * unittests/scoped_mmap-selftests.c (test_normal,
1213 test_invalid_filename, run_tests): New functions.
1214 (_initialize_scoped_mmap_selftests): Register selftest.
1216 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1218 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1219 (read_gdb_index_from_buffer): ... this. Remove section
1220 parameter, add buffer parameter.
1221 (get_gdb_index_contents_ftype,
1222 get_gdb_index_contents_dwz_ftype): New typedefs.
1223 (dwarf2_read_gdb_index): Add callback parameters to get the
1225 (get_gdb_index_contents_from_section): New.
1226 (dwarf2_initialize_objfile): Update call to
1227 dwarf2_read_gdb_index.
1229 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1231 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1232 (gdb_open_cloexec): Likewise.
1233 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1234 (commandline_from_pid): Likewise.
1235 (linux_xfer_osdata_threads): Likewise.
1236 (linux_xfer_osdata_fds): Likewise.
1237 * ada-lang.c (is_package_name): Likewise.
1238 * auxv.c (procfs_xfer_auxv): Likewise.
1239 * breakpoint.c (print_one_breakpoint_location): Use
1241 (print_one_catch_solib): Use string_printf.
1242 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1243 (add_pe_forwarded_sym): Likewise.
1244 * dwarf2read.c (create_type_unit_group): Likewise.
1245 (build_error_marker_type): Likewise.
1246 * infcall.c (get_function_name): Likewise.
1247 * valprint.c (print_converted_chars_to_obstack): Likewise.
1248 * xtensa-tdep.c (xtensa_register_type): Likewise.
1250 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1252 * remote.c (remote_target::download_tracepoint): Fix format
1255 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1257 * tracefile.c: Include common/byte-vector.h.
1258 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1259 with trace_regblock_size if needed. Update uses of buf.
1261 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1263 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1264 std::vector<unsigned char>.
1265 * tracepoint.c (collection_list::collection_list): Remove
1266 m_regs_mask initializer from initializer list. Resize
1267 m_regs_mask using the largest remote register number.
1268 (collection_list::add_remote_register): Remove size check on
1269 m_regs_mask. Use at to access element.
1270 (collection_list::stringify): Change type of temp_buf to
1271 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1272 stringify the register mask. Use pack_hex_byte for the register
1275 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1277 * tracepoint.h (class collection_list) <add_register>: Remove.
1278 <add_remote_register, add_ax_registers, add_local_register>:
1280 <add_memrange>: Add scope parameter.
1281 * tracepoint.c (encode_actions_1): Likewise.
1282 (collection_list::add_register): Rename to ...
1283 (collection_list::add_remote_register): ... this. Update
1285 (collection_list::add_ax_registers, add_local_register): New
1287 (collection_list::add_memrange): Add scope parameter. Call
1288 add_local_register instead of add_register.
1289 (finalize_tracepoint_aexpr): New function.
1290 (collection_list::collect_symbol): Update calls to add_memrange.
1291 Call add_local_register instead of add_register. Call
1292 add_ax_registers. Call finalize_tracepoint_aexpr.
1293 (encode_actions_1): Get remote regnos for $reg action. Call
1294 add_remote_register, add_ax_registers, and add_local_register.
1295 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1296 (validate_actionline): Call finalize_tracepoint_aexpr.
1298 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1300 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1301 Replace array buf with gdb::char_vector buf, of size
1302 get_remote_packet_size (). Replace references to buf and
1303 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1304 and xsnprintf with snprintf. Raise errors if the buffer is too
1307 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1309 * remote.c (remote_target::download_tracepoint): Fix the has_more
1310 predicate in the QTDP action list iteration.
1312 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1314 * remote.c (remote_target::download_tracepoint): Fix indentation
1317 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1319 * proc-api.c (_initialize_proc_api): Remove c, unused.
1320 * procfs.c (procfs_init_inferior): Remove signals, unused.
1321 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1324 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1325 Andrew Burgess <andrew.burgess@embecosm.com>
1327 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1328 'W_STOPCODE (0)' as this could be ambiguous.
1330 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1332 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1333 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1336 2018-08-02 Tom Tromey <tom@tromey.com>
1339 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1341 (process_structure_scope): Likewise.
1343 2018-08-02 Xavier Roirand <roirand@adacore.com>
1346 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1349 2018-08-02 Tom Tromey <tom@tromey.com>
1351 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1352 (darwin_suspend_inferior, darwin_resume_inferior)
1353 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1354 (darwin_check_new_threads): Check result of get_darwin_inferior.
1356 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1360 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1362 * varobj.c (varobj_get_path_expr_parent): Report an error if
1363 parent is a dynamic varobj.
1365 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1367 * gnulib/aclocal.m4: Re-generate.
1368 * gnulib/config.in: Re-generate.
1369 * gnulib/configure: Re-generate.
1370 * gnulib/import/Makefile.in: Re-generate.
1371 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1372 * gnulib/import/m4/onceonly.m4: Re-generate.
1374 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1376 * target-descriptions.c (struct xml_test_tdesc): New.
1377 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1378 (record_xml_tdesc): Update.
1379 (maintenance_check_xml_descriptions): Update.
1380 * target-descriptions.h (record_xml_tdesc): Update comment.
1382 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1384 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1385 checking array bounds are defined.
1387 2018-07-30 Tom Tromey <tom@tromey.com>
1389 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1390 irreflexivity violation.
1392 2018-07-30 Tom Tromey <tom@tromey.com>
1394 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1395 * value.c (unpack_long): Remove lint code.
1396 * valops.c (value_ind): Remove lint code.
1397 * valarith.c (value_x_binop, value_x_unop, value_equal)
1398 (value_pos): Remove lint code.
1400 2018-07-28 Tom de Vries <tdevries@suse.de>
1402 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1403 with undefined upper bound as <optimized out>.
1405 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1407 * gcore.in: Rename variable "name" to "prefix". Expand
1410 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1412 * windows-nat.c (windows_nat_target::create_inferior): Update to
1413 call close() in global namespace.
1415 2018-07-26 Tom Tromey <tom@tromey.com>
1417 * dwarf-index-write.c (add_address_entry): Don't add objfile
1419 * dbxread.c (find_stab_function): Rename from
1420 find_stab_function_addr. Return a bound_minimal_symbol.
1421 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1422 Don't add objfile offsets.
1423 (end_psymtab): Use raw_text_low, raw_text_high,
1424 MSYMBOL_VALUE_RAW_ADDRESS.
1425 (read_ofile_symtab): Update.
1426 (process_one_symbol): Update.
1427 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1429 (dw2_relocate): Remove.
1430 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1432 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1434 (process_psymtab_comp_unit_reader, add_partial_symbol)
1435 (add_partial_subprogram, dwarf2_ranges_read): Update.
1436 (load_partial_dies): Update.
1437 (add_address_entry): Don't add objfile offsets.
1438 (dwarf2_build_include_psymtabs): Update.
1439 (create_addrmap_from_aranges): Don't add objfile offsets.
1440 (dw2_find_pc_sect_compunit_symtab): Update.
1441 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1442 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1444 (parse_partial_symbols): Don't add objfile offsets. Use
1445 raw_text_low, raw_text_high. Update.
1446 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1447 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1448 or call 'relocate' quick function. Clear psymbol_map.
1449 * psympriv.h (struct partial_symbol) <address>: Add section
1451 <set_unrelocated_address>: Rename from set_address.
1452 <raw_text_low, raw_text_high>: New methods.
1453 <text_low, text_high>: Add objfile parameter.
1454 (add_psymbol_to_bcache): Add 'section' parameter. Call
1455 set_unrelocated_address.
1456 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1457 (find_pc_psymbol): Update.
1458 (fixup_psymbol_section, relocate_psymtabs): Remove.
1459 (dump_psymtab, psym_functions): Update.
1460 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1462 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1463 (start_psymtab_common): Update.
1464 * symfile-debug.c (debug_qf_relocate): Remove.
1465 (debug_sym_quick_functions): Update.
1466 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1467 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1470 2018-07-26 Tom Tromey <tromey@redhat.com>
1472 * dbxread.c (end_psymtab): Use text_high_valid and
1474 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1475 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1476 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1478 <text_low_valid, text_high_valid>: New fields.
1479 <set_text_low, set_text_high>: Update.
1480 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1482 2018-07-26 Tom Tromey <tom@tromey.com>
1484 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1486 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1487 textlow and texthigh fields.
1488 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1490 * mdebugread.c (parse_lines, parse_partial_symbols)
1491 (psymtab_to_symtab_1): Update.
1492 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1493 Rename fields. Update comment. Now private.
1494 <text_low, text_high, set_text_low, set_text_high>: New methods.
1495 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1496 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1497 (start_psymtab_common, maintenance_info_psymtabs)
1498 (maintenance_check_psymtabs): Update.
1499 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1501 (scan_xcoff_symtab): Update.
1503 2018-07-26 Tom Tromey <tromey@redhat.com>
1505 * psympriv.h (struct partial_symbol) <unrelocated_address,
1506 address, set_address>: New methods.
1507 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1508 (fixup_psymbol_section, relocate_psymtabs): Update.
1509 (print_partial_symbols): Add 'objfile' parameter. Update.
1510 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1513 2018-07-26 Tom Tromey <tom@tromey.com>
1515 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1516 (debug_names::write_psymbols): Update.
1517 * psympriv.h (struct partial_symbol): Derive from
1518 general_symbol_info.
1519 <obj_section>: New method.
1520 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1521 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1522 (find_pc_sect_psymbol, fixup_psymbol_section)
1523 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1524 (print_partial_symbols, recursively_search_psymtabs)
1525 (compare_psymbols, psymbol_hash, psymbol_compare)
1526 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1527 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1529 2018-07-26 Tom Tromey <tromey@redhat.com>
1531 * dbxread.c (end_psymtab): Remove dead code.
1533 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1535 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1536 DWARF unwinders are disabled.
1537 * dwarf2-frame.c: Add dwarf2read.h include.
1538 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1540 (dwarf2_frame_unwinders_enabled_p): Define.
1541 (show_dwarf_unwinders_enabled_p): New function.
1542 (_initialize_dwarf2_frame): Register switch to control DWARF
1544 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1545 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1546 (show_dwarf_cmdlist): Remove static keyword.
1547 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1548 (show_dwarf_cmdlist): Declare.
1549 * NEWS: Document new feature.
1551 2018-07-26 Tom de Vries <tdevries@suse.de>
1553 PR breakpoints/23366
1554 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1556 2018-07-26 Tom de Vries <tdevries@suse.de>
1558 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1559 DW_AT_count can't be translated to a dynamic prop.
1561 2018-07-25 Tom de Vries <tdevries@suse.de>
1563 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1566 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1568 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1570 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1572 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1574 2018-07-24 Keith Seitz <keiths@redhat.comt
1577 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1578 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1579 instead of add_symbol_to_list.
1580 (read_file_scope): Call prepare_one_comp_unit before reading
1583 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1585 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1587 2018-07-24 Tom Tromey <tom@tromey.com>
1589 * utils.c (malloc, realloc, free): Don't declare.
1590 * configure, config.in: Rebuild.
1591 * configure.ac: Don't check for declarations of free, malloc, or
1594 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1596 * aarch64-linux-nat.c
1597 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1599 * arm-linux-nat.c (fetch_regs): Likewise.
1600 (store_regs): Likewise.
1601 (fetch_vfp_regs): Likewise.
1602 (store_vfp_regs): Likewise.
1603 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1604 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1605 (arm_linux_nat_target::insert_watchpoint): Likewise.
1606 (arm_linux_nat_target::remove_watchpoint): Likewise.
1607 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1609 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1611 * ppc-linux-nat.c (fetch_register): Likewise.
1612 (fetch_all_gp_regs): Likewise.
1613 (fetch_ppc_registers): Likewise.
1614 (store_all_gp_regs): Likewise.
1615 (store_ppc_registers): Likewise.
1616 (hwdebug_insert_point): Likewise.
1617 (can_use_watchpoint_cond_accel): Likewise.
1618 * remote-sim.c (gdb_os_write_stdout): Likewise.
1620 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1621 Tom Tromey <tom@tromey.com>
1623 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1625 * configure: Rebuild.
1627 2018-07-22 Tom Tromey <tom@tromey.com>
1629 * regformats/regdat.sh: Define xmltarget_${name} inside
1630 #ifndef IN_PROCESS_AGENT.
1632 2018-07-22 Tom Tromey <tom@tromey.com>
1634 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1636 2018-07-22 Tom Tromey <tom@tromey.com>
1638 * symfile.c (reread_symbols): Notify iter, not objfile.
1640 2018-07-22 Tom Tromey <tom@tromey.com>
1642 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1644 (ravenscar_thread_target::prepare_to_store): Likewise.
1646 2018-07-22 Tom Tromey <tom@tromey.com>
1648 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1649 unused variable. Call value_fetch_lazy when needed.
1650 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1651 Remove unused variable. Call value_fetch_lazy when needed.
1653 2018-07-22 Tom Tromey <tom@tromey.com>
1655 * m32c-tdep.c (mark_dma): Return void.
1656 (make_regs): Remove unused declarations.
1658 2018-07-22 Tom Tromey <tom@tromey.com>
1660 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1661 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1662 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1663 bkscm_get_valid_block_smob_arg_unsafe for effect.
1665 2018-07-22 Tom Tromey <tom@tromey.com>
1667 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1670 2018-07-22 Tom Tromey <tom@tromey.com>
1672 * windows-nat.c (saved_context): Conditionally define.
1673 * remote.c (remote_target::remote_btrace_maybe_reopen):
1674 Conditionally declare "warned".
1675 * inflow.c (sigquit_ours): Conditionally define.
1676 (new_tty): Move "tty" declaration inside #if.
1677 * guile/guile.c (guile_datadir): Conditionally define.
1678 * charset.c (set_be_le_names): Move some declarations inside #if.
1679 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1681 (parse_xml_btrace_conf): Likewise.
1683 2018-07-22 Tom Tromey <tom@tromey.com>
1685 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1687 2018-07-22 Tom Tromey <tom@tromey.com>
1689 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1690 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1691 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1692 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1693 * stack.c (frame_apply_level_command): Remove unused variable.
1694 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1695 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1696 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1698 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1699 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1700 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1702 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1703 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1705 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1706 Remove unused variable.
1707 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1709 * common/tdesc.c (print_xml_feature::visit): Remove unused
1711 * compile/compile-object-load.c (store_regs): Remove unused
1713 * complaints.c (clear_complaints): Remove unused variable.
1714 * corelow.c (core_target_open): Remove unused variable.
1715 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1717 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1719 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1721 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1723 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1725 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1727 * ia64-tdep.c (examine_prologue): Remove unused variable.
1728 * infcall.c (run_inferior_call): Remove unused variable.
1729 * inferior.c (exit_inferior): Remove unused variable.
1730 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1731 * linespec.c (decode_line_2): Remove unused variable.
1732 * linux-nat.c (super_close): Remove.
1733 * linux-tdep.c (linux_info_proc): Remove unused variable.
1734 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1735 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1736 Remove unused variable.
1737 * parse.c (find_minsym_type_and_address): Remove unused variable.
1738 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1740 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1742 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1744 * record-btrace.c (record_btrace_target::store_registers): Remove
1746 (cmd_show_record_btrace_cpu): Remove unused variable.
1747 * riscv-tdep.c (riscv_register_reggroup_p)
1748 (riscv_push_dummy_call, riscv_return_value): Remove unused
1750 * rust-exp.y (literal): Remove unused variable.
1751 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1753 <STRUCTOP_ANONYMOUS>: Likewise.
1754 * s390-linux-tdep.c (s390_linux_init_abi_31)
1755 (s390_linux_init_abi_64): Remove unused variable.
1756 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1757 (file_select_thread, net_windows_open, _initialize_ser_windows):
1758 Remove unused variables.
1759 * symtab.c (find_pc_sect_line): Remove unused variable.
1760 * target-memory.c (compute_garbled_blocks): Remove unused
1762 (target_write_memory_blocks): Remove unused variable.
1763 * target.c (target_stack::unpush): Remove unused variables.
1764 * tracepoint.c (start_tracing, all_tracepoint_actions)
1765 (merge_uploaded_trace_state_variables)
1766 (print_one_static_tracepoint_marker): Remove unused variable.
1767 * unittests/basic_string_view/element_access/char/1.cc (test01):
1768 Remove unused variable.
1769 * windows-nat.c (windows_continue, windows_add_all_dlls)
1770 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1771 Remove unused variables.
1773 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1775 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1776 attr_profile in HAVE_ELF.
1777 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1780 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1782 * frame.c (frame_register_unwind): Change parameter name.
1783 (frame_unwind_register): Likewise.
1784 (frame_unwind_register_value): Likewise.
1785 (frame_unwind_register_signed): Likewise.
1786 (frame_unwind_register_unsigned): Likewise.
1787 * frame.h (frame_register_unwind): Likewise.
1788 (frame_unwind_register): Likewise.
1789 (frame_unwind_register_value): Likewise.
1790 (frame_unwind_register_signed): Likewise.
1791 (frame_unwind_register_unsigned): Likewise.
1792 (frame_unwind_arch): Likewise.
1794 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1796 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1799 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1801 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1802 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1805 2018-07-20 Keith Seitz <keiths@redhat.com>
1807 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1808 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1809 m_compunit_symtab, m_language>: Add "m_" prefix.
1811 * buildsym.c: Update all uses.
1813 2018-07-20 Tom Tromey <tom@tromey.com>
1815 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1816 * buildsym.h (record_line_ftype): Remove typedef.
1818 2018-07-20 Tom Tromey <tom@tromey.com>
1820 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1821 (end_expandable_symtab): Likewise.
1822 (end_symtab_get_static_block): Likewise.
1823 (end_symtab_from_static_block): Likewise.
1824 * buildsym-legacy.c (augment_type_symtab): Remove.
1825 (end_expandable_symtab): Remove.
1826 (end_symtab_get_static_block): Remove.
1827 (end_symtab_from_static_block): Remove.
1829 2018-07-20 Tom Tromey <tom@tromey.com>
1831 * dwarf2read.c: Include buildsym.h.
1832 (struct dwarf2_cu) <builder>: New method.
1833 (fixup_go_packaging): Update.
1834 (process_full_comp_unit, process_full_type_unit): Update. Don't
1835 use scoped_free_pendings.
1836 (using_directives): Add "cu" parameter, remove "language".
1837 (read_import_statement, setup_type_unit_groups, )
1838 (read_func_scope, read_lexical_block_scope)
1839 (dwarf2_record_block_ranges, read_namespace): Update.
1840 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1841 (lnp_state_machine::handle_end_sequence): Update.
1842 (class lnp_state_machine) <m_cu>: New member.
1843 <m_record_line_callback>: Remove.
1844 <m_currently_recording_lines>: New member.
1845 (lnp_state_machine::handle_set_file): Update.
1846 (noop_record_line): Remove.
1847 (dwarf_record_line_p): Add cu parameter.
1848 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1849 (lnp_state_machine::record_line)
1850 (lnp_state_machine::lnp_state_machine)
1851 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1852 (dwarf_decode_lines): Update.
1853 (dwarf2_start_subfile): Add cu parameter.
1854 (dwarf2_start_symtab, new_symbol): Update.
1855 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1856 Remove dwarf2_per_objfile parameter.
1857 (dwarf_decode_macros): Update.
1859 2018-07-20 Tom Tromey <tom@tromey.com>
1861 * stabsread.c (define_symbol): Update.
1862 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1863 * dwarf2read.c (new_symbol): Update.
1864 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1865 * cp-namespace.c: Include buildsym.h.
1866 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1867 * buildsym-legacy.c (get_buildsym_compunit): New function.
1869 2018-07-20 Tom Tromey <tom@tromey.com>
1871 * xcoffread.c: Include buildsym-legacy.h.
1872 * windows-nat.c: Include buildsym-legacy.h.
1873 * stabsread.c: Include buildsym-legacy.h.
1874 * mdebugread.c: Include buildsym-legacy.h.
1875 * buildsym-legacy.h: New file.
1876 * buildsym-legacy.c: New file, from buildsym.c.
1877 * go32-nat.c: Include buildsym-legacy.h.
1878 * dwarf2read.c: Include buildsym-legacy.h.
1879 * dbxread.c: Include buildsym-legacy.h.
1880 * cp-namespace.c: Include buildsym-legacy.h.
1881 * coffread.c: Include buildsym-legacy.h.
1882 * buildsym.h: Move some contents to buildsym-legacy.h.
1883 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1885 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1887 2018-07-20 Tom Tromey <tom@tromey.com>
1889 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1890 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1891 (buildsym_compunit::buildsym_compunit)
1892 (buildsym_compunit::~buildsym_compunit)
1893 (buildsym_compunit::get_macro_table): Define.
1895 2018-07-20 Tom Tromey <tom@tromey.com>
1897 * buildsym.c (reset_symtab_globals): Remove.
1898 (buildsym_compunit::end_symtab_from_static_block): Update.
1899 (buildsym_compunit::augment_type_symtab): Update.
1900 (end_symtab_from_static_block): Call free_buildsym_compunit.
1901 (augment_type_symtab, end_symtab, end_expandable_symtab):
1904 2018-07-20 Tom Tromey <tom@tromey.com>
1906 * arch-utils.c: Do not include buildsym.h.
1907 * mipsread.c: Do not include buildsym.h.
1908 * machoread.c: Do not include buildsym.h.
1909 * elfread.c: Do not include buildsym.h.
1911 2018-07-20 Tom Tromey <tom@tromey.com>
1913 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1915 (buildsym_compunit): Add new constructor.
1916 (struct buildsym_compunit) <get_last_source_file, finish_block,
1917 record_block_range, start_subfile, patch_subfile_names,
1918 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1919 set_last_source_start_addr, get_last_source_start_addr,
1920 get_local_using_directives, set_local_using_directives,
1921 get_global_using_directives, outermost_context_p,
1922 get_current_context_stack, get_context_stack_depth,
1923 get_current_subfile, get_local_symbols, get_file_symbols,
1924 get_global_symbols, record_debugformat, record_producer,
1925 push_context, pop_context, end_symtab_get_static_block,
1926 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1928 <record_pending_block, finish_block_internal, make_blockvector,
1929 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1933 2018-05-22 Tom Tromey <tom@tromey.com>
1935 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1937 (finish_block_internal): Update.
1939 2018-07-20 Tom Tromey <tom@tromey.com>
1941 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1943 (finish_block_internal): Update.
1945 2018-07-20 Tom Tromey <tom@tromey.com>
1947 * buildsym.h (EXTERN): Don't define or undef.
1948 * buildsym.c (EXTERN): Don't define.
1950 2018-07-20 Tom Tromey <tom@tromey.com>
1952 * buildsym.c: Remove TODO comment.
1954 2018-07-20 Tom Tromey <tom@tromey.com>
1956 * coffread.c (coff_symtab_read): Update.
1957 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1958 (xcoff_new_init): Update.
1959 * mipsread.c (mipscoff_new_init): Update.
1960 * mdebugread.c (mdebug_build_psymtabs): Update.
1961 * elfread.c (elf_new_init): Update.
1962 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1964 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1965 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1966 (stabsect_build_psymtabs): Update.
1967 * buildsym.h (buildsym_init): Don't declare.
1968 * buildsym.c: Update comment.
1969 (prepare_for_building): Remove.
1970 (start_symtab, restart_symtab): Update.
1971 (reset_symtab_globals): Update comment.
1972 (buildsym_init): Remove.
1974 2018-07-20 Tom Tromey <tom@tromey.com>
1976 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1977 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1978 (read_enum_type, common_block_start, common_block_end)
1979 (cleanup_undefined_types_1, finish_global_stabs): Update.
1980 * mdebugread.c (psymtab_to_symtab_1): Update.
1981 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1982 (read_lexical_block_scope, new_symbol): Update.
1983 * dbxread.c (process_one_symbol): Update.
1984 * coffread.c (coff_symtab_read, process_coff_symbol)
1985 (coff_read_enum_type): Update.
1986 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1988 (get_local_symbols, get_file_symbols, get_global_symbols): New
1990 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1992 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1993 (~scoped_free_pendings): Update.
1994 (finish_block, prepare_for_building, reset_symtab_globals)
1995 (end_symtab_get_static_block, end_symtab_with_blockvector)
1996 (augment_type_symtab, push_context): Update.
1997 (get_local_symbols, get_file_symbols, get_global_symbols): New
1999 (buildsym_init): Update.
2001 2018-07-20 Tom Tromey <tom@tromey.com>
2003 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2004 (process_full_type_unit): Likewise.
2005 (dwarf2_start_symtab): Set list_in_scope.
2007 2018-07-20 Tom Tromey <tom@tromey.com>
2009 * dwarf2read.c (process_psymtab_comp_unit_reader)
2010 (build_type_psymtabs_reader): Do not set list_in_scope.
2012 2018-07-20 Tom Tromey <tom@tromey.com>
2014 * buildsym.c (free_pendings): Remove.
2015 (add_symbol_to_list, scoped_free_pendings)
2016 (finish_block_internal, buildsym_init): Update.
2018 2018-07-20 Tom Tromey <tom@tromey.com>
2020 * xcoffread.c (read_xcoff_symtab): Update.
2021 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2023 * dbxread.c (process_one_symbol): Update.
2024 * coffread.c (coff_symtab_read): Update.
2025 * buildsym.h (finish_block): Update.
2026 * buildsym.c (finish_block): Remove "listhead" argument.
2027 (end_symtab_get_static_block): Update.
2029 2018-07-20 Tom Tromey <tom@tromey.com>
2031 * buildsym.h (class scoped_free_pendings): Remove constructor.
2032 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2034 <m_pending_block_obstack, m_pending_blocks>: New members.
2035 (pending_block_obstack, pending_blocks): Remove.
2036 (scoped_free_pendings::scoped_free_pendings): Default.
2037 (~scoped_free_pendings): Update.
2038 (free_pending_blocks): Remove.
2039 (finish_block_internal, record_pending_block, make_blockvector)
2040 (end_symtab_get_static_block, augment_type_symtab, push_context)
2041 (buildsym_init): Update.
2043 2018-07-20 Tom Tromey <tom@tromey.com>
2045 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2046 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2048 (pending_addrmap, pending_addrmap_obstack)
2049 (pending_addrmap_interesting): Remove.
2050 (scoped_free_pendings, record_block_range, make_blockvector)
2051 (prepare_for_building, reset_symtab_globals, buildsym_init):
2054 2018-07-20 Tom Tromey <tom@tromey.com>
2056 * xcoffread.c (process_linenos): Update.
2057 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2058 * mdebugread.c (psymtab_to_symtab_1): Update.
2059 * dwarf2read.c (setup_type_unit_groups)
2060 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2061 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2062 * dbxread.c (process_one_symbol): Update.
2063 * coffread.c (coff_symtab_read, enter_linenos)
2064 (process_coff_symbol): Update.
2065 * buildsym.h (current_subfile): Don't declare.
2066 (get_current_subfile): Declare.
2067 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2069 (start_subfile, free_buildsym_compunit, push_subfile)
2070 (prepare_for_building, start_symtab): Update.
2071 (get_current_subfile): New function.
2073 2018-07-20 Tom Tromey <tom@tromey.com>
2075 * coffread.c (coff_symtab_read): Update.
2076 * xcoffread.c (read_xcoff_symtab): Update.
2077 * dwarf2read.c (new_symbol): Update.
2078 (read_func_scope, read_lexical_block_scope): Update.
2079 * dbxread.c (process_one_symbol): Update.
2080 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2081 (outermost_context_p): Remove macro.
2082 (outermost_context_p, get_current_context_stack)
2083 (get_context_stack_depth): Declare.
2084 (pop_context): Return struct context_stack.
2085 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2087 (context_stack_size): Remove.
2088 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2089 (prepare_for_building, end_symtab_get_static_block)
2090 (augment_type_symtab, push_context): Update.
2091 (pop_context): Return struct context_stack.
2092 (outermost_context_p, get_current_context_stack)
2093 (get_context_stack_depth): New functions.
2094 (buildsym_init): Update.
2096 2018-07-20 Tom Tromey <tom@tromey.com>
2098 * rust-exp.y: Now a pure parser. Update all rules.
2099 (%union): Move earlier.
2100 (current_parser, work_obstack): Remove globals.
2101 (rust_parser, ~rust_parser): Update.
2102 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2103 lex_character, lex_number, lex_string, lex_identifier,
2104 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2105 convert_name, convert_params_to_expression,
2106 convert_ast_to_expression, ast_basic_type, ast_operation,
2107 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2108 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2109 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2110 ast_array_type, ast_slice_type, ast_reference_type,
2111 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2112 (rust_parse): Update.
2113 (rustyyerror, rustyylex): Add parser parameter.
2114 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2115 (rust_lex_stringish_test, rust_lex_test_sequence)
2116 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2117 (rust_lex_test_push_back, rust_lex_tests): Update.
2119 2018-07-19 Pedro Alves <palves@redhat.com>
2121 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2122 gdb::unique_xmalloc_ptr.
2123 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2124 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2125 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2126 copy-initialization.
2127 * guile/scm-pretty-print.c (ppscm_print_children): Use
2128 gdb::unique_xmalloc_ptr instead of cleanups.
2129 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2130 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2131 gdb::unique_xmalloc_ptr.
2132 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2133 Adjust to use gdb::unique_xmalloc_ptr.
2134 * guile/scm-utils.c (extract_arg): Adjust.
2135 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2136 gdb::unique_xmalloc_ptr instead of a cleanup.
2138 2018-07-19 Tom Tromey <tom@tromey.com>
2140 * utils.c (do_value_free_to_mark)
2141 (make_cleanup_value_free_to_mark): Remove.
2142 * utils.h (make_cleanup_value_free_to_mark): Remove.
2144 2018-07-19 Pedro Alves <palves@redhat.com>
2146 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2147 forwarding reference.
2149 2018-07-18 Pedro Alves <palves@redhat.com>
2151 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2152 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2155 2018-07-18 Pedro Alves <palves@redhat.com>
2157 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2159 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2161 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2162 directly instead of a cleanup.
2163 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2164 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2165 (vlscm_binop_gdbthrow): New, factored out from ...
2166 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2167 (vlscm_rich_compare): Use gdbscm_wrap.
2168 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2169 instead of a cleanup.
2170 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2172 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2173 Use xfree directly instead of a cleanup.
2174 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2175 Adjust to use gdbscm_wrap and scoped_value_mark.
2176 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2177 (gdbscm_value_address, gdbscm_value_dereference)
2178 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2180 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2181 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2183 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2184 gdbscm_wrap and scoped_value_mark.
2185 (gdbscm_value_to_string): Use xfree directly instead of a
2186 cleanup. Move 'buffer' unique_ptr to TRY scope.
2187 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2188 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2190 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2191 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2193 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2196 2018-07-18 Tom de Vries <tdevries@suse.de>
2198 * findvar.c (default_read_var_value): Also resolve dynamic type for
2199 LOC_OPTIMIZED_OUT vars.
2201 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2203 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2206 2018-07-17 Tom Tromey <tom@tromey.com>
2208 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2209 (compute_enum_list, pascm_set_param_value_x)
2210 (gdbscm_parameter_value): Update.
2211 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2212 (gdbscm_scm_to_host_string): Update.
2213 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2215 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2216 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2217 * guile/scm-string.c (gdbscm_scm_to_string): Return
2219 (gdbscm_scm_to_host_string): Likewise.
2221 2018-07-17 Tom Tromey <tom@tromey.com>
2223 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2224 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2225 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2226 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2229 2018-07-17 Tom Tromey <tom@tromey.com>
2231 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2232 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2234 * guile/scm-cmd.c (cmdscm_function): Update.
2235 * guile/scm-pretty-print.c
2236 (ppscm_print_exception_unless_memory_error): Update.
2237 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2238 Return unique_xmalloc_ptr.
2240 2018-07-17 Tom Tromey <tom@tromey.com>
2242 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2245 2018-07-17 Jim Wilson <jimw@sifive.com>
2247 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2248 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2249 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2250 unecessary braces after EF_RISCV_RVC test. Delete call to
2251 set_gdbarch_decr_pc_after_break.
2253 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2254 RISCV_LAST_FP_REGNUM + 1.
2255 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2257 2018-07-17 Tom Tromey <tom@tromey.com>
2259 * configure.ac: Remove --disable-gdbcli.
2260 * configure: Rebuild.
2261 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2262 (SUBDIR_CLI_CFLAGS): Remove.
2263 (SFILES): Use SUBDIR_CLI_SRCS.
2264 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2266 2018-07-17 Tom Tromey <tom@tromey.com>
2269 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2271 2018-07-16 Jim Wilson <jimw@sifive.com>
2273 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2275 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2277 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2279 (libunwind_frame_sniffer): Likewise.
2280 (libunwind_frame_prev_register): Likewise.
2281 (libunwind_sigtramp_frame_sniffer): Likewise.
2282 * ia64-tdep.c (ia64_access_reg): Likewise.
2283 (ia64_access_rse_reg): Likewise.
2284 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2285 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2287 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2289 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2291 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2293 * remote-sim.c (gdbsim_target::close,
2294 gdbsim_target::mourn_inferior): Remove unused variables.
2296 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2298 * ia64-tdep.c (ktab_buf): New global.
2299 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2300 (get_kernel_table): Adjust.
2302 2018-07-16 Tom Tromey <tom@tromey.com>
2304 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2305 * dwarf2read.c (using_directives, new_symbol): Use
2306 outermost_context_p.
2307 * dbxread.c (process_one_symbol): Use outermost_context_p.
2308 * coffread.c (coff_symtab_read): Use outermost_context_p.
2310 2018-07-16 Tom Tromey <tom@tromey.com>
2312 * dwarf2read.c (using_directives, read_func_scope)
2313 (read_lexical_block_scope): Update.
2314 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2315 * buildsym.h (local_using_directives, global_using_directives):
2317 (get_local_using_directives, set_local_using_directives)
2318 (get_global_using_directives): Declare.
2319 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2320 m_global_using_directives>: New members.
2321 (finish_block_internal, prepare_for_building)
2322 (reset_symtab_globals, end_symtab_get_static_block)
2323 (push_context): Update.
2324 (get_local_using_directives, set_local_using_directives)
2325 (get_global_using_directives): New functions.
2326 (buildsym_init): Update.
2328 2018-07-16 Tom Tromey <tom@tromey.com>
2330 * xcoffread.c (xcoff_initial_scan): Don't call
2331 free_pending_blocks.
2332 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2333 * buildsym.h (class scoped_free_pendings): Add constructor.
2334 (free_pending_blocks): Don't declare.
2335 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2336 (free_pending_blocks): Now static.
2338 2018-07-16 Tom Tromey <tom@tromey.com>
2340 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2341 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2343 (struct subfile_stack): Remove.
2344 (subfile_stack): Remove.
2345 (push_subfile, pop_subfile, buildsym_init): Update.
2347 2018-07-16 Tom Tromey <tom@tromey.com>
2349 * buildsym.c (push_subfile): Use gdb_assert.
2350 (pop_subfile): Use gdb_assert.
2352 2018-07-16 Tom Tromey <tom@tromey.com>
2354 * buildsym.h (merge_symbol_lists): Remove.
2355 * buildsym.c (merge_symbol_lists): Remove.
2357 2018-07-16 Tom Tromey <tom@tromey.com>
2359 * stabsread.c (scan_file_globals): Update comment.
2360 * stabsread.h (scan_file_globals): Move from buildsym.h.
2361 * buildsym.h (scan_file_globals): Move to stabsread.h.
2363 2018-07-16 Tom Tromey <tom@tromey.com>
2365 * xcoffread.c (xcoff_new_init): Update.
2366 * mipsread.c (mipscoff_new_init): Update.
2367 * mdebugread.c (mdebug_build_psymtabs): Update.
2368 * elfread.c (elf_new_init): Update.
2369 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2370 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2371 * buildsym.h (buildsym_new_init): Don't declare.
2372 * buildsym.c (buildsym_new_init): Remove.
2374 2018-07-16 Tom Tromey <tom@tromey.com>
2376 * stabsread.h (within_function): Move from buildsym.h.
2377 * stabsread.c (start_stabs): Clear within_function.
2378 * coffread.c (coff_start_symtab): Clear within_function.
2379 * buildsym.h (within_function): Move to stabsread.h.
2380 * buildsym.c (prepare_for_building): Update.
2382 2018-07-16 Tom Tromey <tom@tromey.com>
2384 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2385 * dwarf2read.c (dwarf2_start_symtab): Don't set
2386 processing_gcc_compilation.
2387 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2389 2018-07-16 Tom Tromey <tom@tromey.com>
2391 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2392 (next_symbol_text_func): Move from buildsym.h.
2393 * stabsread.c (hashname): Move from buildsym.c.
2394 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2395 (next_symbol_text_func, hashname): Move to stabsread.h.
2396 * buildsym.c: Don't include bcache.h
2397 (hashname): Move to stasbread.c.
2399 2018-07-16 Tom Tromey <tom@tromey.com>
2401 * buildsym.h (context_stack_size): Don't declare.
2402 * buildsym.c (context_stack_size): New global.
2404 2018-07-16 Tom Tromey <tom@tromey.com>
2406 * dbxread.c (processing_acc_compilation): New global.
2407 * buildsym.h (processing_acc_compilation): Don't declare.
2409 2018-07-16 Tom Tromey <tom@tromey.com>
2411 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2412 * dbxread.c (read_ofile_symtab): Update.
2413 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2414 * buildsym.h (last_source_start_addr): Remove.
2415 (set_last_source_start_addr, get_last_source_start_addr):
2417 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2419 (struct buildsym_compunit) <m_last_source_start_addr>: New
2421 (prepare_for_building): Remove start_addr parameter.
2422 (start_symtab, restart_symtab, end_symtab_get_static_block)
2423 (end_symtab_with_blockvector): Update.
2424 (set_last_source_start_addr, get_last_source_start_addr): New
2427 2018-07-16 Tom Tromey <tom@tromey.com>
2429 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2431 (have_line_numbers): Remove.
2432 (record_line, prepare_for_building, end_symtab_get_static_block)
2433 (augment_type_symtab): Update.
2435 2018-07-16 Tom Tromey <tom@tromey.com>
2437 * buildsym.c (~buildsym_compunit): Free the macro table.
2438 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2440 <m_pending_macros>: New member.
2441 (pending_macros): Remove.
2442 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2443 (reset_symtab_globals, end_symtab_get_static_block)
2444 (end_symtab_with_blockvector, augment_type_symtab)
2445 (buildsym_init): Update.
2447 2018-07-16 Tom Tromey <tom@tromey.com>
2449 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2451 (buildsym_compunit::set_last_source_file): New method.
2452 <m_last_source_file>: New member.
2453 (prepare_for_building): Remove "name" parameter.
2454 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2455 (last_source_file): Remove.
2456 (set_last_source_file, get_last_source_file): Update.
2458 2018-07-16 Tom Tromey <tom@tromey.com>
2460 * buildsym.c (prepare_for_building): Add assert.
2462 2018-07-16 Tom Tromey <tom@tromey.com>
2464 * buildsym.c (~buildsym_compunit): Update.
2465 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2466 (start_subfile, patch_subfile_names)
2467 (end_symtab_with_blockvector): Update.
2469 2018-07-16 Tom Tromey <tom@tromey.com>
2471 * buildsym.c (struct buildsym_compunit): Add constructor,
2472 destructor, initializers.
2473 (start_buildsym_compunit): Remove.
2474 (free_buildsym_compunit): Use "delete".
2475 (start_symtab, restart_symtab): Use "new".
2477 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2479 * symfile.c (set_objfile_default_section_offset): Remove struct
2482 2018-07-14 Stafford Horne <shorne@gmail.com>
2484 * (Responsible Maintainers): Add myself as or1k maintainer.
2486 2018-07-13 Tom Tromey <tom@tromey.com>
2488 * symfile.c (set_objfile_default_section_offset): Use extra braces
2491 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2493 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2496 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2498 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2499 unittests/cli-utils-selftests.c
2500 * unittests/cli-utils-selftests.c: New file.
2502 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2504 * NEWS: Mention new commands. Mention change to 'thread apply'.
2506 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2508 * thread.c (thr_try_catch_cmd): New function.
2509 (thread_apply_all_command): Handle qcs flags.
2510 (thread_apply_command): Handle qcs flags.
2511 (taas_command): New function.
2512 (tfaas_command): New function.
2513 (_initialize_thread): Update to setup the new commands 'taas
2514 and 'tfaas'. Change doc string for 'thread apply'.
2516 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2518 * stack.c: (trailing_outermost_frame): New function, mostly
2519 extracted from backtrace_command_1.
2520 (leading_innermost_frame): New function.
2521 (backtrace_command_1): Update to call trailing_outermost_frame.
2522 (frame_apply_command_count): New function.
2523 (frame_apply_level_command): New function.
2524 (frame_apply_all_command): New function.
2525 (frame_apply_command): New function.
2526 (faas_command): New function.
2527 (frame_cmd_list): New variable.
2528 (_initialize_stack): Update to setup the new commands 'frame apply'
2531 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2533 * cli-utils.c (number_or_range_parser::get_number): Only handle
2534 numbers or convenience var as numbers.
2535 (parse_flags): New function.
2536 (parse_flags_qcs): New function.
2537 (number_or_range_parser::finished): Ensure parsing end is detected
2538 before end of string.
2539 * cli-utils.h (parse_flags): New function.
2540 (parse_flags_qcs): New function.
2541 (number_or_range_parser): Remove m_finished bool.
2542 (number_or_range_parser::skip_range): Set m_in_range to false.
2544 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2546 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2549 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2550 Jan Kratochvil <jan.kratochvil@redhat.com>
2551 Paul Fertser <fercerpav@gmail.com>
2552 Tsutomu Seki <sekiriki@gmail.com>
2553 Pedro Alves <palves@redhat.com>
2555 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2556 'unittests/parse-connection-spec-selftests.c'.
2557 (COMMON_SFILES): Add 'common/netstuff.c'.
2558 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2559 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2560 * common/netstuff.c: New file.
2561 * common/netstuff.h: New file.
2562 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2563 (wait_for_connect): Update comment. New parameter
2564 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2565 Use 'sock' directly instead of 'scb->fd'.
2566 (try_connect): New function, with code from 'net_open'.
2567 (net_open): Rewrite main loop to deal with multiple
2568 sockets/addresses. Handle IPv6-style hostnames; implement
2569 support for IPv6 connections.
2570 * unittests/parse-connection-spec-selftests.c: New file.
2572 2018-07-11 Pedro Alves <palves@redhat.com>
2575 * remote.c (remote_target::remote_detach_pid): Call
2576 set_current_process.
2578 2018-07-11 Pedro Alves <palves@redhat.com>
2580 * h8300-tdep.c (h8300_gdbarch_init): Remove
2581 set_gdbarch_ecoff_reg_to_regnum calls.
2583 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2586 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2587 offsets/sizes for static members of a class/struct.
2589 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2591 * target-descriptions.c (tdesc_register_bitsize): Rename.
2592 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2593 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2594 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2596 2018-07-10 Tom Tromey <tom@tromey.com>
2598 * breakpoint.c (moribund_locations): Now static and a
2600 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2601 (build_bpstat_chain, update_global_location_list)
2602 (breakpoint_retire_moribund): Update.
2603 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2606 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2608 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2609 (riscv_register_reggroup_p): Use new function, remove unneeded
2611 (riscv_push_dummy_call): Extend assert to compare against xlen or
2612 flen based on register type.
2614 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2616 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2618 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2620 * remote.c (show_hardware_watchpoint_limit): New function.
2621 (show_hardware_watchpoint_length_limit): New function.
2622 (show_hardware_breakpoint_limit): New function.
2623 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2624 where appropriate, update help text.
2626 2018-07-09 Tom Tromey <tom@tromey.com>
2628 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2629 (CLIBS): Don't mention NAT_CLIBS.
2631 2018-07-09 Tom Tromey <tom@tromey.com>
2633 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2634 (LIBGDB_OBS, clean mostlyclean): Update.
2635 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2637 2018-07-09 Tom Tromey <tom@tromey.com>
2639 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2640 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2641 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2643 2018-07-09 Tom Tromey <tom@tromey.com>
2645 * Makefile.in (ALLDEPFILES): Remove exec.c.
2646 (COMMON_OBS): Remove exec.o.
2647 (COMMON_SFILES): Add exec.c.
2649 2018-07-09 Tom Tromey <tom@tromey.com>
2651 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2653 2018-07-09 Tom Tromey <tom@tromey.com>
2655 * Makefile.in (clean mostlyclean): Remove stamp-version.
2656 (version.c): Depend on stamp-version.
2657 (stamp-version): New rule, from version.c rule.
2659 2018-07-09 Tom Tromey <tom@tromey.com>
2661 * Makefile.in (init.c): Depend on stamp-init.
2662 (stamp-init): New rule, from init.c rule.
2663 (clean mostlyclean): Remove stamp-init.
2665 2018-07-09 Tom Tromey <tom@tromey.com>
2667 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2668 SUBDIR_GCC_COMPILE_SRCS.
2670 2018-07-09 Tom Tromey <tom@tromey.com>
2672 * Makefile.in (init.c): Remove some unused sed rules.
2674 2018-07-09 Tom Tromey <tom@tromey.com>
2676 * Makefile.in (TSOBS): Remove.
2677 (INIT_FILES): Update.
2678 (LIBGDB_OBS): Update.
2679 (COMMON_SFILES): Add inflow.c.
2680 (SFILES): Remove inflow.c.
2682 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2684 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2686 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2688 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2689 get_saveloc_name, is_signal_frame_name, step_name,
2690 init_remote_name, create_addr_space_name,
2691 destroy_addr_space_name, search_unwind_table_name,
2692 find_dyn_list_name): Constify.
2694 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2696 * darwin-nat.c (darwin_pthread_kill): New function.
2697 (darwin_resume_thread): Use darwin_pthread_kill.
2699 2018-07-05 Tom de Vries <tdevries@suse.de>
2701 * macroexp.c (macro_buffer) <operator=>: New member function.
2703 2018-07-04 Tom Tromey <tom@tromey.com>
2705 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2707 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2709 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2710 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2711 * maint.c: Likewise.
2714 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2716 * NEWS: Create a new section for the next release branch.
2717 Rename the section of the current branch, now that it has
2720 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2722 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2723 * version.in: Bump version to 8.2.50.DATE-git.
2725 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2726 Pedro Alves <palves@redhat.com>
2728 * linux-nat.c (linux_init_ptrace): Rename to ...
2729 (linux_init_ptrace_procfs): ... this. Call
2730 linux_proc_init_warnings.
2731 (linux_nat_target::post_attach)
2732 (linux_nat_target::post_startup_inferior): Adjust.
2733 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2734 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2736 2018-07-04 Tom de Vries <tdevries@suse.de>
2738 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2740 (read_comp_unit_head): ... here.
2742 2018-07-03 Tom Tromey <tom@tromey.com>
2744 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2745 (stop_tracing, tstatus_command)
2746 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2747 (print_one_static_tracepoint_marker): Update.
2748 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2750 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2752 (all_tracepoints, static_tracepoints_here): Return std::vector.
2754 2018-07-03 Tom Tromey <tom@tromey.com>
2756 * common/ptid.c (ptid_equal): Remove.
2757 * common/ptid.h (ptid_equal): Don't declare.
2758 * ada-tasks.c: Update.
2759 * breakpoint.c: Update.
2760 * common/agent.c: Update.
2761 * corelow.c: Update.
2762 * darwin-nat-info.c: Update.
2763 * darwin-nat.c: Update.
2765 * dtrace-probe.c: Update.
2766 * dummy-frame.c: Update.
2767 * fbsd-nat.c: Update.
2769 * gdbthread.h: Update.
2770 * gnu-nat.c: Update.
2771 * go32-nat.c: Update.
2772 * inf-loop.c: Update.
2773 * inf-ptrace.c: Update.
2774 * infcall.c: Update.
2778 * linux-fork.c: Update.
2779 * linux-nat.c: Update.
2780 * linux-thread-db.c: Update.
2781 * mi/mi-cmd-var.c: Update.
2782 * mi/mi-interp.c: Update.
2783 * mi/mi-main.c: Update.
2784 * nto-procfs.c: Update.
2785 * ppc-linux-tdep.c: Update.
2787 * python/py-inferior.c: Update.
2788 * python/py-record-btrace.c: Update.
2789 * python/py-record.c: Update.
2790 * ravenscar-thread.c: Update.
2791 * regcache.c: Update.
2792 * remote-sim.c: Update.
2794 * sol-thread.c: Update.
2797 * tui/tui-stack.c: Update.
2799 * windows-nat.c: Update.
2800 * windows-tdep.c: Update.
2802 2018-07-03 Tom Tromey <tom@tromey.com>
2804 * common/ptid.c (ptid_match): Remove.
2805 * common/ptid.h (ptid_match): Don't declare.
2806 * fbsd-nat.c: Update.
2809 * linux-nat.c: Update.
2810 * record-btrace.c: Update.
2811 * regcache.c: Update.
2814 2018-07-03 Tom Tromey <tom@tromey.com>
2816 * common/ptid.c (ptid_tid_p): Remove.
2817 * common/ptid.h (ptid_tid_p): Don't declare.
2818 * sol-thread.c: Update.
2820 2018-07-03 Tom Tromey <tom@tromey.com>
2822 * common/ptid.c (ptid_lwp_p): Remove.
2823 * common/ptid.h (ptid_lwp_p): Don't declare.
2824 * fbsd-nat.c: Update.
2825 * linux-nat.c: Update.
2826 * nat/linux-procfs.c: Update.
2827 * nat/x86-linux-dregs.c: Update.
2828 * sol-thread.c: Update.
2830 2018-07-03 Tom Tromey <tom@tromey.com>
2832 * common/ptid.c (ptid_is_pid): Remove.
2833 * common/ptid.h (ptid_is_pid): Don't declare.
2835 * linux-nat.c: Update.
2836 * mi/mi-interp.c: Update.
2840 2018-07-03 Tom Tromey <tom@tromey.com>
2842 * common/ptid.c (ptid_get_tid): Remove.
2843 * common/ptid.h (ptid_get_tid): Don't declare.
2844 * ada-tasks.c: Update.
2845 * aix-thread.c: Update.
2846 * bsd-uthread.c: Update.
2847 * darwin-nat.c: Update.
2848 * fbsd-nat.c: Update.
2849 * i386-darwin-nat.c: Update.
2851 * linux-tdep.c: Update.
2852 * nto-procfs.c: Update.
2853 * ppc-ravenscar-thread.c: Update.
2854 * python/py-infthread.c: Update.
2855 * ravenscar-thread.c: Update.
2856 * sol-thread.c: Update.
2857 * sparc-ravenscar-thread.c: Update.
2858 * windows-nat.c: Update.
2860 2018-07-03 Tom Tromey <tom@tromey.com>
2862 * common/ptid.c (ptid_get_lwp): Remove.
2863 * common/ptid.h (ptid_get_lwp): Don't declare.
2864 * aarch64-linux-nat.c: Update.
2865 * ada-tasks.c: Update.
2866 * aix-thread.c: Update.
2867 * amd64-linux-nat.c: Update.
2868 * arm-linux-nat.c: Update.
2869 * corelow.c: Update.
2870 * fbsd-nat.c: Update.
2871 * fbsd-tdep.c: Update.
2872 * gnu-nat.c: Update.
2873 * i386-cygwin-tdep.c: Update.
2874 * i386-gnu-nat.c: Update.
2875 * i386-linux-nat.c: Update.
2876 * ia64-linux-nat.c: Update.
2877 * inf-ptrace.c: Update.
2879 * linux-fork.c: Update.
2880 * linux-nat.c: Update.
2881 * linux-tdep.c: Update.
2882 * linux-thread-db.c: Update.
2883 * mips-linux-nat.c: Update.
2884 * nat/aarch64-linux-hw-point.c: Update.
2885 * nat/aarch64-linux.c: Update.
2886 * nat/linux-btrace.c: Update.
2887 * nat/linux-osdata.c: Update.
2888 * nat/linux-procfs.c: Update.
2889 * nat/x86-linux-dregs.c: Update.
2890 * obsd-nat.c: Update.
2891 * ppc-fbsd-nat.c: Update.
2892 * ppc-linux-nat.c: Update.
2894 * python/py-infthread.c: Update.
2895 * ravenscar-thread.c: Update.
2897 * s390-linux-nat.c: Update.
2898 * sol-thread.c: Update.
2899 * sol2-tdep.c: Update.
2900 * spu-linux-nat.c: Update.
2901 * x86-linux-nat.c: Update.
2902 * xtensa-linux-nat.c: Update.
2904 2018-07-03 Tom Tromey <tom@tromey.com>
2906 * common/ptid.c (ptid_get_pid): Remove.
2907 * common/ptid.h (ptid_get_pid): Don't declare.
2908 * aarch64-linux-nat.c: Update.
2909 * ada-lang.c: Update.
2910 * aix-thread.c: Update.
2911 * alpha-bsd-nat.c: Update.
2912 * amd64-fbsd-nat.c: Update.
2913 * amd64-linux-nat.c: Update.
2914 * arm-linux-nat.c: Update.
2915 * arm-nbsd-nat.c: Update.
2917 * break-catch-syscall.c: Update.
2918 * breakpoint.c: Update.
2919 * bsd-uthread.c: Update.
2920 * corelow.c: Update.
2922 * darwin-nat.c: Update.
2923 * fbsd-nat.c: Update.
2924 * fbsd-tdep.c: Update.
2926 * gnu-nat.c: Update.
2927 * hppa-nbsd-nat.c: Update.
2928 * hppa-obsd-nat.c: Update.
2929 * i386-fbsd-nat.c: Update.
2930 * ia64-linux-nat.c: Update.
2931 * inf-ptrace.c: Update.
2933 * inferior.c: Update.
2934 * inferior.h: Update.
2937 * linux-fork.c: Update.
2938 * linux-nat.c: Update.
2939 * linux-tdep.c: Update.
2940 * linux-thread-db.c: Update.
2941 * m68k-bsd-nat.c: Update.
2942 * mi/mi-interp.c: Update.
2943 * mi/mi-main.c: Update.
2944 * mips-linux-nat.c: Update.
2945 * mips-nbsd-nat.c: Update.
2946 * mips64-obsd-nat.c: Update.
2947 * nat/aarch64-linux-hw-point.c: Update.
2948 * nat/aarch64-linux.c: Update.
2949 * nat/linux-btrace.c: Update.
2950 * nat/linux-osdata.c: Update.
2951 * nat/linux-procfs.c: Update.
2952 * nat/x86-linux-dregs.c: Update.
2953 * nto-procfs.c: Update.
2954 * obsd-nat.c: Update.
2955 * ppc-linux-nat.c: Update.
2956 * ppc-nbsd-nat.c: Update.
2957 * ppc-obsd-nat.c: Update.
2958 * proc-service.c: Update.
2960 * python/py-inferior.c: Update.
2961 * python/py-infthread.c: Update.
2962 * ravenscar-thread.c: Update.
2964 * remote-sim.c: Update.
2966 * rs6000-nat.c: Update.
2967 * s390-linux-nat.c: Update.
2968 * sh-nbsd-nat.c: Update.
2969 * sol-thread.c: Update.
2970 * sparc-nat.c: Update.
2971 * sparc64-tdep.c: Update.
2972 * spu-linux-nat.c: Update.
2973 * spu-tdep.c: Update.
2974 * target-debug.h: Update.
2977 * tid-parse.c: Update.
2978 * tracefile-tfile.c: Update.
2979 * vax-bsd-nat.c: Update.
2980 * windows-nat.c: Update.
2981 * x86-linux-nat.c: Update.
2982 * x86-nat.c: Update.
2984 2018-07-03 Tom Tromey <tom@tromey.com>
2986 * common/ptid.c (pid_to_ptid): Remove.
2987 * common/ptid.h (pid_to_ptid): Don't declare.
2988 * aix-thread.c: Update.
2989 * arm-linux-nat.c: Update.
2990 * common/ptid.c: Update.
2991 * common/ptid.h: Update.
2992 * corelow.c: Update.
2994 * darwin-nat.c: Update.
2995 * fbsd-nat.c: Update.
2996 * fork-child.c: Update.
2997 * gnu-nat.c: Update.
2998 * go32-nat.c: Update.
2999 * inf-ptrace.c: Update.
3001 * inferior.c: Update.
3003 * linux-fork.c: Update.
3004 * linux-nat.c: Update.
3005 * nat/aarch64-linux-hw-point.c: Update.
3006 * nat/fork-inferior.c: Update.
3007 * nat/x86-linux-dregs.c: Update.
3008 * nto-procfs.c: Update.
3009 * obsd-nat.c: Update.
3011 * progspace.c: Update.
3013 * rs6000-nat.c: Update.
3014 * s390-linux-nat.c: Update.
3015 * sol-thread.c: Update.
3016 * spu-linux-nat.c: Update.
3019 * tracefile-tfile.c: Update.
3020 * windows-nat.c: Update.
3022 2018-07-03 Tom Tromey <tom@tromey.com>
3024 * common/ptid.h (ptid_build): Don't declare.
3025 * common/ptid.c (ptid_build): Remove.
3026 * aix-thread.c: Update.
3027 * bsd-kvm.c: Update.
3028 * bsd-uthread.c: Update.
3029 * common/agent.c: Update.
3030 * common/ptid.c: Update.
3031 * common/ptid.h: Update.
3032 * corelow.c: Update.
3033 * darwin-nat.c: Update.
3034 * fbsd-nat.c: Update.
3035 * gnu-nat.c: Update.
3036 * linux-fork.c: Update.
3037 * linux-nat.c: Update.
3038 * linux-thread-db.c: Update.
3039 * nat/linux-osdata.c: Update.
3040 * nat/linux-procfs.c: Update.
3041 * nto-procfs.c: Update.
3042 * obsd-nat.c: Update.
3043 * proc-service.c: Update.
3045 * ravenscar-thread.c: Update.
3046 * remote-sim.c: Update.
3048 * sol-thread.c: Update.
3050 * windows-nat.c: Update.
3052 2018-07-03 Tom Tromey <tom@tromey.com>
3054 * infrun.c (follow_exec): Use exit_inferior_silent.
3055 * inferior.c (exit_inferior_num_silent): Remove.
3056 * inferior.h (exit_inferior_num_silent): Don't declare.
3058 2018-07-03 Tom Tromey <tom@tromey.com>
3061 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3062 inferior_ptid on error.
3064 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3065 Simon Marchi <simon.marchi@polymtl.ca>
3068 * disasm.h (gdb_disassembler): Add
3069 `m_disassembler_options_holder'. member
3070 * disasm.c (get_all_disassembler_options): New function.
3071 (gdb_disassembler::gdb_disassembler): Use it.
3072 (gdb_buffered_insn_length_init_dis): Likewise.
3073 (gdb_buffered_insn_length): Adjust accordingly.
3074 (set_disassembler_options): Handle options with arguments.
3075 (show_disassembler_options_sfunc): Likewise. Add a leading new
3076 line if showing options with descriptions.
3077 (disassembler_options_completer): Adapt to using the
3078 `disasm_options_and_args_t' structure.
3079 * mips-tdep.c (mips_disassembler_options): New variable.
3080 (mips_disassembler_options_o32): Likewise.
3081 (mips_disassembler_options_n32): Likewise.
3082 (mips_disassembler_options_n64): Likewise.
3083 (gdb_print_insn_mips): Don't set `disassembler_options'.
3084 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3086 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3087 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3088 `gdbarch_disassembler_options_implicit' and
3089 `gdbarch_valid_disassembler_options'.
3090 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3091 `disasm_options_and_args_t' structure.
3092 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3094 (valid_disassembler_options): Switch from `disasm_options_t' to
3095 the `disasm_options_and_args_t' structure.
3096 * NEWS: Document `set disassembler-options' support for the MIPS
3098 * gdbarch.h: Regenerate.
3099 * gdbarch.c: Regenerate.
3101 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3103 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3105 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3107 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3108 parameter in call to amd64_target_description.
3109 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3110 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3111 (amd64fbsd_init_abi): Likewise.
3112 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3113 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3114 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3115 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3117 2018-06-29 Pedro Alves <palves@redhat.com>
3119 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3120 "segments" parameter.
3121 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3122 (_initialize_amd64_tdep): Update call to
3123 amd64_create_target_description.
3124 (amd64_target_description): Add "segments" parameter. Adjust
3125 the implementation to use it.
3126 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3127 call to amd64_create_target_description.
3128 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3129 * gdb/arch/amd64.h (amd64_create_target_description): Add
3130 "segments" register.
3131 * gdb/arch/amd64.c (amd64_create_target_description): Add
3132 "segments" parameter. Call create_feature_i386_64bit_segments
3133 only if SEGMENTS is true.
3134 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3135 call to amd64_create_target_description.
3137 2018-06-29 Pedro Alves <palves@redhat.com>
3139 * thread.c (thread_target_id_str): New, factored out from ...
3140 (print_thread_info_1): ... here. Use it to compute the max
3141 "Target Id" column width.
3143 2018-06-29 Pedro Alves <palves@redhat.com>
3145 * remote.c (remote_target::extra_thread_info): Delete
3146 'display_buf' and 'n' locals. from the cache, regardless of
3147 packet mechanims is in use. Use cache for qThreadExtra and qP
3150 2018-06-29 Pedro Alves <palves@redhat.com>
3152 * blockframe.c (find_pc_sect_containing_function): New function.
3153 * breakpoint.c (print_breakpoint_location): Don't call
3154 find_pc_sect_function.
3155 * linespec.c (create_sals_line_offset): Record the location's
3157 * linespec.c (convert_address_location_to_sals): Fill in sal's
3158 symbol with find_pc_sect_containing_function.
3159 * symtab.c (find_function_start_sal): Rename to ...
3160 (find_function_start_sal_1): ... this.
3161 (find_function_start_sal): Reimplement as wrapper around
3162 find_function_start_sal_1, and use
3163 find_pc_sect_containing_function to fill in the sal's symbol.
3164 (find_function_start_sal(symbol*, bool)): Adjust.
3165 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3167 (find_pc_sect_containing_function): Declare.
3169 2018-06-29 Pedro Alves <palves@redhat.com>
3171 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3172 true if the the location has no symbol.
3174 2018-06-28 Tom Tromey <tom@tromey.com>
3176 * NEWS: Mention --enable-codesign.
3177 * silent-rules.mk (ECHO_SIGN): New variable.
3178 * configure.ac: Add --enable-codesign.
3179 * configure: Rebuild.
3180 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3181 (gdb$(EXEEXT)): Optionally invoke codesign.
3183 2018-06-28 Pedro Alves <palves@redhat.com>
3185 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3187 (switch_to_thread_no_regs): Adjust comment.
3188 * infcmd.c (stop_pc): Delete.
3189 (post_create_inferior, info_program_command): Replace references
3190 to stop_pc with references to thread_info->suspend.stop_pc.
3191 * inferior.h (stop_pc): Delete declaration.
3192 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3193 (handle_inferior_event_1, handle_signal_stop)
3194 (process_event_stop_test, keep_going_stepped_thread)
3195 (handle_step_into_function, handle_step_into_function_backward)
3196 (print_stop_location): Replace references to stop_pc with
3197 references to thread_info->suspend.stop_pc.
3198 (struct infcall_suspend_state) <stop_pc>: Delete field.
3199 (save_infcall_suspend_state, restore_infcall_suspend_state):
3200 Remove references to inf_stat->stop_pc.
3201 * linux-fork.c (fork_load_infrun_state): Likewise.
3202 * record-btrace.c (record_btrace_set_replay): Likewise.
3203 * record-full.c (record_full_goto_entry): Likewise.
3204 * remote.c (print_one_stopped_thread): Likewise.
3205 * target.c (target_resume): Extend comment.
3206 * thread.c (set_executing_thread): New.
3207 (set_executing): Use it.
3208 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3209 Remove references to stop_pc.
3211 2018-06-28 Pedro Alves <palves@redhat.com>
3213 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3214 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3216 2018-06-28 Tom Tromey <tom@tromey.com>
3218 * coffread.c (coff_symfile_finish): Update.
3219 * xcoffread.c (xcoff_symfile_finish): Update.
3220 * elfread.c (elf_symfile_finish): Update.
3221 * symfile.h (dwarf2_free_objfile): Don't declare.
3222 * dwarf2read.c (_initialize_dwarf2_read): Use
3223 register_objfile_data_with_cleanup.
3224 (dwarf2_free_objfile): Now static. Change signature.
3226 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3228 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3229 option "-o" to add-symbol-file-load to add an offset to each
3230 section's load address.
3231 * symfile.c (set_objfile_default_section_offset): New function.
3233 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3235 * symfile.c (add_symbol_file_command): Make sure that sections
3236 with the same name are sorted in the same order.
3238 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3240 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3241 require the second argument. If omitted, load sections at the
3242 addresses specified in the file.
3244 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3246 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3247 (_initialize_symfile): Add option "-o" to symbol-file to add an
3248 offset to each section of the symbol file.
3250 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3252 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3254 2018-06-27 Tom Tromey <tom@tromey.com>
3256 * stack.c (_initialize_stack): Update "func" help text.
3258 2018-06-27 Tom Tromey <tom@tromey.com>
3260 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3262 (unwind_infopy_str, pyuw_create_unwind_info)
3263 (unwind_infopy_add_saved_register, pyuw_sniffer)
3264 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3266 (struct saved_reg): Add constructor.
3267 <value>: Now a gdbpy_ref<>.
3269 2018-06-27 Tom Tromey <tom@tromey.com>
3271 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3273 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3275 * gdb-gdb.py.in: Format using autopep8.
3277 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3279 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3280 (type_lookup_function): Recognize CORE_ADDR values.
3282 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3284 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3287 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3289 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3292 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3294 * gdb-gdb.py: Move to...
3295 * gdb-gdb.py.in: ... here.
3296 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3297 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3299 (distclean): Remove gdb-gdb.py when cleaning.
3300 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3301 * configure: Re-generate.
3303 2018-06-27 Pedro Alves <palves@redhat.com>
3305 * proc-service.c (get_ps_regcache): New.
3306 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3307 (ps_lsetfpregs): Use it.
3309 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3312 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3313 (dwarf_decode_lines_1): Adjust.
3315 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3317 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3319 <info_proc>: Likewise.
3321 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3323 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3324 to windows_fetch_one_register, and only handle the case of
3325 fetching one register. Move the code that reloads the context
3326 and iterates over all registers if R is negative to...
3327 (windows_nat_target::fetch_registers): ... here.
3328 (do_windows_store_inferior_registers): Rename to
3329 windows_store_one_register, and only handle the case of storing
3330 one register. Move the code that handles the case where r is
3332 (windows_nat_target::store_registers) ... here.
3334 2018-06-26 Tom Tromey <tom@tromey.com>
3337 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3338 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3340 (rust_internal_print_type): Add podata parameter.
3341 (rust_print_type): Update.
3343 2018-06-26 Tom Tromey <tom@tromey.com>
3345 * typeprint.h (struct print_offset_data) <update, finish,
3346 maybe_print_hole>: New methods.
3347 <indentation>: New constant.
3348 * typeprint.c (print_offset_data::indentation): Define.
3349 (print_offset_data::maybe_print_hole, print_offset_data::update)
3350 (print_offset_data::finish): Move from c-typeprint.c and rename.
3351 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3352 (print_spaces_filtered_with_print_options): Update.
3353 (c_print_type_union_field_offset, maybe_print_hole)
3354 (c_print_type_struct_field_offset): Move to typeprint.c and
3356 (c_type_print_base_struct_union): Update.
3358 2018-06-25 Pedro Alves <palves@redhat.com>
3360 * gdbthread.h (thread_info_ref, delete_thread)
3361 (delete_thread_silent, first_thread_of_inferior)
3362 (any_thread_of_inferior, switch_to_thread)
3363 (enable_thread_stack_temporaries)
3364 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3365 (get_last_thread_stack_temporary)
3366 (value_in_thread_stack_temporaries, can_access_registers_thread):
3367 Spell out "struct thread_info" instead of just "thread_info".
3368 * inferior.h (notice_new_inferior): Likewise.
3370 2018-06-25 Pedro Alves <palves@redhat.com>
3372 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3373 pass thread_info pointer to delete_thread.
3374 (windows_nat_target::detach): Pass inferior pointer to
3376 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3378 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3379 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3380 and pass a thread_info pointer to delete_thread.
3381 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3382 pass thread_info pointer to delete_thread.
3383 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3384 delete_thread_silent call.
3385 * procfs.c (procfs_target::detach): Pass inferior pointer to
3387 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3388 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3389 delete_thread_silent call.
3390 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3391 pass thread_info pointer to delete_thread.
3392 (windows_nat_target::detach): Pass inferior pointer to
3395 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3397 * regcache.c (readable_regcache::read_part): Fix asserts.
3398 (reg_buffer::raw_collect_part): New function.
3399 (regcache::write_part): Fix asserts.
3400 (reg_buffer::raw_supply_part): New function.
3401 (regcache::transfer_regset_register): New helper function.
3402 (regcache::transfer_regset): Call new functions.
3403 (regcache_supply_regset): Use gdb_byte*.
3404 (regcache::supply_regset): Likewise.
3405 (regcache_collect_regset): Likewise.
3406 (regcache::collect_regset): Likewise.
3407 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3408 (reg_buffer::raw_supply_part): Likewise.
3409 (regcache::transfer_regset_register): Likewise.
3410 (regcache::transfer_regset): Use gdb_byte*.
3412 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3414 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3416 2018-06-21 Pedro Alves <palves@redhat.com>
3418 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3419 instead of a ptid_t. All callers adjusted.
3420 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3422 (print_ada_task_info, display_current_task_id, task_command_1):
3424 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3426 (breakpoint_kind): Adjust.
3427 (remove_breakpoints_pid): Rename to ...
3428 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3429 pointer. All callers adjusted.
3430 (bpstat_clear_actions): Use inferior_thread.
3431 (get_bpstat_thread): New.
3432 (bpstat_do_actions): Use it.
3433 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3434 to take a thread_info pointer. All callers adjusted.
3435 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3436 (breakpoint_re_set_thread): Use inferior_thread.
3437 * breakpoint.h (struct inferior): Forward declare.
3438 (bpstat_stop_status): Update.
3439 (remove_breakpoints_pid): Delete.
3440 (remove_breakpoints_inf): New.
3441 * bsd-uthread.c (bsd_uthread_target::wait)
3442 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3443 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3444 (maint_btrace_packet_history_cmd)
3445 (maint_btrace_clear_packet_history_cmd): Adjust.
3446 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3448 * cli/cli-interp.c: Include "inferior.h".
3449 * common/refcounted-object.h (struct
3450 refcounted_object_ref_policy): New.
3451 * compile/compile-object-load.c: Include gdbthread.h.
3452 (store_regs): Use inferior_thread.
3453 * corelow.c (core_target::close): Use current_inferior.
3454 (core_target_open): Adjust to use first_thread_of_inferior and use
3455 the current inferior.
3456 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3457 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3458 <thread>: ... this new field. All references adjusted.
3459 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3460 Take a thread_info pointer instead of a ptid_t.
3461 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3462 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3463 thread_info pointer instead of a ptid_t.
3464 * elfread.c: Include "inferior.h".
3465 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3466 Use inferior_thread.
3467 * eval.c (evaluate_subexp): Likewise.
3468 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3470 * gdb_proc_service.h (struct thread_info): Forward declare.
3471 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3472 <thread>: ... this new field. All references adjusted.
3473 * gdbarch.h, gdbarch.c: Regenerate.
3474 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3475 'thread' parameter. All implementations and callers adjusted.
3476 * gdbthread.h (thread_info) <set_running>: New method.
3477 (delete_thread, delete_thread_silent): Take a thread_info pointer
3479 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3480 (first_thread_of_process): Delete, replaced by ...
3481 (first_thread_of_inferior): ... this new function. All callers
3483 (any_live_thread_of_process): Delete, replaced by ...
3484 (any_live_thread_of_inferior): ... this new function. All callers
3486 (switch_to_thread, switch_to_no_thread): Declare.
3487 (is_executing): Delete.
3488 (enable_thread_stack_temporaries): Update comment.
3489 <enable_thread_stack_temporaries>: Take a thread_info pointer
3490 instead of a ptid_t. Incref the thread.
3491 <~enable_thread_stack_temporaries>: Decref the thread.
3494 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3495 (get_last_thread_stack_temporary)
3496 (value_in_thread_stack_temporaries, can_access_registers_thread):
3497 Take a thread_info pointer instead of a ptid_t. All callers
3499 * infcall.c (get_call_return_value): Use inferior_thread.
3500 (run_inferior_call): Work with thread pointers instead of ptid_t.
3501 (call_function_by_hand_dummy): Work with thread pointers instead
3502 of ptid_t. Use thread_info_ref.
3503 * infcmd.c (proceed_thread_callback): Access thread's state
3505 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3506 access thread's state directly.
3507 (continue_command): Use inferior_thread.
3508 (info_program_command): Use find_thread_ptid and access thread
3510 (proceed_after_attach_callback): Use thread state directly.
3511 (notice_new_inferior): Take a thread_info pointer instead of a
3512 ptid_t. All callers adjusted.
3513 (exit_inferior): Take an inferior pointer instead of a pid. All
3515 (exit_inferior_silent): New.
3516 (detach_inferior): Delete.
3517 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3518 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3519 (detach_inferior_command, kill_inferior_command): Use
3520 find_inferior_id instead of valid_gdb_inferior_id and
3521 gdb_inferior_id_to_pid.
3522 (inferior_command): Use inferior and thread pointers.
3523 * inferior.h (struct thread_info): Forward declare.
3524 (notice_new_inferior): Take a thread_info pointer instead of a
3525 ptid_t. All callers adjusted.
3526 (detach_inferior): Delete declaration.
3527 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3528 instead of a pid. All callers adjusted.
3529 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3530 (valid_gdb_inferior_id): Delete.
3531 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3532 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3533 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3535 <inf>: ... this new field.
3536 <step_ptid>: Delete, replaced by ...
3537 <step_thread>: ... this new field.
3538 (get_displaced_stepping_state): Take an inferior pointer instead
3539 of a pid. All callers adjusted.
3540 (displaced_step_in_progress_any_inferior): Adjust.
3541 (displaced_step_in_progress_thread): Take a thread pointer instead
3542 of a ptid_t. All callers adjusted.
3543 (displaced_step_in_progress, add_displaced_stepping_state): Take
3544 an inferior pointer instead of a pid. All callers adjusted.
3545 (get_displaced_step_closure_by_addr): Adjust.
3546 (remove_displaced_stepping_state): Take an inferior pointer
3547 instead of a pid. All callers adjusted.
3548 (displaced_step_prepare_throw, displaced_step_prepare)
3549 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3550 All callers adjusted.
3551 (start_step_over): Adjust.
3552 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3553 displaced step queue.
3554 (do_target_resume): Adjust.
3555 (fetch_inferior_event): Use inferior_thread.
3556 (context_switch, get_inferior_stop_soon): Take an
3557 execution_control_state pointer instead of a ptid_t. All callers
3559 (switch_to_thread_cleanup): Delete.
3560 (stop_all_threads): Use scoped_restore_current_thread.
3561 * inline-frame.c: Include "gdbthread.h".
3562 (inline_state) <inline_state>: Take a thread pointer instead of a
3563 ptid_t. All callers adjusted.
3564 <ptid>: Delete, replaced by ...
3565 <thread>: ... this new field.
3566 (find_inline_frame_state): Take a thread pointer instead of a
3567 ptid_t. All callers adjusted.
3568 (skip_inline_frames, step_into_inline_frame)
3569 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3570 pointer instead of a ptid_t. All callers adjusted.
3571 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3572 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3573 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3575 * linux-nat.c (get_detach_signal): Likewise.
3576 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3577 (thread_db_notice_clone): Adjust.
3578 (thread_db_find_new_threads_silently)
3579 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3580 a thread pointer instead of a ptid_t. All callers adjusted.
3581 * mi/mi-cmd-var.c: Include "inferior.h".
3582 (mi_cmd_var_update_iter): Update to use thread pointers.
3583 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3585 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3587 (mi_output_running): ... this new function.
3588 (mi_on_resume_1): Adjust to use it.
3589 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3590 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3592 (interrupt_thread_callback): : Adjust to use thread and inferior
3594 * proc-service.c: Include "gdbthread.h".
3595 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3596 * progspace-and-thread.c: Include "inferior.h".
3597 * progspace.c: Include "inferior.h".
3598 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3599 hold a reference to an inferior_object.
3600 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3602 * python/py-inferior.c (struct inferior_object): Give the type a
3603 tag name instead of a typedef.
3604 (python_on_normal_stop): No need to check if the current thread is
3606 (inferior_to_inferior_object): Change return type to
3607 inferior_object. All callers adjusted.
3608 (find_thread_object): Delete, bits factored out to ...
3609 (thread_to_thread_object): ... this new function.
3610 * python/py-infthread.c (create_thread_object): Use
3611 inferior_to_inferior_object.
3612 (thpy_is_stopped): Use thread pointer directly.
3613 (gdbpy_selected_thread): Use inferior_thread.
3614 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3615 field, replaced with ...
3616 <thread>: ... this new field. All users adjusted.
3617 (btpy_insn_or_gap_new): Drop const.
3618 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3620 * python/py-record.c: Include "gdbthread.h".
3621 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3622 a ptid_t. All callers adjusted.
3623 (gdbpy_current_recording): Use inferior_thread.
3624 * python/py-record.h (recpy_record_object) <ptid>: Delete
3625 field, replaced with ...
3626 <thread>: ... this new field. All users adjusted.
3627 (recpy_element_object) <ptid>: Delete
3628 field, replaced with ...
3629 <thread>: ... this new field. All users adjusted.
3630 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3631 a ptid_t. All callers adjusted.
3632 * python/py-threadevent.c: Include "gdbthread.h".
3633 (get_event_thread): Use thread_to_thread_object.
3634 * python/python-internal.h (struct inferior_object): Forward
3636 (find_thread_object, find_inferior_object): Delete declarations.
3637 (thread_to_thread_object, inferior_to_inferior_object): New
3639 * record-btrace.c: Include "inferior.h".
3640 (require_btrace_thread): Use inferior_thread.
3641 (record_btrace_frame_sniffer)
3642 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3643 (get_thread_current_frame): Use scoped_restore_current_thread and
3645 (get_thread_current_frame): Use thread pointer directly.
3646 (record_btrace_replay_at_breakpoint): Use thread's inferior
3648 * record-full.c: Include "inferior.h".
3649 * regcache.c: Include "gdbthread.h".
3650 (get_thread_arch_regcache): Use the inferior's address space
3652 (get_thread_regcache, registers_changed_thread): New.
3653 * regcache.h (get_thread_regcache(thread_info *thread)): New
3655 (registers_changed_thread): New.
3656 (remote_target) <remote_detach_1>: Swap order of parameters.
3657 (remote_add_thread): <remote_add_thread>: Return the new thread.
3658 (get_remote_thread_info(ptid_t)): New overload.
3659 (remote_target::remote_notice_new_inferior): Use thread pointers
3661 (remote_target::process_initial_stop_replies): Use
3662 thread_info::set_running.
3663 (remote_target::remote_detach_1, remote_target::detach)
3664 (extended_remote_target::detach): Adjust.
3665 * stack.c (frame_show_address): Use inferior_thread.
3666 * target-debug.h (target_debug_print_thread_info_pp): New.
3667 * target-delegates.c: Regenerate.
3668 * target.c (default_thread_address_space): Delete.
3669 (memory_xfer_partial_1): Use current_inferior.
3670 (target_detach): Use current_inferior.
3671 (target_thread_address_space): Delete.
3672 (generic_mourn_inferior): Use current_inferior.
3673 * target.h (struct target_ops) <thread_address_space>: Delete.
3674 (target_thread_address_space): Delete.
3675 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3677 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3678 thread pointer instead of a ptid_t. Adjust all callers.
3679 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3680 (first_thread_of_process): Delete, replaced by ...
3681 (first_thread_of_inferior): ... this new function. All callers
3683 (any_thread_of_process): Rename to ...
3684 (any_thread_of_inferior): ... this, and take an inferior pointer.
3685 (any_live_thread_of_process): Rename to ...
3686 (any_live_thread_of_inferior): ... this, and take an inferior
3688 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3689 (value_in_thread_stack_temporaries)
3690 (get_last_thread_stack_temporary): Take a thread pointer instead
3691 of a ptid_t. Adjust all callers.
3692 (thread_info::set_running): New.
3693 (validate_registers_access): Use inferior_thread.
3694 (can_access_registers_ptid): Rename to ...
3695 (can_access_registers_thread): ... this, and take a thread
3697 (print_thread_info_1): Adjust to compare thread pointers instead
3699 (switch_to_no_thread, switch_to_thread): Make extern.
3700 (scoped_restore_current_thread::~scoped_restore_current_thread):
3701 Use m_thread pointer directly.
3702 (scoped_restore_current_thread::scoped_restore_current_thread):
3703 Use inferior_thread.
3704 (thread_command): Use thread pointer directly.
3705 (thread_num_make_value_helper): Use inferior_thread.
3706 * top.c (execute_command): Use inferior_thread.
3707 * tui/tui-interp.c: Include "inferior.h".
3708 * varobj.c (varobj_create): Use inferior_thread.
3709 (value_of_root_1): Use find_thread_global_id instead of
3710 global_thread_id_to_ptid.
3712 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3714 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3716 (regcache::write_part): Likewise.
3717 (readable_regcache::cooked_read_part): Update comment.
3718 (readable_regcache::cooked_write_part): Likewise.
3719 * regcache.h: (readable_regcache::read_part): Likewise.
3720 (regcache::write_part): Likewise.
3722 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3723 Dirk Schubert <dirk.schubert@arm.com>
3725 * aarch64-linux-nat.c (post_attach): New.
3726 (aarch64_linux_nat_target::post_attach): Override post_attach to
3727 record the number of hardware debug registers.
3729 2018-06-20 Tom Tromey <tom@tromey.com>
3731 * python/py-param.c (add_setshow_generic): Make parameters const.
3732 (parmpy_init): Update.
3734 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3736 * regcache.h (regcache_cooked_read_ftype): Rename to...
3737 (register_read_ftype): ...this, change type to function_view.
3738 (class reg_buffer) <save>: Remove src parameter.
3739 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3740 parameter non-const in first overload. Remove src parameter in
3742 * regcache.c (do_cooked_read): Remove.
3743 (readonly_detached_regcache::readonly_detached_regcache): Make
3744 parameter non-const, adjust call to other constructor.
3745 (reg_buffer::save): Remove src parameter.
3746 * frame.c (do_frame_register_read): Remove.
3747 (frame_save_as_regcache): Use lambda function.
3748 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3749 parameter to ppu2spu_data *.
3750 (ppu2spu_sniffer): Use lambda function.
3752 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3754 * record-full.c (record_full_target::insert_breakpoint): Remove
3755 "struct" keyword, add const.
3757 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3759 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3760 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3761 * configure.ac: Remove AC_PREREQ, add missing quoting.
3762 * gnulib/configure.ac: Modernize usage of
3763 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3764 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3765 (AUTOMAKE_VERSION): Bump to 1.15.1.
3766 * configure: Re-generate.
3767 * config.in: Re-generate.
3768 * aclocal.m4: Re-generate.
3769 * gnulib/aclocal.m4: Re-generate.
3770 * gnulib/config.in: Re-generate.
3771 * gnulib/configure: Re-generate.
3772 * gnulib/import/Makefile.in: Re-generate.
3774 2018-06-19 Pedro Alves <palves@redhat.com>
3776 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3777 (lookup_minimal_symbol_by_pc_section): ... here with
3778 gdb_assert_not_reached added.
3780 2018-06-19 Pedro Alves <palves@redhat.com>
3782 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3783 parameter with a block parameter. Compare location's block symbol
3784 with the frame's block instead of addresses.
3785 (skip_inline_frames): Pass the current block instead of the
3786 frame's address. Break out as soon as we determine the frame
3787 should not be skipped.
3789 2018-06-18 Tom Tromey <tom@tromey.com>
3791 * solib-aix.c (solib_aix_get_section_offsets): Return
3793 (solib_aix_solib_create_inferior_hook): Update.
3795 2018-06-18 Tom Tromey <tom@tromey.com>
3797 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3799 2018-06-18 Tom Tromey <tom@tromey.com>
3801 * solib-frv.c (frv_relocate_main_executable): Use
3803 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3806 2018-06-18 Tom Tromey <tom@tromey.com>
3808 * objfiles.h (inhibit_section_map_updates): Update.
3809 (resume_section_map_updates, resume_section_map_updates_cleanup):
3811 * solib-svr4.c (svr4_handle_solib_event): Update.
3812 * objfiles.c (inhibit_section_map_updates): Return
3813 scoped_restore_tmpl<int>.
3814 (resume_section_map_updates, resume_section_map_updates_cleanup):
3817 2018-06-18 Tom Tromey <tom@tromey.com>
3819 * valprint.h (read_string): Update.
3820 * valprint.c (read_string): Change type of "buffer".
3821 (val_print_string): Update.
3822 * python/py-value.c (valpy_string): Update.
3823 * language.h (struct language_defn) <la_get_string>: Change
3825 (default_get_string, c_get_string): Update.
3826 * language.c (default_get_string): Change type of "buffer".
3827 * guile/scm-value.c (gdbscm_value_to_string): Update.
3828 * c-lang.c (c_get_string): Change type of "buffer".
3830 2018-06-18 Tom Tromey <tom@tromey.com>
3832 * ser-mingw.c (struct pipe_state_destroyer): New.
3833 (pipe_state_up): New typedef.
3834 (cleanup_pipe_state): Remove.
3835 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3837 2018-06-18 Tom Tromey <tom@tromey.com>
3839 * rust-lang.h (rust_yyerror): Don't declare.
3840 * rust-lang.c (rust_language_defn): Update.
3841 * rust-exp.y (yyerror): Now static.
3842 * parse.c (parse_exp_in_context_1): Update.
3843 * p-lang.h (p_yyerror): Don't declare.
3844 * p-lang.c (p_language_defn): Update.
3845 * p-exp.y (yyerror): Now static.
3846 * opencl-lang.c (opencl_language_defn): Update.
3847 * objc-lang.c (objc_language_defn): Update.
3848 * m2-lang.h (m2_yyerror): Don't declare.
3849 * m2-lang.c (m2_language_defn): Update.
3850 * m2-exp.y (yyerror): Now static.
3851 * language.h (struct language_defn) <la_error>: Remove.
3852 * language.c (unk_lang_error): Remove.
3853 (unknown_language_defn, auto_language_defn): Remove.
3854 * go-lang.h (go_yyerror): Don't declare.
3855 * go-lang.c (go_language_defn): Update.
3856 * go-exp.y (yyerror): Now static.
3857 * f-lang.h (f_yyerror): Don't declare.
3858 * f-lang.c (f_language_defn): Update.
3859 * f-exp.y (yyerror): Now static.
3860 * d-lang.h (d_yyerror): Don't declare.
3861 * d-lang.c (d_language_defn): Update.
3862 * d-exp.y (yyerror): Now static.
3863 * c-lang.h (c_yyerror): Don't declare.
3864 * c-lang.c (c_language_defn, cplus_language_defn)
3865 (asm_language_defn, minimal_language_defn): Update.
3866 * c-exp.y (yyerror): Now static.
3867 * ada-lang.h (ada_yyerror): Don't declare.
3868 * ada-lang.c (ada_language_defn): Update.
3869 * ada-exp.y (yyerror): Now static.
3871 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3873 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3874 (store_sveregs_to_thread): Likewise.
3875 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3876 (aarch64_linux_store_inferior_registers): Likewise.
3877 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3879 (aarch64_sve_regs_copy_to_regcache): Likewise.
3880 (aarch64_sve_regs_copy_from_regcache): Likewise.
3881 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3883 (aarch64_sve_regs_copy_to_regcache): Likewise.
3884 (aarch64_sve_regs_copy_from_regcache): Likewise.
3885 (sve_context): Structure from Linux headers.
3886 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3887 (SVE_SIG_ZREG_SIZE): Likewise.
3888 (SVE_SIG_PREG_SIZE): Likewise.
3889 (SVE_SIG_FFR_SIZE): Likewise.
3890 (SVE_SIG_REGS_OFFSET): Likewise.
3891 (SVE_SIG_ZREGS_OFFSET): Likewise.
3892 (SVE_SIG_ZREG_OFFSET): Likewise.
3893 (SVE_SIG_ZREGS_SIZE): Likewise.
3894 (SVE_SIG_PREGS_OFFSET): Likewise.
3895 (SVE_SIG_PREG_OFFSET): Likewise.
3896 (SVE_SIG_PREGS_SIZE): Likewise.
3897 (SVE_SIG_FFR_OFFSET): Likewise.
3898 (SVE_SIG_REGS_SIZE): Likewise.
3899 (SVE_SIG_CONTEXT_SIZE): Likewise.
3900 (SVE_PT_REGS_MASK): Likewise.
3901 (SVE_PT_REGS_FPSIMD): Likewise.
3902 (SVE_PT_REGS_SVE): Likewise.
3903 (SVE_PT_VL_INHERIT): Likewise.
3904 (SVE_PT_VL_ONEXEC): Likewise.
3905 (SVE_PT_REGS_OFFSET): Likewise.
3906 (SVE_PT_FPSIMD_OFFSET): Likewise.
3907 (SVE_PT_FPSIMD_SIZE): Likewise.
3908 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3909 (SVE_PT_SVE_PREG_SIZE): Likewise.
3910 (SVE_PT_SVE_FFR_SIZE): Likewise.
3911 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3912 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3913 (__SVE_SIG_TO_PT): Likewise.
3914 (SVE_PT_SVE_OFFSET): Likewise.
3915 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3916 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3917 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3918 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3919 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3920 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3921 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3922 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3923 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3924 (SVE_PT_SVE_SIZE): Likewise.
3925 (SVE_PT_SIZE): Likewise.
3926 (HAS_SVE_STATE): New define.
3928 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3930 * nat/aarch64-sve-linux-sigcontext.h: New file.
3931 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3933 (SVE_VQ_MIN): Likewise.
3934 (SVE_VQ_MAX): Likewise.
3935 (SVE_VL_MIN): Likewise.
3936 (SVE_VL_MAX): Likewise.
3937 (SVE_NUM_ZREGS): Likewise.
3938 (SVE_NUM_PREGS): Likewise.
3939 (sve_vl_valid): Likewise.
3940 (struct user_sve_header): Likewise.
3942 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3943 Richard Bunt <Richard.Bunt@arm.com>
3945 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3946 was requested by GDB.
3948 2018-06-15 Tom de Vries <tdevries@suse.de>
3950 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3952 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3954 * gnulib/update-gnulib.sh: Print expected versions of
3957 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3959 * arch-utils.c (default_type_align): Use type_length_units.
3960 * gdbtypes.c (type_align): Use type_length_units.
3962 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3964 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3965 of 'define' command.
3967 2018-06-14 Tom de Vries <tdevries@suse.de>
3970 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3971 get_no_prettyformat_print_options.
3973 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3975 * sparc-nat.h: Include target.h.
3976 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3977 <fetch_registers>: Remove this argument in function call.
3978 <store_registers>: Remove this argument in function call, remove
3980 <low_forget_process>: Call sparc64_forget_process instead of
3981 sparc_forget_process.
3983 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3985 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3986 (procfs_target::make_corefile_notes): Adjust to new
3987 target_read_alloc return type.
3989 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3990 Stephen Roberts <stephen.roberts@arm.com>
3993 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3994 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3995 Move should_notify_stop local into more inner scope.
3997 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3998 Stephen Roberts <stephen.roberts@arm.com>
4001 * infrun.c (resume_1): Add call to mark_async_event_handler.
4003 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4005 * infrun.c (do_target_wait): Change old version of $pc printed.
4007 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4009 * dwarf2read.c (read_index_from_section): Rename to...
4010 (read_gdb_index_from_section): ... this, update all callers.
4011 (dwarf2_read_index): Rename to...
4012 (dwarf2_read_gdb_index): ... this, update all callers.
4014 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4016 * gdb/hppa-linux-nat.c
4017 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4018 hppa_linux_nat_target::fetch_registers.
4020 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4022 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4023 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4024 (AARCH64_DWARF_SVE_FFR): Likewise.
4025 (AARCH64_DWARF_SVE_P0): Likewise.
4026 (AARCH64_DWARF_SVE_Z0): Likewise.
4028 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4030 * common/common-regcache.h (raw_compare): New function.
4031 * regcache.c (regcache::raw_compare): Likewise.
4032 * regcache.h (regcache::raw_compare): New declaration.
4034 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4036 * common/common-regcache.h (reg_buffer_common): New structure.
4037 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4038 (reg_buffer::raw_supply): Likewise.
4039 (reg_buffer::raw_supply_integer): Likewise.
4040 (reg_buffer::raw_supply_zeroed): Likewise.
4041 (reg_buffer::raw_collect): Likewise.
4042 (reg_buffer::raw_collect_integer): Likewise.
4043 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4044 (reg_buffer::raw_supply): Likewise.
4045 (reg_buffer::raw_supply_integer): Likewise.
4046 (reg_buffer::raw_supply_zeroed): Likewise.
4047 (reg_buffer::raw_collect): Likewise.
4048 (reg_buffer::raw_collect_integer): Likewise.
4050 2018-06-10 Tom Tromey <tom@tromey.com>
4052 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4053 (class remote_state) <stop_reply_queue>: Now std::vector.
4054 (remote_state::~remote_state)
4055 (remote_target::stop_reply_queue_length): Update.
4056 (struct queue_iter_param, remove_child_of_pending_fork)
4057 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4058 (check_pending_event_prevents_wildcard_vcont_callback)
4059 (remove_stop_reply_for_inferior)
4060 (remove_stop_reply_of_remote_state)
4061 (remote_notif_remove_once_on_match)
4062 (stop_reply_match_ptid_and_ws)
4063 (remote_kill_child_of_pending_fork): Remove.
4064 (remote_target::remove_new_fork_children)
4065 (remote_target::check_pending_events_prevent_wildcard_vcont)
4066 (remote_target::discard_pending_stop_replies)
4067 (remote_target::discard_pending_stop_replies_in_queue)
4068 (remote_target::remote_notif_remove_queued_reply)
4069 (remote_target::queued_stop_reply)
4070 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4071 (remote_target::wait, remote_target::kill_new_fork_children)
4072 (remote_target::async): Update.
4074 2018-06-10 Tom Tromey <tom@tromey.com>
4076 * record-full.c (record_full_arch_list_cleanups): Remove.
4077 (record_full_message): Use try/catch.
4078 (record_full_wait_cleanups): Remove.
4079 (record_full_wait_1): Use try/catch.
4080 (record_full_restore): Likewise.
4082 2018-06-10 Tom Tromey <tom@tromey.com>
4084 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4085 declare VEC. Add constructor.
4086 <in_target_beneath>: Now bool.
4087 (record_full_breakpoints): Now a std::vector, static.
4088 (record_full_sync_record_breakpoints)
4089 (record_full_init_record_breakpoints)
4090 (record_full_target::insert_breakpoint)
4091 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4093 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4095 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4096 * serial.c (serial_interface_lookup): Remove struct keyword.
4098 2018-06-10 Tom Tromey <tom@tromey.com>
4100 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4102 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4104 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4106 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4107 "beneath" as a method.
4108 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4109 Use "beneath" as a method.
4111 2018-06-10 Tom Tromey <tom@tromey.com>
4113 * tracefile.c (struct trace_file_writer_deleter): New.
4114 <operator()>: Rename from trace_file_writer_xfree.
4115 (trace_file_writer_up): New typedef.
4116 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4118 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4120 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4121 <m_registers, m_register_status>: Change type to
4123 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4126 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4128 * common/common-regcache.h (enum register_status): Add
4129 underlying type "signed char".
4130 * regcache.h (reg_buffer) <m_register_status>: Change type to
4132 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4133 register_status instead of signed char.
4134 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4135 (reg_buffer::get_register_status): Remove cast.
4136 (readable_regcache::raw_read): Remove cast.
4137 (readable_regcache::cooked_read): Remove cast.
4139 2018-06-09 Tom Tromey <tom@tromey.com>
4141 * source.c (reverse_search_command, forward_search_command): Use
4144 2018-06-09 Tom Tromey <tom@tromey.com>
4146 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4147 (serial_ops_list): Now static, std::vector.
4148 (serial_interface_lookup, serial_add_interface): Update.
4150 2018-06-09 Tom Tromey <tom@tromey.com>
4152 * dwarf2read.c (process_cu_includes): Update.
4153 (process_full_comp_unit): Update.
4154 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4157 2018-06-08 Paul Koning <paul_koning@dell.com>
4161 * python/python.c (do_start_initialization):
4162 Avoid call to internal Python API.
4163 (init__gdb_module): New function.
4165 2018-06-08 Gary Benson <gbenson@redhat.com>
4167 * linux-thread-db.c (valprint.h): New include.
4168 (struct check_thread_db_info): New structure.
4169 (check_thread_db_on_load, tdb_testinfo): New static globals.
4170 (check_thread_db, check_thread_db_callback): New functions.
4171 (try_thread_db_load_1): Run integrity checks if requested.
4172 (maintenance_check_libthread_db): New function.
4173 (_initialize_thread_db): Register "maint check libthread-db"
4174 and "maint set/show check-libthread-db".
4175 * NEWS: Mention the above new commands.
4177 2018-06-08 Tom Tromey <tom@tromey.com>
4179 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4182 2018-06-08 Tom Tromey <tom@tromey.com>
4184 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4186 2018-06-08 Tom Tromey <tom@tromey.com>
4188 * common/btrace-common.h (struct btrace_data): Add constructor,
4189 destructor, move assignment operator.
4190 <empty, clear, fini>: New methods.
4191 <format>: Initialize.
4192 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4193 (btrace_data_empty): Don't declare.
4194 * common/btrace-common.c (btrace_data_init): Remove.
4195 (btrace_data::fini): Rename from btrace_data_fini.
4196 (btrace_data::empty): Rename from btrace_data_empty.
4197 (btrace_data::clear): Rename from btrace_data_clear. Return
4199 * btrace.h (make_cleanup_btrace_data): Don't declare.
4200 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4201 (parse_xml_btrace): Update.
4202 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4203 (maint_btrace_clear_packet_history_cmd): Update.
4205 2018-06-07 Pedro Alves <palves@redhat.com>
4207 * target.h (target_ops) <beneath>: Now a method. All references
4209 (class target_stack): New.
4210 * target.c (g_target_stack): New.
4211 (g_current_top_target): Delete.
4212 (current_top_target): Get the top target out of g_target_stack.
4213 (target_stack::push, target_stack::unpush): New.
4214 (push_target, unpush_target): Reimplement.
4215 (target_is_pushed): Reimplement in terms of g_target_stack.
4216 (target_ops::beneath, target_stack::find_beneath): New.
4218 2018-06-07 Pedro Alves <palves@redhat.com>
4220 * target.h (find_target_beneath): Delete declaration.
4221 * target.c (find_target_beneath): Delete definition.
4222 * aix-thread.c: All callers of find_target_beneath adjusted to
4223 call target_ops::beneath instead.
4224 * bsd-uthread.c: Likewise.
4225 * linux-thread-db.c: Likewise.
4226 * ravenscar-thread.c: Likewise.
4227 * sol-thread.c: Likewise.
4228 * spu-multiarch.c: Likewise.
4230 2018-06-07 Pedro Alves <palves@redhat.com>
4232 * target.h (target_ops) <beneath>: Now a method. All references
4234 (target_ops) <m_beneath>: New.
4235 * target.c (target_ops::beneath): New.
4236 * corelow.c: Adjust all references to target_ops::beneath.
4237 * linux-thread-db.c: Likewise.
4238 * make-target-delegates: Likewise.
4239 * record-btrace.c: Likewise.
4240 * record-full.c: Likewise.
4241 * remote.c: Likewise.
4242 * target.c: Likewise.
4243 * target-delegates.c: Regenerate.
4245 2018-06-07 Pedro Alves <palves@redhat.com>
4247 * target.h (target_stack): Delete.
4248 (current_top_target): Declare function.
4249 * target.c (target_stack): Delete.
4250 (g_current_top_target): New.
4251 (current_top_target): New function.
4252 * auxv.c: Use current_top_target instead of target_stack
4254 * avr-tdep.c: Likewise.
4255 * breakpoint.c: Likewise.
4256 * corefile.c: Likewise.
4257 * elfread.c: Likewise.
4259 * exceptions.c: Likewise.
4260 * frame.c: Likewise.
4261 * gdbarch-selftests.c: Likewise.
4262 * gnu-v3-abi.c: Likewise.
4263 * ia64-tdep.c: Likewise.
4264 * ia64-vms-tdep.c: Likewise.
4265 * infcall.c: Likewise.
4266 * infcmd.c: Likewise.
4267 * infrun.c: Likewise.
4268 * linespec.c: Likewise.
4269 * linux-tdep.c: Likewise.
4270 * minsyms.c: Likewise.
4271 * ppc-linux-nat.c: Likewise.
4272 * ppc-linux-tdep.c: Likewise.
4273 * procfs.c: Likewise.
4274 * regcache.c: Likewise.
4275 * remote.c: Likewise.
4276 * rs6000-tdep.c: Likewise.
4277 * s390-linux-nat.c: Likewise.
4278 * s390-tdep.c: Likewise.
4279 * solib-aix.c: Likewise.
4280 * solib-darwin.c: Likewise.
4281 * solib-dsbt.c: Likewise.
4282 * solib-spu.c: Likewise.
4283 * solib-svr4.c: Likewise.
4284 * solib-target.c: Likewise.
4285 * sparc-tdep.c: Likewise.
4286 * sparc64-tdep.c: Likewise.
4287 * spu-tdep.c: Likewise.
4288 * symfile.c: Likewise.
4289 * symtab.c: Likewise.
4290 * target-descriptions.c: Likewise.
4291 * target-memory.c: Likewise.
4292 * target.c: Likewise.
4293 * target.h: Likewise.
4294 * tracefile-tfile.c: Likewise.
4295 * tracepoint.c: Likewise.
4296 * valops.c: Likewise.
4297 * valprint.c: Likewise.
4298 * value.c: Likewise.
4299 * windows-tdep.c: Likewise.
4300 * mi/mi-main.c: Likewise.
4302 2018-06-07 Tom Tromey <tom@tromey.com>
4304 * valprint.h (build_address_symbolic): Declare.
4305 * printcmd.c (print_address_symbolic): Update.
4306 (build_address_symbolic): Change "name" and "filename" to
4308 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4310 * defs.h (build_address_symbolic): Remove declaration.
4312 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4314 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4315 (aarch64_vnv_type): Add function.
4316 (aarch64_pseudo_register_name): Add V regs for SVE.
4317 (aarch64_pseudo_register_type): Likewise.
4318 (aarch64_pseudo_register_reggroup_p): Likewise.
4319 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4320 (aarch64_pseudo_read_value): Add V regs for SVE.
4321 (aarch64_pseudo_write_2): Use V0 offset for SVE
4322 (aarch64_pseudo_write): Add V regs for SVE.
4323 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4325 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4327 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4328 (sve_vl_from_vq): Likewise.
4330 2018-06-05 Tom Tromey <tom@tromey.com>
4332 * cli/cli-cmds.c (show_version): Update.
4333 * top.c (print_gdb_version): Add "interactive" parameter.
4335 * main.c (captured_main_1): Update.
4336 * top.h (print_gdb_version): Add "interactive" parameter and a
4339 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4341 * common/enum-flags.h: Add trailing semicolon to example in
4344 2018-06-05 Tom Tromey <tom@tromey.com>
4347 * NEWS: Add entry about pager.
4348 * utils.c (pagination_disabled_for_command): New global.
4349 (prompt_for_continue): Allow "c" response to prompt.
4350 (reinitialize_more_filter): Clear
4351 pagination_disabled_for_command.
4352 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4354 2018-06-04 Tom Tromey <tom@tromey.com>
4356 * ada-lang.h (ada_lookup_symbol_list): Update.
4357 * ada-lang.c (resolve_subexp): Update.
4358 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4360 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4361 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4362 results parameter to std::vector.
4363 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4365 * ada-exp.y (block_lookup): Update.
4366 (select_possible_type_sym): Change type of syms. Remove nsyms
4368 (write_var_or_type, write_name_assoc): Update.
4370 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4372 * windows-nat.c (windows_nat_target::xfer_partial): Return
4373 TARGET_XFER_E_IO if we need to delegate to the target beneath
4374 but BENEATH is NULL.
4376 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4378 * Makefile.in (config.status): Add configure.nat as a
4381 2018-06-04 Tom Tromey <tom@tromey.com>
4383 * cp-name-parser.y (cpname_state): Add method declarations.
4384 (HANDLE_QUAL): Update.
4385 (cpname_state::d_grab, cpname_state::fill_comp)
4386 (cpname_state::make_operator, cpname_state::make_dtor)
4387 (cpname_state::make_builtin_type, cpname_state::make_name)
4388 (cpname_state::d_qualify, cpname_state::d_int_type)
4389 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4390 (%union): Move earlier.
4392 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4394 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4396 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4398 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4399 (aarch64_pseudo_write_1): Likewise.
4400 (aarch64_pseudo_read_value): Use helper.
4401 (aarch64_pseudo_write): Likewise.
4403 2018-06-04 Pedro Alves <palves@redhat.com>
4405 * darwin-nat.c (darwin_ops): Delete.
4406 (darwin_attach_pid): Use get_native_target.
4408 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4410 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4411 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4413 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4415 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4416 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4417 (aarch64_gdbarch_init): Check for SVE.
4418 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4420 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4422 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4423 * aarch64-tdep.h (aarch64_read_description): Likewise.
4424 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4425 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4426 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4427 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4428 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4430 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4432 * value.c (value_fetch_lazy_bitfield): New.
4433 (value_fetch_lazy_memory): New.
4434 (value_fetch_lazy_register): New.
4435 (value_fetch_lazy): Factor out to smaller functions.
4437 2018-06-01 Tom Tromey <tom@tromey.com>
4439 * cp-name-parser.y (backslashable, represented): Now const.
4441 2018-06-01 Tom Tromey <tom@tromey.com>
4443 * cp-name-parser.y: Include parser-defs.h.
4444 (parser_fprintf): Remove declaration.
4446 2018-06-01 Tom Tromey <tom@tromey.com>
4448 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4450 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4451 (global_result): Remove globals.
4452 (struct cpname_state): New.
4453 (yyparse): Don't declare.
4454 (yylex, yyerror): Move declarations after %union.
4455 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4456 (make_name): Add state parameter.
4458 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4460 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4462 (yylex): Add lvalp, state parameters.
4463 (yyerror): Add state parameter.
4464 (cp_demangled_name_to_comp): Update.
4466 2018-06-01 Tom Tromey <tom@tromey.com>
4468 * cp-name-parser.y (parser_fprintf): Declare.
4469 (GDB_YY_REMAP_PREFIX): Define.
4470 Include yy-remap.h. Don't redefine yy* identifiers.
4472 2018-06-01 Tom Tromey <tom@tromey.com>
4474 * python/py-type.c (typy_legacy_template_argument): Update.
4475 * cp-support.h (cp_demangled_name_to_comp): Update.
4476 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4477 parameter to be a "std::string *".
4480 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4482 * ada-lex.l: Include "diagnostics.h" instead of
4483 "common/diagnostics.h".
4484 * unittests/environ-selftests.c: Likewise.
4485 * common/diagnostics.h: Moved to ../include.
4487 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4489 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4490 to language_mode_manual while calling breakpoint_re_set_one.
4492 2018-06-01 Tom Tromey <tom@tromey.com>
4494 * valops.c (value_cast_structs, destructor_name_p): Update.
4495 * symtab.c (gdb_mangle_name): Update.
4496 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4498 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4499 (pascal_object_print_value_fields, pascal_object_print_value):
4501 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4502 * linespec.c (find_methods): Update.
4503 * gdbtypes.h (type_name_no_tag): Remove.
4504 (type_name_or_error): Rename from type_name_no_tag_or_error.
4505 * gdbtypes.c (type_name_no_tag): Remove.
4506 (type_name_or_error): Rename from type_name_no_tag_or_error.
4507 (lookup_struct_elt_type, check_typedef): Update.
4508 * expprint.c (print_subexp_standard): Update.
4509 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4510 * d-namespace.c (d_lookup_nested_symbol): Update.
4511 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4512 (cp_print_class_member): Update.
4513 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4514 * completer.c (add_struct_fields): Update.
4515 * c-typeprint.c (cp_type_print_derivation_info)
4516 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4518 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4519 (ada_prefer_type, ada_is_exception_sym): Update.
4521 2018-06-01 Tom Tromey <tom@tromey.com>
4523 * valops.c (enum_constant_from_type, value_namespace_elt)
4524 (value_maybe_namespace_elt): Update.
4525 * valarith.c (find_size_for_pointer_math): Update.
4526 * target-descriptions.c (make_gdb_type): Update.
4527 * symmisc.c (print_symbol): Update.
4528 * stabsread.c (define_symbol, read_type)
4529 (complain_about_struct_wipeout, add_undefined_type)
4530 (cleanup_undefined_types_1): Update.
4531 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4532 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4533 (rust_internal_print_type, rust_composite_type)
4534 (rust_evaluate_funcall, rust_evaluate_subexp)
4535 (rust_inclusive_range_type_p): Update.
4536 * python/py-type.c (typy_get_tag): Update.
4537 * p-typeprint.c (pascal_type_print_base): Update.
4538 * mdebugread.c (parse_symbol, parse_type): Update.
4539 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4541 * guile/scm-type.c (gdbscm_type_tag): Update.
4542 * go-lang.c (sixg_string_p): Update.
4543 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4545 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4546 (TYPE_TAG_NAME): Remove.
4547 * gdbtypes.c (type_name_no_tag): Simplify.
4548 (check_typedef, check_types_equal, recursive_dump_type)
4549 (copy_type_recursive, arch_composite_type): Update.
4550 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4551 in summary mode when needed.
4552 * eval.c (evaluate_funcall): Update.
4553 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4554 (process_structure_scope, read_enumeration_type)
4555 (read_namespace_type, read_module_type, determine_prefix): Update.
4556 * cp-support.c (inspect_type): Update.
4557 * coffread.c (process_coff_symbol, decode_base_type): Update.
4558 * c-varobj.c (c_is_path_expr_parent): Update.
4559 * c-typeprint.c (c_type_print_base_struct_union): Update.
4560 (c_type_print_base_1): Update. Print struct/class/union/enum in
4561 summary when using C language.
4562 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4563 (gen_maybe_namespace_elt): Update.
4564 * ada-lang.c (ada_type_name): Simplify.
4565 (empty_record, ada_template_to_fixed_record_type_1)
4566 (template_to_static_fixed_type)
4567 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4569 2018-06-01 Tom Tromey <tom@tromey.com>
4571 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4573 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4574 (c_print_type): Update.
4575 (c_print_type): New overload.
4576 (c_type_print_varspec_prefix, c_type_print_args)
4577 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4578 (c_type_print_base_struct_union, c_type_print_base_1)
4579 (cp_type_print_method_args): Add "language" parameter.
4580 (c_type_print_base): Update.
4581 * c-lang.h (c_print_type): Add new overload.
4583 2018-06-01 Tom Tromey <tom@tromey.com>
4585 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4586 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4588 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4590 * aarch64-tdep.c (aarch64_sve_register_names): New const
4592 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4593 (AARCH64_SVE_Z_REGS_NUM): New define.
4594 (AARCH64_SVE_P_REGS_NUM): Likewise.
4595 (AARCH64_SVE_NUM_REGS): Likewise.
4597 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4599 * nat/linux-ptrace.h [__alpha__]
4600 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4603 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4605 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4606 the endianness selected.
4607 * NEWS: Document `set endian auto' mode operation update.
4609 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4611 * Makefile.in: Add new header.
4612 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4613 (sve_vl_from_vg): Likewise.
4614 (sve_vq_from_vl): Likewise.
4615 (sve_vl_from_vq): Likewise.
4616 (sve_vq_from_vg): Likewise.
4617 (sve_vg_from_vq): Likewise.
4618 * configure.nat: Add new c file.
4619 * nat/aarch64-sve-linux-ptrace.c: New file.
4620 * nat/aarch64-sve-linux-ptrace.h: New file.
4622 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4624 * aarch64-linux-nat.c (aarch64_linux_read_description):
4626 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4628 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4629 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4630 (aarch64_gdbarch_init): Add parmeter zero.
4631 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4632 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4633 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4635 * doc/gdb.texinfo: Describe SVE feature
4636 * features/aarch64-sve.c: New file.
4638 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4641 * gdbarch.sh (significant_addr_bit): Default to zero when
4642 not set by target architecture.
4643 * gdbarch.c: Re-generated.
4644 * utils.c (address_significant): Update.
4646 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4648 * stack.c (func_command): Remove trailing newline in call to error.
4650 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4652 * regcache.h (regcache_raw_collect): Remove, update callers to
4653 use regcache::raw_collect.
4654 * regcache.c (regcache_raw_collect): Remove.
4656 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4658 * regcache.h (regcache_raw_supply): Remove, update callers to
4659 use detached_regcache::raw_supply.
4660 * regcache.c (regcache_raw_supply): Remove.
4662 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4664 * regcache.h (regcache_cooked_write_part): Remove, update
4665 callers to use regcache::cooked_write_part.
4666 * regcache.c (regcache_cooked_write_part): Remove.
4668 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4670 * regcache.h (regcache_cooked_read_part): Remove, update callers
4671 to use readable_regcache::cooked_read_part.
4672 * regcache.c (regcache_cooked_read_part): Remove.
4674 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4676 * regcache.h (regcache_cooked_read_value): Remove, update
4677 callers to use readable_regcache::cooked_read_value.
4678 * regcache.c (regcache_cooked_read_value): Remove.
4680 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4682 * regcache.h (regcache_cooked_write): Remove, update callers to
4683 use regcache::cooked_write.
4684 * regcache.c (regcache_cooked_write): Remove.
4686 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4688 * regcache.h (regcache_invalidate): Remove, update callers to
4689 use detached_regcache::invalidate instead.
4690 * regcache.c (regcache_invalidate): Remove.
4692 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4694 * regcache.h (regcache_raw_write_part): Remove, update callers
4695 to use regcache::raw_write_part instead.
4696 * regcache.c (regcache_raw_write_part): Remove.
4698 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4700 * regcache.h (regcache_raw_read_part): Remove, update callers to
4701 use readable_regcache::raw_read_part instead.
4702 * regcache.c (regcache_raw_read_part): Remove.
4704 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4706 * regcache.h (regcache_cooked_read): Remove, update callers to
4707 use readable_regcache::cooked_read instead.
4708 * regcache.c (regcache_cooked_read): Remove.
4710 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4712 * regcache.h (regcache_raw_write): Remove, update callers to use
4713 regcache::raw_write instead.
4714 * regcache.c (regcache_raw_write): Remove.
4716 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4718 * regcache.h (regcache_raw_read): Remove, update callers to use
4719 readable_regcache::raw_read instead.
4720 * regcache.c (regcache_raw_read): Remove.
4722 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4724 * regcache.h (regcache_raw_update): Remove, update callers to
4725 use readable_regcache::raw_update instead.
4726 * regcache.c (regcache_raw_update): Remove.
4728 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4730 * regcache.h (regcache_register_status): Remove, update callers
4731 to use reg_buffer::get_register_status directly instead.
4732 * regcache.c (regcache_register_status): Remove.
4734 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4736 * regcache.h (regcache_get_ptid): Remove, update all callers to
4737 call regcache::ptid instead.
4738 * regcache.c (regcache_get_ptid): Remove.
4740 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4742 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4744 2018-05-30 Pedro Alves <palves@redhat.com>
4746 * common/common-exceptions.h (exception_rethrow): Use
4749 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4751 * breakpoint.c (print_solib_event, check_status_catch_solib):
4752 Remove struct keyword in range-based for loops.
4753 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4754 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4756 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4758 * symfile.c (addr_info_make_relative): Likewise.
4759 * thread.c (value_in_thread_stack_temporaries): Likewise.
4761 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4764 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4765 aggregate type to get its real type before accessing it.
4767 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4769 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4770 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4771 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4772 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4773 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4774 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4775 * printcmd.c (info_address_command): Likewise.
4777 2018-05-29 Tom Tromey <tom@tromey.com>
4779 * windows-nat.c (handle_exception): Update fall-through comment.
4781 2018-05-29 Tom Tromey <tom@tromey.com>
4783 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4784 (struct program_space) <added_solibs>: Now a std::vector.
4785 * breakpoint.c (print_solib_event): Update.
4786 (check_status_catch_solib): Update.
4787 * progspace.c (clear_program_space_solib_cache): Update.
4788 * solib.c (update_solib_list): Update.
4790 2018-05-29 Tom Tromey <tom@tromey.com>
4792 * python/py-type.c (typy_richcompare): Update.
4793 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4794 * gdbtypes.h (types_deeply_equal): Return bool.
4795 (types_equal): Likewise.
4796 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4798 (check_types_equal): Change worklist to std::vector. Return
4800 (struct type_equality_entry): Add constructor.
4801 (compare_maybe_null_strings): Return bool.
4802 (check_types_worklist): Return bool. Change worklist to
4804 (types_deeply_equal): Use std::vector.
4805 (types_equal): Return bool.
4806 (compare_maybe_null_strings): Simplify.
4808 2018-05-29 Tom Tromey <tom@tromey.com>
4810 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4812 2018-05-29 Tom Tromey <tom@tromey.com>
4814 * objc-lang.h: Don't include cp-support.h.
4815 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4818 2018-05-27 Tom Tromey <tom@tromey.com>
4820 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4822 2018-05-25 Tom Tromey <tom@tromey.com>
4824 * value.c (value::location): Initialize.
4826 2018-05-25 Tom Tromey <tom@tromey.com>
4828 * dbxread.c (init_bincl_list): Remove.
4829 (bincl_list): Now a std::vector.
4830 (bincls_allocated, next_bincl): Remove.
4831 (free_bincl_list, do_free_bincl_list_cleanup)
4832 (make_cleanup_free_bincl_list): Remove.
4833 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4835 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4836 (struct header_file_location): Add constructor.
4837 (add_bincl_to_list): Remove.
4839 2018-05-25 Tom Tromey <tom@tromey.com>
4841 * tui/tui.c (tui_enable): Update.
4842 * mi/mi-interp.c (mi_interp::init): Update.
4843 * interps.h (class interp) <name>: New method.
4844 <m_name>: Rename from name.
4845 (~scoped_restore_interp): Update.
4846 * interps.c (interp::interp): Update.
4847 (interp_add, interp_set, interp_lookup_existing)
4848 (current_interp_named_p): Update.
4850 2018-05-25 Tom Tromey <tom@tromey.com>
4852 * interps.c (interp_name): Remove.
4853 * mi/mi-interp.c (mi_interp::init): Update.
4854 * interps.h (interp_name): Remove.
4855 (~scoped_restore_interp): Update.
4856 * tui/tui.c (tui_enable): Update.
4858 2018-05-25 Tom Tromey <tom@tromey.com>
4860 * utils.c (fputs_maybe_filtered): Update.
4861 * linespec.c (decode_line_full): Update.
4862 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4863 (mi_print_breakpoint_for_event, mi_solib_loaded)
4864 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4865 (mi_user_selected_context_changed): Update.
4866 * mi/mi-main.c (mi_execute_command): Update.
4867 * cli/cli-script.c (execute_control_command): Update.
4868 * python/python.c (execute_gdb_command): Update.
4869 * solib.c (info_sharedlibrary_command): Update.
4870 * interps.c (interp_ui_out): Remove.
4871 * interps.h (interp_ui_out): Remove.
4873 2018-05-25 Tom Tromey <tom@tromey.com>
4875 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4876 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4877 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4879 2018-05-25 Tom Tromey <tom@tromey.com>
4881 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4882 * interps.c (interp_exec): Use scoped_restore.
4884 2018-05-25 Tom Tromey <tom@tromey.com>
4886 * remote.c (remote_target::remote_file_get): Use
4888 (remote_target::remote_file_put): Likewise.
4890 2018-05-25 Tom Tromey <tom@tromey.com>
4892 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4894 (get_pe_section_index, add_pe_exported_sym): Update.
4895 (read_pe_exported_syms): Use gdb::def_vector.
4897 2018-05-25 Tom Tromey <tom@tromey.com>
4899 * frame.c (remove_prev_frame): Remove.
4900 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4902 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4904 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4906 * mips-linux-nat.c (supply_fpregset): Always call
4907 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4908 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4909 `mips_fill_fpregset'.
4910 * mips-linux-tdep.c (mips_supply_fpregset)
4911 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4912 (mips_fill_fpregset_wrapper): Remove functions.
4913 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4914 (mips_linux_fpregset): Remove variable.
4915 (mips_linux_iterate_over_regset_sections): Use
4916 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4917 (mips_linux_o32_sigframe_init): Remove comment.
4919 2018-05-25 Pedro Alves <palves@redhat.com>
4921 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4922 (struct readahead_cache, struct packet_reg, struct
4923 remote_arch_state, class remote_state): Move higher up in the
4925 (remote_target::m_remote_state): Now an object instead of a pointer.
4926 (remote_target::get_remote_state): Adjust.
4928 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4930 * stack.c (select_and_print_frame): Delete.
4931 (struct function_bounds): Move struct within function.
4932 (func_command): Most content moved into new function
4933 find_frame_for_function, use new function, print result, add
4935 (find_frame_for_function): New function, now returns a result.
4937 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4939 * stack.c (iterate_over_block_arg_vars): Fix comment.
4940 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4942 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4946 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4948 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4950 * frame.h (class scoped_restore_selected_frame): New class.
4951 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4952 of any exception, use scoped_restore_selected_frame to restore the
4955 2018-05-24 Pedro Alves <palves@redhat.com>
4957 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4960 2018-05-23 Tom Tromey <tom@tromey.com>
4962 * complaints.c (struct complaints): Remove.
4963 (symfile_complaint_book): Remove.
4964 (series): New global.
4965 (complaint_internal): Update.
4966 (clear_complaints): Update.
4968 2018-05-23 Tom Tromey <tom@tromey.com>
4970 * complaints.c (counters): New global.
4971 (struct complain): Remove.
4972 (struct complaints) <root>: Remove.
4973 (complaint_sentinel): Remove.
4974 (symfile_complaint_book): Update.
4975 (find_complaint) Remove.
4976 (complaint_internal, clear_complaints): Update.
4978 2018-05-23 Tom Tromey <tom@tromey.com>
4980 * complaints.c (struct complain) <file, line>: Remove.
4981 (find_complaint): Remove file, line parameters.
4982 (complaint_internal): Update.
4984 2018-05-23 Tom Tromey <tom@tromey.com>
4986 * complaints.c (vcomplaint): Remove.
4987 (complaint_internal) Merge in contents of vcomplaint.
4989 2018-05-23 Tom Tromey <tom@tromey.com>
4991 * complaints.c (struct complaints) <explanation>: Remove.
4992 (symfile_explanations): Remove.
4993 (symfile_complaint_book): Update.
4994 (vcomplaint): Update.
4995 (struct explanation): Remove.
4997 2018-05-23 Tom Tromey <tom@tromey.com>
4999 * complaints.c (symfile_complaints): Remove.
5000 (complaint_internal): Remove "complaints" parameter.
5001 (clear_complaints, vcomplaint): Remove "c" parameter.
5002 (get_complaints): Remove.
5003 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5004 (dwarf2_debug_line_missing_file_complaint)
5005 (dwarf2_debug_line_missing_end_sequence_complaint)
5006 (dwarf2_complex_location_expr_complaint)
5007 (dwarf2_const_value_length_mismatch_complaint)
5008 (dwarf2_section_buffer_overflow_complaint)
5009 (dwarf2_macro_malformed_definition_complaint)
5010 (dwarf2_invalid_attrib_class_complaint)
5011 (create_addrmap_from_index, dw2_symtab_iter_next)
5012 (dw2_expand_marked_cus)
5013 (dw2_debug_names_iterator::find_vec_in_debug_names)
5014 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5015 (create_debug_type_hash_table, init_cutu_and_read_dies)
5016 (partial_die_parent_scope, add_partial_enumeration)
5017 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5018 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5019 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5020 (create_cus_hash_table, create_dwp_hash_table)
5021 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5022 (dwarf2_rnglists_process, dwarf2_ranges_process)
5023 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5024 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5025 (handle_struct_member_die, process_structure_scope)
5026 (read_array_type, read_common_block, read_module_type)
5027 (read_tag_pointer_type, read_typedef, read_base_type)
5028 (read_subrange_type, load_partial_dies, partial_die_info::read)
5029 (partial_die_info::read, partial_die_info::read)
5030 (partial_die_info::read, read_checked_initial_length_and_offset)
5031 (dwarf2_string_attr, read_formatted_entries)
5032 (dwarf_decode_line_header)
5033 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5034 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5035 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5036 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5037 (get_signatured_type, get_DW_AT_signature_type)
5038 (decode_locdesc, file_file_name, consume_improper_spaces)
5039 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5040 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5041 (dwarf2_symbol_mark_computed, set_die_type)
5042 (read_attribute_value): Update.
5043 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5045 * dbxread.c (unknown_symtype_complaint)
5046 (lbrac_mismatch_complaint, repeated_header_complaint)
5047 (set_namestring, function_outside_compilation_unit_complaint)
5048 (read_dbx_symtab, process_one_symbol): Update.
5049 * gdbtypes.c (stub_noname_complaint): Update.
5050 * windows-nat.c (handle_unload_dll): Update.
5051 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5052 (decode_base_type): Update.
5053 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5054 (eb_complaint, record_include_begin, record_include_end)
5055 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5056 (process_xcoff_symbol, read_symbol)
5057 (function_outside_compilation_unit_complaint)
5058 (scan_xcoff_symtab): Update.
5059 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5060 * buildsym.c (finish_block_internal, make_blockvector)
5061 (end_symtab_get_static_block, augment_type_symtab): Update.
5062 * dtrace-probe.c (dtrace_process_dof)
5063 (dtrace_static_probe_ops::get_probes): Update.
5064 * complaints.h (struct complaint): Don't declare.
5065 (symfile_complaints): Remove.
5066 (complaint_internal): Remove "complaints" parameter.
5067 (complaint): Likewise.
5068 (clear_complaints): Likewise.
5069 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5070 (reread_symbols): Update.
5071 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5072 (dwarf2_frame_cache, decode_frame_entry): Update.
5073 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5074 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5075 (info_selectors_command): Update.
5076 * macrotab.c (macro_include, check_for_redefinition)
5077 (macro_undef): Update.
5078 * objfiles.c (filter_overlapping_sections): Update.
5079 * stabsread.c (invalid_cpp_abbrev_complaint)
5080 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5081 (define_symbol, error_type, read_type, rs6000_builtin_type)
5082 (stabs_method_name_from_physname, read_member_functions)
5083 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5084 (attach_fields_to_type, complain_about_struct_wipeout)
5085 (read_range_type, read_args, common_block_start)
5086 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5088 * mdebugread.c (index_complaint, unknown_ext_complaint)
5089 (basic_type_complaint, bad_tag_guess_complaint)
5090 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5091 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5092 (parse_procedure, parse_lines)
5093 (function_outside_compilation_unit_complaint)
5094 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5095 (bad_tag_guess_complaint, reg_value_complaint): Update.
5096 * cp-support.c (demangled_name_complaint): Update.
5097 * macroscope.c (sal_macro_scope): Update.
5098 * dwarf-index-write.c (class debug_names): Update.
5100 2018-05-23 Tom Tromey <tom@tromey.com>
5102 * complaints.c (clear_complaints): Remove "noisy" parameter.
5103 * complaints.h (clear_complaints): Update.
5104 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5105 (reread_symbols): Update.
5107 2018-05-23 Tom Tromey <tom@tromey.com>
5109 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5111 (vcomplaint, clear_complaints): Update.
5112 (symfile_explanations): Remove some messages.
5114 2018-05-23 Tom Tromey <tom@tromey.com>
5116 * complaints.c (internal_complaint): Remove.
5117 * complaints.h (internal_complaint): Remove.
5119 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5121 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5123 2018-05-22 Pedro Alves <palves@redhat.com>
5125 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5126 (remote_fileio_badfd, remote_fileio_return_errno)
5127 (remote_fileio_return_success, remote_fileio_func_open)
5128 (remote_fileio_func_open, remote_fileio_func_close)
5129 (remote_fileio_func_read, remote_fileio_func_write)
5130 (remote_fileio_func_lseek, remote_fileio_func_rename)
5131 (remote_fileio_func_unlink, remote_fileio_func_stat)
5132 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5133 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5134 remote_target parameter.
5135 (remote_fio_func_map) <func>: Add remote_target parameter.
5136 (do_remote_fileio_request, remote_fileio_request):
5137 * remote-fileio.h (remote_fileio_request):
5138 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5139 remote_target parameter.
5140 (remote_notif_process, handle_notification): Adjust to pass down
5142 (remote_notif_state_allocate): Add remote_target parameter. Save
5144 * remote-notif.h (struct remote_target): Forward declare.
5145 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5146 remote_target parameter.
5147 (struct remote_notif_state) <remote>: New field.
5148 (remote_notif_ack, remote_notif_parse): Add remote_target
5150 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5151 remote_target parameter.
5152 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5153 (threads_listing_context, rmt_thread_action, protocol_feature)
5154 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5155 (packet_result, struct threads_listing_context, remote_state):
5156 Move definitions and declarations higher up.
5157 (remote_target) <~remote_target>: Declare.
5158 (remote_download_command_source, remote_file_put, remote_file_get)
5159 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5160 (remote_hostio_pread_vFile, remote_hostio_send_command)
5161 (remote_hostio_set_filesystem, remote_hostio_open)
5162 (remote_hostio_close, remote_hostio_unlink, remote_state)
5163 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5164 (get_memory_write_packet_size, get_memory_read_packet_size)
5165 (append_pending_thread_resumptions, remote_detach_1)
5166 (append_resumption, remote_resume_with_vcont)
5167 (add_current_inferior_and_thread, wait_ns, wait_as)
5168 (process_stop_reply, remote_notice_new_inferior)
5169 (process_initial_stop_replies, remote_add_thread)
5170 (btrace_sync_conf, remote_btrace_maybe_reopen)
5171 (remove_new_fork_children, kill_new_fork_children)
5172 (discard_pending_stop_replies, stop_reply_queue_length)
5173 (check_pending_events_prevent_wildcard_vcont)
5174 (discard_pending_stop_replies_in_queue, stop_reply)
5175 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5176 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5177 (remote_interrupt_as, remote_interrupt_ns)
5178 (remote_get_noisy_reply, remote_query_attached)
5179 (remote_add_inferior, remote_current_thread, get_current_thread)
5180 (set_thread, set_general_thread, set_continue_thread)
5181 (set_general_process, write_ptid)
5182 (remote_unpack_thread_info_response, remote_get_threadinfo)
5183 (parse_threadlist_response, remote_get_threadlist)
5184 (remote_threadlist_iterator, remote_get_threads_with_ql)
5185 (remote_get_threads_with_qxfer)
5186 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5187 (get_offsets, remote_check_symbols, remote_supported_packet)
5188 (remote_query_supported, remote_packet_size)
5189 (remote_serial_quit_handler, remote_detach_pid)
5190 (remote_vcont_probe, remote_resume_with_hc)
5191 (send_interrupt_sequence, interrupt_query)
5192 (remote_notif_get_pending_events, fetch_register_using_p)
5193 (send_g_packet, process_g_packet, fetch_registers_using_g)
5194 (store_register_using_P, store_registers_using_G)
5195 (set_remote_traceframe, check_binary_download)
5196 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5197 (remote_xfer_live_readonly_partial, remote_read_bytes)
5198 (remote_send_printf, remote_flash_write, readchar)
5199 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5200 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5201 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5202 (extended_remote_disable_randomization, extended_remote_run)
5203 (send_environment_packet, extended_remote_environment_support)
5204 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5205 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5206 (packet_command): Now methods of ...
5207 (remote_target): ... this class.
5208 (m_remote_state) <remote_target>: New field.
5209 (struct remote_state) <stop_reply_queue,
5210 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5212 (remote_state::remote_state): Allocate stop_reply_queue.
5213 (remote_state): Delete global.
5214 (get_remote_state_raw): Delete.
5215 (remote_target::get_remote_state): Allocate m_remote_state on
5217 (get_current_remote_target): New.
5218 (remote_ops, extended_remote_ops): Delete.
5219 (wait_forever_enabled_p, remote_async_inferior_event_token):
5220 Delete, moved to struct remote_state.
5221 (remote_target::close): Delete self. Destruction bits split to
5223 (remote_target::~remote_target): ... this.
5224 (show_memory_packet_size): Adjust to use
5225 get_current_remote_target.
5226 (struct protocol_feature) <func>: Add remote_target parameter.
5227 All callers adjusted.
5228 (curr_quit_handler_target): New.
5229 (remote_serial_quit_handler): Reimplement.
5230 (remote_target::open_1): Adjust to use get_current_remote_target.
5231 Heap-allocate remote_target/extended_remote_target instances.
5232 (vcont_builder::vcont_builder): Add remote_target parameter, and
5233 save it in m_remote. All callers adjusted.
5234 (vcont_builder::m_remote): New field.
5235 (vcont_builder::restart, vcont_builder::flush)
5236 (vcont_builder::push_action): Use it.
5237 (remote_target::commit_resume): Use it.
5238 (struct queue_iter_param) <remote>: New field.
5239 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5240 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5241 (check_pending_event_prevents_wildcard_vcont_callback)
5242 (remote_target::check_pending_events_prevent_wildcard_vcont)
5243 (remote_target::discard_pending_stop_replies)
5244 (remote_target::discard_pending_stop_replies_in_queue)
5245 (remote_target::remote_notif_remove_queued_reply): Fill in
5247 (remote_notif_get_pending_events): New.
5248 (remote_target::readchar, remote_target::remote_serial_write):
5249 Save/restore curr_quit_handler_target.
5251 (kill_new_fork_children): Fill in 'remote' field.
5252 (packet_command): Use get_current_remote_target, defer to
5253 remote_target method of same name.
5254 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5255 parameter, and save it in m_remote. All callers adjusted.
5256 (scoped_remote_fd::release): Use m_remote.
5257 (scoped_remote_fd::m_remote): New field.
5258 (remote_file_put, remote_file_get, remote_file_delete): Use
5259 get_current_remote_target, defer to remote_target method of same
5261 (remote_btrace_reset): Add remote_state paremeter. Update all
5263 (remote_async_inferior_event_handler). Pass down 'data'.
5264 (remote_new_objfile): Use get_current_remote_target.
5265 (remote_target::vcont_r_supported): New.
5266 (set_range_stepping): Use get_current_remote_target and
5267 remote_target::vcont_r_supported.
5268 (_initialize_remote): Don't allocate 'remote_state' and
5269 'stop_reply_queue' globals.
5270 * remote.h (struct remote_target): Forward declare.
5271 (getpkt, putpkt, remote_notif_get_pending_events): Add
5272 'remote_target' parameter.
5274 2018-05-22 Pedro Alves <palves@redhat.com>
5276 * remote.c (vcont_builder): Now a class. Make all data members
5278 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5280 (vcont_builder_restart): Rename to ...
5281 (vcont_builder::restart): ... this.
5282 (vcont_builder_flush): Rename to ...
5283 (vcont_builder::flush): ... this.
5284 (vcont_builder_push_action): Rename to ...
5285 (vcont_builder::push_action): ... this.
5286 (remote_target::commit_resume): Adjust.
5288 2018-05-22 Pedro Alves <palves@redhat.com>
5290 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5291 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5292 (get_fixed_memory_packet_size): New.
5293 (get_memory_packet_size): Use it.
5294 (set_memory_packet_size): Don't override the config size with
5295 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5296 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5297 Don't refer to get_memory_packet_size if not connected to a remote
5298 target. Show "(default)" if configured size is 0.
5300 2018-05-22 Pedro Alves <palves@redhat.com>
5302 * remote.c (remote_target::mourn_inferior): Move
5303 discard_pending_stop_replies call here from ...
5304 (_initialize_remote): ... here.
5306 2018-05-22 Pedro Alves <palves@redhat.com>
5308 * remote.c (compare_section_command): Remove set_general_process
5311 2018-05-22 Pedro Alves <palves@redhat.com>
5313 * remote.c (struct packet_reg, struct remote_arch_state):
5314 Move higher up in the file.
5315 (remote_state) <m_arch_states>: Store remote_arch_state values
5316 instead of remote_arch_state pointers.
5317 (remote_state::get_remote_arch_state): Adjust.
5319 2018-05-22 Pedro Alves <palves@redhat.com>
5321 * remote.c: Include <unordered_map>.
5322 (remote_state): Now a class.
5323 (remote_state) <get_remote_arch_state>: Declare method.
5324 <get_remote_arch_state>: New field.
5325 (remote_arch_state) <remote_arch_state>: Declare ctor.
5326 <regs>: Now a unique_ptr.
5327 (remote_gdbarch_data_handle): Delete.
5328 (get_remote_arch_state): Delete.
5329 (remote_state::get_remote_arch_state): New.
5330 (get_remote_state): Adjust to call remote_state's
5331 get_remote_arch_state method.
5332 (init_remote_state): Delete, bits factored out to ...
5333 (remote_arch_state::remote_arch_state): ... this new method.
5334 (get_remote_packet_size, get_memory_packet_size)
5335 (process_g_packet, remote_target::fetch_registers)
5336 (remote_target::prepare_to_store, store_registers_using_G)
5337 (remote_target::store_registers, remote_target::get_trace_status):
5338 Adjust to call remote_state's method.
5339 (_initialize_remote): Remove reference to
5340 remote_gdbarch_data_handle.
5342 2018-05-22 Pedro Alves <palves@redhat.com>
5344 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5345 pread>: New method declarations.
5346 (remote_target::open_1): Adjust.
5347 (readahead_cache_invalidate): Rename to ...
5348 (readahead_cache::invalidate): ... this, and adjust to be a class
5350 (readahead_cache_invalidate_fd): Rename to ...
5351 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5353 (remote_hostio_pwrite): Adjust.
5354 (remote_hostio_pread_from_cache): Rename to ...
5355 (readahead_cache::pread): ... this, and adjust to be a class
5357 (remote_hostio_close): Adjust.
5359 2018-05-22 Pedro Alves <palves@redhat.com>
5361 * remote.c (remote_hostio_close_cleanup): Delete.
5362 (class scoped_remote_fd): New.
5363 (remote_file_put, remote_file_get): Use it.
5365 2018-05-22 Pedro Alves <palves@redhat.com>
5367 (struct vCont_action_support): Use bool and initialize all fields.
5368 (struct readahead_cache): Initialize all fields.
5369 (remote_state): Use bool and initialize all fields.
5370 (remote_state::remote_state, remote_state::~remote_state): New.
5371 (new_remote_state): Delete.
5372 (_initialize_remote): Use new to allocate remote_state.
5374 2018-05-22 Pedro Alves <palves@redhat.com>
5378 * c-exp.y: Include "c-support.h".
5379 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5380 of tolower. Use c_ident_is_alpha to scan names.
5381 * c-lang.c: Include "c-support.h".
5382 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5383 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5384 * c-support.h: New file, with bits factored out from ...
5385 * cp-name-parser.y: ... this file.
5386 Include "c-support.h".
5387 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5388 c-support.h and renamed.
5389 (symbol_end, yylex): Adjust.
5391 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5393 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5394 parameter type to CORE_ADDR.
5395 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5396 parameter type in declaration to CORE_ADDR.
5397 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5398 target_auxv_search to get AT_HWCAP and use the result to get the
5400 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5401 to CORE_ADDR. Remove the cast of the return value to unsigned
5402 long. Fix error predicate of target_auxv_search.
5403 (ppc_linux_nat_target::read_description): Change the type of the
5404 hwcap variable to CORE_ADDR.
5406 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5408 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5409 if the size of fpscr is larger than 32 bits.
5411 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5413 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5414 (ppc32_linux_vsxregmap): New global.
5415 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5416 regcache_supply_regset, and regcache_collect_regset.
5417 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5418 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5419 (fetch_vsx_register, store_vsx_register): Remove.
5420 (fetch_vsx_registers): Add regno parameter. Get regset using
5421 ppc_linux_vsxregset. Use regset to supply registers.
5422 (store_vsx_registers): Add regno parameter. Get regset using
5423 ppc_linux_vsxregset. Use regset to collect registers.
5424 (fetch_register): Call fetch_vsx_registers instead of
5426 (store_register): Call store_vsx_registers instead of
5428 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5429 new regno parameter.
5430 (store_ppc_registers): Call store_vsx_registers with -1 for the
5431 new regno parameter.
5432 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5433 (ppc_collect_vsxregset): Remove.
5435 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5437 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5439 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5440 for vector register offset fields.
5441 (ppc64_fbsd_reg_offsets): Likewise.
5442 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5443 to vector register offset fields.
5444 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5445 to vector register offset fields.
5446 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5447 vector register offset fields.
5448 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5449 initializers for vector register offset fields.
5450 (rs6000_aix64_reg_offsets): Likewise.
5451 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5452 (ppc_supply_vrregset): Remove.
5453 (ppc_collect_vrregset): Remove.
5454 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5455 (ppc_linux_vrregset) : New function.
5456 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5457 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5458 (ppc32_linux_vrregset): Remove.
5459 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5460 and use result instead of ppc32_linux_vrregset.
5461 (ppc32_linux_reg_offsets): Remove initializers for vector register
5463 (ppc64_linux_reg_offsets): Likewise.
5464 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5465 * ppc-linux-nat.c: Include regset.h.
5466 (gdb_vrregset_t): Adjust comment to account for little-endian
5468 (supply_vrregset, fill_vrregset): Remove.
5469 (fetch_altivec_register, store_altivec_register): Remove.
5470 (fetch_altivec_registers): Add regno parameter. Get regset using
5471 ppc_linux_vrregset. Use regset to supply registers.
5472 (store_altivec_registers): Add regno parameter. Get regset using
5473 ppc_linux_vrregset. Use regset to collect registers.
5474 (fetch_register): Call fetch_altivec_registers instead of
5475 fetch_altivec_register.
5476 (store_register): Call store_altivec_registers instead of
5477 store_altivec_register.
5478 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5479 the new regno parameter.
5480 (store_ppc_registers): Call store_altivec_registers with -1 for
5481 the new regno parameter.
5483 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5485 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5486 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5487 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5488 (gdb_vrregset_t): Change array type size to
5489 PPC_LINUX_SIZEOF_VRREGSET.
5490 (gdb_vsxregset_t): Change array type size to
5491 PPC_LINUX_SIZEOF_VSXREGSET.
5492 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5493 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5494 PPC_LINUX_SIZEOF_VSXREGSET.
5496 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5498 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5499 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5501 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5502 ppc_linux_target_wordsize with tid.
5503 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5505 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5506 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5507 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5508 tid parameter. Remove static specifier.
5509 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5510 (ppc_linux_target_wordsize): New declaration.
5512 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5514 * arch/ppc-linux-common.c: New file.
5515 * arch/ppc-linux-common.h: New file.
5516 * arch/ppc-linux-tdesc.h: New file.
5517 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5518 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5519 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5520 arch/ppc-linux-tdesc.h.
5521 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5522 arch/ppc-linux-tdesc.h.
5523 (ppc_linux_nat_target::read_description): Remove target
5524 description matching code. Fill a ppc_linux_features struct and
5525 call ppc_linux_match_description with it. Move comment about ISA
5526 2.05 to ppc-linux-common.c.
5527 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5528 arch/ppc-linux-tdesc.h.
5529 (ppc_linux_core_read_description): Remove target description
5530 matching code. Fill a ppc_linux_features struct and call
5531 ppc_linux_match_description with it.
5532 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5533 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5534 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5535 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5536 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5537 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5538 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5539 (tdesc_powerpc_e500l): Remove.
5541 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5543 * ada-lang.c (catch_assert_command): Pass empty string instead
5544 of NULL for excep_string argument.
5546 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5548 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5549 the width of the requested register exceeds the width of the
5552 2018-05-21 Tom Tromey <tom@tromey.com>
5554 * printcmd.c (output_command): Remove.
5555 (output_command_const): Rename to output_command.
5556 * valprint.h (output_command): Rename from output_command_const.
5557 * tracepoint.c (trace_dump_actions): Call output_command.
5559 2018-05-21 Tom Tromey <tom@tromey.com>
5561 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5562 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5563 * ada-lang.h (create_ada_exception_catchpoint): Update.
5564 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5566 (create_excep_cond_exprs, ~ada_catchpoint)
5567 (should_stop_exception, print_one_exception)
5568 (print_mention_exception, print_recreate_exception): Update.
5569 (ada_get_next_arg): Remove.
5570 (catch_ada_exception_command_split): Use std::string. Change type
5571 of "excep_string", "cond_string".
5572 (catch_ada_exception_command): Update.
5573 (create_ada_exception_catchpoint): Change type of excep_string.
5574 (ada_exception_sal): Remove excep_string parameter.
5575 (~ada_catchpoint): Remove.
5577 2018-05-21 Tom Tromey <tom@tromey.com>
5579 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5582 2018-05-21 Tom Tromey <tom@tromey.com>
5584 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5585 Return unique_xmalloc_ptr.
5586 (print_it_exception): Update.
5588 2018-05-21 Tom Tromey <tom@tromey.com>
5590 * tracepoint.c (trace_dump_actions): Use std::string.
5592 2018-05-21 Tom Tromey <tom@tromey.com>
5594 * symfile.c (reread_symbols): Use std::string for original_name.
5596 2018-05-21 Tom Tromey <tom@tromey.com>
5598 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5599 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5602 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5604 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5606 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5607 * objfiles.c (get_objfile_bfd_data): Allocate
5608 objfile_per_bfd_storage with obstack_new when allocating on
5611 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5613 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5615 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5616 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5617 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5618 (add_pending): Likewise.
5619 (parse_symbol): Likewise.
5620 (parse_partial_symbols): Likewise.
5621 (psymtab_to_symtab_1): Likewise.
5622 (new_psymtab): Likewise.
5623 (elfmdebug_build_psymtabs): Likewise.
5624 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5625 * objfiles.c (get_objfile_bfd_data): Likewise.
5626 (objfile_register_static_link): Likewise.
5627 * psymtab.c (allocate_psymtab): Likewise.
5628 * stabsread.c (read_member_functions): Likewise.
5629 * xcoffread.c (xcoff_end_psymtab): Likewise.
5631 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5633 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5634 compiler supports std::is_trivially_constructible.
5635 * common/poison.h: Include obstack.h.
5636 (IsMallocable): Define to is_trivially_constructible if the
5637 compiler supports it, define to true_type otherwise.
5641 (XOBNEWVEC): Redefine.
5642 * gdb_obstack.h (obstack_zalloc): New.
5643 (OBSTACK_ZALLOC): Redefine.
5644 (obstack_calloc): New.
5645 (OBSTACK_CALLOC): Redefine.
5647 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5648 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5650 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5651 obstack_calloc/obstack_zalloc.
5652 (gdbarch_obstack_zalloc): Remove.
5653 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5655 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5657 * stack.c (backtrace_command_1): Remove useless variable int i.
5659 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5661 * stack.c (print_frame_info): Fix comment.
5663 2018-05-18 Tom Tromey <tom@tromey.com>
5665 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5666 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5667 (~dwarf2_per_objfile): Update
5668 (dwarf2_get_dwz_file): Use new.
5669 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5672 2018-05-18 Tom Tromey <tom@tromey.com>
5674 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5676 * dwarf2read.c (struct dwp_file): Add constructor and
5678 (open_and_init_dwp_file): Return a unique_ptr.
5679 (dwarf2_per_objfile, create_dwp_hash_table)
5680 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5681 (lookup_dwo_unit_in_dwp): Update.
5682 (open_and_init_dwp_file, get_dwp_file): Update.
5684 2018-05-18 Tom Tromey <tom@tromey.com>
5686 * dwarf2read.c (dwarf2_per_objfile): Update.
5687 (struct mapped_index): Add initializers.
5688 (dwarf2_read_index): Use new.
5689 (dw2_symtab_iter_init): Update.
5690 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5693 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5695 * dwarf2read.c (mapped_index) <total_size>: Remove.
5697 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5699 * unittests/format_pieces-selftests.c (test_format_specifier):
5702 2018-05-18 Tom Tromey <tom@tromey.com>
5704 * c-typeprint.c (maybe_print_hole): New function.
5705 (c_print_type_struct_field_offset): Update.
5706 (c_type_print_base_struct_union): Call maybe_print_hole.
5708 2018-05-17 Keith Seitz <keiths@redhat.com>
5710 * breakpoint.c (build_bpstat_chain): New function, moved from
5712 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5713 If no stop chain is passed, call build_bpstat_chain to build it.
5714 * breakpoint.h (build_bpstat_chain): Declare.
5715 (bpstat_stop_status): Move documentation here from breakpoint.c.
5716 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5717 build the stop chain and pass it to skip_inline_frames.
5718 Pass this stop chain to bpstat_stop_status.
5719 * inline-frame.c: Include breakpoint.h.
5720 (stopped_by_user_bp_inline_frame): New function.
5721 (skip_inline_frames): Add parameter `stop_chain'.
5722 Move documention to inline-frame.h.
5723 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5724 whether the frame should be elided.
5725 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5726 Add moved documentation and update for new parameter.
5728 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5731 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5732 unittests/format_pieces-selftests.c.
5733 * common/format.h (format_piece) <operator==>: New.
5734 (format_pieces) <operator[]>: Remove.
5735 * common/format.c (format_pieces::format_pieces): Handle \e.
5736 * unittests/format_pieces-selftests.c: New.
5738 2018-05-17 Tom Tromey <tom@tromey.com>
5741 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5742 (dw2_instantiate_symtab): Add skip_partial parameter.
5743 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5744 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5745 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5746 (dw2_expand_symtabs_matching_one)
5747 (dw2_find_pc_sect_compunit_symtab)
5748 (dw2_debug_names_lookup_symbol)
5749 (dw2_debug_names_expand_symtabs_for_function): Update.
5750 (init_cutu_and_read_dies): Add skip_partial parameter.
5751 (process_psymtab_comp_unit, build_type_psymtabs_1)
5752 (process_skeletonless_type_unit, load_partial_comp_unit)
5753 (psymtab_to_symtab_1): Update.
5754 (load_full_comp_unit): Add skip_partial parameter.
5755 (process_imported_unit_die, dwarf2_read_addr_index)
5756 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5757 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5758 (read_signatured_type): Update.
5760 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5762 * value.c (release_value): Remove unused variable.
5763 (record_latest_value): Likewise.
5764 (access_value_history): Likewise.
5765 (preserve_values): Likewise.
5767 2018-05-17 Tom Tromey <tom@tromey.com>
5769 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5772 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5775 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5776 Also handle registers whose width is not a multiple of
5778 (linux_nat_trad_target::store_register): Likewise.
5780 2018-05-16 Tom Tromey <tom@tromey.com>
5782 * gdbcore.h (core_bfd): Redefine.
5783 * corelow.c (core_target::close): Update.
5784 (core_target_open): Update.
5785 * progspace.h (struct program_space) <cbfd>: Now a
5788 2018-05-16 Tom Tromey <tom@tromey.com>
5791 * symfile-add-flags.h (enum symfile_add_flags)
5792 <SYMFILE_NOT_FILENAME>: New constant.
5793 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5794 objfile name from BFD.
5795 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5796 * minidebug.c (find_separate_debug_file_in_section): Put
5797 ".gnu_debugdata" into BFD's file name.
5799 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5801 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5804 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5807 * aarch64-tdep.c (aarch64_analyze_prologue,
5808 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5809 Indicate not interested in errors.
5811 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5813 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5814 Supply the MIPS_ZERO_REGNUM register.
5816 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5818 * mips-tdep.c (mask_address_var): Make variable static.
5820 2018-05-14 Tom Tromey <tom@tromey.com>
5822 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5824 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5826 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5827 FXSAVE_ADDR for the mxcsr register.
5829 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5831 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5833 2018-05-11 Pedro Alves <palves@redhat.com>
5835 * corelow.c (core_target) <core_target>: No longer inline.
5836 Initialize m_core_gdbarch, m_core_vec and build the section table
5838 <~core_target>: New.
5839 <core_gdbarch, get_core_register_section>: New methods.
5840 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5841 factored out from ...
5842 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5844 (sniff_core_bfd): Add gdbarch parameter.
5845 (core_close): Delete, merged into ...
5846 (core_target::close): ... here. Delete self.
5847 (core_close_cleanup): Delete.
5848 (core_target_open): Allocate a core_target on the heap. Use a
5849 unique_ptr instead of a cleanup. Bits moved into the core_target
5850 ctor. Adjust to use core_target methods instead of globals.
5851 (get_core_register_section): Rename to ...
5852 (core_target::get_core_register_section): ... this and adjust.
5853 (struct get_core_registers_cb_data): New.
5854 (get_core_registers_cb): Use it. Use bool.
5855 (core_target::fetch_registers, core_target::files_info)
5856 (core_target::xfer_partial, core_target::read_description)
5857 (core_target::pid_to, core_target::thread_name): Adjust to
5858 reference class fields instead of globals.
5859 * target.h (struct target_ops_deleter, target_ops_up): New.
5861 2018-05-11 Pedro Alves <palves@redhat.com>
5863 * corefile.c (core_file_command): Move to corelow.c.
5864 * corelow.c (the_core_target): Delete.
5865 (core_file_command): Moved from corefile.c. Check exec_bfd
5866 instead of the_core_target. Use target_detach instead of calling
5867 into the_core_target directly.
5868 (maybe_say_no_core_file_now): New.
5869 (core_target::detach): Use it.
5870 (_initialize_corelow): Remove references to the_core_target.
5871 * gdbcore.h (the_core_target): Delete.
5873 2018-05-11 Tom Tromey <tromey@redhat.com>
5874 Pedro Alves <palves@redhat.com>
5876 * corefile.c (core_bfd): Remove.
5877 * gdbcore.h (core_bfd): Now a macro.
5878 * progspace.h (struct program_space) <cbfd>: New field.
5880 2018-05-11 Tom Tromey <tom@tromey.com>
5882 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5885 2018-05-10 Tom Tromey <tom@tromey.com>
5887 * configure: Rebuild.
5888 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5890 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5893 * regformats/regdat.sh: Adjust script, following the addition
5894 of the new expedite_regs parameter to init_target_desc.
5896 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5899 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5900 set_gdbarch_significant_addr_bit.
5901 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5902 set_gdbarch_significant_addr_bit.
5903 * utils.c (address_significant): Update to sign extend addr.
5905 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5907 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5908 (xtensa_linux_init_abi): Limit tdep->num_regs by
5909 tdep->num_nopriv_regs.
5910 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5911 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5914 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5916 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5918 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5920 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5921 (I387_MXCSR_INIT_VAL): New constant.
5922 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5923 buffer if it was supplied by the inferior.
5924 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5925 (i387_xsave_get_clear_bv): New function.
5926 (i387_supply_xsave): Only read x87 control registers from the
5927 xsave buffer if the feature is enabled, and the state will have
5928 been written, otherwise, provide a suitable default.
5929 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5930 including x87 control registers. Update control registers if they
5931 have changed from the default value, and mark features as enabled
5933 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5935 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5937 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5939 2018-05-07 Tom Tromey <tom@tromey.com>
5941 * configure: Rebuild.
5942 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5944 2018-05-07 Tom Tromey <tom@tromey.com>
5947 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5948 bit. Use correct value for VDIV.
5950 2018-05-04 Tom Tromey <tom@tromey.com>
5952 * configure: Rebuild.
5953 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5955 2018-05-04 Tom Tromey <tom@tromey.com>
5957 * linux-record.c (record_linux_system_call) <case
5958 RECORD_SYS_RECVFROM>: Add "break".
5960 2018-05-04 Tom Tromey <tom@tromey.com>
5962 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5963 Add missing "break".
5964 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5965 Add missing "break".
5967 2018-05-04 Tom Tromey <tom@tromey.com>
5969 * rs6000-tdep.c (ppc_process_record_op4)
5970 (ppc_process_record_op63): Add fall-through comment.
5972 2018-05-04 Tom Tromey <tom@tromey.com>
5974 * i386-tdep.c (i386_process_record): Add fall-through comment.
5976 2018-05-04 Tom Tromey <tom@tromey.com>
5978 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5981 2018-05-04 Tom Tromey <tom@tromey.com>
5983 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5984 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5985 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5987 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5989 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5992 2018-05-04 Tom Tromey <tom@tromey.com>
5994 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5996 2018-05-04 Tom Tromey <tom@tromey.com>
5998 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5999 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6000 * symfile.c (section_is_mapped): Fix fall-through comment.
6001 * stabsread.c (define_symbol, read_member_functions): Fix
6002 fall-through comment.
6003 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6005 * remote.c (remote_wait_as): Fix fall-through comment.
6006 * p-exp.y (yylex): Fix fall-through comment.
6007 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6009 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6010 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6011 * jv-exp.y (yylex): Fix fall-through comment.
6012 * go-exp.y (lex_one_token): Fix fall-through comment.
6013 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6014 fall-through comment.
6015 * f-exp.y (yylex): Fix fall-through comment.
6016 * dwarf2read.c (process_die): Fix fall-through comments.
6017 * dbxread.c (process_one_symbol): Fix fall-through comment.
6018 * d-exp.y (lex_one_token): Fix fall-through comment.
6019 * cp-name-parser.y (yylex): Fix fall-through comment.
6020 * coffread.c (coff_symtab_read): Fix fall-through comment.
6021 * c-exp.y (lex_one_token): Fix fall-through comment.
6022 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6024 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6027 2018-05-04 Tom Tromey <tom@tromey.com>
6030 * NEWS: Mention gdb.execute change.
6031 * gdbcmd.h (execute_control_command): Don't declare.
6032 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6033 execute_control_commands, execute_control_commands_to_string.
6034 * cli/cli-script.h (execute_control_commands)
6035 (execute_control_commands_to_string): Declare.
6036 (execute_control_command): Add from_tty parameter.
6037 * cli/cli-script.c (execute_control_commands)
6038 (execute_control_commands_to_string): New functions.
6039 (execute_user_command): Use execute_control_commands.
6040 (execute_control_command_1): Add "from_tty" parameter. Update.
6041 (execute_control_command): Likewise.
6043 2018-05-04 Tom Tromey <tom@tromey.com>
6046 * NEWS: Mention that breakpoint commands are writable.
6047 * python/py-breakpoint.c (bppy_set_commands): New function.
6048 (breakpoint_object_getset) <"commands">: Use it.
6050 2018-05-04 Tom Tromey <tom@tromey.com>
6052 * tracepoint.c (actions_command): Update.
6053 * mi/mi-cmd-break.c (mi_command_line_array)
6054 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6055 (mi_read_next_line): Remove.
6056 (mi_cmd_break_commands): Update.
6057 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6059 * cli/cli-script.c (get_command_line): Update.
6060 (process_next_line): Use function_view. Constify.
6061 (recurse_read_control_structure, read_command_lines)
6062 (read_command_lines_1): Change argument types to function_view.
6063 (do_define_command, document_command): Update.
6064 * breakpoint.h (check_tracepoint_command): Don't declare.
6065 * breakpoint.c (check_tracepoint_command): Remove.
6066 (commands_command_1, create_tracepoint_from_upload): Update.
6068 2018-05-04 Tom Tromey <tom@tromey.com>
6071 * cli/cli-script.h (enum command_control_type) <define_control>:
6073 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6074 (build_command_line, execute_control_command_1)
6075 (process_next_line): Likewise.
6076 (do_define_command): New function, extracted from define_command.
6077 (define_command): Use it.
6079 2018-05-04 Tom Tromey <tom@tromey.com>
6081 * tracepoint.c (actions_command): Update.
6082 * cli/cli-script.h (read_command_lines): Update.
6083 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6084 (MAX_TMPBUF): Remove define.
6085 (define_command): Use string_printf.
6086 (document_command): Likewise.
6087 * breakpoint.c (commands_command_1): Update.
6089 2018-05-04 Tom Tromey <tom@tromey.com>
6091 * top.c (execute_command): Update.
6092 * cli/cli-script.h (print_command_lines): Now varargs.
6093 * cli/cli-script.c (print_command_lines): Now varargs.
6094 (execute_control_command_1) <case while_control, case if_control>:
6097 2018-05-04 Tom Tromey <tom@tromey.com>
6099 * tracepoint.c (all_tracepoint_actions): Rename from
6100 all_tracepoint_actions_and_cleanup. Change return type.
6101 (actions_command, encode_actions_1, encode_actions)
6102 (trace_dump_actions, tdump_command): Update.
6103 * remote.c (remote_download_command_source): Update.
6104 * python/python.c (gdbpy_eval_from_control_command)
6105 (python_command, python_interactive_command): Update.
6106 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6107 * guile/guile.c (guile_command)
6108 (gdbscm_eval_from_control_command, guile_command): Update.
6109 * compile/compile.c (compile_code_command)
6110 (compile_print_command, compile_to_object): Update.
6111 * cli/cli-script.h (struct command_lines_deleter): New.
6112 (counted_command_line): New typedef.
6113 (struct command_line): Add constructor, destructor.
6114 <body_list>: Remove.
6115 <body_list_0, body_list_1>: New members.
6116 (command_line_up): Remove typedef.
6117 (read_command_lines, read_command_lines_1, get_command_line):
6119 (copy_command_lines): Don't declare.
6120 * cli/cli-script.c (build_command_line): Use "new".
6121 (get_command_line): Return counted_command_line.
6122 (print_command_lines, execute_user_command)
6123 (execute_control_command_1, while_command, if_command): Update.
6124 (realloc_body_list): Remove.
6125 (process_next_line, recurse_read_control_structure): Update.
6126 (read_command_lines, read_command_lines_1): Return counted_command_line.
6127 (free_command_lines): Use "delete".
6128 (copy_command_lines): Remove.
6129 (define_command, document_command, show_user_1): Update.
6130 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6131 a counted_command_line.
6132 * breakpoint.h (counted_command_line): Remove typedef.
6133 (breakpoint_set_commands): Update.
6134 * breakpoint.c (check_no_tracepoint_commands)
6135 (validate_commands_for_breakpoint): Update.
6136 (breakpoint_set_commands): Change commands to be a
6137 counted_command_line.
6138 (commands_command_1, update_dprintf_command_list)
6139 (create_tracepoint_from_upload): Update.
6141 2018-05-04 Tom Tromey <tom@tromey.com>
6143 * cli/cli-decode.h (cmd_list_element): New constructor.
6144 (~cmd_list_element): New destructor.
6145 (struct cmd_list_element): Add initializers.
6146 * cli/cli-decode.c (do_add_cmd): Use "new".
6147 (delete_cmd): Use "delete".
6149 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6150 Pedro Alves <palves@redhat.com>
6152 PR breakpoints/19806 and support for PR external/20207.
6153 * NEWS: Mention Aarch64 watchpoint improvements.
6154 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6155 watchpoints and PR external/20207 watchpoints.
6156 * nat/aarch64-linux-hw-point.c
6157 (kernel_supports_any_contiguous_range): New.
6158 (aarch64_watchpoint_offset): New.
6159 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6160 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6161 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6162 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6163 next_addr_orig_p. Support PR external/20207 watchpoints.
6164 (aarch64_downgrade_regs): New.
6165 (aarch64_dr_state_insert_one_point): New parameters offset and
6167 (aarch64_dr_state_remove_one_point): Likewise.
6168 (aarch64_handle_breakpoint): Update caller.
6169 (aarch64_handle_aligned_watchpoint): Likewise.
6170 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6172 (aarch64_linux_set_debug_regs): Remove const from state. Call
6173 aarch64_downgrade_regs.
6174 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6175 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6176 (DR_CONTROL_MASK): ... this.
6177 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6178 (unsigned int aarch64_watchpoint_offset): New prototype.
6179 (aarch64_linux_set_debug_regs): Remove const from state.
6180 * utils.c (align_up, align_down): Move to ...
6181 * common/common-utils.c (align_up, align_down): ... here.
6182 * utils.h (align_up, align_down): Move to ...
6183 * common/common-utils.h (align_up, align_down): ... here.
6185 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6187 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6188 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6189 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6190 Re-implement to match the ABI as summarized in GCC's
6191 gcc/config/sparc/sparc.c. All callers updated.
6192 (sparc32_store_arguments): Remove assertion.
6194 2018-05-04 Tom Tromey <tom@tromey.com>
6196 * printcmd.c: Don't include tui.h.
6197 (decode_format): Use skip_spaces.
6199 2018-05-04 Tom Tromey <tom@tromey.com>
6202 * printcmd.c (last_count): New global.
6203 (x_command): Use saved count when repeating.
6205 2018-05-04 Tom Tromey <tom@tromey.com>
6207 * nto-procfs.c (do_closedir_cleanup): Remove.
6208 (procfs_pidlist): Use gdb_dir_up.
6209 * procfs.c (do_closedir_cleanup): Remove.
6210 (proc_update_threads): Use gdb_dir_up.
6211 * common/filestuff.h (struct gdb_dir_deleter): New.
6212 (gdb_dir_up): New typedef.
6214 2018-05-04 Tom Tromey <tom@tromey.com>
6216 * ada-lang.c (print_mention_exception): Use std::string.
6218 2018-05-04 Tom Tromey <tom@tromey.com>
6220 * ada-lang.c (create_excep_cond_exprs): Update.
6221 (ada_exception_catchpoint_cond_string): Use std::string.
6223 2018-05-04 Tom Tromey <tom@tromey.com>
6225 * ada-lang.c (xget_renaming_scope): Return std::string.
6226 (old_renaming_is_invisible): Update.
6228 2018-05-04 Tom Tromey <tom@tromey.com>
6230 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6231 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6233 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6235 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6237 2018-05-04 Tom Tromey <tom@tromey.com>
6239 * remote.c (remote_query_supported_append): Change type.
6240 (remote_check_symbols): Update.
6242 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6245 * configure.ac: Prepend libpython.
6246 * python/python-config.py: Likewise.
6247 * configure: Regenerate.
6249 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6251 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6253 2018-05-03 Pedro Alves <palves@redhat.com>
6256 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6257 override. Write 'true' instead of '1'.
6258 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6261 2018-05-02 Pedro Alves <palves@redhat.com>
6263 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6264 add_inf_child_target.
6265 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6266 add_inf_child_target.
6267 * aix-thread.c (aix_thread_target_info): New.
6268 (aix_thread_target) <shortname, longname, doc>: Delete.
6270 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6271 add_inf_child_target.
6272 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6273 add_inf_child_target.
6274 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6275 add_inf_child_target.
6276 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6277 add_inf_child_target.
6278 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6279 add_inf_child_target.
6280 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6281 add_inf_child_target.
6282 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6283 add_inf_child_target.
6284 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6285 add_inf_child_target.
6286 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6287 add_inf_child_target.
6288 * bfd-target.c (target_bfd_target_info): New.
6289 (target_bfd) <shortname, longname, doc>: Delete.
6291 * bsd-kvm.c (bsd_kvm_target_info): New.
6292 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6294 (bsd_kvm_target::open): Rename to ...
6295 (bsd_kvm_target_open): ... this. Adjust.
6296 * bsd-uthread.c (bsd_uthread_target_info): New.
6297 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6299 * corefile.c (core_file_command): Adjust.
6300 * corelow.c (core_target_info): New.
6301 (core_target) <shortname, longname, doc>: Delete.
6303 (core_target::open): Rename to ...
6304 (core_target_open): ... this. Adjust.
6305 * ctf.c (ctf_target_info): New.
6306 (ctf_target) <shortname, longname, doc>: Delete.
6308 (ctf_target::open): Rename to ...
6309 (ctf_target_open): ... this.
6310 (_initialize_ctf): Adjust.
6311 * exec.c (exec_target_info): New.
6312 (exec_target) <shortname, longname, doc>: Delete.
6314 (exec_target::open): Rename to ...
6315 (exec_target_open): ... this.
6316 * gdbcore.h (core_target_open): Declare.
6317 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6318 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6319 add_inf_child_target.
6320 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6321 add_inf_child_target.
6322 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6323 add_inf_child_target.
6324 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6325 add_inf_child_target.
6326 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6327 add_inf_child_target.
6328 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6329 add_inf_child_target.
6330 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6331 add_inf_child_target.
6332 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6333 add_inf_child_target.
6334 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6335 add_inf_child_target.
6336 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6337 add_inf_child_target.
6338 * inf-child.c (inf_child_target_info): New.
6339 (inf_child_target::info): New.
6340 (inf_child_open_target): Remove 'target' parameter. Use
6341 get_native_target instead.
6342 (inf_child_target::open): Delete.
6343 (add_inf_child_target): New.
6344 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6347 (add_inf_child_target): Declare.
6348 (inf_child_open_target): Declare.
6349 * linux-thread-db.c (thread_db_target_info): New.
6350 (thread_db_target) <shortname, longname, doc>: Delete.
6352 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6353 add_inf_child_target.
6354 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6355 add_inf_child_target.
6356 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6357 add_inf_child_target.
6358 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6359 add_inf_child_target.
6360 * make-target-delegates (print_class): Adjust.
6361 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6362 add_inf_child_target.
6363 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6364 add_inf_child_target.
6365 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6366 add_inf_child_target.
6367 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6368 add_inf_child_target.
6369 * nto-procfs.c (nto_native_target_info): New.
6370 (nto_procfs_target_native) <shortname, longname, doc>:
6373 (nto_procfs_target_info): New.
6374 (nto_procfs_target_procfs) <shortname, longname, doc>:
6377 (init_procfs_targets): Adjust.
6378 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6379 add_inf_child_target.
6380 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6381 add_inf_child_target.
6382 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6383 add_inf_child_target.
6384 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6385 add_inf_child_target.
6386 * ravenscar-thread.c (ravenscar_target_info): New.
6387 (ravenscar_thread_target) <shortname, longname, doc>:
6390 * record-btrace.c (record_btrace_target_info):
6391 (record_btrace_target) <shortname, longname, doc>: Delete.
6393 (record_btrace_target::open): Rename to ...
6394 (record_btrace_target_open): ... this. Adjust.
6395 * record-full.c (record_longname, record_doc): New.
6396 (record_full_base_target) <shortname, longname, doc>: Delete.
6398 (record_full_target_info): New.
6399 (record_full_target): <shortname>: Delete.
6401 (record_full_core_open_1, record_full_open_1): Update comments.
6402 (record_full_base_target::open): Rename to ...
6403 (record_full_open): ... this.
6404 (cmd_record_full_restore): Update.
6405 (_initialize_record_full): Update.
6406 * remote-sim.c (remote_sim_target_info): New.
6407 (gdbsim_target) <shortname, longname, doc>: Delete.
6409 (gdbsim_target::open): Rename to ...
6410 (gdbsim_target_open): ... this.
6411 (_initialize_remote_sim): Adjust.
6412 * remote.c (remote_doc): New.
6413 (remote_target_info): New.
6414 (remote_target) <shortname, longname, doc>: Delete.
6416 (extended_remote_target_info): New.
6417 (extended_remote_target) <shortname, longname, doc>: Delete.
6419 (remote_target::open_1): Make static. Adjust.
6420 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6421 * s390-linux-nat.c (_initialize_s390_nat): Use
6422 add_inf_child_target.
6423 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6424 add_inf_child_target.
6425 * sol-thread.c (thread_db_target_info): New.
6426 (sol_thread_target) <shortname, longname, doc>: Delete.
6428 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6429 add_inf_child_target.
6430 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6431 add_inf_child_target.
6432 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6433 add_inf_child_target.
6434 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6435 add_inf_child_target.
6436 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6437 add_inf_child_target.
6438 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6439 add_inf_child_target.
6440 * spu-linux-nat.c (_initialize_spu_nat): Use
6441 add_inf_child_target.
6442 * spu-multiarch.c (spu_multiarch_target_info): New.
6443 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6445 * target-delegates.c: Regenerate.
6446 * target.c: Include <unordered_map>.
6447 (target_ops_p): Delete.
6448 (DEF_VEC_P(target_ops_p)): Delete.
6449 (target_factories): New.
6450 (test_target_info): New.
6451 (test_target_ops::info): New.
6452 (open_target): Adjust to use target_factories.
6453 (add_target_with_completer): Rename to ...
6454 (add_target): ... this. Change prototype. Register target_info
6455 and open callback in target_factories. Register target_info in
6456 command context instead of target_ops.
6457 (add_target): Delete old implementation.
6458 (add_deprecated_target_alias): Change prototype. Adjust.
6459 (the_native_target): New.
6460 (set_native_target, get_native_target): New.
6461 (find_default_run_target): Use the_native_target.
6462 (find_attach_target, find_run_target): Simplify.
6463 (target_ops::open): Delete.
6464 (dummy_target_info): New.
6465 (dummy_target::shortname, dummy_target::longname)
6466 (dummy_target::doc): Delete.
6467 (dummy_target::info): New.
6468 (debug_target::shortname, debug_target::longname)
6469 (debug_target::doc): Delete.
6470 (debug_target::info): New.
6471 * target.h (struct target_info): New.
6472 (target_ops::~target_ops): Add comment.
6473 (target_ops::info): New.
6474 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6475 longer virtual. Implement in terms of target_info.
6476 (set_native_target, get_native_target): Declare.
6477 (target_open_ftype): New.
6478 (add_target, add_target_with_completer)
6479 (add_deprecated_target_alias): Change prototype.
6480 (test_target) <shortname, longname, doc>: Delete.
6482 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6483 add_inf_child_target.
6484 * tracefile-tfile.c (tfile_target_info): New.
6485 (tfile_target) <shortname, longname, doc>: Delete.
6487 (tfile_target::open): Rename to ...
6488 (tfile_target_open): ... this.
6489 (_initialize_tracefile_tfile): Adjust.
6490 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6491 add_inf_child_target.
6492 * windows-nat.c (_initialize_windows_nat): Use
6493 add_inf_child_target.
6494 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6495 add_inf_child_target.
6497 2018-05-02 Pedro Alves <palves@redhat.com>
6499 * linux-nat.h (linux_nat_target) <low_new_thread,
6500 low_delete_thread, low_new_fork, low_forget_process,
6501 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6502 New virtual methods.
6503 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6504 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6505 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6506 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6507 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6509 * linux-fork.c (delete_fork): Adjust to call low method.
6510 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6511 (linux_nat_new_fork, linux_nat_forget_process_hook)
6512 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6513 (linux_nat_status_is_event):
6514 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6515 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6517 (sigtrap_is_event): Rename to ...
6518 (linux_nat_target::low_status_is_event): ... this.
6519 (linux_nat_set_status_is_event): Delete.
6520 (save_stop_reason, linux_nat_wait_1)
6521 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6523 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6524 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6525 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6526 (linux_nat_set_prepare_to_resume): Delete.
6527 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6528 low virtual methods.
6529 * amd64-linux-nat.c: Likewise.
6530 * arm-linux-nat.c: Likewise.
6531 * i386-linux-nat.c: Likewise.
6532 * ia64-linux-nat.c: Likewise.
6533 * mips-linux-nat.c: Likewise.
6534 * ppc-linux-nat.c: Likewise.
6535 * s390-linux-nat.c: Likewise.
6536 * sparc64-linux-nat.c: Likewise.
6537 * x86-linux-nat.c: Likewise.
6538 * x86-linux-nat.h: Include "nat/x86-linux.h".
6539 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6540 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6543 2018-05-02 Pedro Alves <palves@redhat.com>
6545 * target.h (target_ops)
6546 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6547 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6548 stopped_by_watchpoint, have_continuable_watchpoint,
6549 stopped_data_address, watchpoint_addr_within_range,
6550 can_accel_watchpoint_condition, can_run, thread_alive,
6551 has_all_memory, has_memory, has_stack, has_registers,
6552 has_execution, can_async_p, is_async_p, supports_non_stop,
6553 always_non_stop_p, can_execute_reverse, supports_multi_process,
6554 supports_enable_disable_tracepoint,
6555 supports_disable_randomization, supports_string_tracing,
6556 supports_evaluation_of_breakpoint_conditions,
6557 can_run_breakpoint_commands, filesystem_is_local,
6558 can_download_tracepoint, get_trace_state_variable_value,
6559 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6560 record_is_replaying, record_will_replay,
6561 augmented_libraries_svr4_read>: Adjust to return bool.
6562 * aarch64-linux-nat.c: All implementations adjusted.
6563 * aix-thread.c: All implementations adjusted.
6564 * arm-linux-nat.c: All implementations adjusted.
6565 * breakpoint.c: All implementations adjusted.
6566 * bsd-kvm.c: All implementations adjusted.
6567 * bsd-uthread.c: All implementations adjusted.
6568 * corelow.c: All implementations adjusted.
6569 * ctf.c: All implementations adjusted.
6570 * darwin-nat.c: All implementations adjusted.
6571 * darwin-nat.h: All implementations adjusted.
6572 * exec.c: All implementations adjusted.
6573 * fbsd-nat.c: All implementations adjusted.
6574 * fbsd-nat.h: All implementations adjusted.
6575 * gnu-nat.c: All implementations adjusted.
6576 * gnu-nat.h: All implementations adjusted.
6577 * go32-nat.c: All implementations adjusted.
6578 * ia64-linux-nat.c: All implementations adjusted.
6579 * inf-child.c: All implementations adjusted.
6580 * inf-child.h: All implementations adjusted.
6581 * inf-ptrace.c: All implementations adjusted.
6582 * inf-ptrace.h: All implementations adjusted.
6583 * linux-nat.c: All implementations adjusted.
6584 * linux-nat.h: All implementations adjusted.
6585 * mips-linux-nat.c: All implementations adjusted.
6586 * nto-procfs.c: All implementations adjusted.
6587 * ppc-linux-nat.c: All implementations adjusted.
6588 * procfs.c: All implementations adjusted.
6589 * ravenscar-thread.c: All implementations adjusted.
6590 * record-btrace.c: All implementations adjusted.
6591 * record-full.c: All implementations adjusted.
6592 * remote-sim.c: All implementations adjusted.
6593 * remote.c: All implementations adjusted.
6594 * s390-linux-nat.c: All implementations adjusted.
6595 * sol-thread.c: All implementations adjusted.
6596 * spu-multiarch.c: All implementations adjusted.
6597 * target-delegates.c: All implementations adjusted.
6598 * target.c: All implementations adjusted.
6599 * target.h: All implementations adjusted.
6600 * tracefile-tfile.c: All implementations adjusted.
6601 * tracefile.c: All implementations adjusted.
6602 * tracefile.h: All implementations adjusted.
6603 * windows-nat.c: All implementations adjusted.
6604 * x86-linux-nat.h: All implementations adjusted.
6605 * x86-nat.h: All implementations adjusted.
6607 2018-05-02 Pedro Alves <palves@redhat.com>
6609 * make-target-delegates (scan_target_h): Don't trim lines here.
6610 Replace sequences of tabs and/or whitespace with a single
6612 (top level, parsing methods): Trim each line before processing it
6615 2018-05-02 Pedro Alves <palves@redhat.com>
6616 John Baldwin <jhb@freebsd.org>
6618 * target.h (enum strata) <debug_stratum>: New.
6619 (struct target_ops) <all delegation methods>: Replace by C++
6620 virtual methods, and drop "to_" prefix. All references updated
6622 <to_shortname, to_longname, to_doc, to_data,
6623 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6624 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6625 virtual methods. All references updated throughout.
6626 <can_attach, supports_terminal_ours, can_create_inferior,
6627 get_thread_control_capabilities, attach_no_wait>: New
6629 <insert_breakpoint, remove_breakpoint>: Now
6630 TARGET_DEFAULT_NORETURN methods.
6631 <info_proc>: Now returns bool.
6633 (OPS_MAGIC): Delete.
6634 (current_target): Delete. All references replaced by references
6636 (target_stack): ... this. New.
6637 (target_shortname, target_longname): Adjust.
6638 (target_can_run): Now a function declaration.
6639 (default_child_has_all_memory, default_child_has_memory)
6640 (default_child_has_stack, default_child_has_registers)
6641 (default_child_has_execution): Remove target_ops parameter.
6642 (complete_target_initialization): Delete.
6643 (memory_breakpoint_target): New template class.
6644 (test_target_ops): Refactor as a C++ class with virtual methods.
6645 * make-target-delegates (NAME_PART): Tighten.
6646 (POINTER_PART, CP_SYMBOL): New.
6647 (SIMPLE_RETURN_PART): Reimplement.
6648 (VEC_RETURN_PART): Expect less.
6649 (RETURN_PART, VIRTUAL_PART): New.
6650 (METHOD): Adjust to C++ virtual methods.
6651 (scan_target_h): Remove reference to C99.
6652 (dname): Output "target_ops::" prefix.
6653 (write_function_header): Adjust to output a C++ class method.
6654 (write_declaration): New.
6655 (write_delegator): Adjust to output a C++ class method.
6656 (tdname): Output "dummy_target::" prefix.
6657 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6659 (tdefault_names, debug_names): Delete.
6660 (return_types, tdefaults, styles, argtypes_array): New.
6661 (top level): All methods are delegators.
6663 (top level): Print dummy_target and debug_target classes.
6664 * target-delegates.c: Regenerate.
6665 * target-debug.h (target_debug_print_enum_info_proc_what)
6666 (target_debug_print_thread_control_capabilities)
6667 (target_debug_print_thread_info_p): New.
6668 * target.c (dummy_target): Delete.
6669 (the_dummy_target, the_debug_target): New.
6670 (target_stack): Now extern.
6671 (set_targetdebug): Push/unpush debug target.
6672 (default_child_has_all_memory, default_child_has_memory)
6673 (default_child_has_stack, default_child_has_registers)
6674 (default_child_has_execution): Remove target_ops parameter.
6675 (complete_target_initialization): Delete.
6676 (add_target_with_completer): No longer call
6677 complete_target_initialization.
6678 (target_supports_terminal_ours): Use regular delegation.
6679 (update_current_target): Delete.
6680 (push_target): No longer check magic number. Don't call
6681 update_current_target.
6682 (unpush_target): Don't call update_current_target.
6683 (target_is_pushed): No longer check magic number.
6684 (target_require_runnable): Skip for all stratums over
6686 (target_ops::info_proc): New.
6687 (target_info_proc): Use find_target_at and
6688 find_default_run_target.
6689 (target_supports_disable_randomization): Use regular delegation.
6690 (target_get_osdata): Use find_target_at.
6691 (target_ops::open, target_ops::close, target_ops::can_attach)
6692 (target_ops::attach, target_ops::can_create_inferior)
6693 (target_ops::create_inferior, target_ops::can_run)
6694 (target_can_run): New.
6695 (default_fileio_target): Use regular delegation.
6696 (target_ops::fileio_open, target_ops::fileio_pwrite)
6697 (target_ops::fileio_pread, target_ops::fileio_fstat)
6698 (target_ops::fileio_close, target_ops::fileio_unlink)
6699 (target_ops::fileio_readlink): New.
6700 (target_fileio_open_1, target_fileio_unlink)
6701 (target_fileio_readlink): Always call the target method. Handle
6703 (return_zero, return_zero_has_execution): Delete.
6704 (init_dummy_target): Delete.
6705 (dummy_target::dummy_target, dummy_target::shortname)
6706 (dummy_target::longname, dummy_target::doc)
6707 (debug_target::debug_target, debug_target::shortname)
6708 (debug_target::longname, debug_target::doc): New.
6709 (target_supports_delete_record): Use regular delegation.
6710 (setup_target_debug): Delete.
6711 (maintenance_print_target_stack): Skip debug_stratum.
6712 (initialize_targets): Instantiate the_dummy_target and
6714 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6716 (target_auxv_search, fprint_target_auxv): Adjust.
6717 (info_auxv_command): Adjust to use target_stack.
6718 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6719 * exceptions.c (print_flush): Handle a NULL target_stack.
6720 * regcache.c (target_ops_no_register): Refactor as class with
6723 * exec.c (exec_target): New class.
6724 (exec_ops): Now an exec_target.
6725 (exec_open, exec_close_1, exec_get_section_table)
6726 (exec_xfer_partial, exec_files_info, exec_has_memory)
6727 (exec_make_note_section): Refactor as exec_target methods.
6728 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6730 (exec_target::find_memory_regions): New.
6731 (_initialize_exec): Don't call init_exec_ops.
6732 * gdbcore.h (exec_file_clear): Delete.
6734 * corefile.c (core_target): Delete.
6735 (core_file_command): Adjust.
6736 * corelow.c (core_target): New class.
6737 (the_core_target): New.
6738 (core_close): Remove target_ops parameter.
6739 (core_close_cleanup): Adjust.
6740 (core_target::close): New.
6741 (core_open, core_detach, get_core_registers, core_files_info)
6742 (core_xfer_partial, core_thread_alive, core_read_description)
6743 (core_pid_to_str, core_thread_name, core_has_memory)
6744 (core_has_stack, core_has_registers, core_info_proc): Rework as
6745 core_target methods.
6746 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6747 (_initialize_corelow): Initialize the_core_target.
6748 * gdbcore.h (core_target): Delete.
6749 (the_core_target): New.
6751 * ctf.c: (ctf_target): New class.
6752 (ctf_ops): Now a ctf_target.
6753 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6754 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6755 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6757 (init_ctf_ops): Delete.
6758 (_initialize_ctf): Don't call it.
6759 * tracefile-tfile.c (tfile_target): New class.
6760 (tfile_ops): Now a tfile_target.
6761 (tfile_open, tfile_close, tfile_files_info)
6762 (tfile_get_tracepoint_status, tfile_trace_find)
6763 (tfile_fetch_registers, tfile_xfer_partial)
6764 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6765 Refactor as tfile_target methods.
6766 (tfile_xfer_partial_features): Remove target_ops parameter.
6767 (init_tfile_ops): Delete.
6768 (_initialize_tracefile_tfile): Don't call it.
6769 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6770 (tracefile_has_stack, tracefile_has_registers)
6771 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6772 tracefile_target methods.
6773 (init_tracefile_ops): Delete.
6774 (tracefile_target::tracefile_target): New.
6775 * tracefile.h: Include "target.h".
6776 (tracefile_target): New class.
6777 (init_tracefile_ops): Delete.
6779 * spu-multiarch.c (spu_multiarch_target): New class.
6780 (spu_ops): Now a spu_multiarch_target.
6781 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6782 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6783 (spu_search_memory, spu_mourn_inferior): Refactor as
6784 spu_multiarch_target methods.
6785 (init_spu_ops): Delete.
6786 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6787 complete_target_initialization.
6789 * ravenscar-thread.c (ravenscar_thread_target): New class.
6790 (ravenscar_ops): Now a ravenscar_thread_target.
6791 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6792 (ravenscar_thread_alive, ravenscar_pid_to_str)
6793 (ravenscar_fetch_registers, ravenscar_store_registers)
6794 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6795 (ravenscar_stopped_by_hw_breakpoint)
6796 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6797 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6798 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6800 (init_ravenscar_thread_ops): Delete.
6801 (_initialize_ravenscar): Remove references to
6802 init_ravenscar_thread_ops and complete_target_initialization.
6804 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6805 (bsd_uthread_target): New class.
6806 (bsd_uthread_ops): Now a bsd_uthread_target.
6807 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6808 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6809 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6810 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6811 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6812 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6813 (bsd_uthread_target): Delete function.
6814 (_initialize_bsd_uthread): Remove reference to
6815 complete_target_initialization.
6817 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6818 (target_bfd): ... this new class.
6819 (target_bfd_xfer_partial, target_bfd_get_section_table)
6820 (target_bfd_close): Refactor as target_bfd methods.
6821 (target_bfd::~target_bfd): New.
6822 (target_bfd_reopen): Adjust.
6823 (target_bfd::close): New.
6825 * record-btrace.c (record_btrace_target): New class.
6826 (record_btrace_ops): Now a record_btrace_target.
6827 (record_btrace_open, record_btrace_stop_recording)
6828 (record_btrace_disconnect, record_btrace_close)
6829 (record_btrace_async, record_btrace_info)
6830 (record_btrace_insn_history, record_btrace_insn_history_range)
6831 (record_btrace_insn_history_from, record_btrace_call_history)
6832 (record_btrace_call_history_range)
6833 (record_btrace_call_history_from, record_btrace_record_method)
6834 (record_btrace_is_replaying, record_btrace_will_replay)
6835 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6836 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6837 (record_btrace_store_registers, record_btrace_prepare_to_store)
6838 (record_btrace_to_get_unwinder)
6839 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6840 (record_btrace_commit_resume, record_btrace_wait)
6841 (record_btrace_stop, record_btrace_can_execute_reverse)
6842 (record_btrace_stopped_by_sw_breakpoint)
6843 (record_btrace_supports_stopped_by_sw_breakpoint)
6844 (record_btrace_stopped_by_hw_breakpoint)
6845 (record_btrace_supports_stopped_by_hw_breakpoint)
6846 (record_btrace_update_thread_list, record_btrace_thread_alive)
6847 (record_btrace_goto_begin, record_btrace_goto_end)
6848 (record_btrace_goto, record_btrace_stop_replaying_all)
6849 (record_btrace_execution_direction)
6850 (record_btrace_prepare_to_generate_core)
6851 (record_btrace_done_generating_core): Refactor as
6852 record_btrace_target methods.
6853 (init_record_btrace_ops): Delete.
6854 (_initialize_record_btrace): Remove reference to
6855 init_record_btrace_ops.
6856 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6857 the execution_direction global.
6858 (record_full_base_target, record_full_target)
6859 (record_full_core_target): New classes.
6860 (record_full_ops): Now a record_full_target.
6861 (record_full_core_ops): Now a record_full_core_target.
6862 (record_full_target::detach, record_full_target::disconnect)
6863 (record_full_core_target::disconnect)
6864 (record_full_target::mourn_inferior, record_full_target::kill):
6866 (record_full_open, record_full_close, record_full_async): Refactor
6867 as methods of the record_full_base_target class.
6868 (record_full_resume, record_full_commit_resume): Refactor
6869 as methods of the record_full_target class.
6870 (record_full_wait, record_full_stopped_by_watchpoint)
6871 (record_full_stopped_data_address)
6872 (record_full_stopped_by_sw_breakpoint)
6873 (record_full_supports_stopped_by_sw_breakpoint)
6874 (record_full_stopped_by_hw_breakpoint)
6875 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6876 methods of the record_full_base_target class.
6877 (record_full_store_registers, record_full_xfer_partial)
6878 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6879 Refactor as methods of the record_full_target class.
6880 (record_full_can_execute_reverse, record_full_get_bookmark)
6881 (record_full_goto_bookmark, record_full_execution_direction)
6882 (record_full_record_method, record_full_info, record_full_delete)
6883 (record_full_is_replaying, record_full_will_replay)
6884 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6885 (record_full_stop_replaying): Refactor as methods of the
6886 record_full_base_target class.
6887 (record_full_core_resume, record_full_core_kill)
6888 (record_full_core_fetch_registers)
6889 (record_full_core_prepare_to_store)
6890 (record_full_core_store_registers, record_full_core_xfer_partial)
6891 (record_full_core_insert_breakpoint)
6892 (record_full_core_remove_breakpoint)
6893 (record_full_core_has_execution): Refactor
6894 as methods of the record_full_core_target class.
6895 (record_full_base_target::supports_delete_record): New.
6896 (init_record_full_ops): Delete.
6897 (init_record_full_core_ops): Delete.
6898 (record_full_save): Refactor as method of the
6899 record_full_base_target class.
6900 (_initialize_record_full): Remove references to
6901 init_record_full_ops and init_record_full_core_ops.
6903 * remote.c (remote_target, extended_remote_target): New classes.
6904 (remote_ops): Now a remote_target.
6905 (extended_remote_ops): Now an extended_remote_target.
6906 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6907 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6908 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6909 (remote_pass_signals, remote_set_syscall_catchpoint)
6910 (remote_program_signals, )
6911 (remote_thread_always_alive): Remove target_ops parameter.
6912 (remote_thread_alive, remote_thread_name)
6913 (remote_update_thread_list, remote_threads_extra_info)
6914 (remote_static_tracepoint_marker_at)
6915 (remote_static_tracepoint_markers_by_strid)
6916 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6917 (remote_open): Refactor as methods of remote_target.
6918 (extended_remote_open, extended_remote_detach)
6919 (extended_remote_attach, extended_remote_post_attach):
6920 (extended_remote_supports_disable_randomization)
6921 (extended_remote_create_inferior): : Refactor as method of
6922 extended_remote_target.
6923 (remote_set_permissions, remote_open_1, remote_detach)
6924 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6925 (remote_resume, remote_commit_resume, remote_stop)
6926 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6927 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6928 (remote_prepare_to_store, remote_store_registers)
6929 (remote_flash_erase, remote_flash_done, remote_files_info)
6930 (remote_kill, remote_mourn, remote_insert_breakpoint)
6931 (remote_remove_breakpoint, remote_insert_watchpoint)
6932 (remote_watchpoint_addr_within_range)
6933 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6934 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6935 (remote_supports_stopped_by_sw_breakpoint)
6936 (remote_stopped_by_hw_breakpoint)
6937 (remote_supports_stopped_by_hw_breakpoint)
6938 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6939 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6940 (remote_verify_memory): Refactor as methods of remote_target.
6941 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6943 (remote_xfer_partial, remote_get_memory_xfer_limit)
6944 (remote_search_memory, remote_rcmd, remote_memory_map)
6945 (remote_pid_to_str, remote_get_thread_local_address)
6946 (remote_get_tib_address, remote_read_description): Refactor as
6947 methods of remote_target.
6948 (remote_target::fileio_open, remote_target::fileio_pwrite)
6949 (remote_target::fileio_pread, remote_target::fileio_close): New.
6950 (remote_hostio_readlink, remote_hostio_fstat)
6951 (remote_filesystem_is_local, remote_can_execute_reverse)
6952 (remote_supports_non_stop, remote_supports_disable_randomization)
6953 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6954 (remote_supports_enable_disable_tracepoint)
6955 (remote_supports_string_tracing)
6956 (remote_can_run_breakpoint_commands, remote_trace_init)
6957 (remote_download_tracepoint, remote_can_download_tracepoint)
6958 (remote_download_trace_state_variable, remote_enable_tracepoint)
6959 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6960 (remote_trace_start, remote_get_trace_status)
6961 (remote_get_tracepoint_status, remote_trace_stop)
6962 (remote_trace_find, remote_get_trace_state_variable_value)
6963 (remote_save_trace_data, remote_get_raw_trace_data)
6964 (remote_set_disconnected_tracing, remote_core_of_thread)
6965 (remote_set_circular_trace_buffer, remote_traceframe_info)
6966 (remote_get_min_fast_tracepoint_insn_len)
6967 (remote_set_trace_buffer_size, remote_set_trace_notes)
6968 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6969 (remote_disable_btrace, remote_teardown_btrace)
6970 (remote_read_btrace, remote_btrace_conf)
6971 (remote_augmented_libraries_svr4_read, remote_load)
6972 (remote_pid_to_exec_file, remote_can_do_single_step)
6973 (remote_execution_direction, remote_thread_handle_to_thread_info):
6974 Refactor as methods of remote_target.
6975 (init_remote_ops, init_extended_remote_ops): Delete.
6976 (remote_can_async_p, remote_is_async_p, remote_async)
6977 (remote_thread_events, remote_upload_tracepoints)
6978 (remote_upload_trace_state_variables): Refactor as methods of
6980 (_initialize_remote): Remove references to init_remote_ops and
6981 init_extended_remote_ops.
6983 * remote-sim.c (gdbsim_target): New class.
6984 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6985 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6986 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6987 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6988 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6989 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6990 Refactor as methods of gdbsim_target.
6991 (gdbsim_ops): Now a gdbsim_target.
6992 (init_gdbsim_ops): Delete.
6993 (gdbsim_cntrl_c): Adjust.
6994 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6996 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6997 (the_amd64_linux_nat_target): New.
6998 (amd64_linux_fetch_inferior_registers)
6999 (amd64_linux_store_inferior_registers): Refactor as methods of
7000 amd64_linux_nat_target.
7001 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7002 * i386-linux-nat.c: Don't include "linux-nat.h".
7003 (i386_linux_nat_target): New class.
7004 (the_i386_linux_nat_target): New.
7005 (i386_linux_fetch_inferior_registers)
7006 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7007 as methods of i386_linux_nat_target.
7008 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7009 * inf-child.c (inf_child_ops): Delete.
7010 (inf_child_fetch_inferior_registers)
7011 (inf_child_store_inferior_registers): Delete.
7012 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7013 methods of inf_child_target.
7014 (inf_child_target::supports_terminal_ours)
7015 (inf_child_target::terminal_init)
7016 (inf_child_target::terminal_inferior)
7017 (inf_child_target::terminal_ours_for_output)
7018 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7019 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7021 (inf_child_open, inf_child_disconnect, inf_child_close)
7022 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7023 (inf_child_post_startup_inferior, inf_child_can_run)
7024 (inf_child_pid_to_exec_file): Refactor as methods of
7026 (inf_child_follow_fork): Delete.
7027 (inf_child_target::can_create_inferior)
7028 (inf_child_target::can_attach): New.
7029 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7030 (inf_child_target::has_stack, inf_child_target::has_registers)
7031 (inf_child_target::has_execution): New.
7032 (inf_child_fileio_open, inf_child_fileio_pwrite)
7033 (inf_child_fileio_pread, inf_child_fileio_fstat)
7034 (inf_child_fileio_close, inf_child_fileio_unlink)
7035 (inf_child_fileio_readlink, inf_child_use_agent)
7036 (inf_child_can_use_agent): Refactor as methods of
7038 (return_zero, inf_child_target): Delete.
7039 (inf_child_target::inf_child_target): New.
7040 * inf-child.h: Include "target.h".
7041 (inf_child_target): Delete function prototype.
7042 (inf_child_target): New class.
7043 (inf_child_open_target, inf_child_mourn_inferior)
7044 (inf_child_maybe_unpush_target): Delete.
7045 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7046 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7047 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7048 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7049 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7050 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7051 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7052 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7053 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7054 methods of inf_ptrace_target.
7055 (inf_ptrace_target): Delete function.
7056 * inf-ptrace.h: Include "inf-child.h".
7057 (inf_ptrace_target): Delete function declaration.
7058 (inf_ptrace_target): New class.
7059 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7060 * linux-nat.c (linux_target): New.
7061 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7062 (linux_nat_target::~linux_nat_target): New.
7063 (linux_child_post_attach, linux_child_post_startup_inferior)
7064 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7065 (linux_child_remove_fork_catchpoint)
7066 (linux_child_insert_vfork_catchpoint)
7067 (linux_child_remove_vfork_catchpoint)
7068 (linux_child_insert_exec_catchpoint)
7069 (linux_child_remove_exec_catchpoint)
7070 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7071 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7072 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7073 (linux_nat_stopped_data_address)
7074 (linux_nat_stopped_by_sw_breakpoint)
7075 (linux_nat_supports_stopped_by_sw_breakpoint)
7076 (linux_nat_stopped_by_hw_breakpoint)
7077 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7078 (linux_nat_kill, linux_nat_mourn_inferior)
7079 (linux_nat_xfer_partial, linux_nat_thread_alive)
7080 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7081 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7082 (linux_child_static_tracepoint_markers_by_strid)
7083 (linux_nat_is_async_p, linux_nat_can_async_p)
7084 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7085 (linux_nat_supports_multi_process)
7086 (linux_nat_supports_disable_randomization, linux_nat_async)
7087 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7088 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7089 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7090 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7091 methods of linux_nat_target.
7092 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7093 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7095 (check_stopped_by_watchpoint): Adjust.
7096 (linux_xfer_partial): Delete.
7097 (linux_target_install_ops, linux_target, linux_nat_add_target):
7099 (linux_nat_target::linux_nat_target): New.
7100 * linux-nat.h: Include "inf-ptrace.h".
7101 (linux_nat_target): New.
7102 (linux_target, linux_target_install_ops, linux_nat_add_target):
7103 Delete function declarations.
7104 (linux_target): Declare global.
7105 * linux-thread-db.c (thread_db_target): New.
7106 (thread_db_target::thread_db_target): New.
7107 (thread_db_ops): Delete.
7108 (the_thread_db_target): New.
7109 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7110 (thread_db_update_thread_list, thread_db_pid_to_str)
7111 (thread_db_extra_thread_info)
7112 (thread_db_thread_handle_to_thread_info)
7113 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7114 (thread_db_resume): Refactor as methods of thread_db_target.
7115 (init_thread_db_ops): Delete.
7116 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7117 * x86-linux-nat.c: Don't include "linux-nat.h".
7118 (super_post_startup_inferior): Delete.
7119 (x86_linux_nat_target::~x86_linux_nat_target): New.
7120 (x86_linux_child_post_startup_inferior)
7121 (x86_linux_read_description, x86_linux_enable_btrace)
7122 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7123 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7124 methods of x86_linux_nat_target.
7125 (x86_linux_create_target): Delete. Bits folded ...
7126 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7128 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7129 (x86_linux_nat_target): New class.
7130 (x86_linux_create_target): Delete.
7131 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7132 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7133 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7134 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7135 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7136 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7138 (x86_use_watchpoints): Delete.
7139 * x86-nat.h: Include "breakpoint.h" and "target.h".
7140 (x86_use_watchpoints): Delete.
7141 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7142 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7143 (x86_insert_watchpoint, x86_remove_watchpoint)
7144 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7145 (x86_stopped_by_hw_breakpoint): New declarations.
7146 (x86_nat_target): New template class.
7148 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7149 (the_ppc_linux_nat_target): New.
7150 (ppc_linux_fetch_inferior_registers)
7151 (ppc_linux_can_use_hw_breakpoint)
7152 (ppc_linux_region_ok_for_hw_watchpoint)
7153 (ppc_linux_ranged_break_num_registers)
7154 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7155 (ppc_linux_insert_mask_watchpoint)
7156 (ppc_linux_remove_mask_watchpoint)
7157 (ppc_linux_can_accel_watchpoint_condition)
7158 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7159 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7160 (ppc_linux_watchpoint_addr_within_range)
7161 (ppc_linux_masked_watch_num_registers)
7162 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7163 (ppc_linux_read_description): Refactor as methods of
7164 ppc_linux_nat_target.
7165 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7167 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7168 (procfs_target): New class.
7169 (the_procfs_target): New.
7170 (procfs_target): Delete function.
7171 (procfs_auxv_parse, procfs_attach, procfs_detach)
7172 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7173 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7174 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7175 (procfs_create_inferior, procfs_update_thread_list)
7176 (procfs_thread_alive, procfs_pid_to_str)
7177 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7178 (procfs_stopped_data_address, procfs_insert_watchpoint)
7179 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7180 (proc_find_memory_regions, procfs_info_proc)
7181 (procfs_make_note_section): Refactor as methods of procfs_target.
7182 (_initialize_procfs): Adjust.
7183 * sol-thread.c (sol_thread_target): New class.
7184 (sol_thread_ops): Now a sol_thread_target.
7185 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7186 (sol_thread_fetch_registers, sol_thread_store_registers)
7187 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7188 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7189 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7190 (init_sol_thread_ops): Delete.
7191 (_initialize_sol_thread): Adjust. Remove references to
7192 init_sol_thread_ops and complete_target_initialization.
7194 * windows-nat.c (windows_nat_target): New class.
7195 (windows_fetch_inferior_registers)
7196 (windows_store_inferior_registers, windows_resume, windows_wait)
7197 (windows_attach, windows_detach, windows_pid_to_exec_file)
7198 (windows_files_info, windows_create_inferior)
7199 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7200 (windows_close, windows_pid_to_str, windows_xfer_partial)
7201 (windows_get_tib_address, windows_get_ada_task_ptid)
7202 (windows_thread_name, windows_thread_alive): Refactor as
7203 windows_nat_target methods.
7204 (do_initial_windows_stuff): Adjust.
7205 (windows_target): Delete function.
7206 (_initialize_windows_nat): Adjust.
7208 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7209 (darwin_mourn_inferior, darwin_kill_inferior)
7210 (darwin_create_inferior, darwin_attach, darwin_detach)
7211 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7212 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7213 (darwin_supports_multi_process): Refactor as darwin_nat_target
7215 (darwin_resume_to, darwin_files_info): Delete.
7216 (_initialize_darwin_inferior): Rename to ...
7217 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7218 * darwin-nat.h: Include "inf-child.h".
7219 (darwin_nat_target): New class.
7220 (darwin_complete_target): Delete.
7221 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7222 (darwin_target): New.
7223 (i386_darwin_fetch_inferior_registers)
7224 (i386_darwin_store_inferior_registers): Refactor as methods of
7226 (darwin_complete_target): Delete, with ...
7227 (_initialize_i386_darwin_nat): ... bits factored out here.
7229 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7230 (the_alpha_linux_nat_target): New.
7231 (alpha_linux_register_u_offset): Refactor as
7232 alpha_linux_nat_target method.
7233 (_initialize_alpha_linux_nat): Adjust.
7234 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7235 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7236 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7237 methods of linux_nat_trad_target.
7238 (linux_trad_target): Delete.
7239 * linux-nat-trad.h (linux_trad_target): Delete function.
7240 (linux_nat_trad_target): New class.
7241 * mips-linux-nat.c (mips_linux_nat_target): New class.
7242 (super_fetch_registers, super_store_registers, super_close):
7244 (the_mips_linux_nat_target): New.
7245 (mips64_linux_regsets_fetch_registers)
7246 (mips64_linux_regsets_store_registers)
7247 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7248 (mips_linux_register_u_offset, mips_linux_read_description)
7249 (mips_linux_can_use_hw_breakpoint)
7250 (mips_linux_stopped_by_watchpoint)
7251 (mips_linux_stopped_data_address)
7252 (mips_linux_region_ok_for_hw_watchpoint)
7253 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7254 (mips_linux_close): Refactor as methods of mips_linux_nat.
7255 (_initialize_mips_linux_nat): Adjust to C++ification.
7257 * aix-thread.c (aix_thread_target): New class.
7258 (aix_thread_ops): Now an aix_thread_target.
7259 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7260 (aix_thread_fetch_registers, aix_thread_store_registers)
7261 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7262 (aix_thread_thread_alive, aix_thread_pid_to_str)
7263 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7264 Refactor as methods of aix_thread_target.
7265 (init_aix_thread_ops): Delete.
7266 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7267 and complete_target_initialization.
7268 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7269 (rs6000_nat_target): New class.
7270 (the_rs6000_nat_target): New.
7271 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7272 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7273 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7274 (super_create_inferior): Delete.
7275 (_initialize_rs6000_nat): Adjust to C++ification.
7277 * arm-linux-nat.c (arm_linux_nat_target): New class.
7278 (the_arm_linux_nat_target): New.
7279 (arm_linux_fetch_inferior_registers)
7280 (arm_linux_store_inferior_registers, arm_linux_read_description)
7281 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7282 (arm_linux_remove_hw_breakpoint)
7283 (arm_linux_region_ok_for_hw_watchpoint)
7284 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7285 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7286 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7287 arm_linux_nat_target.
7288 (_initialize_arm_linux_nat): Adjust to C++ification.
7290 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7291 (the_aarch64_linux_nat_target): New.
7292 (aarch64_linux_fetch_inferior_registers)
7293 (aarch64_linux_store_inferior_registers)
7294 (aarch64_linux_child_post_startup_inferior)
7295 (aarch64_linux_read_description)
7296 (aarch64_linux_can_use_hw_breakpoint)
7297 (aarch64_linux_insert_hw_breakpoint)
7298 (aarch64_linux_remove_hw_breakpoint)
7299 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7300 (aarch64_linux_region_ok_for_hw_watchpoint)
7301 (aarch64_linux_stopped_data_address)
7302 (aarch64_linux_stopped_by_watchpoint)
7303 (aarch64_linux_watchpoint_addr_within_range)
7304 (aarch64_linux_can_do_single_step): Refactor as methods of
7305 aarch64_linux_nat_target.
7306 (super_post_startup_inferior): Delete.
7307 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7309 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7310 (the_hppa_linux_nat_target): New.
7311 (hppa_linux_fetch_inferior_registers)
7312 (hppa_linux_store_inferior_registers): Refactor as methods of
7313 hppa_linux_nat_target.
7314 (_initialize_hppa_linux_nat): Adjust to C++ification.
7316 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7317 (the_ia64_linux_nat_target): New.
7318 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7319 (ia64_linux_stopped_data_address)
7320 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7321 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7322 ia64_linux_nat_target methods.
7323 (super_xfer_partial): Delete.
7324 (_initialize_ia64_linux_nat): Adjust to C++ification.
7326 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7327 (the_m32r_linux_nat_target): New.
7328 (m32r_linux_fetch_inferior_registers)
7329 (m32r_linux_store_inferior_registers): Refactor as
7330 m32r_linux_nat_target methods.
7331 (_initialize_m32r_linux_nat): Adjust to C++ification.
7333 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7334 (the_m68k_linux_nat_target): New.
7335 (m68k_linux_fetch_inferior_registers)
7336 (m68k_linux_store_inferior_registers): Refactor as
7337 m68k_linux_nat_target methods.
7338 (_initialize_m68k_linux_nat): Adjust to C++ification.
7340 * s390-linux-nat.c (s390_linux_nat_target): New class.
7341 (the_s390_linux_nat_target): New.
7342 (s390_linux_fetch_inferior_registers)
7343 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7344 (s390_insert_watchpoint, s390_remove_watchpoint)
7345 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7346 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7347 (s390_auxv_parse, s390_read_description): Refactor as methods of
7348 s390_linux_nat_target.
7349 (_initialize_s390_nat): Adjust to C++ification.
7351 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7352 (the_sparc_linux_nat_target): New.
7353 (_initialize_sparc_linux_nat): Adjust to C++ification.
7354 * sparc-nat.c (sparc_fetch_inferior_registers)
7355 (sparc_store_inferior_registers): Remove target_ops parameter.
7356 * sparc-nat.h (sparc_fetch_inferior_registers)
7357 (sparc_store_inferior_registers): Remove target_ops parameter.
7358 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7359 (the_sparc64_linux_nat_target): New.
7360 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7362 * spu-linux-nat.c (spu_linux_nat_target): New class.
7363 (the_spu_linux_nat_target): New.
7364 (spu_child_post_startup_inferior, spu_child_post_attach)
7365 (spu_child_wait, spu_fetch_inferior_registers)
7366 (spu_store_inferior_registers, spu_xfer_partial)
7367 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7369 (_initialize_spu_nat): Adjust to C++ification.
7371 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7372 (the_tilegx_linux_nat_target): New.
7373 (fetch_inferior_registers, store_inferior_registers):
7374 Refactor as methods.
7375 (_initialize_tile_linux_nat): Adjust to C++ification.
7377 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7378 (the_xtensa_linux_nat_target): New.
7379 (xtensa_linux_fetch_inferior_registers)
7380 (xtensa_linux_store_inferior_registers): Refactor as
7381 xtensa_linux_nat_target methods.
7382 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7384 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7385 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7386 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7387 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7388 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7389 (fbsd_stopped_by_sw_breakpoint)
7390 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7391 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7392 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7393 (fbsd_post_startup_inferior, fbsd_post_attach)
7394 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7395 (fbsd_set_syscall_catchpoint)
7396 (super_xfer_partial, super_resume, super_wait)
7397 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7398 (fbsd_handle_debug_trap): Remove target_ops parameter.
7399 (fbsd_nat_add_target): Delete.
7400 * fbsd-nat.h: Include "inf-ptrace.h".
7401 (fbsd_nat_add_target): Delete.
7402 (USE_SIGTRAP_SIGINFO): Define.
7403 (fbsd_nat_target): New class.
7405 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7406 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7407 (amd64bsd_target): Delete.
7408 * amd64-bsd-nat.h: New file.
7409 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7411 (amd64_fbsd_nat_target): New class.
7412 (the_amd64_fbsd_nat_target): New.
7413 (amd64fbsd_read_description): Refactor as method of
7414 amd64_fbsd_nat_target.
7415 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7416 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7417 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7418 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7419 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7420 (i386bsd_target): Delete.
7421 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7422 (i386bsd_fetch_inferior_registers)
7423 (i386bsd_store_inferior_registers): Declare.
7424 (i386_bsd_nat_target): New class.
7425 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7426 (the_i386_fbsd_nat_target): New.
7427 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7428 i386_fbsd_nat_target methods.
7429 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7430 (_initialize_i386fbsd_nat): Adjust to C++ification.
7431 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7432 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7433 (_initialize_x86_bsd_nat): Adjust to C++ification.
7434 * x86-bsd-nat.h: Include "x86-nat.h".
7435 (x86bsd_target): Delete declaration.
7436 (x86bsd_nat_target): New class.
7438 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7439 (the_aarch64_fbsd_nat_target): New.
7440 (aarch64_fbsd_fetch_inferior_registers)
7441 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7442 aarch64_fbsd_nat_target.
7443 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7444 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7445 (the_alpha_bsd_nat_target): New.
7446 (alphabsd_fetch_inferior_registers)
7447 (alphabsd_store_inferior_registers): Refactor as
7448 alpha_bsd_nat_target methods.
7449 (_initialize_alphabsd_nat): Refactor as methods of
7450 alpha_bsd_nat_target.
7451 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7452 (the_amd64_nbsd_nat_target): New.
7453 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7454 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7455 (the_amd64_obsd_nat_target): New.
7456 (_initialize_amd64obsd_nat): Adjust to C++ification.
7457 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7458 (the_arm_fbsd_nat_target): New.
7459 (arm_fbsd_fetch_inferior_registers)
7460 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7461 (_initialize_arm_fbsd_nat): Refactor as methods of
7462 arm_fbsd_nat_target.
7463 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7464 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7465 (the_arm_netbsd_nat_target): New.
7466 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7467 arm_netbsd_nat_target.
7468 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7469 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7470 (the_hppa_nbsd_nat_target): New.
7471 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7472 hppa_nbsd_nat_target methods.
7473 (_initialize_hppanbsd_nat): Adjust to C++ification.
7474 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7475 (the_hppa_obsd_nat_target): New.
7476 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7477 methods of hppa_obsd_nat_target.
7478 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7480 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7481 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7483 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7484 (_initialize_i386obsd_nat): Use add_target.
7485 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7486 (the_m68k_bsd_nat_target): New.
7487 (m68kbsd_fetch_inferior_registers)
7488 (m68kbsd_store_inferior_registers): Refactor as methods of
7489 m68k_bsd_nat_target.
7490 (_initialize_m68kbsd_nat): Adjust to C++ification.
7491 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7492 (the_mips_fbsd_nat_target): New.
7493 (mips_fbsd_fetch_inferior_registers)
7494 (mips_fbsd_store_inferior_registers): Refactor as methods of
7495 mips_fbsd_nat_target.
7496 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7498 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7499 (the_mips_nbsd_nat_target): New.
7500 (mipsnbsd_fetch_inferior_registers)
7501 (mipsnbsd_store_inferior_registers): Refactor as methods of
7502 mips_nbsd_nat_target.
7503 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7504 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7505 (the_mips64_obsd_nat_target): New.
7506 (mips64obsd_fetch_inferior_registers)
7507 (mips64obsd_store_inferior_registers): Refactor as methods of
7508 mips64_obsd_nat_target.
7509 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7511 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7513 * nbsd-nat.h: Include "inf-ptrace.h".
7514 (nbsd_nat_target): New class.
7515 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7516 (obsd_wait): Refactor as methods of obsd_nat_target.
7517 (obsd_add_target): Delete.
7518 * obsd-nat.h: Include "inf-ptrace.h".
7519 (obsd_nat_target): New class.
7520 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7521 (the_ppc_fbsd_nat_target): New.
7522 (ppcfbsd_fetch_inferior_registers)
7523 (ppcfbsd_store_inferior_registers): Refactor as methods of
7524 ppc_fbsd_nat_target.
7525 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7527 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7528 (the_ppc_nbsd_nat_target): New.
7529 (ppcnbsd_fetch_inferior_registers)
7530 (ppcnbsd_store_inferior_registers): Refactor as methods of
7531 ppc_nbsd_nat_target.
7532 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7533 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7534 (the_ppc_obsd_nat_target): New.
7535 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7536 methods of ppc_obsd_nat_target.
7537 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7539 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7540 (the_sh_nbsd_nat_target): New.
7541 (shnbsd_fetch_inferior_registers)
7542 (shnbsd_store_inferior_registers): Refactor as methods of
7544 (_initialize_shnbsd_nat): Adjust to C++ification.
7545 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7546 (inf_ptrace_xfer_partial): Delete.
7547 (sparc_xfer_partial, sparc_target): Delete.
7548 * sparc-nat.h (sparc_fetch_inferior_registers)
7549 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7550 (sparc_target): Delete function declaration.
7551 (sparc_target): New template class.
7552 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7553 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7554 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7555 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7557 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7558 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7559 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7560 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7562 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7563 (the_vax_bsd_nat_target): New.
7564 (vaxbsd_fetch_inferior_registers)
7565 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7567 (_initialize_vaxbsd_nat): Adjust to C++ification.
7569 * bsd-kvm.c (bsd_kvm_target): New class.
7570 (bsd_kvm_ops): Now a bsd_kvm_target.
7571 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7572 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7573 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7575 (bsd_kvm_return_one): Delete.
7576 (bsd_kvm_add_target): Adjust to C++ification.
7578 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7579 (nto_procfs_target_procfs): New classes.
7580 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7581 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7582 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7583 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7584 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7585 (procfs_remove_hw_breakpoint, procfs_resume)
7586 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7587 (procfs_kill_inferior, procfs_store_registers)
7588 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7589 as methods of nto_procfs_target.
7590 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7591 (nto_native_ops): Delete.
7592 (procfs_open, procfs_native_open): Delete.
7593 (nto_native_ops): Now an nto_procfs_target_native.
7594 (init_procfs_targets): Adjust to C++ification.
7595 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7596 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7597 Refactor as methods of nto_procfs_target.
7599 * go32-nat.c (go32_nat_target): New class.
7600 (the_go32_nat_target): New.
7601 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7602 (go32_store_registers, go32_xfer_partial, go32_files_info)
7603 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7604 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7605 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7606 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7607 (go32_target): Delete.
7608 (_initialize_go32_nat): Adjust to C++ification.
7610 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7611 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7612 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7613 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7615 (gnu_target): Delete.
7616 * gnu-nat.h (gnu_target): Delete.
7617 (gnu_nat_target): New class.
7618 * i386-gnu-nat.c (gnu_base_target): New.
7619 (i386_gnu_nat_target): New class.
7620 (the_i386_gnu_nat_target): New.
7621 (_initialize_i386gnu_nat): Adjust to C++ification.
7623 2018-05-02 Pedro Alves <palves@redhat.com>
7625 * bfd-target.c (target_bfd_xclose): Rename to ...
7626 (target_bfd_close): ... this.
7627 (target_bfd_reopen): Adjust.
7628 * target.c (target_close): Remove references to to_xclose.
7629 * target.h (target_ops::to_xclose): Delete.
7630 (target_ops::to_close): Update comments.
7632 2018-05-02 Pedro Alves <palves@redhat.com>
7634 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7636 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7637 * inf-ptrace.c (inf_ptrace_register_u_offset)
7638 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7639 (inf_ptrace_store_register, inf_ptrace_store_registers)
7640 (inf_ptrace_trad_target): Move to ...
7641 * linux-nat-trad.c: ... this new file.
7642 * linux-nat-trad.h: New file.
7643 * linux-nat.c (linux_target_install_ops): Make extern.
7644 (linux_trad_target): Delete.
7645 * linux-nat.h (linux_trad_target): Delete declaration.
7646 (linux_target_install_ops): Declare.
7647 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7650 2018-05-02 Pedro Alves <palves@redhat.com>
7652 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7653 procfs_target/add_target here.
7654 * procfs.c (procfs_target): Make static.
7655 (_initialize_procfs): Call add_target here.
7656 * procfs.h (struct target_ops): Remove forward declaration.
7657 (procfs_target): Remove declaration.
7658 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7660 2018-05-02 Pedro Alves <palves@redhat.com>
7662 * procfs.c (procfs_stopped_by_watchpoint)
7663 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7664 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7666 (procfs_use_watchpoints): Delete, move contents...
7667 (procfs_target): ... here.
7668 * procfs.h (procfs_use_watchpoints): Delete declaration.
7669 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7670 procfs_use_watchpoints.
7671 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7672 procfs_use_watchpoints.
7674 2018-05-02 Tom Tromey <tom@tromey.com>
7677 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7678 and var_zuinteger_unlimited.
7679 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7680 and PARAM_ZUINTEGER_UNLIMITED.
7681 (set_parameter_value): Handle var_zuinteger and
7682 var_zuinteger_unlimited.
7683 (add_setshow_generic): Likewise.
7684 (parmpy_init): Likewise.
7686 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7689 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7690 pointer is not null before dereferencing it.
7692 2018-04-30 Tom Tromey <tom@tromey.com>
7694 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7697 2018-04-30 Tom Tromey <tom@tromey.com>
7699 * breakpoint.c (mention): Remove use of is_mi_like_p.
7700 (print_mention_ranged_breakpoint): Likewise.
7701 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7704 2018-04-30 Tom Tromey <tom@tromey.com>
7706 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7708 2018-04-30 Tom Tromey <tom@tromey.com>
7710 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7711 (info_spu_event_command): Remove some uses of is_mi_like_p.
7713 2018-04-30 Tom Tromey <tom@tromey.com>
7715 * python/py-framefilter.c (py_print_single_arg)
7716 (enumerate_locals, py_print_args, py_print_frame): Remove some
7717 uses of is_mi_like_p.
7719 2018-04-30 Tom Tromey <tom@tromey.com>
7722 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7723 * ui-out.h (ui_out::is_mi_like_p): Now const.
7724 (ui_out::do_is_mi_like_p): Now const.
7725 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7727 2018-04-30 Tom Tromey <tom@tromey.com>
7729 * varobj.c (varobj_set_visualizer): Use new_reference.
7730 * python/python.c (gdbpy_decode_line): Use new_reference.
7731 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7734 2018-04-30 Tom Tromey <tom@tromey.com>
7736 * varobj.c (install_new_value): Use new_reference.
7737 * value.h (value_incref): Return void. Swap intro comment with
7739 * value.c (set_value_parent): Use new_reference.
7740 (value_incref): Return void. Update intro comment.
7741 (release_value): Use new_reference.
7742 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7744 2018-04-30 Tom Tromey <tom@tromey.com>
7746 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7747 * gdb_bfd.h (new_bfd_ref): Remove.
7748 (gdb_bfd_open): Update comment.
7749 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7750 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7751 (gdb_bfd_fdopenr): Use new_reference.
7752 * exec.c (exec_file_attach): Use new_reference.
7754 2018-04-30 Tom Tromey <tom@tromey.com>
7756 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7759 2018-04-30 Tom Tromey <tom@tromey.com>
7761 * jit.c (jit_read_code_entry): Use type_align.
7762 * i386-tdep.c (i386_gdbarch_init): Don't call
7763 set_gdbarch_long_long_align_bit.
7764 * gdbarch.sh: Remove long_long_align_bit.
7765 * gdbarch.c, gdbarch.h: Rebuild.
7766 * arc-tdep.c (arc_type_align): New function.
7767 (arc_gdbarch_init): Use arc_type_align. Don't call
7768 set_gdbarch_long_long_align_bit.
7770 2018-04-30 Tom Tromey <tom@tromey.com>
7772 * rust-lang.c (rust_type_alignment): Remove.
7773 (rust_composite_type): Use type_align.
7775 2018-04-30 Tom Tromey <tom@tromey.com>
7777 * NEWS: Mention Type.align.
7778 * python/py-type.c (typy_get_alignof): New function.
7779 (type_object_getset): Add "alignof".
7781 2018-04-30 Tom Tromey <tom@tromey.com>
7785 * std-operator.def (UNOP_ALIGNOF): New operator.
7786 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7788 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7789 * c-lang.c (c_op_print_tab): Add alignof.
7790 * c-exp.y (ALIGNOF): New token.
7791 (exp): Add "ALIGNOF" production.
7792 (ident_tokens): Add _Alignof and alignof.
7794 2018-04-30 Tom Tromey <tom@tromey.com>
7796 * i386-tdep.c (i386_type_align): New function.
7797 (i386_gdbarch_init): Update.
7798 * gdbarch.sh (type_align): New method.
7799 * gdbarch.c, gdbarch.h: Rebuild.
7800 * arch-utils.h (default_type_align): Declare.
7801 * arch-utils.c (default_type_align): New function.
7802 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7803 (struct type) <align_log2>: New field.
7804 <instance_flags>: Now a bitfield.
7805 (TYPE_RAW_ALIGN): New macro.
7806 (type_align, type_raw_align, set_type_align): Declare.
7807 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7809 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7810 (get_alignment, maybe_set_alignment): New functions.
7811 (read_structure_type, read_enumeration_type, read_array_type)
7812 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7813 (read_subrange_type, read_base_type): Set type alignment.
7815 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7817 * dwarf2read.c (read_index_from_section): Use bool.
7819 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7822 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7825 2018-04-29 John Reiser <jreiser@BitWagon.com>
7828 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7829 last step, and do it atomically.
7831 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7833 * compile/compile-c-types.c (convert_int, convert_float):
7836 2018-04-27 Tom Tromey <tom@tromey.com>
7839 * rust-lang.c (rust_inclusive_range_type_p): New function.
7840 (rust_range): Handle inclusive ranges.
7841 (rust_compute_range): Likewise.
7842 * rust-exp.y (struct rust_op) <inclusive>: New field.
7843 (DOTDOTEQ): New constant.
7844 (range_expr): Add "..=" productions.
7845 (operator_tokens): Add "..=" token.
7846 (ast_range): Add "inclusive" parameter.
7847 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7849 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7851 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7852 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7854 * expprint.c (print_subexp_standard): Handle new bounds values.
7855 (dump_subexp_body_standard): Likewise.
7857 2018-04-27 Tom Tromey <tom@tromey.com>
7859 * configure: Rebuild.
7860 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7861 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7863 (class symbol_needs_eval_context): Likewise.
7864 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7865 (mock_mapped_index::symbol_name_at): Use "override". Remove
7867 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7869 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7870 * aarch64-tdep.c (instruction_reader::read): Use "override".
7871 (instruction_reader_test::read): Likewise.
7872 * arm-tdep.c (instruction_reader::read): Use "override".
7873 (instruction_reader_thumb::read): Likewise.
7875 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7878 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7879 instead of remote_send.
7880 (remote_send): Remove.
7882 2018-04-26 Pedro Alves <palves@redhat.com>
7884 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7885 find_function_start_sal instead of find_pc_line.
7887 2018-04-26 Pedro Alves <palves@redhat.com>
7889 * breakpoint.c (set_breakpoint_location_function): Handle
7891 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7892 * elfread.c (elf_symtab_read): Give data symbols with
7893 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7894 (elf_rel_plt_read): Update comment.
7895 * linespec.c (convert_linespec_to_sals): Handle
7897 (minsym_found): Handle mst_data_gnu_ifunc.
7898 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7899 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7900 * parse.c (find_minsym_type_and_address): Handle
7902 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7903 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7904 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7906 <mst_data_gnu_ifunc>: New enumerator.
7908 2018-04-26 Pedro Alves <palves@redhat.com>
7910 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7911 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7912 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7914 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7915 (lookup_minimal_symbol_by_pc): Adjust.
7916 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7917 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7918 * minsyms.h (lookup_msym_prefer): New enum.
7919 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7920 parameter by a lookup_msym_prefer parameter.
7922 2018-04-26 Pedro Alves <palves@redhat.com>
7924 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7925 ends in "@plt" instead of looking at the symbol's section.
7927 2018-04-26 Pedro Alves <palves@redhat.com>
7929 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7931 (find_pc_partial_function_gnu_ifunc): Rename to ...
7932 (find_pc_partial_function): ... this, and remove references to
7934 (find_pc_partial_function): Delete old implementation.
7935 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7937 2018-04-26 Pedro Alves <palves@redhat.com>
7939 * linespec.c (struct bound_minimal_symbol_search_key): New.
7940 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7941 skip first line if we found a GNU ifunc minimal symbol by name.
7942 (compare_msymbols): Change parameters to work with a destructured
7944 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7947 2018-04-26 Pedro Alves <palves@redhat.com>
7949 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7950 ifunc targets here. Instead, if we have an ifunc minsym, use its
7952 (add_location_to_breakpoint): Store the minsym and the objfile in
7953 the breakpoint location.
7954 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7955 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7956 Record the minsym in the sal.
7957 * symtab.h (symtab_and_line) <msymbol>: New field.
7959 2018-04-26 Pedro Alves <palves@redhat.com>
7961 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7962 unless we actually resolved the ifunc.
7964 2018-04-26 Pedro Alves <palves@redhat.com>
7966 * c-exp.y (variable production): Prefer ifunc minsyms over
7967 regular function symbols.
7968 * symtab.c (find_gnu_ifunc): New function.
7969 * minsyms.h (lookup_msym_prefer): New enum.
7970 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7971 parameter by a lookup_msym_prefer parameter.
7972 * symtab.h (find_gnu_ifunc): New declaration.
7974 2018-04-26 Pedro Alves <palves@redhat.com>
7976 * blockframe.c (find_gnu_ifunc_target_type): New function.
7977 (find_function_type): New.
7978 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7979 return a value with a memory address.
7980 (eval_call): For calls to GNU ifunc functions, try to find the
7981 type of the target function from the type that the resolver
7983 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7985 * infcall.c (find_function_return_type): Delete.
7986 (find_function_addr): Add 'function_type' parameter. For calls to
7987 GNU ifunc functions, try to find the type of the target function
7988 from the type that the resolver returns, and return it via
7990 (call_function_by_hand_dummy): Adjust to use the function type
7991 returned by find_function_addr.
7992 (find_function_addr): Add 'function_type' parameter and move
7994 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7997 2018-04-26 Pedro Alves <palves@redhat.com>
7999 * c-exp.y (variable production): Skip finding an alias for ifunc
8002 2018-04-26 Pedro Alves <palves@redhat.com>
8004 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8006 2018-04-25 Pedro Alves <palves@redhat.com>
8008 * infcmd.c (kill_command): Print the pid as string, not the whole
8009 thread's ptid. Add comment. s/has been killed/killed/ in output
8011 * remote.c (remote_detach_1): Print the pid as string, not the
8012 whole thread's ptid.
8014 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8015 Sergio Durigan Junior <sergiodj@redhat.com>
8016 Pedro Alves <palves@redhat.com>
8018 * infcmd.c (kill_command): Print message when inferior has
8020 * inferior.c (print_inferior_events): Remove 'static'. Set as
8022 (add_inferior): Improve message printed when
8023 'print_inferior_events' is on.
8024 (exit_inferior): Remove message printed when
8025 'print_inferior_events' is on.
8026 (detach_inferior): Improve message printed when
8027 'print_inferior_events' is on.
8028 (initialize_inferiors): Use 'add_inferior_silent' to set
8029 'current_inferior_'.
8030 * inferior.h (print_inferior_events): Declare here as
8032 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8033 '[Detaching...]' messages when 'print_inferior_events' is on.
8034 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8035 as prefix/suffix for messages. Remove periods. Fix erroneous
8036 'Detaching after fork from child...', replace it by '... from
8038 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8039 prefix/suffix when printing 'Detaching...' messages. Print
8040 them when 'print_inferior_events' is on.
8041 * remote.c (remote_detach_1): Print message when detaching
8042 from inferior and '!is_fork_parent'.
8044 2018-04-24 Tom Tromey <tom@tromey.com>
8046 * cli-out.h: Reindent.
8048 2018-04-24 Tom Tromey <tom@tromey.com>
8050 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8051 (cli_ui_out::do_field_string): Use fputs_filtered.
8052 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8054 2018-04-23 Tom Tromey <tom@tromey.com>
8056 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8057 gdb::unique_xmalloc_ptr.
8059 2018-04-23 Tom Tromey <tom@tromey.com>
8061 * configure: Rebuild.
8063 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8066 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8067 prepare_for_testing. Set normal_bp to r_debug_state if target
8070 2018-04-21 Pedro Alves <palves@redhat.com>
8071 Rajendra SY <rajendra.sy@gmail.com>
8073 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8074 * remote.c (extended_remote_attach): In all-stop mode, mark the
8075 thread as executing.
8077 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8079 * thread.c (thread_apply_all_command): Fix comment.
8080 (thread_command): Fix comment.
8082 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8084 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8086 * features/aarch64-core.c (create_feature_aarch64_core):
8088 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8090 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8092 * features/i386/32bit-avx512.c
8093 (create_feature_i386_32bit_avx512): Likewise.
8094 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8096 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8098 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8100 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8102 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8104 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8106 * features/i386/64bit-avx512.c
8107 (create_feature_i386_64bit_avx512): Likewise.
8108 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8110 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8112 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8114 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8116 * features/i386/64bit-segments.c
8117 (create_feature_i386_64bit_segments): Likewise.
8118 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8120 * features/i386/x32-core.c
8121 (create_feature_i386_x32_core): Likewise.
8122 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8123 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8124 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8125 * target-descriptions.c: In generated code, don't pass xml
8128 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8130 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8131 (print_xml_feature::visit_post): Likewise.
8132 (print_xml_feature::visit): Likewise.
8133 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8134 (print_xml_feature): Add new class.
8135 * regformats/regdat.sh: Null xmltarget on feature targets.
8136 * target-descriptions.c (struct target_desc): Add xmltarget.
8137 (maintenance_check_tdesc_xml_convert): Add unittest function.
8138 (tdesc_get_features_xml): Add function to get xml.
8139 (maintenance_check_xml_descriptions): Test xml generation.
8140 * xml-tdesc.c (string_read_description_xml): Add function.
8141 * xml-tdesc.h (string_read_description_xml): Add declaration.
8143 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8145 * features/Makefile: Add feature marker to targets with new style
8146 target descriptions.
8147 * regformats/aarch64.dat: Regenerate.
8148 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8149 * regformats/i386/amd64-avx-linux.dat: Likewise.
8150 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8151 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8152 * regformats/i386/amd64-linux.dat: Likewise.
8153 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8154 * regformats/i386/amd64.dat: Likewise.
8155 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8156 * regformats/i386/i386-avx-linux.dat: Likewise.
8157 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8158 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8159 * regformats/i386/i386-linux.dat: Likewise.
8160 * regformats/i386/i386-mmx-linux.dat: Likewise.
8161 * regformats/i386/i386-mpx-linux.dat: Likewise.
8162 * regformats/i386/i386.dat: Likewise.
8163 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8164 * regformats/i386/x32-avx-linux.dat: Likewise.
8165 * regformats/i386/x32-linux.dat: Likewise.
8166 * regformats/tic6x-c62x-linux.dat: Likewise.
8167 * regformats/tic6x-c64x-linux.dat: Likewise.
8168 * regformats/tic6x-c64xp-linux.dat: Likewise.
8169 * regformats/regdat.sh: Parse feature marker.
8171 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8173 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8174 (tdesc_osabi_name): Likewise.
8175 * target-descriptions.c (tdesc_architecture_name): Add new
8177 (tdesc_osabi_name): Likewise.
8179 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8181 * common/tdesc.c (tdesc_predefined_type): Move to here.
8182 (tdesc_named_type): Likewise.
8183 (tdesc_create_vector): Likewise.
8184 (tdesc_create_struct): Likewise.
8185 (tdesc_set_struct_size): Likewise.
8186 (tdesc_create_union): Likewise.
8187 (tdesc_create_flags): Likewise.
8188 (tdesc_create_enum): Likewise.
8189 (tdesc_add_field): Likewise.
8190 (tdesc_add_typed_bitfield): Likewise.
8191 (tdesc_add_bitfield): Likewise.
8192 (tdesc_add_flag): Likewise.
8193 (tdesc_add_enum_value): Likewise.
8194 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8195 (struct tdesc_type_vector): Likewise.
8196 (struct tdesc_type_field): Likewise.
8197 (struct tdesc_type_with_fields): Likewise.
8198 (tdesc_create_enum): Add declaration.
8199 (tdesc_add_typed_bitfield): Likewise.
8200 (tdesc_add_enum_value): Likewise.
8201 * target-descriptions.c (tdesc_type_field): Move from here.
8202 (tdesc_type_builtin): Likewise.
8203 (tdesc_type_vector): Likewise.
8204 (tdesc_type_with_fields): Likewise.
8205 (tdesc_predefined_types): Likewise.
8206 (tdesc_named_type): Likewise.
8207 (tdesc_create_vector): Likewise.
8208 (tdesc_create_struct): Likewise.
8209 (tdesc_set_struct_size): Likewise.
8210 (tdesc_create_union): Likewise.
8211 (tdesc_create_flags): Likewise.
8212 (tdesc_create_enum): Likewise.
8213 (tdesc_add_field): Likewise.
8214 (tdesc_add_typed_bitfield): Likewise.
8215 (tdesc_add_bitfield): Likewise.
8216 (tdesc_add_flag): Likewise.
8217 (tdesc_add_enum_value): Likewise.
8218 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8219 (tdesc_add_typed_bitfield): Likewise.
8220 (tdesc_add_enum_value): Likewise.
8222 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8224 * common/tdesc.c (tdesc_feature::accept): Move to here.
8225 (tdesc_feature::operator==): Likewise.
8226 (tdesc_create_reg): Likewise.
8227 * common/tdesc.h (tdesc_type_kind): Likewise.
8228 (struct tdesc_type): Likewise.
8229 (struct tdesc_feature): Likewise.
8230 * regformats/regdat.sh: Create a feature.
8231 * target-descriptions.c (tdesc_type_kind): Move from here.
8232 (tdesc_type): Likewise.
8233 (tdesc_type_up): Likewise.
8234 (tdesc_feature): Likewise.
8235 (tdesc_create_reg): Likewise.
8237 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8239 * Makefile.in: Add arch/tdesc.c
8240 * common/tdesc.c: New file.
8241 * common/tdesc.h (tdesc_element_visitor): Move to here.
8242 (tdesc_element): Likewise.
8243 (tdesc_reg): Likewise.
8244 (tdesc_reg_up): Likewise.
8245 * regformats/regdef.h (reg): Add offset to constructors.
8246 * target-descriptions.c (tdesc_element_visitor): Move from here.
8247 (tdesc_element): Likewise.
8248 (tdesc_reg): Likewise.
8249 (tdesc_reg_up): Likewise.
8251 2018-04-17 Tom Tromey <tom@tromey.com>
8253 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8256 2018-04-17 Tom Tromey <tom@tromey.com>
8258 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8260 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8262 * symtab.c (print_symbol_info): Skip printing filename and line
8263 number when `last' is NULL.
8264 (symtab_symbol_info): Use empty string instead of NULL for first
8265 invocation of print_symbol_info.
8266 (rbreak_command): Pass NULL to `last' parameter of
8269 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8271 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8274 2018-04-16 Pedro Alves <palves@redhat.com>
8276 * MAINTAINERS (sh): Remove.
8277 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8278 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8279 (ALLDEPFILES): Remove sh64-tdep.c.
8280 * NEWS: Mentions that support for SH-5/SH64 is removed.
8281 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8282 (sh*-*-openbsd*): Ditto.
8283 (sh64-*-elf*): Remove.
8285 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8286 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8287 * sh-tdep.c: No longer include "sh64-tdep.h".
8288 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8289 * sh64-tdep.c, sh64-tdep.h: Remove files.
8291 2018-04-16 Pedro Alves <palves@redhat.com>
8293 * MAINTAINERS: Remove m88k.
8294 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8295 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8296 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8297 * NEWS: Mention that support for m88k was removed.
8298 * configure.host (m88*-*-*): Remove support.
8299 * configure.nat (m88k-*-*): Remove support.
8300 * configure.tgt (m88*-*-openbsd*): Remove.
8301 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8303 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8305 * configure.tgt (x86_tobjs): New variable.
8306 (amd64_tobjs, i386_tobjs): Use it.
8308 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8310 * symtab.c (print_symbol_info): Precede the symbol definition by
8311 the line number when available.
8312 * NEWS: Advertise this enhancement.
8314 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8316 * NEWS (New options): announce set/show record btrace cpu.
8317 * btrace.c: Include record-btrace.h.
8318 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8319 the vendor is unknown.
8320 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8321 Maybe overwrite the btrace configuration's cpu.
8322 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8323 (btrace_fetch): Add cpu parameter. Update callers.
8324 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8325 Maybe overwrite the btrace configuration's cpu. Skip enabling
8326 errata workarounds if the vendor is unknown.
8327 * python/py-record-btrace.c: Include record-btrace.h.
8328 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8329 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8330 * record-btrace.c (record_btrace_cpu_state_kind): New.
8331 (record_btrace_cpu): New.
8332 (set_record_btrace_cpu_cmdlist): New.
8333 (record_btrace_get_cpu): New.
8334 (require_btrace_thread, record_btrace_info)
8335 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8336 (cmd_set_record_btrace_cpu_none): New.
8337 (cmd_set_record_btrace_cpu_auto): New.
8338 (cmd_set_record_btrace_cpu): New.
8339 (cmd_show_record_btrace_cpu): New.
8340 (_initialize_record_btrace): Initialize set/show record btrace cpu
8342 * record-btrace.h (record_btrace_get_cpu): New.
8344 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8346 * record.c (set_record_command): Fix typo in message.
8348 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8350 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8352 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8354 * infrun.c (process_event_stop_test): Call
8355 gdbarch_in_indirect_branch_thunk.
8356 * gdbarch.sh (in_indirect_branch_thunk): New.
8357 * gdbarch.c: Regenerated.
8358 * gdbarch.h: Regenerated.
8361 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8362 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8363 (ALLDEPFILES): Add x86-tdep.c.
8364 * arch-utils.h (default_in_indirect_branch_thunk): New.
8365 * arch-utils.c (default_in_indirect_branch_thunk): New.
8366 * i386-tdep: Include x86-tdep.h.
8367 (i386_in_indirect_branch_thunk): New.
8368 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8370 * amd64-tdep: Include x86-tdep.h.
8371 (amd64_in_indirect_branch_thunk): New.
8372 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8374 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8377 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8378 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8379 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8382 2018-04-12 Tom Tromey <tom@tromey.com>
8384 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8385 (rust_evaluate_subexp): Likewise.
8387 2018-04-12 Pedro Alves <palves@redhat.com>
8389 * procfs.c (procfs_detach): Make forward declaration's prototype
8390 match definition's protototype.
8391 (proc_get_LDT_entry): Remove stale do_cleanups call.
8393 2018-04-12 Pedro Alves <palves@redhat.com>
8395 * target.h (target_ops::to_has_exited): Delete.
8396 (target_has_exited): Delete.
8397 * target-delegates.c: Regenerate.
8399 2018-04-11 Pedro Alves <palves@redhat.com>
8401 * target.c (fileio_fh_t::t): Add comment.
8402 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8403 (target_fileio_close): Handle a NULL target.
8404 (invalidate_fileio_fh): New.
8405 (target_close): Call it.
8406 * remote.c (remote_hostio_send_command): No longer check whether
8407 remote_desc is open.
8409 2018-04-11 Pedro Alves <palves@redhat.com>
8411 * target.c (fileio_fh_t): Make it a named struct instead of a
8413 (fileio_fh_t::is_closed): New method.
8414 (DEF_VEC_O (fileio_fh_t)): Remove.
8415 (fileio_fhandles): Now a std::vector.
8416 (is_closed_fileio_fh): Delete.
8417 (acquire_fileio_fd): Adjust. Rename parameters.
8418 (release_fileio_fd): Adjust.
8419 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8420 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8421 (target_fileio_close): Adjust.
8423 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8425 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8428 2018-04-10 Pedro Alves <palves@redhat.com>
8430 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8431 (scoped_finish_thread_state): New class.
8432 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8434 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8435 (fetch_inferior_event, normal_stop): Likewise.
8436 * thread.c (finish_thread_state_cleanup): Delete.
8438 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8439 Pedro Alves <palves@redhat.com>
8441 * value.c: Include "selftest.h" and "common/array-view.h".
8442 (struct range) <operator ==>: New.
8443 (test_ranges_contain): New.
8444 (check_ranges_vector): New.
8445 (test_insert_into_bit_range_vector): New.
8446 (_initialize_values): Register selftests.
8447 * common/array-view.h (operator==, operator!=): New.
8449 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8451 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8453 * inline-frame.c: Include <algorithm>.
8454 (struct inline_state): Add constructor.
8455 (inline_state_s): Remove.
8456 (DEF_VEC_O(inline_state_s)): Remove.
8457 (inline_states): Change type to std::vector.
8458 (find_inline_frame_state): Adjust to std::vector.
8459 (allocate_inline_frame_state): Remove.
8460 (clear_inline_frame_state): Adjust to std::vector.
8461 (skip_inline_frames): Adjust to std::vector.
8463 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8465 * tracepoint.h (struct trace_state_variable): Add constructor.
8466 <name>: Change type to std::string.
8467 * tracepoint.c (tsv_s): Remove.
8468 (DEF_VEC_O(tsv_s)): Remove.
8469 (tvariables): Change to std::vector.
8470 (create_trace_state_variable): Adjust to std::vector.
8471 (find_trace_state_variable): Likewise.
8472 (find_trace_state_variable_by_number): Likewise.
8473 (delete_trace_state_variable): Likewise.
8474 (trace_variable_command): Adjust to std::string.
8475 (delete_trace_variable_command): Likewise.
8476 (tvariables_info_1): Adjust to std::vector.
8477 (save_trace_state_variables): Likewise.
8478 (start_tracing): Likewise.
8479 (merge_uploaded_trace_state_variables): Adjust to std::vector
8481 * target.h (struct target_ops)
8482 <to_download_trace_state_variable>: Pass reference to
8483 trace_state_variable.
8484 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8485 * target-delegates.c: Re-generate.
8486 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8487 (mi_tsv_deleted): Likewise.
8488 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8489 * remote.c (remote_download_trace_state_variable): Change
8490 pointer to reference and adjust.
8491 * make-target-delegates (parse_argtypes): Handle references.
8492 (write_function_header): Likewise.
8493 (munge_type): Likewise.
8495 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8497 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8498 string_view-selftests.c.
8499 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8501 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8502 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8503 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8504 * unittests/basic_string_view/element_access/char/1.cc:
8506 * unittests/basic_string_view/element_access/char/empty.cc:
8508 * unittests/basic_string_view/element_access/char/front_back.cc:
8510 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8511 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8513 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8515 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8517 * unittests/basic_string_view/operations/compare/char/1.cc:
8519 * unittests/basic_string_view/operations/compare/char/13650.cc:
8521 * unittests/basic_string_view/operations/copy/char/1.cc:
8523 * unittests/basic_string_view/operations/data/char/1.cc:
8525 * unittests/basic_string_view/operations/find/char/1.cc:
8527 * unittests/basic_string_view/operations/find/char/2.cc:
8529 * unittests/basic_string_view/operations/find/char/3.cc:
8531 * unittests/basic_string_view/operations/find/char/4.cc:
8533 * unittests/basic_string_view/operations/rfind/char/1.cc:
8535 * unittests/basic_string_view/operations/rfind/char/2.cc:
8537 * unittests/basic_string_view/operations/rfind/char/3.cc:
8539 * unittests/basic_string_view/operations/substr/char/1.cc:
8541 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8542 * unittests/string_view-selftests.c: New file.
8544 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8546 * unittests/basic_string_view/capacity/1.cc: New file.
8547 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8548 * unittests/basic_string_view/cons/char/1.cc: New file.
8549 * unittests/basic_string_view/cons/char/2.cc: New file.
8550 * unittests/basic_string_view/cons/char/3.cc: New file.
8551 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8552 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8553 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8554 * unittests/basic_string_view/element_access/char/1.cc: New file.
8555 * unittests/basic_string_view/element_access/char/2.cc: New file.
8556 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8557 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8558 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8559 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8560 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8561 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8562 * unittests/basic_string_view/include.cc: New file.
8563 * unittests/basic_string_view/inserters/char/1.cc: New file.
8564 * unittests/basic_string_view/inserters/char/2.cc: New file.
8565 * unittests/basic_string_view/inserters/char/3.cc: New file.
8566 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8567 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8568 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8569 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8570 * unittests/basic_string_view/literals/types.cc: New file.
8571 * unittests/basic_string_view/literals/values.cc: New file.
8572 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8573 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8574 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8575 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8576 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8577 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8578 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8579 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8580 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8581 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8582 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8583 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8584 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8585 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8586 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8587 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8588 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8589 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8590 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8591 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8592 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8593 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8594 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8595 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8596 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8597 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8598 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8599 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8600 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8601 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8602 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8603 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8604 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8605 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8606 * unittests/basic_string_view/operators/char/2.cc: New file.
8607 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8608 * unittests/basic_string_view/range_access/char/1.cc: New file.
8609 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8610 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8611 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8612 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8613 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8614 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8615 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8616 * unittests/basic_string_view/typedefs.cc: New file.
8617 * unittests/basic_string_view/types/1.cc: New file.
8619 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8621 * common/gdb_string_view.h: Remove libstdc++ implementation
8622 details, adjust to gdb reality.
8623 * common/gdb_string_view.tcc: Likewise.
8624 * cli/cli-script.c (struct string_view): Remove.
8625 (user_args) <m_args>: Change element type to gdb::string_view.
8626 (user_args::insert_args): Adjust.
8628 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8630 * common/gdb_string_view.h: New file.
8631 * common/gdb_string_view.tcc: New file.
8633 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8635 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8636 * configure: Re-generate.
8638 2018-04-09 Pedro Alves <palves@redhat.com>
8640 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8641 (set_target_gdbarch): Call
8642 gdb::observers::architecture_changed.notify instead of
8643 observer_notify_architecture_changed.
8645 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8647 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8648 (do_restore_current_traceframe_cleanup): Remove.
8649 (restore_current_traceframe_cleanup_dtor): Remove.
8650 (make_cleanup_restore_current_traceframe): Remove.
8651 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8653 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8654 * infrun.c (fetch_inferior_event): Use
8655 scoped_restore_current_traceframe.
8657 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8659 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8661 <n_allocated_type_units>: Remove.
8662 <all_type_units>: Change to std::vector.
8663 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8664 to std::vector change.
8665 (dwarf2_per_objfile::get_cutu): Likewise.
8666 (dwarf2_per_objfile::get_tu): Likewise.
8667 (create_signatured_type_table_from_index): Likewise.
8668 (create_signatured_type_table_from_debug_names): Likewise.
8669 (dw2_symtab_iter_next): Likewise.
8670 (dw2_print_stats): Likewise.
8671 (dw2_expand_all_symtabs): Likewise.
8672 (dw2_expand_marked_cus): Likewise.
8673 (dw2_debug_names_iterator::next): Likewise.
8674 (dwarf2_initialize_objfile): Likewise.
8675 (add_signatured_type_cu_to_table): Likewise.
8676 (create_all_type_units): Likewise.
8677 (add_type_unit): Likewise.
8678 (struct tu_abbrev_offset): Add constructor.
8679 (build_type_psymtabs_1): Adjust to std::vector change.
8680 (print_tu_stats): Likewise.
8681 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8682 (write_debug_names): Likewise.
8684 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8686 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8687 Make an std::vector.
8688 <n_comp_units>: Remove.
8689 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8690 to std::vector change.
8691 (dwarf2_per_objfile::get_cutu): Likewise.
8692 (dwarf2_per_objfile::get_cu): Likewise.
8693 (create_cus_from_index): Likewise.
8694 (create_addrmap_from_index): Likewise.
8695 (create_addrmap_from_aranges): Likewise.
8696 (dwarf2_read_index): Likewise.
8697 (dw2_find_last_source_symtab): Likewise.
8698 (dw2_map_symtabs_matching_filename): Likewise.
8699 (dw2_symtab_iter_next): Likewise.
8700 (dw2_print_stats): Likewise.
8701 (dw2_expand_all_symtabs): Likewise.
8702 (dw2_expand_symtabs_with_fullname): Likewise.
8703 (dw2_expand_marked_cus): Likewise.
8704 (dw2_map_symbol_filenames): Likewise.
8705 (create_cus_from_debug_names): Likewise.
8706 (dwarf2_read_debug_names): Likewise.
8707 (dw2_debug_names_iterator::next): Likewise.
8708 (dwarf2_initialize_objfile): Likewise.
8709 (set_partial_user): Likewise.
8710 (dwarf2_build_psymtabs_hard): Likewise.
8711 (read_comp_units_from_section): Remove arguments, adjust to
8713 (create_all_comp_units): Adjust to std::vector and
8714 read_comp_units_from_section changes.
8715 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8717 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8718 (psyms_seen_size): Likewise.
8719 (write_gdbindex): Likewise.
8720 (write_debug_names): Likewise.
8722 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8724 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8725 with dwarf2_per_objfile.
8726 (create_cus_from_index): Likewise.
8727 (create_signatured_type_table_from_index): Likewise.
8728 (dwarf2_read_index): Likewise.
8729 (dwarf2_initialize_objfile): Likewise.
8730 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8731 per_cu rather than get_dwarf2_per_objfile.
8733 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8735 * dwarf2read.h (struct signatured_type): Forward declare.
8736 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8738 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8739 (dw2_get_cutu): ...this.
8740 (dwarf2_per_objfile::get_cu): Rename from...
8741 (dw2_get_cu): ...this.
8742 (dwarf2_per_objfile::get_tu): New.
8743 (create_addrmap_from_index): Adjust.
8744 (create_addrmap_from_aranges): Adjust.
8745 (dw2_find_last_source_symtab): Adjust.
8746 (dw2_map_symtabs_matching_filename): Adjust.
8747 (dw2_symtab_iter_next): Adjust.
8748 (dw2_print_stats): Adjust.
8749 (dw2_expand_all_symtabs): Adjust.
8750 (dw2_expand_symtabs_with_fullname): Adjust.
8751 (dw2_expand_marked_cus): Adjust.
8752 (dw_expand_symtabs_matching_file_matcher): Adjust.
8753 (dw2_map_symbol_filenames): Adjust.
8754 (dw2_debug_names_iterator::next): Adjust.
8755 (dwarf2_initialize_objfile): Adjust.
8756 (set_partial_user): Adjust.
8757 (dwarf2_build_psymtabs_hard): Adjust.
8759 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8761 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8762 Remove unused variables.
8763 (dw2_map_symtabs_matching_filename): Likewise.
8764 (dwarf2_record_block_ranges): Likewise.
8765 (dwarf2_read_addr_index): Likewise.
8766 (follow_die_offset): Likewise.
8768 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8770 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8771 to symbol_file_add_main.
8773 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8776 * mi/mi-console.c (do_fputc_async_safe): New.
8777 (mi_console_file::write_async_safe): New.
8778 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8779 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8781 * ui-file.c (ui_file::putstrn): Adjust call to
8782 fputstrn_unfiltered.
8783 * utils.c (printchar): Replace do_fputs and do_fprintf
8784 parameters by do_fputc.
8785 (fputstr_filtered): Adjust call to printchar.
8786 (fputstr_unfiltered): Likewise.
8787 (fputstrn_filtered): Likewise.
8788 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8790 * utils.h (do_fputc_ftype): New typedef.
8791 (fputstrn_unfiltered): Add do_fputc parameter.
8793 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8795 * regformats/i386/i386-avx.dat: Remove.
8797 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8800 * amd64-tdep.c (amd64_none_init_abi): New function.
8801 (amd64_x32_none_init_abi): New function.
8802 (_initialize_amd64_tdep): Register handlers for x86-64 and
8803 x64_32 with GDB_OSABI_NONE.
8804 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8805 GDB_OSABI_NONE osabi.
8807 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8810 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8812 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8813 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8815 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8817 * common/byte-vector.h (char_vector): New type.
8818 * target.h (target_read_alloc): Return
8819 gdb::optional<byte_vector>.
8820 (target_read_stralloc): Return gdb::optional<char_vector>.
8821 (target_get_osdata): Return gdb::optional<char_vector>.
8822 * target.c (target_read_alloc_1): Templatize. Replacement
8823 manual memory management with vector.
8824 (target_read_alloc): Change return type, adjust.
8825 (target_read_stralloc): Change return type, adjust.
8826 (target_get_osdata): Change return type, adjust.
8827 * auxv.c (struct auxv_info) <length>: Remove.
8828 <data>: Change type to gdb::optional<byte_vector>.
8829 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8830 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8831 (target_auxv_search): Adjust.
8832 (fprint_target_auxv): Adjust.
8833 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8834 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8835 (linux_make_corefile_notes): Adjust.
8836 * osdata.c (get_osdata): Adjust.
8837 * remote.c (remote_get_threads_with_qxfer): Adjust.
8838 (remote_memory_map): Adjust.
8839 (remote_traceframe_info): Adjust.
8840 (btrace_read_config): Adjust.
8841 (remote_read_btrace): Adjust.
8842 (remote_pid_to_exec_file): Adjust.
8843 * solib-aix.c (solib_aix_get_library_list): Adjust.
8844 * solib-dsbt.c (decode_loadmap): Don't free buf.
8845 (dsbt_get_initial_loadmaps): Adjust.
8846 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8847 * solib-target.c (solib_target_current_sos): Adjust.
8848 * tracepoint.c (sdata_make_value): Adjust.
8849 * xml-support.c (xinclude_start_include): Adjust.
8850 (xml_fetch_content_from_file): Adjust.
8851 * xml-support.h (xml_fetch_another): Change return type.
8852 (xml_fetch_content_from_file): Change return type.
8853 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8854 * xml-tdesc.c (file_read_description_xml): Adjust.
8855 (fetch_available_features_from_target): Change return type.
8856 (target_fetch_description_xml): Adjust.
8857 (target_read_description_xml): Adjust.
8859 2018-04-06 Tom Tromey <tom@tromey.com>
8861 * value.c (~value): Update.
8862 (struct value) <contents>: Now unique_xmalloc_ptr.
8863 (value_contents_bits_eq, allocate_value_contents)
8864 (value_contents_raw, value_contents_all_raw)
8865 (value_contents_for_printing, value_contents_for_printing_const)
8866 (set_value_enclosing_type): Update.
8868 2018-04-06 Tom Tromey <tom@tromey.com>
8870 * value.c (range_s): Remove typedef, VEC.
8871 (struct range): Add operator<.
8872 (range_lessthan): Remove.
8873 (ranges_contain): Change type.
8875 (struct value) <unavailable, optimized_out>: Now std::vector.
8876 (value_entirely_available)
8877 (value_entirely_covered_by_range_vector)
8878 (value_entirely_unavailable, value_entirely_optimized_out):
8880 (insert_into_bit_range_vector): Change argument type.
8881 (find_first_range_overlap): Likewise.
8882 (struct ranges_and_idx, value_contents_bits_eq)
8883 (require_not_optimized_out, require_available): Update.
8884 (ranges_copy_adjusted): Change argument types.
8885 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8887 2018-04-06 Tom Tromey <tom@tromey.com>
8889 * value.c (~value): Update.
8890 (struct value) <parent>: Now a value_ref_ptr.
8891 (value_parent, set_value_parent, value_address, value_copy):
8894 2018-04-06 Tom Tromey <tom@tromey.com>
8896 * value.c (struct value): Add constructor, destructor, and member
8898 (allocate_value_lazy, value_decref): Update.
8900 2018-04-06 Tom Tromey <tom@tromey.com>
8902 * value.c (struct value) <released, next>: Remove.
8903 (all_values): Now a std::vector.
8904 (allocate_value_lazy): Update.
8905 (value_next): Remove.
8906 (value_mark, value_free_to_mark, release_value)
8907 (value_release_to_mark): Update.
8909 2018-04-06 Tom Tromey <tom@tromey.com>
8911 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8912 (free_value_chain): Remove.
8913 * value.c (free_value_chain): Remove.
8914 (value_release_to_mark): Return a std::vector.
8915 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8917 (check_condition): Update.
8918 * eval.c (fetch_subexp_value): Change "val_chain" to a
8920 * breakpoint.c (update_watchpoint): Update.
8921 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8923 2018-04-06 Tom Tromey <tom@tromey.com>
8925 * value.h (free_all_values): Remove.
8926 * value.c (free_all_values): Remove.
8928 2018-04-06 Tom Tromey <tom@tromey.com>
8930 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8931 (value_history_chain, value_history_count): Remove.
8932 (value_history): New global.
8933 (record_latest_value, access_value_history, show_values)
8934 (preserve_values): Update.
8936 2018-04-06 Tom Tromey <tom@tromey.com>
8938 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8939 * varobj.c (varobj_set_display_format, varobj_set_value)
8940 (install_default_visualizer, construct_visualizer)
8941 (install_new_value, ~varobj, varobj_get_value_type)
8942 (my_value_of_variable, varobj_editable_p): Update.
8943 * c-varobj.c (c_describe_child, c_value_of_variable)
8944 (cplus_number_of_children, cplus_describe_child): Update.
8945 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8946 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8947 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8949 2018-04-06 Tom Tromey <tom@tromey.com>
8951 * printcmd.c (last_examine_address): Change type to
8953 (do_examine, x_command): Update.
8955 2018-04-06 Tom Tromey <tom@tromey.com>
8957 * value.c (release_value): Update.
8958 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8959 (struct bpstats) <val>: Now a value_ref_ptr.
8960 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8961 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8962 (~watchpoint, print_it_watchpoint, watch_command_1)
8963 (invalidate_bp_value_on_memory_change): Update.
8965 2018-04-06 Tom Tromey <tom@tromey.com>
8967 * varobj.c (varobj_clear_saved_item)
8968 (update_dynamic_varobj_children, install_new_value, ~varobj):
8970 * value.h (value_incref): Move declaration earlier.
8971 (value_decref): Rename from value_free.
8972 (struct value_ref_policy): New.
8973 (value_ref_ptr): New typedef.
8974 (struct value_deleter): Remove.
8975 (gdb_value_up): Remove typedef.
8976 (release_value): Change return type.
8977 (release_value_or_incref): Remove.
8978 * value.c (set_value_parent): Update.
8979 (value_incref): Change return type.
8980 (value_decref): Rename from value_free.
8981 (value_free_to_mark, free_all_values, free_value_chain): Update.
8982 (release_value): Return value_ref_ptr.
8983 (release_value_or_incref): Remove.
8984 (record_latest_value, set_internalvar, clear_internalvar):
8986 * stack.c (info_frame_command): Don't call value_free.
8987 * python/py-value.c (valpy_dealloc, valpy_new)
8988 (value_to_value_object): Update.
8989 * printcmd.c (do_examine): Update.
8990 * opencl-lang.c (lval_func_free_closure): Update.
8991 * mi/mi-main.c (register_changed_p): Don't call value_free.
8992 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8993 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8994 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8996 * guile/scm-value.c (vlscm_free_value_smob)
8997 (vlscm_scm_from_value): Update.
8998 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8999 (frame_unwind_register_unsigned, get_frame_register_bytes)
9000 (put_frame_register_bytes): Don't call value_free.
9001 * findvar.c (address_from_register): Don't call value_free.
9002 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9003 * dwarf2loc.c (entry_data_value_free_closure)
9004 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9005 (dwarf2_evaluate_loc_desc_full): Update.
9006 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9007 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9008 (~watchpoint, watch_command_1)
9009 (invalidate_bp_value_on_memory_change): Update.
9010 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9012 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9015 * warning.m4: Add -Wno-error=deprecated-register.
9016 * configure: Re-generate.
9018 2018-04-05 Tom Tromey <tom@tromey.com>
9020 * linespec.h: Remove include of "vec.h".
9022 2018-04-05 Tom Tromey <tom@tromey.com>
9024 * linespec.c (typep): Remove typedef.
9025 (find_methods, find_superclass_methods): Take a std::vector.
9026 (find_method): Use std::vector.
9028 2018-04-05 Tom Tromey <tom@tromey.com>
9030 * utils.c (compare_strings): Remove.
9031 * utils.h (compare_strings): Remove.
9032 * objc-lang.h (find_imps): Update.
9033 * objc-lang.c (find_methods): Take a std::vector.
9034 (uniquify_strings, find_imps): Likewise.
9035 * linespec.c (find_methods): Take a std::vector.
9036 (decode_objc): Use std::vector.
9037 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9039 (find_method, find_function_symbols): Use std::vector.
9041 2018-04-05 Tom Tromey <tom@tromey.com>
9043 * completer.c (completion_tracker::completion_tracker): Remove
9045 (completion_tracker::discard_completions): Likewise.
9046 * breakpoint.c (ambiguous_names_p): Remove cast.
9047 * ada-lang.c (_initialize_ada_language): Remove cast.
9048 * utils.h (streq): Update.
9049 (streq_hash): Add new declaration.
9050 * utils.c (streq): Return bool.
9051 (streq_hash): New function.
9053 2018-04-05 Tom Tromey <tom@tromey.com>
9055 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9056 Remove a string copy.
9058 2018-04-05 Tom Tromey <tom@tromey.com>
9060 * linespec.c (filter_results): Use std::vector.
9061 (decode_line_2, decode_line_full): Update.
9063 2018-04-05 Tom Tromey <tom@tromey.com>
9065 * linespec.c (canonical_to_fullform): Return std::string.
9066 (filter_results): Update.
9067 (struct decode_line_2_item): Add constructor.
9068 <fullform, displayform>: Now std::string.
9069 (decode_line_2_compare_items): Now a std::sort comparator.
9070 (decode_line_2): Update.
9072 2018-04-05 Tom Tromey <tom@tromey.com>
9074 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9075 (unexpected_linespec_error): Update.
9076 (linespec_parse_basic, parse_linespec): Update.
9078 2018-04-05 Tom Tromey <tom@tromey.com>
9080 * linespec.c (linespec_parse_basic): Reindent.
9082 2018-04-05 Tom Tromey <tom@tromey.com>
9084 * minsyms.h (iterate_over_minimal_symbols): Update.
9085 * minsyms.c (iterate_over_minimal_symbols): Take a
9087 * linespec.c (struct collect_minsyms): Remove.
9088 (compare_msyms): Now a std::sort comparator.
9089 (add_minsym): Add parameters.
9090 (search_minsyms_for_name): Update. Use std::vector.
9092 2018-04-03 Tom Tromey <tom@tromey.com>
9094 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9097 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9099 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9101 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9104 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9105 printing static type.
9107 2018-04-01 Tom Tromey <tom@tromey.com>
9109 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9110 (rs6000_xfer_shared_libraries): Update.
9112 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9114 * common/gdb_vecs.h (char_ptr): Remove.
9115 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9117 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9119 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9121 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9123 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9125 * tracepoint.h (struct uploaded_tp): Initialize fields.
9126 <actions, step_actions, cmd_strings>: Change type to
9127 std::vector<char *>.
9128 * tracepoint.c (get_uploaded_tp): Allocate with new.
9129 (free_uploaded_tps): Free with delete.
9130 (parse_tracepoint_definition): Adjust to std::vector change.
9131 * breakpoint.c (read_uploaded_action): Likewise.
9132 (create_tracepoint_from_upload): Likewise.
9133 * ctf.c (ctf_write_uploaded_tp): Likewise.
9134 (SET_ARRAY_FIELD): Likewise.
9135 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9137 2018-03-30 Tom Tromey <tom@tromey.com>
9139 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9141 (svr4_keep_data_in_core): Update.
9142 (svr4_read_so_list): Update.
9144 2018-03-30 Tom Tromey <tom@tromey.com>
9146 * windows-nat.c (handle_output_debug_string, handle_exception):
9148 * target.h (target_read_string): Update.
9149 * target.c (target_read_string): Change "string" to
9151 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9153 * solib-frv.c (frv_current_sos): Update.
9154 * solib-dsbt.c (dsbt_current_sos): Update.
9155 * solib-darwin.c (darwin_current_sos): Update.
9156 * linux-thread-db.c (inferior_has_bug): Update.
9157 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9158 Update. Remove alloca.
9159 * ada-lang.c (ada_main_name): Update.
9161 2018-03-30 Tom Tromey <tom@tromey.com>
9163 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9164 (struct dwo_file_deleter): New.
9165 (dwo_file_up): New typedef.
9166 (open_and_init_dwo_file): Use dwo_file_up.
9167 (free_dwo_file_cleanup): Remove.
9169 2018-03-30 Tom Tromey <tom@tromey.com>
9171 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9172 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9174 2018-03-30 Tom Tromey <tom@tromey.com>
9176 * dwarf2read.c (class free_cached_comp_units): New class.
9177 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9178 (free_cached_comp_units): Remove function.
9180 2018-03-30 Tom Tromey <tom@tromey.com>
9182 * utils.h (make_cleanup_unpush_target): Remove.
9183 * inf-ptrace.c (struct target_unpusher): New.
9184 (target_unpush_up) New typedef.
9185 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9187 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9189 2018-03-27 Tom Tromey <tom@tromey.com>
9191 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9193 2018-03-27 Pedro Alves <palves@redhat.com>
9194 Tom Tromey <tom@tromey.com>
9196 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9197 destructor. Now a class.
9198 (gdb_readline_wrapper_cleanup): Remove function.
9199 (gdb_readline_wrapper): Remove cleanups.
9201 2018-03-27 Tom Tromey <tom@tromey.com>
9203 * typeprint.h (struct type_print_options) <local_typedefs,
9204 global_typedefs>: Remove "struct" keyword.
9205 (class typedef_hash_table): New class.
9206 (recursively_update_typedef_hash, add_template_parameters)
9207 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9208 (find_typedef_in_hash): Don't declare.
9209 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9210 (typedef_hash_table::recursively_update): Rename from
9211 recursively_update_typedef_hash. Now a member.
9212 (typedef_hash_table::add_template_parameters): Rename from
9213 add_template_parameters. Now a member.
9214 (typedef_hash_table::typedef_hash_table): Now a constructor;
9215 rename from create_typedef_hash.
9216 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9217 rename from free_typedef_hash.
9218 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9219 (do_free_global_table): Remove.
9220 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9221 from copy_type_recursive.
9222 (create_global_typedef_table): Remove.
9223 (typedef_hash_table::find_global_typedef): Now a member of
9225 (typedef_hash_table::find_typedef): Rename from
9226 find_typedef_in_hash; now a member.
9227 (whatis_exp): Update.
9228 * extension.h (struct ext_lang_type_printers): Add constructor and
9230 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9232 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9233 Now a constructor; rename from start_ext_lang_type_printers.
9234 (ext_lang_type_printers): Now a destructor; rename from
9235 free_ext_lang_type_printers.
9236 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9238 (c_type_print_base_struct_union): Update. Remove cleanups.
9240 2018-03-27 Tom Tromey <tom@tromey.com>
9242 * dwarf-index-write.c: Include <cmath>.
9244 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9246 * NEWS: Add entry describing new "set|show varsize-limit" command.
9247 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9249 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9252 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9254 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9256 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9257 * dwarf-index-common.c: New file.
9258 * dwarf-index-common.h: New file.
9259 * dwarf-index-write.c: New file.
9260 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9261 (struct dwarf2_section_info): Move from here.
9262 (dwarf2_section_info_def): Likewise.
9263 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9264 (offset_type): Likewise.
9265 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9266 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9267 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9268 (byte_swap): Likewise.
9269 (MAYBE_SWAP): Likewise.
9270 (dwarf2_per_cu_ptr): Likewise.
9271 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9272 (struct tu_stats): Likewise.
9273 (struct dwarf2_per_objfile): Likewise.
9274 (struct dwarf2_per_cu_data): Likewise.
9275 (struct signatured_type): Likewise.
9276 (sig_type_ptr): Likewise.
9277 (DEF_VEC_P (sig_type_ptr)): Likewise.
9278 (INDEX4_SUFFIX): Likewise.
9279 (INDEX5_SUFFIX): Likewise.
9280 (DEBUG_STR_SUFFIX): Likewise.
9281 (dwarf2_read_section): Make non-static.
9282 (mapped_index_string_hash): Move from here.
9283 (dwarf5_djb_hash): Likewise.
9284 (file_write): Likewise.
9285 (class data_buf): Likewise.
9286 (struct symtab_index_entry): Likewise.
9287 (struct mapped_symtab): Likewise.
9288 (find_slot): Likewise.
9289 (hash_expand): Likewise.
9290 (add_index_entry): Likewise.
9291 (uniquify_cu_indices): Likewise.
9292 (class c_str_view): Likewise.
9293 (class c_str_view_hasher): Likewise.
9294 (class vector_hasher): Likewise.
9295 (write_hash_table): Likewise.
9296 (psym_index_map): Likewise.
9297 (struct addrmap_index_data): Likewise.
9298 (add_address_entry): Likewise.
9299 (add_address_entry_worker): Likewise.
9300 (write_address_map): Likewise.
9301 (symbol_kind): Likewise.
9302 (write_psymbols): Likewise.
9303 (struct signatured_type_index_data): Likewise.
9304 (write_one_signatured_type): Likewise.
9305 (recursively_count_psymbols): Likewise.
9306 (recursively_write_psymbols): Likewise.
9307 (class debug_names): Likewise.
9308 (check_dwarf64_offsets): Likewise.
9309 (psyms_seen_size): Likewise.
9310 (write_gdbindex): Likewise.
9311 (write_debug_names): Likewise.
9312 (assert_file_size): Likewise.
9313 (write_psymtabs_to_index): Likewise.
9314 (save_gdb_index_command): Likewise.
9315 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9317 * dwarf2read.h: New file.
9319 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9322 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9323 symbol name if the CU's language stores symbol names in linkage
9325 * language.h (struct language_defn)
9326 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9327 all instances of this struct.
9329 2018-03-26 Tom Tromey <tom@tromey.com>
9331 * stack.c (backtrace_command_1): Remove verbose code.
9333 2018-03-26 Tom Tromey <tom@tromey.com>
9335 * python/py-framefilter.c (py_print_type): Don't catch
9336 exceptions. Return void.
9337 (py_print_value): Likewise.
9338 (py_print_single_arg): Likewise.
9339 (enumerate_args): Don't catch exceptions.
9340 (py_print_args): Likewise.
9341 (py_print_frame): Likewise.
9342 (gdbpy_apply_frame_filter): Catch exceptions here.
9344 2018-03-26 Tom Tromey <tom@tromey.com>
9346 * stack.c (_initialize_stack): Remove trailing newlines from help
9347 text. Add "Usage" line to "backtrace" help.
9349 2018-03-26 Tom Tromey <tom@tromey.com>
9352 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9354 2018-03-26 Tom Tromey <tom@tromey.com>
9356 * python/py-framefilter.c (py_print_single_arg): Return
9357 EXT_LANG_BT_ERROR from catch.
9359 2018-03-26 Tom Tromey <tom@tromey.com>
9362 * stack.c (backtrace_command_1): Move some code into no-filters
9365 2018-03-26 Tom Tromey <tom@tromey.com>
9367 * python/py-framefilter.c (throw_quit_or_print_exception): New
9369 (gdbpy_apply_frame_filter): Use it.
9371 2018-03-26 Tom Tromey <tom@tromey.com>
9374 * python/py-framefilter.c (py_print_type, py_print_value)
9375 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9378 2018-03-26 Tom Tromey <tom@tromey.com>
9380 * python/py-framefilter.c (enumerate_args): Use
9381 gdb::unique_xmalloc_ptr.
9383 2018-03-26 Tom Tromey <tom@tromey.com>
9385 * python/py-framefilter.c (py_print_frame): Return
9387 (gdbpy_apply_frame_filter): Update comment.
9388 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9390 <EXT_LANG_BT_NO_FILTERS>: Change value.
9392 2018-03-26 Tom Tromey <tom@tromey.com>
9395 * stack.c (backtrace_command): Parse "hide" argument.
9396 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9397 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9400 2018-03-26 Tom Tromey <tom@tromey.com>
9402 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9404 (backtrace_command): Remove "fulltrace", add "flags".
9406 2018-03-26 Tom Tromey <tom@tromey.com>
9408 * stack.c (backtrace_command): Rewrite command line parsing.
9410 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9412 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9414 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9416 * filename-seen-cache.h: Add include guard.
9418 2018-03-26 Keith Seitz <keiths@redhat.com>
9420 * symfile.c (place_section): Remove "struct" from section_addr_info
9422 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9423 "struct" keyword from section_addr_info.
9425 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9427 * regformats/regdef.h (reg): Add constructors.
9429 2018-03-25 Pedro Alves <palves@redhat.com>
9431 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9432 if then/else bodies in var_func_name extraction.
9434 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9436 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9437 lookup_minimal_symbol() to find symbol entry.
9438 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9440 2018-03-23 Keith Seitz <keiths@redhat.com>
9443 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9444 nested type definitions for C++, too.
9446 2018-03-23 Tom Tromey <tom@tromey.com>
9448 * machoread.c (struct oso_el): Add a constructor. Don't define as
9450 (macho_register_oso): Remove.
9451 (macho_symtab_read): Take a std::vector.
9452 (oso_el_compare_name): Now a std::sort comparator.
9453 (macho_symfile_read_all_oso): Take a std::vector.
9454 (macho_symfile_read): Use std::vector. Remove cleanups.
9456 2018-03-22 Tom Tromey <tom@tromey.com>
9458 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9459 (record_full_goto_bookmark): Use std::string.
9461 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9464 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9467 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9469 * rs6000-tdep.c (store_insn_p): New function.
9470 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9471 and cr_reg to their unshifted values. Use store_insn_p to
9472 match LR saves using either R1 or fdata->alloca_reg. Use
9473 store_insn_p to match CR saves. Set alloca_reg_offset
9474 when alloca_reg and framep are set. Remove lr_reg shift
9475 when assigning to fdata->lr_register.
9477 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9479 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9480 command line args instead of emitting a warning.
9482 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9484 * tracepoint.h (struct static_tracepoint_marker): Initialize
9485 fields, define default constructor, move constructor and move
9486 assignment, disable the rest.
9487 <str_id, extra>: Make std::string.
9488 (release_static_tracepoint_marker): Remove.
9489 (free_current_marker): Remove.
9490 * tracepoint.c (free_current_marker): Remove.
9491 (parse_static_tracepoint_marker_definition): Adjust to
9492 std::string, use new hex2str overload.
9493 (release_static_tracepoint_marker): Remove.
9494 (print_one_static_tracepoint_marker): Get marker by reference
9495 and adjust to std::string.
9496 (info_static_tracepoint_markers_command): Adjust to std::vector
9498 * target.h (static_tracepoint_marker_p): Remove typedef.
9499 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9500 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9502 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9504 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9505 (target_debug_print_std_vector_static_tracepoint_marker): New.
9506 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9508 (target_debug_print_static_tracepoint_marker_p): ... this.
9509 * target-delegates.c: Re-generate.
9510 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9512 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9513 (decode_static_tracepoint_spec): Adjust to std::vector.
9514 (tracepoint_print_one_detail): Adjust to std::string.
9515 (strace_marker_decode_location): Adjust to std::string.
9516 (update_static_tracepoint): Adjust to std::string, remove call
9517 to release_static_tracepoint_marker.
9518 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9519 Adjust to std::vector.
9520 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9521 (remote_static_tracepoint_markers_by_strid): Adjust to
9523 * common/rsp-low.h (hex2str): New overload with explicit count
9525 * common/rsp-low.c (hex2str): New overload with explicit count
9527 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9528 (_initialize_rsp_low_selftests): Add test_hex2str test.
9529 * unittests/tracepoint-selftests.c
9530 (test_parse_static_tracepoint_marker_definition): Adjust to
9533 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9535 * tracepoint.c (parse_static_tracepoint_marker_definition):
9536 Consider case where the definition is followed by more
9538 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9539 tracepoint-selftests.c.
9540 * unittests/tracepoint-selftests.c: New.
9542 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9544 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9547 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9549 * symtab.c (find_pc_sect_line): fixed indentation.
9551 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9553 * symtab.c (find_pc_sect_line): now uses binary search.
9555 2018-03-19 Tom Tromey <tom@tromey.com>
9557 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9560 2018-03-19 Pedro Alves <palves@redhat.com>
9561 Tom Tromey <tom@tromey.com>
9563 * unittests/observable-selftests.c: New file.
9564 * common/observable.h: New file.
9565 * observable.h: New file.
9566 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9567 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9568 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9569 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9570 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9571 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9572 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9573 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9574 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9575 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9576 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9577 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9578 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9579 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9580 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9581 tui/tui-interp.c, valops.c: Update all users.
9582 * tui/tui-hooks.c (tui_bp_created_observer)
9583 (tui_bp_deleted_observer, tui_bp_modified_observer)
9584 (tui_inferior_exit_observer, tui_before_prompt_observer)
9585 (tui_normal_stop_observer, tui_register_changed_observer):
9587 (tui_observers_token): New global.
9588 (attach_or_detach, tui_attach_detach_observers): New functions.
9589 (tui_install_hooks, tui_remove_hooks): Use
9590 tui_attach_detach_observers.
9591 * record-btrace.c (record_btrace_thread_observer): Remove.
9592 (record_btrace_thread_observer_token): New global.
9593 * observer.sh: Remove.
9594 * observer.c: Rename to observable.c.
9595 * observable.c (namespace gdb_observers): Define new objects.
9596 (observer_debug): Move into gdb_observers namespace.
9597 (struct observer, struct observer_list, xalloc_observer_list_node)
9598 (xfree_observer_list_node, generic_observer_attach)
9599 (generic_observer_detach, generic_observer_notify): Remove.
9600 (_initialize_observer): Update.
9601 Don't include observer.inc.
9602 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9603 (clean mostlyclean): Likewise.
9604 (observer.h, observer.inc): Remove targets.
9605 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9606 (COMMON_SFILES): Use observable.c, not observer.c.
9607 * .gitignore: Remove observer.h.
9609 2018-03-18 Tom Tromey <tom@tromey.com>
9611 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9613 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9615 2018-03-17 Tom Tromey <tom@tromey.com>
9617 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9619 2018-03-17 Tom Tromey <tom@tromey.com>
9621 * target.c (class scoped_target_fd): New.
9622 (target_fileio_close_cleanup): Remove.
9623 (target_fileio_read_alloc_1): Use scoped_target_fd.
9625 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9627 * silent-rules.mk: New.
9628 * Makefile.in: Include silent-rules.mk
9629 (srcdir, VPATH, top_srcdir): Move up.
9630 (COMPILE): Add ECHO_CXX.
9631 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9632 (init.c): Add ECHO_INIT_C.
9633 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9634 (version.c): Add ECHO_GEN.
9635 (printcmd.o): Add ECHO_CXX.
9636 (target-float.o): Add ECHO_CXX.
9637 (ada-exp.o): Add ECHO_CXX.
9638 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9639 (insight$(EXEEXT)): Add ECHO_CXXLD.
9640 * gnulib/configure.ac: Add AM_SILENT_RULES.
9641 * gnulib/aclocal.m4: Re-generate.
9642 * gnulib/configure: Re-generate.
9643 * gnulib/import/Makefile.in: Re-generate.
9645 2018-03-16 Tom Tromey <tom@tromey.com>
9647 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9648 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9649 * utils.c (do_free_section_addr_info)
9650 (make_cleanup_free_section_addr_info): Remove.
9651 * symfile.h (struct other_sections): Add constructor.
9652 (struct section_addr_info): Remove.
9653 (section_addr_info): New typedef.
9654 (struct sym_fns) <sym_offsets>: Change type of parameter.
9655 (build_section_addr_info_from_objfile)
9656 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9657 (default_symfile_offsets, symbol_file_add)
9658 (symbol_file_add_from_bfd)
9659 (build_section_addr_info_from_section_table): Update.
9660 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9661 * symfile.c (alloc_section_addr_info): Remove.
9662 (build_section_addr_info_from_section_table): Change return type.
9664 (build_section_addr_info_from_bfd)
9665 (build_section_addr_info_from_objfile): Likewise.
9666 (free_section_addr_info): Remove.
9667 (relative_addr_info_to_section_offsets): Change type of "addrs".
9668 (addrs_section_compar): Now a std::sort comparator.
9669 (addrs_section_sort): Change return type.
9670 (addr_info_make_relative): Change type of "addrs". Update.
9671 (default_symfile_offsets, syms_from_objfile_1)
9672 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9673 (symbol_file_add_separate): Update.
9674 (symbol_file_add): Change type of "addrs". Update.
9675 (add_symbol_file_command): Update. Remove cleanups.
9676 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9678 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9679 * solib.c (solib_read_symbols): Update.
9680 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9681 * machoread.c (macho_symfile_offsets): Update.
9682 * jit.c (jit_bfd_try_read_symtab): Update.
9684 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9686 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9687 unittests/utils-selftests.c.
9688 * unittests/utils-selftests.c: New file.
9690 2018-03-14 Tom Tromey <tom@tromey.com>
9693 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9696 2018-03-14 Tom Tromey <tom@tromey.com>
9699 * printcmd.c (printf_pointer): Allow "-" in format.
9701 2018-03-14 Tom Tromey <tom@tromey.com>
9703 * printcmd.c (_initialize_printcmd): Add usage to printf.
9705 2018-03-14 Yao Qi <qiyao@sourceware.org>
9707 * MAINTAINERS: Update my email address.
9709 2018-03-13 Tom Tromey <tom@tromey.com>
9711 * machoread.c (macho_check_dsym): Change filenamep to a
9713 (macho_symfile_read): Update.
9714 * symfile.c (load_command): Use std::string.
9716 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9718 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9719 to error message string.
9720 (riscv_register_name): Use xsnprintf instead of sprintf.
9721 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9723 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9725 (riscv_push_dummy_call): Likewise.
9727 2018-03-12 Tom Tromey <tom@tromey.com>
9729 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9730 Use gdb::byte_vector.
9731 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9733 2018-03-12 Yao Qi <yao.qi@linaro.org>
9735 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9736 parameter type to readable_regcache.
9737 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9740 2018-03-11 Tom Tromey <tom@tromey.com>
9742 * dwarf2read.c (struct nextfield): Add initializers.
9743 (struct nextfnfield): Remove.
9744 (struct fnfieldlist): Add initializers. Remove "length" and
9745 "head", use std::vector.
9746 (struct decl_field_list): Remove.
9747 (struct field_info): Add initializers.
9748 <fields, baseclasses>: Now std::vector.
9749 <nbaseclasses, nfnfields, typedef_field_list_count,
9750 nested_types_list_count>: Remove.
9751 (dwarf2_add_field, dwarf2_add_type_defn)
9752 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9753 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9754 (process_structure_scope): Update.
9756 2018-03-11 Tom Tromey <tom@tromey.com>
9758 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9759 for use by std::sort.
9760 (build_type_psymtabs_1): Use std::vector.
9762 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9764 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9765 and LIBMPFR in the printed configuration.
9767 2018-03-08 Tom Tromey <tom@tromey.com>
9769 * source.c (get_filename_and_charpos): Use scoped_fd.
9770 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9771 (procfs_pidlist): Likewise.
9772 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9773 (iterate_over_mappings): Likewise.
9775 2018-03-08 Tom Tromey <tom@tromey.com>
9777 * infcall.c (struct call_return_meta_info)
9778 <stack_temporaries_enabled>: Remove.
9779 (get_call_return_value, call_function_by_hand_dummy): Update.
9780 * thread.c (disable_thread_stack_temporaries): Remove.
9781 (enable_thread_stack_temporaries): Remove.
9782 (thread_stack_temporaries_enabled_p): Return bool.
9783 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9784 (get_last_thread_stack_temporary): Update.
9785 * eval.c (evaluate_subexp): Update.
9786 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9787 class, not a function.
9788 (value_ptr, value_vec): Remove typedefs.
9789 (class thread_info) <stack_temporaries_enabled>: Now bool.
9790 <stack_temporaries>: Now a std::vector.
9791 (thread_stack_temporaries_enabled_p)
9792 (value_in_thread_stack_temporaries): Return bool.
9794 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9796 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9797 (getpkt_or_notif_sane_1): Likewise.
9799 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9801 * build-id.c (build_id_to_debug_bfd): Use std::string.
9803 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9805 * build-id.c (find_separate_debug_file_by_buildid): Return
9807 * build-id.h (find_separate_debug_file_by_buildid): Return
9809 * coffread.c (coff_symfile_read): Adjust to std::string.
9810 * elfread.c (elf_symfile_read): Adjust to std::string.
9811 * symfile.c (separate_debug_file_exists): Change parameter to
9813 (find_separate_debug_file): Return std::string.
9814 (find_separate_debug_file_by_debuglink): Return std::string.
9815 * symfile.h (find_separate_debug_file_by_debuglink): Return
9818 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9820 * common/xml-utils.c (xml_escape_text): Move code to...
9821 (xml_escape_text_append): ... this new function.
9822 * common/xml-utils.h (xml_escape_text_append): New declaration.
9823 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9825 (_initialize_xml_utils): register test_xml_escape_text_append as
9828 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9830 * defs.h: Remove MAX_REGISTER_SIZE.
9831 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9833 * python/py-unwind.c (pyuw_sniffer): Likewise.
9835 2018-03-07 Tom Tromey <tom@tromey.com>
9837 * linux-tdep.c (linux_info_proc): Update.
9838 * target.h (struct target_ops) <to_fileio_readlink>: Return
9840 (target_fileio_readlink): Return optional<string>.
9841 * remote.c (remote_hostio_readlink): Return optional<string>.
9842 * inf-child.c (inf_child_fileio_readlink): Return
9844 * target.c (target_fileio_readlink): Return optional<string>.
9846 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9848 * regcache.c (cooked_read_test): Add riscv to the list of
9849 architectures that have a save_reggroup.
9851 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9853 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9854 value is not a dynamic class object.
9856 2018-03-06 Tom Tromey <tom@tromey.com>
9858 * rust-exp.y: Formatting fixes.
9860 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9862 * riscv-tdep.c (riscv_register_name): Remove target description
9864 (riscv_gdbarch_init): Remove target description check.
9866 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9868 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9870 * riscv-tdep.h: Likewise.
9872 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9874 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9875 (riscv_pseudo_register_write): Delete.
9876 (riscv_gdbarch_init): Remove all use of pseudo registers.
9878 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9880 * record-btrace.c (btrace_print_lines): Replace cleanup
9881 parameter with RAII equivalents.
9882 (btrace_insn_history): Replace cleanup with RAII equivalents.
9883 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9884 make_cleanup_ui_out_tuple_begin_end): Remove.
9885 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9886 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9887 make_cleanup_ui_out_list_begin_end): Remove.
9889 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9891 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9892 parameter types to std::vector. Use bool.
9893 (record_btrace_wait): Replace VEC(tp_t) with
9894 std::vector<thread_info *>.
9895 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9897 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9899 * record-btrace.c (record_btrace_disable_callback): Remove.
9900 (struct scoped_btrace_disable): New.
9901 (record_btrace_open): Use scoped_btrace_disable.
9903 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9905 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9906 reading values from registers.
9908 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9910 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9913 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9915 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9916 change parameter type. Use GDB's print functions, and use
9917 core_addr_to_string where appropriate.
9918 (riscv_push_dummy_call): Use core_addr_to_string where
9919 appropriate, update call to riscv_print_arg_location, and reindent
9921 (riscv_return_value): Update call to riscv_print_arg_location.
9923 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9924 Tim Newsome <tim@sifive.com>
9925 Albert Ou <a0u@eecs.berkeley.edu>
9926 Darius Rad <darius@bluespec.com>
9928 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9929 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9930 (ALLDEPFILES): Add riscv-tdep.c
9931 * configure.tgt: Add riscv support.
9932 * riscv-tdep.c: New file.
9933 * riscv-tdep.h: New file.
9934 * NEWS: Mention new target.
9935 * MAINTAINERS: Add entry for riscv.
9937 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9939 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9940 fields within aggregates.
9942 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9944 * record-btrace.c (btrace_print_lines): Change type of flags to
9945 gdb_disassembly_flags.
9947 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9949 * fbsd-nat.c: Include "inf-ptrace.h".
9950 (USE_SIGTRAP_SIGINFO): Conditionally define.
9951 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9952 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9953 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9955 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9957 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9959 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9960 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9961 "supports_stopped_by_hw_breakpoint" target methods.
9963 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9965 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9966 * fbsd-nat.c (debug_fbsd_nat): New variable.
9967 (show_fbsd_nat_debug): New function.
9968 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9969 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9971 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9973 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9974 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9976 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9977 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9980 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9982 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9983 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9985 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9987 * charset.c (struct charset_vector): New.
9988 (charsets): Change type to charset_vector.
9989 (find_charset_names): Adjust.
9991 (_initialize_charset): Adjust.
9993 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9995 * progspace.h (struct program_space) <deleted_solibs>: Change
9996 type to std::vector<std::string>.
9997 * progspace.c (clear_program_space_solib_cache): Adjust.
9998 * breakpoint.c (print_solib_event): Adjust.
9999 (check_status_catch_solib): Adjust.
10000 * solib.c (update_solib_list): Adjust.
10001 * ui-out.h (class ui_out) <field_string>: New overload.
10002 * ui-out.c (ui_out::field_string): New overload.
10004 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10006 * progspace.h (struct program_space): Add constructor and
10007 destructor, initialize fields.
10008 (add_program_space): Remove.
10009 * progspace.c (add_program_space): Rename to...
10010 (program_space::program_space): ... this.
10011 (release_program_space): Rename to...
10012 (program_space::~program_space): ... this.
10013 (delete_program_space): Use delete to delete program_space.
10014 (initialize_progspace): Use new to allocate program_space.
10015 * inferior.c (add_inferior_with_spaces): Likewise.
10016 (clone_inferior_command): Likewise.
10017 * infrun.c (follow_fork_inferior): Likewise.
10018 (handle_vfork_child_exec_or_exit): Likewise.
10020 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10022 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10023 (delim_string_to_char_ptr_vec): Return std::vector of
10024 gdb::unique_xmalloc_ptr.
10025 (dirnames_to_char_ptr_vec_append): Take std::vector of
10026 gdb::unique_xmalloc_ptr.
10027 (dirnames_to_char_ptr_vec): Return std::vector of
10028 gdb::unique_xmalloc_ptr.
10029 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10030 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10031 (delim_string_to_char_ptr_vec): Return an std::vector of
10032 gdb::unique_xmalloc_ptr, adjust the code.
10033 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10034 gdb::unique_xmalloc_ptr, adjust the code.
10035 (dirnames_to_char_ptr_vec): Return an std::vector of
10036 gdb::unique_xmalloc_ptr, adjust the code.
10037 * auto-load.c (auto_load_safe_path_vec): Change type to
10038 std::vector of gdb::unique_xmalloc_ptr.
10039 (auto_load_expand_dir_vars): Return an std::vector of
10040 gdb::unique_xmalloc_ptr, adjust the code.
10041 (auto_load_safe_path_vec_update): Adjust.
10042 (filename_is_in_auto_load_safe_path_vec): Adjust.
10043 (auto_load_objfile_script_1): Adjust.
10044 * build-id.c (build_id_to_debug_bfd): Adjust.
10045 * linux-thread-db.c (thread_db_load_search): Adjust.
10046 * source.c (add_path): Adjust.
10048 * symfile.c (find_separate_debug_file): Adjust.
10049 * utils.c (do_free_char_ptr_vec): Remove.
10050 (make_cleanup_free_char_ptr_vec): Remove.
10052 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10055 * common/pathstuff.c: Conditionally include "<windows.h>".
10057 2018-03-01 Georg Sauthoff <mail@georg.so>
10060 * gcore.in: Quote variables and switch interpreter to bash.
10062 2018-03-01 Tom Tromey <tom@tromey.com>
10064 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10065 assertion. Add assertion for discriminant_index.
10066 (quirk_rust_enum): Use correct base type name in univariant case.
10068 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10070 * record.c (get_call_history_modifiers): Return a
10071 record_print_flags.
10072 (cmd_record_call_history): Adjust.
10073 * record-btrace.c (record_btrace_call_history): Adjust.
10074 (record_btrace_call_history_range): Adjust.
10075 (record_btrace_call_history_from): Adjust.
10076 * target-debug.h (target_debug_print_record_print_flags): New.
10077 * target-delegates.c: Re-generate.
10078 * target.c (target_call_history): Change flags type.
10079 (target_call_history_from): Likewise.
10080 (target_call_history_range): Likewise.
10081 * target.h (struct target_ops) <target_call_history>: Likewise.
10082 (target_call_history_from): Likewise.
10083 (target_call_history_range): Likewise.
10085 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10086 Simon Marchi <simon.marchi@polymtl.ca>
10088 * common/common-utils.c: Include "sys/stat.h".
10089 (is_regular_file): Move here from "source.c"; change return
10091 * common/common-utils.h (is_regular_file): New prototype.
10092 * common/pathstuff.c (contains_dir_separator): New function.
10093 * common/pathstuff.h (contains_dir_separator): New prototype.
10094 * source.c: Don't include "sys/stat.h".
10095 (is_regular_file): Move to "common/common-utils.c".
10097 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10099 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10100 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10101 * auto-load.c: Include "common/pathstuff.h".
10102 * common/common-def.h (current_directory): Move here.
10103 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10105 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10107 * common/pathstuff.c: New file.
10108 * common/pathstuff.h: New file.
10109 * compile/compile.c: Include "common/pathstuff.h".
10110 * defs.h (current_directory): Move to "common/common-defs.h".
10111 * dwarf2read.c: Include "common/pathstuff.h".
10112 * exec.c: Likewise.
10113 * guile/scm-safe-call.c: Likewise.
10114 * linux-thread-db.c: Likewise.
10115 * main.c: Likewise.
10116 * nto-tdep.c: Likewise.
10117 * objfiles.c: Likewise.
10118 * source.c: Likewise.
10119 * symtab.c: Likewise.
10120 * utils.c: Include "common/pathstuff.h".
10121 (gdb_realpath): Move to "common/pathstuff.c".
10122 (gdb_realpath_keepfile): Likewise.
10123 (gdb_abspath): Likewise.
10124 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10125 (gdb_realpath_keepfile): Likewise.
10126 (gdb_abspath): Likewise.
10128 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10130 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10131 wildcard process pid for super_resume for kernels with a
10134 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10136 * compile/compile.c (get_args): Add additional comments
10137 explaining function.
10139 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10140 Tom Tromey <tom@tromey.com>
10142 * target.h (memory_write_request_s): Remove typedef. Don't define
10144 (target_write_memory_blocks): Change argument to std::vector.
10145 (struct memory_write_request): Add constructor.
10146 * target-memory.c (compare_block_starting_address): Return bool.
10147 Change argument types.
10148 (claim_memory): Change arguments to use std::vector.
10149 (split_regular_and_flash_blocks, blocks_to_erase)
10150 (compute_garbled_blocks): Likewise.
10151 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10152 (target_write_memory_blocks): Change argument to std::vector.
10153 * symfile.c (struct load_section_data): Add constructor and
10154 destructor. Use std::vector for "requests".
10155 (struct load_progress_data): Add initializers.
10156 (load_section_callback): Update. Use "new".
10157 (clear_memory_write_data): Remove.
10158 (generic_load): Update.
10160 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10162 * arch/aarch64.h: Use common/tdesc.h.
10164 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10166 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10167 architecture with a 64-bit ABI.
10169 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10171 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10172 ahead of target description loading.
10174 2018-02-26 Tom Tromey <tom@tromey.com>
10176 * stack.c (backtrace_command_1): Update.
10177 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10179 * python/py-framefilter.c (py_print_frame)
10180 (gdbpy_apply_frame_filter): Change type of "flags".
10181 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10183 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10184 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10185 * extension.h (enum frame_filter_flag): Rename from
10186 frame_filter_flags.
10187 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10188 (apply_ext_lang_frame_filter): Change type of "flags".
10189 * extension.c (apply_ext_lang_frame_filter): Change type of
10191 * extension-priv.h (struct extension_language_ops)
10192 <apply_frame_filter>: Change type of "flags".
10194 2018-02-26 Tom Tromey <tom@tromey.com>
10197 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10198 off-by-one in py_end computation.
10199 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10201 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10204 2018-02-26 Tom Tromey <tom@tromey.com>
10206 * dwarf2read.c (struct variant_field): New.
10207 (struct nextfield) <variant>: New field.
10208 (dwarf2_add_field): Handle DW_TAG_variant_part.
10209 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10210 discriminated union.
10211 (read_structure_type): Handle DW_TAG_variant_part.
10212 (handle_struct_member_die): New function, extracted from
10213 process_structure_scope. Handle DW_TAG_variant.
10214 (process_structure_scope): Handle discriminated unions. Call
10215 handle_struct_member_die.
10217 2018-02-26 Tom Tromey <tom@tromey.com>
10219 * rust-lang.h (rust_last_path_segment): Declare.
10220 * rust-lang.c (rust_last_path_segment): Now public. Change
10222 (struct disr_info): Remove.
10223 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10224 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10225 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10226 (rust_enum_p, rust_enum_variant): New function.
10227 (rust_underscore_fields): Remove "offset" parameter.
10228 (rust_print_enum): New function.
10229 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10230 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10231 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10233 (rust_internal_print_type): New function, from rust_print_type.
10235 (rust_print_type): Call rust_internal_print_type.
10236 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10237 Update enum handling.
10238 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10239 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10240 (rust_union_quirks): New functions.
10241 (process_full_comp_unit, process_full_type_unit): Call
10243 (process_structure_scope): Update rust_unions if necessary.
10245 2018-02-26 Tom Tromey <tom@tromey.com>
10247 * value.h (value_union_variant): Declare.
10248 * valops.c (value_union_variant): New function.
10249 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10250 (struct discriminant_info): New.
10251 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10253 (struct main_type) <flag_discriminated_union>: New field.
10255 2018-02-26 Tom Tromey <tom@tromey.com>
10257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10258 unittests/unpack-selftests.c.
10259 * unittests/unpack-selftests.c: New file.
10260 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10262 2018-02-26 Yao Qi <yao.qi@linaro.org>
10264 * dwarf2read.c (struct partial_die_info) <read>: New method.
10265 (read_partial_die): Remove the declaration.
10266 (load_partial_dies): Update.
10267 (partial_die_info::partial_die_info):
10268 (read_partial_die): Change it to partial_die_info::read.
10270 2018-02-26 Yao Qi <yao.qi@linaro.org>
10272 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10273 (fixup_partial_die): Remove declaration.
10274 (scan_partial_symbols): Update.
10275 (partial_die_parent_scope): Likewise.
10276 (partial_die_full_name): Likewise.
10277 (fixup_partial_die): Change it to partial_die_info::fixup.
10279 2018-02-26 Yao Qi <yao.qi@linaro.org>
10281 * dwarf2read.c (read_partial_die): Update the declaration.
10282 (load_partial_dies): Caller update.
10283 (read_partial_die): Remove one argument abbrev_len.
10285 2018-02-26 Yao Qi <yao.qi@linaro.org>
10287 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10288 assignment operator.
10289 (load_partial_dies): Use ctor and copy ctor.
10290 (read_partial_die): Update.
10291 (dwarf2_cu::find_partial_die): Use ctor.
10293 2018-02-26 Yao Qi <yao.qi@linaro.org>
10295 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10296 (find_partial_die_in_comp_unit): Change it to
10297 dwarf2_cu::find_partial_die.
10298 (find_partial_die): Update.
10300 2018-02-26 Yao Qi <yao.qi@linaro.org>
10302 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10305 2018-02-26 Yao Qi <yao.qi@linaro.org>
10307 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10309 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10311 * arch/amd64.h: Use common/tdesc.h.
10312 * arch/i386.c: Likewise.
10313 * arch/i386.h: Likewise.
10314 * arch/tic6x.c: Likewise.
10315 * arch/tdesc.h: Move file from here...
10316 * common/tdesc.h: ...to here.
10317 * features/aarch64-core.c: Regenerate.
10318 * features/aarch64-fpu.c: Regenerate.
10319 * features/i386/32bit-avx.c: Regenerate.
10320 * features/i386/32bit-avx512.c: Regenerate.
10321 * features/i386/32bit-core.c: Regenerate.
10322 * features/i386/32bit-linux.c: Regenerate.
10323 * features/i386/32bit-mpx.c: Regenerate.
10324 * features/i386/32bit-pkeys.c: Regenerate.
10325 * features/i386/32bit-sse.c: Regenerate.
10326 * features/i386/64bit-avx.c: Regenerate.
10327 * features/i386/64bit-avx512.c: Regenerate.
10328 * features/i386/64bit-core.c: Regenerate.
10329 * features/i386/64bit-linux.c: Regenerate.
10330 * features/i386/64bit-mpx.c: Regenerate.
10331 * features/i386/64bit-pkeys.c: Regenerate.
10332 * features/i386/64bit-segments.c: Regenerate.
10333 * features/i386/64bit-sse.c: Regenerate.
10334 * features/i386/x32-core.c: Regenerate.
10335 * features/tic6x-c6xp.c: Regenerate.
10336 * features/tic6x-core.c: Regenerate.
10337 * features/tic6x-gp.c: Regenerate.
10338 * target-descriptions.c: Use common/tdesc.h.
10339 * target-descriptions.h: Likewise.
10341 2018-02-24 Tom Tromey <tom@tromey.com>
10343 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10344 (try_thread_db_load_from_dir, thread_db_load_search): Use
10346 (info_auto_load_libthread_db_compare): Return bool. Change
10348 (info_auto_load_libthread_db): Use std::vector, std::string.
10351 2018-02-24 Tom Tromey <tom@tromey.com>
10353 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10355 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10357 * gdbarch.c: Rebuild.
10358 * gdbarch.h: Rebuild.
10359 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10360 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10361 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10364 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10366 * gdbtypes.h (sect_offset): Change type to uint64_t.
10367 (sect_offset_str): New function.
10368 * dwarf2read.c (create_addrmap_from_aranges): Use
10370 (error_check_comp_unit_head): Likewise.
10371 (create_debug_type_hash_table): Likewise.
10372 (read_cutu_die_from_dwo): Likewise.
10373 (init_cutu_and_read_dies): Likewise.
10374 (init_cutu_and_read_dies_no_follow): Likewise.
10375 (process_psymtab_comp_unit_reader): Likewise.
10376 (partial_die_parent_scope): Likewise.
10377 (peek_die_abbrev): Likewise.
10378 (process_queue): Likewise.
10379 (dwarf2_physname): Likewise.
10380 (read_namespace_alias): Likewise.
10381 (read_import_statement): Likewise.
10382 (create_dwo_cu_reader): Likewise.
10383 (create_cus_hash_table): Likewise.
10384 (lookup_dwo_cutu): Likewise.
10385 (inherit_abstract_dies): Likewise.
10386 (read_func_scope): Likewise.
10387 (read_call_site_scope): Likewise.
10388 (dwarf2_add_member_fn): Likewise.
10389 (read_common_block): Likewise.
10390 (read_module_type): Likewise.
10391 (read_typedef): Likewise.
10392 (read_subrange_type): Likewise.
10393 (load_partial_dies): Likewise.
10394 (read_partial_die): Likewise.
10395 (find_partial_die): Likewise.
10396 (read_str_index): Likewise.
10397 (dwarf2_string_attr): Likewise.
10398 (build_error_marker_type): Likewise.
10399 (lookup_die_type): Likewise.
10400 (dump_die_shallow): Likewise.
10401 (follow_die_ref): Likewise.
10402 (dwarf2_fetch_die_loc_sect_off): Likewise.
10403 (dwarf2_fetch_constant_bytes): Likewise.
10404 (follow_die_sig): Likewise.
10405 (get_signatured_type): Likewise.
10406 (get_DW_AT_signature_type): Likewise.
10407 (dwarf2_find_containing_comp_unit): Likewise.
10408 (set_die_type): Likewise.
10410 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10412 * arch/aarch64.c: Include "common-defs.h".
10413 * arch/amd64.c: Likewise.
10414 * arch/i386.c: Likewise.
10416 2018-02-21 Tom Tromey <tom@tromey.com>
10418 * value.h: (extract_field_op): Update.
10419 * eval.c (extract_field_op): Return a const char *.
10420 * expression.h (parse_expression_for_completion): Update.
10421 * completer.c (complete_expression): Update.
10422 (add_struct_fields): Make fieldname const.
10423 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10424 (mark_completion_tag, parse_exp_in_context_1): Update.
10425 (parse_expression_for_completion): Change "name" to
10426 unique_xmalloc_ptr*.
10428 2018-02-21 Tom Tromey <tom@tromey.com>
10430 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10432 2018-02-21 Yao Qi <yao.qi@linaro.org>
10434 * avr-tdep.c (avr_read_pc): Change parameter type to
10436 * gdbarch.sh (read_pc): Likewise.
10437 * gdbarch.c: Re-generated.
10438 * gdbarch.h: Re-generated.
10439 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10441 * ia64-tdep.c (ia64_read_pc): Likewise.
10442 * mips-tdep.c (mips_read_pc): Likewise.
10443 * spu-tdep.c (spu_read_pc): Likewise.
10445 2018-02-21 Yao Qi <yao.qi@linaro.org>
10447 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10448 * regcache-dump.c: New file.
10449 * regcache.c: Move register_dump to regcache-dump.c.
10450 (maintenance_print_registers): Likewise.
10451 (maintenance_print_raw_registers): Likewise.
10452 (maintenance_print_cooked_registers): Likewise.
10453 (maintenance_print_register_groups): Likewise.
10454 (maintenance_print_remote_registers): Likewise.
10455 (_initialize_regcache): Likewise.
10456 * regcache.h (register_dump): Moved from regcache.c.
10458 2018-02-21 Yao Qi <yao.qi@linaro.org>
10460 * regcache.c (regcache::regcache): Update.
10461 (regcache::invalidate): Move it to detached_regcache::invalidate.
10462 (get_thread_arch_aspace_regcache): Update.
10463 (regcache::raw_update): Update.
10464 (regcache::cooked_read): Remove some code.
10465 (regcache::cooked_read_value): Likewise.
10466 (regcache::raw_write): Remove assert on m_readonly_p.
10467 (regcache::raw_supply_integer): Move it to
10468 detached_regcache::raw_supply_integer.
10469 (regcache::raw_supply_zeroed): Likewise.
10470 * regcache.h (detached_regcache) <raw_supply_integer>: New
10472 <raw_supply_zeroed, invalidate>: Likewise.
10473 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10474 <invalidate>: Likewise.
10475 <m_readonly_p>: Removed.
10477 2018-02-21 Yao Qi <yao.qi@linaro.org>
10479 * infcmd.c (get_return_value): Let stop_regs point to
10480 get_current_regcache.
10481 * regcache.c (regcache::regcache): Remove.
10482 (register_dump_reg_buffer): New class.
10483 (regcache_print): Adjust.
10484 * regcache.h (regcache): Remove constructors.
10486 2018-02-21 Yao Qi <yao.qi@linaro.org>
10488 * regcache.c (class register_dump): New class.
10489 (register_dump_regcache, register_dump_none): New class.
10490 (register_dump_remote, register_dump_groups): New class.
10491 (regcache_print): Update.
10492 * regcache.h (regcache_dump_what): Move it to regcache.c.
10493 (regcache) <dump>: Remove.
10495 2018-02-21 Yao Qi <yao.qi@linaro.org>
10497 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10499 (jit_unwind_reg_set_impl): Call raw_supply.
10500 (jit_frame_sniffer): Use reg_buffer_rw.
10501 * record-full.c (record_full_core_regbuf): Change its type.
10502 (record_full_core_open_1): Use reg_buffer_rw.
10503 (record_full_close): Likewise.
10504 (record_full_core_fetch_registers): Use regcache->raw_supply.
10505 (record_full_core_store_registers): Likewise.
10506 * regcache.c (regcache::get_register_status): Move it to
10508 (regcache_raw_set_cached_value): Remove.
10509 (regcache::raw_set_cached_value): Remove.
10510 (regcache::raw_write): Call raw_supply.
10511 (regcache::raw_supply): Move it to reg_buffer_rw.
10512 * regcache.h (regcache_raw_set_cached_value): Remove.
10513 (reg_buffer_rw): New class.
10515 2018-02-21 Yao Qi <yao.qi@linaro.org>
10517 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10518 readonly_detached_regcache.
10519 (dummy_frame_prev_register): Use regcache->cooked_read.
10520 * frame.c (frame_save_as_regcache): Change return type.
10521 (frame_pop): Update.
10522 * frame.h (frame_save_as_regcache): Update declaration.
10523 * inferior.h (get_infcall_suspend_state_regcache): Update
10525 * infrun.c (infcall_suspend_state) <registers>: use
10526 readonly_detached_regcache.
10527 (save_infcall_suspend_state): Don't use regcache_dup.
10528 (get_infcall_suspend_state_regcache): Change return type.
10529 * linux-fork.c (struct fork_info) <savedregs>: Change to
10530 readonly_detached_regcache.
10532 (fork_save_infrun_state): Don't use regcache_dup.
10533 (info_checkpoints_command): Adjust.
10534 * mi/mi-main.c (register_changed_p): Update declaration.
10535 (mi_cmd_data_list_changed_registers): Use
10536 readonly_detached_regcache.
10537 (register_changed_p): Change parameter type to
10538 readonly_detached_regcache.
10539 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10540 readonly_detached_regcache.
10541 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10542 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10544 (regcache::save): Move it to reg_buffer.
10545 (regcache::restore): Change parameter type.
10546 (regcache_dup): Remove.
10547 * regcache.h (reg_buffer) <save>: New method.
10548 (readonly_detached_regcache): New class.
10549 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10550 readonly_detached_regcache.
10551 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10553 2018-02-21 Yao Qi <yao.qi@linaro.org>
10555 * frame.c (frame_save_as_regcache): Use regcache method save.
10556 (frame_pop): Use regcache method restore.
10557 * infrun.c (restore_infcall_suspend_state): Likewise.
10558 * linux-fork.c (fork_load_infrun_state): Likewise.
10559 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10561 * regcache.c (regcache_save): Remove.
10562 (regcache::restore): More asserts.
10563 (regcache_cpy): Remove.
10564 * regcache.h (regcache_save): Remove the declaration.
10565 (regcache::restore): Move from private to public.
10566 Remove the friend declaration of regcache_cpy.
10567 (regcache_cpy): Remove declaration.
10569 2018-02-21 Yao Qi <yao.qi@linaro.org>
10571 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10572 parameter type to 'readable_regcache *'.
10573 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10574 * arm-tdep.c (arm_neon_quad_read): Likewise.
10575 (arm_pseudo_read): Likewise.
10576 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10577 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10578 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10579 * gdbarch.c: Re-generated.
10580 * gdbarch.h: Re-generated.
10581 * gdbarch.sh (pseudo_register_read): Change parameter type to
10582 'readable_regcache *'.
10583 (pseudo_register_read_value): Likewise.
10584 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10585 (h8300_pseudo_register_read): Likewise.
10586 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10587 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10588 (i386_pseudo_register_read_into_value): Likewise.
10589 (i386_pseudo_register_read_value): Likewise.
10590 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10592 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10593 * m32c-tdep.c (m32c_raw_read): Likewise.
10594 (m32c_read_flg): Likewise.
10595 (m32c_banked_register): Likewise.
10596 (m32c_banked_read): Likewise.
10597 (m32c_sb_read): Likewise.
10598 (m32c_part_read): Likewise.
10599 (m32c_cat_read): Likewise.
10600 (m32c_r3r2r1r0_read): Likewise.
10601 (m32c_pseudo_register_read): Likewise.
10602 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10603 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10604 (mep_pseudo_cr64_read): Likewise.
10605 (mep_pseudo_register_read): Likewise.
10606 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10607 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10608 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10609 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10610 (regcache::cooked_read): Likewise.
10611 (regcache::cooked_read_value): Likewise.
10612 (regcache_cooked_read_signed):
10613 (regcache::cooked_read): Likewise.
10614 * regcache.h (readable_regcache): New class.
10615 (regcache): Inherit readable_regcache. Move some methods to
10617 * rl78-tdep.c (rl78_pseudo_register_read): Change
10618 parameter type to 'readable_regcache *'.
10619 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10620 (e500_pseudo_register_read): Change parameter type to
10621 'readable_regcache *'.
10622 (dfp_pseudo_register_read): Likewise.
10623 (vsx_pseudo_register_read): Likewise.
10624 (efpr_pseudo_register_read): Likewise.
10625 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10626 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10627 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10628 (sh64_pseudo_register_read): Likewise.
10629 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10630 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10631 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10632 (spu_pseudo_register_read): Likewise.
10633 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10634 (xtensa_pseudo_register_read): Likewise.
10636 2018-02-21 Yao Qi <yao.qi@linaro.org>
10638 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10639 (regcache::arch): Move it to reg_buffer::arch.
10640 (regcache::register_buffer): Likewise.
10641 (regcache::assert_regnum): Likewise.
10642 (regcache::num_raw_registers): Likewise.
10643 * regcache.h (reg_buffer): New class.
10644 (regcache): Inherit reg_buffer.
10646 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10648 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10649 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10651 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10653 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10655 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10657 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10658 (SFILES): Remove common/*.c files.
10659 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10660 * common/common.host: Add common reference.
10661 * configure.ac: Likewise.
10662 * configure: Regenerate.
10664 2018-02-16 Yao Qi <yao.qi@linaro.org>
10666 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10667 (block_initialize_namespace): Use new.
10668 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10669 (dwarf2_free_objfile): Use delete.
10670 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10671 (copy_type_recursive): Use new.
10672 * gdb_obstack.h (allocate_on_obstack): New.
10674 2018-02-15 Yao Qi <yao.qi@linaro.org>
10677 * inferior.c (exit_inferior_1): Reset inf->control.
10679 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10681 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10684 2018-02-14 Pedro Alves <palves@redhat.com>
10686 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10687 frame_cleanup_after_sniffer on exception.
10689 2018-02-14 Tom Tromey <tom@tromey.com>
10691 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10693 (solib_bfd_open): Make pathname const.
10694 * solib.c (solib_bfd_open): Make pathname const.
10695 * solib-spu.c (spu_bfd_fopen): Make name const.
10696 (spu_bfd_open): Make pathname const.
10697 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10698 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10700 2018-02-14 Tom Tromey <tom@tromey.com>
10702 * symfile.c (symfile_bfd_open): Update.
10703 * source.h (openp, source_full_path_of, find_and_open_source):
10704 Change argument type to unique_xmalloc_ptr.
10705 * source.c (openp): Take a unique_xmalloc_ptr.
10706 (source_full_path_of, find_and_open_source): Likewise.
10707 (open_source_file, symtab_to_fullname): Update.
10708 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10709 unique_xmalloc_ptr.
10710 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10711 (exec_file_find): Update.
10712 * psymtab.c (psymtab_to_fullname): Update.
10713 * nto-tdep.h (nto_find_and_open_solib): Update.
10714 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10715 unique_xmalloc_ptr.
10716 * exec.c (exec_file_attach): Update.
10717 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10718 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10720 2018-02-14 Tom Tromey <tom@tromey.com>
10722 * solib.c: Include source.h.
10723 * nto-tdep.c: Include source.h.
10724 * mi/mi-cmd-env.c: Include source.h.
10725 * infcmd.c: Include source.h.
10726 * exec.c: Include source.h.
10727 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10728 (add_path, directory_switch, source_path, init_source_path): Move
10730 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10731 (add_path, directory_switch, source_path, init_source_path):
10734 2018-02-14 Tom Tromey <tom@tromey.com>
10736 * solist.h (exec_file_find, solib_find): Return
10737 unique_xmalloc_ptr.
10738 (solib_bfd_fopen): Take a const char *.
10739 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10740 (exec_file_find, solib_find): Likewise.
10741 (solib_bfd_fopen): Do not take ownership of "pathname".
10742 (solib_bfd_open): Use unique_xmalloc_ptr.
10743 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10744 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10745 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10746 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10748 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10750 * ada-lang.c (name_match_type_from_name): Remove reference to
10751 ada_name_for_lookup in function's documentation.
10752 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10754 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10756 * defs.h (enum openp_flags): New enum.
10757 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10758 Move to enum openp_flags.
10759 (openp_flags): New enum flags.
10760 (openp): Change parameter type to openp_flags.
10761 * source.c (openp): Change parameter type to openp_flags.
10762 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10763 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10765 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10767 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10770 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10772 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10774 (class dwarf2_queue_guard): ...the destructor of this new class.
10775 (dw2_do_instantiate_symtab): Create instance of the new class
10776 dwarf2_queue_guard, remove cleanup.
10778 2018-02-09 Tom Tromey <tom@tromey.com>
10780 * source.c (find_source_lines): Don't reference past the end of
10783 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10785 * remote.c (remote_btrace_maybe_reopen): Change error message.
10786 * btrace.c (btrace_enable): Likewise.
10787 (parse_xml_btrace): Likewise.
10788 (parse_xml_btrace_conf): Likewise.
10790 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10792 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10793 (linux_enable_pt, linux_enable_bts): Call
10794 diagnose_perf_event_open_fail.
10796 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10798 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10799 Remove parameter and change return type. Update callers. Move it.
10800 (linux_enable_bts, linux_enable_pt): Improve error message.
10801 (linux_enable_pt): Remove zero buffer size check.
10802 (linux_enable_btrace): Improve error messages. Remove NULL return
10805 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10807 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10808 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10809 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10810 (linux_supports_pt, linux_supports_btrace): Remove.
10811 (linux_enable_bts): Call cpu_supports_bts.
10812 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10813 * remote.c (remote_supports_btrace): Remove.
10814 (init_remote_ops): Remove remote_supports_btrace.
10815 * target-delegates.c: Regenerated.
10816 * target.c (target_supports_btrace): Remove.
10817 * target.h (target_ops) <to_supports_btrace>: Remove
10818 (target_supports_btrace): Remove.
10819 * x86-linux-nat.c (x86_linux_create_target): Remove
10820 linux_supports_btrace.
10822 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10824 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10826 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10827 exception and use message in own exception.
10829 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10831 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10832 (perf_event_pt_event_type): Use gdb_file_up.
10833 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10834 scoped_fd, and scoped_mmap.
10836 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10838 * common/scoped_mmap.h: New.
10839 * unittests/scoped_mmap-selftest.c: New.
10840 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10841 unittests/scoped_mmap-selftest.c.
10843 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10845 * common/scoped_fd.h: New.
10846 * unittests/scoped_fd-selftest.c: New.
10847 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10848 unittests/scoped_fd-selftest.c.
10850 2018-02-09 Tom Tromey <tom@tromey.com>
10852 * auto-load.c (auto_load_section_scripts): Use
10853 gdb::unique_xmalloc_ptr.
10855 2018-02-09 Tom Tromey <tom@tromey.com>
10857 * auto-load.c (execute_script_contents): Use std::string.
10859 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10861 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10862 Python function, rather than a new command.
10864 2018-02-08 Tom Tromey <tom@tromey.com>
10866 * solib.c (solib_find_1): Use std::string.
10867 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10869 2018-02-08 Tom Tromey <tom@tromey.com>
10871 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10873 2018-02-08 Tom Tromey <tom@tromey.com>
10875 * source.c (find_source_lines): Use gdb::def_vector.
10877 2018-02-08 Tom Tromey <tom@tromey.com>
10879 * macrocmd.c (struct temporary_macro_definition): New.
10880 (macro_define_command): Use temporary_macro_definition. Remove
10882 (free_macro_definition_ptr): Remove.
10884 2018-02-08 Tom Tromey <tom@tromey.com>
10886 * macroexp.c (maybe_expand): Use std::string.
10888 2018-02-08 Tom Tromey <tom@tromey.com>
10890 * macroexp.c (struct macro_buffer): Add initializers for some
10892 (init_buffer, init_shared_buffer, free_buffer)
10893 (free_buffer_return_text): Remove.
10894 (macro_buffer): New constructors.
10895 (~macro_buffer): New destructor.
10896 (macro_buffer::set_shared): New method.
10897 (macro_buffer::resize_buffer, macro_buffer::appendc)
10898 (macro_buffer::appendmem): Now methods, not free functions.
10899 (set_token, append_tokens_without_splicing, stringify)
10900 (macro_stringify): Update.
10901 (gather_arguments): Change return type. Remove argc_p argument,
10902 add args_ptr argument. Use std::vector.
10903 (substitute_args): Remove argc argument. Accept std::vector.
10904 (expand): Update. Use std::vector.
10905 (scan, macro_expand, macro_expand_next): Update.
10907 2018-02-08 Tom Tromey <tom@tromey.com>
10909 * symtab.c (default_collect_symbol_completion_matches_break_on):
10910 Use unique_xmalloc_ptr.
10911 * macroscope.h: (sal_macro_scope, user_macro_scope)
10912 (default_macro_scope): Return unique_xmalloc_ptr.
10913 * macroscope.c (sal_macro_scope, user_macro_scope)
10914 (default_macro_scope): Return unique_xmalloc_ptr.
10915 * macroexp.h (macro_expand, macro_expand_once): Return
10916 unique_xmalloc_ptr.
10917 * macroexp.c (macro_expand, macro_expand_once): Return
10918 unique_xmalloc_ptr.
10919 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10920 (info_macro_command, info_macros_command): Use
10921 unique_xmalloc_ptr.
10922 * compile/compile-c-support.c (write_macro_definitions): Use
10923 unique_xmalloc_ptr.
10924 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10926 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10928 * value.c (value_static_field): Assign field type instead of
10929 containing type when returning an optimized out value.
10931 2018-02-06 Yao Qi <yao.qi@linaro.org>
10933 * ft32-tdep.c (ft32_read_pc): Remove.
10934 (ft32_write_pc): Remove.
10935 (ft32_gdbarch_init): Update.
10936 * m32r-tdep.c (m32r_read_pc): Remove.
10937 (m32r_gdbarch_init): Update.
10938 * mep-tdep.c (mep_read_pc): Remove.
10939 (mep_gdbarch_init): Update.
10940 * microblaze-tdep.c (microblaze_write_pc): Remove.
10941 (microblaze_gdbarch_init): Update.
10942 * mn10300-tdep.c (mn10300_read_pc): Remove.
10943 (mn10300_write_pc): Remove.
10944 (mn10300_gdbarch_init): Update.
10945 * moxie-tdep.c (moxie_read_pc): Remove.
10946 (moxie_write_pc): Remove.
10947 (moxie_gdbarch_init): Update.
10949 2018-02-06 Yao Qi <yao.qi@linaro.org>
10951 * expprint.c (print_subexp_standard): Handle
10952 OP_F77_UNDETERMINED_ARGLIST.
10953 (dump_subexp_body_standard): Likewise.
10955 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10957 * target-descriptions.c (tdesc_element_visitor) Add empty
10959 (tdesc_type): Move make_gdb_type from here.
10960 (tdesc_type_builtin): Likewise.
10961 (tdesc_type_vector): Likewise.
10962 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10963 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10964 (make_gdb_type_union): Likewise.
10965 (make_gdb_type_flags): Likewise.
10966 (make_gdb_type_enum): Likewise.
10967 (make_gdb_type): New function.
10968 (tdesc_register_type): Use static make_gdb_type.
10970 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10972 * infcmd.c (default_print_one_register_info): Align natural-format
10973 column values consistently one under another.
10974 (pad_to_column): New function.
10976 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10978 * dwarf2read.c (dwarf2_physname): Move commment.
10980 2018-02-01 Leszek Swirski <leszeks@google.com>
10982 * varobj.c (varobj_formatted_print_options): Allow recursive
10983 pretty printing if pretty printing is enabled.
10985 2018-02-01 Leszek Swirski <leszeks@google.com>
10987 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10988 names after a structop as a filename.
10990 2018-02-01 Yao Qi <yao.qi@linaro.org>
10992 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10993 (arm_record_coproc_data_proc): Likewise.
10995 2018-02-01 Yao Qi <yao.qi@linaro.org>
10997 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10999 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11001 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11002 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11004 2018-01-31 Pedro Alves <palves@redhat.com>
11006 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11007 * inflow.c (child_terminal_save_inferior): Wrap reference to
11008 tcgetpgrp in HAVE_TERMIOS_H.
11009 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11011 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11012 always iterate over all inferiors.
11013 (gdbsim_cntrl_c): Adjust.
11014 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11016 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11018 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11019 index type is objfile-owned if the element type is as well.
11021 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11025 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11027 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11028 "features/s390x-linux64.c".
11029 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11030 s390_linux32 and s390x_linux64.
11031 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11033 * s390-tdep.c: Include "features/s390-linux32.c" and
11034 "features/s390x-linux64.c".
11035 (s390_tdesc_valid): Add check for tdesc_has_registers.
11036 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11037 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11038 tdesc_s390x_linux64.
11039 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11040 tdesc_s390x_linux64 to...
11041 * s390-tdep.h: ...here.
11043 2018-01-30 Pedro Alves <palves@redhat.com>
11046 * config.in, configure: Regenerate.
11047 * configure.ac: Check for getpgid.
11048 * go32-nat.c (go32_pass_ctrlc): New.
11049 (go32_target): Install it.
11050 * inf-child.c (inf_child_target): Install
11051 child_terminal_save_inferior, child_pass_ctrlc and
11053 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11054 (inf_ptrace_target): No longer install it.
11055 * infcmd.c (interrupt_target_1): Adjust.
11056 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11057 (child_interrupt): Declare.
11058 (inferior::terminal_state): New.
11059 * inflow.c (struct terminal_info): Update comments.
11060 (inferior_process_group): Delete.
11061 (terminal_is_ours): Delete.
11062 (gdb_tty_state): New.
11063 (child_terminal_init): Adjust.
11064 (is_gdb_terminal, sharing_input_terminal_1)
11065 (sharing_input_terminal): New functions.
11066 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11067 Set the process's actual process group in the foreground if
11068 possible. Handle is_ours_for_output/is_ours distinction. Don't
11069 mark terminal as the inferior's if not sharing GDB's terminal.
11070 Don't check attach_flag.
11071 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11072 pass down a target_terminal_state.
11073 (child_terminal_save_inferior): New, factored out from ...
11074 (child_terminal_ours_1): ... this. Handle
11075 target_terminal_state::is_ours_for_output.
11076 (child_interrupt, child_pass_ctrlc): New.
11077 (inflow_inferior_exit): Clear the inferior's terminal_state.
11078 (copy_terminal_info): Copy the inferior's terminal state.
11079 (_initialize_inflow): Remove reference to terminal_is_ours.
11080 * inflow.h (inferior_process_group): Delete.
11081 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11082 * procfs.c (procfs_target): Don't install procfs_interrupt.
11083 (procfs_interrupt): Delete.
11084 * remote.c (remote_serial_quit_handler): Adjust.
11085 (remote_interrupt): Remove ptid parameter. Adjust.
11086 * target-delegates.c: Regenerate.
11087 * target.c: Include "terminal.h".
11088 (target_terminal::terminal_state): Rename to ...
11089 (target_terminal::m_terminal_state): ... this.
11090 (target_terminal::init): Adjust.
11091 (target_terminal::inferior): Adjust to per-inferior
11093 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11094 (target_terminal::ours, target_terminal::ours_for_output): Use
11095 target_terminal_is_ours_kind.
11096 (target_interrupt): Remove ptid parameter. Adjust.
11097 (default_target_pass_ctrlc): Adjust.
11098 * target.h (target_ops::to_terminal_save_inferior): New field.
11099 (target_ops::to_interrupt): Remove ptid_t parameter.
11100 (target_interrupt): Remove ptid_t parameter. Update comment.
11101 (target_pass_ctrlc): Update comment.
11102 * target/target.h (target_terminal_state): New scoped enum,
11103 factored out of ...
11104 (target_terminal::terminal_state): ... here.
11105 (target_terminal::inferior): Update comments.
11106 (target_terminal::restore_inferior): New.
11107 (target_terminal::is_inferior, target_terminal::is_ours)
11108 (target_terminal::is_ours_for_output): Adjust.
11109 (target_terminal::scoped_restore_terminal_state): Adjust to
11110 rename, and call restore_inferior() instead of inferior().
11111 (target_terminal::scoped_restore_terminal_state::m_state): Change
11113 (target_terminal::terminal_state): Rename to ...
11114 (target_terminal::m_terminal_state): ... this and change type.
11116 2018-01-30 Pedro Alves <palves@redhat.com>
11118 * linux-nat.c (wait_for_signal): New function.
11119 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11121 (async_terminal_is_ours)
11122 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11123 (linux_nat_add_target): Don't override
11124 to_terminal_inferior/to_terminal_ours.
11126 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11128 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11130 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11132 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11133 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11134 dwarf2_per_objfile_free here.
11135 (dwarf2_per_objfile_free): Remove.
11136 (_initialize_dwarf2_read): Don't register
11137 dwarf2_per_objfile_free as a registry cleanup.
11139 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11141 Avoid compilation errors in MinGW native builds
11143 The error is triggered by including python-internal.h, and the
11146 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11147 from build-gnulib/import/math.h:27,
11148 from d:/usr/Python26/include/pyport.h:235,
11149 from d:/usr/Python26/include/Python.h:58,
11150 from python/python-internal.h:94,
11151 from python/py-arch.c:24:
11152 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11156 This happens because Python headers define 'hypot' to expand t
11157 '_hypot' in the Windows builds.
11158 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11159 'hypoth'. This avoids a compilation error.
11161 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11163 * MAINTAINERS (Write After Approval): Fix ordering.
11165 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11167 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11169 2018-01-26 Alan Modra <amodra@gmail.com>
11171 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11172 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11173 Remove nop. Make const. Comment.
11174 (powerpc32_plt_stub_so_2): New.
11175 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11176 Correct count. Update uses.
11177 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11178 Move common code reading PLT entry word. Correct
11179 powerpc32_plt_stub PLT address calculation.
11180 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11181 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11182 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11183 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11184 (ppc64_standard_linkage8): Likewise.
11185 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11186 Correct insns description.
11187 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11189 2018-01-24 Pedro Alves <palves@redhat.com>
11191 GCC PR libstdc++/83906
11192 * gdbtypes.c (operator==(const dynamic_prop &,
11193 const dynamic_prop &)): New.
11194 (operator==(const range_bounds &, const range_bounds &)): New.
11195 (check_types_equal): Use them instead of memcmp.
11196 * gdbtypes.h (operator==(const dynamic_prop &,
11197 const dynamic_prop &)): Declare.
11198 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11199 (operator==(const range_bounds &, const range_bounds &)): Declare.
11200 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11202 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11204 * s390-linux-tdep.c (s390_record_address_mask)
11205 (s390_record_calc_disp_common, s390_record_calc_disp)
11206 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11207 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11208 (s390_process_record): Move to s390-tdep.c.
11209 (s390_linux_init_abi_any): Adjust.
11210 * s390-tdep.c (s390_record_address_mask)
11211 (s390_record_calc_disp_common, s390_record_calc_disp)
11212 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11213 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11214 (s390_process_record): Moved from s390-linux-tdep.c
11215 (s390_gdbarch_init): Adjust.
11217 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11219 * s390-linux-nat.c (s390-tdep.h): New include.
11220 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11221 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11222 (ALLDEPFILES): Add s390-tdep.c.
11223 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11224 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11225 * s390-tdep.h: ...this. New file.
11226 * s390-linux-tdep.c (s390-tdep.h): New include.
11227 (_initialize_s390_tdep): Rename to...
11228 (_initialize_s390_linux_tdep): ...this and adjust.
11229 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11230 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11232 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11233 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11234 (s390_is_partial_instruction, s390_software_single_step)
11235 (is_non_branch_ril, s390_displaced_step_copy_insn)
11236 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11237 (s390_prologue_data, s390_addr, s390_store, s390_load)
11238 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11239 (s390_register_call_saved, s390_guess_tracepoint_registers)
11240 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11241 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11242 (s390_pseudo_register_name, s390_pseudo_register_type)
11243 (s390_pseudo_register_read, s390_pseudo_register_write)
11244 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11245 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11246 (s390_addr_bits_remove, s390_address_class_type_flags)
11247 (s390_address_class_type_flags_to_name)
11248 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11249 (s390_function_arg_float, s390_function_arg_vector)
11250 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11251 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11252 (s390_frame_align, s390_register_return_value, s390_return_value)
11253 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11254 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11255 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11256 (s390_trad_frame_prev_register, s390_unwind_cache)
11257 (s390_prologue_frame_unwind_cache)
11258 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11259 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11260 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11261 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11262 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11263 (s390_frame_base_address, s390_local_base_address)
11264 (s390_frame_base, s390_gcc_target_options)
11265 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11266 (s390_validate_reg_range, s390_tdesc_valid)
11267 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11268 * s390-tdep.c: ...this. New file.
11270 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11272 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11273 (s390_process_record, s390_gdbarch_tdep_alloc)
11274 (s390_linux_init_abi_any): Use/set new hook.
11276 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11278 * s390-linux-tdep.c (osabi.h): New include.
11279 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11280 (s390_linux_init_abi_any): New functions.
11281 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11283 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11285 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11286 tdesc_has_registers check
11288 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11290 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11291 (s390_validate_reg_range): New macro.
11292 (s390_gdbarch_init): Adjust.
11294 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11296 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11297 (s390_gdbarch_tdep_alloc): Adjust.
11298 (s390_gdbarch_init): Adjust.
11300 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11302 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11303 <have_tdb>: Change type to bool.
11304 (s390_gdbarch_tdep_alloc): Adjust.
11305 (s390_gdbarch_init): Adjust.
11307 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11309 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11310 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11311 (s390_gdbarch_tdep_alloc): New function.
11312 (s390_gdbarch_init): Allocate tdep at start and use its fields
11313 instead of separate variables.
11315 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11317 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11318 when looking for cached gdbarch and add comment for remaining.
11320 2018-01-22 Pedro Alves <palves@redhat.com>
11321 Sergio Durigan Junior <sergiodj@redhat.com>
11323 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11326 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11328 * MAINTAINERS: Update my company e-mail address.
11330 2018-01-22 Yao Qi <yao.qi@linaro.org>
11332 * regcache.c (cooked_write_test): New function.
11333 (_initialize_regcache): Register the test.
11335 2018-01-22 Yao Qi <yao.qi@linaro.org>
11337 * ia64-tdep.c (ia64_pseudo_register_read): Call
11338 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11339 * m32c-tdep.c (m32c_cat_read): Likewise.
11340 (m32c_r3r2r1r0_read): Likewise.
11341 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11342 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11344 2018-01-22 Yao Qi <yao.qi@linaro.org>
11346 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11347 method raw_read instead of regcache_raw_read.
11348 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11349 * arm-tdep.c (arm_neon_quad_read): Likewise.
11350 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11351 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11352 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11353 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11354 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11355 (i386_pseudo_register_read_into_value): Likewise.
11356 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11357 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11358 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11359 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11360 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11361 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11362 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11363 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11364 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11366 2018-01-22 Yao Qi <yao.qi@linaro.org>
11368 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11369 * configure.tgt: Remove target mt.
11370 * mt-tdep.c: Remove.
11371 * regcache.c (cooked_read_test): Remove the check for mt.
11373 2018-01-22 Yao Qi <yao.qi@linaro.org>
11375 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11376 instead of gdbarch_pseudo_register_read_value.
11378 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11380 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11383 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11385 * linespec.c (create_sals_line_offset): Remove code that preserved
11386 the symtab_and_line's line number.
11388 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11390 * varobj.c (varobj_create): Don't set valid_block when creating a
11393 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11395 * varobj.c (varobj_create): Remove out of date comment.
11397 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11400 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11401 updating innermost block.
11402 * parse.c (innermost_block_tracker::update): Take extra type
11403 parameter, and check types match before updating innermost block.
11404 (write_dollar_variable): Update innermost block for registers.
11405 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11406 (innermost_block_tracker::innermost_block_tracker): Initialise
11408 (innermost_block_tracker::reset): Take type parameter.
11409 (innermost_block_tracker::update): Take type parameter, and pass
11410 type through as needed.
11411 (innermost_block_tracker::m_types): New member.
11412 * varobj.c (varobj_create): Pass type when reseting innermost
11415 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11417 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11418 * ada-lang.c (resolve_subexp): Likewise.
11419 * breakpoint.c (set_breakpoint_condition) Likewise.
11420 (watch_command_1) Likewise.
11421 * c-exp.y (variable): Likewise.
11422 * d-exp.y (PrimaryExpression): Likewise.
11423 * f-exp.y (variable): Likewise.
11424 * go-exp.y (variable): Likewise.
11425 * m2-exp.y (variable): Likewise.
11426 * objfiles.c (objfile::~objfile): Likewise.
11427 * p-exp.y (variable): Likewise.
11428 * parse.c (innermost_block): Change type.
11429 * parser-defs.h (class innermost_block_tracker): New.
11430 (innermost_block): Change to innermost_block_tracker.
11431 * printcmd.c (display_command): Switch to innermost_block API.
11432 (do_one_display): Likewise.
11433 * rust-exp.y (do_one_display): Likewise.
11434 * symfile.c (clear_symtab_users): Likewise.
11435 * varobj.c (varobj_create): Switch to innermost_block API, replace
11436 use of innermost_block with block stored on varobj object.
11438 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11440 * expression.h (innermost_block): Remove declaration.
11441 * varobj.c: Add 'parser-defs.h' include.
11443 2018-01-19 Tom Tromey <tom@tromey.com>
11445 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11446 symbols in the static and global blocks.
11448 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11450 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11451 gdb_ptrace.h, and move including gdb_wait.h ...
11452 * nat/linux-ptrace.h: ... to here.
11454 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11456 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11457 inf_ptrace_detach_success.
11458 (inf_ptrace_detach_success): Add inferior parameter, use it
11459 instead of inferior_ptid, pass it to detach_inferior.
11460 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11462 * inferior.c (detach_inferior): Add overload that takes an
11464 * inferior.h (detach_inferior): Likewise.
11465 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11466 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11467 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11469 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11471 * target.h (struct target_ops) <to_detach>: Add inferior
11473 (target_detach): Likewise.
11474 * target.c (dispose_inferior): Pass inferior down.
11475 (target_detach): Pass inferior down. Assert that it is equal to
11476 the current inferior.
11477 * aix-thread.c (aix_thread_detach): Pass inferior down.
11478 * corefile.c (core_file_command): Pass current_inferior() down.
11479 * corelow.c (core_detach): Add inferior parameter.
11480 * darwin-nat.c (darwin_detach): Likewise.
11481 * gnu-nat.c (gnu_detach): Likewise.
11482 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11483 * infcmd.c (detach_command): Pass current_inferior() down to
11485 * infrun.c (follow_fork_inferior): Pass parent_inf to
11487 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11489 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11490 * linux-thread-db.c (thread_db_detach): Likewise.
11491 * nto-procfs.c (procfs_detach): Likewise.
11492 * procfs.c (procfs_detach): Likewise.
11493 * record.c (record_detach): Likewise.
11494 * record.h (struct inferior): Forward-declare.
11495 (record_detach): Add inferior parameter.
11496 * remote-sim.c (gdbsim_detach): Likewise.
11497 * remote.c (remote_detach_1): Likewise.
11498 (remote_detach): Likewise.
11499 (extended_remote_detach): Likewise.
11500 * sol-thread.c (sol_thread_detach): Likewise.
11501 * target-debug.h (target_debug_print_inferior_p): New macro.
11502 * target-delegates.c: Re-generate.
11503 * top.c (kill_or_detach): Pass inferior down to target_detach.
11504 * windows-nat.c (windows_detach): Add inferior parameter.
11506 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11508 * target.h (struct target_ops) <to_detach>: Remove args
11510 (target_detach): Likewise.
11511 * target.c (dispose_inferior): Adjust.
11512 (target_detach): Remove args parameter, adjust.
11513 * aix-thread.c (aix_thread_detach): Adjust.
11514 * corefile.c (core_file_command): Adjust.
11515 * corelow.c (core_detach): Adjust.
11516 * darwin-nat.c (darwin_detach): Adjust.
11517 * gnu-nat.c (gnu_detach): Adjust.
11518 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11519 * infcmd.c (detach_command): Adjust
11520 * infrun.c (follow_fork_inferior): Adjust.
11521 (handle_vfork_child_exec_or_exit): Adjust.
11522 * linux-fork.c (linux_fork_detach): Remove args parameter.
11523 * linux-fork.h (linux_fork_detach): Likewise.
11524 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11525 * linux-thread-db.c (thread_db_detach): Likewise.
11526 * nto-procfs.c (procfs_detach): Likewise.
11527 * procfs.c (procfs_detach): Likewise.
11528 (do_detach): Remove signo parameter.
11529 * record.c (record_detach): Remove args parameter.
11530 * record.h (record_detach): Likewise.
11531 * remote-sim.c (gdbsim_detach): Likewise.
11532 * remote.c (remote_detach_1): Likewise.
11533 (remote_detach): Likewise.
11534 (extended_remote_detach): Likewise.
11535 * sol-thread.c (sol_thread_detach): Likewise.
11536 * target-delegates.c: Re-generate.
11537 * top.c (struct qt_args) <args>: Remove field.
11538 (kill_or_detach): Don't pass args.
11539 (quit_force): Don't set args.
11540 * windows-nat.c (windows_detach): Remove args parameter.
11542 2018-01-19 Yao Qi <yao.qi@linaro.org>
11544 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11545 (arm_linux_init_abi): Install it.
11547 2018-01-19 Yao Qi <yao.qi@linaro.org>
11549 * osabi.c (gdb_osabi_names): Extend the regexp for
11550 arm-linux-gnueabihf.
11552 2018-01-18 Yao Qi <yao.qi@linaro.org>
11554 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11556 (abbrev_table::add_abbrev): Update.
11557 (abbrev_table::lookup_abbrev): Update.
11559 2018-01-18 Yao Qi <yao.qi@linaro.org>
11561 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11563 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11565 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11568 2018-01-17 Tom Tromey <tom@tromey.com>
11570 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11572 2018-01-17 Tom Tromey <tom@tromey.com>
11574 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11575 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11576 (create_array_type_with_stride): Update.
11577 * dwarf2read.c (set_die_type): Update.
11579 2018-01-17 Tom Tromey <tom@tromey.com>
11581 * dwarf2read.c (delayed_method_info): Remove typedef.
11582 (dwarf2_cu::method_info): Now a std::vector.
11583 (add_to_method_list): Update.
11584 (free_delayed_list): Remove.
11585 (compute_delayed_physnames): Update.
11586 (process_full_comp_unit, process_full_type_unit): Clear the method
11587 list. Remove cleanups.
11588 (psymtab_include_file_name): Add name_holder parameter. Use
11589 unique_xmalloc_ptr.
11590 (dwarf_decode_lines): Update.
11592 2018-01-17 Tom Tromey <tom@tromey.com>
11593 Simon Marchi <simon.marchi@ericsson.com>
11595 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11596 (dwarf2_per_objfile::free_cached_comp_units)
11597 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11598 (init_cutu_and_read_dies_no_follow): Update.
11599 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11600 (dwarf2_cu::~dwarf2_cu): New.
11601 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11602 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11604 2018-01-17 Tom Tromey <tom@tromey.com>
11605 Simon Marchi <simon.marchi@ericsson.com>
11607 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11608 (struct die_reader_specs) <abbrev_table>: New member.
11609 (struct abbrev_table): Add constructor.
11610 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11611 <abbrev_obstack>: Now an auto_obstack.
11612 (abbrev_table_up): New typedef.
11613 (init_cu_die_reader): Add abbrev_table parameter.
11614 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11615 Add result_dwo_abbrev_table.
11616 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11617 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11619 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11621 (skip_children): Update.
11622 (abbrev_table::alloc_abbrev): Rename from
11623 abbrev_table_alloc_abbrev.
11624 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11625 (abbrev_table::lookup_abbrev): Rename from
11626 abbrev_table_lookup_abbrev.
11627 (abbrev_table_read_table): Return abbrev_table_up.
11628 (abbrev_table_free, abbrev_table_free_cleanup)
11629 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11630 (load_partial_dies): Update.
11632 2018-01-17 Tom Tromey <tom@tromey.com>
11634 * dwarf2read.c (dwarf2_compute_name): Update comment.
11635 (read_func_scope, read_variable): Update.
11636 (new_symbol): Remove.
11637 (new_symbol_full): Rename to new_symbol.
11639 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11642 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11643 a warning instead of throwing an error, set section size to 0 and return
11645 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11647 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11649 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11651 (linux_ptrace_attach_fail_reason_string): Likewise.
11652 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11654 (linux_ptrace_attach_fail_reason_string): Likewise.
11655 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11657 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11659 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11661 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11664 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11665 checking for fs_base/gs_base fields in struct user_regs_struct.
11666 * configure: Regenerate.
11668 2018-01-17 Yao Qi <yao.qi@linaro.org>
11670 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11672 (aarch64_linux_init_abi): Install it to gdbarch hook
11673 gcc_target_options.
11675 2018-01-15 Pedro Alves <palves@redhat.com>
11677 * common/signals-state-save-restore.c
11678 (save_original_signals_state): Fix typos.
11680 2017-01-12 Tom Tromey <tom@tromey.com>
11681 Sergio Durigan Junior <sergiodj@redhat.com>
11683 * Makefile.in (install-only): Install gdb-add-index.
11685 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11687 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11689 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11691 * infrun.c (keep_going_pass_signal): Clear step-over info when
11692 insert_breakpoints fails.
11694 2018-01-11 Pedro Alves <palves@redhat.com>
11697 * infrun.c (resume): Rename to ...
11698 (resume_1): ... this.
11699 (resume): Reimplement as wrapper around resume_1.
11701 2018-01-11 Pedro Alves <palves@redhat.com>
11704 * remote.c (remote_parse_stop_reply): Default to the last-set
11705 general thread instead of to 'magic_null_ptid'.
11707 2018-01-10 Pedro Alves <palves@redhat.com>
11709 * language.h (language_get_symbol_name_matcher): Rename ...
11710 (get_symbol_name_matcher): ... this.
11711 * language.c (language_get_symbol_name_matcher): Ditto.
11712 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11715 2018-01-10 Pedro Alves <palves@redhat.com>
11719 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11720 Adjust to use language_get_symbol_name_matcher instead of
11721 language_defn::la_get_symbol_name_matcher.
11722 * language.c (language_get_symbol_name_matcher): If in Ada mode
11723 and the lookup name is a verbatim match, return Ada's matcher.
11724 * language.h (language_get_symbol_name_matcher): Adjust comment.
11725 (ada_lookup_name_info::verbatim_p):: New method.
11727 2018-01-10 Pedro Alves <palves@redhat.com>
11730 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11731 minsym's language is language_auto or language_cplus, pass down
11732 language_ada instead.
11733 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11735 2018-01-10 Pedro Alves <palves@redhat.com>
11738 * minsyms.c (linkage_name_str): New function.
11739 (iterate_over_minimal_symbols): Use it.
11741 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11743 * NEWS: Document that 'info proc' now works on FreeBSD.
11745 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11747 * configure.ac: Check for kinfo_getfile in libutil.
11748 * configure: Regenerate.
11749 * config.in: Regenerate.
11750 * fbsd-nat.c: Include "fbsd-tdep.h".
11751 (fbsd_fetch_cmdline): New.
11752 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11753 rather than calling error.
11754 (fbsd_info_proc): New.
11755 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11756 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11757 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11759 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11761 * fbsd-nat.c (struct free_deleter): Remove.
11762 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11764 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11766 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11767 NULL for an empty pathname.
11769 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11771 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11772 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11773 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11774 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11775 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11776 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11777 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11778 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11779 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11780 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11781 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11782 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11783 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11784 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11785 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11787 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11789 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11790 (gnu_xfer_auxv): New function.
11791 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11792 TARGET_OBJECT_AUXV.
11794 2018-01-08 Yao Qi <yao.qi@linaro.org>
11795 Simon Marchi <simon.marchi@ericsson.com>
11797 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11799 (COMMON_OBS): Remove selftest.o.
11800 * configure.ac: Append selftest-arch.c and common/selftest.c to
11801 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11802 * configure: Re-generated.
11803 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11805 (maintenance_info_selftests): Likewise.
11807 2018-01-08 Xavier Roirand <roirand@adacore.com>
11809 * ada-valprint.c (val_print_packed_array_elements): Use
11810 proper number of elements when printing an array indexed
11811 by an enumeration type.
11813 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11815 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11816 (dw2_get_file_names_reader): Adjust.
11817 (lookup_dwo_signatured_type): Adjust.
11818 (lookup_dwp_signatured_type): Adjust.
11819 (lookup_signatured_type): Adjust.
11820 (create_type_unit_group): Adjust.
11821 (get_type_unit_group): Adjust.
11822 (process_psymtab_comp_unit_reader): Adjust.
11823 (build_type_psymtabs_reader): Adjust.
11824 (scan_partial_symbols): Adjust.
11825 (add_partial_symbol): Adjust.
11826 (add_partial_subprogram): Adjust.
11827 (peek_die_abbrev): Adjust.
11828 (fixup_go_packaging): Adjust.
11829 (process_imported_unit_die): Adjust.
11830 (dwarf2_compute_name): Adjust.
11831 (dwarf2_physname): Adjust.
11832 (read_import_statement): Adjust.
11833 (handle_DW_AT_stmt_list): Adjust.
11834 (read_file_scope): Adjust.
11835 (read_func_scope): Adjust.
11836 (read_lexical_block_scope): Adjust.
11837 (read_call_site_scope): Adjust.
11838 (read_variable): Adjust.
11839 (dwarf2_rnglists_process): Adjust.
11840 (dwarf2_ranges_process): Adjust.
11841 (dwarf2_ranges_read): Adjust.
11842 (dwarf2_get_pc_bounds): Adjust.
11843 (dwarf2_record_block_ranges): Adjust.
11844 (dwarf2_add_field): Adjust.
11845 (dwarf2_add_member_fn): Adjust.
11846 (read_structure_type): Adjust.
11847 (process_structure_scope): Adjust.
11848 (read_enumeration_type): Adjust.
11849 (read_array_type): Adjust.
11850 (mark_common_block_symbol_computed): Adjust.
11851 (read_common_block): Adjust.
11852 (read_namespace_type): Adjust.
11853 (read_namespace): Adjust.
11854 (read_module_type): Adjust.
11855 (read_tag_pointer_type): Adjust.
11856 (read_tag_ptr_to_member_type): Adjust.
11857 (read_tag_string_type): Adjust.
11858 (read_subroutine_type): Adjust.
11859 (read_typedef): Adjust.
11860 (read_base_type): Adjust.
11861 (attr_to_dynamic_prop): Adjust.
11862 (read_subrange_type): Adjust.
11863 (read_unspecified_type): Adjust.
11864 (dwarf2_read_abbrevs): Adjust.
11865 (load_partial_dies): Adjust.
11866 (read_partial_die): Adjust.
11867 (find_partial_die): Adjust.
11868 (guess_partial_die_structure_name): Adjust.
11869 (fixup_partial_die): Adjust.
11870 (read_attribute_value): Adjust.
11871 (read_addr_index): Adjust.
11872 (read_addr_index_from_leb128): Adjust.
11873 (read_str_index): Adjust.
11874 (dwarf2_string_attr): Adjust.
11875 (get_debug_line_section): Adjust.
11876 (dwarf_decode_line_header): Adjust.
11877 (lnp_state_machine::check_line_address): Adjust.
11878 (dwarf_decode_lines_1): Adjust.
11879 (dwarf_decode_lines): Adjust.
11880 (dwarf2_start_symtab): Adjust.
11881 (var_decode_location): Adjust.
11882 (new_symbol_full): Adjust.
11883 (dwarf2_const_value_data): Adjust.
11884 (dwarf2_const_value_attr): Adjust.
11885 (dwarf2_const_value): Adjust.
11886 (die_type): Adjust.
11887 (die_containing_type): Adjust.
11888 (build_error_marker_type): Adjust.
11889 (lookup_die_type): Adjust.
11890 (guess_full_die_structure_name): Adjust.
11891 (anonymous_struct_prefix): Adjust.
11892 (determine_prefix): Adjust.
11893 (dwarf2_name): Adjust.
11894 (follow_die_ref_or_sig): Adjust.
11895 (follow_die_offset): Adjust.
11896 (follow_die_ref): Adjust.
11897 (follow_die_sig_1): Adjust.
11898 (follow_die_sig): Adjust.
11899 (get_signatured_type): Adjust.
11900 (get_DW_AT_signature_type): Adjust.
11901 (decode_locdesc): Adjust.
11902 (dwarf_decode_macros): Adjust.
11903 (cu_debug_loc_section): Adjust.
11904 (fill_in_loclist_baton): Adjust.
11905 (dwarf2_symbol_mark_computed): Adjust.
11906 (init_one_comp_unit): Don't assign
11907 dwarf2_cu::dwarf2_per_objfile.
11908 (set_die_type): Adjust.
11910 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11912 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11913 <dwarf2_per_objfile>: New field.
11914 (dwarf2_per_objfile): Remove global.
11915 (get_dwarf2_per_objfile): New function.
11916 (set_dwarf2_per_objfile): New function.
11917 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11918 dwarf2_per_objfile.
11919 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11920 (read_abbrev_offset): Likewise.
11921 (read_indirect_string): Likewise.
11922 (read_indirect_line_string): Likewise.
11923 (read_indirect_string_at_offset): Likewise.
11924 (read_indirect_string_from_dwz): Likewise.
11925 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11926 dwarf2_per_objfile.
11927 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11928 (create_all_comp_units): Change objfile parameter to
11929 dwarf2_per_objfile.
11930 (create_all_type_units): Likewise.
11931 (process_queue): Add dwarf2_per_objfile parameter.
11932 (read_and_check_comp_unit_head): Likewise.
11933 (lookup_dwo_unit_in_dwp): Likewise.
11934 (get_dwp_file): Likewise.
11935 (process_cu_includes): Likewise.
11936 (struct free_dwo_file_cleanup_data): New struct.
11937 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11938 set_dwarf2_per_objfile.
11939 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11940 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11941 context, adjust calls.
11942 (dw2_instantiate_symtab): Likewise.
11943 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11944 (dw2_get_cu): Likewise.
11945 (create_cu_from_index_list): Change objfile parameter to
11946 dwarf2_per_objfile.
11947 (create_cus_from_index_list): Get dwarf2_per_objfile from
11948 context, adjust calls.
11949 (create_cus_from_index): Likewise.
11950 (create_signatured_type_table_from_index): Change objfile
11951 parameter to dwarf2_per_objfile.
11952 (create_signatured_type_table_from_debug_names): Change objfile
11953 parameter to dwarf2_per_objfile.
11954 (create_addrmap_from_index): Likewise.
11955 (create_addrmap_from_aranges): Likewise.
11956 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11957 (dw2_setup): Remove.
11958 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11960 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11961 get_dwarf2_per_objfile.
11962 (dw2_forget_cached_source_info): Likewise.
11963 (dw2_map_symtabs_matching_filename): Likewise.
11964 (struct dw2_symtab_iterator) <index>: Remove.
11965 <dwarf2_per_objfile>: New field.
11966 (dw2_symtab_iter_init): Replace index parameter with
11967 dwarf2_per_objfile.
11968 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11969 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11970 (dw2_print_stats): Likewise.
11971 (dw2_dump): Likewise.
11972 (dw2_expand_symtabs_for_function): Likewise.
11973 (dw2_expand_all_symtabs): Likewise.
11974 (dw2_expand_symtabs_with_fullname): Likewise.
11975 (dw2_expand_marked_cus): Replace index and objfile parameters
11976 with dwarf2_per_objfile.
11977 (dw_expand_symtabs_matching_file_matcher): Add
11978 dwarf2_per_objfile parameter and adjust calls.
11979 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11981 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11982 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11984 (create_cus_from_debug_names_list): Replace objfile parameter
11985 with dwarf2_per_objfile and adjust calls.
11986 (create_cus_from_debug_names): Likewise.
11987 (dwarf2_read_debug_names): Likewise.
11988 (mapped_debug_names::namei_to_name): Adjust call.
11989 (dw2_debug_names_iterator::next): Likewise.
11990 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11991 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11992 (dw2_debug_names_dump): Likewise.
11993 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11994 (dw2_debug_names_expand_symtabs_matching): Likewise.
11995 (dwarf2_initialize_objfile): Likewise.
11996 (dwarf2_build_psymtabs): Likewise.
11997 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11999 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12000 (read_and_check_comp_unit_head): Likewise.
12001 (read_abbrev_offset): Likewise.
12002 (create_debug_type_hash_table): Likewise.
12003 (create_debug_types_hash_table): Likewise.
12004 (create_all_type_units): Replace objfile parameter with
12005 dwarf2_per_objfile.
12006 (add_type_unit): Add dwarf2_per_objfile parameter.
12007 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12008 with dwarf2_per_objfile.
12009 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12010 (lookup_dwp_signatured_type): Likewise.
12011 (lookup_signatured_type): Likewise.
12012 (read_cutu_die_from_dwo): Likewise.
12013 (init_tu_and_read_dwo_dies): Likewise.
12014 (init_cutu_and_read_dies): Likewise.
12015 (init_cutu_and_read_dies_no_follow): Likewise.
12016 (allocate_type_unit_groups_table): Add objfile parameter.
12017 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12018 (get_type_unit_group): Likewise.
12019 (process_psymtab_comp_unit): Update call.
12020 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12021 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12022 (print_tu_stats): Likewise.
12023 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12024 in void* parameter.
12025 (build_type_psymtabs): Change objfile parameter to
12026 dwarf2_per_objfile.
12027 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12028 passed in void* parameter.
12029 (process_skeletonless_type_units): Change objfile parameter to
12030 dwarf2_per_objfile.
12031 (set_partial_user): Likewise.
12032 (dwarf2_build_psymtabs_hard): Likewise.
12033 (read_comp_units_from_section): Likewise.
12034 (create_all_comp_units): Likewise.
12035 (scan_partial_symbols): Update calls.
12036 (add_partial_symbol): Likewise.
12037 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12038 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12039 (process_queue): Add dwarf2_per_objfile parameter.
12040 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12041 (compute_compunit_symtab_includes): Likewise.
12042 (process_cu_includes): Add dwarf2_per_objfile parameter.
12043 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12044 (process_full_type_unit): Likewise.
12045 (process_imported_unit_die): Update call.
12046 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12047 (read_file_scope): Likewise.
12048 (allocate_dwo_file_hash_table): Add objfile parameter.
12049 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12050 (create_cus_hash_table): Likewise.
12051 (create_dwp_hash_table): Likewise.
12052 (create_dwo_unit_in_dwp_v1): Likewise.
12053 (create_dwp_v2_section): Likewise.
12054 (create_dwo_unit_in_dwp_v2): Likewise.
12055 (lookup_dwo_unit_in_dwp): Likewise.
12056 (try_open_dwop_file): Likewise.
12057 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12058 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12059 cleanup to include a reference to dwarf2_per_objfile.
12060 (open_dwp_file): Add dwarf2_per_objfile parameter.
12061 (open_and_init_dwp_file): Likewise.
12062 (get_dwp_file): Likewise.
12063 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12064 (queue_and_load_all_dwo_tus): Update call.
12065 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12067 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12068 (dwarf2_ranges_process): Likewise.
12069 (dwarf2_get_pc_bounds): Likewise.
12070 (mark_common_block_symbol_computed): Likewise.
12071 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12072 (dwarf2_read_abbrevs): Update call.
12073 (read_partial_die): Use dwarf2_per_objfile from cu.
12074 (find_partial_die): Likewise.
12075 (fixup_partial_die): Likewise.
12076 (read_attribute_value): Likewise.
12077 (read_indirect_string_at_offset_from): Add objfile parameter.
12078 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12080 (read_indirect_string_from_dwz): Add objfile parameter.
12081 (read_indirect_string): Add objfile parameter.
12082 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12083 (read_addr_index): Use dwarf2_per_objfile from cu.
12084 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12086 (read_str_index): Use dwarf2_per_objfile from cu.
12087 (get_debug_line_section): Likewise.
12088 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12089 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12090 (new_symbol_full): Use dwarf2_per_objfile from cu.
12091 (build_error_marker_type): Likewise.
12092 (lookup_die_type): Likewise.
12093 (determine_prefix): Likewise.
12094 (follow_die_offset): Likewise.
12095 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12096 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12097 (dwarf2_fetch_die_type_sect_off): Likewise.
12098 (dwarf2_get_die_type): Likewise.
12099 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12100 (get_signatured_type): Likewise.
12101 (get_DW_AT_signature_type): Likewise.
12102 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12103 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12104 (cu_debug_loc_section): Likewise.
12105 (fill_in_loclist_baton): Likewise.
12106 (dwarf2_symbol_mark_computed): Likewise.
12107 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12108 dwarf2_per_objfile.
12109 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12111 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12112 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12113 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12114 (set_die_type): Use dwarf2_free_objfile from cu.
12115 (get_die_type_at_offset): Likewise.
12116 (dwarf2_per_objfile_free): Don't assign global variable.
12117 (debug_names) <constructor>: Add dwarf2_per_objfile
12118 parameter, update m_debugstrlookup construction.
12119 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12121 <m_dwarf2_per_objfile>: New field.
12122 <lookup>: Use m_dwarf2_per_objfile.
12123 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12124 (psyms_seen_size): Likewise.
12125 (write_gdbindex): Replace objfile parameter with
12126 dwarf2_per_objfile.
12127 (write_debug_names): Likewise.
12128 (write_psymtabs_to_index): Likewise.
12129 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12132 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12134 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12135 <dwarf2_per_objfile>: New field.
12136 (struct dwarf2_per_cu_data) <objfile>: Remove.
12137 <dwarf2_per_objfile>: New field.
12138 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12140 (create_signatured_type_table_from_index): Likewise.
12141 (create_debug_type_hash_table): Likewise.
12142 (fill_in_sig_entry_from_dwo_entry): Likewise.
12143 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12144 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12146 (create_partial_symtab): Access objfile through
12147 dwarf2_per_objfile.
12148 (process_psymtab_comp_unit_reader): Likewise.
12149 (read_comp_units_from_section): Likewise.
12150 (scan_partial_symbols): Likewise.
12151 (add_partial_symbol): Likewise.
12152 (add_partial_subprogram): Likewise.
12153 (peek_die_abbrev): Likewise.
12154 (fixup_go_packaging): Likewise.
12155 (process_full_comp_unit): Likewise.
12156 (process_full_type_unit): Likewise.
12157 (process_imported_unit_die): Likewise.
12158 (dwarf2_compute_name): Likewise.
12159 (dwarf2_physname): Likewise.
12160 (read_import_statement): Likewise.
12161 (create_cus_hash_table): Assign dwarf2_physname instead of
12163 (read_func_scope): Access objfile through dwarf2_per_objfile.
12164 (read_lexical_block_scope): Likewise.
12165 (read_call_site_scope): Likewise.
12166 (read_variable): Likewise.
12167 (dwarf2_rnglists_process): Likewise.
12168 (dwarf2_ranges_process): Likewise.
12169 (dwarf2_ranges_read): Likewise.
12170 (dwarf2_record_block_ranges): Likewise.
12171 (dwarf2_add_field): Likewise.
12172 (dwarf2_add_member_fn): Likewise.
12173 (read_structure_type): Likewise.
12174 (process_structure_scope): Likewise.
12175 (read_enumeration_type): Likewise.
12176 (read_array_type): Likewise.
12177 (read_common_block): Likewise.
12178 (read_namespace_type): Likewise.
12179 (read_namespace): Likewise.
12180 (read_module_type): Likewise.
12181 (read_tag_pointer_type): Likewise.
12182 (read_tag_ptr_to_member_type): Likewise.
12183 (read_tag_string_type): Likewise.
12184 (read_subroutine_type): Likewise.
12185 (read_typedef): Likewise.
12186 (read_base_type): Likewise.
12187 (attr_to_dynamic_prop): Likewise.
12188 (read_subrange_type): Likewise.
12189 (read_unspecified_type): Likewise.
12190 (load_partial_dies): Likewise.
12191 (read_partial_die): Likewise.
12192 (find_partial_die): Likewise.
12193 (guess_partial_die_structure_name): Likewise.
12194 (fixup_partial_die): Likewise.
12195 (read_attribute_value): Likewise.
12196 (read_addr_index_from_leb128): Likewise.
12197 (dwarf2_read_addr_index): Likewise.
12198 (dwarf2_string_attr): Likewise.
12199 (lnp_state_machine::check_line_address): Likewise.
12200 (dwarf_decode_lines_1): Likewise.
12201 (dwarf_decode_lines): Likewise.
12202 (dwarf2_start_symtab): Likewise.
12203 (var_decode_location): Likewise.
12204 (new_symbol_full): Likewise.
12205 (dwarf2_const_value_data): Likewise.
12206 (dwarf2_const_value_attr): Likewise.
12207 (dwarf2_const_value): Likewise.
12208 (die_type): Likewise.
12209 (die_containing_type): Likewise.
12210 (lookup_die_type): Likewise.
12211 (guess_full_die_structure_name): Likewise.
12212 (anonymous_struct_prefix): Likewise.
12213 (dwarf2_name): Likewise.
12214 (follow_die_ref_or_sig): Likewise.
12215 (follow_die_offset): Likewise.
12216 (follow_die_ref): Likewise.
12217 (dwarf2_fetch_die_loc_sect_off): Likewise.
12218 (dwarf2_fetch_constant_bytes): Likewise.
12219 (dwarf2_fetch_die_type_sect_off): Likewise.
12220 (dwarf2_get_die_type): Likewise.
12221 (follow_die_sig): Likewise.
12222 (decode_locdesc): Likewise.
12223 (dwarf2_per_cu_objfile): Likewise.
12224 (dwarf2_per_cu_text_offset): Likewise.
12225 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12227 (set_die_type): Access objfile through
12228 dwarf2_per_objfile.
12230 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12232 * valprint.c (converted_character_d): Remove typedef.
12233 (DEF_VEC_O (converted_character_d)): Remove.
12234 (count_next_character): Use std::vector.
12235 (print_converted_chars_to_obstack): Likewise.
12236 (generic_printstr): Likewise.
12238 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12240 * xml-support.h (struct gdb_xml_value): Add constructor.
12241 <value>: Change type to unique_xmalloc_ptr.
12242 (gdb_xml_value_s): Remove typedef.
12243 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12244 (gdb_xml_element_start_handler): Change parameter type to
12246 (xml_find_attribute): Likewise.
12247 * xml-support.c (xml_find_attribute): Change parameter type to
12248 std::vector and adjust.
12249 (gdb_xml_values_cleanup): Remove.
12250 (gdb_xml_parser::start_element): Adjust to std::vector.
12251 (xinclude_start_include): Change paraeter type to std::vector
12253 * btrace.c (check_xml_btrace_version): Likewise.
12254 (parse_xml_btrace_block): Likewise.
12255 (parse_xml_btrace_pt_config_cpu): Likewise.
12256 (parse_xml_btrace_pt): Likewise.
12257 (parse_xml_btrace_conf_bts): Likewise.
12258 (parse_xml_btrace_conf_pt): Likewise.
12259 * memory-map.c (memory_map_start_memory): Likewise.
12260 (memory_map_start_property): Likewise.
12261 * osdata.c (osdata_start_osdata): Likewise.
12262 (osdata_start_item): Likewise.
12263 (osdata_start_column): Likewise.
12264 * remote.c (start_thread): Likewise.
12265 * solib-aix.c (library_list_start_library): Likewise.
12266 (library_list_start_list): Likewise.
12267 * solib-svr4.c (library_list_start_library): Likewise.
12268 (svr4_library_list_start_list): Likewise.
12269 * solib-target.c (library_list_start_segment): Likewise.
12270 (library_list_start_section): Likewise.
12271 (library_list_start_library): Likewise.
12272 (library_list_start_list): Likewise.
12273 * tracepoint.c (traceframe_info_start_memory): Likewise.
12274 (traceframe_info_start_tvar): Likewise.
12275 * xml-syscall.c (syscall_start_syscall): Likewise.
12276 * xml-tdesc.c (tdesc_start_target): Likewise.
12277 (tdesc_start_feature): Likewise.
12278 (tdesc_start_reg): Likewise.
12279 (tdesc_start_union): Likewise.
12280 (tdesc_start_struct): Likewise.
12281 (tdesc_start_flags): Likewise.
12282 (tdesc_start_enum): Likewise.
12283 (tdesc_start_field): Likewise.
12284 (tdesc_start_enum_value): Likewise.
12285 (tdesc_start_vector): Likewise.
12287 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12289 * extension.h (struct xmethod_worker) <clone>: Remove.
12290 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12292 (python_xmethod_worker::clone): Remove.
12293 * valops.c (find_overload_match): Use std::move instead of
12296 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12298 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12299 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12300 <free_xmethod_worker_data>: Remove.
12301 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12302 <get_xmethod_arg_types>: Remove.
12303 <get_xmethod_result_type>: Remove.
12304 <invoke_xmethod>: Remove.
12305 * extension.c (new_xmethod_worker): Remove.
12306 (clone_xmethod_worker): Remove.
12307 (get_matching_xmethod_workers): Return void, pass std::vector by
12309 (get_xmethod_arg_types): Rename to...
12310 (xmethod_worker::get_arg_types): ... this, and adjust.
12311 (get_xmethod_result_type): Rename to...
12312 (xmethod_worker::get_result_type): ... this, and adjust.
12313 (invoke_xmethod): Remove.
12314 (free_xmethod_worker): Remove.
12315 (free_xmethod_worker_vec): Remove.
12316 * extension.h (enum ext_lang_rc): Move here from
12318 (struct xmethod_worker): Add constructor and destructor.
12321 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12322 virtual pure methods.
12323 <get_arg_types, get_result_type>: New methods.
12324 (xmethod_worker_ptr): Remove typedef.
12325 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12326 (xmethod_worker_vec): Remove typedef.
12327 (xmethod_worker_up): New typedef.
12328 (invoke_xmethod): Remove.
12329 (clone_xmethod_worker): Remove.
12330 (free_xmethod_worker): Remove.
12331 (free_xmethod_worker_vec): Remove.
12332 (get_xmethod_arg_types): Remove.
12333 (get_xmethod_result_type): Remove.
12334 * valops.c (find_method_list): Use std::vector, don't use
12335 intermediate vector.
12336 (value_find_oload_method_list): Use std::vector.
12337 (find_overload_match): Use std::vector.
12338 (find_oload_champ): Use std::vector.
12339 * value.c (value_free): Use operator delete.
12340 (value_of_xmethod): Rename to...
12341 (value_from_xmethod): ... this. Don't assign
12342 xmethod_worker::value, take rvalue-reference.
12343 (result_type_of_xmethod): Adjust.
12344 (call_xmethod): Adjust.
12345 * value.h: Include extension.h.
12346 (struct xmethod_worker): Don't forward-declare.
12347 (value_of_xmethod): Rename to...
12348 (value_from_xmethod): ... this, take rvalue-reference.
12349 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12350 (struct python_xmethod_worker): ... this, add constructor and
12352 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12353 (gdbpy_free_xmethod_worker_data): Rename to...
12354 (python_xmethod_worker::~python_xmethod_worker): ... this and
12356 (gdbpy_clone_xmethod_worker_data): Rename to...
12357 (python_xmethod_worker::clone): ... this and adjust.
12358 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12360 (gdbpy_get_xmethod_arg_types): Rename to...
12361 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12362 (gdbpy_get_xmethod_result_type): Rename to...
12363 (python_xmethod_worker::do_get_result_type): ... this and
12365 (gdbpy_invoke_xmethod): Rename to...
12366 (python_xmethod_worker::invoke): ... this and adjust.
12367 (new_python_xmethod_worker): Rename to...
12368 (python_xmethod_worker::python_xmethod_worker): ... this and
12370 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12372 (gdbpy_free_xmethod_worker_data): Remove.
12373 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12374 (gdbpy_get_xmethod_arg_types): Remove.
12375 (gdbpy_get_xmethod_result_type): Remove.
12376 (gdbpy_invoke_xmethod): Remove.
12377 * python/python.c (python_extension_ops): Remove obsolete
12380 2018-01-05 Pedro Alves <palves@redhat.com>
12383 * common/signals-state-save-restore.c
12384 (save_original_signals_state): New parameter 'quiet'. Warn if we
12385 find a custom handler preinstalled, instead of internal erroring.
12386 But only warn if !quiet.
12387 * common/signals-state-save-restore.h
12388 (save_original_signals_state): New parameter 'quiet'.
12389 * main.c (captured_main_1): Move save_original_signals_state call
12390 after option handling, and pass QUIET.
12392 2018-01-05 Pedro Alves <palves@redhat.com>
12394 * spu-tdep.c (spu_catch_start): Pass
12395 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12397 2018-01-05 Pedro Alves <palves@redhat.com>
12400 * ada-lang.c (literal_symbol_name_matcher): New function.
12401 (ada_get_symbol_name_matcher): Use it for
12402 symbol_name_match_type::SEARCH_NAME.
12403 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12404 it down instead of assuming symbol_name_match_type::FULL.
12405 * block.h (block_lookup_symbol): New parameter 'match_type'.
12406 * c-valprint.c (print_unpacked_pointer): Use
12407 lookup_symbol_search_name instead of lookup_symbol.
12408 * compile/compile-object-load.c (get_out_value_type): Pass down
12409 symbol_name_match_type::SEARCH_NAME.
12410 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12411 symbol_name_match_type::FULL.
12412 * cp-support.c (cp_get_symbol_name_matcher): Handle
12413 symbol_name_match_type::SEARCH_NAME.
12414 * infrun.c (insert_exception_resume_breakpoint): Use
12415 lookup_symbol_search_name.
12416 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12417 * psymtab.c (maintenance_check_psymtabs): Use
12418 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12419 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12420 SYMBOL_SEARCH_NAME.
12421 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12422 if symbol_name_match_type::SEARCH_NAME.
12423 (lookup_symbol_in_language): Pass down
12424 symbol_name_match_type::FULL.
12425 (lookup_symbol_search_name): New.
12426 (lookup_language_this): Pass down
12427 symbol_name_match_type::SEARCH_NAME.
12428 (lookup_symbol_aux, lookup_local_symbol): New parameter
12429 'match_type'. Pass it down.
12430 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12431 (lookup_symbol_search_name): New declaration.
12432 (lookup_symbol_in_block): New 'match_type' parameter.
12434 2018-01-05 Pedro Alves <palves@redhat.com>
12437 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12439 (ada_lookup_symbol): Reimplement in terms of
12440 ada_lookup_symbol_list, bits factored out from
12441 ada_lookup_encoded_symbol.
12443 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12445 * ada-exp.y (write_object_renaming): When subscripting an array
12446 using a symbol as the index, pass the block in call to
12447 ada_lookup_encoded_symbol when looking that symbol up.
12449 2018-01-05 Jerome Guitton <guitton@adacore.com>
12451 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12454 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12456 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12457 the case where VALUE_LVAL (val0) is not lval_memory.
12459 2018-01-05 Xavier Roirand <roirand@adacore.com>
12461 * ada-valprint.c (print_optional_low_bound): Handle
12462 character-indexed array printing like boolean-indexed array
12465 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12467 * NEWS: Create a new section for the next release branch.
12468 Rename the section of the current branch, now that it has
12471 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12473 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12474 * version.in: Bump version to 8.1.50.DATE-git.
12476 2018-01-03 Xavier Roirand <roirand@adacore.com>
12478 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12480 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12482 (default_exception_support_info) <catch_handlers_sym>: Add field.
12483 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12484 (ada_exception_name_addr_1): Add "catch handlers" handling.
12485 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12486 Update all callers.
12487 (create_excep_cond_exprs) <ex>: Add parameter.
12488 (re_set_exception): Update create_excep_cond_exprs call.
12489 (print_it_exception, print_one_exception, print_mention_exception)
12490 (print_recreate_exception): Add "catch handler" handling.
12491 (allocate_location_catch_handlers, re_set_catch_handlers)
12492 (check_status_catch_handlers, print_it_catch_handlers)
12493 (print_one_catch_handlers, print_mention_catch_handlers)
12494 (print_recreate_catch_handlers): New function.
12495 (catch_handlers_breakpoint_ops): New variable.
12496 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12497 Add parameter. Add "catch handler" handling.
12498 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12499 Add "catch handler" handling.
12500 (ada_exception_catchpoint_cond_string): Add "catch handler"
12502 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12504 (catch_ada_handlers_command): New function.
12505 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12506 operations structure.
12507 (_initialize_ada_language): Add "catch handlers" command entry.
12508 * NEWS: Document "catch handlers" feature.
12510 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12512 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12513 account when creating the array type of the slice.
12514 (ada_value_slice): Likewise.
12516 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12518 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12520 (create_array_type_with_stride): Add byte_stride_prop parameter.
12521 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12522 New parameter. Update all callers in this file.
12523 (array_type_has_dynamic_stride): New function.
12524 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12525 of arrays with dynamic byte strides.
12526 * dwarf2read.c (read_array_type): Add support for dynamic
12527 DW_AT_byte_stride attributes.
12529 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12531 * dwarf2read.c (read_unspecified_type): Treat
12532 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12534 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12536 Update copyright year range in all GDB files.
12538 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12540 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12541 and gdb/testsuite/gdb.base/step-line.c.
12543 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12545 * copyright.py (main): Dump the contents of
12546 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12547 even if BY_HAND is empty.
12549 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12551 * top.c (print_gdb_version): Update Copyright year in version
12554 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12556 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12558 For older changes see ChangeLog-2017.
12564 version-control: never