1 2018-08-29 Keith Seitz <keiths@redhat.com>
3 * linespec.c (symbolp): Remove typedef and VEC definitions.
4 (bound_minimal_symbol_d): Likewise.
6 2018-08-29 Keith Seitz <keiths@redhat.com>
8 * linespec.c (decode_compound_collector::decode_compound_collector):
9 Remove initialization for `m_symtabs'.
10 (decode_compound_collector::release_symbols): Change return type
11 to std::vector. Update all callers.
12 (class decode_compound_collector) <m_symbols>: Change type to
14 (lookup_prefix_sym): Change return type to std::vector. Update all
16 (compare_symbols): Remove.
17 (std_compare_symbols): Rename to `compare_symbols'.
18 (find_method): Change `sym_classes' parameter to std::vector.
19 Update all callers. Use std::sort to sort sym_classes.
20 (find_linespec_symbols): Remove cleanup.
22 2018-08-29 Keith Seitz <keiths@redhat.com>
24 * linespec.c (struct linespec) <minimal_symbols>: Change type to
25 std::vector. Update all users.
26 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
27 (struct collect_info) <minimal_symbols>: Likewise.
28 (compare_msymbols): Return bool. Change parameters to const
29 bound_minimal_symbol references.
30 (find_method, find_function_symbols, find_linespec_symbols): Change
31 `minsyms' parameter to std::vector. Update all callers.
33 2018-08-29 Keith Seitz <keiths@redhat.com>
35 * linespec.c (struct linespec) <label_symbols>: Change type to
36 std::vector. Update all users.
37 (find_label_symbols_in_block): Change `result' parameter to
38 std::vector. Update all callers.
39 (find_label_symbols): Return std::vector. Update all callers.
41 2018-08-29 Keith Seitz <keiths@redhat.com>
43 * linespec.c (struct linespec) <function_symbols>: Change type to
44 std::vector. Update all users.
45 (struct collect_info) <function_symbols>: Likewise.
46 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
47 (std_compare_symbols): New function.
48 (find_method, find_function_symbols, find_linespec_symbols)
49 (find_label_symbols_in_block): Change `symbols' parameter to
50 std::vector. Update all callers.
51 (find_label_symbols): Likewise for `function_symbols' and
54 2018-08-29 Keith Seitz <keiths@redhat.com>
56 * linespec.c (symtab_vector_up): Define.
57 (struct linespec) <file_symtabs>: Change type to std::vector *.
59 (struct collect_info) <file_symtabs>: Likewise.
60 (collect_symtabs_from_filename): Return symtab_vector_up.
62 (decode_objc): Remove cleanup.
63 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
64 (symtab_collector::release_symtabs): Return symtab_vector_up.
66 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
68 (collect_symtabs_from_filename, symtabs_from_filename): Return
69 symtab_vector_up. Update all callers.
71 2018-08-29 Tom Tromey <tom@tromey.com>
73 * csky-tdep.c (csky_analyze_prologue): Use
74 core_addr_to_string_nz.
76 2018-08-29 Tom Tromey <tom@tromey.com>
78 * windows-nat.c (struct xlate_exception) <them>: Change type to
80 (xlate): Fix formatting. Remove last entry.
81 (struct xlate_exception, xlate): Comment out.
82 (windows_nat_target::resume): Use ranged for.
84 2018-08-29 Jim Wilson <jimw@sifive.com>
86 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
87 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
89 (riscv_linux_nat_target::store_registers): Likewise.
91 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
95 * gnulib/aclocal.m4: Regenerate.
96 * gnulib/config.in: Regenerate.
97 * gnulib/configure: Regenerate.
98 * gnulib/import/Makefile.am: Update.
99 * gnulib/import/Makefile.in: Update.
100 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
101 * gnulib/import/_Noreturn.h: ... this.
102 * gnulib/import/alloca.in.h: Update.
103 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
104 * gnulib/import/arg-nonnull.h: ... this.
105 * gnulib/import/assure.h: Update.
106 * gnulib/import/at-func.c: Update.
107 * gnulib/import/basename-lgpl.c: Update.
108 * gnulib/import/extra/snippet/c++defs.h: Rename to...
109 * gnulib/import/c++defs.h: ... this.
110 * gnulib/import/canonicalize-lgpl.c: Update.
111 * gnulib/import/cdefs.h: Update.
112 * gnulib/import/chdir-long.c: Update.
113 * gnulib/import/chdir-long.h: Update.
114 * gnulib/import/cloexec.c: Update.
115 * gnulib/import/cloexec.h: Update.
116 * gnulib/import/close.c: Update.
117 * gnulib/import/closedir.c: Update.
118 * gnulib/import/config.charset: Update.
119 * gnulib/import/dirent-private.h: Update.
120 * gnulib/import/dirent.in.h: Update.
121 * gnulib/import/dirfd.c: Update.
122 * gnulib/import/dirname-lgpl.c: Update.
123 * gnulib/import/dirname.h: Update.
124 * gnulib/import/dosname.h: Update.
125 * gnulib/import/dup-safer-flag.c: Update.
126 * gnulib/import/dup-safer.c: Update.
127 * gnulib/import/dup.c: Update.
128 * gnulib/import/dup2.c: Update.
129 * gnulib/import/errno.in.h: Update.
130 * gnulib/import/error.c: Update.
131 * gnulib/import/error.h: Update.
132 * gnulib/import/exitfail.c: Update.
133 * gnulib/import/exitfail.h: Update.
134 * gnulib/import/extra/update-copyright: Update.
135 * gnulib/import/fchdir.c: Update.
136 * gnulib/import/fcntl.c: Update.
137 * gnulib/import/fcntl.in.h: Update.
138 * gnulib/import/fd-hook.c: Update.
139 * gnulib/import/fd-hook.h: Update.
140 * gnulib/import/fd-safer-flag.c: Update.
141 * gnulib/import/fd-safer.c: Update.
142 * gnulib/import/fdopendir.c: Update.
143 * gnulib/import/filename.h: Update.
144 * gnulib/import/filenamecat-lgpl.c: Update.
145 * gnulib/import/filenamecat.h: Update.
146 * gnulib/import/flexmember.h: Update.
147 * gnulib/import/float+.h: Update.
148 * gnulib/import/float.c: Update.
149 * gnulib/import/float.in.h: Update.
150 * gnulib/import/fnmatch.c: Update.
151 * gnulib/import/fnmatch.in.h: Update.
152 * gnulib/import/fnmatch_loop.c: Update.
153 * gnulib/import/fpucw.h: Update.
154 * gnulib/import/frexp.c: Update.
155 * gnulib/import/frexpl.c: Update.
156 * gnulib/import/fstat.c: Update.
157 * gnulib/import/fstatat.c: Update.
158 * gnulib/import/getcwd-lgpl.c: Update.
159 * gnulib/import/getcwd.c: Update.
160 * gnulib/import/getdtablesize.c: Update.
161 * gnulib/import/getlogin_r.c: Update.
162 * gnulib/import/getprogname.c: Update.
163 * gnulib/import/getprogname.h: Update.
164 * gnulib/import/gettext.h: Update.
165 * gnulib/import/gettimeofday.c: Update.
166 * gnulib/import/glob-libc.h: Update.
167 * gnulib/import/glob.c: Update.
168 * gnulib/import/glob.in.h: Update.
169 * gnulib/import/glob_internal.h: Update.
170 * gnulib/import/glob_pattern_p.c: Update.
171 * gnulib/import/globfree.c: Update.
172 * gnulib/import/hard-locale.c: Update.
173 * gnulib/import/hard-locale.h: Update.
174 * gnulib/import/intprops.h: Update.
175 * gnulib/import/inttypes.in.h: Update.
176 * gnulib/import/isnan.c: Update.
177 * gnulib/import/isnand-nolibm.h: Update.
178 * gnulib/import/isnand.c: Update.
179 * gnulib/import/isnanl-nolibm.h: Update.
180 * gnulib/import/isnanl.c: Update.
181 * gnulib/import/itold.c: Update.
182 * gnulib/import/libc-config.h: Update.
183 * gnulib/import/limits.in.h: Update.
184 * gnulib/import/localcharset.c: Update.
185 * gnulib/import/localcharset.h: Update.
186 * gnulib/import/localtime-buffer.c: Update.
187 * gnulib/import/localtime-buffer.h: Update.
188 * gnulib/import/lstat.c: Update.
189 * gnulib/import/m4/00gnulib.m4: Update.
190 * gnulib/import/m4/__inline.m4: Update.
191 * gnulib/import/m4/absolute-header.m4: Update.
192 * gnulib/import/m4/alloca.m4: Update.
193 * gnulib/import/m4/builtin-expect.m4: Update.
194 * gnulib/import/m4/canonicalize.m4: Update.
195 * gnulib/import/m4/chdir-long.m4: Update.
196 * gnulib/import/m4/close.m4: Update.
197 * gnulib/import/m4/closedir.m4: Update.
198 * gnulib/import/m4/configmake.m4: Update.
199 * gnulib/import/m4/d-ino.m4: Update.
200 * gnulib/import/m4/d-type.m4: Update.
201 * gnulib/import/m4/dirent_h.m4: Update.
202 * gnulib/import/m4/dirfd.m4: Update.
203 * gnulib/import/m4/dirname.m4: Update.
204 * gnulib/import/m4/double-slash-root.m4: Update.
205 * gnulib/import/m4/dup.m4: Update.
206 * gnulib/import/m4/dup2.m4: Update.
207 * gnulib/import/m4/eealloc.m4: Update.
208 * gnulib/import/m4/environ.m4: Update.
209 * gnulib/import/m4/errno_h.m4: Update.
210 * gnulib/import/m4/error.m4: Update.
211 * gnulib/import/m4/exponentd.m4: Update.
212 * gnulib/import/m4/exponentl.m4: Update.
213 * gnulib/import/m4/extensions.m4: Update.
214 * gnulib/import/m4/extern-inline.m4: Update.
215 * gnulib/import/m4/fchdir.m4: Update.
216 * gnulib/import/m4/fcntl-o.m4: Update.
217 * gnulib/import/m4/fcntl.m4: Update.
218 * gnulib/import/m4/fcntl_h.m4: Update.
219 * gnulib/import/m4/fdopendir.m4: Update.
220 * gnulib/import/m4/filenamecat.m4: Update.
221 * gnulib/import/m4/flexmember.m4: Update.
222 * gnulib/import/m4/float_h.m4: Update.
223 * gnulib/import/m4/fnmatch.m4: Update.
224 * gnulib/import/m4/fnmatch_h.m4: Update.
225 * gnulib/import/m4/fpieee.m4: Update.
226 * gnulib/import/m4/frexp.m4: Update.
227 * gnulib/import/m4/frexpl.m4: Update.
228 * gnulib/import/m4/fstat.m4: Update.
229 * gnulib/import/m4/fstatat.m4: Update.
230 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
231 * gnulib/import/m4/getcwd-path-max.m4: Update.
232 * gnulib/import/m4/getcwd.m4: Update.
233 * gnulib/import/m4/getdtablesize.m4: Update.
234 * gnulib/import/m4/getlogin.m4: Update.
235 * gnulib/import/m4/getlogin_r.m4: Update.
236 * gnulib/import/m4/getpagesize.m4: Update.
237 * gnulib/import/m4/getprogname.m4: Update.
238 * gnulib/import/m4/gettimeofday.m4: Update.
239 * gnulib/import/m4/glibc21.m4: Update.
240 * gnulib/import/m4/glob.m4: Update.
241 * gnulib/import/m4/glob_h.m4: Update.
242 * gnulib/import/m4/gnulib-cache.m4: Update.
243 * gnulib/import/m4/gnulib-common.m4: Update.
244 * gnulib/import/m4/gnulib-comp.m4: Update.
245 * gnulib/import/m4/gnulib-tool.m4: Update.
246 * gnulib/import/m4/hard-locale.m4: Update.
247 * gnulib/import/m4/include_next.m4: Update.
248 * gnulib/import/m4/inttypes-pri.m4: Update.
249 * gnulib/import/m4/inttypes.m4: Update.
250 * gnulib/import/m4/isnand.m4: Update.
251 * gnulib/import/m4/isnanl.m4: Update.
252 * gnulib/import/m4/largefile.m4: Update.
253 * gnulib/import/m4/limits-h.m4: Update.
254 * gnulib/import/m4/localcharset.m4: Update.
255 * gnulib/import/m4/locale-fr.m4: Update.
256 * gnulib/import/m4/locale-ja.m4: Update.
257 * gnulib/import/m4/locale-zh.m4: Update.
258 * gnulib/import/m4/localtime-buffer.m4: Update.
259 * gnulib/import/m4/longlong.m4: Update.
260 * gnulib/import/m4/lstat.m4: Update.
261 * gnulib/import/m4/malloc.m4: Update.
262 * gnulib/import/m4/malloca.m4: Update.
263 * gnulib/import/m4/math_h.m4: Update.
264 * gnulib/import/m4/mbrtowc.m4: Update.
265 * gnulib/import/m4/mbsinit.m4: Update.
266 * gnulib/import/m4/mbsrtowcs.m4: Update.
267 * gnulib/import/m4/mbstate_t.m4: Update.
268 * gnulib/import/m4/memchr.m4: Update.
269 * gnulib/import/m4/memmem.m4: Update.
270 * gnulib/import/m4/mempcpy.m4: Update.
271 * gnulib/import/m4/memrchr.m4: Update.
272 * gnulib/import/m4/mkdir.m4: Update.
273 * gnulib/import/m4/mkstemp.m4: Update.
274 * gnulib/import/m4/mmap-anon.m4: Update.
275 * gnulib/import/m4/mode_t.m4: Update.
276 * gnulib/import/m4/msvc-inval.m4: Update.
277 * gnulib/import/m4/msvc-nothrow.m4: Update.
278 * gnulib/import/m4/multiarch.m4: Update.
279 * gnulib/import/m4/nocrash.m4: Update.
280 * gnulib/import/m4/off_t.m4: Update.
281 * gnulib/import/m4/onceonly.m4: Update.
282 * gnulib/import/m4/open-cloexec.m4: Update.
283 * gnulib/import/m4/open.m4: Update.
284 * gnulib/import/m4/openat.m4: Update.
285 * gnulib/import/m4/opendir.m4: Update.
286 * gnulib/import/m4/pathmax.m4: Update.
287 * gnulib/import/m4/rawmemchr.m4: Update.
288 * gnulib/import/m4/readdir.m4: Update.
289 * gnulib/import/m4/readlink.m4: Update.
290 * gnulib/import/m4/realloc.m4: Update.
291 * gnulib/import/m4/rename.m4: Update.
292 * gnulib/import/m4/rewinddir.m4: Update.
293 * gnulib/import/m4/rmdir.m4: Update.
294 * gnulib/import/m4/save-cwd.m4: Update.
295 * gnulib/import/m4/secure_getenv.m4: Update.
296 * gnulib/import/m4/setenv.m4: Update.
297 * gnulib/import/m4/signal_h.m4: Update.
298 * gnulib/import/m4/ssize_t.m4: Update.
299 * gnulib/import/m4/stat-time.m4: Update.
300 * gnulib/import/m4/stat.m4: Update.
301 * gnulib/import/m4/std-gnu11.m4: Update.
302 * gnulib/import/m4/stdbool.m4: Update.
303 * gnulib/import/m4/stddef_h.m4: Update.
304 * gnulib/import/m4/stdint.m4: Update.
305 * gnulib/import/m4/stdio_h.m4: Update.
306 * gnulib/import/m4/stdlib_h.m4: Update.
307 * gnulib/import/m4/strchrnul.m4: Update.
308 * gnulib/import/m4/strdup.m4: Update.
309 * gnulib/import/m4/strerror.m4: Update.
310 * gnulib/import/m4/string_h.m4: Update.
311 * gnulib/import/m4/strstr.m4: Update.
312 * gnulib/import/m4/strtok_r.m4: Update.
313 * gnulib/import/m4/sys_socket_h.m4: Update.
314 * gnulib/import/m4/sys_stat_h.m4: Update.
315 * gnulib/import/m4/sys_time_h.m4: Update.
316 * gnulib/import/m4/sys_types_h.m4: Update.
317 * gnulib/import/m4/tempname.m4: Update.
318 * gnulib/import/m4/time_h.m4: Update.
319 * gnulib/import/m4/unistd-safer.m4: Update.
320 * gnulib/import/m4/unistd_h.m4: Update.
321 * gnulib/import/m4/warn-on-use.m4: Update.
322 * gnulib/import/m4/wchar_h.m4: Update.
323 * gnulib/import/m4/wchar_t.m4: Update.
324 * gnulib/import/m4/wctype_h.m4: Update.
325 * gnulib/import/m4/wint_t.m4: Update.
326 * gnulib/import/malloc.c: Update.
327 * gnulib/import/malloc/scratch_buffer.h: Update.
328 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
329 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
330 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
331 * gnulib/import/malloca.c: Update.
332 * gnulib/import/malloca.h: Update.
333 * gnulib/import/malloca.valgrind: Update.
334 * gnulib/import/math.in.h: Update.
335 * gnulib/import/mbrtowc.c: Update.
336 * gnulib/import/mbsinit.c: Update.
337 * gnulib/import/mbsrtowcs-impl.h: Update.
338 * gnulib/import/mbsrtowcs-state.c: Update.
339 * gnulib/import/mbsrtowcs.c: Update.
340 * gnulib/import/memchr.c: Update.
341 * gnulib/import/memmem.c: Update.
342 * gnulib/import/mempcpy.c: Update.
343 * gnulib/import/memrchr.c: Update.
344 * gnulib/import/mkdir.c: Update.
345 * gnulib/import/mkstemp.c: Update.
346 * gnulib/import/msvc-inval.c: Update.
347 * gnulib/import/msvc-inval.h: Update.
348 * gnulib/import/msvc-nothrow.c: Update.
349 * gnulib/import/msvc-nothrow.h: Update.
350 * gnulib/import/open.c: Update.
351 * gnulib/import/openat-die.c: Update.
352 * gnulib/import/openat-priv.h: Update.
353 * gnulib/import/openat-proc.c: Update.
354 * gnulib/import/openat.c: Update.
355 * gnulib/import/openat.h: Update.
356 * gnulib/import/opendir.c: Update.
357 * gnulib/import/pathmax.h: Update.
358 * gnulib/import/pipe-safer.c: Update.
359 * gnulib/import/rawmemchr.c: Update.
360 * gnulib/import/readdir.c: Update.
361 * gnulib/import/readlink.c: Update.
362 * gnulib/import/realloc.c: Update.
363 * gnulib/import/ref-add.sin: Update.
364 * gnulib/import/ref-del.sin: Update.
365 * gnulib/import/rename.c: Update.
366 * gnulib/import/rewinddir.c: Update.
367 * gnulib/import/rmdir.c: Update.
368 * gnulib/import/same-inode.h: Update.
369 * gnulib/import/save-cwd.c: Update.
370 * gnulib/import/save-cwd.h: Update.
371 * gnulib/import/scratch_buffer.h: Update.
372 * gnulib/import/secure_getenv.c: Update.
373 * gnulib/import/setenv.c: Update.
374 * gnulib/import/signal.in.h: Update.
375 * gnulib/import/stat-time.c: Update.
376 * gnulib/import/stat-time.h: Update.
377 * gnulib/import/stat-w32.c: Update.
378 * gnulib/import/stat-w32.h: Update.
379 * gnulib/import/stat.c: Update.
380 * gnulib/import/stdbool.in.h: Update.
381 * gnulib/import/stddef.in.h: Update.
382 * gnulib/import/stdint.in.h: Update.
383 * gnulib/import/stdio.in.h: Update.
384 * gnulib/import/stdlib.in.h: Update.
385 * gnulib/import/str-two-way.h: Update.
386 * gnulib/import/strchrnul.c: Update.
387 * gnulib/import/strdup.c: Update.
388 * gnulib/import/streq.h: Update.
389 * gnulib/import/strerror-override.c: Update.
390 * gnulib/import/strerror-override.h: Update.
391 * gnulib/import/strerror.c: Update.
392 * gnulib/import/string.in.h: Update.
393 * gnulib/import/stripslash.c: Update.
394 * gnulib/import/strnlen1.c: Update.
395 * gnulib/import/strnlen1.h: Update.
396 * gnulib/import/strstr.c: Update.
397 * gnulib/import/strtok_r.c: Update.
398 * gnulib/import/sys_stat.in.h: Update.
399 * gnulib/import/sys_time.in.h: Update.
400 * gnulib/import/sys_types.in.h: Update.
401 * gnulib/import/tempname.c: Update.
402 * gnulib/import/tempname.h: Update.
403 * gnulib/import/time.in.h: Update.
404 * gnulib/import/unistd--.h: Update.
405 * gnulib/import/unistd-safer.h: Update.
406 * gnulib/import/unistd.in.h: Update.
407 * gnulib/import/unsetenv.c: Update.
408 * gnulib/import/verify.h: Update.
409 * gnulib/import/extra/snippet/warn-on-use.h: Update.
410 * gnulib/import/wchar.in.h: Update.
411 * gnulib/import/wctype.in.h: Update.
412 * gnulib/import/xalloc-oversized.h: Update.
413 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
414 "53e2c179f26a890fa6685af4b6c1397ee370433b".
416 2018-08-16 Gary Benson <gbenson@redhat.com>
419 * gdb/main.c (captured_main_1): Exit with nonzero status
420 in batch mode if the last command to be executed failed.
421 * NEWS: Mention the above.
423 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
425 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
426 end of warning message.
428 2018-08-29 Alan Hayward <alan.hayward@arm.com>
431 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
432 (aarch64_extract_return_value): Use
433 aapcs_is_vfp_call_or_return_candidate.
434 (aarch64_return_in_memory): Likewise.
435 (aarch64_store_return_value): Likewise.
437 2018-08-29 Alan Hayward <alan.hayward@arm.com>
440 (aapcs_is_vfp_call_or_return_candidate): Make static
441 (pass_in_v_or_stack): Remove function.
442 (pass_in_v_vfp_candidate): New function.
443 (aarch64_push_dummy_call): Check for float register candidates.
445 2018-08-29 Alan Hayward <alan.hayward@arm.com>
447 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
448 (aapcs_is_vfp_call_or_return_candidate_1): New function.
449 (aapcs_is_vfp_call_or_return_candidate): Likewise.
451 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
454 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
455 (struct ipa_sym_addresses): Rename to...
456 (struct ipa_sym_addresses_common): ... this.
457 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
459 2018-08-28 Tom Tromey <tom@tromey.com>
461 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
462 (token_fifo): Now a std::vector.
463 (yylex, c_parse): Update.
464 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
465 (token_fifo): Now a std::vector.
466 (yylex, d_parse): Update.
467 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
468 (token_fifo): Now a std::vector.
469 (yylex, go_parse): Update.
471 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
473 * parser-defs.h (struct type_stack) <elements>: Change type to
474 std::vector<union type_stack_elt>.
475 <depth, size>: Remove.
476 * parse.c (parse_exp_in_context_1): Adjust.
477 (type_stack_reserve): Remove.
478 (check_type_stack_depth): Remove.
479 (insert_into_type_stack): Adjust to std::vector.
480 (insert_type): Likewise.
481 (push_type): Likewise.
482 (push_type_int): Likewise.
483 (insert_type_address_space): Likewise.
484 (pop_type): Likewise.
485 (pop_type_int): Likewise.
486 (pop_typelist): Likewise.
487 (pop_type_stack): Likewise.
488 (append_type_stack): Likewise.
489 (push_type_stack): Likewise.
490 (get_type_stack): Likewise.
491 (type_stack_cleanup): Likewise.
492 (push_typelist): Likewise.
493 (follow_types): Likewise.
494 (_initialize_parse): Likewise.
496 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
498 * NEWS: Mention csky target.
500 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
501 Hafiz Abid Qadeer <abidh@codesourcery.com>
502 Don Breazeal <donb@codesourcery.com>
504 * csky-linux-tdep.c: New file.
505 * csky-tdep.c: Likewise.
506 * csky-tdep.h: Likewise.
507 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
509 (HFILES_NO_SRCDIR): Add csky-tdep.h.
510 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
511 * configure.tgt: Add csky support.
513 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
515 * python/py-framefilter.c (py_print_frame): Print frame architecture
516 when printing on an MI output.
518 2018-08-27 Tom Tromey <tom@tromey.com>
521 * configure: Rebuild.
522 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
524 2018-08-27 Tom Tromey <tom@tromey.com>
526 * aarch64-linux-tdep.c
527 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
530 2018-08-27 Tom Tromey <tom@tromey.com>
532 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
534 (ppc64_standard_linkage1, ppc64_standard_linkage2)
535 (ppc64_standard_linkage3, ppc64_standard_linkage4)
536 (ppc64_standard_linkage5, ppc64_standard_linkage6)
537 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
540 2018-08-27 Tom Tromey <tom@tromey.com>
542 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
543 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
545 2018-08-27 Tom Tromey <tom@tromey.com>
547 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
548 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
550 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
552 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
554 * sparc-linux-tdep.c (sparc32_linux_sigframe)
555 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
556 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
558 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
559 (ppc64_linux_sigaction_tramp_frame)
560 (ppc32_linux_sighandler_tramp_frame)
561 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
562 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
563 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
564 * mn10300-linux-tdep.c (am33_linux_sigframe)
565 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
566 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
567 * mips-linux-tdep.c (mips_linux_o32_sigframe)
568 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
569 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
570 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
571 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
572 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
573 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
574 * microblaze-linux-tdep.c
575 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
576 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
577 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
578 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
579 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
580 * common/common-types.h (ULONGEST_MAX): New define.
581 (CORE_ADDR_MAX): Fix formatting.
582 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
583 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
584 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
585 (arm_linux_rt_sigreturn_tramp_frame)
586 (arm_eabi_linux_sigreturn_tramp_frame)
587 (arm_eabi_linux_rt_sigreturn_tramp_frame)
588 (thumb2_eabi_linux_sigreturn_tramp_frame)
589 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
590 (arm_linux_restart_syscall_tramp_frame)
591 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
592 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
593 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
595 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
597 2018-08-27 Tom Tromey <tom@tromey.com>
599 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
601 * mips-tdep.c (mips_deal_with_atomic_sequence)
602 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
603 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
604 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
605 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
607 * aarch64-tdep.c (aarch64_software_single_step): Use
610 2018-08-27 Tom Tromey <tom@tromey.com>
612 * linespec.c (complete_linespec_component): Add cast to "char".
613 * completer.c (completion_tracker::build_completion_result): Add
616 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
618 * solist.h (struct solist, struct target_so_ops): Fix
621 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
623 * ada-tasks.c (ada_task_info_s): Remove typedef.
624 (DEF_VEC_O(ada_task_info_s)): Remove.
625 (struct ada_tasks_inferior_data): Initialize fields.
626 <task_list>: Make an std::vector.
627 (get_ada_tasks_inferior_data): Allocate with new.
628 (ada_get_task_number): Adjust.
629 (get_task_number_from_id): Likewise.
630 (valid_task_id): Likewise.
631 (ada_get_task_info_from_ptid): Likewise.
632 (iterate_over_live_ada_tasks): Likewise.
633 (add_ada_task): Likewise.
634 (read_known_tasks): Likewise.
635 (ada_build_task_list): Likewise.
636 (print_ada_task_info): Likewise.
637 (info_task): Likewise.
638 (task_command_1): Likewise.
640 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
642 * ada-lang.c (add_angle_brackets): Return std::string.
644 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
646 * python/py-threadevent.c (py_get_event_thread): Initialize
649 2018-08-24 Pedro Alves <palves@redhat.com>
651 * python/py-bpevent.c (create_breakpoint_event_object): Use
653 * python/py-continueevent.c (emit_continue_event): Use
655 * python/py-exitedevent.c (create_exited_event_object): Return a
657 (emit_exited_event): Use copy-initialization.
658 * python/py-inferior.c (python_new_inferior)
659 (python_inferior_deleted, add_thread_object): Use
661 * python/py-infevents.c (create_inferior_call_event_object)
662 (create_register_changed_event_object)
663 (create_memory_changed_event_object): Return a gdbpy_ref<>.
664 (emit_inferior_call_event, emit_memory_changed_event)
665 (emit_register_changed_event): Use copy-initialization.
666 * python/py-newobjfileevent.c (create_new_objfile_event_object):
667 Return a gdbpy_ref<>.
668 (emit_new_objfile_event): Use copy-initialization.
669 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
670 (emit_clear_objfiles_event): Use copy-initialization.
671 * python/py-signalevent.c (create_signal_event_object): Use
673 * python/py-threadevent.c (create_thread_event_object): Use
676 2018-08-24 Pedro Alves <palves@redhat.com>
677 Simon Marchi <simon.marchi@ericsson.com>
680 * python/py-continueevent.c: Include "gdbthread.h".
681 (create_continue_event_object): Add intro comment. Add 'ptid'
682 parameter. Use it to find thread to pass to
683 create_thread_event_object.
684 (emit_continue_event): Pass PTID down to
685 create_continue_event_object.
686 * python/py-event.h (py_get_event_thread): Declare.
687 (create_thread_event_object): Remove default from 'thread'
689 * python/py-stopevent.c (create_stop_event_object): Use
691 * python/py-threadevent.c (get_event_thread): Rename to ...
692 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
693 and use it to find the thread.
694 (create_thread_event_object): Assert that THREAD isn't null.
695 Don't find the event thread here.
697 2018-08-23 Kevin Buettner <kevinb@redhat.com>
699 * block.h (blockrange, blockranges): New struct declarations.
700 (struct block): Add new field named `ranges'.
701 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
702 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
703 macros for accessing ranges in struct block.
704 (make_blockranges): New declaration.
705 block.c (make_blockranges): New function.
706 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
708 * symtab.h (find_pc_partial_function): Add new parameter `block'.
709 * blockframe.c (cache_pc_function_block): New static global.
710 (clear_pc_function_cache): Clear cache_pc_function_block.
711 (find_pc_partial_function): Move comment to symtab.h. Add
712 support for non-contiguous blocks.
713 * cli/cli-cmds.c (block.h): Include.
714 (print_disassembly): Handle printing of non-contiguous blocks.
715 (disassemble_current_function): Likewise.
716 (disassemble_command): Likewise.
718 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
720 * blockframe.c (get_pc_function_start): Likewise.
721 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
722 (gcc_symbol_address): Likewise.
723 * compile/compile-object-run.c (compile_object_run): Likewise.
724 * compile/compile.c (get_expr_block_and_pc): Likewise.
725 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
726 (func_addr_to_tail_call_list): Likewise.
727 * findvar.c (default_read_var_value): Likewise.
728 * inline-frame.c (inline_frame_this_id): Likewise.
729 (skip-inline_frames): Likewise.
730 * infcmd.c (until_next_command): Likewise.
731 * linespec.c (convert_linespec_to_sals): Likewise.
732 * parse.c (parse_exp_in_context_1): Likewise.
733 * printcmd.c (build_address_symbolic): likewise.
734 (info_address_command): Likewise.
735 symtab.c (find_function_start_sal): Likewise.
736 (skip_prologue_sal): Likewise.
737 (find_function_alias_target): Likewise.
738 (find_gnu_ifunc): Likewise.
739 * stack.c (find_frame_funname): Likewise.
740 * symtab.c (fixup_symbol_section): Likewise.
741 (find_function_start_sal): Likewise.
742 (skip_prologue_sal): Likewsie.
743 (find_function_alias_target): Likewise.
744 (find_gnu_ifunc): Likewise.
745 * tracepoint.c (info_scope_command): Likewise.
746 * value.c (value_fn_field): Likewise.
748 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
749 in place of find_pc_partial_function.
750 * blockframe.c (find_function_entry_range_from_pc): New function.
751 * symtab.h (find_function_entry_range_from_pc): Declare and document.
752 * objfiles.c (objfile_relocate1): Relocate start and end addresses
753 for each range in a block.
756 2018-08-23 Xavier Roirand <roirand@adacore.com>
758 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
761 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
763 * solib-svr4.c (read_program_headers_from_bfd): Return
764 gdb::optional<gdb::byte_vector>.
765 (svr4_exec_displacement): Adjust.
767 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
769 * solib-svr4.c (read_program_header): Return
770 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
771 (find_program_interpreter): Return
772 gdb::optional<gdb::byte_vector>.
773 (scan_dyntag_auxv): Adjust.
774 (enable_break): Adjust.
775 (svr4_exec_displacement): Adjust.
777 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
779 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
780 * inf-child.c (inf_child_target::terminal_save_inferior): New.
782 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
784 * guile/scm-string.c (gdbscm_scm_from_printf): Use
786 * guile/scm-utils.c (gdbscm_printf): Likewise.
787 * serial.c (serial_printf): Likewise.
788 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
790 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
792 * stack.c (print_frame): Print frame architecture when printing on
794 * NEWS: Mention new "arch" attribute in frame output.
796 2018-08-21 Alan Hayward <alan.hayward@arm.com>
798 * arch/aarch64.h (aarch64_regnum): Update comment.
800 2018-08-21 Alan Hayward <alan.hayward@arm.com>
802 * NEWS: Add SVE to 8.2 section.
804 2018-08-21 Pedro Alves <palves@redhat.com>
806 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
807 out from gdbscm_parse_function_args.
808 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
809 gdbscm_parse_function_args_1.
811 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
814 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
817 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
819 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
821 2018-08-19 Michael Spang <spang@google.com>
824 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
827 2018-08-18 Kevin Buettner <kevinb@redhat.com>
829 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
830 dwarf_variable_value.
831 * dwarf2-frame.c (class dwarf_expr_executor):
832 Add override for dwarf_variable_value.
833 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
834 (class symbol_needs_eval_context): Likewise.
835 (indirect_synthetic_pointer): Add forward declaration.
836 (sect_variable_value): New function.
837 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
838 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
839 for DW_OP_GNU_variable_value.
841 2018-08-16 Tom Tromey <tom@tromey.com>
843 * top.c (read_command_file): Update.
844 (command_line_input): Remove "repeat" argument.
845 * ada-lang.c (get_selections): Update.
846 * linespec.c (decode_line_2): Update.
847 * defs.h (command_line_input): Remove argument.
848 * cli/cli-script.c (read_next_line): Update.
849 * python/py-gdb-readline.c: Update.
851 2018-08-17 Tom Tromey <tom@tromey.com>
853 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
856 2018-08-15 Tom Tromey <tom@tromey.com>
858 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
860 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
862 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
863 If used, use find_pc_partial_function to find address range
865 * mi/mi-main.c (mi_cmd_list_features): Report
866 "data-disassemble-a-option" feature.
867 * NEWS: Mention new -data-disassemble option -a.
869 2018-08-13 Tom Tromey <tom@tromey.com>
871 * common/common-defs.h (_FORTIFY_SOURCE): Define.
873 2018-08-13 Alan Hayward <alan.hayward@arm.com>
875 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
876 (aarch64_linux_collect_sve_regset): Likewise.
877 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
878 * regcache.h (regcache_map_entry_size): New function.
880 2018-08-13 Alan Hayward <alan.hayward@arm.com>
882 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
883 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
884 (SVE_HEADER_VL_LENGTH): Likewise.
885 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
886 (SVE_HEADER_FLAGS_LENGTH): Likewise.
887 (SVE_HEADER_RESERVED_LENGTH): Likewise.
888 (SVE_HEADER_SIZE_OFFSET): Likewise.
889 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
890 (SVE_HEADER_VL_OFFSET): Likewise.
891 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
892 (SVE_HEADER_FLAGS_OFFSET): Likewise.
893 (SVE_HEADER_RESERVED_OFFSET): Likewise.
894 (SVE_HEADER_SIZE): Likewise.
895 (aarch64_linux_core_read_vq): Add function.
896 (aarch64_linux_core_read_description): Check for SVE section.
898 2018-08-13 Alan Hayward <alan.hayward@arm.com>
900 * aarch64-fbsd-tdep.c
901 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
903 * aarch64-linux-tdep.c
904 (aarch64_linux_iterate_over_regset_sections): Likewise.
906 (alpha_linux_iterate_over_regset_sections):
908 (alphanbsd_iterate_over_regset_sections): Likewise.
910 (amd64fbsd_iterate_over_regset_sections): Likewise.
912 (amd64_linux_iterate_over_regset_sections): Likewise.
914 (armbsd_iterate_over_regset_sections): Likewise.
916 (arm_fbsd_iterate_over_regset_sections): Likewise.
918 (arm_linux_iterate_over_regset_sections): Likewise.
919 * corelow.c (get_core_registers_cb): Likewise.
920 (core_target::fetch_registers): Likewise.
921 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
922 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
923 * gdbarch.h (void): Regenerate.
924 * gdbarch.sh: Add supply_size and collect_size.
925 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
926 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
927 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
928 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
929 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
930 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
931 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
932 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
933 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
934 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
935 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
936 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
937 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
938 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
939 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
940 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
941 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
942 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
943 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
944 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
945 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
946 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
947 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
948 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
949 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
950 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
951 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
952 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
953 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
954 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
956 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
958 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
961 2018-08-10 Keith Seitz <keiths@redhat.com>
963 * compile/compile-c-support.c (add_code_header, add_code_footer):
964 Move into policy class.
965 (c_push_user_expression, pop_user_expression_nop)
966 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
967 (compile_program): New host class.
968 (c_compile_program): New typedef.
969 (c_compute_porgram): Use c_compile_program.
971 2018-08-10 Keith Seitz <keiths@redhat.com>
973 * compile/compile-internal.h (compile_instance::~compile_instance):
974 Remove calls to htab_delete.
975 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
976 * compile.c (compile_instance::compile_instance): Initialize
977 htab unique pointers.
978 (compile_instance::get_cached_type, compile_instance::insert_type)
979 (compile_instance::error_symbol_once): Update for unique_ptr.
981 2018-08-10 Keith Seitz <keiths@redhat.com>
983 * compile/compile-c-symbols.c (struct symbol_error)
984 (hash_symbol_error, eq_symbol_error, del_symbol_error)
985 (compile_instance::insert_symbol_error)
986 (compile_instance::error_symbol_once): Move to ...
987 * compile/compile.c: ... here.
989 2018-08-10 Keith Seitz <keiths@redhat.com>
991 * compile/compile-c-support.c (c_get_compile_context): Use `new'
992 instead of `new_compile_instance'.
993 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
995 If the symbol error map is not initialized, create it.
996 (generate_c_for_for_one_symbol): Do not check/initialize
997 the symbol error map.
998 * compile/compile-c-types.c (compile_c_instance): Make a class.
1000 (compile_instance::compile_instance): Initialize the type cache.
1001 (get_cached_type): New function.
1002 (insert_type): Update description.
1003 (compile_c_instance::m_default_cflags): Define.
1004 (convert_type): Update description. Use get_cached_type.
1005 (delete_instance): Moved to destructor.
1006 (new_compile_instance): Moved to constructor.
1007 * compile/compile-c.h (compile_c_instance): Make class inheriting
1008 from compile_instance.
1009 <base>: Remove field.
1010 <type_map, symbol_err_map>: Move to base class.
1011 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1012 * compile/compile-internal.h (compile_instance): Make class.
1013 <type_map_t, symbol_err_map_t>: Define.
1014 <fe>: Rename to `m_gcc_fe'.
1015 <scope, block, gcc_target_options>: Add `m_' prefix.
1016 <m_type_map, m_symbol_err_map>: New fields, moved from
1019 (convert_type, new_compile_instance): Remove.
1020 * compile/compile.c (cleanup_compile_instance): Remove.
1021 (compile_to_object): Use unique_ptr to eliminate cleanups.
1022 (compile_instance::set_print_callback, compile_instance::version)
1023 (compile_instance::set_verbose)
1024 (compile_instance::set_driver_filename)
1025 (compile_instance::set_triplet_regexp)
1026 (compile_instance::set_arguments)
1027 (compile_instance::set_source_file)
1028 (compile_instance::compile): Define.
1030 2018-08-10 Keith Seitz <keiths@redhat.com>
1032 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1033 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1034 gcc-c-fe.def to define C plugin.
1035 (delete_instance): Delete `c_plugin'.
1036 (new_compile_instance): Initialize `c_plugin'.
1037 * compile/compile-c.h: Include gcc_c_plugin.h.
1038 (struct compile_c_instance) <c_plugin>: New member.
1039 * gcc-c-plugin.h: New file.
1040 Update all callers with API change.
1042 2018-08-10 Keith Seitz <keiths@redhat.com>
1044 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1045 (HFILES_NO_SRCDIR): ... to here.
1046 Add compile-internal.h and compile-c.h.
1047 * compile/compile-c-support.c: Include compile-c.h.
1048 * compile/compile-c-symbols.c: Include compile-c.h.
1049 (generate_c_for_variable_locations): Update comment.
1050 * compile/compile-c-types.c: Include compile-c.h.
1051 * compile/compile-c.h: New file -- moved C language declarations
1052 from other files here.
1053 * compile/compile-internal.h: Do not include hashtab.h or
1054 common/enum-flags.h.
1055 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1056 (gcc_convert_symbol, gcc_symbol_address)
1057 (generate_c_for_variable_locations, c_get_mode_for_size)
1058 (c_get_range_decl_name): Definitions moved to compile-c.h.
1059 * compile/compile-loc2c.c: Include compile-c.h.
1061 2018-08-10 Keith Seitz <keiths@redhat.com>
1063 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1064 (c_symbol_substitution_name): ... this.
1067 2018-08-10 Keith Seitz <keiths@redhat.com>
1069 * compile/compile-c-support.c (c_compute_program): Use
1070 unique_xmalloc_ptr to eliminate cleanup.
1071 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1072 Return a unique_xmalloc_ptr and eliminate cleanup.
1073 * compile/compile-internal.h (generate_c_for_variable_locations):
1074 Return unique_xmalloc_ptr and update description.
1076 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1078 * corelow.c (core_target::get_core_register_section): Rename
1079 min_size to section_min_size.
1081 2018-08-09 Jim Wilson <jimw@sifive.com>
1083 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1084 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1085 * NEWS: Mention new GNU/Linux RISC-V target.
1086 * configure.host: Add riscv*-*-linux*.
1087 * configure.nat: Add riscv*.
1088 * configure.tgt: Add riscv*-*-linux*.
1089 * riscv-linux-nat.c: New file.
1090 * riscv-linux-tdep.c: New file.
1092 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1094 * infrun.c (resume): Make static, add forward declaration.
1095 (proceed): Update header comment.
1096 * infrun.h (resume): Delete declaration.
1098 2018-08-09 Tom Tromey <tom@tromey.com>
1100 * riscv-tdep.h: Minor formatting fixes.
1102 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1104 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1105 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1106 (test_mkdir_recursive): Likewise.
1107 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1109 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1111 * valarith.c (value_subscripted_rvalue): If an array is not in
1112 memory, and we don't know the upper bound, then we can't know that
1113 the requested element exists or not.
1115 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1117 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1118 (target_options_to_string): Add comment.
1120 2018-08-08 Tom Tromey <tom@tromey.com>
1122 * unittests/scoped_mmap-selftests.c: Check result of "write".
1124 2018-08-08 Jim Wilson <jimw@sifive.com>
1126 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1127 (decode_register_index_short): New.
1128 (decode_j_type_insn, decode_cj_type_insn): New.
1129 (decode_b_type_insn, decode_cb_type_insn): New.
1130 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1131 local xlen. Check xlen when decoding ambiguous compressed insns. In
1132 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1133 is_c_sw_insn instead of is_sw_insn.
1134 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1135 (riscv_software_single_step): New.
1136 * riscv-tdep.h (riscv_software_single_step): Declare.
1138 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1139 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1141 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1144 * target.c (dispose_inferior): Don't dispose of inferiors that are
1147 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1149 * remote.c (remote_target::download_tracepoint): Change char* to
1152 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1154 * target.h (target_options_to_string): Return an std::string.
1155 * target.c (str_comma_list_concat_elem): Return void, use
1157 (do_option): Likewise.
1158 (target_options_to_string): Return an std::string.
1159 * linux-nat.c (linux_nat_target::wait): Adjust.
1160 * target-debug.h (target_debug_print_options): Adjust.
1162 2018-08-07 Tom Tromey <tom@tromey.com>
1164 * Makefile.in (CPPFLAGS): New variable.
1165 (INTERNAL_CPPFLAGS): Use it.
1167 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1169 * NEWS: Mention the index cache.
1171 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1173 * common/pathstuff.h (get_standard_cache_dir): New.
1174 * common/pathstuff.c (get_standard_cache_dir): New.
1175 * build-id.h (build_id_to_string): New.
1176 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1177 DEBUG_STR_SUFFIX): Move to here.
1178 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1179 DEBUG_STR_SUFFIX): Move from there.
1180 (write_psymtabs_to_index): Make non-static, add basename
1181 parameter. Write to temporary files, rename when done.
1182 (save_gdb_index_command): Adjust call to
1183 write_psymtabs_to_index.
1184 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1186 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1187 (get_gdb_index_contents_from_cache): New.
1188 (get_gdb_index_contents_from_cache_dwz): New.
1189 (dwarf2_initialize_objfile): Read index from cache.
1190 (dwarf2_build_psymtabs): Save to index.
1191 * dwarf-index-cache.h: New file.
1192 * dwarf-index-cache.c: New file.
1193 * dwarf-index-write.h: New file.
1195 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1197 * gnulib/aclocal.m4: Re-generate.
1198 * gnulib/config.in: Re-generate.
1199 * gnulib/configure: Re-generate.
1200 * gnulib/import/Makefile.am: Re-generate.
1201 * gnulib/import/Makefile.in: Re-generate.
1202 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1203 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1204 * gnulib/import/m4/mkdir.m4: New file.
1205 * gnulib/import/mkdir.c: New file.
1206 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1209 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1211 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1212 * common/scoped_mmap.c: New file.
1213 * common/scoped_mmap.h (destroy): New method.
1214 (~scoped_mmap, reset): Use destroy.
1215 (scoped_mmap): New move constructor.
1216 (mmap_file): New declaration.
1217 * unittests/scoped_mmap-selftests.c (test_normal,
1218 test_invalid_filename, run_tests): New functions.
1219 (_initialize_scoped_mmap_selftests): Register selftest.
1221 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1223 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1224 (read_gdb_index_from_buffer): ... this. Remove section
1225 parameter, add buffer parameter.
1226 (get_gdb_index_contents_ftype,
1227 get_gdb_index_contents_dwz_ftype): New typedefs.
1228 (dwarf2_read_gdb_index): Add callback parameters to get the
1230 (get_gdb_index_contents_from_section): New.
1231 (dwarf2_initialize_objfile): Update call to
1232 dwarf2_read_gdb_index.
1234 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1236 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1237 (gdb_open_cloexec): Likewise.
1238 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1239 (commandline_from_pid): Likewise.
1240 (linux_xfer_osdata_threads): Likewise.
1241 (linux_xfer_osdata_fds): Likewise.
1242 * ada-lang.c (is_package_name): Likewise.
1243 * auxv.c (procfs_xfer_auxv): Likewise.
1244 * breakpoint.c (print_one_breakpoint_location): Use
1246 (print_one_catch_solib): Use string_printf.
1247 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1248 (add_pe_forwarded_sym): Likewise.
1249 * dwarf2read.c (create_type_unit_group): Likewise.
1250 (build_error_marker_type): Likewise.
1251 * infcall.c (get_function_name): Likewise.
1252 * valprint.c (print_converted_chars_to_obstack): Likewise.
1253 * xtensa-tdep.c (xtensa_register_type): Likewise.
1255 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1257 * remote.c (remote_target::download_tracepoint): Fix format
1260 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1262 * tracefile.c: Include common/byte-vector.h.
1263 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1264 with trace_regblock_size if needed. Update uses of buf.
1266 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1268 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1269 std::vector<unsigned char>.
1270 * tracepoint.c (collection_list::collection_list): Remove
1271 m_regs_mask initializer from initializer list. Resize
1272 m_regs_mask using the largest remote register number.
1273 (collection_list::add_remote_register): Remove size check on
1274 m_regs_mask. Use at to access element.
1275 (collection_list::stringify): Change type of temp_buf to
1276 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1277 stringify the register mask. Use pack_hex_byte for the register
1280 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1282 * tracepoint.h (class collection_list) <add_register>: Remove.
1283 <add_remote_register, add_ax_registers, add_local_register>:
1285 <add_memrange>: Add scope parameter.
1286 * tracepoint.c (encode_actions_1): Likewise.
1287 (collection_list::add_register): Rename to ...
1288 (collection_list::add_remote_register): ... this. Update
1290 (collection_list::add_ax_registers, add_local_register): New
1292 (collection_list::add_memrange): Add scope parameter. Call
1293 add_local_register instead of add_register.
1294 (finalize_tracepoint_aexpr): New function.
1295 (collection_list::collect_symbol): Update calls to add_memrange.
1296 Call add_local_register instead of add_register. Call
1297 add_ax_registers. Call finalize_tracepoint_aexpr.
1298 (encode_actions_1): Get remote regnos for $reg action. Call
1299 add_remote_register, add_ax_registers, and add_local_register.
1300 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1301 (validate_actionline): Call finalize_tracepoint_aexpr.
1303 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1305 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1306 Replace array buf with gdb::char_vector buf, of size
1307 get_remote_packet_size (). Replace references to buf and
1308 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1309 and xsnprintf with snprintf. Raise errors if the buffer is too
1312 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1314 * remote.c (remote_target::download_tracepoint): Fix the has_more
1315 predicate in the QTDP action list iteration.
1317 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1319 * remote.c (remote_target::download_tracepoint): Fix indentation
1322 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1324 * proc-api.c (_initialize_proc_api): Remove c, unused.
1325 * procfs.c (procfs_init_inferior): Remove signals, unused.
1326 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1329 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1330 Andrew Burgess <andrew.burgess@embecosm.com>
1332 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1333 'W_STOPCODE (0)' as this could be ambiguous.
1335 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1337 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1338 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1341 2018-08-02 Tom Tromey <tom@tromey.com>
1344 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1346 (process_structure_scope): Likewise.
1348 2018-08-02 Xavier Roirand <roirand@adacore.com>
1351 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1354 2018-08-02 Tom Tromey <tom@tromey.com>
1356 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1357 (darwin_suspend_inferior, darwin_resume_inferior)
1358 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1359 (darwin_check_new_threads): Check result of get_darwin_inferior.
1361 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1365 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1367 * varobj.c (varobj_get_path_expr_parent): Report an error if
1368 parent is a dynamic varobj.
1370 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1372 * gnulib/aclocal.m4: Re-generate.
1373 * gnulib/config.in: Re-generate.
1374 * gnulib/configure: Re-generate.
1375 * gnulib/import/Makefile.in: Re-generate.
1376 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1377 * gnulib/import/m4/onceonly.m4: Re-generate.
1379 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1381 * target-descriptions.c (struct xml_test_tdesc): New.
1382 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1383 (record_xml_tdesc): Update.
1384 (maintenance_check_xml_descriptions): Update.
1385 * target-descriptions.h (record_xml_tdesc): Update comment.
1387 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1389 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1390 checking array bounds are defined.
1392 2018-07-30 Tom Tromey <tom@tromey.com>
1394 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1395 irreflexivity violation.
1397 2018-07-30 Tom Tromey <tom@tromey.com>
1399 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1400 * value.c (unpack_long): Remove lint code.
1401 * valops.c (value_ind): Remove lint code.
1402 * valarith.c (value_x_binop, value_x_unop, value_equal)
1403 (value_pos): Remove lint code.
1405 2018-07-28 Tom de Vries <tdevries@suse.de>
1407 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1408 with undefined upper bound as <optimized out>.
1410 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1412 * gcore.in: Rename variable "name" to "prefix". Expand
1415 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1417 * windows-nat.c (windows_nat_target::create_inferior): Update to
1418 call close() in global namespace.
1420 2018-07-26 Tom Tromey <tom@tromey.com>
1422 * dwarf-index-write.c (add_address_entry): Don't add objfile
1424 * dbxread.c (find_stab_function): Rename from
1425 find_stab_function_addr. Return a bound_minimal_symbol.
1426 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1427 Don't add objfile offsets.
1428 (end_psymtab): Use raw_text_low, raw_text_high,
1429 MSYMBOL_VALUE_RAW_ADDRESS.
1430 (read_ofile_symtab): Update.
1431 (process_one_symbol): Update.
1432 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1434 (dw2_relocate): Remove.
1435 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1437 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1439 (process_psymtab_comp_unit_reader, add_partial_symbol)
1440 (add_partial_subprogram, dwarf2_ranges_read): Update.
1441 (load_partial_dies): Update.
1442 (add_address_entry): Don't add objfile offsets.
1443 (dwarf2_build_include_psymtabs): Update.
1444 (create_addrmap_from_aranges): Don't add objfile offsets.
1445 (dw2_find_pc_sect_compunit_symtab): Update.
1446 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1447 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1449 (parse_partial_symbols): Don't add objfile offsets. Use
1450 raw_text_low, raw_text_high. Update.
1451 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1452 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1453 or call 'relocate' quick function. Clear psymbol_map.
1454 * psympriv.h (struct partial_symbol) <address>: Add section
1456 <set_unrelocated_address>: Rename from set_address.
1457 <raw_text_low, raw_text_high>: New methods.
1458 <text_low, text_high>: Add objfile parameter.
1459 (add_psymbol_to_bcache): Add 'section' parameter. Call
1460 set_unrelocated_address.
1461 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1462 (find_pc_psymbol): Update.
1463 (fixup_psymbol_section, relocate_psymtabs): Remove.
1464 (dump_psymtab, psym_functions): Update.
1465 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1467 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1468 (start_psymtab_common): Update.
1469 * symfile-debug.c (debug_qf_relocate): Remove.
1470 (debug_sym_quick_functions): Update.
1471 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1472 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1475 2018-07-26 Tom Tromey <tromey@redhat.com>
1477 * dbxread.c (end_psymtab): Use text_high_valid and
1479 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1480 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1481 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1483 <text_low_valid, text_high_valid>: New fields.
1484 <set_text_low, set_text_high>: Update.
1485 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1487 2018-07-26 Tom Tromey <tom@tromey.com>
1489 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1491 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1492 textlow and texthigh fields.
1493 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1495 * mdebugread.c (parse_lines, parse_partial_symbols)
1496 (psymtab_to_symtab_1): Update.
1497 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1498 Rename fields. Update comment. Now private.
1499 <text_low, text_high, set_text_low, set_text_high>: New methods.
1500 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1501 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1502 (start_psymtab_common, maintenance_info_psymtabs)
1503 (maintenance_check_psymtabs): Update.
1504 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1506 (scan_xcoff_symtab): Update.
1508 2018-07-26 Tom Tromey <tromey@redhat.com>
1510 * psympriv.h (struct partial_symbol) <unrelocated_address,
1511 address, set_address>: New methods.
1512 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1513 (fixup_psymbol_section, relocate_psymtabs): Update.
1514 (print_partial_symbols): Add 'objfile' parameter. Update.
1515 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1518 2018-07-26 Tom Tromey <tom@tromey.com>
1520 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1521 (debug_names::write_psymbols): Update.
1522 * psympriv.h (struct partial_symbol): Derive from
1523 general_symbol_info.
1524 <obj_section>: New method.
1525 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1526 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1527 (find_pc_sect_psymbol, fixup_psymbol_section)
1528 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1529 (print_partial_symbols, recursively_search_psymtabs)
1530 (compare_psymbols, psymbol_hash, psymbol_compare)
1531 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1532 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1534 2018-07-26 Tom Tromey <tromey@redhat.com>
1536 * dbxread.c (end_psymtab): Remove dead code.
1538 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1540 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1541 DWARF unwinders are disabled.
1542 * dwarf2-frame.c: Add dwarf2read.h include.
1543 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1545 (dwarf2_frame_unwinders_enabled_p): Define.
1546 (show_dwarf_unwinders_enabled_p): New function.
1547 (_initialize_dwarf2_frame): Register switch to control DWARF
1549 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1550 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1551 (show_dwarf_cmdlist): Remove static keyword.
1552 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1553 (show_dwarf_cmdlist): Declare.
1554 * NEWS: Document new feature.
1556 2018-07-26 Tom de Vries <tdevries@suse.de>
1558 PR breakpoints/23366
1559 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1561 2018-07-26 Tom de Vries <tdevries@suse.de>
1563 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1564 DW_AT_count can't be translated to a dynamic prop.
1566 2018-07-25 Tom de Vries <tdevries@suse.de>
1568 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1571 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1573 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1575 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1577 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1579 2018-07-24 Keith Seitz <keiths@redhat.comt
1582 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1583 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1584 instead of add_symbol_to_list.
1585 (read_file_scope): Call prepare_one_comp_unit before reading
1588 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1590 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1592 2018-07-24 Tom Tromey <tom@tromey.com>
1594 * utils.c (malloc, realloc, free): Don't declare.
1595 * configure, config.in: Rebuild.
1596 * configure.ac: Don't check for declarations of free, malloc, or
1599 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1601 * aarch64-linux-nat.c
1602 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1604 * arm-linux-nat.c (fetch_regs): Likewise.
1605 (store_regs): Likewise.
1606 (fetch_vfp_regs): Likewise.
1607 (store_vfp_regs): Likewise.
1608 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1609 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1610 (arm_linux_nat_target::insert_watchpoint): Likewise.
1611 (arm_linux_nat_target::remove_watchpoint): Likewise.
1612 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1614 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1616 * ppc-linux-nat.c (fetch_register): Likewise.
1617 (fetch_all_gp_regs): Likewise.
1618 (fetch_ppc_registers): Likewise.
1619 (store_all_gp_regs): Likewise.
1620 (store_ppc_registers): Likewise.
1621 (hwdebug_insert_point): Likewise.
1622 (can_use_watchpoint_cond_accel): Likewise.
1623 * remote-sim.c (gdb_os_write_stdout): Likewise.
1625 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1626 Tom Tromey <tom@tromey.com>
1628 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1630 * configure: Rebuild.
1632 2018-07-22 Tom Tromey <tom@tromey.com>
1634 * regformats/regdat.sh: Define xmltarget_${name} inside
1635 #ifndef IN_PROCESS_AGENT.
1637 2018-07-22 Tom Tromey <tom@tromey.com>
1639 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1641 2018-07-22 Tom Tromey <tom@tromey.com>
1643 * symfile.c (reread_symbols): Notify iter, not objfile.
1645 2018-07-22 Tom Tromey <tom@tromey.com>
1647 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1649 (ravenscar_thread_target::prepare_to_store): Likewise.
1651 2018-07-22 Tom Tromey <tom@tromey.com>
1653 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1654 unused variable. Call value_fetch_lazy when needed.
1655 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1656 Remove unused variable. Call value_fetch_lazy when needed.
1658 2018-07-22 Tom Tromey <tom@tromey.com>
1660 * m32c-tdep.c (mark_dma): Return void.
1661 (make_regs): Remove unused declarations.
1663 2018-07-22 Tom Tromey <tom@tromey.com>
1665 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1666 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1667 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1668 bkscm_get_valid_block_smob_arg_unsafe for effect.
1670 2018-07-22 Tom Tromey <tom@tromey.com>
1672 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1675 2018-07-22 Tom Tromey <tom@tromey.com>
1677 * windows-nat.c (saved_context): Conditionally define.
1678 * remote.c (remote_target::remote_btrace_maybe_reopen):
1679 Conditionally declare "warned".
1680 * inflow.c (sigquit_ours): Conditionally define.
1681 (new_tty): Move "tty" declaration inside #if.
1682 * guile/guile.c (guile_datadir): Conditionally define.
1683 * charset.c (set_be_le_names): Move some declarations inside #if.
1684 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1686 (parse_xml_btrace_conf): Likewise.
1688 2018-07-22 Tom Tromey <tom@tromey.com>
1690 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1692 2018-07-22 Tom Tromey <tom@tromey.com>
1694 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1695 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1696 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1697 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1698 * stack.c (frame_apply_level_command): Remove unused variable.
1699 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1700 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1701 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1703 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1704 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1705 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1707 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1708 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1710 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1711 Remove unused variable.
1712 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1714 * common/tdesc.c (print_xml_feature::visit): Remove unused
1716 * compile/compile-object-load.c (store_regs): Remove unused
1718 * complaints.c (clear_complaints): Remove unused variable.
1719 * corelow.c (core_target_open): Remove unused variable.
1720 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1722 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1724 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1726 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1728 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1730 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1732 * ia64-tdep.c (examine_prologue): Remove unused variable.
1733 * infcall.c (run_inferior_call): Remove unused variable.
1734 * inferior.c (exit_inferior): Remove unused variable.
1735 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1736 * linespec.c (decode_line_2): Remove unused variable.
1737 * linux-nat.c (super_close): Remove.
1738 * linux-tdep.c (linux_info_proc): Remove unused variable.
1739 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1740 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1741 Remove unused variable.
1742 * parse.c (find_minsym_type_and_address): Remove unused variable.
1743 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1745 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1747 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1749 * record-btrace.c (record_btrace_target::store_registers): Remove
1751 (cmd_show_record_btrace_cpu): Remove unused variable.
1752 * riscv-tdep.c (riscv_register_reggroup_p)
1753 (riscv_push_dummy_call, riscv_return_value): Remove unused
1755 * rust-exp.y (literal): Remove unused variable.
1756 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1758 <STRUCTOP_ANONYMOUS>: Likewise.
1759 * s390-linux-tdep.c (s390_linux_init_abi_31)
1760 (s390_linux_init_abi_64): Remove unused variable.
1761 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1762 (file_select_thread, net_windows_open, _initialize_ser_windows):
1763 Remove unused variables.
1764 * symtab.c (find_pc_sect_line): Remove unused variable.
1765 * target-memory.c (compute_garbled_blocks): Remove unused
1767 (target_write_memory_blocks): Remove unused variable.
1768 * target.c (target_stack::unpush): Remove unused variables.
1769 * tracepoint.c (start_tracing, all_tracepoint_actions)
1770 (merge_uploaded_trace_state_variables)
1771 (print_one_static_tracepoint_marker): Remove unused variable.
1772 * unittests/basic_string_view/element_access/char/1.cc (test01):
1773 Remove unused variable.
1774 * windows-nat.c (windows_continue, windows_add_all_dlls)
1775 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1776 Remove unused variables.
1778 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1780 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1781 attr_profile in HAVE_ELF.
1782 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1785 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1787 * frame.c (frame_register_unwind): Change parameter name.
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.h (frame_register_unwind): Likewise.
1793 (frame_unwind_register): Likewise.
1794 (frame_unwind_register_value): Likewise.
1795 (frame_unwind_register_signed): Likewise.
1796 (frame_unwind_register_unsigned): Likewise.
1797 (frame_unwind_arch): Likewise.
1799 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1801 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1804 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1806 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1807 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1810 2018-07-20 Keith Seitz <keiths@redhat.com>
1812 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1813 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1814 m_compunit_symtab, m_language>: Add "m_" prefix.
1816 * buildsym.c: Update all uses.
1818 2018-07-20 Tom Tromey <tom@tromey.com>
1820 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1821 * buildsym.h (record_line_ftype): Remove typedef.
1823 2018-07-20 Tom Tromey <tom@tromey.com>
1825 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1826 (end_expandable_symtab): Likewise.
1827 (end_symtab_get_static_block): Likewise.
1828 (end_symtab_from_static_block): Likewise.
1829 * buildsym-legacy.c (augment_type_symtab): Remove.
1830 (end_expandable_symtab): Remove.
1831 (end_symtab_get_static_block): Remove.
1832 (end_symtab_from_static_block): Remove.
1834 2018-07-20 Tom Tromey <tom@tromey.com>
1836 * dwarf2read.c: Include buildsym.h.
1837 (struct dwarf2_cu) <builder>: New method.
1838 (fixup_go_packaging): Update.
1839 (process_full_comp_unit, process_full_type_unit): Update. Don't
1840 use scoped_free_pendings.
1841 (using_directives): Add "cu" parameter, remove "language".
1842 (read_import_statement, setup_type_unit_groups, )
1843 (read_func_scope, read_lexical_block_scope)
1844 (dwarf2_record_block_ranges, read_namespace): Update.
1845 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1846 (lnp_state_machine::handle_end_sequence): Update.
1847 (class lnp_state_machine) <m_cu>: New member.
1848 <m_record_line_callback>: Remove.
1849 <m_currently_recording_lines>: New member.
1850 (lnp_state_machine::handle_set_file): Update.
1851 (noop_record_line): Remove.
1852 (dwarf_record_line_p): Add cu parameter.
1853 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1854 (lnp_state_machine::record_line)
1855 (lnp_state_machine::lnp_state_machine)
1856 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1857 (dwarf_decode_lines): Update.
1858 (dwarf2_start_subfile): Add cu parameter.
1859 (dwarf2_start_symtab, new_symbol): Update.
1860 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1861 Remove dwarf2_per_objfile parameter.
1862 (dwarf_decode_macros): Update.
1864 2018-07-20 Tom Tromey <tom@tromey.com>
1866 * stabsread.c (define_symbol): Update.
1867 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1868 * dwarf2read.c (new_symbol): Update.
1869 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1870 * cp-namespace.c: Include buildsym.h.
1871 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1872 * buildsym-legacy.c (get_buildsym_compunit): New function.
1874 2018-07-20 Tom Tromey <tom@tromey.com>
1876 * xcoffread.c: Include buildsym-legacy.h.
1877 * windows-nat.c: Include buildsym-legacy.h.
1878 * stabsread.c: Include buildsym-legacy.h.
1879 * mdebugread.c: Include buildsym-legacy.h.
1880 * buildsym-legacy.h: New file.
1881 * buildsym-legacy.c: New file, from buildsym.c.
1882 * go32-nat.c: Include buildsym-legacy.h.
1883 * dwarf2read.c: Include buildsym-legacy.h.
1884 * dbxread.c: Include buildsym-legacy.h.
1885 * cp-namespace.c: Include buildsym-legacy.h.
1886 * coffread.c: Include buildsym-legacy.h.
1887 * buildsym.h: Move some contents to buildsym-legacy.h.
1888 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1890 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1892 2018-07-20 Tom Tromey <tom@tromey.com>
1894 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1895 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1896 (buildsym_compunit::buildsym_compunit)
1897 (buildsym_compunit::~buildsym_compunit)
1898 (buildsym_compunit::get_macro_table): Define.
1900 2018-07-20 Tom Tromey <tom@tromey.com>
1902 * buildsym.c (reset_symtab_globals): Remove.
1903 (buildsym_compunit::end_symtab_from_static_block): Update.
1904 (buildsym_compunit::augment_type_symtab): Update.
1905 (end_symtab_from_static_block): Call free_buildsym_compunit.
1906 (augment_type_symtab, end_symtab, end_expandable_symtab):
1909 2018-07-20 Tom Tromey <tom@tromey.com>
1911 * arch-utils.c: Do not include buildsym.h.
1912 * mipsread.c: Do not include buildsym.h.
1913 * machoread.c: Do not include buildsym.h.
1914 * elfread.c: Do not include buildsym.h.
1916 2018-07-20 Tom Tromey <tom@tromey.com>
1918 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1920 (buildsym_compunit): Add new constructor.
1921 (struct buildsym_compunit) <get_last_source_file, finish_block,
1922 record_block_range, start_subfile, patch_subfile_names,
1923 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1924 set_last_source_start_addr, get_last_source_start_addr,
1925 get_local_using_directives, set_local_using_directives,
1926 get_global_using_directives, outermost_context_p,
1927 get_current_context_stack, get_context_stack_depth,
1928 get_current_subfile, get_local_symbols, get_file_symbols,
1929 get_global_symbols, record_debugformat, record_producer,
1930 push_context, pop_context, end_symtab_get_static_block,
1931 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1933 <record_pending_block, finish_block_internal, make_blockvector,
1934 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1938 2018-05-22 Tom Tromey <tom@tromey.com>
1940 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1942 (finish_block_internal): Update.
1944 2018-07-20 Tom Tromey <tom@tromey.com>
1946 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1948 (finish_block_internal): Update.
1950 2018-07-20 Tom Tromey <tom@tromey.com>
1952 * buildsym.h (EXTERN): Don't define or undef.
1953 * buildsym.c (EXTERN): Don't define.
1955 2018-07-20 Tom Tromey <tom@tromey.com>
1957 * buildsym.c: Remove TODO comment.
1959 2018-07-20 Tom Tromey <tom@tromey.com>
1961 * coffread.c (coff_symtab_read): Update.
1962 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1963 (xcoff_new_init): Update.
1964 * mipsread.c (mipscoff_new_init): Update.
1965 * mdebugread.c (mdebug_build_psymtabs): Update.
1966 * elfread.c (elf_new_init): Update.
1967 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1969 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1970 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1971 (stabsect_build_psymtabs): Update.
1972 * buildsym.h (buildsym_init): Don't declare.
1973 * buildsym.c: Update comment.
1974 (prepare_for_building): Remove.
1975 (start_symtab, restart_symtab): Update.
1976 (reset_symtab_globals): Update comment.
1977 (buildsym_init): Remove.
1979 2018-07-20 Tom Tromey <tom@tromey.com>
1981 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1982 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1983 (read_enum_type, common_block_start, common_block_end)
1984 (cleanup_undefined_types_1, finish_global_stabs): Update.
1985 * mdebugread.c (psymtab_to_symtab_1): Update.
1986 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1987 (read_lexical_block_scope, new_symbol): Update.
1988 * dbxread.c (process_one_symbol): Update.
1989 * coffread.c (coff_symtab_read, process_coff_symbol)
1990 (coff_read_enum_type): Update.
1991 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1993 (get_local_symbols, get_file_symbols, get_global_symbols): New
1995 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1997 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1998 (~scoped_free_pendings): Update.
1999 (finish_block, prepare_for_building, reset_symtab_globals)
2000 (end_symtab_get_static_block, end_symtab_with_blockvector)
2001 (augment_type_symtab, push_context): Update.
2002 (get_local_symbols, get_file_symbols, get_global_symbols): New
2004 (buildsym_init): Update.
2006 2018-07-20 Tom Tromey <tom@tromey.com>
2008 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2009 (process_full_type_unit): Likewise.
2010 (dwarf2_start_symtab): Set list_in_scope.
2012 2018-07-20 Tom Tromey <tom@tromey.com>
2014 * dwarf2read.c (process_psymtab_comp_unit_reader)
2015 (build_type_psymtabs_reader): Do not set list_in_scope.
2017 2018-07-20 Tom Tromey <tom@tromey.com>
2019 * buildsym.c (free_pendings): Remove.
2020 (add_symbol_to_list, scoped_free_pendings)
2021 (finish_block_internal, buildsym_init): Update.
2023 2018-07-20 Tom Tromey <tom@tromey.com>
2025 * xcoffread.c (read_xcoff_symtab): Update.
2026 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2028 * dbxread.c (process_one_symbol): Update.
2029 * coffread.c (coff_symtab_read): Update.
2030 * buildsym.h (finish_block): Update.
2031 * buildsym.c (finish_block): Remove "listhead" argument.
2032 (end_symtab_get_static_block): Update.
2034 2018-07-20 Tom Tromey <tom@tromey.com>
2036 * buildsym.h (class scoped_free_pendings): Remove constructor.
2037 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2039 <m_pending_block_obstack, m_pending_blocks>: New members.
2040 (pending_block_obstack, pending_blocks): Remove.
2041 (scoped_free_pendings::scoped_free_pendings): Default.
2042 (~scoped_free_pendings): Update.
2043 (free_pending_blocks): Remove.
2044 (finish_block_internal, record_pending_block, make_blockvector)
2045 (end_symtab_get_static_block, augment_type_symtab, push_context)
2046 (buildsym_init): Update.
2048 2018-07-20 Tom Tromey <tom@tromey.com>
2050 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2051 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2053 (pending_addrmap, pending_addrmap_obstack)
2054 (pending_addrmap_interesting): Remove.
2055 (scoped_free_pendings, record_block_range, make_blockvector)
2056 (prepare_for_building, reset_symtab_globals, buildsym_init):
2059 2018-07-20 Tom Tromey <tom@tromey.com>
2061 * xcoffread.c (process_linenos): Update.
2062 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2063 * mdebugread.c (psymtab_to_symtab_1): Update.
2064 * dwarf2read.c (setup_type_unit_groups)
2065 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2066 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2067 * dbxread.c (process_one_symbol): Update.
2068 * coffread.c (coff_symtab_read, enter_linenos)
2069 (process_coff_symbol): Update.
2070 * buildsym.h (current_subfile): Don't declare.
2071 (get_current_subfile): Declare.
2072 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2074 (start_subfile, free_buildsym_compunit, push_subfile)
2075 (prepare_for_building, start_symtab): Update.
2076 (get_current_subfile): New function.
2078 2018-07-20 Tom Tromey <tom@tromey.com>
2080 * coffread.c (coff_symtab_read): Update.
2081 * xcoffread.c (read_xcoff_symtab): Update.
2082 * dwarf2read.c (new_symbol): Update.
2083 (read_func_scope, read_lexical_block_scope): Update.
2084 * dbxread.c (process_one_symbol): Update.
2085 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2086 (outermost_context_p): Remove macro.
2087 (outermost_context_p, get_current_context_stack)
2088 (get_context_stack_depth): Declare.
2089 (pop_context): Return struct context_stack.
2090 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2092 (context_stack_size): Remove.
2093 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2094 (prepare_for_building, end_symtab_get_static_block)
2095 (augment_type_symtab, push_context): Update.
2096 (pop_context): Return struct context_stack.
2097 (outermost_context_p, get_current_context_stack)
2098 (get_context_stack_depth): New functions.
2099 (buildsym_init): Update.
2101 2018-07-20 Tom Tromey <tom@tromey.com>
2103 * rust-exp.y: Now a pure parser. Update all rules.
2104 (%union): Move earlier.
2105 (current_parser, work_obstack): Remove globals.
2106 (rust_parser, ~rust_parser): Update.
2107 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2108 lex_character, lex_number, lex_string, lex_identifier,
2109 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2110 convert_name, convert_params_to_expression,
2111 convert_ast_to_expression, ast_basic_type, ast_operation,
2112 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2113 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2114 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2115 ast_array_type, ast_slice_type, ast_reference_type,
2116 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2117 (rust_parse): Update.
2118 (rustyyerror, rustyylex): Add parser parameter.
2119 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2120 (rust_lex_stringish_test, rust_lex_test_sequence)
2121 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2122 (rust_lex_test_push_back, rust_lex_tests): Update.
2124 2018-07-19 Pedro Alves <palves@redhat.com>
2126 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2127 gdb::unique_xmalloc_ptr.
2128 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2129 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2130 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2131 copy-initialization.
2132 * guile/scm-pretty-print.c (ppscm_print_children): Use
2133 gdb::unique_xmalloc_ptr instead of cleanups.
2134 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2135 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2136 gdb::unique_xmalloc_ptr.
2137 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2138 Adjust to use gdb::unique_xmalloc_ptr.
2139 * guile/scm-utils.c (extract_arg): Adjust.
2140 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2141 gdb::unique_xmalloc_ptr instead of a cleanup.
2143 2018-07-19 Tom Tromey <tom@tromey.com>
2145 * utils.c (do_value_free_to_mark)
2146 (make_cleanup_value_free_to_mark): Remove.
2147 * utils.h (make_cleanup_value_free_to_mark): Remove.
2149 2018-07-19 Pedro Alves <palves@redhat.com>
2151 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2152 forwarding reference.
2154 2018-07-18 Pedro Alves <palves@redhat.com>
2156 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2157 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2160 2018-07-18 Pedro Alves <palves@redhat.com>
2162 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2164 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2166 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2167 directly instead of a cleanup.
2168 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2169 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2170 (vlscm_binop_gdbthrow): New, factored out from ...
2171 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2172 (vlscm_rich_compare): Use gdbscm_wrap.
2173 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2174 instead of a cleanup.
2175 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2177 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2178 Use xfree directly instead of a cleanup.
2179 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2180 Adjust to use gdbscm_wrap and scoped_value_mark.
2181 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2182 (gdbscm_value_address, gdbscm_value_dereference)
2183 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2185 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2186 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2188 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2189 gdbscm_wrap and scoped_value_mark.
2190 (gdbscm_value_to_string): Use xfree directly instead of a
2191 cleanup. Move 'buffer' unique_ptr to TRY scope.
2192 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2193 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2195 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2196 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2198 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2201 2018-07-18 Tom de Vries <tdevries@suse.de>
2203 * findvar.c (default_read_var_value): Also resolve dynamic type for
2204 LOC_OPTIMIZED_OUT vars.
2206 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2208 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2211 2018-07-17 Tom Tromey <tom@tromey.com>
2213 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2214 (compute_enum_list, pascm_set_param_value_x)
2215 (gdbscm_parameter_value): Update.
2216 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2217 (gdbscm_scm_to_host_string): Update.
2218 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2220 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2221 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2222 * guile/scm-string.c (gdbscm_scm_to_string): Return
2224 (gdbscm_scm_to_host_string): Likewise.
2226 2018-07-17 Tom Tromey <tom@tromey.com>
2228 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2229 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2230 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2231 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2234 2018-07-17 Tom Tromey <tom@tromey.com>
2236 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2237 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2239 * guile/scm-cmd.c (cmdscm_function): Update.
2240 * guile/scm-pretty-print.c
2241 (ppscm_print_exception_unless_memory_error): Update.
2242 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2243 Return unique_xmalloc_ptr.
2245 2018-07-17 Tom Tromey <tom@tromey.com>
2247 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2250 2018-07-17 Jim Wilson <jimw@sifive.com>
2252 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2253 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2254 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2255 unecessary braces after EF_RISCV_RVC test. Delete call to
2256 set_gdbarch_decr_pc_after_break.
2258 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2259 RISCV_LAST_FP_REGNUM + 1.
2260 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2262 2018-07-17 Tom Tromey <tom@tromey.com>
2264 * configure.ac: Remove --disable-gdbcli.
2265 * configure: Rebuild.
2266 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2267 (SUBDIR_CLI_CFLAGS): Remove.
2268 (SFILES): Use SUBDIR_CLI_SRCS.
2269 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2271 2018-07-17 Tom Tromey <tom@tromey.com>
2274 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2276 2018-07-16 Jim Wilson <jimw@sifive.com>
2278 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2280 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2282 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2284 (libunwind_frame_sniffer): Likewise.
2285 (libunwind_frame_prev_register): Likewise.
2286 (libunwind_sigtramp_frame_sniffer): Likewise.
2287 * ia64-tdep.c (ia64_access_reg): Likewise.
2288 (ia64_access_rse_reg): Likewise.
2289 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2290 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2292 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2294 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2296 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2298 * remote-sim.c (gdbsim_target::close,
2299 gdbsim_target::mourn_inferior): Remove unused variables.
2301 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2303 * ia64-tdep.c (ktab_buf): New global.
2304 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2305 (get_kernel_table): Adjust.
2307 2018-07-16 Tom Tromey <tom@tromey.com>
2309 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2310 * dwarf2read.c (using_directives, new_symbol): Use
2311 outermost_context_p.
2312 * dbxread.c (process_one_symbol): Use outermost_context_p.
2313 * coffread.c (coff_symtab_read): Use outermost_context_p.
2315 2018-07-16 Tom Tromey <tom@tromey.com>
2317 * dwarf2read.c (using_directives, read_func_scope)
2318 (read_lexical_block_scope): Update.
2319 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2320 * buildsym.h (local_using_directives, global_using_directives):
2322 (get_local_using_directives, set_local_using_directives)
2323 (get_global_using_directives): Declare.
2324 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2325 m_global_using_directives>: New members.
2326 (finish_block_internal, prepare_for_building)
2327 (reset_symtab_globals, end_symtab_get_static_block)
2328 (push_context): Update.
2329 (get_local_using_directives, set_local_using_directives)
2330 (get_global_using_directives): New functions.
2331 (buildsym_init): Update.
2333 2018-07-16 Tom Tromey <tom@tromey.com>
2335 * xcoffread.c (xcoff_initial_scan): Don't call
2336 free_pending_blocks.
2337 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2338 * buildsym.h (class scoped_free_pendings): Add constructor.
2339 (free_pending_blocks): Don't declare.
2340 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2341 (free_pending_blocks): Now static.
2343 2018-07-16 Tom Tromey <tom@tromey.com>
2345 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2346 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2348 (struct subfile_stack): Remove.
2349 (subfile_stack): Remove.
2350 (push_subfile, pop_subfile, buildsym_init): Update.
2352 2018-07-16 Tom Tromey <tom@tromey.com>
2354 * buildsym.c (push_subfile): Use gdb_assert.
2355 (pop_subfile): Use gdb_assert.
2357 2018-07-16 Tom Tromey <tom@tromey.com>
2359 * buildsym.h (merge_symbol_lists): Remove.
2360 * buildsym.c (merge_symbol_lists): Remove.
2362 2018-07-16 Tom Tromey <tom@tromey.com>
2364 * stabsread.c (scan_file_globals): Update comment.
2365 * stabsread.h (scan_file_globals): Move from buildsym.h.
2366 * buildsym.h (scan_file_globals): Move to stabsread.h.
2368 2018-07-16 Tom Tromey <tom@tromey.com>
2370 * xcoffread.c (xcoff_new_init): Update.
2371 * mipsread.c (mipscoff_new_init): Update.
2372 * mdebugread.c (mdebug_build_psymtabs): Update.
2373 * elfread.c (elf_new_init): Update.
2374 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2375 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2376 * buildsym.h (buildsym_new_init): Don't declare.
2377 * buildsym.c (buildsym_new_init): Remove.
2379 2018-07-16 Tom Tromey <tom@tromey.com>
2381 * stabsread.h (within_function): Move from buildsym.h.
2382 * stabsread.c (start_stabs): Clear within_function.
2383 * coffread.c (coff_start_symtab): Clear within_function.
2384 * buildsym.h (within_function): Move to stabsread.h.
2385 * buildsym.c (prepare_for_building): Update.
2387 2018-07-16 Tom Tromey <tom@tromey.com>
2389 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2390 * dwarf2read.c (dwarf2_start_symtab): Don't set
2391 processing_gcc_compilation.
2392 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2394 2018-07-16 Tom Tromey <tom@tromey.com>
2396 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2397 (next_symbol_text_func): Move from buildsym.h.
2398 * stabsread.c (hashname): Move from buildsym.c.
2399 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2400 (next_symbol_text_func, hashname): Move to stabsread.h.
2401 * buildsym.c: Don't include bcache.h
2402 (hashname): Move to stasbread.c.
2404 2018-07-16 Tom Tromey <tom@tromey.com>
2406 * buildsym.h (context_stack_size): Don't declare.
2407 * buildsym.c (context_stack_size): New global.
2409 2018-07-16 Tom Tromey <tom@tromey.com>
2411 * dbxread.c (processing_acc_compilation): New global.
2412 * buildsym.h (processing_acc_compilation): Don't declare.
2414 2018-07-16 Tom Tromey <tom@tromey.com>
2416 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2417 * dbxread.c (read_ofile_symtab): Update.
2418 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2419 * buildsym.h (last_source_start_addr): Remove.
2420 (set_last_source_start_addr, get_last_source_start_addr):
2422 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2424 (struct buildsym_compunit) <m_last_source_start_addr>: New
2426 (prepare_for_building): Remove start_addr parameter.
2427 (start_symtab, restart_symtab, end_symtab_get_static_block)
2428 (end_symtab_with_blockvector): Update.
2429 (set_last_source_start_addr, get_last_source_start_addr): New
2432 2018-07-16 Tom Tromey <tom@tromey.com>
2434 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2436 (have_line_numbers): Remove.
2437 (record_line, prepare_for_building, end_symtab_get_static_block)
2438 (augment_type_symtab): Update.
2440 2018-07-16 Tom Tromey <tom@tromey.com>
2442 * buildsym.c (~buildsym_compunit): Free the macro table.
2443 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2445 <m_pending_macros>: New member.
2446 (pending_macros): Remove.
2447 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2448 (reset_symtab_globals, end_symtab_get_static_block)
2449 (end_symtab_with_blockvector, augment_type_symtab)
2450 (buildsym_init): Update.
2452 2018-07-16 Tom Tromey <tom@tromey.com>
2454 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2456 (buildsym_compunit::set_last_source_file): New method.
2457 <m_last_source_file>: New member.
2458 (prepare_for_building): Remove "name" parameter.
2459 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2460 (last_source_file): Remove.
2461 (set_last_source_file, get_last_source_file): Update.
2463 2018-07-16 Tom Tromey <tom@tromey.com>
2465 * buildsym.c (prepare_for_building): Add assert.
2467 2018-07-16 Tom Tromey <tom@tromey.com>
2469 * buildsym.c (~buildsym_compunit): Update.
2470 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2471 (start_subfile, patch_subfile_names)
2472 (end_symtab_with_blockvector): Update.
2474 2018-07-16 Tom Tromey <tom@tromey.com>
2476 * buildsym.c (struct buildsym_compunit): Add constructor,
2477 destructor, initializers.
2478 (start_buildsym_compunit): Remove.
2479 (free_buildsym_compunit): Use "delete".
2480 (start_symtab, restart_symtab): Use "new".
2482 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2484 * symfile.c (set_objfile_default_section_offset): Remove struct
2487 2018-07-14 Stafford Horne <shorne@gmail.com>
2489 * (Responsible Maintainers): Add myself as or1k maintainer.
2491 2018-07-13 Tom Tromey <tom@tromey.com>
2493 * symfile.c (set_objfile_default_section_offset): Use extra braces
2496 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2498 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2501 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2503 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2504 unittests/cli-utils-selftests.c
2505 * unittests/cli-utils-selftests.c: New file.
2507 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2509 * NEWS: Mention new commands. Mention change to 'thread apply'.
2511 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2513 * thread.c (thr_try_catch_cmd): New function.
2514 (thread_apply_all_command): Handle qcs flags.
2515 (thread_apply_command): Handle qcs flags.
2516 (taas_command): New function.
2517 (tfaas_command): New function.
2518 (_initialize_thread): Update to setup the new commands 'taas
2519 and 'tfaas'. Change doc string for 'thread apply'.
2521 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2523 * stack.c: (trailing_outermost_frame): New function, mostly
2524 extracted from backtrace_command_1.
2525 (leading_innermost_frame): New function.
2526 (backtrace_command_1): Update to call trailing_outermost_frame.
2527 (frame_apply_command_count): New function.
2528 (frame_apply_level_command): New function.
2529 (frame_apply_all_command): New function.
2530 (frame_apply_command): New function.
2531 (faas_command): New function.
2532 (frame_cmd_list): New variable.
2533 (_initialize_stack): Update to setup the new commands 'frame apply'
2536 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2538 * cli-utils.c (number_or_range_parser::get_number): Only handle
2539 numbers or convenience var as numbers.
2540 (parse_flags): New function.
2541 (parse_flags_qcs): New function.
2542 (number_or_range_parser::finished): Ensure parsing end is detected
2543 before end of string.
2544 * cli-utils.h (parse_flags): New function.
2545 (parse_flags_qcs): New function.
2546 (number_or_range_parser): Remove m_finished bool.
2547 (number_or_range_parser::skip_range): Set m_in_range to false.
2549 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2551 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2554 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2555 Jan Kratochvil <jan.kratochvil@redhat.com>
2556 Paul Fertser <fercerpav@gmail.com>
2557 Tsutomu Seki <sekiriki@gmail.com>
2558 Pedro Alves <palves@redhat.com>
2560 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2561 'unittests/parse-connection-spec-selftests.c'.
2562 (COMMON_SFILES): Add 'common/netstuff.c'.
2563 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2564 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2565 * common/netstuff.c: New file.
2566 * common/netstuff.h: New file.
2567 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2568 (wait_for_connect): Update comment. New parameter
2569 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2570 Use 'sock' directly instead of 'scb->fd'.
2571 (try_connect): New function, with code from 'net_open'.
2572 (net_open): Rewrite main loop to deal with multiple
2573 sockets/addresses. Handle IPv6-style hostnames; implement
2574 support for IPv6 connections.
2575 * unittests/parse-connection-spec-selftests.c: New file.
2577 2018-07-11 Pedro Alves <palves@redhat.com>
2580 * remote.c (remote_target::remote_detach_pid): Call
2581 set_current_process.
2583 2018-07-11 Pedro Alves <palves@redhat.com>
2585 * h8300-tdep.c (h8300_gdbarch_init): Remove
2586 set_gdbarch_ecoff_reg_to_regnum calls.
2588 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2591 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2592 offsets/sizes for static members of a class/struct.
2594 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2596 * target-descriptions.c (tdesc_register_bitsize): Rename.
2597 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2598 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2599 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2601 2018-07-10 Tom Tromey <tom@tromey.com>
2603 * breakpoint.c (moribund_locations): Now static and a
2605 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2606 (build_bpstat_chain, update_global_location_list)
2607 (breakpoint_retire_moribund): Update.
2608 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2611 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2613 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2614 (riscv_register_reggroup_p): Use new function, remove unneeded
2616 (riscv_push_dummy_call): Extend assert to compare against xlen or
2617 flen based on register type.
2619 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2621 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2623 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2625 * remote.c (show_hardware_watchpoint_limit): New function.
2626 (show_hardware_watchpoint_length_limit): New function.
2627 (show_hardware_breakpoint_limit): New function.
2628 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2629 where appropriate, update help text.
2631 2018-07-09 Tom Tromey <tom@tromey.com>
2633 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2634 (CLIBS): Don't mention NAT_CLIBS.
2636 2018-07-09 Tom Tromey <tom@tromey.com>
2638 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2639 (LIBGDB_OBS, clean mostlyclean): Update.
2640 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2642 2018-07-09 Tom Tromey <tom@tromey.com>
2644 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2645 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2646 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2648 2018-07-09 Tom Tromey <tom@tromey.com>
2650 * Makefile.in (ALLDEPFILES): Remove exec.c.
2651 (COMMON_OBS): Remove exec.o.
2652 (COMMON_SFILES): Add exec.c.
2654 2018-07-09 Tom Tromey <tom@tromey.com>
2656 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2658 2018-07-09 Tom Tromey <tom@tromey.com>
2660 * Makefile.in (clean mostlyclean): Remove stamp-version.
2661 (version.c): Depend on stamp-version.
2662 (stamp-version): New rule, from version.c rule.
2664 2018-07-09 Tom Tromey <tom@tromey.com>
2666 * Makefile.in (init.c): Depend on stamp-init.
2667 (stamp-init): New rule, from init.c rule.
2668 (clean mostlyclean): Remove stamp-init.
2670 2018-07-09 Tom Tromey <tom@tromey.com>
2672 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2673 SUBDIR_GCC_COMPILE_SRCS.
2675 2018-07-09 Tom Tromey <tom@tromey.com>
2677 * Makefile.in (init.c): Remove some unused sed rules.
2679 2018-07-09 Tom Tromey <tom@tromey.com>
2681 * Makefile.in (TSOBS): Remove.
2682 (INIT_FILES): Update.
2683 (LIBGDB_OBS): Update.
2684 (COMMON_SFILES): Add inflow.c.
2685 (SFILES): Remove inflow.c.
2687 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2689 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2691 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2693 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2694 get_saveloc_name, is_signal_frame_name, step_name,
2695 init_remote_name, create_addr_space_name,
2696 destroy_addr_space_name, search_unwind_table_name,
2697 find_dyn_list_name): Constify.
2699 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2701 * darwin-nat.c (darwin_pthread_kill): New function.
2702 (darwin_resume_thread): Use darwin_pthread_kill.
2704 2018-07-05 Tom de Vries <tdevries@suse.de>
2706 * macroexp.c (macro_buffer) <operator=>: New member function.
2708 2018-07-04 Tom Tromey <tom@tromey.com>
2710 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2712 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2714 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2715 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2716 * maint.c: Likewise.
2719 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2721 * NEWS: Create a new section for the next release branch.
2722 Rename the section of the current branch, now that it has
2725 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2727 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2728 * version.in: Bump version to 8.2.50.DATE-git.
2730 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2731 Pedro Alves <palves@redhat.com>
2733 * linux-nat.c (linux_init_ptrace): Rename to ...
2734 (linux_init_ptrace_procfs): ... this. Call
2735 linux_proc_init_warnings.
2736 (linux_nat_target::post_attach)
2737 (linux_nat_target::post_startup_inferior): Adjust.
2738 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2739 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2741 2018-07-04 Tom de Vries <tdevries@suse.de>
2743 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2745 (read_comp_unit_head): ... here.
2747 2018-07-03 Tom Tromey <tom@tromey.com>
2749 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2750 (stop_tracing, tstatus_command)
2751 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2752 (print_one_static_tracepoint_marker): Update.
2753 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2755 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2757 (all_tracepoints, static_tracepoints_here): Return std::vector.
2759 2018-07-03 Tom Tromey <tom@tromey.com>
2761 * common/ptid.c (ptid_equal): Remove.
2762 * common/ptid.h (ptid_equal): Don't declare.
2763 * ada-tasks.c: Update.
2764 * breakpoint.c: Update.
2765 * common/agent.c: Update.
2766 * corelow.c: Update.
2767 * darwin-nat-info.c: Update.
2768 * darwin-nat.c: Update.
2770 * dtrace-probe.c: Update.
2771 * dummy-frame.c: Update.
2772 * fbsd-nat.c: Update.
2774 * gdbthread.h: Update.
2775 * gnu-nat.c: Update.
2776 * go32-nat.c: Update.
2777 * inf-loop.c: Update.
2778 * inf-ptrace.c: Update.
2779 * infcall.c: Update.
2783 * linux-fork.c: Update.
2784 * linux-nat.c: Update.
2785 * linux-thread-db.c: Update.
2786 * mi/mi-cmd-var.c: Update.
2787 * mi/mi-interp.c: Update.
2788 * mi/mi-main.c: Update.
2789 * nto-procfs.c: Update.
2790 * ppc-linux-tdep.c: Update.
2792 * python/py-inferior.c: Update.
2793 * python/py-record-btrace.c: Update.
2794 * python/py-record.c: Update.
2795 * ravenscar-thread.c: Update.
2796 * regcache.c: Update.
2797 * remote-sim.c: Update.
2799 * sol-thread.c: Update.
2802 * tui/tui-stack.c: Update.
2804 * windows-nat.c: Update.
2805 * windows-tdep.c: Update.
2807 2018-07-03 Tom Tromey <tom@tromey.com>
2809 * common/ptid.c (ptid_match): Remove.
2810 * common/ptid.h (ptid_match): Don't declare.
2811 * fbsd-nat.c: Update.
2814 * linux-nat.c: Update.
2815 * record-btrace.c: Update.
2816 * regcache.c: Update.
2819 2018-07-03 Tom Tromey <tom@tromey.com>
2821 * common/ptid.c (ptid_tid_p): Remove.
2822 * common/ptid.h (ptid_tid_p): Don't declare.
2823 * sol-thread.c: Update.
2825 2018-07-03 Tom Tromey <tom@tromey.com>
2827 * common/ptid.c (ptid_lwp_p): Remove.
2828 * common/ptid.h (ptid_lwp_p): Don't declare.
2829 * fbsd-nat.c: Update.
2830 * linux-nat.c: Update.
2831 * nat/linux-procfs.c: Update.
2832 * nat/x86-linux-dregs.c: Update.
2833 * sol-thread.c: Update.
2835 2018-07-03 Tom Tromey <tom@tromey.com>
2837 * common/ptid.c (ptid_is_pid): Remove.
2838 * common/ptid.h (ptid_is_pid): Don't declare.
2840 * linux-nat.c: Update.
2841 * mi/mi-interp.c: Update.
2845 2018-07-03 Tom Tromey <tom@tromey.com>
2847 * common/ptid.c (ptid_get_tid): Remove.
2848 * common/ptid.h (ptid_get_tid): Don't declare.
2849 * ada-tasks.c: Update.
2850 * aix-thread.c: Update.
2851 * bsd-uthread.c: Update.
2852 * darwin-nat.c: Update.
2853 * fbsd-nat.c: Update.
2854 * i386-darwin-nat.c: Update.
2856 * linux-tdep.c: Update.
2857 * nto-procfs.c: Update.
2858 * ppc-ravenscar-thread.c: Update.
2859 * python/py-infthread.c: Update.
2860 * ravenscar-thread.c: Update.
2861 * sol-thread.c: Update.
2862 * sparc-ravenscar-thread.c: Update.
2863 * windows-nat.c: Update.
2865 2018-07-03 Tom Tromey <tom@tromey.com>
2867 * common/ptid.c (ptid_get_lwp): Remove.
2868 * common/ptid.h (ptid_get_lwp): Don't declare.
2869 * aarch64-linux-nat.c: Update.
2870 * ada-tasks.c: Update.
2871 * aix-thread.c: Update.
2872 * amd64-linux-nat.c: Update.
2873 * arm-linux-nat.c: Update.
2874 * corelow.c: Update.
2875 * fbsd-nat.c: Update.
2876 * fbsd-tdep.c: Update.
2877 * gnu-nat.c: Update.
2878 * i386-cygwin-tdep.c: Update.
2879 * i386-gnu-nat.c: Update.
2880 * i386-linux-nat.c: Update.
2881 * ia64-linux-nat.c: Update.
2882 * inf-ptrace.c: Update.
2884 * linux-fork.c: Update.
2885 * linux-nat.c: Update.
2886 * linux-tdep.c: Update.
2887 * linux-thread-db.c: Update.
2888 * mips-linux-nat.c: Update.
2889 * nat/aarch64-linux-hw-point.c: Update.
2890 * nat/aarch64-linux.c: Update.
2891 * nat/linux-btrace.c: Update.
2892 * nat/linux-osdata.c: Update.
2893 * nat/linux-procfs.c: Update.
2894 * nat/x86-linux-dregs.c: Update.
2895 * obsd-nat.c: Update.
2896 * ppc-fbsd-nat.c: Update.
2897 * ppc-linux-nat.c: Update.
2899 * python/py-infthread.c: Update.
2900 * ravenscar-thread.c: Update.
2902 * s390-linux-nat.c: Update.
2903 * sol-thread.c: Update.
2904 * sol2-tdep.c: Update.
2905 * spu-linux-nat.c: Update.
2906 * x86-linux-nat.c: Update.
2907 * xtensa-linux-nat.c: Update.
2909 2018-07-03 Tom Tromey <tom@tromey.com>
2911 * common/ptid.c (ptid_get_pid): Remove.
2912 * common/ptid.h (ptid_get_pid): Don't declare.
2913 * aarch64-linux-nat.c: Update.
2914 * ada-lang.c: Update.
2915 * aix-thread.c: Update.
2916 * alpha-bsd-nat.c: Update.
2917 * amd64-fbsd-nat.c: Update.
2918 * amd64-linux-nat.c: Update.
2919 * arm-linux-nat.c: Update.
2920 * arm-nbsd-nat.c: Update.
2922 * break-catch-syscall.c: Update.
2923 * breakpoint.c: Update.
2924 * bsd-uthread.c: Update.
2925 * corelow.c: Update.
2927 * darwin-nat.c: Update.
2928 * fbsd-nat.c: Update.
2929 * fbsd-tdep.c: Update.
2931 * gnu-nat.c: Update.
2932 * hppa-nbsd-nat.c: Update.
2933 * hppa-obsd-nat.c: Update.
2934 * i386-fbsd-nat.c: Update.
2935 * ia64-linux-nat.c: Update.
2936 * inf-ptrace.c: Update.
2938 * inferior.c: Update.
2939 * inferior.h: Update.
2942 * linux-fork.c: Update.
2943 * linux-nat.c: Update.
2944 * linux-tdep.c: Update.
2945 * linux-thread-db.c: Update.
2946 * m68k-bsd-nat.c: Update.
2947 * mi/mi-interp.c: Update.
2948 * mi/mi-main.c: Update.
2949 * mips-linux-nat.c: Update.
2950 * mips-nbsd-nat.c: Update.
2951 * mips64-obsd-nat.c: Update.
2952 * nat/aarch64-linux-hw-point.c: Update.
2953 * nat/aarch64-linux.c: Update.
2954 * nat/linux-btrace.c: Update.
2955 * nat/linux-osdata.c: Update.
2956 * nat/linux-procfs.c: Update.
2957 * nat/x86-linux-dregs.c: Update.
2958 * nto-procfs.c: Update.
2959 * obsd-nat.c: Update.
2960 * ppc-linux-nat.c: Update.
2961 * ppc-nbsd-nat.c: Update.
2962 * ppc-obsd-nat.c: Update.
2963 * proc-service.c: Update.
2965 * python/py-inferior.c: Update.
2966 * python/py-infthread.c: Update.
2967 * ravenscar-thread.c: Update.
2969 * remote-sim.c: Update.
2971 * rs6000-nat.c: Update.
2972 * s390-linux-nat.c: Update.
2973 * sh-nbsd-nat.c: Update.
2974 * sol-thread.c: Update.
2975 * sparc-nat.c: Update.
2976 * sparc64-tdep.c: Update.
2977 * spu-linux-nat.c: Update.
2978 * spu-tdep.c: Update.
2979 * target-debug.h: Update.
2982 * tid-parse.c: Update.
2983 * tracefile-tfile.c: Update.
2984 * vax-bsd-nat.c: Update.
2985 * windows-nat.c: Update.
2986 * x86-linux-nat.c: Update.
2987 * x86-nat.c: Update.
2989 2018-07-03 Tom Tromey <tom@tromey.com>
2991 * common/ptid.c (pid_to_ptid): Remove.
2992 * common/ptid.h (pid_to_ptid): Don't declare.
2993 * aix-thread.c: Update.
2994 * arm-linux-nat.c: Update.
2995 * common/ptid.c: Update.
2996 * common/ptid.h: Update.
2997 * corelow.c: Update.
2999 * darwin-nat.c: Update.
3000 * fbsd-nat.c: Update.
3001 * fork-child.c: Update.
3002 * gnu-nat.c: Update.
3003 * go32-nat.c: Update.
3004 * inf-ptrace.c: Update.
3006 * inferior.c: Update.
3008 * linux-fork.c: Update.
3009 * linux-nat.c: Update.
3010 * nat/aarch64-linux-hw-point.c: Update.
3011 * nat/fork-inferior.c: Update.
3012 * nat/x86-linux-dregs.c: Update.
3013 * nto-procfs.c: Update.
3014 * obsd-nat.c: Update.
3016 * progspace.c: Update.
3018 * rs6000-nat.c: Update.
3019 * s390-linux-nat.c: Update.
3020 * sol-thread.c: Update.
3021 * spu-linux-nat.c: Update.
3024 * tracefile-tfile.c: Update.
3025 * windows-nat.c: Update.
3027 2018-07-03 Tom Tromey <tom@tromey.com>
3029 * common/ptid.h (ptid_build): Don't declare.
3030 * common/ptid.c (ptid_build): Remove.
3031 * aix-thread.c: Update.
3032 * bsd-kvm.c: Update.
3033 * bsd-uthread.c: Update.
3034 * common/agent.c: Update.
3035 * common/ptid.c: Update.
3036 * common/ptid.h: Update.
3037 * corelow.c: Update.
3038 * darwin-nat.c: Update.
3039 * fbsd-nat.c: Update.
3040 * gnu-nat.c: Update.
3041 * linux-fork.c: Update.
3042 * linux-nat.c: Update.
3043 * linux-thread-db.c: Update.
3044 * nat/linux-osdata.c: Update.
3045 * nat/linux-procfs.c: Update.
3046 * nto-procfs.c: Update.
3047 * obsd-nat.c: Update.
3048 * proc-service.c: Update.
3050 * ravenscar-thread.c: Update.
3051 * remote-sim.c: Update.
3053 * sol-thread.c: Update.
3055 * windows-nat.c: Update.
3057 2018-07-03 Tom Tromey <tom@tromey.com>
3059 * infrun.c (follow_exec): Use exit_inferior_silent.
3060 * inferior.c (exit_inferior_num_silent): Remove.
3061 * inferior.h (exit_inferior_num_silent): Don't declare.
3063 2018-07-03 Tom Tromey <tom@tromey.com>
3066 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3067 inferior_ptid on error.
3069 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3070 Simon Marchi <simon.marchi@polymtl.ca>
3073 * disasm.h (gdb_disassembler): Add
3074 `m_disassembler_options_holder'. member
3075 * disasm.c (get_all_disassembler_options): New function.
3076 (gdb_disassembler::gdb_disassembler): Use it.
3077 (gdb_buffered_insn_length_init_dis): Likewise.
3078 (gdb_buffered_insn_length): Adjust accordingly.
3079 (set_disassembler_options): Handle options with arguments.
3080 (show_disassembler_options_sfunc): Likewise. Add a leading new
3081 line if showing options with descriptions.
3082 (disassembler_options_completer): Adapt to using the
3083 `disasm_options_and_args_t' structure.
3084 * mips-tdep.c (mips_disassembler_options): New variable.
3085 (mips_disassembler_options_o32): Likewise.
3086 (mips_disassembler_options_n32): Likewise.
3087 (mips_disassembler_options_n64): Likewise.
3088 (gdb_print_insn_mips): Don't set `disassembler_options'.
3089 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3091 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3092 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3093 `gdbarch_disassembler_options_implicit' and
3094 `gdbarch_valid_disassembler_options'.
3095 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3096 `disasm_options_and_args_t' structure.
3097 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3099 (valid_disassembler_options): Switch from `disasm_options_t' to
3100 the `disasm_options_and_args_t' structure.
3101 * NEWS: Document `set disassembler-options' support for the MIPS
3103 * gdbarch.h: Regenerate.
3104 * gdbarch.c: Regenerate.
3106 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3108 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3110 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3112 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3113 parameter in call to amd64_target_description.
3114 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3115 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3116 (amd64fbsd_init_abi): Likewise.
3117 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3118 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3119 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3120 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3122 2018-06-29 Pedro Alves <palves@redhat.com>
3124 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3125 "segments" parameter.
3126 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3127 (_initialize_amd64_tdep): Update call to
3128 amd64_create_target_description.
3129 (amd64_target_description): Add "segments" parameter. Adjust
3130 the implementation to use it.
3131 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3132 call to amd64_create_target_description.
3133 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3134 * gdb/arch/amd64.h (amd64_create_target_description): Add
3135 "segments" register.
3136 * gdb/arch/amd64.c (amd64_create_target_description): Add
3137 "segments" parameter. Call create_feature_i386_64bit_segments
3138 only if SEGMENTS is true.
3139 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3140 call to amd64_create_target_description.
3142 2018-06-29 Pedro Alves <palves@redhat.com>
3144 * thread.c (thread_target_id_str): New, factored out from ...
3145 (print_thread_info_1): ... here. Use it to compute the max
3146 "Target Id" column width.
3148 2018-06-29 Pedro Alves <palves@redhat.com>
3150 * remote.c (remote_target::extra_thread_info): Delete
3151 'display_buf' and 'n' locals. from the cache, regardless of
3152 packet mechanims is in use. Use cache for qThreadExtra and qP
3155 2018-06-29 Pedro Alves <palves@redhat.com>
3157 * blockframe.c (find_pc_sect_containing_function): New function.
3158 * breakpoint.c (print_breakpoint_location): Don't call
3159 find_pc_sect_function.
3160 * linespec.c (create_sals_line_offset): Record the location's
3162 * linespec.c (convert_address_location_to_sals): Fill in sal's
3163 symbol with find_pc_sect_containing_function.
3164 * symtab.c (find_function_start_sal): Rename to ...
3165 (find_function_start_sal_1): ... this.
3166 (find_function_start_sal): Reimplement as wrapper around
3167 find_function_start_sal_1, and use
3168 find_pc_sect_containing_function to fill in the sal's symbol.
3169 (find_function_start_sal(symbol*, bool)): Adjust.
3170 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3172 (find_pc_sect_containing_function): Declare.
3174 2018-06-29 Pedro Alves <palves@redhat.com>
3176 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3177 true if the the location has no symbol.
3179 2018-06-28 Tom Tromey <tom@tromey.com>
3181 * NEWS: Mention --enable-codesign.
3182 * silent-rules.mk (ECHO_SIGN): New variable.
3183 * configure.ac: Add --enable-codesign.
3184 * configure: Rebuild.
3185 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3186 (gdb$(EXEEXT)): Optionally invoke codesign.
3188 2018-06-28 Pedro Alves <palves@redhat.com>
3190 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3192 (switch_to_thread_no_regs): Adjust comment.
3193 * infcmd.c (stop_pc): Delete.
3194 (post_create_inferior, info_program_command): Replace references
3195 to stop_pc with references to thread_info->suspend.stop_pc.
3196 * inferior.h (stop_pc): Delete declaration.
3197 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3198 (handle_inferior_event_1, handle_signal_stop)
3199 (process_event_stop_test, keep_going_stepped_thread)
3200 (handle_step_into_function, handle_step_into_function_backward)
3201 (print_stop_location): Replace references to stop_pc with
3202 references to thread_info->suspend.stop_pc.
3203 (struct infcall_suspend_state) <stop_pc>: Delete field.
3204 (save_infcall_suspend_state, restore_infcall_suspend_state):
3205 Remove references to inf_stat->stop_pc.
3206 * linux-fork.c (fork_load_infrun_state): Likewise.
3207 * record-btrace.c (record_btrace_set_replay): Likewise.
3208 * record-full.c (record_full_goto_entry): Likewise.
3209 * remote.c (print_one_stopped_thread): Likewise.
3210 * target.c (target_resume): Extend comment.
3211 * thread.c (set_executing_thread): New.
3212 (set_executing): Use it.
3213 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3214 Remove references to stop_pc.
3216 2018-06-28 Pedro Alves <palves@redhat.com>
3218 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3219 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3221 2018-06-28 Tom Tromey <tom@tromey.com>
3223 * coffread.c (coff_symfile_finish): Update.
3224 * xcoffread.c (xcoff_symfile_finish): Update.
3225 * elfread.c (elf_symfile_finish): Update.
3226 * symfile.h (dwarf2_free_objfile): Don't declare.
3227 * dwarf2read.c (_initialize_dwarf2_read): Use
3228 register_objfile_data_with_cleanup.
3229 (dwarf2_free_objfile): Now static. Change signature.
3231 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3233 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3234 option "-o" to add-symbol-file-load to add an offset to each
3235 section's load address.
3236 * symfile.c (set_objfile_default_section_offset): New function.
3238 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3240 * symfile.c (add_symbol_file_command): Make sure that sections
3241 with the same name are sorted in the same order.
3243 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3245 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3246 require the second argument. If omitted, load sections at the
3247 addresses specified in the file.
3249 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3251 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3252 (_initialize_symfile): Add option "-o" to symbol-file to add an
3253 offset to each section of the symbol file.
3255 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3257 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3259 2018-06-27 Tom Tromey <tom@tromey.com>
3261 * stack.c (_initialize_stack): Update "func" help text.
3263 2018-06-27 Tom Tromey <tom@tromey.com>
3265 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3267 (unwind_infopy_str, pyuw_create_unwind_info)
3268 (unwind_infopy_add_saved_register, pyuw_sniffer)
3269 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3271 (struct saved_reg): Add constructor.
3272 <value>: Now a gdbpy_ref<>.
3274 2018-06-27 Tom Tromey <tom@tromey.com>
3276 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3278 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3280 * gdb-gdb.py.in: Format using autopep8.
3282 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3284 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3285 (type_lookup_function): Recognize CORE_ADDR values.
3287 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3289 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3292 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3294 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3297 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3299 * gdb-gdb.py: Move to...
3300 * gdb-gdb.py.in: ... here.
3301 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3302 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3304 (distclean): Remove gdb-gdb.py when cleaning.
3305 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3306 * configure: Re-generate.
3308 2018-06-27 Pedro Alves <palves@redhat.com>
3310 * proc-service.c (get_ps_regcache): New.
3311 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3312 (ps_lsetfpregs): Use it.
3314 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3317 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3318 (dwarf_decode_lines_1): Adjust.
3320 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3322 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3324 <info_proc>: Likewise.
3326 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3328 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3329 to windows_fetch_one_register, and only handle the case of
3330 fetching one register. Move the code that reloads the context
3331 and iterates over all registers if R is negative to...
3332 (windows_nat_target::fetch_registers): ... here.
3333 (do_windows_store_inferior_registers): Rename to
3334 windows_store_one_register, and only handle the case of storing
3335 one register. Move the code that handles the case where r is
3337 (windows_nat_target::store_registers) ... here.
3339 2018-06-26 Tom Tromey <tom@tromey.com>
3342 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3343 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3345 (rust_internal_print_type): Add podata parameter.
3346 (rust_print_type): Update.
3348 2018-06-26 Tom Tromey <tom@tromey.com>
3350 * typeprint.h (struct print_offset_data) <update, finish,
3351 maybe_print_hole>: New methods.
3352 <indentation>: New constant.
3353 * typeprint.c (print_offset_data::indentation): Define.
3354 (print_offset_data::maybe_print_hole, print_offset_data::update)
3355 (print_offset_data::finish): Move from c-typeprint.c and rename.
3356 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3357 (print_spaces_filtered_with_print_options): Update.
3358 (c_print_type_union_field_offset, maybe_print_hole)
3359 (c_print_type_struct_field_offset): Move to typeprint.c and
3361 (c_type_print_base_struct_union): Update.
3363 2018-06-25 Pedro Alves <palves@redhat.com>
3365 * gdbthread.h (thread_info_ref, delete_thread)
3366 (delete_thread_silent, first_thread_of_inferior)
3367 (any_thread_of_inferior, switch_to_thread)
3368 (enable_thread_stack_temporaries)
3369 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3370 (get_last_thread_stack_temporary)
3371 (value_in_thread_stack_temporaries, can_access_registers_thread):
3372 Spell out "struct thread_info" instead of just "thread_info".
3373 * inferior.h (notice_new_inferior): Likewise.
3375 2018-06-25 Pedro Alves <palves@redhat.com>
3377 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3378 pass thread_info pointer to delete_thread.
3379 (windows_nat_target::detach): Pass inferior pointer to
3381 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3383 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3384 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3385 and pass a thread_info pointer to delete_thread.
3386 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3387 pass thread_info pointer to delete_thread.
3388 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3389 delete_thread_silent call.
3390 * procfs.c (procfs_target::detach): Pass inferior pointer to
3392 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3393 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3394 delete_thread_silent call.
3395 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3396 pass thread_info pointer to delete_thread.
3397 (windows_nat_target::detach): Pass inferior pointer to
3400 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3402 * regcache.c (readable_regcache::read_part): Fix asserts.
3403 (reg_buffer::raw_collect_part): New function.
3404 (regcache::write_part): Fix asserts.
3405 (reg_buffer::raw_supply_part): New function.
3406 (regcache::transfer_regset_register): New helper function.
3407 (regcache::transfer_regset): Call new functions.
3408 (regcache_supply_regset): Use gdb_byte*.
3409 (regcache::supply_regset): Likewise.
3410 (regcache_collect_regset): Likewise.
3411 (regcache::collect_regset): Likewise.
3412 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3413 (reg_buffer::raw_supply_part): Likewise.
3414 (regcache::transfer_regset_register): Likewise.
3415 (regcache::transfer_regset): Use gdb_byte*.
3417 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3419 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3421 2018-06-21 Pedro Alves <palves@redhat.com>
3423 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3424 instead of a ptid_t. All callers adjusted.
3425 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3427 (print_ada_task_info, display_current_task_id, task_command_1):
3429 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3431 (breakpoint_kind): Adjust.
3432 (remove_breakpoints_pid): Rename to ...
3433 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3434 pointer. All callers adjusted.
3435 (bpstat_clear_actions): Use inferior_thread.
3436 (get_bpstat_thread): New.
3437 (bpstat_do_actions): Use it.
3438 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3439 to take a thread_info pointer. All callers adjusted.
3440 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3441 (breakpoint_re_set_thread): Use inferior_thread.
3442 * breakpoint.h (struct inferior): Forward declare.
3443 (bpstat_stop_status): Update.
3444 (remove_breakpoints_pid): Delete.
3445 (remove_breakpoints_inf): New.
3446 * bsd-uthread.c (bsd_uthread_target::wait)
3447 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3448 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3449 (maint_btrace_packet_history_cmd)
3450 (maint_btrace_clear_packet_history_cmd): Adjust.
3451 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3453 * cli/cli-interp.c: Include "inferior.h".
3454 * common/refcounted-object.h (struct
3455 refcounted_object_ref_policy): New.
3456 * compile/compile-object-load.c: Include gdbthread.h.
3457 (store_regs): Use inferior_thread.
3458 * corelow.c (core_target::close): Use current_inferior.
3459 (core_target_open): Adjust to use first_thread_of_inferior and use
3460 the current inferior.
3461 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3462 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3463 <thread>: ... this new field. All references adjusted.
3464 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3465 Take a thread_info pointer instead of a ptid_t.
3466 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3467 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3468 thread_info pointer instead of a ptid_t.
3469 * elfread.c: Include "inferior.h".
3470 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3471 Use inferior_thread.
3472 * eval.c (evaluate_subexp): Likewise.
3473 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3475 * gdb_proc_service.h (struct thread_info): Forward declare.
3476 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3477 <thread>: ... this new field. All references adjusted.
3478 * gdbarch.h, gdbarch.c: Regenerate.
3479 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3480 'thread' parameter. All implementations and callers adjusted.
3481 * gdbthread.h (thread_info) <set_running>: New method.
3482 (delete_thread, delete_thread_silent): Take a thread_info pointer
3484 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3485 (first_thread_of_process): Delete, replaced by ...
3486 (first_thread_of_inferior): ... this new function. All callers
3488 (any_live_thread_of_process): Delete, replaced by ...
3489 (any_live_thread_of_inferior): ... this new function. All callers
3491 (switch_to_thread, switch_to_no_thread): Declare.
3492 (is_executing): Delete.
3493 (enable_thread_stack_temporaries): Update comment.
3494 <enable_thread_stack_temporaries>: Take a thread_info pointer
3495 instead of a ptid_t. Incref the thread.
3496 <~enable_thread_stack_temporaries>: Decref the thread.
3499 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3500 (get_last_thread_stack_temporary)
3501 (value_in_thread_stack_temporaries, can_access_registers_thread):
3502 Take a thread_info pointer instead of a ptid_t. All callers
3504 * infcall.c (get_call_return_value): Use inferior_thread.
3505 (run_inferior_call): Work with thread pointers instead of ptid_t.
3506 (call_function_by_hand_dummy): Work with thread pointers instead
3507 of ptid_t. Use thread_info_ref.
3508 * infcmd.c (proceed_thread_callback): Access thread's state
3510 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3511 access thread's state directly.
3512 (continue_command): Use inferior_thread.
3513 (info_program_command): Use find_thread_ptid and access thread
3515 (proceed_after_attach_callback): Use thread state directly.
3516 (notice_new_inferior): Take a thread_info pointer instead of a
3517 ptid_t. All callers adjusted.
3518 (exit_inferior): Take an inferior pointer instead of a pid. All
3520 (exit_inferior_silent): New.
3521 (detach_inferior): Delete.
3522 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3523 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3524 (detach_inferior_command, kill_inferior_command): Use
3525 find_inferior_id instead of valid_gdb_inferior_id and
3526 gdb_inferior_id_to_pid.
3527 (inferior_command): Use inferior and thread pointers.
3528 * inferior.h (struct thread_info): Forward declare.
3529 (notice_new_inferior): Take a thread_info pointer instead of a
3530 ptid_t. All callers adjusted.
3531 (detach_inferior): Delete declaration.
3532 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3533 instead of a pid. All callers adjusted.
3534 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3535 (valid_gdb_inferior_id): Delete.
3536 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3537 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3538 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3540 <inf>: ... this new field.
3541 <step_ptid>: Delete, replaced by ...
3542 <step_thread>: ... this new field.
3543 (get_displaced_stepping_state): Take an inferior pointer instead
3544 of a pid. All callers adjusted.
3545 (displaced_step_in_progress_any_inferior): Adjust.
3546 (displaced_step_in_progress_thread): Take a thread pointer instead
3547 of a ptid_t. All callers adjusted.
3548 (displaced_step_in_progress, add_displaced_stepping_state): Take
3549 an inferior pointer instead of a pid. All callers adjusted.
3550 (get_displaced_step_closure_by_addr): Adjust.
3551 (remove_displaced_stepping_state): Take an inferior pointer
3552 instead of a pid. All callers adjusted.
3553 (displaced_step_prepare_throw, displaced_step_prepare)
3554 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3555 All callers adjusted.
3556 (start_step_over): Adjust.
3557 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3558 displaced step queue.
3559 (do_target_resume): Adjust.
3560 (fetch_inferior_event): Use inferior_thread.
3561 (context_switch, get_inferior_stop_soon): Take an
3562 execution_control_state pointer instead of a ptid_t. All callers
3564 (switch_to_thread_cleanup): Delete.
3565 (stop_all_threads): Use scoped_restore_current_thread.
3566 * inline-frame.c: Include "gdbthread.h".
3567 (inline_state) <inline_state>: Take a thread pointer instead of a
3568 ptid_t. All callers adjusted.
3569 <ptid>: Delete, replaced by ...
3570 <thread>: ... this new field.
3571 (find_inline_frame_state): Take a thread pointer instead of a
3572 ptid_t. All callers adjusted.
3573 (skip_inline_frames, step_into_inline_frame)
3574 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3575 pointer instead of a ptid_t. All callers adjusted.
3576 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3577 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3578 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3580 * linux-nat.c (get_detach_signal): Likewise.
3581 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3582 (thread_db_notice_clone): Adjust.
3583 (thread_db_find_new_threads_silently)
3584 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3585 a thread pointer instead of a ptid_t. All callers adjusted.
3586 * mi/mi-cmd-var.c: Include "inferior.h".
3587 (mi_cmd_var_update_iter): Update to use thread pointers.
3588 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3590 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3592 (mi_output_running): ... this new function.
3593 (mi_on_resume_1): Adjust to use it.
3594 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3595 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3597 (interrupt_thread_callback): : Adjust to use thread and inferior
3599 * proc-service.c: Include "gdbthread.h".
3600 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3601 * progspace-and-thread.c: Include "inferior.h".
3602 * progspace.c: Include "inferior.h".
3603 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3604 hold a reference to an inferior_object.
3605 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3607 * python/py-inferior.c (struct inferior_object): Give the type a
3608 tag name instead of a typedef.
3609 (python_on_normal_stop): No need to check if the current thread is
3611 (inferior_to_inferior_object): Change return type to
3612 inferior_object. All callers adjusted.
3613 (find_thread_object): Delete, bits factored out to ...
3614 (thread_to_thread_object): ... this new function.
3615 * python/py-infthread.c (create_thread_object): Use
3616 inferior_to_inferior_object.
3617 (thpy_is_stopped): Use thread pointer directly.
3618 (gdbpy_selected_thread): Use inferior_thread.
3619 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3620 field, replaced with ...
3621 <thread>: ... this new field. All users adjusted.
3622 (btpy_insn_or_gap_new): Drop const.
3623 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3625 * python/py-record.c: Include "gdbthread.h".
3626 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3627 a ptid_t. All callers adjusted.
3628 (gdbpy_current_recording): Use inferior_thread.
3629 * python/py-record.h (recpy_record_object) <ptid>: Delete
3630 field, replaced with ...
3631 <thread>: ... this new field. All users adjusted.
3632 (recpy_element_object) <ptid>: Delete
3633 field, replaced with ...
3634 <thread>: ... this new field. All users adjusted.
3635 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3636 a ptid_t. All callers adjusted.
3637 * python/py-threadevent.c: Include "gdbthread.h".
3638 (get_event_thread): Use thread_to_thread_object.
3639 * python/python-internal.h (struct inferior_object): Forward
3641 (find_thread_object, find_inferior_object): Delete declarations.
3642 (thread_to_thread_object, inferior_to_inferior_object): New
3644 * record-btrace.c: Include "inferior.h".
3645 (require_btrace_thread): Use inferior_thread.
3646 (record_btrace_frame_sniffer)
3647 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3648 (get_thread_current_frame): Use scoped_restore_current_thread and
3650 (get_thread_current_frame): Use thread pointer directly.
3651 (record_btrace_replay_at_breakpoint): Use thread's inferior
3653 * record-full.c: Include "inferior.h".
3654 * regcache.c: Include "gdbthread.h".
3655 (get_thread_arch_regcache): Use the inferior's address space
3657 (get_thread_regcache, registers_changed_thread): New.
3658 * regcache.h (get_thread_regcache(thread_info *thread)): New
3660 (registers_changed_thread): New.
3661 (remote_target) <remote_detach_1>: Swap order of parameters.
3662 (remote_add_thread): <remote_add_thread>: Return the new thread.
3663 (get_remote_thread_info(ptid_t)): New overload.
3664 (remote_target::remote_notice_new_inferior): Use thread pointers
3666 (remote_target::process_initial_stop_replies): Use
3667 thread_info::set_running.
3668 (remote_target::remote_detach_1, remote_target::detach)
3669 (extended_remote_target::detach): Adjust.
3670 * stack.c (frame_show_address): Use inferior_thread.
3671 * target-debug.h (target_debug_print_thread_info_pp): New.
3672 * target-delegates.c: Regenerate.
3673 * target.c (default_thread_address_space): Delete.
3674 (memory_xfer_partial_1): Use current_inferior.
3675 (target_detach): Use current_inferior.
3676 (target_thread_address_space): Delete.
3677 (generic_mourn_inferior): Use current_inferior.
3678 * target.h (struct target_ops) <thread_address_space>: Delete.
3679 (target_thread_address_space): Delete.
3680 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3682 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3683 thread pointer instead of a ptid_t. Adjust all callers.
3684 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3685 (first_thread_of_process): Delete, replaced by ...
3686 (first_thread_of_inferior): ... this new function. All callers
3688 (any_thread_of_process): Rename to ...
3689 (any_thread_of_inferior): ... this, and take an inferior pointer.
3690 (any_live_thread_of_process): Rename to ...
3691 (any_live_thread_of_inferior): ... this, and take an inferior
3693 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3694 (value_in_thread_stack_temporaries)
3695 (get_last_thread_stack_temporary): Take a thread pointer instead
3696 of a ptid_t. Adjust all callers.
3697 (thread_info::set_running): New.
3698 (validate_registers_access): Use inferior_thread.
3699 (can_access_registers_ptid): Rename to ...
3700 (can_access_registers_thread): ... this, and take a thread
3702 (print_thread_info_1): Adjust to compare thread pointers instead
3704 (switch_to_no_thread, switch_to_thread): Make extern.
3705 (scoped_restore_current_thread::~scoped_restore_current_thread):
3706 Use m_thread pointer directly.
3707 (scoped_restore_current_thread::scoped_restore_current_thread):
3708 Use inferior_thread.
3709 (thread_command): Use thread pointer directly.
3710 (thread_num_make_value_helper): Use inferior_thread.
3711 * top.c (execute_command): Use inferior_thread.
3712 * tui/tui-interp.c: Include "inferior.h".
3713 * varobj.c (varobj_create): Use inferior_thread.
3714 (value_of_root_1): Use find_thread_global_id instead of
3715 global_thread_id_to_ptid.
3717 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3719 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3721 (regcache::write_part): Likewise.
3722 (readable_regcache::cooked_read_part): Update comment.
3723 (readable_regcache::cooked_write_part): Likewise.
3724 * regcache.h: (readable_regcache::read_part): Likewise.
3725 (regcache::write_part): Likewise.
3727 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3728 Dirk Schubert <dirk.schubert@arm.com>
3730 * aarch64-linux-nat.c (post_attach): New.
3731 (aarch64_linux_nat_target::post_attach): Override post_attach to
3732 record the number of hardware debug registers.
3734 2018-06-20 Tom Tromey <tom@tromey.com>
3736 * python/py-param.c (add_setshow_generic): Make parameters const.
3737 (parmpy_init): Update.
3739 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3741 * regcache.h (regcache_cooked_read_ftype): Rename to...
3742 (register_read_ftype): ...this, change type to function_view.
3743 (class reg_buffer) <save>: Remove src parameter.
3744 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3745 parameter non-const in first overload. Remove src parameter in
3747 * regcache.c (do_cooked_read): Remove.
3748 (readonly_detached_regcache::readonly_detached_regcache): Make
3749 parameter non-const, adjust call to other constructor.
3750 (reg_buffer::save): Remove src parameter.
3751 * frame.c (do_frame_register_read): Remove.
3752 (frame_save_as_regcache): Use lambda function.
3753 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3754 parameter to ppu2spu_data *.
3755 (ppu2spu_sniffer): Use lambda function.
3757 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3759 * record-full.c (record_full_target::insert_breakpoint): Remove
3760 "struct" keyword, add const.
3762 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3764 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3765 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3766 * configure.ac: Remove AC_PREREQ, add missing quoting.
3767 * gnulib/configure.ac: Modernize usage of
3768 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3769 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3770 (AUTOMAKE_VERSION): Bump to 1.15.1.
3771 * configure: Re-generate.
3772 * config.in: Re-generate.
3773 * aclocal.m4: Re-generate.
3774 * gnulib/aclocal.m4: Re-generate.
3775 * gnulib/config.in: Re-generate.
3776 * gnulib/configure: Re-generate.
3777 * gnulib/import/Makefile.in: Re-generate.
3779 2018-06-19 Pedro Alves <palves@redhat.com>
3781 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3782 (lookup_minimal_symbol_by_pc_section): ... here with
3783 gdb_assert_not_reached added.
3785 2018-06-19 Pedro Alves <palves@redhat.com>
3787 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3788 parameter with a block parameter. Compare location's block symbol
3789 with the frame's block instead of addresses.
3790 (skip_inline_frames): Pass the current block instead of the
3791 frame's address. Break out as soon as we determine the frame
3792 should not be skipped.
3794 2018-06-18 Tom Tromey <tom@tromey.com>
3796 * solib-aix.c (solib_aix_get_section_offsets): Return
3798 (solib_aix_solib_create_inferior_hook): Update.
3800 2018-06-18 Tom Tromey <tom@tromey.com>
3802 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3804 2018-06-18 Tom Tromey <tom@tromey.com>
3806 * solib-frv.c (frv_relocate_main_executable): Use
3808 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3811 2018-06-18 Tom Tromey <tom@tromey.com>
3813 * objfiles.h (inhibit_section_map_updates): Update.
3814 (resume_section_map_updates, resume_section_map_updates_cleanup):
3816 * solib-svr4.c (svr4_handle_solib_event): Update.
3817 * objfiles.c (inhibit_section_map_updates): Return
3818 scoped_restore_tmpl<int>.
3819 (resume_section_map_updates, resume_section_map_updates_cleanup):
3822 2018-06-18 Tom Tromey <tom@tromey.com>
3824 * valprint.h (read_string): Update.
3825 * valprint.c (read_string): Change type of "buffer".
3826 (val_print_string): Update.
3827 * python/py-value.c (valpy_string): Update.
3828 * language.h (struct language_defn) <la_get_string>: Change
3830 (default_get_string, c_get_string): Update.
3831 * language.c (default_get_string): Change type of "buffer".
3832 * guile/scm-value.c (gdbscm_value_to_string): Update.
3833 * c-lang.c (c_get_string): Change type of "buffer".
3835 2018-06-18 Tom Tromey <tom@tromey.com>
3837 * ser-mingw.c (struct pipe_state_destroyer): New.
3838 (pipe_state_up): New typedef.
3839 (cleanup_pipe_state): Remove.
3840 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3842 2018-06-18 Tom Tromey <tom@tromey.com>
3844 * rust-lang.h (rust_yyerror): Don't declare.
3845 * rust-lang.c (rust_language_defn): Update.
3846 * rust-exp.y (yyerror): Now static.
3847 * parse.c (parse_exp_in_context_1): Update.
3848 * p-lang.h (p_yyerror): Don't declare.
3849 * p-lang.c (p_language_defn): Update.
3850 * p-exp.y (yyerror): Now static.
3851 * opencl-lang.c (opencl_language_defn): Update.
3852 * objc-lang.c (objc_language_defn): Update.
3853 * m2-lang.h (m2_yyerror): Don't declare.
3854 * m2-lang.c (m2_language_defn): Update.
3855 * m2-exp.y (yyerror): Now static.
3856 * language.h (struct language_defn) <la_error>: Remove.
3857 * language.c (unk_lang_error): Remove.
3858 (unknown_language_defn, auto_language_defn): Remove.
3859 * go-lang.h (go_yyerror): Don't declare.
3860 * go-lang.c (go_language_defn): Update.
3861 * go-exp.y (yyerror): Now static.
3862 * f-lang.h (f_yyerror): Don't declare.
3863 * f-lang.c (f_language_defn): Update.
3864 * f-exp.y (yyerror): Now static.
3865 * d-lang.h (d_yyerror): Don't declare.
3866 * d-lang.c (d_language_defn): Update.
3867 * d-exp.y (yyerror): Now static.
3868 * c-lang.h (c_yyerror): Don't declare.
3869 * c-lang.c (c_language_defn, cplus_language_defn)
3870 (asm_language_defn, minimal_language_defn): Update.
3871 * c-exp.y (yyerror): Now static.
3872 * ada-lang.h (ada_yyerror): Don't declare.
3873 * ada-lang.c (ada_language_defn): Update.
3874 * ada-exp.y (yyerror): Now static.
3876 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3878 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3879 (store_sveregs_to_thread): Likewise.
3880 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3881 (aarch64_linux_store_inferior_registers): Likewise.
3882 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3884 (aarch64_sve_regs_copy_to_regcache): Likewise.
3885 (aarch64_sve_regs_copy_from_regcache): Likewise.
3886 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3888 (aarch64_sve_regs_copy_to_regcache): Likewise.
3889 (aarch64_sve_regs_copy_from_regcache): Likewise.
3890 (sve_context): Structure from Linux headers.
3891 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3892 (SVE_SIG_ZREG_SIZE): Likewise.
3893 (SVE_SIG_PREG_SIZE): Likewise.
3894 (SVE_SIG_FFR_SIZE): Likewise.
3895 (SVE_SIG_REGS_OFFSET): Likewise.
3896 (SVE_SIG_ZREGS_OFFSET): Likewise.
3897 (SVE_SIG_ZREG_OFFSET): Likewise.
3898 (SVE_SIG_ZREGS_SIZE): Likewise.
3899 (SVE_SIG_PREGS_OFFSET): Likewise.
3900 (SVE_SIG_PREG_OFFSET): Likewise.
3901 (SVE_SIG_PREGS_SIZE): Likewise.
3902 (SVE_SIG_FFR_OFFSET): Likewise.
3903 (SVE_SIG_REGS_SIZE): Likewise.
3904 (SVE_SIG_CONTEXT_SIZE): Likewise.
3905 (SVE_PT_REGS_MASK): Likewise.
3906 (SVE_PT_REGS_FPSIMD): Likewise.
3907 (SVE_PT_REGS_SVE): Likewise.
3908 (SVE_PT_VL_INHERIT): Likewise.
3909 (SVE_PT_VL_ONEXEC): Likewise.
3910 (SVE_PT_REGS_OFFSET): Likewise.
3911 (SVE_PT_FPSIMD_OFFSET): Likewise.
3912 (SVE_PT_FPSIMD_SIZE): Likewise.
3913 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3914 (SVE_PT_SVE_PREG_SIZE): Likewise.
3915 (SVE_PT_SVE_FFR_SIZE): Likewise.
3916 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3917 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3918 (__SVE_SIG_TO_PT): Likewise.
3919 (SVE_PT_SVE_OFFSET): Likewise.
3920 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3921 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3922 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3923 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3924 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3925 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3926 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3927 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3928 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3929 (SVE_PT_SVE_SIZE): Likewise.
3930 (SVE_PT_SIZE): Likewise.
3931 (HAS_SVE_STATE): New define.
3933 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3935 * nat/aarch64-sve-linux-sigcontext.h: New file.
3936 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3938 (SVE_VQ_MIN): Likewise.
3939 (SVE_VQ_MAX): Likewise.
3940 (SVE_VL_MIN): Likewise.
3941 (SVE_VL_MAX): Likewise.
3942 (SVE_NUM_ZREGS): Likewise.
3943 (SVE_NUM_PREGS): Likewise.
3944 (sve_vl_valid): Likewise.
3945 (struct user_sve_header): Likewise.
3947 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3948 Richard Bunt <Richard.Bunt@arm.com>
3950 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3951 was requested by GDB.
3953 2018-06-15 Tom de Vries <tdevries@suse.de>
3955 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3957 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3959 * gnulib/update-gnulib.sh: Print expected versions of
3962 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3964 * arch-utils.c (default_type_align): Use type_length_units.
3965 * gdbtypes.c (type_align): Use type_length_units.
3967 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3969 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3970 of 'define' command.
3972 2018-06-14 Tom de Vries <tdevries@suse.de>
3975 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3976 get_no_prettyformat_print_options.
3978 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3980 * sparc-nat.h: Include target.h.
3981 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3982 <fetch_registers>: Remove this argument in function call.
3983 <store_registers>: Remove this argument in function call, remove
3985 <low_forget_process>: Call sparc64_forget_process instead of
3986 sparc_forget_process.
3988 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3990 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3991 (procfs_target::make_corefile_notes): Adjust to new
3992 target_read_alloc return type.
3994 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3995 Stephen Roberts <stephen.roberts@arm.com>
3998 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3999 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4000 Move should_notify_stop local into more inner scope.
4002 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4003 Stephen Roberts <stephen.roberts@arm.com>
4006 * infrun.c (resume_1): Add call to mark_async_event_handler.
4008 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4010 * infrun.c (do_target_wait): Change old version of $pc printed.
4012 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4014 * dwarf2read.c (read_index_from_section): Rename to...
4015 (read_gdb_index_from_section): ... this, update all callers.
4016 (dwarf2_read_index): Rename to...
4017 (dwarf2_read_gdb_index): ... this, update all callers.
4019 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4021 * gdb/hppa-linux-nat.c
4022 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4023 hppa_linux_nat_target::fetch_registers.
4025 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4027 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4028 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4029 (AARCH64_DWARF_SVE_FFR): Likewise.
4030 (AARCH64_DWARF_SVE_P0): Likewise.
4031 (AARCH64_DWARF_SVE_Z0): Likewise.
4033 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4035 * common/common-regcache.h (raw_compare): New function.
4036 * regcache.c (regcache::raw_compare): Likewise.
4037 * regcache.h (regcache::raw_compare): New declaration.
4039 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4041 * common/common-regcache.h (reg_buffer_common): New structure.
4042 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4043 (reg_buffer::raw_supply): Likewise.
4044 (reg_buffer::raw_supply_integer): Likewise.
4045 (reg_buffer::raw_supply_zeroed): Likewise.
4046 (reg_buffer::raw_collect): Likewise.
4047 (reg_buffer::raw_collect_integer): Likewise.
4048 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4049 (reg_buffer::raw_supply): Likewise.
4050 (reg_buffer::raw_supply_integer): Likewise.
4051 (reg_buffer::raw_supply_zeroed): Likewise.
4052 (reg_buffer::raw_collect): Likewise.
4053 (reg_buffer::raw_collect_integer): Likewise.
4055 2018-06-10 Tom Tromey <tom@tromey.com>
4057 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4058 (class remote_state) <stop_reply_queue>: Now std::vector.
4059 (remote_state::~remote_state)
4060 (remote_target::stop_reply_queue_length): Update.
4061 (struct queue_iter_param, remove_child_of_pending_fork)
4062 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4063 (check_pending_event_prevents_wildcard_vcont_callback)
4064 (remove_stop_reply_for_inferior)
4065 (remove_stop_reply_of_remote_state)
4066 (remote_notif_remove_once_on_match)
4067 (stop_reply_match_ptid_and_ws)
4068 (remote_kill_child_of_pending_fork): Remove.
4069 (remote_target::remove_new_fork_children)
4070 (remote_target::check_pending_events_prevent_wildcard_vcont)
4071 (remote_target::discard_pending_stop_replies)
4072 (remote_target::discard_pending_stop_replies_in_queue)
4073 (remote_target::remote_notif_remove_queued_reply)
4074 (remote_target::queued_stop_reply)
4075 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4076 (remote_target::wait, remote_target::kill_new_fork_children)
4077 (remote_target::async): Update.
4079 2018-06-10 Tom Tromey <tom@tromey.com>
4081 * record-full.c (record_full_arch_list_cleanups): Remove.
4082 (record_full_message): Use try/catch.
4083 (record_full_wait_cleanups): Remove.
4084 (record_full_wait_1): Use try/catch.
4085 (record_full_restore): Likewise.
4087 2018-06-10 Tom Tromey <tom@tromey.com>
4089 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4090 declare VEC. Add constructor.
4091 <in_target_beneath>: Now bool.
4092 (record_full_breakpoints): Now a std::vector, static.
4093 (record_full_sync_record_breakpoints)
4094 (record_full_init_record_breakpoints)
4095 (record_full_target::insert_breakpoint)
4096 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4098 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4100 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4101 * serial.c (serial_interface_lookup): Remove struct keyword.
4103 2018-06-10 Tom Tromey <tom@tromey.com>
4105 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4107 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4109 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4111 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4112 "beneath" as a method.
4113 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4114 Use "beneath" as a method.
4116 2018-06-10 Tom Tromey <tom@tromey.com>
4118 * tracefile.c (struct trace_file_writer_deleter): New.
4119 <operator()>: Rename from trace_file_writer_xfree.
4120 (trace_file_writer_up): New typedef.
4121 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4123 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4125 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4126 <m_registers, m_register_status>: Change type to
4128 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4131 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4133 * common/common-regcache.h (enum register_status): Add
4134 underlying type "signed char".
4135 * regcache.h (reg_buffer) <m_register_status>: Change type to
4137 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4138 register_status instead of signed char.
4139 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4140 (reg_buffer::get_register_status): Remove cast.
4141 (readable_regcache::raw_read): Remove cast.
4142 (readable_regcache::cooked_read): Remove cast.
4144 2018-06-09 Tom Tromey <tom@tromey.com>
4146 * source.c (reverse_search_command, forward_search_command): Use
4149 2018-06-09 Tom Tromey <tom@tromey.com>
4151 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4152 (serial_ops_list): Now static, std::vector.
4153 (serial_interface_lookup, serial_add_interface): Update.
4155 2018-06-09 Tom Tromey <tom@tromey.com>
4157 * dwarf2read.c (process_cu_includes): Update.
4158 (process_full_comp_unit): Update.
4159 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4162 2018-06-08 Paul Koning <paul_koning@dell.com>
4166 * python/python.c (do_start_initialization):
4167 Avoid call to internal Python API.
4168 (init__gdb_module): New function.
4170 2018-06-08 Gary Benson <gbenson@redhat.com>
4172 * linux-thread-db.c (valprint.h): New include.
4173 (struct check_thread_db_info): New structure.
4174 (check_thread_db_on_load, tdb_testinfo): New static globals.
4175 (check_thread_db, check_thread_db_callback): New functions.
4176 (try_thread_db_load_1): Run integrity checks if requested.
4177 (maintenance_check_libthread_db): New function.
4178 (_initialize_thread_db): Register "maint check libthread-db"
4179 and "maint set/show check-libthread-db".
4180 * NEWS: Mention the above new commands.
4182 2018-06-08 Tom Tromey <tom@tromey.com>
4184 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4187 2018-06-08 Tom Tromey <tom@tromey.com>
4189 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4191 2018-06-08 Tom Tromey <tom@tromey.com>
4193 * common/btrace-common.h (struct btrace_data): Add constructor,
4194 destructor, move assignment operator.
4195 <empty, clear, fini>: New methods.
4196 <format>: Initialize.
4197 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4198 (btrace_data_empty): Don't declare.
4199 * common/btrace-common.c (btrace_data_init): Remove.
4200 (btrace_data::fini): Rename from btrace_data_fini.
4201 (btrace_data::empty): Rename from btrace_data_empty.
4202 (btrace_data::clear): Rename from btrace_data_clear. Return
4204 * btrace.h (make_cleanup_btrace_data): Don't declare.
4205 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4206 (parse_xml_btrace): Update.
4207 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4208 (maint_btrace_clear_packet_history_cmd): Update.
4210 2018-06-07 Pedro Alves <palves@redhat.com>
4212 * target.h (target_ops) <beneath>: Now a method. All references
4214 (class target_stack): New.
4215 * target.c (g_target_stack): New.
4216 (g_current_top_target): Delete.
4217 (current_top_target): Get the top target out of g_target_stack.
4218 (target_stack::push, target_stack::unpush): New.
4219 (push_target, unpush_target): Reimplement.
4220 (target_is_pushed): Reimplement in terms of g_target_stack.
4221 (target_ops::beneath, target_stack::find_beneath): New.
4223 2018-06-07 Pedro Alves <palves@redhat.com>
4225 * target.h (find_target_beneath): Delete declaration.
4226 * target.c (find_target_beneath): Delete definition.
4227 * aix-thread.c: All callers of find_target_beneath adjusted to
4228 call target_ops::beneath instead.
4229 * bsd-uthread.c: Likewise.
4230 * linux-thread-db.c: Likewise.
4231 * ravenscar-thread.c: Likewise.
4232 * sol-thread.c: Likewise.
4233 * spu-multiarch.c: Likewise.
4235 2018-06-07 Pedro Alves <palves@redhat.com>
4237 * target.h (target_ops) <beneath>: Now a method. All references
4239 (target_ops) <m_beneath>: New.
4240 * target.c (target_ops::beneath): New.
4241 * corelow.c: Adjust all references to target_ops::beneath.
4242 * linux-thread-db.c: Likewise.
4243 * make-target-delegates: Likewise.
4244 * record-btrace.c: Likewise.
4245 * record-full.c: Likewise.
4246 * remote.c: Likewise.
4247 * target.c: Likewise.
4248 * target-delegates.c: Regenerate.
4250 2018-06-07 Pedro Alves <palves@redhat.com>
4252 * target.h (target_stack): Delete.
4253 (current_top_target): Declare function.
4254 * target.c (target_stack): Delete.
4255 (g_current_top_target): New.
4256 (current_top_target): New function.
4257 * auxv.c: Use current_top_target instead of target_stack
4259 * avr-tdep.c: Likewise.
4260 * breakpoint.c: Likewise.
4261 * corefile.c: Likewise.
4262 * elfread.c: Likewise.
4264 * exceptions.c: Likewise.
4265 * frame.c: Likewise.
4266 * gdbarch-selftests.c: Likewise.
4267 * gnu-v3-abi.c: Likewise.
4268 * ia64-tdep.c: Likewise.
4269 * ia64-vms-tdep.c: Likewise.
4270 * infcall.c: Likewise.
4271 * infcmd.c: Likewise.
4272 * infrun.c: Likewise.
4273 * linespec.c: Likewise.
4274 * linux-tdep.c: Likewise.
4275 * minsyms.c: Likewise.
4276 * ppc-linux-nat.c: Likewise.
4277 * ppc-linux-tdep.c: Likewise.
4278 * procfs.c: Likewise.
4279 * regcache.c: Likewise.
4280 * remote.c: Likewise.
4281 * rs6000-tdep.c: Likewise.
4282 * s390-linux-nat.c: Likewise.
4283 * s390-tdep.c: Likewise.
4284 * solib-aix.c: Likewise.
4285 * solib-darwin.c: Likewise.
4286 * solib-dsbt.c: Likewise.
4287 * solib-spu.c: Likewise.
4288 * solib-svr4.c: Likewise.
4289 * solib-target.c: Likewise.
4290 * sparc-tdep.c: Likewise.
4291 * sparc64-tdep.c: Likewise.
4292 * spu-tdep.c: Likewise.
4293 * symfile.c: Likewise.
4294 * symtab.c: Likewise.
4295 * target-descriptions.c: Likewise.
4296 * target-memory.c: Likewise.
4297 * target.c: Likewise.
4298 * target.h: Likewise.
4299 * tracefile-tfile.c: Likewise.
4300 * tracepoint.c: Likewise.
4301 * valops.c: Likewise.
4302 * valprint.c: Likewise.
4303 * value.c: Likewise.
4304 * windows-tdep.c: Likewise.
4305 * mi/mi-main.c: Likewise.
4307 2018-06-07 Tom Tromey <tom@tromey.com>
4309 * valprint.h (build_address_symbolic): Declare.
4310 * printcmd.c (print_address_symbolic): Update.
4311 (build_address_symbolic): Change "name" and "filename" to
4313 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4315 * defs.h (build_address_symbolic): Remove declaration.
4317 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4319 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4320 (aarch64_vnv_type): Add function.
4321 (aarch64_pseudo_register_name): Add V regs for SVE.
4322 (aarch64_pseudo_register_type): Likewise.
4323 (aarch64_pseudo_register_reggroup_p): Likewise.
4324 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4325 (aarch64_pseudo_read_value): Add V regs for SVE.
4326 (aarch64_pseudo_write_2): Use V0 offset for SVE
4327 (aarch64_pseudo_write): Add V regs for SVE.
4328 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4330 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4332 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4333 (sve_vl_from_vq): Likewise.
4335 2018-06-05 Tom Tromey <tom@tromey.com>
4337 * cli/cli-cmds.c (show_version): Update.
4338 * top.c (print_gdb_version): Add "interactive" parameter.
4340 * main.c (captured_main_1): Update.
4341 * top.h (print_gdb_version): Add "interactive" parameter and a
4344 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4346 * common/enum-flags.h: Add trailing semicolon to example in
4349 2018-06-05 Tom Tromey <tom@tromey.com>
4352 * NEWS: Add entry about pager.
4353 * utils.c (pagination_disabled_for_command): New global.
4354 (prompt_for_continue): Allow "c" response to prompt.
4355 (reinitialize_more_filter): Clear
4356 pagination_disabled_for_command.
4357 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4359 2018-06-04 Tom Tromey <tom@tromey.com>
4361 * ada-lang.h (ada_lookup_symbol_list): Update.
4362 * ada-lang.c (resolve_subexp): Update.
4363 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4365 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4366 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4367 results parameter to std::vector.
4368 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4370 * ada-exp.y (block_lookup): Update.
4371 (select_possible_type_sym): Change type of syms. Remove nsyms
4373 (write_var_or_type, write_name_assoc): Update.
4375 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4377 * windows-nat.c (windows_nat_target::xfer_partial): Return
4378 TARGET_XFER_E_IO if we need to delegate to the target beneath
4379 but BENEATH is NULL.
4381 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4383 * Makefile.in (config.status): Add configure.nat as a
4386 2018-06-04 Tom Tromey <tom@tromey.com>
4388 * cp-name-parser.y (cpname_state): Add method declarations.
4389 (HANDLE_QUAL): Update.
4390 (cpname_state::d_grab, cpname_state::fill_comp)
4391 (cpname_state::make_operator, cpname_state::make_dtor)
4392 (cpname_state::make_builtin_type, cpname_state::make_name)
4393 (cpname_state::d_qualify, cpname_state::d_int_type)
4394 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4395 (%union): Move earlier.
4397 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4399 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4401 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4403 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4404 (aarch64_pseudo_write_1): Likewise.
4405 (aarch64_pseudo_read_value): Use helper.
4406 (aarch64_pseudo_write): Likewise.
4408 2018-06-04 Pedro Alves <palves@redhat.com>
4410 * darwin-nat.c (darwin_ops): Delete.
4411 (darwin_attach_pid): Use get_native_target.
4413 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4415 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4416 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4418 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4420 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4421 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4422 (aarch64_gdbarch_init): Check for SVE.
4423 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4425 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4427 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4428 * aarch64-tdep.h (aarch64_read_description): Likewise.
4429 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4430 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4431 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4432 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4433 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4435 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4437 * value.c (value_fetch_lazy_bitfield): New.
4438 (value_fetch_lazy_memory): New.
4439 (value_fetch_lazy_register): New.
4440 (value_fetch_lazy): Factor out to smaller functions.
4442 2018-06-01 Tom Tromey <tom@tromey.com>
4444 * cp-name-parser.y (backslashable, represented): Now const.
4446 2018-06-01 Tom Tromey <tom@tromey.com>
4448 * cp-name-parser.y: Include parser-defs.h.
4449 (parser_fprintf): Remove declaration.
4451 2018-06-01 Tom Tromey <tom@tromey.com>
4453 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4455 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4456 (global_result): Remove globals.
4457 (struct cpname_state): New.
4458 (yyparse): Don't declare.
4459 (yylex, yyerror): Move declarations after %union.
4460 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4461 (make_name): Add state parameter.
4463 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4465 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4467 (yylex): Add lvalp, state parameters.
4468 (yyerror): Add state parameter.
4469 (cp_demangled_name_to_comp): Update.
4471 2018-06-01 Tom Tromey <tom@tromey.com>
4473 * cp-name-parser.y (parser_fprintf): Declare.
4474 (GDB_YY_REMAP_PREFIX): Define.
4475 Include yy-remap.h. Don't redefine yy* identifiers.
4477 2018-06-01 Tom Tromey <tom@tromey.com>
4479 * python/py-type.c (typy_legacy_template_argument): Update.
4480 * cp-support.h (cp_demangled_name_to_comp): Update.
4481 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4482 parameter to be a "std::string *".
4485 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4487 * ada-lex.l: Include "diagnostics.h" instead of
4488 "common/diagnostics.h".
4489 * unittests/environ-selftests.c: Likewise.
4490 * common/diagnostics.h: Moved to ../include.
4492 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4494 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4495 to language_mode_manual while calling breakpoint_re_set_one.
4497 2018-06-01 Tom Tromey <tom@tromey.com>
4499 * valops.c (value_cast_structs, destructor_name_p): Update.
4500 * symtab.c (gdb_mangle_name): Update.
4501 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4503 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4504 (pascal_object_print_value_fields, pascal_object_print_value):
4506 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4507 * linespec.c (find_methods): Update.
4508 * gdbtypes.h (type_name_no_tag): Remove.
4509 (type_name_or_error): Rename from type_name_no_tag_or_error.
4510 * gdbtypes.c (type_name_no_tag): Remove.
4511 (type_name_or_error): Rename from type_name_no_tag_or_error.
4512 (lookup_struct_elt_type, check_typedef): Update.
4513 * expprint.c (print_subexp_standard): Update.
4514 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4515 * d-namespace.c (d_lookup_nested_symbol): Update.
4516 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4517 (cp_print_class_member): Update.
4518 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4519 * completer.c (add_struct_fields): Update.
4520 * c-typeprint.c (cp_type_print_derivation_info)
4521 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4523 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4524 (ada_prefer_type, ada_is_exception_sym): Update.
4526 2018-06-01 Tom Tromey <tom@tromey.com>
4528 * valops.c (enum_constant_from_type, value_namespace_elt)
4529 (value_maybe_namespace_elt): Update.
4530 * valarith.c (find_size_for_pointer_math): Update.
4531 * target-descriptions.c (make_gdb_type): Update.
4532 * symmisc.c (print_symbol): Update.
4533 * stabsread.c (define_symbol, read_type)
4534 (complain_about_struct_wipeout, add_undefined_type)
4535 (cleanup_undefined_types_1): Update.
4536 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4537 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4538 (rust_internal_print_type, rust_composite_type)
4539 (rust_evaluate_funcall, rust_evaluate_subexp)
4540 (rust_inclusive_range_type_p): Update.
4541 * python/py-type.c (typy_get_tag): Update.
4542 * p-typeprint.c (pascal_type_print_base): Update.
4543 * mdebugread.c (parse_symbol, parse_type): Update.
4544 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4546 * guile/scm-type.c (gdbscm_type_tag): Update.
4547 * go-lang.c (sixg_string_p): Update.
4548 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4550 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4551 (TYPE_TAG_NAME): Remove.
4552 * gdbtypes.c (type_name_no_tag): Simplify.
4553 (check_typedef, check_types_equal, recursive_dump_type)
4554 (copy_type_recursive, arch_composite_type): Update.
4555 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4556 in summary mode when needed.
4557 * eval.c (evaluate_funcall): Update.
4558 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4559 (process_structure_scope, read_enumeration_type)
4560 (read_namespace_type, read_module_type, determine_prefix): Update.
4561 * cp-support.c (inspect_type): Update.
4562 * coffread.c (process_coff_symbol, decode_base_type): Update.
4563 * c-varobj.c (c_is_path_expr_parent): Update.
4564 * c-typeprint.c (c_type_print_base_struct_union): Update.
4565 (c_type_print_base_1): Update. Print struct/class/union/enum in
4566 summary when using C language.
4567 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4568 (gen_maybe_namespace_elt): Update.
4569 * ada-lang.c (ada_type_name): Simplify.
4570 (empty_record, ada_template_to_fixed_record_type_1)
4571 (template_to_static_fixed_type)
4572 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4574 2018-06-01 Tom Tromey <tom@tromey.com>
4576 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4578 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4579 (c_print_type): Update.
4580 (c_print_type): New overload.
4581 (c_type_print_varspec_prefix, c_type_print_args)
4582 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4583 (c_type_print_base_struct_union, c_type_print_base_1)
4584 (cp_type_print_method_args): Add "language" parameter.
4585 (c_type_print_base): Update.
4586 * c-lang.h (c_print_type): Add new overload.
4588 2018-06-01 Tom Tromey <tom@tromey.com>
4590 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4591 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4593 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4595 * aarch64-tdep.c (aarch64_sve_register_names): New const
4597 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4598 (AARCH64_SVE_Z_REGS_NUM): New define.
4599 (AARCH64_SVE_P_REGS_NUM): Likewise.
4600 (AARCH64_SVE_NUM_REGS): Likewise.
4602 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4604 * nat/linux-ptrace.h [__alpha__]
4605 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4608 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4610 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4611 the endianness selected.
4612 * NEWS: Document `set endian auto' mode operation update.
4614 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4616 * Makefile.in: Add new header.
4617 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4618 (sve_vl_from_vg): Likewise.
4619 (sve_vq_from_vl): Likewise.
4620 (sve_vl_from_vq): Likewise.
4621 (sve_vq_from_vg): Likewise.
4622 (sve_vg_from_vq): Likewise.
4623 * configure.nat: Add new c file.
4624 * nat/aarch64-sve-linux-ptrace.c: New file.
4625 * nat/aarch64-sve-linux-ptrace.h: New file.
4627 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4629 * aarch64-linux-nat.c (aarch64_linux_read_description):
4631 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4633 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4634 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4635 (aarch64_gdbarch_init): Add parmeter zero.
4636 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4637 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4638 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4640 * doc/gdb.texinfo: Describe SVE feature
4641 * features/aarch64-sve.c: New file.
4643 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4646 * gdbarch.sh (significant_addr_bit): Default to zero when
4647 not set by target architecture.
4648 * gdbarch.c: Re-generated.
4649 * utils.c (address_significant): Update.
4651 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4653 * stack.c (func_command): Remove trailing newline in call to error.
4655 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4657 * regcache.h (regcache_raw_collect): Remove, update callers to
4658 use regcache::raw_collect.
4659 * regcache.c (regcache_raw_collect): Remove.
4661 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4663 * regcache.h (regcache_raw_supply): Remove, update callers to
4664 use detached_regcache::raw_supply.
4665 * regcache.c (regcache_raw_supply): Remove.
4667 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4669 * regcache.h (regcache_cooked_write_part): Remove, update
4670 callers to use regcache::cooked_write_part.
4671 * regcache.c (regcache_cooked_write_part): Remove.
4673 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4675 * regcache.h (regcache_cooked_read_part): Remove, update callers
4676 to use readable_regcache::cooked_read_part.
4677 * regcache.c (regcache_cooked_read_part): Remove.
4679 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4681 * regcache.h (regcache_cooked_read_value): Remove, update
4682 callers to use readable_regcache::cooked_read_value.
4683 * regcache.c (regcache_cooked_read_value): Remove.
4685 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4687 * regcache.h (regcache_cooked_write): Remove, update callers to
4688 use regcache::cooked_write.
4689 * regcache.c (regcache_cooked_write): Remove.
4691 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4693 * regcache.h (regcache_invalidate): Remove, update callers to
4694 use detached_regcache::invalidate instead.
4695 * regcache.c (regcache_invalidate): Remove.
4697 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4699 * regcache.h (regcache_raw_write_part): Remove, update callers
4700 to use regcache::raw_write_part instead.
4701 * regcache.c (regcache_raw_write_part): Remove.
4703 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4705 * regcache.h (regcache_raw_read_part): Remove, update callers to
4706 use readable_regcache::raw_read_part instead.
4707 * regcache.c (regcache_raw_read_part): Remove.
4709 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4711 * regcache.h (regcache_cooked_read): Remove, update callers to
4712 use readable_regcache::cooked_read instead.
4713 * regcache.c (regcache_cooked_read): Remove.
4715 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4717 * regcache.h (regcache_raw_write): Remove, update callers to use
4718 regcache::raw_write instead.
4719 * regcache.c (regcache_raw_write): Remove.
4721 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4723 * regcache.h (regcache_raw_read): Remove, update callers to use
4724 readable_regcache::raw_read instead.
4725 * regcache.c (regcache_raw_read): Remove.
4727 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4729 * regcache.h (regcache_raw_update): Remove, update callers to
4730 use readable_regcache::raw_update instead.
4731 * regcache.c (regcache_raw_update): Remove.
4733 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4735 * regcache.h (regcache_register_status): Remove, update callers
4736 to use reg_buffer::get_register_status directly instead.
4737 * regcache.c (regcache_register_status): Remove.
4739 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4741 * regcache.h (regcache_get_ptid): Remove, update all callers to
4742 call regcache::ptid instead.
4743 * regcache.c (regcache_get_ptid): Remove.
4745 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4747 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4749 2018-05-30 Pedro Alves <palves@redhat.com>
4751 * common/common-exceptions.h (exception_rethrow): Use
4754 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4756 * breakpoint.c (print_solib_event, check_status_catch_solib):
4757 Remove struct keyword in range-based for loops.
4758 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4759 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4761 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4763 * symfile.c (addr_info_make_relative): Likewise.
4764 * thread.c (value_in_thread_stack_temporaries): Likewise.
4766 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4769 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4770 aggregate type to get its real type before accessing it.
4772 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4774 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4775 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4776 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4777 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4778 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4779 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4780 * printcmd.c (info_address_command): Likewise.
4782 2018-05-29 Tom Tromey <tom@tromey.com>
4784 * windows-nat.c (handle_exception): Update fall-through comment.
4786 2018-05-29 Tom Tromey <tom@tromey.com>
4788 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4789 (struct program_space) <added_solibs>: Now a std::vector.
4790 * breakpoint.c (print_solib_event): Update.
4791 (check_status_catch_solib): Update.
4792 * progspace.c (clear_program_space_solib_cache): Update.
4793 * solib.c (update_solib_list): Update.
4795 2018-05-29 Tom Tromey <tom@tromey.com>
4797 * python/py-type.c (typy_richcompare): Update.
4798 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4799 * gdbtypes.h (types_deeply_equal): Return bool.
4800 (types_equal): Likewise.
4801 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4803 (check_types_equal): Change worklist to std::vector. Return
4805 (struct type_equality_entry): Add constructor.
4806 (compare_maybe_null_strings): Return bool.
4807 (check_types_worklist): Return bool. Change worklist to
4809 (types_deeply_equal): Use std::vector.
4810 (types_equal): Return bool.
4811 (compare_maybe_null_strings): Simplify.
4813 2018-05-29 Tom Tromey <tom@tromey.com>
4815 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4817 2018-05-29 Tom Tromey <tom@tromey.com>
4819 * objc-lang.h: Don't include cp-support.h.
4820 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4823 2018-05-27 Tom Tromey <tom@tromey.com>
4825 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4827 2018-05-25 Tom Tromey <tom@tromey.com>
4829 * value.c (value::location): Initialize.
4831 2018-05-25 Tom Tromey <tom@tromey.com>
4833 * dbxread.c (init_bincl_list): Remove.
4834 (bincl_list): Now a std::vector.
4835 (bincls_allocated, next_bincl): Remove.
4836 (free_bincl_list, do_free_bincl_list_cleanup)
4837 (make_cleanup_free_bincl_list): Remove.
4838 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4840 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4841 (struct header_file_location): Add constructor.
4842 (add_bincl_to_list): Remove.
4844 2018-05-25 Tom Tromey <tom@tromey.com>
4846 * tui/tui.c (tui_enable): Update.
4847 * mi/mi-interp.c (mi_interp::init): Update.
4848 * interps.h (class interp) <name>: New method.
4849 <m_name>: Rename from name.
4850 (~scoped_restore_interp): Update.
4851 * interps.c (interp::interp): Update.
4852 (interp_add, interp_set, interp_lookup_existing)
4853 (current_interp_named_p): Update.
4855 2018-05-25 Tom Tromey <tom@tromey.com>
4857 * interps.c (interp_name): Remove.
4858 * mi/mi-interp.c (mi_interp::init): Update.
4859 * interps.h (interp_name): Remove.
4860 (~scoped_restore_interp): Update.
4861 * tui/tui.c (tui_enable): Update.
4863 2018-05-25 Tom Tromey <tom@tromey.com>
4865 * utils.c (fputs_maybe_filtered): Update.
4866 * linespec.c (decode_line_full): Update.
4867 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4868 (mi_print_breakpoint_for_event, mi_solib_loaded)
4869 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4870 (mi_user_selected_context_changed): Update.
4871 * mi/mi-main.c (mi_execute_command): Update.
4872 * cli/cli-script.c (execute_control_command): Update.
4873 * python/python.c (execute_gdb_command): Update.
4874 * solib.c (info_sharedlibrary_command): Update.
4875 * interps.c (interp_ui_out): Remove.
4876 * interps.h (interp_ui_out): Remove.
4878 2018-05-25 Tom Tromey <tom@tromey.com>
4880 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4881 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4882 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4884 2018-05-25 Tom Tromey <tom@tromey.com>
4886 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4887 * interps.c (interp_exec): Use scoped_restore.
4889 2018-05-25 Tom Tromey <tom@tromey.com>
4891 * remote.c (remote_target::remote_file_get): Use
4893 (remote_target::remote_file_put): Likewise.
4895 2018-05-25 Tom Tromey <tom@tromey.com>
4897 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4899 (get_pe_section_index, add_pe_exported_sym): Update.
4900 (read_pe_exported_syms): Use gdb::def_vector.
4902 2018-05-25 Tom Tromey <tom@tromey.com>
4904 * frame.c (remove_prev_frame): Remove.
4905 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4907 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4909 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4911 * mips-linux-nat.c (supply_fpregset): Always call
4912 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4913 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4914 `mips_fill_fpregset'.
4915 * mips-linux-tdep.c (mips_supply_fpregset)
4916 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4917 (mips_fill_fpregset_wrapper): Remove functions.
4918 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4919 (mips_linux_fpregset): Remove variable.
4920 (mips_linux_iterate_over_regset_sections): Use
4921 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4922 (mips_linux_o32_sigframe_init): Remove comment.
4924 2018-05-25 Pedro Alves <palves@redhat.com>
4926 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4927 (struct readahead_cache, struct packet_reg, struct
4928 remote_arch_state, class remote_state): Move higher up in the
4930 (remote_target::m_remote_state): Now an object instead of a pointer.
4931 (remote_target::get_remote_state): Adjust.
4933 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4935 * stack.c (select_and_print_frame): Delete.
4936 (struct function_bounds): Move struct within function.
4937 (func_command): Most content moved into new function
4938 find_frame_for_function, use new function, print result, add
4940 (find_frame_for_function): New function, now returns a result.
4942 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4944 * stack.c (iterate_over_block_arg_vars): Fix comment.
4945 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4947 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4951 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4953 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4955 * frame.h (class scoped_restore_selected_frame): New class.
4956 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4957 of any exception, use scoped_restore_selected_frame to restore the
4960 2018-05-24 Pedro Alves <palves@redhat.com>
4962 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4965 2018-05-23 Tom Tromey <tom@tromey.com>
4967 * complaints.c (struct complaints): Remove.
4968 (symfile_complaint_book): Remove.
4969 (series): New global.
4970 (complaint_internal): Update.
4971 (clear_complaints): Update.
4973 2018-05-23 Tom Tromey <tom@tromey.com>
4975 * complaints.c (counters): New global.
4976 (struct complain): Remove.
4977 (struct complaints) <root>: Remove.
4978 (complaint_sentinel): Remove.
4979 (symfile_complaint_book): Update.
4980 (find_complaint) Remove.
4981 (complaint_internal, clear_complaints): Update.
4983 2018-05-23 Tom Tromey <tom@tromey.com>
4985 * complaints.c (struct complain) <file, line>: Remove.
4986 (find_complaint): Remove file, line parameters.
4987 (complaint_internal): Update.
4989 2018-05-23 Tom Tromey <tom@tromey.com>
4991 * complaints.c (vcomplaint): Remove.
4992 (complaint_internal) Merge in contents of vcomplaint.
4994 2018-05-23 Tom Tromey <tom@tromey.com>
4996 * complaints.c (struct complaints) <explanation>: Remove.
4997 (symfile_explanations): Remove.
4998 (symfile_complaint_book): Update.
4999 (vcomplaint): Update.
5000 (struct explanation): Remove.
5002 2018-05-23 Tom Tromey <tom@tromey.com>
5004 * complaints.c (symfile_complaints): Remove.
5005 (complaint_internal): Remove "complaints" parameter.
5006 (clear_complaints, vcomplaint): Remove "c" parameter.
5007 (get_complaints): Remove.
5008 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5009 (dwarf2_debug_line_missing_file_complaint)
5010 (dwarf2_debug_line_missing_end_sequence_complaint)
5011 (dwarf2_complex_location_expr_complaint)
5012 (dwarf2_const_value_length_mismatch_complaint)
5013 (dwarf2_section_buffer_overflow_complaint)
5014 (dwarf2_macro_malformed_definition_complaint)
5015 (dwarf2_invalid_attrib_class_complaint)
5016 (create_addrmap_from_index, dw2_symtab_iter_next)
5017 (dw2_expand_marked_cus)
5018 (dw2_debug_names_iterator::find_vec_in_debug_names)
5019 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5020 (create_debug_type_hash_table, init_cutu_and_read_dies)
5021 (partial_die_parent_scope, add_partial_enumeration)
5022 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5023 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5024 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5025 (create_cus_hash_table, create_dwp_hash_table)
5026 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5027 (dwarf2_rnglists_process, dwarf2_ranges_process)
5028 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5029 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5030 (handle_struct_member_die, process_structure_scope)
5031 (read_array_type, read_common_block, read_module_type)
5032 (read_tag_pointer_type, read_typedef, read_base_type)
5033 (read_subrange_type, load_partial_dies, partial_die_info::read)
5034 (partial_die_info::read, partial_die_info::read)
5035 (partial_die_info::read, read_checked_initial_length_and_offset)
5036 (dwarf2_string_attr, read_formatted_entries)
5037 (dwarf_decode_line_header)
5038 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5039 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5040 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5041 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5042 (get_signatured_type, get_DW_AT_signature_type)
5043 (decode_locdesc, file_file_name, consume_improper_spaces)
5044 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5045 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5046 (dwarf2_symbol_mark_computed, set_die_type)
5047 (read_attribute_value): Update.
5048 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5050 * dbxread.c (unknown_symtype_complaint)
5051 (lbrac_mismatch_complaint, repeated_header_complaint)
5052 (set_namestring, function_outside_compilation_unit_complaint)
5053 (read_dbx_symtab, process_one_symbol): Update.
5054 * gdbtypes.c (stub_noname_complaint): Update.
5055 * windows-nat.c (handle_unload_dll): Update.
5056 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5057 (decode_base_type): Update.
5058 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5059 (eb_complaint, record_include_begin, record_include_end)
5060 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5061 (process_xcoff_symbol, read_symbol)
5062 (function_outside_compilation_unit_complaint)
5063 (scan_xcoff_symtab): Update.
5064 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5065 * buildsym.c (finish_block_internal, make_blockvector)
5066 (end_symtab_get_static_block, augment_type_symtab): Update.
5067 * dtrace-probe.c (dtrace_process_dof)
5068 (dtrace_static_probe_ops::get_probes): Update.
5069 * complaints.h (struct complaint): Don't declare.
5070 (symfile_complaints): Remove.
5071 (complaint_internal): Remove "complaints" parameter.
5072 (complaint): Likewise.
5073 (clear_complaints): Likewise.
5074 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5075 (reread_symbols): Update.
5076 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5077 (dwarf2_frame_cache, decode_frame_entry): Update.
5078 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5079 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5080 (info_selectors_command): Update.
5081 * macrotab.c (macro_include, check_for_redefinition)
5082 (macro_undef): Update.
5083 * objfiles.c (filter_overlapping_sections): Update.
5084 * stabsread.c (invalid_cpp_abbrev_complaint)
5085 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5086 (define_symbol, error_type, read_type, rs6000_builtin_type)
5087 (stabs_method_name_from_physname, read_member_functions)
5088 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5089 (attach_fields_to_type, complain_about_struct_wipeout)
5090 (read_range_type, read_args, common_block_start)
5091 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5093 * mdebugread.c (index_complaint, unknown_ext_complaint)
5094 (basic_type_complaint, bad_tag_guess_complaint)
5095 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5096 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5097 (parse_procedure, parse_lines)
5098 (function_outside_compilation_unit_complaint)
5099 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5100 (bad_tag_guess_complaint, reg_value_complaint): Update.
5101 * cp-support.c (demangled_name_complaint): Update.
5102 * macroscope.c (sal_macro_scope): Update.
5103 * dwarf-index-write.c (class debug_names): Update.
5105 2018-05-23 Tom Tromey <tom@tromey.com>
5107 * complaints.c (clear_complaints): Remove "noisy" parameter.
5108 * complaints.h (clear_complaints): Update.
5109 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5110 (reread_symbols): Update.
5112 2018-05-23 Tom Tromey <tom@tromey.com>
5114 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5116 (vcomplaint, clear_complaints): Update.
5117 (symfile_explanations): Remove some messages.
5119 2018-05-23 Tom Tromey <tom@tromey.com>
5121 * complaints.c (internal_complaint): Remove.
5122 * complaints.h (internal_complaint): Remove.
5124 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5126 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5128 2018-05-22 Pedro Alves <palves@redhat.com>
5130 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5131 (remote_fileio_badfd, remote_fileio_return_errno)
5132 (remote_fileio_return_success, remote_fileio_func_open)
5133 (remote_fileio_func_open, remote_fileio_func_close)
5134 (remote_fileio_func_read, remote_fileio_func_write)
5135 (remote_fileio_func_lseek, remote_fileio_func_rename)
5136 (remote_fileio_func_unlink, remote_fileio_func_stat)
5137 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5138 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5139 remote_target parameter.
5140 (remote_fio_func_map) <func>: Add remote_target parameter.
5141 (do_remote_fileio_request, remote_fileio_request):
5142 * remote-fileio.h (remote_fileio_request):
5143 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5144 remote_target parameter.
5145 (remote_notif_process, handle_notification): Adjust to pass down
5147 (remote_notif_state_allocate): Add remote_target parameter. Save
5149 * remote-notif.h (struct remote_target): Forward declare.
5150 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5151 remote_target parameter.
5152 (struct remote_notif_state) <remote>: New field.
5153 (remote_notif_ack, remote_notif_parse): Add remote_target
5155 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5156 remote_target parameter.
5157 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5158 (threads_listing_context, rmt_thread_action, protocol_feature)
5159 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5160 (packet_result, struct threads_listing_context, remote_state):
5161 Move definitions and declarations higher up.
5162 (remote_target) <~remote_target>: Declare.
5163 (remote_download_command_source, remote_file_put, remote_file_get)
5164 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5165 (remote_hostio_pread_vFile, remote_hostio_send_command)
5166 (remote_hostio_set_filesystem, remote_hostio_open)
5167 (remote_hostio_close, remote_hostio_unlink, remote_state)
5168 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5169 (get_memory_write_packet_size, get_memory_read_packet_size)
5170 (append_pending_thread_resumptions, remote_detach_1)
5171 (append_resumption, remote_resume_with_vcont)
5172 (add_current_inferior_and_thread, wait_ns, wait_as)
5173 (process_stop_reply, remote_notice_new_inferior)
5174 (process_initial_stop_replies, remote_add_thread)
5175 (btrace_sync_conf, remote_btrace_maybe_reopen)
5176 (remove_new_fork_children, kill_new_fork_children)
5177 (discard_pending_stop_replies, stop_reply_queue_length)
5178 (check_pending_events_prevent_wildcard_vcont)
5179 (discard_pending_stop_replies_in_queue, stop_reply)
5180 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5181 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5182 (remote_interrupt_as, remote_interrupt_ns)
5183 (remote_get_noisy_reply, remote_query_attached)
5184 (remote_add_inferior, remote_current_thread, get_current_thread)
5185 (set_thread, set_general_thread, set_continue_thread)
5186 (set_general_process, write_ptid)
5187 (remote_unpack_thread_info_response, remote_get_threadinfo)
5188 (parse_threadlist_response, remote_get_threadlist)
5189 (remote_threadlist_iterator, remote_get_threads_with_ql)
5190 (remote_get_threads_with_qxfer)
5191 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5192 (get_offsets, remote_check_symbols, remote_supported_packet)
5193 (remote_query_supported, remote_packet_size)
5194 (remote_serial_quit_handler, remote_detach_pid)
5195 (remote_vcont_probe, remote_resume_with_hc)
5196 (send_interrupt_sequence, interrupt_query)
5197 (remote_notif_get_pending_events, fetch_register_using_p)
5198 (send_g_packet, process_g_packet, fetch_registers_using_g)
5199 (store_register_using_P, store_registers_using_G)
5200 (set_remote_traceframe, check_binary_download)
5201 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5202 (remote_xfer_live_readonly_partial, remote_read_bytes)
5203 (remote_send_printf, remote_flash_write, readchar)
5204 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5205 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5206 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5207 (extended_remote_disable_randomization, extended_remote_run)
5208 (send_environment_packet, extended_remote_environment_support)
5209 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5210 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5211 (packet_command): Now methods of ...
5212 (remote_target): ... this class.
5213 (m_remote_state) <remote_target>: New field.
5214 (struct remote_state) <stop_reply_queue,
5215 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5217 (remote_state::remote_state): Allocate stop_reply_queue.
5218 (remote_state): Delete global.
5219 (get_remote_state_raw): Delete.
5220 (remote_target::get_remote_state): Allocate m_remote_state on
5222 (get_current_remote_target): New.
5223 (remote_ops, extended_remote_ops): Delete.
5224 (wait_forever_enabled_p, remote_async_inferior_event_token):
5225 Delete, moved to struct remote_state.
5226 (remote_target::close): Delete self. Destruction bits split to
5228 (remote_target::~remote_target): ... this.
5229 (show_memory_packet_size): Adjust to use
5230 get_current_remote_target.
5231 (struct protocol_feature) <func>: Add remote_target parameter.
5232 All callers adjusted.
5233 (curr_quit_handler_target): New.
5234 (remote_serial_quit_handler): Reimplement.
5235 (remote_target::open_1): Adjust to use get_current_remote_target.
5236 Heap-allocate remote_target/extended_remote_target instances.
5237 (vcont_builder::vcont_builder): Add remote_target parameter, and
5238 save it in m_remote. All callers adjusted.
5239 (vcont_builder::m_remote): New field.
5240 (vcont_builder::restart, vcont_builder::flush)
5241 (vcont_builder::push_action): Use it.
5242 (remote_target::commit_resume): Use it.
5243 (struct queue_iter_param) <remote>: New field.
5244 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5245 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5246 (check_pending_event_prevents_wildcard_vcont_callback)
5247 (remote_target::check_pending_events_prevent_wildcard_vcont)
5248 (remote_target::discard_pending_stop_replies)
5249 (remote_target::discard_pending_stop_replies_in_queue)
5250 (remote_target::remote_notif_remove_queued_reply): Fill in
5252 (remote_notif_get_pending_events): New.
5253 (remote_target::readchar, remote_target::remote_serial_write):
5254 Save/restore curr_quit_handler_target.
5256 (kill_new_fork_children): Fill in 'remote' field.
5257 (packet_command): Use get_current_remote_target, defer to
5258 remote_target method of same name.
5259 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5260 parameter, and save it in m_remote. All callers adjusted.
5261 (scoped_remote_fd::release): Use m_remote.
5262 (scoped_remote_fd::m_remote): New field.
5263 (remote_file_put, remote_file_get, remote_file_delete): Use
5264 get_current_remote_target, defer to remote_target method of same
5266 (remote_btrace_reset): Add remote_state paremeter. Update all
5268 (remote_async_inferior_event_handler). Pass down 'data'.
5269 (remote_new_objfile): Use get_current_remote_target.
5270 (remote_target::vcont_r_supported): New.
5271 (set_range_stepping): Use get_current_remote_target and
5272 remote_target::vcont_r_supported.
5273 (_initialize_remote): Don't allocate 'remote_state' and
5274 'stop_reply_queue' globals.
5275 * remote.h (struct remote_target): Forward declare.
5276 (getpkt, putpkt, remote_notif_get_pending_events): Add
5277 'remote_target' parameter.
5279 2018-05-22 Pedro Alves <palves@redhat.com>
5281 * remote.c (vcont_builder): Now a class. Make all data members
5283 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5285 (vcont_builder_restart): Rename to ...
5286 (vcont_builder::restart): ... this.
5287 (vcont_builder_flush): Rename to ...
5288 (vcont_builder::flush): ... this.
5289 (vcont_builder_push_action): Rename to ...
5290 (vcont_builder::push_action): ... this.
5291 (remote_target::commit_resume): Adjust.
5293 2018-05-22 Pedro Alves <palves@redhat.com>
5295 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5296 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5297 (get_fixed_memory_packet_size): New.
5298 (get_memory_packet_size): Use it.
5299 (set_memory_packet_size): Don't override the config size with
5300 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5301 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5302 Don't refer to get_memory_packet_size if not connected to a remote
5303 target. Show "(default)" if configured size is 0.
5305 2018-05-22 Pedro Alves <palves@redhat.com>
5307 * remote.c (remote_target::mourn_inferior): Move
5308 discard_pending_stop_replies call here from ...
5309 (_initialize_remote): ... here.
5311 2018-05-22 Pedro Alves <palves@redhat.com>
5313 * remote.c (compare_section_command): Remove set_general_process
5316 2018-05-22 Pedro Alves <palves@redhat.com>
5318 * remote.c (struct packet_reg, struct remote_arch_state):
5319 Move higher up in the file.
5320 (remote_state) <m_arch_states>: Store remote_arch_state values
5321 instead of remote_arch_state pointers.
5322 (remote_state::get_remote_arch_state): Adjust.
5324 2018-05-22 Pedro Alves <palves@redhat.com>
5326 * remote.c: Include <unordered_map>.
5327 (remote_state): Now a class.
5328 (remote_state) <get_remote_arch_state>: Declare method.
5329 <get_remote_arch_state>: New field.
5330 (remote_arch_state) <remote_arch_state>: Declare ctor.
5331 <regs>: Now a unique_ptr.
5332 (remote_gdbarch_data_handle): Delete.
5333 (get_remote_arch_state): Delete.
5334 (remote_state::get_remote_arch_state): New.
5335 (get_remote_state): Adjust to call remote_state's
5336 get_remote_arch_state method.
5337 (init_remote_state): Delete, bits factored out to ...
5338 (remote_arch_state::remote_arch_state): ... this new method.
5339 (get_remote_packet_size, get_memory_packet_size)
5340 (process_g_packet, remote_target::fetch_registers)
5341 (remote_target::prepare_to_store, store_registers_using_G)
5342 (remote_target::store_registers, remote_target::get_trace_status):
5343 Adjust to call remote_state's method.
5344 (_initialize_remote): Remove reference to
5345 remote_gdbarch_data_handle.
5347 2018-05-22 Pedro Alves <palves@redhat.com>
5349 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5350 pread>: New method declarations.
5351 (remote_target::open_1): Adjust.
5352 (readahead_cache_invalidate): Rename to ...
5353 (readahead_cache::invalidate): ... this, and adjust to be a class
5355 (readahead_cache_invalidate_fd): Rename to ...
5356 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5358 (remote_hostio_pwrite): Adjust.
5359 (remote_hostio_pread_from_cache): Rename to ...
5360 (readahead_cache::pread): ... this, and adjust to be a class
5362 (remote_hostio_close): Adjust.
5364 2018-05-22 Pedro Alves <palves@redhat.com>
5366 * remote.c (remote_hostio_close_cleanup): Delete.
5367 (class scoped_remote_fd): New.
5368 (remote_file_put, remote_file_get): Use it.
5370 2018-05-22 Pedro Alves <palves@redhat.com>
5372 (struct vCont_action_support): Use bool and initialize all fields.
5373 (struct readahead_cache): Initialize all fields.
5374 (remote_state): Use bool and initialize all fields.
5375 (remote_state::remote_state, remote_state::~remote_state): New.
5376 (new_remote_state): Delete.
5377 (_initialize_remote): Use new to allocate remote_state.
5379 2018-05-22 Pedro Alves <palves@redhat.com>
5383 * c-exp.y: Include "c-support.h".
5384 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5385 of tolower. Use c_ident_is_alpha to scan names.
5386 * c-lang.c: Include "c-support.h".
5387 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5388 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5389 * c-support.h: New file, with bits factored out from ...
5390 * cp-name-parser.y: ... this file.
5391 Include "c-support.h".
5392 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5393 c-support.h and renamed.
5394 (symbol_end, yylex): Adjust.
5396 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5398 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5399 parameter type to CORE_ADDR.
5400 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5401 parameter type in declaration to CORE_ADDR.
5402 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5403 target_auxv_search to get AT_HWCAP and use the result to get the
5405 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5406 to CORE_ADDR. Remove the cast of the return value to unsigned
5407 long. Fix error predicate of target_auxv_search.
5408 (ppc_linux_nat_target::read_description): Change the type of the
5409 hwcap variable to CORE_ADDR.
5411 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5413 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5414 if the size of fpscr is larger than 32 bits.
5416 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5418 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5419 (ppc32_linux_vsxregmap): New global.
5420 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5421 regcache_supply_regset, and regcache_collect_regset.
5422 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5423 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5424 (fetch_vsx_register, store_vsx_register): Remove.
5425 (fetch_vsx_registers): Add regno parameter. Get regset using
5426 ppc_linux_vsxregset. Use regset to supply registers.
5427 (store_vsx_registers): Add regno parameter. Get regset using
5428 ppc_linux_vsxregset. Use regset to collect registers.
5429 (fetch_register): Call fetch_vsx_registers instead of
5431 (store_register): Call store_vsx_registers instead of
5433 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5434 new regno parameter.
5435 (store_ppc_registers): Call store_vsx_registers with -1 for the
5436 new regno parameter.
5437 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5438 (ppc_collect_vsxregset): Remove.
5440 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5442 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5444 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5445 for vector register offset fields.
5446 (ppc64_fbsd_reg_offsets): Likewise.
5447 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5448 to vector register offset fields.
5449 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5450 to vector register offset fields.
5451 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5452 vector register offset fields.
5453 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5454 initializers for vector register offset fields.
5455 (rs6000_aix64_reg_offsets): Likewise.
5456 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5457 (ppc_supply_vrregset): Remove.
5458 (ppc_collect_vrregset): Remove.
5459 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5460 (ppc_linux_vrregset) : New function.
5461 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5462 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5463 (ppc32_linux_vrregset): Remove.
5464 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5465 and use result instead of ppc32_linux_vrregset.
5466 (ppc32_linux_reg_offsets): Remove initializers for vector register
5468 (ppc64_linux_reg_offsets): Likewise.
5469 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5470 * ppc-linux-nat.c: Include regset.h.
5471 (gdb_vrregset_t): Adjust comment to account for little-endian
5473 (supply_vrregset, fill_vrregset): Remove.
5474 (fetch_altivec_register, store_altivec_register): Remove.
5475 (fetch_altivec_registers): Add regno parameter. Get regset using
5476 ppc_linux_vrregset. Use regset to supply registers.
5477 (store_altivec_registers): Add regno parameter. Get regset using
5478 ppc_linux_vrregset. Use regset to collect registers.
5479 (fetch_register): Call fetch_altivec_registers instead of
5480 fetch_altivec_register.
5481 (store_register): Call store_altivec_registers instead of
5482 store_altivec_register.
5483 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5484 the new regno parameter.
5485 (store_ppc_registers): Call store_altivec_registers with -1 for
5486 the new regno parameter.
5488 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5490 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5491 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5492 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5493 (gdb_vrregset_t): Change array type size to
5494 PPC_LINUX_SIZEOF_VRREGSET.
5495 (gdb_vsxregset_t): Change array type size to
5496 PPC_LINUX_SIZEOF_VSXREGSET.
5497 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5498 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5499 PPC_LINUX_SIZEOF_VSXREGSET.
5501 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5503 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5504 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5506 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5507 ppc_linux_target_wordsize with tid.
5508 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5510 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5511 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5512 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5513 tid parameter. Remove static specifier.
5514 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5515 (ppc_linux_target_wordsize): New declaration.
5517 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5519 * arch/ppc-linux-common.c: New file.
5520 * arch/ppc-linux-common.h: New file.
5521 * arch/ppc-linux-tdesc.h: New file.
5522 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5523 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5524 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5525 arch/ppc-linux-tdesc.h.
5526 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5527 arch/ppc-linux-tdesc.h.
5528 (ppc_linux_nat_target::read_description): Remove target
5529 description matching code. Fill a ppc_linux_features struct and
5530 call ppc_linux_match_description with it. Move comment about ISA
5531 2.05 to ppc-linux-common.c.
5532 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5533 arch/ppc-linux-tdesc.h.
5534 (ppc_linux_core_read_description): Remove target description
5535 matching code. Fill a ppc_linux_features struct and call
5536 ppc_linux_match_description with it.
5537 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5538 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5539 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5540 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5541 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5542 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5543 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5544 (tdesc_powerpc_e500l): Remove.
5546 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5548 * ada-lang.c (catch_assert_command): Pass empty string instead
5549 of NULL for excep_string argument.
5551 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5553 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5554 the width of the requested register exceeds the width of the
5557 2018-05-21 Tom Tromey <tom@tromey.com>
5559 * printcmd.c (output_command): Remove.
5560 (output_command_const): Rename to output_command.
5561 * valprint.h (output_command): Rename from output_command_const.
5562 * tracepoint.c (trace_dump_actions): Call output_command.
5564 2018-05-21 Tom Tromey <tom@tromey.com>
5566 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5567 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5568 * ada-lang.h (create_ada_exception_catchpoint): Update.
5569 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5571 (create_excep_cond_exprs, ~ada_catchpoint)
5572 (should_stop_exception, print_one_exception)
5573 (print_mention_exception, print_recreate_exception): Update.
5574 (ada_get_next_arg): Remove.
5575 (catch_ada_exception_command_split): Use std::string. Change type
5576 of "excep_string", "cond_string".
5577 (catch_ada_exception_command): Update.
5578 (create_ada_exception_catchpoint): Change type of excep_string.
5579 (ada_exception_sal): Remove excep_string parameter.
5580 (~ada_catchpoint): Remove.
5582 2018-05-21 Tom Tromey <tom@tromey.com>
5584 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5587 2018-05-21 Tom Tromey <tom@tromey.com>
5589 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5590 Return unique_xmalloc_ptr.
5591 (print_it_exception): Update.
5593 2018-05-21 Tom Tromey <tom@tromey.com>
5595 * tracepoint.c (trace_dump_actions): Use std::string.
5597 2018-05-21 Tom Tromey <tom@tromey.com>
5599 * symfile.c (reread_symbols): Use std::string for original_name.
5601 2018-05-21 Tom Tromey <tom@tromey.com>
5603 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5604 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5607 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5609 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5611 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5612 * objfiles.c (get_objfile_bfd_data): Allocate
5613 objfile_per_bfd_storage with obstack_new when allocating on
5616 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5618 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5620 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5621 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5622 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5623 (add_pending): Likewise.
5624 (parse_symbol): Likewise.
5625 (parse_partial_symbols): Likewise.
5626 (psymtab_to_symtab_1): Likewise.
5627 (new_psymtab): Likewise.
5628 (elfmdebug_build_psymtabs): Likewise.
5629 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5630 * objfiles.c (get_objfile_bfd_data): Likewise.
5631 (objfile_register_static_link): Likewise.
5632 * psymtab.c (allocate_psymtab): Likewise.
5633 * stabsread.c (read_member_functions): Likewise.
5634 * xcoffread.c (xcoff_end_psymtab): Likewise.
5636 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5638 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5639 compiler supports std::is_trivially_constructible.
5640 * common/poison.h: Include obstack.h.
5641 (IsMallocable): Define to is_trivially_constructible if the
5642 compiler supports it, define to true_type otherwise.
5646 (XOBNEWVEC): Redefine.
5647 * gdb_obstack.h (obstack_zalloc): New.
5648 (OBSTACK_ZALLOC): Redefine.
5649 (obstack_calloc): New.
5650 (OBSTACK_CALLOC): Redefine.
5652 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5653 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5655 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5656 obstack_calloc/obstack_zalloc.
5657 (gdbarch_obstack_zalloc): Remove.
5658 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5660 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5662 * stack.c (backtrace_command_1): Remove useless variable int i.
5664 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5666 * stack.c (print_frame_info): Fix comment.
5668 2018-05-18 Tom Tromey <tom@tromey.com>
5670 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5671 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5672 (~dwarf2_per_objfile): Update
5673 (dwarf2_get_dwz_file): Use new.
5674 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5677 2018-05-18 Tom Tromey <tom@tromey.com>
5679 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5681 * dwarf2read.c (struct dwp_file): Add constructor and
5683 (open_and_init_dwp_file): Return a unique_ptr.
5684 (dwarf2_per_objfile, create_dwp_hash_table)
5685 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5686 (lookup_dwo_unit_in_dwp): Update.
5687 (open_and_init_dwp_file, get_dwp_file): Update.
5689 2018-05-18 Tom Tromey <tom@tromey.com>
5691 * dwarf2read.c (dwarf2_per_objfile): Update.
5692 (struct mapped_index): Add initializers.
5693 (dwarf2_read_index): Use new.
5694 (dw2_symtab_iter_init): Update.
5695 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5698 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5700 * dwarf2read.c (mapped_index) <total_size>: Remove.
5702 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5704 * unittests/format_pieces-selftests.c (test_format_specifier):
5707 2018-05-18 Tom Tromey <tom@tromey.com>
5709 * c-typeprint.c (maybe_print_hole): New function.
5710 (c_print_type_struct_field_offset): Update.
5711 (c_type_print_base_struct_union): Call maybe_print_hole.
5713 2018-05-17 Keith Seitz <keiths@redhat.com>
5715 * breakpoint.c (build_bpstat_chain): New function, moved from
5717 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5718 If no stop chain is passed, call build_bpstat_chain to build it.
5719 * breakpoint.h (build_bpstat_chain): Declare.
5720 (bpstat_stop_status): Move documentation here from breakpoint.c.
5721 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5722 build the stop chain and pass it to skip_inline_frames.
5723 Pass this stop chain to bpstat_stop_status.
5724 * inline-frame.c: Include breakpoint.h.
5725 (stopped_by_user_bp_inline_frame): New function.
5726 (skip_inline_frames): Add parameter `stop_chain'.
5727 Move documention to inline-frame.h.
5728 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5729 whether the frame should be elided.
5730 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5731 Add moved documentation and update for new parameter.
5733 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5736 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5737 unittests/format_pieces-selftests.c.
5738 * common/format.h (format_piece) <operator==>: New.
5739 (format_pieces) <operator[]>: Remove.
5740 * common/format.c (format_pieces::format_pieces): Handle \e.
5741 * unittests/format_pieces-selftests.c: New.
5743 2018-05-17 Tom Tromey <tom@tromey.com>
5746 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5747 (dw2_instantiate_symtab): Add skip_partial parameter.
5748 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5749 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5750 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5751 (dw2_expand_symtabs_matching_one)
5752 (dw2_find_pc_sect_compunit_symtab)
5753 (dw2_debug_names_lookup_symbol)
5754 (dw2_debug_names_expand_symtabs_for_function): Update.
5755 (init_cutu_and_read_dies): Add skip_partial parameter.
5756 (process_psymtab_comp_unit, build_type_psymtabs_1)
5757 (process_skeletonless_type_unit, load_partial_comp_unit)
5758 (psymtab_to_symtab_1): Update.
5759 (load_full_comp_unit): Add skip_partial parameter.
5760 (process_imported_unit_die, dwarf2_read_addr_index)
5761 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5762 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5763 (read_signatured_type): Update.
5765 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5767 * value.c (release_value): Remove unused variable.
5768 (record_latest_value): Likewise.
5769 (access_value_history): Likewise.
5770 (preserve_values): Likewise.
5772 2018-05-17 Tom Tromey <tom@tromey.com>
5774 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5777 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5780 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5781 Also handle registers whose width is not a multiple of
5783 (linux_nat_trad_target::store_register): Likewise.
5785 2018-05-16 Tom Tromey <tom@tromey.com>
5787 * gdbcore.h (core_bfd): Redefine.
5788 * corelow.c (core_target::close): Update.
5789 (core_target_open): Update.
5790 * progspace.h (struct program_space) <cbfd>: Now a
5793 2018-05-16 Tom Tromey <tom@tromey.com>
5796 * symfile-add-flags.h (enum symfile_add_flags)
5797 <SYMFILE_NOT_FILENAME>: New constant.
5798 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5799 objfile name from BFD.
5800 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5801 * minidebug.c (find_separate_debug_file_in_section): Put
5802 ".gnu_debugdata" into BFD's file name.
5804 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5806 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5809 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5812 * aarch64-tdep.c (aarch64_analyze_prologue,
5813 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5814 Indicate not interested in errors.
5816 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5818 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5819 Supply the MIPS_ZERO_REGNUM register.
5821 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5823 * mips-tdep.c (mask_address_var): Make variable static.
5825 2018-05-14 Tom Tromey <tom@tromey.com>
5827 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5829 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5831 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5832 FXSAVE_ADDR for the mxcsr register.
5834 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5836 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5838 2018-05-11 Pedro Alves <palves@redhat.com>
5840 * corelow.c (core_target) <core_target>: No longer inline.
5841 Initialize m_core_gdbarch, m_core_vec and build the section table
5843 <~core_target>: New.
5844 <core_gdbarch, get_core_register_section>: New methods.
5845 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5846 factored out from ...
5847 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5849 (sniff_core_bfd): Add gdbarch parameter.
5850 (core_close): Delete, merged into ...
5851 (core_target::close): ... here. Delete self.
5852 (core_close_cleanup): Delete.
5853 (core_target_open): Allocate a core_target on the heap. Use a
5854 unique_ptr instead of a cleanup. Bits moved into the core_target
5855 ctor. Adjust to use core_target methods instead of globals.
5856 (get_core_register_section): Rename to ...
5857 (core_target::get_core_register_section): ... this and adjust.
5858 (struct get_core_registers_cb_data): New.
5859 (get_core_registers_cb): Use it. Use bool.
5860 (core_target::fetch_registers, core_target::files_info)
5861 (core_target::xfer_partial, core_target::read_description)
5862 (core_target::pid_to, core_target::thread_name): Adjust to
5863 reference class fields instead of globals.
5864 * target.h (struct target_ops_deleter, target_ops_up): New.
5866 2018-05-11 Pedro Alves <palves@redhat.com>
5868 * corefile.c (core_file_command): Move to corelow.c.
5869 * corelow.c (the_core_target): Delete.
5870 (core_file_command): Moved from corefile.c. Check exec_bfd
5871 instead of the_core_target. Use target_detach instead of calling
5872 into the_core_target directly.
5873 (maybe_say_no_core_file_now): New.
5874 (core_target::detach): Use it.
5875 (_initialize_corelow): Remove references to the_core_target.
5876 * gdbcore.h (the_core_target): Delete.
5878 2018-05-11 Tom Tromey <tromey@redhat.com>
5879 Pedro Alves <palves@redhat.com>
5881 * corefile.c (core_bfd): Remove.
5882 * gdbcore.h (core_bfd): Now a macro.
5883 * progspace.h (struct program_space) <cbfd>: New field.
5885 2018-05-11 Tom Tromey <tom@tromey.com>
5887 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5890 2018-05-10 Tom Tromey <tom@tromey.com>
5892 * configure: Rebuild.
5893 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5895 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5898 * regformats/regdat.sh: Adjust script, following the addition
5899 of the new expedite_regs parameter to init_target_desc.
5901 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5904 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5905 set_gdbarch_significant_addr_bit.
5906 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5907 set_gdbarch_significant_addr_bit.
5908 * utils.c (address_significant): Update to sign extend addr.
5910 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5912 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5913 (xtensa_linux_init_abi): Limit tdep->num_regs by
5914 tdep->num_nopriv_regs.
5915 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5916 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5919 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5921 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5923 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5925 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5926 (I387_MXCSR_INIT_VAL): New constant.
5927 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5928 buffer if it was supplied by the inferior.
5929 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5930 (i387_xsave_get_clear_bv): New function.
5931 (i387_supply_xsave): Only read x87 control registers from the
5932 xsave buffer if the feature is enabled, and the state will have
5933 been written, otherwise, provide a suitable default.
5934 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5935 including x87 control registers. Update control registers if they
5936 have changed from the default value, and mark features as enabled
5938 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5940 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5942 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5944 2018-05-07 Tom Tromey <tom@tromey.com>
5946 * configure: Rebuild.
5947 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5949 2018-05-07 Tom Tromey <tom@tromey.com>
5952 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5953 bit. Use correct value for VDIV.
5955 2018-05-04 Tom Tromey <tom@tromey.com>
5957 * configure: Rebuild.
5958 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5960 2018-05-04 Tom Tromey <tom@tromey.com>
5962 * linux-record.c (record_linux_system_call) <case
5963 RECORD_SYS_RECVFROM>: Add "break".
5965 2018-05-04 Tom Tromey <tom@tromey.com>
5967 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5968 Add missing "break".
5969 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5970 Add missing "break".
5972 2018-05-04 Tom Tromey <tom@tromey.com>
5974 * rs6000-tdep.c (ppc_process_record_op4)
5975 (ppc_process_record_op63): Add fall-through comment.
5977 2018-05-04 Tom Tromey <tom@tromey.com>
5979 * i386-tdep.c (i386_process_record): Add fall-through comment.
5981 2018-05-04 Tom Tromey <tom@tromey.com>
5983 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5986 2018-05-04 Tom Tromey <tom@tromey.com>
5988 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5989 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5990 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5992 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5994 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5997 2018-05-04 Tom Tromey <tom@tromey.com>
5999 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6001 2018-05-04 Tom Tromey <tom@tromey.com>
6003 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6004 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6005 * symfile.c (section_is_mapped): Fix fall-through comment.
6006 * stabsread.c (define_symbol, read_member_functions): Fix
6007 fall-through comment.
6008 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6010 * remote.c (remote_wait_as): Fix fall-through comment.
6011 * p-exp.y (yylex): Fix fall-through comment.
6012 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6014 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6015 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6016 * jv-exp.y (yylex): Fix fall-through comment.
6017 * go-exp.y (lex_one_token): Fix fall-through comment.
6018 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6019 fall-through comment.
6020 * f-exp.y (yylex): Fix fall-through comment.
6021 * dwarf2read.c (process_die): Fix fall-through comments.
6022 * dbxread.c (process_one_symbol): Fix fall-through comment.
6023 * d-exp.y (lex_one_token): Fix fall-through comment.
6024 * cp-name-parser.y (yylex): Fix fall-through comment.
6025 * coffread.c (coff_symtab_read): Fix fall-through comment.
6026 * c-exp.y (lex_one_token): Fix fall-through comment.
6027 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6029 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6032 2018-05-04 Tom Tromey <tom@tromey.com>
6035 * NEWS: Mention gdb.execute change.
6036 * gdbcmd.h (execute_control_command): Don't declare.
6037 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6038 execute_control_commands, execute_control_commands_to_string.
6039 * cli/cli-script.h (execute_control_commands)
6040 (execute_control_commands_to_string): Declare.
6041 (execute_control_command): Add from_tty parameter.
6042 * cli/cli-script.c (execute_control_commands)
6043 (execute_control_commands_to_string): New functions.
6044 (execute_user_command): Use execute_control_commands.
6045 (execute_control_command_1): Add "from_tty" parameter. Update.
6046 (execute_control_command): Likewise.
6048 2018-05-04 Tom Tromey <tom@tromey.com>
6051 * NEWS: Mention that breakpoint commands are writable.
6052 * python/py-breakpoint.c (bppy_set_commands): New function.
6053 (breakpoint_object_getset) <"commands">: Use it.
6055 2018-05-04 Tom Tromey <tom@tromey.com>
6057 * tracepoint.c (actions_command): Update.
6058 * mi/mi-cmd-break.c (mi_command_line_array)
6059 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6060 (mi_read_next_line): Remove.
6061 (mi_cmd_break_commands): Update.
6062 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6064 * cli/cli-script.c (get_command_line): Update.
6065 (process_next_line): Use function_view. Constify.
6066 (recurse_read_control_structure, read_command_lines)
6067 (read_command_lines_1): Change argument types to function_view.
6068 (do_define_command, document_command): Update.
6069 * breakpoint.h (check_tracepoint_command): Don't declare.
6070 * breakpoint.c (check_tracepoint_command): Remove.
6071 (commands_command_1, create_tracepoint_from_upload): Update.
6073 2018-05-04 Tom Tromey <tom@tromey.com>
6076 * cli/cli-script.h (enum command_control_type) <define_control>:
6078 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6079 (build_command_line, execute_control_command_1)
6080 (process_next_line): Likewise.
6081 (do_define_command): New function, extracted from define_command.
6082 (define_command): Use it.
6084 2018-05-04 Tom Tromey <tom@tromey.com>
6086 * tracepoint.c (actions_command): Update.
6087 * cli/cli-script.h (read_command_lines): Update.
6088 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6089 (MAX_TMPBUF): Remove define.
6090 (define_command): Use string_printf.
6091 (document_command): Likewise.
6092 * breakpoint.c (commands_command_1): Update.
6094 2018-05-04 Tom Tromey <tom@tromey.com>
6096 * top.c (execute_command): Update.
6097 * cli/cli-script.h (print_command_lines): Now varargs.
6098 * cli/cli-script.c (print_command_lines): Now varargs.
6099 (execute_control_command_1) <case while_control, case if_control>:
6102 2018-05-04 Tom Tromey <tom@tromey.com>
6104 * tracepoint.c (all_tracepoint_actions): Rename from
6105 all_tracepoint_actions_and_cleanup. Change return type.
6106 (actions_command, encode_actions_1, encode_actions)
6107 (trace_dump_actions, tdump_command): Update.
6108 * remote.c (remote_download_command_source): Update.
6109 * python/python.c (gdbpy_eval_from_control_command)
6110 (python_command, python_interactive_command): Update.
6111 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6112 * guile/guile.c (guile_command)
6113 (gdbscm_eval_from_control_command, guile_command): Update.
6114 * compile/compile.c (compile_code_command)
6115 (compile_print_command, compile_to_object): Update.
6116 * cli/cli-script.h (struct command_lines_deleter): New.
6117 (counted_command_line): New typedef.
6118 (struct command_line): Add constructor, destructor.
6119 <body_list>: Remove.
6120 <body_list_0, body_list_1>: New members.
6121 (command_line_up): Remove typedef.
6122 (read_command_lines, read_command_lines_1, get_command_line):
6124 (copy_command_lines): Don't declare.
6125 * cli/cli-script.c (build_command_line): Use "new".
6126 (get_command_line): Return counted_command_line.
6127 (print_command_lines, execute_user_command)
6128 (execute_control_command_1, while_command, if_command): Update.
6129 (realloc_body_list): Remove.
6130 (process_next_line, recurse_read_control_structure): Update.
6131 (read_command_lines, read_command_lines_1): Return counted_command_line.
6132 (free_command_lines): Use "delete".
6133 (copy_command_lines): Remove.
6134 (define_command, document_command, show_user_1): Update.
6135 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6136 a counted_command_line.
6137 * breakpoint.h (counted_command_line): Remove typedef.
6138 (breakpoint_set_commands): Update.
6139 * breakpoint.c (check_no_tracepoint_commands)
6140 (validate_commands_for_breakpoint): Update.
6141 (breakpoint_set_commands): Change commands to be a
6142 counted_command_line.
6143 (commands_command_1, update_dprintf_command_list)
6144 (create_tracepoint_from_upload): Update.
6146 2018-05-04 Tom Tromey <tom@tromey.com>
6148 * cli/cli-decode.h (cmd_list_element): New constructor.
6149 (~cmd_list_element): New destructor.
6150 (struct cmd_list_element): Add initializers.
6151 * cli/cli-decode.c (do_add_cmd): Use "new".
6152 (delete_cmd): Use "delete".
6154 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6155 Pedro Alves <palves@redhat.com>
6157 PR breakpoints/19806 and support for PR external/20207.
6158 * NEWS: Mention Aarch64 watchpoint improvements.
6159 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6160 watchpoints and PR external/20207 watchpoints.
6161 * nat/aarch64-linux-hw-point.c
6162 (kernel_supports_any_contiguous_range): New.
6163 (aarch64_watchpoint_offset): New.
6164 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6165 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6166 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6167 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6168 next_addr_orig_p. Support PR external/20207 watchpoints.
6169 (aarch64_downgrade_regs): New.
6170 (aarch64_dr_state_insert_one_point): New parameters offset and
6172 (aarch64_dr_state_remove_one_point): Likewise.
6173 (aarch64_handle_breakpoint): Update caller.
6174 (aarch64_handle_aligned_watchpoint): Likewise.
6175 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6177 (aarch64_linux_set_debug_regs): Remove const from state. Call
6178 aarch64_downgrade_regs.
6179 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6180 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6181 (DR_CONTROL_MASK): ... this.
6182 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6183 (unsigned int aarch64_watchpoint_offset): New prototype.
6184 (aarch64_linux_set_debug_regs): Remove const from state.
6185 * utils.c (align_up, align_down): Move to ...
6186 * common/common-utils.c (align_up, align_down): ... here.
6187 * utils.h (align_up, align_down): Move to ...
6188 * common/common-utils.h (align_up, align_down): ... here.
6190 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6192 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6193 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6194 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6195 Re-implement to match the ABI as summarized in GCC's
6196 gcc/config/sparc/sparc.c. All callers updated.
6197 (sparc32_store_arguments): Remove assertion.
6199 2018-05-04 Tom Tromey <tom@tromey.com>
6201 * printcmd.c: Don't include tui.h.
6202 (decode_format): Use skip_spaces.
6204 2018-05-04 Tom Tromey <tom@tromey.com>
6207 * printcmd.c (last_count): New global.
6208 (x_command): Use saved count when repeating.
6210 2018-05-04 Tom Tromey <tom@tromey.com>
6212 * nto-procfs.c (do_closedir_cleanup): Remove.
6213 (procfs_pidlist): Use gdb_dir_up.
6214 * procfs.c (do_closedir_cleanup): Remove.
6215 (proc_update_threads): Use gdb_dir_up.
6216 * common/filestuff.h (struct gdb_dir_deleter): New.
6217 (gdb_dir_up): New typedef.
6219 2018-05-04 Tom Tromey <tom@tromey.com>
6221 * ada-lang.c (print_mention_exception): Use std::string.
6223 2018-05-04 Tom Tromey <tom@tromey.com>
6225 * ada-lang.c (create_excep_cond_exprs): Update.
6226 (ada_exception_catchpoint_cond_string): Use std::string.
6228 2018-05-04 Tom Tromey <tom@tromey.com>
6230 * ada-lang.c (xget_renaming_scope): Return std::string.
6231 (old_renaming_is_invisible): Update.
6233 2018-05-04 Tom Tromey <tom@tromey.com>
6235 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6236 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6238 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6240 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6242 2018-05-04 Tom Tromey <tom@tromey.com>
6244 * remote.c (remote_query_supported_append): Change type.
6245 (remote_check_symbols): Update.
6247 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6250 * configure.ac: Prepend libpython.
6251 * python/python-config.py: Likewise.
6252 * configure: Regenerate.
6254 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6256 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6258 2018-05-03 Pedro Alves <palves@redhat.com>
6261 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6262 override. Write 'true' instead of '1'.
6263 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6266 2018-05-02 Pedro Alves <palves@redhat.com>
6268 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6269 add_inf_child_target.
6270 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6271 add_inf_child_target.
6272 * aix-thread.c (aix_thread_target_info): New.
6273 (aix_thread_target) <shortname, longname, doc>: Delete.
6275 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6276 add_inf_child_target.
6277 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6278 add_inf_child_target.
6279 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6280 add_inf_child_target.
6281 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6282 add_inf_child_target.
6283 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6284 add_inf_child_target.
6285 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6286 add_inf_child_target.
6287 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6288 add_inf_child_target.
6289 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6290 add_inf_child_target.
6291 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6292 add_inf_child_target.
6293 * bfd-target.c (target_bfd_target_info): New.
6294 (target_bfd) <shortname, longname, doc>: Delete.
6296 * bsd-kvm.c (bsd_kvm_target_info): New.
6297 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6299 (bsd_kvm_target::open): Rename to ...
6300 (bsd_kvm_target_open): ... this. Adjust.
6301 * bsd-uthread.c (bsd_uthread_target_info): New.
6302 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6304 * corefile.c (core_file_command): Adjust.
6305 * corelow.c (core_target_info): New.
6306 (core_target) <shortname, longname, doc>: Delete.
6308 (core_target::open): Rename to ...
6309 (core_target_open): ... this. Adjust.
6310 * ctf.c (ctf_target_info): New.
6311 (ctf_target) <shortname, longname, doc>: Delete.
6313 (ctf_target::open): Rename to ...
6314 (ctf_target_open): ... this.
6315 (_initialize_ctf): Adjust.
6316 * exec.c (exec_target_info): New.
6317 (exec_target) <shortname, longname, doc>: Delete.
6319 (exec_target::open): Rename to ...
6320 (exec_target_open): ... this.
6321 * gdbcore.h (core_target_open): Declare.
6322 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6323 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6324 add_inf_child_target.
6325 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6326 add_inf_child_target.
6327 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6328 add_inf_child_target.
6329 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6330 add_inf_child_target.
6331 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6332 add_inf_child_target.
6333 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6334 add_inf_child_target.
6335 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6336 add_inf_child_target.
6337 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6338 add_inf_child_target.
6339 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6340 add_inf_child_target.
6341 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6342 add_inf_child_target.
6343 * inf-child.c (inf_child_target_info): New.
6344 (inf_child_target::info): New.
6345 (inf_child_open_target): Remove 'target' parameter. Use
6346 get_native_target instead.
6347 (inf_child_target::open): Delete.
6348 (add_inf_child_target): New.
6349 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6352 (add_inf_child_target): Declare.
6353 (inf_child_open_target): Declare.
6354 * linux-thread-db.c (thread_db_target_info): New.
6355 (thread_db_target) <shortname, longname, doc>: Delete.
6357 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6358 add_inf_child_target.
6359 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6360 add_inf_child_target.
6361 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6362 add_inf_child_target.
6363 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6364 add_inf_child_target.
6365 * make-target-delegates (print_class): Adjust.
6366 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6367 add_inf_child_target.
6368 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6369 add_inf_child_target.
6370 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6371 add_inf_child_target.
6372 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6373 add_inf_child_target.
6374 * nto-procfs.c (nto_native_target_info): New.
6375 (nto_procfs_target_native) <shortname, longname, doc>:
6378 (nto_procfs_target_info): New.
6379 (nto_procfs_target_procfs) <shortname, longname, doc>:
6382 (init_procfs_targets): Adjust.
6383 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6384 add_inf_child_target.
6385 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6386 add_inf_child_target.
6387 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6388 add_inf_child_target.
6389 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6390 add_inf_child_target.
6391 * ravenscar-thread.c (ravenscar_target_info): New.
6392 (ravenscar_thread_target) <shortname, longname, doc>:
6395 * record-btrace.c (record_btrace_target_info):
6396 (record_btrace_target) <shortname, longname, doc>: Delete.
6398 (record_btrace_target::open): Rename to ...
6399 (record_btrace_target_open): ... this. Adjust.
6400 * record-full.c (record_longname, record_doc): New.
6401 (record_full_base_target) <shortname, longname, doc>: Delete.
6403 (record_full_target_info): New.
6404 (record_full_target): <shortname>: Delete.
6406 (record_full_core_open_1, record_full_open_1): Update comments.
6407 (record_full_base_target::open): Rename to ...
6408 (record_full_open): ... this.
6409 (cmd_record_full_restore): Update.
6410 (_initialize_record_full): Update.
6411 * remote-sim.c (remote_sim_target_info): New.
6412 (gdbsim_target) <shortname, longname, doc>: Delete.
6414 (gdbsim_target::open): Rename to ...
6415 (gdbsim_target_open): ... this.
6416 (_initialize_remote_sim): Adjust.
6417 * remote.c (remote_doc): New.
6418 (remote_target_info): New.
6419 (remote_target) <shortname, longname, doc>: Delete.
6421 (extended_remote_target_info): New.
6422 (extended_remote_target) <shortname, longname, doc>: Delete.
6424 (remote_target::open_1): Make static. Adjust.
6425 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6426 * s390-linux-nat.c (_initialize_s390_nat): Use
6427 add_inf_child_target.
6428 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6429 add_inf_child_target.
6430 * sol-thread.c (thread_db_target_info): New.
6431 (sol_thread_target) <shortname, longname, doc>: Delete.
6433 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6434 add_inf_child_target.
6435 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6436 add_inf_child_target.
6437 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6438 add_inf_child_target.
6439 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6440 add_inf_child_target.
6441 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6442 add_inf_child_target.
6443 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6444 add_inf_child_target.
6445 * spu-linux-nat.c (_initialize_spu_nat): Use
6446 add_inf_child_target.
6447 * spu-multiarch.c (spu_multiarch_target_info): New.
6448 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6450 * target-delegates.c: Regenerate.
6451 * target.c: Include <unordered_map>.
6452 (target_ops_p): Delete.
6453 (DEF_VEC_P(target_ops_p)): Delete.
6454 (target_factories): New.
6455 (test_target_info): New.
6456 (test_target_ops::info): New.
6457 (open_target): Adjust to use target_factories.
6458 (add_target_with_completer): Rename to ...
6459 (add_target): ... this. Change prototype. Register target_info
6460 and open callback in target_factories. Register target_info in
6461 command context instead of target_ops.
6462 (add_target): Delete old implementation.
6463 (add_deprecated_target_alias): Change prototype. Adjust.
6464 (the_native_target): New.
6465 (set_native_target, get_native_target): New.
6466 (find_default_run_target): Use the_native_target.
6467 (find_attach_target, find_run_target): Simplify.
6468 (target_ops::open): Delete.
6469 (dummy_target_info): New.
6470 (dummy_target::shortname, dummy_target::longname)
6471 (dummy_target::doc): Delete.
6472 (dummy_target::info): New.
6473 (debug_target::shortname, debug_target::longname)
6474 (debug_target::doc): Delete.
6475 (debug_target::info): New.
6476 * target.h (struct target_info): New.
6477 (target_ops::~target_ops): Add comment.
6478 (target_ops::info): New.
6479 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6480 longer virtual. Implement in terms of target_info.
6481 (set_native_target, get_native_target): Declare.
6482 (target_open_ftype): New.
6483 (add_target, add_target_with_completer)
6484 (add_deprecated_target_alias): Change prototype.
6485 (test_target) <shortname, longname, doc>: Delete.
6487 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6488 add_inf_child_target.
6489 * tracefile-tfile.c (tfile_target_info): New.
6490 (tfile_target) <shortname, longname, doc>: Delete.
6492 (tfile_target::open): Rename to ...
6493 (tfile_target_open): ... this.
6494 (_initialize_tracefile_tfile): Adjust.
6495 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6496 add_inf_child_target.
6497 * windows-nat.c (_initialize_windows_nat): Use
6498 add_inf_child_target.
6499 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6500 add_inf_child_target.
6502 2018-05-02 Pedro Alves <palves@redhat.com>
6504 * linux-nat.h (linux_nat_target) <low_new_thread,
6505 low_delete_thread, low_new_fork, low_forget_process,
6506 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6507 New virtual methods.
6508 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6509 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6510 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6511 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6512 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6514 * linux-fork.c (delete_fork): Adjust to call low method.
6515 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6516 (linux_nat_new_fork, linux_nat_forget_process_hook)
6517 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6518 (linux_nat_status_is_event):
6519 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6520 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6522 (sigtrap_is_event): Rename to ...
6523 (linux_nat_target::low_status_is_event): ... this.
6524 (linux_nat_set_status_is_event): Delete.
6525 (save_stop_reason, linux_nat_wait_1)
6526 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6528 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6529 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6530 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6531 (linux_nat_set_prepare_to_resume): Delete.
6532 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6533 low virtual methods.
6534 * amd64-linux-nat.c: Likewise.
6535 * arm-linux-nat.c: Likewise.
6536 * i386-linux-nat.c: Likewise.
6537 * ia64-linux-nat.c: Likewise.
6538 * mips-linux-nat.c: Likewise.
6539 * ppc-linux-nat.c: Likewise.
6540 * s390-linux-nat.c: Likewise.
6541 * sparc64-linux-nat.c: Likewise.
6542 * x86-linux-nat.c: Likewise.
6543 * x86-linux-nat.h: Include "nat/x86-linux.h".
6544 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6545 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6548 2018-05-02 Pedro Alves <palves@redhat.com>
6550 * target.h (target_ops)
6551 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6552 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6553 stopped_by_watchpoint, have_continuable_watchpoint,
6554 stopped_data_address, watchpoint_addr_within_range,
6555 can_accel_watchpoint_condition, can_run, thread_alive,
6556 has_all_memory, has_memory, has_stack, has_registers,
6557 has_execution, can_async_p, is_async_p, supports_non_stop,
6558 always_non_stop_p, can_execute_reverse, supports_multi_process,
6559 supports_enable_disable_tracepoint,
6560 supports_disable_randomization, supports_string_tracing,
6561 supports_evaluation_of_breakpoint_conditions,
6562 can_run_breakpoint_commands, filesystem_is_local,
6563 can_download_tracepoint, get_trace_state_variable_value,
6564 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6565 record_is_replaying, record_will_replay,
6566 augmented_libraries_svr4_read>: Adjust to return bool.
6567 * aarch64-linux-nat.c: All implementations adjusted.
6568 * aix-thread.c: All implementations adjusted.
6569 * arm-linux-nat.c: All implementations adjusted.
6570 * breakpoint.c: All implementations adjusted.
6571 * bsd-kvm.c: All implementations adjusted.
6572 * bsd-uthread.c: All implementations adjusted.
6573 * corelow.c: All implementations adjusted.
6574 * ctf.c: All implementations adjusted.
6575 * darwin-nat.c: All implementations adjusted.
6576 * darwin-nat.h: All implementations adjusted.
6577 * exec.c: All implementations adjusted.
6578 * fbsd-nat.c: All implementations adjusted.
6579 * fbsd-nat.h: All implementations adjusted.
6580 * gnu-nat.c: All implementations adjusted.
6581 * gnu-nat.h: All implementations adjusted.
6582 * go32-nat.c: All implementations adjusted.
6583 * ia64-linux-nat.c: All implementations adjusted.
6584 * inf-child.c: All implementations adjusted.
6585 * inf-child.h: All implementations adjusted.
6586 * inf-ptrace.c: All implementations adjusted.
6587 * inf-ptrace.h: All implementations adjusted.
6588 * linux-nat.c: All implementations adjusted.
6589 * linux-nat.h: All implementations adjusted.
6590 * mips-linux-nat.c: All implementations adjusted.
6591 * nto-procfs.c: All implementations adjusted.
6592 * ppc-linux-nat.c: All implementations adjusted.
6593 * procfs.c: All implementations adjusted.
6594 * ravenscar-thread.c: All implementations adjusted.
6595 * record-btrace.c: All implementations adjusted.
6596 * record-full.c: All implementations adjusted.
6597 * remote-sim.c: All implementations adjusted.
6598 * remote.c: All implementations adjusted.
6599 * s390-linux-nat.c: All implementations adjusted.
6600 * sol-thread.c: All implementations adjusted.
6601 * spu-multiarch.c: All implementations adjusted.
6602 * target-delegates.c: All implementations adjusted.
6603 * target.c: All implementations adjusted.
6604 * target.h: All implementations adjusted.
6605 * tracefile-tfile.c: All implementations adjusted.
6606 * tracefile.c: All implementations adjusted.
6607 * tracefile.h: All implementations adjusted.
6608 * windows-nat.c: All implementations adjusted.
6609 * x86-linux-nat.h: All implementations adjusted.
6610 * x86-nat.h: All implementations adjusted.
6612 2018-05-02 Pedro Alves <palves@redhat.com>
6614 * make-target-delegates (scan_target_h): Don't trim lines here.
6615 Replace sequences of tabs and/or whitespace with a single
6617 (top level, parsing methods): Trim each line before processing it
6620 2018-05-02 Pedro Alves <palves@redhat.com>
6621 John Baldwin <jhb@freebsd.org>
6623 * target.h (enum strata) <debug_stratum>: New.
6624 (struct target_ops) <all delegation methods>: Replace by C++
6625 virtual methods, and drop "to_" prefix. All references updated
6627 <to_shortname, to_longname, to_doc, to_data,
6628 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6629 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6630 virtual methods. All references updated throughout.
6631 <can_attach, supports_terminal_ours, can_create_inferior,
6632 get_thread_control_capabilities, attach_no_wait>: New
6634 <insert_breakpoint, remove_breakpoint>: Now
6635 TARGET_DEFAULT_NORETURN methods.
6636 <info_proc>: Now returns bool.
6638 (OPS_MAGIC): Delete.
6639 (current_target): Delete. All references replaced by references
6641 (target_stack): ... this. New.
6642 (target_shortname, target_longname): Adjust.
6643 (target_can_run): Now a function declaration.
6644 (default_child_has_all_memory, default_child_has_memory)
6645 (default_child_has_stack, default_child_has_registers)
6646 (default_child_has_execution): Remove target_ops parameter.
6647 (complete_target_initialization): Delete.
6648 (memory_breakpoint_target): New template class.
6649 (test_target_ops): Refactor as a C++ class with virtual methods.
6650 * make-target-delegates (NAME_PART): Tighten.
6651 (POINTER_PART, CP_SYMBOL): New.
6652 (SIMPLE_RETURN_PART): Reimplement.
6653 (VEC_RETURN_PART): Expect less.
6654 (RETURN_PART, VIRTUAL_PART): New.
6655 (METHOD): Adjust to C++ virtual methods.
6656 (scan_target_h): Remove reference to C99.
6657 (dname): Output "target_ops::" prefix.
6658 (write_function_header): Adjust to output a C++ class method.
6659 (write_declaration): New.
6660 (write_delegator): Adjust to output a C++ class method.
6661 (tdname): Output "dummy_target::" prefix.
6662 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6664 (tdefault_names, debug_names): Delete.
6665 (return_types, tdefaults, styles, argtypes_array): New.
6666 (top level): All methods are delegators.
6668 (top level): Print dummy_target and debug_target classes.
6669 * target-delegates.c: Regenerate.
6670 * target-debug.h (target_debug_print_enum_info_proc_what)
6671 (target_debug_print_thread_control_capabilities)
6672 (target_debug_print_thread_info_p): New.
6673 * target.c (dummy_target): Delete.
6674 (the_dummy_target, the_debug_target): New.
6675 (target_stack): Now extern.
6676 (set_targetdebug): Push/unpush debug target.
6677 (default_child_has_all_memory, default_child_has_memory)
6678 (default_child_has_stack, default_child_has_registers)
6679 (default_child_has_execution): Remove target_ops parameter.
6680 (complete_target_initialization): Delete.
6681 (add_target_with_completer): No longer call
6682 complete_target_initialization.
6683 (target_supports_terminal_ours): Use regular delegation.
6684 (update_current_target): Delete.
6685 (push_target): No longer check magic number. Don't call
6686 update_current_target.
6687 (unpush_target): Don't call update_current_target.
6688 (target_is_pushed): No longer check magic number.
6689 (target_require_runnable): Skip for all stratums over
6691 (target_ops::info_proc): New.
6692 (target_info_proc): Use find_target_at and
6693 find_default_run_target.
6694 (target_supports_disable_randomization): Use regular delegation.
6695 (target_get_osdata): Use find_target_at.
6696 (target_ops::open, target_ops::close, target_ops::can_attach)
6697 (target_ops::attach, target_ops::can_create_inferior)
6698 (target_ops::create_inferior, target_ops::can_run)
6699 (target_can_run): New.
6700 (default_fileio_target): Use regular delegation.
6701 (target_ops::fileio_open, target_ops::fileio_pwrite)
6702 (target_ops::fileio_pread, target_ops::fileio_fstat)
6703 (target_ops::fileio_close, target_ops::fileio_unlink)
6704 (target_ops::fileio_readlink): New.
6705 (target_fileio_open_1, target_fileio_unlink)
6706 (target_fileio_readlink): Always call the target method. Handle
6708 (return_zero, return_zero_has_execution): Delete.
6709 (init_dummy_target): Delete.
6710 (dummy_target::dummy_target, dummy_target::shortname)
6711 (dummy_target::longname, dummy_target::doc)
6712 (debug_target::debug_target, debug_target::shortname)
6713 (debug_target::longname, debug_target::doc): New.
6714 (target_supports_delete_record): Use regular delegation.
6715 (setup_target_debug): Delete.
6716 (maintenance_print_target_stack): Skip debug_stratum.
6717 (initialize_targets): Instantiate the_dummy_target and
6719 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6721 (target_auxv_search, fprint_target_auxv): Adjust.
6722 (info_auxv_command): Adjust to use target_stack.
6723 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6724 * exceptions.c (print_flush): Handle a NULL target_stack.
6725 * regcache.c (target_ops_no_register): Refactor as class with
6728 * exec.c (exec_target): New class.
6729 (exec_ops): Now an exec_target.
6730 (exec_open, exec_close_1, exec_get_section_table)
6731 (exec_xfer_partial, exec_files_info, exec_has_memory)
6732 (exec_make_note_section): Refactor as exec_target methods.
6733 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6735 (exec_target::find_memory_regions): New.
6736 (_initialize_exec): Don't call init_exec_ops.
6737 * gdbcore.h (exec_file_clear): Delete.
6739 * corefile.c (core_target): Delete.
6740 (core_file_command): Adjust.
6741 * corelow.c (core_target): New class.
6742 (the_core_target): New.
6743 (core_close): Remove target_ops parameter.
6744 (core_close_cleanup): Adjust.
6745 (core_target::close): New.
6746 (core_open, core_detach, get_core_registers, core_files_info)
6747 (core_xfer_partial, core_thread_alive, core_read_description)
6748 (core_pid_to_str, core_thread_name, core_has_memory)
6749 (core_has_stack, core_has_registers, core_info_proc): Rework as
6750 core_target methods.
6751 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6752 (_initialize_corelow): Initialize the_core_target.
6753 * gdbcore.h (core_target): Delete.
6754 (the_core_target): New.
6756 * ctf.c: (ctf_target): New class.
6757 (ctf_ops): Now a ctf_target.
6758 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6759 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6760 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6762 (init_ctf_ops): Delete.
6763 (_initialize_ctf): Don't call it.
6764 * tracefile-tfile.c (tfile_target): New class.
6765 (tfile_ops): Now a tfile_target.
6766 (tfile_open, tfile_close, tfile_files_info)
6767 (tfile_get_tracepoint_status, tfile_trace_find)
6768 (tfile_fetch_registers, tfile_xfer_partial)
6769 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6770 Refactor as tfile_target methods.
6771 (tfile_xfer_partial_features): Remove target_ops parameter.
6772 (init_tfile_ops): Delete.
6773 (_initialize_tracefile_tfile): Don't call it.
6774 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6775 (tracefile_has_stack, tracefile_has_registers)
6776 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6777 tracefile_target methods.
6778 (init_tracefile_ops): Delete.
6779 (tracefile_target::tracefile_target): New.
6780 * tracefile.h: Include "target.h".
6781 (tracefile_target): New class.
6782 (init_tracefile_ops): Delete.
6784 * spu-multiarch.c (spu_multiarch_target): New class.
6785 (spu_ops): Now a spu_multiarch_target.
6786 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6787 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6788 (spu_search_memory, spu_mourn_inferior): Refactor as
6789 spu_multiarch_target methods.
6790 (init_spu_ops): Delete.
6791 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6792 complete_target_initialization.
6794 * ravenscar-thread.c (ravenscar_thread_target): New class.
6795 (ravenscar_ops): Now a ravenscar_thread_target.
6796 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6797 (ravenscar_thread_alive, ravenscar_pid_to_str)
6798 (ravenscar_fetch_registers, ravenscar_store_registers)
6799 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6800 (ravenscar_stopped_by_hw_breakpoint)
6801 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6802 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6803 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6805 (init_ravenscar_thread_ops): Delete.
6806 (_initialize_ravenscar): Remove references to
6807 init_ravenscar_thread_ops and complete_target_initialization.
6809 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6810 (bsd_uthread_target): New class.
6811 (bsd_uthread_ops): Now a bsd_uthread_target.
6812 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6813 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6814 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6815 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6816 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6817 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6818 (bsd_uthread_target): Delete function.
6819 (_initialize_bsd_uthread): Remove reference to
6820 complete_target_initialization.
6822 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6823 (target_bfd): ... this new class.
6824 (target_bfd_xfer_partial, target_bfd_get_section_table)
6825 (target_bfd_close): Refactor as target_bfd methods.
6826 (target_bfd::~target_bfd): New.
6827 (target_bfd_reopen): Adjust.
6828 (target_bfd::close): New.
6830 * record-btrace.c (record_btrace_target): New class.
6831 (record_btrace_ops): Now a record_btrace_target.
6832 (record_btrace_open, record_btrace_stop_recording)
6833 (record_btrace_disconnect, record_btrace_close)
6834 (record_btrace_async, record_btrace_info)
6835 (record_btrace_insn_history, record_btrace_insn_history_range)
6836 (record_btrace_insn_history_from, record_btrace_call_history)
6837 (record_btrace_call_history_range)
6838 (record_btrace_call_history_from, record_btrace_record_method)
6839 (record_btrace_is_replaying, record_btrace_will_replay)
6840 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6841 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6842 (record_btrace_store_registers, record_btrace_prepare_to_store)
6843 (record_btrace_to_get_unwinder)
6844 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6845 (record_btrace_commit_resume, record_btrace_wait)
6846 (record_btrace_stop, record_btrace_can_execute_reverse)
6847 (record_btrace_stopped_by_sw_breakpoint)
6848 (record_btrace_supports_stopped_by_sw_breakpoint)
6849 (record_btrace_stopped_by_hw_breakpoint)
6850 (record_btrace_supports_stopped_by_hw_breakpoint)
6851 (record_btrace_update_thread_list, record_btrace_thread_alive)
6852 (record_btrace_goto_begin, record_btrace_goto_end)
6853 (record_btrace_goto, record_btrace_stop_replaying_all)
6854 (record_btrace_execution_direction)
6855 (record_btrace_prepare_to_generate_core)
6856 (record_btrace_done_generating_core): Refactor as
6857 record_btrace_target methods.
6858 (init_record_btrace_ops): Delete.
6859 (_initialize_record_btrace): Remove reference to
6860 init_record_btrace_ops.
6861 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6862 the execution_direction global.
6863 (record_full_base_target, record_full_target)
6864 (record_full_core_target): New classes.
6865 (record_full_ops): Now a record_full_target.
6866 (record_full_core_ops): Now a record_full_core_target.
6867 (record_full_target::detach, record_full_target::disconnect)
6868 (record_full_core_target::disconnect)
6869 (record_full_target::mourn_inferior, record_full_target::kill):
6871 (record_full_open, record_full_close, record_full_async): Refactor
6872 as methods of the record_full_base_target class.
6873 (record_full_resume, record_full_commit_resume): Refactor
6874 as methods of the record_full_target class.
6875 (record_full_wait, record_full_stopped_by_watchpoint)
6876 (record_full_stopped_data_address)
6877 (record_full_stopped_by_sw_breakpoint)
6878 (record_full_supports_stopped_by_sw_breakpoint)
6879 (record_full_stopped_by_hw_breakpoint)
6880 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6881 methods of the record_full_base_target class.
6882 (record_full_store_registers, record_full_xfer_partial)
6883 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6884 Refactor as methods of the record_full_target class.
6885 (record_full_can_execute_reverse, record_full_get_bookmark)
6886 (record_full_goto_bookmark, record_full_execution_direction)
6887 (record_full_record_method, record_full_info, record_full_delete)
6888 (record_full_is_replaying, record_full_will_replay)
6889 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6890 (record_full_stop_replaying): Refactor as methods of the
6891 record_full_base_target class.
6892 (record_full_core_resume, record_full_core_kill)
6893 (record_full_core_fetch_registers)
6894 (record_full_core_prepare_to_store)
6895 (record_full_core_store_registers, record_full_core_xfer_partial)
6896 (record_full_core_insert_breakpoint)
6897 (record_full_core_remove_breakpoint)
6898 (record_full_core_has_execution): Refactor
6899 as methods of the record_full_core_target class.
6900 (record_full_base_target::supports_delete_record): New.
6901 (init_record_full_ops): Delete.
6902 (init_record_full_core_ops): Delete.
6903 (record_full_save): Refactor as method of the
6904 record_full_base_target class.
6905 (_initialize_record_full): Remove references to
6906 init_record_full_ops and init_record_full_core_ops.
6908 * remote.c (remote_target, extended_remote_target): New classes.
6909 (remote_ops): Now a remote_target.
6910 (extended_remote_ops): Now an extended_remote_target.
6911 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6912 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6913 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6914 (remote_pass_signals, remote_set_syscall_catchpoint)
6915 (remote_program_signals, )
6916 (remote_thread_always_alive): Remove target_ops parameter.
6917 (remote_thread_alive, remote_thread_name)
6918 (remote_update_thread_list, remote_threads_extra_info)
6919 (remote_static_tracepoint_marker_at)
6920 (remote_static_tracepoint_markers_by_strid)
6921 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6922 (remote_open): Refactor as methods of remote_target.
6923 (extended_remote_open, extended_remote_detach)
6924 (extended_remote_attach, extended_remote_post_attach):
6925 (extended_remote_supports_disable_randomization)
6926 (extended_remote_create_inferior): : Refactor as method of
6927 extended_remote_target.
6928 (remote_set_permissions, remote_open_1, remote_detach)
6929 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6930 (remote_resume, remote_commit_resume, remote_stop)
6931 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6932 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6933 (remote_prepare_to_store, remote_store_registers)
6934 (remote_flash_erase, remote_flash_done, remote_files_info)
6935 (remote_kill, remote_mourn, remote_insert_breakpoint)
6936 (remote_remove_breakpoint, remote_insert_watchpoint)
6937 (remote_watchpoint_addr_within_range)
6938 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6939 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6940 (remote_supports_stopped_by_sw_breakpoint)
6941 (remote_stopped_by_hw_breakpoint)
6942 (remote_supports_stopped_by_hw_breakpoint)
6943 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6944 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6945 (remote_verify_memory): Refactor as methods of remote_target.
6946 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6948 (remote_xfer_partial, remote_get_memory_xfer_limit)
6949 (remote_search_memory, remote_rcmd, remote_memory_map)
6950 (remote_pid_to_str, remote_get_thread_local_address)
6951 (remote_get_tib_address, remote_read_description): Refactor as
6952 methods of remote_target.
6953 (remote_target::fileio_open, remote_target::fileio_pwrite)
6954 (remote_target::fileio_pread, remote_target::fileio_close): New.
6955 (remote_hostio_readlink, remote_hostio_fstat)
6956 (remote_filesystem_is_local, remote_can_execute_reverse)
6957 (remote_supports_non_stop, remote_supports_disable_randomization)
6958 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6959 (remote_supports_enable_disable_tracepoint)
6960 (remote_supports_string_tracing)
6961 (remote_can_run_breakpoint_commands, remote_trace_init)
6962 (remote_download_tracepoint, remote_can_download_tracepoint)
6963 (remote_download_trace_state_variable, remote_enable_tracepoint)
6964 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6965 (remote_trace_start, remote_get_trace_status)
6966 (remote_get_tracepoint_status, remote_trace_stop)
6967 (remote_trace_find, remote_get_trace_state_variable_value)
6968 (remote_save_trace_data, remote_get_raw_trace_data)
6969 (remote_set_disconnected_tracing, remote_core_of_thread)
6970 (remote_set_circular_trace_buffer, remote_traceframe_info)
6971 (remote_get_min_fast_tracepoint_insn_len)
6972 (remote_set_trace_buffer_size, remote_set_trace_notes)
6973 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6974 (remote_disable_btrace, remote_teardown_btrace)
6975 (remote_read_btrace, remote_btrace_conf)
6976 (remote_augmented_libraries_svr4_read, remote_load)
6977 (remote_pid_to_exec_file, remote_can_do_single_step)
6978 (remote_execution_direction, remote_thread_handle_to_thread_info):
6979 Refactor as methods of remote_target.
6980 (init_remote_ops, init_extended_remote_ops): Delete.
6981 (remote_can_async_p, remote_is_async_p, remote_async)
6982 (remote_thread_events, remote_upload_tracepoints)
6983 (remote_upload_trace_state_variables): Refactor as methods of
6985 (_initialize_remote): Remove references to init_remote_ops and
6986 init_extended_remote_ops.
6988 * remote-sim.c (gdbsim_target): New class.
6989 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6990 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6991 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6992 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6993 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6994 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6995 Refactor as methods of gdbsim_target.
6996 (gdbsim_ops): Now a gdbsim_target.
6997 (init_gdbsim_ops): Delete.
6998 (gdbsim_cntrl_c): Adjust.
6999 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7001 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7002 (the_amd64_linux_nat_target): New.
7003 (amd64_linux_fetch_inferior_registers)
7004 (amd64_linux_store_inferior_registers): Refactor as methods of
7005 amd64_linux_nat_target.
7006 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7007 * i386-linux-nat.c: Don't include "linux-nat.h".
7008 (i386_linux_nat_target): New class.
7009 (the_i386_linux_nat_target): New.
7010 (i386_linux_fetch_inferior_registers)
7011 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7012 as methods of i386_linux_nat_target.
7013 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7014 * inf-child.c (inf_child_ops): Delete.
7015 (inf_child_fetch_inferior_registers)
7016 (inf_child_store_inferior_registers): Delete.
7017 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7018 methods of inf_child_target.
7019 (inf_child_target::supports_terminal_ours)
7020 (inf_child_target::terminal_init)
7021 (inf_child_target::terminal_inferior)
7022 (inf_child_target::terminal_ours_for_output)
7023 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7024 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7026 (inf_child_open, inf_child_disconnect, inf_child_close)
7027 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7028 (inf_child_post_startup_inferior, inf_child_can_run)
7029 (inf_child_pid_to_exec_file): Refactor as methods of
7031 (inf_child_follow_fork): Delete.
7032 (inf_child_target::can_create_inferior)
7033 (inf_child_target::can_attach): New.
7034 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7035 (inf_child_target::has_stack, inf_child_target::has_registers)
7036 (inf_child_target::has_execution): New.
7037 (inf_child_fileio_open, inf_child_fileio_pwrite)
7038 (inf_child_fileio_pread, inf_child_fileio_fstat)
7039 (inf_child_fileio_close, inf_child_fileio_unlink)
7040 (inf_child_fileio_readlink, inf_child_use_agent)
7041 (inf_child_can_use_agent): Refactor as methods of
7043 (return_zero, inf_child_target): Delete.
7044 (inf_child_target::inf_child_target): New.
7045 * inf-child.h: Include "target.h".
7046 (inf_child_target): Delete function prototype.
7047 (inf_child_target): New class.
7048 (inf_child_open_target, inf_child_mourn_inferior)
7049 (inf_child_maybe_unpush_target): Delete.
7050 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7051 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7052 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7053 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7054 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7055 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7056 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7057 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7058 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7059 methods of inf_ptrace_target.
7060 (inf_ptrace_target): Delete function.
7061 * inf-ptrace.h: Include "inf-child.h".
7062 (inf_ptrace_target): Delete function declaration.
7063 (inf_ptrace_target): New class.
7064 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7065 * linux-nat.c (linux_target): New.
7066 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7067 (linux_nat_target::~linux_nat_target): New.
7068 (linux_child_post_attach, linux_child_post_startup_inferior)
7069 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7070 (linux_child_remove_fork_catchpoint)
7071 (linux_child_insert_vfork_catchpoint)
7072 (linux_child_remove_vfork_catchpoint)
7073 (linux_child_insert_exec_catchpoint)
7074 (linux_child_remove_exec_catchpoint)
7075 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7076 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7077 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7078 (linux_nat_stopped_data_address)
7079 (linux_nat_stopped_by_sw_breakpoint)
7080 (linux_nat_supports_stopped_by_sw_breakpoint)
7081 (linux_nat_stopped_by_hw_breakpoint)
7082 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7083 (linux_nat_kill, linux_nat_mourn_inferior)
7084 (linux_nat_xfer_partial, linux_nat_thread_alive)
7085 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7086 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7087 (linux_child_static_tracepoint_markers_by_strid)
7088 (linux_nat_is_async_p, linux_nat_can_async_p)
7089 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7090 (linux_nat_supports_multi_process)
7091 (linux_nat_supports_disable_randomization, linux_nat_async)
7092 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7093 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7094 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7095 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7096 methods of linux_nat_target.
7097 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7098 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7100 (check_stopped_by_watchpoint): Adjust.
7101 (linux_xfer_partial): Delete.
7102 (linux_target_install_ops, linux_target, linux_nat_add_target):
7104 (linux_nat_target::linux_nat_target): New.
7105 * linux-nat.h: Include "inf-ptrace.h".
7106 (linux_nat_target): New.
7107 (linux_target, linux_target_install_ops, linux_nat_add_target):
7108 Delete function declarations.
7109 (linux_target): Declare global.
7110 * linux-thread-db.c (thread_db_target): New.
7111 (thread_db_target::thread_db_target): New.
7112 (thread_db_ops): Delete.
7113 (the_thread_db_target): New.
7114 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7115 (thread_db_update_thread_list, thread_db_pid_to_str)
7116 (thread_db_extra_thread_info)
7117 (thread_db_thread_handle_to_thread_info)
7118 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7119 (thread_db_resume): Refactor as methods of thread_db_target.
7120 (init_thread_db_ops): Delete.
7121 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7122 * x86-linux-nat.c: Don't include "linux-nat.h".
7123 (super_post_startup_inferior): Delete.
7124 (x86_linux_nat_target::~x86_linux_nat_target): New.
7125 (x86_linux_child_post_startup_inferior)
7126 (x86_linux_read_description, x86_linux_enable_btrace)
7127 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7128 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7129 methods of x86_linux_nat_target.
7130 (x86_linux_create_target): Delete. Bits folded ...
7131 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7133 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7134 (x86_linux_nat_target): New class.
7135 (x86_linux_create_target): Delete.
7136 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7137 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7138 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7139 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7140 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7141 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7143 (x86_use_watchpoints): Delete.
7144 * x86-nat.h: Include "breakpoint.h" and "target.h".
7145 (x86_use_watchpoints): Delete.
7146 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7147 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7148 (x86_insert_watchpoint, x86_remove_watchpoint)
7149 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7150 (x86_stopped_by_hw_breakpoint): New declarations.
7151 (x86_nat_target): New template class.
7153 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7154 (the_ppc_linux_nat_target): New.
7155 (ppc_linux_fetch_inferior_registers)
7156 (ppc_linux_can_use_hw_breakpoint)
7157 (ppc_linux_region_ok_for_hw_watchpoint)
7158 (ppc_linux_ranged_break_num_registers)
7159 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7160 (ppc_linux_insert_mask_watchpoint)
7161 (ppc_linux_remove_mask_watchpoint)
7162 (ppc_linux_can_accel_watchpoint_condition)
7163 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7164 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7165 (ppc_linux_watchpoint_addr_within_range)
7166 (ppc_linux_masked_watch_num_registers)
7167 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7168 (ppc_linux_read_description): Refactor as methods of
7169 ppc_linux_nat_target.
7170 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7172 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7173 (procfs_target): New class.
7174 (the_procfs_target): New.
7175 (procfs_target): Delete function.
7176 (procfs_auxv_parse, procfs_attach, procfs_detach)
7177 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7178 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7179 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7180 (procfs_create_inferior, procfs_update_thread_list)
7181 (procfs_thread_alive, procfs_pid_to_str)
7182 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7183 (procfs_stopped_data_address, procfs_insert_watchpoint)
7184 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7185 (proc_find_memory_regions, procfs_info_proc)
7186 (procfs_make_note_section): Refactor as methods of procfs_target.
7187 (_initialize_procfs): Adjust.
7188 * sol-thread.c (sol_thread_target): New class.
7189 (sol_thread_ops): Now a sol_thread_target.
7190 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7191 (sol_thread_fetch_registers, sol_thread_store_registers)
7192 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7193 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7194 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7195 (init_sol_thread_ops): Delete.
7196 (_initialize_sol_thread): Adjust. Remove references to
7197 init_sol_thread_ops and complete_target_initialization.
7199 * windows-nat.c (windows_nat_target): New class.
7200 (windows_fetch_inferior_registers)
7201 (windows_store_inferior_registers, windows_resume, windows_wait)
7202 (windows_attach, windows_detach, windows_pid_to_exec_file)
7203 (windows_files_info, windows_create_inferior)
7204 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7205 (windows_close, windows_pid_to_str, windows_xfer_partial)
7206 (windows_get_tib_address, windows_get_ada_task_ptid)
7207 (windows_thread_name, windows_thread_alive): Refactor as
7208 windows_nat_target methods.
7209 (do_initial_windows_stuff): Adjust.
7210 (windows_target): Delete function.
7211 (_initialize_windows_nat): Adjust.
7213 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7214 (darwin_mourn_inferior, darwin_kill_inferior)
7215 (darwin_create_inferior, darwin_attach, darwin_detach)
7216 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7217 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7218 (darwin_supports_multi_process): Refactor as darwin_nat_target
7220 (darwin_resume_to, darwin_files_info): Delete.
7221 (_initialize_darwin_inferior): Rename to ...
7222 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7223 * darwin-nat.h: Include "inf-child.h".
7224 (darwin_nat_target): New class.
7225 (darwin_complete_target): Delete.
7226 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7227 (darwin_target): New.
7228 (i386_darwin_fetch_inferior_registers)
7229 (i386_darwin_store_inferior_registers): Refactor as methods of
7231 (darwin_complete_target): Delete, with ...
7232 (_initialize_i386_darwin_nat): ... bits factored out here.
7234 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7235 (the_alpha_linux_nat_target): New.
7236 (alpha_linux_register_u_offset): Refactor as
7237 alpha_linux_nat_target method.
7238 (_initialize_alpha_linux_nat): Adjust.
7239 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7240 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7241 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7242 methods of linux_nat_trad_target.
7243 (linux_trad_target): Delete.
7244 * linux-nat-trad.h (linux_trad_target): Delete function.
7245 (linux_nat_trad_target): New class.
7246 * mips-linux-nat.c (mips_linux_nat_target): New class.
7247 (super_fetch_registers, super_store_registers, super_close):
7249 (the_mips_linux_nat_target): New.
7250 (mips64_linux_regsets_fetch_registers)
7251 (mips64_linux_regsets_store_registers)
7252 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7253 (mips_linux_register_u_offset, mips_linux_read_description)
7254 (mips_linux_can_use_hw_breakpoint)
7255 (mips_linux_stopped_by_watchpoint)
7256 (mips_linux_stopped_data_address)
7257 (mips_linux_region_ok_for_hw_watchpoint)
7258 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7259 (mips_linux_close): Refactor as methods of mips_linux_nat.
7260 (_initialize_mips_linux_nat): Adjust to C++ification.
7262 * aix-thread.c (aix_thread_target): New class.
7263 (aix_thread_ops): Now an aix_thread_target.
7264 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7265 (aix_thread_fetch_registers, aix_thread_store_registers)
7266 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7267 (aix_thread_thread_alive, aix_thread_pid_to_str)
7268 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7269 Refactor as methods of aix_thread_target.
7270 (init_aix_thread_ops): Delete.
7271 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7272 and complete_target_initialization.
7273 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7274 (rs6000_nat_target): New class.
7275 (the_rs6000_nat_target): New.
7276 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7277 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7278 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7279 (super_create_inferior): Delete.
7280 (_initialize_rs6000_nat): Adjust to C++ification.
7282 * arm-linux-nat.c (arm_linux_nat_target): New class.
7283 (the_arm_linux_nat_target): New.
7284 (arm_linux_fetch_inferior_registers)
7285 (arm_linux_store_inferior_registers, arm_linux_read_description)
7286 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7287 (arm_linux_remove_hw_breakpoint)
7288 (arm_linux_region_ok_for_hw_watchpoint)
7289 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7290 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7291 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7292 arm_linux_nat_target.
7293 (_initialize_arm_linux_nat): Adjust to C++ification.
7295 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7296 (the_aarch64_linux_nat_target): New.
7297 (aarch64_linux_fetch_inferior_registers)
7298 (aarch64_linux_store_inferior_registers)
7299 (aarch64_linux_child_post_startup_inferior)
7300 (aarch64_linux_read_description)
7301 (aarch64_linux_can_use_hw_breakpoint)
7302 (aarch64_linux_insert_hw_breakpoint)
7303 (aarch64_linux_remove_hw_breakpoint)
7304 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7305 (aarch64_linux_region_ok_for_hw_watchpoint)
7306 (aarch64_linux_stopped_data_address)
7307 (aarch64_linux_stopped_by_watchpoint)
7308 (aarch64_linux_watchpoint_addr_within_range)
7309 (aarch64_linux_can_do_single_step): Refactor as methods of
7310 aarch64_linux_nat_target.
7311 (super_post_startup_inferior): Delete.
7312 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7314 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7315 (the_hppa_linux_nat_target): New.
7316 (hppa_linux_fetch_inferior_registers)
7317 (hppa_linux_store_inferior_registers): Refactor as methods of
7318 hppa_linux_nat_target.
7319 (_initialize_hppa_linux_nat): Adjust to C++ification.
7321 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7322 (the_ia64_linux_nat_target): New.
7323 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7324 (ia64_linux_stopped_data_address)
7325 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7326 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7327 ia64_linux_nat_target methods.
7328 (super_xfer_partial): Delete.
7329 (_initialize_ia64_linux_nat): Adjust to C++ification.
7331 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7332 (the_m32r_linux_nat_target): New.
7333 (m32r_linux_fetch_inferior_registers)
7334 (m32r_linux_store_inferior_registers): Refactor as
7335 m32r_linux_nat_target methods.
7336 (_initialize_m32r_linux_nat): Adjust to C++ification.
7338 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7339 (the_m68k_linux_nat_target): New.
7340 (m68k_linux_fetch_inferior_registers)
7341 (m68k_linux_store_inferior_registers): Refactor as
7342 m68k_linux_nat_target methods.
7343 (_initialize_m68k_linux_nat): Adjust to C++ification.
7345 * s390-linux-nat.c (s390_linux_nat_target): New class.
7346 (the_s390_linux_nat_target): New.
7347 (s390_linux_fetch_inferior_registers)
7348 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7349 (s390_insert_watchpoint, s390_remove_watchpoint)
7350 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7351 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7352 (s390_auxv_parse, s390_read_description): Refactor as methods of
7353 s390_linux_nat_target.
7354 (_initialize_s390_nat): Adjust to C++ification.
7356 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7357 (the_sparc_linux_nat_target): New.
7358 (_initialize_sparc_linux_nat): Adjust to C++ification.
7359 * sparc-nat.c (sparc_fetch_inferior_registers)
7360 (sparc_store_inferior_registers): Remove target_ops parameter.
7361 * sparc-nat.h (sparc_fetch_inferior_registers)
7362 (sparc_store_inferior_registers): Remove target_ops parameter.
7363 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7364 (the_sparc64_linux_nat_target): New.
7365 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7367 * spu-linux-nat.c (spu_linux_nat_target): New class.
7368 (the_spu_linux_nat_target): New.
7369 (spu_child_post_startup_inferior, spu_child_post_attach)
7370 (spu_child_wait, spu_fetch_inferior_registers)
7371 (spu_store_inferior_registers, spu_xfer_partial)
7372 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7374 (_initialize_spu_nat): Adjust to C++ification.
7376 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7377 (the_tilegx_linux_nat_target): New.
7378 (fetch_inferior_registers, store_inferior_registers):
7379 Refactor as methods.
7380 (_initialize_tile_linux_nat): Adjust to C++ification.
7382 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7383 (the_xtensa_linux_nat_target): New.
7384 (xtensa_linux_fetch_inferior_registers)
7385 (xtensa_linux_store_inferior_registers): Refactor as
7386 xtensa_linux_nat_target methods.
7387 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7389 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7390 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7391 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7392 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7393 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7394 (fbsd_stopped_by_sw_breakpoint)
7395 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7396 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7397 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7398 (fbsd_post_startup_inferior, fbsd_post_attach)
7399 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7400 (fbsd_set_syscall_catchpoint)
7401 (super_xfer_partial, super_resume, super_wait)
7402 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7403 (fbsd_handle_debug_trap): Remove target_ops parameter.
7404 (fbsd_nat_add_target): Delete.
7405 * fbsd-nat.h: Include "inf-ptrace.h".
7406 (fbsd_nat_add_target): Delete.
7407 (USE_SIGTRAP_SIGINFO): Define.
7408 (fbsd_nat_target): New class.
7410 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7411 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7412 (amd64bsd_target): Delete.
7413 * amd64-bsd-nat.h: New file.
7414 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7416 (amd64_fbsd_nat_target): New class.
7417 (the_amd64_fbsd_nat_target): New.
7418 (amd64fbsd_read_description): Refactor as method of
7419 amd64_fbsd_nat_target.
7420 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7421 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7422 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7423 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7424 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7425 (i386bsd_target): Delete.
7426 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7427 (i386bsd_fetch_inferior_registers)
7428 (i386bsd_store_inferior_registers): Declare.
7429 (i386_bsd_nat_target): New class.
7430 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7431 (the_i386_fbsd_nat_target): New.
7432 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7433 i386_fbsd_nat_target methods.
7434 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7435 (_initialize_i386fbsd_nat): Adjust to C++ification.
7436 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7437 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7438 (_initialize_x86_bsd_nat): Adjust to C++ification.
7439 * x86-bsd-nat.h: Include "x86-nat.h".
7440 (x86bsd_target): Delete declaration.
7441 (x86bsd_nat_target): New class.
7443 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7444 (the_aarch64_fbsd_nat_target): New.
7445 (aarch64_fbsd_fetch_inferior_registers)
7446 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7447 aarch64_fbsd_nat_target.
7448 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7449 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7450 (the_alpha_bsd_nat_target): New.
7451 (alphabsd_fetch_inferior_registers)
7452 (alphabsd_store_inferior_registers): Refactor as
7453 alpha_bsd_nat_target methods.
7454 (_initialize_alphabsd_nat): Refactor as methods of
7455 alpha_bsd_nat_target.
7456 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7457 (the_amd64_nbsd_nat_target): New.
7458 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7459 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7460 (the_amd64_obsd_nat_target): New.
7461 (_initialize_amd64obsd_nat): Adjust to C++ification.
7462 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7463 (the_arm_fbsd_nat_target): New.
7464 (arm_fbsd_fetch_inferior_registers)
7465 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7466 (_initialize_arm_fbsd_nat): Refactor as methods of
7467 arm_fbsd_nat_target.
7468 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7469 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7470 (the_arm_netbsd_nat_target): New.
7471 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7472 arm_netbsd_nat_target.
7473 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7474 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7475 (the_hppa_nbsd_nat_target): New.
7476 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7477 hppa_nbsd_nat_target methods.
7478 (_initialize_hppanbsd_nat): Adjust to C++ification.
7479 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7480 (the_hppa_obsd_nat_target): New.
7481 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7482 methods of hppa_obsd_nat_target.
7483 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7485 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7486 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7488 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7489 (_initialize_i386obsd_nat): Use add_target.
7490 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7491 (the_m68k_bsd_nat_target): New.
7492 (m68kbsd_fetch_inferior_registers)
7493 (m68kbsd_store_inferior_registers): Refactor as methods of
7494 m68k_bsd_nat_target.
7495 (_initialize_m68kbsd_nat): Adjust to C++ification.
7496 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7497 (the_mips_fbsd_nat_target): New.
7498 (mips_fbsd_fetch_inferior_registers)
7499 (mips_fbsd_store_inferior_registers): Refactor as methods of
7500 mips_fbsd_nat_target.
7501 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7503 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7504 (the_mips_nbsd_nat_target): New.
7505 (mipsnbsd_fetch_inferior_registers)
7506 (mipsnbsd_store_inferior_registers): Refactor as methods of
7507 mips_nbsd_nat_target.
7508 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7509 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7510 (the_mips64_obsd_nat_target): New.
7511 (mips64obsd_fetch_inferior_registers)
7512 (mips64obsd_store_inferior_registers): Refactor as methods of
7513 mips64_obsd_nat_target.
7514 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7516 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7518 * nbsd-nat.h: Include "inf-ptrace.h".
7519 (nbsd_nat_target): New class.
7520 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7521 (obsd_wait): Refactor as methods of obsd_nat_target.
7522 (obsd_add_target): Delete.
7523 * obsd-nat.h: Include "inf-ptrace.h".
7524 (obsd_nat_target): New class.
7525 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7526 (the_ppc_fbsd_nat_target): New.
7527 (ppcfbsd_fetch_inferior_registers)
7528 (ppcfbsd_store_inferior_registers): Refactor as methods of
7529 ppc_fbsd_nat_target.
7530 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7532 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7533 (the_ppc_nbsd_nat_target): New.
7534 (ppcnbsd_fetch_inferior_registers)
7535 (ppcnbsd_store_inferior_registers): Refactor as methods of
7536 ppc_nbsd_nat_target.
7537 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7538 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7539 (the_ppc_obsd_nat_target): New.
7540 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7541 methods of ppc_obsd_nat_target.
7542 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7544 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7545 (the_sh_nbsd_nat_target): New.
7546 (shnbsd_fetch_inferior_registers)
7547 (shnbsd_store_inferior_registers): Refactor as methods of
7549 (_initialize_shnbsd_nat): Adjust to C++ification.
7550 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7551 (inf_ptrace_xfer_partial): Delete.
7552 (sparc_xfer_partial, sparc_target): Delete.
7553 * sparc-nat.h (sparc_fetch_inferior_registers)
7554 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7555 (sparc_target): Delete function declaration.
7556 (sparc_target): New template class.
7557 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7558 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7559 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7560 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7562 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7563 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7564 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7565 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7567 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7568 (the_vax_bsd_nat_target): New.
7569 (vaxbsd_fetch_inferior_registers)
7570 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7572 (_initialize_vaxbsd_nat): Adjust to C++ification.
7574 * bsd-kvm.c (bsd_kvm_target): New class.
7575 (bsd_kvm_ops): Now a bsd_kvm_target.
7576 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7577 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7578 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7580 (bsd_kvm_return_one): Delete.
7581 (bsd_kvm_add_target): Adjust to C++ification.
7583 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7584 (nto_procfs_target_procfs): New classes.
7585 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7586 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7587 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7588 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7589 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7590 (procfs_remove_hw_breakpoint, procfs_resume)
7591 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7592 (procfs_kill_inferior, procfs_store_registers)
7593 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7594 as methods of nto_procfs_target.
7595 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7596 (nto_native_ops): Delete.
7597 (procfs_open, procfs_native_open): Delete.
7598 (nto_native_ops): Now an nto_procfs_target_native.
7599 (init_procfs_targets): Adjust to C++ification.
7600 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7601 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7602 Refactor as methods of nto_procfs_target.
7604 * go32-nat.c (go32_nat_target): New class.
7605 (the_go32_nat_target): New.
7606 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7607 (go32_store_registers, go32_xfer_partial, go32_files_info)
7608 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7609 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7610 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7611 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7612 (go32_target): Delete.
7613 (_initialize_go32_nat): Adjust to C++ification.
7615 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7616 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7617 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7618 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7620 (gnu_target): Delete.
7621 * gnu-nat.h (gnu_target): Delete.
7622 (gnu_nat_target): New class.
7623 * i386-gnu-nat.c (gnu_base_target): New.
7624 (i386_gnu_nat_target): New class.
7625 (the_i386_gnu_nat_target): New.
7626 (_initialize_i386gnu_nat): Adjust to C++ification.
7628 2018-05-02 Pedro Alves <palves@redhat.com>
7630 * bfd-target.c (target_bfd_xclose): Rename to ...
7631 (target_bfd_close): ... this.
7632 (target_bfd_reopen): Adjust.
7633 * target.c (target_close): Remove references to to_xclose.
7634 * target.h (target_ops::to_xclose): Delete.
7635 (target_ops::to_close): Update comments.
7637 2018-05-02 Pedro Alves <palves@redhat.com>
7639 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7641 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7642 * inf-ptrace.c (inf_ptrace_register_u_offset)
7643 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7644 (inf_ptrace_store_register, inf_ptrace_store_registers)
7645 (inf_ptrace_trad_target): Move to ...
7646 * linux-nat-trad.c: ... this new file.
7647 * linux-nat-trad.h: New file.
7648 * linux-nat.c (linux_target_install_ops): Make extern.
7649 (linux_trad_target): Delete.
7650 * linux-nat.h (linux_trad_target): Delete declaration.
7651 (linux_target_install_ops): Declare.
7652 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7655 2018-05-02 Pedro Alves <palves@redhat.com>
7657 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7658 procfs_target/add_target here.
7659 * procfs.c (procfs_target): Make static.
7660 (_initialize_procfs): Call add_target here.
7661 * procfs.h (struct target_ops): Remove forward declaration.
7662 (procfs_target): Remove declaration.
7663 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7665 2018-05-02 Pedro Alves <palves@redhat.com>
7667 * procfs.c (procfs_stopped_by_watchpoint)
7668 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7669 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7671 (procfs_use_watchpoints): Delete, move contents...
7672 (procfs_target): ... here.
7673 * procfs.h (procfs_use_watchpoints): Delete declaration.
7674 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7675 procfs_use_watchpoints.
7676 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7677 procfs_use_watchpoints.
7679 2018-05-02 Tom Tromey <tom@tromey.com>
7682 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7683 and var_zuinteger_unlimited.
7684 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7685 and PARAM_ZUINTEGER_UNLIMITED.
7686 (set_parameter_value): Handle var_zuinteger and
7687 var_zuinteger_unlimited.
7688 (add_setshow_generic): Likewise.
7689 (parmpy_init): Likewise.
7691 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7694 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7695 pointer is not null before dereferencing it.
7697 2018-04-30 Tom Tromey <tom@tromey.com>
7699 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7702 2018-04-30 Tom Tromey <tom@tromey.com>
7704 * breakpoint.c (mention): Remove use of is_mi_like_p.
7705 (print_mention_ranged_breakpoint): Likewise.
7706 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7709 2018-04-30 Tom Tromey <tom@tromey.com>
7711 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7713 2018-04-30 Tom Tromey <tom@tromey.com>
7715 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7716 (info_spu_event_command): Remove some uses of is_mi_like_p.
7718 2018-04-30 Tom Tromey <tom@tromey.com>
7720 * python/py-framefilter.c (py_print_single_arg)
7721 (enumerate_locals, py_print_args, py_print_frame): Remove some
7722 uses of is_mi_like_p.
7724 2018-04-30 Tom Tromey <tom@tromey.com>
7727 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7728 * ui-out.h (ui_out::is_mi_like_p): Now const.
7729 (ui_out::do_is_mi_like_p): Now const.
7730 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7732 2018-04-30 Tom Tromey <tom@tromey.com>
7734 * varobj.c (varobj_set_visualizer): Use new_reference.
7735 * python/python.c (gdbpy_decode_line): Use new_reference.
7736 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7739 2018-04-30 Tom Tromey <tom@tromey.com>
7741 * varobj.c (install_new_value): Use new_reference.
7742 * value.h (value_incref): Return void. Swap intro comment with
7744 * value.c (set_value_parent): Use new_reference.
7745 (value_incref): Return void. Update intro comment.
7746 (release_value): Use new_reference.
7747 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7749 2018-04-30 Tom Tromey <tom@tromey.com>
7751 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7752 * gdb_bfd.h (new_bfd_ref): Remove.
7753 (gdb_bfd_open): Update comment.
7754 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7755 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7756 (gdb_bfd_fdopenr): Use new_reference.
7757 * exec.c (exec_file_attach): Use new_reference.
7759 2018-04-30 Tom Tromey <tom@tromey.com>
7761 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7764 2018-04-30 Tom Tromey <tom@tromey.com>
7766 * jit.c (jit_read_code_entry): Use type_align.
7767 * i386-tdep.c (i386_gdbarch_init): Don't call
7768 set_gdbarch_long_long_align_bit.
7769 * gdbarch.sh: Remove long_long_align_bit.
7770 * gdbarch.c, gdbarch.h: Rebuild.
7771 * arc-tdep.c (arc_type_align): New function.
7772 (arc_gdbarch_init): Use arc_type_align. Don't call
7773 set_gdbarch_long_long_align_bit.
7775 2018-04-30 Tom Tromey <tom@tromey.com>
7777 * rust-lang.c (rust_type_alignment): Remove.
7778 (rust_composite_type): Use type_align.
7780 2018-04-30 Tom Tromey <tom@tromey.com>
7782 * NEWS: Mention Type.align.
7783 * python/py-type.c (typy_get_alignof): New function.
7784 (type_object_getset): Add "alignof".
7786 2018-04-30 Tom Tromey <tom@tromey.com>
7790 * std-operator.def (UNOP_ALIGNOF): New operator.
7791 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7793 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7794 * c-lang.c (c_op_print_tab): Add alignof.
7795 * c-exp.y (ALIGNOF): New token.
7796 (exp): Add "ALIGNOF" production.
7797 (ident_tokens): Add _Alignof and alignof.
7799 2018-04-30 Tom Tromey <tom@tromey.com>
7801 * i386-tdep.c (i386_type_align): New function.
7802 (i386_gdbarch_init): Update.
7803 * gdbarch.sh (type_align): New method.
7804 * gdbarch.c, gdbarch.h: Rebuild.
7805 * arch-utils.h (default_type_align): Declare.
7806 * arch-utils.c (default_type_align): New function.
7807 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7808 (struct type) <align_log2>: New field.
7809 <instance_flags>: Now a bitfield.
7810 (TYPE_RAW_ALIGN): New macro.
7811 (type_align, type_raw_align, set_type_align): Declare.
7812 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7814 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7815 (get_alignment, maybe_set_alignment): New functions.
7816 (read_structure_type, read_enumeration_type, read_array_type)
7817 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7818 (read_subrange_type, read_base_type): Set type alignment.
7820 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7822 * dwarf2read.c (read_index_from_section): Use bool.
7824 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7827 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7830 2018-04-29 John Reiser <jreiser@BitWagon.com>
7833 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7834 last step, and do it atomically.
7836 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7838 * compile/compile-c-types.c (convert_int, convert_float):
7841 2018-04-27 Tom Tromey <tom@tromey.com>
7844 * rust-lang.c (rust_inclusive_range_type_p): New function.
7845 (rust_range): Handle inclusive ranges.
7846 (rust_compute_range): Likewise.
7847 * rust-exp.y (struct rust_op) <inclusive>: New field.
7848 (DOTDOTEQ): New constant.
7849 (range_expr): Add "..=" productions.
7850 (operator_tokens): Add "..=" token.
7851 (ast_range): Add "inclusive" parameter.
7852 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7854 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7856 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7857 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7859 * expprint.c (print_subexp_standard): Handle new bounds values.
7860 (dump_subexp_body_standard): Likewise.
7862 2018-04-27 Tom Tromey <tom@tromey.com>
7864 * configure: Rebuild.
7865 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7866 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7868 (class symbol_needs_eval_context): Likewise.
7869 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7870 (mock_mapped_index::symbol_name_at): Use "override". Remove
7872 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7874 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7875 * aarch64-tdep.c (instruction_reader::read): Use "override".
7876 (instruction_reader_test::read): Likewise.
7877 * arm-tdep.c (instruction_reader::read): Use "override".
7878 (instruction_reader_thumb::read): Likewise.
7880 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7883 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7884 instead of remote_send.
7885 (remote_send): Remove.
7887 2018-04-26 Pedro Alves <palves@redhat.com>
7889 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7890 find_function_start_sal instead of find_pc_line.
7892 2018-04-26 Pedro Alves <palves@redhat.com>
7894 * breakpoint.c (set_breakpoint_location_function): Handle
7896 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7897 * elfread.c (elf_symtab_read): Give data symbols with
7898 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7899 (elf_rel_plt_read): Update comment.
7900 * linespec.c (convert_linespec_to_sals): Handle
7902 (minsym_found): Handle mst_data_gnu_ifunc.
7903 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7904 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7905 * parse.c (find_minsym_type_and_address): Handle
7907 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7908 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7909 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7911 <mst_data_gnu_ifunc>: New enumerator.
7913 2018-04-26 Pedro Alves <palves@redhat.com>
7915 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7916 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7917 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7919 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7920 (lookup_minimal_symbol_by_pc): Adjust.
7921 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7922 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7923 * minsyms.h (lookup_msym_prefer): New enum.
7924 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7925 parameter by a lookup_msym_prefer parameter.
7927 2018-04-26 Pedro Alves <palves@redhat.com>
7929 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7930 ends in "@plt" instead of looking at the symbol's section.
7932 2018-04-26 Pedro Alves <palves@redhat.com>
7934 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7936 (find_pc_partial_function_gnu_ifunc): Rename to ...
7937 (find_pc_partial_function): ... this, and remove references to
7939 (find_pc_partial_function): Delete old implementation.
7940 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7942 2018-04-26 Pedro Alves <palves@redhat.com>
7944 * linespec.c (struct bound_minimal_symbol_search_key): New.
7945 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7946 skip first line if we found a GNU ifunc minimal symbol by name.
7947 (compare_msymbols): Change parameters to work with a destructured
7949 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7952 2018-04-26 Pedro Alves <palves@redhat.com>
7954 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7955 ifunc targets here. Instead, if we have an ifunc minsym, use its
7957 (add_location_to_breakpoint): Store the minsym and the objfile in
7958 the breakpoint location.
7959 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7960 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7961 Record the minsym in the sal.
7962 * symtab.h (symtab_and_line) <msymbol>: New field.
7964 2018-04-26 Pedro Alves <palves@redhat.com>
7966 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7967 unless we actually resolved the ifunc.
7969 2018-04-26 Pedro Alves <palves@redhat.com>
7971 * c-exp.y (variable production): Prefer ifunc minsyms over
7972 regular function symbols.
7973 * symtab.c (find_gnu_ifunc): New function.
7974 * minsyms.h (lookup_msym_prefer): New enum.
7975 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7976 parameter by a lookup_msym_prefer parameter.
7977 * symtab.h (find_gnu_ifunc): New declaration.
7979 2018-04-26 Pedro Alves <palves@redhat.com>
7981 * blockframe.c (find_gnu_ifunc_target_type): New function.
7982 (find_function_type): New.
7983 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7984 return a value with a memory address.
7985 (eval_call): For calls to GNU ifunc functions, try to find the
7986 type of the target function from the type that the resolver
7988 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7990 * infcall.c (find_function_return_type): Delete.
7991 (find_function_addr): Add 'function_type' parameter. For calls to
7992 GNU ifunc functions, try to find the type of the target function
7993 from the type that the resolver returns, and return it via
7995 (call_function_by_hand_dummy): Adjust to use the function type
7996 returned by find_function_addr.
7997 (find_function_addr): Add 'function_type' parameter and move
7999 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8002 2018-04-26 Pedro Alves <palves@redhat.com>
8004 * c-exp.y (variable production): Skip finding an alias for ifunc
8007 2018-04-26 Pedro Alves <palves@redhat.com>
8009 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8011 2018-04-25 Pedro Alves <palves@redhat.com>
8013 * infcmd.c (kill_command): Print the pid as string, not the whole
8014 thread's ptid. Add comment. s/has been killed/killed/ in output
8016 * remote.c (remote_detach_1): Print the pid as string, not the
8017 whole thread's ptid.
8019 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8020 Sergio Durigan Junior <sergiodj@redhat.com>
8021 Pedro Alves <palves@redhat.com>
8023 * infcmd.c (kill_command): Print message when inferior has
8025 * inferior.c (print_inferior_events): Remove 'static'. Set as
8027 (add_inferior): Improve message printed when
8028 'print_inferior_events' is on.
8029 (exit_inferior): Remove message printed when
8030 'print_inferior_events' is on.
8031 (detach_inferior): Improve message printed when
8032 'print_inferior_events' is on.
8033 (initialize_inferiors): Use 'add_inferior_silent' to set
8034 'current_inferior_'.
8035 * inferior.h (print_inferior_events): Declare here as
8037 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8038 '[Detaching...]' messages when 'print_inferior_events' is on.
8039 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8040 as prefix/suffix for messages. Remove periods. Fix erroneous
8041 'Detaching after fork from child...', replace it by '... from
8043 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8044 prefix/suffix when printing 'Detaching...' messages. Print
8045 them when 'print_inferior_events' is on.
8046 * remote.c (remote_detach_1): Print message when detaching
8047 from inferior and '!is_fork_parent'.
8049 2018-04-24 Tom Tromey <tom@tromey.com>
8051 * cli-out.h: Reindent.
8053 2018-04-24 Tom Tromey <tom@tromey.com>
8055 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8056 (cli_ui_out::do_field_string): Use fputs_filtered.
8057 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8059 2018-04-23 Tom Tromey <tom@tromey.com>
8061 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8062 gdb::unique_xmalloc_ptr.
8064 2018-04-23 Tom Tromey <tom@tromey.com>
8066 * configure: Rebuild.
8068 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8071 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8072 prepare_for_testing. Set normal_bp to r_debug_state if target
8075 2018-04-21 Pedro Alves <palves@redhat.com>
8076 Rajendra SY <rajendra.sy@gmail.com>
8078 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8079 * remote.c (extended_remote_attach): In all-stop mode, mark the
8080 thread as executing.
8082 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8084 * thread.c (thread_apply_all_command): Fix comment.
8085 (thread_command): Fix comment.
8087 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8089 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8091 * features/aarch64-core.c (create_feature_aarch64_core):
8093 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8095 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8097 * features/i386/32bit-avx512.c
8098 (create_feature_i386_32bit_avx512): Likewise.
8099 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8101 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8103 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8105 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8107 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8109 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8111 * features/i386/64bit-avx512.c
8112 (create_feature_i386_64bit_avx512): Likewise.
8113 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8115 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8117 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8119 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8121 * features/i386/64bit-segments.c
8122 (create_feature_i386_64bit_segments): Likewise.
8123 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8125 * features/i386/x32-core.c
8126 (create_feature_i386_x32_core): Likewise.
8127 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8128 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8129 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8130 * target-descriptions.c: In generated code, don't pass xml
8133 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8135 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8136 (print_xml_feature::visit_post): Likewise.
8137 (print_xml_feature::visit): Likewise.
8138 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8139 (print_xml_feature): Add new class.
8140 * regformats/regdat.sh: Null xmltarget on feature targets.
8141 * target-descriptions.c (struct target_desc): Add xmltarget.
8142 (maintenance_check_tdesc_xml_convert): Add unittest function.
8143 (tdesc_get_features_xml): Add function to get xml.
8144 (maintenance_check_xml_descriptions): Test xml generation.
8145 * xml-tdesc.c (string_read_description_xml): Add function.
8146 * xml-tdesc.h (string_read_description_xml): Add declaration.
8148 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8150 * features/Makefile: Add feature marker to targets with new style
8151 target descriptions.
8152 * regformats/aarch64.dat: Regenerate.
8153 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8154 * regformats/i386/amd64-avx-linux.dat: Likewise.
8155 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8156 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8157 * regformats/i386/amd64-linux.dat: Likewise.
8158 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8159 * regformats/i386/amd64.dat: Likewise.
8160 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8161 * regformats/i386/i386-avx-linux.dat: Likewise.
8162 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8163 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8164 * regformats/i386/i386-linux.dat: Likewise.
8165 * regformats/i386/i386-mmx-linux.dat: Likewise.
8166 * regformats/i386/i386-mpx-linux.dat: Likewise.
8167 * regformats/i386/i386.dat: Likewise.
8168 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8169 * regformats/i386/x32-avx-linux.dat: Likewise.
8170 * regformats/i386/x32-linux.dat: Likewise.
8171 * regformats/tic6x-c62x-linux.dat: Likewise.
8172 * regformats/tic6x-c64x-linux.dat: Likewise.
8173 * regformats/tic6x-c64xp-linux.dat: Likewise.
8174 * regformats/regdat.sh: Parse feature marker.
8176 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8178 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8179 (tdesc_osabi_name): Likewise.
8180 * target-descriptions.c (tdesc_architecture_name): Add new
8182 (tdesc_osabi_name): Likewise.
8184 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8186 * common/tdesc.c (tdesc_predefined_type): Move to here.
8187 (tdesc_named_type): Likewise.
8188 (tdesc_create_vector): Likewise.
8189 (tdesc_create_struct): Likewise.
8190 (tdesc_set_struct_size): Likewise.
8191 (tdesc_create_union): Likewise.
8192 (tdesc_create_flags): Likewise.
8193 (tdesc_create_enum): Likewise.
8194 (tdesc_add_field): Likewise.
8195 (tdesc_add_typed_bitfield): Likewise.
8196 (tdesc_add_bitfield): Likewise.
8197 (tdesc_add_flag): Likewise.
8198 (tdesc_add_enum_value): Likewise.
8199 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8200 (struct tdesc_type_vector): Likewise.
8201 (struct tdesc_type_field): Likewise.
8202 (struct tdesc_type_with_fields): Likewise.
8203 (tdesc_create_enum): Add declaration.
8204 (tdesc_add_typed_bitfield): Likewise.
8205 (tdesc_add_enum_value): Likewise.
8206 * target-descriptions.c (tdesc_type_field): Move from here.
8207 (tdesc_type_builtin): Likewise.
8208 (tdesc_type_vector): Likewise.
8209 (tdesc_type_with_fields): Likewise.
8210 (tdesc_predefined_types): Likewise.
8211 (tdesc_named_type): Likewise.
8212 (tdesc_create_vector): Likewise.
8213 (tdesc_create_struct): Likewise.
8214 (tdesc_set_struct_size): Likewise.
8215 (tdesc_create_union): Likewise.
8216 (tdesc_create_flags): Likewise.
8217 (tdesc_create_enum): Likewise.
8218 (tdesc_add_field): Likewise.
8219 (tdesc_add_typed_bitfield): Likewise.
8220 (tdesc_add_bitfield): Likewise.
8221 (tdesc_add_flag): Likewise.
8222 (tdesc_add_enum_value): Likewise.
8223 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8224 (tdesc_add_typed_bitfield): Likewise.
8225 (tdesc_add_enum_value): Likewise.
8227 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8229 * common/tdesc.c (tdesc_feature::accept): Move to here.
8230 (tdesc_feature::operator==): Likewise.
8231 (tdesc_create_reg): Likewise.
8232 * common/tdesc.h (tdesc_type_kind): Likewise.
8233 (struct tdesc_type): Likewise.
8234 (struct tdesc_feature): Likewise.
8235 * regformats/regdat.sh: Create a feature.
8236 * target-descriptions.c (tdesc_type_kind): Move from here.
8237 (tdesc_type): Likewise.
8238 (tdesc_type_up): Likewise.
8239 (tdesc_feature): Likewise.
8240 (tdesc_create_reg): Likewise.
8242 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8244 * Makefile.in: Add arch/tdesc.c
8245 * common/tdesc.c: New file.
8246 * common/tdesc.h (tdesc_element_visitor): Move to here.
8247 (tdesc_element): Likewise.
8248 (tdesc_reg): Likewise.
8249 (tdesc_reg_up): Likewise.
8250 * regformats/regdef.h (reg): Add offset to constructors.
8251 * target-descriptions.c (tdesc_element_visitor): Move from here.
8252 (tdesc_element): Likewise.
8253 (tdesc_reg): Likewise.
8254 (tdesc_reg_up): Likewise.
8256 2018-04-17 Tom Tromey <tom@tromey.com>
8258 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8261 2018-04-17 Tom Tromey <tom@tromey.com>
8263 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8265 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8267 * symtab.c (print_symbol_info): Skip printing filename and line
8268 number when `last' is NULL.
8269 (symtab_symbol_info): Use empty string instead of NULL for first
8270 invocation of print_symbol_info.
8271 (rbreak_command): Pass NULL to `last' parameter of
8274 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8276 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8279 2018-04-16 Pedro Alves <palves@redhat.com>
8281 * MAINTAINERS (sh): Remove.
8282 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8283 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8284 (ALLDEPFILES): Remove sh64-tdep.c.
8285 * NEWS: Mentions that support for SH-5/SH64 is removed.
8286 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8287 (sh*-*-openbsd*): Ditto.
8288 (sh64-*-elf*): Remove.
8290 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8291 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8292 * sh-tdep.c: No longer include "sh64-tdep.h".
8293 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8294 * sh64-tdep.c, sh64-tdep.h: Remove files.
8296 2018-04-16 Pedro Alves <palves@redhat.com>
8298 * MAINTAINERS: Remove m88k.
8299 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8300 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8301 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8302 * NEWS: Mention that support for m88k was removed.
8303 * configure.host (m88*-*-*): Remove support.
8304 * configure.nat (m88k-*-*): Remove support.
8305 * configure.tgt (m88*-*-openbsd*): Remove.
8306 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8308 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8310 * configure.tgt (x86_tobjs): New variable.
8311 (amd64_tobjs, i386_tobjs): Use it.
8313 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8315 * symtab.c (print_symbol_info): Precede the symbol definition by
8316 the line number when available.
8317 * NEWS: Advertise this enhancement.
8319 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8321 * NEWS (New options): announce set/show record btrace cpu.
8322 * btrace.c: Include record-btrace.h.
8323 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8324 the vendor is unknown.
8325 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8326 Maybe overwrite the btrace configuration's cpu.
8327 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8328 (btrace_fetch): Add cpu parameter. Update callers.
8329 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8330 Maybe overwrite the btrace configuration's cpu. Skip enabling
8331 errata workarounds if the vendor is unknown.
8332 * python/py-record-btrace.c: Include record-btrace.h.
8333 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8334 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8335 * record-btrace.c (record_btrace_cpu_state_kind): New.
8336 (record_btrace_cpu): New.
8337 (set_record_btrace_cpu_cmdlist): New.
8338 (record_btrace_get_cpu): New.
8339 (require_btrace_thread, record_btrace_info)
8340 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8341 (cmd_set_record_btrace_cpu_none): New.
8342 (cmd_set_record_btrace_cpu_auto): New.
8343 (cmd_set_record_btrace_cpu): New.
8344 (cmd_show_record_btrace_cpu): New.
8345 (_initialize_record_btrace): Initialize set/show record btrace cpu
8347 * record-btrace.h (record_btrace_get_cpu): New.
8349 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8351 * record.c (set_record_command): Fix typo in message.
8353 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8355 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8357 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8359 * infrun.c (process_event_stop_test): Call
8360 gdbarch_in_indirect_branch_thunk.
8361 * gdbarch.sh (in_indirect_branch_thunk): New.
8362 * gdbarch.c: Regenerated.
8363 * gdbarch.h: Regenerated.
8366 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8367 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8368 (ALLDEPFILES): Add x86-tdep.c.
8369 * arch-utils.h (default_in_indirect_branch_thunk): New.
8370 * arch-utils.c (default_in_indirect_branch_thunk): New.
8371 * i386-tdep: Include x86-tdep.h.
8372 (i386_in_indirect_branch_thunk): New.
8373 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8375 * amd64-tdep: Include x86-tdep.h.
8376 (amd64_in_indirect_branch_thunk): New.
8377 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8379 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8382 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8383 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8384 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8387 2018-04-12 Tom Tromey <tom@tromey.com>
8389 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8390 (rust_evaluate_subexp): Likewise.
8392 2018-04-12 Pedro Alves <palves@redhat.com>
8394 * procfs.c (procfs_detach): Make forward declaration's prototype
8395 match definition's protototype.
8396 (proc_get_LDT_entry): Remove stale do_cleanups call.
8398 2018-04-12 Pedro Alves <palves@redhat.com>
8400 * target.h (target_ops::to_has_exited): Delete.
8401 (target_has_exited): Delete.
8402 * target-delegates.c: Regenerate.
8404 2018-04-11 Pedro Alves <palves@redhat.com>
8406 * target.c (fileio_fh_t::t): Add comment.
8407 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8408 (target_fileio_close): Handle a NULL target.
8409 (invalidate_fileio_fh): New.
8410 (target_close): Call it.
8411 * remote.c (remote_hostio_send_command): No longer check whether
8412 remote_desc is open.
8414 2018-04-11 Pedro Alves <palves@redhat.com>
8416 * target.c (fileio_fh_t): Make it a named struct instead of a
8418 (fileio_fh_t::is_closed): New method.
8419 (DEF_VEC_O (fileio_fh_t)): Remove.
8420 (fileio_fhandles): Now a std::vector.
8421 (is_closed_fileio_fh): Delete.
8422 (acquire_fileio_fd): Adjust. Rename parameters.
8423 (release_fileio_fd): Adjust.
8424 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8425 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8426 (target_fileio_close): Adjust.
8428 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8430 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8433 2018-04-10 Pedro Alves <palves@redhat.com>
8435 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8436 (scoped_finish_thread_state): New class.
8437 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8439 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8440 (fetch_inferior_event, normal_stop): Likewise.
8441 * thread.c (finish_thread_state_cleanup): Delete.
8443 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8444 Pedro Alves <palves@redhat.com>
8446 * value.c: Include "selftest.h" and "common/array-view.h".
8447 (struct range) <operator ==>: New.
8448 (test_ranges_contain): New.
8449 (check_ranges_vector): New.
8450 (test_insert_into_bit_range_vector): New.
8451 (_initialize_values): Register selftests.
8452 * common/array-view.h (operator==, operator!=): New.
8454 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8456 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8458 * inline-frame.c: Include <algorithm>.
8459 (struct inline_state): Add constructor.
8460 (inline_state_s): Remove.
8461 (DEF_VEC_O(inline_state_s)): Remove.
8462 (inline_states): Change type to std::vector.
8463 (find_inline_frame_state): Adjust to std::vector.
8464 (allocate_inline_frame_state): Remove.
8465 (clear_inline_frame_state): Adjust to std::vector.
8466 (skip_inline_frames): Adjust to std::vector.
8468 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8470 * tracepoint.h (struct trace_state_variable): Add constructor.
8471 <name>: Change type to std::string.
8472 * tracepoint.c (tsv_s): Remove.
8473 (DEF_VEC_O(tsv_s)): Remove.
8474 (tvariables): Change to std::vector.
8475 (create_trace_state_variable): Adjust to std::vector.
8476 (find_trace_state_variable): Likewise.
8477 (find_trace_state_variable_by_number): Likewise.
8478 (delete_trace_state_variable): Likewise.
8479 (trace_variable_command): Adjust to std::string.
8480 (delete_trace_variable_command): Likewise.
8481 (tvariables_info_1): Adjust to std::vector.
8482 (save_trace_state_variables): Likewise.
8483 (start_tracing): Likewise.
8484 (merge_uploaded_trace_state_variables): Adjust to std::vector
8486 * target.h (struct target_ops)
8487 <to_download_trace_state_variable>: Pass reference to
8488 trace_state_variable.
8489 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8490 * target-delegates.c: Re-generate.
8491 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8492 (mi_tsv_deleted): Likewise.
8493 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8494 * remote.c (remote_download_trace_state_variable): Change
8495 pointer to reference and adjust.
8496 * make-target-delegates (parse_argtypes): Handle references.
8497 (write_function_header): Likewise.
8498 (munge_type): Likewise.
8500 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8502 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8503 string_view-selftests.c.
8504 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8506 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8507 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8508 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8509 * unittests/basic_string_view/element_access/char/1.cc:
8511 * unittests/basic_string_view/element_access/char/empty.cc:
8513 * unittests/basic_string_view/element_access/char/front_back.cc:
8515 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8516 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8518 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8520 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8522 * unittests/basic_string_view/operations/compare/char/1.cc:
8524 * unittests/basic_string_view/operations/compare/char/13650.cc:
8526 * unittests/basic_string_view/operations/copy/char/1.cc:
8528 * unittests/basic_string_view/operations/data/char/1.cc:
8530 * unittests/basic_string_view/operations/find/char/1.cc:
8532 * unittests/basic_string_view/operations/find/char/2.cc:
8534 * unittests/basic_string_view/operations/find/char/3.cc:
8536 * unittests/basic_string_view/operations/find/char/4.cc:
8538 * unittests/basic_string_view/operations/rfind/char/1.cc:
8540 * unittests/basic_string_view/operations/rfind/char/2.cc:
8542 * unittests/basic_string_view/operations/rfind/char/3.cc:
8544 * unittests/basic_string_view/operations/substr/char/1.cc:
8546 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8547 * unittests/string_view-selftests.c: New file.
8549 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8551 * unittests/basic_string_view/capacity/1.cc: New file.
8552 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8553 * unittests/basic_string_view/cons/char/1.cc: New file.
8554 * unittests/basic_string_view/cons/char/2.cc: New file.
8555 * unittests/basic_string_view/cons/char/3.cc: New file.
8556 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8557 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8558 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8559 * unittests/basic_string_view/element_access/char/1.cc: New file.
8560 * unittests/basic_string_view/element_access/char/2.cc: New file.
8561 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8562 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8563 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8564 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8565 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8566 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8567 * unittests/basic_string_view/include.cc: New file.
8568 * unittests/basic_string_view/inserters/char/1.cc: New file.
8569 * unittests/basic_string_view/inserters/char/2.cc: New file.
8570 * unittests/basic_string_view/inserters/char/3.cc: New file.
8571 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8572 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8573 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8574 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8575 * unittests/basic_string_view/literals/types.cc: New file.
8576 * unittests/basic_string_view/literals/values.cc: New file.
8577 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8578 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8579 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8580 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8581 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8582 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8583 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8584 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8585 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8586 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8587 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8588 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8589 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8590 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8591 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8592 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8593 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8594 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8595 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8596 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8597 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8598 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8599 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8600 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8601 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8602 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8603 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8604 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8605 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8606 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8607 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8608 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8609 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8610 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8611 * unittests/basic_string_view/operators/char/2.cc: New file.
8612 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8613 * unittests/basic_string_view/range_access/char/1.cc: New file.
8614 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8615 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8616 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8617 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8618 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8619 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8620 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8621 * unittests/basic_string_view/typedefs.cc: New file.
8622 * unittests/basic_string_view/types/1.cc: New file.
8624 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8626 * common/gdb_string_view.h: Remove libstdc++ implementation
8627 details, adjust to gdb reality.
8628 * common/gdb_string_view.tcc: Likewise.
8629 * cli/cli-script.c (struct string_view): Remove.
8630 (user_args) <m_args>: Change element type to gdb::string_view.
8631 (user_args::insert_args): Adjust.
8633 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8635 * common/gdb_string_view.h: New file.
8636 * common/gdb_string_view.tcc: New file.
8638 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8640 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8641 * configure: Re-generate.
8643 2018-04-09 Pedro Alves <palves@redhat.com>
8645 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8646 (set_target_gdbarch): Call
8647 gdb::observers::architecture_changed.notify instead of
8648 observer_notify_architecture_changed.
8650 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8652 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8653 (do_restore_current_traceframe_cleanup): Remove.
8654 (restore_current_traceframe_cleanup_dtor): Remove.
8655 (make_cleanup_restore_current_traceframe): Remove.
8656 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8658 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8659 * infrun.c (fetch_inferior_event): Use
8660 scoped_restore_current_traceframe.
8662 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8664 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8666 <n_allocated_type_units>: Remove.
8667 <all_type_units>: Change to std::vector.
8668 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8669 to std::vector change.
8670 (dwarf2_per_objfile::get_cutu): Likewise.
8671 (dwarf2_per_objfile::get_tu): Likewise.
8672 (create_signatured_type_table_from_index): Likewise.
8673 (create_signatured_type_table_from_debug_names): Likewise.
8674 (dw2_symtab_iter_next): Likewise.
8675 (dw2_print_stats): Likewise.
8676 (dw2_expand_all_symtabs): Likewise.
8677 (dw2_expand_marked_cus): Likewise.
8678 (dw2_debug_names_iterator::next): Likewise.
8679 (dwarf2_initialize_objfile): Likewise.
8680 (add_signatured_type_cu_to_table): Likewise.
8681 (create_all_type_units): Likewise.
8682 (add_type_unit): Likewise.
8683 (struct tu_abbrev_offset): Add constructor.
8684 (build_type_psymtabs_1): Adjust to std::vector change.
8685 (print_tu_stats): Likewise.
8686 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8687 (write_debug_names): Likewise.
8689 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8691 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8692 Make an std::vector.
8693 <n_comp_units>: Remove.
8694 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8695 to std::vector change.
8696 (dwarf2_per_objfile::get_cutu): Likewise.
8697 (dwarf2_per_objfile::get_cu): Likewise.
8698 (create_cus_from_index): Likewise.
8699 (create_addrmap_from_index): Likewise.
8700 (create_addrmap_from_aranges): Likewise.
8701 (dwarf2_read_index): Likewise.
8702 (dw2_find_last_source_symtab): Likewise.
8703 (dw2_map_symtabs_matching_filename): Likewise.
8704 (dw2_symtab_iter_next): Likewise.
8705 (dw2_print_stats): Likewise.
8706 (dw2_expand_all_symtabs): Likewise.
8707 (dw2_expand_symtabs_with_fullname): Likewise.
8708 (dw2_expand_marked_cus): Likewise.
8709 (dw2_map_symbol_filenames): Likewise.
8710 (create_cus_from_debug_names): Likewise.
8711 (dwarf2_read_debug_names): Likewise.
8712 (dw2_debug_names_iterator::next): Likewise.
8713 (dwarf2_initialize_objfile): Likewise.
8714 (set_partial_user): Likewise.
8715 (dwarf2_build_psymtabs_hard): Likewise.
8716 (read_comp_units_from_section): Remove arguments, adjust to
8718 (create_all_comp_units): Adjust to std::vector and
8719 read_comp_units_from_section changes.
8720 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8722 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8723 (psyms_seen_size): Likewise.
8724 (write_gdbindex): Likewise.
8725 (write_debug_names): Likewise.
8727 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8729 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8730 with dwarf2_per_objfile.
8731 (create_cus_from_index): Likewise.
8732 (create_signatured_type_table_from_index): Likewise.
8733 (dwarf2_read_index): Likewise.
8734 (dwarf2_initialize_objfile): Likewise.
8735 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8736 per_cu rather than get_dwarf2_per_objfile.
8738 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8740 * dwarf2read.h (struct signatured_type): Forward declare.
8741 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8743 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8744 (dw2_get_cutu): ...this.
8745 (dwarf2_per_objfile::get_cu): Rename from...
8746 (dw2_get_cu): ...this.
8747 (dwarf2_per_objfile::get_tu): New.
8748 (create_addrmap_from_index): Adjust.
8749 (create_addrmap_from_aranges): Adjust.
8750 (dw2_find_last_source_symtab): Adjust.
8751 (dw2_map_symtabs_matching_filename): Adjust.
8752 (dw2_symtab_iter_next): Adjust.
8753 (dw2_print_stats): Adjust.
8754 (dw2_expand_all_symtabs): Adjust.
8755 (dw2_expand_symtabs_with_fullname): Adjust.
8756 (dw2_expand_marked_cus): Adjust.
8757 (dw_expand_symtabs_matching_file_matcher): Adjust.
8758 (dw2_map_symbol_filenames): Adjust.
8759 (dw2_debug_names_iterator::next): Adjust.
8760 (dwarf2_initialize_objfile): Adjust.
8761 (set_partial_user): Adjust.
8762 (dwarf2_build_psymtabs_hard): Adjust.
8764 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8766 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8767 Remove unused variables.
8768 (dw2_map_symtabs_matching_filename): Likewise.
8769 (dwarf2_record_block_ranges): Likewise.
8770 (dwarf2_read_addr_index): Likewise.
8771 (follow_die_offset): Likewise.
8773 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8775 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8776 to symbol_file_add_main.
8778 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8781 * mi/mi-console.c (do_fputc_async_safe): New.
8782 (mi_console_file::write_async_safe): New.
8783 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8784 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8786 * ui-file.c (ui_file::putstrn): Adjust call to
8787 fputstrn_unfiltered.
8788 * utils.c (printchar): Replace do_fputs and do_fprintf
8789 parameters by do_fputc.
8790 (fputstr_filtered): Adjust call to printchar.
8791 (fputstr_unfiltered): Likewise.
8792 (fputstrn_filtered): Likewise.
8793 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8795 * utils.h (do_fputc_ftype): New typedef.
8796 (fputstrn_unfiltered): Add do_fputc parameter.
8798 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8800 * regformats/i386/i386-avx.dat: Remove.
8802 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8805 * amd64-tdep.c (amd64_none_init_abi): New function.
8806 (amd64_x32_none_init_abi): New function.
8807 (_initialize_amd64_tdep): Register handlers for x86-64 and
8808 x64_32 with GDB_OSABI_NONE.
8809 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8810 GDB_OSABI_NONE osabi.
8812 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8815 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8817 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8818 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8820 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8822 * common/byte-vector.h (char_vector): New type.
8823 * target.h (target_read_alloc): Return
8824 gdb::optional<byte_vector>.
8825 (target_read_stralloc): Return gdb::optional<char_vector>.
8826 (target_get_osdata): Return gdb::optional<char_vector>.
8827 * target.c (target_read_alloc_1): Templatize. Replacement
8828 manual memory management with vector.
8829 (target_read_alloc): Change return type, adjust.
8830 (target_read_stralloc): Change return type, adjust.
8831 (target_get_osdata): Change return type, adjust.
8832 * auxv.c (struct auxv_info) <length>: Remove.
8833 <data>: Change type to gdb::optional<byte_vector>.
8834 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8835 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8836 (target_auxv_search): Adjust.
8837 (fprint_target_auxv): Adjust.
8838 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8839 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8840 (linux_make_corefile_notes): Adjust.
8841 * osdata.c (get_osdata): Adjust.
8842 * remote.c (remote_get_threads_with_qxfer): Adjust.
8843 (remote_memory_map): Adjust.
8844 (remote_traceframe_info): Adjust.
8845 (btrace_read_config): Adjust.
8846 (remote_read_btrace): Adjust.
8847 (remote_pid_to_exec_file): Adjust.
8848 * solib-aix.c (solib_aix_get_library_list): Adjust.
8849 * solib-dsbt.c (decode_loadmap): Don't free buf.
8850 (dsbt_get_initial_loadmaps): Adjust.
8851 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8852 * solib-target.c (solib_target_current_sos): Adjust.
8853 * tracepoint.c (sdata_make_value): Adjust.
8854 * xml-support.c (xinclude_start_include): Adjust.
8855 (xml_fetch_content_from_file): Adjust.
8856 * xml-support.h (xml_fetch_another): Change return type.
8857 (xml_fetch_content_from_file): Change return type.
8858 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8859 * xml-tdesc.c (file_read_description_xml): Adjust.
8860 (fetch_available_features_from_target): Change return type.
8861 (target_fetch_description_xml): Adjust.
8862 (target_read_description_xml): Adjust.
8864 2018-04-06 Tom Tromey <tom@tromey.com>
8866 * value.c (~value): Update.
8867 (struct value) <contents>: Now unique_xmalloc_ptr.
8868 (value_contents_bits_eq, allocate_value_contents)
8869 (value_contents_raw, value_contents_all_raw)
8870 (value_contents_for_printing, value_contents_for_printing_const)
8871 (set_value_enclosing_type): Update.
8873 2018-04-06 Tom Tromey <tom@tromey.com>
8875 * value.c (range_s): Remove typedef, VEC.
8876 (struct range): Add operator<.
8877 (range_lessthan): Remove.
8878 (ranges_contain): Change type.
8880 (struct value) <unavailable, optimized_out>: Now std::vector.
8881 (value_entirely_available)
8882 (value_entirely_covered_by_range_vector)
8883 (value_entirely_unavailable, value_entirely_optimized_out):
8885 (insert_into_bit_range_vector): Change argument type.
8886 (find_first_range_overlap): Likewise.
8887 (struct ranges_and_idx, value_contents_bits_eq)
8888 (require_not_optimized_out, require_available): Update.
8889 (ranges_copy_adjusted): Change argument types.
8890 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8892 2018-04-06 Tom Tromey <tom@tromey.com>
8894 * value.c (~value): Update.
8895 (struct value) <parent>: Now a value_ref_ptr.
8896 (value_parent, set_value_parent, value_address, value_copy):
8899 2018-04-06 Tom Tromey <tom@tromey.com>
8901 * value.c (struct value): Add constructor, destructor, and member
8903 (allocate_value_lazy, value_decref): Update.
8905 2018-04-06 Tom Tromey <tom@tromey.com>
8907 * value.c (struct value) <released, next>: Remove.
8908 (all_values): Now a std::vector.
8909 (allocate_value_lazy): Update.
8910 (value_next): Remove.
8911 (value_mark, value_free_to_mark, release_value)
8912 (value_release_to_mark): Update.
8914 2018-04-06 Tom Tromey <tom@tromey.com>
8916 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8917 (free_value_chain): Remove.
8918 * value.c (free_value_chain): Remove.
8919 (value_release_to_mark): Return a std::vector.
8920 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8922 (check_condition): Update.
8923 * eval.c (fetch_subexp_value): Change "val_chain" to a
8925 * breakpoint.c (update_watchpoint): Update.
8926 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8928 2018-04-06 Tom Tromey <tom@tromey.com>
8930 * value.h (free_all_values): Remove.
8931 * value.c (free_all_values): Remove.
8933 2018-04-06 Tom Tromey <tom@tromey.com>
8935 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8936 (value_history_chain, value_history_count): Remove.
8937 (value_history): New global.
8938 (record_latest_value, access_value_history, show_values)
8939 (preserve_values): Update.
8941 2018-04-06 Tom Tromey <tom@tromey.com>
8943 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8944 * varobj.c (varobj_set_display_format, varobj_set_value)
8945 (install_default_visualizer, construct_visualizer)
8946 (install_new_value, ~varobj, varobj_get_value_type)
8947 (my_value_of_variable, varobj_editable_p): Update.
8948 * c-varobj.c (c_describe_child, c_value_of_variable)
8949 (cplus_number_of_children, cplus_describe_child): Update.
8950 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8951 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8952 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8954 2018-04-06 Tom Tromey <tom@tromey.com>
8956 * printcmd.c (last_examine_address): Change type to
8958 (do_examine, x_command): Update.
8960 2018-04-06 Tom Tromey <tom@tromey.com>
8962 * value.c (release_value): Update.
8963 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8964 (struct bpstats) <val>: Now a value_ref_ptr.
8965 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8966 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8967 (~watchpoint, print_it_watchpoint, watch_command_1)
8968 (invalidate_bp_value_on_memory_change): Update.
8970 2018-04-06 Tom Tromey <tom@tromey.com>
8972 * varobj.c (varobj_clear_saved_item)
8973 (update_dynamic_varobj_children, install_new_value, ~varobj):
8975 * value.h (value_incref): Move declaration earlier.
8976 (value_decref): Rename from value_free.
8977 (struct value_ref_policy): New.
8978 (value_ref_ptr): New typedef.
8979 (struct value_deleter): Remove.
8980 (gdb_value_up): Remove typedef.
8981 (release_value): Change return type.
8982 (release_value_or_incref): Remove.
8983 * value.c (set_value_parent): Update.
8984 (value_incref): Change return type.
8985 (value_decref): Rename from value_free.
8986 (value_free_to_mark, free_all_values, free_value_chain): Update.
8987 (release_value): Return value_ref_ptr.
8988 (release_value_or_incref): Remove.
8989 (record_latest_value, set_internalvar, clear_internalvar):
8991 * stack.c (info_frame_command): Don't call value_free.
8992 * python/py-value.c (valpy_dealloc, valpy_new)
8993 (value_to_value_object): Update.
8994 * printcmd.c (do_examine): Update.
8995 * opencl-lang.c (lval_func_free_closure): Update.
8996 * mi/mi-main.c (register_changed_p): Don't call value_free.
8997 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8998 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8999 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9001 * guile/scm-value.c (vlscm_free_value_smob)
9002 (vlscm_scm_from_value): Update.
9003 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9004 (frame_unwind_register_unsigned, get_frame_register_bytes)
9005 (put_frame_register_bytes): Don't call value_free.
9006 * findvar.c (address_from_register): Don't call value_free.
9007 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9008 * dwarf2loc.c (entry_data_value_free_closure)
9009 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9010 (dwarf2_evaluate_loc_desc_full): Update.
9011 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9012 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9013 (~watchpoint, watch_command_1)
9014 (invalidate_bp_value_on_memory_change): Update.
9015 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9017 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9020 * warning.m4: Add -Wno-error=deprecated-register.
9021 * configure: Re-generate.
9023 2018-04-05 Tom Tromey <tom@tromey.com>
9025 * linespec.h: Remove include of "vec.h".
9027 2018-04-05 Tom Tromey <tom@tromey.com>
9029 * linespec.c (typep): Remove typedef.
9030 (find_methods, find_superclass_methods): Take a std::vector.
9031 (find_method): Use std::vector.
9033 2018-04-05 Tom Tromey <tom@tromey.com>
9035 * utils.c (compare_strings): Remove.
9036 * utils.h (compare_strings): Remove.
9037 * objc-lang.h (find_imps): Update.
9038 * objc-lang.c (find_methods): Take a std::vector.
9039 (uniquify_strings, find_imps): Likewise.
9040 * linespec.c (find_methods): Take a std::vector.
9041 (decode_objc): Use std::vector.
9042 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9044 (find_method, find_function_symbols): Use std::vector.
9046 2018-04-05 Tom Tromey <tom@tromey.com>
9048 * completer.c (completion_tracker::completion_tracker): Remove
9050 (completion_tracker::discard_completions): Likewise.
9051 * breakpoint.c (ambiguous_names_p): Remove cast.
9052 * ada-lang.c (_initialize_ada_language): Remove cast.
9053 * utils.h (streq): Update.
9054 (streq_hash): Add new declaration.
9055 * utils.c (streq): Return bool.
9056 (streq_hash): New function.
9058 2018-04-05 Tom Tromey <tom@tromey.com>
9060 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9061 Remove a string copy.
9063 2018-04-05 Tom Tromey <tom@tromey.com>
9065 * linespec.c (filter_results): Use std::vector.
9066 (decode_line_2, decode_line_full): Update.
9068 2018-04-05 Tom Tromey <tom@tromey.com>
9070 * linespec.c (canonical_to_fullform): Return std::string.
9071 (filter_results): Update.
9072 (struct decode_line_2_item): Add constructor.
9073 <fullform, displayform>: Now std::string.
9074 (decode_line_2_compare_items): Now a std::sort comparator.
9075 (decode_line_2): Update.
9077 2018-04-05 Tom Tromey <tom@tromey.com>
9079 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9080 (unexpected_linespec_error): Update.
9081 (linespec_parse_basic, parse_linespec): Update.
9083 2018-04-05 Tom Tromey <tom@tromey.com>
9085 * linespec.c (linespec_parse_basic): Reindent.
9087 2018-04-05 Tom Tromey <tom@tromey.com>
9089 * minsyms.h (iterate_over_minimal_symbols): Update.
9090 * minsyms.c (iterate_over_minimal_symbols): Take a
9092 * linespec.c (struct collect_minsyms): Remove.
9093 (compare_msyms): Now a std::sort comparator.
9094 (add_minsym): Add parameters.
9095 (search_minsyms_for_name): Update. Use std::vector.
9097 2018-04-03 Tom Tromey <tom@tromey.com>
9099 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9102 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9104 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9106 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9109 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9110 printing static type.
9112 2018-04-01 Tom Tromey <tom@tromey.com>
9114 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9115 (rs6000_xfer_shared_libraries): Update.
9117 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9119 * common/gdb_vecs.h (char_ptr): Remove.
9120 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9122 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9124 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9126 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9128 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9130 * tracepoint.h (struct uploaded_tp): Initialize fields.
9131 <actions, step_actions, cmd_strings>: Change type to
9132 std::vector<char *>.
9133 * tracepoint.c (get_uploaded_tp): Allocate with new.
9134 (free_uploaded_tps): Free with delete.
9135 (parse_tracepoint_definition): Adjust to std::vector change.
9136 * breakpoint.c (read_uploaded_action): Likewise.
9137 (create_tracepoint_from_upload): Likewise.
9138 * ctf.c (ctf_write_uploaded_tp): Likewise.
9139 (SET_ARRAY_FIELD): Likewise.
9140 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9142 2018-03-30 Tom Tromey <tom@tromey.com>
9144 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9146 (svr4_keep_data_in_core): Update.
9147 (svr4_read_so_list): Update.
9149 2018-03-30 Tom Tromey <tom@tromey.com>
9151 * windows-nat.c (handle_output_debug_string, handle_exception):
9153 * target.h (target_read_string): Update.
9154 * target.c (target_read_string): Change "string" to
9156 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9158 * solib-frv.c (frv_current_sos): Update.
9159 * solib-dsbt.c (dsbt_current_sos): Update.
9160 * solib-darwin.c (darwin_current_sos): Update.
9161 * linux-thread-db.c (inferior_has_bug): Update.
9162 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9163 Update. Remove alloca.
9164 * ada-lang.c (ada_main_name): Update.
9166 2018-03-30 Tom Tromey <tom@tromey.com>
9168 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9169 (struct dwo_file_deleter): New.
9170 (dwo_file_up): New typedef.
9171 (open_and_init_dwo_file): Use dwo_file_up.
9172 (free_dwo_file_cleanup): Remove.
9174 2018-03-30 Tom Tromey <tom@tromey.com>
9176 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9177 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9179 2018-03-30 Tom Tromey <tom@tromey.com>
9181 * dwarf2read.c (class free_cached_comp_units): New class.
9182 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9183 (free_cached_comp_units): Remove function.
9185 2018-03-30 Tom Tromey <tom@tromey.com>
9187 * utils.h (make_cleanup_unpush_target): Remove.
9188 * inf-ptrace.c (struct target_unpusher): New.
9189 (target_unpush_up) New typedef.
9190 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9192 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9194 2018-03-27 Tom Tromey <tom@tromey.com>
9196 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9198 2018-03-27 Pedro Alves <palves@redhat.com>
9199 Tom Tromey <tom@tromey.com>
9201 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9202 destructor. Now a class.
9203 (gdb_readline_wrapper_cleanup): Remove function.
9204 (gdb_readline_wrapper): Remove cleanups.
9206 2018-03-27 Tom Tromey <tom@tromey.com>
9208 * typeprint.h (struct type_print_options) <local_typedefs,
9209 global_typedefs>: Remove "struct" keyword.
9210 (class typedef_hash_table): New class.
9211 (recursively_update_typedef_hash, add_template_parameters)
9212 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9213 (find_typedef_in_hash): Don't declare.
9214 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9215 (typedef_hash_table::recursively_update): Rename from
9216 recursively_update_typedef_hash. Now a member.
9217 (typedef_hash_table::add_template_parameters): Rename from
9218 add_template_parameters. Now a member.
9219 (typedef_hash_table::typedef_hash_table): Now a constructor;
9220 rename from create_typedef_hash.
9221 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9222 rename from free_typedef_hash.
9223 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9224 (do_free_global_table): Remove.
9225 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9226 from copy_type_recursive.
9227 (create_global_typedef_table): Remove.
9228 (typedef_hash_table::find_global_typedef): Now a member of
9230 (typedef_hash_table::find_typedef): Rename from
9231 find_typedef_in_hash; now a member.
9232 (whatis_exp): Update.
9233 * extension.h (struct ext_lang_type_printers): Add constructor and
9235 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9237 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9238 Now a constructor; rename from start_ext_lang_type_printers.
9239 (ext_lang_type_printers): Now a destructor; rename from
9240 free_ext_lang_type_printers.
9241 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9243 (c_type_print_base_struct_union): Update. Remove cleanups.
9245 2018-03-27 Tom Tromey <tom@tromey.com>
9247 * dwarf-index-write.c: Include <cmath>.
9249 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9251 * NEWS: Add entry describing new "set|show varsize-limit" command.
9252 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9254 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9257 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9259 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9261 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9262 * dwarf-index-common.c: New file.
9263 * dwarf-index-common.h: New file.
9264 * dwarf-index-write.c: New file.
9265 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9266 (struct dwarf2_section_info): Move from here.
9267 (dwarf2_section_info_def): Likewise.
9268 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9269 (offset_type): Likewise.
9270 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9271 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9272 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9273 (byte_swap): Likewise.
9274 (MAYBE_SWAP): Likewise.
9275 (dwarf2_per_cu_ptr): Likewise.
9276 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9277 (struct tu_stats): Likewise.
9278 (struct dwarf2_per_objfile): Likewise.
9279 (struct dwarf2_per_cu_data): Likewise.
9280 (struct signatured_type): Likewise.
9281 (sig_type_ptr): Likewise.
9282 (DEF_VEC_P (sig_type_ptr)): Likewise.
9283 (INDEX4_SUFFIX): Likewise.
9284 (INDEX5_SUFFIX): Likewise.
9285 (DEBUG_STR_SUFFIX): Likewise.
9286 (dwarf2_read_section): Make non-static.
9287 (mapped_index_string_hash): Move from here.
9288 (dwarf5_djb_hash): Likewise.
9289 (file_write): Likewise.
9290 (class data_buf): Likewise.
9291 (struct symtab_index_entry): Likewise.
9292 (struct mapped_symtab): Likewise.
9293 (find_slot): Likewise.
9294 (hash_expand): Likewise.
9295 (add_index_entry): Likewise.
9296 (uniquify_cu_indices): Likewise.
9297 (class c_str_view): Likewise.
9298 (class c_str_view_hasher): Likewise.
9299 (class vector_hasher): Likewise.
9300 (write_hash_table): Likewise.
9301 (psym_index_map): Likewise.
9302 (struct addrmap_index_data): Likewise.
9303 (add_address_entry): Likewise.
9304 (add_address_entry_worker): Likewise.
9305 (write_address_map): Likewise.
9306 (symbol_kind): Likewise.
9307 (write_psymbols): Likewise.
9308 (struct signatured_type_index_data): Likewise.
9309 (write_one_signatured_type): Likewise.
9310 (recursively_count_psymbols): Likewise.
9311 (recursively_write_psymbols): Likewise.
9312 (class debug_names): Likewise.
9313 (check_dwarf64_offsets): Likewise.
9314 (psyms_seen_size): Likewise.
9315 (write_gdbindex): Likewise.
9316 (write_debug_names): Likewise.
9317 (assert_file_size): Likewise.
9318 (write_psymtabs_to_index): Likewise.
9319 (save_gdb_index_command): Likewise.
9320 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9322 * dwarf2read.h: New file.
9324 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9327 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9328 symbol name if the CU's language stores symbol names in linkage
9330 * language.h (struct language_defn)
9331 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9332 all instances of this struct.
9334 2018-03-26 Tom Tromey <tom@tromey.com>
9336 * stack.c (backtrace_command_1): Remove verbose code.
9338 2018-03-26 Tom Tromey <tom@tromey.com>
9340 * python/py-framefilter.c (py_print_type): Don't catch
9341 exceptions. Return void.
9342 (py_print_value): Likewise.
9343 (py_print_single_arg): Likewise.
9344 (enumerate_args): Don't catch exceptions.
9345 (py_print_args): Likewise.
9346 (py_print_frame): Likewise.
9347 (gdbpy_apply_frame_filter): Catch exceptions here.
9349 2018-03-26 Tom Tromey <tom@tromey.com>
9351 * stack.c (_initialize_stack): Remove trailing newlines from help
9352 text. Add "Usage" line to "backtrace" help.
9354 2018-03-26 Tom Tromey <tom@tromey.com>
9357 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9359 2018-03-26 Tom Tromey <tom@tromey.com>
9361 * python/py-framefilter.c (py_print_single_arg): Return
9362 EXT_LANG_BT_ERROR from catch.
9364 2018-03-26 Tom Tromey <tom@tromey.com>
9367 * stack.c (backtrace_command_1): Move some code into no-filters
9370 2018-03-26 Tom Tromey <tom@tromey.com>
9372 * python/py-framefilter.c (throw_quit_or_print_exception): New
9374 (gdbpy_apply_frame_filter): Use it.
9376 2018-03-26 Tom Tromey <tom@tromey.com>
9379 * python/py-framefilter.c (py_print_type, py_print_value)
9380 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9383 2018-03-26 Tom Tromey <tom@tromey.com>
9385 * python/py-framefilter.c (enumerate_args): Use
9386 gdb::unique_xmalloc_ptr.
9388 2018-03-26 Tom Tromey <tom@tromey.com>
9390 * python/py-framefilter.c (py_print_frame): Return
9392 (gdbpy_apply_frame_filter): Update comment.
9393 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9395 <EXT_LANG_BT_NO_FILTERS>: Change value.
9397 2018-03-26 Tom Tromey <tom@tromey.com>
9400 * stack.c (backtrace_command): Parse "hide" argument.
9401 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9402 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9405 2018-03-26 Tom Tromey <tom@tromey.com>
9407 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9409 (backtrace_command): Remove "fulltrace", add "flags".
9411 2018-03-26 Tom Tromey <tom@tromey.com>
9413 * stack.c (backtrace_command): Rewrite command line parsing.
9415 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9417 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9419 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9421 * filename-seen-cache.h: Add include guard.
9423 2018-03-26 Keith Seitz <keiths@redhat.com>
9425 * symfile.c (place_section): Remove "struct" from section_addr_info
9427 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9428 "struct" keyword from section_addr_info.
9430 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9432 * regformats/regdef.h (reg): Add constructors.
9434 2018-03-25 Pedro Alves <palves@redhat.com>
9436 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9437 if then/else bodies in var_func_name extraction.
9439 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9441 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9442 lookup_minimal_symbol() to find symbol entry.
9443 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9445 2018-03-23 Keith Seitz <keiths@redhat.com>
9448 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9449 nested type definitions for C++, too.
9451 2018-03-23 Tom Tromey <tom@tromey.com>
9453 * machoread.c (struct oso_el): Add a constructor. Don't define as
9455 (macho_register_oso): Remove.
9456 (macho_symtab_read): Take a std::vector.
9457 (oso_el_compare_name): Now a std::sort comparator.
9458 (macho_symfile_read_all_oso): Take a std::vector.
9459 (macho_symfile_read): Use std::vector. Remove cleanups.
9461 2018-03-22 Tom Tromey <tom@tromey.com>
9463 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9464 (record_full_goto_bookmark): Use std::string.
9466 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9469 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9472 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9474 * rs6000-tdep.c (store_insn_p): New function.
9475 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9476 and cr_reg to their unshifted values. Use store_insn_p to
9477 match LR saves using either R1 or fdata->alloca_reg. Use
9478 store_insn_p to match CR saves. Set alloca_reg_offset
9479 when alloca_reg and framep are set. Remove lr_reg shift
9480 when assigning to fdata->lr_register.
9482 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9484 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9485 command line args instead of emitting a warning.
9487 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9489 * tracepoint.h (struct static_tracepoint_marker): Initialize
9490 fields, define default constructor, move constructor and move
9491 assignment, disable the rest.
9492 <str_id, extra>: Make std::string.
9493 (release_static_tracepoint_marker): Remove.
9494 (free_current_marker): Remove.
9495 * tracepoint.c (free_current_marker): Remove.
9496 (parse_static_tracepoint_marker_definition): Adjust to
9497 std::string, use new hex2str overload.
9498 (release_static_tracepoint_marker): Remove.
9499 (print_one_static_tracepoint_marker): Get marker by reference
9500 and adjust to std::string.
9501 (info_static_tracepoint_markers_command): Adjust to std::vector
9503 * target.h (static_tracepoint_marker_p): Remove typedef.
9504 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9505 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9507 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9509 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9510 (target_debug_print_std_vector_static_tracepoint_marker): New.
9511 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9513 (target_debug_print_static_tracepoint_marker_p): ... this.
9514 * target-delegates.c: Re-generate.
9515 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9517 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9518 (decode_static_tracepoint_spec): Adjust to std::vector.
9519 (tracepoint_print_one_detail): Adjust to std::string.
9520 (strace_marker_decode_location): Adjust to std::string.
9521 (update_static_tracepoint): Adjust to std::string, remove call
9522 to release_static_tracepoint_marker.
9523 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9524 Adjust to std::vector.
9525 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9526 (remote_static_tracepoint_markers_by_strid): Adjust to
9528 * common/rsp-low.h (hex2str): New overload with explicit count
9530 * common/rsp-low.c (hex2str): New overload with explicit count
9532 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9533 (_initialize_rsp_low_selftests): Add test_hex2str test.
9534 * unittests/tracepoint-selftests.c
9535 (test_parse_static_tracepoint_marker_definition): Adjust to
9538 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9540 * tracepoint.c (parse_static_tracepoint_marker_definition):
9541 Consider case where the definition is followed by more
9543 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9544 tracepoint-selftests.c.
9545 * unittests/tracepoint-selftests.c: New.
9547 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9549 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9552 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9554 * symtab.c (find_pc_sect_line): fixed indentation.
9556 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9558 * symtab.c (find_pc_sect_line): now uses binary search.
9560 2018-03-19 Tom Tromey <tom@tromey.com>
9562 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9565 2018-03-19 Pedro Alves <palves@redhat.com>
9566 Tom Tromey <tom@tromey.com>
9568 * unittests/observable-selftests.c: New file.
9569 * common/observable.h: New file.
9570 * observable.h: New file.
9571 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9572 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9573 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9574 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9575 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9576 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9577 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9578 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9579 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9580 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9581 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9582 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9583 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9584 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9585 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9586 tui/tui-interp.c, valops.c: Update all users.
9587 * tui/tui-hooks.c (tui_bp_created_observer)
9588 (tui_bp_deleted_observer, tui_bp_modified_observer)
9589 (tui_inferior_exit_observer, tui_before_prompt_observer)
9590 (tui_normal_stop_observer, tui_register_changed_observer):
9592 (tui_observers_token): New global.
9593 (attach_or_detach, tui_attach_detach_observers): New functions.
9594 (tui_install_hooks, tui_remove_hooks): Use
9595 tui_attach_detach_observers.
9596 * record-btrace.c (record_btrace_thread_observer): Remove.
9597 (record_btrace_thread_observer_token): New global.
9598 * observer.sh: Remove.
9599 * observer.c: Rename to observable.c.
9600 * observable.c (namespace gdb_observers): Define new objects.
9601 (observer_debug): Move into gdb_observers namespace.
9602 (struct observer, struct observer_list, xalloc_observer_list_node)
9603 (xfree_observer_list_node, generic_observer_attach)
9604 (generic_observer_detach, generic_observer_notify): Remove.
9605 (_initialize_observer): Update.
9606 Don't include observer.inc.
9607 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9608 (clean mostlyclean): Likewise.
9609 (observer.h, observer.inc): Remove targets.
9610 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9611 (COMMON_SFILES): Use observable.c, not observer.c.
9612 * .gitignore: Remove observer.h.
9614 2018-03-18 Tom Tromey <tom@tromey.com>
9616 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9618 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9620 2018-03-17 Tom Tromey <tom@tromey.com>
9622 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9624 2018-03-17 Tom Tromey <tom@tromey.com>
9626 * target.c (class scoped_target_fd): New.
9627 (target_fileio_close_cleanup): Remove.
9628 (target_fileio_read_alloc_1): Use scoped_target_fd.
9630 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9632 * silent-rules.mk: New.
9633 * Makefile.in: Include silent-rules.mk
9634 (srcdir, VPATH, top_srcdir): Move up.
9635 (COMPILE): Add ECHO_CXX.
9636 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9637 (init.c): Add ECHO_INIT_C.
9638 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9639 (version.c): Add ECHO_GEN.
9640 (printcmd.o): Add ECHO_CXX.
9641 (target-float.o): Add ECHO_CXX.
9642 (ada-exp.o): Add ECHO_CXX.
9643 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9644 (insight$(EXEEXT)): Add ECHO_CXXLD.
9645 * gnulib/configure.ac: Add AM_SILENT_RULES.
9646 * gnulib/aclocal.m4: Re-generate.
9647 * gnulib/configure: Re-generate.
9648 * gnulib/import/Makefile.in: Re-generate.
9650 2018-03-16 Tom Tromey <tom@tromey.com>
9652 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9653 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9654 * utils.c (do_free_section_addr_info)
9655 (make_cleanup_free_section_addr_info): Remove.
9656 * symfile.h (struct other_sections): Add constructor.
9657 (struct section_addr_info): Remove.
9658 (section_addr_info): New typedef.
9659 (struct sym_fns) <sym_offsets>: Change type of parameter.
9660 (build_section_addr_info_from_objfile)
9661 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9662 (default_symfile_offsets, symbol_file_add)
9663 (symbol_file_add_from_bfd)
9664 (build_section_addr_info_from_section_table): Update.
9665 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9666 * symfile.c (alloc_section_addr_info): Remove.
9667 (build_section_addr_info_from_section_table): Change return type.
9669 (build_section_addr_info_from_bfd)
9670 (build_section_addr_info_from_objfile): Likewise.
9671 (free_section_addr_info): Remove.
9672 (relative_addr_info_to_section_offsets): Change type of "addrs".
9673 (addrs_section_compar): Now a std::sort comparator.
9674 (addrs_section_sort): Change return type.
9675 (addr_info_make_relative): Change type of "addrs". Update.
9676 (default_symfile_offsets, syms_from_objfile_1)
9677 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9678 (symbol_file_add_separate): Update.
9679 (symbol_file_add): Change type of "addrs". Update.
9680 (add_symbol_file_command): Update. Remove cleanups.
9681 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9683 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9684 * solib.c (solib_read_symbols): Update.
9685 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9686 * machoread.c (macho_symfile_offsets): Update.
9687 * jit.c (jit_bfd_try_read_symtab): Update.
9689 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9691 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9692 unittests/utils-selftests.c.
9693 * unittests/utils-selftests.c: New file.
9695 2018-03-14 Tom Tromey <tom@tromey.com>
9698 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9701 2018-03-14 Tom Tromey <tom@tromey.com>
9704 * printcmd.c (printf_pointer): Allow "-" in format.
9706 2018-03-14 Tom Tromey <tom@tromey.com>
9708 * printcmd.c (_initialize_printcmd): Add usage to printf.
9710 2018-03-14 Yao Qi <qiyao@sourceware.org>
9712 * MAINTAINERS: Update my email address.
9714 2018-03-13 Tom Tromey <tom@tromey.com>
9716 * machoread.c (macho_check_dsym): Change filenamep to a
9718 (macho_symfile_read): Update.
9719 * symfile.c (load_command): Use std::string.
9721 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9723 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9724 to error message string.
9725 (riscv_register_name): Use xsnprintf instead of sprintf.
9726 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9728 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9730 (riscv_push_dummy_call): Likewise.
9732 2018-03-12 Tom Tromey <tom@tromey.com>
9734 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9735 Use gdb::byte_vector.
9736 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9738 2018-03-12 Yao Qi <yao.qi@linaro.org>
9740 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9741 parameter type to readable_regcache.
9742 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9745 2018-03-11 Tom Tromey <tom@tromey.com>
9747 * dwarf2read.c (struct nextfield): Add initializers.
9748 (struct nextfnfield): Remove.
9749 (struct fnfieldlist): Add initializers. Remove "length" and
9750 "head", use std::vector.
9751 (struct decl_field_list): Remove.
9752 (struct field_info): Add initializers.
9753 <fields, baseclasses>: Now std::vector.
9754 <nbaseclasses, nfnfields, typedef_field_list_count,
9755 nested_types_list_count>: Remove.
9756 (dwarf2_add_field, dwarf2_add_type_defn)
9757 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9758 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9759 (process_structure_scope): Update.
9761 2018-03-11 Tom Tromey <tom@tromey.com>
9763 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9764 for use by std::sort.
9765 (build_type_psymtabs_1): Use std::vector.
9767 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9769 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9770 and LIBMPFR in the printed configuration.
9772 2018-03-08 Tom Tromey <tom@tromey.com>
9774 * source.c (get_filename_and_charpos): Use scoped_fd.
9775 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9776 (procfs_pidlist): Likewise.
9777 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9778 (iterate_over_mappings): Likewise.
9780 2018-03-08 Tom Tromey <tom@tromey.com>
9782 * infcall.c (struct call_return_meta_info)
9783 <stack_temporaries_enabled>: Remove.
9784 (get_call_return_value, call_function_by_hand_dummy): Update.
9785 * thread.c (disable_thread_stack_temporaries): Remove.
9786 (enable_thread_stack_temporaries): Remove.
9787 (thread_stack_temporaries_enabled_p): Return bool.
9788 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9789 (get_last_thread_stack_temporary): Update.
9790 * eval.c (evaluate_subexp): Update.
9791 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9792 class, not a function.
9793 (value_ptr, value_vec): Remove typedefs.
9794 (class thread_info) <stack_temporaries_enabled>: Now bool.
9795 <stack_temporaries>: Now a std::vector.
9796 (thread_stack_temporaries_enabled_p)
9797 (value_in_thread_stack_temporaries): Return bool.
9799 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9801 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9802 (getpkt_or_notif_sane_1): Likewise.
9804 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9806 * build-id.c (build_id_to_debug_bfd): Use std::string.
9808 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9810 * build-id.c (find_separate_debug_file_by_buildid): Return
9812 * build-id.h (find_separate_debug_file_by_buildid): Return
9814 * coffread.c (coff_symfile_read): Adjust to std::string.
9815 * elfread.c (elf_symfile_read): Adjust to std::string.
9816 * symfile.c (separate_debug_file_exists): Change parameter to
9818 (find_separate_debug_file): Return std::string.
9819 (find_separate_debug_file_by_debuglink): Return std::string.
9820 * symfile.h (find_separate_debug_file_by_debuglink): Return
9823 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9825 * common/xml-utils.c (xml_escape_text): Move code to...
9826 (xml_escape_text_append): ... this new function.
9827 * common/xml-utils.h (xml_escape_text_append): New declaration.
9828 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9830 (_initialize_xml_utils): register test_xml_escape_text_append as
9833 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9835 * defs.h: Remove MAX_REGISTER_SIZE.
9836 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9838 * python/py-unwind.c (pyuw_sniffer): Likewise.
9840 2018-03-07 Tom Tromey <tom@tromey.com>
9842 * linux-tdep.c (linux_info_proc): Update.
9843 * target.h (struct target_ops) <to_fileio_readlink>: Return
9845 (target_fileio_readlink): Return optional<string>.
9846 * remote.c (remote_hostio_readlink): Return optional<string>.
9847 * inf-child.c (inf_child_fileio_readlink): Return
9849 * target.c (target_fileio_readlink): Return optional<string>.
9851 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9853 * regcache.c (cooked_read_test): Add riscv to the list of
9854 architectures that have a save_reggroup.
9856 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9858 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9859 value is not a dynamic class object.
9861 2018-03-06 Tom Tromey <tom@tromey.com>
9863 * rust-exp.y: Formatting fixes.
9865 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9867 * riscv-tdep.c (riscv_register_name): Remove target description
9869 (riscv_gdbarch_init): Remove target description check.
9871 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9873 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9875 * riscv-tdep.h: Likewise.
9877 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9879 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9880 (riscv_pseudo_register_write): Delete.
9881 (riscv_gdbarch_init): Remove all use of pseudo registers.
9883 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9885 * record-btrace.c (btrace_print_lines): Replace cleanup
9886 parameter with RAII equivalents.
9887 (btrace_insn_history): Replace cleanup with RAII equivalents.
9888 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9889 make_cleanup_ui_out_tuple_begin_end): Remove.
9890 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9891 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9892 make_cleanup_ui_out_list_begin_end): Remove.
9894 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9896 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9897 parameter types to std::vector. Use bool.
9898 (record_btrace_wait): Replace VEC(tp_t) with
9899 std::vector<thread_info *>.
9900 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9902 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9904 * record-btrace.c (record_btrace_disable_callback): Remove.
9905 (struct scoped_btrace_disable): New.
9906 (record_btrace_open): Use scoped_btrace_disable.
9908 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9910 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9911 reading values from registers.
9913 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9915 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9918 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9920 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9921 change parameter type. Use GDB's print functions, and use
9922 core_addr_to_string where appropriate.
9923 (riscv_push_dummy_call): Use core_addr_to_string where
9924 appropriate, update call to riscv_print_arg_location, and reindent
9926 (riscv_return_value): Update call to riscv_print_arg_location.
9928 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9929 Tim Newsome <tim@sifive.com>
9930 Albert Ou <a0u@eecs.berkeley.edu>
9931 Darius Rad <darius@bluespec.com>
9933 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9934 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9935 (ALLDEPFILES): Add riscv-tdep.c
9936 * configure.tgt: Add riscv support.
9937 * riscv-tdep.c: New file.
9938 * riscv-tdep.h: New file.
9939 * NEWS: Mention new target.
9940 * MAINTAINERS: Add entry for riscv.
9942 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9944 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9945 fields within aggregates.
9947 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9949 * record-btrace.c (btrace_print_lines): Change type of flags to
9950 gdb_disassembly_flags.
9952 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9954 * fbsd-nat.c: Include "inf-ptrace.h".
9955 (USE_SIGTRAP_SIGINFO): Conditionally define.
9956 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9957 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9958 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9960 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9962 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9964 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9965 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9966 "supports_stopped_by_hw_breakpoint" target methods.
9968 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9970 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9971 * fbsd-nat.c (debug_fbsd_nat): New variable.
9972 (show_fbsd_nat_debug): New function.
9973 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9974 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9976 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9978 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9979 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9981 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9982 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9985 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9987 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9988 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9990 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9992 * charset.c (struct charset_vector): New.
9993 (charsets): Change type to charset_vector.
9994 (find_charset_names): Adjust.
9996 (_initialize_charset): Adjust.
9998 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10000 * progspace.h (struct program_space) <deleted_solibs>: Change
10001 type to std::vector<std::string>.
10002 * progspace.c (clear_program_space_solib_cache): Adjust.
10003 * breakpoint.c (print_solib_event): Adjust.
10004 (check_status_catch_solib): Adjust.
10005 * solib.c (update_solib_list): Adjust.
10006 * ui-out.h (class ui_out) <field_string>: New overload.
10007 * ui-out.c (ui_out::field_string): New overload.
10009 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10011 * progspace.h (struct program_space): Add constructor and
10012 destructor, initialize fields.
10013 (add_program_space): Remove.
10014 * progspace.c (add_program_space): Rename to...
10015 (program_space::program_space): ... this.
10016 (release_program_space): Rename to...
10017 (program_space::~program_space): ... this.
10018 (delete_program_space): Use delete to delete program_space.
10019 (initialize_progspace): Use new to allocate program_space.
10020 * inferior.c (add_inferior_with_spaces): Likewise.
10021 (clone_inferior_command): Likewise.
10022 * infrun.c (follow_fork_inferior): Likewise.
10023 (handle_vfork_child_exec_or_exit): Likewise.
10025 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10027 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10028 (delim_string_to_char_ptr_vec): Return std::vector of
10029 gdb::unique_xmalloc_ptr.
10030 (dirnames_to_char_ptr_vec_append): Take std::vector of
10031 gdb::unique_xmalloc_ptr.
10032 (dirnames_to_char_ptr_vec): Return std::vector of
10033 gdb::unique_xmalloc_ptr.
10034 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10035 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10036 (delim_string_to_char_ptr_vec): Return an std::vector of
10037 gdb::unique_xmalloc_ptr, adjust the code.
10038 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10039 gdb::unique_xmalloc_ptr, adjust the code.
10040 (dirnames_to_char_ptr_vec): Return an std::vector of
10041 gdb::unique_xmalloc_ptr, adjust the code.
10042 * auto-load.c (auto_load_safe_path_vec): Change type to
10043 std::vector of gdb::unique_xmalloc_ptr.
10044 (auto_load_expand_dir_vars): Return an std::vector of
10045 gdb::unique_xmalloc_ptr, adjust the code.
10046 (auto_load_safe_path_vec_update): Adjust.
10047 (filename_is_in_auto_load_safe_path_vec): Adjust.
10048 (auto_load_objfile_script_1): Adjust.
10049 * build-id.c (build_id_to_debug_bfd): Adjust.
10050 * linux-thread-db.c (thread_db_load_search): Adjust.
10051 * source.c (add_path): Adjust.
10053 * symfile.c (find_separate_debug_file): Adjust.
10054 * utils.c (do_free_char_ptr_vec): Remove.
10055 (make_cleanup_free_char_ptr_vec): Remove.
10057 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10060 * common/pathstuff.c: Conditionally include "<windows.h>".
10062 2018-03-01 Georg Sauthoff <mail@georg.so>
10065 * gcore.in: Quote variables and switch interpreter to bash.
10067 2018-03-01 Tom Tromey <tom@tromey.com>
10069 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10070 assertion. Add assertion for discriminant_index.
10071 (quirk_rust_enum): Use correct base type name in univariant case.
10073 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10075 * record.c (get_call_history_modifiers): Return a
10076 record_print_flags.
10077 (cmd_record_call_history): Adjust.
10078 * record-btrace.c (record_btrace_call_history): Adjust.
10079 (record_btrace_call_history_range): Adjust.
10080 (record_btrace_call_history_from): Adjust.
10081 * target-debug.h (target_debug_print_record_print_flags): New.
10082 * target-delegates.c: Re-generate.
10083 * target.c (target_call_history): Change flags type.
10084 (target_call_history_from): Likewise.
10085 (target_call_history_range): Likewise.
10086 * target.h (struct target_ops) <target_call_history>: Likewise.
10087 (target_call_history_from): Likewise.
10088 (target_call_history_range): Likewise.
10090 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10091 Simon Marchi <simon.marchi@polymtl.ca>
10093 * common/common-utils.c: Include "sys/stat.h".
10094 (is_regular_file): Move here from "source.c"; change return
10096 * common/common-utils.h (is_regular_file): New prototype.
10097 * common/pathstuff.c (contains_dir_separator): New function.
10098 * common/pathstuff.h (contains_dir_separator): New prototype.
10099 * source.c: Don't include "sys/stat.h".
10100 (is_regular_file): Move to "common/common-utils.c".
10102 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10104 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10105 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10106 * auto-load.c: Include "common/pathstuff.h".
10107 * common/common-def.h (current_directory): Move here.
10108 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10110 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10112 * common/pathstuff.c: New file.
10113 * common/pathstuff.h: New file.
10114 * compile/compile.c: Include "common/pathstuff.h".
10115 * defs.h (current_directory): Move to "common/common-defs.h".
10116 * dwarf2read.c: Include "common/pathstuff.h".
10117 * exec.c: Likewise.
10118 * guile/scm-safe-call.c: Likewise.
10119 * linux-thread-db.c: Likewise.
10120 * main.c: Likewise.
10121 * nto-tdep.c: Likewise.
10122 * objfiles.c: Likewise.
10123 * source.c: Likewise.
10124 * symtab.c: Likewise.
10125 * utils.c: Include "common/pathstuff.h".
10126 (gdb_realpath): Move to "common/pathstuff.c".
10127 (gdb_realpath_keepfile): Likewise.
10128 (gdb_abspath): Likewise.
10129 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10130 (gdb_realpath_keepfile): Likewise.
10131 (gdb_abspath): Likewise.
10133 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10135 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10136 wildcard process pid for super_resume for kernels with a
10139 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10141 * compile/compile.c (get_args): Add additional comments
10142 explaining function.
10144 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10145 Tom Tromey <tom@tromey.com>
10147 * target.h (memory_write_request_s): Remove typedef. Don't define
10149 (target_write_memory_blocks): Change argument to std::vector.
10150 (struct memory_write_request): Add constructor.
10151 * target-memory.c (compare_block_starting_address): Return bool.
10152 Change argument types.
10153 (claim_memory): Change arguments to use std::vector.
10154 (split_regular_and_flash_blocks, blocks_to_erase)
10155 (compute_garbled_blocks): Likewise.
10156 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10157 (target_write_memory_blocks): Change argument to std::vector.
10158 * symfile.c (struct load_section_data): Add constructor and
10159 destructor. Use std::vector for "requests".
10160 (struct load_progress_data): Add initializers.
10161 (load_section_callback): Update. Use "new".
10162 (clear_memory_write_data): Remove.
10163 (generic_load): Update.
10165 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10167 * arch/aarch64.h: Use common/tdesc.h.
10169 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10171 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10172 architecture with a 64-bit ABI.
10174 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10176 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10177 ahead of target description loading.
10179 2018-02-26 Tom Tromey <tom@tromey.com>
10181 * stack.c (backtrace_command_1): Update.
10182 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10184 * python/py-framefilter.c (py_print_frame)
10185 (gdbpy_apply_frame_filter): Change type of "flags".
10186 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10188 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10189 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10190 * extension.h (enum frame_filter_flag): Rename from
10191 frame_filter_flags.
10192 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10193 (apply_ext_lang_frame_filter): Change type of "flags".
10194 * extension.c (apply_ext_lang_frame_filter): Change type of
10196 * extension-priv.h (struct extension_language_ops)
10197 <apply_frame_filter>: Change type of "flags".
10199 2018-02-26 Tom Tromey <tom@tromey.com>
10202 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10203 off-by-one in py_end computation.
10204 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10206 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10209 2018-02-26 Tom Tromey <tom@tromey.com>
10211 * dwarf2read.c (struct variant_field): New.
10212 (struct nextfield) <variant>: New field.
10213 (dwarf2_add_field): Handle DW_TAG_variant_part.
10214 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10215 discriminated union.
10216 (read_structure_type): Handle DW_TAG_variant_part.
10217 (handle_struct_member_die): New function, extracted from
10218 process_structure_scope. Handle DW_TAG_variant.
10219 (process_structure_scope): Handle discriminated unions. Call
10220 handle_struct_member_die.
10222 2018-02-26 Tom Tromey <tom@tromey.com>
10224 * rust-lang.h (rust_last_path_segment): Declare.
10225 * rust-lang.c (rust_last_path_segment): Now public. Change
10227 (struct disr_info): Remove.
10228 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10229 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10230 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10231 (rust_enum_p, rust_enum_variant): New function.
10232 (rust_underscore_fields): Remove "offset" parameter.
10233 (rust_print_enum): New function.
10234 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10235 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10236 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10238 (rust_internal_print_type): New function, from rust_print_type.
10240 (rust_print_type): Call rust_internal_print_type.
10241 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10242 Update enum handling.
10243 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10244 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10245 (rust_union_quirks): New functions.
10246 (process_full_comp_unit, process_full_type_unit): Call
10248 (process_structure_scope): Update rust_unions if necessary.
10250 2018-02-26 Tom Tromey <tom@tromey.com>
10252 * value.h (value_union_variant): Declare.
10253 * valops.c (value_union_variant): New function.
10254 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10255 (struct discriminant_info): New.
10256 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10258 (struct main_type) <flag_discriminated_union>: New field.
10260 2018-02-26 Tom Tromey <tom@tromey.com>
10262 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10263 unittests/unpack-selftests.c.
10264 * unittests/unpack-selftests.c: New file.
10265 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10267 2018-02-26 Yao Qi <yao.qi@linaro.org>
10269 * dwarf2read.c (struct partial_die_info) <read>: New method.
10270 (read_partial_die): Remove the declaration.
10271 (load_partial_dies): Update.
10272 (partial_die_info::partial_die_info):
10273 (read_partial_die): Change it to partial_die_info::read.
10275 2018-02-26 Yao Qi <yao.qi@linaro.org>
10277 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10278 (fixup_partial_die): Remove declaration.
10279 (scan_partial_symbols): Update.
10280 (partial_die_parent_scope): Likewise.
10281 (partial_die_full_name): Likewise.
10282 (fixup_partial_die): Change it to partial_die_info::fixup.
10284 2018-02-26 Yao Qi <yao.qi@linaro.org>
10286 * dwarf2read.c (read_partial_die): Update the declaration.
10287 (load_partial_dies): Caller update.
10288 (read_partial_die): Remove one argument abbrev_len.
10290 2018-02-26 Yao Qi <yao.qi@linaro.org>
10292 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10293 assignment operator.
10294 (load_partial_dies): Use ctor and copy ctor.
10295 (read_partial_die): Update.
10296 (dwarf2_cu::find_partial_die): Use ctor.
10298 2018-02-26 Yao Qi <yao.qi@linaro.org>
10300 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10301 (find_partial_die_in_comp_unit): Change it to
10302 dwarf2_cu::find_partial_die.
10303 (find_partial_die): Update.
10305 2018-02-26 Yao Qi <yao.qi@linaro.org>
10307 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10310 2018-02-26 Yao Qi <yao.qi@linaro.org>
10312 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10314 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10316 * arch/amd64.h: Use common/tdesc.h.
10317 * arch/i386.c: Likewise.
10318 * arch/i386.h: Likewise.
10319 * arch/tic6x.c: Likewise.
10320 * arch/tdesc.h: Move file from here...
10321 * common/tdesc.h: ...to here.
10322 * features/aarch64-core.c: Regenerate.
10323 * features/aarch64-fpu.c: Regenerate.
10324 * features/i386/32bit-avx.c: Regenerate.
10325 * features/i386/32bit-avx512.c: Regenerate.
10326 * features/i386/32bit-core.c: Regenerate.
10327 * features/i386/32bit-linux.c: Regenerate.
10328 * features/i386/32bit-mpx.c: Regenerate.
10329 * features/i386/32bit-pkeys.c: Regenerate.
10330 * features/i386/32bit-sse.c: Regenerate.
10331 * features/i386/64bit-avx.c: Regenerate.
10332 * features/i386/64bit-avx512.c: Regenerate.
10333 * features/i386/64bit-core.c: Regenerate.
10334 * features/i386/64bit-linux.c: Regenerate.
10335 * features/i386/64bit-mpx.c: Regenerate.
10336 * features/i386/64bit-pkeys.c: Regenerate.
10337 * features/i386/64bit-segments.c: Regenerate.
10338 * features/i386/64bit-sse.c: Regenerate.
10339 * features/i386/x32-core.c: Regenerate.
10340 * features/tic6x-c6xp.c: Regenerate.
10341 * features/tic6x-core.c: Regenerate.
10342 * features/tic6x-gp.c: Regenerate.
10343 * target-descriptions.c: Use common/tdesc.h.
10344 * target-descriptions.h: Likewise.
10346 2018-02-24 Tom Tromey <tom@tromey.com>
10348 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10349 (try_thread_db_load_from_dir, thread_db_load_search): Use
10351 (info_auto_load_libthread_db_compare): Return bool. Change
10353 (info_auto_load_libthread_db): Use std::vector, std::string.
10356 2018-02-24 Tom Tromey <tom@tromey.com>
10358 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10360 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10362 * gdbarch.c: Rebuild.
10363 * gdbarch.h: Rebuild.
10364 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10365 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10366 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10369 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10371 * gdbtypes.h (sect_offset): Change type to uint64_t.
10372 (sect_offset_str): New function.
10373 * dwarf2read.c (create_addrmap_from_aranges): Use
10375 (error_check_comp_unit_head): Likewise.
10376 (create_debug_type_hash_table): Likewise.
10377 (read_cutu_die_from_dwo): Likewise.
10378 (init_cutu_and_read_dies): Likewise.
10379 (init_cutu_and_read_dies_no_follow): Likewise.
10380 (process_psymtab_comp_unit_reader): Likewise.
10381 (partial_die_parent_scope): Likewise.
10382 (peek_die_abbrev): Likewise.
10383 (process_queue): Likewise.
10384 (dwarf2_physname): Likewise.
10385 (read_namespace_alias): Likewise.
10386 (read_import_statement): Likewise.
10387 (create_dwo_cu_reader): Likewise.
10388 (create_cus_hash_table): Likewise.
10389 (lookup_dwo_cutu): Likewise.
10390 (inherit_abstract_dies): Likewise.
10391 (read_func_scope): Likewise.
10392 (read_call_site_scope): Likewise.
10393 (dwarf2_add_member_fn): Likewise.
10394 (read_common_block): Likewise.
10395 (read_module_type): Likewise.
10396 (read_typedef): Likewise.
10397 (read_subrange_type): Likewise.
10398 (load_partial_dies): Likewise.
10399 (read_partial_die): Likewise.
10400 (find_partial_die): Likewise.
10401 (read_str_index): Likewise.
10402 (dwarf2_string_attr): Likewise.
10403 (build_error_marker_type): Likewise.
10404 (lookup_die_type): Likewise.
10405 (dump_die_shallow): Likewise.
10406 (follow_die_ref): Likewise.
10407 (dwarf2_fetch_die_loc_sect_off): Likewise.
10408 (dwarf2_fetch_constant_bytes): Likewise.
10409 (follow_die_sig): Likewise.
10410 (get_signatured_type): Likewise.
10411 (get_DW_AT_signature_type): Likewise.
10412 (dwarf2_find_containing_comp_unit): Likewise.
10413 (set_die_type): Likewise.
10415 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10417 * arch/aarch64.c: Include "common-defs.h".
10418 * arch/amd64.c: Likewise.
10419 * arch/i386.c: Likewise.
10421 2018-02-21 Tom Tromey <tom@tromey.com>
10423 * value.h: (extract_field_op): Update.
10424 * eval.c (extract_field_op): Return a const char *.
10425 * expression.h (parse_expression_for_completion): Update.
10426 * completer.c (complete_expression): Update.
10427 (add_struct_fields): Make fieldname const.
10428 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10429 (mark_completion_tag, parse_exp_in_context_1): Update.
10430 (parse_expression_for_completion): Change "name" to
10431 unique_xmalloc_ptr*.
10433 2018-02-21 Tom Tromey <tom@tromey.com>
10435 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10437 2018-02-21 Yao Qi <yao.qi@linaro.org>
10439 * avr-tdep.c (avr_read_pc): Change parameter type to
10441 * gdbarch.sh (read_pc): Likewise.
10442 * gdbarch.c: Re-generated.
10443 * gdbarch.h: Re-generated.
10444 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10446 * ia64-tdep.c (ia64_read_pc): Likewise.
10447 * mips-tdep.c (mips_read_pc): Likewise.
10448 * spu-tdep.c (spu_read_pc): Likewise.
10450 2018-02-21 Yao Qi <yao.qi@linaro.org>
10452 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10453 * regcache-dump.c: New file.
10454 * regcache.c: Move register_dump to regcache-dump.c.
10455 (maintenance_print_registers): Likewise.
10456 (maintenance_print_raw_registers): Likewise.
10457 (maintenance_print_cooked_registers): Likewise.
10458 (maintenance_print_register_groups): Likewise.
10459 (maintenance_print_remote_registers): Likewise.
10460 (_initialize_regcache): Likewise.
10461 * regcache.h (register_dump): Moved from regcache.c.
10463 2018-02-21 Yao Qi <yao.qi@linaro.org>
10465 * regcache.c (regcache::regcache): Update.
10466 (regcache::invalidate): Move it to detached_regcache::invalidate.
10467 (get_thread_arch_aspace_regcache): Update.
10468 (regcache::raw_update): Update.
10469 (regcache::cooked_read): Remove some code.
10470 (regcache::cooked_read_value): Likewise.
10471 (regcache::raw_write): Remove assert on m_readonly_p.
10472 (regcache::raw_supply_integer): Move it to
10473 detached_regcache::raw_supply_integer.
10474 (regcache::raw_supply_zeroed): Likewise.
10475 * regcache.h (detached_regcache) <raw_supply_integer>: New
10477 <raw_supply_zeroed, invalidate>: Likewise.
10478 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10479 <invalidate>: Likewise.
10480 <m_readonly_p>: Removed.
10482 2018-02-21 Yao Qi <yao.qi@linaro.org>
10484 * infcmd.c (get_return_value): Let stop_regs point to
10485 get_current_regcache.
10486 * regcache.c (regcache::regcache): Remove.
10487 (register_dump_reg_buffer): New class.
10488 (regcache_print): Adjust.
10489 * regcache.h (regcache): Remove constructors.
10491 2018-02-21 Yao Qi <yao.qi@linaro.org>
10493 * regcache.c (class register_dump): New class.
10494 (register_dump_regcache, register_dump_none): New class.
10495 (register_dump_remote, register_dump_groups): New class.
10496 (regcache_print): Update.
10497 * regcache.h (regcache_dump_what): Move it to regcache.c.
10498 (regcache) <dump>: Remove.
10500 2018-02-21 Yao Qi <yao.qi@linaro.org>
10502 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10504 (jit_unwind_reg_set_impl): Call raw_supply.
10505 (jit_frame_sniffer): Use reg_buffer_rw.
10506 * record-full.c (record_full_core_regbuf): Change its type.
10507 (record_full_core_open_1): Use reg_buffer_rw.
10508 (record_full_close): Likewise.
10509 (record_full_core_fetch_registers): Use regcache->raw_supply.
10510 (record_full_core_store_registers): Likewise.
10511 * regcache.c (regcache::get_register_status): Move it to
10513 (regcache_raw_set_cached_value): Remove.
10514 (regcache::raw_set_cached_value): Remove.
10515 (regcache::raw_write): Call raw_supply.
10516 (regcache::raw_supply): Move it to reg_buffer_rw.
10517 * regcache.h (regcache_raw_set_cached_value): Remove.
10518 (reg_buffer_rw): New class.
10520 2018-02-21 Yao Qi <yao.qi@linaro.org>
10522 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10523 readonly_detached_regcache.
10524 (dummy_frame_prev_register): Use regcache->cooked_read.
10525 * frame.c (frame_save_as_regcache): Change return type.
10526 (frame_pop): Update.
10527 * frame.h (frame_save_as_regcache): Update declaration.
10528 * inferior.h (get_infcall_suspend_state_regcache): Update
10530 * infrun.c (infcall_suspend_state) <registers>: use
10531 readonly_detached_regcache.
10532 (save_infcall_suspend_state): Don't use regcache_dup.
10533 (get_infcall_suspend_state_regcache): Change return type.
10534 * linux-fork.c (struct fork_info) <savedregs>: Change to
10535 readonly_detached_regcache.
10537 (fork_save_infrun_state): Don't use regcache_dup.
10538 (info_checkpoints_command): Adjust.
10539 * mi/mi-main.c (register_changed_p): Update declaration.
10540 (mi_cmd_data_list_changed_registers): Use
10541 readonly_detached_regcache.
10542 (register_changed_p): Change parameter type to
10543 readonly_detached_regcache.
10544 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10545 readonly_detached_regcache.
10546 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10547 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10549 (regcache::save): Move it to reg_buffer.
10550 (regcache::restore): Change parameter type.
10551 (regcache_dup): Remove.
10552 * regcache.h (reg_buffer) <save>: New method.
10553 (readonly_detached_regcache): New class.
10554 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10555 readonly_detached_regcache.
10556 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10558 2018-02-21 Yao Qi <yao.qi@linaro.org>
10560 * frame.c (frame_save_as_regcache): Use regcache method save.
10561 (frame_pop): Use regcache method restore.
10562 * infrun.c (restore_infcall_suspend_state): Likewise.
10563 * linux-fork.c (fork_load_infrun_state): Likewise.
10564 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10566 * regcache.c (regcache_save): Remove.
10567 (regcache::restore): More asserts.
10568 (regcache_cpy): Remove.
10569 * regcache.h (regcache_save): Remove the declaration.
10570 (regcache::restore): Move from private to public.
10571 Remove the friend declaration of regcache_cpy.
10572 (regcache_cpy): Remove declaration.
10574 2018-02-21 Yao Qi <yao.qi@linaro.org>
10576 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10577 parameter type to 'readable_regcache *'.
10578 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10579 * arm-tdep.c (arm_neon_quad_read): Likewise.
10580 (arm_pseudo_read): Likewise.
10581 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10582 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10583 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10584 * gdbarch.c: Re-generated.
10585 * gdbarch.h: Re-generated.
10586 * gdbarch.sh (pseudo_register_read): Change parameter type to
10587 'readable_regcache *'.
10588 (pseudo_register_read_value): Likewise.
10589 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10590 (h8300_pseudo_register_read): Likewise.
10591 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10592 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10593 (i386_pseudo_register_read_into_value): Likewise.
10594 (i386_pseudo_register_read_value): Likewise.
10595 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10597 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10598 * m32c-tdep.c (m32c_raw_read): Likewise.
10599 (m32c_read_flg): Likewise.
10600 (m32c_banked_register): Likewise.
10601 (m32c_banked_read): Likewise.
10602 (m32c_sb_read): Likewise.
10603 (m32c_part_read): Likewise.
10604 (m32c_cat_read): Likewise.
10605 (m32c_r3r2r1r0_read): Likewise.
10606 (m32c_pseudo_register_read): Likewise.
10607 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10608 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10609 (mep_pseudo_cr64_read): Likewise.
10610 (mep_pseudo_register_read): Likewise.
10611 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10612 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10613 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10614 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10615 (regcache::cooked_read): Likewise.
10616 (regcache::cooked_read_value): Likewise.
10617 (regcache_cooked_read_signed):
10618 (regcache::cooked_read): Likewise.
10619 * regcache.h (readable_regcache): New class.
10620 (regcache): Inherit readable_regcache. Move some methods to
10622 * rl78-tdep.c (rl78_pseudo_register_read): Change
10623 parameter type to 'readable_regcache *'.
10624 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10625 (e500_pseudo_register_read): Change parameter type to
10626 'readable_regcache *'.
10627 (dfp_pseudo_register_read): Likewise.
10628 (vsx_pseudo_register_read): Likewise.
10629 (efpr_pseudo_register_read): Likewise.
10630 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10631 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10632 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10633 (sh64_pseudo_register_read): Likewise.
10634 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10635 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10636 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10637 (spu_pseudo_register_read): Likewise.
10638 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10639 (xtensa_pseudo_register_read): Likewise.
10641 2018-02-21 Yao Qi <yao.qi@linaro.org>
10643 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10644 (regcache::arch): Move it to reg_buffer::arch.
10645 (regcache::register_buffer): Likewise.
10646 (regcache::assert_regnum): Likewise.
10647 (regcache::num_raw_registers): Likewise.
10648 * regcache.h (reg_buffer): New class.
10649 (regcache): Inherit reg_buffer.
10651 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10653 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10654 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10656 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10658 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10660 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10662 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10663 (SFILES): Remove common/*.c files.
10664 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10665 * common/common.host: Add common reference.
10666 * configure.ac: Likewise.
10667 * configure: Regenerate.
10669 2018-02-16 Yao Qi <yao.qi@linaro.org>
10671 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10672 (block_initialize_namespace): Use new.
10673 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10674 (dwarf2_free_objfile): Use delete.
10675 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10676 (copy_type_recursive): Use new.
10677 * gdb_obstack.h (allocate_on_obstack): New.
10679 2018-02-15 Yao Qi <yao.qi@linaro.org>
10682 * inferior.c (exit_inferior_1): Reset inf->control.
10684 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10686 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10689 2018-02-14 Pedro Alves <palves@redhat.com>
10691 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10692 frame_cleanup_after_sniffer on exception.
10694 2018-02-14 Tom Tromey <tom@tromey.com>
10696 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10698 (solib_bfd_open): Make pathname const.
10699 * solib.c (solib_bfd_open): Make pathname const.
10700 * solib-spu.c (spu_bfd_fopen): Make name const.
10701 (spu_bfd_open): Make pathname const.
10702 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10703 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10705 2018-02-14 Tom Tromey <tom@tromey.com>
10707 * symfile.c (symfile_bfd_open): Update.
10708 * source.h (openp, source_full_path_of, find_and_open_source):
10709 Change argument type to unique_xmalloc_ptr.
10710 * source.c (openp): Take a unique_xmalloc_ptr.
10711 (source_full_path_of, find_and_open_source): Likewise.
10712 (open_source_file, symtab_to_fullname): Update.
10713 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10714 unique_xmalloc_ptr.
10715 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10716 (exec_file_find): Update.
10717 * psymtab.c (psymtab_to_fullname): Update.
10718 * nto-tdep.h (nto_find_and_open_solib): Update.
10719 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10720 unique_xmalloc_ptr.
10721 * exec.c (exec_file_attach): Update.
10722 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10723 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10725 2018-02-14 Tom Tromey <tom@tromey.com>
10727 * solib.c: Include source.h.
10728 * nto-tdep.c: Include source.h.
10729 * mi/mi-cmd-env.c: Include source.h.
10730 * infcmd.c: Include source.h.
10731 * exec.c: Include source.h.
10732 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10733 (add_path, directory_switch, source_path, init_source_path): Move
10735 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10736 (add_path, directory_switch, source_path, init_source_path):
10739 2018-02-14 Tom Tromey <tom@tromey.com>
10741 * solist.h (exec_file_find, solib_find): Return
10742 unique_xmalloc_ptr.
10743 (solib_bfd_fopen): Take a const char *.
10744 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10745 (exec_file_find, solib_find): Likewise.
10746 (solib_bfd_fopen): Do not take ownership of "pathname".
10747 (solib_bfd_open): Use unique_xmalloc_ptr.
10748 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10749 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10750 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10751 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10753 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10755 * ada-lang.c (name_match_type_from_name): Remove reference to
10756 ada_name_for_lookup in function's documentation.
10757 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10759 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10761 * defs.h (enum openp_flags): New enum.
10762 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10763 Move to enum openp_flags.
10764 (openp_flags): New enum flags.
10765 (openp): Change parameter type to openp_flags.
10766 * source.c (openp): Change parameter type to openp_flags.
10767 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10768 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10770 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10772 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10775 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10777 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10779 (class dwarf2_queue_guard): ...the destructor of this new class.
10780 (dw2_do_instantiate_symtab): Create instance of the new class
10781 dwarf2_queue_guard, remove cleanup.
10783 2018-02-09 Tom Tromey <tom@tromey.com>
10785 * source.c (find_source_lines): Don't reference past the end of
10788 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10790 * remote.c (remote_btrace_maybe_reopen): Change error message.
10791 * btrace.c (btrace_enable): Likewise.
10792 (parse_xml_btrace): Likewise.
10793 (parse_xml_btrace_conf): Likewise.
10795 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10797 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10798 (linux_enable_pt, linux_enable_bts): Call
10799 diagnose_perf_event_open_fail.
10801 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10803 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10804 Remove parameter and change return type. Update callers. Move it.
10805 (linux_enable_bts, linux_enable_pt): Improve error message.
10806 (linux_enable_pt): Remove zero buffer size check.
10807 (linux_enable_btrace): Improve error messages. Remove NULL return
10810 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10812 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10813 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10814 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10815 (linux_supports_pt, linux_supports_btrace): Remove.
10816 (linux_enable_bts): Call cpu_supports_bts.
10817 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10818 * remote.c (remote_supports_btrace): Remove.
10819 (init_remote_ops): Remove remote_supports_btrace.
10820 * target-delegates.c: Regenerated.
10821 * target.c (target_supports_btrace): Remove.
10822 * target.h (target_ops) <to_supports_btrace>: Remove
10823 (target_supports_btrace): Remove.
10824 * x86-linux-nat.c (x86_linux_create_target): Remove
10825 linux_supports_btrace.
10827 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10829 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10831 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10832 exception and use message in own exception.
10834 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10836 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10837 (perf_event_pt_event_type): Use gdb_file_up.
10838 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10839 scoped_fd, and scoped_mmap.
10841 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10843 * common/scoped_mmap.h: New.
10844 * unittests/scoped_mmap-selftest.c: New.
10845 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10846 unittests/scoped_mmap-selftest.c.
10848 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10850 * common/scoped_fd.h: New.
10851 * unittests/scoped_fd-selftest.c: New.
10852 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10853 unittests/scoped_fd-selftest.c.
10855 2018-02-09 Tom Tromey <tom@tromey.com>
10857 * auto-load.c (auto_load_section_scripts): Use
10858 gdb::unique_xmalloc_ptr.
10860 2018-02-09 Tom Tromey <tom@tromey.com>
10862 * auto-load.c (execute_script_contents): Use std::string.
10864 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10866 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10867 Python function, rather than a new command.
10869 2018-02-08 Tom Tromey <tom@tromey.com>
10871 * solib.c (solib_find_1): Use std::string.
10872 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10874 2018-02-08 Tom Tromey <tom@tromey.com>
10876 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10878 2018-02-08 Tom Tromey <tom@tromey.com>
10880 * source.c (find_source_lines): Use gdb::def_vector.
10882 2018-02-08 Tom Tromey <tom@tromey.com>
10884 * macrocmd.c (struct temporary_macro_definition): New.
10885 (macro_define_command): Use temporary_macro_definition. Remove
10887 (free_macro_definition_ptr): Remove.
10889 2018-02-08 Tom Tromey <tom@tromey.com>
10891 * macroexp.c (maybe_expand): Use std::string.
10893 2018-02-08 Tom Tromey <tom@tromey.com>
10895 * macroexp.c (struct macro_buffer): Add initializers for some
10897 (init_buffer, init_shared_buffer, free_buffer)
10898 (free_buffer_return_text): Remove.
10899 (macro_buffer): New constructors.
10900 (~macro_buffer): New destructor.
10901 (macro_buffer::set_shared): New method.
10902 (macro_buffer::resize_buffer, macro_buffer::appendc)
10903 (macro_buffer::appendmem): Now methods, not free functions.
10904 (set_token, append_tokens_without_splicing, stringify)
10905 (macro_stringify): Update.
10906 (gather_arguments): Change return type. Remove argc_p argument,
10907 add args_ptr argument. Use std::vector.
10908 (substitute_args): Remove argc argument. Accept std::vector.
10909 (expand): Update. Use std::vector.
10910 (scan, macro_expand, macro_expand_next): Update.
10912 2018-02-08 Tom Tromey <tom@tromey.com>
10914 * symtab.c (default_collect_symbol_completion_matches_break_on):
10915 Use unique_xmalloc_ptr.
10916 * macroscope.h: (sal_macro_scope, user_macro_scope)
10917 (default_macro_scope): Return unique_xmalloc_ptr.
10918 * macroscope.c (sal_macro_scope, user_macro_scope)
10919 (default_macro_scope): Return unique_xmalloc_ptr.
10920 * macroexp.h (macro_expand, macro_expand_once): Return
10921 unique_xmalloc_ptr.
10922 * macroexp.c (macro_expand, macro_expand_once): Return
10923 unique_xmalloc_ptr.
10924 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10925 (info_macro_command, info_macros_command): Use
10926 unique_xmalloc_ptr.
10927 * compile/compile-c-support.c (write_macro_definitions): Use
10928 unique_xmalloc_ptr.
10929 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10931 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10933 * value.c (value_static_field): Assign field type instead of
10934 containing type when returning an optimized out value.
10936 2018-02-06 Yao Qi <yao.qi@linaro.org>
10938 * ft32-tdep.c (ft32_read_pc): Remove.
10939 (ft32_write_pc): Remove.
10940 (ft32_gdbarch_init): Update.
10941 * m32r-tdep.c (m32r_read_pc): Remove.
10942 (m32r_gdbarch_init): Update.
10943 * mep-tdep.c (mep_read_pc): Remove.
10944 (mep_gdbarch_init): Update.
10945 * microblaze-tdep.c (microblaze_write_pc): Remove.
10946 (microblaze_gdbarch_init): Update.
10947 * mn10300-tdep.c (mn10300_read_pc): Remove.
10948 (mn10300_write_pc): Remove.
10949 (mn10300_gdbarch_init): Update.
10950 * moxie-tdep.c (moxie_read_pc): Remove.
10951 (moxie_write_pc): Remove.
10952 (moxie_gdbarch_init): Update.
10954 2018-02-06 Yao Qi <yao.qi@linaro.org>
10956 * expprint.c (print_subexp_standard): Handle
10957 OP_F77_UNDETERMINED_ARGLIST.
10958 (dump_subexp_body_standard): Likewise.
10960 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10962 * target-descriptions.c (tdesc_element_visitor) Add empty
10964 (tdesc_type): Move make_gdb_type from here.
10965 (tdesc_type_builtin): Likewise.
10966 (tdesc_type_vector): Likewise.
10967 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10968 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10969 (make_gdb_type_union): Likewise.
10970 (make_gdb_type_flags): Likewise.
10971 (make_gdb_type_enum): Likewise.
10972 (make_gdb_type): New function.
10973 (tdesc_register_type): Use static make_gdb_type.
10975 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10977 * infcmd.c (default_print_one_register_info): Align natural-format
10978 column values consistently one under another.
10979 (pad_to_column): New function.
10981 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10983 * dwarf2read.c (dwarf2_physname): Move commment.
10985 2018-02-01 Leszek Swirski <leszeks@google.com>
10987 * varobj.c (varobj_formatted_print_options): Allow recursive
10988 pretty printing if pretty printing is enabled.
10990 2018-02-01 Leszek Swirski <leszeks@google.com>
10992 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10993 names after a structop as a filename.
10995 2018-02-01 Yao Qi <yao.qi@linaro.org>
10997 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10998 (arm_record_coproc_data_proc): Likewise.
11000 2018-02-01 Yao Qi <yao.qi@linaro.org>
11002 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11004 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11006 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11007 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11009 2018-01-31 Pedro Alves <palves@redhat.com>
11011 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11012 * inflow.c (child_terminal_save_inferior): Wrap reference to
11013 tcgetpgrp in HAVE_TERMIOS_H.
11014 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11016 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11017 always iterate over all inferiors.
11018 (gdbsim_cntrl_c): Adjust.
11019 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11021 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11023 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11024 index type is objfile-owned if the element type is as well.
11026 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11030 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11032 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11033 "features/s390x-linux64.c".
11034 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11035 s390_linux32 and s390x_linux64.
11036 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11038 * s390-tdep.c: Include "features/s390-linux32.c" and
11039 "features/s390x-linux64.c".
11040 (s390_tdesc_valid): Add check for tdesc_has_registers.
11041 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11042 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11043 tdesc_s390x_linux64.
11044 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11045 tdesc_s390x_linux64 to...
11046 * s390-tdep.h: ...here.
11048 2018-01-30 Pedro Alves <palves@redhat.com>
11051 * config.in, configure: Regenerate.
11052 * configure.ac: Check for getpgid.
11053 * go32-nat.c (go32_pass_ctrlc): New.
11054 (go32_target): Install it.
11055 * inf-child.c (inf_child_target): Install
11056 child_terminal_save_inferior, child_pass_ctrlc and
11058 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11059 (inf_ptrace_target): No longer install it.
11060 * infcmd.c (interrupt_target_1): Adjust.
11061 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11062 (child_interrupt): Declare.
11063 (inferior::terminal_state): New.
11064 * inflow.c (struct terminal_info): Update comments.
11065 (inferior_process_group): Delete.
11066 (terminal_is_ours): Delete.
11067 (gdb_tty_state): New.
11068 (child_terminal_init): Adjust.
11069 (is_gdb_terminal, sharing_input_terminal_1)
11070 (sharing_input_terminal): New functions.
11071 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11072 Set the process's actual process group in the foreground if
11073 possible. Handle is_ours_for_output/is_ours distinction. Don't
11074 mark terminal as the inferior's if not sharing GDB's terminal.
11075 Don't check attach_flag.
11076 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11077 pass down a target_terminal_state.
11078 (child_terminal_save_inferior): New, factored out from ...
11079 (child_terminal_ours_1): ... this. Handle
11080 target_terminal_state::is_ours_for_output.
11081 (child_interrupt, child_pass_ctrlc): New.
11082 (inflow_inferior_exit): Clear the inferior's terminal_state.
11083 (copy_terminal_info): Copy the inferior's terminal state.
11084 (_initialize_inflow): Remove reference to terminal_is_ours.
11085 * inflow.h (inferior_process_group): Delete.
11086 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11087 * procfs.c (procfs_target): Don't install procfs_interrupt.
11088 (procfs_interrupt): Delete.
11089 * remote.c (remote_serial_quit_handler): Adjust.
11090 (remote_interrupt): Remove ptid parameter. Adjust.
11091 * target-delegates.c: Regenerate.
11092 * target.c: Include "terminal.h".
11093 (target_terminal::terminal_state): Rename to ...
11094 (target_terminal::m_terminal_state): ... this.
11095 (target_terminal::init): Adjust.
11096 (target_terminal::inferior): Adjust to per-inferior
11098 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11099 (target_terminal::ours, target_terminal::ours_for_output): Use
11100 target_terminal_is_ours_kind.
11101 (target_interrupt): Remove ptid parameter. Adjust.
11102 (default_target_pass_ctrlc): Adjust.
11103 * target.h (target_ops::to_terminal_save_inferior): New field.
11104 (target_ops::to_interrupt): Remove ptid_t parameter.
11105 (target_interrupt): Remove ptid_t parameter. Update comment.
11106 (target_pass_ctrlc): Update comment.
11107 * target/target.h (target_terminal_state): New scoped enum,
11108 factored out of ...
11109 (target_terminal::terminal_state): ... here.
11110 (target_terminal::inferior): Update comments.
11111 (target_terminal::restore_inferior): New.
11112 (target_terminal::is_inferior, target_terminal::is_ours)
11113 (target_terminal::is_ours_for_output): Adjust.
11114 (target_terminal::scoped_restore_terminal_state): Adjust to
11115 rename, and call restore_inferior() instead of inferior().
11116 (target_terminal::scoped_restore_terminal_state::m_state): Change
11118 (target_terminal::terminal_state): Rename to ...
11119 (target_terminal::m_terminal_state): ... this and change type.
11121 2018-01-30 Pedro Alves <palves@redhat.com>
11123 * linux-nat.c (wait_for_signal): New function.
11124 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11126 (async_terminal_is_ours)
11127 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11128 (linux_nat_add_target): Don't override
11129 to_terminal_inferior/to_terminal_ours.
11131 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11133 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11135 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11137 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11138 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11139 dwarf2_per_objfile_free here.
11140 (dwarf2_per_objfile_free): Remove.
11141 (_initialize_dwarf2_read): Don't register
11142 dwarf2_per_objfile_free as a registry cleanup.
11144 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11146 Avoid compilation errors in MinGW native builds
11148 The error is triggered by including python-internal.h, and the
11151 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11152 from build-gnulib/import/math.h:27,
11153 from d:/usr/Python26/include/pyport.h:235,
11154 from d:/usr/Python26/include/Python.h:58,
11155 from python/python-internal.h:94,
11156 from python/py-arch.c:24:
11157 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11161 This happens because Python headers define 'hypot' to expand t
11162 '_hypot' in the Windows builds.
11163 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11164 'hypoth'. This avoids a compilation error.
11166 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11168 * MAINTAINERS (Write After Approval): Fix ordering.
11170 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11172 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11174 2018-01-26 Alan Modra <amodra@gmail.com>
11176 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11177 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11178 Remove nop. Make const. Comment.
11179 (powerpc32_plt_stub_so_2): New.
11180 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11181 Correct count. Update uses.
11182 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11183 Move common code reading PLT entry word. Correct
11184 powerpc32_plt_stub PLT address calculation.
11185 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11186 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11187 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11188 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11189 (ppc64_standard_linkage8): Likewise.
11190 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11191 Correct insns description.
11192 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11194 2018-01-24 Pedro Alves <palves@redhat.com>
11196 GCC PR libstdc++/83906
11197 * gdbtypes.c (operator==(const dynamic_prop &,
11198 const dynamic_prop &)): New.
11199 (operator==(const range_bounds &, const range_bounds &)): New.
11200 (check_types_equal): Use them instead of memcmp.
11201 * gdbtypes.h (operator==(const dynamic_prop &,
11202 const dynamic_prop &)): Declare.
11203 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11204 (operator==(const range_bounds &, const range_bounds &)): Declare.
11205 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11207 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11209 * s390-linux-tdep.c (s390_record_address_mask)
11210 (s390_record_calc_disp_common, s390_record_calc_disp)
11211 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11212 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11213 (s390_process_record): Move to s390-tdep.c.
11214 (s390_linux_init_abi_any): Adjust.
11215 * s390-tdep.c (s390_record_address_mask)
11216 (s390_record_calc_disp_common, s390_record_calc_disp)
11217 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11218 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11219 (s390_process_record): Moved from s390-linux-tdep.c
11220 (s390_gdbarch_init): Adjust.
11222 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11224 * s390-linux-nat.c (s390-tdep.h): New include.
11225 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11226 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11227 (ALLDEPFILES): Add s390-tdep.c.
11228 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11229 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11230 * s390-tdep.h: ...this. New file.
11231 * s390-linux-tdep.c (s390-tdep.h): New include.
11232 (_initialize_s390_tdep): Rename to...
11233 (_initialize_s390_linux_tdep): ...this and adjust.
11234 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11235 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11237 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11238 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11239 (s390_is_partial_instruction, s390_software_single_step)
11240 (is_non_branch_ril, s390_displaced_step_copy_insn)
11241 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11242 (s390_prologue_data, s390_addr, s390_store, s390_load)
11243 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11244 (s390_register_call_saved, s390_guess_tracepoint_registers)
11245 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11246 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11247 (s390_pseudo_register_name, s390_pseudo_register_type)
11248 (s390_pseudo_register_read, s390_pseudo_register_write)
11249 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11250 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11251 (s390_addr_bits_remove, s390_address_class_type_flags)
11252 (s390_address_class_type_flags_to_name)
11253 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11254 (s390_function_arg_float, s390_function_arg_vector)
11255 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11256 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11257 (s390_frame_align, s390_register_return_value, s390_return_value)
11258 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11259 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11260 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11261 (s390_trad_frame_prev_register, s390_unwind_cache)
11262 (s390_prologue_frame_unwind_cache)
11263 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11264 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11265 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11266 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11267 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11268 (s390_frame_base_address, s390_local_base_address)
11269 (s390_frame_base, s390_gcc_target_options)
11270 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11271 (s390_validate_reg_range, s390_tdesc_valid)
11272 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11273 * s390-tdep.c: ...this. New file.
11275 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11277 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11278 (s390_process_record, s390_gdbarch_tdep_alloc)
11279 (s390_linux_init_abi_any): Use/set new hook.
11281 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11283 * s390-linux-tdep.c (osabi.h): New include.
11284 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11285 (s390_linux_init_abi_any): New functions.
11286 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11288 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11290 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11291 tdesc_has_registers check
11293 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11295 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11296 (s390_validate_reg_range): New macro.
11297 (s390_gdbarch_init): Adjust.
11299 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11301 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11302 (s390_gdbarch_tdep_alloc): Adjust.
11303 (s390_gdbarch_init): Adjust.
11305 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11307 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11308 <have_tdb>: Change type to bool.
11309 (s390_gdbarch_tdep_alloc): Adjust.
11310 (s390_gdbarch_init): Adjust.
11312 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11314 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11315 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11316 (s390_gdbarch_tdep_alloc): New function.
11317 (s390_gdbarch_init): Allocate tdep at start and use its fields
11318 instead of separate variables.
11320 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11322 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11323 when looking for cached gdbarch and add comment for remaining.
11325 2018-01-22 Pedro Alves <palves@redhat.com>
11326 Sergio Durigan Junior <sergiodj@redhat.com>
11328 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11331 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11333 * MAINTAINERS: Update my company e-mail address.
11335 2018-01-22 Yao Qi <yao.qi@linaro.org>
11337 * regcache.c (cooked_write_test): New function.
11338 (_initialize_regcache): Register the test.
11340 2018-01-22 Yao Qi <yao.qi@linaro.org>
11342 * ia64-tdep.c (ia64_pseudo_register_read): Call
11343 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11344 * m32c-tdep.c (m32c_cat_read): Likewise.
11345 (m32c_r3r2r1r0_read): Likewise.
11346 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11347 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11349 2018-01-22 Yao Qi <yao.qi@linaro.org>
11351 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11352 method raw_read instead of regcache_raw_read.
11353 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11354 * arm-tdep.c (arm_neon_quad_read): Likewise.
11355 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11356 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11357 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11358 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11359 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11360 (i386_pseudo_register_read_into_value): Likewise.
11361 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11362 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11363 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11364 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11365 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11366 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11367 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11368 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11369 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11371 2018-01-22 Yao Qi <yao.qi@linaro.org>
11373 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11374 * configure.tgt: Remove target mt.
11375 * mt-tdep.c: Remove.
11376 * regcache.c (cooked_read_test): Remove the check for mt.
11378 2018-01-22 Yao Qi <yao.qi@linaro.org>
11380 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11381 instead of gdbarch_pseudo_register_read_value.
11383 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11385 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11388 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11390 * linespec.c (create_sals_line_offset): Remove code that preserved
11391 the symtab_and_line's line number.
11393 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11395 * varobj.c (varobj_create): Don't set valid_block when creating a
11398 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11400 * varobj.c (varobj_create): Remove out of date comment.
11402 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11405 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11406 updating innermost block.
11407 * parse.c (innermost_block_tracker::update): Take extra type
11408 parameter, and check types match before updating innermost block.
11409 (write_dollar_variable): Update innermost block for registers.
11410 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11411 (innermost_block_tracker::innermost_block_tracker): Initialise
11413 (innermost_block_tracker::reset): Take type parameter.
11414 (innermost_block_tracker::update): Take type parameter, and pass
11415 type through as needed.
11416 (innermost_block_tracker::m_types): New member.
11417 * varobj.c (varobj_create): Pass type when reseting innermost
11420 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11422 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11423 * ada-lang.c (resolve_subexp): Likewise.
11424 * breakpoint.c (set_breakpoint_condition) Likewise.
11425 (watch_command_1) Likewise.
11426 * c-exp.y (variable): Likewise.
11427 * d-exp.y (PrimaryExpression): Likewise.
11428 * f-exp.y (variable): Likewise.
11429 * go-exp.y (variable): Likewise.
11430 * m2-exp.y (variable): Likewise.
11431 * objfiles.c (objfile::~objfile): Likewise.
11432 * p-exp.y (variable): Likewise.
11433 * parse.c (innermost_block): Change type.
11434 * parser-defs.h (class innermost_block_tracker): New.
11435 (innermost_block): Change to innermost_block_tracker.
11436 * printcmd.c (display_command): Switch to innermost_block API.
11437 (do_one_display): Likewise.
11438 * rust-exp.y (do_one_display): Likewise.
11439 * symfile.c (clear_symtab_users): Likewise.
11440 * varobj.c (varobj_create): Switch to innermost_block API, replace
11441 use of innermost_block with block stored on varobj object.
11443 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11445 * expression.h (innermost_block): Remove declaration.
11446 * varobj.c: Add 'parser-defs.h' include.
11448 2018-01-19 Tom Tromey <tom@tromey.com>
11450 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11451 symbols in the static and global blocks.
11453 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11455 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11456 gdb_ptrace.h, and move including gdb_wait.h ...
11457 * nat/linux-ptrace.h: ... to here.
11459 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11461 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11462 inf_ptrace_detach_success.
11463 (inf_ptrace_detach_success): Add inferior parameter, use it
11464 instead of inferior_ptid, pass it to detach_inferior.
11465 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11467 * inferior.c (detach_inferior): Add overload that takes an
11469 * inferior.h (detach_inferior): Likewise.
11470 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11471 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11472 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11474 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11476 * target.h (struct target_ops) <to_detach>: Add inferior
11478 (target_detach): Likewise.
11479 * target.c (dispose_inferior): Pass inferior down.
11480 (target_detach): Pass inferior down. Assert that it is equal to
11481 the current inferior.
11482 * aix-thread.c (aix_thread_detach): Pass inferior down.
11483 * corefile.c (core_file_command): Pass current_inferior() down.
11484 * corelow.c (core_detach): Add inferior parameter.
11485 * darwin-nat.c (darwin_detach): Likewise.
11486 * gnu-nat.c (gnu_detach): Likewise.
11487 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11488 * infcmd.c (detach_command): Pass current_inferior() down to
11490 * infrun.c (follow_fork_inferior): Pass parent_inf to
11492 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11494 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11495 * linux-thread-db.c (thread_db_detach): Likewise.
11496 * nto-procfs.c (procfs_detach): Likewise.
11497 * procfs.c (procfs_detach): Likewise.
11498 * record.c (record_detach): Likewise.
11499 * record.h (struct inferior): Forward-declare.
11500 (record_detach): Add inferior parameter.
11501 * remote-sim.c (gdbsim_detach): Likewise.
11502 * remote.c (remote_detach_1): Likewise.
11503 (remote_detach): Likewise.
11504 (extended_remote_detach): Likewise.
11505 * sol-thread.c (sol_thread_detach): Likewise.
11506 * target-debug.h (target_debug_print_inferior_p): New macro.
11507 * target-delegates.c: Re-generate.
11508 * top.c (kill_or_detach): Pass inferior down to target_detach.
11509 * windows-nat.c (windows_detach): Add inferior parameter.
11511 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11513 * target.h (struct target_ops) <to_detach>: Remove args
11515 (target_detach): Likewise.
11516 * target.c (dispose_inferior): Adjust.
11517 (target_detach): Remove args parameter, adjust.
11518 * aix-thread.c (aix_thread_detach): Adjust.
11519 * corefile.c (core_file_command): Adjust.
11520 * corelow.c (core_detach): Adjust.
11521 * darwin-nat.c (darwin_detach): Adjust.
11522 * gnu-nat.c (gnu_detach): Adjust.
11523 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11524 * infcmd.c (detach_command): Adjust
11525 * infrun.c (follow_fork_inferior): Adjust.
11526 (handle_vfork_child_exec_or_exit): Adjust.
11527 * linux-fork.c (linux_fork_detach): Remove args parameter.
11528 * linux-fork.h (linux_fork_detach): Likewise.
11529 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11530 * linux-thread-db.c (thread_db_detach): Likewise.
11531 * nto-procfs.c (procfs_detach): Likewise.
11532 * procfs.c (procfs_detach): Likewise.
11533 (do_detach): Remove signo parameter.
11534 * record.c (record_detach): Remove args parameter.
11535 * record.h (record_detach): Likewise.
11536 * remote-sim.c (gdbsim_detach): Likewise.
11537 * remote.c (remote_detach_1): Likewise.
11538 (remote_detach): Likewise.
11539 (extended_remote_detach): Likewise.
11540 * sol-thread.c (sol_thread_detach): Likewise.
11541 * target-delegates.c: Re-generate.
11542 * top.c (struct qt_args) <args>: Remove field.
11543 (kill_or_detach): Don't pass args.
11544 (quit_force): Don't set args.
11545 * windows-nat.c (windows_detach): Remove args parameter.
11547 2018-01-19 Yao Qi <yao.qi@linaro.org>
11549 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11550 (arm_linux_init_abi): Install it.
11552 2018-01-19 Yao Qi <yao.qi@linaro.org>
11554 * osabi.c (gdb_osabi_names): Extend the regexp for
11555 arm-linux-gnueabihf.
11557 2018-01-18 Yao Qi <yao.qi@linaro.org>
11559 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11561 (abbrev_table::add_abbrev): Update.
11562 (abbrev_table::lookup_abbrev): Update.
11564 2018-01-18 Yao Qi <yao.qi@linaro.org>
11566 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11568 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11570 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11573 2018-01-17 Tom Tromey <tom@tromey.com>
11575 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11577 2018-01-17 Tom Tromey <tom@tromey.com>
11579 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11580 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11581 (create_array_type_with_stride): Update.
11582 * dwarf2read.c (set_die_type): Update.
11584 2018-01-17 Tom Tromey <tom@tromey.com>
11586 * dwarf2read.c (delayed_method_info): Remove typedef.
11587 (dwarf2_cu::method_info): Now a std::vector.
11588 (add_to_method_list): Update.
11589 (free_delayed_list): Remove.
11590 (compute_delayed_physnames): Update.
11591 (process_full_comp_unit, process_full_type_unit): Clear the method
11592 list. Remove cleanups.
11593 (psymtab_include_file_name): Add name_holder parameter. Use
11594 unique_xmalloc_ptr.
11595 (dwarf_decode_lines): Update.
11597 2018-01-17 Tom Tromey <tom@tromey.com>
11598 Simon Marchi <simon.marchi@ericsson.com>
11600 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11601 (dwarf2_per_objfile::free_cached_comp_units)
11602 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11603 (init_cutu_and_read_dies_no_follow): Update.
11604 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11605 (dwarf2_cu::~dwarf2_cu): New.
11606 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11607 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11609 2018-01-17 Tom Tromey <tom@tromey.com>
11610 Simon Marchi <simon.marchi@ericsson.com>
11612 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11613 (struct die_reader_specs) <abbrev_table>: New member.
11614 (struct abbrev_table): Add constructor.
11615 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11616 <abbrev_obstack>: Now an auto_obstack.
11617 (abbrev_table_up): New typedef.
11618 (init_cu_die_reader): Add abbrev_table parameter.
11619 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11620 Add result_dwo_abbrev_table.
11621 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11622 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11624 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11626 (skip_children): Update.
11627 (abbrev_table::alloc_abbrev): Rename from
11628 abbrev_table_alloc_abbrev.
11629 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11630 (abbrev_table::lookup_abbrev): Rename from
11631 abbrev_table_lookup_abbrev.
11632 (abbrev_table_read_table): Return abbrev_table_up.
11633 (abbrev_table_free, abbrev_table_free_cleanup)
11634 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11635 (load_partial_dies): Update.
11637 2018-01-17 Tom Tromey <tom@tromey.com>
11639 * dwarf2read.c (dwarf2_compute_name): Update comment.
11640 (read_func_scope, read_variable): Update.
11641 (new_symbol): Remove.
11642 (new_symbol_full): Rename to new_symbol.
11644 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11647 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11648 a warning instead of throwing an error, set section size to 0 and return
11650 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11652 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11654 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11656 (linux_ptrace_attach_fail_reason_string): Likewise.
11657 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11659 (linux_ptrace_attach_fail_reason_string): Likewise.
11660 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11662 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11664 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11666 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11669 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11670 checking for fs_base/gs_base fields in struct user_regs_struct.
11671 * configure: Regenerate.
11673 2018-01-17 Yao Qi <yao.qi@linaro.org>
11675 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11677 (aarch64_linux_init_abi): Install it to gdbarch hook
11678 gcc_target_options.
11680 2018-01-15 Pedro Alves <palves@redhat.com>
11682 * common/signals-state-save-restore.c
11683 (save_original_signals_state): Fix typos.
11685 2017-01-12 Tom Tromey <tom@tromey.com>
11686 Sergio Durigan Junior <sergiodj@redhat.com>
11688 * Makefile.in (install-only): Install gdb-add-index.
11690 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11692 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11694 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11696 * infrun.c (keep_going_pass_signal): Clear step-over info when
11697 insert_breakpoints fails.
11699 2018-01-11 Pedro Alves <palves@redhat.com>
11702 * infrun.c (resume): Rename to ...
11703 (resume_1): ... this.
11704 (resume): Reimplement as wrapper around resume_1.
11706 2018-01-11 Pedro Alves <palves@redhat.com>
11709 * remote.c (remote_parse_stop_reply): Default to the last-set
11710 general thread instead of to 'magic_null_ptid'.
11712 2018-01-10 Pedro Alves <palves@redhat.com>
11714 * language.h (language_get_symbol_name_matcher): Rename ...
11715 (get_symbol_name_matcher): ... this.
11716 * language.c (language_get_symbol_name_matcher): Ditto.
11717 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11720 2018-01-10 Pedro Alves <palves@redhat.com>
11724 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11725 Adjust to use language_get_symbol_name_matcher instead of
11726 language_defn::la_get_symbol_name_matcher.
11727 * language.c (language_get_symbol_name_matcher): If in Ada mode
11728 and the lookup name is a verbatim match, return Ada's matcher.
11729 * language.h (language_get_symbol_name_matcher): Adjust comment.
11730 (ada_lookup_name_info::verbatim_p):: New method.
11732 2018-01-10 Pedro Alves <palves@redhat.com>
11735 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11736 minsym's language is language_auto or language_cplus, pass down
11737 language_ada instead.
11738 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11740 2018-01-10 Pedro Alves <palves@redhat.com>
11743 * minsyms.c (linkage_name_str): New function.
11744 (iterate_over_minimal_symbols): Use it.
11746 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11748 * NEWS: Document that 'info proc' now works on FreeBSD.
11750 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11752 * configure.ac: Check for kinfo_getfile in libutil.
11753 * configure: Regenerate.
11754 * config.in: Regenerate.
11755 * fbsd-nat.c: Include "fbsd-tdep.h".
11756 (fbsd_fetch_cmdline): New.
11757 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11758 rather than calling error.
11759 (fbsd_info_proc): New.
11760 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11761 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11762 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11764 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11766 * fbsd-nat.c (struct free_deleter): Remove.
11767 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11769 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11771 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11772 NULL for an empty pathname.
11774 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11776 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11777 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11778 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11779 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11780 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11781 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11782 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11783 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11784 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11785 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11786 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11787 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11788 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11789 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11790 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11792 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11794 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11795 (gnu_xfer_auxv): New function.
11796 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11797 TARGET_OBJECT_AUXV.
11799 2018-01-08 Yao Qi <yao.qi@linaro.org>
11800 Simon Marchi <simon.marchi@ericsson.com>
11802 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11804 (COMMON_OBS): Remove selftest.o.
11805 * configure.ac: Append selftest-arch.c and common/selftest.c to
11806 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11807 * configure: Re-generated.
11808 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11810 (maintenance_info_selftests): Likewise.
11812 2018-01-08 Xavier Roirand <roirand@adacore.com>
11814 * ada-valprint.c (val_print_packed_array_elements): Use
11815 proper number of elements when printing an array indexed
11816 by an enumeration type.
11818 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11820 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11821 (dw2_get_file_names_reader): Adjust.
11822 (lookup_dwo_signatured_type): Adjust.
11823 (lookup_dwp_signatured_type): Adjust.
11824 (lookup_signatured_type): Adjust.
11825 (create_type_unit_group): Adjust.
11826 (get_type_unit_group): Adjust.
11827 (process_psymtab_comp_unit_reader): Adjust.
11828 (build_type_psymtabs_reader): Adjust.
11829 (scan_partial_symbols): Adjust.
11830 (add_partial_symbol): Adjust.
11831 (add_partial_subprogram): Adjust.
11832 (peek_die_abbrev): Adjust.
11833 (fixup_go_packaging): Adjust.
11834 (process_imported_unit_die): Adjust.
11835 (dwarf2_compute_name): Adjust.
11836 (dwarf2_physname): Adjust.
11837 (read_import_statement): Adjust.
11838 (handle_DW_AT_stmt_list): Adjust.
11839 (read_file_scope): Adjust.
11840 (read_func_scope): Adjust.
11841 (read_lexical_block_scope): Adjust.
11842 (read_call_site_scope): Adjust.
11843 (read_variable): Adjust.
11844 (dwarf2_rnglists_process): Adjust.
11845 (dwarf2_ranges_process): Adjust.
11846 (dwarf2_ranges_read): Adjust.
11847 (dwarf2_get_pc_bounds): Adjust.
11848 (dwarf2_record_block_ranges): Adjust.
11849 (dwarf2_add_field): Adjust.
11850 (dwarf2_add_member_fn): Adjust.
11851 (read_structure_type): Adjust.
11852 (process_structure_scope): Adjust.
11853 (read_enumeration_type): Adjust.
11854 (read_array_type): Adjust.
11855 (mark_common_block_symbol_computed): Adjust.
11856 (read_common_block): Adjust.
11857 (read_namespace_type): Adjust.
11858 (read_namespace): Adjust.
11859 (read_module_type): Adjust.
11860 (read_tag_pointer_type): Adjust.
11861 (read_tag_ptr_to_member_type): Adjust.
11862 (read_tag_string_type): Adjust.
11863 (read_subroutine_type): Adjust.
11864 (read_typedef): Adjust.
11865 (read_base_type): Adjust.
11866 (attr_to_dynamic_prop): Adjust.
11867 (read_subrange_type): Adjust.
11868 (read_unspecified_type): Adjust.
11869 (dwarf2_read_abbrevs): Adjust.
11870 (load_partial_dies): Adjust.
11871 (read_partial_die): Adjust.
11872 (find_partial_die): Adjust.
11873 (guess_partial_die_structure_name): Adjust.
11874 (fixup_partial_die): Adjust.
11875 (read_attribute_value): Adjust.
11876 (read_addr_index): Adjust.
11877 (read_addr_index_from_leb128): Adjust.
11878 (read_str_index): Adjust.
11879 (dwarf2_string_attr): Adjust.
11880 (get_debug_line_section): Adjust.
11881 (dwarf_decode_line_header): Adjust.
11882 (lnp_state_machine::check_line_address): Adjust.
11883 (dwarf_decode_lines_1): Adjust.
11884 (dwarf_decode_lines): Adjust.
11885 (dwarf2_start_symtab): Adjust.
11886 (var_decode_location): Adjust.
11887 (new_symbol_full): Adjust.
11888 (dwarf2_const_value_data): Adjust.
11889 (dwarf2_const_value_attr): Adjust.
11890 (dwarf2_const_value): Adjust.
11891 (die_type): Adjust.
11892 (die_containing_type): Adjust.
11893 (build_error_marker_type): Adjust.
11894 (lookup_die_type): Adjust.
11895 (guess_full_die_structure_name): Adjust.
11896 (anonymous_struct_prefix): Adjust.
11897 (determine_prefix): Adjust.
11898 (dwarf2_name): Adjust.
11899 (follow_die_ref_or_sig): Adjust.
11900 (follow_die_offset): Adjust.
11901 (follow_die_ref): Adjust.
11902 (follow_die_sig_1): Adjust.
11903 (follow_die_sig): Adjust.
11904 (get_signatured_type): Adjust.
11905 (get_DW_AT_signature_type): Adjust.
11906 (decode_locdesc): Adjust.
11907 (dwarf_decode_macros): Adjust.
11908 (cu_debug_loc_section): Adjust.
11909 (fill_in_loclist_baton): Adjust.
11910 (dwarf2_symbol_mark_computed): Adjust.
11911 (init_one_comp_unit): Don't assign
11912 dwarf2_cu::dwarf2_per_objfile.
11913 (set_die_type): Adjust.
11915 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11917 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11918 <dwarf2_per_objfile>: New field.
11919 (dwarf2_per_objfile): Remove global.
11920 (get_dwarf2_per_objfile): New function.
11921 (set_dwarf2_per_objfile): New function.
11922 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11923 dwarf2_per_objfile.
11924 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11925 (read_abbrev_offset): Likewise.
11926 (read_indirect_string): Likewise.
11927 (read_indirect_line_string): Likewise.
11928 (read_indirect_string_at_offset): Likewise.
11929 (read_indirect_string_from_dwz): Likewise.
11930 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11931 dwarf2_per_objfile.
11932 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11933 (create_all_comp_units): Change objfile parameter to
11934 dwarf2_per_objfile.
11935 (create_all_type_units): Likewise.
11936 (process_queue): Add dwarf2_per_objfile parameter.
11937 (read_and_check_comp_unit_head): Likewise.
11938 (lookup_dwo_unit_in_dwp): Likewise.
11939 (get_dwp_file): Likewise.
11940 (process_cu_includes): Likewise.
11941 (struct free_dwo_file_cleanup_data): New struct.
11942 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11943 set_dwarf2_per_objfile.
11944 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11945 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11946 context, adjust calls.
11947 (dw2_instantiate_symtab): Likewise.
11948 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11949 (dw2_get_cu): Likewise.
11950 (create_cu_from_index_list): Change objfile parameter to
11951 dwarf2_per_objfile.
11952 (create_cus_from_index_list): Get dwarf2_per_objfile from
11953 context, adjust calls.
11954 (create_cus_from_index): Likewise.
11955 (create_signatured_type_table_from_index): Change objfile
11956 parameter to dwarf2_per_objfile.
11957 (create_signatured_type_table_from_debug_names): Change objfile
11958 parameter to dwarf2_per_objfile.
11959 (create_addrmap_from_index): Likewise.
11960 (create_addrmap_from_aranges): Likewise.
11961 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11962 (dw2_setup): Remove.
11963 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11965 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11966 get_dwarf2_per_objfile.
11967 (dw2_forget_cached_source_info): Likewise.
11968 (dw2_map_symtabs_matching_filename): Likewise.
11969 (struct dw2_symtab_iterator) <index>: Remove.
11970 <dwarf2_per_objfile>: New field.
11971 (dw2_symtab_iter_init): Replace index parameter with
11972 dwarf2_per_objfile.
11973 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11974 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11975 (dw2_print_stats): Likewise.
11976 (dw2_dump): Likewise.
11977 (dw2_expand_symtabs_for_function): Likewise.
11978 (dw2_expand_all_symtabs): Likewise.
11979 (dw2_expand_symtabs_with_fullname): Likewise.
11980 (dw2_expand_marked_cus): Replace index and objfile parameters
11981 with dwarf2_per_objfile.
11982 (dw_expand_symtabs_matching_file_matcher): Add
11983 dwarf2_per_objfile parameter and adjust calls.
11984 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11986 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11987 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11989 (create_cus_from_debug_names_list): Replace objfile parameter
11990 with dwarf2_per_objfile and adjust calls.
11991 (create_cus_from_debug_names): Likewise.
11992 (dwarf2_read_debug_names): Likewise.
11993 (mapped_debug_names::namei_to_name): Adjust call.
11994 (dw2_debug_names_iterator::next): Likewise.
11995 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11996 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11997 (dw2_debug_names_dump): Likewise.
11998 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11999 (dw2_debug_names_expand_symtabs_matching): Likewise.
12000 (dwarf2_initialize_objfile): Likewise.
12001 (dwarf2_build_psymtabs): Likewise.
12002 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12004 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12005 (read_and_check_comp_unit_head): Likewise.
12006 (read_abbrev_offset): Likewise.
12007 (create_debug_type_hash_table): Likewise.
12008 (create_debug_types_hash_table): Likewise.
12009 (create_all_type_units): Replace objfile parameter with
12010 dwarf2_per_objfile.
12011 (add_type_unit): Add dwarf2_per_objfile parameter.
12012 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12013 with dwarf2_per_objfile.
12014 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12015 (lookup_dwp_signatured_type): Likewise.
12016 (lookup_signatured_type): Likewise.
12017 (read_cutu_die_from_dwo): Likewise.
12018 (init_tu_and_read_dwo_dies): Likewise.
12019 (init_cutu_and_read_dies): Likewise.
12020 (init_cutu_and_read_dies_no_follow): Likewise.
12021 (allocate_type_unit_groups_table): Add objfile parameter.
12022 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12023 (get_type_unit_group): Likewise.
12024 (process_psymtab_comp_unit): Update call.
12025 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12026 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12027 (print_tu_stats): Likewise.
12028 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12029 in void* parameter.
12030 (build_type_psymtabs): Change objfile parameter to
12031 dwarf2_per_objfile.
12032 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12033 passed in void* parameter.
12034 (process_skeletonless_type_units): Change objfile parameter to
12035 dwarf2_per_objfile.
12036 (set_partial_user): Likewise.
12037 (dwarf2_build_psymtabs_hard): Likewise.
12038 (read_comp_units_from_section): Likewise.
12039 (create_all_comp_units): Likewise.
12040 (scan_partial_symbols): Update calls.
12041 (add_partial_symbol): Likewise.
12042 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12043 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12044 (process_queue): Add dwarf2_per_objfile parameter.
12045 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12046 (compute_compunit_symtab_includes): Likewise.
12047 (process_cu_includes): Add dwarf2_per_objfile parameter.
12048 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12049 (process_full_type_unit): Likewise.
12050 (process_imported_unit_die): Update call.
12051 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12052 (read_file_scope): Likewise.
12053 (allocate_dwo_file_hash_table): Add objfile parameter.
12054 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12055 (create_cus_hash_table): Likewise.
12056 (create_dwp_hash_table): Likewise.
12057 (create_dwo_unit_in_dwp_v1): Likewise.
12058 (create_dwp_v2_section): Likewise.
12059 (create_dwo_unit_in_dwp_v2): Likewise.
12060 (lookup_dwo_unit_in_dwp): Likewise.
12061 (try_open_dwop_file): Likewise.
12062 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12063 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12064 cleanup to include a reference to dwarf2_per_objfile.
12065 (open_dwp_file): Add dwarf2_per_objfile parameter.
12066 (open_and_init_dwp_file): Likewise.
12067 (get_dwp_file): Likewise.
12068 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12069 (queue_and_load_all_dwo_tus): Update call.
12070 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12072 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12073 (dwarf2_ranges_process): Likewise.
12074 (dwarf2_get_pc_bounds): Likewise.
12075 (mark_common_block_symbol_computed): Likewise.
12076 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12077 (dwarf2_read_abbrevs): Update call.
12078 (read_partial_die): Use dwarf2_per_objfile from cu.
12079 (find_partial_die): Likewise.
12080 (fixup_partial_die): Likewise.
12081 (read_attribute_value): Likewise.
12082 (read_indirect_string_at_offset_from): Add objfile parameter.
12083 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12085 (read_indirect_string_from_dwz): Add objfile parameter.
12086 (read_indirect_string): Add objfile parameter.
12087 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12088 (read_addr_index): Use dwarf2_per_objfile from cu.
12089 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12091 (read_str_index): Use dwarf2_per_objfile from cu.
12092 (get_debug_line_section): Likewise.
12093 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12094 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12095 (new_symbol_full): Use dwarf2_per_objfile from cu.
12096 (build_error_marker_type): Likewise.
12097 (lookup_die_type): Likewise.
12098 (determine_prefix): Likewise.
12099 (follow_die_offset): Likewise.
12100 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12101 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12102 (dwarf2_fetch_die_type_sect_off): Likewise.
12103 (dwarf2_get_die_type): Likewise.
12104 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12105 (get_signatured_type): Likewise.
12106 (get_DW_AT_signature_type): Likewise.
12107 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12108 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12109 (cu_debug_loc_section): Likewise.
12110 (fill_in_loclist_baton): Likewise.
12111 (dwarf2_symbol_mark_computed): Likewise.
12112 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12113 dwarf2_per_objfile.
12114 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12116 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12117 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12118 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12119 (set_die_type): Use dwarf2_free_objfile from cu.
12120 (get_die_type_at_offset): Likewise.
12121 (dwarf2_per_objfile_free): Don't assign global variable.
12122 (debug_names) <constructor>: Add dwarf2_per_objfile
12123 parameter, update m_debugstrlookup construction.
12124 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12126 <m_dwarf2_per_objfile>: New field.
12127 <lookup>: Use m_dwarf2_per_objfile.
12128 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12129 (psyms_seen_size): Likewise.
12130 (write_gdbindex): Replace objfile parameter with
12131 dwarf2_per_objfile.
12132 (write_debug_names): Likewise.
12133 (write_psymtabs_to_index): Likewise.
12134 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12137 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12139 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12140 <dwarf2_per_objfile>: New field.
12141 (struct dwarf2_per_cu_data) <objfile>: Remove.
12142 <dwarf2_per_objfile>: New field.
12143 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12145 (create_signatured_type_table_from_index): Likewise.
12146 (create_debug_type_hash_table): Likewise.
12147 (fill_in_sig_entry_from_dwo_entry): Likewise.
12148 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12149 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12151 (create_partial_symtab): Access objfile through
12152 dwarf2_per_objfile.
12153 (process_psymtab_comp_unit_reader): Likewise.
12154 (read_comp_units_from_section): Likewise.
12155 (scan_partial_symbols): Likewise.
12156 (add_partial_symbol): Likewise.
12157 (add_partial_subprogram): Likewise.
12158 (peek_die_abbrev): Likewise.
12159 (fixup_go_packaging): Likewise.
12160 (process_full_comp_unit): Likewise.
12161 (process_full_type_unit): Likewise.
12162 (process_imported_unit_die): Likewise.
12163 (dwarf2_compute_name): Likewise.
12164 (dwarf2_physname): Likewise.
12165 (read_import_statement): Likewise.
12166 (create_cus_hash_table): Assign dwarf2_physname instead of
12168 (read_func_scope): Access objfile through dwarf2_per_objfile.
12169 (read_lexical_block_scope): Likewise.
12170 (read_call_site_scope): Likewise.
12171 (read_variable): Likewise.
12172 (dwarf2_rnglists_process): Likewise.
12173 (dwarf2_ranges_process): Likewise.
12174 (dwarf2_ranges_read): Likewise.
12175 (dwarf2_record_block_ranges): Likewise.
12176 (dwarf2_add_field): Likewise.
12177 (dwarf2_add_member_fn): Likewise.
12178 (read_structure_type): Likewise.
12179 (process_structure_scope): Likewise.
12180 (read_enumeration_type): Likewise.
12181 (read_array_type): Likewise.
12182 (read_common_block): Likewise.
12183 (read_namespace_type): Likewise.
12184 (read_namespace): Likewise.
12185 (read_module_type): Likewise.
12186 (read_tag_pointer_type): Likewise.
12187 (read_tag_ptr_to_member_type): Likewise.
12188 (read_tag_string_type): Likewise.
12189 (read_subroutine_type): Likewise.
12190 (read_typedef): Likewise.
12191 (read_base_type): Likewise.
12192 (attr_to_dynamic_prop): Likewise.
12193 (read_subrange_type): Likewise.
12194 (read_unspecified_type): Likewise.
12195 (load_partial_dies): Likewise.
12196 (read_partial_die): Likewise.
12197 (find_partial_die): Likewise.
12198 (guess_partial_die_structure_name): Likewise.
12199 (fixup_partial_die): Likewise.
12200 (read_attribute_value): Likewise.
12201 (read_addr_index_from_leb128): Likewise.
12202 (dwarf2_read_addr_index): Likewise.
12203 (dwarf2_string_attr): Likewise.
12204 (lnp_state_machine::check_line_address): Likewise.
12205 (dwarf_decode_lines_1): Likewise.
12206 (dwarf_decode_lines): Likewise.
12207 (dwarf2_start_symtab): Likewise.
12208 (var_decode_location): Likewise.
12209 (new_symbol_full): Likewise.
12210 (dwarf2_const_value_data): Likewise.
12211 (dwarf2_const_value_attr): Likewise.
12212 (dwarf2_const_value): Likewise.
12213 (die_type): Likewise.
12214 (die_containing_type): Likewise.
12215 (lookup_die_type): Likewise.
12216 (guess_full_die_structure_name): Likewise.
12217 (anonymous_struct_prefix): Likewise.
12218 (dwarf2_name): Likewise.
12219 (follow_die_ref_or_sig): Likewise.
12220 (follow_die_offset): Likewise.
12221 (follow_die_ref): Likewise.
12222 (dwarf2_fetch_die_loc_sect_off): Likewise.
12223 (dwarf2_fetch_constant_bytes): Likewise.
12224 (dwarf2_fetch_die_type_sect_off): Likewise.
12225 (dwarf2_get_die_type): Likewise.
12226 (follow_die_sig): Likewise.
12227 (decode_locdesc): Likewise.
12228 (dwarf2_per_cu_objfile): Likewise.
12229 (dwarf2_per_cu_text_offset): Likewise.
12230 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12232 (set_die_type): Access objfile through
12233 dwarf2_per_objfile.
12235 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12237 * valprint.c (converted_character_d): Remove typedef.
12238 (DEF_VEC_O (converted_character_d)): Remove.
12239 (count_next_character): Use std::vector.
12240 (print_converted_chars_to_obstack): Likewise.
12241 (generic_printstr): Likewise.
12243 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12245 * xml-support.h (struct gdb_xml_value): Add constructor.
12246 <value>: Change type to unique_xmalloc_ptr.
12247 (gdb_xml_value_s): Remove typedef.
12248 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12249 (gdb_xml_element_start_handler): Change parameter type to
12251 (xml_find_attribute): Likewise.
12252 * xml-support.c (xml_find_attribute): Change parameter type to
12253 std::vector and adjust.
12254 (gdb_xml_values_cleanup): Remove.
12255 (gdb_xml_parser::start_element): Adjust to std::vector.
12256 (xinclude_start_include): Change paraeter type to std::vector
12258 * btrace.c (check_xml_btrace_version): Likewise.
12259 (parse_xml_btrace_block): Likewise.
12260 (parse_xml_btrace_pt_config_cpu): Likewise.
12261 (parse_xml_btrace_pt): Likewise.
12262 (parse_xml_btrace_conf_bts): Likewise.
12263 (parse_xml_btrace_conf_pt): Likewise.
12264 * memory-map.c (memory_map_start_memory): Likewise.
12265 (memory_map_start_property): Likewise.
12266 * osdata.c (osdata_start_osdata): Likewise.
12267 (osdata_start_item): Likewise.
12268 (osdata_start_column): Likewise.
12269 * remote.c (start_thread): Likewise.
12270 * solib-aix.c (library_list_start_library): Likewise.
12271 (library_list_start_list): Likewise.
12272 * solib-svr4.c (library_list_start_library): Likewise.
12273 (svr4_library_list_start_list): Likewise.
12274 * solib-target.c (library_list_start_segment): Likewise.
12275 (library_list_start_section): Likewise.
12276 (library_list_start_library): Likewise.
12277 (library_list_start_list): Likewise.
12278 * tracepoint.c (traceframe_info_start_memory): Likewise.
12279 (traceframe_info_start_tvar): Likewise.
12280 * xml-syscall.c (syscall_start_syscall): Likewise.
12281 * xml-tdesc.c (tdesc_start_target): Likewise.
12282 (tdesc_start_feature): Likewise.
12283 (tdesc_start_reg): Likewise.
12284 (tdesc_start_union): Likewise.
12285 (tdesc_start_struct): Likewise.
12286 (tdesc_start_flags): Likewise.
12287 (tdesc_start_enum): Likewise.
12288 (tdesc_start_field): Likewise.
12289 (tdesc_start_enum_value): Likewise.
12290 (tdesc_start_vector): Likewise.
12292 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12294 * extension.h (struct xmethod_worker) <clone>: Remove.
12295 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12297 (python_xmethod_worker::clone): Remove.
12298 * valops.c (find_overload_match): Use std::move instead of
12301 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12303 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12304 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12305 <free_xmethod_worker_data>: Remove.
12306 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12307 <get_xmethod_arg_types>: Remove.
12308 <get_xmethod_result_type>: Remove.
12309 <invoke_xmethod>: Remove.
12310 * extension.c (new_xmethod_worker): Remove.
12311 (clone_xmethod_worker): Remove.
12312 (get_matching_xmethod_workers): Return void, pass std::vector by
12314 (get_xmethod_arg_types): Rename to...
12315 (xmethod_worker::get_arg_types): ... this, and adjust.
12316 (get_xmethod_result_type): Rename to...
12317 (xmethod_worker::get_result_type): ... this, and adjust.
12318 (invoke_xmethod): Remove.
12319 (free_xmethod_worker): Remove.
12320 (free_xmethod_worker_vec): Remove.
12321 * extension.h (enum ext_lang_rc): Move here from
12323 (struct xmethod_worker): Add constructor and destructor.
12326 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12327 virtual pure methods.
12328 <get_arg_types, get_result_type>: New methods.
12329 (xmethod_worker_ptr): Remove typedef.
12330 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12331 (xmethod_worker_vec): Remove typedef.
12332 (xmethod_worker_up): New typedef.
12333 (invoke_xmethod): Remove.
12334 (clone_xmethod_worker): Remove.
12335 (free_xmethod_worker): Remove.
12336 (free_xmethod_worker_vec): Remove.
12337 (get_xmethod_arg_types): Remove.
12338 (get_xmethod_result_type): Remove.
12339 * valops.c (find_method_list): Use std::vector, don't use
12340 intermediate vector.
12341 (value_find_oload_method_list): Use std::vector.
12342 (find_overload_match): Use std::vector.
12343 (find_oload_champ): Use std::vector.
12344 * value.c (value_free): Use operator delete.
12345 (value_of_xmethod): Rename to...
12346 (value_from_xmethod): ... this. Don't assign
12347 xmethod_worker::value, take rvalue-reference.
12348 (result_type_of_xmethod): Adjust.
12349 (call_xmethod): Adjust.
12350 * value.h: Include extension.h.
12351 (struct xmethod_worker): Don't forward-declare.
12352 (value_of_xmethod): Rename to...
12353 (value_from_xmethod): ... this, take rvalue-reference.
12354 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12355 (struct python_xmethod_worker): ... this, add constructor and
12357 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12358 (gdbpy_free_xmethod_worker_data): Rename to...
12359 (python_xmethod_worker::~python_xmethod_worker): ... this and
12361 (gdbpy_clone_xmethod_worker_data): Rename to...
12362 (python_xmethod_worker::clone): ... this and adjust.
12363 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12365 (gdbpy_get_xmethod_arg_types): Rename to...
12366 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12367 (gdbpy_get_xmethod_result_type): Rename to...
12368 (python_xmethod_worker::do_get_result_type): ... this and
12370 (gdbpy_invoke_xmethod): Rename to...
12371 (python_xmethod_worker::invoke): ... this and adjust.
12372 (new_python_xmethod_worker): Rename to...
12373 (python_xmethod_worker::python_xmethod_worker): ... this and
12375 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12377 (gdbpy_free_xmethod_worker_data): Remove.
12378 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12379 (gdbpy_get_xmethod_arg_types): Remove.
12380 (gdbpy_get_xmethod_result_type): Remove.
12381 (gdbpy_invoke_xmethod): Remove.
12382 * python/python.c (python_extension_ops): Remove obsolete
12385 2018-01-05 Pedro Alves <palves@redhat.com>
12388 * common/signals-state-save-restore.c
12389 (save_original_signals_state): New parameter 'quiet'. Warn if we
12390 find a custom handler preinstalled, instead of internal erroring.
12391 But only warn if !quiet.
12392 * common/signals-state-save-restore.h
12393 (save_original_signals_state): New parameter 'quiet'.
12394 * main.c (captured_main_1): Move save_original_signals_state call
12395 after option handling, and pass QUIET.
12397 2018-01-05 Pedro Alves <palves@redhat.com>
12399 * spu-tdep.c (spu_catch_start): Pass
12400 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12402 2018-01-05 Pedro Alves <palves@redhat.com>
12405 * ada-lang.c (literal_symbol_name_matcher): New function.
12406 (ada_get_symbol_name_matcher): Use it for
12407 symbol_name_match_type::SEARCH_NAME.
12408 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12409 it down instead of assuming symbol_name_match_type::FULL.
12410 * block.h (block_lookup_symbol): New parameter 'match_type'.
12411 * c-valprint.c (print_unpacked_pointer): Use
12412 lookup_symbol_search_name instead of lookup_symbol.
12413 * compile/compile-object-load.c (get_out_value_type): Pass down
12414 symbol_name_match_type::SEARCH_NAME.
12415 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12416 symbol_name_match_type::FULL.
12417 * cp-support.c (cp_get_symbol_name_matcher): Handle
12418 symbol_name_match_type::SEARCH_NAME.
12419 * infrun.c (insert_exception_resume_breakpoint): Use
12420 lookup_symbol_search_name.
12421 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12422 * psymtab.c (maintenance_check_psymtabs): Use
12423 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12424 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12425 SYMBOL_SEARCH_NAME.
12426 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12427 if symbol_name_match_type::SEARCH_NAME.
12428 (lookup_symbol_in_language): Pass down
12429 symbol_name_match_type::FULL.
12430 (lookup_symbol_search_name): New.
12431 (lookup_language_this): Pass down
12432 symbol_name_match_type::SEARCH_NAME.
12433 (lookup_symbol_aux, lookup_local_symbol): New parameter
12434 'match_type'. Pass it down.
12435 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12436 (lookup_symbol_search_name): New declaration.
12437 (lookup_symbol_in_block): New 'match_type' parameter.
12439 2018-01-05 Pedro Alves <palves@redhat.com>
12442 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12444 (ada_lookup_symbol): Reimplement in terms of
12445 ada_lookup_symbol_list, bits factored out from
12446 ada_lookup_encoded_symbol.
12448 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12450 * ada-exp.y (write_object_renaming): When subscripting an array
12451 using a symbol as the index, pass the block in call to
12452 ada_lookup_encoded_symbol when looking that symbol up.
12454 2018-01-05 Jerome Guitton <guitton@adacore.com>
12456 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12459 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12461 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12462 the case where VALUE_LVAL (val0) is not lval_memory.
12464 2018-01-05 Xavier Roirand <roirand@adacore.com>
12466 * ada-valprint.c (print_optional_low_bound): Handle
12467 character-indexed array printing like boolean-indexed array
12470 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12472 * NEWS: Create a new section for the next release branch.
12473 Rename the section of the current branch, now that it has
12476 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12478 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12479 * version.in: Bump version to 8.1.50.DATE-git.
12481 2018-01-03 Xavier Roirand <roirand@adacore.com>
12483 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12485 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12487 (default_exception_support_info) <catch_handlers_sym>: Add field.
12488 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12489 (ada_exception_name_addr_1): Add "catch handlers" handling.
12490 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12491 Update all callers.
12492 (create_excep_cond_exprs) <ex>: Add parameter.
12493 (re_set_exception): Update create_excep_cond_exprs call.
12494 (print_it_exception, print_one_exception, print_mention_exception)
12495 (print_recreate_exception): Add "catch handler" handling.
12496 (allocate_location_catch_handlers, re_set_catch_handlers)
12497 (check_status_catch_handlers, print_it_catch_handlers)
12498 (print_one_catch_handlers, print_mention_catch_handlers)
12499 (print_recreate_catch_handlers): New function.
12500 (catch_handlers_breakpoint_ops): New variable.
12501 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12502 Add parameter. Add "catch handler" handling.
12503 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12504 Add "catch handler" handling.
12505 (ada_exception_catchpoint_cond_string): Add "catch handler"
12507 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12509 (catch_ada_handlers_command): New function.
12510 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12511 operations structure.
12512 (_initialize_ada_language): Add "catch handlers" command entry.
12513 * NEWS: Document "catch handlers" feature.
12515 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12517 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12518 account when creating the array type of the slice.
12519 (ada_value_slice): Likewise.
12521 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12523 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12525 (create_array_type_with_stride): Add byte_stride_prop parameter.
12526 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12527 New parameter. Update all callers in this file.
12528 (array_type_has_dynamic_stride): New function.
12529 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12530 of arrays with dynamic byte strides.
12531 * dwarf2read.c (read_array_type): Add support for dynamic
12532 DW_AT_byte_stride attributes.
12534 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12536 * dwarf2read.c (read_unspecified_type): Treat
12537 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12539 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12541 Update copyright year range in all GDB files.
12543 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12545 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12546 and gdb/testsuite/gdb.base/step-line.c.
12548 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12550 * copyright.py (main): Dump the contents of
12551 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12552 even if BY_HAND is empty.
12554 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12556 * top.c (print_gdb_version): Update Copyright year in version
12559 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12561 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12563 For older changes see ChangeLog-2017.
12569 version-control: never