Change `function_symbols' to std::vector
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
7243d011
KS
12018-08-29 Keith Seitz <keiths@redhat.com>
2
3 * linespec.c (struct linespec) <function_symbols>: Change type to
4 std::vector. Update all users.
5 (struct collect_info) <function_symbols>: Likewise.
6 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
7 (std_compare_symbols): New function.
8 (find_method, find_function_symbols, find_linespec_symbols)
9 (find_label_symbols_in_block): Change `symbols' parameter to
10 std::vector. Update all callers.
11 (find_label_symbols): Likewise for `function_symbols' and
12 `label_funcs_ret'.
13
2a908241
KS
142018-08-29 Keith Seitz <keiths@redhat.com>
15
16 * linespec.c (symtab_vector_up): Define.
17 (struct linespec) <file_symtabs>: Change type to std::vector *.
18 Update all uses.
19 (struct collect_info) <file_symtabs>: Likewise.
20 (collect_symtabs_from_filename): Return symtab_vector_up.
21 Update all callers.
22 (decode_objc): Remove cleanup.
23 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
24 (symtab_collector::release_symtabs): Return symtab_vector_up.
25 Update all callers.
26 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
27 Update all users.
28 (collect_symtabs_from_filename, symtabs_from_filename): Return
29 symtab_vector_up. Update all callers.
30
f6c4e3e8
TT
312018-08-29 Tom Tromey <tom@tromey.com>
32
33 * csky-tdep.c (csky_analyze_prologue): Use
34 core_addr_to_string_nz.
35
73c13fe6
TT
362018-08-29 Tom Tromey <tom@tromey.com>
37
38 * windows-nat.c (struct xlate_exception) <them>: Change type to
39 DWORD.
40 (xlate): Fix formatting. Remove last entry.
41 (struct xlate_exception, xlate): Comment out.
42 (windows_nat_target::resume): Use ranged for.
43
4d3928d7
JW
442018-08-29 Jim Wilson <jimw@sifive.com>
45
46 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
47 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
48 of NT_PRFPREG.
49 (riscv_linux_nat_target::store_registers): Likewise.
50
7a6dbc2f
SDJ
512018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
52
53 PR gdb/23555
54 PR gdb/23558
55 * gnulib/aclocal.m4: Regenerate.
56 * gnulib/config.in: Regenerate.
57 * gnulib/configure: Regenerate.
58 * gnulib/import/Makefile.am: Update.
59 * gnulib/import/Makefile.in: Update.
60 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
61 * gnulib/import/_Noreturn.h: ... this.
62 * gnulib/import/alloca.in.h: Update.
63 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
64 * gnulib/import/arg-nonnull.h: ... this.
65 * gnulib/import/assure.h: Update.
66 * gnulib/import/at-func.c: Update.
67 * gnulib/import/basename-lgpl.c: Update.
68 * gnulib/import/extra/snippet/c++defs.h: Rename to...
69 * gnulib/import/c++defs.h: ... this.
70 * gnulib/import/canonicalize-lgpl.c: Update.
71 * gnulib/import/cdefs.h: Update.
72 * gnulib/import/chdir-long.c: Update.
73 * gnulib/import/chdir-long.h: Update.
74 * gnulib/import/cloexec.c: Update.
75 * gnulib/import/cloexec.h: Update.
76 * gnulib/import/close.c: Update.
77 * gnulib/import/closedir.c: Update.
78 * gnulib/import/config.charset: Update.
79 * gnulib/import/dirent-private.h: Update.
80 * gnulib/import/dirent.in.h: Update.
81 * gnulib/import/dirfd.c: Update.
82 * gnulib/import/dirname-lgpl.c: Update.
83 * gnulib/import/dirname.h: Update.
84 * gnulib/import/dosname.h: Update.
85 * gnulib/import/dup-safer-flag.c: Update.
86 * gnulib/import/dup-safer.c: Update.
87 * gnulib/import/dup.c: Update.
88 * gnulib/import/dup2.c: Update.
89 * gnulib/import/errno.in.h: Update.
90 * gnulib/import/error.c: Update.
91 * gnulib/import/error.h: Update.
92 * gnulib/import/exitfail.c: Update.
93 * gnulib/import/exitfail.h: Update.
94 * gnulib/import/extra/update-copyright: Update.
95 * gnulib/import/fchdir.c: Update.
96 * gnulib/import/fcntl.c: Update.
97 * gnulib/import/fcntl.in.h: Update.
98 * gnulib/import/fd-hook.c: Update.
99 * gnulib/import/fd-hook.h: Update.
100 * gnulib/import/fd-safer-flag.c: Update.
101 * gnulib/import/fd-safer.c: Update.
102 * gnulib/import/fdopendir.c: Update.
103 * gnulib/import/filename.h: Update.
104 * gnulib/import/filenamecat-lgpl.c: Update.
105 * gnulib/import/filenamecat.h: Update.
106 * gnulib/import/flexmember.h: Update.
107 * gnulib/import/float+.h: Update.
108 * gnulib/import/float.c: Update.
109 * gnulib/import/float.in.h: Update.
110 * gnulib/import/fnmatch.c: Update.
111 * gnulib/import/fnmatch.in.h: Update.
112 * gnulib/import/fnmatch_loop.c: Update.
113 * gnulib/import/fpucw.h: Update.
114 * gnulib/import/frexp.c: Update.
115 * gnulib/import/frexpl.c: Update.
116 * gnulib/import/fstat.c: Update.
117 * gnulib/import/fstatat.c: Update.
118 * gnulib/import/getcwd-lgpl.c: Update.
119 * gnulib/import/getcwd.c: Update.
120 * gnulib/import/getdtablesize.c: Update.
121 * gnulib/import/getlogin_r.c: Update.
122 * gnulib/import/getprogname.c: Update.
123 * gnulib/import/getprogname.h: Update.
124 * gnulib/import/gettext.h: Update.
125 * gnulib/import/gettimeofday.c: Update.
126 * gnulib/import/glob-libc.h: Update.
127 * gnulib/import/glob.c: Update.
128 * gnulib/import/glob.in.h: Update.
129 * gnulib/import/glob_internal.h: Update.
130 * gnulib/import/glob_pattern_p.c: Update.
131 * gnulib/import/globfree.c: Update.
132 * gnulib/import/hard-locale.c: Update.
133 * gnulib/import/hard-locale.h: Update.
134 * gnulib/import/intprops.h: Update.
135 * gnulib/import/inttypes.in.h: Update.
136 * gnulib/import/isnan.c: Update.
137 * gnulib/import/isnand-nolibm.h: Update.
138 * gnulib/import/isnand.c: Update.
139 * gnulib/import/isnanl-nolibm.h: Update.
140 * gnulib/import/isnanl.c: Update.
141 * gnulib/import/itold.c: Update.
142 * gnulib/import/libc-config.h: Update.
143 * gnulib/import/limits.in.h: Update.
144 * gnulib/import/localcharset.c: Update.
145 * gnulib/import/localcharset.h: Update.
146 * gnulib/import/localtime-buffer.c: Update.
147 * gnulib/import/localtime-buffer.h: Update.
148 * gnulib/import/lstat.c: Update.
149 * gnulib/import/m4/00gnulib.m4: Update.
150 * gnulib/import/m4/__inline.m4: Update.
151 * gnulib/import/m4/absolute-header.m4: Update.
152 * gnulib/import/m4/alloca.m4: Update.
153 * gnulib/import/m4/builtin-expect.m4: Update.
154 * gnulib/import/m4/canonicalize.m4: Update.
155 * gnulib/import/m4/chdir-long.m4: Update.
156 * gnulib/import/m4/close.m4: Update.
157 * gnulib/import/m4/closedir.m4: Update.
158 * gnulib/import/m4/configmake.m4: Update.
159 * gnulib/import/m4/d-ino.m4: Update.
160 * gnulib/import/m4/d-type.m4: Update.
161 * gnulib/import/m4/dirent_h.m4: Update.
162 * gnulib/import/m4/dirfd.m4: Update.
163 * gnulib/import/m4/dirname.m4: Update.
164 * gnulib/import/m4/double-slash-root.m4: Update.
165 * gnulib/import/m4/dup.m4: Update.
166 * gnulib/import/m4/dup2.m4: Update.
167 * gnulib/import/m4/eealloc.m4: Update.
168 * gnulib/import/m4/environ.m4: Update.
169 * gnulib/import/m4/errno_h.m4: Update.
170 * gnulib/import/m4/error.m4: Update.
171 * gnulib/import/m4/exponentd.m4: Update.
172 * gnulib/import/m4/exponentl.m4: Update.
173 * gnulib/import/m4/extensions.m4: Update.
174 * gnulib/import/m4/extern-inline.m4: Update.
175 * gnulib/import/m4/fchdir.m4: Update.
176 * gnulib/import/m4/fcntl-o.m4: Update.
177 * gnulib/import/m4/fcntl.m4: Update.
178 * gnulib/import/m4/fcntl_h.m4: Update.
179 * gnulib/import/m4/fdopendir.m4: Update.
180 * gnulib/import/m4/filenamecat.m4: Update.
181 * gnulib/import/m4/flexmember.m4: Update.
182 * gnulib/import/m4/float_h.m4: Update.
183 * gnulib/import/m4/fnmatch.m4: Update.
184 * gnulib/import/m4/fnmatch_h.m4: Update.
185 * gnulib/import/m4/fpieee.m4: Update.
186 * gnulib/import/m4/frexp.m4: Update.
187 * gnulib/import/m4/frexpl.m4: Update.
188 * gnulib/import/m4/fstat.m4: Update.
189 * gnulib/import/m4/fstatat.m4: Update.
190 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
191 * gnulib/import/m4/getcwd-path-max.m4: Update.
192 * gnulib/import/m4/getcwd.m4: Update.
193 * gnulib/import/m4/getdtablesize.m4: Update.
194 * gnulib/import/m4/getlogin.m4: Update.
195 * gnulib/import/m4/getlogin_r.m4: Update.
196 * gnulib/import/m4/getpagesize.m4: Update.
197 * gnulib/import/m4/getprogname.m4: Update.
198 * gnulib/import/m4/gettimeofday.m4: Update.
199 * gnulib/import/m4/glibc21.m4: Update.
200 * gnulib/import/m4/glob.m4: Update.
201 * gnulib/import/m4/glob_h.m4: Update.
202 * gnulib/import/m4/gnulib-cache.m4: Update.
203 * gnulib/import/m4/gnulib-common.m4: Update.
204 * gnulib/import/m4/gnulib-comp.m4: Update.
205 * gnulib/import/m4/gnulib-tool.m4: Update.
206 * gnulib/import/m4/hard-locale.m4: Update.
207 * gnulib/import/m4/include_next.m4: Update.
208 * gnulib/import/m4/inttypes-pri.m4: Update.
209 * gnulib/import/m4/inttypes.m4: Update.
210 * gnulib/import/m4/isnand.m4: Update.
211 * gnulib/import/m4/isnanl.m4: Update.
212 * gnulib/import/m4/largefile.m4: Update.
213 * gnulib/import/m4/limits-h.m4: Update.
214 * gnulib/import/m4/localcharset.m4: Update.
215 * gnulib/import/m4/locale-fr.m4: Update.
216 * gnulib/import/m4/locale-ja.m4: Update.
217 * gnulib/import/m4/locale-zh.m4: Update.
218 * gnulib/import/m4/localtime-buffer.m4: Update.
219 * gnulib/import/m4/longlong.m4: Update.
220 * gnulib/import/m4/lstat.m4: Update.
221 * gnulib/import/m4/malloc.m4: Update.
222 * gnulib/import/m4/malloca.m4: Update.
223 * gnulib/import/m4/math_h.m4: Update.
224 * gnulib/import/m4/mbrtowc.m4: Update.
225 * gnulib/import/m4/mbsinit.m4: Update.
226 * gnulib/import/m4/mbsrtowcs.m4: Update.
227 * gnulib/import/m4/mbstate_t.m4: Update.
228 * gnulib/import/m4/memchr.m4: Update.
229 * gnulib/import/m4/memmem.m4: Update.
230 * gnulib/import/m4/mempcpy.m4: Update.
231 * gnulib/import/m4/memrchr.m4: Update.
232 * gnulib/import/m4/mkdir.m4: Update.
233 * gnulib/import/m4/mkstemp.m4: Update.
234 * gnulib/import/m4/mmap-anon.m4: Update.
235 * gnulib/import/m4/mode_t.m4: Update.
236 * gnulib/import/m4/msvc-inval.m4: Update.
237 * gnulib/import/m4/msvc-nothrow.m4: Update.
238 * gnulib/import/m4/multiarch.m4: Update.
239 * gnulib/import/m4/nocrash.m4: Update.
240 * gnulib/import/m4/off_t.m4: Update.
241 * gnulib/import/m4/onceonly.m4: Update.
242 * gnulib/import/m4/open-cloexec.m4: Update.
243 * gnulib/import/m4/open.m4: Update.
244 * gnulib/import/m4/openat.m4: Update.
245 * gnulib/import/m4/opendir.m4: Update.
246 * gnulib/import/m4/pathmax.m4: Update.
247 * gnulib/import/m4/rawmemchr.m4: Update.
248 * gnulib/import/m4/readdir.m4: Update.
249 * gnulib/import/m4/readlink.m4: Update.
250 * gnulib/import/m4/realloc.m4: Update.
251 * gnulib/import/m4/rename.m4: Update.
252 * gnulib/import/m4/rewinddir.m4: Update.
253 * gnulib/import/m4/rmdir.m4: Update.
254 * gnulib/import/m4/save-cwd.m4: Update.
255 * gnulib/import/m4/secure_getenv.m4: Update.
256 * gnulib/import/m4/setenv.m4: Update.
257 * gnulib/import/m4/signal_h.m4: Update.
258 * gnulib/import/m4/ssize_t.m4: Update.
259 * gnulib/import/m4/stat-time.m4: Update.
260 * gnulib/import/m4/stat.m4: Update.
261 * gnulib/import/m4/std-gnu11.m4: Update.
262 * gnulib/import/m4/stdbool.m4: Update.
263 * gnulib/import/m4/stddef_h.m4: Update.
264 * gnulib/import/m4/stdint.m4: Update.
265 * gnulib/import/m4/stdio_h.m4: Update.
266 * gnulib/import/m4/stdlib_h.m4: Update.
267 * gnulib/import/m4/strchrnul.m4: Update.
268 * gnulib/import/m4/strdup.m4: Update.
269 * gnulib/import/m4/strerror.m4: Update.
270 * gnulib/import/m4/string_h.m4: Update.
271 * gnulib/import/m4/strstr.m4: Update.
272 * gnulib/import/m4/strtok_r.m4: Update.
273 * gnulib/import/m4/sys_socket_h.m4: Update.
274 * gnulib/import/m4/sys_stat_h.m4: Update.
275 * gnulib/import/m4/sys_time_h.m4: Update.
276 * gnulib/import/m4/sys_types_h.m4: Update.
277 * gnulib/import/m4/tempname.m4: Update.
278 * gnulib/import/m4/time_h.m4: Update.
279 * gnulib/import/m4/unistd-safer.m4: Update.
280 * gnulib/import/m4/unistd_h.m4: Update.
281 * gnulib/import/m4/warn-on-use.m4: Update.
282 * gnulib/import/m4/wchar_h.m4: Update.
283 * gnulib/import/m4/wchar_t.m4: Update.
284 * gnulib/import/m4/wctype_h.m4: Update.
285 * gnulib/import/m4/wint_t.m4: Update.
286 * gnulib/import/malloc.c: Update.
287 * gnulib/import/malloc/scratch_buffer.h: Update.
288 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
289 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
290 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
291 * gnulib/import/malloca.c: Update.
292 * gnulib/import/malloca.h: Update.
293 * gnulib/import/malloca.valgrind: Update.
294 * gnulib/import/math.in.h: Update.
295 * gnulib/import/mbrtowc.c: Update.
296 * gnulib/import/mbsinit.c: Update.
297 * gnulib/import/mbsrtowcs-impl.h: Update.
298 * gnulib/import/mbsrtowcs-state.c: Update.
299 * gnulib/import/mbsrtowcs.c: Update.
300 * gnulib/import/memchr.c: Update.
301 * gnulib/import/memmem.c: Update.
302 * gnulib/import/mempcpy.c: Update.
303 * gnulib/import/memrchr.c: Update.
304 * gnulib/import/mkdir.c: Update.
305 * gnulib/import/mkstemp.c: Update.
306 * gnulib/import/msvc-inval.c: Update.
307 * gnulib/import/msvc-inval.h: Update.
308 * gnulib/import/msvc-nothrow.c: Update.
309 * gnulib/import/msvc-nothrow.h: Update.
310 * gnulib/import/open.c: Update.
311 * gnulib/import/openat-die.c: Update.
312 * gnulib/import/openat-priv.h: Update.
313 * gnulib/import/openat-proc.c: Update.
314 * gnulib/import/openat.c: Update.
315 * gnulib/import/openat.h: Update.
316 * gnulib/import/opendir.c: Update.
317 * gnulib/import/pathmax.h: Update.
318 * gnulib/import/pipe-safer.c: Update.
319 * gnulib/import/rawmemchr.c: Update.
320 * gnulib/import/readdir.c: Update.
321 * gnulib/import/readlink.c: Update.
322 * gnulib/import/realloc.c: Update.
323 * gnulib/import/ref-add.sin: Update.
324 * gnulib/import/ref-del.sin: Update.
325 * gnulib/import/rename.c: Update.
326 * gnulib/import/rewinddir.c: Update.
327 * gnulib/import/rmdir.c: Update.
328 * gnulib/import/same-inode.h: Update.
329 * gnulib/import/save-cwd.c: Update.
330 * gnulib/import/save-cwd.h: Update.
331 * gnulib/import/scratch_buffer.h: Update.
332 * gnulib/import/secure_getenv.c: Update.
333 * gnulib/import/setenv.c: Update.
334 * gnulib/import/signal.in.h: Update.
335 * gnulib/import/stat-time.c: Update.
336 * gnulib/import/stat-time.h: Update.
337 * gnulib/import/stat-w32.c: Update.
338 * gnulib/import/stat-w32.h: Update.
339 * gnulib/import/stat.c: Update.
340 * gnulib/import/stdbool.in.h: Update.
341 * gnulib/import/stddef.in.h: Update.
342 * gnulib/import/stdint.in.h: Update.
343 * gnulib/import/stdio.in.h: Update.
344 * gnulib/import/stdlib.in.h: Update.
345 * gnulib/import/str-two-way.h: Update.
346 * gnulib/import/strchrnul.c: Update.
347 * gnulib/import/strdup.c: Update.
348 * gnulib/import/streq.h: Update.
349 * gnulib/import/strerror-override.c: Update.
350 * gnulib/import/strerror-override.h: Update.
351 * gnulib/import/strerror.c: Update.
352 * gnulib/import/string.in.h: Update.
353 * gnulib/import/stripslash.c: Update.
354 * gnulib/import/strnlen1.c: Update.
355 * gnulib/import/strnlen1.h: Update.
356 * gnulib/import/strstr.c: Update.
357 * gnulib/import/strtok_r.c: Update.
358 * gnulib/import/sys_stat.in.h: Update.
359 * gnulib/import/sys_time.in.h: Update.
360 * gnulib/import/sys_types.in.h: Update.
361 * gnulib/import/tempname.c: Update.
362 * gnulib/import/tempname.h: Update.
363 * gnulib/import/time.in.h: Update.
364 * gnulib/import/unistd--.h: Update.
365 * gnulib/import/unistd-safer.h: Update.
366 * gnulib/import/unistd.in.h: Update.
367 * gnulib/import/unsetenv.c: Update.
368 * gnulib/import/verify.h: Update.
369 * gnulib/import/extra/snippet/warn-on-use.h: Update.
370 * gnulib/import/wchar.in.h: Update.
371 * gnulib/import/wctype.in.h: Update.
372 * gnulib/import/xalloc-oversized.h: Update.
373 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
374 "53e2c179f26a890fa6685af4b6c1397ee370433b".
375
b0f492b9
GB
3762018-08-16 Gary Benson <gbenson@redhat.com>
377
378 PR gdb/13000:
379 * gdb/main.c (captured_main_1): Exit with nonzero status
380 in batch mode if the last command to be executed failed.
381 * NEWS: Mention the above.
382
2362e7f7
SM
3832018-08-29 Simon Marchi <simon.marchi@ericsson.com>
384
385 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
386 end of warning message.
387
4f4aedeb
AH
3882018-08-29 Alan Hayward <alan.hayward@arm.com>
389
390 PR gdb/22943:
391 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
392 (aarch64_extract_return_value): Use
393 aapcs_is_vfp_call_or_return_candidate.
394 (aarch64_return_in_memory): Likewise.
395 (aarch64_store_return_value): Likewise.
396
0e745c60
AH
3972018-08-29 Alan Hayward <alan.hayward@arm.com>
398
399 * aarch64-tdep.c
400 (aapcs_is_vfp_call_or_return_candidate): Make static
401 (pass_in_v_or_stack): Remove function.
402 (pass_in_v_vfp_candidate): New function.
403 (aarch64_push_dummy_call): Check for float register candidates.
404
ea92689a
AH
4052018-08-29 Alan Hayward <alan.hayward@arm.com>
406
407 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
408 (aapcs_is_vfp_call_or_return_candidate_1): New function.
409 (aapcs_is_vfp_call_or_return_candidate): Likewise.
410
ad202fcc
SM
4112018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
412
413 PR build/23399
414 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
415 (struct ipa_sym_addresses): Rename to...
416 (struct ipa_sym_addresses_common): ... this.
417 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
418
5fe3f3e4
TT
4192018-08-28 Tom Tromey <tom@tromey.com>
420
421 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
422 (token_fifo): Now a std::vector.
423 (yylex, c_parse): Update.
424 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
425 (token_fifo): Now a std::vector.
426 (yylex, d_parse): Update.
427 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
428 (token_fifo): Now a std::vector.
429 (yylex, go_parse): Update.
430
858d8004
SM
4312018-08-28 Simon Marchi <simon.marchi@ericsson.com>
432
433 * parser-defs.h (struct type_stack) <elements>: Change type to
434 std::vector<union type_stack_elt>.
435 <depth, size>: Remove.
436 * parse.c (parse_exp_in_context_1): Adjust.
437 (type_stack_reserve): Remove.
438 (check_type_stack_depth): Remove.
439 (insert_into_type_stack): Adjust to std::vector.
440 (insert_type): Likewise.
441 (push_type): Likewise.
442 (push_type_int): Likewise.
443 (insert_type_address_space): Likewise.
444 (pop_type): Likewise.
445 (pop_type_int): Likewise.
446 (pop_typelist): Likewise.
447 (pop_type_stack): Likewise.
448 (append_type_stack): Likewise.
449 (push_type_stack): Likewise.
450 (get_type_stack): Likewise.
451 (type_stack_cleanup): Likewise.
452 (push_typelist): Likewise.
453 (follow_types): Likewise.
454 (_initialize_parse): Likewise.
455
416a69af
HAQ
4562018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
457
458 * NEWS: Mention csky target.
459
9d24df82
HAQ
4602018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
461 Hafiz Abid Qadeer <abidh@codesourcery.com>
462 Don Breazeal <donb@codesourcery.com>
463
464 * csky-linux-tdep.c: New file.
465 * csky-tdep.c: Likewise.
466 * csky-tdep.h: Likewise.
467 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
468 csky-tdep.o.
469 (HFILES_NO_SRCDIR): Add csky-tdep.h.
470 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
471 * configure.tgt: Add csky support.
472
3bf9c013
JV
4732018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
474
475 * python/py-framefilter.c (py_print_frame): Print frame architecture
476 when printing on an MI output.
477
d3d8724a
TT
4782018-08-27 Tom Tromey <tom@tromey.com>
479
480 PR build/23087:
481 * configure: Rebuild.
482 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
483
1885053b
TT
4842018-08-27 Tom Tromey <tom@tromey.com>
485
486 * aarch64-linux-tdep.c
487 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
488 casts to int.
489
8406672e
TT
4902018-08-27 Tom Tromey <tom@tromey.com>
491
492 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
493 unsigned.
494 (ppc64_standard_linkage1, ppc64_standard_linkage2)
495 (ppc64_standard_linkage3, ppc64_standard_linkage4)
496 (ppc64_standard_linkage5, ppc64_standard_linkage6)
497 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
498 unsigned.
499
ec40cf90
TT
5002018-08-27 Tom Tromey <tom@tromey.com>
501
502 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
503 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
504
7bc02706
TT
5052018-08-27 Tom Tromey <tom@tromey.com>
506
507 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
508 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
509 ULONGEST_MAX.
510 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
511 ULONGEST_MAX.
512 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
513 ULONGEST_MAX.
514 * sparc-linux-tdep.c (sparc32_linux_sigframe)
515 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
516 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
517 ULONGEST_MAX.
518 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
519 (ppc64_linux_sigaction_tramp_frame)
520 (ppc32_linux_sighandler_tramp_frame)
521 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
522 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
523 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
524 * mn10300-linux-tdep.c (am33_linux_sigframe)
525 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
526 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
527 * mips-linux-tdep.c (mips_linux_o32_sigframe)
528 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
529 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
530 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
531 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
532 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
533 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
534 * microblaze-linux-tdep.c
535 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
536 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
537 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
538 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
539 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
540 * common/common-types.h (ULONGEST_MAX): New define.
541 (CORE_ADDR_MAX): Fix formatting.
542 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
543 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
544 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
545 (arm_linux_rt_sigreturn_tramp_frame)
546 (arm_eabi_linux_sigreturn_tramp_frame)
547 (arm_eabi_linux_rt_sigreturn_tramp_frame)
548 (thumb2_eabi_linux_sigreturn_tramp_frame)
549 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
550 (arm_linux_restart_syscall_tramp_frame)
551 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
552 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
553 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
554 ULONGEST_MAX.
555 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
556
70ab8ccd
TT
5572018-08-27 Tom Tromey <tom@tromey.com>
558
559 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
560 CORE_ADDR_MAX.
561 * mips-tdep.c (mips_deal_with_atomic_sequence)
562 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
563 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
564 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
565 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
566 CORE_ADDR_MAX.
567 * aarch64-tdep.c (aarch64_software_single_step): Use
568 CORE_ADDR_MAX.
569
896a7aa6
TT
5702018-08-27 Tom Tromey <tom@tromey.com>
571
572 * linespec.c (complete_linespec_component): Add cast to "char".
573 * completer.c (completion_tracker::build_completion_result): Add
574 cast to "char".
575
dd33d41d
SM
5762018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * solist.h (struct solist, struct target_so_ops): Fix
579 indentation.
580
c645cda4
SM
5812018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * ada-tasks.c (ada_task_info_s): Remove typedef.
584 (DEF_VEC_O(ada_task_info_s)): Remove.
585 (struct ada_tasks_inferior_data): Initialize fields.
586 <task_list>: Make an std::vector.
587 (get_ada_tasks_inferior_data): Allocate with new.
588 (ada_get_task_number): Adjust.
589 (get_task_number_from_id): Likewise.
590 (valid_task_id): Likewise.
591 (ada_get_task_info_from_ptid): Likewise.
592 (iterate_over_live_ada_tasks): Likewise.
593 (add_ada_task): Likewise.
594 (read_known_tasks): Likewise.
595 (ada_build_task_list): Likewise.
596 (print_ada_task_info): Likewise.
597 (info_task): Likewise.
598 (task_command_1): Likewise.
599
39e7af3e
SM
6002018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
601
602 * ada-lang.c (add_angle_brackets): Return std::string.
603
bbbbbcee
SM
6042018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
605
606 * python/py-threadevent.c (py_get_event_thread): Initialize
607 pythread.
608
d98fc15b
PA
6092018-08-24 Pedro Alves <palves@redhat.com>
610
611 * python/py-bpevent.c (create_breakpoint_event_object): Use
612 copy-initialization.
613 * python/py-continueevent.c (emit_continue_event): Use
614 copy-initialization.
615 * python/py-exitedevent.c (create_exited_event_object): Return a
616 gdbpy_ref<>.
617 (emit_exited_event): Use copy-initialization.
618 * python/py-inferior.c (python_new_inferior)
619 (python_inferior_deleted, add_thread_object): Use
620 copy-initialization.
621 * python/py-infevents.c (create_inferior_call_event_object)
622 (create_register_changed_event_object)
623 (create_memory_changed_event_object): Return a gdbpy_ref<>.
624 (emit_inferior_call_event, emit_memory_changed_event)
625 (emit_register_changed_event): Use copy-initialization.
626 * python/py-newobjfileevent.c (create_new_objfile_event_object):
627 Return a gdbpy_ref<>.
628 (emit_new_objfile_event): Use copy-initialization.
629 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
630 (emit_clear_objfiles_event): Use copy-initialization.
631 * python/py-signalevent.c (create_signal_event_object): Use
632 copy-initialization.
633 * python/py-threadevent.c (create_thread_event_object): Use
634 copy-initialization.
635
da3c8738
PA
6362018-08-24 Pedro Alves <palves@redhat.com>
637 Simon Marchi <simon.marchi@ericsson.com>
638
639 PR gdb/23379
640 * python/py-continueevent.c: Include "gdbthread.h".
641 (create_continue_event_object): Add intro comment. Add 'ptid'
642 parameter. Use it to find thread to pass to
643 create_thread_event_object.
644 (emit_continue_event): Pass PTID down to
645 create_continue_event_object.
646 * python/py-event.h (py_get_event_thread): Declare.
647 (create_thread_event_object): Remove default from 'thread'
648 parameter.
649 * python/py-stopevent.c (create_stop_event_object): Use
650 py_get_event_thread.
651 * python/py-threadevent.c (get_event_thread): Rename to ...
652 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
653 and use it to find the thread.
654 (create_thread_event_object): Assert that THREAD isn't null.
655 Don't find the event thread here.
656
26457a9c
KB
6572018-08-23 Kevin Buettner <kevinb@redhat.com>
658
659 * block.h (blockrange, blockranges): New struct declarations.
660 (struct block): Add new field named `ranges'.
661 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
662 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
663 macros for accessing ranges in struct block.
664 (make_blockranges): New declaration.
665 block.c (make_blockranges): New function.
2d5f09ec
KB
666 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
667 for block.
fc811edd
KB
668 * symtab.h (find_pc_partial_function): Add new parameter `block'.
669 * blockframe.c (cache_pc_function_block): New static global.
670 (clear_pc_function_cache): Clear cache_pc_function_block.
671 (find_pc_partial_function): Move comment to symtab.h. Add
672 support for non-contiguous blocks.
e9480230
KB
673 * cli/cli-cmds.c (block.h): Include.
674 (print_disassembly): Handle printing of non-contiguous blocks.
675 (disassemble_current_function): Likewise.
676 (disassemble_command): Likewise.
26457a9c 677
2b1ffcfd
KB
678 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
679 BLOCK_START.
680 * blockframe.c (get_pc_function_start): Likewise.
681 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
682 (gcc_symbol_address): Likewise.
683 * compile/compile-object-run.c (compile_object_run): Likewise.
684 * compile/compile.c (get_expr_block_and_pc): Likewise.
685 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
686 (func_addr_to_tail_call_list): Likewise.
687 * findvar.c (default_read_var_value): Likewise.
688 * inline-frame.c (inline_frame_this_id): Likewise.
689 (skip-inline_frames): Likewise.
690 * infcmd.c (until_next_command): Likewise.
691 * linespec.c (convert_linespec_to_sals): Likewise.
692 * parse.c (parse_exp_in_context_1): Likewise.
693 * printcmd.c (build_address_symbolic): likewise.
694 (info_address_command): Likewise.
695 symtab.c (find_function_start_sal): Likewise.
696 (skip_prologue_sal): Likewise.
697 (find_function_alias_target): Likewise.
698 (find_gnu_ifunc): Likewise.
699 * stack.c (find_frame_funname): Likewise.
700 * symtab.c (fixup_symbol_section): Likewise.
701 (find_function_start_sal): Likewise.
702 (skip_prologue_sal): Likewsie.
703 (find_function_alias_target): Likewise.
704 (find_gnu_ifunc): Likewise.
705 * tracepoint.c (info_scope_command): Likewise.
706 * value.c (value_fn_field): Likewise.
707
9644dc3a
KB
708 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
709 in place of find_pc_partial_function.
710 * blockframe.c (find_function_entry_range_from_pc): New function.
711 * symtab.h (find_function_entry_range_from_pc): Declare and document.
712 * objfiles.c (objfile_relocate1): Relocate start and end addresses
713 for each range in a block.
714
715
12a0d0f6
XR
7162018-08-23 Xavier Roirand <roirand@adacore.com>
717
718 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
719 incrementation.
720
d1012b8e
SM
7212018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
722
723 * solib-svr4.c (read_program_headers_from_bfd): Return
724 gdb::optional<gdb::byte_vector>.
725 (svr4_exec_displacement): Adjust.
726
17658d46
SM
7272018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
728
729 * solib-svr4.c (read_program_header): Return
730 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
731 (find_program_interpreter): Return
732 gdb::optional<gdb::byte_vector>.
733 (scan_dyntag_auxv): Adjust.
734 (enable_break): Adjust.
735 (svr4_exec_displacement): Adjust.
736
ae739fe7
SM
7372018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
740 * inf-child.c (inf_child_target::terminal_save_inferior): New.
741
467dc1e2
SM
7422018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * guile/scm-string.c (gdbscm_scm_from_printf): Use
745 string_vprintf.
746 * guile/scm-utils.c (gdbscm_printf): Likewise.
747 * serial.c (serial_printf): Likewise.
748 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
749
6d52907e
JV
7502018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
751
752 * stack.c (print_frame): Print frame architecture when printing on
753 an MI output.
754 * NEWS: Mention new "arch" attribute in frame output.
755
9758a8f8
AH
7562018-08-21 Alan Hayward <alan.hayward@arm.com>
757
758 * arch/aarch64.h (aarch64_regnum): Update comment.
759
1461bdac
AH
7602018-08-21 Alan Hayward <alan.hayward@arm.com>
761
762 * NEWS: Add SVE to 8.2 section.
763
4895f384
PA
7642018-08-21 Pedro Alves <palves@redhat.com>
765
766 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
767 out from gdbscm_parse_function_args.
768 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
769 gdbscm_parse_function_args_1.
770
a4497d2f
SM
7712018-08-21 Simon Marchi <simon.marchi@ericsson.com>
772
773 PR gdb/17816
774 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
775 operator.
776
c44deb73
SM
7772018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
778
779 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
780
be2d111a
MS
7812018-08-19 Michael Spang <spang@google.com>
782
783 PR gdb/11786
784 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
785 for PT_TLS segments.
786
a6b786da
KB
7872018-08-18 Kevin Buettner <kevinb@redhat.com>
788
789 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
790 dwarf_variable_value.
791 * dwarf2-frame.c (class dwarf_expr_executor):
792 Add override for dwarf_variable_value.
793 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
794 (class symbol_needs_eval_context): Likewise.
795 (indirect_synthetic_pointer): Add forward declaration.
796 (sect_variable_value): New function.
797 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
798 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
799 for DW_OP_GNU_variable_value.
800
89fbedf3
TT
8012018-08-16 Tom Tromey <tom@tromey.com>
802
803 * top.c (read_command_file): Update.
804 (command_line_input): Remove "repeat" argument.
805 * ada-lang.c (get_selections): Update.
806 * linespec.c (decode_line_2): Update.
807 * defs.h (command_line_input): Remove argument.
808 * cli/cli-script.c (read_next_line): Update.
809 * python/py-gdb-readline.c: Update.
810
12582533
TT
8112018-08-17 Tom Tromey <tom@tromey.com>
812
813 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
814 command_line_input.
815
49514353
TT
8162018-08-15 Tom Tromey <tom@tromey.com>
817
818 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
819
26fb3983
JV
8202018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
821
822 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
823 If used, use find_pc_partial_function to find address range
824 to disassemble.
825 * mi/mi-main.c (mi_cmd_list_features): Report
826 "data-disassemble-a-option" feature.
827 * NEWS: Mention new -data-disassemble option -a.
828
a97b53dd
TT
8292018-08-13 Tom Tromey <tom@tromey.com>
830
831 * common/common-defs.h (_FORTIFY_SOURCE): Define.
832
0c76e06d
AH
8332018-08-13 Alan Hayward <alan.hayward@arm.com>
834
835 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
836 (aarch64_linux_collect_sve_regset): Likewise.
837 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
838 * regcache.h (regcache_map_entry_size): New function.
839
b7fd65b9
AH
8402018-08-13 Alan Hayward <alan.hayward@arm.com>
841
842 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
843 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
844 (SVE_HEADER_VL_LENGTH): Likewise.
845 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
846 (SVE_HEADER_FLAGS_LENGTH): Likewise.
847 (SVE_HEADER_RESERVED_LENGTH): Likewise.
848 (SVE_HEADER_SIZE_OFFSET): Likewise.
849 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
850 (SVE_HEADER_VL_OFFSET): Likewise.
851 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
852 (SVE_HEADER_FLAGS_OFFSET): Likewise.
853 (SVE_HEADER_RESERVED_OFFSET): Likewise.
854 (SVE_HEADER_SIZE): Likewise.
855 (aarch64_linux_core_read_vq): Add function.
856 (aarch64_linux_core_read_description): Check for SVE section.
857
a616bb94
AH
8582018-08-13 Alan Hayward <alan.hayward@arm.com>
859
860 * aarch64-fbsd-tdep.c
861 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
862 collect_size.
863 * aarch64-linux-tdep.c
864 (aarch64_linux_iterate_over_regset_sections): Likewise.
865 * alpha-linux-tdep.c
866 (alpha_linux_iterate_over_regset_sections):
867 * alpha-nbsd-tdep.c
868 (alphanbsd_iterate_over_regset_sections): Likewise.
869 * amd64-fbsd-tdep.c
870 (amd64fbsd_iterate_over_regset_sections): Likewise.
871 * amd64-linux-tdep.c
872 (amd64_linux_iterate_over_regset_sections): Likewise.
873 * arm-bsd-tdep.c
874 (armbsd_iterate_over_regset_sections): Likewise.
875 * arm-fbsd-tdep.c
876 (arm_fbsd_iterate_over_regset_sections): Likewise.
877 * arm-linux-tdep.c
878 (arm_linux_iterate_over_regset_sections): Likewise.
879 * corelow.c (get_core_registers_cb): Likewise.
880 (core_target::fetch_registers): Likewise.
881 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
882 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
883 * gdbarch.h (void): Regenerate.
884 * gdbarch.sh: Add supply_size and collect_size.
885 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
886 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
887 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
888 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
889 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
890 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
891 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
892 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
893 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
894 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
895 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
896 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
897 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
898 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
899 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
900 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
901 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
902 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
903 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
904 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
905 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
906 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
907 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
908 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
909 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
910 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
911 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
912 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
913 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
914 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
915
a9925d4f
SM
9162018-08-10 Simon Marchi <simon.marchi@ericsson.com>
917
918 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
919 with string_printf.
920
ad3a68e9
KS
9212018-08-10 Keith Seitz <keiths@redhat.com>
922
923 * compile/compile-c-support.c (add_code_header, add_code_footer):
924 Move into policy class.
925 (c_push_user_expression, pop_user_expression_nop)
926 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
927 (compile_program): New host class.
928 (c_compile_program): New typedef.
929 (c_compute_porgram): Use c_compile_program.
930
0cfbf430
KS
9312018-08-10 Keith Seitz <keiths@redhat.com>
932
933 * compile/compile-internal.h (compile_instance::~compile_instance):
934 Remove calls to htab_delete.
935 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
936 * compile.c (compile_instance::compile_instance): Initialize
937 htab unique pointers.
938 (compile_instance::get_cached_type, compile_instance::insert_type)
939 (compile_instance::error_symbol_once): Update for unique_ptr.
940
946d3d10
KS
9412018-08-10 Keith Seitz <keiths@redhat.com>
942
943 * compile/compile-c-symbols.c (struct symbol_error)
944 (hash_symbol_error, eq_symbol_error, del_symbol_error)
945 (compile_instance::insert_symbol_error)
946 (compile_instance::error_symbol_once): Move to ...
947 * compile/compile.c: ... here.
948
9cdfd9a2
KS
9492018-08-10 Keith Seitz <keiths@redhat.com>
950
951 * compile/compile-c-support.c (c_get_compile_context): Use `new'
952 instead of `new_compile_instance'.
953 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
954 Update description.
955 If the symbol error map is not initialized, create it.
956 (generate_c_for_for_one_symbol): Do not check/initialize
957 the symbol error map.
958 * compile/compile-c-types.c (compile_c_instance): Make a class.
959 Update all callers.
960 (compile_instance::compile_instance): Initialize the type cache.
961 (get_cached_type): New function.
962 (insert_type): Update description.
963 (compile_c_instance::m_default_cflags): Define.
964 (convert_type): Update description. Use get_cached_type.
965 (delete_instance): Moved to destructor.
966 (new_compile_instance): Moved to constructor.
967 * compile/compile-c.h (compile_c_instance): Make class inheriting
968 from compile_instance.
969 <base>: Remove field.
970 <type_map, symbol_err_map>: Move to base class.
971 <c_plugin>: Rename to `m_plugin' and remove pointer type.
972 * compile/compile-internal.h (compile_instance): Make class.
973 <type_map_t, symbol_err_map_t>: Define.
974 <fe>: Rename to `m_gcc_fe'.
975 <scope, block, gcc_target_options>: Add `m_' prefix.
976 <m_type_map, m_symbol_err_map>: New fields, moved from
977 compile_c_instance.
978 <destroy>: Remove.
979 (convert_type, new_compile_instance): Remove.
980 * compile/compile.c (cleanup_compile_instance): Remove.
981 (compile_to_object): Use unique_ptr to eliminate cleanups.
982 (compile_instance::set_print_callback, compile_instance::version)
983 (compile_instance::set_verbose)
984 (compile_instance::set_driver_filename)
985 (compile_instance::set_triplet_regexp)
986 (compile_instance::set_arguments)
987 (compile_instance::set_source_file)
988 (compile_instance::compile): Define.
989
18cdc6d8
KS
9902018-08-10 Keith Seitz <keiths@redhat.com>
991
992 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
993 * compile/compile-c-types.c: Define GCC_METHODN macros and include
994 gcc-c-fe.def to define C plugin.
995 (delete_instance): Delete `c_plugin'.
996 (new_compile_instance): Initialize `c_plugin'.
997 * compile/compile-c.h: Include gcc_c_plugin.h.
998 (struct compile_c_instance) <c_plugin>: New member.
999 * gcc-c-plugin.h: New file.
1000 Update all callers with API change.
1001
b7dc48b4
KS
10022018-08-10 Keith Seitz <keiths@redhat.com>
1003
1004 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1005 (HFILES_NO_SRCDIR): ... to here.
1006 Add compile-internal.h and compile-c.h.
1007 * compile/compile-c-support.c: Include compile-c.h.
1008 * compile/compile-c-symbols.c: Include compile-c.h.
1009 (generate_c_for_variable_locations): Update comment.
1010 * compile/compile-c-types.c: Include compile-c.h.
1011 * compile/compile-c.h: New file -- moved C language declarations
1012 from other files here.
1013 * compile/compile-internal.h: Do not include hashtab.h or
1014 common/enum-flags.h.
1015 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1016 (gcc_convert_symbol, gcc_symbol_address)
1017 (generate_c_for_variable_locations, c_get_mode_for_size)
1018 (c_get_range_decl_name): Definitions moved to compile-c.h.
1019 * compile/compile-loc2c.c: Include compile-c.h.
1020
6f36b6d2
KS
10212018-08-10 Keith Seitz <keiths@redhat.com>
1022
1023 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1024 (c_symbol_substitution_name): ... this.
1025 Update all callers.
1026
bd923e51
KS
10272018-08-10 Keith Seitz <keiths@redhat.com>
1028
1029 * compile/compile-c-support.c (c_compute_program): Use
1030 unique_xmalloc_ptr to eliminate cleanup.
1031 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1032 Return a unique_xmalloc_ptr and eliminate cleanup.
1033 * compile/compile-internal.h (generate_c_for_variable_locations):
1034 Return unique_xmalloc_ptr and update description.
1035
dbd534fe
AH
10362018-08-10 Alan Hayward <alan.hayward@arm.com>
1037
1038 * corelow.c (core_target::get_core_register_section): Rename
1039 min_size to section_min_size.
1040
90ad3654
JW
10412018-08-09 Jim Wilson <jimw@sifive.com>
1042
52a187f8
JW
1043 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1044 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1045 * NEWS: Mention new GNU/Linux RISC-V target.
1046 * configure.host: Add riscv*-*-linux*.
1047 * configure.nat: Add riscv*.
1048 * configure.tgt: Add riscv*-*-linux*.
3c77f97e 1049 * riscv-linux-nat.c: New file.
90ad3654
JW
1050 * riscv-linux-tdep.c: New file.
1051
aff4e175
AB
10522018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1053
1054 * infrun.c (resume): Make static, add forward declaration.
1055 (proceed): Update header comment.
1056 * infrun.h (resume): Delete declaration.
1057
06ab9219
TT
10582018-08-09 Tom Tromey <tom@tromey.com>
1059
1060 * riscv-tdep.h: Minor formatting fixes.
1061
83c8d318
SM
10622018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1063
1064 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1065 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1066 (test_mkdir_recursive): Likewise.
1067 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1068
5ff2bbae
AB
10692018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1070
1071 * valarith.c (value_subscripted_rvalue): If an array is not in
1072 memory, and we don't know the upper bound, then we can't know that
1073 the requested element exists or not.
1074
fdbac7d8
SM
10752018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1076
1077 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1078 (target_options_to_string): Add comment.
1079
83202f7a
TT
10802018-08-08 Tom Tromey <tom@tromey.com>
1081
1082 * unittests/scoped_mmap-selftests.c: Check result of "write".
1083
411baa47
JW
10842018-08-08 Jim Wilson <jimw@sifive.com>
1085
5c720ed8
JW
1086 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1087 (decode_register_index_short): New.
1088 (decode_j_type_insn, decode_cj_type_insn): New.
1089 (decode_b_type_insn, decode_cb_type_insn): New.
1090 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1091 local xlen. Check xlen when decoding ambiguous compressed insns. In
1092 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1093 is_c_sw_insn instead of is_sw_insn.
1094 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1095 (riscv_software_single_step): New.
1096 * riscv-tdep.h (riscv_software_single_step): Declare.
1097
411baa47
JW
1098 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1099 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1100
9d4a934c
AB
11012018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1102
1103 PR gdb/18050:
1104 * target.c (dispose_inferior): Don't dispose of inferiors that are
1105 already killed.
1106
ff36536c
SN
11072018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1108
1109 * remote.c (remote_target::download_tracepoint): Change char* to
1110 const char*.
1111
09ce46f2
SM
11122018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1113
1114 * target.h (target_options_to_string): Return an std::string.
1115 * target.c (str_comma_list_concat_elem): Return void, use
1116 std::string.
1117 (do_option): Likewise.
1118 (target_options_to_string): Return an std::string.
1119 * linux-nat.c (linux_nat_target::wait): Adjust.
1120 * target-debug.h (target_debug_print_options): Adjust.
1121
9c612964
TT
11222018-08-07 Tom Tromey <tom@tromey.com>
1123
1124 * Makefile.in (CPPFLAGS): New variable.
1125 (INTERNAL_CPPFLAGS): Use it.
1126
7d11235d
SM
11272018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1128
1129 * NEWS: Mention the index cache.
1130
87d6a7aa
SM
11312018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1132
1133 * common/pathstuff.h (get_standard_cache_dir): New.
1134 * common/pathstuff.c (get_standard_cache_dir): New.
1135 * build-id.h (build_id_to_string): New.
1136 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1137 DEBUG_STR_SUFFIX): Move to here.
1138 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1139 DEBUG_STR_SUFFIX): Move from there.
1140 (write_psymtabs_to_index): Make non-static, add basename
1141 parameter. Write to temporary files, rename when done.
1142 (save_gdb_index_command): Adjust call to
1143 write_psymtabs_to_index.
1144 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1145 field.
1146 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1147 (get_gdb_index_contents_from_cache): New.
1148 (get_gdb_index_contents_from_cache_dwz): New.
1149 (dwarf2_initialize_objfile): Read index from cache.
1150 (dwarf2_build_psymtabs): Save to index.
1151 * dwarf-index-cache.h: New file.
1152 * dwarf-index-cache.c: New file.
1153 * dwarf-index-write.h: New file.
1154
8a99096f
SM
11552018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * gnulib/aclocal.m4: Re-generate.
1158 * gnulib/config.in: Re-generate.
1159 * gnulib/configure: Re-generate.
1160 * gnulib/import/Makefile.am: Re-generate.
1161 * gnulib/import/Makefile.in: Re-generate.
1162 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1163 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1164 * gnulib/import/m4/mkdir.m4: New file.
1165 * gnulib/import/mkdir.c: New file.
1166 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1167 module.
1168
5c831bb1
SM
11692018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1170
1171 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1172 * common/scoped_mmap.c: New file.
1173 * common/scoped_mmap.h (destroy): New method.
1174 (~scoped_mmap, reset): Use destroy.
1175 (scoped_mmap): New move constructor.
1176 (mmap_file): New declaration.
1177 * unittests/scoped_mmap-selftests.c (test_normal,
1178 test_invalid_filename, run_tests): New functions.
1179 (_initialize_scoped_mmap_selftests): Register selftest.
1180
4485a1c1
SM
11812018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1184 (read_gdb_index_from_buffer): ... this. Remove section
1185 parameter, add buffer parameter.
1186 (get_gdb_index_contents_ftype,
1187 get_gdb_index_contents_dwz_ftype): New typedefs.
1188 (dwarf2_read_gdb_index): Add callback parameters to get the
1189 index contents.
1190 (get_gdb_index_contents_from_section): New.
1191 (dwarf2_initialize_objfile): Update call to
1192 dwarf2_read_gdb_index.
1193
528e1572
SM
11942018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1197 (gdb_open_cloexec): Likewise.
1198 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1199 (commandline_from_pid): Likewise.
1200 (linux_xfer_osdata_threads): Likewise.
1201 (linux_xfer_osdata_fds): Likewise.
1202 * ada-lang.c (is_package_name): Likewise.
1203 * auxv.c (procfs_xfer_auxv): Likewise.
1204 * breakpoint.c (print_one_breakpoint_location): Use
1205 uiout::field_fmt.
1206 (print_one_catch_solib): Use string_printf.
1207 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1208 (add_pe_forwarded_sym): Likewise.
1209 * dwarf2read.c (create_type_unit_group): Likewise.
1210 (build_error_marker_type): Likewise.
1211 * infcall.c (get_function_name): Likewise.
1212 * valprint.c (print_converted_chars_to_obstack): Likewise.
1213 * xtensa-tdep.c (xtensa_register_type): Likewise.
1214
a7f25a84
SM
12152018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1216
1217 * remote.c (remote_target::download_tracepoint): Fix format
1218 string errors.
1219
296956be
PFC
12202018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1221
1222 * tracefile.c: Include common/byte-vector.h.
1223 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1224 with trace_regblock_size if needed. Update uses of buf.
1225
a04b9d62
PFC
12262018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1227
1228 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1229 std::vector<unsigned char>.
1230 * tracepoint.c (collection_list::collection_list): Remove
1231 m_regs_mask initializer from initializer list. Resize
1232 m_regs_mask using the largest remote register number.
1233 (collection_list::add_remote_register): Remove size check on
1234 m_regs_mask. Use at to access element.
1235 (collection_list::stringify): Change type of temp_buf to
1236 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1237 stringify the register mask. Use pack_hex_byte for the register
1238 mask.
1239
4277c4b8
PFC
12402018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1241
1242 * tracepoint.h (class collection_list) <add_register>: Remove.
1243 <add_remote_register, add_ax_registers, add_local_register>:
1244 Declare.
1245 <add_memrange>: Add scope parameter.
1246 * tracepoint.c (encode_actions_1): Likewise.
1247 (collection_list::add_register): Rename to ...
1248 (collection_list::add_remote_register): ... this. Update
1249 comment.
1250 (collection_list::add_ax_registers, add_local_register): New
1251 methods.
1252 (collection_list::add_memrange): Add scope parameter. Call
1253 add_local_register instead of add_register.
1254 (finalize_tracepoint_aexpr): New function.
1255 (collection_list::collect_symbol): Update calls to add_memrange.
1256 Call add_local_register instead of add_register. Call
1257 add_ax_registers. Call finalize_tracepoint_aexpr.
1258 (encode_actions_1): Get remote regnos for $reg action. Call
1259 add_remote_register, add_ax_registers, and add_local_register.
1260 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1261 (validate_actionline): Call finalize_tracepoint_aexpr.
1262
3df3a985
PFC
12632018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1264
1265 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1266 Replace array buf with gdb::char_vector buf, of size
1267 get_remote_packet_size (). Replace references to buf and
1268 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1269 and xsnprintf with snprintf. Raise errors if the buffer is too
1270 small.
1271
aa6f3694
PFC
12722018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1273
1274 * remote.c (remote_target::download_tracepoint): Fix the has_more
1275 predicate in the QTDP action list iteration.
1276
05abfc39
PFC
12772018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1278
1279 * remote.c (remote_target::download_tracepoint): Fix indentation
1280 in for block.
1281
821a2682
RO
12822018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1283
1284 * proc-api.c (_initialize_proc_api): Remove c, unused.
1285 * procfs.c (procfs_init_inferior): Remove signals, unused.
1286 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1287 unused.
1288
95347337
AB
12892018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1290 Andrew Burgess <andrew.burgess@embecosm.com>
1291
1292 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1293 'W_STOPCODE (0)' as this could be ambiguous.
1294
425699f5
SDJ
12952018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1296
1297 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1298 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1299 "ai_socktype").
1300
3e1d3d8c
TT
13012018-08-02 Tom Tromey <tom@tromey.com>
1302
1303 PR symtab/16842.
1304 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1305 symbols.
1306 (process_structure_scope): Likewise.
1307
15843549
XR
13082018-08-02 Xavier Roirand <roirand@adacore.com>
1309
1310 PR gdb/22629:
1311 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1312 kill inferior.
1313
b5bddbbb
TT
13142018-08-02 Tom Tromey <tom@tromey.com>
1315
1316 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1317 (darwin_suspend_inferior, darwin_resume_inferior)
1318 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1319 (darwin_check_new_threads): Check result of get_darwin_inferior.
1320
f61cfa07
JB
13212018-07-31 Joel Brobecker <brobecker@adacore.com>
1322
1323 GDB 8.1.1 released.
1324
5abe0f0c
JV
13252018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1326
1327 * varobj.c (varobj_get_path_expr_parent): Report an error if
1328 parent is a dynamic varobj.
1329
472fa5ee
SM
13302018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1331
1332 * gnulib/aclocal.m4: Re-generate.
1333 * gnulib/config.in: Re-generate.
1334 * gnulib/configure: Re-generate.
1335 * gnulib/import/Makefile.in: Re-generate.
1336 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1337 * gnulib/import/m4/onceonly.m4: Re-generate.
1338
1c28969e
SM
13392018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * target-descriptions.c (struct xml_test_tdesc): New.
1342 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1343 (record_xml_tdesc): Update.
1344 (maintenance_check_xml_descriptions): Update.
1345 * target-descriptions.h (record_xml_tdesc): Update comment.
1346
c8f2dc0d
AB
13472018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1348
1349 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1350 checking array bounds are defined.
1351
463c08d1
TT
13522018-07-30 Tom Tromey <tom@tromey.com>
1353
1354 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1355 irreflexivity violation.
1356
dba7455e
TT
13572018-07-30 Tom Tromey <tom@tromey.com>
1358
1359 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1360 * value.c (unpack_long): Remove lint code.
1361 * valops.c (value_ind): Remove lint code.
1362 * valarith.c (value_x_binop, value_x_unop, value_equal)
1363 (value_pos): Remove lint code.
1364
37cc0cae
TV
13652018-07-28 Tom de Vries <tdevries@suse.de>
1366
1367 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1368 with undefined upper bound as <optimized out>.
1369
129eb0f1
SDJ
13702018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1371
1372 * gcore.in: Rename variable "name" to "prefix". Expand
1373 "usage" text.
1374
6af79d7b
JT
13752018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1376
1377 * windows-nat.c (windows_nat_target::create_inferior): Update to
1378 call close() in global namespace.
1379
79748972
TT
13802018-07-26 Tom Tromey <tom@tromey.com>
1381
1382 * dwarf-index-write.c (add_address_entry): Don't add objfile
1383 offsets.
1384 * dbxread.c (find_stab_function): Rename from
1385 find_stab_function_addr. Return a bound_minimal_symbol.
1386 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1387 Don't add objfile offsets.
1388 (end_psymtab): Use raw_text_low, raw_text_high,
1389 MSYMBOL_VALUE_RAW_ADDRESS.
1390 (read_ofile_symtab): Update.
1391 (process_one_symbol): Update.
1392 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1393 offsets.
1394 (dw2_relocate): Remove.
1395 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1396 searching addrmap.
1397 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1398 Update.
1399 (process_psymtab_comp_unit_reader, add_partial_symbol)
1400 (add_partial_subprogram, dwarf2_ranges_read): Update.
1401 (load_partial_dies): Update.
1402 (add_address_entry): Don't add objfile offsets.
1403 (dwarf2_build_include_psymtabs): Update.
1404 (create_addrmap_from_aranges): Don't add objfile offsets.
1405 (dw2_find_pc_sect_compunit_symtab): Update.
1406 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1407 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1408 Update.
1409 (parse_partial_symbols): Don't add objfile offsets. Use
1410 raw_text_low, raw_text_high. Update.
1411 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1412 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1413 or call 'relocate' quick function. Clear psymbol_map.
1414 * psympriv.h (struct partial_symbol) <address>: Add section
1415 offset.
1416 <set_unrelocated_address>: Rename from set_address.
1417 <raw_text_low, raw_text_high>: New methods.
1418 <text_low, text_high>: Add objfile parameter.
1419 (add_psymbol_to_bcache): Add 'section' parameter. Call
1420 set_unrelocated_address.
1421 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1422 (find_pc_psymbol): Update.
1423 (fixup_psymbol_section, relocate_psymtabs): Remove.
1424 (dump_psymtab, psym_functions): Update.
1425 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1426 parameter.
1427 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1428 (start_psymtab_common): Update.
1429 * symfile-debug.c (debug_qf_relocate): Remove.
1430 (debug_sym_quick_functions): Update.
1431 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1432 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1433 Update.
1434
52948f01
TT
14352018-07-26 Tom Tromey <tromey@redhat.com>
1436
1437 * dbxread.c (end_psymtab): Use text_high_valid and
1438 text_low_valid.
1439 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1440 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1441 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1442 Update comment.
1443 <text_low_valid, text_high_valid>: New fields.
1444 <set_text_low, set_text_high>: Update.
1445 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1446
4ae976d1
TT
14472018-07-26 Tom Tromey <tom@tromey.com>
1448
1449 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1450 Update.
1451 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1452 textlow and texthigh fields.
1453 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1454 Update.
1455 * mdebugread.c (parse_lines, parse_partial_symbols)
1456 (psymtab_to_symtab_1): Update.
1457 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1458 Rename fields. Update comment. Now private.
1459 <text_low, text_high, set_text_low, set_text_high>: New methods.
1460 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1461 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1462 (start_psymtab_common, maintenance_info_psymtabs)
1463 (maintenance_check_psymtabs): Update.
1464 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1465 texthigh fields.
1466 (scan_xcoff_symtab): Update.
1467
02e9e7f7
TT
14682018-07-26 Tom Tromey <tromey@redhat.com>
1469
1470 * psympriv.h (struct partial_symbol) <unrelocated_address,
1471 address, set_address>: New methods.
1472 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1473 (fixup_psymbol_section, relocate_psymtabs): Update.
1474 (print_partial_symbols): Add 'objfile' parameter. Update.
1475 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1476 Update.
1477
8a6d4234
TT
14782018-07-26 Tom Tromey <tom@tromey.com>
1479
1480 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1481 (debug_names::write_psymbols): Update.
1482 * psympriv.h (struct partial_symbol): Derive from
1483 general_symbol_info.
1484 <obj_section>: New method.
1485 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1486 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1487 (find_pc_sect_psymbol, fixup_psymbol_section)
1488 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1489 (print_partial_symbols, recursively_search_psymtabs)
1490 (compare_psymbols, psymbol_hash, psymbol_compare)
1491 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1492 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1493
08994e1d
TT
14942018-07-26 Tom Tromey <tromey@redhat.com>
1495
1496 * dbxread.c (end_psymtab): Remove dead code.
1497
3c3bb058
AB
14982018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1499
1500 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1501 DWARF unwinders are disabled.
1502 * dwarf2-frame.c: Add dwarf2read.h include.
1503 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1504 disabled.
1505 (dwarf2_frame_unwinders_enabled_p): Define.
1506 (show_dwarf_unwinders_enabled_p): New function.
1507 (_initialize_dwarf2_frame): Register switch to control DWARF
1508 unwinder use.
1509 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1510 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1511 (show_dwarf_cmdlist): Remove static keyword.
1512 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1513 (show_dwarf_cmdlist): Declare.
1514 * NEWS: Document new feature.
1515
9e7f3bbb
TV
15162018-07-26 Tom de Vries <tdevries@suse.de>
1517
1518 PR breakpoints/23366
1519 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1520
506f5c41
TV
15212018-07-26 Tom de Vries <tdevries@suse.de>
1522
1523 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1524 DW_AT_count can't be translated to a dynamic prop.
1525
16f808ec
TV
15262018-07-25 Tom de Vries <tdevries@suse.de>
1527
1528 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1529 try/catch.
1530
d7154a8d
JV
15312018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1532
1533 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1534
a45389f6
JB
15352018-07-25 Joel Brobecker <brobecker@adacore.com>
1536
1537 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1538
380618d6
KS
15392018-07-24 Keith Seitz <keiths@redhat.comt
1540
1541 PR symtab/23010
1542 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1543 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1544 instead of add_symbol_to_list.
1545 (read_file_scope): Call prepare_one_comp_unit before reading
1546 any other DIEs.
1547
4b17aefe
SM
15482018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1549
1550 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1551
29d17e47
TT
15522018-07-24 Tom Tromey <tom@tromey.com>
1553
1554 * utils.c (malloc, realloc, free): Don't declare.
1555 * configure, config.in: Rebuild.
1556 * configure.ac: Don't check for declarations of free, malloc, or
1557 realloc.
1558
cf4088a9
SM
15592018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1560
1561 * aarch64-linux-nat.c
1562 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1563 variable.
1564 * arm-linux-nat.c (fetch_regs): Likewise.
1565 (store_regs): Likewise.
1566 (fetch_vfp_regs): Likewise.
1567 (store_vfp_regs): Likewise.
1568 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1569 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1570 (arm_linux_nat_target::insert_watchpoint): Likewise.
1571 (arm_linux_nat_target::remove_watchpoint): Likewise.
1572 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1573 Likewise.
1574 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1575 Likewise.
1576 * ppc-linux-nat.c (fetch_register): Likewise.
1577 (fetch_all_gp_regs): Likewise.
1578 (fetch_ppc_registers): Likewise.
1579 (store_all_gp_regs): Likewise.
1580 (store_ppc_registers): Likewise.
1581 (hwdebug_insert_point): Likewise.
1582 (can_use_watchpoint_cond_accel): Likewise.
1583 * remote-sim.c (gdb_os_write_stdout): Likewise.
1584
a0de763e
TT
15852018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1586 Tom Tromey <tom@tromey.com>
1587
1588 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1589 test for it.
1590 * configure: Rebuild.
1591
3b20124b
TT
15922018-07-22 Tom Tromey <tom@tromey.com>
1593
1594 * regformats/regdat.sh: Define xmltarget_${name} inside
1595 #ifndef IN_PROCESS_AGENT.
1596
8c8807f4
TT
15972018-07-22 Tom Tromey <tom@tromey.com>
1598
1599 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1600
c486b610
TT
16012018-07-22 Tom Tromey <tom@tromey.com>
1602
1603 * symfile.c (reread_symbols): Notify iter, not objfile.
1604
494f80a9
TT
16052018-07-22 Tom Tromey <tom@tromey.com>
1606
1607 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1608 Use arch_ops.
1609 (ravenscar_thread_target::prepare_to_store): Likewise.
1610
c51f6a54
TT
16112018-07-22 Tom Tromey <tom@tromey.com>
1612
1613 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1614 unused variable. Call value_fetch_lazy when needed.
1615 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1616 Remove unused variable. Call value_fetch_lazy when needed.
1617
374fd1fd
TT
16182018-07-22 Tom Tromey <tom@tromey.com>
1619
1620 * m32c-tdep.c (mark_dma): Return void.
1621 (make_regs): Remove unused declarations.
1622
d5e9a511
TT
16232018-07-22 Tom Tromey <tom@tromey.com>
1624
1625 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1626 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1627 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1628 bkscm_get_valid_block_smob_arg_unsafe for effect.
1629
996d693a
TT
16302018-07-22 Tom Tromey <tom@tromey.com>
1631
1632 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1633 value_type.
1634
15766370
TT
16352018-07-22 Tom Tromey <tom@tromey.com>
1636
1637 * windows-nat.c (saved_context): Conditionally define.
1638 * remote.c (remote_target::remote_btrace_maybe_reopen):
1639 Conditionally declare "warned".
1640 * inflow.c (sigquit_ours): Conditionally define.
1641 (new_tty): Move "tty" declaration inside #if.
1642 * guile/guile.c (guile_datadir): Conditionally define.
1643 * charset.c (set_be_le_names): Move some declarations inside #if.
1644 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1645 #if.
1646 (parse_xml_btrace_conf): Likewise.
1647
f4e80e13
TT
16482018-07-22 Tom Tromey <tom@tromey.com>
1649
1650 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1651
8d49165d
TT
16522018-07-22 Tom Tromey <tom@tromey.com>
1653
1654 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1655 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1656 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1657 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1658 * stack.c (frame_apply_level_command): Remove unused variable.
1659 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1660 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1661 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1662 unused variable.
1663 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1664 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1665 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1666 variable.
1667 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1668 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1669 variable.
1670 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1671 Remove unused variable.
1672 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1673 variable.
1674 * common/tdesc.c (print_xml_feature::visit): Remove unused
1675 variable.
1676 * compile/compile-object-load.c (store_regs): Remove unused
1677 variables.
1678 * complaints.c (clear_complaints): Remove unused variable.
1679 * corelow.c (core_target_open): Remove unused variable.
1680 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1681 variable.
1682 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1683 variable.
1684 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1685 variable.
1686 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1687 variable.
1688 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1689 variable.
1690 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1691 variable.
1692 * ia64-tdep.c (examine_prologue): Remove unused variable.
1693 * infcall.c (run_inferior_call): Remove unused variable.
1694 * inferior.c (exit_inferior): Remove unused variable.
1695 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1696 * linespec.c (decode_line_2): Remove unused variable.
1697 * linux-nat.c (super_close): Remove.
1698 * linux-tdep.c (linux_info_proc): Remove unused variable.
1699 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1700 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1701 Remove unused variable.
1702 * parse.c (find_minsym_type_and_address): Remove unused variable.
1703 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1704 variable.
1705 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1706 variable.
1707 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1708 variables.
1709 * record-btrace.c (record_btrace_target::store_registers): Remove
1710 unused variable.
1711 (cmd_show_record_btrace_cpu): Remove unused variable.
1712 * riscv-tdep.c (riscv_register_reggroup_p)
1713 (riscv_push_dummy_call, riscv_return_value): Remove unused
1714 variable.
1715 * rust-exp.y (literal): Remove unused variable.
1716 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1717 unused variable.
1718 <STRUCTOP_ANONYMOUS>: Likewise.
1719 * s390-linux-tdep.c (s390_linux_init_abi_31)
1720 (s390_linux_init_abi_64): Remove unused variable.
1721 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1722 (file_select_thread, net_windows_open, _initialize_ser_windows):
1723 Remove unused variables.
1724 * symtab.c (find_pc_sect_line): Remove unused variable.
1725 * target-memory.c (compute_garbled_blocks): Remove unused
1726 variable.
1727 (target_write_memory_blocks): Remove unused variable.
1728 * target.c (target_stack::unpush): Remove unused variables.
1729 * tracepoint.c (start_tracing, all_tracepoint_actions)
1730 (merge_uploaded_trace_state_variables)
1731 (print_one_static_tracepoint_marker): Remove unused variable.
1732 * unittests/basic_string_view/element_access/char/1.cc (test01):
1733 Remove unused variable.
1734 * windows-nat.c (windows_continue, windows_add_all_dlls)
1735 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1736 Remove unused variables.
1737
17cbafdb
SM
17382018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1739
1740 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1741 attr_profile in HAVE_ELF.
1742 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1743 HAVE_ELF.
1744
0ee6c332
SM
17452018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1746
1747 * frame.c (frame_register_unwind): Change parameter name.
1748 (frame_unwind_register): Likewise.
1749 (frame_unwind_register_value): Likewise.
1750 (frame_unwind_register_signed): Likewise.
1751 (frame_unwind_register_unsigned): Likewise.
1752 * frame.h (frame_register_unwind): Likewise.
1753 (frame_unwind_register): Likewise.
1754 (frame_unwind_register_value): Likewise.
1755 (frame_unwind_register_signed): Likewise.
1756 (frame_unwind_register_unsigned): Likewise.
1757 (frame_unwind_arch): Likewise.
1758
e2e31f10
MR
17592018-07-20 Maciej W. Rozycki <macro@mips.com>
1760
1761 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1762 ISA maintenance.
1763
2d389915
MR
17642018-07-20 Maciej W. Rozycki <macro@mips.com>
1765
1766 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1767 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1768 hand.
1769
cbb09508
KS
17702018-07-20 Keith Seitz <keiths@redhat.com>
1771
1772 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1773 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1774 m_compunit_symtab, m_language>: Add "m_" prefix.
1775 Update all uses.
1776 * buildsym.c: Update all uses.
1777
bfe2e011
TT
17782018-07-20 Tom Tromey <tom@tromey.com>
1779
1780 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1781 * buildsym.h (record_line_ftype): Remove typedef.
1782
0e6f3061
TT
17832018-07-20 Tom Tromey <tom@tromey.com>
1784
1785 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1786 (end_expandable_symtab): Likewise.
1787 (end_symtab_get_static_block): Likewise.
1788 (end_symtab_from_static_block): Likewise.
1789 * buildsym-legacy.c (augment_type_symtab): Remove.
1790 (end_expandable_symtab): Remove.
1791 (end_symtab_get_static_block): Remove.
1792 (end_symtab_from_static_block): Remove.
1793
804d2729
TT
17942018-07-20 Tom Tromey <tom@tromey.com>
1795
1796 * dwarf2read.c: Include buildsym.h.
1797 (struct dwarf2_cu) <builder>: New method.
1798 (fixup_go_packaging): Update.
1799 (process_full_comp_unit, process_full_type_unit): Update. Don't
1800 use scoped_free_pendings.
1801 (using_directives): Add "cu" parameter, remove "language".
1802 (read_import_statement, setup_type_unit_groups, )
1803 (read_func_scope, read_lexical_block_scope)
1804 (dwarf2_record_block_ranges, read_namespace): Update.
1805 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1806 (lnp_state_machine::handle_end_sequence): Update.
1807 (class lnp_state_machine) <m_cu>: New member.
1808 <m_record_line_callback>: Remove.
1809 <m_currently_recording_lines>: New member.
1810 (lnp_state_machine::handle_set_file): Update.
1811 (noop_record_line): Remove.
1812 (dwarf_record_line_p): Add cu parameter.
1813 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1814 (lnp_state_machine::record_line)
1815 (lnp_state_machine::lnp_state_machine)
1816 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1817 (dwarf_decode_lines): Update.
1818 (dwarf2_start_subfile): Add cu parameter.
1819 (dwarf2_start_symtab, new_symbol): Update.
1820 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1821 Remove dwarf2_per_objfile parameter.
1822 (dwarf_decode_macros): Update.
1823
80e649fc
TT
18242018-07-20 Tom Tromey <tom@tromey.com>
1825
1826 * stabsread.c (define_symbol): Update.
1827 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1828 * dwarf2read.c (new_symbol): Update.
1829 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1830 * cp-namespace.c: Include buildsym.h.
1831 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1832 * buildsym-legacy.c (get_buildsym_compunit): New function.
1833
0baae8db
TT
18342018-07-20 Tom Tromey <tom@tromey.com>
1835
1836 * xcoffread.c: Include buildsym-legacy.h.
1837 * windows-nat.c: Include buildsym-legacy.h.
1838 * stabsread.c: Include buildsym-legacy.h.
1839 * mdebugread.c: Include buildsym-legacy.h.
1840 * buildsym-legacy.h: New file.
1841 * buildsym-legacy.c: New file, from buildsym.c.
1842 * go32-nat.c: Include buildsym-legacy.h.
1843 * dwarf2read.c: Include buildsym-legacy.h.
1844 * dbxread.c: Include buildsym-legacy.h.
1845 * cp-namespace.c: Include buildsym-legacy.h.
1846 * coffread.c: Include buildsym-legacy.h.
1847 * buildsym.h: Move some contents to buildsym-legacy.h.
1848 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1849 buildsym-legacy.c.
1850 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1851
ab209f6f
TT
18522018-07-20 Tom Tromey <tom@tromey.com>
1853
1854 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1855 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1856 (buildsym_compunit::buildsym_compunit)
1857 (buildsym_compunit::~buildsym_compunit)
1858 (buildsym_compunit::get_macro_table): Define.
1859
74c72eac
TT
18602018-07-20 Tom Tromey <tom@tromey.com>
1861
1862 * buildsym.c (reset_symtab_globals): Remove.
1863 (buildsym_compunit::end_symtab_from_static_block): Update.
1864 (buildsym_compunit::augment_type_symtab): Update.
1865 (end_symtab_from_static_block): Call free_buildsym_compunit.
1866 (augment_type_symtab, end_symtab, end_expandable_symtab):
1867 Likewise.
1868
da6580e5
TT
18692018-07-20 Tom Tromey <tom@tromey.com>
1870
1871 * arch-utils.c: Do not include buildsym.h.
1872 * mipsread.c: Do not include buildsym.h.
1873 * machoread.c: Do not include buildsym.h.
1874 * elfread.c: Do not include buildsym.h.
1875
4a2125f5
TT
18762018-07-20 Tom Tromey <tom@tromey.com>
1877
1878 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1879 initialization.
1880 (buildsym_compunit): Add new constructor.
1881 (struct buildsym_compunit) <get_last_source_file, finish_block,
1882 record_block_range, start_subfile, patch_subfile_names,
1883 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1884 set_last_source_start_addr, get_last_source_start_addr,
1885 get_local_using_directives, set_local_using_directives,
1886 get_global_using_directives, outermost_context_p,
1887 get_current_context_stack, get_context_stack_depth,
1888 get_current_subfile, get_local_symbols, get_file_symbols,
1889 get_global_symbols, record_debugformat, record_producer,
1890 push_context, pop_context, end_symtab_get_static_block,
1891 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1892 New public methods.
1893 <record_pending_block, finish_block_internal, make_blockvector,
1894 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1895 private methods.
1896 Update all users.
1897
18982018-05-22 Tom Tromey <tom@tromey.com>
1899
1900 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1901 parameter.
1902 (finish_block_internal): Update.
1903
6b213a47
TT
19042018-07-20 Tom Tromey <tom@tromey.com>
1905
1906 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1907 parameter.
1908 (finish_block_internal): Update.
1909
b80a981d
TT
19102018-07-20 Tom Tromey <tom@tromey.com>
1911
1912 * buildsym.h (EXTERN): Don't define or undef.
1913 * buildsym.c (EXTERN): Don't define.
1914
ddb70602
TT
19152018-07-20 Tom Tromey <tom@tromey.com>
1916
1917 * buildsym.c: Remove TODO comment.
1918
b37dd3bc
TT
19192018-07-20 Tom Tromey <tom@tromey.com>
1920
1921 * coffread.c (coff_symtab_read): Update.
1922 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1923 (xcoff_new_init): Update.
1924 * mipsread.c (mipscoff_new_init): Update.
1925 * mdebugread.c (mdebug_build_psymtabs): Update.
1926 * elfread.c (elf_new_init): Update.
1927 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1928 Update.
1929 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1930 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1931 (stabsect_build_psymtabs): Update.
1932 * buildsym.h (buildsym_init): Don't declare.
1933 * buildsym.c: Update comment.
1934 (prepare_for_building): Remove.
1935 (start_symtab, restart_symtab): Update.
1936 (reset_symtab_globals): Update comment.
1937 (buildsym_init): Remove.
1938
e148f09d
TT
19392018-07-20 Tom Tromey <tom@tromey.com>
1940
1941 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1942 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1943 (read_enum_type, common_block_start, common_block_end)
1944 (cleanup_undefined_types_1, finish_global_stabs): Update.
1945 * mdebugread.c (psymtab_to_symtab_1): Update.
1946 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1947 (read_lexical_block_scope, new_symbol): Update.
1948 * dbxread.c (process_one_symbol): Update.
1949 * coffread.c (coff_symtab_read, process_coff_symbol)
1950 (coff_read_enum_type): Update.
1951 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1952 declare.
1953 (get_local_symbols, get_file_symbols, get_global_symbols): New
1954 functions.
1955 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1956 m_global_symbols.
1957 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1958 (~scoped_free_pendings): Update.
1959 (finish_block, prepare_for_building, reset_symtab_globals)
1960 (end_symtab_get_static_block, end_symtab_with_blockvector)
1961 (augment_type_symtab, push_context): Update.
1962 (get_local_symbols, get_file_symbols, get_global_symbols): New
1963 functions.
1964 (buildsym_init): Update.
1965
93b8bea4
TT
19662018-07-20 Tom Tromey <tom@tromey.com>
1967
1968 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1969 (process_full_type_unit): Likewise.
1970 (dwarf2_start_symtab): Set list_in_scope.
1971
f62f6af5
TT
19722018-07-20 Tom Tromey <tom@tromey.com>
1973
1974 * dwarf2read.c (process_psymtab_comp_unit_reader)
1975 (build_type_psymtabs_reader): Do not set list_in_scope.
1976
1d376700
TT
19772018-07-20 Tom Tromey <tom@tromey.com>
1978
1979 * buildsym.c (free_pendings): Remove.
1980 (add_symbol_to_list, scoped_free_pendings)
1981 (finish_block_internal, buildsym_init): Update.
1982
c233e9c6
TT
19832018-07-20 Tom Tromey <tom@tromey.com>
1984
1985 * xcoffread.c (read_xcoff_symtab): Update.
1986 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1987 Update.
1988 * dbxread.c (process_one_symbol): Update.
1989 * coffread.c (coff_symtab_read): Update.
1990 * buildsym.h (finish_block): Update.
1991 * buildsym.c (finish_block): Remove "listhead" argument.
1992 (end_symtab_get_static_block): Update.
1993
5ac04550
TT
19942018-07-20 Tom Tromey <tom@tromey.com>
1995
1996 * buildsym.h (class scoped_free_pendings): Remove constructor.
1997 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1998 method.
1999 <m_pending_block_obstack, m_pending_blocks>: New members.
2000 (pending_block_obstack, pending_blocks): Remove.
2001 (scoped_free_pendings::scoped_free_pendings): Default.
2002 (~scoped_free_pendings): Update.
2003 (free_pending_blocks): Remove.
2004 (finish_block_internal, record_pending_block, make_blockvector)
2005 (end_symtab_get_static_block, augment_type_symtab, push_context)
2006 (buildsym_init): Update.
2007
7ea05a7b
TT
20082018-07-20 Tom Tromey <tom@tromey.com>
2009
2010 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2011 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2012 members.
2013 (pending_addrmap, pending_addrmap_obstack)
2014 (pending_addrmap_interesting): Remove.
2015 (scoped_free_pendings, record_block_range, make_blockvector)
2016 (prepare_for_building, reset_symtab_globals, buildsym_init):
2017 Update.
2018
3c65e5b3
TT
20192018-07-20 Tom Tromey <tom@tromey.com>
2020
2021 * xcoffread.c (process_linenos): Update.
2022 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2023 * mdebugread.c (psymtab_to_symtab_1): Update.
2024 * dwarf2read.c (setup_type_unit_groups)
2025 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2026 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2027 * dbxread.c (process_one_symbol): Update.
2028 * coffread.c (coff_symtab_read, enter_linenos)
2029 (process_coff_symbol): Update.
2030 * buildsym.h (current_subfile): Don't declare.
2031 (get_current_subfile): Declare.
2032 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2033 member.
2034 (start_subfile, free_buildsym_compunit, push_subfile)
2035 (prepare_for_building, start_symtab): Update.
2036 (get_current_subfile): New function.
2037
a60f3166
TT
20382018-07-20 Tom Tromey <tom@tromey.com>
2039
2040 * coffread.c (coff_symtab_read): Update.
2041 * xcoffread.c (read_xcoff_symtab): Update.
2042 * dwarf2read.c (new_symbol): Update.
2043 (read_func_scope, read_lexical_block_scope): Update.
2044 * dbxread.c (process_one_symbol): Update.
2045 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2046 (outermost_context_p): Remove macro.
2047 (outermost_context_p, get_current_context_stack)
2048 (get_context_stack_depth): Declare.
2049 (pop_context): Return struct context_stack.
2050 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2051 member.
2052 (context_stack_size): Remove.
2053 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2054 (prepare_for_building, end_symtab_get_static_block)
2055 (augment_type_symtab, push_context): Update.
2056 (pop_context): Return struct context_stack.
2057 (outermost_context_p, get_current_context_stack)
2058 (get_context_stack_depth): New functions.
2059 (buildsym_init): Update.
2060
56ba65a0
TT
20612018-07-20 Tom Tromey <tom@tromey.com>
2062
2063 * rust-exp.y: Now a pure parser. Update all rules.
2064 (%union): Move earlier.
2065 (current_parser, work_obstack): Remove globals.
2066 (rust_parser, ~rust_parser): Update.
2067 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2068 lex_character, lex_number, lex_string, lex_identifier,
2069 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2070 convert_name, convert_params_to_expression,
2071 convert_ast_to_expression, ast_basic_type, ast_operation,
2072 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2073 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2074 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2075 ast_array_type, ast_slice_type, ast_reference_type,
2076 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2077 (rust_parse): Update.
2078 (rustyyerror, rustyylex): Add parser parameter.
2079 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2080 (rust_lex_stringish_test, rust_lex_test_sequence)
2081 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2082 (rust_lex_test_push_back, rust_lex_tests): Update.
2083
4c693332
PA
20842018-07-19 Pedro Alves <palves@redhat.com>
2085
2086 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2087 gdb::unique_xmalloc_ptr.
2088 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2089 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2090 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2091 copy-initialization.
2092 * guile/scm-pretty-print.c (ppscm_print_children): Use
2093 gdb::unique_xmalloc_ptr instead of cleanups.
2094 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2095 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2096 gdb::unique_xmalloc_ptr.
2097 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2098 Adjust to use gdb::unique_xmalloc_ptr.
2099 * guile/scm-utils.c (extract_arg): Adjust.
2100 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2101 gdb::unique_xmalloc_ptr instead of a cleanup.
2102
4581dc82
TT
21032018-07-19 Tom Tromey <tom@tromey.com>
2104
2105 * utils.c (do_value_free_to_mark)
2106 (make_cleanup_value_free_to_mark): Remove.
2107 * utils.h (make_cleanup_value_free_to_mark): Remove.
2108
43cc6c3a
PA
21092018-07-19 Pedro Alves <palves@redhat.com>
2110
2111 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2112 forwarding reference.
2113
3a5f2a48
PA
21142018-07-18 Pedro Alves <palves@redhat.com>
2115
2116 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2117 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2118 cleanup.
2119
557e56be
PA
21202018-07-18 Pedro Alves <palves@redhat.com>
2121
2122 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2123 exceptions.
2124 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2125 (gdbscm_wrap): New.
2126 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2127 directly instead of a cleanup.
2128 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2129 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2130 (vlscm_binop_gdbthrow): New, factored out from ...
2131 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2132 (vlscm_rich_compare): Use gdbscm_wrap.
2133 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2134 instead of a cleanup.
2135 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2136 cleanup.
2137 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2138 Use xfree directly instead of a cleanup.
2139 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2140 Adjust to use gdbscm_wrap and scoped_value_mark.
2141 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2142 (gdbscm_value_address, gdbscm_value_dereference)
2143 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2144 scoped_value_mark.
2145 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2146 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2147 scoped_value_mark.
2148 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2149 gdbscm_wrap and scoped_value_mark.
2150 (gdbscm_value_to_string): Use xfree directly instead of a
2151 cleanup. Move 'buffer' unique_ptr to TRY scope.
2152 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2153 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2154 scoped_value_mark.
2155 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2156 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2157 scoped_value_mark.
2158 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2159 gdbscm_wrap.
2160
42dc7699
TV
21612018-07-18 Tom de Vries <tdevries@suse.de>
2162
2163 * findvar.c (default_read_var_value): Also resolve dynamic type for
2164 LOC_OPTIMIZED_OUT vars.
2165
6592ceed
MR
21662018-07-18 Maciej W. Rozycki <macro@mips.com>
2167
2168 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2169 decoding.
2170
c6c6149a
TT
21712018-07-17 Tom Tromey <tom@tromey.com>
2172
2173 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2174 (compute_enum_list, pascm_set_param_value_x)
2175 (gdbscm_parameter_value): Update.
2176 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2177 (gdbscm_scm_to_host_string): Update.
2178 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2179 Update.
2180 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2181 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2182 * guile/scm-string.c (gdbscm_scm_to_string): Return
2183 unique_xmalloc_ptr.
2184 (gdbscm_scm_to_host_string): Likewise.
2185
a1a31cb8
TT
21862018-07-17 Tom Tromey <tom@tromey.com>
2187
2188 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2189 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2190 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2191 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2192 unique_xmalloc_ptr.
2193
15bf3002
TT
21942018-07-17 Tom Tromey <tom@tromey.com>
2195
2196 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2197 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2198 Update.
2199 * guile/scm-cmd.c (cmdscm_function): Update.
2200 * guile/scm-pretty-print.c
2201 (ppscm_print_exception_unless_memory_error): Update.
2202 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2203 Return unique_xmalloc_ptr.
2204
7eb1a66c
TT
22052018-07-17 Tom Tromey <tom@tromey.com>
2206
2207 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2208 Use string_printf.
2209
ce73f310
JW
22102018-07-17 Jim Wilson <jimw@sifive.com>
2211
27724bad
JW
2212 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2213 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2214 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2215 unecessary braces after EF_RISCV_RVC test. Delete call to
2216 set_gdbarch_decr_pc_after_break.
2217
ce73f310
JW
2218 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2219 RISCV_LAST_FP_REGNUM + 1.
2220 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2221
056dec39
TT
22222018-07-17 Tom Tromey <tom@tromey.com>
2223
2224 * configure.ac: Remove --disable-gdbcli.
2225 * configure: Rebuild.
2226 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2227 (SUBDIR_CLI_CFLAGS): Remove.
2228 (SFILES): Use SUBDIR_CLI_SRCS.
2229 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2230
4735f0ed
TT
22312018-07-17 Tom Tromey <tom@tromey.com>
2232
2233 PR gdb/18624:
2234 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2235
117a0e99
JW
22362018-07-16 Jim Wilson <jimw@sifive.com>
2237
2238 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2239
8a67aaa8
SM
22402018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2241
2242 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2243 variable.
2244 (libunwind_frame_sniffer): Likewise.
2245 (libunwind_frame_prev_register): Likewise.
2246 (libunwind_sigtramp_frame_sniffer): Likewise.
2247 * ia64-tdep.c (ia64_access_reg): Likewise.
2248 (ia64_access_rse_reg): Likewise.
2249 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2250 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2251
ec74dcd8
SM
22522018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2253
2254 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2255
a700e753
SM
22562018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * remote-sim.c (gdbsim_target::close,
2259 gdbsim_target::mourn_inferior): Remove unused variables.
2260
8b411ff8
SM
22612018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2262
2263 * ia64-tdep.c (ktab_buf): New global.
2264 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2265 (get_kernel_table): Adjust.
2266
edb0470b
TT
22672018-07-16 Tom Tromey <tom@tromey.com>
2268
2269 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2270 * dwarf2read.c (using_directives, new_symbol): Use
2271 outermost_context_p.
2272 * dbxread.c (process_one_symbol): Use outermost_context_p.
2273 * coffread.c (coff_symtab_read): Use outermost_context_p.
2274
6cccc9a8
TT
22752018-07-16 Tom Tromey <tom@tromey.com>
2276
2277 * dwarf2read.c (using_directives, read_func_scope)
2278 (read_lexical_block_scope): Update.
2279 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2280 * buildsym.h (local_using_directives, global_using_directives):
2281 Don't declare.
2282 (get_local_using_directives, set_local_using_directives)
2283 (get_global_using_directives): Declare.
2284 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2285 m_global_using_directives>: New members.
2286 (finish_block_internal, prepare_for_building)
2287 (reset_symtab_globals, end_symtab_get_static_block)
2288 (push_context): Update.
2289 (get_local_using_directives, set_local_using_directives)
2290 (get_global_using_directives): New functions.
2291 (buildsym_init): Update.
2292
652788a7
TT
22932018-07-16 Tom Tromey <tom@tromey.com>
2294
2295 * xcoffread.c (xcoff_initial_scan): Don't call
2296 free_pending_blocks.
2297 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2298 * buildsym.h (class scoped_free_pendings): Add constructor.
2299 (free_pending_blocks): Don't declare.
2300 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2301 (free_pending_blocks): Now static.
2302
8419ee53
TT
23032018-07-16 Tom Tromey <tom@tromey.com>
2304
2305 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2306 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2307 member.
2308 (struct subfile_stack): Remove.
2309 (subfile_stack): Remove.
2310 (push_subfile, pop_subfile, buildsym_init): Update.
2311
ccdac490
TT
23122018-07-16 Tom Tromey <tom@tromey.com>
2313
2314 * buildsym.c (push_subfile): Use gdb_assert.
2315 (pop_subfile): Use gdb_assert.
2316
43130d6f
TT
23172018-07-16 Tom Tromey <tom@tromey.com>
2318
2319 * buildsym.h (merge_symbol_lists): Remove.
2320 * buildsym.c (merge_symbol_lists): Remove.
2321
77d6f1aa
TT
23222018-07-16 Tom Tromey <tom@tromey.com>
2323
2324 * stabsread.c (scan_file_globals): Update comment.
2325 * stabsread.h (scan_file_globals): Move from buildsym.h.
2326 * buildsym.h (scan_file_globals): Move to stabsread.h.
2327
2c722d18
TT
23282018-07-16 Tom Tromey <tom@tromey.com>
2329
2330 * xcoffread.c (xcoff_new_init): Update.
2331 * mipsread.c (mipscoff_new_init): Update.
2332 * mdebugread.c (mdebug_build_psymtabs): Update.
2333 * elfread.c (elf_new_init): Update.
2334 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2335 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2336 * buildsym.h (buildsym_new_init): Don't declare.
2337 * buildsym.c (buildsym_new_init): Remove.
2338
5985ac61
TT
23392018-07-16 Tom Tromey <tom@tromey.com>
2340
2341 * stabsread.h (within_function): Move from buildsym.h.
2342 * stabsread.c (start_stabs): Clear within_function.
2343 * coffread.c (coff_start_symtab): Clear within_function.
2344 * buildsym.h (within_function): Move to stabsread.h.
2345 * buildsym.c (prepare_for_building): Update.
2346
6b84eeb2
TT
23472018-07-16 Tom Tromey <tom@tromey.com>
2348
2349 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2350 * dwarf2read.c (dwarf2_start_symtab): Don't set
2351 processing_gcc_compilation.
2352 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2353
2150c3ef
TT
23542018-07-16 Tom Tromey <tom@tromey.com>
2355
2356 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2357 (next_symbol_text_func): Move from buildsym.h.
2358 * stabsread.c (hashname): Move from buildsym.c.
2359 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2360 (next_symbol_text_func, hashname): Move to stabsread.h.
2361 * buildsym.c: Don't include bcache.h
2362 (hashname): Move to stasbread.c.
2363
0ec44fc0
TT
23642018-07-16 Tom Tromey <tom@tromey.com>
2365
2366 * buildsym.h (context_stack_size): Don't declare.
2367 * buildsym.c (context_stack_size): New global.
2368
81cc346d
TT
23692018-07-16 Tom Tromey <tom@tromey.com>
2370
2371 * dbxread.c (processing_acc_compilation): New global.
2372 * buildsym.h (processing_acc_compilation): Don't declare.
2373
2c99ee5c
TT
23742018-07-16 Tom Tromey <tom@tromey.com>
2375
2376 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2377 * dbxread.c (read_ofile_symtab): Update.
2378 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2379 * buildsym.h (last_source_start_addr): Remove.
2380 (set_last_source_start_addr, get_last_source_start_addr):
2381 Declare.
2382 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2383 parameter.
2384 (struct buildsym_compunit) <m_last_source_start_addr>: New
2385 member.
2386 (prepare_for_building): Remove start_addr parameter.
2387 (start_symtab, restart_symtab, end_symtab_get_static_block)
2388 (end_symtab_with_blockvector): Update.
2389 (set_last_source_start_addr, get_last_source_start_addr): New
2390 functions.
2391
530fedbc
TT
23922018-07-16 Tom Tromey <tom@tromey.com>
2393
2394 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2395 member.
2396 (have_line_numbers): Remove.
2397 (record_line, prepare_for_building, end_symtab_get_static_block)
2398 (augment_type_symtab): Update.
2399
6a976300
TT
24002018-07-16 Tom Tromey <tom@tromey.com>
2401
2402 * buildsym.c (~buildsym_compunit): Free the macro table.
2403 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2404 methods.
2405 <m_pending_macros>: New member.
2406 (pending_macros): Remove.
2407 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2408 (reset_symtab_globals, end_symtab_get_static_block)
2409 (end_symtab_with_blockvector, augment_type_symtab)
2410 (buildsym_init): Update.
2411
c0015d44
TT
24122018-07-16 Tom Tromey <tom@tromey.com>
2413
2414 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2415 parameter.
2416 (buildsym_compunit::set_last_source_file): New method.
2417 <m_last_source_file>: New member.
2418 (prepare_for_building): Remove "name" parameter.
2419 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2420 (last_source_file): Remove.
2421 (set_last_source_file, get_last_source_file): Update.
2422
e62cca7c
TT
24232018-07-16 Tom Tromey <tom@tromey.com>
2424
2425 * buildsym.c (prepare_for_building): Add assert.
2426
905eb0e2
TT
24272018-07-16 Tom Tromey <tom@tromey.com>
2428
2429 * buildsym.c (~buildsym_compunit): Update.
2430 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2431 (start_subfile, patch_subfile_names)
2432 (end_symtab_with_blockvector): Update.
2433
b248663f
TT
24342018-07-16 Tom Tromey <tom@tromey.com>
2435
2436 * buildsym.c (struct buildsym_compunit): Add constructor,
2437 destructor, initializers.
2438 (start_buildsym_compunit): Remove.
2439 (free_buildsym_compunit): Use "delete".
2440 (start_symtab, restart_symtab): Use "new".
2441
ff27d073
SM
24422018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2443
2444 * symfile.c (set_objfile_default_section_offset): Remove struct
2445 keyword.
2446
6a15ecf5
SH
24472018-07-14 Stafford Horne <shorne@gmail.com>
2448
2449 * (Responsible Maintainers): Add myself as or1k maintainer.
2450
027a4c30
TT
24512018-07-13 Tom Tromey <tom@tromey.com>
2452
2453 * symfile.c (set_objfile_default_section_offset): Use extra braces
2454 around initializer.
2455
5c1eda30
AA
24562018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2457
2458 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2459 non-branching basr.
2460
bc7b042b
PW
24612018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2462
2463 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2464 unittests/cli-utils-selftests.c
2465 * unittests/cli-utils-selftests.c: New file.
2466
a14c4daa
PW
24672018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2468
2469 * NEWS: Mention new commands. Mention change to 'thread apply'.
2470
1fe75df7
PW
24712018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2472
2473 * thread.c (thr_try_catch_cmd): New function.
2474 (thread_apply_all_command): Handle qcs flags.
2475 (thread_apply_command): Handle qcs flags.
2476 (taas_command): New function.
2477 (tfaas_command): New function.
2478 (_initialize_thread): Update to setup the new commands 'taas
2479 and 'tfaas'. Change doc string for 'thread apply'.
2480
6a70eb7d
PW
24812018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2482
2483 * stack.c: (trailing_outermost_frame): New function, mostly
2484 extracted from backtrace_command_1.
2485 (leading_innermost_frame): New function.
2486 (backtrace_command_1): Update to call trailing_outermost_frame.
2487 (frame_apply_command_count): New function.
2488 (frame_apply_level_command): New function.
2489 (frame_apply_all_command): New function.
2490 (frame_apply_command): New function.
2491 (faas_command): New function.
2492 (frame_cmd_list): New variable.
2493 (_initialize_stack): Update to setup the new commands 'frame apply'
2494 and 'faas'.
2495
529c08b2
PW
24962018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2497
2498 * cli-utils.c (number_or_range_parser::get_number): Only handle
2499 numbers or convenience var as numbers.
2500 (parse_flags): New function.
2501 (parse_flags_qcs): New function.
2502 (number_or_range_parser::finished): Ensure parsing end is detected
2503 before end of string.
2504 * cli-utils.h (parse_flags): New function.
2505 (parse_flags_qcs): New function.
2506 (number_or_range_parser): Remove m_finished bool.
2507 (number_or_range_parser::skip_range): Set m_in_range to false.
2508
64b58472
SDJ
25092018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2510
2511 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2512 on Windows.
2513
c7ab0aef
SDJ
25142018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2515 Jan Kratochvil <jan.kratochvil@redhat.com>
2516 Paul Fertser <fercerpav@gmail.com>
2517 Tsutomu Seki <sekiriki@gmail.com>
2518 Pedro Alves <palves@redhat.com>
2519
2520 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2521 'unittests/parse-connection-spec-selftests.c'.
2522 (COMMON_SFILES): Add 'common/netstuff.c'.
2523 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2524 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2525 * common/netstuff.c: New file.
2526 * common/netstuff.h: New file.
2527 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2528 (wait_for_connect): Update comment. New parameter
2529 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2530 Use 'sock' directly instead of 'scb->fd'.
2531 (try_connect): New function, with code from 'net_open'.
2532 (net_open): Rewrite main loop to deal with multiple
2533 sockets/addresses. Handle IPv6-style hostnames; implement
2534 support for IPv6 connections.
2535 * unittests/parse-connection-spec-selftests.c: New file.
2536
4c7333b3
PA
25372018-07-11 Pedro Alves <palves@redhat.com>
2538
2539 PR gdb/23377
2540 * remote.c (remote_target::remote_detach_pid): Call
2541 set_current_process.
2542
a6f88f6e
PA
25432018-07-11 Pedro Alves <palves@redhat.com>
2544
2545 * h8300-tdep.c (h8300_gdbarch_init): Remove
2546 set_gdbarch_ecoff_reg_to_regnum calls.
2547
16ff70dd
SDJ
25482018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2549
2550 PR c++/23373
2551 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2552 offsets/sizes for static members of a class/struct.
2553
12863263
AH
25542018-07-11 Alan Hayward <alan.hayward@arm.com>
2555
2556 * target-descriptions.c (tdesc_register_bitsize): Rename.
2557 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2558 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2559 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2560
1123588c
TT
25612018-07-10 Tom Tromey <tom@tromey.com>
2562
2563 * breakpoint.c (moribund_locations): Now static and a
2564 std::vector.
2565 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2566 (build_bpstat_chain, update_global_location_list)
2567 (breakpoint_retire_moribund): Update.
2568 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2569 VEC.
2570
8c49aa89
AB
25712018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2572
2573 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2574 (riscv_register_reggroup_p): Use new function, remove unneeded
2575 parenthesis.
2576 (riscv_push_dummy_call): Extend assert to compare against xlen or
2577 flen based on register type.
2578
42ecac17
AB
25792018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2580
2581 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2582
055303e2
AB
25832018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2584
2585 * remote.c (show_hardware_watchpoint_limit): New function.
2586 (show_hardware_watchpoint_length_limit): New function.
2587 (show_hardware_breakpoint_limit): New function.
2588 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2589 where appropriate, update help text.
2590
8fd32c1c
TT
25912018-07-09 Tom Tromey <tom@tromey.com>
2592
2593 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2594 (CLIBS): Don't mention NAT_CLIBS.
2595
31278b51
TT
25962018-07-09 Tom Tromey <tom@tromey.com>
2597
2598 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2599 (LIBGDB_OBS, clean mostlyclean): Update.
2600 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2601
e5fd1493
TT
26022018-07-09 Tom Tromey <tom@tromey.com>
2603
2604 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2605 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2606 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2607
981e0c0c
TT
26082018-07-09 Tom Tromey <tom@tromey.com>
2609
2610 * Makefile.in (ALLDEPFILES): Remove exec.c.
2611 (COMMON_OBS): Remove exec.o.
2612 (COMMON_SFILES): Add exec.c.
2613
14ccceb2
TT
26142018-07-09 Tom Tromey <tom@tromey.com>
2615
2616 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2617
5d3c3a68
TT
26182018-07-09 Tom Tromey <tom@tromey.com>
2619
2620 * Makefile.in (clean mostlyclean): Remove stamp-version.
2621 (version.c): Depend on stamp-version.
2622 (stamp-version): New rule, from version.c rule.
2623
1998086d
TT
26242018-07-09 Tom Tromey <tom@tromey.com>
2625
2626 * Makefile.in (init.c): Depend on stamp-init.
2627 (stamp-init): New rule, from init.c rule.
2628 (clean mostlyclean): Remove stamp-init.
2629
4c754949
TT
26302018-07-09 Tom Tromey <tom@tromey.com>
2631
2632 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2633 SUBDIR_GCC_COMPILE_SRCS.
2634
6497f1dd
TT
26352018-07-09 Tom Tromey <tom@tromey.com>
2636
2637 * Makefile.in (init.c): Remove some unused sed rules.
2638
97a34db9
TT
26392018-07-09 Tom Tromey <tom@tromey.com>
2640
2641 * Makefile.in (TSOBS): Remove.
2642 (INIT_FILES): Update.
2643 (LIBGDB_OBS): Update.
2644 (COMMON_SFILES): Add inflow.c.
2645 (SFILES): Remove inflow.c.
2646
25289ac1
JK
26472018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2648
2649 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2650
e83f4d97
SM
26512018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2652
4869c585
SM
2653 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2654 get_saveloc_name, is_signal_frame_name, step_name,
2655 init_remote_name, create_addr_space_name,
2656 destroy_addr_space_name, search_unwind_table_name,
2657 find_dyn_list_name): Constify.
e83f4d97 2658
6821842f
SM
26592018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2660
2661 * darwin-nat.c (darwin_pthread_kill): New function.
2662 (darwin_resume_thread): Use darwin_pthread_kill.
2663
c530603c
TV
26642018-07-05 Tom de Vries <tdevries@suse.de>
2665
2666 * macroexp.c (macro_buffer) <operator=>: New member function.
2667
a7d0f0f0
TT
26682018-07-04 Tom Tromey <tom@tromey.com>
2669
2670 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2671
6242c6a6
SM
26722018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2673
2674 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2675 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2676 * maint.c: Likewise.
2677 * top.c: Likewise.
2678
4e5b2f89
JB
26792018-07-04 Joel Brobecker <brobecker@adacore.com>
2680
2681 * NEWS: Create a new section for the next release branch.
2682 Rename the section of the current branch, now that it has
2683 been cut.
2684
538ccc4a
JB
26852018-07-04 Joel Brobecker <brobecker@adacore.com>
2686
2687 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2688 * version.in: Bump version to 8.2.50.DATE-git.
2689
1b919490
VB
26902018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2691 Pedro Alves <palves@redhat.com>
2692
2693 * linux-nat.c (linux_init_ptrace): Rename to ...
2694 (linux_init_ptrace_procfs): ... this. Call
2695 linux_proc_init_warnings.
2696 (linux_nat_target::post_attach)
2697 (linux_nat_target::post_startup_inferior): Adjust.
2698 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2699 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2700
1ea5da02
TV
27012018-07-04 Tom de Vries <tdevries@suse.de>
2702
2703 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2704 check ...
2705 (read_comp_unit_head): ... here.
2706
f51e0e20
TT
27072018-07-03 Tom Tromey <tom@tromey.com>
2708
2709 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2710 (stop_tracing, tstatus_command)
2711 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2712 (print_one_static_tracepoint_marker): Update.
2713 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2714 std::vector.
2715 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2716 VEC.
2717 (all_tracepoints, static_tracepoints_here): Return std::vector.
2718
d7e15655
TT
27192018-07-03 Tom Tromey <tom@tromey.com>
2720
2721 * common/ptid.c (ptid_equal): Remove.
2722 * common/ptid.h (ptid_equal): Don't declare.
2723 * ada-tasks.c: Update.
2724 * breakpoint.c: Update.
2725 * common/agent.c: Update.
2726 * corelow.c: Update.
2727 * darwin-nat-info.c: Update.
2728 * darwin-nat.c: Update.
2729 * dcache.c: Update.
2730 * dtrace-probe.c: Update.
2731 * dummy-frame.c: Update.
2732 * fbsd-nat.c: Update.
2733 * frame.c: Update.
2734 * gdbthread.h: Update.
2735 * gnu-nat.c: Update.
2736 * go32-nat.c: Update.
2737 * inf-loop.c: Update.
2738 * inf-ptrace.c: Update.
2739 * infcall.c: Update.
2740 * infcmd.c: Update.
2741 * inflow.c: Update.
2742 * infrun.c: Update.
2743 * linux-fork.c: Update.
2744 * linux-nat.c: Update.
2745 * linux-thread-db.c: Update.
2746 * mi/mi-cmd-var.c: Update.
2747 * mi/mi-interp.c: Update.
2748 * mi/mi-main.c: Update.
2749 * nto-procfs.c: Update.
2750 * ppc-linux-tdep.c: Update.
2751 * procfs.c: Update.
2752 * python/py-inferior.c: Update.
2753 * python/py-record-btrace.c: Update.
2754 * python/py-record.c: Update.
2755 * ravenscar-thread.c: Update.
2756 * regcache.c: Update.
2757 * remote-sim.c: Update.
2758 * remote.c: Update.
2759 * sol-thread.c: Update.
2760 * solib.c: Update.
2761 * target.c: Update.
2762 * tui/tui-stack.c: Update.
2763 * varobj.c: Update.
2764 * windows-nat.c: Update.
2765 * windows-tdep.c: Update.
2766
26a57c92
TT
27672018-07-03 Tom Tromey <tom@tromey.com>
2768
2769 * common/ptid.c (ptid_match): Remove.
2770 * common/ptid.h (ptid_match): Don't declare.
2771 * fbsd-nat.c: Update.
2772 * infcmd.c: Update.
2773 * infrun.c: Update.
2774 * linux-nat.c: Update.
2775 * record-btrace.c: Update.
2776 * regcache.c: Update.
2777 * remote.c: Update.
2778
d2a107e3
TT
27792018-07-03 Tom Tromey <tom@tromey.com>
2780
2781 * common/ptid.c (ptid_tid_p): Remove.
2782 * common/ptid.h (ptid_tid_p): Don't declare.
2783 * sol-thread.c: Update.
2784
15a9e13e
TT
27852018-07-03 Tom Tromey <tom@tromey.com>
2786
2787 * common/ptid.c (ptid_lwp_p): Remove.
2788 * common/ptid.h (ptid_lwp_p): Don't declare.
2789 * fbsd-nat.c: Update.
2790 * linux-nat.c: Update.
2791 * nat/linux-procfs.c: Update.
2792 * nat/x86-linux-dregs.c: Update.
2793 * sol-thread.c: Update.
2794
0e998d96
TT
27952018-07-03 Tom Tromey <tom@tromey.com>
2796
2797 * common/ptid.c (ptid_is_pid): Remove.
2798 * common/ptid.h (ptid_is_pid): Don't declare.
2799 * infrun.c: Update.
2800 * linux-nat.c: Update.
2801 * mi/mi-interp.c: Update.
2802 * remote.c: Update.
2803 * thread.c: Update.
2804
cc6bcb54
TT
28052018-07-03 Tom Tromey <tom@tromey.com>
2806
2807 * common/ptid.c (ptid_get_tid): Remove.
2808 * common/ptid.h (ptid_get_tid): Don't declare.
2809 * ada-tasks.c: Update.
2810 * aix-thread.c: Update.
2811 * bsd-uthread.c: Update.
2812 * darwin-nat.c: Update.
2813 * fbsd-nat.c: Update.
2814 * i386-darwin-nat.c: Update.
2815 * infrun.c: Update.
2816 * linux-tdep.c: Update.
2817 * nto-procfs.c: Update.
2818 * ppc-ravenscar-thread.c: Update.
2819 * python/py-infthread.c: Update.
2820 * ravenscar-thread.c: Update.
2821 * sol-thread.c: Update.
2822 * sparc-ravenscar-thread.c: Update.
2823 * windows-nat.c: Update.
2824
e38504b3
TT
28252018-07-03 Tom Tromey <tom@tromey.com>
2826
2827 * common/ptid.c (ptid_get_lwp): Remove.
2828 * common/ptid.h (ptid_get_lwp): Don't declare.
2829 * aarch64-linux-nat.c: Update.
2830 * ada-tasks.c: Update.
2831 * aix-thread.c: Update.
2832 * amd64-linux-nat.c: Update.
2833 * arm-linux-nat.c: Update.
2834 * corelow.c: Update.
2835 * fbsd-nat.c: Update.
2836 * fbsd-tdep.c: Update.
2837 * gnu-nat.c: Update.
2838 * i386-cygwin-tdep.c: Update.
2839 * i386-gnu-nat.c: Update.
2840 * i386-linux-nat.c: Update.
2841 * ia64-linux-nat.c: Update.
2842 * inf-ptrace.c: Update.
2843 * infrun.c: Update.
2844 * linux-fork.c: Update.
2845 * linux-nat.c: Update.
2846 * linux-tdep.c: Update.
2847 * linux-thread-db.c: Update.
2848 * mips-linux-nat.c: Update.
2849 * nat/aarch64-linux-hw-point.c: Update.
2850 * nat/aarch64-linux.c: Update.
2851 * nat/linux-btrace.c: Update.
2852 * nat/linux-osdata.c: Update.
2853 * nat/linux-procfs.c: Update.
2854 * nat/x86-linux-dregs.c: Update.
2855 * obsd-nat.c: Update.
2856 * ppc-fbsd-nat.c: Update.
2857 * ppc-linux-nat.c: Update.
2858 * procfs.c: Update.
2859 * python/py-infthread.c: Update.
2860 * ravenscar-thread.c: Update.
2861 * remote.c: Update.
2862 * s390-linux-nat.c: Update.
2863 * sol-thread.c: Update.
2864 * sol2-tdep.c: Update.
2865 * spu-linux-nat.c: Update.
2866 * x86-linux-nat.c: Update.
2867 * xtensa-linux-nat.c: Update.
2868
e99b03dc
TT
28692018-07-03 Tom Tromey <tom@tromey.com>
2870
2871 * common/ptid.c (ptid_get_pid): Remove.
2872 * common/ptid.h (ptid_get_pid): Don't declare.
2873 * aarch64-linux-nat.c: Update.
2874 * ada-lang.c: Update.
2875 * aix-thread.c: Update.
2876 * alpha-bsd-nat.c: Update.
2877 * amd64-fbsd-nat.c: Update.
2878 * amd64-linux-nat.c: Update.
2879 * arm-linux-nat.c: Update.
2880 * arm-nbsd-nat.c: Update.
2881 * auxv.c: Update.
2882 * break-catch-syscall.c: Update.
2883 * breakpoint.c: Update.
2884 * bsd-uthread.c: Update.
2885 * corelow.c: Update.
2886 * ctf.c: Update.
2887 * darwin-nat.c: Update.
2888 * fbsd-nat.c: Update.
2889 * fbsd-tdep.c: Update.
2890 * gcore.c: Update.
2891 * gnu-nat.c: Update.
2892 * hppa-nbsd-nat.c: Update.
2893 * hppa-obsd-nat.c: Update.
2894 * i386-fbsd-nat.c: Update.
2895 * ia64-linux-nat.c: Update.
2896 * inf-ptrace.c: Update.
2897 * infcmd.c: Update.
2898 * inferior.c: Update.
2899 * inferior.h: Update.
2900 * inflow.c: Update.
2901 * infrun.c: Update.
2902 * linux-fork.c: Update.
2903 * linux-nat.c: Update.
2904 * linux-tdep.c: Update.
2905 * linux-thread-db.c: Update.
2906 * m68k-bsd-nat.c: Update.
2907 * mi/mi-interp.c: Update.
2908 * mi/mi-main.c: Update.
2909 * mips-linux-nat.c: Update.
2910 * mips-nbsd-nat.c: Update.
2911 * mips64-obsd-nat.c: Update.
2912 * nat/aarch64-linux-hw-point.c: Update.
2913 * nat/aarch64-linux.c: Update.
2914 * nat/linux-btrace.c: Update.
2915 * nat/linux-osdata.c: Update.
2916 * nat/linux-procfs.c: Update.
2917 * nat/x86-linux-dregs.c: Update.
2918 * nto-procfs.c: Update.
2919 * obsd-nat.c: Update.
2920 * ppc-linux-nat.c: Update.
2921 * ppc-nbsd-nat.c: Update.
2922 * ppc-obsd-nat.c: Update.
2923 * proc-service.c: Update.
2924 * procfs.c: Update.
2925 * python/py-inferior.c: Update.
2926 * python/py-infthread.c: Update.
2927 * ravenscar-thread.c: Update.
2928 * record.c: Update.
2929 * remote-sim.c: Update.
2930 * remote.c: Update.
2931 * rs6000-nat.c: Update.
2932 * s390-linux-nat.c: Update.
2933 * sh-nbsd-nat.c: Update.
2934 * sol-thread.c: Update.
2935 * sparc-nat.c: Update.
2936 * sparc64-tdep.c: Update.
2937 * spu-linux-nat.c: Update.
2938 * spu-tdep.c: Update.
2939 * target-debug.h: Update.
2940 * target.c: Update.
2941 * thread.c: Update.
2942 * tid-parse.c: Update.
2943 * tracefile-tfile.c: Update.
2944 * vax-bsd-nat.c: Update.
2945 * windows-nat.c: Update.
2946 * x86-linux-nat.c: Update.
2947 * x86-nat.c: Update.
2948
f2907e49
TT
29492018-07-03 Tom Tromey <tom@tromey.com>
2950
2951 * common/ptid.c (pid_to_ptid): Remove.
2952 * common/ptid.h (pid_to_ptid): Don't declare.
2953 * aix-thread.c: Update.
2954 * arm-linux-nat.c: Update.
2955 * common/ptid.c: Update.
2956 * common/ptid.h: Update.
2957 * corelow.c: Update.
2958 * ctf.c: Update.
2959 * darwin-nat.c: Update.
2960 * fbsd-nat.c: Update.
2961 * fork-child.c: Update.
2962 * gnu-nat.c: Update.
2963 * go32-nat.c: Update.
2964 * inf-ptrace.c: Update.
2965 * infcmd.c: Update.
2966 * inferior.c: Update.
2967 * infrun.c: Update.
2968 * linux-fork.c: Update.
2969 * linux-nat.c: Update.
2970 * nat/aarch64-linux-hw-point.c: Update.
2971 * nat/fork-inferior.c: Update.
2972 * nat/x86-linux-dregs.c: Update.
2973 * nto-procfs.c: Update.
2974 * obsd-nat.c: Update.
2975 * procfs.c: Update.
2976 * progspace.c: Update.
2977 * remote.c: Update.
2978 * rs6000-nat.c: Update.
2979 * s390-linux-nat.c: Update.
2980 * sol-thread.c: Update.
2981 * spu-linux-nat.c: Update.
2982 * target.c: Update.
2983 * top.c: Update.
2984 * tracefile-tfile.c: Update.
2985 * windows-nat.c: Update.
2986
fd79271b
TT
29872018-07-03 Tom Tromey <tom@tromey.com>
2988
2989 * common/ptid.h (ptid_build): Don't declare.
2990 * common/ptid.c (ptid_build): Remove.
2991 * aix-thread.c: Update.
2992 * bsd-kvm.c: Update.
2993 * bsd-uthread.c: Update.
2994 * common/agent.c: Update.
2995 * common/ptid.c: Update.
2996 * common/ptid.h: Update.
2997 * corelow.c: Update.
2998 * darwin-nat.c: Update.
2999 * fbsd-nat.c: Update.
3000 * gnu-nat.c: Update.
3001 * linux-fork.c: Update.
3002 * linux-nat.c: Update.
3003 * linux-thread-db.c: Update.
3004 * nat/linux-osdata.c: Update.
3005 * nat/linux-procfs.c: Update.
3006 * nto-procfs.c: Update.
3007 * obsd-nat.c: Update.
3008 * proc-service.c: Update.
3009 * procfs.c: Update.
3010 * ravenscar-thread.c: Update.
3011 * remote-sim.c: Update.
3012 * remote.c: Update.
3013 * sol-thread.c: Update.
3014 * target.c: Update.
3015 * windows-nat.c: Update.
3016
057302ce
TT
30172018-07-03 Tom Tromey <tom@tromey.com>
3018
3019 * infrun.c (follow_exec): Use exit_inferior_silent.
3020 * inferior.c (exit_inferior_num_silent): Remove.
3021 * inferior.h (exit_inferior_num_silent): Don't declare.
3022
a50c11c6
TT
30232018-07-03 Tom Tromey <tom@tromey.com>
3024
3025 PR cli/23340:
3026 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3027 inferior_ptid on error.
3028
471b9d15
MR
30292018-07-02 Maciej W. Rozycki <macro@mips.com>
3030 Simon Marchi <simon.marchi@polymtl.ca>
3031
3032 PR tdep/8282
3033 * disasm.h (gdb_disassembler): Add
3034 `m_disassembler_options_holder'. member
3035 * disasm.c (get_all_disassembler_options): New function.
3036 (gdb_disassembler::gdb_disassembler): Use it.
3037 (gdb_buffered_insn_length_init_dis): Likewise.
3038 (gdb_buffered_insn_length): Adjust accordingly.
3039 (set_disassembler_options): Handle options with arguments.
3040 (show_disassembler_options_sfunc): Likewise. Add a leading new
3041 line if showing options with descriptions.
3042 (disassembler_options_completer): Adapt to using the
3043 `disasm_options_and_args_t' structure.
3044 * mips-tdep.c (mips_disassembler_options): New variable.
3045 (mips_disassembler_options_o32): Likewise.
3046 (mips_disassembler_options_n32): Likewise.
3047 (mips_disassembler_options_n64): Likewise.
3048 (gdb_print_insn_mips): Don't set `disassembler_options'.
3049 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3050 functions.
3051 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3052 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3053 `gdbarch_disassembler_options_implicit' and
3054 `gdbarch_valid_disassembler_options'.
3055 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3056 `disasm_options_and_args_t' structure.
3057 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3058 method.
3059 (valid_disassembler_options): Switch from `disasm_options_t' to
3060 the `disasm_options_and_args_t' structure.
3061 * NEWS: Document `set disassembler-options' support for the MIPS
3062 target.
3063 * gdbarch.h: Regenerate.
3064 * gdbarch.c: Regenerate.
3065
41823f29
SH
30662018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3067
3068 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3069
41206e32
JB
30702018-06-29 Joel Brobecker <brobecker@adacore.com>
3071
3072 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3073 parameter in call to amd64_target_description.
3074 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3075 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3076 (amd64fbsd_init_abi): Likewise.
3077 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3078 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3079 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3080 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3081
de52b960
PA
30822018-06-29 Pedro Alves <palves@redhat.com>
3083
3084 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3085 "segments" parameter.
3086 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3087 (_initialize_amd64_tdep): Update call to
3088 amd64_create_target_description.
3089 (amd64_target_description): Add "segments" parameter. Adjust
3090 the implementation to use it.
3091 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3092 call to amd64_create_target_description.
3093 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3094 * gdb/arch/amd64.h (amd64_create_target_description): Add
3095 "segments" register.
3096 * gdb/arch/amd64.c (amd64_create_target_description): Add
3097 "segments" parameter. Call create_feature_i386_64bit_segments
3098 only if SEGMENTS is true.
3099 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3100 call to amd64_create_target_description.
3101
75acb486
PA
31022018-06-29 Pedro Alves <palves@redhat.com>
3103
3104 * thread.c (thread_target_id_str): New, factored out from ...
3105 (print_thread_info_1): ... here. Use it to compute the max
3106 "Target Id" column width.
3107
c76a8ea3
PA
31082018-06-29 Pedro Alves <palves@redhat.com>
3109
3110 * remote.c (remote_target::extra_thread_info): Delete
3111 'display_buf' and 'n' locals. from the cache, regardless of
3112 packet mechanims is in use. Use cache for qThreadExtra and qP
3113 methods too.
3114
cd2bb709
PA
31152018-06-29 Pedro Alves <palves@redhat.com>
3116
3117 * blockframe.c (find_pc_sect_containing_function): New function.
3118 * breakpoint.c (print_breakpoint_location): Don't call
3119 find_pc_sect_function.
3120 * linespec.c (create_sals_line_offset): Record the location's
3121 symbol in the sal.
3122 * linespec.c (convert_address_location_to_sals): Fill in sal's
3123 symbol with find_pc_sect_containing_function.
3124 * symtab.c (find_function_start_sal): Rename to ...
3125 (find_function_start_sal_1): ... this.
3126 (find_function_start_sal): Reimplement as wrapper around
3127 find_function_start_sal_1, and use
3128 find_pc_sect_containing_function to fill in the sal's symbol.
3129 (find_function_start_sal(symbol*, bool)): Adjust.
3130 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3131 comments.
3132 (find_pc_sect_containing_function): Declare.
3133
991ff292
PA
31342018-06-29 Pedro Alves <palves@redhat.com>
3135
3136 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3137 true if the the location has no symbol.
3138
44cee4fd
TT
31392018-06-28 Tom Tromey <tom@tromey.com>
3140
3141 * NEWS: Mention --enable-codesign.
3142 * silent-rules.mk (ECHO_SIGN): New variable.
3143 * configure.ac: Add --enable-codesign.
3144 * configure: Rebuild.
3145 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3146 (gdb$(EXEEXT)): Optionally invoke codesign.
3147
f2ffa92b
PA
31482018-06-28 Pedro Alves <palves@redhat.com>
3149
3150 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3151 comments.
3152 (switch_to_thread_no_regs): Adjust comment.
3153 * infcmd.c (stop_pc): Delete.
3154 (post_create_inferior, info_program_command): Replace references
3155 to stop_pc with references to thread_info->suspend.stop_pc.
3156 * inferior.h (stop_pc): Delete declaration.
3157 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3158 (handle_inferior_event_1, handle_signal_stop)
3159 (process_event_stop_test, keep_going_stepped_thread)
3160 (handle_step_into_function, handle_step_into_function_backward)
3161 (print_stop_location): Replace references to stop_pc with
3162 references to thread_info->suspend.stop_pc.
3163 (struct infcall_suspend_state) <stop_pc>: Delete field.
3164 (save_infcall_suspend_state, restore_infcall_suspend_state):
3165 Remove references to inf_stat->stop_pc.
3166 * linux-fork.c (fork_load_infrun_state): Likewise.
3167 * record-btrace.c (record_btrace_set_replay): Likewise.
3168 * record-full.c (record_full_goto_entry): Likewise.
3169 * remote.c (print_one_stopped_thread): Likewise.
3170 * target.c (target_resume): Extend comment.
3171 * thread.c (set_executing_thread): New.
3172 (set_executing): Use it.
3173 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3174 Remove references to stop_pc.
3175
ecdc3a72
PA
31762018-06-28 Pedro Alves <palves@redhat.com>
3177
3178 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3179 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3180
d95d3aef
TT
31812018-06-28 Tom Tromey <tom@tromey.com>
3182
3183 * coffread.c (coff_symfile_finish): Update.
3184 * xcoffread.c (xcoff_symfile_finish): Update.
3185 * elfread.c (elf_symfile_finish): Update.
3186 * symfile.h (dwarf2_free_objfile): Don't declare.
3187 * dwarf2read.c (_initialize_dwarf2_read): Use
3188 register_objfile_data_with_cleanup.
3189 (dwarf2_free_objfile): Now static. Change signature.
3190
291f9a96
PT
31912018-06-28 Petr Tesarik <ptesarik@suse.cz>
3192
3193 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3194 option "-o" to add-symbol-file-load to add an offset to each
3195 section's load address.
3196 * symfile.c (set_objfile_default_section_offset): New function.
3197
d81a3eaf
PT
31982018-06-28 Petr Tesarik <ptesarik@suse.cz>
3199
3200 * symfile.c (add_symbol_file_command): Make sure that sections
3201 with the same name are sorted in the same order.
3202
ed6dfe51
PT
32032018-06-28 Petr Tesarik <ptesarik@suse.cz>
3204
3205 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3206 require the second argument. If omitted, load sections at the
3207 addresses specified in the file.
3208
d4d429d5
PT
32092018-06-28 Petr Tesarik <ptesarik@suse.cz>
3210
3211 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3212 (_initialize_symfile): Add option "-o" to symbol-file to add an
3213 offset to each section of the symbol file.
3214
39b27ab6
PT
32152018-06-28 Petr Tesarik <ptesarik@suse.cz>
3216
3217 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3218
41827fc3
TT
32192018-06-27 Tom Tromey <tom@tromey.com>
3220
3221 * stack.c (_initialize_stack): Update "func" help text.
3222
0c6aef22
TT
32232018-06-27 Tom Tromey <tom@tromey.com>
3224
3225 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3226 std::vector.
3227 (unwind_infopy_str, pyuw_create_unwind_info)
3228 (unwind_infopy_add_saved_register, pyuw_sniffer)
3229 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3230 Update.
3231 (struct saved_reg): Add constructor.
3232 <value>: Now a gdbpy_ref<>.
3233
63177289
TT
32342018-06-27 Tom Tromey <tom@tromey.com>
3235
3236 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3237
e76f78a0
SM
32382018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3239
3240 * gdb-gdb.py.in: Format using autopep8.
3241
9a14af7b
SM
32422018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3243
3244 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3245 (type_lookup_function): Recognize CORE_ADDR values.
3246
189366cd
SM
32472018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3248
3249 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3250 print tag_name.
3251
68ad5fb9
SM
32522018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3253
3254 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3255 <__lt__>: Add.
3256
141ec9f6
SM
32572018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3258
3259 * gdb-gdb.py: Move to...
3260 * gdb-gdb.py.in: ... here.
3261 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3262 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3263 dependencies.
3264 (distclean): Remove gdb-gdb.py when cleaning.
3265 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3266 * configure: Re-generate.
3267
4c4e7ad4
PA
32682018-06-27 Pedro Alves <palves@redhat.com>
3269
3270 * proc-service.c (get_ps_regcache): New.
3271 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3272 (ps_lsetfpregs): Use it.
3273
7ab6656f
OJ
32742018-06-27 Omair Javaid <omair.javaid@linaro.org>
3275
3276 PR gdb/21695
3277 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3278 (dwarf_decode_lines_1): Adjust.
3279
bd583225
SM
32802018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3281
3282 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3283 override.
3284 <info_proc>: Likewise.
3285
9a325b7b
JB
32862018-06-26 Joel Brobecker <brobecker@adacore.com>
3287
3288 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3289 to windows_fetch_one_register, and only handle the case of
3290 fetching one register. Move the code that reloads the context
3291 and iterates over all registers if R is negative to...
3292 (windows_nat_target::fetch_registers): ... here.
3293 (do_windows_store_inferior_registers): Rename to
3294 windows_store_one_register, and only handle the case of storing
3295 one register. Move the code that handles the case where r is
3296 negative to...
3297 (windows_nat_target::store_registers) ... here.
3298
a33ccfc7
TT
32992018-06-26 Tom Tromey <tom@tromey.com>
3300
3301 PR rust/22574:
3302 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3303 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3304 Update.
3305 (rust_internal_print_type): Add podata parameter.
3306 (rust_print_type): Update.
3307
e0c547d1
TT
33082018-06-26 Tom Tromey <tom@tromey.com>
3309
3310 * typeprint.h (struct print_offset_data) <update, finish,
3311 maybe_print_hole>: New methods.
3312 <indentation>: New constant.
3313 * typeprint.c (print_offset_data::indentation): Define.
3314 (print_offset_data::maybe_print_hole, print_offset_data::update)
3315 (print_offset_data::finish): Move from c-typeprint.c and rename.
3316 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3317 (print_spaces_filtered_with_print_options): Update.
3318 (c_print_type_union_field_offset, maybe_print_hole)
3319 (c_print_type_struct_field_offset): Move to typeprint.c and
3320 rename.
3321 (c_type_print_base_struct_union): Update.
3322
75cbc781
PA
33232018-06-25 Pedro Alves <palves@redhat.com>
3324
3325 * gdbthread.h (thread_info_ref, delete_thread)
3326 (delete_thread_silent, first_thread_of_inferior)
3327 (any_thread_of_inferior, switch_to_thread)
3328 (enable_thread_stack_temporaries)
3329 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3330 (get_last_thread_stack_temporary)
3331 (value_in_thread_stack_temporaries, can_access_registers_thread):
3332 Spell out "struct thread_info" instead of just "thread_info".
3333 * inferior.h (notice_new_inferior): Likewise.
3334
b7a08269
PA
33352018-06-25 Pedro Alves <palves@redhat.com>
3336
3337 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3338 pass thread_info pointer to delete_thread.
3339 (windows_nat_target::detach): Pass inferior pointer to
3340 detach_inferior.
3341 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3342 delete_thread.
3343 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3344 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3345 and pass a thread_info pointer to delete_thread.
3346 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3347 pass thread_info pointer to delete_thread.
3348 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3349 delete_thread_silent call.
3350 * procfs.c (procfs_target::detach): Pass inferior pointer to
3351 detach_inferior.
3352 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3353 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3354 delete_thread_silent call.
3355 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3356 pass thread_info pointer to delete_thread.
3357 (windows_nat_target::detach): Pass inferior pointer to
3358 delete_inferior.
3359
8e7767e3
AH
33602018-06-22 Alan Hayward <alan.hayward@arm.com>
3361
3362 * regcache.c (readable_regcache::read_part): Fix asserts.
3363 (reg_buffer::raw_collect_part): New function.
3364 (regcache::write_part): Fix asserts.
3365 (reg_buffer::raw_supply_part): New function.
3366 (regcache::transfer_regset_register): New helper function.
3367 (regcache::transfer_regset): Call new functions.
3368 (regcache_supply_regset): Use gdb_byte*.
3369 (regcache::supply_regset): Likewise.
3370 (regcache_collect_regset): Likewise.
3371 (regcache::collect_regset): Likewise.
3372 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3373 (reg_buffer::raw_supply_part): Likewise.
3374 (regcache::transfer_regset_register): Likewise.
3375 (regcache::transfer_regset): Use gdb_byte*.
3376
bfd60e34
AH
33772018-06-22 Alan Hayward <alan.hayward@arm.com>
3378
3379 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3380
00431a78
PA
33812018-06-21 Pedro Alves <palves@redhat.com>
3382
3383 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3384 instead of a ptid_t. All callers adjusted.
3385 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3386 adjusted.
3387 (print_ada_task_info, display_current_task_id, task_command_1):
3388 Adjust.
3389 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3390 inferior_thread.
3391 (breakpoint_kind): Adjust.
3392 (remove_breakpoints_pid): Rename to ...
3393 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3394 pointer. All callers adjusted.
3395 (bpstat_clear_actions): Use inferior_thread.
3396 (get_bpstat_thread): New.
3397 (bpstat_do_actions): Use it.
3398 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3399 to take a thread_info pointer. All callers adjusted.
3400 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3401 (breakpoint_re_set_thread): Use inferior_thread.
3402 * breakpoint.h (struct inferior): Forward declare.
3403 (bpstat_stop_status): Update.
3404 (remove_breakpoints_pid): Delete.
3405 (remove_breakpoints_inf): New.
3406 * bsd-uthread.c (bsd_uthread_target::wait)
3407 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3408 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3409 (maint_btrace_packet_history_cmd)
3410 (maint_btrace_clear_packet_history_cmd): Adjust.
3411 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3412 inferior_thread.
3413 * cli/cli-interp.c: Include "inferior.h".
3414 * common/refcounted-object.h (struct
3415 refcounted_object_ref_policy): New.
3416 * compile/compile-object-load.c: Include gdbthread.h.
3417 (store_regs): Use inferior_thread.
3418 * corelow.c (core_target::close): Use current_inferior.
3419 (core_target_open): Adjust to use first_thread_of_inferior and use
3420 the current inferior.
3421 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3422 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3423 <thread>: ... this new field. All references adjusted.
3424 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3425 Take a thread_info pointer instead of a ptid_t.
3426 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3427 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3428 thread_info pointer instead of a ptid_t.
3429 * elfread.c: Include "inferior.h".
3430 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3431 Use inferior_thread.
3432 * eval.c (evaluate_subexp): Likewise.
3433 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3434 inferior_thread.
3435 * gdb_proc_service.h (struct thread_info): Forward declare.
3436 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3437 <thread>: ... this new field. All references adjusted.
3438 * gdbarch.h, gdbarch.c: Regenerate.
3439 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3440 'thread' parameter. All implementations and callers adjusted.
3441 * gdbthread.h (thread_info) <set_running>: New method.
3442 (delete_thread, delete_thread_silent): Take a thread_info pointer
3443 instead of a ptid.
3444 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3445 (first_thread_of_process): Delete, replaced by ...
3446 (first_thread_of_inferior): ... this new function. All callers
3447 adjusted.
3448 (any_live_thread_of_process): Delete, replaced by ...
3449 (any_live_thread_of_inferior): ... this new function. All callers
3450 adjusted.
3451 (switch_to_thread, switch_to_no_thread): Declare.
3452 (is_executing): Delete.
3453 (enable_thread_stack_temporaries): Update comment.
3454 <enable_thread_stack_temporaries>: Take a thread_info pointer
3455 instead of a ptid_t. Incref the thread.
3456 <~enable_thread_stack_temporaries>: Decref the thread.
3457 <m_ptid>: Delete
3458 <m_thr>: New.
3459 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3460 (get_last_thread_stack_temporary)
3461 (value_in_thread_stack_temporaries, can_access_registers_thread):
3462 Take a thread_info pointer instead of a ptid_t. All callers
3463 adjusted.
3464 * infcall.c (get_call_return_value): Use inferior_thread.
3465 (run_inferior_call): Work with thread pointers instead of ptid_t.
3466 (call_function_by_hand_dummy): Work with thread pointers instead
3467 of ptid_t. Use thread_info_ref.
3468 * infcmd.c (proceed_thread_callback): Access thread's state
3469 directly.
3470 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3471 access thread's state directly.
3472 (continue_command): Use inferior_thread.
3473 (info_program_command): Use find_thread_ptid and access thread
3474 state directly.
3475 (proceed_after_attach_callback): Use thread state directly.
3476 (notice_new_inferior): Take a thread_info pointer instead of a
3477 ptid_t. All callers adjusted.
3478 (exit_inferior): Take an inferior pointer instead of a pid. All
3479 callers adjusted.
3480 (exit_inferior_silent): New.
3481 (detach_inferior): Delete.
3482 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3483 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3484 (detach_inferior_command, kill_inferior_command): Use
3485 find_inferior_id instead of valid_gdb_inferior_id and
3486 gdb_inferior_id_to_pid.
3487 (inferior_command): Use inferior and thread pointers.
3488 * inferior.h (struct thread_info): Forward declare.
3489 (notice_new_inferior): Take a thread_info pointer instead of a
3490 ptid_t. All callers adjusted.
3491 (detach_inferior): Delete declaration.
3492 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3493 instead of a pid. All callers adjusted.
3494 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3495 (valid_gdb_inferior_id): Delete.
3496 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3497 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3498 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3499 ...
3500 <inf>: ... this new field.
3501 <step_ptid>: Delete, replaced by ...
3502 <step_thread>: ... this new field.
3503 (get_displaced_stepping_state): Take an inferior pointer instead
3504 of a pid. All callers adjusted.
3505 (displaced_step_in_progress_any_inferior): Adjust.
3506 (displaced_step_in_progress_thread): Take a thread pointer instead
3507 of a ptid_t. All callers adjusted.
3508 (displaced_step_in_progress, add_displaced_stepping_state): Take
3509 an inferior pointer instead of a pid. All callers adjusted.
3510 (get_displaced_step_closure_by_addr): Adjust.
3511 (remove_displaced_stepping_state): Take an inferior pointer
3512 instead of a pid. All callers adjusted.
3513 (displaced_step_prepare_throw, displaced_step_prepare)
3514 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3515 All callers adjusted.
3516 (start_step_over): Adjust.
3517 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3518 displaced step queue.
3519 (do_target_resume): Adjust.
3520 (fetch_inferior_event): Use inferior_thread.
3521 (context_switch, get_inferior_stop_soon): Take an
3522 execution_control_state pointer instead of a ptid_t. All callers
3523 adjusted.
3524 (switch_to_thread_cleanup): Delete.
3525 (stop_all_threads): Use scoped_restore_current_thread.
3526 * inline-frame.c: Include "gdbthread.h".
3527 (inline_state) <inline_state>: Take a thread pointer instead of a
3528 ptid_t. All callers adjusted.
3529 <ptid>: Delete, replaced by ...
3530 <thread>: ... this new field.
3531 (find_inline_frame_state): Take a thread pointer instead of a
3532 ptid_t. All callers adjusted.
3533 (skip_inline_frames, step_into_inline_frame)
3534 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3535 pointer instead of a ptid_t. All callers adjusted.
3536 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3537 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3538 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3539 pointers directly.
3540 * linux-nat.c (get_detach_signal): Likewise.
3541 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3542 (thread_db_notice_clone): Adjust.
3543 (thread_db_find_new_threads_silently)
3544 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3545 a thread pointer instead of a ptid_t. All callers adjusted.
3546 * mi/mi-cmd-var.c: Include "inferior.h".
3547 (mi_cmd_var_update_iter): Update to use thread pointers.
3548 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3549 inferior directly.
3550 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3551 out to ...
3552 (mi_output_running): ... this new function.
3553 (mi_on_resume_1): Adjust to use it.
3554 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3555 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3556 directly.
3557 (interrupt_thread_callback): : Adjust to use thread and inferior
3558 pointers.
3559 * proc-service.c: Include "gdbthread.h".
3560 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3561 * progspace-and-thread.c: Include "inferior.h".
3562 * progspace.c: Include "inferior.h".
3563 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3564 hold a reference to an inferior_object.
3565 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3566 inferior_thread.
3567 * python/py-inferior.c (struct inferior_object): Give the type a
3568 tag name instead of a typedef.
3569 (python_on_normal_stop): No need to check if the current thread is
3570 listed.
3571 (inferior_to_inferior_object): Change return type to
3572 inferior_object. All callers adjusted.
3573 (find_thread_object): Delete, bits factored out to ...
3574 (thread_to_thread_object): ... this new function.
3575 * python/py-infthread.c (create_thread_object): Use
3576 inferior_to_inferior_object.
3577 (thpy_is_stopped): Use thread pointer directly.
3578 (gdbpy_selected_thread): Use inferior_thread.
3579 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3580 field, replaced with ...
3581 <thread>: ... this new field. All users adjusted.
3582 (btpy_insn_or_gap_new): Drop const.
3583 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3584 callers adjusted.
3585 * python/py-record.c: Include "gdbthread.h".
3586 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3587 a ptid_t. All callers adjusted.
3588 (gdbpy_current_recording): Use inferior_thread.
3589 * python/py-record.h (recpy_record_object) <ptid>: Delete
3590 field, replaced with ...
3591 <thread>: ... this new field. All users adjusted.
3592 (recpy_element_object) <ptid>: Delete
3593 field, replaced with ...
3594 <thread>: ... this new field. All users adjusted.
3595 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3596 a ptid_t. All callers adjusted.
3597 * python/py-threadevent.c: Include "gdbthread.h".
3598 (get_event_thread): Use thread_to_thread_object.
3599 * python/python-internal.h (struct inferior_object): Forward
3600 declare.
3601 (find_thread_object, find_inferior_object): Delete declarations.
3602 (thread_to_thread_object, inferior_to_inferior_object): New
3603 declarations.
3604 * record-btrace.c: Include "inferior.h".
3605 (require_btrace_thread): Use inferior_thread.
3606 (record_btrace_frame_sniffer)
3607 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3608 (get_thread_current_frame): Use scoped_restore_current_thread and
3609 switch_to_thread.
3610 (get_thread_current_frame): Use thread pointer directly.
3611 (record_btrace_replay_at_breakpoint): Use thread's inferior
3612 pointer directly.
3613 * record-full.c: Include "inferior.h".
3614 * regcache.c: Include "gdbthread.h".
3615 (get_thread_arch_regcache): Use the inferior's address space
3616 directly.
3617 (get_thread_regcache, registers_changed_thread): New.
3618 * regcache.h (get_thread_regcache(thread_info *thread)): New
3619 overload.
3620 (registers_changed_thread): New.
3621 (remote_target) <remote_detach_1>: Swap order of parameters.
3622 (remote_add_thread): <remote_add_thread>: Return the new thread.
3623 (get_remote_thread_info(ptid_t)): New overload.
3624 (remote_target::remote_notice_new_inferior): Use thread pointers
3625 directly.
3626 (remote_target::process_initial_stop_replies): Use
3627 thread_info::set_running.
3628 (remote_target::remote_detach_1, remote_target::detach)
3629 (extended_remote_target::detach): Adjust.
3630 * stack.c (frame_show_address): Use inferior_thread.
3631 * target-debug.h (target_debug_print_thread_info_pp): New.
3632 * target-delegates.c: Regenerate.
3633 * target.c (default_thread_address_space): Delete.
3634 (memory_xfer_partial_1): Use current_inferior.
3635 (target_detach): Use current_inferior.
3636 (target_thread_address_space): Delete.
3637 (generic_mourn_inferior): Use current_inferior.
3638 * target.h (struct target_ops) <thread_address_space>: Delete.
3639 (target_thread_address_space): Delete.
3640 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3641 pointers directly.
3642 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3643 thread pointer instead of a ptid_t. Adjust all callers.
3644 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3645 (first_thread_of_process): Delete, replaced by ...
3646 (first_thread_of_inferior): ... this new function. All callers
3647 adjusted.
3648 (any_thread_of_process): Rename to ...
3649 (any_thread_of_inferior): ... this, and take an inferior pointer.
3650 (any_live_thread_of_process): Rename to ...
3651 (any_live_thread_of_inferior): ... this, and take an inferior
3652 pointer.
3653 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3654 (value_in_thread_stack_temporaries)
3655 (get_last_thread_stack_temporary): Take a thread pointer instead
3656 of a ptid_t. Adjust all callers.
3657 (thread_info::set_running): New.
3658 (validate_registers_access): Use inferior_thread.
3659 (can_access_registers_ptid): Rename to ...
3660 (can_access_registers_thread): ... this, and take a thread
3661 pointer.
3662 (print_thread_info_1): Adjust to compare thread pointers instead
3663 of ptids.
3664 (switch_to_no_thread, switch_to_thread): Make extern.
3665 (scoped_restore_current_thread::~scoped_restore_current_thread):
3666 Use m_thread pointer directly.
3667 (scoped_restore_current_thread::scoped_restore_current_thread):
3668 Use inferior_thread.
3669 (thread_command): Use thread pointer directly.
3670 (thread_num_make_value_helper): Use inferior_thread.
3671 * top.c (execute_command): Use inferior_thread.
3672 * tui/tui-interp.c: Include "inferior.h".
3673 * varobj.c (varobj_create): Use inferior_thread.
3674 (value_of_root_1): Use find_thread_global_id instead of
3675 global_thread_id_to_ptid.
3676
33bab475
AH
36772018-06-21 Alan Hayward <alan.hayward@arm.com>
3678
3679 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3680 possible.
3681 (regcache::write_part): Likewise.
3682 (readable_regcache::cooked_read_part): Update comment.
3683 (readable_regcache::cooked_write_part): Likewise.
3684 * regcache.h: (readable_regcache::read_part): Likewise.
3685 (regcache::write_part): Likewise.
3686
8363f9d5
RB
36872018-06-21 Richard Bunt <richard.bunt@arm.com>
3688 Dirk Schubert <dirk.schubert@arm.com>
3689
3690 * aarch64-linux-nat.c (post_attach): New.
3691 (aarch64_linux_nat_target::post_attach): Override post_attach to
3692 record the number of hardware debug registers.
3693
0d0b0ea2
TT
36942018-06-20 Tom Tromey <tom@tromey.com>
3695
3696 * python/py-param.c (add_setshow_generic): Make parameters const.
3697 (parmpy_init): Update.
3698
302abd6e
SM
36992018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3700
3701 * regcache.h (regcache_cooked_read_ftype): Rename to...
3702 (register_read_ftype): ...this, change type to function_view.
3703 (class reg_buffer) <save>: Remove src parameter.
3704 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3705 parameter non-const in first overload. Remove src parameter in
3706 second overload.
3707 * regcache.c (do_cooked_read): Remove.
3708 (readonly_detached_regcache::readonly_detached_regcache): Make
3709 parameter non-const, adjust call to other constructor.
3710 (reg_buffer::save): Remove src parameter.
3711 * frame.c (do_frame_register_read): Remove.
3712 (frame_save_as_regcache): Use lambda function.
3713 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3714 parameter to ppu2spu_data *.
3715 (ppu2spu_sniffer): Use lambda function.
3716
19f3f25f
SM
37172018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3718
3719 * record-full.c (record_full_target::insert_breakpoint): Remove
3720 "struct" keyword, add const.
3721
d0ac1c44
SM
37222018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3723
3724 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3725 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3726 * configure.ac: Remove AC_PREREQ, add missing quoting.
3727 * gnulib/configure.ac: Modernize usage of
3728 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3729 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3730 (AUTOMAKE_VERSION): Bump to 1.15.1.
3731 * configure: Re-generate.
3732 * config.in: Re-generate.
3733 * aclocal.m4: Re-generate.
3734 * gnulib/aclocal.m4: Re-generate.
3735 * gnulib/config.in: Re-generate.
3736 * gnulib/configure: Re-generate.
3737 * gnulib/import/Makefile.in: Re-generate.
3738
6ae50267
PA
37392018-06-19 Pedro Alves <palves@redhat.com>
3740
3741 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3742 (lookup_minimal_symbol_by_pc_section): ... here with
3743 gdb_assert_not_reached added.
3744
61b04dd0
PA
37452018-06-19 Pedro Alves <palves@redhat.com>
3746
3747 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3748 parameter with a block parameter. Compare location's block symbol
3749 with the frame's block instead of addresses.
3750 (skip_inline_frames): Pass the current block instead of the
3751 frame's address. Break out as soon as we determine the frame
3752 should not be skipped.
3753
f709fabb
TT
37542018-06-18 Tom Tromey <tom@tromey.com>
3755
3756 * solib-aix.c (solib_aix_get_section_offsets): Return
3757 unique_xmalloc_ptr.
3758 (solib_aix_solib_create_inferior_hook): Update.
3759
668eb2f0
TT
37602018-06-18 Tom Tromey <tom@tromey.com>
3761
3762 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3763
309822ca
TT
37642018-06-18 Tom Tromey <tom@tromey.com>
3765
3766 * solib-frv.c (frv_relocate_main_executable): Use
3767 unique_xmalloc_ptr.
3768 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3769 unique_xmalloc_ptr.
3770
06424eac
TT
37712018-06-18 Tom Tromey <tom@tromey.com>
3772
3773 * objfiles.h (inhibit_section_map_updates): Update.
3774 (resume_section_map_updates, resume_section_map_updates_cleanup):
3775 Remove.
3776 * solib-svr4.c (svr4_handle_solib_event): Update.
3777 * objfiles.c (inhibit_section_map_updates): Return
3778 scoped_restore_tmpl<int>.
3779 (resume_section_map_updates, resume_section_map_updates_cleanup):
3780 Remove.
3781
b4be9fad
TT
37822018-06-18 Tom Tromey <tom@tromey.com>
3783
3784 * valprint.h (read_string): Update.
3785 * valprint.c (read_string): Change type of "buffer".
3786 (val_print_string): Update.
3787 * python/py-value.c (valpy_string): Update.
3788 * language.h (struct language_defn) <la_get_string>: Change
3789 type of "buffer".
3790 (default_get_string, c_get_string): Update.
3791 * language.c (default_get_string): Change type of "buffer".
3792 * guile/scm-value.c (gdbscm_value_to_string): Update.
3793 * c-lang.c (c_get_string): Change type of "buffer".
3794
3f0dbd67
TT
37952018-06-18 Tom Tromey <tom@tromey.com>
3796
3797 * ser-mingw.c (struct pipe_state_destroyer): New.
3798 (pipe_state_up): New typedef.
3799 (cleanup_pipe_state): Remove.
3800 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3801
69d340c6
TT
38022018-06-18 Tom Tromey <tom@tromey.com>
3803
3804 * rust-lang.h (rust_yyerror): Don't declare.
3805 * rust-lang.c (rust_language_defn): Update.
3806 * rust-exp.y (yyerror): Now static.
3807 * parse.c (parse_exp_in_context_1): Update.
3808 * p-lang.h (p_yyerror): Don't declare.
3809 * p-lang.c (p_language_defn): Update.
3810 * p-exp.y (yyerror): Now static.
3811 * opencl-lang.c (opencl_language_defn): Update.
3812 * objc-lang.c (objc_language_defn): Update.
3813 * m2-lang.h (m2_yyerror): Don't declare.
3814 * m2-lang.c (m2_language_defn): Update.
3815 * m2-exp.y (yyerror): Now static.
3816 * language.h (struct language_defn) <la_error>: Remove.
3817 * language.c (unk_lang_error): Remove.
3818 (unknown_language_defn, auto_language_defn): Remove.
3819 * go-lang.h (go_yyerror): Don't declare.
3820 * go-lang.c (go_language_defn): Update.
3821 * go-exp.y (yyerror): Now static.
3822 * f-lang.h (f_yyerror): Don't declare.
3823 * f-lang.c (f_language_defn): Update.
3824 * f-exp.y (yyerror): Now static.
3825 * d-lang.h (d_yyerror): Don't declare.
3826 * d-lang.c (d_language_defn): Update.
3827 * d-exp.y (yyerror): Now static.
3828 * c-lang.h (c_yyerror): Don't declare.
3829 * c-lang.c (c_language_defn, cplus_language_defn)
3830 (asm_language_defn, minimal_language_defn): Update.
3831 * c-exp.y (yyerror): Now static.
3832 * ada-lang.h (ada_yyerror): Don't declare.
3833 * ada-lang.c (ada_language_defn): Update.
3834 * ada-exp.y (yyerror): Now static.
3835
e9902bfc
AH
38362018-06-18 Alan Hayward <alan.hayward@arm.com>
3837
3838 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3839 (store_sveregs_to_thread): Likewise.
3840 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3841 (aarch64_linux_store_inferior_registers): Likewise.
3842 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3843 function.
3844 (aarch64_sve_regs_copy_to_regcache): Likewise.
3845 (aarch64_sve_regs_copy_from_regcache): Likewise.
3846 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3847 declaration.
3848 (aarch64_sve_regs_copy_to_regcache): Likewise.
3849 (aarch64_sve_regs_copy_from_regcache): Likewise.
3850 (sve_context): Structure from Linux headers.
3851 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3852 (SVE_SIG_ZREG_SIZE): Likewise.
3853 (SVE_SIG_PREG_SIZE): Likewise.
3854 (SVE_SIG_FFR_SIZE): Likewise.
3855 (SVE_SIG_REGS_OFFSET): Likewise.
3856 (SVE_SIG_ZREGS_OFFSET): Likewise.
3857 (SVE_SIG_ZREG_OFFSET): Likewise.
3858 (SVE_SIG_ZREGS_SIZE): Likewise.
3859 (SVE_SIG_PREGS_OFFSET): Likewise.
3860 (SVE_SIG_PREG_OFFSET): Likewise.
3861 (SVE_SIG_PREGS_SIZE): Likewise.
3862 (SVE_SIG_FFR_OFFSET): Likewise.
3863 (SVE_SIG_REGS_SIZE): Likewise.
3864 (SVE_SIG_CONTEXT_SIZE): Likewise.
3865 (SVE_PT_REGS_MASK): Likewise.
3866 (SVE_PT_REGS_FPSIMD): Likewise.
3867 (SVE_PT_REGS_SVE): Likewise.
3868 (SVE_PT_VL_INHERIT): Likewise.
3869 (SVE_PT_VL_ONEXEC): Likewise.
3870 (SVE_PT_REGS_OFFSET): Likewise.
3871 (SVE_PT_FPSIMD_OFFSET): Likewise.
3872 (SVE_PT_FPSIMD_SIZE): Likewise.
3873 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3874 (SVE_PT_SVE_PREG_SIZE): Likewise.
3875 (SVE_PT_SVE_FFR_SIZE): Likewise.
3876 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3877 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3878 (__SVE_SIG_TO_PT): Likewise.
3879 (SVE_PT_SVE_OFFSET): Likewise.
3880 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3881 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3882 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3883 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3884 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3885 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3886 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3887 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3888 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3889 (SVE_PT_SVE_SIZE): Likewise.
3890 (SVE_PT_SIZE): Likewise.
3891 (HAS_SVE_STATE): New define.
3892
17a1cc89
AH
38932018-06-18 Alan Hayward <alan.hayward@arm.com>
3894
3895 * nat/aarch64-sve-linux-sigcontext.h: New file.
3896 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3897 new files.
3898 (SVE_VQ_MIN): Likewise.
3899 (SVE_VQ_MAX): Likewise.
3900 (SVE_VL_MIN): Likewise.
3901 (SVE_VL_MAX): Likewise.
3902 (SVE_NUM_ZREGS): Likewise.
3903 (SVE_NUM_PREGS): Likewise.
3904 (sve_vl_valid): Likewise.
3905 (struct user_sve_header): Likewise.
3906
7010835a
AB
39072018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3908 Richard Bunt <Richard.Bunt@arm.com>
3909
3910 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3911 was requested by GDB.
3912
479b3ef4
TV
39132018-06-15 Tom de Vries <tdevries@suse.de>
3914
3915 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3916
8199b8f4
SM
39172018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * gnulib/update-gnulib.sh: Print expected versions of
3920 autoconf/aclocal.
3921
55c748a1
SM
39222018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3923
3924 * arch-utils.c (default_type_align): Use type_length_units.
3925 * gdbtypes.c (type_align): Use type_length_units.
3926
87a8eca7
PW
39272018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3928
3929 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3930 of 'define' command.
3931
5d9a0608
TV
39322018-06-14 Tom de Vries <tdevries@suse.de>
3933
3934 PR cli/22573
3935 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3936 get_no_prettyformat_print_options.
3937
ab89b5a5
SM
39382018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * sparc-nat.h: Include target.h.
3941 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3942 <fetch_registers>: Remove this argument in function call.
3943 <store_registers>: Remove this argument in function call, remove
3944 extra semicolon.
3945 <low_forget_process>: Call sparc64_forget_process instead of
3946 sparc_forget_process.
3947
62c808ae
RO
39482018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3949
3950 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3951 (procfs_target::make_corefile_notes): Adjust to new
3952 target_read_alloc return type.
3953
1840d81a
AB
39542018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3955 Stephen Roberts <stephen.roberts@arm.com>
3956
3957 PR gdb/22882
3958 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3959 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3960 Move should_notify_stop local into more inner scope.
3961
9516f85a
AB
39622018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3963 Stephen Roberts <stephen.roberts@arm.com>
3964
3965 PR gdb/22882
3966 * infrun.c (resume_1): Add call to mark_async_event_handler.
3967
defd2172
AB
39682018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3969
3970 * infrun.c (do_target_wait): Change old version of $pc printed.
3971
7b23e087
SM
39722018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3973
3974 * dwarf2read.c (read_index_from_section): Rename to...
3975 (read_gdb_index_from_section): ... this, update all callers.
3976 (dwarf2_read_index): Rename to...
3977 (dwarf2_read_gdb_index): ... this, update all callers.
3978
69c67a0b
JDA
39792018-06-11 John David Anglin <danglin@gcc.gnu.org>
3980
3981 * gdb/hppa-linux-nat.c
3982 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3983 hppa_linux_nat_target::fetch_registers.
3984
65d4cada
AH
39852018-06-11 Alan Hayward <alan.hayward@arm.com>
3986
3987 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3988 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3989 (AARCH64_DWARF_SVE_FFR): Likewise.
3990 (AARCH64_DWARF_SVE_P0): Likewise.
3991 (AARCH64_DWARF_SVE_Z0): Likewise.
3992
f868386e
AH
39932018-06-11 Alan Hayward <alan.hayward@arm.com>
3994
3995 * common/common-regcache.h (raw_compare): New function.
3996 * regcache.c (regcache::raw_compare): Likewise.
3997 * regcache.h (regcache::raw_compare): New declaration.
3998
9c861883
AH
39992018-06-11 Alan Hayward <alan.hayward@arm.com>
4000
4001 * common/common-regcache.h (reg_buffer_common): New structure.
4002 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4003 (reg_buffer::raw_supply): Likewise.
4004 (reg_buffer::raw_supply_integer): Likewise.
4005 (reg_buffer::raw_supply_zeroed): Likewise.
4006 (reg_buffer::raw_collect): Likewise.
4007 (reg_buffer::raw_collect_integer): Likewise.
4008 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4009 (reg_buffer::raw_supply): Likewise.
4010 (reg_buffer::raw_supply_integer): Likewise.
4011 (reg_buffer::raw_supply_zeroed): Likewise.
4012 (reg_buffer::raw_collect): Likewise.
4013 (reg_buffer::raw_collect_integer): Likewise.
4014
953edf2b
TT
40152018-06-10 Tom Tromey <tom@tromey.com>
4016
4017 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4018 (class remote_state) <stop_reply_queue>: Now std::vector.
4019 (remote_state::~remote_state)
4020 (remote_target::stop_reply_queue_length): Update.
4021 (struct queue_iter_param, remove_child_of_pending_fork)
4022 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4023 (check_pending_event_prevents_wildcard_vcont_callback)
4024 (remove_stop_reply_for_inferior)
4025 (remove_stop_reply_of_remote_state)
4026 (remote_notif_remove_once_on_match)
4027 (stop_reply_match_ptid_and_ws)
4028 (remote_kill_child_of_pending_fork): Remove.
4029 (remote_target::remove_new_fork_children)
4030 (remote_target::check_pending_events_prevent_wildcard_vcont)
4031 (remote_target::discard_pending_stop_replies)
4032 (remote_target::discard_pending_stop_replies_in_queue)
4033 (remote_target::remote_notif_remove_queued_reply)
4034 (remote_target::queued_stop_reply)
4035 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4036 (remote_target::wait, remote_target::kill_new_fork_children)
4037 (remote_target::async): Update.
4038
1ddbba9d
TT
40392018-06-10 Tom Tromey <tom@tromey.com>
4040
4041 * record-full.c (record_full_arch_list_cleanups): Remove.
4042 (record_full_message): Use try/catch.
4043 (record_full_wait_cleanups): Remove.
4044 (record_full_wait_1): Use try/catch.
4045 (record_full_restore): Likewise.
4046
219605fd
TT
40472018-06-10 Tom Tromey <tom@tromey.com>
4048
4049 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4050 declare VEC. Add constructor.
4051 <in_target_beneath>: Now bool.
4052 (record_full_breakpoints): Now a std::vector, static.
4053 (record_full_sync_record_breakpoints)
4054 (record_full_init_record_breakpoints)
4055 (record_full_target::insert_breakpoint)
4056 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4057
71b73764
SM
40582018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4059
4060 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4061 * serial.c (serial_interface_lookup): Remove struct keyword.
4062
4360561f
TT
40632018-06-10 Tom Tromey <tom@tromey.com>
4064
4065 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4066 method.
4067 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4068 a method.
4069 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4070 method.
4071 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4072 "beneath" as a method.
4073 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4074 Use "beneath" as a method.
4075
d14b92bf
TT
40762018-06-10 Tom Tromey <tom@tromey.com>
4077
4078 * tracefile.c (struct trace_file_writer_deleter): New.
4079 <operator()>: Rename from trace_file_writer_xfree.
4080 (trace_file_writer_up): New typedef.
4081 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4082
835dcf92
SM
40832018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4084
4085 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4086 <m_registers, m_register_status>: Change type to
4087 std::unique_ptr.
4088 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4089 XCNEWVEC.
4090
aac0d564
SM
40912018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * common/common-regcache.h (enum register_status): Add
4094 underlying type "signed char".
4095 * regcache.h (reg_buffer) <m_register_status>: Change type to
4096 register_status *.
4097 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4098 register_status instead of signed char.
4099 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4100 (reg_buffer::get_register_status): Remove cast.
4101 (readable_regcache::raw_read): Remove cast.
4102 (readable_regcache::cooked_read): Remove cast.
4103
77ad7394
TT
41042018-06-09 Tom Tromey <tom@tromey.com>
4105
4106 * source.c (reverse_search_command, forward_search_command): Use
4107 scoped_fd.
4108
191cca63
TT
41092018-06-09 Tom Tromey <tom@tromey.com>
4110
4111 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4112 (serial_ops_list): Now static, std::vector.
4113 (serial_interface_lookup, serial_add_interface): Update.
4114
c5d0225d
TT
41152018-06-09 Tom Tromey <tom@tromey.com>
4116
4117 * dwarf2read.c (process_cu_includes): Update.
4118 (process_full_comp_unit): Update.
4119 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4120 std::vector.
4121
aeab5128
PK
41222018-06-08 Paul Koning <paul_koning@dell.com>
4123
4124 PR gdb/23252
4125
4126 * python/python.c (do_start_initialization):
4127 Avoid call to internal Python API.
4128 (init__gdb_module): New function.
4129
5045b3d7
GB
41302018-06-08 Gary Benson <gbenson@redhat.com>
4131
4132 * linux-thread-db.c (valprint.h): New include.
4133 (struct check_thread_db_info): New structure.
4134 (check_thread_db_on_load, tdb_testinfo): New static globals.
4135 (check_thread_db, check_thread_db_callback): New functions.
4136 (try_thread_db_load_1): Run integrity checks if requested.
4137 (maintenance_check_libthread_db): New function.
4138 (_initialize_thread_db): Register "maint check libthread-db"
4139 and "maint set/show check-libthread-db".
4140 * NEWS: Mention the above new commands.
4141
2f4f025f
TT
41422018-06-08 Tom Tromey <tom@tromey.com>
4143
4144 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4145 now a method.
4146
343b0027
TT
41472018-06-08 Tom Tromey <tom@tromey.com>
4148
4149 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4150
8dcc53b3
TT
41512018-06-08 Tom Tromey <tom@tromey.com>
4152
4153 * common/btrace-common.h (struct btrace_data): Add constructor,
4154 destructor, move assignment operator.
4155 <empty, clear, fini>: New methods.
4156 <format>: Initialize.
4157 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4158 (btrace_data_empty): Don't declare.
4159 * common/btrace-common.c (btrace_data_init): Remove.
4160 (btrace_data::fini): Rename from btrace_data_fini.
4161 (btrace_data::empty): Rename from btrace_data_empty.
4162 (btrace_data::clear): Rename from btrace_data_clear. Return
4163 bool.
4164 * btrace.h (make_cleanup_btrace_data): Don't declare.
4165 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4166 (parse_xml_btrace): Update.
4167 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4168 (maint_btrace_clear_packet_history_cmd): Update.
4169
a1740ee1
PA
41702018-06-07 Pedro Alves <palves@redhat.com>
4171
4172 * target.h (target_ops) <beneath>: Now a method. All references
4173 updated.
4174 (class target_stack): New.
4175 * target.c (g_target_stack): New.
4176 (g_current_top_target): Delete.
4177 (current_top_target): Get the top target out of g_target_stack.
4178 (target_stack::push, target_stack::unpush): New.
4179 (push_target, unpush_target): Reimplement.
4180 (target_is_pushed): Reimplement in terms of g_target_stack.
4181 (target_ops::beneath, target_stack::find_beneath): New.
4182
d6ca69cd
PA
41832018-06-07 Pedro Alves <palves@redhat.com>
4184
4185 * target.h (find_target_beneath): Delete declaration.
4186 * target.c (find_target_beneath): Delete definition.
4187 * aix-thread.c: All callers of find_target_beneath adjusted to
4188 call target_ops::beneath instead.
4189 * bsd-uthread.c: Likewise.
4190 * linux-thread-db.c: Likewise.
4191 * ravenscar-thread.c: Likewise.
4192 * sol-thread.c: Likewise.
4193 * spu-multiarch.c: Likewise.
4194
b6a8c27b
PA
41952018-06-07 Pedro Alves <palves@redhat.com>
4196
4197 * target.h (target_ops) <beneath>: Now a method. All references
4198 updated.
4199 (target_ops) <m_beneath>: New.
4200 * target.c (target_ops::beneath): New.
4201 * corelow.c: Adjust all references to target_ops::beneath.
4202 * linux-thread-db.c: Likewise.
4203 * make-target-delegates: Likewise.
4204 * record-btrace.c: Likewise.
4205 * record-full.c: Likewise.
4206 * remote.c: Likewise.
4207 * target.c: Likewise.
4208 * target-delegates.c: Regenerate.
4209
8b88a78e
PA
42102018-06-07 Pedro Alves <palves@redhat.com>
4211
4212 * target.h (target_stack): Delete.
4213 (current_top_target): Declare function.
4214 * target.c (target_stack): Delete.
4215 (g_current_top_target): New.
4216 (current_top_target): New function.
4217 * auxv.c: Use current_top_target instead of target_stack
4218 throughout.
4219 * avr-tdep.c: Likewise.
4220 * breakpoint.c: Likewise.
4221 * corefile.c: Likewise.
4222 * elfread.c: Likewise.
4223 * eval.c: Likewise.
4224 * exceptions.c: Likewise.
4225 * frame.c: Likewise.
4226 * gdbarch-selftests.c: Likewise.
4227 * gnu-v3-abi.c: Likewise.
4228 * ia64-tdep.c: Likewise.
4229 * ia64-vms-tdep.c: Likewise.
4230 * infcall.c: Likewise.
4231 * infcmd.c: Likewise.
4232 * infrun.c: Likewise.
4233 * linespec.c: Likewise.
4234 * linux-tdep.c: Likewise.
4235 * minsyms.c: Likewise.
4236 * ppc-linux-nat.c: Likewise.
4237 * ppc-linux-tdep.c: Likewise.
4238 * procfs.c: Likewise.
4239 * regcache.c: Likewise.
4240 * remote.c: Likewise.
4241 * rs6000-tdep.c: Likewise.
4242 * s390-linux-nat.c: Likewise.
4243 * s390-tdep.c: Likewise.
4244 * solib-aix.c: Likewise.
4245 * solib-darwin.c: Likewise.
4246 * solib-dsbt.c: Likewise.
4247 * solib-spu.c: Likewise.
4248 * solib-svr4.c: Likewise.
4249 * solib-target.c: Likewise.
4250 * sparc-tdep.c: Likewise.
4251 * sparc64-tdep.c: Likewise.
4252 * spu-tdep.c: Likewise.
4253 * symfile.c: Likewise.
4254 * symtab.c: Likewise.
4255 * target-descriptions.c: Likewise.
4256 * target-memory.c: Likewise.
4257 * target.c: Likewise.
4258 * target.h: Likewise.
4259 * tracefile-tfile.c: Likewise.
4260 * tracepoint.c: Likewise.
4261 * valops.c: Likewise.
4262 * valprint.c: Likewise.
4263 * value.c: Likewise.
4264 * windows-tdep.c: Likewise.
4265 * mi/mi-main.c: Likewise.
4266
c7110220
TT
42672018-06-07 Tom Tromey <tom@tromey.com>
4268
4269 * valprint.h (build_address_symbolic): Declare.
4270 * printcmd.c (print_address_symbolic): Update.
4271 (build_address_symbolic): Change "name" and "filename" to
4272 std::string.
4273 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4274 Update.
4275 * defs.h (build_address_symbolic): Remove declaration.
4276
63bad7b6
AH
42772018-06-07 Alan Hayward <alan.hayward@arm.com>
4278
4279 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4280 (aarch64_vnv_type): Add function.
4281 (aarch64_pseudo_register_name): Add V regs for SVE.
4282 (aarch64_pseudo_register_type): Likewise.
4283 (aarch64_pseudo_register_reggroup_p): Likewise.
4284 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4285 (aarch64_pseudo_read_value): Add V regs for SVE.
4286 (aarch64_pseudo_write_2): Use V0 offset for SVE
4287 (aarch64_pseudo_write): Add V regs for SVE.
4288 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4289
13e3c608
SDJ
42902018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4291
4292 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4293 (sve_vl_from_vq): Likewise.
4294
c61b06a1
TT
42952018-06-05 Tom Tromey <tom@tromey.com>
4296
4297 * cli/cli-cmds.c (show_version): Update.
4298 * top.c (print_gdb_version): Add "interactive" parameter.
4299 Update.
4300 * main.c (captured_main_1): Update.
4301 * top.h (print_gdb_version): Add "interactive" parameter and a
4302 comment.
4303
115f7325
DM
43042018-06-05 David Malcolm <dmalcolm@redhat.com>
4305
4306 * common/enum-flags.h: Add trailing semicolon to example in
4307 comment.
4308
eb6af809
TT
43092018-06-05 Tom Tromey <tom@tromey.com>
4310
4311 PR cli/12326:
4312 * NEWS: Add entry about pager.
4313 * utils.c (pagination_disabled_for_command): New global.
4314 (prompt_for_continue): Allow "c" response to prompt.
4315 (reinitialize_more_filter): Clear
4316 pagination_disabled_for_command.
4317 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4318
54d343a2
TT
43192018-06-04 Tom Tromey <tom@tromey.com>
4320
4321 * ada-lang.h (ada_lookup_symbol_list): Update.
4322 * ada-lang.c (resolve_subexp): Update.
4323 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4324 parameter.
4325 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4326 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4327 results parameter to std::vector.
4328 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4329 Update.
4330 * ada-exp.y (block_lookup): Update.
4331 (select_possible_type_sym): Change type of syms. Remove nsyms
4332 parameter.
4333 (write_var_or_type, write_name_assoc): Update.
4334
178d6a63
JB
43352018-06-04 Joel Brobecker <brobecker@adacore.com>
4336
4337 * windows-nat.c (windows_nat_target::xfer_partial): Return
4338 TARGET_XFER_E_IO if we need to delegate to the target beneath
4339 but BENEATH is NULL.
4340
baf00c2d
SM
43412018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4342
4343 * Makefile.in (config.status): Add configure.nat as a
4344 dependency.
4345
214b073c
TT
43462018-06-04 Tom Tromey <tom@tromey.com>
4347
4348 * cp-name-parser.y (cpname_state): Add method declarations.
4349 (HANDLE_QUAL): Update.
4350 (cpname_state::d_grab, cpname_state::fill_comp)
4351 (cpname_state::make_operator, cpname_state::make_dtor)
4352 (cpname_state::make_builtin_type, cpname_state::make_name)
4353 (cpname_state::d_qualify, cpname_state::d_int_type)
4354 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4355 (%union): Move earlier.
4356
62b74cb8
AH
43572018-06-04 Alan Hayward <alan.hayward@arm.com>
4358
4359 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4360
3c5cd5c3
AH
43612018-06-04 Alan Hayward <alan.hayward@arm.com>
4362
4363 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4364 (aarch64_pseudo_write_1): Likewise.
4365 (aarch64_pseudo_read_value): Use helper.
4366 (aarch64_pseudo_write): Likewise.
4367
59f413d5
PA
43682018-06-04 Pedro Alves <palves@redhat.com>
4369
4370 * darwin-nat.c (darwin_ops): Delete.
4371 (darwin_attach_pid): Use get_native_target.
4372
1332a140
AH
43732018-06-04 Alan Hayward <alan.hayward@arm.com>
4374
4375 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4376 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4377
ba2d2bb2
AH
43782018-06-04 Alan Hayward <alan.hayward@arm.com>
4379
4380 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4381 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4382 (aarch64_gdbarch_init): Check for SVE.
4383 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4384
43852018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
4386
4387 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4388 * aarch64-tdep.h (aarch64_read_description): Likewise.
4389 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4390 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4391 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4392 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4393 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4394
41c60b4b
SM
43952018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4396
4397 * value.c (value_fetch_lazy_bitfield): New.
4398 (value_fetch_lazy_memory): New.
4399 (value_fetch_lazy_register): New.
4400 (value_fetch_lazy): Factor out to smaller functions.
4401
7b640f72
TT
44022018-06-01 Tom Tromey <tom@tromey.com>
4403
4404 * cp-name-parser.y (backslashable, represented): Now const.
4405
98e69eb3
TT
44062018-06-01 Tom Tromey <tom@tromey.com>
4407
4408 * cp-name-parser.y: Include parser-defs.h.
4409 (parser_fprintf): Remove declaration.
4410
49265499
TT
44112018-06-01 Tom Tromey <tom@tromey.com>
4412
4413 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4414 %parse-param.
4415 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4416 (global_result): Remove globals.
4417 (struct cpname_state): New.
4418 (yyparse): Don't declare.
4419 (yylex, yyerror): Move declarations after %union.
4420 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4421 (make_name): Add state parameter.
4422 Update all callers.
4423 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4424 parameter.
4425 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4426 Update.
4427 (yylex): Add lvalp, state parameters.
4428 (yyerror): Add state parameter.
4429 (cp_demangled_name_to_comp): Update.
4430
55b6c984
TT
44312018-06-01 Tom Tromey <tom@tromey.com>
4432
4433 * cp-name-parser.y (parser_fprintf): Declare.
4434 (GDB_YY_REMAP_PREFIX): Define.
4435 Include yy-remap.h. Don't redefine yy* identifiers.
4436
3513a6bb
TT
44372018-06-01 Tom Tromey <tom@tromey.com>
4438
4439 * python/py-type.c (typy_legacy_template_argument): Update.
4440 * cp-support.h (cp_demangled_name_to_comp): Update.
4441 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4442 parameter to be a "std::string *".
4443 (main): Update.
4444
e9cb46ab
L
44452018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4446
4447 * ada-lex.l: Include "diagnostics.h" instead of
4448 "common/diagnostics.h".
4449 * unittests/environ-selftests.c: Likewise.
4450 * common/diagnostics.h: Moved to ../include.
4451
8e817061
JB
44522018-06-01 Joel Brobecker <brobecker@adacore.com>
4453
4454 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4455 to language_mode_manual while calling breakpoint_re_set_one.
4456
a737d952
TT
44572018-06-01 Tom Tromey <tom@tromey.com>
4458
4459 * valops.c (value_cast_structs, destructor_name_p): Update.
4460 * symtab.c (gdb_mangle_name): Update.
4461 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4462 Update.
4463 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4464 (pascal_object_print_value_fields, pascal_object_print_value):
4465 Update.
4466 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4467 * linespec.c (find_methods): Update.
4468 * gdbtypes.h (type_name_no_tag): Remove.
4469 (type_name_or_error): Rename from type_name_no_tag_or_error.
4470 * gdbtypes.c (type_name_no_tag): Remove.
4471 (type_name_or_error): Rename from type_name_no_tag_or_error.
4472 (lookup_struct_elt_type, check_typedef): Update.
4473 * expprint.c (print_subexp_standard): Update.
4474 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4475 * d-namespace.c (d_lookup_nested_symbol): Update.
4476 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4477 (cp_print_class_member): Update.
4478 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4479 * completer.c (add_struct_fields): Update.
4480 * c-typeprint.c (cp_type_print_derivation_info)
4481 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4482 Update.
4483 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4484 (ada_prefer_type, ada_is_exception_sym): Update.
4485
e86ca25f
TT
44862018-06-01 Tom Tromey <tom@tromey.com>
4487
4488 * valops.c (enum_constant_from_type, value_namespace_elt)
4489 (value_maybe_namespace_elt): Update.
4490 * valarith.c (find_size_for_pointer_math): Update.
4491 * target-descriptions.c (make_gdb_type): Update.
4492 * symmisc.c (print_symbol): Update.
4493 * stabsread.c (define_symbol, read_type)
4494 (complain_about_struct_wipeout, add_undefined_type)
4495 (cleanup_undefined_types_1): Update.
4496 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4497 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4498 (rust_internal_print_type, rust_composite_type)
4499 (rust_evaluate_funcall, rust_evaluate_subexp)
4500 (rust_inclusive_range_type_p): Update.
4501 * python/py-type.c (typy_get_tag): Update.
4502 * p-typeprint.c (pascal_type_print_base): Update.
4503 * mdebugread.c (parse_symbol, parse_type): Update.
4504 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4505 Update.
4506 * guile/scm-type.c (gdbscm_type_tag): Update.
4507 * go-lang.c (sixg_string_p): Update.
4508 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4509 Update.
4510 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4511 (TYPE_TAG_NAME): Remove.
4512 * gdbtypes.c (type_name_no_tag): Simplify.
4513 (check_typedef, check_types_equal, recursive_dump_type)
4514 (copy_type_recursive, arch_composite_type): Update.
4515 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4516 in summary mode when needed.
4517 * eval.c (evaluate_funcall): Update.
4518 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4519 (process_structure_scope, read_enumeration_type)
4520 (read_namespace_type, read_module_type, determine_prefix): Update.
4521 * cp-support.c (inspect_type): Update.
4522 * coffread.c (process_coff_symbol, decode_base_type): Update.
4523 * c-varobj.c (c_is_path_expr_parent): Update.
4524 * c-typeprint.c (c_type_print_base_struct_union): Update.
4525 (c_type_print_base_1): Update. Print struct/class/union/enum in
4526 summary when using C language.
4527 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4528 (gen_maybe_namespace_elt): Update.
4529 * ada-lang.c (ada_type_name): Simplify.
4530 (empty_record, ada_template_to_fixed_record_type_1)
4531 (template_to_static_fixed_type)
4532 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4533
c1ec8cea
TT
45342018-06-01 Tom Tromey <tom@tromey.com>
4535
4536 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4537 c_print_type.
4538 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4539 (c_print_type): Update.
4540 (c_print_type): New overload.
4541 (c_type_print_varspec_prefix, c_type_print_args)
4542 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4543 (c_type_print_base_struct_union, c_type_print_base_1)
4544 (cp_type_print_method_args): Add "language" parameter.
4545 (c_type_print_base): Update.
4546 * c-lang.h (c_print_type): Add new overload.
4547
bc8453a7
TT
45482018-06-01 Tom Tromey <tom@tromey.com>
4549
4550 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4551 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4552
739e8682
AH
45532018-06-01 Alan Hayward <alan.hayward@arm.com>
4554
4555 * aarch64-tdep.c (aarch64_sve_register_names): New const
4556 var.
4557 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4558 (AARCH64_SVE_Z_REGS_NUM): New define.
4559 (AARCH64_SVE_P_REGS_NUM): Likewise.
4560 (AARCH64_SVE_NUM_REGS): Likewise.
4561
8a60efe7
UB
45622018-05-31 Uros Bizjak <ubizjak@gmail.com>
4563
4564 * nat/linux-ptrace.h [__alpha__]
4565 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4566 definitions.
4567
4b2dfa9d
MR
45682018-05-31 Maciej W. Rozycki <macro@mips.com>
4569
4570 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4571 the endianness selected.
4572 * NEWS: Document `set endian auto' mode operation update.
4573
122394f1
AH
45742018-05-31 Alan Hayward <alan.hayward@arm.com>
4575
4576 * Makefile.in: Add new header.
4577 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4578 (sve_vl_from_vg): Likewise.
4579 (sve_vq_from_vl): Likewise.
4580 (sve_vl_from_vq): Likewise.
4581 (sve_vq_from_vg): Likewise.
4582 (sve_vg_from_vq): Likewise.
4583 * configure.nat: Add new c file.
4584 * nat/aarch64-sve-linux-ptrace.c: New file.
4585 * nat/aarch64-sve-linux-ptrace.h: New file.
4586
95228a0d
AH
45872018-05-31 Alan Hayward <alan.hayward@arm.com>
4588
4589 * aarch64-linux-nat.c (aarch64_linux_read_description):
4590 Add parmeter zero.
4591 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4592 Likewise.
4593 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4594 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4595 (aarch64_gdbarch_init): Add parmeter zero.
4596 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4597 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4598 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4599 parmeter.
4600 * doc/gdb.texinfo: Describe SVE feature
4601 * features/aarch64-sve.c: New file.
4602
5969f0db
OJ
46032018-05-31 Omair Javaid <omair.javaid@linaro.org>
4604
4605 PR gdb/23210
4606 * gdbarch.sh (significant_addr_bit): Default to zero when
4607 not set by target architecture.
4608 * gdbarch.c: Re-generated.
4609 * utils.c (address_significant): Update.
4610
61367c61
JB
46112018-05-30 Joel Brobecker <brobecker@adacore.com>
4612
4613 * stack.c (func_command): Remove trailing newline in call to error.
4614
34a79281
SM
46152018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4616
4617 * regcache.h (regcache_raw_collect): Remove, update callers to
4618 use regcache::raw_collect.
4619 * regcache.c (regcache_raw_collect): Remove.
4620
73e1c03f
SM
46212018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4622
4623 * regcache.h (regcache_raw_supply): Remove, update callers to
4624 use detached_regcache::raw_supply.
4625 * regcache.c (regcache_raw_supply): Remove.
4626
e4c4a59b
SM
46272018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4628
4629 * regcache.h (regcache_cooked_write_part): Remove, update
4630 callers to use regcache::cooked_write_part.
4631 * regcache.c (regcache_cooked_write_part): Remove.
4632
73bb0000
SM
46332018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4634
4635 * regcache.h (regcache_cooked_read_part): Remove, update callers
4636 to use readable_regcache::cooked_read_part.
4637 * regcache.c (regcache_cooked_read_part): Remove.
4638
46a45e9d
SM
46392018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4640
4641 * regcache.h (regcache_cooked_read_value): Remove, update
4642 callers to use readable_regcache::cooked_read_value.
4643 * regcache.c (regcache_cooked_read_value): Remove.
4644
b66f5587
SM
46452018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4646
4647 * regcache.h (regcache_cooked_write): Remove, update callers to
4648 use regcache::cooked_write.
4649 * regcache.c (regcache_cooked_write): Remove.
4650
6aa7d724
SM
46512018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4652
4653 * regcache.h (regcache_invalidate): Remove, update callers to
4654 use detached_regcache::invalidate instead.
4655 * regcache.c (regcache_invalidate): Remove.
4656
4f0420fd
SM
46572018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4658
4659 * regcache.h (regcache_raw_write_part): Remove, update callers
4660 to use regcache::raw_write_part instead.
4661 * regcache.c (regcache_raw_write_part): Remove.
4662
502fe83e
SM
46632018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4664
4665 * regcache.h (regcache_raw_read_part): Remove, update callers to
4666 use readable_regcache::raw_read_part instead.
4667 * regcache.c (regcache_raw_read_part): Remove.
4668
dca08e1f
SM
46692018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4670
4671 * regcache.h (regcache_cooked_read): Remove, update callers to
4672 use readable_regcache::cooked_read instead.
4673 * regcache.c (regcache_cooked_read): Remove.
4674
10eaee5f
SM
46752018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4676
4677 * regcache.h (regcache_raw_write): Remove, update callers to use
4678 regcache::raw_write instead.
4679 * regcache.c (regcache_raw_write): Remove.
4680
0b883586
SM
46812018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4682
4683 * regcache.h (regcache_raw_read): Remove, update callers to use
4684 readable_regcache::raw_read instead.
4685 * regcache.c (regcache_raw_read): Remove.
4686
0b47d985
SM
46872018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4688
4689 * regcache.h (regcache_raw_update): Remove, update callers to
4690 use readable_regcache::raw_update instead.
4691 * regcache.c (regcache_raw_update): Remove.
4692
0ec9f114
SM
46932018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4694
4695 * regcache.h (regcache_register_status): Remove, update callers
4696 to use reg_buffer::get_register_status directly instead.
4697 * regcache.c (regcache_register_status): Remove.
4698
222312d3
SM
46992018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4700
4701 * regcache.h (regcache_get_ptid): Remove, update all callers to
4702 call regcache::ptid instead.
4703 * regcache.c (regcache_get_ptid): Remove.
4704
fdbe37e3
SM
47052018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4706
4707 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4708
f7c6f423
PA
47092018-05-30 Pedro Alves <palves@redhat.com>
4710
4711 * common/common-exceptions.h (exception_rethrow): Use
4712 ATTRIBUTE_NORETURN.
4713
52941706
SM
47142018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4715
4716 * breakpoint.c (print_solib_event, check_status_catch_solib):
4717 Remove struct keyword in range-based for loops.
4718 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4719 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4720 Likewise.
4721 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4722 Likewise.
4723 * symfile.c (addr_info_make_relative): Likewise.
4724 * thread.c (value_in_thread_stack_temporaries): Likewise.
4725
bf2977b5
WP
47262018-06-12 Weimin Pan <weimin.pan@oracle.com>
4727
4728 PR gdb/16841
4729 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4730 aggregate type to get its real type before accessing it.
4731
64cc34d8
WP
47322018-05-29 Weimin Pan <weimin.pan@oracle.com>
4733
4734 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4735 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4736 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4737 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4738 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4739 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4740 * printcmd.c (info_address_command): Likewise.
4741
e7ec8713
TT
47422018-05-29 Tom Tromey <tom@tromey.com>
4743
4744 * windows-nat.c (handle_exception): Update fall-through comment.
4745
bcb430e4
TT
47462018-05-29 Tom Tromey <tom@tromey.com>
4747
4748 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4749 (struct program_space) <added_solibs>: Now a std::vector.
4750 * breakpoint.c (print_solib_event): Update.
4751 (check_status_catch_solib): Update.
4752 * progspace.c (clear_program_space_solib_cache): Update.
4753 * solib.c (update_solib_list): Update.
4754
894882e3
TT
47552018-05-29 Tom Tromey <tom@tromey.com>
4756
4757 * python/py-type.c (typy_richcompare): Update.
4758 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4759 * gdbtypes.h (types_deeply_equal): Return bool.
4760 (types_equal): Likewise.
4761 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4762 declare VEC.
4763 (check_types_equal): Change worklist to std::vector. Return
4764 bool.
4765 (struct type_equality_entry): Add constructor.
4766 (compare_maybe_null_strings): Return bool.
4767 (check_types_worklist): Return bool. Change worklist to
4768 std::vector.
4769 (types_deeply_equal): Use std::vector.
4770 (types_equal): Return bool.
4771 (compare_maybe_null_strings): Simplify.
4772
10b2ded4
TT
47732018-05-29 Tom Tromey <tom@tromey.com>
4774
4775 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4776
4f7deebe
TT
47772018-05-29 Tom Tromey <tom@tromey.com>
4778
4779 * objc-lang.h: Don't include cp-support.h.
4780 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4781 declare VEC.
4782
b8283aea
TT
47832018-05-27 Tom Tromey <tom@tromey.com>
4784
4785 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4786
41a883c8
TT
47872018-05-25 Tom Tromey <tom@tromey.com>
4788
4789 * value.c (value::location): Initialize.
4790
bf259e25
TT
47912018-05-25 Tom Tromey <tom@tromey.com>
4792
4793 * dbxread.c (init_bincl_list): Remove.
4794 (bincl_list): Now a std::vector.
4795 (bincls_allocated, next_bincl): Remove.
4796 (free_bincl_list, do_free_bincl_list_cleanup)
4797 (make_cleanup_free_bincl_list): Remove.
4798 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4799 unique_xmalloc_ptr.
4800 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4801 (struct header_file_location): Add constructor.
4802 (add_bincl_to_list): Remove.
4803
d525a99b
TT
48042018-05-25 Tom Tromey <tom@tromey.com>
4805
4806 * tui/tui.c (tui_enable): Update.
4807 * mi/mi-interp.c (mi_interp::init): Update.
4808 * interps.h (class interp) <name>: New method.
4809 <m_name>: Rename from name.
4810 (~scoped_restore_interp): Update.
4811 * interps.c (interp::interp): Update.
4812 (interp_add, interp_set, interp_lookup_existing)
4813 (current_interp_named_p): Update.
4814
da505cff
TT
48152018-05-25 Tom Tromey <tom@tromey.com>
4816
4817 * interps.c (interp_name): Remove.
4818 * mi/mi-interp.c (mi_interp::init): Update.
4819 * interps.h (interp_name): Remove.
4820 (~scoped_restore_interp): Update.
4821 * tui/tui.c (tui_enable): Update.
4822
29f94340
TT
48232018-05-25 Tom Tromey <tom@tromey.com>
4824
4825 * utils.c (fputs_maybe_filtered): Update.
4826 * linespec.c (decode_line_full): Update.
4827 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4828 (mi_print_breakpoint_for_event, mi_solib_loaded)
4829 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4830 (mi_user_selected_context_changed): Update.
4831 * mi/mi-main.c (mi_execute_command): Update.
4832 * cli/cli-script.c (execute_control_command): Update.
4833 * python/python.c (execute_gdb_command): Update.
4834 * solib.c (info_sharedlibrary_command): Update.
4835 * interps.c (interp_ui_out): Remove.
4836 * interps.h (interp_ui_out): Remove.
4837
716b8bc5
TT
48382018-05-25 Tom Tromey <tom@tromey.com>
4839
4840 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4841 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4842 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4843
753ff9bd
TT
48442018-05-25 Tom Tromey <tom@tromey.com>
4845
4846 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4847 * interps.c (interp_exec): Use scoped_restore.
4848
5ca3b260
TT
48492018-05-25 Tom Tromey <tom@tromey.com>
4850
4851 * remote.c (remote_target::remote_file_get): Use
4852 gdb::byte_vector.
4853 (remote_target::remote_file_put): Likewise.
4854
3173aa2f
TT
48552018-05-25 Tom Tromey <tom@tromey.com>
4856
4857 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4858 a std::string.
4859 (get_pe_section_index, add_pe_exported_sym): Update.
4860 (read_pe_exported_syms): Use gdb::def_vector.
4861
09a5e1b5
TT
48622018-05-25 Tom Tromey <tom@tromey.com>
4863
4864 * frame.c (remove_prev_frame): Remove.
4865 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4866
d8dab6c3
MR
48672018-05-25 Maciej W. Rozycki <macro@mips.com>
4868
4869 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4870 Remove prototypes.
4871 * mips-linux-nat.c (supply_fpregset): Always call
4872 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4873 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4874 `mips_fill_fpregset'.
4875 * mips-linux-tdep.c (mips_supply_fpregset)
4876 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4877 (mips_fill_fpregset_wrapper): Remove functions.
4878 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4879 (mips_linux_fpregset): Remove variable.
4880 (mips_linux_iterate_over_regset_sections): Use
4881 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4882 (mips_linux_o32_sigframe_init): Remove comment.
4883
3c69da40
PA
48842018-05-25 Pedro Alves <palves@redhat.com>
4885
4886 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4887 (struct readahead_cache, struct packet_reg, struct
4888 remote_arch_state, class remote_state): Move higher up in the
4889 file.
4890 (remote_target::m_remote_state): Now an object instead of a pointer.
4891 (remote_target::get_remote_state): Adjust.
4892
39f0c204
AB
48932018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4894
4895 * stack.c (select_and_print_frame): Delete.
4896 (struct function_bounds): Move struct within function.
4897 (func_command): Most content moved into new function
4898 find_frame_for_function, use new function, print result, add
4899 function comment.
4900 (find_frame_for_function): New function, now returns a result.
4901
d392224a
PW
49022018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4903
4904 * stack.c (iterate_over_block_arg_vars): Fix comment.
4905 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4906
45f25d6c
AB
49072018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4908
4909 PR gdb/23203
4910 * frame.c
4911 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4912 Define.
4913 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4914 Define.
4915 * frame.h (class scoped_restore_selected_frame): New class.
4916 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4917 of any exception, use scoped_restore_selected_frame to restore the
4918 frame instead.
4919
da05d921
PA
49202018-05-24 Pedro Alves <palves@redhat.com>
4921
4922 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4923 override.
4924
a8be540e
TT
49252018-05-23 Tom Tromey <tom@tromey.com>
4926
4927 * complaints.c (struct complaints): Remove.
4928 (symfile_complaint_book): Remove.
4929 (series): New global.
4930 (complaint_internal): Update.
4931 (clear_complaints): Update.
4932
ff1cf532
TT
49332018-05-23 Tom Tromey <tom@tromey.com>
4934
4935 * complaints.c (counters): New global.
4936 (struct complain): Remove.
4937 (struct complaints) <root>: Remove.
4938 (complaint_sentinel): Remove.
4939 (symfile_complaint_book): Update.
4940 (find_complaint) Remove.
4941 (complaint_internal, clear_complaints): Update.
4942
7ff88174
TT
49432018-05-23 Tom Tromey <tom@tromey.com>
4944
4945 * complaints.c (struct complain) <file, line>: Remove.
4946 (find_complaint): Remove file, line parameters.
4947 (complaint_internal): Update.
4948
de54e1a5
TT
49492018-05-23 Tom Tromey <tom@tromey.com>
4950
4951 * complaints.c (vcomplaint): Remove.
4952 (complaint_internal) Merge in contents of vcomplaint.
4953
2ac237e5
TT
49542018-05-23 Tom Tromey <tom@tromey.com>
4955
4956 * complaints.c (struct complaints) <explanation>: Remove.
4957 (symfile_explanations): Remove.
4958 (symfile_complaint_book): Update.
4959 (vcomplaint): Update.
4960 (struct explanation): Remove.
4961
b98664d3
TT
49622018-05-23 Tom Tromey <tom@tromey.com>
4963
4964 * complaints.c (symfile_complaints): Remove.
4965 (complaint_internal): Remove "complaints" parameter.
4966 (clear_complaints, vcomplaint): Remove "c" parameter.
4967 (get_complaints): Remove.
4968 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4969 (dwarf2_debug_line_missing_file_complaint)
4970 (dwarf2_debug_line_missing_end_sequence_complaint)
4971 (dwarf2_complex_location_expr_complaint)
4972 (dwarf2_const_value_length_mismatch_complaint)
4973 (dwarf2_section_buffer_overflow_complaint)
4974 (dwarf2_macro_malformed_definition_complaint)
4975 (dwarf2_invalid_attrib_class_complaint)
4976 (create_addrmap_from_index, dw2_symtab_iter_next)
4977 (dw2_expand_marked_cus)
4978 (dw2_debug_names_iterator::find_vec_in_debug_names)
4979 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4980 (create_debug_type_hash_table, init_cutu_and_read_dies)
4981 (partial_die_parent_scope, add_partial_enumeration)
4982 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4983 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4984 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4985 (create_cus_hash_table, create_dwp_hash_table)
4986 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4987 (dwarf2_rnglists_process, dwarf2_ranges_process)
4988 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4989 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4990 (handle_struct_member_die, process_structure_scope)
4991 (read_array_type, read_common_block, read_module_type)
4992 (read_tag_pointer_type, read_typedef, read_base_type)
4993 (read_subrange_type, load_partial_dies, partial_die_info::read)
4994 (partial_die_info::read, partial_die_info::read)
4995 (partial_die_info::read, read_checked_initial_length_and_offset)
4996 (dwarf2_string_attr, read_formatted_entries)
4997 (dwarf_decode_line_header)
4998 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4999 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5000 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5001 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5002 (get_signatured_type, get_DW_AT_signature_type)
5003 (decode_locdesc, file_file_name, consume_improper_spaces)
5004 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5005 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5006 (dwarf2_symbol_mark_computed, set_die_type)
5007 (read_attribute_value): Update.
5008 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5009 Update.
5010 * dbxread.c (unknown_symtype_complaint)
5011 (lbrac_mismatch_complaint, repeated_header_complaint)
5012 (set_namestring, function_outside_compilation_unit_complaint)
5013 (read_dbx_symtab, process_one_symbol): Update.
5014 * gdbtypes.c (stub_noname_complaint): Update.
5015 * windows-nat.c (handle_unload_dll): Update.
5016 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5017 (decode_base_type): Update.
5018 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5019 (eb_complaint, record_include_begin, record_include_end)
5020 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5021 (process_xcoff_symbol, read_symbol)
5022 (function_outside_compilation_unit_complaint)
5023 (scan_xcoff_symtab): Update.
5024 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5025 * buildsym.c (finish_block_internal, make_blockvector)
5026 (end_symtab_get_static_block, augment_type_symtab): Update.
5027 * dtrace-probe.c (dtrace_process_dof)
5028 (dtrace_static_probe_ops::get_probes): Update.
5029 * complaints.h (struct complaint): Don't declare.
5030 (symfile_complaints): Remove.
5031 (complaint_internal): Remove "complaints" parameter.
5032 (complaint): Likewise.
5033 (clear_complaints): Likewise.
5034 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5035 (reread_symbols): Update.
5036 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5037 (dwarf2_frame_cache, decode_frame_entry): Update.
5038 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5039 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5040 (info_selectors_command): Update.
5041 * macrotab.c (macro_include, check_for_redefinition)
5042 (macro_undef): Update.
5043 * objfiles.c (filter_overlapping_sections): Update.
5044 * stabsread.c (invalid_cpp_abbrev_complaint)
5045 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5046 (define_symbol, error_type, read_type, rs6000_builtin_type)
5047 (stabs_method_name_from_physname, read_member_functions)
5048 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5049 (attach_fields_to_type, complain_about_struct_wipeout)
5050 (read_range_type, read_args, common_block_start)
5051 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5052 Update.
5053 * mdebugread.c (index_complaint, unknown_ext_complaint)
5054 (basic_type_complaint, bad_tag_guess_complaint)
5055 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5056 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5057 (parse_procedure, parse_lines)
5058 (function_outside_compilation_unit_complaint)
5059 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5060 (bad_tag_guess_complaint, reg_value_complaint): Update.
5061 * cp-support.c (demangled_name_complaint): Update.
5062 * macroscope.c (sal_macro_scope): Update.
5063 * dwarf-index-write.c (class debug_names): Update.
5064
4e9668d0
TT
50652018-05-23 Tom Tromey <tom@tromey.com>
5066
5067 * complaints.c (clear_complaints): Remove "noisy" parameter.
5068 * complaints.h (clear_complaints): Update.
5069 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5070 (reread_symbols): Update.
5071
43ba33c7
TT
50722018-05-23 Tom Tromey <tom@tromey.com>
5073
5074 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5075 SUBSEQUENT_MESSAGE.
5076 (vcomplaint, clear_complaints): Update.
5077 (symfile_explanations): Remove some messages.
5078
2b9496b2
TT
50792018-05-23 Tom Tromey <tom@tromey.com>
5080
5081 * complaints.c (internal_complaint): Remove.
5082 * complaints.h (internal_complaint): Remove.
5083
35f1fea3
MR
50842018-05-22 Maciej W. Rozycki <macro@mips.com>
5085
5086 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5087
6b8edb51
PA
50882018-05-22 Pedro Alves <palves@redhat.com>
5089
5090 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5091 (remote_fileio_badfd, remote_fileio_return_errno)
5092 (remote_fileio_return_success, remote_fileio_func_open)
5093 (remote_fileio_func_open, remote_fileio_func_close)
5094 (remote_fileio_func_read, remote_fileio_func_write)
5095 (remote_fileio_func_lseek, remote_fileio_func_rename)
5096 (remote_fileio_func_unlink, remote_fileio_func_stat)
5097 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5098 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5099 remote_target parameter.
5100 (remote_fio_func_map) <func>: Add remote_target parameter.
5101 (do_remote_fileio_request, remote_fileio_request):
5102 * remote-fileio.h (remote_fileio_request):
5103 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5104 remote_target parameter.
5105 (remote_notif_process, handle_notification): Adjust to pass down
5106 the remote.
5107 (remote_notif_state_allocate): Add remote_target parameter. Save
5108 it.
5109 * remote-notif.h (struct remote_target): Forward declare.
5110 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5111 remote_target parameter.
5112 (struct remote_notif_state) <remote>: New field.
5113 (remote_notif_ack, remote_notif_parse): Add remote_target
5114 parameter.
5115 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5116 remote_target parameter.
5117 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5118 (threads_listing_context, rmt_thread_action, protocol_feature)
5119 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5120 (packet_result, struct threads_listing_context, remote_state):
5121 Move definitions and declarations higher up.
5122 (remote_target) <~remote_target>: Declare.
5123 (remote_download_command_source, remote_file_put, remote_file_get)
5124 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5125 (remote_hostio_pread_vFile, remote_hostio_send_command)
5126 (remote_hostio_set_filesystem, remote_hostio_open)
5127 (remote_hostio_close, remote_hostio_unlink, remote_state)
5128 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5129 (get_memory_write_packet_size, get_memory_read_packet_size)
5130 (append_pending_thread_resumptions, remote_detach_1)
5131 (append_resumption, remote_resume_with_vcont)
5132 (add_current_inferior_and_thread, wait_ns, wait_as)
5133 (process_stop_reply, remote_notice_new_inferior)
5134 (process_initial_stop_replies, remote_add_thread)
5135 (btrace_sync_conf, remote_btrace_maybe_reopen)
5136 (remove_new_fork_children, kill_new_fork_children)
5137 (discard_pending_stop_replies, stop_reply_queue_length)
5138 (check_pending_events_prevent_wildcard_vcont)
5139 (discard_pending_stop_replies_in_queue, stop_reply)
5140 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5141 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5142 (remote_interrupt_as, remote_interrupt_ns)
5143 (remote_get_noisy_reply, remote_query_attached)
5144 (remote_add_inferior, remote_current_thread, get_current_thread)
5145 (set_thread, set_general_thread, set_continue_thread)
5146 (set_general_process, write_ptid)
5147 (remote_unpack_thread_info_response, remote_get_threadinfo)
5148 (parse_threadlist_response, remote_get_threadlist)
5149 (remote_threadlist_iterator, remote_get_threads_with_ql)
5150 (remote_get_threads_with_qxfer)
5151 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5152 (get_offsets, remote_check_symbols, remote_supported_packet)
5153 (remote_query_supported, remote_packet_size)
5154 (remote_serial_quit_handler, remote_detach_pid)
5155 (remote_vcont_probe, remote_resume_with_hc)
5156 (send_interrupt_sequence, interrupt_query)
5157 (remote_notif_get_pending_events, fetch_register_using_p)
5158 (send_g_packet, process_g_packet, fetch_registers_using_g)
5159 (store_register_using_P, store_registers_using_G)
5160 (set_remote_traceframe, check_binary_download)
5161 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5162 (remote_xfer_live_readonly_partial, remote_read_bytes)
5163 (remote_send_printf, remote_flash_write, readchar)
5164 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5165 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5166 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5167 (extended_remote_disable_randomization, extended_remote_run)
5168 (send_environment_packet, extended_remote_environment_support)
5169 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5170 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5171 (packet_command): Now methods of ...
5172 (remote_target): ... this class.
5173 (m_remote_state) <remote_target>: New field.
5174 (struct remote_state) <stop_reply_queue,
5175 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5176 fields.
5177 (remote_state::remote_state): Allocate stop_reply_queue.
5178 (remote_state): Delete global.
5179 (get_remote_state_raw): Delete.
5180 (remote_target::get_remote_state): Allocate m_remote_state on
5181 demand.
5182 (get_current_remote_target): New.
5183 (remote_ops, extended_remote_ops): Delete.
5184 (wait_forever_enabled_p, remote_async_inferior_event_token):
5185 Delete, moved to struct remote_state.
5186 (remote_target::close): Delete self. Destruction bits split to
5187 ...
5188 (remote_target::~remote_target): ... this.
5189 (show_memory_packet_size): Adjust to use
5190 get_current_remote_target.
5191 (struct protocol_feature) <func>: Add remote_target parameter.
5192 All callers adjusted.
5193 (curr_quit_handler_target): New.
5194 (remote_serial_quit_handler): Reimplement.
5195 (remote_target::open_1): Adjust to use get_current_remote_target.
5196 Heap-allocate remote_target/extended_remote_target instances.
5197 (vcont_builder::vcont_builder): Add remote_target parameter, and
5198 save it in m_remote. All callers adjusted.
5199 (vcont_builder::m_remote): New field.
5200 (vcont_builder::restart, vcont_builder::flush)
5201 (vcont_builder::push_action): Use it.
5202 (remote_target::commit_resume): Use it.
5203 (struct queue_iter_param) <remote>: New field.
5204 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5205 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5206 (check_pending_event_prevents_wildcard_vcont_callback)
5207 (remote_target::check_pending_events_prevent_wildcard_vcont)
5208 (remote_target::discard_pending_stop_replies)
5209 (remote_target::discard_pending_stop_replies_in_queue)
5210 (remote_target::remote_notif_remove_queued_reply): Fill in
5211 'remote' field.
5212 (remote_notif_get_pending_events): New.
5213 (remote_target::readchar, remote_target::remote_serial_write):
5214 Save/restore curr_quit_handler_target.
5215 (putpkt): New.
5216 (kill_new_fork_children): Fill in 'remote' field.
5217 (packet_command): Use get_current_remote_target, defer to
5218 remote_target method of same name.
5219 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5220 parameter, and save it in m_remote. All callers adjusted.
5221 (scoped_remote_fd::release): Use m_remote.
5222 (scoped_remote_fd::m_remote): New field.
5223 (remote_file_put, remote_file_get, remote_file_delete): Use
5224 get_current_remote_target, defer to remote_target method of same
5225 name.
5226 (remote_btrace_reset): Add remote_state paremeter. Update all
5227 callers.
5228 (remote_async_inferior_event_handler). Pass down 'data'.
5229 (remote_new_objfile): Use get_current_remote_target.
5230 (remote_target::vcont_r_supported): New.
5231 (set_range_stepping): Use get_current_remote_target and
5232 remote_target::vcont_r_supported.
5233 (_initialize_remote): Don't allocate 'remote_state' and
5234 'stop_reply_queue' globals.
5235 * remote.h (struct remote_target): Forward declare.
5236 (getpkt, putpkt, remote_notif_get_pending_events): Add
5237 'remote_target' parameter.
5238
f5db4863
PA
52392018-05-22 Pedro Alves <palves@redhat.com>
5240
5241 * remote.c (vcont_builder): Now a class. Make all data members
5242 private.
5243 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5244 Declare methods.
5245 (vcont_builder_restart): Rename to ...
5246 (vcont_builder::restart): ... this.
5247 (vcont_builder_flush): Rename to ...
5248 (vcont_builder::flush): ... this.
5249 (vcont_builder_push_action): Rename to ...
5250 (vcont_builder::push_action): ... this.
5251 (remote_target::commit_resume): Adjust.
5252
cc0be08f
PA
52532018-05-22 Pedro Alves <palves@redhat.com>
5254
5255 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5256 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5257 (get_fixed_memory_packet_size): New.
5258 (get_memory_packet_size): Use it.
5259 (set_memory_packet_size): Don't override the config size with
5260 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5261 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5262 Don't refer to get_memory_packet_size if not connected to a remote
5263 target. Show "(default)" if configured size is 0.
5264
9607784a
PA
52652018-05-22 Pedro Alves <palves@redhat.com>
5266
5267 * remote.c (remote_target::mourn_inferior): Move
5268 discard_pending_stop_replies call here from ...
5269 (_initialize_remote): ... here.
5270
0e9a6b2f
PA
52712018-05-22 Pedro Alves <palves@redhat.com>
5272
5273 * remote.c (compare_section_command): Remove set_general_process
5274 call.
5275
43c3a0e4
PA
52762018-05-22 Pedro Alves <palves@redhat.com>
5277
5278 * remote.c (struct packet_reg, struct remote_arch_state):
5279 Move higher up in the file.
5280 (remote_state) <m_arch_states>: Store remote_arch_state values
5281 instead of remote_arch_state pointers.
5282 (remote_state::get_remote_arch_state): Adjust.
5283
9d6eea31
PA
52842018-05-22 Pedro Alves <palves@redhat.com>
5285
5286 * remote.c: Include <unordered_map>.
5287 (remote_state): Now a class.
5288 (remote_state) <get_remote_arch_state>: Declare method.
5289 <get_remote_arch_state>: New field.
5290 (remote_arch_state) <remote_arch_state>: Declare ctor.
5291 <regs>: Now a unique_ptr.
5292 (remote_gdbarch_data_handle): Delete.
5293 (get_remote_arch_state): Delete.
5294 (remote_state::get_remote_arch_state): New.
5295 (get_remote_state): Adjust to call remote_state's
5296 get_remote_arch_state method.
5297 (init_remote_state): Delete, bits factored out to ...
5298 (remote_arch_state::remote_arch_state): ... this new method.
5299 (get_remote_packet_size, get_memory_packet_size)
5300 (process_g_packet, remote_target::fetch_registers)
5301 (remote_target::prepare_to_store, store_registers_using_G)
5302 (remote_target::store_registers, remote_target::get_trace_status):
5303 Adjust to call remote_state's method.
5304 (_initialize_remote): Remove reference to
5305 remote_gdbarch_data_handle.
5306
dd194f6b
PA
53072018-05-22 Pedro Alves <palves@redhat.com>
5308
5309 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5310 pread>: New method declarations.
5311 (remote_target::open_1): Adjust.
5312 (readahead_cache_invalidate): Rename to ...
5313 (readahead_cache::invalidate): ... this, and adjust to be a class
5314 method.
5315 (readahead_cache_invalidate_fd): Rename to ...
5316 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5317 class method.
5318 (remote_hostio_pwrite): Adjust.
5319 (remote_hostio_pread_from_cache): Rename to ...
5320 (readahead_cache::pread): ... this, and adjust to be a class
5321 method.
5322 (remote_hostio_close): Adjust.
5323
440b7aec
PA
53242018-05-22 Pedro Alves <palves@redhat.com>
5325
5326 * remote.c (remote_hostio_close_cleanup): Delete.
5327 (class scoped_remote_fd): New.
5328 (remote_file_put, remote_file_get): Use it.
5329
de44f5a7
PA
53302018-05-22 Pedro Alves <palves@redhat.com>
5331
5332 (struct vCont_action_support): Use bool and initialize all fields.
5333 (struct readahead_cache): Initialize all fields.
5334 (remote_state): Use bool and initialize all fields.
5335 (remote_state::remote_state, remote_state::~remote_state): New.
5336 (new_remote_state): Delete.
5337 (_initialize_remote): Use new to allocate remote_state.
5338
b1b60145
PA
53392018-05-22 Pedro Alves <palves@redhat.com>
5340 張俊芝 <zjz@zjz.name>
5341
5342 PR gdb/22973
5343 * c-exp.y: Include "c-support.h".
5344 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5345 of tolower. Use c_ident_is_alpha to scan names.
5346 * c-lang.c: Include "c-support.h".
5347 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5348 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5349 * c-support.h: New file, with bits factored out from ...
5350 * cp-name-parser.y: ... this file.
5351 Include "c-support.h".
5352 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5353 c-support.h and renamed.
5354 (symbol_end, yylex): Adjust.
5355
0ec848ad
PFC
53562018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5357
5358 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5359 parameter type to CORE_ADDR.
5360 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5361 parameter type in declaration to CORE_ADDR.
5362 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5363 target_auxv_search to get AT_HWCAP and use the result to get the
5364 target description.
5365 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5366 to CORE_ADDR. Remove the cast of the return value to unsigned
5367 long. Fix error predicate of target_auxv_search.
5368 (ppc_linux_nat_target::read_description): Change the type of the
5369 hwcap variable to CORE_ADDR.
5370
0fb2aaa1
PFC
53712018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5372
5373 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5374 if the size of fpscr is larger than 32 bits.
5375
2c3305f6
PFC
53762018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5377
5378 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5379 (ppc32_linux_vsxregmap): New global.
5380 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5381 regcache_supply_regset, and regcache_collect_regset.
5382 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5383 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5384 (fetch_vsx_register, store_vsx_register): Remove.
5385 (fetch_vsx_registers): Add regno parameter. Get regset using
5386 ppc_linux_vsxregset. Use regset to supply registers.
5387 (store_vsx_registers): Add regno parameter. Get regset using
5388 ppc_linux_vsxregset. Use regset to collect registers.
5389 (fetch_register): Call fetch_vsx_registers instead of
5390 fetch_vsx_register.
5391 (store_register): Call store_vsx_registers instead of
5392 store_vsx_register.
5393 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5394 new regno parameter.
5395 (store_ppc_registers): Call store_vsx_registers with -1 for the
5396 new regno parameter.
5397 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5398 (ppc_collect_vsxregset): Remove.
5399
1d75a658
PFC
54002018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5401
5402 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5403 offset fields.
5404 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5405 for vector register offset fields.
5406 (ppc64_fbsd_reg_offsets): Likewise.
5407 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5408 to vector register offset fields.
5409 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5410 to vector register offset fields.
5411 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5412 vector register offset fields.
5413 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5414 initializers for vector register offset fields.
5415 (rs6000_aix64_reg_offsets): Likewise.
5416 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5417 (ppc_supply_vrregset): Remove.
5418 (ppc_collect_vrregset): Remove.
5419 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5420 (ppc_linux_vrregset) : New function.
5421 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5422 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5423 (ppc32_linux_vrregset): Remove.
5424 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5425 and use result instead of ppc32_linux_vrregset.
5426 (ppc32_linux_reg_offsets): Remove initializers for vector register
5427 offset fields.
5428 (ppc64_linux_reg_offsets): Likewise.
5429 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5430 * ppc-linux-nat.c: Include regset.h.
5431 (gdb_vrregset_t): Adjust comment to account for little-endian
5432 mode.
5433 (supply_vrregset, fill_vrregset): Remove.
5434 (fetch_altivec_register, store_altivec_register): Remove.
5435 (fetch_altivec_registers): Add regno parameter. Get regset using
5436 ppc_linux_vrregset. Use regset to supply registers.
5437 (store_altivec_registers): Add regno parameter. Get regset using
5438 ppc_linux_vrregset. Use regset to collect registers.
5439 (fetch_register): Call fetch_altivec_registers instead of
5440 fetch_altivec_register.
5441 (store_register): Call store_altivec_registers instead of
5442 store_altivec_register.
5443 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5444 the new regno parameter.
5445 (store_ppc_registers): Call store_altivec_registers with -1 for
5446 the new regno parameter.
5447
d078308a
PFC
54482018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5449
5450 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5451 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5452 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5453 (gdb_vrregset_t): Change array type size to
5454 PPC_LINUX_SIZEOF_VRREGSET.
5455 (gdb_vsxregset_t): Change array type size to
5456 PPC_LINUX_SIZEOF_VSXREGSET.
5457 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5458 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5459 PPC_LINUX_SIZEOF_VSXREGSET.
5460
2e077f5e
PFC
54612018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5462
5463 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5464 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5465 nat/ppc-linux.c.
5466 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5467 ppc_linux_target_wordsize with tid.
5468 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5469 wordsize with tid.
5470 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5471 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5472 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5473 tid parameter. Remove static specifier.
5474 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5475 (ppc_linux_target_wordsize): New declaration.
5476
bd64614e
PFC
54772018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5478
5479 * arch/ppc-linux-common.c: New file.
5480 * arch/ppc-linux-common.h: New file.
5481 * arch/ppc-linux-tdesc.h: New file.
5482 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5483 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5484 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5485 arch/ppc-linux-tdesc.h.
5486 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5487 arch/ppc-linux-tdesc.h.
5488 (ppc_linux_nat_target::read_description): Remove target
5489 description matching code. Fill a ppc_linux_features struct and
5490 call ppc_linux_match_description with it. Move comment about ISA
5491 2.05 to ppc-linux-common.c.
5492 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5493 arch/ppc-linux-tdesc.h.
5494 (ppc_linux_core_read_description): Remove target description
5495 matching code. Fill a ppc_linux_features struct and call
5496 ppc_linux_match_description with it.
5497 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5498 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5499 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5500 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5501 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5502 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5503 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5504 (tdesc_powerpc_e500l): Remove.
5505
241db429
JB
55062018-05-22 Joel Brobecker <brobecker@adacore.com>
5507
5508 * ada-lang.c (catch_assert_command): Pass empty string instead
5509 of NULL for excep_string argument.
5510
75d74cca
MR
55112018-05-22 Maciej W. Rozycki <macro@mips.com>
5512
5513 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5514 the width of the requested register exceeds the width of the
5515 `ptrace' data type.
5516
122b53ea
TT
55172018-05-21 Tom Tromey <tom@tromey.com>
5518
5519 * printcmd.c (output_command): Remove.
5520 (output_command_const): Rename to output_command.
5521 * valprint.h (output_command): Rename from output_command_const.
5522 * tracepoint.c (trace_dump_actions): Call output_command.
5523
bc18fbb5
TT
55242018-05-21 Tom Tromey <tom@tromey.com>
5525
5526 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5527 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5528 * ada-lang.h (create_ada_exception_catchpoint): Update.
5529 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5530 std::string.
5531 (create_excep_cond_exprs, ~ada_catchpoint)
5532 (should_stop_exception, print_one_exception)
5533 (print_mention_exception, print_recreate_exception): Update.
5534 (ada_get_next_arg): Remove.
5535 (catch_ada_exception_command_split): Use std::string. Change type
5536 of "excep_string", "cond_string".
5537 (catch_ada_exception_command): Update.
5538 (create_ada_exception_catchpoint): Change type of excep_string.
5539 (ada_exception_sal): Remove excep_string parameter.
5540 (~ada_catchpoint): Remove.
5541
790217f6
TT
55422018-05-21 Tom Tromey <tom@tromey.com>
5543
5544 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5545 cleanup.
5546
6f46ac85
TT
55472018-05-21 Tom Tromey <tom@tromey.com>
5548
5549 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5550 Return unique_xmalloc_ptr.
5551 (print_it_exception): Update.
5552
15b6611c
TT
55532018-05-21 Tom Tromey <tom@tromey.com>
5554
5555 * tracepoint.c (trace_dump_actions): Use std::string.
5556
c0c9f665
TT
55572018-05-21 Tom Tromey <tom@tromey.com>
5558
5559 * symfile.c (reread_symbols): Use std::string for original_name.
5560
22ca247e
TT
55612018-05-21 Tom Tromey <tom@tromey.com>
5562
5563 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5564 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5565 constructor.
5566
184cde75
SM
55672018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5568
5569 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5570 instance to...
5571 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5572 * objfiles.c (get_objfile_bfd_data): Allocate
5573 objfile_per_bfd_storage with obstack_new when allocating on
5574 obstack.
5575
e39db4db
SM
55762018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5577
5578 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5579 OBSTACK_ZALLOC.
5580 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5581 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5582 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5583 (add_pending): Likewise.
5584 (parse_symbol): Likewise.
5585 (parse_partial_symbols): Likewise.
5586 (psymtab_to_symtab_1): Likewise.
5587 (new_psymtab): Likewise.
5588 (elfmdebug_build_psymtabs): Likewise.
5589 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5590 * objfiles.c (get_objfile_bfd_data): Likewise.
5591 (objfile_register_static_link): Likewise.
5592 * psymtab.c (allocate_psymtab): Likewise.
5593 * stabsread.c (read_member_functions): Likewise.
5594 * xcoffread.c (xcoff_end_psymtab): Likewise.
5595
284a0e3c
SM
55962018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5597
5598 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5599 compiler supports std::is_trivially_constructible.
5600 * common/poison.h: Include obstack.h.
5601 (IsMallocable): Define to is_trivially_constructible if the
5602 compiler supports it, define to true_type otherwise.
5603 (xobnew): New.
5604 (XOBNEW): Redefine.
5605 (xobnewvec): New.
5606 (XOBNEWVEC): Redefine.
5607 * gdb_obstack.h (obstack_zalloc): New.
5608 (OBSTACK_ZALLOC): Redefine.
5609 (obstack_calloc): New.
5610 (OBSTACK_CALLOC): Redefine.
5611 (obstack_new): New.
5612 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5613 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5614 gdbarch.c.
5615 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5616 obstack_calloc/obstack_zalloc.
5617 (gdbarch_obstack_zalloc): Remove.
5618 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5619
59f66be3
PW
56202018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5621
5622 * stack.c (backtrace_command_1): Remove useless variable int i.
5623
50c65c2d
PW
56242018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5625
5626 * stack.c (print_frame_info): Fix comment.
5627
7ff8cb8c
TT
56282018-05-18 Tom Tromey <tom@tromey.com>
5629
5630 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5631 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5632 (~dwarf2_per_objfile): Update
5633 (dwarf2_get_dwz_file): Use new.
5634 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5635 unique_ptr.
5636
400174b1
TT
56372018-05-18 Tom Tromey <tom@tromey.com>
5638
5639 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5640 unique_ptr.
5641 * dwarf2read.c (struct dwp_file): Add constructor and
5642 initializers.
5643 (open_and_init_dwp_file): Return a unique_ptr.
5644 (dwarf2_per_objfile, create_dwp_hash_table)
5645 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5646 (lookup_dwo_unit_in_dwp): Update.
5647 (open_and_init_dwp_file, get_dwp_file): Update.
5648
3063847f
TT
56492018-05-18 Tom Tromey <tom@tromey.com>
5650
5651 * dwarf2read.c (dwarf2_per_objfile): Update.
5652 (struct mapped_index): Add initializers.
5653 (dwarf2_read_index): Use new.
5654 (dw2_symtab_iter_init): Update.
5655 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5656 unique_ptr.
5657
d3d02dee
SM
56582018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5659
5660 * dwarf2read.c (mapped_index) <total_size>: Remove.
5661
1d143c36
SM
56622018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5663
5664 * unittests/format_pieces-selftests.c (test_format_specifier):
5665 Add ARI comments.
5666
ce1e8424
TT
56672018-05-18 Tom Tromey <tom@tromey.com>
5668
5669 * c-typeprint.c (maybe_print_hole): New function.
5670 (c_print_type_struct_field_offset): Update.
5671 (c_type_print_base_struct_union): Call maybe_print_hole.
5672
ddfe970e
KS
56732018-05-17 Keith Seitz <keiths@redhat.com>
5674
5675 * breakpoint.c (build_bpstat_chain): New function, moved from
5676 bpstat_stop_status.
5677 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5678 If no stop chain is passed, call build_bpstat_chain to build it.
5679 * breakpoint.h (build_bpstat_chain): Declare.
5680 (bpstat_stop_status): Move documentation here from breakpoint.c.
5681 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5682 build the stop chain and pass it to skip_inline_frames.
5683 Pass this stop chain to bpstat_stop_status.
5684 * inline-frame.c: Include breakpoint.h.
5685 (stopped_by_user_bp_inline_frame): New function.
5686 (skip_inline_frames): Add parameter `stop_chain'.
5687 Move documention to inline-frame.h.
5688 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5689 whether the frame should be elided.
5690 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5691 Add moved documentation and update for new parameter.
5692
b17992c1
SM
56932018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5694
5695 PR cli/14975
5696 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5697 unittests/format_pieces-selftests.c.
5698 * common/format.h (format_piece) <operator==>: New.
5699 (format_pieces) <operator[]>: Remove.
5700 * common/format.c (format_pieces::format_pieces): Handle \e.
5701 * unittests/format_pieces-selftests.c: New.
5702
58f0c718
TT
57032018-05-17 Tom Tromey <tom@tromey.com>
5704
5705 PR symtab/23010:
5706 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5707 (dw2_instantiate_symtab): Add skip_partial parameter.
5708 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5709 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5710 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5711 (dw2_expand_symtabs_matching_one)
5712 (dw2_find_pc_sect_compunit_symtab)
5713 (dw2_debug_names_lookup_symbol)
5714 (dw2_debug_names_expand_symtabs_for_function): Update.
5715 (init_cutu_and_read_dies): Add skip_partial parameter.
5716 (process_psymtab_comp_unit, build_type_psymtabs_1)
5717 (process_skeletonless_type_unit, load_partial_comp_unit)
5718 (psymtab_to_symtab_1): Update.
5719 (load_full_comp_unit): Add skip_partial parameter.
5720 (process_imported_unit_die, dwarf2_read_addr_index)
5721 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5722 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5723 (read_signatured_type): Update.
5724
3e618834
SM
57252018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5726
5727 * value.c (release_value): Remove unused variable.
5728 (record_latest_value): Likewise.
5729 (access_value_history): Likewise.
5730 (preserve_values): Likewise.
5731
fe10fe31
TT
57322018-05-17 Tom Tromey <tom@tromey.com>
5733
5734 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5735 Initialize.
5736
1d761124
MR
57372018-05-16 Maciej W. Rozycki <macro@mips.com>
5738
5739 PR gdb/22286
5740 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5741 Also handle registers whose width is not a multiple of
5742 PTRACE_TYPE_RET.
5743 (linux_nat_trad_target::store_register): Likewise.
5744
06333fea
TT
57452018-05-16 Tom Tromey <tom@tromey.com>
5746
5747 * gdbcore.h (core_bfd): Redefine.
5748 * corelow.c (core_target::close): Update.
5749 (core_target_open): Update.
5750 * progspace.h (struct program_space) <cbfd>: Now a
5751 gdb_bfd_ref_ptr.
5752
921222e2
TT
57532018-05-16 Tom Tromey <tom@tromey.com>
5754
5755 PR cli/19551:
5756 * symfile-add-flags.h (enum symfile_add_flags)
5757 <SYMFILE_NOT_FILENAME>: New constant.
5758 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5759 objfile name from BFD.
5760 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5761 * minidebug.c (find_separate_debug_file_in_section): Put
5762 ".gnu_debugdata" into BFD's file name.
5763
3acb7083
SM
57642018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5765
5766 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5767 Remove.
5768
561a72d4
TC
57692018-05-15 Tamar Christina <tamar.christina@arm.com>
5770
5771 PR binutils/21446
5772 * aarch64-tdep.c (aarch64_analyze_prologue,
5773 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5774 Indicate not interested in errors.
5775
4e6ff0e1
MR
57762018-05-15 Maciej W. Rozycki <macro@mips.com>
5777
5778 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5779 Supply the MIPS_ZERO_REGNUM register.
5780
ea33cd92
MR
57812018-05-15 Maciej W. Rozycki <macro@mips.com>
5782
5783 * mips-tdep.c (mask_address_var): Make variable static.
5784
2d79090e
TT
57852018-05-14 Tom Tromey <tom@tromey.com>
5786
5787 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5788
cf4912ae
AB
57892018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5790
5791 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5792 FXSAVE_ADDR for the mxcsr register.
5793
67e6f569
MF
57942018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5795
5796 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5797
15244507
PA
57982018-05-11 Pedro Alves <palves@redhat.com>
5799
5800 * corelow.c (core_target) <core_target>: No longer inline.
5801 Initialize m_core_gdbarch, m_core_vec and build the section table
5802 here.
5803 <~core_target>: New.
5804 <core_gdbarch, get_core_register_section>: New methods.
5805 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5806 factored out from ...
5807 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5808 (core_ops): Delete.
5809 (sniff_core_bfd): Add gdbarch parameter.
5810 (core_close): Delete, merged into ...
5811 (core_target::close): ... here. Delete self.
5812 (core_close_cleanup): Delete.
5813 (core_target_open): Allocate a core_target on the heap. Use a
5814 unique_ptr instead of a cleanup. Bits moved into the core_target
5815 ctor. Adjust to use core_target methods instead of globals.
5816 (get_core_register_section): Rename to ...
5817 (core_target::get_core_register_section): ... this and adjust.
5818 (struct get_core_registers_cb_data): New.
5819 (get_core_registers_cb): Use it. Use bool.
5820 (core_target::fetch_registers, core_target::files_info)
5821 (core_target::xfer_partial, core_target::read_description)
5822 (core_target::pid_to, core_target::thread_name): Adjust to
5823 reference class fields instead of globals.
5824 * target.h (struct target_ops_deleter, target_ops_up): New.
5825
451953fa
PA
58262018-05-11 Pedro Alves <palves@redhat.com>
5827
5828 * corefile.c (core_file_command): Move to corelow.c.
5829 * corelow.c (the_core_target): Delete.
5830 (core_file_command): Moved from corefile.c. Check exec_bfd
5831 instead of the_core_target. Use target_detach instead of calling
5832 into the_core_target directly.
5833 (maybe_say_no_core_file_now): New.
5834 (core_target::detach): Use it.
5835 (_initialize_corelow): Remove references to the_core_target.
5836 * gdbcore.h (the_core_target): Delete.
5837
e540a5a2 58382018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 5839 Pedro Alves <palves@redhat.com>
e540a5a2
TT
5840
5841 * corefile.c (core_bfd): Remove.
5842 * gdbcore.h (core_bfd): Now a macro.
5843 * progspace.h (struct program_space) <cbfd>: New field.
5844
633cf254
TT
58452018-05-11 Tom Tromey <tom@tromey.com>
5846
5847 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5848 gdb::def_vector.
5849
1a34f210
TT
58502018-05-10 Tom Tromey <tom@tromey.com>
5851
5852 * configure: Rebuild.
5853 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5854
190852c8
JB
58552018-05-10 Joel Brobecker <brobecker@adacore.com>
5856
5857 PR server/23158:
5858 * regformats/regdat.sh: Adjust script, following the addition
5859 of the new expedite_regs parameter to init_target_desc.
5860
8727de56
OJ
58612018-05-10 Omair Javaid <omair.javaid@linaro.org>
5862
5863 PR gdb/23127
5864 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5865 set_gdbarch_significant_addr_bit.
5866 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5867 set_gdbarch_significant_addr_bit.
5868 * utils.c (address_significant): Update to sign extend addr.
5869
37d9e062
MF
58702018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5871
5872 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5873 (xtensa_linux_init_abi): Limit tdep->num_regs by
5874 tdep->num_nopriv_regs.
5875 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5876 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5877 not initialized.
5878
7402fbca
SM
58792018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5880
5881 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5882
8ee22052
AB
58832018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5884
5885 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5886 (I387_MXCSR_INIT_VAL): New constant.
5887 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5888 buffer if it was supplied by the inferior.
5889 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5890 (i387_xsave_get_clear_bv): New function.
5891 (i387_supply_xsave): Only read x87 control registers from the
5892 xsave buffer if the feature is enabled, and the state will have
5893 been written, otherwise, provide a suitable default.
5894 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5895 including x87 control registers. Update control registers if they
5896 have changed from the default value, and mark features as enabled
5897 as required.
5898 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5899
968ae51b
UW
59002018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5901
5902 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5903
aff689d3
TT
59042018-05-07 Tom Tromey <tom@tromey.com>
5905
5906 * configure: Rebuild.
5907 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5908
ce887586
TT
59092018-05-07 Tom Tromey <tom@tromey.com>
5910
5911 PR tdep/20362:
5912 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5913 bit. Use correct value for VDIV.
5914
85e26832
TT
59152018-05-04 Tom Tromey <tom@tromey.com>
5916
5917 * configure: Rebuild.
5918 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5919
449b1ac7
TT
59202018-05-04 Tom Tromey <tom@tromey.com>
5921
5922 * linux-record.c (record_linux_system_call) <case
5923 RECORD_SYS_RECVFROM>: Add "break".
5924
15c9ffd6
TT
59252018-05-04 Tom Tromey <tom@tromey.com>
5926
5927 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5928 Add missing "break".
5929 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5930 Add missing "break".
5931
e3829d13
TT
59322018-05-04 Tom Tromey <tom@tromey.com>
5933
5934 * rs6000-tdep.c (ppc_process_record_op4)
5935 (ppc_process_record_op63): Add fall-through comment.
5936
da0e1563
TT
59372018-05-04 Tom Tromey <tom@tromey.com>
5938
5939 * i386-tdep.c (i386_process_record): Add fall-through comment.
5940
0019cd49
TT
59412018-05-04 Tom Tromey <tom@tromey.com>
5942
5943 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5944 comment.
5945
565e0eda
TT
59462018-05-04 Tom Tromey <tom@tromey.com>
5947
5948 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5949 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5950 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5951 comment.
5952 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5953 comment.
5954 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5955 comment.
5956
621846f4
TT
59572018-05-04 Tom Tromey <tom@tromey.com>
5958
5959 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5960
86a73007
TT
59612018-05-04 Tom Tromey <tom@tromey.com>
5962
5963 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5964 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5965 * symfile.c (section_is_mapped): Fix fall-through comment.
5966 * stabsread.c (define_symbol, read_member_functions): Fix
5967 fall-through comment.
5968 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5969 comment.
5970 * remote.c (remote_wait_as): Fix fall-through comment.
5971 * p-exp.y (yylex): Fix fall-through comment.
5972 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5973 comment.
5974 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5975 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5976 * jv-exp.y (yylex): Fix fall-through comment.
5977 * go-exp.y (lex_one_token): Fix fall-through comment.
5978 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5979 fall-through comment.
5980 * f-exp.y (yylex): Fix fall-through comment.
5981 * dwarf2read.c (process_die): Fix fall-through comments.
5982 * dbxread.c (process_one_symbol): Fix fall-through comment.
5983 * d-exp.y (lex_one_token): Fix fall-through comment.
5984 * cp-name-parser.y (yylex): Fix fall-through comment.
5985 * coffread.c (coff_symtab_read): Fix fall-through comment.
5986 * c-exp.y (lex_one_token): Fix fall-through comment.
5987 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5988 comment.
5989 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5990 comment.
5991
56bcdbea
TT
59922018-05-04 Tom Tromey <tom@tromey.com>
5993
5994 PR python/22730:
5995 * NEWS: Mention gdb.execute change.
5996 * gdbcmd.h (execute_control_command): Don't declare.
5997 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5998 execute_control_commands, execute_control_commands_to_string.
5999 * cli/cli-script.h (execute_control_commands)
6000 (execute_control_commands_to_string): Declare.
6001 (execute_control_command): Add from_tty parameter.
6002 * cli/cli-script.c (execute_control_commands)
6003 (execute_control_commands_to_string): New functions.
6004 (execute_user_command): Use execute_control_commands.
6005 (execute_control_command_1): Add "from_tty" parameter. Update.
6006 (execute_control_command): Likewise.
6007
a913fffb
TT
60082018-05-04 Tom Tromey <tom@tromey.com>
6009
6010 PR python/22731:
6011 * NEWS: Mention that breakpoint commands are writable.
6012 * python/py-breakpoint.c (bppy_set_commands): New function.
6013 (breakpoint_object_getset) <"commands">: Use it.
6014
60b3cef2
TT
60152018-05-04 Tom Tromey <tom@tromey.com>
6016
6017 * tracepoint.c (actions_command): Update.
6018 * mi/mi-cmd-break.c (mi_command_line_array)
6019 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6020 (mi_read_next_line): Remove.
6021 (mi_cmd_break_commands): Update.
6022 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6023 function_view.
6024 * cli/cli-script.c (get_command_line): Update.
6025 (process_next_line): Use function_view. Constify.
6026 (recurse_read_control_structure, read_command_lines)
6027 (read_command_lines_1): Change argument types to function_view.
6028 (do_define_command, document_command): Update.
6029 * breakpoint.h (check_tracepoint_command): Don't declare.
6030 * breakpoint.c (check_tracepoint_command): Remove.
6031 (commands_command_1, create_tracepoint_from_upload): Update.
6032
7a2c85f2
TT
60332018-05-04 Tom Tromey <tom@tromey.com>
6034
6035 PR gdb/11750:
6036 * cli/cli-script.h (enum command_control_type) <define_control>:
6037 New constant.
6038 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6039 (build_command_line, execute_control_command_1)
6040 (process_next_line): Likewise.
6041 (do_define_command): New function, extracted from define_command.
6042 (define_command): Use it.
6043
295dc222
TT
60442018-05-04 Tom Tromey <tom@tromey.com>
6045
6046 * tracepoint.c (actions_command): Update.
6047 * cli/cli-script.h (read_command_lines): Update.
6048 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6049 (MAX_TMPBUF): Remove define.
6050 (define_command): Use string_printf.
6051 (document_command): Likewise.
6052 * breakpoint.c (commands_command_1): Update.
6053
1263a9d5
TT
60542018-05-04 Tom Tromey <tom@tromey.com>
6055
6056 * top.c (execute_command): Update.
6057 * cli/cli-script.h (print_command_lines): Now varargs.
6058 * cli/cli-script.c (print_command_lines): Now varargs.
6059 (execute_control_command_1) <case while_control, case if_control>:
6060 Update.
6061
12973681
TT
60622018-05-04 Tom Tromey <tom@tromey.com>
6063
6064 * tracepoint.c (all_tracepoint_actions): Rename from
6065 all_tracepoint_actions_and_cleanup. Change return type.
6066 (actions_command, encode_actions_1, encode_actions)
6067 (trace_dump_actions, tdump_command): Update.
6068 * remote.c (remote_download_command_source): Update.
6069 * python/python.c (gdbpy_eval_from_control_command)
6070 (python_command, python_interactive_command): Update.
6071 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6072 * guile/guile.c (guile_command)
6073 (gdbscm_eval_from_control_command, guile_command): Update.
6074 * compile/compile.c (compile_code_command)
6075 (compile_print_command, compile_to_object): Update.
6076 * cli/cli-script.h (struct command_lines_deleter): New.
6077 (counted_command_line): New typedef.
6078 (struct command_line): Add constructor, destructor.
6079 <body_list>: Remove.
6080 <body_list_0, body_list_1>: New members.
6081 (command_line_up): Remove typedef.
6082 (read_command_lines, read_command_lines_1, get_command_line):
6083 Update.
6084 (copy_command_lines): Don't declare.
6085 * cli/cli-script.c (build_command_line): Use "new".
6086 (get_command_line): Return counted_command_line.
6087 (print_command_lines, execute_user_command)
6088 (execute_control_command_1, while_command, if_command): Update.
6089 (realloc_body_list): Remove.
6090 (process_next_line, recurse_read_control_structure): Update.
6091 (read_command_lines, read_command_lines_1): Return counted_command_line.
6092 (free_command_lines): Use "delete".
6093 (copy_command_lines): Remove.
6094 (define_command, document_command, show_user_1): Update.
6095 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6096 a counted_command_line.
6097 * breakpoint.h (counted_command_line): Remove typedef.
6098 (breakpoint_set_commands): Update.
6099 * breakpoint.c (check_no_tracepoint_commands)
6100 (validate_commands_for_breakpoint): Update.
6101 (breakpoint_set_commands): Change commands to be a
6102 counted_command_line.
6103 (commands_command_1, update_dprintf_command_list)
6104 (create_tracepoint_from_upload): Update.
6105
e2fc72e2
TT
61062018-05-04 Tom Tromey <tom@tromey.com>
6107
6108 * cli/cli-decode.h (cmd_list_element): New constructor.
6109 (~cmd_list_element): New destructor.
6110 (struct cmd_list_element): Add initializers.
6111 * cli/cli-decode.c (do_add_cmd): Use "new".
6112 (delete_cmd): Use "delete".
6113
a3b60e45
JK
61142018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6115 Pedro Alves <palves@redhat.com>
6116
6117 PR breakpoints/19806 and support for PR external/20207.
6118 * NEWS: Mention Aarch64 watchpoint improvements.
6119 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6120 watchpoints and PR external/20207 watchpoints.
6121 * nat/aarch64-linux-hw-point.c
6122 (kernel_supports_any_contiguous_range): New.
6123 (aarch64_watchpoint_offset): New.
6124 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6125 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6126 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6127 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6128 next_addr_orig_p. Support PR external/20207 watchpoints.
6129 (aarch64_downgrade_regs): New.
6130 (aarch64_dr_state_insert_one_point): New parameters offset and
6131 addr_orig.
6132 (aarch64_dr_state_remove_one_point): Likewise.
6133 (aarch64_handle_breakpoint): Update caller.
6134 (aarch64_handle_aligned_watchpoint): Likewise.
6135 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6136 aligned_offset.
6137 (aarch64_linux_set_debug_regs): Remove const from state. Call
6138 aarch64_downgrade_regs.
6139 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6140 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6141 (DR_CONTROL_MASK): ... this.
6142 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6143 (unsigned int aarch64_watchpoint_offset): New prototype.
6144 (aarch64_linux_set_debug_regs): Remove const from state.
6145 * utils.c (align_up, align_down): Move to ...
6146 * common/common-utils.c (align_up, align_down): ... here.
6147 * utils.h (align_up, align_down): Move to ...
6148 * common/common-utils.h (align_up, align_down): ... here.
6149
05bc7456
JB
61502018-05-04 Joel Brobecker <brobecker@adacore.com>
6151
6152 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6153 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6154 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6155 Re-implement to match the ABI as summarized in GCC's
6156 gcc/config/sparc/sparc.c. All callers updated.
6157 (sparc32_store_arguments): Remove assertion.
6158
2f433492
TT
61592018-05-04 Tom Tromey <tom@tromey.com>
6160
6161 * printcmd.c: Don't include tui.h.
6162 (decode_format): Use skip_spaces.
6163
9be2ae8f
TT
61642018-05-04 Tom Tromey <tom@tromey.com>
6165
6166 PR gdb/22619:
6167 * printcmd.c (last_count): New global.
6168 (x_command): Use saved count when repeating.
6169
f0b3976b
TT
61702018-05-04 Tom Tromey <tom@tromey.com>
6171
6172 * nto-procfs.c (do_closedir_cleanup): Remove.
6173 (procfs_pidlist): Use gdb_dir_up.
6174 * procfs.c (do_closedir_cleanup): Remove.
6175 (proc_update_threads): Use gdb_dir_up.
6176 * common/filestuff.h (struct gdb_dir_deleter): New.
6177 (gdb_dir_up): New typedef.
6178
862d101a
TT
61792018-05-04 Tom Tromey <tom@tromey.com>
6180
6181 * ada-lang.c (print_mention_exception): Use std::string.
6182
cb7de75e
TT
61832018-05-04 Tom Tromey <tom@tromey.com>
6184
6185 * ada-lang.c (create_excep_cond_exprs): Update.
6186 (ada_exception_catchpoint_cond_string): Use std::string.
6187
49d83361
TT
61882018-05-04 Tom Tromey <tom@tromey.com>
6189
6190 * ada-lang.c (xget_renaming_scope): Return std::string.
6191 (old_renaming_is_invisible): Update.
6192
ade72a34
TT
61932018-05-04 Tom Tromey <tom@tromey.com>
6194
6195 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6196 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6197
2be4d7f0
UW
61982018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6199
6200 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6201
69b6ecb0
TT
62022018-05-04 Tom Tromey <tom@tromey.com>
6203
6204 * remote.c (remote_query_supported_append): Change type.
6205 (remote_check_symbols): Update.
6206
bf27f0e2
PP
62072018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6208
6209 PR gdb/11420
6210 * configure.ac: Prepend libpython.
6211 * python/python-config.py: Likewise.
6212 * configure: Regenerate.
6213
4ea17de8
SM
62142018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6215
6216 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6217
bd732259
PA
62182018-05-03 Pedro Alves <palves@redhat.com>
6219
6220 * s390-linux-nat.c
6221 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6222 override. Write 'true' instead of '1'.
6223 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6224 declaration.
6225
d9f719f1
PA
62262018-05-02 Pedro Alves <palves@redhat.com>
6227
6228 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6229 add_inf_child_target.
6230 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6231 add_inf_child_target.
6232 * aix-thread.c (aix_thread_target_info): New.
6233 (aix_thread_target) <shortname, longname, doc>: Delete.
6234 <info>: New.
6235 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6236 add_inf_child_target.
6237 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6238 add_inf_child_target.
6239 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6240 add_inf_child_target.
6241 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6242 add_inf_child_target.
6243 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6244 add_inf_child_target.
6245 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6246 add_inf_child_target.
6247 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6248 add_inf_child_target.
6249 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6250 add_inf_child_target.
6251 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6252 add_inf_child_target.
6253 * bfd-target.c (target_bfd_target_info): New.
6254 (target_bfd) <shortname, longname, doc>: Delete.
6255 <info>: New.
6256 * bsd-kvm.c (bsd_kvm_target_info): New.
6257 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6258 <info>: New.
6259 (bsd_kvm_target::open): Rename to ...
6260 (bsd_kvm_target_open): ... this. Adjust.
6261 * bsd-uthread.c (bsd_uthread_target_info): New.
6262 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6263 <info>: New.
6264 * corefile.c (core_file_command): Adjust.
6265 * corelow.c (core_target_info): New.
6266 (core_target) <shortname, longname, doc>: Delete.
6267 <info>: New.
6268 (core_target::open): Rename to ...
6269 (core_target_open): ... this. Adjust.
6270 * ctf.c (ctf_target_info): New.
6271 (ctf_target) <shortname, longname, doc>: Delete.
6272 <info>: New.
6273 (ctf_target::open): Rename to ...
6274 (ctf_target_open): ... this.
6275 (_initialize_ctf): Adjust.
6276 * exec.c (exec_target_info): New.
6277 (exec_target) <shortname, longname, doc>: Delete.
6278 <info>: New.
6279 (exec_target::open): Rename to ...
6280 (exec_target_open): ... this.
6281 * gdbcore.h (core_target_open): Declare.
6282 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6283 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6284 add_inf_child_target.
6285 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6286 add_inf_child_target.
6287 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6288 add_inf_child_target.
6289 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6290 add_inf_child_target.
6291 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6292 add_inf_child_target.
6293 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6294 add_inf_child_target.
6295 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6296 add_inf_child_target.
6297 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6298 add_inf_child_target.
6299 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6300 add_inf_child_target.
6301 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6302 add_inf_child_target.
6303 * inf-child.c (inf_child_target_info): New.
6304 (inf_child_target::info): New.
6305 (inf_child_open_target): Remove 'target' parameter. Use
6306 get_native_target instead.
6307 (inf_child_target::open): Delete.
6308 (add_inf_child_target): New.
6309 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6310 Delete.
6311 <info>: New.
6312 (add_inf_child_target): Declare.
6313 (inf_child_open_target): Declare.
6314 * linux-thread-db.c (thread_db_target_info): New.
6315 (thread_db_target) <shortname, longname, doc>: Delete.
6316 <info>: New.
6317 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6318 add_inf_child_target.
6319 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6320 add_inf_child_target.
6321 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6322 add_inf_child_target.
6323 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6324 add_inf_child_target.
6325 * make-target-delegates (print_class): Adjust.
6326 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6327 add_inf_child_target.
6328 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6329 add_inf_child_target.
6330 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6331 add_inf_child_target.
6332 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6333 add_inf_child_target.
6334 * nto-procfs.c (nto_native_target_info): New.
6335 (nto_procfs_target_native) <shortname, longname, doc>:
6336 Delete.
6337 <info>: New.
6338 (nto_procfs_target_info): New.
6339 (nto_procfs_target_procfs) <shortname, longname, doc>:
6340 Delete.
6341 <info>: New.
6342 (init_procfs_targets): Adjust.
6343 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6344 add_inf_child_target.
6345 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6346 add_inf_child_target.
6347 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6348 add_inf_child_target.
6349 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6350 add_inf_child_target.
6351 * ravenscar-thread.c (ravenscar_target_info): New.
6352 (ravenscar_thread_target) <shortname, longname, doc>:
6353 Delete.
6354 <info>: New.
6355 * record-btrace.c (record_btrace_target_info):
6356 (record_btrace_target) <shortname, longname, doc>: Delete.
6357 <info>: New.
6358 (record_btrace_target::open): Rename to ...
6359 (record_btrace_target_open): ... this. Adjust.
6360 * record-full.c (record_longname, record_doc): New.
6361 (record_full_base_target) <shortname, longname, doc>: Delete.
6362 <info>: New.
6363 (record_full_target_info): New.
6364 (record_full_target): <shortname>: Delete.
6365 <info>: New.
6366 (record_full_core_open_1, record_full_open_1): Update comments.
6367 (record_full_base_target::open): Rename to ...
6368 (record_full_open): ... this.
6369 (cmd_record_full_restore): Update.
6370 (_initialize_record_full): Update.
6371 * remote-sim.c (remote_sim_target_info): New.
6372 (gdbsim_target) <shortname, longname, doc>: Delete.
6373 <info>: New.
6374 (gdbsim_target::open): Rename to ...
6375 (gdbsim_target_open): ... this.
6376 (_initialize_remote_sim): Adjust.
6377 * remote.c (remote_doc): New.
6378 (remote_target_info): New.
6379 (remote_target) <shortname, longname, doc>: Delete.
6380 <info>: New.
6381 (extended_remote_target_info): New.
6382 (extended_remote_target) <shortname, longname, doc>: Delete.
6383 <info>: New.
6384 (remote_target::open_1): Make static. Adjust.
6385 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6386 * s390-linux-nat.c (_initialize_s390_nat): Use
6387 add_inf_child_target.
6388 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6389 add_inf_child_target.
6390 * sol-thread.c (thread_db_target_info): New.
6391 (sol_thread_target) <shortname, longname, doc>: Delete.
6392 <info>: New.
6393 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6394 add_inf_child_target.
6395 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6396 add_inf_child_target.
6397 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6398 add_inf_child_target.
6399 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6400 add_inf_child_target.
6401 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6402 add_inf_child_target.
6403 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6404 add_inf_child_target.
6405 * spu-linux-nat.c (_initialize_spu_nat): Use
6406 add_inf_child_target.
6407 * spu-multiarch.c (spu_multiarch_target_info): New.
6408 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6409 <info>: New.
6410 * target-delegates.c: Regenerate.
6411 * target.c: Include <unordered_map>.
6412 (target_ops_p): Delete.
6413 (DEF_VEC_P(target_ops_p)): Delete.
6414 (target_factories): New.
6415 (test_target_info): New.
6416 (test_target_ops::info): New.
6417 (open_target): Adjust to use target_factories.
6418 (add_target_with_completer): Rename to ...
6419 (add_target): ... this. Change prototype. Register target_info
6420 and open callback in target_factories. Register target_info in
6421 command context instead of target_ops.
6422 (add_target): Delete old implementation.
6423 (add_deprecated_target_alias): Change prototype. Adjust.
6424 (the_native_target): New.
6425 (set_native_target, get_native_target): New.
6426 (find_default_run_target): Use the_native_target.
6427 (find_attach_target, find_run_target): Simplify.
6428 (target_ops::open): Delete.
6429 (dummy_target_info): New.
6430 (dummy_target::shortname, dummy_target::longname)
6431 (dummy_target::doc): Delete.
6432 (dummy_target::info): New.
6433 (debug_target::shortname, debug_target::longname)
6434 (debug_target::doc): Delete.
6435 (debug_target::info): New.
6436 * target.h (struct target_info): New.
6437 (target_ops::~target_ops): Add comment.
6438 (target_ops::info): New.
6439 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6440 longer virtual. Implement in terms of target_info.
6441 (set_native_target, get_native_target): Declare.
6442 (target_open_ftype): New.
6443 (add_target, add_target_with_completer)
6444 (add_deprecated_target_alias): Change prototype.
6445 (test_target) <shortname, longname, doc>: Delete.
6446 <info>: New.
6447 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6448 add_inf_child_target.
6449 * tracefile-tfile.c (tfile_target_info): New.
6450 (tfile_target) <shortname, longname, doc>: Delete.
6451 <info>: New.
6452 (tfile_target::open): Rename to ...
6453 (tfile_target_open): ... this.
6454 (_initialize_tracefile_tfile): Adjust.
6455 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6456 add_inf_child_target.
6457 * windows-nat.c (_initialize_windows_nat): Use
6458 add_inf_child_target.
6459 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6460 add_inf_child_target.
6461
135340af
PA
64622018-05-02 Pedro Alves <palves@redhat.com>
6463
6464 * linux-nat.h (linux_nat_target) <low_new_thread,
6465 low_delete_thread, low_new_fork, low_forget_process,
6466 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6467 New virtual methods.
6468 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6469 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6470 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6471 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6472 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6473 Delete.
6474 * linux-fork.c (delete_fork): Adjust to call low method.
6475 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6476 (linux_nat_new_fork, linux_nat_forget_process_hook)
6477 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6478 (linux_nat_status_is_event):
6479 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6480 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6481 to call low method.
6482 (sigtrap_is_event): Rename to ...
6483 (linux_nat_target::low_status_is_event): ... this.
6484 (linux_nat_set_status_is_event): Delete.
6485 (save_stop_reason, linux_nat_wait_1)
6486 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6487 low methods.
6488 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6489 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6490 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6491 (linux_nat_set_prepare_to_resume): Delete.
6492 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6493 low virtual methods.
6494 * amd64-linux-nat.c: Likewise.
6495 * arm-linux-nat.c: Likewise.
6496 * i386-linux-nat.c: Likewise.
6497 * ia64-linux-nat.c: Likewise.
6498 * mips-linux-nat.c: Likewise.
6499 * ppc-linux-nat.c: Likewise.
6500 * s390-linux-nat.c: Likewise.
6501 * sparc64-linux-nat.c: Likewise.
6502 * x86-linux-nat.c: Likewise.
6503 * x86-linux-nat.h: Include "nat/x86-linux.h".
6504 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6505 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6506 Override methods.
6507
57810aa7
PA
65082018-05-02 Pedro Alves <palves@redhat.com>
6509
6510 * target.h (target_ops)
6511 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6512 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6513 stopped_by_watchpoint, have_continuable_watchpoint,
6514 stopped_data_address, watchpoint_addr_within_range,
6515 can_accel_watchpoint_condition, can_run, thread_alive,
6516 has_all_memory, has_memory, has_stack, has_registers,
6517 has_execution, can_async_p, is_async_p, supports_non_stop,
6518 always_non_stop_p, can_execute_reverse, supports_multi_process,
6519 supports_enable_disable_tracepoint,
6520 supports_disable_randomization, supports_string_tracing,
6521 supports_evaluation_of_breakpoint_conditions,
6522 can_run_breakpoint_commands, filesystem_is_local,
6523 can_download_tracepoint, get_trace_state_variable_value,
6524 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6525 record_is_replaying, record_will_replay,
6526 augmented_libraries_svr4_read>: Adjust to return bool.
6527 * aarch64-linux-nat.c: All implementations adjusted.
6528 * aix-thread.c: All implementations adjusted.
6529 * arm-linux-nat.c: All implementations adjusted.
6530 * breakpoint.c: All implementations adjusted.
6531 * bsd-kvm.c: All implementations adjusted.
6532 * bsd-uthread.c: All implementations adjusted.
6533 * corelow.c: All implementations adjusted.
6534 * ctf.c: All implementations adjusted.
6535 * darwin-nat.c: All implementations adjusted.
6536 * darwin-nat.h: All implementations adjusted.
6537 * exec.c: All implementations adjusted.
6538 * fbsd-nat.c: All implementations adjusted.
6539 * fbsd-nat.h: All implementations adjusted.
6540 * gnu-nat.c: All implementations adjusted.
6541 * gnu-nat.h: All implementations adjusted.
6542 * go32-nat.c: All implementations adjusted.
6543 * ia64-linux-nat.c: All implementations adjusted.
6544 * inf-child.c: All implementations adjusted.
6545 * inf-child.h: All implementations adjusted.
6546 * inf-ptrace.c: All implementations adjusted.
6547 * inf-ptrace.h: All implementations adjusted.
6548 * linux-nat.c: All implementations adjusted.
6549 * linux-nat.h: All implementations adjusted.
6550 * mips-linux-nat.c: All implementations adjusted.
6551 * nto-procfs.c: All implementations adjusted.
6552 * ppc-linux-nat.c: All implementations adjusted.
6553 * procfs.c: All implementations adjusted.
6554 * ravenscar-thread.c: All implementations adjusted.
6555 * record-btrace.c: All implementations adjusted.
6556 * record-full.c: All implementations adjusted.
6557 * remote-sim.c: All implementations adjusted.
6558 * remote.c: All implementations adjusted.
6559 * s390-linux-nat.c: All implementations adjusted.
6560 * sol-thread.c: All implementations adjusted.
6561 * spu-multiarch.c: All implementations adjusted.
6562 * target-delegates.c: All implementations adjusted.
6563 * target.c: All implementations adjusted.
6564 * target.h: All implementations adjusted.
6565 * tracefile-tfile.c: All implementations adjusted.
6566 * tracefile.c: All implementations adjusted.
6567 * tracefile.h: All implementations adjusted.
6568 * windows-nat.c: All implementations adjusted.
6569 * x86-linux-nat.h: All implementations adjusted.
6570 * x86-nat.h: All implementations adjusted.
6571
ad6a4e2d
PA
65722018-05-02 Pedro Alves <palves@redhat.com>
6573
6574 * make-target-delegates (scan_target_h): Don't trim lines here.
6575 Replace sequences of tabs and/or whitespace with a single
6576 whitespace.
6577 (top level, parsing methods): Trim each line before processing it
6578 here.
6579
f6ac5f3d
PA
65802018-05-02 Pedro Alves <palves@redhat.com>
6581 John Baldwin <jhb@freebsd.org>
6582
6583 * target.h (enum strata) <debug_stratum>: New.
6584 (struct target_ops) <all delegation methods>: Replace by C++
6585 virtual methods, and drop "to_" prefix. All references updated
6586 throughout.
6587 <to_shortname, to_longname, to_doc, to_data,
6588 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6589 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6590 virtual methods. All references updated throughout.
6591 <can_attach, supports_terminal_ours, can_create_inferior,
6592 get_thread_control_capabilities, attach_no_wait>: New
6593 virtual methods.
6594 <insert_breakpoint, remove_breakpoint>: Now
6595 TARGET_DEFAULT_NORETURN methods.
6596 <info_proc>: Now returns bool.
6597 <to_magic>: Delete.
6598 (OPS_MAGIC): Delete.
6599 (current_target): Delete. All references replaced by references
6600 to ...
6601 (target_stack): ... this. New.
6602 (target_shortname, target_longname): Adjust.
6603 (target_can_run): Now a function declaration.
6604 (default_child_has_all_memory, default_child_has_memory)
6605 (default_child_has_stack, default_child_has_registers)
6606 (default_child_has_execution): Remove target_ops parameter.
6607 (complete_target_initialization): Delete.
6608 (memory_breakpoint_target): New template class.
6609 (test_target_ops): Refactor as a C++ class with virtual methods.
6610 * make-target-delegates (NAME_PART): Tighten.
6611 (POINTER_PART, CP_SYMBOL): New.
6612 (SIMPLE_RETURN_PART): Reimplement.
6613 (VEC_RETURN_PART): Expect less.
6614 (RETURN_PART, VIRTUAL_PART): New.
6615 (METHOD): Adjust to C++ virtual methods.
6616 (scan_target_h): Remove reference to C99.
6617 (dname): Output "target_ops::" prefix.
6618 (write_function_header): Adjust to output a C++ class method.
6619 (write_declaration): New.
6620 (write_delegator): Adjust to output a C++ class method.
6621 (tdname): Output "dummy_target::" prefix.
6622 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6623 method.
6624 (tdefault_names, debug_names): Delete.
6625 (return_types, tdefaults, styles, argtypes_array): New.
6626 (top level): All methods are delegators.
6627 (print_class): New.
6628 (top level): Print dummy_target and debug_target classes.
6629 * target-delegates.c: Regenerate.
6630 * target-debug.h (target_debug_print_enum_info_proc_what)
6631 (target_debug_print_thread_control_capabilities)
6632 (target_debug_print_thread_info_p): New.
6633 * target.c (dummy_target): Delete.
6634 (the_dummy_target, the_debug_target): New.
6635 (target_stack): Now extern.
6636 (set_targetdebug): Push/unpush debug target.
6637 (default_child_has_all_memory, default_child_has_memory)
6638 (default_child_has_stack, default_child_has_registers)
6639 (default_child_has_execution): Remove target_ops parameter.
6640 (complete_target_initialization): Delete.
6641 (add_target_with_completer): No longer call
6642 complete_target_initialization.
6643 (target_supports_terminal_ours): Use regular delegation.
6644 (update_current_target): Delete.
6645 (push_target): No longer check magic number. Don't call
6646 update_current_target.
6647 (unpush_target): Don't call update_current_target.
6648 (target_is_pushed): No longer check magic number.
6649 (target_require_runnable): Skip for all stratums over
6650 process_stratum.
6651 (target_ops::info_proc): New.
6652 (target_info_proc): Use find_target_at and
6653 find_default_run_target.
6654 (target_supports_disable_randomization): Use regular delegation.
6655 (target_get_osdata): Use find_target_at.
6656 (target_ops::open, target_ops::close, target_ops::can_attach)
6657 (target_ops::attach, target_ops::can_create_inferior)
6658 (target_ops::create_inferior, target_ops::can_run)
6659 (target_can_run): New.
6660 (default_fileio_target): Use regular delegation.
6661 (target_ops::fileio_open, target_ops::fileio_pwrite)
6662 (target_ops::fileio_pread, target_ops::fileio_fstat)
6663 (target_ops::fileio_close, target_ops::fileio_unlink)
6664 (target_ops::fileio_readlink): New.
6665 (target_fileio_open_1, target_fileio_unlink)
6666 (target_fileio_readlink): Always call the target method. Handle
6667 FILEIO_ENOSYS.
6668 (return_zero, return_zero_has_execution): Delete.
6669 (init_dummy_target): Delete.
6670 (dummy_target::dummy_target, dummy_target::shortname)
6671 (dummy_target::longname, dummy_target::doc)
6672 (debug_target::debug_target, debug_target::shortname)
6673 (debug_target::longname, debug_target::doc): New.
6674 (target_supports_delete_record): Use regular delegation.
6675 (setup_target_debug): Delete.
6676 (maintenance_print_target_stack): Skip debug_stratum.
6677 (initialize_targets): Instantiate the_dummy_target and
6678 the_debug_target.
6679 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6680 use target_stack.
6681 (target_auxv_search, fprint_target_auxv): Adjust.
6682 (info_auxv_command): Adjust to use target_stack.
6683 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6684 * exceptions.c (print_flush): Handle a NULL target_stack.
6685 * regcache.c (target_ops_no_register): Refactor as class with
6686 virtual methods.
6687
6688 * exec.c (exec_target): New class.
6689 (exec_ops): Now an exec_target.
6690 (exec_open, exec_close_1, exec_get_section_table)
6691 (exec_xfer_partial, exec_files_info, exec_has_memory)
6692 (exec_make_note_section): Refactor as exec_target methods.
6693 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6694 Delete.
6695 (exec_target::find_memory_regions): New.
6696 (_initialize_exec): Don't call init_exec_ops.
6697 * gdbcore.h (exec_file_clear): Delete.
6698
6699 * corefile.c (core_target): Delete.
6700 (core_file_command): Adjust.
6701 * corelow.c (core_target): New class.
6702 (the_core_target): New.
6703 (core_close): Remove target_ops parameter.
6704 (core_close_cleanup): Adjust.
6705 (core_target::close): New.
6706 (core_open, core_detach, get_core_registers, core_files_info)
6707 (core_xfer_partial, core_thread_alive, core_read_description)
6708 (core_pid_to_str, core_thread_name, core_has_memory)
6709 (core_has_stack, core_has_registers, core_info_proc): Rework as
6710 core_target methods.
6711 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6712 (_initialize_corelow): Initialize the_core_target.
6713 * gdbcore.h (core_target): Delete.
6714 (the_core_target): New.
6715
6716 * ctf.c: (ctf_target): New class.
6717 (ctf_ops): Now a ctf_target.
6718 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6719 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6720 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6721 methods.
6722 (init_ctf_ops): Delete.
6723 (_initialize_ctf): Don't call it.
6724 * tracefile-tfile.c (tfile_target): New class.
6725 (tfile_ops): Now a tfile_target.
6726 (tfile_open, tfile_close, tfile_files_info)
6727 (tfile_get_tracepoint_status, tfile_trace_find)
6728 (tfile_fetch_registers, tfile_xfer_partial)
6729 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6730 Refactor as tfile_target methods.
6731 (tfile_xfer_partial_features): Remove target_ops parameter.
6732 (init_tfile_ops): Delete.
6733 (_initialize_tracefile_tfile): Don't call it.
6734 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6735 (tracefile_has_stack, tracefile_has_registers)
6736 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6737 tracefile_target methods.
6738 (init_tracefile_ops): Delete.
6739 (tracefile_target::tracefile_target): New.
6740 * tracefile.h: Include "target.h".
6741 (tracefile_target): New class.
6742 (init_tracefile_ops): Delete.
6743
6744 * spu-multiarch.c (spu_multiarch_target): New class.
6745 (spu_ops): Now a spu_multiarch_target.
6746 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6747 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6748 (spu_search_memory, spu_mourn_inferior): Refactor as
6749 spu_multiarch_target methods.
6750 (init_spu_ops): Delete.
6751 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6752 complete_target_initialization.
6753
6754 * ravenscar-thread.c (ravenscar_thread_target): New class.
6755 (ravenscar_ops): Now a ravenscar_thread_target.
6756 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6757 (ravenscar_thread_alive, ravenscar_pid_to_str)
6758 (ravenscar_fetch_registers, ravenscar_store_registers)
6759 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6760 (ravenscar_stopped_by_hw_breakpoint)
6761 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6762 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6763 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6764 methods.
6765 (init_ravenscar_thread_ops): Delete.
6766 (_initialize_ravenscar): Remove references to
6767 init_ravenscar_thread_ops and complete_target_initialization.
6768
6769 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6770 (bsd_uthread_target): New class.
6771 (bsd_uthread_ops): Now a bsd_uthread_target.
6772 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6773 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6774 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6775 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6776 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6777 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6778 (bsd_uthread_target): Delete function.
6779 (_initialize_bsd_uthread): Remove reference to
6780 complete_target_initialization.
6781
6782 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6783 (target_bfd): ... this new class.
6784 (target_bfd_xfer_partial, target_bfd_get_section_table)
6785 (target_bfd_close): Refactor as target_bfd methods.
6786 (target_bfd::~target_bfd): New.
6787 (target_bfd_reopen): Adjust.
6788 (target_bfd::close): New.
6789
6790 * record-btrace.c (record_btrace_target): New class.
6791 (record_btrace_ops): Now a record_btrace_target.
6792 (record_btrace_open, record_btrace_stop_recording)
6793 (record_btrace_disconnect, record_btrace_close)
6794 (record_btrace_async, record_btrace_info)
6795 (record_btrace_insn_history, record_btrace_insn_history_range)
6796 (record_btrace_insn_history_from, record_btrace_call_history)
6797 (record_btrace_call_history_range)
6798 (record_btrace_call_history_from, record_btrace_record_method)
6799 (record_btrace_is_replaying, record_btrace_will_replay)
6800 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6801 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6802 (record_btrace_store_registers, record_btrace_prepare_to_store)
6803 (record_btrace_to_get_unwinder)
6804 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6805 (record_btrace_commit_resume, record_btrace_wait)
6806 (record_btrace_stop, record_btrace_can_execute_reverse)
6807 (record_btrace_stopped_by_sw_breakpoint)
6808 (record_btrace_supports_stopped_by_sw_breakpoint)
6809 (record_btrace_stopped_by_hw_breakpoint)
6810 (record_btrace_supports_stopped_by_hw_breakpoint)
6811 (record_btrace_update_thread_list, record_btrace_thread_alive)
6812 (record_btrace_goto_begin, record_btrace_goto_end)
6813 (record_btrace_goto, record_btrace_stop_replaying_all)
6814 (record_btrace_execution_direction)
6815 (record_btrace_prepare_to_generate_core)
6816 (record_btrace_done_generating_core): Refactor as
6817 record_btrace_target methods.
6818 (init_record_btrace_ops): Delete.
6819 (_initialize_record_btrace): Remove reference to
6820 init_record_btrace_ops.
6821 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6822 the execution_direction global.
6823 (record_full_base_target, record_full_target)
6824 (record_full_core_target): New classes.
6825 (record_full_ops): Now a record_full_target.
6826 (record_full_core_ops): Now a record_full_core_target.
6827 (record_full_target::detach, record_full_target::disconnect)
6828 (record_full_core_target::disconnect)
6829 (record_full_target::mourn_inferior, record_full_target::kill):
6830 New.
6831 (record_full_open, record_full_close, record_full_async): Refactor
6832 as methods of the record_full_base_target class.
6833 (record_full_resume, record_full_commit_resume): Refactor
6834 as methods of the record_full_target class.
6835 (record_full_wait, record_full_stopped_by_watchpoint)
6836 (record_full_stopped_data_address)
6837 (record_full_stopped_by_sw_breakpoint)
6838 (record_full_supports_stopped_by_sw_breakpoint)
6839 (record_full_stopped_by_hw_breakpoint)
6840 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6841 methods of the record_full_base_target class.
6842 (record_full_store_registers, record_full_xfer_partial)
6843 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6844 Refactor as methods of the record_full_target class.
6845 (record_full_can_execute_reverse, record_full_get_bookmark)
6846 (record_full_goto_bookmark, record_full_execution_direction)
6847 (record_full_record_method, record_full_info, record_full_delete)
6848 (record_full_is_replaying, record_full_will_replay)
6849 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6850 (record_full_stop_replaying): Refactor as methods of the
6851 record_full_base_target class.
6852 (record_full_core_resume, record_full_core_kill)
6853 (record_full_core_fetch_registers)
6854 (record_full_core_prepare_to_store)
6855 (record_full_core_store_registers, record_full_core_xfer_partial)
6856 (record_full_core_insert_breakpoint)
6857 (record_full_core_remove_breakpoint)
6858 (record_full_core_has_execution): Refactor
6859 as methods of the record_full_core_target class.
6860 (record_full_base_target::supports_delete_record): New.
6861 (init_record_full_ops): Delete.
6862 (init_record_full_core_ops): Delete.
6863 (record_full_save): Refactor as method of the
6864 record_full_base_target class.
6865 (_initialize_record_full): Remove references to
6866 init_record_full_ops and init_record_full_core_ops.
6867
6868 * remote.c (remote_target, extended_remote_target): New classes.
6869 (remote_ops): Now a remote_target.
6870 (extended_remote_ops): Now an extended_remote_target.
6871 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6872 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6873 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6874 (remote_pass_signals, remote_set_syscall_catchpoint)
6875 (remote_program_signals, )
6876 (remote_thread_always_alive): Remove target_ops parameter.
6877 (remote_thread_alive, remote_thread_name)
6878 (remote_update_thread_list, remote_threads_extra_info)
6879 (remote_static_tracepoint_marker_at)
6880 (remote_static_tracepoint_markers_by_strid)
6881 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6882 (remote_open): Refactor as methods of remote_target.
6883 (extended_remote_open, extended_remote_detach)
6884 (extended_remote_attach, extended_remote_post_attach):
6885 (extended_remote_supports_disable_randomization)
6886 (extended_remote_create_inferior): : Refactor as method of
6887 extended_remote_target.
6888 (remote_set_permissions, remote_open_1, remote_detach)
6889 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6890 (remote_resume, remote_commit_resume, remote_stop)
6891 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6892 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6893 (remote_prepare_to_store, remote_store_registers)
6894 (remote_flash_erase, remote_flash_done, remote_files_info)
6895 (remote_kill, remote_mourn, remote_insert_breakpoint)
6896 (remote_remove_breakpoint, remote_insert_watchpoint)
6897 (remote_watchpoint_addr_within_range)
6898 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6899 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6900 (remote_supports_stopped_by_sw_breakpoint)
6901 (remote_stopped_by_hw_breakpoint)
6902 (remote_supports_stopped_by_hw_breakpoint)
6903 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6904 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6905 (remote_verify_memory): Refactor as methods of remote_target.
6906 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6907 parameter.
6908 (remote_xfer_partial, remote_get_memory_xfer_limit)
6909 (remote_search_memory, remote_rcmd, remote_memory_map)
6910 (remote_pid_to_str, remote_get_thread_local_address)
6911 (remote_get_tib_address, remote_read_description): Refactor as
6912 methods of remote_target.
6913 (remote_target::fileio_open, remote_target::fileio_pwrite)
6914 (remote_target::fileio_pread, remote_target::fileio_close): New.
6915 (remote_hostio_readlink, remote_hostio_fstat)
6916 (remote_filesystem_is_local, remote_can_execute_reverse)
6917 (remote_supports_non_stop, remote_supports_disable_randomization)
6918 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6919 (remote_supports_enable_disable_tracepoint)
6920 (remote_supports_string_tracing)
6921 (remote_can_run_breakpoint_commands, remote_trace_init)
6922 (remote_download_tracepoint, remote_can_download_tracepoint)
6923 (remote_download_trace_state_variable, remote_enable_tracepoint)
6924 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6925 (remote_trace_start, remote_get_trace_status)
6926 (remote_get_tracepoint_status, remote_trace_stop)
6927 (remote_trace_find, remote_get_trace_state_variable_value)
6928 (remote_save_trace_data, remote_get_raw_trace_data)
6929 (remote_set_disconnected_tracing, remote_core_of_thread)
6930 (remote_set_circular_trace_buffer, remote_traceframe_info)
6931 (remote_get_min_fast_tracepoint_insn_len)
6932 (remote_set_trace_buffer_size, remote_set_trace_notes)
6933 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6934 (remote_disable_btrace, remote_teardown_btrace)
6935 (remote_read_btrace, remote_btrace_conf)
6936 (remote_augmented_libraries_svr4_read, remote_load)
6937 (remote_pid_to_exec_file, remote_can_do_single_step)
6938 (remote_execution_direction, remote_thread_handle_to_thread_info):
6939 Refactor as methods of remote_target.
6940 (init_remote_ops, init_extended_remote_ops): Delete.
6941 (remote_can_async_p, remote_is_async_p, remote_async)
6942 (remote_thread_events, remote_upload_tracepoints)
6943 (remote_upload_trace_state_variables): Refactor as methods of
6944 remote_target.
6945 (_initialize_remote): Remove references to init_remote_ops and
6946 init_extended_remote_ops.
6947
6948 * remote-sim.c (gdbsim_target): New class.
6949 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6950 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6951 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6952 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6953 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6954 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6955 Refactor as methods of gdbsim_target.
6956 (gdbsim_ops): Now a gdbsim_target.
6957 (init_gdbsim_ops): Delete.
6958 (gdbsim_cntrl_c): Adjust.
6959 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6960
6961 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6962 (the_amd64_linux_nat_target): New.
6963 (amd64_linux_fetch_inferior_registers)
6964 (amd64_linux_store_inferior_registers): Refactor as methods of
6965 amd64_linux_nat_target.
6966 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6967 * i386-linux-nat.c: Don't include "linux-nat.h".
6968 (i386_linux_nat_target): New class.
6969 (the_i386_linux_nat_target): New.
6970 (i386_linux_fetch_inferior_registers)
6971 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6972 as methods of i386_linux_nat_target.
6973 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6974 * inf-child.c (inf_child_ops): Delete.
6975 (inf_child_fetch_inferior_registers)
6976 (inf_child_store_inferior_registers): Delete.
6977 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6978 methods of inf_child_target.
6979 (inf_child_target::supports_terminal_ours)
6980 (inf_child_target::terminal_init)
6981 (inf_child_target::terminal_inferior)
6982 (inf_child_target::terminal_ours_for_output)
6983 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6984 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6985 New.
6986 (inf_child_open, inf_child_disconnect, inf_child_close)
6987 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6988 (inf_child_post_startup_inferior, inf_child_can_run)
6989 (inf_child_pid_to_exec_file): Refactor as methods of
6990 inf_child_target.
6991 (inf_child_follow_fork): Delete.
6992 (inf_child_target::can_create_inferior)
6993 (inf_child_target::can_attach): New.
6994 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6995 (inf_child_target::has_stack, inf_child_target::has_registers)
6996 (inf_child_target::has_execution): New.
6997 (inf_child_fileio_open, inf_child_fileio_pwrite)
6998 (inf_child_fileio_pread, inf_child_fileio_fstat)
6999 (inf_child_fileio_close, inf_child_fileio_unlink)
7000 (inf_child_fileio_readlink, inf_child_use_agent)
7001 (inf_child_can_use_agent): Refactor as methods of
7002 inf_child_target.
7003 (return_zero, inf_child_target): Delete.
7004 (inf_child_target::inf_child_target): New.
7005 * inf-child.h: Include "target.h".
7006 (inf_child_target): Delete function prototype.
7007 (inf_child_target): New class.
7008 (inf_child_open_target, inf_child_mourn_inferior)
7009 (inf_child_maybe_unpush_target): Delete.
7010 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7011 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7012 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7013 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7014 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7015 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7016 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7017 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7018 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7019 methods of inf_ptrace_target.
7020 (inf_ptrace_target): Delete function.
7021 * inf-ptrace.h: Include "inf-child.h".
7022 (inf_ptrace_target): Delete function declaration.
7023 (inf_ptrace_target): New class.
7024 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7025 * linux-nat.c (linux_target): New.
7026 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7027 (linux_nat_target::~linux_nat_target): New.
7028 (linux_child_post_attach, linux_child_post_startup_inferior)
7029 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7030 (linux_child_remove_fork_catchpoint)
7031 (linux_child_insert_vfork_catchpoint)
7032 (linux_child_remove_vfork_catchpoint)
7033 (linux_child_insert_exec_catchpoint)
7034 (linux_child_remove_exec_catchpoint)
7035 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7036 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7037 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7038 (linux_nat_stopped_data_address)
7039 (linux_nat_stopped_by_sw_breakpoint)
7040 (linux_nat_supports_stopped_by_sw_breakpoint)
7041 (linux_nat_stopped_by_hw_breakpoint)
7042 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7043 (linux_nat_kill, linux_nat_mourn_inferior)
7044 (linux_nat_xfer_partial, linux_nat_thread_alive)
7045 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7046 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7047 (linux_child_static_tracepoint_markers_by_strid)
7048 (linux_nat_is_async_p, linux_nat_can_async_p)
7049 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7050 (linux_nat_supports_multi_process)
7051 (linux_nat_supports_disable_randomization, linux_nat_async)
7052 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7053 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7054 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7055 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7056 methods of linux_nat_target.
7057 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7058 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7059 parameter.
7060 (check_stopped_by_watchpoint): Adjust.
7061 (linux_xfer_partial): Delete.
7062 (linux_target_install_ops, linux_target, linux_nat_add_target):
7063 Delete.
7064 (linux_nat_target::linux_nat_target): New.
7065 * linux-nat.h: Include "inf-ptrace.h".
7066 (linux_nat_target): New.
7067 (linux_target, linux_target_install_ops, linux_nat_add_target):
7068 Delete function declarations.
7069 (linux_target): Declare global.
7070 * linux-thread-db.c (thread_db_target): New.
7071 (thread_db_target::thread_db_target): New.
7072 (thread_db_ops): Delete.
7073 (the_thread_db_target): New.
7074 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7075 (thread_db_update_thread_list, thread_db_pid_to_str)
7076 (thread_db_extra_thread_info)
7077 (thread_db_thread_handle_to_thread_info)
7078 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7079 (thread_db_resume): Refactor as methods of thread_db_target.
7080 (init_thread_db_ops): Delete.
7081 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7082 * x86-linux-nat.c: Don't include "linux-nat.h".
7083 (super_post_startup_inferior): Delete.
7084 (x86_linux_nat_target::~x86_linux_nat_target): New.
7085 (x86_linux_child_post_startup_inferior)
7086 (x86_linux_read_description, x86_linux_enable_btrace)
7087 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7088 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7089 methods of x86_linux_nat_target.
7090 (x86_linux_create_target): Delete. Bits folded ...
7091 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7092 pointer.
7093 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7094 (x86_linux_nat_target): New class.
7095 (x86_linux_create_target): Delete.
7096 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7097 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7098 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7099 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7100 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7101 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7102 make extern.
7103 (x86_use_watchpoints): Delete.
7104 * x86-nat.h: Include "breakpoint.h" and "target.h".
7105 (x86_use_watchpoints): Delete.
7106 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7107 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7108 (x86_insert_watchpoint, x86_remove_watchpoint)
7109 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7110 (x86_stopped_by_hw_breakpoint): New declarations.
7111 (x86_nat_target): New template class.
7112
7113 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7114 (the_ppc_linux_nat_target): New.
7115 (ppc_linux_fetch_inferior_registers)
7116 (ppc_linux_can_use_hw_breakpoint)
7117 (ppc_linux_region_ok_for_hw_watchpoint)
7118 (ppc_linux_ranged_break_num_registers)
7119 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7120 (ppc_linux_insert_mask_watchpoint)
7121 (ppc_linux_remove_mask_watchpoint)
7122 (ppc_linux_can_accel_watchpoint_condition)
7123 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7124 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7125 (ppc_linux_watchpoint_addr_within_range)
7126 (ppc_linux_masked_watch_num_registers)
7127 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7128 (ppc_linux_read_description): Refactor as methods of
7129 ppc_linux_nat_target.
7130 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7131
7132 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7133 (procfs_target): New class.
7134 (the_procfs_target): New.
7135 (procfs_target): Delete function.
7136 (procfs_auxv_parse, procfs_attach, procfs_detach)
7137 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7138 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7139 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7140 (procfs_create_inferior, procfs_update_thread_list)
7141 (procfs_thread_alive, procfs_pid_to_str)
7142 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7143 (procfs_stopped_data_address, procfs_insert_watchpoint)
7144 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7145 (proc_find_memory_regions, procfs_info_proc)
7146 (procfs_make_note_section): Refactor as methods of procfs_target.
7147 (_initialize_procfs): Adjust.
7148 * sol-thread.c (sol_thread_target): New class.
7149 (sol_thread_ops): Now a sol_thread_target.
7150 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7151 (sol_thread_fetch_registers, sol_thread_store_registers)
7152 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7153 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7154 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7155 (init_sol_thread_ops): Delete.
7156 (_initialize_sol_thread): Adjust. Remove references to
7157 init_sol_thread_ops and complete_target_initialization.
7158
7159 * windows-nat.c (windows_nat_target): New class.
7160 (windows_fetch_inferior_registers)
7161 (windows_store_inferior_registers, windows_resume, windows_wait)
7162 (windows_attach, windows_detach, windows_pid_to_exec_file)
7163 (windows_files_info, windows_create_inferior)
7164 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7165 (windows_close, windows_pid_to_str, windows_xfer_partial)
7166 (windows_get_tib_address, windows_get_ada_task_ptid)
7167 (windows_thread_name, windows_thread_alive): Refactor as
7168 windows_nat_target methods.
7169 (do_initial_windows_stuff): Adjust.
7170 (windows_target): Delete function.
7171 (_initialize_windows_nat): Adjust.
7172
7173 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7174 (darwin_mourn_inferior, darwin_kill_inferior)
7175 (darwin_create_inferior, darwin_attach, darwin_detach)
7176 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7177 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7178 (darwin_supports_multi_process): Refactor as darwin_nat_target
7179 methods.
7180 (darwin_resume_to, darwin_files_info): Delete.
7181 (_initialize_darwin_inferior): Rename to ...
7182 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7183 * darwin-nat.h: Include "inf-child.h".
7184 (darwin_nat_target): New class.
7185 (darwin_complete_target): Delete.
7186 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7187 (darwin_target): New.
7188 (i386_darwin_fetch_inferior_registers)
7189 (i386_darwin_store_inferior_registers): Refactor as methods of
7190 darwin_nat_target.
7191 (darwin_complete_target): Delete, with ...
7192 (_initialize_i386_darwin_nat): ... bits factored out here.
7193
7194 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7195 (the_alpha_linux_nat_target): New.
7196 (alpha_linux_register_u_offset): Refactor as
7197 alpha_linux_nat_target method.
7198 (_initialize_alpha_linux_nat): Adjust.
7199 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7200 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7201 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7202 methods of linux_nat_trad_target.
7203 (linux_trad_target): Delete.
7204 * linux-nat-trad.h (linux_trad_target): Delete function.
7205 (linux_nat_trad_target): New class.
7206 * mips-linux-nat.c (mips_linux_nat_target): New class.
7207 (super_fetch_registers, super_store_registers, super_close):
7208 Delete.
7209 (the_mips_linux_nat_target): New.
7210 (mips64_linux_regsets_fetch_registers)
7211 (mips64_linux_regsets_store_registers)
7212 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7213 (mips_linux_register_u_offset, mips_linux_read_description)
7214 (mips_linux_can_use_hw_breakpoint)
7215 (mips_linux_stopped_by_watchpoint)
7216 (mips_linux_stopped_data_address)
7217 (mips_linux_region_ok_for_hw_watchpoint)
7218 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7219 (mips_linux_close): Refactor as methods of mips_linux_nat.
7220 (_initialize_mips_linux_nat): Adjust to C++ification.
7221
7222 * aix-thread.c (aix_thread_target): New class.
7223 (aix_thread_ops): Now an aix_thread_target.
7224 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7225 (aix_thread_fetch_registers, aix_thread_store_registers)
7226 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7227 (aix_thread_thread_alive, aix_thread_pid_to_str)
7228 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7229 Refactor as methods of aix_thread_target.
7230 (init_aix_thread_ops): Delete.
7231 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7232 and complete_target_initialization.
7233 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7234 (rs6000_nat_target): New class.
7235 (the_rs6000_nat_target): New.
7236 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7237 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7238 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7239 (super_create_inferior): Delete.
7240 (_initialize_rs6000_nat): Adjust to C++ification.
7241
7242 * arm-linux-nat.c (arm_linux_nat_target): New class.
7243 (the_arm_linux_nat_target): New.
7244 (arm_linux_fetch_inferior_registers)
7245 (arm_linux_store_inferior_registers, arm_linux_read_description)
7246 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7247 (arm_linux_remove_hw_breakpoint)
7248 (arm_linux_region_ok_for_hw_watchpoint)
7249 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7250 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7251 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7252 arm_linux_nat_target.
7253 (_initialize_arm_linux_nat): Adjust to C++ification.
7254
7255 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7256 (the_aarch64_linux_nat_target): New.
7257 (aarch64_linux_fetch_inferior_registers)
7258 (aarch64_linux_store_inferior_registers)
7259 (aarch64_linux_child_post_startup_inferior)
7260 (aarch64_linux_read_description)
7261 (aarch64_linux_can_use_hw_breakpoint)
7262 (aarch64_linux_insert_hw_breakpoint)
7263 (aarch64_linux_remove_hw_breakpoint)
7264 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7265 (aarch64_linux_region_ok_for_hw_watchpoint)
7266 (aarch64_linux_stopped_data_address)
7267 (aarch64_linux_stopped_by_watchpoint)
7268 (aarch64_linux_watchpoint_addr_within_range)
7269 (aarch64_linux_can_do_single_step): Refactor as methods of
7270 aarch64_linux_nat_target.
7271 (super_post_startup_inferior): Delete.
7272 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7273
7274 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7275 (the_hppa_linux_nat_target): New.
7276 (hppa_linux_fetch_inferior_registers)
7277 (hppa_linux_store_inferior_registers): Refactor as methods of
7278 hppa_linux_nat_target.
7279 (_initialize_hppa_linux_nat): Adjust to C++ification.
7280
7281 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7282 (the_ia64_linux_nat_target): New.
7283 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7284 (ia64_linux_stopped_data_address)
7285 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7286 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7287 ia64_linux_nat_target methods.
7288 (super_xfer_partial): Delete.
7289 (_initialize_ia64_linux_nat): Adjust to C++ification.
7290
7291 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7292 (the_m32r_linux_nat_target): New.
7293 (m32r_linux_fetch_inferior_registers)
7294 (m32r_linux_store_inferior_registers): Refactor as
7295 m32r_linux_nat_target methods.
7296 (_initialize_m32r_linux_nat): Adjust to C++ification.
7297
7298 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7299 (the_m68k_linux_nat_target): New.
7300 (m68k_linux_fetch_inferior_registers)
7301 (m68k_linux_store_inferior_registers): Refactor as
7302 m68k_linux_nat_target methods.
7303 (_initialize_m68k_linux_nat): Adjust to C++ification.
7304
7305 * s390-linux-nat.c (s390_linux_nat_target): New class.
7306 (the_s390_linux_nat_target): New.
7307 (s390_linux_fetch_inferior_registers)
7308 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7309 (s390_insert_watchpoint, s390_remove_watchpoint)
7310 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7311 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7312 (s390_auxv_parse, s390_read_description): Refactor as methods of
7313 s390_linux_nat_target.
7314 (_initialize_s390_nat): Adjust to C++ification.
7315
7316 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7317 (the_sparc_linux_nat_target): New.
7318 (_initialize_sparc_linux_nat): Adjust to C++ification.
7319 * sparc-nat.c (sparc_fetch_inferior_registers)
7320 (sparc_store_inferior_registers): Remove target_ops parameter.
7321 * sparc-nat.h (sparc_fetch_inferior_registers)
7322 (sparc_store_inferior_registers): Remove target_ops parameter.
7323 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7324 (the_sparc64_linux_nat_target): New.
7325 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7326
7327 * spu-linux-nat.c (spu_linux_nat_target): New class.
7328 (the_spu_linux_nat_target): New.
7329 (spu_child_post_startup_inferior, spu_child_post_attach)
7330 (spu_child_wait, spu_fetch_inferior_registers)
7331 (spu_store_inferior_registers, spu_xfer_partial)
7332 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7333 methods.
7334 (_initialize_spu_nat): Adjust to C++ification.
7335
7336 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7337 (the_tilegx_linux_nat_target): New.
7338 (fetch_inferior_registers, store_inferior_registers):
7339 Refactor as methods.
7340 (_initialize_tile_linux_nat): Adjust to C++ification.
7341
7342 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7343 (the_xtensa_linux_nat_target): New.
7344 (xtensa_linux_fetch_inferior_registers)
7345 (xtensa_linux_store_inferior_registers): Refactor as
7346 xtensa_linux_nat_target methods.
7347 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7348
7349 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7350 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7351 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7352 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7353 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7354 (fbsd_stopped_by_sw_breakpoint)
7355 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7356 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7357 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7358 (fbsd_post_startup_inferior, fbsd_post_attach)
7359 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7360 (fbsd_set_syscall_catchpoint)
7361 (super_xfer_partial, super_resume, super_wait)
7362 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7363 (fbsd_handle_debug_trap): Remove target_ops parameter.
7364 (fbsd_nat_add_target): Delete.
7365 * fbsd-nat.h: Include "inf-ptrace.h".
7366 (fbsd_nat_add_target): Delete.
7367 (USE_SIGTRAP_SIGINFO): Define.
7368 (fbsd_nat_target): New class.
7369
7370 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7371 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7372 (amd64bsd_target): Delete.
7373 * amd64-bsd-nat.h: New file.
7374 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7375 "x86-bsd-nat.h".
7376 (amd64_fbsd_nat_target): New class.
7377 (the_amd64_fbsd_nat_target): New.
7378 (amd64fbsd_read_description): Refactor as method of
7379 amd64_fbsd_nat_target.
7380 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7381 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7382 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7383 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7384 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7385 (i386bsd_target): Delete.
7386 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7387 (i386bsd_fetch_inferior_registers)
7388 (i386bsd_store_inferior_registers): Declare.
7389 (i386_bsd_nat_target): New class.
7390 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7391 (the_i386_fbsd_nat_target): New.
7392 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7393 i386_fbsd_nat_target methods.
7394 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7395 (_initialize_i386fbsd_nat): Adjust to C++ification.
7396 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7397 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7398 (_initialize_x86_bsd_nat): Adjust to C++ification.
7399 * x86-bsd-nat.h: Include "x86-nat.h".
7400 (x86bsd_target): Delete declaration.
7401 (x86bsd_nat_target): New class.
7402
7403 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7404 (the_aarch64_fbsd_nat_target): New.
7405 (aarch64_fbsd_fetch_inferior_registers)
7406 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7407 aarch64_fbsd_nat_target.
7408 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7409 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7410 (the_alpha_bsd_nat_target): New.
7411 (alphabsd_fetch_inferior_registers)
7412 (alphabsd_store_inferior_registers): Refactor as
7413 alpha_bsd_nat_target methods.
7414 (_initialize_alphabsd_nat): Refactor as methods of
7415 alpha_bsd_nat_target.
7416 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7417 (the_amd64_nbsd_nat_target): New.
7418 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7419 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7420 (the_amd64_obsd_nat_target): New.
7421 (_initialize_amd64obsd_nat): Adjust to C++ification.
7422 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7423 (the_arm_fbsd_nat_target): New.
7424 (arm_fbsd_fetch_inferior_registers)
7425 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7426 (_initialize_arm_fbsd_nat): Refactor as methods of
7427 arm_fbsd_nat_target.
7428 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7429 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7430 (the_arm_netbsd_nat_target): New.
7431 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7432 arm_netbsd_nat_target.
7433 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7434 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7435 (the_hppa_nbsd_nat_target): New.
7436 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7437 hppa_nbsd_nat_target methods.
7438 (_initialize_hppanbsd_nat): Adjust to C++ification.
7439 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7440 (the_hppa_obsd_nat_target): New.
7441 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7442 methods of hppa_obsd_nat_target.
7443 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7444 add_target.
7445 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7446 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7447 add_target.
7448 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7449 (_initialize_i386obsd_nat): Use add_target.
7450 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7451 (the_m68k_bsd_nat_target): New.
7452 (m68kbsd_fetch_inferior_registers)
7453 (m68kbsd_store_inferior_registers): Refactor as methods of
7454 m68k_bsd_nat_target.
7455 (_initialize_m68kbsd_nat): Adjust to C++ification.
7456 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7457 (the_mips_fbsd_nat_target): New.
7458 (mips_fbsd_fetch_inferior_registers)
7459 (mips_fbsd_store_inferior_registers): Refactor as methods of
7460 mips_fbsd_nat_target.
7461 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7462 add_target.
7463 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7464 (the_mips_nbsd_nat_target): New.
7465 (mipsnbsd_fetch_inferior_registers)
7466 (mipsnbsd_store_inferior_registers): Refactor as methods of
7467 mips_nbsd_nat_target.
7468 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7469 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7470 (the_mips64_obsd_nat_target): New.
7471 (mips64obsd_fetch_inferior_registers)
7472 (mips64obsd_store_inferior_registers): Refactor as methods of
7473 mips64_obsd_nat_target.
7474 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7475 add_target.
7476 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7477 nbsd_nat_target.
7478 * nbsd-nat.h: Include "inf-ptrace.h".
7479 (nbsd_nat_target): New class.
7480 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7481 (obsd_wait): Refactor as methods of obsd_nat_target.
7482 (obsd_add_target): Delete.
7483 * obsd-nat.h: Include "inf-ptrace.h".
7484 (obsd_nat_target): New class.
7485 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7486 (the_ppc_fbsd_nat_target): New.
7487 (ppcfbsd_fetch_inferior_registers)
7488 (ppcfbsd_store_inferior_registers): Refactor as methods of
7489 ppc_fbsd_nat_target.
7490 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7491 add_target.
7492 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7493 (the_ppc_nbsd_nat_target): New.
7494 (ppcnbsd_fetch_inferior_registers)
7495 (ppcnbsd_store_inferior_registers): Refactor as methods of
7496 ppc_nbsd_nat_target.
7497 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7498 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7499 (the_ppc_obsd_nat_target): New.
7500 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7501 methods of ppc_obsd_nat_target.
7502 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7503 add_target.
7504 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7505 (the_sh_nbsd_nat_target): New.
7506 (shnbsd_fetch_inferior_registers)
7507 (shnbsd_store_inferior_registers): Refactor as methods of
7508 sh_nbsd_nat_target.
7509 (_initialize_shnbsd_nat): Adjust to C++ification.
7510 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7511 (inf_ptrace_xfer_partial): Delete.
7512 (sparc_xfer_partial, sparc_target): Delete.
7513 * sparc-nat.h (sparc_fetch_inferior_registers)
7514 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7515 (sparc_target): Delete function declaration.
7516 (sparc_target): New template class.
7517 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7518 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7519 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7520 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7521 add_target.
7522 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7523 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7524 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7525 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7526 add_target.
7527 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7528 (the_vax_bsd_nat_target): New.
7529 (vaxbsd_fetch_inferior_registers)
7530 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7531 methods.
7532 (_initialize_vaxbsd_nat): Adjust to C++ification.
7533
7534 * bsd-kvm.c (bsd_kvm_target): New class.
7535 (bsd_kvm_ops): Now a bsd_kvm_target.
7536 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7537 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7538 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7539 bsd_kvm_target.
7540 (bsd_kvm_return_one): Delete.
7541 (bsd_kvm_add_target): Adjust to C++ification.
7542
7543 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7544 (nto_procfs_target_procfs): New classes.
7545 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7546 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7547 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7548 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7549 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7550 (procfs_remove_hw_breakpoint, procfs_resume)
7551 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7552 (procfs_kill_inferior, procfs_store_registers)
7553 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7554 as methods of nto_procfs_target.
7555 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7556 (nto_native_ops): Delete.
7557 (procfs_open, procfs_native_open): Delete.
7558 (nto_native_ops): Now an nto_procfs_target_native.
7559 (init_procfs_targets): Adjust to C++ification.
7560 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7561 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7562 Refactor as methods of nto_procfs_target.
7563
7564 * go32-nat.c (go32_nat_target): New class.
7565 (the_go32_nat_target): New.
7566 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7567 (go32_store_registers, go32_xfer_partial, go32_files_info)
7568 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7569 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7570 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7571 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7572 (go32_target): Delete.
7573 (_initialize_go32_nat): Adjust to C++ification.
7574
7575 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7576 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7577 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7578 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7579 gnu_nat_target.
7580 (gnu_target): Delete.
7581 * gnu-nat.h (gnu_target): Delete.
7582 (gnu_nat_target): New class.
7583 * i386-gnu-nat.c (gnu_base_target): New.
7584 (i386_gnu_nat_target): New class.
7585 (the_i386_gnu_nat_target): New.
7586 (_initialize_i386gnu_nat): Adjust to C++ification.
7587
3fffc070
PA
75882018-05-02 Pedro Alves <palves@redhat.com>
7589
7590 * bfd-target.c (target_bfd_xclose): Rename to ...
7591 (target_bfd_close): ... this.
7592 (target_bfd_reopen): Adjust.
7593 * target.c (target_close): Remove references to to_xclose.
7594 * target.h (target_ops::to_xclose): Delete.
7595 (target_ops::to_close): Update comments.
7596
6798487f
PA
75972018-05-02 Pedro Alves <palves@redhat.com>
7598
7599 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7600 "linux-nat.h".
7601 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7602 * inf-ptrace.c (inf_ptrace_register_u_offset)
7603 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7604 (inf_ptrace_store_register, inf_ptrace_store_registers)
7605 (inf_ptrace_trad_target): Move to ...
7606 * linux-nat-trad.c: ... this new file.
7607 * linux-nat-trad.h: New file.
7608 * linux-nat.c (linux_target_install_ops): Make extern.
7609 (linux_trad_target): Delete.
7610 * linux-nat.h (linux_trad_target): Delete declaration.
7611 (linux_target_install_ops): Declare.
7612 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7613 "linux-nat.h".
7614
c1955e17
PA
76152018-05-02 Pedro Alves <palves@redhat.com>
7616
7617 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7618 procfs_target/add_target here.
7619 * procfs.c (procfs_target): Make static.
7620 (_initialize_procfs): Call add_target here.
7621 * procfs.h (struct target_ops): Remove forward declaration.
7622 (procfs_target): Remove declaration.
7623 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7624
b5c8fcb1
PA
76252018-05-02 Pedro Alves <palves@redhat.com>
7626
7627 * procfs.c (procfs_stopped_by_watchpoint)
7628 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7629 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7630 Forward declare.
7631 (procfs_use_watchpoints): Delete, move contents...
7632 (procfs_target): ... here.
7633 * procfs.h (procfs_use_watchpoints): Delete declaration.
7634 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7635 procfs_use_watchpoints.
7636 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7637 procfs_use_watchpoints.
7638
0489430a
TT
76392018-05-02 Tom Tromey <tom@tromey.com>
7640
7641 PR python/20084:
7642 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7643 and var_zuinteger_unlimited.
7644 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7645 and PARAM_ZUINTEGER_UNLIMITED.
7646 (set_parameter_value): Handle var_zuinteger and
7647 var_zuinteger_unlimited.
7648 (add_setshow_generic): Likewise.
7649 (parmpy_init): Likewise.
7650
1632f8ba
DR
76512018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7652
7653 PR rust/23124
7654 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7655 pointer is not null before dereferencing it.
7656
76761936
TT
76572018-04-30 Tom Tromey <tom@tromey.com>
7658
7659 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7660 is_mi_like_p.
7661
2d33446d
TT
76622018-04-30 Tom Tromey <tom@tromey.com>
7663
7664 * breakpoint.c (mention): Remove use of is_mi_like_p.
7665 (print_mention_ranged_breakpoint): Likewise.
7666 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7667 of is_mi_like_p.
7668
f3c6abab
TT
76692018-04-30 Tom Tromey <tom@tromey.com>
7670
7671 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7672
40c03530
TT
76732018-04-30 Tom Tromey <tom@tromey.com>
7674
7675 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7676 (info_spu_event_command): Remove some uses of is_mi_like_p.
7677
2038b7fd
TT
76782018-04-30 Tom Tromey <tom@tromey.com>
7679
7680 * python/py-framefilter.c (py_print_single_arg)
7681 (enumerate_locals, py_print_args, py_print_frame): Remove some
7682 uses of is_mi_like_p.
7683
4904c3c6
TT
76842018-04-30 Tom Tromey <tom@tromey.com>
7685
7686 * ui-out.c: Update.
7687 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7688 * ui-out.h (ui_out::is_mi_like_p): Now const.
7689 (ui_out::do_is_mi_like_p): Now const.
7690 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7691
7c66fffc
TT
76922018-04-30 Tom Tromey <tom@tromey.com>
7693
7694 * varobj.c (varobj_set_visualizer): Use new_reference.
7695 * python/python.c (gdbpy_decode_line): Use new_reference.
7696 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7697 new_reference.
7698
bbfa6f00
TT
76992018-04-30 Tom Tromey <tom@tromey.com>
7700
7701 * varobj.c (install_new_value): Use new_reference.
7702 * value.h (value_incref): Return void. Swap intro comment with
7703 value_decref.
7704 * value.c (set_value_parent): Use new_reference.
7705 (value_incref): Return void. Update intro comment.
7706 (release_value): Use new_reference.
7707 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7708
1831a9f9
TT
77092018-04-30 Tom Tromey <tom@tromey.com>
7710
7711 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7712 * gdb_bfd.h (new_bfd_ref): Remove.
7713 (gdb_bfd_open): Update comment.
7714 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7715 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7716 (gdb_bfd_fdopenr): Use new_reference.
7717 * exec.c (exec_file_attach): Use new_reference.
7718
7c1b5f3d
TT
77192018-04-30 Tom Tromey <tom@tromey.com>
7720
7721 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7722 method.
7723
e11fb955
TT
77242018-04-30 Tom Tromey <tom@tromey.com>
7725
7726 * jit.c (jit_read_code_entry): Use type_align.
7727 * i386-tdep.c (i386_gdbarch_init): Don't call
7728 set_gdbarch_long_long_align_bit.
7729 * gdbarch.sh: Remove long_long_align_bit.
7730 * gdbarch.c, gdbarch.h: Rebuild.
7731 * arc-tdep.c (arc_type_align): New function.
7732 (arc_gdbarch_init): Use arc_type_align. Don't call
7733 set_gdbarch_long_long_align_bit.
7734
2fff16dd
TT
77352018-04-30 Tom Tromey <tom@tromey.com>
7736
7737 * rust-lang.c (rust_type_alignment): Remove.
7738 (rust_composite_type): Use type_align.
7739
6d7bb824
TT
77402018-04-30 Tom Tromey <tom@tromey.com>
7741
7742 * NEWS: Mention Type.align.
7743 * python/py-type.c (typy_get_alignof): New function.
7744 (type_object_getset): Add "alignof".
7745
007e1530
TT
77462018-04-30 Tom Tromey <tom@tromey.com>
7747
7748 PR exp/17095:
7749 * NEWS: Update.
7750 * std-operator.def (UNOP_ALIGNOF): New operator.
7751 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7752 New.
7753 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7754 * c-lang.c (c_op_print_tab): Add alignof.
7755 * c-exp.y (ALIGNOF): New token.
7756 (exp): Add "ALIGNOF" production.
7757 (ident_tokens): Add _Alignof and alignof.
7758
2b4424c3
TT
77592018-04-30 Tom Tromey <tom@tromey.com>
7760
7761 * i386-tdep.c (i386_type_align): New function.
7762 (i386_gdbarch_init): Update.
7763 * gdbarch.sh (type_align): New method.
7764 * gdbarch.c, gdbarch.h: Rebuild.
7765 * arch-utils.h (default_type_align): Declare.
7766 * arch-utils.c (default_type_align): New function.
7767 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7768 (struct type) <align_log2>: New field.
7769 <instance_flags>: Now a bitfield.
7770 (TYPE_RAW_ALIGN): New macro.
7771 (type_align, type_raw_align, set_type_align): Declare.
7772 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7773 functions.
7774 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7775 (get_alignment, maybe_set_alignment): New functions.
7776 (read_structure_type, read_enumeration_type, read_array_type)
7777 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7778 (read_subrange_type, read_base_type): Set type alignment.
7779
d33bc52e
SM
77802018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7781
7782 * dwarf2read.c (read_index_from_section): Use bool.
7783
e28b63a9
FG
77842018-04-29 Fabian Groffen <grobian@gentoo.org>
7785
7786 PR gdb/22950
7787 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7788 with #ifdef.
7789
cd8c76e4
JR
77902018-04-29 John Reiser <jreiser@BitWagon.com>
7791
7792 PR build/22873
7793 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7794 last step, and do it atomically.
7795
476d250e
AO
77962018-04-27 Alexandre Oliva <aoliva@redhat.com>
7797
7798 * compile/compile-c-types.c (convert_int, convert_float):
7799 Update for C FE v1.
7800
6873858b
TT
78012018-04-27 Tom Tromey <tom@tromey.com>
7802
7803 PR rust/22545:
7804 * rust-lang.c (rust_inclusive_range_type_p): New function.
7805 (rust_range): Handle inclusive ranges.
7806 (rust_compute_range): Likewise.
7807 * rust-exp.y (struct rust_op) <inclusive>: New field.
7808 (DOTDOTEQ): New constant.
7809 (range_expr): Add "..=" productions.
7810 (operator_tokens): Add "..=" token.
7811 (ast_range): Add "inclusive" parameter.
7812 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7813 ranges.
7814 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7815 bounds values.
7816 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7817 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7818 Update comments.
7819 * expprint.c (print_subexp_standard): Handle new bounds values.
7820 (dump_subexp_body_standard): Likewise.
7821
632e107b
TT
78222018-04-27 Tom Tromey <tom@tromey.com>
7823
7824 * configure: Rebuild.
7825 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7826 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7827 "OVERRIDE".
7828 (class symbol_needs_eval_context): Likewise.
7829 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7830 (mock_mapped_index::symbol_name_at): Use "override". Remove
7831 "virtual".
7832 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7833 "override".
7834 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7835 * aarch64-tdep.c (instruction_reader::read): Use "override".
7836 (instruction_reader_test::read): Likewise.
7837 * arm-tdep.c (instruction_reader::read): Use "override".
7838 (instruction_reader_thumb::read): Likewise.
7839
b75abf5b
AK
78402018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7841
7842 PR remote/9665
7843 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7844 instead of remote_send.
7845 (remote_send): Remove.
7846
79188d8d
PA
78472018-04-26 Pedro Alves <palves@redhat.com>
7848
7849 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7850 find_function_start_sal instead of find_pc_line.
7851
f50776aa
PA
78522018-04-26 Pedro Alves <palves@redhat.com>
7853
7854 * breakpoint.c (set_breakpoint_location_function): Handle
7855 mst_data_gnu_ifunc.
7856 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7857 * elfread.c (elf_symtab_read): Give data symbols with
7858 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7859 (elf_rel_plt_read): Update comment.
7860 * linespec.c (convert_linespec_to_sals): Handle
7861 mst_data_gnu_ifunc.
7862 (minsym_found): Handle mst_data_gnu_ifunc.
7863 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7864 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7865 * parse.c (find_minsym_type_and_address): Handle
7866 mst_data_gnu_ifunc.
7867 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7868 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7869 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7870 comment.
7871 <mst_data_gnu_ifunc>: New enumerator.
7872
20944a6e
PA
78732018-04-26 Pedro Alves <palves@redhat.com>
7874
7875 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7876 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7877 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7878 Handle it.
7879 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7880 (lookup_minimal_symbol_by_pc): Adjust.
7881 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7882 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7883 * minsyms.h (lookup_msym_prefer): New enum.
7884 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7885 parameter by a lookup_msym_prefer parameter.
7886
1adeb822
PA
78872018-04-26 Pedro Alves <palves@redhat.com>
7888
7889 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7890 ends in "@plt" instead of looking at the symbol's section.
7891
a0aca7b0
PA
78922018-04-26 Pedro Alves <palves@redhat.com>
7893
7894 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7895 all references.
7896 (find_pc_partial_function_gnu_ifunc): Rename to ...
7897 (find_pc_partial_function): ... this, and remove references to
7898 'is_gnu_ifunc_p'.
7899 (find_pc_partial_function): Delete old implementation.
7900 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7901
76af0f26
PA
79022018-04-26 Pedro Alves <palves@redhat.com>
7903
7904 * linespec.c (struct bound_minimal_symbol_search_key): New.
7905 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7906 skip first line if we found a GNU ifunc minimal symbol by name.
7907 (compare_msymbols): Change parameters to work with a destructured
7908 lhs minsym.
7909 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7910 functions.
7911
3467ec66
PA
79122018-04-26 Pedro Alves <palves@redhat.com>
7913
7914 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7915 ifunc targets here. Instead, if we have an ifunc minsym, use its
7916 address/name.
7917 (add_location_to_breakpoint): Store the minsym and the objfile in
7918 the breakpoint location.
7919 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7920 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7921 Record the minsym in the sal.
7922 * symtab.h (symtab_and_line) <msymbol>: New field.
7923
28f4fa4d
PA
79242018-04-26 Pedro Alves <palves@redhat.com>
7925
7926 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7927 unless we actually resolved the ifunc.
7928
ca31ab1d
PA
79292018-04-26 Pedro Alves <palves@redhat.com>
7930
7931 * c-exp.y (variable production): Prefer ifunc minsyms over
7932 regular function symbols.
7933 * symtab.c (find_gnu_ifunc): New function.
7934 * minsyms.h (lookup_msym_prefer): New enum.
7935 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7936 parameter by a lookup_msym_prefer parameter.
7937 * symtab.h (find_gnu_ifunc): New declaration.
7938
8388016d
PA
79392018-04-26 Pedro Alves <palves@redhat.com>
7940
7941 * blockframe.c (find_gnu_ifunc_target_type): New function.
7942 (find_function_type): New.
7943 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7944 return a value with a memory address.
7945 (eval_call): For calls to GNU ifunc functions, try to find the
7946 type of the target function from the type that the resolver
7947 returns.
7948 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7949 symbols.
7950 * infcall.c (find_function_return_type): Delete.
7951 (find_function_addr): Add 'function_type' parameter. For calls to
7952 GNU ifunc functions, try to find the type of the target function
7953 from the type that the resolver returns, and return it via
7954 FUNCTION_TYPE.
7955 (call_function_by_hand_dummy): Adjust to use the function type
7956 returned by find_function_addr.
7957 (find_function_addr): Add 'function_type' parameter and move
7958 description here.
7959 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7960 declarations.
7961
a376e11d
PA
79622018-04-26 Pedro Alves <palves@redhat.com>
7963
7964 * c-exp.y (variable production): Skip finding an alias for ifunc
7965 symbols.
7966
02e169e2
PA
79672018-04-26 Pedro Alves <palves@redhat.com>
7968
7969 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7970
249b5733
PA
79712018-04-25 Pedro Alves <palves@redhat.com>
7972
7973 * infcmd.c (kill_command): Print the pid as string, not the whole
7974 thread's ptid. Add comment. s/has been killed/killed/ in output
7975 message.
7976 * remote.c (remote_detach_1): Print the pid as string, not the
7977 whole thread's ptid.
7978
f67c0c91
SDJ
79792018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7980 Sergio Durigan Junior <sergiodj@redhat.com>
7981 Pedro Alves <palves@redhat.com>
7982
7983 * infcmd.c (kill_command): Print message when inferior has
7984 been killed.
7985 * inferior.c (print_inferior_events): Remove 'static'. Set as
7986 '1'.
7987 (add_inferior): Improve message printed when
7988 'print_inferior_events' is on.
7989 (exit_inferior): Remove message printed when
7990 'print_inferior_events' is on.
7991 (detach_inferior): Improve message printed when
7992 'print_inferior_events' is on.
7993 (initialize_inferiors): Use 'add_inferior_silent' to set
7994 'current_inferior_'.
7995 * inferior.h (print_inferior_events): Declare here as
7996 'extern'.
7997 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7998 '[Detaching...]' messages when 'print_inferior_events' is on.
7999 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8000 as prefix/suffix for messages. Remove periods. Fix erroneous
8001 'Detaching after fork from child...', replace it by '... from
8002 parent...'.
8003 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8004 prefix/suffix when printing 'Detaching...' messages. Print
8005 them when 'print_inferior_events' is on.
8006 * remote.c (remote_detach_1): Print message when detaching
8007 from inferior and '!is_fork_parent'.
8008
e427af18
TT
80092018-04-24 Tom Tromey <tom@tromey.com>
8010
8011 * cli-out.h: Reindent.
8012
05b1d8d6
TT
80132018-04-24 Tom Tromey <tom@tromey.com>
8014
8015 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8016 (cli_ui_out::do_field_string): Use fputs_filtered.
8017 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8018
a95c7dab
TT
80192018-04-23 Tom Tromey <tom@tromey.com>
8020
8021 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8022 gdb::unique_xmalloc_ptr.
8023
458412c3
TT
80242018-04-23 Tom Tromey <tom@tromey.com>
8025
8026 * configure: Rebuild.
8027
db86b02b
RS
80282018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8029
8030 PR gdb/23095
8031 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8032 prepare_for_testing. Set normal_bp to r_debug_state if target
8033 is bsd.
8034
00aecdcf
PA
80352018-04-21 Pedro Alves <palves@redhat.com>
8036 Rajendra SY <rajendra.sy@gmail.com>
8037
8038 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8039 * remote.c (extended_remote_attach): In all-stop mode, mark the
8040 thread as executing.
8041
224608c3
PW
80422018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8043
8044 * thread.c (thread_apply_all_command): Fix comment.
8045 (thread_command): Fix comment.
8046
3b74854b
AH
80472018-04-10 Alan Hayward <alan.hayward@arm.com>
8048
8049 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8050 parameter.
8051 * features/aarch64-core.c (create_feature_aarch64_core):
8052 Regenerate.
8053 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8054 Likewise.
8055 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8056 Likewise.
8057 * features/i386/32bit-avx512.c
8058 (create_feature_i386_32bit_avx512): Likewise.
8059 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8060 Likewise.
8061 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8062 Likewise.
8063 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8064 Likewise.
8065 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8066 Likewise.
8067 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8068 Likewise.
8069 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8070 Likewise.
8071 * features/i386/64bit-avx512.c
8072 (create_feature_i386_64bit_avx512): Likewise.
8073 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8074 Likewise.
8075 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8076 Likewise.
8077 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8078 Likewise.
8079 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8080 Likewise.
8081 * features/i386/64bit-segments.c
8082 (create_feature_i386_64bit_segments): Likewise.
8083 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8084 Likewise.
8085 * features/i386/x32-core.c
8086 (create_feature_i386_x32_core): Likewise.
8087 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8088 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8089 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8090 * target-descriptions.c: In generated code, don't pass xml
8091 filename.
8092
e98577a9
AH
80932018-04-18 Alan Hayward <alan.hayward@arm.com>
8094
8095 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8096 (print_xml_feature::visit_post): Likewise.
8097 (print_xml_feature::visit): Likewise.
8098 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8099 (print_xml_feature): Add new class.
8100 * regformats/regdat.sh: Null xmltarget on feature targets.
8101 * target-descriptions.c (struct target_desc): Add xmltarget.
8102 (maintenance_check_tdesc_xml_convert): Add unittest function.
8103 (tdesc_get_features_xml): Add function to get xml.
8104 (maintenance_check_xml_descriptions): Test xml generation.
8105 * xml-tdesc.c (string_read_description_xml): Add function.
8106 * xml-tdesc.h (string_read_description_xml): Add declaration.
8107
ad7fc756
AH
81082018-04-18 Alan Hayward <alan.hayward@arm.com>
8109
8110 * features/Makefile: Add feature marker to targets with new style
8111 target descriptions.
8112 * regformats/aarch64.dat: Regenerate.
8113 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8114 * regformats/i386/amd64-avx-linux.dat: Likewise.
8115 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8116 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8117 * regformats/i386/amd64-linux.dat: Likewise.
8118 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8119 * regformats/i386/amd64.dat: Likewise.
8120 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8121 * regformats/i386/i386-avx-linux.dat: Likewise.
8122 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8123 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8124 * regformats/i386/i386-linux.dat: Likewise.
8125 * regformats/i386/i386-mmx-linux.dat: Likewise.
8126 * regformats/i386/i386-mpx-linux.dat: Likewise.
8127 * regformats/i386/i386.dat: Likewise.
8128 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8129 * regformats/i386/x32-avx-linux.dat: Likewise.
8130 * regformats/i386/x32-linux.dat: Likewise.
8131 * regformats/tic6x-c62x-linux.dat: Likewise.
8132 * regformats/tic6x-c64x-linux.dat: Likewise.
8133 * regformats/tic6x-c64xp-linux.dat: Likewise.
8134 * regformats/regdat.sh: Parse feature marker.
8135
d278f585
AH
81362018-04-18 Alan Hayward <alan.hayward@arm.com>
8137
8138 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8139 (tdesc_osabi_name): Likewise.
8140 * target-descriptions.c (tdesc_architecture_name): Add new
8141 function.
8142 (tdesc_osabi_name): Likewise.
8143
eee8a18d
AH
81442018-04-18 Alan Hayward <alan.hayward@arm.com>
8145
8146 * common/tdesc.c (tdesc_predefined_type): Move to here.
8147 (tdesc_named_type): Likewise.
8148 (tdesc_create_vector): Likewise.
8149 (tdesc_create_struct): Likewise.
8150 (tdesc_set_struct_size): Likewise.
8151 (tdesc_create_union): Likewise.
8152 (tdesc_create_flags): Likewise.
8153 (tdesc_create_enum): Likewise.
8154 (tdesc_add_field): Likewise.
8155 (tdesc_add_typed_bitfield): Likewise.
8156 (tdesc_add_bitfield): Likewise.
8157 (tdesc_add_flag): Likewise.
8158 (tdesc_add_enum_value): Likewise.
8159 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8160 (struct tdesc_type_vector): Likewise.
8161 (struct tdesc_type_field): Likewise.
8162 (struct tdesc_type_with_fields): Likewise.
8163 (tdesc_create_enum): Add declaration.
8164 (tdesc_add_typed_bitfield): Likewise.
8165 (tdesc_add_enum_value): Likewise.
8166 * target-descriptions.c (tdesc_type_field): Move from here.
8167 (tdesc_type_builtin): Likewise.
8168 (tdesc_type_vector): Likewise.
8169 (tdesc_type_with_fields): Likewise.
8170 (tdesc_predefined_types): Likewise.
8171 (tdesc_named_type): Likewise.
8172 (tdesc_create_vector): Likewise.
8173 (tdesc_create_struct): Likewise.
8174 (tdesc_set_struct_size): Likewise.
8175 (tdesc_create_union): Likewise.
8176 (tdesc_create_flags): Likewise.
8177 (tdesc_create_enum): Likewise.
8178 (tdesc_add_field): Likewise.
8179 (tdesc_add_typed_bitfield): Likewise.
8180 (tdesc_add_bitfield): Likewise.
8181 (tdesc_add_flag): Likewise.
8182 (tdesc_add_enum_value): Likewise.
8183 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8184 (tdesc_add_typed_bitfield): Likewise.
8185 (tdesc_add_enum_value): Likewise.
8186
82ec9bc7
AH
81872018-04-18 Alan Hayward <alan.hayward@arm.com>
8188
8189 * common/tdesc.c (tdesc_feature::accept): Move to here.
8190 (tdesc_feature::operator==): Likewise.
8191 (tdesc_create_reg): Likewise.
8192 * common/tdesc.h (tdesc_type_kind): Likewise.
8193 (struct tdesc_type): Likewise.
8194 (struct tdesc_feature): Likewise.
8195 * regformats/regdat.sh: Create a feature.
8196 * target-descriptions.c (tdesc_type_kind): Move from here.
8197 (tdesc_type): Likewise.
8198 (tdesc_type_up): Likewise.
8199 (tdesc_feature): Likewise.
8200 (tdesc_create_reg): Likewise.
8201
ea3e7d71
AH
82022018-04-18 Alan Hayward <alan.hayward@arm.com>
8203
8204 * Makefile.in: Add arch/tdesc.c
8205 * common/tdesc.c: New file.
8206 * common/tdesc.h (tdesc_element_visitor): Move to here.
8207 (tdesc_element): Likewise.
8208 (tdesc_reg): Likewise.
8209 (tdesc_reg_up): Likewise.
8210 * regformats/regdef.h (reg): Add offset to constructors.
8211 * target-descriptions.c (tdesc_element_visitor): Move from here.
8212 (tdesc_element): Likewise.
8213 (tdesc_reg): Likewise.
8214 (tdesc_reg_up): Likewise.
8215
bedda9ac
TT
82162018-04-17 Tom Tromey <tom@tromey.com>
8217
8218 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8219 discriminant field.
8220
a037790e
TT
82212018-04-17 Tom Tromey <tom@tromey.com>
8222
8223 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8224
c7dcbf88
AA
82252018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8226
8227 * symtab.c (print_symbol_info): Skip printing filename and line
8228 number when `last' is NULL.
8229 (symtab_symbol_info): Use empty string instead of NULL for first
8230 invocation of print_symbol_info.
8231 (rbreak_command): Pass NULL to `last' parameter of
8232 print_symbol_info.
8233
07d28c77
SM
82342018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8235
8236 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8237 instead of nullptr.
8238
8a3de5e1
PA
82392018-04-16 Pedro Alves <palves@redhat.com>
8240
8241 * MAINTAINERS (sh): Remove.
8242 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8243 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8244 (ALLDEPFILES): Remove sh64-tdep.c.
8245 * NEWS: Mentions that support for SH-5/SH64 is removed.
8246 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8247 (sh*-*-openbsd*): Ditto.
8248 (sh64-*-elf*): Remove.
8249 (sh*): Remove.
8250 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8251 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8252 * sh-tdep.c: No longer include "sh64-tdep.h".
8253 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8254 * sh64-tdep.c, sh64-tdep.h: Remove files.
8255
a2a79012
PA
82562018-04-16 Pedro Alves <palves@redhat.com>
8257
8258 * MAINTAINERS: Remove m88k.
8259 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8260 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8261 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8262 * NEWS: Mention that support for m88k was removed.
8263 * configure.host (m88*-*-*): Remove support.
8264 * configure.nat (m88k-*-*): Remove support.
8265 * configure.tgt (m88*-*-openbsd*): Remove.
8266 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8267
eda4efb1
SM
82682018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8269
8270 * configure.tgt (x86_tobjs): New variable.
8271 (amd64_tobjs, i386_tobjs): Use it.
8272
b744723f
AA
82732018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8274
8275 * symtab.c (print_symbol_info): Precede the symbol definition by
8276 the line number when available.
8277 * NEWS: Advertise this enhancement.
8278
4a4495d6
MM
82792018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8280
8281 * NEWS (New options): announce set/show record btrace cpu.
8282 * btrace.c: Include record-btrace.h.
8283 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8284 the vendor is unknown.
8285 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8286 Maybe overwrite the btrace configuration's cpu.
8287 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8288 (btrace_fetch): Add cpu parameter. Update callers.
8289 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8290 Maybe overwrite the btrace configuration's cpu. Skip enabling
8291 errata workarounds if the vendor is unknown.
8292 * python/py-record-btrace.c: Include record-btrace.h.
8293 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8294 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8295 * record-btrace.c (record_btrace_cpu_state_kind): New.
8296 (record_btrace_cpu): New.
8297 (set_record_btrace_cpu_cmdlist): New.
8298 (record_btrace_get_cpu): New.
8299 (require_btrace_thread, record_btrace_info)
8300 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8301 (cmd_set_record_btrace_cpu_none): New.
8302 (cmd_set_record_btrace_cpu_auto): New.
8303 (cmd_set_record_btrace_cpu): New.
8304 (cmd_show_record_btrace_cpu): New.
8305 (_initialize_record_btrace): Initialize set/show record btrace cpu
8306 commands.
8307 * record-btrace.h (record_btrace_get_cpu): New.
8308
69f90c75
MM
83092018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8310
8311 * record.c (set_record_command): Fix typo in message.
8312
b85310e1
MM
83132018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8314
8315 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8316
1d509aa6
MM
83172018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8318
8319 * infrun.c (process_event_stop_test): Call
8320 gdbarch_in_indirect_branch_thunk.
8321 * gdbarch.sh (in_indirect_branch_thunk): New.
8322 * gdbarch.c: Regenerated.
8323 * gdbarch.h: Regenerated.
8324 * x86-tdep.h: New.
8325 * x86-tdep.c: New.
8326 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8327 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8328 (ALLDEPFILES): Add x86-tdep.c.
8329 * arch-utils.h (default_in_indirect_branch_thunk): New.
8330 * arch-utils.c (default_in_indirect_branch_thunk): New.
8331 * i386-tdep: Include x86-tdep.h.
8332 (i386_in_indirect_branch_thunk): New.
8333 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8334 function.
8335 * amd64-tdep: Include x86-tdep.h.
8336 (amd64_in_indirect_branch_thunk): New.
8337 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8338
b4be9bfd
JK
83392018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8340
8341 PR gdb/23053
8342 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8343 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8344 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8345 regression.
8346
53d7df28
TT
83472018-04-12 Tom Tromey <tom@tromey.com>
8348
8349 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8350 (rust_evaluate_subexp): Likewise.
8351
70b33f19
PA
83522018-04-12 Pedro Alves <palves@redhat.com>
8353
8354 * procfs.c (procfs_detach): Make forward declaration's prototype
8355 match definition's protototype.
8356 (proc_get_LDT_entry): Remove stale do_cleanups call.
8357
436411b1
PA
83582018-04-12 Pedro Alves <palves@redhat.com>
8359
8360 * target.h (target_ops::to_has_exited): Delete.
8361 (target_has_exited): Delete.
8362 * target-delegates.c: Regenerate.
8363
20db9c52
PA
83642018-04-11 Pedro Alves <palves@redhat.com>
8365
8366 * target.c (fileio_fh_t::t): Add comment.
8367 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8368 (target_fileio_close): Handle a NULL target.
8369 (invalidate_fileio_fh): New.
8370 (target_close): Call it.
8371 * remote.c (remote_hostio_send_command): No longer check whether
8372 remote_desc is open.
8373
5ff79300
PA
83742018-04-11 Pedro Alves <palves@redhat.com>
8375
8376 * target.c (fileio_fh_t): Make it a named struct instead of a
8377 typedef.
8378 (fileio_fh_t::is_closed): New method.
8379 (DEF_VEC_O (fileio_fh_t)): Remove.
8380 (fileio_fhandles): Now a std::vector.
8381 (is_closed_fileio_fh): Delete.
8382 (acquire_fileio_fd): Adjust. Rename parameters.
8383 (release_fileio_fd): Adjust.
8384 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8385 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8386 (target_fileio_close): Adjust.
8387
6e22e10d
SM
83882018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8389
8390 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8391 index.
8392
731f534f
PA
83932018-04-10 Pedro Alves <palves@redhat.com>
8394
8395 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8396 (scoped_finish_thread_state): New class.
8397 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8398 cleanup.
8399 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8400 (fetch_inferior_event, normal_stop): Likewise.
8401 * thread.c (finish_thread_state_cleanup): Delete.
8402
d5f4488f
SM
84032018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8404 Pedro Alves <palves@redhat.com>
8405
8406 * value.c: Include "selftest.h" and "common/array-view.h".
8407 (struct range) <operator ==>: New.
8408 (test_ranges_contain): New.
8409 (check_ranges_vector): New.
8410 (test_insert_into_bit_range_vector): New.
8411 (_initialize_values): Register selftests.
8412 * common/array-view.h (operator==, operator!=): New.
8413
b24531ed
SM
84142018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8415
8416 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8417 an iterator.
8418 * inline-frame.c: Include <algorithm>.
8419 (struct inline_state): Add constructor.
8420 (inline_state_s): Remove.
8421 (DEF_VEC_O(inline_state_s)): Remove.
8422 (inline_states): Change type to std::vector.
8423 (find_inline_frame_state): Adjust to std::vector.
8424 (allocate_inline_frame_state): Remove.
8425 (clear_inline_frame_state): Adjust to std::vector.
8426 (skip_inline_frames): Adjust to std::vector.
8427
c252925c
SM
84282018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8429
8430 * tracepoint.h (struct trace_state_variable): Add constructor.
8431 <name>: Change type to std::string.
8432 * tracepoint.c (tsv_s): Remove.
8433 (DEF_VEC_O(tsv_s)): Remove.
8434 (tvariables): Change to std::vector.
8435 (create_trace_state_variable): Adjust to std::vector.
8436 (find_trace_state_variable): Likewise.
8437 (find_trace_state_variable_by_number): Likewise.
8438 (delete_trace_state_variable): Likewise.
8439 (trace_variable_command): Adjust to std::string.
8440 (delete_trace_variable_command): Likewise.
8441 (tvariables_info_1): Adjust to std::vector.
8442 (save_trace_state_variables): Likewise.
8443 (start_tracing): Likewise.
8444 (merge_uploaded_trace_state_variables): Adjust to std::vector
8445 and std::string.
8446 * target.h (struct target_ops)
8447 <to_download_trace_state_variable>: Pass reference to
8448 trace_state_variable.
8449 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8450 * target-delegates.c: Re-generate.
8451 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8452 (mi_tsv_deleted): Likewise.
8453 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8454 * remote.c (remote_download_trace_state_variable): Change
8455 pointer to reference and adjust.
8456 * make-target-delegates (parse_argtypes): Handle references.
8457 (write_function_header): Likewise.
8458 (munge_type): Likewise.
8459
c9638d26
SM
84602018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8461
8462 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8463 string_view-selftests.c.
8464 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8465 testsuite.
8466 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8467 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8468 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8469 * unittests/basic_string_view/element_access/char/1.cc:
8470 Likewise.
8471 * unittests/basic_string_view/element_access/char/empty.cc:
8472 Likewise.
8473 * unittests/basic_string_view/element_access/char/front_back.cc:
8474 Likewise.
8475 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8476 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8477 Likewise.
8478 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8479 Likewise.
8480 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8481 Likewise.
8482 * unittests/basic_string_view/operations/compare/char/1.cc:
8483 Likewise.
8484 * unittests/basic_string_view/operations/compare/char/13650.cc:
8485 Likewise.
8486 * unittests/basic_string_view/operations/copy/char/1.cc:
8487 Likewise.
8488 * unittests/basic_string_view/operations/data/char/1.cc:
8489 Likewise.
8490 * unittests/basic_string_view/operations/find/char/1.cc:
8491 Likewise.
8492 * unittests/basic_string_view/operations/find/char/2.cc:
8493 Likewise.
8494 * unittests/basic_string_view/operations/find/char/3.cc:
8495 Likewise.
8496 * unittests/basic_string_view/operations/find/char/4.cc:
8497 Likewise.
8498 * unittests/basic_string_view/operations/rfind/char/1.cc:
8499 Likewise.
8500 * unittests/basic_string_view/operations/rfind/char/2.cc:
8501 Likewise.
8502 * unittests/basic_string_view/operations/rfind/char/3.cc:
8503 Likewise.
8504 * unittests/basic_string_view/operations/substr/char/1.cc:
8505 Likewise.
8506 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8507 * unittests/string_view-selftests.c: New file.
8508
fdc11678
SM
85092018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8510
8511 * unittests/basic_string_view/capacity/1.cc: New file.
8512 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8513 * unittests/basic_string_view/cons/char/1.cc: New file.
8514 * unittests/basic_string_view/cons/char/2.cc: New file.
8515 * unittests/basic_string_view/cons/char/3.cc: New file.
8516 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8517 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8518 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8519 * unittests/basic_string_view/element_access/char/1.cc: New file.
8520 * unittests/basic_string_view/element_access/char/2.cc: New file.
8521 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8522 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8523 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8524 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8525 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8526 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8527 * unittests/basic_string_view/include.cc: New file.
8528 * unittests/basic_string_view/inserters/char/1.cc: New file.
8529 * unittests/basic_string_view/inserters/char/2.cc: New file.
8530 * unittests/basic_string_view/inserters/char/3.cc: New file.
8531 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8532 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8533 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8534 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8535 * unittests/basic_string_view/literals/types.cc: New file.
8536 * unittests/basic_string_view/literals/values.cc: New file.
8537 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8538 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8539 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8540 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8541 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8542 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8543 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8544 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8545 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8546 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8547 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8548 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8549 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8550 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8551 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8552 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8553 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8554 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8555 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8556 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8557 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8558 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8559 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8560 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8561 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8562 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8563 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8564 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8565 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8566 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8567 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8568 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8569 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8570 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8571 * unittests/basic_string_view/operators/char/2.cc: New file.
8572 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8573 * unittests/basic_string_view/range_access/char/1.cc: New file.
8574 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8575 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8576 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8577 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8578 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8579 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8580 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8581 * unittests/basic_string_view/typedefs.cc: New file.
8582 * unittests/basic_string_view/types/1.cc: New file.
8583
8345c4a2
SM
85842018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8585
8586 * common/gdb_string_view.h: Remove libstdc++ implementation
8587 details, adjust to gdb reality.
8588 * common/gdb_string_view.tcc: Likewise.
8589 * cli/cli-script.c (struct string_view): Remove.
8590 (user_args) <m_args>: Change element type to gdb::string_view.
8591 (user_args::insert_args): Adjust.
8592
7adcdf08
SM
85932018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8594
8595 * common/gdb_string_view.h: New file.
8596 * common/gdb_string_view.tcc: New file.
8597
41260ac2
SM
85982018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8599
8600 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8601 * configure: Re-generate.
8602
0bee6dd4
PA
86032018-04-09 Pedro Alves <palves@redhat.com>
8604
8605 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8606 (set_target_gdbarch): Call
8607 gdb::observers::architecture_changed.notify instead of
8608 observer_notify_architecture_changed.
8609
6f14adc5
SM
86102018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8611
8612 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8613 (do_restore_current_traceframe_cleanup): Remove.
8614 (restore_current_traceframe_cleanup_dtor): Remove.
8615 (make_cleanup_restore_current_traceframe): Remove.
8616 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8617 New.
8618 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8619 * infrun.c (fetch_inferior_event): Use
8620 scoped_restore_current_traceframe.
8621
b2bdb8cf
SM
86222018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8623
8624 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8625 Remove.
8626 <n_allocated_type_units>: Remove.
8627 <all_type_units>: Change to std::vector.
8628 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8629 to std::vector change.
8630 (dwarf2_per_objfile::get_cutu): Likewise.
8631 (dwarf2_per_objfile::get_tu): Likewise.
8632 (create_signatured_type_table_from_index): Likewise.
8633 (create_signatured_type_table_from_debug_names): Likewise.
8634 (dw2_symtab_iter_next): Likewise.
8635 (dw2_print_stats): Likewise.
8636 (dw2_expand_all_symtabs): Likewise.
8637 (dw2_expand_marked_cus): Likewise.
8638 (dw2_debug_names_iterator::next): Likewise.
8639 (dwarf2_initialize_objfile): Likewise.
8640 (add_signatured_type_cu_to_table): Likewise.
8641 (create_all_type_units): Likewise.
8642 (add_type_unit): Likewise.
8643 (struct tu_abbrev_offset): Add constructor.
8644 (build_type_psymtabs_1): Adjust to std::vector change.
8645 (print_tu_stats): Likewise.
8646 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8647 (write_debug_names): Likewise.
8648
b76e467d
SM
86492018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8650
8651 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8652 Make an std::vector.
8653 <n_comp_units>: Remove.
8654 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8655 to std::vector change.
8656 (dwarf2_per_objfile::get_cutu): Likewise.
8657 (dwarf2_per_objfile::get_cu): Likewise.
8658 (create_cus_from_index): Likewise.
8659 (create_addrmap_from_index): Likewise.
8660 (create_addrmap_from_aranges): Likewise.
8661 (dwarf2_read_index): Likewise.
8662 (dw2_find_last_source_symtab): Likewise.
8663 (dw2_map_symtabs_matching_filename): Likewise.
8664 (dw2_symtab_iter_next): Likewise.
8665 (dw2_print_stats): Likewise.
8666 (dw2_expand_all_symtabs): Likewise.
8667 (dw2_expand_symtabs_with_fullname): Likewise.
8668 (dw2_expand_marked_cus): Likewise.
8669 (dw2_map_symbol_filenames): Likewise.
8670 (create_cus_from_debug_names): Likewise.
8671 (dwarf2_read_debug_names): Likewise.
8672 (dw2_debug_names_iterator::next): Likewise.
8673 (dwarf2_initialize_objfile): Likewise.
8674 (set_partial_user): Likewise.
8675 (dwarf2_build_psymtabs_hard): Likewise.
8676 (read_comp_units_from_section): Remove arguments, adjust to
8677 std::vector change.
8678 (create_all_comp_units): Adjust to std::vector and
8679 read_comp_units_from_section changes.
8680 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8681 change.
8682 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8683 (psyms_seen_size): Likewise.
8684 (write_gdbindex): Likewise.
8685 (write_debug_names): Likewise.
8686
12359b5e
SM
86872018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8688
8689 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8690 with dwarf2_per_objfile.
8691 (create_cus_from_index): Likewise.
8692 (create_signatured_type_table_from_index): Likewise.
8693 (dwarf2_read_index): Likewise.
8694 (dwarf2_initialize_objfile): Likewise.
8695 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8696 per_cu rather than get_dwarf2_per_objfile.
8697
ff4c9fec
SM
86982018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8699
8700 * dwarf2read.h (struct signatured_type): Forward declare.
8701 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8702 New methods.
8703 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8704 (dw2_get_cutu): ...this.
8705 (dwarf2_per_objfile::get_cu): Rename from...
8706 (dw2_get_cu): ...this.
8707 (dwarf2_per_objfile::get_tu): New.
8708 (create_addrmap_from_index): Adjust.
8709 (create_addrmap_from_aranges): Adjust.
8710 (dw2_find_last_source_symtab): Adjust.
8711 (dw2_map_symtabs_matching_filename): Adjust.
8712 (dw2_symtab_iter_next): Adjust.
8713 (dw2_print_stats): Adjust.
8714 (dw2_expand_all_symtabs): Adjust.
8715 (dw2_expand_symtabs_with_fullname): Adjust.
8716 (dw2_expand_marked_cus): Adjust.
8717 (dw_expand_symtabs_matching_file_matcher): Adjust.
8718 (dw2_map_symbol_filenames): Adjust.
8719 (dw2_debug_names_iterator::next): Adjust.
8720 (dwarf2_initialize_objfile): Adjust.
8721 (set_partial_user): Adjust.
8722 (dwarf2_build_psymtabs_hard): Adjust.
8723
5ca3fcb6
SM
87242018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8725
8726 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8727 Remove unused variables.
8728 (dw2_map_symtabs_matching_filename): Likewise.
8729 (dwarf2_record_block_ranges): Likewise.
8730 (dwarf2_read_addr_index): Likewise.
8731 (follow_die_offset): Likewise.
8732
b2e586e8
SM
87332018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8734
8735 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8736 to symbol_file_add_main.
8737
7c4e78cf
SM
87382018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8739
8740 PR mi/22299
8741 * mi/mi-console.c (do_fputc_async_safe): New.
8742 (mi_console_file::write_async_safe): New.
8743 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8744 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8745 New.
8746 * ui-file.c (ui_file::putstrn): Adjust call to
8747 fputstrn_unfiltered.
8748 * utils.c (printchar): Replace do_fputs and do_fprintf
8749 parameters by do_fputc.
8750 (fputstr_filtered): Adjust call to printchar.
8751 (fputstr_unfiltered): Likewise.
8752 (fputstrn_filtered): Likewise.
8753 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8754 printchar.
8755 * utils.h (do_fputc_ftype): New typedef.
8756 (fputstrn_unfiltered): Add do_fputc parameter.
8757
5dc026d3
SM
87582018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8759
8760 * regformats/i386/i386-avx.dat: Remove.
8761
c912f608
SM
87622018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8763
8764 PR gdb/22979
8765 * amd64-tdep.c (amd64_none_init_abi): New function.
8766 (amd64_x32_none_init_abi): New function.
8767 (_initialize_amd64_tdep): Register handlers for x86-64 and
8768 x64_32 with GDB_OSABI_NONE.
8769 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8770 GDB_OSABI_NONE osabi.
8771
26540402
SM
87722018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8773
8774 PR gdb/22980
8775 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8776 GDB_OSABI_NONE.
8777 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8778 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8779
9018be22
SM
87802018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8781
8782 * common/byte-vector.h (char_vector): New type.
8783 * target.h (target_read_alloc): Return
8784 gdb::optional<byte_vector>.
8785 (target_read_stralloc): Return gdb::optional<char_vector>.
8786 (target_get_osdata): Return gdb::optional<char_vector>.
8787 * target.c (target_read_alloc_1): Templatize. Replacement
8788 manual memory management with vector.
8789 (target_read_alloc): Change return type, adjust.
8790 (target_read_stralloc): Change return type, adjust.
8791 (target_get_osdata): Change return type, adjust.
8792 * auxv.c (struct auxv_info) <length>: Remove.
8793 <data>: Change type to gdb::optional<byte_vector>.
8794 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8795 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8796 (target_auxv_search): Adjust.
8797 (fprint_target_auxv): Adjust.
8798 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8799 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8800 (linux_make_corefile_notes): Adjust.
8801 * osdata.c (get_osdata): Adjust.
8802 * remote.c (remote_get_threads_with_qxfer): Adjust.
8803 (remote_memory_map): Adjust.
8804 (remote_traceframe_info): Adjust.
8805 (btrace_read_config): Adjust.
8806 (remote_read_btrace): Adjust.
8807 (remote_pid_to_exec_file): Adjust.
8808 * solib-aix.c (solib_aix_get_library_list): Adjust.
8809 * solib-dsbt.c (decode_loadmap): Don't free buf.
8810 (dsbt_get_initial_loadmaps): Adjust.
8811 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8812 * solib-target.c (solib_target_current_sos): Adjust.
8813 * tracepoint.c (sdata_make_value): Adjust.
8814 * xml-support.c (xinclude_start_include): Adjust.
8815 (xml_fetch_content_from_file): Adjust.
8816 * xml-support.h (xml_fetch_another): Change return type.
8817 (xml_fetch_content_from_file): Change return type.
8818 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8819 * xml-tdesc.c (file_read_description_xml): Adjust.
8820 (fetch_available_features_from_target): Change return type.
8821 (target_fetch_description_xml): Adjust.
8822 (target_read_description_xml): Adjust.
8823
14c88955
TT
88242018-04-06 Tom Tromey <tom@tromey.com>
8825
8826 * value.c (~value): Update.
8827 (struct value) <contents>: Now unique_xmalloc_ptr.
8828 (value_contents_bits_eq, allocate_value_contents)
8829 (value_contents_raw, value_contents_all_raw)
8830 (value_contents_for_printing, value_contents_for_printing_const)
8831 (set_value_enclosing_type): Update.
8832
0c7e6dd8
TT
88332018-04-06 Tom Tromey <tom@tromey.com>
8834
8835 * value.c (range_s): Remove typedef, VEC.
8836 (struct range): Add operator<.
8837 (range_lessthan): Remove.
8838 (ranges_contain): Change type.
8839 (~value): Update.
8840 (struct value) <unavailable, optimized_out>: Now std::vector.
8841 (value_entirely_available)
8842 (value_entirely_covered_by_range_vector)
8843 (value_entirely_unavailable, value_entirely_optimized_out):
8844 Update.
8845 (insert_into_bit_range_vector): Change argument type.
8846 (find_first_range_overlap): Likewise.
8847 (struct ranges_and_idx, value_contents_bits_eq)
8848 (require_not_optimized_out, require_available): Update.
8849 (ranges_copy_adjusted): Change argument types.
8850 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8851
2c8331b9
TT
88522018-04-06 Tom Tromey <tom@tromey.com>
8853
8854 * value.c (~value): Update.
8855 (struct value) <parent>: Now a value_ref_ptr.
8856 (value_parent, set_value_parent, value_address, value_copy):
8857 Update.
8858
466ce3ae
TT
88592018-04-06 Tom Tromey <tom@tromey.com>
8860
8861 * value.c (struct value): Add constructor, destructor, and member
8862 initializers.
8863 (allocate_value_lazy, value_decref): Update.
8864
062d818d
TT
88652018-04-06 Tom Tromey <tom@tromey.com>
8866
8867 * value.c (struct value) <released, next>: Remove.
8868 (all_values): Now a std::vector.
8869 (allocate_value_lazy): Update.
8870 (value_next): Remove.
8871 (value_mark, value_free_to_mark, release_value)
8872 (value_release_to_mark): Update.
8873
a6535de1
TT
88742018-04-06 Tom Tromey <tom@tromey.com>
8875
8876 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8877 (free_value_chain): Remove.
8878 * value.c (free_value_chain): Remove.
8879 (value_release_to_mark): Return a std::vector.
8880 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8881 std::vector.
8882 (check_condition): Update.
8883 * eval.c (fetch_subexp_value): Change "val_chain" to a
8884 std::vector.
8885 * breakpoint.c (update_watchpoint): Update.
8886 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8887
b5621201
TT
88882018-04-06 Tom Tromey <tom@tromey.com>
8889
8890 * value.h (free_all_values): Remove.
8891 * value.c (free_all_values): Remove.
8892
4d0266a0
TT
88932018-04-06 Tom Tromey <tom@tromey.com>
8894
8895 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8896 (value_history_chain, value_history_count): Remove.
8897 (value_history): New global.
8898 (record_latest_value, access_value_history, show_values)
8899 (preserve_values): Update.
8900
b4d61099
TT
89012018-04-06 Tom Tromey <tom@tromey.com>
8902
8903 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8904 * varobj.c (varobj_set_display_format, varobj_set_value)
8905 (install_default_visualizer, construct_visualizer)
8906 (install_new_value, ~varobj, varobj_get_value_type)
8907 (my_value_of_variable, varobj_editable_p): Update.
8908 * c-varobj.c (c_describe_child, c_value_of_variable)
8909 (cplus_number_of_children, cplus_describe_child): Update.
8910 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8911 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8912 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8913
9b558729
TT
89142018-04-06 Tom Tromey <tom@tromey.com>
8915
8916 * printcmd.c (last_examine_address): Change type to
8917 value_ref_ptr.
8918 (do_examine, x_command): Update.
8919
850645cf
TT
89202018-04-06 Tom Tromey <tom@tromey.com>
8921
8922 * value.c (release_value): Update.
8923 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8924 (struct bpstats) <val>: Now a value_ref_ptr.
8925 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8926 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8927 (~watchpoint, print_it_watchpoint, watch_command_1)
8928 (invalidate_bp_value_on_memory_change): Update.
8929
22bc8444
TT
89302018-04-06 Tom Tromey <tom@tromey.com>
8931
8932 * varobj.c (varobj_clear_saved_item)
8933 (update_dynamic_varobj_children, install_new_value, ~varobj):
8934 Update.
8935 * value.h (value_incref): Move declaration earlier.
8936 (value_decref): Rename from value_free.
8937 (struct value_ref_policy): New.
8938 (value_ref_ptr): New typedef.
8939 (struct value_deleter): Remove.
8940 (gdb_value_up): Remove typedef.
8941 (release_value): Change return type.
8942 (release_value_or_incref): Remove.
8943 * value.c (set_value_parent): Update.
8944 (value_incref): Change return type.
8945 (value_decref): Rename from value_free.
8946 (value_free_to_mark, free_all_values, free_value_chain): Update.
8947 (release_value): Return value_ref_ptr.
8948 (release_value_or_incref): Remove.
8949 (record_latest_value, set_internalvar, clear_internalvar):
8950 Update.
8951 * stack.c (info_frame_command): Don't call value_free.
8952 * python/py-value.c (valpy_dealloc, valpy_new)
8953 (value_to_value_object): Update.
8954 * printcmd.c (do_examine): Update.
8955 * opencl-lang.c (lval_func_free_closure): Update.
8956 * mi/mi-main.c (register_changed_p): Don't call value_free.
8957 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8958 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8959 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8960 value_free.
8961 * guile/scm-value.c (vlscm_free_value_smob)
8962 (vlscm_scm_from_value): Update.
8963 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8964 (frame_unwind_register_unsigned, get_frame_register_bytes)
8965 (put_frame_register_bytes): Don't call value_free.
8966 * findvar.c (address_from_register): Don't call value_free.
8967 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8968 * dwarf2loc.c (entry_data_value_free_closure)
8969 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8970 (dwarf2_evaluate_loc_desc_full): Update.
8971 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8972 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8973 (~watchpoint, watch_command_1)
8974 (invalidate_bp_value_on_memory_change): Update.
8975 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8976
7f8a5d38
SM
89772018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8978
8979 PR gdb/23022
8980 * warning.m4: Add -Wno-error=deprecated-register.
8981 * configure: Re-generate.
8982
8a76bd3b
TT
89832018-04-05 Tom Tromey <tom@tromey.com>
8984
8985 * linespec.h: Remove include of "vec.h".
8986
8e8d776e
TT
89872018-04-05 Tom Tromey <tom@tromey.com>
8988
8989 * linespec.c (typep): Remove typedef.
8990 (find_methods, find_superclass_methods): Take a std::vector.
8991 (find_method): Use std::vector.
8992
9b2f8581
TT
89932018-04-05 Tom Tromey <tom@tromey.com>
8994
8995 * utils.c (compare_strings): Remove.
8996 * utils.h (compare_strings): Remove.
8997 * objc-lang.h (find_imps): Update.
8998 * objc-lang.c (find_methods): Take a std::vector.
8999 (uniquify_strings, find_imps): Likewise.
9000 * linespec.c (find_methods): Take a std::vector.
9001 (decode_objc): Use std::vector.
9002 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9003 a std::vector.
9004 (find_method, find_function_symbols): Use std::vector.
9005
459a2e4c
TT
90062018-04-05 Tom Tromey <tom@tromey.com>
9007
9008 * completer.c (completion_tracker::completion_tracker): Remove
9009 cast.
9010 (completion_tracker::discard_completions): Likewise.
9011 * breakpoint.c (ambiguous_names_p): Remove cast.
9012 * ada-lang.c (_initialize_ada_language): Remove cast.
9013 * utils.h (streq): Update.
9014 (streq_hash): Add new declaration.
9015 * utils.c (streq): Return bool.
9016 (streq_hash): New function.
9017
9be2c17a
TT
90182018-04-05 Tom Tromey <tom@tromey.com>
9019
9020 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9021 Remove a string copy.
9022
f73c6ece
TT
90232018-04-05 Tom Tromey <tom@tromey.com>
9024
9025 * linespec.c (filter_results): Use std::vector.
9026 (decode_line_2, decode_line_full): Update.
9027
53a0f8a2
TT
90282018-04-05 Tom Tromey <tom@tromey.com>
9029
9030 * linespec.c (canonical_to_fullform): Return std::string.
9031 (filter_results): Update.
9032 (struct decode_line_2_item): Add constructor.
9033 <fullform, displayform>: Now std::string.
9034 (decode_line_2_compare_items): Now a std::sort comparator.
9035 (decode_line_2): Update.
9036
a5b5adf5
TT
90372018-04-05 Tom Tromey <tom@tromey.com>
9038
9039 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9040 (unexpected_linespec_error): Update.
9041 (linespec_parse_basic, parse_linespec): Update.
9042
6a307fc5
TT
90432018-04-05 Tom Tromey <tom@tromey.com>
9044
9045 * linespec.c (linespec_parse_basic): Reindent.
9046
41c1efc6
TT
90472018-04-05 Tom Tromey <tom@tromey.com>
9048
9049 * minsyms.h (iterate_over_minimal_symbols): Update.
9050 * minsyms.c (iterate_over_minimal_symbols): Take a
9051 gdb::function_view.
9052 * linespec.c (struct collect_minsyms): Remove.
9053 (compare_msyms): Now a std::sort comparator.
9054 (add_minsym): Add parameters.
9055 (search_minsyms_for_name): Update. Use std::vector.
9056
c5edbf3d
TT
90572018-04-03 Tom Tromey <tom@tromey.com>
9058
9059 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9060 gdb::byte_vector.
9061
b39efc48
WP
90622018-04-02 Weimin Pan <weimin.pan@oracle.com>
9063
9064 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9065
121ad66c 90662018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
9067
9068 PR gdb/16959
9069 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9070 printing static type.
9071
09473be8
TT
90722018-04-01 Tom Tromey <tom@tromey.com>
9073
9074 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9075 (rs6000_xfer_shared_libraries): Update.
9076
ec1f2d91
SM
90772018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9078
9079 * common/gdb_vecs.h (char_ptr): Remove.
9080 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9081
d8611974
SM
90822018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9083
9084 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9085 with std::vector.
9086 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9087
a18ba4e4
SM
90882018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9089
9090 * tracepoint.h (struct uploaded_tp): Initialize fields.
9091 <actions, step_actions, cmd_strings>: Change type to
9092 std::vector<char *>.
9093 * tracepoint.c (get_uploaded_tp): Allocate with new.
9094 (free_uploaded_tps): Free with delete.
9095 (parse_tracepoint_definition): Adjust to std::vector change.
9096 * breakpoint.c (read_uploaded_action): Likewise.
9097 (create_tracepoint_from_upload): Likewise.
9098 * ctf.c (ctf_write_uploaded_tp): Likewise.
9099 (SET_ARRAY_FIELD): Likewise.
9100 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9101
a7961323
TT
91022018-03-30 Tom Tromey <tom@tromey.com>
9103
9104 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9105 std::unique_ptr.
9106 (svr4_keep_data_in_core): Update.
9107 (svr4_read_so_list): Update.
9108
e83e4e24
TT
91092018-03-30 Tom Tromey <tom@tromey.com>
9110
9111 * windows-nat.c (handle_output_debug_string, handle_exception):
9112 Update.
9113 * target.h (target_read_string): Update.
9114 * target.c (target_read_string): Change "string" to
9115 unique_xmalloc_ptr.
9116 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9117 Update.
9118 * solib-frv.c (frv_current_sos): Update.
9119 * solib-dsbt.c (dsbt_current_sos): Update.
9120 * solib-darwin.c (darwin_current_sos): Update.
9121 * linux-thread-db.c (inferior_has_bug): Update.
9122 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9123 Update. Remove alloca.
9124 * ada-lang.c (ada_main_name): Update.
9125
263db9a1
TT
91262018-03-30 Tom Tromey <tom@tromey.com>
9127
9128 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9129 (struct dwo_file_deleter): New.
9130 (dwo_file_up): New typedef.
9131 (open_and_init_dwo_file): Use dwo_file_up.
9132 (free_dwo_file_cleanup): Remove.
9133
5dafb3d1
TT
91342018-03-30 Tom Tromey <tom@tromey.com>
9135
9136 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9137 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9138
11ed8cad
TT
91392018-03-30 Tom Tromey <tom@tromey.com>
9140
9141 * dwarf2read.c (class free_cached_comp_units): New class.
9142 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9143 (free_cached_comp_units): Remove function.
9144
9ae79dac
TT
91452018-03-30 Tom Tromey <tom@tromey.com>
9146
9147 * utils.h (make_cleanup_unpush_target): Remove.
9148 * inf-ptrace.c (struct target_unpusher): New.
9149 (target_unpush_up) New typedef.
9150 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9151 target_unpush_up.
9152 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9153
5aa89276
TT
91542018-03-27 Tom Tromey <tom@tromey.com>
9155
9156 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9157
1dbeed45
TT
91582018-03-27 Pedro Alves <palves@redhat.com>
9159 Tom Tromey <tom@tromey.com>
9160
9161 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9162 destructor. Now a class.
9163 (gdb_readline_wrapper_cleanup): Remove function.
9164 (gdb_readline_wrapper): Remove cleanups.
9165
c819b2c0
TT
91662018-03-27 Tom Tromey <tom@tromey.com>
9167
9168 * typeprint.h (struct type_print_options) <local_typedefs,
9169 global_typedefs>: Remove "struct" keyword.
9170 (class typedef_hash_table): New class.
9171 (recursively_update_typedef_hash, add_template_parameters)
9172 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9173 (find_typedef_in_hash): Don't declare.
9174 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9175 (typedef_hash_table::recursively_update): Rename from
9176 recursively_update_typedef_hash. Now a member.
9177 (typedef_hash_table::add_template_parameters): Rename from
9178 add_template_parameters. Now a member.
9179 (typedef_hash_table::typedef_hash_table): Now a constructor;
9180 rename from create_typedef_hash.
9181 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9182 rename from free_typedef_hash.
9183 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9184 (do_free_global_table): Remove.
9185 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9186 from copy_type_recursive.
9187 (create_global_typedef_table): Remove.
9188 (typedef_hash_table::find_global_typedef): Now a member of
9189 typedef_hash_table.
9190 (typedef_hash_table::find_typedef): Rename from
9191 find_typedef_in_hash; now a member.
9192 (whatis_exp): Update.
9193 * extension.h (struct ext_lang_type_printers): Add constructor and
9194 destructor.
9195 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9196 declare.
9197 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9198 Now a constructor; rename from start_ext_lang_type_printers.
9199 (ext_lang_type_printers): Now a destructor; rename from
9200 free_ext_lang_type_printers.
9201 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9202 Update.
9203 (c_type_print_base_struct_union): Update. Remove cleanups.
9204
608219fb
TT
92052018-03-27 Tom Tromey <tom@tromey.com>
9206
9207 * dwarf-index-write.c: Include <cmath>.
9208
3fcded8f
JB
92092018-03-27 Joel Brobecker <brobecker@adacore.com>
9210
9211 * NEWS: Add entry describing new "set|show varsize-limit" command.
9212 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9213 command.
9214 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9215 "set variable".
9216
cd4fb1b2
SM
92172018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9218
9219 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9220 dwarf-index-write.c
9221 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9222 * dwarf-index-common.c: New file.
9223 * dwarf-index-common.h: New file.
9224 * dwarf-index-write.c: New file.
9225 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9226 (struct dwarf2_section_info): Move from here.
9227 (dwarf2_section_info_def): Likewise.
9228 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9229 (offset_type): Likewise.
9230 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9231 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9232 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9233 (byte_swap): Likewise.
9234 (MAYBE_SWAP): Likewise.
9235 (dwarf2_per_cu_ptr): Likewise.
9236 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9237 (struct tu_stats): Likewise.
9238 (struct dwarf2_per_objfile): Likewise.
9239 (struct dwarf2_per_cu_data): Likewise.
9240 (struct signatured_type): Likewise.
9241 (sig_type_ptr): Likewise.
9242 (DEF_VEC_P (sig_type_ptr)): Likewise.
9243 (INDEX4_SUFFIX): Likewise.
9244 (INDEX5_SUFFIX): Likewise.
9245 (DEBUG_STR_SUFFIX): Likewise.
9246 (dwarf2_read_section): Make non-static.
9247 (mapped_index_string_hash): Move from here.
9248 (dwarf5_djb_hash): Likewise.
9249 (file_write): Likewise.
9250 (class data_buf): Likewise.
9251 (struct symtab_index_entry): Likewise.
9252 (struct mapped_symtab): Likewise.
9253 (find_slot): Likewise.
9254 (hash_expand): Likewise.
9255 (add_index_entry): Likewise.
9256 (uniquify_cu_indices): Likewise.
9257 (class c_str_view): Likewise.
9258 (class c_str_view_hasher): Likewise.
9259 (class vector_hasher): Likewise.
9260 (write_hash_table): Likewise.
9261 (psym_index_map): Likewise.
9262 (struct addrmap_index_data): Likewise.
9263 (add_address_entry): Likewise.
9264 (add_address_entry_worker): Likewise.
9265 (write_address_map): Likewise.
9266 (symbol_kind): Likewise.
9267 (write_psymbols): Likewise.
9268 (struct signatured_type_index_data): Likewise.
9269 (write_one_signatured_type): Likewise.
9270 (recursively_count_psymbols): Likewise.
9271 (recursively_write_psymbols): Likewise.
9272 (class debug_names): Likewise.
9273 (check_dwarf64_offsets): Likewise.
9274 (psyms_seen_size): Likewise.
9275 (write_gdbindex): Likewise.
9276 (write_debug_names): Likewise.
9277 (assert_file_size): Likewise.
9278 (write_psymtabs_to_index): Likewise.
9279 (save_gdb_index_command): Likewise.
9280 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9281 command.
9282 * dwarf2read.h: New file.
9283
59cc4834
JB
92842018-03-27 Joel Brobecker <brobecker@adacore.com>
9285
9286 PR gdb/22670
9287 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9288 symbol name if the CU's language stores symbol names in linkage
9289 format.
9290 * language.h (struct language_defn)
9291 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9292 all instances of this struct.
9293
67501539
TT
92942018-03-26 Tom Tromey <tom@tromey.com>
9295
9296 * stack.c (backtrace_command_1): Remove verbose code.
9297
76c939ac
TT
92982018-03-26 Tom Tromey <tom@tromey.com>
9299
9300 * python/py-framefilter.c (py_print_type): Don't catch
9301 exceptions. Return void.
9302 (py_print_value): Likewise.
9303 (py_print_single_arg): Likewise.
9304 (enumerate_args): Don't catch exceptions.
9305 (py_print_args): Likewise.
9306 (py_print_frame): Likewise.
9307 (gdbpy_apply_frame_filter): Catch exceptions here.
9308
9507b29c
TT
93092018-03-26 Tom Tromey <tom@tromey.com>
9310
9311 * stack.c (_initialize_stack): Remove trailing newlines from help
9312 text. Add "Usage" line to "backtrace" help.
9313
eb68e487
TT
93142018-03-26 Tom Tromey <tom@tromey.com>
9315
9316 PR python/16486:
9317 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9318
1f111921
TT
93192018-03-26 Tom Tromey <tom@tromey.com>
9320
9321 * python/py-framefilter.c (py_print_single_arg): Return
9322 EXT_LANG_BT_ERROR from catch.
9323
fb7eb8b5
TT
93242018-03-26 Tom Tromey <tom@tromey.com>
9325
9326 PR backtrace/15584:
9327 * stack.c (backtrace_command_1): Move some code into no-filters
9328 "if".
9329
4ca59a9f
TT
93302018-03-26 Tom Tromey <tom@tromey.com>
9331
9332 * python/py-framefilter.c (throw_quit_or_print_exception): New
9333 function.
9334 (gdbpy_apply_frame_filter): Use it.
9335
92256134
TT
93362018-03-26 Tom Tromey <tom@tromey.com>
9337
9338 PR cli/17716:
9339 * python/py-framefilter.c (py_print_type, py_print_value)
9340 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9341 RETURN_MASK_ERROR.
9342
7a630bc2
TT
93432018-03-26 Tom Tromey <tom@tromey.com>
9344
9345 * python/py-framefilter.c (enumerate_args): Use
9346 gdb::unique_xmalloc_ptr.
9347
63283d4a
TT
93482018-03-26 Tom Tromey <tom@tromey.com>
9349
9350 * python/py-framefilter.c (py_print_frame): Return
9351 EXT_LANG_BT_OK.
9352 (gdbpy_apply_frame_filter): Update comment.
9353 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9354 Remove.
9355 <EXT_LANG_BT_NO_FILTERS>: Change value.
9356
978d6c75
TT
93572018-03-26 Tom Tromey <tom@tromey.com>
9358
9359 PR backtrace/15582:
9360 * stack.c (backtrace_command): Parse "hide" argument.
9361 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9362 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9363 constant.
9364
1cf7e640
TT
93652018-03-26 Tom Tromey <tom@tromey.com>
9366
9367 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9368 add "flags".
9369 (backtrace_command): Remove "fulltrace", add "flags".
9370
ea3b0687
TT
93712018-03-26 Tom Tromey <tom@tromey.com>
9372
9373 * stack.c (backtrace_command): Rewrite command line parsing.
9374
9f034d75
SM
93752018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9376
9377 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9378
ce1459e5
SM
93792018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9380
9381 * filename-seen-cache.h: Add include guard.
9382
4f7ae6f5
KS
93832018-03-26 Keith Seitz <keiths@redhat.com>
9384
9385 * symfile.c (place_section): Remove "struct" from section_addr_info
9386 in comment.
9387 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9388 "struct" keyword from section_addr_info.
9389
5cd3e386
AH
93902018-03-26 Alan Hayward <alan.hayward@arm.com>
9391
9392 * regformats/regdef.h (reg): Add constructors.
9393
3e5ef9a4
PA
93942018-03-25 Pedro Alves <palves@redhat.com>
9395
9396 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9397 if then/else bodies in var_func_name extraction.
9398
c88d2fcc 93992018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
9400
9401 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9402 lookup_minimal_symbol() to find symbol entry.
9403 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9404
b7fee5a3
KS
94052018-03-23 Keith Seitz <keiths@redhat.com>
9406
9407 PR c++/22968
9408 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9409 nested type definitions for C++, too.
9410
2cc9b304
TT
94112018-03-23 Tom Tromey <tom@tromey.com>
9412
9413 * machoread.c (struct oso_el): Add a constructor. Don't define as
9414 a typedef.
9415 (macho_register_oso): Remove.
9416 (macho_symtab_read): Take a std::vector.
9417 (oso_el_compare_name): Now a std::sort comparator.
9418 (macho_symfile_read_all_oso): Take a std::vector.
9419 (macho_symfile_read): Use std::vector. Remove cleanups.
9420
a2b2bc12
TT
94212018-03-22 Tom Tromey <tom@tromey.com>
9422
9423 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9424 (record_full_goto_bookmark): Use std::string.
9425
7a8f494c
PFC
94262018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9427
9428 PR tdep/18295
9429 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9430 a single mask.
9431
dd6d677f
PFC
94322018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9433
9434 * rs6000-tdep.c (store_insn_p): New function.
9435 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9436 and cr_reg to their unshifted values. Use store_insn_p to
9437 match LR saves using either R1 or fdata->alloca_reg. Use
9438 store_insn_p to match CR saves. Set alloca_reg_offset
9439 when alloca_reg and framep are set. Remove lr_reg shift
9440 when assigning to fdata->lr_register.
9441
26d6cec4
AA
94422018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9443
9444 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9445 command line args instead of emitting a warning.
9446
5d9310c4
SM
94472018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9448
9449 * tracepoint.h (struct static_tracepoint_marker): Initialize
9450 fields, define default constructor, move constructor and move
9451 assignment, disable the rest.
9452 <str_id, extra>: Make std::string.
9453 (release_static_tracepoint_marker): Remove.
9454 (free_current_marker): Remove.
9455 * tracepoint.c (free_current_marker): Remove.
9456 (parse_static_tracepoint_marker_definition): Adjust to
9457 std::string, use new hex2str overload.
9458 (release_static_tracepoint_marker): Remove.
9459 (print_one_static_tracepoint_marker): Get marker by reference
9460 and adjust to std::string.
9461 (info_static_tracepoint_markers_command): Adjust to std::vector
9462 changes
9463 * target.h (static_tracepoint_marker_p): Remove typedef.
9464 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9465 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9466 bool.
9467 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9468 * target-debug.h
9469 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9470 (target_debug_print_std_vector_static_tracepoint_marker): New.
9471 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9472 to...
9473 (target_debug_print_static_tracepoint_marker_p): ... this.
9474 * target-delegates.c: Re-generate.
9475 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9476 Make std::string.
9477 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9478 (decode_static_tracepoint_spec): Adjust to std::vector.
9479 (tracepoint_print_one_detail): Adjust to std::string.
9480 (strace_marker_decode_location): Adjust to std::string.
9481 (update_static_tracepoint): Adjust to std::string, remove call
9482 to release_static_tracepoint_marker.
9483 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9484 Adjust to std::vector.
9485 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9486 (remote_static_tracepoint_markers_by_strid): Adjust to
9487 std::vector.
9488 * common/rsp-low.h (hex2str): New overload with explicit count
9489 of bytes.
9490 * common/rsp-low.c (hex2str): New overload with explicit count
9491 of bytes.
9492 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9493 (_initialize_rsp_low_selftests): Add test_hex2str test.
9494 * unittests/tracepoint-selftests.c
9495 (test_parse_static_tracepoint_marker_definition): Adjust to
9496 std::string.
9497
62c222b6
SM
94982018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9499
9500 * tracepoint.c (parse_static_tracepoint_marker_definition):
9501 Consider case where the definition is followed by more
9502 definitions.
9503 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9504 tracepoint-selftests.c.
9505 * unittests/tracepoint-selftests.c: New.
9506
7eb2418f
PFC
95072018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9508
9509 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9510 Carvalho.
9511
7cbe16e9
SR
95122018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9513
3d6b3b82 9514 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 9515
4ee89e90
SR
95162018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9517
3d6b3b82 9518 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 9519
92630041
TT
95202018-03-19 Tom Tromey <tom@tromey.com>
9521
9522 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9523 "IDENT" production.
9524
76727919
TT
95252018-03-19 Pedro Alves <palves@redhat.com>
9526 Tom Tromey <tom@tromey.com>
9527
9528 * unittests/observable-selftests.c: New file.
9529 * common/observable.h: New file.
9530 * observable.h: New file.
9531 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9532 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9533 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9534 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9535 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9536 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9537 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9538 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9539 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9540 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9541 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9542 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9543 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9544 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9545 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9546 tui/tui-interp.c, valops.c: Update all users.
9547 * tui/tui-hooks.c (tui_bp_created_observer)
9548 (tui_bp_deleted_observer, tui_bp_modified_observer)
9549 (tui_inferior_exit_observer, tui_before_prompt_observer)
9550 (tui_normal_stop_observer, tui_register_changed_observer):
9551 Remove.
9552 (tui_observers_token): New global.
9553 (attach_or_detach, tui_attach_detach_observers): New functions.
9554 (tui_install_hooks, tui_remove_hooks): Use
9555 tui_attach_detach_observers.
9556 * record-btrace.c (record_btrace_thread_observer): Remove.
9557 (record_btrace_thread_observer_token): New global.
9558 * observer.sh: Remove.
9559 * observer.c: Rename to observable.c.
9560 * observable.c (namespace gdb_observers): Define new objects.
9561 (observer_debug): Move into gdb_observers namespace.
9562 (struct observer, struct observer_list, xalloc_observer_list_node)
9563 (xfree_observer_list_node, generic_observer_attach)
9564 (generic_observer_detach, generic_observer_notify): Remove.
9565 (_initialize_observer): Update.
9566 Don't include observer.inc.
9567 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9568 (clean mostlyclean): Likewise.
9569 (observer.h, observer.inc): Remove targets.
9570 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9571 (COMMON_SFILES): Use observable.c, not observer.c.
9572 * .gitignore: Remove observer.h.
9573
1cb1f3da
TT
95742018-03-18 Tom Tromey <tom@tromey.com>
9575
9576 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9577 gdb::def_vector.
9578 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9579
a06ab151
TT
95802018-03-17 Tom Tromey <tom@tromey.com>
9581
9582 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9583
770623f7
TT
95842018-03-17 Tom Tromey <tom@tromey.com>
9585
9586 * target.c (class scoped_target_fd): New.
9587 (target_fileio_close_cleanup): Remove.
9588 (target_fileio_read_alloc_1): Use scoped_target_fd.
9589
39be3c7e
SM
95902018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9591
9592 * silent-rules.mk: New.
9593 * Makefile.in: Include silent-rules.mk
9594 (srcdir, VPATH, top_srcdir): Move up.
9595 (COMPILE): Add ECHO_CXX.
9596 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9597 (init.c): Add ECHO_INIT_C.
9598 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9599 (version.c): Add ECHO_GEN.
9600 (printcmd.o): Add ECHO_CXX.
9601 (target-float.o): Add ECHO_CXX.
9602 (ada-exp.o): Add ECHO_CXX.
9603 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9604 (insight$(EXEEXT)): Add ECHO_CXXLD.
9605 * gnulib/configure.ac: Add AM_SILENT_RULES.
9606 * gnulib/aclocal.m4: Re-generate.
9607 * gnulib/configure: Re-generate.
9608 * gnulib/import/Makefile.in: Re-generate.
9609
37e136b1
TT
96102018-03-16 Tom Tromey <tom@tromey.com>
9611
9612 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9613 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9614 * utils.c (do_free_section_addr_info)
9615 (make_cleanup_free_section_addr_info): Remove.
9616 * symfile.h (struct other_sections): Add constructor.
9617 (struct section_addr_info): Remove.
9618 (section_addr_info): New typedef.
9619 (struct sym_fns) <sym_offsets>: Change type of parameter.
9620 (build_section_addr_info_from_objfile)
9621 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9622 (default_symfile_offsets, symbol_file_add)
9623 (symbol_file_add_from_bfd)
9624 (build_section_addr_info_from_section_table): Update.
9625 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9626 * symfile.c (alloc_section_addr_info): Remove.
9627 (build_section_addr_info_from_section_table): Change return type.
9628 Update.
9629 (build_section_addr_info_from_bfd)
9630 (build_section_addr_info_from_objfile): Likewise.
9631 (free_section_addr_info): Remove.
9632 (relative_addr_info_to_section_offsets): Change type of "addrs".
9633 (addrs_section_compar): Now a std::sort comparator.
9634 (addrs_section_sort): Change return type.
9635 (addr_info_make_relative): Change type of "addrs". Update.
9636 (default_symfile_offsets, syms_from_objfile_1)
9637 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9638 (symbol_file_add_separate): Update.
9639 (symbol_file_add): Change type of "addrs". Update.
9640 (add_symbol_file_command): Update. Remove cleanups.
9641 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9642 cleanups.
9643 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9644 * solib.c (solib_read_symbols): Update.
9645 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9646 * machoread.c (macho_symfile_offsets): Update.
9647 * jit.c (jit_bfd_try_read_symtab): Update.
9648
03afa6ef
SM
96492018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9650
9651 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9652 unittests/utils-selftests.c.
9653 * unittests/utils-selftests.c: New file.
9654
3ae9ce5d
TT
96552018-03-14 Tom Tromey <tom@tromey.com>
9656
9657 PR cli/14977:
9658 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9659 for NULL.
9660
b8c2339b
TT
96612018-03-14 Tom Tromey <tom@tromey.com>
9662
9663 PR cli/19918:
9664 * printcmd.c (printf_pointer): Allow "-" in format.
9665
80ae639d
TT
96662018-03-14 Tom Tromey <tom@tromey.com>
9667
9668 * printcmd.c (_initialize_printcmd): Add usage to printf.
9669
0d671d99
YQ
96702018-03-14 Yao Qi <qiyao@sourceware.org>
9671
9672 * MAINTAINERS: Update my email address.
9673
b577b6af
TT
96742018-03-13 Tom Tromey <tom@tromey.com>
9675
9676 * machoread.c (macho_check_dsym): Change filenamep to a
9677 std::string*.
9678 (macho_symfile_read): Update.
9679 * symfile.c (load_command): Use std::string.
9680
89a3b63e
AB
96812018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9682
9683 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9684 to error message string.
9685 (riscv_register_name): Use xsnprintf instead of sprintf.
9686 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9687 internal_error.
9688 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9689 error.
9690 (riscv_push_dummy_call): Likewise.
9691
984c7238
TT
96922018-03-12 Tom Tromey <tom@tromey.com>
9693
9694 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9695 Use gdb::byte_vector.
9696 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9697
933522d1
YQ
96982018-03-12 Yao Qi <yao.qi@linaro.org>
9699
9700 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9701 parameter type to readable_regcache.
9702 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9703 the declaration.
9704
be2daae6
TT
97052018-03-11 Tom Tromey <tom@tromey.com>
9706
9707 * dwarf2read.c (struct nextfield): Add initializers.
9708 (struct nextfnfield): Remove.
9709 (struct fnfieldlist): Add initializers. Remove "length" and
9710 "head", use std::vector.
9711 (struct decl_field_list): Remove.
9712 (struct field_info): Add initializers.
9713 <fields, baseclasses>: Now std::vector.
9714 <nbaseclasses, nfnfields, typedef_field_list_count,
9715 nested_types_list_count>: Remove.
9716 (dwarf2_add_field, dwarf2_add_type_defn)
9717 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9718 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9719 (process_structure_scope): Update.
9720
484cf504
TT
97212018-03-11 Tom Tromey <tom@tromey.com>
9722
9723 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9724 for use by std::sort.
9725 (build_type_psymtabs_1): Use std::vector.
9726
9bd8e0b0
EZ
97272018-03-09 Eli Zaretskii <eliz@gnu.org>
9728
9729 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9730 and LIBMPFR in the printed configuration.
9731
5dc1a704
TT
97322018-03-08 Tom Tromey <tom@tromey.com>
9733
9734 * source.c (get_filename_and_charpos): Use scoped_fd.
9735 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9736 (procfs_pidlist): Likewise.
9737 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9738 (iterate_over_mappings): Likewise.
9739
fdf07f3a
TT
97402018-03-08 Tom Tromey <tom@tromey.com>
9741
9742 * infcall.c (struct call_return_meta_info)
9743 <stack_temporaries_enabled>: Remove.
9744 (get_call_return_value, call_function_by_hand_dummy): Update.
9745 * thread.c (disable_thread_stack_temporaries): Remove.
9746 (enable_thread_stack_temporaries): Remove.
9747 (thread_stack_temporaries_enabled_p): Return bool.
9748 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9749 (get_last_thread_stack_temporary): Update.
9750 * eval.c (evaluate_subexp): Update.
9751 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9752 class, not a function.
9753 (value_ptr, value_vec): Remove typedefs.
9754 (class thread_info) <stack_temporaries_enabled>: Now bool.
9755 <stack_temporaries>: Now a std::vector.
9756 (thread_stack_temporaries_enabled_p)
9757 (value_in_thread_stack_temporaries): Return bool.
9758
567a3e54
SM
97592018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9760
9761 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9762 (getpkt_or_notif_sane_1): Likewise.
9763
00b40057
SM
97642018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9765
9766 * build-id.c (build_id_to_debug_bfd): Use std::string.
9767
a8dbfd58
SM
97682018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9769
9770 * build-id.c (find_separate_debug_file_by_buildid): Return
9771 std::string.
9772 * build-id.h (find_separate_debug_file_by_buildid): Return
9773 std::string.
9774 * coffread.c (coff_symfile_read): Adjust to std::string.
9775 * elfread.c (elf_symfile_read): Adjust to std::string.
9776 * symfile.c (separate_debug_file_exists): Change parameter to
9777 std::string.
9778 (find_separate_debug_file): Return std::string.
9779 (find_separate_debug_file_by_debuglink): Return std::string.
9780 * symfile.h (find_separate_debug_file_by_debuglink): Return
9781 std::string.
9782
e6a58aa8
SM
97832018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9784
9785 * common/xml-utils.c (xml_escape_text): Move code to...
9786 (xml_escape_text_append): ... this new function.
9787 * common/xml-utils.h (xml_escape_text_append): New declaration.
9788 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9789 New function.
9790 (_initialize_xml_utils): register test_xml_escape_text_append as
9791 a selftest.
9792
4ef0bef6
AH
97932018-03-07 Alan Hayward <alan.hayward@arm.com>
9794
9795 * defs.h: Remove MAX_REGISTER_SIZE.
9796 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9797 asserts.
9798 * python/py-unwind.c (pyuw_sniffer): Likewise.
9799
e0d3522b
TT
98002018-03-07 Tom Tromey <tom@tromey.com>
9801
9802 * linux-tdep.c (linux_info_proc): Update.
9803 * target.h (struct target_ops) <to_fileio_readlink>: Return
9804 optional<string>.
9805 (target_fileio_readlink): Return optional<string>.
9806 * remote.c (remote_hostio_readlink): Return optional<string>.
9807 * inf-child.c (inf_child_fileio_readlink): Return
9808 optional<string>.
9809 * target.c (target_fileio_readlink): Return optional<string>.
9810
ea005f31
AB
98112018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9812
9813 * regcache.c (cooked_read_test): Add riscv to the list of
9814 architectures that have a save_reggroup.
9815
e95a97d4
AA
98162018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9817
9818 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9819 value is not a dynamic class object.
9820
d8344f3d
TT
98212018-03-06 Tom Tromey <tom@tromey.com>
9822
9823 * rust-exp.y: Formatting fixes.
9824
9add17f2
AB
98252018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9826
9827 * riscv-tdep.c (riscv_register_name): Remove target description
9828 support.
9829 (riscv_gdbarch_init): Remove target description check.
9830
c9486dfe
AB
98312018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9832
9833 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9834 comment.
9835 * riscv-tdep.h: Likewise.
9836
d74aff3d
AB
98372018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9838
9839 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9840 (riscv_pseudo_register_write): Delete.
9841 (riscv_gdbarch_init): Remove all use of pseudo registers.
9842
7ea78b59
SM
98432018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9844
9845 * record-btrace.c (btrace_print_lines): Replace cleanup
9846 parameter with RAII equivalents.
9847 (btrace_insn_history): Replace cleanup with RAII equivalents.
9848 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9849 make_cleanup_ui_out_tuple_begin_end): Remove.
9850 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9851 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9852 make_cleanup_ui_out_list_begin_end): Remove.
9853
53127008
SM
98542018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9855
9856 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9857 parameter types to std::vector. Use bool.
9858 (record_btrace_wait): Replace VEC(tp_t) with
9859 std::vector<thread_info *>.
9860 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9861
228f1508
SM
98622018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9863
9864 * record-btrace.c (record_btrace_disable_callback): Remove.
9865 (struct scoped_btrace_disable): New.
9866 (record_btrace_open): Use scoped_btrace_disable.
9867
b2970c23
AB
98682018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9869
9870 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9871 reading values from registers.
9872
fb294655
AB
98732018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9874
9875 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9876 where appropriate.
9877
cab5bb9d
AB
98782018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9879
9880 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9881 change parameter type. Use GDB's print functions, and use
9882 core_addr_to_string where appropriate.
9883 (riscv_push_dummy_call): Use core_addr_to_string where
9884 appropriate, update call to riscv_print_arg_location, and reindent
9885 a few lines.
9886 (riscv_return_value): Update call to riscv_print_arg_location.
9887
dbbb1059
AB
98882018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9889 Tim Newsome <tim@sifive.com>
9890 Albert Ou <a0u@eecs.berkeley.edu>
9891 Darius Rad <darius@bluespec.com>
9892
9893 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9894 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9895 (ALLDEPFILES): Add riscv-tdep.c
9896 * configure.tgt: Add riscv support.
9897 * riscv-tdep.c: New file.
9898 * riscv-tdep.h: New file.
9899 * NEWS: Mention new target.
9900 * MAINTAINERS: Add entry for riscv.
9901
5dc43913
AB
99022018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9903
9904 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9905 fields within aggregates.
9906
3dea1ef7
SM
99072018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9908
9909 * record-btrace.c (btrace_print_lines): Change type of flags to
9910 gdb_disassembly_flags.
9911
7efba073
JB
99122018-03-04 John Baldwin <jhb@FreeBSD.org>
9913
9914 * fbsd-nat.c: Include "inf-ptrace.h".
9915 (USE_SIGTRAP_SIGINFO): Conditionally define.
9916 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9917 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9918 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9919 function.
9920 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9921 Likewise.
9922 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9923 Likewise.
9924 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9925 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9926 "supports_stopped_by_hw_breakpoint" target methods.
9927
386a8676
JB
99282018-03-04 John Baldwin <jhb@FreeBSD.org>
9929
9930 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9931 * fbsd-nat.c (debug_fbsd_nat): New variable.
9932 (show_fbsd_nat_debug): New function.
9933 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9934 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9935
12279366
JB
99362018-03-04 John Baldwin <jhb@FreeBSD.org>
9937
9938 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9939 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9940 prototype.
9941 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9942 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9943 method.
9944
54693cf5
SM
99452018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9946
9947 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9948 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9949
ccb2231c
SM
99502018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9951
9952 * charset.c (struct charset_vector): New.
9953 (charsets): Change type to charset_vector.
9954 (find_charset_names): Adjust.
9955 (add_one): Adjust.
9956 (_initialize_charset): Adjust.
9957
6fb16ce6
SM
99582018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9959
9960 * progspace.h (struct program_space) <deleted_solibs>: Change
9961 type to std::vector<std::string>.
9962 * progspace.c (clear_program_space_solib_cache): Adjust.
9963 * breakpoint.c (print_solib_event): Adjust.
9964 (check_status_catch_solib): Adjust.
9965 * solib.c (update_solib_list): Adjust.
9966 * ui-out.h (class ui_out) <field_string>: New overload.
9967 * ui-out.c (ui_out::field_string): New overload.
9968
564b1e3f
SM
99692018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9970
9971 * progspace.h (struct program_space): Add constructor and
9972 destructor, initialize fields.
9973 (add_program_space): Remove.
9974 * progspace.c (add_program_space): Rename to...
9975 (program_space::program_space): ... this.
9976 (release_program_space): Rename to...
9977 (program_space::~program_space): ... this.
9978 (delete_program_space): Use delete to delete program_space.
9979 (initialize_progspace): Use new to allocate program_space.
9980 * inferior.c (add_inferior_with_spaces): Likewise.
9981 (clone_inferior_command): Likewise.
9982 * infrun.c (follow_fork_inferior): Likewise.
9983 (handle_vfork_child_exec_or_exit): Likewise.
9984
e80aaf61
SM
99852018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9986
9987 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9988 (delim_string_to_char_ptr_vec): Return std::vector of
9989 gdb::unique_xmalloc_ptr.
9990 (dirnames_to_char_ptr_vec_append): Take std::vector of
9991 gdb::unique_xmalloc_ptr.
9992 (dirnames_to_char_ptr_vec): Return std::vector of
9993 gdb::unique_xmalloc_ptr.
9994 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9995 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9996 (delim_string_to_char_ptr_vec): Return an std::vector of
9997 gdb::unique_xmalloc_ptr, adjust the code.
9998 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9999 gdb::unique_xmalloc_ptr, adjust the code.
10000 (dirnames_to_char_ptr_vec): Return an std::vector of
10001 gdb::unique_xmalloc_ptr, adjust the code.
10002 * auto-load.c (auto_load_safe_path_vec): Change type to
10003 std::vector of gdb::unique_xmalloc_ptr.
10004 (auto_load_expand_dir_vars): Return an std::vector of
10005 gdb::unique_xmalloc_ptr, adjust the code.
10006 (auto_load_safe_path_vec_update): Adjust.
10007 (filename_is_in_auto_load_safe_path_vec): Adjust.
10008 (auto_load_objfile_script_1): Adjust.
10009 * build-id.c (build_id_to_debug_bfd): Adjust.
10010 * linux-thread-db.c (thread_db_load_search): Adjust.
10011 * source.c (add_path): Adjust.
10012 (openp): Adjust.
10013 * symfile.c (find_separate_debug_file): Adjust.
10014 * utils.c (do_free_char_ptr_vec): Remove.
10015 (make_cleanup_free_char_ptr_vec): Remove.
10016
ab818ade
SDJ
100172018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10018
10019 PR gdb/22907
10020 * common/pathstuff.c: Conditionally include "<windows.h>".
10021
e1e6f073
GS
100222018-03-01 Georg Sauthoff <mail@georg.so>
10023
10024 PR gdb/22888
10025 * gcore.in: Quote variables and switch interpreter to bash.
10026
c7b15a66
TT
100272018-03-01 Tom Tromey <tom@tromey.com>
10028
10029 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10030 assertion. Add assertion for discriminant_index.
10031 (quirk_rust_enum): Use correct base type name in univariant case.
10032
0cb7c7b0
SM
100332018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10034
10035 * record.c (get_call_history_modifiers): Return a
10036 record_print_flags.
10037 (cmd_record_call_history): Adjust.
10038 * record-btrace.c (record_btrace_call_history): Adjust.
10039 (record_btrace_call_history_range): Adjust.
10040 (record_btrace_call_history_from): Adjust.
10041 * target-debug.h (target_debug_print_record_print_flags): New.
10042 * target-delegates.c: Re-generate.
10043 * target.c (target_call_history): Change flags type.
10044 (target_call_history_from): Likewise.
10045 (target_call_history_range): Likewise.
10046 * target.h (struct target_ops) <target_call_history>: Likewise.
10047 (target_call_history_from): Likewise.
10048 (target_call_history_range): Likewise.
10049
25e3c82c
SDJ
100502018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10051 Simon Marchi <simon.marchi@polymtl.ca>
10052
10053 * common/common-utils.c: Include "sys/stat.h".
10054 (is_regular_file): Move here from "source.c"; change return
10055 type to "bool".
10056 * common/common-utils.h (is_regular_file): New prototype.
10057 * common/pathstuff.c (contains_dir_separator): New function.
10058 * common/pathstuff.h (contains_dir_separator): New prototype.
10059 * source.c: Don't include "sys/stat.h".
10060 (is_regular_file): Move to "common/common-utils.c".
10061
b4987c95
SDJ
100622018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10063
10064 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10065 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10066 * auto-load.c: Include "common/pathstuff.h".
10067 * common/common-def.h (current_directory): Move here.
10068 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10069 function.
10070 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10071 prototype.
10072 * common/pathstuff.c: New file.
10073 * common/pathstuff.h: New file.
10074 * compile/compile.c: Include "common/pathstuff.h".
10075 * defs.h (current_directory): Move to "common/common-defs.h".
10076 * dwarf2read.c: Include "common/pathstuff.h".
10077 * exec.c: Likewise.
10078 * guile/scm-safe-call.c: Likewise.
10079 * linux-thread-db.c: Likewise.
10080 * main.c: Likewise.
10081 * nto-tdep.c: Likewise.
10082 * objfiles.c: Likewise.
10083 * source.c: Likewise.
10084 * symtab.c: Likewise.
10085 * utils.c: Include "common/pathstuff.h".
10086 (gdb_realpath): Move to "common/pathstuff.c".
10087 (gdb_realpath_keepfile): Likewise.
10088 (gdb_abspath): Likewise.
10089 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10090 (gdb_realpath_keepfile): Likewise.
10091 (gdb_abspath): Likewise.
10092
f169cfdc
JB
100932018-02-28 John Baldwin <jhb@FreeBSD.org>
10094
10095 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10096 wildcard process pid for super_resume for kernels with a
10097 specific bug.
10098
e05cac70
PM
100992018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10100
10101 * compile/compile.c (get_args): Add additional comments
10102 explaining function.
10103
55089490
TT
101042018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10105 Tom Tromey <tom@tromey.com>
10106
10107 * target.h (memory_write_request_s): Remove typedef. Don't define
10108 VEC.
10109 (target_write_memory_blocks): Change argument to std::vector.
10110 (struct memory_write_request): Add constructor.
10111 * target-memory.c (compare_block_starting_address): Return bool.
10112 Change argument types.
10113 (claim_memory): Change arguments to use std::vector.
10114 (split_regular_and_flash_blocks, blocks_to_erase)
10115 (compute_garbled_blocks): Likewise.
10116 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10117 (target_write_memory_blocks): Change argument to std::vector.
10118 * symfile.c (struct load_section_data): Add constructor and
10119 destructor. Use std::vector for "requests".
10120 (struct load_progress_data): Add initializers.
10121 (load_section_callback): Update. Use "new".
10122 (clear_memory_write_data): Remove.
10123 (generic_load): Update.
10124
0c305b61
AH
101252018-02-27 Alan Hayward <alan.hayward@arm.com>
10126
10127 * arch/aarch64.h: Use common/tdesc.h.
10128
c5196c92
MR
101292018-02-26 Maciej W. Rozycki <macro@mips.com>
10130
10131 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10132 architecture with a 64-bit ABI.
10133
37c33887
MR
101342018-02-26 Maciej W. Rozycki <macro@mips.com>
10135
10136 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10137 ahead of target description loading.
10138
d4dd3282
TT
101392018-02-26 Tom Tromey <tom@tromey.com>
10140
10141 * stack.c (backtrace_command_1): Update.
10142 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10143 of "flags".
10144 * python/py-framefilter.c (py_print_frame)
10145 (gdbpy_apply_frame_filter): Change type of "flags".
10146 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10147 of "flags".
10148 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10149 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10150 * extension.h (enum frame_filter_flag): Rename from
10151 frame_filter_flags.
10152 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10153 (apply_ext_lang_frame_filter): Change type of "flags".
10154 * extension.c (apply_ext_lang_frame_filter): Change type of
10155 "flags".
10156 * extension-priv.h (struct extension_language_ops)
10157 <apply_frame_filter>: Change type of "flags".
10158
6893c19a
TT
101592018-02-26 Tom Tromey <tom@tromey.com>
10160
10161 PR python/16497:
10162 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10163 off-by-one in py_end computation.
10164 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10165 PRINT_MORE_FRAMES.
10166 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10167 constant.
10168
2ddeaf8a
TT
101692018-02-26 Tom Tromey <tom@tromey.com>
10170
10171 * dwarf2read.c (struct variant_field): New.
10172 (struct nextfield) <variant>: New field.
10173 (dwarf2_add_field): Handle DW_TAG_variant_part.
10174 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10175 discriminated union.
10176 (read_structure_type): Handle DW_TAG_variant_part.
10177 (handle_struct_member_die): New function, extracted from
10178 process_structure_scope. Handle DW_TAG_variant.
10179 (process_structure_scope): Handle discriminated unions. Call
10180 handle_struct_member_die.
10181
c9317f21
TT
101822018-02-26 Tom Tromey <tom@tromey.com>
10183
10184 * rust-lang.h (rust_last_path_segment): Declare.
10185 * rust-lang.c (rust_last_path_segment): Now public. Change
10186 contract.
10187 (struct disr_info): Remove.
10188 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10189 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10190 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10191 (rust_enum_p, rust_enum_variant): New function.
10192 (rust_underscore_fields): Remove "offset" parameter.
10193 (rust_print_enum): New function.
10194 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10195 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10196 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10197 enums.
10198 (rust_internal_print_type): New function, from rust_print_type.
10199 Remove enum code.
10200 (rust_print_type): Call rust_internal_print_type.
10201 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10202 Update enum handling.
10203 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10204 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10205 (rust_union_quirks): New functions.
10206 (process_full_comp_unit, process_full_type_unit): Call
10207 rust_union_quirks.
10208 (process_structure_scope): Update rust_unions if necessary.
10209
7c22600a
TT
102102018-02-26 Tom Tromey <tom@tromey.com>
10211
10212 * value.h (value_union_variant): Declare.
10213 * valops.c (value_union_variant): New function.
10214 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10215 (struct discriminant_info): New.
10216 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10217 enumerator.
10218 (struct main_type) <flag_discriminated_union>: New field.
10219
15ce8941
TT
102202018-02-26 Tom Tromey <tom@tromey.com>
10221
10222 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10223 unittests/unpack-selftests.c.
10224 * unittests/unpack-selftests.c: New file.
10225 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10226
48fbe735
YQ
102272018-02-26 Yao Qi <yao.qi@linaro.org>
10228
10229 * dwarf2read.c (struct partial_die_info) <read>: New method.
10230 (read_partial_die): Remove the declaration.
10231 (load_partial_dies): Update.
10232 (partial_die_info::partial_die_info):
10233 (read_partial_die): Change it to partial_die_info::read.
10234
52356b79
YQ
102352018-02-26 Yao Qi <yao.qi@linaro.org>
10236
10237 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10238 (fixup_partial_die): Remove declaration.
10239 (scan_partial_symbols): Update.
10240 (partial_die_parent_scope): Likewise.
10241 (partial_die_full_name): Likewise.
10242 (fixup_partial_die): Change it to partial_die_info::fixup.
10243
35cc7ed7
YQ
102442018-02-26 Yao Qi <yao.qi@linaro.org>
10245
10246 * dwarf2read.c (read_partial_die): Update the declaration.
10247 (load_partial_dies): Caller update.
10248 (read_partial_die): Remove one argument abbrev_len.
10249
6f06d47b
YQ
102502018-02-26 Yao Qi <yao.qi@linaro.org>
10251
10252 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10253 assignment operator.
10254 (load_partial_dies): Use ctor and copy ctor.
10255 (read_partial_die): Update.
10256 (dwarf2_cu::find_partial_die): Use ctor.
10257
d590ff25
YQ
102582018-02-26 Yao Qi <yao.qi@linaro.org>
10259
10260 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10261 (find_partial_die_in_comp_unit): Change it to
10262 dwarf2_cu::find_partial_die.
10263 (find_partial_die): Update.
10264
fd0a254f
YQ
102652018-02-26 Yao Qi <yao.qi@linaro.org>
10266
10267 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10268 is NULL.
10269
cd9983dd
YQ
102702018-02-26 Yao Qi <yao.qi@linaro.org>
10271
10272 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10273
f46cd62a
AH
102742018-02-26 Alan Hayward <alan.hayward@arm.com>
10275
10276 * arch/amd64.h: Use common/tdesc.h.
10277 * arch/i386.c: Likewise.
10278 * arch/i386.h: Likewise.
10279 * arch/tic6x.c: Likewise.
10280 * arch/tdesc.h: Move file from here...
10281 * common/tdesc.h: ...to here.
10282 * features/aarch64-core.c: Regenerate.
10283 * features/aarch64-fpu.c: Regenerate.
10284 * features/i386/32bit-avx.c: Regenerate.
10285 * features/i386/32bit-avx512.c: Regenerate.
10286 * features/i386/32bit-core.c: Regenerate.
10287 * features/i386/32bit-linux.c: Regenerate.
10288 * features/i386/32bit-mpx.c: Regenerate.
10289 * features/i386/32bit-pkeys.c: Regenerate.
10290 * features/i386/32bit-sse.c: Regenerate.
10291 * features/i386/64bit-avx.c: Regenerate.
10292 * features/i386/64bit-avx512.c: Regenerate.
10293 * features/i386/64bit-core.c: Regenerate.
10294 * features/i386/64bit-linux.c: Regenerate.
10295 * features/i386/64bit-mpx.c: Regenerate.
10296 * features/i386/64bit-pkeys.c: Regenerate.
10297 * features/i386/64bit-segments.c: Regenerate.
10298 * features/i386/64bit-sse.c: Regenerate.
10299 * features/i386/x32-core.c: Regenerate.
10300 * features/tic6x-c6xp.c: Regenerate.
10301 * features/tic6x-core.c: Regenerate.
10302 * features/tic6x-gp.c: Regenerate.
10303 * target-descriptions.c: Use common/tdesc.h.
10304 * target-descriptions.h: Likewise.
10305
9b292f68
TT
103062018-02-24 Tom Tromey <tom@tromey.com>
10307
10308 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10309 (try_thread_db_load_from_dir, thread_db_load_search): Use
10310 std::string.
10311 (info_auto_load_libthread_db_compare): Return bool. Change
10312 argument types.
10313 (info_auto_load_libthread_db): Use std::vector, std::string.
10314 Remove cleanups.
10315
281d762b
TT
103162018-02-24 Tom Tromey <tom@tromey.com>
10317
10318 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10319 std::string.
10320 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10321 std::string*.
10322 * gdbarch.c: Rebuild.
10323 * gdbarch.h: Rebuild.
10324 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10325 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10326 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10327 std::string*.
10328
9d8780f0
SM
103292018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10330
10331 * gdbtypes.h (sect_offset): Change type to uint64_t.
10332 (sect_offset_str): New function.
10333 * dwarf2read.c (create_addrmap_from_aranges): Use
10334 sect_offset_str.
10335 (error_check_comp_unit_head): Likewise.
10336 (create_debug_type_hash_table): Likewise.
10337 (read_cutu_die_from_dwo): Likewise.
10338 (init_cutu_and_read_dies): Likewise.
10339 (init_cutu_and_read_dies_no_follow): Likewise.
10340 (process_psymtab_comp_unit_reader): Likewise.
10341 (partial_die_parent_scope): Likewise.
10342 (peek_die_abbrev): Likewise.
10343 (process_queue): Likewise.
10344 (dwarf2_physname): Likewise.
10345 (read_namespace_alias): Likewise.
10346 (read_import_statement): Likewise.
10347 (create_dwo_cu_reader): Likewise.
10348 (create_cus_hash_table): Likewise.
10349 (lookup_dwo_cutu): Likewise.
10350 (inherit_abstract_dies): Likewise.
10351 (read_func_scope): Likewise.
10352 (read_call_site_scope): Likewise.
10353 (dwarf2_add_member_fn): Likewise.
10354 (read_common_block): Likewise.
10355 (read_module_type): Likewise.
10356 (read_typedef): Likewise.
10357 (read_subrange_type): Likewise.
10358 (load_partial_dies): Likewise.
10359 (read_partial_die): Likewise.
10360 (find_partial_die): Likewise.
10361 (read_str_index): Likewise.
10362 (dwarf2_string_attr): Likewise.
10363 (build_error_marker_type): Likewise.
10364 (lookup_die_type): Likewise.
10365 (dump_die_shallow): Likewise.
10366 (follow_die_ref): Likewise.
10367 (dwarf2_fetch_die_loc_sect_off): Likewise.
10368 (dwarf2_fetch_constant_bytes): Likewise.
10369 (follow_die_sig): Likewise.
10370 (get_signatured_type): Likewise.
10371 (get_DW_AT_signature_type): Likewise.
10372 (dwarf2_find_containing_comp_unit): Likewise.
10373 (set_die_type): Likewise.
10374
8ec57239
JB
103752018-02-21 John Baldwin <jhb@FreeBSD.org>
10376
10377 * arch/aarch64.c: Include "common-defs.h".
10378 * arch/amd64.c: Likewise.
10379 * arch/i386.c: Likewise.
10380
3eac2b65
TT
103812018-02-21 Tom Tromey <tom@tromey.com>
10382
10383 * value.h: (extract_field_op): Update.
10384 * eval.c (extract_field_op): Return a const char *.
10385 * expression.h (parse_expression_for_completion): Update.
10386 * completer.c (complete_expression): Update.
10387 (add_struct_fields): Make fieldname const.
10388 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10389 (mark_completion_tag, parse_exp_in_context_1): Update.
10390 (parse_expression_for_completion): Change "name" to
10391 unique_xmalloc_ptr*.
10392
6ccb583f
TT
103932018-02-21 Tom Tromey <tom@tromey.com>
10394
10395 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10396
c113ed0c
YQ
103972018-02-21 Yao Qi <yao.qi@linaro.org>
10398
10399 * avr-tdep.c (avr_read_pc): Change parameter type to
10400 readable_regcache.
10401 * gdbarch.sh (read_pc): Likewise.
10402 * gdbarch.c: Re-generated.
10403 * gdbarch.h: Re-generated.
10404 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10405 readable_regcache.
10406 * ia64-tdep.c (ia64_read_pc): Likewise.
10407 * mips-tdep.c (mips_read_pc): Likewise.
10408 * spu-tdep.c (spu_read_pc): Likewise.
10409
4c74fe6b
YQ
104102018-02-21 Yao Qi <yao.qi@linaro.org>
10411
10412 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10413 * regcache-dump.c: New file.
10414 * regcache.c: Move register_dump to regcache-dump.c.
10415 (maintenance_print_registers): Likewise.
10416 (maintenance_print_raw_registers): Likewise.
10417 (maintenance_print_cooked_registers): Likewise.
10418 (maintenance_print_register_groups): Likewise.
10419 (maintenance_print_remote_registers): Likewise.
10420 (_initialize_regcache): Likewise.
10421 * regcache.h (register_dump): Moved from regcache.c.
10422
796bb026
YQ
104232018-02-21 Yao Qi <yao.qi@linaro.org>
10424
10425 * regcache.c (regcache::regcache): Update.
10426 (regcache::invalidate): Move it to detached_regcache::invalidate.
10427 (get_thread_arch_aspace_regcache): Update.
10428 (regcache::raw_update): Update.
10429 (regcache::cooked_read): Remove some code.
10430 (regcache::cooked_read_value): Likewise.
10431 (regcache::raw_write): Remove assert on m_readonly_p.
10432 (regcache::raw_supply_integer): Move it to
10433 detached_regcache::raw_supply_integer.
10434 (regcache::raw_supply_zeroed): Likewise.
10435 * regcache.h (detached_regcache) <raw_supply_integer>: New
10436 declaration.
10437 <raw_supply_zeroed, invalidate>: Likewise.
10438 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10439 <invalidate>: Likewise.
10440 <m_readonly_p>: Removed.
10441
215c69dc
YQ
104422018-02-21 Yao Qi <yao.qi@linaro.org>
10443
10444 * infcmd.c (get_return_value): Let stop_regs point to
10445 get_current_regcache.
10446 * regcache.c (regcache::regcache): Remove.
10447 (register_dump_reg_buffer): New class.
10448 (regcache_print): Adjust.
10449 * regcache.h (regcache): Remove constructors.
10450
f3384e66
YQ
104512018-02-21 Yao Qi <yao.qi@linaro.org>
10452
10453 * regcache.c (class register_dump): New class.
10454 (register_dump_regcache, register_dump_none): New class.
10455 (register_dump_remote, register_dump_groups): New class.
10456 (regcache_print): Update.
10457 * regcache.h (regcache_dump_what): Move it to regcache.c.
10458 (regcache) <dump>: Remove.
10459
c8ec2f33
YQ
104602018-02-21 Yao Qi <yao.qi@linaro.org>
10461
10462 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10463 reg_buffer_rw *.
10464 (jit_unwind_reg_set_impl): Call raw_supply.
10465 (jit_frame_sniffer): Use reg_buffer_rw.
10466 * record-full.c (record_full_core_regbuf): Change its type.
10467 (record_full_core_open_1): Use reg_buffer_rw.
10468 (record_full_close): Likewise.
10469 (record_full_core_fetch_registers): Use regcache->raw_supply.
10470 (record_full_core_store_registers): Likewise.
10471 * regcache.c (regcache::get_register_status): Move it to
10472 reg_buffer.
10473 (regcache_raw_set_cached_value): Remove.
10474 (regcache::raw_set_cached_value): Remove.
10475 (regcache::raw_write): Call raw_supply.
10476 (regcache::raw_supply): Move it to reg_buffer_rw.
10477 * regcache.h (regcache_raw_set_cached_value): Remove.
10478 (reg_buffer_rw): New class.
10479
daf6667d
YQ
104802018-02-21 Yao Qi <yao.qi@linaro.org>
10481
10482 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10483 readonly_detached_regcache.
10484 (dummy_frame_prev_register): Use regcache->cooked_read.
10485 * frame.c (frame_save_as_regcache): Change return type.
10486 (frame_pop): Update.
10487 * frame.h (frame_save_as_regcache): Update declaration.
10488 * inferior.h (get_infcall_suspend_state_regcache): Update
10489 declaration.
10490 * infrun.c (infcall_suspend_state) <registers>: use
10491 readonly_detached_regcache.
10492 (save_infcall_suspend_state): Don't use regcache_dup.
10493 (get_infcall_suspend_state_regcache): Change return type.
10494 * linux-fork.c (struct fork_info) <savedregs>: Change to
10495 readonly_detached_regcache.
10496 <pc>: New field.
10497 (fork_save_infrun_state): Don't use regcache_dup.
10498 (info_checkpoints_command): Adjust.
10499 * mi/mi-main.c (register_changed_p): Update declaration.
10500 (mi_cmd_data_list_changed_registers): Use
10501 readonly_detached_regcache.
10502 (register_changed_p): Change parameter type to
10503 readonly_detached_regcache.
10504 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10505 readonly_detached_regcache.
10506 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10507 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10508 New.
10509 (regcache::save): Move it to reg_buffer.
10510 (regcache::restore): Change parameter type.
10511 (regcache_dup): Remove.
10512 * regcache.h (reg_buffer) <save>: New method.
10513 (readonly_detached_regcache): New class.
10514 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10515 readonly_detached_regcache.
10516 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10517
fc5b8736
YQ
105182018-02-21 Yao Qi <yao.qi@linaro.org>
10519
10520 * frame.c (frame_save_as_regcache): Use regcache method save.
10521 (frame_pop): Use regcache method restore.
10522 * infrun.c (restore_infcall_suspend_state): Likewise.
10523 * linux-fork.c (fork_load_infrun_state): Likewise.
10524 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10525 save.
10526 * regcache.c (regcache_save): Remove.
10527 (regcache::restore): More asserts.
10528 (regcache_cpy): Remove.
10529 * regcache.h (regcache_save): Remove the declaration.
10530 (regcache::restore): Move from private to public.
10531 Remove the friend declaration of regcache_cpy.
10532 (regcache_cpy): Remove declaration.
10533
849d0ba8
YQ
105342018-02-21 Yao Qi <yao.qi@linaro.org>
10535
10536 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10537 parameter type to 'readable_regcache *'.
10538 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10539 * arm-tdep.c (arm_neon_quad_read): Likewise.
10540 (arm_pseudo_read): Likewise.
10541 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10542 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10543 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10544 * gdbarch.c: Re-generated.
10545 * gdbarch.h: Re-generated.
10546 * gdbarch.sh (pseudo_register_read): Change parameter type to
10547 'readable_regcache *'.
10548 (pseudo_register_read_value): Likewise.
10549 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10550 (h8300_pseudo_register_read): Likewise.
10551 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10552 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10553 (i386_pseudo_register_read_into_value): Likewise.
10554 (i386_pseudo_register_read_value): Likewise.
10555 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10556 declaration.
10557 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10558 * m32c-tdep.c (m32c_raw_read): Likewise.
10559 (m32c_read_flg): Likewise.
10560 (m32c_banked_register): Likewise.
10561 (m32c_banked_read): Likewise.
10562 (m32c_sb_read): Likewise.
10563 (m32c_part_read): Likewise.
10564 (m32c_cat_read): Likewise.
10565 (m32c_r3r2r1r0_read): Likewise.
10566 (m32c_pseudo_register_read): Likewise.
10567 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10568 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10569 (mep_pseudo_cr64_read): Likewise.
10570 (mep_pseudo_register_read): Likewise.
10571 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10572 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10573 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10574 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10575 (regcache::cooked_read): Likewise.
10576 (regcache::cooked_read_value): Likewise.
10577 (regcache_cooked_read_signed):
10578 (regcache::cooked_read): Likewise.
10579 * regcache.h (readable_regcache): New class.
10580 (regcache): Inherit readable_regcache. Move some methods to
10581 readable_regcache.
10582 * rl78-tdep.c (rl78_pseudo_register_read): Change
10583 parameter type to 'readable_regcache *'.
10584 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10585 (e500_pseudo_register_read): Change parameter type to
10586 'readable_regcache *'.
10587 (dfp_pseudo_register_read): Likewise.
10588 (vsx_pseudo_register_read): Likewise.
10589 (efpr_pseudo_register_read): Likewise.
10590 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10591 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10592 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10593 (sh64_pseudo_register_read): Likewise.
10594 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10595 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10596 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10597 (spu_pseudo_register_read): Likewise.
10598 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10599 (xtensa_pseudo_register_read): Likewise.
10600
31716595
YQ
106012018-02-21 Yao Qi <yao.qi@linaro.org>
10602
10603 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10604 (regcache::arch): Move it to reg_buffer::arch.
10605 (regcache::register_buffer): Likewise.
10606 (regcache::assert_regnum): Likewise.
10607 (regcache::num_raw_registers): Likewise.
10608 * regcache.h (reg_buffer): New class.
10609 (regcache): Inherit reg_buffer.
10610
7104e59b
SM
106112018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10612
10613 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10614 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10615
2d8adcbd
MM
106162018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10617
10618 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10619
b5884fa7
AH
106202018-02-19 Alan Hayward <alan.hayward@arm.com>
10621
10622 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10623 (SFILES): Remove common/*.c files.
10624 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10625 * common/common.host: Add common reference.
10626 * configure.ac: Likewise.
10627 * configure: Regenerate.
10628
fd90ace4
YQ
106292018-02-16 Yao Qi <yao.qi@linaro.org>
10630
10631 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10632 (block_initialize_namespace): Use new.
10633 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10634 (dwarf2_free_objfile): Use delete.
10635 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10636 (copy_type_recursive): Use new.
10637 * gdb_obstack.h (allocate_on_obstack): New.
10638
85046ae2
YQ
106392018-02-15 Yao Qi <yao.qi@linaro.org>
10640
10641 PR gdb/22849
10642 * inferior.c (exit_inferior_1): Reset inf->control.
10643
355c559b
JB
106442018-02-15 Joel Brobecker <brobecker@adacore.com>
10645
10646 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10647 declaration.
10648
980548fd
PA
106492018-02-14 Pedro Alves <palves@redhat.com>
10650
10651 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10652 frame_cleanup_after_sniffer on exception.
10653
692d6f97
TT
106542018-02-14 Tom Tromey <tom@tromey.com>
10655
10656 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10657 const.
10658 (solib_bfd_open): Make pathname const.
10659 * solib.c (solib_bfd_open): Make pathname const.
10660 * solib-spu.c (spu_bfd_fopen): Make name const.
10661 (spu_bfd_open): Make pathname const.
10662 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10663 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10664
e0cc99a6
TT
106652018-02-14 Tom Tromey <tom@tromey.com>
10666
10667 * symfile.c (symfile_bfd_open): Update.
10668 * source.h (openp, source_full_path_of, find_and_open_source):
10669 Change argument type to unique_xmalloc_ptr.
10670 * source.c (openp): Take a unique_xmalloc_ptr.
10671 (source_full_path_of, find_and_open_source): Likewise.
10672 (open_source_file, symtab_to_fullname): Update.
10673 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10674 unique_xmalloc_ptr.
10675 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10676 (exec_file_find): Update.
10677 * psymtab.c (psymtab_to_fullname): Update.
10678 * nto-tdep.h (nto_find_and_open_solib): Update.
10679 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10680 unique_xmalloc_ptr.
10681 * exec.c (exec_file_attach): Update.
10682 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10683 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10684
b46a8d7c
TT
106852018-02-14 Tom Tromey <tom@tromey.com>
10686
10687 * solib.c: Include source.h.
10688 * nto-tdep.c: Include source.h.
10689 * mi/mi-cmd-env.c: Include source.h.
10690 * infcmd.c: Include source.h.
10691 * exec.c: Include source.h.
10692 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10693 (add_path, directory_switch, source_path, init_source_path): Move
10694 declarations...
10695 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10696 (add_path, directory_switch, source_path, init_source_path):
10697 ...here.
10698
797bc1cb
TT
106992018-02-14 Tom Tromey <tom@tromey.com>
10700
10701 * solist.h (exec_file_find, solib_find): Return
10702 unique_xmalloc_ptr.
10703 (solib_bfd_fopen): Take a const char *.
10704 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10705 (exec_file_find, solib_find): Likewise.
10706 (solib_bfd_fopen): Do not take ownership of "pathname".
10707 (solib_bfd_open): Use unique_xmalloc_ptr.
10708 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10709 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10710 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10711 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10712
f98b2e33
JB
107132018-02-14 Joel Brobecker <brobecker@adacore.com>
10714
10715 * ada-lang.c (name_match_type_from_name): Remove reference to
10716 ada_name_for_lookup in function's documentation.
10717 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10718
24b9144d
SM
107192018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10720
10721 * defs.h (enum openp_flags): New enum.
10722 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10723 Move to enum openp_flags.
10724 (openp_flags): New enum flags.
10725 (openp): Change parameter type to openp_flags.
10726 * source.c (openp): Change parameter type to openp_flags.
10727 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10728 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10729
387cd15b
SM
107302018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10731
10732 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10733 per-command.
10734
b303c6f6
AB
107352018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10736
10737 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10738 into...
10739 (class dwarf2_queue_guard): ...the destructor of this new class.
10740 (dw2_do_instantiate_symtab): Create instance of the new class
10741 dwarf2_queue_guard, remove cleanup.
10742
9c3630e9
TT
107432018-02-09 Tom Tromey <tom@tromey.com>
10744
10745 * source.c (find_source_lines): Don't reference past the end of
10746 the vector.
10747
c4e12631
MM
107482018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10749
10750 * remote.c (remote_btrace_maybe_reopen): Change error message.
10751 * btrace.c (btrace_enable): Likewise.
10752 (parse_xml_btrace): Likewise.
10753 (parse_xml_btrace_conf): Likewise.
10754
88711fbf
MM
107552018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10756
10757 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10758 (linux_enable_pt, linux_enable_bts): Call
10759 diagnose_perf_event_open_fail.
10760
17ad2a4f
MM
107612018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10762
10763 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10764 Remove parameter and change return type. Update callers. Move it.
10765 (linux_enable_bts, linux_enable_pt): Improve error message.
10766 (linux_enable_pt): Remove zero buffer size check.
10767 (linux_enable_btrace): Improve error messages. Remove NULL return
10768 check.
10769
de6242d3
MM
107702018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10771
10772 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10773 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10774 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10775 (linux_supports_pt, linux_supports_btrace): Remove.
10776 (linux_enable_bts): Call cpu_supports_bts.
10777 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10778 * remote.c (remote_supports_btrace): Remove.
10779 (init_remote_ops): Remove remote_supports_btrace.
10780 * target-delegates.c: Regenerated.
10781 * target.c (target_supports_btrace): Remove.
10782 * target.h (target_ops) <to_supports_btrace>: Remove
10783 (target_supports_btrace): Remove.
10784 * x86-linux-nat.c (x86_linux_create_target): Remove
10785 linux_supports_btrace.
10786
9ee23a85
MM
107872018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10788
10789 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10790 btrace failed.
10791 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10792 exception and use message in own exception.
10793
5c3284c1
MM
107942018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10795
10796 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10797 (perf_event_pt_event_type): Use gdb_file_up.
10798 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10799 scoped_fd, and scoped_mmap.
10800
84696f37
MM
108012018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10802
10803 * common/scoped_mmap.h: New.
10804 * unittests/scoped_mmap-selftest.c: New.
10805 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10806 unittests/scoped_mmap-selftest.c.
10807
ea4a0888
MM
108082018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10809
10810 * common/scoped_fd.h: New.
10811 * unittests/scoped_fd-selftest.c: New.
10812 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10813 unittests/scoped_fd-selftest.c.
10814
869e8290
TT
108152018-02-09 Tom Tromey <tom@tromey.com>
10816
10817 * auto-load.c (auto_load_section_scripts): Use
10818 gdb::unique_xmalloc_ptr.
10819
a37a2ae7
TT
108202018-02-09 Tom Tromey <tom@tromey.com>
10821
10822 * auto-load.c (execute_script_contents): Use std::string.
10823
4e725347
JB
108242018-02-09 Joel Brobecker <brobecker@adacore.com>
10825
10826 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10827 Python function, rather than a new command.
10828
9a897d43
TT
108292018-02-08 Tom Tromey <tom@tromey.com>
10830
10831 * solib.c (solib_find_1): Use std::string.
10832 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10833
58ef3771
TT
108342018-02-08 Tom Tromey <tom@tromey.com>
10835
10836 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10837
a9abc434
TT
108382018-02-08 Tom Tromey <tom@tromey.com>
10839
10840 * source.c (find_source_lines): Use gdb::def_vector.
10841
84f27c6f
TT
108422018-02-08 Tom Tromey <tom@tromey.com>
10843
10844 * macrocmd.c (struct temporary_macro_definition): New.
10845 (macro_define_command): Use temporary_macro_definition. Remove
10846 cleanups.
10847 (free_macro_definition_ptr): Remove.
10848
0354904b
TT
108492018-02-08 Tom Tromey <tom@tromey.com>
10850
10851 * macroexp.c (maybe_expand): Use std::string.
10852
1739cf24
TT
108532018-02-08 Tom Tromey <tom@tromey.com>
10854
10855 * macroexp.c (struct macro_buffer): Add initializers for some
10856 members.
10857 (init_buffer, init_shared_buffer, free_buffer)
10858 (free_buffer_return_text): Remove.
10859 (macro_buffer): New constructors.
10860 (~macro_buffer): New destructor.
10861 (macro_buffer::set_shared): New method.
10862 (macro_buffer::resize_buffer, macro_buffer::appendc)
10863 (macro_buffer::appendmem): Now methods, not free functions.
10864 (set_token, append_tokens_without_splicing, stringify)
10865 (macro_stringify): Update.
10866 (gather_arguments): Change return type. Remove argc_p argument,
10867 add args_ptr argument. Use std::vector.
10868 (substitute_args): Remove argc argument. Accept std::vector.
10869 (expand): Update. Use std::vector.
10870 (scan, macro_expand, macro_expand_next): Update.
10871
f6c2623e
TT
108722018-02-08 Tom Tromey <tom@tromey.com>
10873
10874 * symtab.c (default_collect_symbol_completion_matches_break_on):
10875 Use unique_xmalloc_ptr.
10876 * macroscope.h: (sal_macro_scope, user_macro_scope)
10877 (default_macro_scope): Return unique_xmalloc_ptr.
10878 * macroscope.c (sal_macro_scope, user_macro_scope)
10879 (default_macro_scope): Return unique_xmalloc_ptr.
10880 * macroexp.h (macro_expand, macro_expand_once): Return
10881 unique_xmalloc_ptr.
10882 * macroexp.c (macro_expand, macro_expand_once): Return
10883 unique_xmalloc_ptr.
10884 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10885 (info_macro_command, info_macros_command): Use
10886 unique_xmalloc_ptr.
10887 * compile/compile-c-support.c (write_macro_definitions): Use
10888 unique_xmalloc_ptr.
10889 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10890
c2e0e465
SM
108912018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10892
10893 * value.c (value_static_field): Assign field type instead of
10894 containing type when returning an optimized out value.
10895
3f8c94b4
YQ
108962018-02-06 Yao Qi <yao.qi@linaro.org>
10897
10898 * ft32-tdep.c (ft32_read_pc): Remove.
10899 (ft32_write_pc): Remove.
10900 (ft32_gdbarch_init): Update.
10901 * m32r-tdep.c (m32r_read_pc): Remove.
10902 (m32r_gdbarch_init): Update.
10903 * mep-tdep.c (mep_read_pc): Remove.
10904 (mep_gdbarch_init): Update.
10905 * microblaze-tdep.c (microblaze_write_pc): Remove.
10906 (microblaze_gdbarch_init): Update.
10907 * mn10300-tdep.c (mn10300_read_pc): Remove.
10908 (mn10300_write_pc): Remove.
10909 (mn10300_gdbarch_init): Update.
10910 * moxie-tdep.c (moxie_read_pc): Remove.
10911 (moxie_write_pc): Remove.
10912 (moxie_gdbarch_init): Update.
10913
bca65a23
YQ
109142018-02-06 Yao Qi <yao.qi@linaro.org>
10915
10916 * expprint.c (print_subexp_standard): Handle
10917 OP_F77_UNDETERMINED_ARGLIST.
10918 (dump_subexp_body_standard): Likewise.
10919
583e3f90 109202018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 10921
583e3f90
YQ
10922 * target-descriptions.c (tdesc_element_visitor) Add empty
10923 implementations.
b8df6ca7
AH
10924 (tdesc_type): Move make_gdb_type from here.
10925 (tdesc_type_builtin): Likewise.
10926 (tdesc_type_vector): Likewise.
10927 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10928 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10929 (make_gdb_type_union): Likewise.
10930 (make_gdb_type_flags): Likewise.
10931 (make_gdb_type_enum): Likewise.
10932 (make_gdb_type): New function.
10933 (tdesc_register_type): Use static make_gdb_type.
10934
e813d34a
RK
109352018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10936
10937 * infcmd.c (default_print_one_register_info): Align natural-format
10938 column values consistently one under another.
10939 (pad_to_column): New function.
10940
0eb876f5
JB
109412018-02-05 Joel Brobecker <brobecker@adacore.com>
10942
10943 * dwarf2read.c (dwarf2_physname): Move commment.
10944
0625771b
LS
109452018-02-01 Leszek Swirski <leszeks@google.com>
10946
10947 * varobj.c (varobj_formatted_print_options): Allow recursive
10948 pretty printing if pretty printing is enabled.
10949
59498c30
LS
109502018-02-01 Leszek Swirski <leszeks@google.com>
10951
10952 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10953 names after a structop as a filename.
10954
2d9e6acb
YQ
109552018-02-01 Yao Qi <yao.qi@linaro.org>
10956
10957 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10958 (arm_record_coproc_data_proc): Likewise.
10959
df95a9cf
YQ
109602018-02-01 Yao Qi <yao.qi@linaro.org>
10961
10962 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10963
07e5f5cf
NP
109642018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10965
10966 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10967 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10968
3045b475
PA
109692018-01-31 Pedro Alves <palves@redhat.com>
10970
10971 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10972 * inflow.c (child_terminal_save_inferior): Wrap reference to
10973 tcgetpgrp in HAVE_TERMIOS_H.
10974 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10975 _WIN32.
10976 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10977 always iterate over all inferiors.
10978 (gdbsim_cntrl_c): Adjust.
10979 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10980
929b5ad4
JB
109812018-01-31 Joel Brobecker <brobecker@adacore.com>
10982
10983 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10984 index type is objfile-owned if the element type is as well.
10985
29236ca2
JB
109862018-01-31 Joel Brobecker <brobecker@adacore.com>
10987
10988 GDB 8.1 released.
10989
c81e8879
PR
109902018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10991
10992 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10993 "features/s390x-linux64.c".
10994 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10995 s390_linux32 and s390x_linux64.
10996 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10997 default tdesc.
10998 * s390-tdep.c: Include "features/s390-linux32.c" and
10999 "features/s390x-linux64.c".
11000 (s390_tdesc_valid): Add check for tdesc_has_registers.
11001 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11002 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11003 tdesc_s390x_linux64.
11004 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11005 tdesc_s390x_linux64 to...
11006 * s390-tdep.h: ...here.
11007
e671cd59
PA
110082018-01-30 Pedro Alves <palves@redhat.com>
11009
11010 PR gdb/13211
11011 * config.in, configure: Regenerate.
11012 * configure.ac: Check for getpgid.
11013 * go32-nat.c (go32_pass_ctrlc): New.
11014 (go32_target): Install it.
11015 * inf-child.c (inf_child_target): Install
11016 child_terminal_save_inferior, child_pass_ctrlc and
11017 child_interrupt.
11018 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11019 (inf_ptrace_target): No longer install it.
11020 * infcmd.c (interrupt_target_1): Adjust.
11021 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11022 (child_interrupt): Declare.
11023 (inferior::terminal_state): New.
11024 * inflow.c (struct terminal_info): Update comments.
11025 (inferior_process_group): Delete.
11026 (terminal_is_ours): Delete.
11027 (gdb_tty_state): New.
11028 (child_terminal_init): Adjust.
11029 (is_gdb_terminal, sharing_input_terminal_1)
11030 (sharing_input_terminal): New functions.
11031 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11032 Set the process's actual process group in the foreground if
11033 possible. Handle is_ours_for_output/is_ours distinction. Don't
11034 mark terminal as the inferior's if not sharing GDB's terminal.
11035 Don't check attach_flag.
11036 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11037 pass down a target_terminal_state.
11038 (child_terminal_save_inferior): New, factored out from ...
11039 (child_terminal_ours_1): ... this. Handle
11040 target_terminal_state::is_ours_for_output.
11041 (child_interrupt, child_pass_ctrlc): New.
11042 (inflow_inferior_exit): Clear the inferior's terminal_state.
11043 (copy_terminal_info): Copy the inferior's terminal state.
11044 (_initialize_inflow): Remove reference to terminal_is_ours.
11045 * inflow.h (inferior_process_group): Delete.
11046 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11047 * procfs.c (procfs_target): Don't install procfs_interrupt.
11048 (procfs_interrupt): Delete.
11049 * remote.c (remote_serial_quit_handler): Adjust.
11050 (remote_interrupt): Remove ptid parameter. Adjust.
11051 * target-delegates.c: Regenerate.
11052 * target.c: Include "terminal.h".
11053 (target_terminal::terminal_state): Rename to ...
11054 (target_terminal::m_terminal_state): ... this.
11055 (target_terminal::init): Adjust.
11056 (target_terminal::inferior): Adjust to per-inferior
11057 terminal_state.
11058 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11059 (target_terminal::ours, target_terminal::ours_for_output): Use
11060 target_terminal_is_ours_kind.
11061 (target_interrupt): Remove ptid parameter. Adjust.
11062 (default_target_pass_ctrlc): Adjust.
11063 * target.h (target_ops::to_terminal_save_inferior): New field.
11064 (target_ops::to_interrupt): Remove ptid_t parameter.
11065 (target_interrupt): Remove ptid_t parameter. Update comment.
11066 (target_pass_ctrlc): Update comment.
11067 * target/target.h (target_terminal_state): New scoped enum,
11068 factored out of ...
11069 (target_terminal::terminal_state): ... here.
11070 (target_terminal::inferior): Update comments.
11071 (target_terminal::restore_inferior): New.
11072 (target_terminal::is_inferior, target_terminal::is_ours)
11073 (target_terminal::is_ours_for_output): Adjust.
11074 (target_terminal::scoped_restore_terminal_state): Adjust to
11075 rename, and call restore_inferior() instead of inferior().
11076 (target_terminal::scoped_restore_terminal_state::m_state): Change
11077 type.
11078 (target_terminal::terminal_state): Rename to ...
11079 (target_terminal::m_terminal_state): ... this and change type.
11080
9c3a5d93
PA
110812018-01-30 Pedro Alves <palves@redhat.com>
11082
11083 * linux-nat.c (wait_for_signal): New function.
11084 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11085 directly.
11086 (async_terminal_is_ours)
11087 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11088 (linux_nat_add_target): Don't override
11089 to_terminal_inferior/to_terminal_ours.
11090
69ab5edb
SDJ
110912018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11092
11093 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11094
fc8e7e75
SM
110952018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11096
11097 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11098 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11099 dwarf2_per_objfile_free here.
11100 (dwarf2_per_objfile_free): Remove.
11101 (_initialize_dwarf2_read): Don't register
11102 dwarf2_per_objfile_free as a registry cleanup.
11103
b2a426e2
EZ
111042018-01-27 Eli Zaretskii <eliz@gnu.org>
11105
11106 Avoid compilation errors in MinGW native builds
11107
11108 The error is triggered by including python-internal.h, and the
11109 error message is:
11110
11111 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11112 from build-gnulib/import/math.h:27,
11113 from d:/usr/Python26/include/pyport.h:235,
11114 from d:/usr/Python26/include/Python.h:58,
11115 from python/python-internal.h:94,
11116 from python/py-arch.c:24:
11117 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11118 using ::hypot;
11119 ^~~~~
11120
11121 This happens because Python headers define 'hypot' to expand t
11122 '_hypot' in the Windows builds.
11123 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11124 'hypoth'. This avoids a compilation error.
11125
0bdd8eac
AH
111262018-01-26 Alan Hayward <alan.hayward@arm.com>
11127
11128 * MAINTAINERS (Write After Approval): Fix ordering.
11129
56ae9dc3
AH
111302018-01-26 Alan Hayward <alan.hayward@arm.com>
11131
11132 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11133
7433498b
AM
111342018-01-26 Alan Modra <amodra@gmail.com>
11135
11136 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11137 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11138 Remove nop. Make const. Comment.
11139 (powerpc32_plt_stub_so_2): New.
11140 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11141 Correct count. Update uses.
11142 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11143 Move common code reading PLT entry word. Correct
11144 powerpc32_plt_stub PLT address calculation.
11145 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11146 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11147 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11148 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11149 (ppc64_standard_linkage8): Likewise.
11150 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11151 Correct insns description.
11152 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11153
0f59d5fc
PA
111542018-01-24 Pedro Alves <palves@redhat.com>
11155
11156 GCC PR libstdc++/83906
11157 * gdbtypes.c (operator==(const dynamic_prop &,
11158 const dynamic_prop &)): New.
11159 (operator==(const range_bounds &, const range_bounds &)): New.
11160 (check_types_equal): Use them instead of memcmp.
11161 * gdbtypes.h (operator==(const dynamic_prop &,
11162 const dynamic_prop &)): Declare.
11163 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11164 (operator==(const range_bounds &, const range_bounds &)): Declare.
11165 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11166
ef8914a4
PR
111672018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11168
11169 * s390-linux-tdep.c (s390_record_address_mask)
11170 (s390_record_calc_disp_common, s390_record_calc_disp)
11171 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11172 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11173 (s390_process_record): Move to s390-tdep.c.
11174 (s390_linux_init_abi_any): Adjust.
11175 * s390-tdep.c (s390_record_address_mask)
11176 (s390_record_calc_disp_common, s390_record_calc_disp)
11177 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11178 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11179 (s390_process_record): Moved from s390-linux-tdep.c
11180 (s390_gdbarch_init): Adjust.
11181
d6e58945
PR
111822018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11183
11184 * s390-linux-nat.c (s390-tdep.h): New include.
11185 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11186 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11187 (ALLDEPFILES): Add s390-tdep.c.
11188 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11189 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11190 * s390-tdep.h: ...this. New file.
11191 * s390-linux-tdep.c (s390-tdep.h): New include.
11192 (_initialize_s390_tdep): Rename to...
11193 (_initialize_s390_linux_tdep): ...this and adjust.
11194 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11195 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11196 s390-tdep.h.
11197 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11198 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11199 (s390_is_partial_instruction, s390_software_single_step)
11200 (is_non_branch_ril, s390_displaced_step_copy_insn)
11201 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11202 (s390_prologue_data, s390_addr, s390_store, s390_load)
11203 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11204 (s390_register_call_saved, s390_guess_tracepoint_registers)
11205 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11206 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11207 (s390_pseudo_register_name, s390_pseudo_register_type)
11208 (s390_pseudo_register_read, s390_pseudo_register_write)
11209 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11210 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11211 (s390_addr_bits_remove, s390_address_class_type_flags)
11212 (s390_address_class_type_flags_to_name)
11213 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11214 (s390_function_arg_float, s390_function_arg_vector)
11215 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11216 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11217 (s390_frame_align, s390_register_return_value, s390_return_value)
11218 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11219 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11220 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11221 (s390_trad_frame_prev_register, s390_unwind_cache)
11222 (s390_prologue_frame_unwind_cache)
11223 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11224 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11225 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11226 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11227 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11228 (s390_frame_base_address, s390_local_base_address)
11229 (s390_frame_base, s390_gcc_target_options)
11230 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11231 (s390_validate_reg_range, s390_tdesc_valid)
11232 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11233 * s390-tdep.c: ...this. New file.
11234
9c0b896e
PR
112352018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11236
11237 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11238 (s390_process_record, s390_gdbarch_tdep_alloc)
11239 (s390_linux_init_abi_any): Use/set new hook.
11240
7042632b
PR
112412018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11242
11243 * s390-linux-tdep.c (osabi.h): New include.
11244 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11245 (s390_linux_init_abi_any): New functions.
11246 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11247
650f5e13
PR
112482018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11249
11250 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11251 tdesc_has_registers check
11252
47c9317e
PR
112532018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11254
11255 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11256 (s390_validate_reg_range): New macro.
11257 (s390_gdbarch_init): Adjust.
11258
095085d8
PR
112592018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11260
11261 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11262 (s390_gdbarch_tdep_alloc): Adjust.
11263 (s390_gdbarch_init): Adjust.
11264
ab9bcc67
PR
112652018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11266
11267 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11268 <have_tdb>: Change type to bool.
11269 (s390_gdbarch_tdep_alloc): Adjust.
11270 (s390_gdbarch_init): Adjust.
11271
21f6f5ff
PR
112722018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11273
11274 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11275 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11276 (s390_gdbarch_tdep_alloc): New function.
11277 (s390_gdbarch_init): Allocate tdep at start and use its fields
11278 instead of separate variables.
11279
0eb97953
PR
112802018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11281
11282 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11283 when looking for cached gdbarch and add comment for remaining.
11284
5c319bb2
PA
112852018-01-22 Pedro Alves <palves@redhat.com>
11286 Sergio Durigan Junior <sergiodj@redhat.com>
11287
11288 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11289 case.
11290
d65ce302
MR
112912018-01-22 Maciej W. Rozycki <macro@mips.com>
11292
11293 * MAINTAINERS: Update my company e-mail address.
11294
ec7a5fcb
YQ
112952018-01-22 Yao Qi <yao.qi@linaro.org>
11296
11297 * regcache.c (cooked_write_test): New function.
11298 (_initialize_regcache): Register the test.
11299
11f57cb6
YQ
113002018-01-22 Yao Qi <yao.qi@linaro.org>
11301
11302 * ia64-tdep.c (ia64_pseudo_register_read): Call
11303 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11304 * m32c-tdep.c (m32c_cat_read): Likewise.
11305 (m32c_r3r2r1r0_read): Likewise.
11306 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11307 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11308
03f50fc8
YQ
113092018-01-22 Yao Qi <yao.qi@linaro.org>
11310
11311 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11312 method raw_read instead of regcache_raw_read.
11313 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11314 * arm-tdep.c (arm_neon_quad_read): Likewise.
11315 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11316 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11317 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11318 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11319 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11320 (i386_pseudo_register_read_into_value): Likewise.
11321 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11322 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11323 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11324 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11325 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11326 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11327 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11328 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11329 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11330
dc711524
YQ
113312018-01-22 Yao Qi <yao.qi@linaro.org>
11332
11333 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11334 * configure.tgt: Remove target mt.
11335 * mt-tdep.c: Remove.
11336 * regcache.c (cooked_read_test): Remove the check for mt.
11337
3f5a868b
YQ
113382018-01-22 Yao Qi <yao.qi@linaro.org>
11339
11340 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11341 instead of gdbarch_pseudo_register_read_value.
11342
de4cb04a
JB
113432018-01-22 Joel Brobecker <brobecker@adacore.com>
11344
11345 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11346 language is Ada.
11347
a9e40818
JB
113482018-01-22 Joel Brobecker <brobecker@adacore.com>
11349
11350 * linespec.c (create_sals_line_offset): Remove code that preserved
11351 the symtab_and_line's line number.
11352
e707fc44
AB
113532018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11354
11355 * varobj.c (varobj_create): Don't set valid_block when creating a
11356 floating varobj.
11357
03d0bf7b
AB
113582018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11359
11360 * varobj.c (varobj_create): Remove out of date comment.
11361
ae451627
AB
113622018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11363
11364 PR mi/20395
11365 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11366 updating innermost block.
11367 * parse.c (innermost_block_tracker::update): Take extra type
11368 parameter, and check types match before updating innermost block.
11369 (write_dollar_variable): Update innermost block for registers.
11370 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11371 (innermost_block_tracker::innermost_block_tracker): Initialise
11372 m_types member.
11373 (innermost_block_tracker::reset): Take type parameter.
11374 (innermost_block_tracker::update): Take type parameter, and pass
11375 type through as needed.
11376 (innermost_block_tracker::m_types): New member.
11377 * varobj.c (varobj_create): Pass type when reseting innermost
11378 block.
11379
aee1fcdf
AB
113802018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11381
11382 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11383 * ada-lang.c (resolve_subexp): Likewise.
11384 * breakpoint.c (set_breakpoint_condition) Likewise.
11385 (watch_command_1) Likewise.
11386 * c-exp.y (variable): Likewise.
11387 * d-exp.y (PrimaryExpression): Likewise.
11388 * f-exp.y (variable): Likewise.
11389 * go-exp.y (variable): Likewise.
11390 * m2-exp.y (variable): Likewise.
11391 * objfiles.c (objfile::~objfile): Likewise.
11392 * p-exp.y (variable): Likewise.
11393 * parse.c (innermost_block): Change type.
11394 * parser-defs.h (class innermost_block_tracker): New.
11395 (innermost_block): Change to innermost_block_tracker.
11396 * printcmd.c (display_command): Switch to innermost_block API.
11397 (do_one_display): Likewise.
11398 * rust-exp.y (do_one_display): Likewise.
11399 * symfile.c (clear_symtab_users): Likewise.
11400 * varobj.c (varobj_create): Switch to innermost_block API, replace
11401 use of innermost_block with block stored on varobj object.
11402
396af9a1
AB
114032018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11404
11405 * expression.h (innermost_block): Remove declaration.
11406 * varobj.c: Add 'parser-defs.h' include.
11407
fcfcc376
TT
114082018-01-19 Tom Tromey <tom@tromey.com>
11409
11410 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11411 symbols in the static and global blocks.
11412
5a6c3296
JC
114132018-01-19 James Clarke <jrtc27@jrtc27.com>
11414
11415 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11416 gdb_ptrace.h, and move including gdb_wait.h ...
11417 * nat/linux-ptrace.h: ... to here.
11418
bc09b0c1
SM
114192018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11420
11421 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11422 inf_ptrace_detach_success.
11423 (inf_ptrace_detach_success): Add inferior parameter, use it
11424 instead of inferior_ptid, pass it to detach_inferior.
11425 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11426 parameter.
11427 * inferior.c (detach_inferior): Add overload that takes an
11428 inferior object.
11429 * inferior.h (detach_inferior): Likewise.
11430 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11431 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11432 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11433
6e1e1966
SM
114342018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11435
11436 * target.h (struct target_ops) <to_detach>: Add inferior
11437 parameter.
11438 (target_detach): Likewise.
11439 * target.c (dispose_inferior): Pass inferior down.
11440 (target_detach): Pass inferior down. Assert that it is equal to
11441 the current inferior.
11442 * aix-thread.c (aix_thread_detach): Pass inferior down.
11443 * corefile.c (core_file_command): Pass current_inferior() down.
11444 * corelow.c (core_detach): Add inferior parameter.
11445 * darwin-nat.c (darwin_detach): Likewise.
11446 * gnu-nat.c (gnu_detach): Likewise.
11447 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11448 * infcmd.c (detach_command): Pass current_inferior() down to
11449 target_detach.
11450 * infrun.c (follow_fork_inferior): Pass parent_inf to
11451 target_detach.
11452 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11453 target_detach.
11454 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11455 * linux-thread-db.c (thread_db_detach): Likewise.
11456 * nto-procfs.c (procfs_detach): Likewise.
11457 * procfs.c (procfs_detach): Likewise.
11458 * record.c (record_detach): Likewise.
11459 * record.h (struct inferior): Forward-declare.
11460 (record_detach): Add inferior parameter.
11461 * remote-sim.c (gdbsim_detach): Likewise.
11462 * remote.c (remote_detach_1): Likewise.
11463 (remote_detach): Likewise.
11464 (extended_remote_detach): Likewise.
11465 * sol-thread.c (sol_thread_detach): Likewise.
11466 * target-debug.h (target_debug_print_inferior_p): New macro.
11467 * target-delegates.c: Re-generate.
11468 * top.c (kill_or_detach): Pass inferior down to target_detach.
11469 * windows-nat.c (windows_detach): Add inferior parameter.
11470
6bd6f3b6
SM
114712018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11472
11473 * target.h (struct target_ops) <to_detach>: Remove args
11474 parameter.
11475 (target_detach): Likewise.
11476 * target.c (dispose_inferior): Adjust.
11477 (target_detach): Remove args parameter, adjust.
11478 * aix-thread.c (aix_thread_detach): Adjust.
11479 * corefile.c (core_file_command): Adjust.
11480 * corelow.c (core_detach): Adjust.
11481 * darwin-nat.c (darwin_detach): Adjust.
11482 * gnu-nat.c (gnu_detach): Adjust.
11483 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11484 * infcmd.c (detach_command): Adjust
11485 * infrun.c (follow_fork_inferior): Adjust.
11486 (handle_vfork_child_exec_or_exit): Adjust.
11487 * linux-fork.c (linux_fork_detach): Remove args parameter.
11488 * linux-fork.h (linux_fork_detach): Likewise.
11489 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11490 * linux-thread-db.c (thread_db_detach): Likewise.
11491 * nto-procfs.c (procfs_detach): Likewise.
11492 * procfs.c (procfs_detach): Likewise.
11493 (do_detach): Remove signo parameter.
11494 * record.c (record_detach): Remove args parameter.
11495 * record.h (record_detach): Likewise.
11496 * remote-sim.c (gdbsim_detach): Likewise.
11497 * remote.c (remote_detach_1): Likewise.
11498 (remote_detach): Likewise.
11499 (extended_remote_detach): Likewise.
11500 * sol-thread.c (sol_thread_detach): Likewise.
11501 * target-delegates.c: Re-generate.
11502 * top.c (struct qt_args) <args>: Remove field.
11503 (kill_or_detach): Don't pass args.
11504 (quit_force): Don't set args.
11505 * windows-nat.c (windows_detach): Remove args parameter.
11506
88af8ea8
YQ
115072018-01-19 Yao Qi <yao.qi@linaro.org>
11508
11509 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11510 (arm_linux_init_abi): Install it.
11511
dea445b9
YQ
115122018-01-19 Yao Qi <yao.qi@linaro.org>
11513
11514 * osabi.c (gdb_osabi_names): Extend the regexp for
11515 arm-linux-gnueabihf.
11516
4a17f768
YQ
115172018-01-18 Yao Qi <yao.qi@linaro.org>
11518
11519 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11520 m_abbrevs.
11521 (abbrev_table::add_abbrev): Update.
11522 (abbrev_table::lookup_abbrev): Update.
11523
d679c21a
YQ
115242018-01-18 Yao Qi <yao.qi@linaro.org>
11525
11526 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11527
7d937cad
SDJ
115282018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11529
11530 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11531 to "std::string".
11532
9e14690d
TT
115332018-01-17 Tom Tromey <tom@tromey.com>
11534
11535 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11536
50a82047
TT
115372018-01-17 Tom Tromey <tom@tromey.com>
11538
11539 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11540 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11541 (create_array_type_with_stride): Update.
11542 * dwarf2read.c (set_die_type): Update.
11543
c89b44cd
TT
115442018-01-17 Tom Tromey <tom@tromey.com>
11545
11546 * dwarf2read.c (delayed_method_info): Remove typedef.
11547 (dwarf2_cu::method_info): Now a std::vector.
11548 (add_to_method_list): Update.
11549 (free_delayed_list): Remove.
11550 (compute_delayed_physnames): Update.
11551 (process_full_comp_unit, process_full_type_unit): Clear the method
11552 list. Remove cleanups.
11553 (psymtab_include_file_name): Add name_holder parameter. Use
11554 unique_xmalloc_ptr.
11555 (dwarf_decode_lines): Update.
11556
fcd3b13d
SM
115572018-01-17 Tom Tromey <tom@tromey.com>
11558 Simon Marchi <simon.marchi@ericsson.com>
11559
11560 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11561 (dwarf2_per_objfile::free_cached_comp_units)
11562 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11563 (init_cutu_and_read_dies_no_follow): Update.
11564 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11565 (dwarf2_cu::~dwarf2_cu): New.
11566 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11567 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11568
685af9cd
TT
115692018-01-17 Tom Tromey <tom@tromey.com>
11570 Simon Marchi <simon.marchi@ericsson.com>
11571
11572 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11573 (struct die_reader_specs) <abbrev_table>: New member.
11574 (struct abbrev_table): Add constructor.
11575 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11576 <abbrev_obstack>: Now an auto_obstack.
11577 (abbrev_table_up): New typedef.
11578 (init_cu_die_reader): Add abbrev_table parameter.
11579 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11580 Add result_dwo_abbrev_table.
11581 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11582 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11583 Update.
11584 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11585 parameter.
11586 (skip_children): Update.
11587 (abbrev_table::alloc_abbrev): Rename from
11588 abbrev_table_alloc_abbrev.
11589 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11590 (abbrev_table::lookup_abbrev): Rename from
11591 abbrev_table_lookup_abbrev.
11592 (abbrev_table_read_table): Return abbrev_table_up.
11593 (abbrev_table_free, abbrev_table_free_cleanup)
11594 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11595 (load_partial_dies): Update.
11596
5e2db402
TT
115972018-01-17 Tom Tromey <tom@tromey.com>
11598
11599 * dwarf2read.c (dwarf2_compute_name): Update comment.
11600 (read_func_scope, read_variable): Update.
11601 (new_symbol): Remove.
11602 (new_symbol_full): Rename to new_symbol.
11603
ee7f689e 116042018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
11605
11606 PR gdb/16577
11607 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11608 a warning instead of throwing an error, set section size to 0 and return
11609 NULL.
11610 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11611
4d9b86e1
SM
116122018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11613
11614 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11615 std::string.
11616 (linux_ptrace_attach_fail_reason_string): Likewise.
11617 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11618 Likewise.
11619 (linux_ptrace_attach_fail_reason_string): Likewise.
11620 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11621
a7b2d0fb
SM
116222018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11623
11624 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11625
f517c180
EA
116262018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11627
11628 PR gdb/21559
11629 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11630 checking for fs_base/gs_base fields in struct user_regs_struct.
11631 * configure: Regenerate.
11632
7045b1ca
YQ
116332018-01-17 Yao Qi <yao.qi@linaro.org>
11634
11635 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11636 function.
11637 (aarch64_linux_init_abi): Install it to gdbarch hook
11638 gcc_target_options.
11639
db422fb2
PA
116402018-01-15 Pedro Alves <palves@redhat.com>
11641
11642 * common/signals-state-save-restore.c
11643 (save_original_signals_state): Fix typos.
11644
ba643918
SDJ
116452017-01-12 Tom Tromey <tom@tromey.com>
11646 Sergio Durigan Junior <sergiodj@redhat.com>
11647
11648 * Makefile.in (install-only): Install gdb-add-index.
11649
906b4aac
JB
116502018-01-12 John Baldwin <jhb@FreeBSD.org>
11651
11652 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11653
bdf2a94a
AA
116542018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11655
11656 * infrun.c (keep_going_pass_signal): Clear step-over info when
11657 insert_breakpoints fails.
11658
71d378ae
PA
116592018-01-11 Pedro Alves <palves@redhat.com>
11660
11661 PR gdb/22583
11662 * infrun.c (resume): Rename to ...
11663 (resume_1): ... this.
11664 (resume): Reimplement as wrapper around resume_1.
11665
3cada740
PA
116662018-01-11 Pedro Alves <palves@redhat.com>
11667
11668 PR remote/22597
11669 * remote.c (remote_parse_stop_reply): Default to the last-set
11670 general thread instead of to 'magic_null_ptid'.
11671
618daa93
PA
116722018-01-10 Pedro Alves <palves@redhat.com>
11673
11674 * language.h (language_get_symbol_name_matcher): Rename ...
11675 (get_symbol_name_matcher): ... this.
11676 * language.c (language_get_symbol_name_matcher): Ditto.
11677 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11678 callers adjusted.
11679
c63d3e8d
PA
116802018-01-10 Pedro Alves <palves@redhat.com>
11681
11682 PR gdb/22670
11683 * dwarf2read.c
11684 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11685 Adjust to use language_get_symbol_name_matcher instead of
11686 language_defn::la_get_symbol_name_matcher.
11687 * language.c (language_get_symbol_name_matcher): If in Ada mode
11688 and the lookup name is a verbatim match, return Ada's matcher.
11689 * language.h (language_get_symbol_name_matcher): Adjust comment.
11690 (ada_lookup_name_info::verbatim_p):: New method.
11691
d4c2a405
PA
116922018-01-10 Pedro Alves <palves@redhat.com>
11693
11694 PR gdb/22670
11695 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11696 minsym's language is language_auto or language_cplus, pass down
11697 language_ada instead.
11698 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11699
8825213e
PA
117002018-01-10 Pedro Alves <palves@redhat.com>
11701
11702 PR gdb/22670
11703 * minsyms.c (linkage_name_str): New function.
11704 (iterate_over_minimal_symbols): Use it.
11705
2d97a5d9
JB
117062018-01-09 John Baldwin <jhb@FreeBSD.org>
11707
11708 * NEWS: Document that 'info proc' now works on FreeBSD.
11709
92fce24d
JB
117102018-01-09 John Baldwin <jhb@FreeBSD.org>
11711
11712 * configure.ac: Check for kinfo_getfile in libutil.
11713 * configure: Regenerate.
11714 * config.in: Regenerate.
11715 * fbsd-nat.c: Include "fbsd-tdep.h".
11716 (fbsd_fetch_cmdline): New.
11717 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11718 rather than calling error.
11719 (fbsd_info_proc): New.
11720 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11721 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11722 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11723
262f62f5
JB
117242018-01-09 John Baldwin <jhb@FreeBSD.org>
11725
11726 * fbsd-nat.c (struct free_deleter): Remove.
11727 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11728
b999e203
JB
117292018-01-09 John Baldwin <jhb@FreeBSD.org>
11730
11731 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11732 NULL for an empty pathname.
11733
d2176225
JB
117342018-01-09 John Baldwin <jhb@FreeBSD.org>
11735
11736 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11737 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11738 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11739 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11740 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11741 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11742 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11743 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11744 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11745 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11746 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11747 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11748 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11749 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11750 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11751
9c4ac400
ST
117522018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11753
11754 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11755 (gnu_xfer_auxv): New function.
11756 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11757 TARGET_OBJECT_AUXV.
11758
1e5ded6c
YQ
117592018-01-08 Yao Qi <yao.qi@linaro.org>
11760 Simon Marchi <simon.marchi@ericsson.com>
11761
11762 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11763 common/selftest.c.
11764 (COMMON_OBS): Remove selftest.o.
11765 * configure.ac: Append selftest-arch.c and common/selftest.c to
11766 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11767 * configure: Re-generated.
11768 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11769 GDB_SELF_TEST.
11770 (maintenance_info_selftests): Likewise.
11771
04bafb1e
XR
117722018-01-08 Xavier Roirand <roirand@adacore.com>
11773
11774 * ada-valprint.c (val_print_packed_array_elements): Use
11775 proper number of elements when printing an array indexed
11776 by an enumeration type.
11777
518817b3
SM
117782018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11779
11780 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11781 (dw2_get_file_names_reader): Adjust.
11782 (lookup_dwo_signatured_type): Adjust.
11783 (lookup_dwp_signatured_type): Adjust.
11784 (lookup_signatured_type): Adjust.
11785 (create_type_unit_group): Adjust.
11786 (get_type_unit_group): Adjust.
11787 (process_psymtab_comp_unit_reader): Adjust.
11788 (build_type_psymtabs_reader): Adjust.
11789 (scan_partial_symbols): Adjust.
11790 (add_partial_symbol): Adjust.
11791 (add_partial_subprogram): Adjust.
11792 (peek_die_abbrev): Adjust.
11793 (fixup_go_packaging): Adjust.
11794 (process_imported_unit_die): Adjust.
11795 (dwarf2_compute_name): Adjust.
11796 (dwarf2_physname): Adjust.
11797 (read_import_statement): Adjust.
11798 (handle_DW_AT_stmt_list): Adjust.
11799 (read_file_scope): Adjust.
11800 (read_func_scope): Adjust.
11801 (read_lexical_block_scope): Adjust.
11802 (read_call_site_scope): Adjust.
11803 (read_variable): Adjust.
11804 (dwarf2_rnglists_process): Adjust.
11805 (dwarf2_ranges_process): Adjust.
11806 (dwarf2_ranges_read): Adjust.
11807 (dwarf2_get_pc_bounds): Adjust.
11808 (dwarf2_record_block_ranges): Adjust.
11809 (dwarf2_add_field): Adjust.
11810 (dwarf2_add_member_fn): Adjust.
11811 (read_structure_type): Adjust.
11812 (process_structure_scope): Adjust.
11813 (read_enumeration_type): Adjust.
11814 (read_array_type): Adjust.
11815 (mark_common_block_symbol_computed): Adjust.
11816 (read_common_block): Adjust.
11817 (read_namespace_type): Adjust.
11818 (read_namespace): Adjust.
11819 (read_module_type): Adjust.
11820 (read_tag_pointer_type): Adjust.
11821 (read_tag_ptr_to_member_type): Adjust.
11822 (read_tag_string_type): Adjust.
11823 (read_subroutine_type): Adjust.
11824 (read_typedef): Adjust.
11825 (read_base_type): Adjust.
11826 (attr_to_dynamic_prop): Adjust.
11827 (read_subrange_type): Adjust.
11828 (read_unspecified_type): Adjust.
11829 (dwarf2_read_abbrevs): Adjust.
11830 (load_partial_dies): Adjust.
11831 (read_partial_die): Adjust.
11832 (find_partial_die): Adjust.
11833 (guess_partial_die_structure_name): Adjust.
11834 (fixup_partial_die): Adjust.
11835 (read_attribute_value): Adjust.
11836 (read_addr_index): Adjust.
11837 (read_addr_index_from_leb128): Adjust.
11838 (read_str_index): Adjust.
11839 (dwarf2_string_attr): Adjust.
11840 (get_debug_line_section): Adjust.
11841 (dwarf_decode_line_header): Adjust.
11842 (lnp_state_machine::check_line_address): Adjust.
11843 (dwarf_decode_lines_1): Adjust.
11844 (dwarf_decode_lines): Adjust.
11845 (dwarf2_start_symtab): Adjust.
11846 (var_decode_location): Adjust.
11847 (new_symbol_full): Adjust.
11848 (dwarf2_const_value_data): Adjust.
11849 (dwarf2_const_value_attr): Adjust.
11850 (dwarf2_const_value): Adjust.
11851 (die_type): Adjust.
11852 (die_containing_type): Adjust.
11853 (build_error_marker_type): Adjust.
11854 (lookup_die_type): Adjust.
11855 (guess_full_die_structure_name): Adjust.
11856 (anonymous_struct_prefix): Adjust.
11857 (determine_prefix): Adjust.
11858 (dwarf2_name): Adjust.
11859 (follow_die_ref_or_sig): Adjust.
11860 (follow_die_offset): Adjust.
11861 (follow_die_ref): Adjust.
11862 (follow_die_sig_1): Adjust.
11863 (follow_die_sig): Adjust.
11864 (get_signatured_type): Adjust.
11865 (get_DW_AT_signature_type): Adjust.
11866 (decode_locdesc): Adjust.
11867 (dwarf_decode_macros): Adjust.
11868 (cu_debug_loc_section): Adjust.
11869 (fill_in_loclist_baton): Adjust.
11870 (dwarf2_symbol_mark_computed): Adjust.
11871 (init_one_comp_unit): Don't assign
11872 dwarf2_cu::dwarf2_per_objfile.
11873 (set_die_type): Adjust.
11874
ed2dc618
SM
118752018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11876
11877 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11878 <dwarf2_per_objfile>: New field.
11879 (dwarf2_per_objfile): Remove global.
11880 (get_dwarf2_per_objfile): New function.
11881 (set_dwarf2_per_objfile): New function.
11882 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11883 dwarf2_per_objfile.
11884 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11885 (read_abbrev_offset): Likewise.
11886 (read_indirect_string): Likewise.
11887 (read_indirect_line_string): Likewise.
11888 (read_indirect_string_at_offset): Likewise.
11889 (read_indirect_string_from_dwz): Likewise.
11890 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11891 dwarf2_per_objfile.
11892 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11893 (create_all_comp_units): Change objfile parameter to
11894 dwarf2_per_objfile.
11895 (create_all_type_units): Likewise.
11896 (process_queue): Add dwarf2_per_objfile parameter.
11897 (read_and_check_comp_unit_head): Likewise.
11898 (lookup_dwo_unit_in_dwp): Likewise.
11899 (get_dwp_file): Likewise.
11900 (process_cu_includes): Likewise.
11901 (struct free_dwo_file_cleanup_data): New struct.
11902 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11903 set_dwarf2_per_objfile.
11904 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11905 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11906 context, adjust calls.
11907 (dw2_instantiate_symtab): Likewise.
11908 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11909 (dw2_get_cu): Likewise.
11910 (create_cu_from_index_list): Change objfile parameter to
11911 dwarf2_per_objfile.
11912 (create_cus_from_index_list): Get dwarf2_per_objfile from
11913 context, adjust calls.
11914 (create_cus_from_index): Likewise.
11915 (create_signatured_type_table_from_index): Change objfile
11916 parameter to dwarf2_per_objfile.
11917 (create_signatured_type_table_from_debug_names): Change objfile
11918 parameter to dwarf2_per_objfile.
11919 (create_addrmap_from_index): Likewise.
11920 (create_addrmap_from_aranges): Likewise.
11921 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11922 (dw2_setup): Remove.
11923 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11924 context.
11925 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11926 get_dwarf2_per_objfile.
11927 (dw2_forget_cached_source_info): Likewise.
11928 (dw2_map_symtabs_matching_filename): Likewise.
11929 (struct dw2_symtab_iterator) <index>: Remove.
11930 <dwarf2_per_objfile>: New field.
11931 (dw2_symtab_iter_init): Replace index parameter with
11932 dwarf2_per_objfile.
11933 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11934 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11935 (dw2_print_stats): Likewise.
11936 (dw2_dump): Likewise.
11937 (dw2_expand_symtabs_for_function): Likewise.
11938 (dw2_expand_all_symtabs): Likewise.
11939 (dw2_expand_symtabs_with_fullname): Likewise.
11940 (dw2_expand_marked_cus): Replace index and objfile parameters
11941 with dwarf2_per_objfile.
11942 (dw_expand_symtabs_matching_file_matcher): Add
11943 dwarf2_per_objfile parameter and adjust calls.
11944 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11945 adjust calls.
11946 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11947 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11948 adjust calls.
11949 (create_cus_from_debug_names_list): Replace objfile parameter
11950 with dwarf2_per_objfile and adjust calls.
11951 (create_cus_from_debug_names): Likewise.
11952 (dwarf2_read_debug_names): Likewise.
11953 (mapped_debug_names::namei_to_name): Adjust call.
11954 (dw2_debug_names_iterator::next): Likewise.
11955 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11956 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11957 (dw2_debug_names_dump): Likewise.
11958 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11959 (dw2_debug_names_expand_symtabs_matching): Likewise.
11960 (dwarf2_initialize_objfile): Likewise.
11961 (dwarf2_build_psymtabs): Likewise.
11962 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11963 this_cu.
11964 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11965 (read_and_check_comp_unit_head): Likewise.
11966 (read_abbrev_offset): Likewise.
11967 (create_debug_type_hash_table): Likewise.
11968 (create_debug_types_hash_table): Likewise.
11969 (create_all_type_units): Replace objfile parameter with
11970 dwarf2_per_objfile.
11971 (add_type_unit): Add dwarf2_per_objfile parameter.
11972 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11973 with dwarf2_per_objfile.
11974 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11975 (lookup_dwp_signatured_type): Likewise.
11976 (lookup_signatured_type): Likewise.
11977 (read_cutu_die_from_dwo): Likewise.
11978 (init_tu_and_read_dwo_dies): Likewise.
11979 (init_cutu_and_read_dies): Likewise.
11980 (init_cutu_and_read_dies_no_follow): Likewise.
11981 (allocate_type_unit_groups_table): Add objfile parameter.
11982 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11983 (get_type_unit_group): Likewise.
11984 (process_psymtab_comp_unit): Update call.
11985 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11986 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11987 (print_tu_stats): Likewise.
11988 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11989 in void* parameter.
11990 (build_type_psymtabs): Change objfile parameter to
11991 dwarf2_per_objfile.
11992 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11993 passed in void* parameter.
11994 (process_skeletonless_type_units): Change objfile parameter to
11995 dwarf2_per_objfile.
11996 (set_partial_user): Likewise.
11997 (dwarf2_build_psymtabs_hard): Likewise.
11998 (read_comp_units_from_section): Likewise.
11999 (create_all_comp_units): Likewise.
12000 (scan_partial_symbols): Update calls.
12001 (add_partial_symbol): Likewise.
12002 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12003 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12004 (process_queue): Add dwarf2_per_objfile parameter.
12005 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12006 (compute_compunit_symtab_includes): Likewise.
12007 (process_cu_includes): Add dwarf2_per_objfile parameter.
12008 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12009 (process_full_type_unit): Likewise.
12010 (process_imported_unit_die): Update call.
12011 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12012 (read_file_scope): Likewise.
12013 (allocate_dwo_file_hash_table): Add objfile parameter.
12014 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12015 (create_cus_hash_table): Likewise.
12016 (create_dwp_hash_table): Likewise.
12017 (create_dwo_unit_in_dwp_v1): Likewise.
12018 (create_dwp_v2_section): Likewise.
12019 (create_dwo_unit_in_dwp_v2): Likewise.
12020 (lookup_dwo_unit_in_dwp): Likewise.
12021 (try_open_dwop_file): Likewise.
12022 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12023 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12024 cleanup to include a reference to dwarf2_per_objfile.
12025 (open_dwp_file): Add dwarf2_per_objfile parameter.
12026 (open_and_init_dwp_file): Likewise.
12027 (get_dwp_file): Likewise.
12028 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12029 (queue_and_load_all_dwo_tus): Update call.
12030 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12031 data.
12032 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12033 (dwarf2_ranges_process): Likewise.
12034 (dwarf2_get_pc_bounds): Likewise.
12035 (mark_common_block_symbol_computed): Likewise.
12036 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12037 (dwarf2_read_abbrevs): Update call.
12038 (read_partial_die): Use dwarf2_per_objfile from cu.
12039 (find_partial_die): Likewise.
12040 (fixup_partial_die): Likewise.
12041 (read_attribute_value): Likewise.
12042 (read_indirect_string_at_offset_from): Add objfile parameter.
12043 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12044 parameter.
12045 (read_indirect_string_from_dwz): Add objfile parameter.
12046 (read_indirect_string): Add objfile parameter.
12047 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12048 (read_addr_index): Use dwarf2_per_objfile from cu.
12049 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12050 call dw2_setup.
12051 (read_str_index): Use dwarf2_per_objfile from cu.
12052 (get_debug_line_section): Likewise.
12053 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12054 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12055 (new_symbol_full): Use dwarf2_per_objfile from cu.
12056 (build_error_marker_type): Likewise.
12057 (lookup_die_type): Likewise.
12058 (determine_prefix): Likewise.
12059 (follow_die_offset): Likewise.
12060 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12061 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12062 (dwarf2_fetch_die_type_sect_off): Likewise.
12063 (dwarf2_get_die_type): Likewise.
12064 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12065 (get_signatured_type): Likewise.
12066 (get_DW_AT_signature_type): Likewise.
12067 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12068 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12069 (cu_debug_loc_section): Likewise.
12070 (fill_in_loclist_baton): Likewise.
12071 (dwarf2_symbol_mark_computed): Likewise.
12072 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12073 dwarf2_per_objfile.
12074 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12075 parameter.
12076 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12077 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12078 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12079 (set_die_type): Use dwarf2_free_objfile from cu.
12080 (get_die_type_at_offset): Likewise.
12081 (dwarf2_per_objfile_free): Don't assign global variable.
12082 (debug_names) <constructor>: Add dwarf2_per_objfile
12083 parameter, update m_debugstrlookup construction.
12084 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12085 parameter.
12086 <m_dwarf2_per_objfile>: New field.
12087 <lookup>: Use m_dwarf2_per_objfile.
12088 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12089 (psyms_seen_size): Likewise.
12090 (write_gdbindex): Replace objfile parameter with
12091 dwarf2_per_objfile.
12092 (write_debug_names): Likewise.
12093 (write_psymtabs_to_index): Likewise.
12094 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12095 calls.
12096
e3b94546
SM
120972018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12098
12099 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12100 <dwarf2_per_objfile>: New field.
12101 (struct dwarf2_per_cu_data) <objfile>: Remove.
12102 <dwarf2_per_objfile>: New field.
12103 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12104 of objfile.
12105 (create_signatured_type_table_from_index): Likewise.
12106 (create_debug_type_hash_table): Likewise.
12107 (fill_in_sig_entry_from_dwo_entry): Likewise.
12108 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12109 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12110 objfile.
12111 (create_partial_symtab): Access objfile through
12112 dwarf2_per_objfile.
12113 (process_psymtab_comp_unit_reader): Likewise.
12114 (read_comp_units_from_section): Likewise.
12115 (scan_partial_symbols): Likewise.
12116 (add_partial_symbol): Likewise.
12117 (add_partial_subprogram): Likewise.
12118 (peek_die_abbrev): Likewise.
12119 (fixup_go_packaging): Likewise.
12120 (process_full_comp_unit): Likewise.
12121 (process_full_type_unit): Likewise.
12122 (process_imported_unit_die): Likewise.
12123 (dwarf2_compute_name): Likewise.
12124 (dwarf2_physname): Likewise.
12125 (read_import_statement): Likewise.
12126 (create_cus_hash_table): Assign dwarf2_physname instead of
12127 objfile.
12128 (read_func_scope): Access objfile through dwarf2_per_objfile.
12129 (read_lexical_block_scope): Likewise.
12130 (read_call_site_scope): Likewise.
12131 (read_variable): Likewise.
12132 (dwarf2_rnglists_process): Likewise.
12133 (dwarf2_ranges_process): Likewise.
12134 (dwarf2_ranges_read): Likewise.
12135 (dwarf2_record_block_ranges): Likewise.
12136 (dwarf2_add_field): Likewise.
12137 (dwarf2_add_member_fn): Likewise.
12138 (read_structure_type): Likewise.
12139 (process_structure_scope): Likewise.
12140 (read_enumeration_type): Likewise.
12141 (read_array_type): Likewise.
12142 (read_common_block): Likewise.
12143 (read_namespace_type): Likewise.
12144 (read_namespace): Likewise.
12145 (read_module_type): Likewise.
12146 (read_tag_pointer_type): Likewise.
12147 (read_tag_ptr_to_member_type): Likewise.
12148 (read_tag_string_type): Likewise.
12149 (read_subroutine_type): Likewise.
12150 (read_typedef): Likewise.
12151 (read_base_type): Likewise.
12152 (attr_to_dynamic_prop): Likewise.
12153 (read_subrange_type): Likewise.
12154 (read_unspecified_type): Likewise.
12155 (load_partial_dies): Likewise.
12156 (read_partial_die): Likewise.
12157 (find_partial_die): Likewise.
12158 (guess_partial_die_structure_name): Likewise.
12159 (fixup_partial_die): Likewise.
12160 (read_attribute_value): Likewise.
12161 (read_addr_index_from_leb128): Likewise.
12162 (dwarf2_read_addr_index): Likewise.
12163 (dwarf2_string_attr): Likewise.
12164 (lnp_state_machine::check_line_address): Likewise.
12165 (dwarf_decode_lines_1): Likewise.
12166 (dwarf_decode_lines): Likewise.
12167 (dwarf2_start_symtab): Likewise.
12168 (var_decode_location): Likewise.
12169 (new_symbol_full): Likewise.
12170 (dwarf2_const_value_data): Likewise.
12171 (dwarf2_const_value_attr): Likewise.
12172 (dwarf2_const_value): Likewise.
12173 (die_type): Likewise.
12174 (die_containing_type): Likewise.
12175 (lookup_die_type): Likewise.
12176 (guess_full_die_structure_name): Likewise.
12177 (anonymous_struct_prefix): Likewise.
12178 (dwarf2_name): Likewise.
12179 (follow_die_ref_or_sig): Likewise.
12180 (follow_die_offset): Likewise.
12181 (follow_die_ref): Likewise.
12182 (dwarf2_fetch_die_loc_sect_off): Likewise.
12183 (dwarf2_fetch_constant_bytes): Likewise.
12184 (dwarf2_fetch_die_type_sect_off): Likewise.
12185 (dwarf2_get_die_type): Likewise.
12186 (follow_die_sig): Likewise.
12187 (decode_locdesc): Likewise.
12188 (dwarf2_per_cu_objfile): Likewise.
12189 (dwarf2_per_cu_text_offset): Likewise.
12190 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12191 objfile.
12192 (set_die_type): Access objfile through
12193 dwarf2_per_objfile.
12194
b01ba14d
SM
121952018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12196
12197 * valprint.c (converted_character_d): Remove typedef.
12198 (DEF_VEC_O (converted_character_d)): Remove.
12199 (count_next_character): Use std::vector.
12200 (print_converted_chars_to_obstack): Likewise.
12201 (generic_printstr): Likewise.
12202
4d0fdd9b
SM
122032018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12204
12205 * xml-support.h (struct gdb_xml_value): Add constructor.
12206 <value>: Change type to unique_xmalloc_ptr.
12207 (gdb_xml_value_s): Remove typedef.
12208 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12209 (gdb_xml_element_start_handler): Change parameter type to
12210 std::vector.
12211 (xml_find_attribute): Likewise.
12212 * xml-support.c (xml_find_attribute): Change parameter type to
12213 std::vector and adjust.
12214 (gdb_xml_values_cleanup): Remove.
12215 (gdb_xml_parser::start_element): Adjust to std::vector.
12216 (xinclude_start_include): Change paraeter type to std::vector
12217 and adjust.
12218 * btrace.c (check_xml_btrace_version): Likewise.
12219 (parse_xml_btrace_block): Likewise.
12220 (parse_xml_btrace_pt_config_cpu): Likewise.
12221 (parse_xml_btrace_pt): Likewise.
12222 (parse_xml_btrace_conf_bts): Likewise.
12223 (parse_xml_btrace_conf_pt): Likewise.
12224 * memory-map.c (memory_map_start_memory): Likewise.
12225 (memory_map_start_property): Likewise.
12226 * osdata.c (osdata_start_osdata): Likewise.
12227 (osdata_start_item): Likewise.
12228 (osdata_start_column): Likewise.
12229 * remote.c (start_thread): Likewise.
12230 * solib-aix.c (library_list_start_library): Likewise.
12231 (library_list_start_list): Likewise.
12232 * solib-svr4.c (library_list_start_library): Likewise.
12233 (svr4_library_list_start_list): Likewise.
12234 * solib-target.c (library_list_start_segment): Likewise.
12235 (library_list_start_section): Likewise.
12236 (library_list_start_library): Likewise.
12237 (library_list_start_list): Likewise.
12238 * tracepoint.c (traceframe_info_start_memory): Likewise.
12239 (traceframe_info_start_tvar): Likewise.
12240 * xml-syscall.c (syscall_start_syscall): Likewise.
12241 * xml-tdesc.c (tdesc_start_target): Likewise.
12242 (tdesc_start_feature): Likewise.
12243 (tdesc_start_reg): Likewise.
12244 (tdesc_start_union): Likewise.
12245 (tdesc_start_struct): Likewise.
12246 (tdesc_start_flags): Likewise.
12247 (tdesc_start_enum): Likewise.
12248 (tdesc_start_field): Likewise.
12249 (tdesc_start_enum_value): Likewise.
12250 (tdesc_start_vector): Likewise.
12251
f979c73f
SM
122522018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12253
12254 * extension.h (struct xmethod_worker) <clone>: Remove.
12255 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12256 Remove.
12257 (python_xmethod_worker::clone): Remove.
12258 * valops.c (find_overload_match): Use std::move instead of
12259 clone.
12260
ba18742c
SM
122612018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12262
12263 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12264 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12265 <free_xmethod_worker_data>: Remove.
12266 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12267 <get_xmethod_arg_types>: Remove.
12268 <get_xmethod_result_type>: Remove.
12269 <invoke_xmethod>: Remove.
12270 * extension.c (new_xmethod_worker): Remove.
12271 (clone_xmethod_worker): Remove.
12272 (get_matching_xmethod_workers): Return void, pass std::vector by
12273 pointer.
12274 (get_xmethod_arg_types): Rename to...
12275 (xmethod_worker::get_arg_types): ... this, and adjust.
12276 (get_xmethod_result_type): Rename to...
12277 (xmethod_worker::get_result_type): ... this, and adjust.
12278 (invoke_xmethod): Remove.
12279 (free_xmethod_worker): Remove.
12280 (free_xmethod_worker_vec): Remove.
12281 * extension.h (enum ext_lang_rc): Move here from
12282 extension-priv.h.
12283 (struct xmethod_worker): Add constructor and destructor.
12284 <data>: Remove.
12285 <value>: Remove.
12286 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12287 virtual pure methods.
12288 <get_arg_types, get_result_type>: New methods.
12289 (xmethod_worker_ptr): Remove typedef.
12290 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12291 (xmethod_worker_vec): Remove typedef.
12292 (xmethod_worker_up): New typedef.
12293 (invoke_xmethod): Remove.
12294 (clone_xmethod_worker): Remove.
12295 (free_xmethod_worker): Remove.
12296 (free_xmethod_worker_vec): Remove.
12297 (get_xmethod_arg_types): Remove.
12298 (get_xmethod_result_type): Remove.
12299 * valops.c (find_method_list): Use std::vector, don't use
12300 intermediate vector.
12301 (value_find_oload_method_list): Use std::vector.
12302 (find_overload_match): Use std::vector.
12303 (find_oload_champ): Use std::vector.
12304 * value.c (value_free): Use operator delete.
12305 (value_of_xmethod): Rename to...
12306 (value_from_xmethod): ... this. Don't assign
12307 xmethod_worker::value, take rvalue-reference.
12308 (result_type_of_xmethod): Adjust.
12309 (call_xmethod): Adjust.
12310 * value.h: Include extension.h.
12311 (struct xmethod_worker): Don't forward-declare.
12312 (value_of_xmethod): Rename to...
12313 (value_from_xmethod): ... this, take rvalue-reference.
12314 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12315 (struct python_xmethod_worker): ... this, add constructor and
12316 destructor.
12317 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12318 (gdbpy_free_xmethod_worker_data): Rename to...
12319 (python_xmethod_worker::~python_xmethod_worker): ... this and
12320 adjust.
12321 (gdbpy_clone_xmethod_worker_data): Rename to...
12322 (python_xmethod_worker::clone): ... this and adjust.
12323 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12324 temporary vector.
12325 (gdbpy_get_xmethod_arg_types): Rename to...
12326 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12327 (gdbpy_get_xmethod_result_type): Rename to...
12328 (python_xmethod_worker::do_get_result_type): ... this and
12329 adjust.
12330 (gdbpy_invoke_xmethod): Rename to...
12331 (python_xmethod_worker::invoke): ... this and adjust.
12332 (new_python_xmethod_worker): Rename to...
12333 (python_xmethod_worker::python_xmethod_worker): ... this and
12334 adjust.
12335 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12336 Remove.
12337 (gdbpy_free_xmethod_worker_data): Remove.
12338 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12339 (gdbpy_get_xmethod_arg_types): Remove.
12340 (gdbpy_get_xmethod_result_type): Remove.
12341 (gdbpy_invoke_xmethod): Remove.
12342 * python/python.c (python_extension_ops): Remove obsolete
12343 callbacks.
12344
e379cee6
PA
123452018-01-05 Pedro Alves <palves@redhat.com>
12346
12347 PR gdb/18653
12348 * common/signals-state-save-restore.c
12349 (save_original_signals_state): New parameter 'quiet'. Warn if we
12350 find a custom handler preinstalled, instead of internal erroring.
12351 But only warn if !quiet.
12352 * common/signals-state-save-restore.h
12353 (save_original_signals_state): New parameter 'quiet'.
12354 * main.c (captured_main_1): Move save_original_signals_state call
12355 after option handling, and pass QUIET.
12356
a655456c
PA
123572018-01-05 Pedro Alves <palves@redhat.com>
12358
12359 * spu-tdep.c (spu_catch_start): Pass
12360 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12361
de63c46b
PA
123622018-01-05 Pedro Alves <palves@redhat.com>
12363
12364 PR gdb/22670
12365 * ada-lang.c (literal_symbol_name_matcher): New function.
12366 (ada_get_symbol_name_matcher): Use it for
12367 symbol_name_match_type::SEARCH_NAME.
12368 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12369 it down instead of assuming symbol_name_match_type::FULL.
12370 * block.h (block_lookup_symbol): New parameter 'match_type'.
12371 * c-valprint.c (print_unpacked_pointer): Use
12372 lookup_symbol_search_name instead of lookup_symbol.
12373 * compile/compile-object-load.c (get_out_value_type): Pass down
12374 symbol_name_match_type::SEARCH_NAME.
12375 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12376 symbol_name_match_type::FULL.
12377 * cp-support.c (cp_get_symbol_name_matcher): Handle
12378 symbol_name_match_type::SEARCH_NAME.
12379 * infrun.c (insert_exception_resume_breakpoint): Use
12380 lookup_symbol_search_name.
12381 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12382 * psymtab.c (maintenance_check_psymtabs): Use
12383 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12384 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12385 SYMBOL_SEARCH_NAME.
12386 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12387 if symbol_name_match_type::SEARCH_NAME.
12388 (lookup_symbol_in_language): Pass down
12389 symbol_name_match_type::FULL.
12390 (lookup_symbol_search_name): New.
12391 (lookup_language_this): Pass down
12392 symbol_name_match_type::SEARCH_NAME.
12393 (lookup_symbol_aux, lookup_local_symbol): New parameter
12394 'match_type'. Pass it down.
12395 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12396 (lookup_symbol_search_name): New declaration.
12397 (lookup_symbol_in_block): New 'match_type' parameter.
12398
f98fc17b
PA
123992018-01-05 Pedro Alves <palves@redhat.com>
12400
12401 PR gdb/22670
12402 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12403 ada_lookup_symbol.
12404 (ada_lookup_symbol): Reimplement in terms of
12405 ada_lookup_symbol_list, bits factored out from
12406 ada_lookup_encoded_symbol.
12407
342f8240
JB
124082018-01-05 Joel Brobecker <brobecker@adacore.com>
12409
12410 * ada-exp.y (write_object_renaming): When subscripting an array
12411 using a symbol as the index, pass the block in call to
12412 ada_lookup_encoded_symbol when looking that symbol up.
12413
7150d33c
JG
124142018-01-05 Jerome Guitton <guitton@adacore.com>
12415
12416 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12417 TYPE_INDEX_TYPE.
12418
cc0e770c
JB
124192018-01-05 Joel Brobecker <brobecker@adacore.com>
12420
12421 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12422 the case where VALUE_LVAL (val0) is not lval_memory.
12423
f79da888 124242018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
12425
12426 * ada-valprint.c (print_optional_low_bound): Handle
12427 character-indexed array printing like boolean-indexed array
12428 printing.
12429
cd385f94
JB
124302018-01-05 Joel Brobecker <brobecker@adacore.com>
12431
12432 * NEWS: Create a new section for the next release branch.
12433 Rename the section of the current branch, now that it has
12434 been cut.
12435
09aca949
JB
124362018-01-05 Joel Brobecker <brobecker@adacore.com>
12437
12438 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12439 * version.in: Bump version to 8.1.50.DATE-git.
12440
9f757bf7
XR
124412018-01-03 Xavier Roirand <roirand@adacore.com>
12442
12443 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12444 Add field.
12445 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12446 Add field.
12447 (default_exception_support_info) <catch_handlers_sym>: Add field.
12448 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12449 (ada_exception_name_addr_1): Add "catch handlers" handling.
12450 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12451 Update all callers.
12452 (create_excep_cond_exprs) <ex>: Add parameter.
12453 (re_set_exception): Update create_excep_cond_exprs call.
12454 (print_it_exception, print_one_exception, print_mention_exception)
12455 (print_recreate_exception): Add "catch handler" handling.
12456 (allocate_location_catch_handlers, re_set_catch_handlers)
12457 (check_status_catch_handlers, print_it_catch_handlers)
12458 (print_one_catch_handlers, print_mention_catch_handlers)
12459 (print_recreate_catch_handlers): New function.
12460 (catch_handlers_breakpoint_ops): New variable.
12461 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12462 Add parameter. Add "catch handler" handling.
12463 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12464 Add "catch handler" handling.
12465 (ada_exception_catchpoint_cond_string): Add "catch handler"
12466 handling.
12467 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12468 call.
12469 (catch_ada_handlers_command): New function.
12470 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12471 operations structure.
12472 (_initialize_ada_language): Add "catch handlers" command entry.
12473 * NEWS: Document "catch handlers" feature.
12474
9fe561ab
JB
124752018-01-02 Joel Brobecker <brobecker@adacore.com>
12476
12477 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12478 account when creating the array type of the slice.
12479 (ada_value_slice): Likewise.
12480
a405673c
JB
124812018-01-02 Joel Brobecker <brobecker@adacore.com>
12482
12483 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12484 New enum value.
12485 (create_array_type_with_stride): Add byte_stride_prop parameter.
12486 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12487 New parameter. Update all callers in this file.
12488 (array_type_has_dynamic_stride): New function.
12489 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12490 of arrays with dynamic byte strides.
12491 * dwarf2read.c (read_array_type): Add support for dynamic
12492 DW_AT_byte_stride attributes.
12493
74a2f8ff
JB
124942018-01-02 Joel Brobecker <brobecker@adacore.com>
12495
12496 * dwarf2read.c (read_unspecified_type): Treat
12497 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12498
e2882c85
JB
124992018-01-01 Joel Brobecker <brobecker@adacore.com>
12500
12501 Update copyright year range in all GDB files.
12502
1690bb24
JB
125032018-01-01 Joel Brobecker <brobecker@adacore.com>
12504
12505 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12506 and gdb/testsuite/gdb.base/step-line.c.
12507
0f0c98a8
JB
125082018-01-01 Joel Brobecker <brobecker@adacore.com>
12509
12510 * copyright.py (main): Dump the contents of
12511 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12512 even if BY_HAND is empty.
12513
82e1e79a
JB
125142018-01-01 Joel Brobecker <brobecker@adacore.com>
12515
12516 * top.c (print_gdb_version): Update Copyright year in version
12517 message.
12518
053f54e5 125192018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 12520
053f54e5 12521 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 12522
053f54e5 12523For older changes see ChangeLog-2017.
c906108c
SS
12524\f
12525Local Variables:
12526mode: change-log
12527left-margin: 8
12528fill-column: 74
12529version-control: never
57da7796 12530coding: utf-8
c906108c 12531End:
This page took 2.973584 seconds and 4 git commands to generate.