[gdb/exp] Handle DW_OP_GNU_variable_value refs to abstract dies
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-05 Tom de Vries <tdevries@suse.de>
2
3 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4 with resolve_abstract_p == true.
5 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
6 defaulting to false. Propagate resolve_abstract_p to
7 dwarf2_fetch_die_loc_sect_off.
8 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
9 parameter, defaulting to false.
10 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
11 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
12 parameter.
13 * dwarf2read.h (struct die_info): Forward-declare.
14 (die_info_ptr): New typedef.
15 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
16
17 2018-09-05 Joel Brobecker <brobecker@adacore.com>
18
19 GDB 8.2 released.
20
21 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
22 Pedro Alves <palves@redhat.com>
23
24 * gnulib/Makefile.in (aclocal_m4_deps): Move to
25 "aclocal-m4-deps.mk". Include file here.
26 $(srcdir)/aclocal.m4: Add "configure.ac".
27 * gnulib/aclocal-m4-deps.mk: New file.
28 * gnulib/update-gnulib.sh: Automatically update
29 "aclocal-m4-deps.mk".
30
31 2018-09-04 Tom Tromey <tom@tromey.com>
32
33 * configure: Rebuild.
34 * configure.ac: Remove multi-ice code.
35
36 2018-09-04 Tom Tromey <tom@tromey.com>
37
38 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
39 (ada-exp.o): Update.
40
41 2018-09-04 Tom Tromey <tom@tromey.com>
42
43 * Makefile.in (printcmd.o, target-float.o): Remove.
44 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
45
46 2018-09-04 Tom Tromey <tom@tromey.com>
47
48 * gnulib/Makefile.in: Remove obsolete comment.
49 * Makefile.in: Remove obsolete comment.
50
51 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
52
53 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
54 line with '+'.
55
56 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
57
58 * riscv-tdep.c: Add 'prologue-value.h' include.
59 (struct riscv_unwind_cache): New struct.
60 (riscv_debug_unwinder): New global.
61 (riscv_scan_prologue): Update arguments, capture register details
62 from prologue scan.
63 (riscv_skip_prologue): Reformat arguments line, move end of
64 prologue calculation into riscv_scan_prologue.
65 (riscv_frame_cache): Update return type, create
66 riscv_unwind_cache, scan the prologue, and fill in remaining cache
67 details.
68 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
69 (riscv_frame_prev_register): Use the trad_frame within the
70 riscv_unwind_cache.
71 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
72 flag.
73
74 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
75
76 * trad-frame.h (trad_frame_set_realreg): Declare.
77 (trad_frame_set_addr): Declare.
78 * trad-frame.c (trad_frame_set_realreg): Define new function.
79 (trad_frame_set_addr): Define new function.
80 (trad_frame_set_reg_realreg): Use new function.
81 (trad_frame_set_reg_addr): Use new function.
82
83 2018-09-01 Keith Seitz <keiths@redhat.com>
84
85 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
86 pulongest instead of "%lld".
87 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
88 ATTRIBUTE_UNUSED.
89
90 2018-08-31 Tom Tromey <tom@tromey.com>
91
92 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
93 variant part type.
94
95 2018-08-31 Pedro Alves <palves@redhat.com>
96
97 * gdbarch.h: Regenerate.
98
99 2018-08-31 Pedro Alves <palves@redhat.com>
100
101 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
102 * target.h (Hardware watchpoint interfaces): Describe
103 continuable/steppable/non-steppable watchpoints.
104 * gdbarch.h, gdbarch.c: Regenerate.
105
106 2018-08-31 Pedro Alves <palves@redhat.com>
107
108 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
109 Delete.
110 * s390-linux-nat.c
111 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
112 * target.h (target_ops::have_continuable_watchpoint): Delete.
113 (target_have_continuable_watchpoint): Delete.
114 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
115 * target-delegates.c: Regenerate.
116
117 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
118
119 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
120 the files present in "gnulib/import/m4/".
121
122 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
123
124 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
125 c.sw, c.swsp, and c.sdsp.
126
127 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
128
129 * riscv-tdep.c (struct riscv_inferior_data): Delete.
130 (riscv_read_misa_reg): Don't cache value read into inferior data.
131 (riscv_new_inferior_data): Delete.
132 (riscv_inferior_data_cleanup): Delete.
133 (riscv_inferior_data): Delete.
134 (riscv_invalidate_inferior_data): Delete.
135 (_initialize_riscv_tdep): Remove initialisation of inferior data.
136
137 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
138
139 * compile/compile-cplus-types.c
140 (compile_cplus_instance::leave_scope): Take the address of scope
141 object.
142 (compile_cplus_instance::convert_qualified_base): Compare quals
143 to 0.
144
145 2018-08-30 Keith Seitz <keiths@redhat.com>
146
147 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
148 Use "%s" and host_address_to_string instead of "%p" in printf.
149
150 2018-08-29 Keith Seitz <keiths@redhat.com>
151
152 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
153 and compile-cplus-types.c.
154 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
155 * c-lang.c (cplus_language_defn): Set C++ compile functions.
156 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
157 Declare.
158 * compile/compile-c-support.c: Include compile-cplus.h.
159 (load_libcompile): Templatize.
160 (get_compile_context): "New" function.
161 (c_get_compile_context): Use get_compile_context.
162 (cplus_get_compile_context): New function.
163 (cplus_push_user_expression, cplus_pop_user_expression)
164 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
165 (cplus_compute_program): Define new structs/functions.
166 * compile/compile-cplus-symmbols.c: New file.
167 * compile/compile-cplus-types.c: New file.
168 * compile/compile-cplus.h: New file.
169 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
170 Declare.
171 * compile/compile-object-load.c (get_out_value_type): Use
172 strncmp_iw when comparing symbol names.
173 (compile_object_load): Add mst_bss and mst_data.
174 * compile/compile.c (_initialize_compile): Remove
175 -Wno-implicit-function-declaration from `compile_args'.
176 * compile/gcc-cp-plugin.h: New file.
177 * NEWS: Mention C++ compile support and new debug options.
178
179 2018-08-29 Keith Seitz <keiths@redhat.com>
180
181 * linespec.c (collect_info::add_symbol): Make virtual.
182 (struct symbol_searcher_collect_info): New struct.
183 (symbol_searcher::find_all_symbols): New method.
184 * symtab.h (class symbol_searcher): New class.
185
186 2018-08-29 Keith Seitz <keiths@redhat.com>
187
188 * linespec.c (struct linespec) <function_symbols, label_symbols>:
189 Change to vector of block_symbol. Update all users.
190 (struct collect_info) <symbols>: Likewise.
191 (collect_info::add_symbol): Take block_symbol as argument.
192 Update all callers.
193 (decode_compound_collector) <m_symbols>: Change type to vector
194 of block_symbol. Update all users.
195 (decode_compound_collector::operator ()): Change parameter type
196 to block_symbol.
197 (find_method, find_function_symbols, find_linespec_symbols)
198 (find_label_symbols_in_block, find_label_symbols): Change symbol
199 vectors to block_symbol vectors.
200 * symtab.h (symbol_found_callback_ftype): Change parameter type to
201 block_symbol.
202
203 2018-08-29 Keith Seitz <keiths@redhat.com>
204
205 * linespec.c (symbolp): Remove typedef and VEC definitions.
206 (bound_minimal_symbol_d): Likewise.
207
208 2018-08-29 Keith Seitz <keiths@redhat.com>
209
210 * linespec.c (decode_compound_collector::decode_compound_collector):
211 Remove initialization for `m_symtabs'.
212 (decode_compound_collector::release_symbols): Change return type
213 to std::vector. Update all callers.
214 (class decode_compound_collector) <m_symbols>: Change type to
215 std::vector.
216 (lookup_prefix_sym): Change return type to std::vector. Update all
217 callers.
218 (compare_symbols): Remove.
219 (std_compare_symbols): Rename to `compare_symbols'.
220 (find_method): Change `sym_classes' parameter to std::vector.
221 Update all callers. Use std::sort to sort sym_classes.
222 (find_linespec_symbols): Remove cleanup.
223
224 2018-08-29 Keith Seitz <keiths@redhat.com>
225
226 * linespec.c (struct linespec) <minimal_symbols>: Change type to
227 std::vector. Update all users.
228 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
229 (struct collect_info) <minimal_symbols>: Likewise.
230 (compare_msymbols): Return bool. Change parameters to const
231 bound_minimal_symbol references.
232 (find_method, find_function_symbols, find_linespec_symbols): Change
233 `minsyms' parameter to std::vector. Update all callers.
234
235 2018-08-29 Keith Seitz <keiths@redhat.com>
236
237 * linespec.c (struct linespec) <label_symbols>: Change type to
238 std::vector. Update all users.
239 (find_label_symbols_in_block): Change `result' parameter to
240 std::vector. Update all callers.
241 (find_label_symbols): Return std::vector. Update all callers.
242
243 2018-08-29 Keith Seitz <keiths@redhat.com>
244
245 * linespec.c (struct linespec) <function_symbols>: Change type to
246 std::vector. Update all users.
247 (struct collect_info) <function_symbols>: Likewise.
248 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
249 (std_compare_symbols): New function.
250 (find_method, find_function_symbols, find_linespec_symbols)
251 (find_label_symbols_in_block): Change `symbols' parameter to
252 std::vector. Update all callers.
253 (find_label_symbols): Likewise for `function_symbols' and
254 `label_funcs_ret'.
255
256 2018-08-29 Keith Seitz <keiths@redhat.com>
257
258 * linespec.c (symtab_vector_up): Define.
259 (struct linespec) <file_symtabs>: Change type to std::vector *.
260 Update all uses.
261 (struct collect_info) <file_symtabs>: Likewise.
262 (collect_symtabs_from_filename): Return symtab_vector_up.
263 Update all callers.
264 (decode_objc): Remove cleanup.
265 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
266 (symtab_collector::release_symtabs): Return symtab_vector_up.
267 Update all callers.
268 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
269 Update all users.
270 (collect_symtabs_from_filename, symtabs_from_filename): Return
271 symtab_vector_up. Update all callers.
272
273 2018-08-29 Tom Tromey <tom@tromey.com>
274
275 * csky-tdep.c (csky_analyze_prologue): Use
276 core_addr_to_string_nz.
277
278 2018-08-29 Tom Tromey <tom@tromey.com>
279
280 * windows-nat.c (struct xlate_exception) <them>: Change type to
281 DWORD.
282 (xlate): Fix formatting. Remove last entry.
283 (struct xlate_exception, xlate): Comment out.
284 (windows_nat_target::resume): Use ranged for.
285
286 2018-08-29 Jim Wilson <jimw@sifive.com>
287
288 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
289 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
290 of NT_PRFPREG.
291 (riscv_linux_nat_target::store_registers): Likewise.
292
293 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
294
295 PR gdb/23555
296 PR gdb/23558
297 * gnulib/aclocal.m4: Regenerate.
298 * gnulib/config.in: Regenerate.
299 * gnulib/configure: Regenerate.
300 * gnulib/import/Makefile.am: Update.
301 * gnulib/import/Makefile.in: Update.
302 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
303 * gnulib/import/_Noreturn.h: ... this.
304 * gnulib/import/alloca.in.h: Update.
305 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
306 * gnulib/import/arg-nonnull.h: ... this.
307 * gnulib/import/assure.h: Update.
308 * gnulib/import/at-func.c: Update.
309 * gnulib/import/basename-lgpl.c: Update.
310 * gnulib/import/extra/snippet/c++defs.h: Rename to...
311 * gnulib/import/c++defs.h: ... this.
312 * gnulib/import/canonicalize-lgpl.c: Update.
313 * gnulib/import/cdefs.h: Update.
314 * gnulib/import/chdir-long.c: Update.
315 * gnulib/import/chdir-long.h: Update.
316 * gnulib/import/cloexec.c: Update.
317 * gnulib/import/cloexec.h: Update.
318 * gnulib/import/close.c: Update.
319 * gnulib/import/closedir.c: Update.
320 * gnulib/import/config.charset: Update.
321 * gnulib/import/dirent-private.h: Update.
322 * gnulib/import/dirent.in.h: Update.
323 * gnulib/import/dirfd.c: Update.
324 * gnulib/import/dirname-lgpl.c: Update.
325 * gnulib/import/dirname.h: Update.
326 * gnulib/import/dosname.h: Update.
327 * gnulib/import/dup-safer-flag.c: Update.
328 * gnulib/import/dup-safer.c: Update.
329 * gnulib/import/dup.c: Update.
330 * gnulib/import/dup2.c: Update.
331 * gnulib/import/errno.in.h: Update.
332 * gnulib/import/error.c: Update.
333 * gnulib/import/error.h: Update.
334 * gnulib/import/exitfail.c: Update.
335 * gnulib/import/exitfail.h: Update.
336 * gnulib/import/extra/update-copyright: Update.
337 * gnulib/import/fchdir.c: Update.
338 * gnulib/import/fcntl.c: Update.
339 * gnulib/import/fcntl.in.h: Update.
340 * gnulib/import/fd-hook.c: Update.
341 * gnulib/import/fd-hook.h: Update.
342 * gnulib/import/fd-safer-flag.c: Update.
343 * gnulib/import/fd-safer.c: Update.
344 * gnulib/import/fdopendir.c: Update.
345 * gnulib/import/filename.h: Update.
346 * gnulib/import/filenamecat-lgpl.c: Update.
347 * gnulib/import/filenamecat.h: Update.
348 * gnulib/import/flexmember.h: Update.
349 * gnulib/import/float+.h: Update.
350 * gnulib/import/float.c: Update.
351 * gnulib/import/float.in.h: Update.
352 * gnulib/import/fnmatch.c: Update.
353 * gnulib/import/fnmatch.in.h: Update.
354 * gnulib/import/fnmatch_loop.c: Update.
355 * gnulib/import/fpucw.h: Update.
356 * gnulib/import/frexp.c: Update.
357 * gnulib/import/frexpl.c: Update.
358 * gnulib/import/fstat.c: Update.
359 * gnulib/import/fstatat.c: Update.
360 * gnulib/import/getcwd-lgpl.c: Update.
361 * gnulib/import/getcwd.c: Update.
362 * gnulib/import/getdtablesize.c: Update.
363 * gnulib/import/getlogin_r.c: Update.
364 * gnulib/import/getprogname.c: Update.
365 * gnulib/import/getprogname.h: Update.
366 * gnulib/import/gettext.h: Update.
367 * gnulib/import/gettimeofday.c: Update.
368 * gnulib/import/glob-libc.h: Update.
369 * gnulib/import/glob.c: Update.
370 * gnulib/import/glob.in.h: Update.
371 * gnulib/import/glob_internal.h: Update.
372 * gnulib/import/glob_pattern_p.c: Update.
373 * gnulib/import/globfree.c: Update.
374 * gnulib/import/hard-locale.c: Update.
375 * gnulib/import/hard-locale.h: Update.
376 * gnulib/import/intprops.h: Update.
377 * gnulib/import/inttypes.in.h: Update.
378 * gnulib/import/isnan.c: Update.
379 * gnulib/import/isnand-nolibm.h: Update.
380 * gnulib/import/isnand.c: Update.
381 * gnulib/import/isnanl-nolibm.h: Update.
382 * gnulib/import/isnanl.c: Update.
383 * gnulib/import/itold.c: Update.
384 * gnulib/import/libc-config.h: Update.
385 * gnulib/import/limits.in.h: Update.
386 * gnulib/import/localcharset.c: Update.
387 * gnulib/import/localcharset.h: Update.
388 * gnulib/import/localtime-buffer.c: Update.
389 * gnulib/import/localtime-buffer.h: Update.
390 * gnulib/import/lstat.c: Update.
391 * gnulib/import/m4/00gnulib.m4: Update.
392 * gnulib/import/m4/__inline.m4: Update.
393 * gnulib/import/m4/absolute-header.m4: Update.
394 * gnulib/import/m4/alloca.m4: Update.
395 * gnulib/import/m4/builtin-expect.m4: Update.
396 * gnulib/import/m4/canonicalize.m4: Update.
397 * gnulib/import/m4/chdir-long.m4: Update.
398 * gnulib/import/m4/close.m4: Update.
399 * gnulib/import/m4/closedir.m4: Update.
400 * gnulib/import/m4/configmake.m4: Update.
401 * gnulib/import/m4/d-ino.m4: Update.
402 * gnulib/import/m4/d-type.m4: Update.
403 * gnulib/import/m4/dirent_h.m4: Update.
404 * gnulib/import/m4/dirfd.m4: Update.
405 * gnulib/import/m4/dirname.m4: Update.
406 * gnulib/import/m4/double-slash-root.m4: Update.
407 * gnulib/import/m4/dup.m4: Update.
408 * gnulib/import/m4/dup2.m4: Update.
409 * gnulib/import/m4/eealloc.m4: Update.
410 * gnulib/import/m4/environ.m4: Update.
411 * gnulib/import/m4/errno_h.m4: Update.
412 * gnulib/import/m4/error.m4: Update.
413 * gnulib/import/m4/exponentd.m4: Update.
414 * gnulib/import/m4/exponentl.m4: Update.
415 * gnulib/import/m4/extensions.m4: Update.
416 * gnulib/import/m4/extern-inline.m4: Update.
417 * gnulib/import/m4/fchdir.m4: Update.
418 * gnulib/import/m4/fcntl-o.m4: Update.
419 * gnulib/import/m4/fcntl.m4: Update.
420 * gnulib/import/m4/fcntl_h.m4: Update.
421 * gnulib/import/m4/fdopendir.m4: Update.
422 * gnulib/import/m4/filenamecat.m4: Update.
423 * gnulib/import/m4/flexmember.m4: Update.
424 * gnulib/import/m4/float_h.m4: Update.
425 * gnulib/import/m4/fnmatch.m4: Update.
426 * gnulib/import/m4/fnmatch_h.m4: Update.
427 * gnulib/import/m4/fpieee.m4: Update.
428 * gnulib/import/m4/frexp.m4: Update.
429 * gnulib/import/m4/frexpl.m4: Update.
430 * gnulib/import/m4/fstat.m4: Update.
431 * gnulib/import/m4/fstatat.m4: Update.
432 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
433 * gnulib/import/m4/getcwd-path-max.m4: Update.
434 * gnulib/import/m4/getcwd.m4: Update.
435 * gnulib/import/m4/getdtablesize.m4: Update.
436 * gnulib/import/m4/getlogin.m4: Update.
437 * gnulib/import/m4/getlogin_r.m4: Update.
438 * gnulib/import/m4/getpagesize.m4: Update.
439 * gnulib/import/m4/getprogname.m4: Update.
440 * gnulib/import/m4/gettimeofday.m4: Update.
441 * gnulib/import/m4/glibc21.m4: Update.
442 * gnulib/import/m4/glob.m4: Update.
443 * gnulib/import/m4/glob_h.m4: Update.
444 * gnulib/import/m4/gnulib-cache.m4: Update.
445 * gnulib/import/m4/gnulib-common.m4: Update.
446 * gnulib/import/m4/gnulib-comp.m4: Update.
447 * gnulib/import/m4/gnulib-tool.m4: Update.
448 * gnulib/import/m4/hard-locale.m4: Update.
449 * gnulib/import/m4/include_next.m4: Update.
450 * gnulib/import/m4/inttypes-pri.m4: Update.
451 * gnulib/import/m4/inttypes.m4: Update.
452 * gnulib/import/m4/isnand.m4: Update.
453 * gnulib/import/m4/isnanl.m4: Update.
454 * gnulib/import/m4/largefile.m4: Update.
455 * gnulib/import/m4/limits-h.m4: Update.
456 * gnulib/import/m4/localcharset.m4: Update.
457 * gnulib/import/m4/locale-fr.m4: Update.
458 * gnulib/import/m4/locale-ja.m4: Update.
459 * gnulib/import/m4/locale-zh.m4: Update.
460 * gnulib/import/m4/localtime-buffer.m4: Update.
461 * gnulib/import/m4/longlong.m4: Update.
462 * gnulib/import/m4/lstat.m4: Update.
463 * gnulib/import/m4/malloc.m4: Update.
464 * gnulib/import/m4/malloca.m4: Update.
465 * gnulib/import/m4/math_h.m4: Update.
466 * gnulib/import/m4/mbrtowc.m4: Update.
467 * gnulib/import/m4/mbsinit.m4: Update.
468 * gnulib/import/m4/mbsrtowcs.m4: Update.
469 * gnulib/import/m4/mbstate_t.m4: Update.
470 * gnulib/import/m4/memchr.m4: Update.
471 * gnulib/import/m4/memmem.m4: Update.
472 * gnulib/import/m4/mempcpy.m4: Update.
473 * gnulib/import/m4/memrchr.m4: Update.
474 * gnulib/import/m4/mkdir.m4: Update.
475 * gnulib/import/m4/mkstemp.m4: Update.
476 * gnulib/import/m4/mmap-anon.m4: Update.
477 * gnulib/import/m4/mode_t.m4: Update.
478 * gnulib/import/m4/msvc-inval.m4: Update.
479 * gnulib/import/m4/msvc-nothrow.m4: Update.
480 * gnulib/import/m4/multiarch.m4: Update.
481 * gnulib/import/m4/nocrash.m4: Update.
482 * gnulib/import/m4/off_t.m4: Update.
483 * gnulib/import/m4/onceonly.m4: Update.
484 * gnulib/import/m4/open-cloexec.m4: Update.
485 * gnulib/import/m4/open.m4: Update.
486 * gnulib/import/m4/openat.m4: Update.
487 * gnulib/import/m4/opendir.m4: Update.
488 * gnulib/import/m4/pathmax.m4: Update.
489 * gnulib/import/m4/rawmemchr.m4: Update.
490 * gnulib/import/m4/readdir.m4: Update.
491 * gnulib/import/m4/readlink.m4: Update.
492 * gnulib/import/m4/realloc.m4: Update.
493 * gnulib/import/m4/rename.m4: Update.
494 * gnulib/import/m4/rewinddir.m4: Update.
495 * gnulib/import/m4/rmdir.m4: Update.
496 * gnulib/import/m4/save-cwd.m4: Update.
497 * gnulib/import/m4/secure_getenv.m4: Update.
498 * gnulib/import/m4/setenv.m4: Update.
499 * gnulib/import/m4/signal_h.m4: Update.
500 * gnulib/import/m4/ssize_t.m4: Update.
501 * gnulib/import/m4/stat-time.m4: Update.
502 * gnulib/import/m4/stat.m4: Update.
503 * gnulib/import/m4/std-gnu11.m4: Update.
504 * gnulib/import/m4/stdbool.m4: Update.
505 * gnulib/import/m4/stddef_h.m4: Update.
506 * gnulib/import/m4/stdint.m4: Update.
507 * gnulib/import/m4/stdio_h.m4: Update.
508 * gnulib/import/m4/stdlib_h.m4: Update.
509 * gnulib/import/m4/strchrnul.m4: Update.
510 * gnulib/import/m4/strdup.m4: Update.
511 * gnulib/import/m4/strerror.m4: Update.
512 * gnulib/import/m4/string_h.m4: Update.
513 * gnulib/import/m4/strstr.m4: Update.
514 * gnulib/import/m4/strtok_r.m4: Update.
515 * gnulib/import/m4/sys_socket_h.m4: Update.
516 * gnulib/import/m4/sys_stat_h.m4: Update.
517 * gnulib/import/m4/sys_time_h.m4: Update.
518 * gnulib/import/m4/sys_types_h.m4: Update.
519 * gnulib/import/m4/tempname.m4: Update.
520 * gnulib/import/m4/time_h.m4: Update.
521 * gnulib/import/m4/unistd-safer.m4: Update.
522 * gnulib/import/m4/unistd_h.m4: Update.
523 * gnulib/import/m4/warn-on-use.m4: Update.
524 * gnulib/import/m4/wchar_h.m4: Update.
525 * gnulib/import/m4/wchar_t.m4: Update.
526 * gnulib/import/m4/wctype_h.m4: Update.
527 * gnulib/import/m4/wint_t.m4: Update.
528 * gnulib/import/malloc.c: Update.
529 * gnulib/import/malloc/scratch_buffer.h: Update.
530 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
531 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
532 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
533 * gnulib/import/malloca.c: Update.
534 * gnulib/import/malloca.h: Update.
535 * gnulib/import/malloca.valgrind: Update.
536 * gnulib/import/math.in.h: Update.
537 * gnulib/import/mbrtowc.c: Update.
538 * gnulib/import/mbsinit.c: Update.
539 * gnulib/import/mbsrtowcs-impl.h: Update.
540 * gnulib/import/mbsrtowcs-state.c: Update.
541 * gnulib/import/mbsrtowcs.c: Update.
542 * gnulib/import/memchr.c: Update.
543 * gnulib/import/memmem.c: Update.
544 * gnulib/import/mempcpy.c: Update.
545 * gnulib/import/memrchr.c: Update.
546 * gnulib/import/mkdir.c: Update.
547 * gnulib/import/mkstemp.c: Update.
548 * gnulib/import/msvc-inval.c: Update.
549 * gnulib/import/msvc-inval.h: Update.
550 * gnulib/import/msvc-nothrow.c: Update.
551 * gnulib/import/msvc-nothrow.h: Update.
552 * gnulib/import/open.c: Update.
553 * gnulib/import/openat-die.c: Update.
554 * gnulib/import/openat-priv.h: Update.
555 * gnulib/import/openat-proc.c: Update.
556 * gnulib/import/openat.c: Update.
557 * gnulib/import/openat.h: Update.
558 * gnulib/import/opendir.c: Update.
559 * gnulib/import/pathmax.h: Update.
560 * gnulib/import/pipe-safer.c: Update.
561 * gnulib/import/rawmemchr.c: Update.
562 * gnulib/import/readdir.c: Update.
563 * gnulib/import/readlink.c: Update.
564 * gnulib/import/realloc.c: Update.
565 * gnulib/import/ref-add.sin: Update.
566 * gnulib/import/ref-del.sin: Update.
567 * gnulib/import/rename.c: Update.
568 * gnulib/import/rewinddir.c: Update.
569 * gnulib/import/rmdir.c: Update.
570 * gnulib/import/same-inode.h: Update.
571 * gnulib/import/save-cwd.c: Update.
572 * gnulib/import/save-cwd.h: Update.
573 * gnulib/import/scratch_buffer.h: Update.
574 * gnulib/import/secure_getenv.c: Update.
575 * gnulib/import/setenv.c: Update.
576 * gnulib/import/signal.in.h: Update.
577 * gnulib/import/stat-time.c: Update.
578 * gnulib/import/stat-time.h: Update.
579 * gnulib/import/stat-w32.c: Update.
580 * gnulib/import/stat-w32.h: Update.
581 * gnulib/import/stat.c: Update.
582 * gnulib/import/stdbool.in.h: Update.
583 * gnulib/import/stddef.in.h: Update.
584 * gnulib/import/stdint.in.h: Update.
585 * gnulib/import/stdio.in.h: Update.
586 * gnulib/import/stdlib.in.h: Update.
587 * gnulib/import/str-two-way.h: Update.
588 * gnulib/import/strchrnul.c: Update.
589 * gnulib/import/strdup.c: Update.
590 * gnulib/import/streq.h: Update.
591 * gnulib/import/strerror-override.c: Update.
592 * gnulib/import/strerror-override.h: Update.
593 * gnulib/import/strerror.c: Update.
594 * gnulib/import/string.in.h: Update.
595 * gnulib/import/stripslash.c: Update.
596 * gnulib/import/strnlen1.c: Update.
597 * gnulib/import/strnlen1.h: Update.
598 * gnulib/import/strstr.c: Update.
599 * gnulib/import/strtok_r.c: Update.
600 * gnulib/import/sys_stat.in.h: Update.
601 * gnulib/import/sys_time.in.h: Update.
602 * gnulib/import/sys_types.in.h: Update.
603 * gnulib/import/tempname.c: Update.
604 * gnulib/import/tempname.h: Update.
605 * gnulib/import/time.in.h: Update.
606 * gnulib/import/unistd--.h: Update.
607 * gnulib/import/unistd-safer.h: Update.
608 * gnulib/import/unistd.in.h: Update.
609 * gnulib/import/unsetenv.c: Update.
610 * gnulib/import/verify.h: Update.
611 * gnulib/import/extra/snippet/warn-on-use.h: Update.
612 * gnulib/import/wchar.in.h: Update.
613 * gnulib/import/wctype.in.h: Update.
614 * gnulib/import/xalloc-oversized.h: Update.
615 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
616 "53e2c179f26a890fa6685af4b6c1397ee370433b".
617
618 2018-08-16 Gary Benson <gbenson@redhat.com>
619
620 PR gdb/13000:
621 * gdb/main.c (captured_main_1): Exit with nonzero status
622 in batch mode if the last command to be executed failed.
623 * NEWS: Mention the above.
624
625 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
626
627 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
628 end of warning message.
629
630 2018-08-29 Alan Hayward <alan.hayward@arm.com>
631
632 PR gdb/22943:
633 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
634 (aarch64_extract_return_value): Use
635 aapcs_is_vfp_call_or_return_candidate.
636 (aarch64_return_in_memory): Likewise.
637 (aarch64_store_return_value): Likewise.
638
639 2018-08-29 Alan Hayward <alan.hayward@arm.com>
640
641 * aarch64-tdep.c
642 (aapcs_is_vfp_call_or_return_candidate): Make static
643 (pass_in_v_or_stack): Remove function.
644 (pass_in_v_vfp_candidate): New function.
645 (aarch64_push_dummy_call): Check for float register candidates.
646
647 2018-08-29 Alan Hayward <alan.hayward@arm.com>
648
649 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
650 (aapcs_is_vfp_call_or_return_candidate_1): New function.
651 (aapcs_is_vfp_call_or_return_candidate): Likewise.
652
653 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
654
655 PR build/23399
656 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
657 (struct ipa_sym_addresses): Rename to...
658 (struct ipa_sym_addresses_common): ... this.
659 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
660
661 2018-08-28 Tom Tromey <tom@tromey.com>
662
663 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
664 (token_fifo): Now a std::vector.
665 (yylex, c_parse): Update.
666 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
667 (token_fifo): Now a std::vector.
668 (yylex, d_parse): Update.
669 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
670 (token_fifo): Now a std::vector.
671 (yylex, go_parse): Update.
672
673 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
674
675 * parser-defs.h (struct type_stack) <elements>: Change type to
676 std::vector<union type_stack_elt>.
677 <depth, size>: Remove.
678 * parse.c (parse_exp_in_context_1): Adjust.
679 (type_stack_reserve): Remove.
680 (check_type_stack_depth): Remove.
681 (insert_into_type_stack): Adjust to std::vector.
682 (insert_type): Likewise.
683 (push_type): Likewise.
684 (push_type_int): Likewise.
685 (insert_type_address_space): Likewise.
686 (pop_type): Likewise.
687 (pop_type_int): Likewise.
688 (pop_typelist): Likewise.
689 (pop_type_stack): Likewise.
690 (append_type_stack): Likewise.
691 (push_type_stack): Likewise.
692 (get_type_stack): Likewise.
693 (type_stack_cleanup): Likewise.
694 (push_typelist): Likewise.
695 (follow_types): Likewise.
696 (_initialize_parse): Likewise.
697
698 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
699
700 * NEWS: Mention csky target.
701
702 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
703 Hafiz Abid Qadeer <abidh@codesourcery.com>
704 Don Breazeal <donb@codesourcery.com>
705
706 * csky-linux-tdep.c: New file.
707 * csky-tdep.c: Likewise.
708 * csky-tdep.h: Likewise.
709 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
710 csky-tdep.o.
711 (HFILES_NO_SRCDIR): Add csky-tdep.h.
712 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
713 * configure.tgt: Add csky support.
714
715 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
716
717 * python/py-framefilter.c (py_print_frame): Print frame architecture
718 when printing on an MI output.
719
720 2018-08-27 Tom Tromey <tom@tromey.com>
721
722 PR build/23087:
723 * configure: Rebuild.
724 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
725
726 2018-08-27 Tom Tromey <tom@tromey.com>
727
728 * aarch64-linux-tdep.c
729 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
730 casts to int.
731
732 2018-08-27 Tom Tromey <tom@tromey.com>
733
734 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
735 unsigned.
736 (ppc64_standard_linkage1, ppc64_standard_linkage2)
737 (ppc64_standard_linkage3, ppc64_standard_linkage4)
738 (ppc64_standard_linkage5, ppc64_standard_linkage6)
739 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
740 unsigned.
741
742 2018-08-27 Tom Tromey <tom@tromey.com>
743
744 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
745 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
746
747 2018-08-27 Tom Tromey <tom@tromey.com>
748
749 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
750 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
751 ULONGEST_MAX.
752 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
753 ULONGEST_MAX.
754 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
755 ULONGEST_MAX.
756 * sparc-linux-tdep.c (sparc32_linux_sigframe)
757 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
758 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
759 ULONGEST_MAX.
760 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
761 (ppc64_linux_sigaction_tramp_frame)
762 (ppc32_linux_sighandler_tramp_frame)
763 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
764 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
765 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
766 * mn10300-linux-tdep.c (am33_linux_sigframe)
767 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
768 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
769 * mips-linux-tdep.c (mips_linux_o32_sigframe)
770 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
771 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
772 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
773 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
774 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
775 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
776 * microblaze-linux-tdep.c
777 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
778 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
779 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
780 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
781 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
782 * common/common-types.h (ULONGEST_MAX): New define.
783 (CORE_ADDR_MAX): Fix formatting.
784 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
785 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
786 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
787 (arm_linux_rt_sigreturn_tramp_frame)
788 (arm_eabi_linux_sigreturn_tramp_frame)
789 (arm_eabi_linux_rt_sigreturn_tramp_frame)
790 (thumb2_eabi_linux_sigreturn_tramp_frame)
791 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
792 (arm_linux_restart_syscall_tramp_frame)
793 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
794 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
795 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
796 ULONGEST_MAX.
797 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
798
799 2018-08-27 Tom Tromey <tom@tromey.com>
800
801 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
802 CORE_ADDR_MAX.
803 * mips-tdep.c (mips_deal_with_atomic_sequence)
804 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
805 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
806 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
807 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
808 CORE_ADDR_MAX.
809 * aarch64-tdep.c (aarch64_software_single_step): Use
810 CORE_ADDR_MAX.
811
812 2018-08-27 Tom Tromey <tom@tromey.com>
813
814 * linespec.c (complete_linespec_component): Add cast to "char".
815 * completer.c (completion_tracker::build_completion_result): Add
816 cast to "char".
817
818 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
819
820 * solist.h (struct solist, struct target_so_ops): Fix
821 indentation.
822
823 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
824
825 * ada-tasks.c (ada_task_info_s): Remove typedef.
826 (DEF_VEC_O(ada_task_info_s)): Remove.
827 (struct ada_tasks_inferior_data): Initialize fields.
828 <task_list>: Make an std::vector.
829 (get_ada_tasks_inferior_data): Allocate with new.
830 (ada_get_task_number): Adjust.
831 (get_task_number_from_id): Likewise.
832 (valid_task_id): Likewise.
833 (ada_get_task_info_from_ptid): Likewise.
834 (iterate_over_live_ada_tasks): Likewise.
835 (add_ada_task): Likewise.
836 (read_known_tasks): Likewise.
837 (ada_build_task_list): Likewise.
838 (print_ada_task_info): Likewise.
839 (info_task): Likewise.
840 (task_command_1): Likewise.
841
842 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * ada-lang.c (add_angle_brackets): Return std::string.
845
846 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
847
848 * python/py-threadevent.c (py_get_event_thread): Initialize
849 pythread.
850
851 2018-08-24 Pedro Alves <palves@redhat.com>
852
853 * python/py-bpevent.c (create_breakpoint_event_object): Use
854 copy-initialization.
855 * python/py-continueevent.c (emit_continue_event): Use
856 copy-initialization.
857 * python/py-exitedevent.c (create_exited_event_object): Return a
858 gdbpy_ref<>.
859 (emit_exited_event): Use copy-initialization.
860 * python/py-inferior.c (python_new_inferior)
861 (python_inferior_deleted, add_thread_object): Use
862 copy-initialization.
863 * python/py-infevents.c (create_inferior_call_event_object)
864 (create_register_changed_event_object)
865 (create_memory_changed_event_object): Return a gdbpy_ref<>.
866 (emit_inferior_call_event, emit_memory_changed_event)
867 (emit_register_changed_event): Use copy-initialization.
868 * python/py-newobjfileevent.c (create_new_objfile_event_object):
869 Return a gdbpy_ref<>.
870 (emit_new_objfile_event): Use copy-initialization.
871 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
872 (emit_clear_objfiles_event): Use copy-initialization.
873 * python/py-signalevent.c (create_signal_event_object): Use
874 copy-initialization.
875 * python/py-threadevent.c (create_thread_event_object): Use
876 copy-initialization.
877
878 2018-08-24 Pedro Alves <palves@redhat.com>
879 Simon Marchi <simon.marchi@ericsson.com>
880
881 PR gdb/23379
882 * python/py-continueevent.c: Include "gdbthread.h".
883 (create_continue_event_object): Add intro comment. Add 'ptid'
884 parameter. Use it to find thread to pass to
885 create_thread_event_object.
886 (emit_continue_event): Pass PTID down to
887 create_continue_event_object.
888 * python/py-event.h (py_get_event_thread): Declare.
889 (create_thread_event_object): Remove default from 'thread'
890 parameter.
891 * python/py-stopevent.c (create_stop_event_object): Use
892 py_get_event_thread.
893 * python/py-threadevent.c (get_event_thread): Rename to ...
894 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
895 and use it to find the thread.
896 (create_thread_event_object): Assert that THREAD isn't null.
897 Don't find the event thread here.
898
899 2018-08-23 Kevin Buettner <kevinb@redhat.com>
900
901 * block.h (blockrange, blockranges): New struct declarations.
902 (struct block): Add new field named `ranges'.
903 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
904 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
905 macros for accessing ranges in struct block.
906 (make_blockranges): New declaration.
907 block.c (make_blockranges): New function.
908 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
909 for block.
910 * symtab.h (find_pc_partial_function): Add new parameter `block'.
911 * blockframe.c (cache_pc_function_block): New static global.
912 (clear_pc_function_cache): Clear cache_pc_function_block.
913 (find_pc_partial_function): Move comment to symtab.h. Add
914 support for non-contiguous blocks.
915 * cli/cli-cmds.c (block.h): Include.
916 (print_disassembly): Handle printing of non-contiguous blocks.
917 (disassemble_current_function): Likewise.
918 (disassemble_command): Likewise.
919
920 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
921 BLOCK_START.
922 * blockframe.c (get_pc_function_start): Likewise.
923 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
924 (gcc_symbol_address): Likewise.
925 * compile/compile-object-run.c (compile_object_run): Likewise.
926 * compile/compile.c (get_expr_block_and_pc): Likewise.
927 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
928 (func_addr_to_tail_call_list): Likewise.
929 * findvar.c (default_read_var_value): Likewise.
930 * inline-frame.c (inline_frame_this_id): Likewise.
931 (skip-inline_frames): Likewise.
932 * infcmd.c (until_next_command): Likewise.
933 * linespec.c (convert_linespec_to_sals): Likewise.
934 * parse.c (parse_exp_in_context_1): Likewise.
935 * printcmd.c (build_address_symbolic): likewise.
936 (info_address_command): Likewise.
937 symtab.c (find_function_start_sal): Likewise.
938 (skip_prologue_sal): Likewise.
939 (find_function_alias_target): Likewise.
940 (find_gnu_ifunc): Likewise.
941 * stack.c (find_frame_funname): Likewise.
942 * symtab.c (fixup_symbol_section): Likewise.
943 (find_function_start_sal): Likewise.
944 (skip_prologue_sal): Likewsie.
945 (find_function_alias_target): Likewise.
946 (find_gnu_ifunc): Likewise.
947 * tracepoint.c (info_scope_command): Likewise.
948 * value.c (value_fn_field): Likewise.
949
950 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
951 in place of find_pc_partial_function.
952 * blockframe.c (find_function_entry_range_from_pc): New function.
953 * symtab.h (find_function_entry_range_from_pc): Declare and document.
954 * objfiles.c (objfile_relocate1): Relocate start and end addresses
955 for each range in a block.
956
957
958 2018-08-23 Xavier Roirand <roirand@adacore.com>
959
960 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
961 incrementation.
962
963 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * solib-svr4.c (read_program_headers_from_bfd): Return
966 gdb::optional<gdb::byte_vector>.
967 (svr4_exec_displacement): Adjust.
968
969 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * solib-svr4.c (read_program_header): Return
972 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
973 (find_program_interpreter): Return
974 gdb::optional<gdb::byte_vector>.
975 (scan_dyntag_auxv): Adjust.
976 (enable_break): Adjust.
977 (svr4_exec_displacement): Adjust.
978
979 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
982 * inf-child.c (inf_child_target::terminal_save_inferior): New.
983
984 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
985
986 * guile/scm-string.c (gdbscm_scm_from_printf): Use
987 string_vprintf.
988 * guile/scm-utils.c (gdbscm_printf): Likewise.
989 * serial.c (serial_printf): Likewise.
990 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
991
992 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
993
994 * stack.c (print_frame): Print frame architecture when printing on
995 an MI output.
996 * NEWS: Mention new "arch" attribute in frame output.
997
998 2018-08-21 Alan Hayward <alan.hayward@arm.com>
999
1000 * arch/aarch64.h (aarch64_regnum): Update comment.
1001
1002 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1003
1004 * NEWS: Add SVE to 8.2 section.
1005
1006 2018-08-21 Pedro Alves <palves@redhat.com>
1007
1008 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1009 out from gdbscm_parse_function_args.
1010 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1011 gdbscm_parse_function_args_1.
1012
1013 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 PR gdb/17816
1016 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1017 operator.
1018
1019 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1020
1021 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1022
1023 2018-08-19 Michael Spang <spang@google.com>
1024
1025 PR gdb/11786
1026 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1027 for PT_TLS segments.
1028
1029 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1030
1031 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1032 dwarf_variable_value.
1033 * dwarf2-frame.c (class dwarf_expr_executor):
1034 Add override for dwarf_variable_value.
1035 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1036 (class symbol_needs_eval_context): Likewise.
1037 (indirect_synthetic_pointer): Add forward declaration.
1038 (sect_variable_value): New function.
1039 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1040 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1041 for DW_OP_GNU_variable_value.
1042
1043 2018-08-16 Tom Tromey <tom@tromey.com>
1044
1045 * top.c (read_command_file): Update.
1046 (command_line_input): Remove "repeat" argument.
1047 * ada-lang.c (get_selections): Update.
1048 * linespec.c (decode_line_2): Update.
1049 * defs.h (command_line_input): Remove argument.
1050 * cli/cli-script.c (read_next_line): Update.
1051 * python/py-gdb-readline.c: Update.
1052
1053 2018-08-17 Tom Tromey <tom@tromey.com>
1054
1055 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1056 command_line_input.
1057
1058 2018-08-15 Tom Tromey <tom@tromey.com>
1059
1060 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1061
1062 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1063
1064 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1065 If used, use find_pc_partial_function to find address range
1066 to disassemble.
1067 * mi/mi-main.c (mi_cmd_list_features): Report
1068 "data-disassemble-a-option" feature.
1069 * NEWS: Mention new -data-disassemble option -a.
1070
1071 2018-08-13 Tom Tromey <tom@tromey.com>
1072
1073 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1074
1075 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1076
1077 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1078 (aarch64_linux_collect_sve_regset): Likewise.
1079 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1080 * regcache.h (regcache_map_entry_size): New function.
1081
1082 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1083
1084 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1085 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1086 (SVE_HEADER_VL_LENGTH): Likewise.
1087 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1088 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1089 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1090 (SVE_HEADER_SIZE_OFFSET): Likewise.
1091 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1092 (SVE_HEADER_VL_OFFSET): Likewise.
1093 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1094 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1095 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1096 (SVE_HEADER_SIZE): Likewise.
1097 (aarch64_linux_core_read_vq): Add function.
1098 (aarch64_linux_core_read_description): Check for SVE section.
1099
1100 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1101
1102 * aarch64-fbsd-tdep.c
1103 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1104 collect_size.
1105 * aarch64-linux-tdep.c
1106 (aarch64_linux_iterate_over_regset_sections): Likewise.
1107 * alpha-linux-tdep.c
1108 (alpha_linux_iterate_over_regset_sections):
1109 * alpha-nbsd-tdep.c
1110 (alphanbsd_iterate_over_regset_sections): Likewise.
1111 * amd64-fbsd-tdep.c
1112 (amd64fbsd_iterate_over_regset_sections): Likewise.
1113 * amd64-linux-tdep.c
1114 (amd64_linux_iterate_over_regset_sections): Likewise.
1115 * arm-bsd-tdep.c
1116 (armbsd_iterate_over_regset_sections): Likewise.
1117 * arm-fbsd-tdep.c
1118 (arm_fbsd_iterate_over_regset_sections): Likewise.
1119 * arm-linux-tdep.c
1120 (arm_linux_iterate_over_regset_sections): Likewise.
1121 * corelow.c (get_core_registers_cb): Likewise.
1122 (core_target::fetch_registers): Likewise.
1123 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1124 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1125 * gdbarch.h (void): Regenerate.
1126 * gdbarch.sh: Add supply_size and collect_size.
1127 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1128 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1129 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1130 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1131 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1132 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1133 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1134 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1135 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1136 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1137 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1138 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1139 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1140 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1141 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1142 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1143 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1144 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1145 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1146 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1147 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1148 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1149 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1150 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1151 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1152 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1153 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1154 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1155 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1156 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1157
1158 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1161 with string_printf.
1162
1163 2018-08-10 Keith Seitz <keiths@redhat.com>
1164
1165 * compile/compile-c-support.c (add_code_header, add_code_footer):
1166 Move into policy class.
1167 (c_push_user_expression, pop_user_expression_nop)
1168 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1169 (compile_program): New host class.
1170 (c_compile_program): New typedef.
1171 (c_compute_porgram): Use c_compile_program.
1172
1173 2018-08-10 Keith Seitz <keiths@redhat.com>
1174
1175 * compile/compile-internal.h (compile_instance::~compile_instance):
1176 Remove calls to htab_delete.
1177 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1178 * compile.c (compile_instance::compile_instance): Initialize
1179 htab unique pointers.
1180 (compile_instance::get_cached_type, compile_instance::insert_type)
1181 (compile_instance::error_symbol_once): Update for unique_ptr.
1182
1183 2018-08-10 Keith Seitz <keiths@redhat.com>
1184
1185 * compile/compile-c-symbols.c (struct symbol_error)
1186 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1187 (compile_instance::insert_symbol_error)
1188 (compile_instance::error_symbol_once): Move to ...
1189 * compile/compile.c: ... here.
1190
1191 2018-08-10 Keith Seitz <keiths@redhat.com>
1192
1193 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1194 instead of `new_compile_instance'.
1195 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1196 Update description.
1197 If the symbol error map is not initialized, create it.
1198 (generate_c_for_for_one_symbol): Do not check/initialize
1199 the symbol error map.
1200 * compile/compile-c-types.c (compile_c_instance): Make a class.
1201 Update all callers.
1202 (compile_instance::compile_instance): Initialize the type cache.
1203 (get_cached_type): New function.
1204 (insert_type): Update description.
1205 (compile_c_instance::m_default_cflags): Define.
1206 (convert_type): Update description. Use get_cached_type.
1207 (delete_instance): Moved to destructor.
1208 (new_compile_instance): Moved to constructor.
1209 * compile/compile-c.h (compile_c_instance): Make class inheriting
1210 from compile_instance.
1211 <base>: Remove field.
1212 <type_map, symbol_err_map>: Move to base class.
1213 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1214 * compile/compile-internal.h (compile_instance): Make class.
1215 <type_map_t, symbol_err_map_t>: Define.
1216 <fe>: Rename to `m_gcc_fe'.
1217 <scope, block, gcc_target_options>: Add `m_' prefix.
1218 <m_type_map, m_symbol_err_map>: New fields, moved from
1219 compile_c_instance.
1220 <destroy>: Remove.
1221 (convert_type, new_compile_instance): Remove.
1222 * compile/compile.c (cleanup_compile_instance): Remove.
1223 (compile_to_object): Use unique_ptr to eliminate cleanups.
1224 (compile_instance::set_print_callback, compile_instance::version)
1225 (compile_instance::set_verbose)
1226 (compile_instance::set_driver_filename)
1227 (compile_instance::set_triplet_regexp)
1228 (compile_instance::set_arguments)
1229 (compile_instance::set_source_file)
1230 (compile_instance::compile): Define.
1231
1232 2018-08-10 Keith Seitz <keiths@redhat.com>
1233
1234 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1235 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1236 gcc-c-fe.def to define C plugin.
1237 (delete_instance): Delete `c_plugin'.
1238 (new_compile_instance): Initialize `c_plugin'.
1239 * compile/compile-c.h: Include gcc_c_plugin.h.
1240 (struct compile_c_instance) <c_plugin>: New member.
1241 * gcc-c-plugin.h: New file.
1242 Update all callers with API change.
1243
1244 2018-08-10 Keith Seitz <keiths@redhat.com>
1245
1246 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1247 (HFILES_NO_SRCDIR): ... to here.
1248 Add compile-internal.h and compile-c.h.
1249 * compile/compile-c-support.c: Include compile-c.h.
1250 * compile/compile-c-symbols.c: Include compile-c.h.
1251 (generate_c_for_variable_locations): Update comment.
1252 * compile/compile-c-types.c: Include compile-c.h.
1253 * compile/compile-c.h: New file -- moved C language declarations
1254 from other files here.
1255 * compile/compile-internal.h: Do not include hashtab.h or
1256 common/enum-flags.h.
1257 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1258 (gcc_convert_symbol, gcc_symbol_address)
1259 (generate_c_for_variable_locations, c_get_mode_for_size)
1260 (c_get_range_decl_name): Definitions moved to compile-c.h.
1261 * compile/compile-loc2c.c: Include compile-c.h.
1262
1263 2018-08-10 Keith Seitz <keiths@redhat.com>
1264
1265 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1266 (c_symbol_substitution_name): ... this.
1267 Update all callers.
1268
1269 2018-08-10 Keith Seitz <keiths@redhat.com>
1270
1271 * compile/compile-c-support.c (c_compute_program): Use
1272 unique_xmalloc_ptr to eliminate cleanup.
1273 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1274 Return a unique_xmalloc_ptr and eliminate cleanup.
1275 * compile/compile-internal.h (generate_c_for_variable_locations):
1276 Return unique_xmalloc_ptr and update description.
1277
1278 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1279
1280 * corelow.c (core_target::get_core_register_section): Rename
1281 min_size to section_min_size.
1282
1283 2018-08-09 Jim Wilson <jimw@sifive.com>
1284
1285 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1286 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1287 * NEWS: Mention new GNU/Linux RISC-V target.
1288 * configure.host: Add riscv*-*-linux*.
1289 * configure.nat: Add riscv*.
1290 * configure.tgt: Add riscv*-*-linux*.
1291 * riscv-linux-nat.c: New file.
1292 * riscv-linux-tdep.c: New file.
1293
1294 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1295
1296 * infrun.c (resume): Make static, add forward declaration.
1297 (proceed): Update header comment.
1298 * infrun.h (resume): Delete declaration.
1299
1300 2018-08-09 Tom Tromey <tom@tromey.com>
1301
1302 * riscv-tdep.h: Minor formatting fixes.
1303
1304 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1305
1306 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1307 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1308 (test_mkdir_recursive): Likewise.
1309 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1310
1311 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1312
1313 * valarith.c (value_subscripted_rvalue): If an array is not in
1314 memory, and we don't know the upper bound, then we can't know that
1315 the requested element exists or not.
1316
1317 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1318
1319 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1320 (target_options_to_string): Add comment.
1321
1322 2018-08-08 Tom Tromey <tom@tromey.com>
1323
1324 * unittests/scoped_mmap-selftests.c: Check result of "write".
1325
1326 2018-08-08 Jim Wilson <jimw@sifive.com>
1327
1328 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1329 (decode_register_index_short): New.
1330 (decode_j_type_insn, decode_cj_type_insn): New.
1331 (decode_b_type_insn, decode_cb_type_insn): New.
1332 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1333 local xlen. Check xlen when decoding ambiguous compressed insns. In
1334 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1335 is_c_sw_insn instead of is_sw_insn.
1336 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1337 (riscv_software_single_step): New.
1338 * riscv-tdep.h (riscv_software_single_step): Declare.
1339
1340 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1341 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1342
1343 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1344
1345 PR gdb/18050:
1346 * target.c (dispose_inferior): Don't dispose of inferiors that are
1347 already killed.
1348
1349 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1350
1351 * remote.c (remote_target::download_tracepoint): Change char* to
1352 const char*.
1353
1354 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1355
1356 * target.h (target_options_to_string): Return an std::string.
1357 * target.c (str_comma_list_concat_elem): Return void, use
1358 std::string.
1359 (do_option): Likewise.
1360 (target_options_to_string): Return an std::string.
1361 * linux-nat.c (linux_nat_target::wait): Adjust.
1362 * target-debug.h (target_debug_print_options): Adjust.
1363
1364 2018-08-07 Tom Tromey <tom@tromey.com>
1365
1366 * Makefile.in (CPPFLAGS): New variable.
1367 (INTERNAL_CPPFLAGS): Use it.
1368
1369 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1370
1371 * NEWS: Mention the index cache.
1372
1373 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * common/pathstuff.h (get_standard_cache_dir): New.
1376 * common/pathstuff.c (get_standard_cache_dir): New.
1377 * build-id.h (build_id_to_string): New.
1378 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1379 DEBUG_STR_SUFFIX): Move to here.
1380 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1381 DEBUG_STR_SUFFIX): Move from there.
1382 (write_psymtabs_to_index): Make non-static, add basename
1383 parameter. Write to temporary files, rename when done.
1384 (save_gdb_index_command): Adjust call to
1385 write_psymtabs_to_index.
1386 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1387 field.
1388 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1389 (get_gdb_index_contents_from_cache): New.
1390 (get_gdb_index_contents_from_cache_dwz): New.
1391 (dwarf2_initialize_objfile): Read index from cache.
1392 (dwarf2_build_psymtabs): Save to index.
1393 * dwarf-index-cache.h: New file.
1394 * dwarf-index-cache.c: New file.
1395 * dwarf-index-write.h: New file.
1396
1397 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1398
1399 * gnulib/aclocal.m4: Re-generate.
1400 * gnulib/config.in: Re-generate.
1401 * gnulib/configure: Re-generate.
1402 * gnulib/import/Makefile.am: Re-generate.
1403 * gnulib/import/Makefile.in: Re-generate.
1404 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1405 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1406 * gnulib/import/m4/mkdir.m4: New file.
1407 * gnulib/import/mkdir.c: New file.
1408 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1409 module.
1410
1411 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1412
1413 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1414 * common/scoped_mmap.c: New file.
1415 * common/scoped_mmap.h (destroy): New method.
1416 (~scoped_mmap, reset): Use destroy.
1417 (scoped_mmap): New move constructor.
1418 (mmap_file): New declaration.
1419 * unittests/scoped_mmap-selftests.c (test_normal,
1420 test_invalid_filename, run_tests): New functions.
1421 (_initialize_scoped_mmap_selftests): Register selftest.
1422
1423 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1424
1425 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1426 (read_gdb_index_from_buffer): ... this. Remove section
1427 parameter, add buffer parameter.
1428 (get_gdb_index_contents_ftype,
1429 get_gdb_index_contents_dwz_ftype): New typedefs.
1430 (dwarf2_read_gdb_index): Add callback parameters to get the
1431 index contents.
1432 (get_gdb_index_contents_from_section): New.
1433 (dwarf2_initialize_objfile): Update call to
1434 dwarf2_read_gdb_index.
1435
1436 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1437
1438 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1439 (gdb_open_cloexec): Likewise.
1440 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1441 (commandline_from_pid): Likewise.
1442 (linux_xfer_osdata_threads): Likewise.
1443 (linux_xfer_osdata_fds): Likewise.
1444 * ada-lang.c (is_package_name): Likewise.
1445 * auxv.c (procfs_xfer_auxv): Likewise.
1446 * breakpoint.c (print_one_breakpoint_location): Use
1447 uiout::field_fmt.
1448 (print_one_catch_solib): Use string_printf.
1449 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1450 (add_pe_forwarded_sym): Likewise.
1451 * dwarf2read.c (create_type_unit_group): Likewise.
1452 (build_error_marker_type): Likewise.
1453 * infcall.c (get_function_name): Likewise.
1454 * valprint.c (print_converted_chars_to_obstack): Likewise.
1455 * xtensa-tdep.c (xtensa_register_type): Likewise.
1456
1457 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1458
1459 * remote.c (remote_target::download_tracepoint): Fix format
1460 string errors.
1461
1462 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1463
1464 * tracefile.c: Include common/byte-vector.h.
1465 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1466 with trace_regblock_size if needed. Update uses of buf.
1467
1468 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1469
1470 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1471 std::vector<unsigned char>.
1472 * tracepoint.c (collection_list::collection_list): Remove
1473 m_regs_mask initializer from initializer list. Resize
1474 m_regs_mask using the largest remote register number.
1475 (collection_list::add_remote_register): Remove size check on
1476 m_regs_mask. Use at to access element.
1477 (collection_list::stringify): Change type of temp_buf to
1478 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1479 stringify the register mask. Use pack_hex_byte for the register
1480 mask.
1481
1482 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1483
1484 * tracepoint.h (class collection_list) <add_register>: Remove.
1485 <add_remote_register, add_ax_registers, add_local_register>:
1486 Declare.
1487 <add_memrange>: Add scope parameter.
1488 * tracepoint.c (encode_actions_1): Likewise.
1489 (collection_list::add_register): Rename to ...
1490 (collection_list::add_remote_register): ... this. Update
1491 comment.
1492 (collection_list::add_ax_registers, add_local_register): New
1493 methods.
1494 (collection_list::add_memrange): Add scope parameter. Call
1495 add_local_register instead of add_register.
1496 (finalize_tracepoint_aexpr): New function.
1497 (collection_list::collect_symbol): Update calls to add_memrange.
1498 Call add_local_register instead of add_register. Call
1499 add_ax_registers. Call finalize_tracepoint_aexpr.
1500 (encode_actions_1): Get remote regnos for $reg action. Call
1501 add_remote_register, add_ax_registers, and add_local_register.
1502 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1503 (validate_actionline): Call finalize_tracepoint_aexpr.
1504
1505 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1506
1507 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1508 Replace array buf with gdb::char_vector buf, of size
1509 get_remote_packet_size (). Replace references to buf and
1510 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1511 and xsnprintf with snprintf. Raise errors if the buffer is too
1512 small.
1513
1514 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1515
1516 * remote.c (remote_target::download_tracepoint): Fix the has_more
1517 predicate in the QTDP action list iteration.
1518
1519 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1520
1521 * remote.c (remote_target::download_tracepoint): Fix indentation
1522 in for block.
1523
1524 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1525
1526 * proc-api.c (_initialize_proc_api): Remove c, unused.
1527 * procfs.c (procfs_init_inferior): Remove signals, unused.
1528 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1529 unused.
1530
1531 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1532 Andrew Burgess <andrew.burgess@embecosm.com>
1533
1534 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1535 'W_STOPCODE (0)' as this could be ambiguous.
1536
1537 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1538
1539 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1540 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1541 "ai_socktype").
1542
1543 2018-08-02 Tom Tromey <tom@tromey.com>
1544
1545 PR symtab/16842.
1546 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1547 symbols.
1548 (process_structure_scope): Likewise.
1549
1550 2018-08-02 Xavier Roirand <roirand@adacore.com>
1551
1552 PR gdb/22629:
1553 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1554 kill inferior.
1555
1556 2018-08-02 Tom Tromey <tom@tromey.com>
1557
1558 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1559 (darwin_suspend_inferior, darwin_resume_inferior)
1560 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1561 (darwin_check_new_threads): Check result of get_darwin_inferior.
1562
1563 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1564
1565 GDB 8.1.1 released.
1566
1567 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1568
1569 * varobj.c (varobj_get_path_expr_parent): Report an error if
1570 parent is a dynamic varobj.
1571
1572 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1573
1574 * gnulib/aclocal.m4: Re-generate.
1575 * gnulib/config.in: Re-generate.
1576 * gnulib/configure: Re-generate.
1577 * gnulib/import/Makefile.in: Re-generate.
1578 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1579 * gnulib/import/m4/onceonly.m4: Re-generate.
1580
1581 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * target-descriptions.c (struct xml_test_tdesc): New.
1584 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1585 (record_xml_tdesc): Update.
1586 (maintenance_check_xml_descriptions): Update.
1587 * target-descriptions.h (record_xml_tdesc): Update comment.
1588
1589 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1590
1591 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1592 checking array bounds are defined.
1593
1594 2018-07-30 Tom Tromey <tom@tromey.com>
1595
1596 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1597 irreflexivity violation.
1598
1599 2018-07-30 Tom Tromey <tom@tromey.com>
1600
1601 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1602 * value.c (unpack_long): Remove lint code.
1603 * valops.c (value_ind): Remove lint code.
1604 * valarith.c (value_x_binop, value_x_unop, value_equal)
1605 (value_pos): Remove lint code.
1606
1607 2018-07-28 Tom de Vries <tdevries@suse.de>
1608
1609 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1610 with undefined upper bound as <optimized out>.
1611
1612 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1613
1614 * gcore.in: Rename variable "name" to "prefix". Expand
1615 "usage" text.
1616
1617 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1618
1619 * windows-nat.c (windows_nat_target::create_inferior): Update to
1620 call close() in global namespace.
1621
1622 2018-07-26 Tom Tromey <tom@tromey.com>
1623
1624 * dwarf-index-write.c (add_address_entry): Don't add objfile
1625 offsets.
1626 * dbxread.c (find_stab_function): Rename from
1627 find_stab_function_addr. Return a bound_minimal_symbol.
1628 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1629 Don't add objfile offsets.
1630 (end_psymtab): Use raw_text_low, raw_text_high,
1631 MSYMBOL_VALUE_RAW_ADDRESS.
1632 (read_ofile_symtab): Update.
1633 (process_one_symbol): Update.
1634 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1635 offsets.
1636 (dw2_relocate): Remove.
1637 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1638 searching addrmap.
1639 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1640 Update.
1641 (process_psymtab_comp_unit_reader, add_partial_symbol)
1642 (add_partial_subprogram, dwarf2_ranges_read): Update.
1643 (load_partial_dies): Update.
1644 (add_address_entry): Don't add objfile offsets.
1645 (dwarf2_build_include_psymtabs): Update.
1646 (create_addrmap_from_aranges): Don't add objfile offsets.
1647 (dw2_find_pc_sect_compunit_symtab): Update.
1648 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1649 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1650 Update.
1651 (parse_partial_symbols): Don't add objfile offsets. Use
1652 raw_text_low, raw_text_high. Update.
1653 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1654 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1655 or call 'relocate' quick function. Clear psymbol_map.
1656 * psympriv.h (struct partial_symbol) <address>: Add section
1657 offset.
1658 <set_unrelocated_address>: Rename from set_address.
1659 <raw_text_low, raw_text_high>: New methods.
1660 <text_low, text_high>: Add objfile parameter.
1661 (add_psymbol_to_bcache): Add 'section' parameter. Call
1662 set_unrelocated_address.
1663 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1664 (find_pc_psymbol): Update.
1665 (fixup_psymbol_section, relocate_psymtabs): Remove.
1666 (dump_psymtab, psym_functions): Update.
1667 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1668 parameter.
1669 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1670 (start_psymtab_common): Update.
1671 * symfile-debug.c (debug_qf_relocate): Remove.
1672 (debug_sym_quick_functions): Update.
1673 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1674 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1675 Update.
1676
1677 2018-07-26 Tom Tromey <tromey@redhat.com>
1678
1679 * dbxread.c (end_psymtab): Use text_high_valid and
1680 text_low_valid.
1681 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1682 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1683 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1684 Update comment.
1685 <text_low_valid, text_high_valid>: New fields.
1686 <set_text_low, set_text_high>: Update.
1687 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1688
1689 2018-07-26 Tom Tromey <tom@tromey.com>
1690
1691 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1692 Update.
1693 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1694 textlow and texthigh fields.
1695 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1696 Update.
1697 * mdebugread.c (parse_lines, parse_partial_symbols)
1698 (psymtab_to_symtab_1): Update.
1699 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1700 Rename fields. Update comment. Now private.
1701 <text_low, text_high, set_text_low, set_text_high>: New methods.
1702 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1703 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1704 (start_psymtab_common, maintenance_info_psymtabs)
1705 (maintenance_check_psymtabs): Update.
1706 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1707 texthigh fields.
1708 (scan_xcoff_symtab): Update.
1709
1710 2018-07-26 Tom Tromey <tromey@redhat.com>
1711
1712 * psympriv.h (struct partial_symbol) <unrelocated_address,
1713 address, set_address>: New methods.
1714 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1715 (fixup_psymbol_section, relocate_psymtabs): Update.
1716 (print_partial_symbols): Add 'objfile' parameter. Update.
1717 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1718 Update.
1719
1720 2018-07-26 Tom Tromey <tom@tromey.com>
1721
1722 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1723 (debug_names::write_psymbols): Update.
1724 * psympriv.h (struct partial_symbol): Derive from
1725 general_symbol_info.
1726 <obj_section>: New method.
1727 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1728 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1729 (find_pc_sect_psymbol, fixup_psymbol_section)
1730 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1731 (print_partial_symbols, recursively_search_psymtabs)
1732 (compare_psymbols, psymbol_hash, psymbol_compare)
1733 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1734 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1735
1736 2018-07-26 Tom Tromey <tromey@redhat.com>
1737
1738 * dbxread.c (end_psymtab): Remove dead code.
1739
1740 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1741
1742 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1743 DWARF unwinders are disabled.
1744 * dwarf2-frame.c: Add dwarf2read.h include.
1745 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1746 disabled.
1747 (dwarf2_frame_unwinders_enabled_p): Define.
1748 (show_dwarf_unwinders_enabled_p): New function.
1749 (_initialize_dwarf2_frame): Register switch to control DWARF
1750 unwinder use.
1751 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1752 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1753 (show_dwarf_cmdlist): Remove static keyword.
1754 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1755 (show_dwarf_cmdlist): Declare.
1756 * NEWS: Document new feature.
1757
1758 2018-07-26 Tom de Vries <tdevries@suse.de>
1759
1760 PR breakpoints/23366
1761 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1762
1763 2018-07-26 Tom de Vries <tdevries@suse.de>
1764
1765 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1766 DW_AT_count can't be translated to a dynamic prop.
1767
1768 2018-07-25 Tom de Vries <tdevries@suse.de>
1769
1770 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1771 try/catch.
1772
1773 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1774
1775 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1776
1777 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1778
1779 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1780
1781 2018-07-24 Keith Seitz <keiths@redhat.comt
1782
1783 PR symtab/23010
1784 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1785 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1786 instead of add_symbol_to_list.
1787 (read_file_scope): Call prepare_one_comp_unit before reading
1788 any other DIEs.
1789
1790 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1793
1794 2018-07-24 Tom Tromey <tom@tromey.com>
1795
1796 * utils.c (malloc, realloc, free): Don't declare.
1797 * configure, config.in: Rebuild.
1798 * configure.ac: Don't check for declarations of free, malloc, or
1799 realloc.
1800
1801 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * aarch64-linux-nat.c
1804 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1805 variable.
1806 * arm-linux-nat.c (fetch_regs): Likewise.
1807 (store_regs): Likewise.
1808 (fetch_vfp_regs): Likewise.
1809 (store_vfp_regs): Likewise.
1810 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1811 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1812 (arm_linux_nat_target::insert_watchpoint): Likewise.
1813 (arm_linux_nat_target::remove_watchpoint): Likewise.
1814 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1815 Likewise.
1816 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1817 Likewise.
1818 * ppc-linux-nat.c (fetch_register): Likewise.
1819 (fetch_all_gp_regs): Likewise.
1820 (fetch_ppc_registers): Likewise.
1821 (store_all_gp_regs): Likewise.
1822 (store_ppc_registers): Likewise.
1823 (hwdebug_insert_point): Likewise.
1824 (can_use_watchpoint_cond_accel): Likewise.
1825 * remote-sim.c (gdb_os_write_stdout): Likewise.
1826
1827 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1828 Tom Tromey <tom@tromey.com>
1829
1830 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1831 test for it.
1832 * configure: Rebuild.
1833
1834 2018-07-22 Tom Tromey <tom@tromey.com>
1835
1836 * regformats/regdat.sh: Define xmltarget_${name} inside
1837 #ifndef IN_PROCESS_AGENT.
1838
1839 2018-07-22 Tom Tromey <tom@tromey.com>
1840
1841 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1842
1843 2018-07-22 Tom Tromey <tom@tromey.com>
1844
1845 * symfile.c (reread_symbols): Notify iter, not objfile.
1846
1847 2018-07-22 Tom Tromey <tom@tromey.com>
1848
1849 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1850 Use arch_ops.
1851 (ravenscar_thread_target::prepare_to_store): Likewise.
1852
1853 2018-07-22 Tom Tromey <tom@tromey.com>
1854
1855 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1856 unused variable. Call value_fetch_lazy when needed.
1857 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1858 Remove unused variable. Call value_fetch_lazy when needed.
1859
1860 2018-07-22 Tom Tromey <tom@tromey.com>
1861
1862 * m32c-tdep.c (mark_dma): Return void.
1863 (make_regs): Remove unused declarations.
1864
1865 2018-07-22 Tom Tromey <tom@tromey.com>
1866
1867 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1868 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1869 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1870 bkscm_get_valid_block_smob_arg_unsafe for effect.
1871
1872 2018-07-22 Tom Tromey <tom@tromey.com>
1873
1874 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1875 value_type.
1876
1877 2018-07-22 Tom Tromey <tom@tromey.com>
1878
1879 * windows-nat.c (saved_context): Conditionally define.
1880 * remote.c (remote_target::remote_btrace_maybe_reopen):
1881 Conditionally declare "warned".
1882 * inflow.c (sigquit_ours): Conditionally define.
1883 (new_tty): Move "tty" declaration inside #if.
1884 * guile/guile.c (guile_datadir): Conditionally define.
1885 * charset.c (set_be_le_names): Move some declarations inside #if.
1886 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1887 #if.
1888 (parse_xml_btrace_conf): Likewise.
1889
1890 2018-07-22 Tom Tromey <tom@tromey.com>
1891
1892 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1893
1894 2018-07-22 Tom Tromey <tom@tromey.com>
1895
1896 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1897 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1898 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1899 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1900 * stack.c (frame_apply_level_command): Remove unused variable.
1901 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1902 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1903 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1904 unused variable.
1905 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1906 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1907 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1908 variable.
1909 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1910 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1911 variable.
1912 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1913 Remove unused variable.
1914 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1915 variable.
1916 * common/tdesc.c (print_xml_feature::visit): Remove unused
1917 variable.
1918 * compile/compile-object-load.c (store_regs): Remove unused
1919 variables.
1920 * complaints.c (clear_complaints): Remove unused variable.
1921 * corelow.c (core_target_open): Remove unused variable.
1922 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1923 variable.
1924 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1925 variable.
1926 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1927 variable.
1928 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1929 variable.
1930 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1931 variable.
1932 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1933 variable.
1934 * ia64-tdep.c (examine_prologue): Remove unused variable.
1935 * infcall.c (run_inferior_call): Remove unused variable.
1936 * inferior.c (exit_inferior): Remove unused variable.
1937 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1938 * linespec.c (decode_line_2): Remove unused variable.
1939 * linux-nat.c (super_close): Remove.
1940 * linux-tdep.c (linux_info_proc): Remove unused variable.
1941 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1942 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1943 Remove unused variable.
1944 * parse.c (find_minsym_type_and_address): Remove unused variable.
1945 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1946 variable.
1947 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1948 variable.
1949 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1950 variables.
1951 * record-btrace.c (record_btrace_target::store_registers): Remove
1952 unused variable.
1953 (cmd_show_record_btrace_cpu): Remove unused variable.
1954 * riscv-tdep.c (riscv_register_reggroup_p)
1955 (riscv_push_dummy_call, riscv_return_value): Remove unused
1956 variable.
1957 * rust-exp.y (literal): Remove unused variable.
1958 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1959 unused variable.
1960 <STRUCTOP_ANONYMOUS>: Likewise.
1961 * s390-linux-tdep.c (s390_linux_init_abi_31)
1962 (s390_linux_init_abi_64): Remove unused variable.
1963 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1964 (file_select_thread, net_windows_open, _initialize_ser_windows):
1965 Remove unused variables.
1966 * symtab.c (find_pc_sect_line): Remove unused variable.
1967 * target-memory.c (compute_garbled_blocks): Remove unused
1968 variable.
1969 (target_write_memory_blocks): Remove unused variable.
1970 * target.c (target_stack::unpush): Remove unused variables.
1971 * tracepoint.c (start_tracing, all_tracepoint_actions)
1972 (merge_uploaded_trace_state_variables)
1973 (print_one_static_tracepoint_marker): Remove unused variable.
1974 * unittests/basic_string_view/element_access/char/1.cc (test01):
1975 Remove unused variable.
1976 * windows-nat.c (windows_continue, windows_add_all_dlls)
1977 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1978 Remove unused variables.
1979
1980 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1981
1982 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1983 attr_profile in HAVE_ELF.
1984 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1985 HAVE_ELF.
1986
1987 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1988
1989 * frame.c (frame_register_unwind): Change parameter name.
1990 (frame_unwind_register): Likewise.
1991 (frame_unwind_register_value): Likewise.
1992 (frame_unwind_register_signed): Likewise.
1993 (frame_unwind_register_unsigned): Likewise.
1994 * frame.h (frame_register_unwind): Likewise.
1995 (frame_unwind_register): Likewise.
1996 (frame_unwind_register_value): Likewise.
1997 (frame_unwind_register_signed): Likewise.
1998 (frame_unwind_register_unsigned): Likewise.
1999 (frame_unwind_arch): Likewise.
2000
2001 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2002
2003 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2004 ISA maintenance.
2005
2006 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2007
2008 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2009 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2010 hand.
2011
2012 2018-07-20 Keith Seitz <keiths@redhat.com>
2013
2014 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2015 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2016 m_compunit_symtab, m_language>: Add "m_" prefix.
2017 Update all uses.
2018 * buildsym.c: Update all uses.
2019
2020 2018-07-20 Tom Tromey <tom@tromey.com>
2021
2022 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2023 * buildsym.h (record_line_ftype): Remove typedef.
2024
2025 2018-07-20 Tom Tromey <tom@tromey.com>
2026
2027 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2028 (end_expandable_symtab): Likewise.
2029 (end_symtab_get_static_block): Likewise.
2030 (end_symtab_from_static_block): Likewise.
2031 * buildsym-legacy.c (augment_type_symtab): Remove.
2032 (end_expandable_symtab): Remove.
2033 (end_symtab_get_static_block): Remove.
2034 (end_symtab_from_static_block): Remove.
2035
2036 2018-07-20 Tom Tromey <tom@tromey.com>
2037
2038 * dwarf2read.c: Include buildsym.h.
2039 (struct dwarf2_cu) <builder>: New method.
2040 (fixup_go_packaging): Update.
2041 (process_full_comp_unit, process_full_type_unit): Update. Don't
2042 use scoped_free_pendings.
2043 (using_directives): Add "cu" parameter, remove "language".
2044 (read_import_statement, setup_type_unit_groups, )
2045 (read_func_scope, read_lexical_block_scope)
2046 (dwarf2_record_block_ranges, read_namespace): Update.
2047 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2048 (lnp_state_machine::handle_end_sequence): Update.
2049 (class lnp_state_machine) <m_cu>: New member.
2050 <m_record_line_callback>: Remove.
2051 <m_currently_recording_lines>: New member.
2052 (lnp_state_machine::handle_set_file): Update.
2053 (noop_record_line): Remove.
2054 (dwarf_record_line_p): Add cu parameter.
2055 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2056 (lnp_state_machine::record_line)
2057 (lnp_state_machine::lnp_state_machine)
2058 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2059 (dwarf_decode_lines): Update.
2060 (dwarf2_start_subfile): Add cu parameter.
2061 (dwarf2_start_symtab, new_symbol): Update.
2062 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2063 Remove dwarf2_per_objfile parameter.
2064 (dwarf_decode_macros): Update.
2065
2066 2018-07-20 Tom Tromey <tom@tromey.com>
2067
2068 * stabsread.c (define_symbol): Update.
2069 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2070 * dwarf2read.c (new_symbol): Update.
2071 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2072 * cp-namespace.c: Include buildsym.h.
2073 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2074 * buildsym-legacy.c (get_buildsym_compunit): New function.
2075
2076 2018-07-20 Tom Tromey <tom@tromey.com>
2077
2078 * xcoffread.c: Include buildsym-legacy.h.
2079 * windows-nat.c: Include buildsym-legacy.h.
2080 * stabsread.c: Include buildsym-legacy.h.
2081 * mdebugread.c: Include buildsym-legacy.h.
2082 * buildsym-legacy.h: New file.
2083 * buildsym-legacy.c: New file, from buildsym.c.
2084 * go32-nat.c: Include buildsym-legacy.h.
2085 * dwarf2read.c: Include buildsym-legacy.h.
2086 * dbxread.c: Include buildsym-legacy.h.
2087 * cp-namespace.c: Include buildsym-legacy.h.
2088 * coffread.c: Include buildsym-legacy.h.
2089 * buildsym.h: Move some contents to buildsym-legacy.h.
2090 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2091 buildsym-legacy.c.
2092 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2093
2094 2018-07-20 Tom Tromey <tom@tromey.com>
2095
2096 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2097 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2098 (buildsym_compunit::buildsym_compunit)
2099 (buildsym_compunit::~buildsym_compunit)
2100 (buildsym_compunit::get_macro_table): Define.
2101
2102 2018-07-20 Tom Tromey <tom@tromey.com>
2103
2104 * buildsym.c (reset_symtab_globals): Remove.
2105 (buildsym_compunit::end_symtab_from_static_block): Update.
2106 (buildsym_compunit::augment_type_symtab): Update.
2107 (end_symtab_from_static_block): Call free_buildsym_compunit.
2108 (augment_type_symtab, end_symtab, end_expandable_symtab):
2109 Likewise.
2110
2111 2018-07-20 Tom Tromey <tom@tromey.com>
2112
2113 * arch-utils.c: Do not include buildsym.h.
2114 * mipsread.c: Do not include buildsym.h.
2115 * machoread.c: Do not include buildsym.h.
2116 * elfread.c: Do not include buildsym.h.
2117
2118 2018-07-20 Tom Tromey <tom@tromey.com>
2119
2120 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2121 initialization.
2122 (buildsym_compunit): Add new constructor.
2123 (struct buildsym_compunit) <get_last_source_file, finish_block,
2124 record_block_range, start_subfile, patch_subfile_names,
2125 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2126 set_last_source_start_addr, get_last_source_start_addr,
2127 get_local_using_directives, set_local_using_directives,
2128 get_global_using_directives, outermost_context_p,
2129 get_current_context_stack, get_context_stack_depth,
2130 get_current_subfile, get_local_symbols, get_file_symbols,
2131 get_global_symbols, record_debugformat, record_producer,
2132 push_context, pop_context, end_symtab_get_static_block,
2133 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2134 New public methods.
2135 <record_pending_block, finish_block_internal, make_blockvector,
2136 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2137 private methods.
2138 Update all users.
2139
2140 2018-05-22 Tom Tromey <tom@tromey.com>
2141
2142 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2143 parameter.
2144 (finish_block_internal): Update.
2145
2146 2018-07-20 Tom Tromey <tom@tromey.com>
2147
2148 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2149 parameter.
2150 (finish_block_internal): Update.
2151
2152 2018-07-20 Tom Tromey <tom@tromey.com>
2153
2154 * buildsym.h (EXTERN): Don't define or undef.
2155 * buildsym.c (EXTERN): Don't define.
2156
2157 2018-07-20 Tom Tromey <tom@tromey.com>
2158
2159 * buildsym.c: Remove TODO comment.
2160
2161 2018-07-20 Tom Tromey <tom@tromey.com>
2162
2163 * coffread.c (coff_symtab_read): Update.
2164 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2165 (xcoff_new_init): Update.
2166 * mipsread.c (mipscoff_new_init): Update.
2167 * mdebugread.c (mdebug_build_psymtabs): Update.
2168 * elfread.c (elf_new_init): Update.
2169 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2170 Update.
2171 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2172 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2173 (stabsect_build_psymtabs): Update.
2174 * buildsym.h (buildsym_init): Don't declare.
2175 * buildsym.c: Update comment.
2176 (prepare_for_building): Remove.
2177 (start_symtab, restart_symtab): Update.
2178 (reset_symtab_globals): Update comment.
2179 (buildsym_init): Remove.
2180
2181 2018-07-20 Tom Tromey <tom@tromey.com>
2182
2183 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2184 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2185 (read_enum_type, common_block_start, common_block_end)
2186 (cleanup_undefined_types_1, finish_global_stabs): Update.
2187 * mdebugread.c (psymtab_to_symtab_1): Update.
2188 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2189 (read_lexical_block_scope, new_symbol): Update.
2190 * dbxread.c (process_one_symbol): Update.
2191 * coffread.c (coff_symtab_read, process_coff_symbol)
2192 (coff_read_enum_type): Update.
2193 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2194 declare.
2195 (get_local_symbols, get_file_symbols, get_global_symbols): New
2196 functions.
2197 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2198 m_global_symbols.
2199 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2200 (~scoped_free_pendings): Update.
2201 (finish_block, prepare_for_building, reset_symtab_globals)
2202 (end_symtab_get_static_block, end_symtab_with_blockvector)
2203 (augment_type_symtab, push_context): Update.
2204 (get_local_symbols, get_file_symbols, get_global_symbols): New
2205 functions.
2206 (buildsym_init): Update.
2207
2208 2018-07-20 Tom Tromey <tom@tromey.com>
2209
2210 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2211 (process_full_type_unit): Likewise.
2212 (dwarf2_start_symtab): Set list_in_scope.
2213
2214 2018-07-20 Tom Tromey <tom@tromey.com>
2215
2216 * dwarf2read.c (process_psymtab_comp_unit_reader)
2217 (build_type_psymtabs_reader): Do not set list_in_scope.
2218
2219 2018-07-20 Tom Tromey <tom@tromey.com>
2220
2221 * buildsym.c (free_pendings): Remove.
2222 (add_symbol_to_list, scoped_free_pendings)
2223 (finish_block_internal, buildsym_init): Update.
2224
2225 2018-07-20 Tom Tromey <tom@tromey.com>
2226
2227 * xcoffread.c (read_xcoff_symtab): Update.
2228 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2229 Update.
2230 * dbxread.c (process_one_symbol): Update.
2231 * coffread.c (coff_symtab_read): Update.
2232 * buildsym.h (finish_block): Update.
2233 * buildsym.c (finish_block): Remove "listhead" argument.
2234 (end_symtab_get_static_block): Update.
2235
2236 2018-07-20 Tom Tromey <tom@tromey.com>
2237
2238 * buildsym.h (class scoped_free_pendings): Remove constructor.
2239 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2240 method.
2241 <m_pending_block_obstack, m_pending_blocks>: New members.
2242 (pending_block_obstack, pending_blocks): Remove.
2243 (scoped_free_pendings::scoped_free_pendings): Default.
2244 (~scoped_free_pendings): Update.
2245 (free_pending_blocks): Remove.
2246 (finish_block_internal, record_pending_block, make_blockvector)
2247 (end_symtab_get_static_block, augment_type_symtab, push_context)
2248 (buildsym_init): Update.
2249
2250 2018-07-20 Tom Tromey <tom@tromey.com>
2251
2252 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2253 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2254 members.
2255 (pending_addrmap, pending_addrmap_obstack)
2256 (pending_addrmap_interesting): Remove.
2257 (scoped_free_pendings, record_block_range, make_blockvector)
2258 (prepare_for_building, reset_symtab_globals, buildsym_init):
2259 Update.
2260
2261 2018-07-20 Tom Tromey <tom@tromey.com>
2262
2263 * xcoffread.c (process_linenos): Update.
2264 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2265 * mdebugread.c (psymtab_to_symtab_1): Update.
2266 * dwarf2read.c (setup_type_unit_groups)
2267 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2268 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2269 * dbxread.c (process_one_symbol): Update.
2270 * coffread.c (coff_symtab_read, enter_linenos)
2271 (process_coff_symbol): Update.
2272 * buildsym.h (current_subfile): Don't declare.
2273 (get_current_subfile): Declare.
2274 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2275 member.
2276 (start_subfile, free_buildsym_compunit, push_subfile)
2277 (prepare_for_building, start_symtab): Update.
2278 (get_current_subfile): New function.
2279
2280 2018-07-20 Tom Tromey <tom@tromey.com>
2281
2282 * coffread.c (coff_symtab_read): Update.
2283 * xcoffread.c (read_xcoff_symtab): Update.
2284 * dwarf2read.c (new_symbol): Update.
2285 (read_func_scope, read_lexical_block_scope): Update.
2286 * dbxread.c (process_one_symbol): Update.
2287 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2288 (outermost_context_p): Remove macro.
2289 (outermost_context_p, get_current_context_stack)
2290 (get_context_stack_depth): Declare.
2291 (pop_context): Return struct context_stack.
2292 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2293 member.
2294 (context_stack_size): Remove.
2295 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2296 (prepare_for_building, end_symtab_get_static_block)
2297 (augment_type_symtab, push_context): Update.
2298 (pop_context): Return struct context_stack.
2299 (outermost_context_p, get_current_context_stack)
2300 (get_context_stack_depth): New functions.
2301 (buildsym_init): Update.
2302
2303 2018-07-20 Tom Tromey <tom@tromey.com>
2304
2305 * rust-exp.y: Now a pure parser. Update all rules.
2306 (%union): Move earlier.
2307 (current_parser, work_obstack): Remove globals.
2308 (rust_parser, ~rust_parser): Update.
2309 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2310 lex_character, lex_number, lex_string, lex_identifier,
2311 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2312 convert_name, convert_params_to_expression,
2313 convert_ast_to_expression, ast_basic_type, ast_operation,
2314 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2315 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2316 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2317 ast_array_type, ast_slice_type, ast_reference_type,
2318 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2319 (rust_parse): Update.
2320 (rustyyerror, rustyylex): Add parser parameter.
2321 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2322 (rust_lex_stringish_test, rust_lex_test_sequence)
2323 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2324 (rust_lex_test_push_back, rust_lex_tests): Update.
2325
2326 2018-07-19 Pedro Alves <palves@redhat.com>
2327
2328 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2329 gdb::unique_xmalloc_ptr.
2330 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2331 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2332 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2333 copy-initialization.
2334 * guile/scm-pretty-print.c (ppscm_print_children): Use
2335 gdb::unique_xmalloc_ptr instead of cleanups.
2336 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2337 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2338 gdb::unique_xmalloc_ptr.
2339 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2340 Adjust to use gdb::unique_xmalloc_ptr.
2341 * guile/scm-utils.c (extract_arg): Adjust.
2342 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2343 gdb::unique_xmalloc_ptr instead of a cleanup.
2344
2345 2018-07-19 Tom Tromey <tom@tromey.com>
2346
2347 * utils.c (do_value_free_to_mark)
2348 (make_cleanup_value_free_to_mark): Remove.
2349 * utils.h (make_cleanup_value_free_to_mark): Remove.
2350
2351 2018-07-19 Pedro Alves <palves@redhat.com>
2352
2353 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2354 forwarding reference.
2355
2356 2018-07-18 Pedro Alves <palves@redhat.com>
2357
2358 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2359 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2360 cleanup.
2361
2362 2018-07-18 Pedro Alves <palves@redhat.com>
2363
2364 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2365 exceptions.
2366 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2367 (gdbscm_wrap): New.
2368 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2369 directly instead of a cleanup.
2370 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2371 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2372 (vlscm_binop_gdbthrow): New, factored out from ...
2373 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2374 (vlscm_rich_compare): Use gdbscm_wrap.
2375 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2376 instead of a cleanup.
2377 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2378 cleanup.
2379 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2380 Use xfree directly instead of a cleanup.
2381 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2382 Adjust to use gdbscm_wrap and scoped_value_mark.
2383 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2384 (gdbscm_value_address, gdbscm_value_dereference)
2385 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2386 scoped_value_mark.
2387 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2388 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2389 scoped_value_mark.
2390 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2391 gdbscm_wrap and scoped_value_mark.
2392 (gdbscm_value_to_string): Use xfree directly instead of a
2393 cleanup. Move 'buffer' unique_ptr to TRY scope.
2394 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2395 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2396 scoped_value_mark.
2397 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2398 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2399 scoped_value_mark.
2400 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2401 gdbscm_wrap.
2402
2403 2018-07-18 Tom de Vries <tdevries@suse.de>
2404
2405 * findvar.c (default_read_var_value): Also resolve dynamic type for
2406 LOC_OPTIMIZED_OUT vars.
2407
2408 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2409
2410 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2411 decoding.
2412
2413 2018-07-17 Tom Tromey <tom@tromey.com>
2414
2415 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2416 (compute_enum_list, pascm_set_param_value_x)
2417 (gdbscm_parameter_value): Update.
2418 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2419 (gdbscm_scm_to_host_string): Update.
2420 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2421 Update.
2422 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2423 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2424 * guile/scm-string.c (gdbscm_scm_to_string): Return
2425 unique_xmalloc_ptr.
2426 (gdbscm_scm_to_host_string): Likewise.
2427
2428 2018-07-17 Tom Tromey <tom@tromey.com>
2429
2430 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2431 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2432 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2433 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2434 unique_xmalloc_ptr.
2435
2436 2018-07-17 Tom Tromey <tom@tromey.com>
2437
2438 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2439 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2440 Update.
2441 * guile/scm-cmd.c (cmdscm_function): Update.
2442 * guile/scm-pretty-print.c
2443 (ppscm_print_exception_unless_memory_error): Update.
2444 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2445 Return unique_xmalloc_ptr.
2446
2447 2018-07-17 Tom Tromey <tom@tromey.com>
2448
2449 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2450 Use string_printf.
2451
2452 2018-07-17 Jim Wilson <jimw@sifive.com>
2453
2454 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2455 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2456 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2457 unecessary braces after EF_RISCV_RVC test. Delete call to
2458 set_gdbarch_decr_pc_after_break.
2459
2460 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2461 RISCV_LAST_FP_REGNUM + 1.
2462 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2463
2464 2018-07-17 Tom Tromey <tom@tromey.com>
2465
2466 * configure.ac: Remove --disable-gdbcli.
2467 * configure: Rebuild.
2468 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2469 (SUBDIR_CLI_CFLAGS): Remove.
2470 (SFILES): Use SUBDIR_CLI_SRCS.
2471 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2472
2473 2018-07-17 Tom Tromey <tom@tromey.com>
2474
2475 PR gdb/18624:
2476 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2477
2478 2018-07-16 Jim Wilson <jimw@sifive.com>
2479
2480 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2481
2482 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2485 variable.
2486 (libunwind_frame_sniffer): Likewise.
2487 (libunwind_frame_prev_register): Likewise.
2488 (libunwind_sigtramp_frame_sniffer): Likewise.
2489 * ia64-tdep.c (ia64_access_reg): Likewise.
2490 (ia64_access_rse_reg): Likewise.
2491 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2492 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2493
2494 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2497
2498 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * remote-sim.c (gdbsim_target::close,
2501 gdbsim_target::mourn_inferior): Remove unused variables.
2502
2503 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2504
2505 * ia64-tdep.c (ktab_buf): New global.
2506 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2507 (get_kernel_table): Adjust.
2508
2509 2018-07-16 Tom Tromey <tom@tromey.com>
2510
2511 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2512 * dwarf2read.c (using_directives, new_symbol): Use
2513 outermost_context_p.
2514 * dbxread.c (process_one_symbol): Use outermost_context_p.
2515 * coffread.c (coff_symtab_read): Use outermost_context_p.
2516
2517 2018-07-16 Tom Tromey <tom@tromey.com>
2518
2519 * dwarf2read.c (using_directives, read_func_scope)
2520 (read_lexical_block_scope): Update.
2521 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2522 * buildsym.h (local_using_directives, global_using_directives):
2523 Don't declare.
2524 (get_local_using_directives, set_local_using_directives)
2525 (get_global_using_directives): Declare.
2526 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2527 m_global_using_directives>: New members.
2528 (finish_block_internal, prepare_for_building)
2529 (reset_symtab_globals, end_symtab_get_static_block)
2530 (push_context): Update.
2531 (get_local_using_directives, set_local_using_directives)
2532 (get_global_using_directives): New functions.
2533 (buildsym_init): Update.
2534
2535 2018-07-16 Tom Tromey <tom@tromey.com>
2536
2537 * xcoffread.c (xcoff_initial_scan): Don't call
2538 free_pending_blocks.
2539 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2540 * buildsym.h (class scoped_free_pendings): Add constructor.
2541 (free_pending_blocks): Don't declare.
2542 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2543 (free_pending_blocks): Now static.
2544
2545 2018-07-16 Tom Tromey <tom@tromey.com>
2546
2547 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2548 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2549 member.
2550 (struct subfile_stack): Remove.
2551 (subfile_stack): Remove.
2552 (push_subfile, pop_subfile, buildsym_init): Update.
2553
2554 2018-07-16 Tom Tromey <tom@tromey.com>
2555
2556 * buildsym.c (push_subfile): Use gdb_assert.
2557 (pop_subfile): Use gdb_assert.
2558
2559 2018-07-16 Tom Tromey <tom@tromey.com>
2560
2561 * buildsym.h (merge_symbol_lists): Remove.
2562 * buildsym.c (merge_symbol_lists): Remove.
2563
2564 2018-07-16 Tom Tromey <tom@tromey.com>
2565
2566 * stabsread.c (scan_file_globals): Update comment.
2567 * stabsread.h (scan_file_globals): Move from buildsym.h.
2568 * buildsym.h (scan_file_globals): Move to stabsread.h.
2569
2570 2018-07-16 Tom Tromey <tom@tromey.com>
2571
2572 * xcoffread.c (xcoff_new_init): Update.
2573 * mipsread.c (mipscoff_new_init): Update.
2574 * mdebugread.c (mdebug_build_psymtabs): Update.
2575 * elfread.c (elf_new_init): Update.
2576 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2577 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2578 * buildsym.h (buildsym_new_init): Don't declare.
2579 * buildsym.c (buildsym_new_init): Remove.
2580
2581 2018-07-16 Tom Tromey <tom@tromey.com>
2582
2583 * stabsread.h (within_function): Move from buildsym.h.
2584 * stabsread.c (start_stabs): Clear within_function.
2585 * coffread.c (coff_start_symtab): Clear within_function.
2586 * buildsym.h (within_function): Move to stabsread.h.
2587 * buildsym.c (prepare_for_building): Update.
2588
2589 2018-07-16 Tom Tromey <tom@tromey.com>
2590
2591 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2592 * dwarf2read.c (dwarf2_start_symtab): Don't set
2593 processing_gcc_compilation.
2594 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2595
2596 2018-07-16 Tom Tromey <tom@tromey.com>
2597
2598 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2599 (next_symbol_text_func): Move from buildsym.h.
2600 * stabsread.c (hashname): Move from buildsym.c.
2601 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2602 (next_symbol_text_func, hashname): Move to stabsread.h.
2603 * buildsym.c: Don't include bcache.h
2604 (hashname): Move to stasbread.c.
2605
2606 2018-07-16 Tom Tromey <tom@tromey.com>
2607
2608 * buildsym.h (context_stack_size): Don't declare.
2609 * buildsym.c (context_stack_size): New global.
2610
2611 2018-07-16 Tom Tromey <tom@tromey.com>
2612
2613 * dbxread.c (processing_acc_compilation): New global.
2614 * buildsym.h (processing_acc_compilation): Don't declare.
2615
2616 2018-07-16 Tom Tromey <tom@tromey.com>
2617
2618 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2619 * dbxread.c (read_ofile_symtab): Update.
2620 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2621 * buildsym.h (last_source_start_addr): Remove.
2622 (set_last_source_start_addr, get_last_source_start_addr):
2623 Declare.
2624 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2625 parameter.
2626 (struct buildsym_compunit) <m_last_source_start_addr>: New
2627 member.
2628 (prepare_for_building): Remove start_addr parameter.
2629 (start_symtab, restart_symtab, end_symtab_get_static_block)
2630 (end_symtab_with_blockvector): Update.
2631 (set_last_source_start_addr, get_last_source_start_addr): New
2632 functions.
2633
2634 2018-07-16 Tom Tromey <tom@tromey.com>
2635
2636 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2637 member.
2638 (have_line_numbers): Remove.
2639 (record_line, prepare_for_building, end_symtab_get_static_block)
2640 (augment_type_symtab): Update.
2641
2642 2018-07-16 Tom Tromey <tom@tromey.com>
2643
2644 * buildsym.c (~buildsym_compunit): Free the macro table.
2645 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2646 methods.
2647 <m_pending_macros>: New member.
2648 (pending_macros): Remove.
2649 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2650 (reset_symtab_globals, end_symtab_get_static_block)
2651 (end_symtab_with_blockvector, augment_type_symtab)
2652 (buildsym_init): Update.
2653
2654 2018-07-16 Tom Tromey <tom@tromey.com>
2655
2656 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2657 parameter.
2658 (buildsym_compunit::set_last_source_file): New method.
2659 <m_last_source_file>: New member.
2660 (prepare_for_building): Remove "name" parameter.
2661 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2662 (last_source_file): Remove.
2663 (set_last_source_file, get_last_source_file): Update.
2664
2665 2018-07-16 Tom Tromey <tom@tromey.com>
2666
2667 * buildsym.c (prepare_for_building): Add assert.
2668
2669 2018-07-16 Tom Tromey <tom@tromey.com>
2670
2671 * buildsym.c (~buildsym_compunit): Update.
2672 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2673 (start_subfile, patch_subfile_names)
2674 (end_symtab_with_blockvector): Update.
2675
2676 2018-07-16 Tom Tromey <tom@tromey.com>
2677
2678 * buildsym.c (struct buildsym_compunit): Add constructor,
2679 destructor, initializers.
2680 (start_buildsym_compunit): Remove.
2681 (free_buildsym_compunit): Use "delete".
2682 (start_symtab, restart_symtab): Use "new".
2683
2684 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2685
2686 * symfile.c (set_objfile_default_section_offset): Remove struct
2687 keyword.
2688
2689 2018-07-14 Stafford Horne <shorne@gmail.com>
2690
2691 * (Responsible Maintainers): Add myself as or1k maintainer.
2692
2693 2018-07-13 Tom Tromey <tom@tromey.com>
2694
2695 * symfile.c (set_objfile_default_section_offset): Use extra braces
2696 around initializer.
2697
2698 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2699
2700 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2701 non-branching basr.
2702
2703 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2704
2705 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2706 unittests/cli-utils-selftests.c
2707 * unittests/cli-utils-selftests.c: New file.
2708
2709 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2710
2711 * NEWS: Mention new commands. Mention change to 'thread apply'.
2712
2713 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2714
2715 * thread.c (thr_try_catch_cmd): New function.
2716 (thread_apply_all_command): Handle qcs flags.
2717 (thread_apply_command): Handle qcs flags.
2718 (taas_command): New function.
2719 (tfaas_command): New function.
2720 (_initialize_thread): Update to setup the new commands 'taas
2721 and 'tfaas'. Change doc string for 'thread apply'.
2722
2723 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2724
2725 * stack.c: (trailing_outermost_frame): New function, mostly
2726 extracted from backtrace_command_1.
2727 (leading_innermost_frame): New function.
2728 (backtrace_command_1): Update to call trailing_outermost_frame.
2729 (frame_apply_command_count): New function.
2730 (frame_apply_level_command): New function.
2731 (frame_apply_all_command): New function.
2732 (frame_apply_command): New function.
2733 (faas_command): New function.
2734 (frame_cmd_list): New variable.
2735 (_initialize_stack): Update to setup the new commands 'frame apply'
2736 and 'faas'.
2737
2738 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2739
2740 * cli-utils.c (number_or_range_parser::get_number): Only handle
2741 numbers or convenience var as numbers.
2742 (parse_flags): New function.
2743 (parse_flags_qcs): New function.
2744 (number_or_range_parser::finished): Ensure parsing end is detected
2745 before end of string.
2746 * cli-utils.h (parse_flags): New function.
2747 (parse_flags_qcs): New function.
2748 (number_or_range_parser): Remove m_finished bool.
2749 (number_or_range_parser::skip_range): Set m_in_range to false.
2750
2751 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2752
2753 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2754 on Windows.
2755
2756 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2757 Jan Kratochvil <jan.kratochvil@redhat.com>
2758 Paul Fertser <fercerpav@gmail.com>
2759 Tsutomu Seki <sekiriki@gmail.com>
2760 Pedro Alves <palves@redhat.com>
2761
2762 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2763 'unittests/parse-connection-spec-selftests.c'.
2764 (COMMON_SFILES): Add 'common/netstuff.c'.
2765 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2766 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2767 * common/netstuff.c: New file.
2768 * common/netstuff.h: New file.
2769 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2770 (wait_for_connect): Update comment. New parameter
2771 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2772 Use 'sock' directly instead of 'scb->fd'.
2773 (try_connect): New function, with code from 'net_open'.
2774 (net_open): Rewrite main loop to deal with multiple
2775 sockets/addresses. Handle IPv6-style hostnames; implement
2776 support for IPv6 connections.
2777 * unittests/parse-connection-spec-selftests.c: New file.
2778
2779 2018-07-11 Pedro Alves <palves@redhat.com>
2780
2781 PR gdb/23377
2782 * remote.c (remote_target::remote_detach_pid): Call
2783 set_current_process.
2784
2785 2018-07-11 Pedro Alves <palves@redhat.com>
2786
2787 * h8300-tdep.c (h8300_gdbarch_init): Remove
2788 set_gdbarch_ecoff_reg_to_regnum calls.
2789
2790 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2791
2792 PR c++/23373
2793 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2794 offsets/sizes for static members of a class/struct.
2795
2796 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2797
2798 * target-descriptions.c (tdesc_register_bitsize): Rename.
2799 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2800 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2801 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2802
2803 2018-07-10 Tom Tromey <tom@tromey.com>
2804
2805 * breakpoint.c (moribund_locations): Now static and a
2806 std::vector.
2807 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2808 (build_bpstat_chain, update_global_location_list)
2809 (breakpoint_retire_moribund): Update.
2810 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2811 VEC.
2812
2813 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2814
2815 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2816 (riscv_register_reggroup_p): Use new function, remove unneeded
2817 parenthesis.
2818 (riscv_push_dummy_call): Extend assert to compare against xlen or
2819 flen based on register type.
2820
2821 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2822
2823 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2824
2825 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2826
2827 * remote.c (show_hardware_watchpoint_limit): New function.
2828 (show_hardware_watchpoint_length_limit): New function.
2829 (show_hardware_breakpoint_limit): New function.
2830 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2831 where appropriate, update help text.
2832
2833 2018-07-09 Tom Tromey <tom@tromey.com>
2834
2835 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2836 (CLIBS): Don't mention NAT_CLIBS.
2837
2838 2018-07-09 Tom Tromey <tom@tromey.com>
2839
2840 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2841 (LIBGDB_OBS, clean mostlyclean): Update.
2842 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2843
2844 2018-07-09 Tom Tromey <tom@tromey.com>
2845
2846 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2847 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2848 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2849
2850 2018-07-09 Tom Tromey <tom@tromey.com>
2851
2852 * Makefile.in (ALLDEPFILES): Remove exec.c.
2853 (COMMON_OBS): Remove exec.o.
2854 (COMMON_SFILES): Add exec.c.
2855
2856 2018-07-09 Tom Tromey <tom@tromey.com>
2857
2858 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2859
2860 2018-07-09 Tom Tromey <tom@tromey.com>
2861
2862 * Makefile.in (clean mostlyclean): Remove stamp-version.
2863 (version.c): Depend on stamp-version.
2864 (stamp-version): New rule, from version.c rule.
2865
2866 2018-07-09 Tom Tromey <tom@tromey.com>
2867
2868 * Makefile.in (init.c): Depend on stamp-init.
2869 (stamp-init): New rule, from init.c rule.
2870 (clean mostlyclean): Remove stamp-init.
2871
2872 2018-07-09 Tom Tromey <tom@tromey.com>
2873
2874 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2875 SUBDIR_GCC_COMPILE_SRCS.
2876
2877 2018-07-09 Tom Tromey <tom@tromey.com>
2878
2879 * Makefile.in (init.c): Remove some unused sed rules.
2880
2881 2018-07-09 Tom Tromey <tom@tromey.com>
2882
2883 * Makefile.in (TSOBS): Remove.
2884 (INIT_FILES): Update.
2885 (LIBGDB_OBS): Update.
2886 (COMMON_SFILES): Add inflow.c.
2887 (SFILES): Remove inflow.c.
2888
2889 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2890
2891 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2892
2893 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2894
2895 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2896 get_saveloc_name, is_signal_frame_name, step_name,
2897 init_remote_name, create_addr_space_name,
2898 destroy_addr_space_name, search_unwind_table_name,
2899 find_dyn_list_name): Constify.
2900
2901 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2902
2903 * darwin-nat.c (darwin_pthread_kill): New function.
2904 (darwin_resume_thread): Use darwin_pthread_kill.
2905
2906 2018-07-05 Tom de Vries <tdevries@suse.de>
2907
2908 * macroexp.c (macro_buffer) <operator=>: New member function.
2909
2910 2018-07-04 Tom Tromey <tom@tromey.com>
2911
2912 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2913
2914 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2915
2916 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2917 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2918 * maint.c: Likewise.
2919 * top.c: Likewise.
2920
2921 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2922
2923 * NEWS: Create a new section for the next release branch.
2924 Rename the section of the current branch, now that it has
2925 been cut.
2926
2927 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2928
2929 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2930 * version.in: Bump version to 8.2.50.DATE-git.
2931
2932 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2933 Pedro Alves <palves@redhat.com>
2934
2935 * linux-nat.c (linux_init_ptrace): Rename to ...
2936 (linux_init_ptrace_procfs): ... this. Call
2937 linux_proc_init_warnings.
2938 (linux_nat_target::post_attach)
2939 (linux_nat_target::post_startup_inferior): Adjust.
2940 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2941 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2942
2943 2018-07-04 Tom de Vries <tdevries@suse.de>
2944
2945 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2946 check ...
2947 (read_comp_unit_head): ... here.
2948
2949 2018-07-03 Tom Tromey <tom@tromey.com>
2950
2951 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2952 (stop_tracing, tstatus_command)
2953 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2954 (print_one_static_tracepoint_marker): Update.
2955 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2956 std::vector.
2957 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2958 VEC.
2959 (all_tracepoints, static_tracepoints_here): Return std::vector.
2960
2961 2018-07-03 Tom Tromey <tom@tromey.com>
2962
2963 * common/ptid.c (ptid_equal): Remove.
2964 * common/ptid.h (ptid_equal): Don't declare.
2965 * ada-tasks.c: Update.
2966 * breakpoint.c: Update.
2967 * common/agent.c: Update.
2968 * corelow.c: Update.
2969 * darwin-nat-info.c: Update.
2970 * darwin-nat.c: Update.
2971 * dcache.c: Update.
2972 * dtrace-probe.c: Update.
2973 * dummy-frame.c: Update.
2974 * fbsd-nat.c: Update.
2975 * frame.c: Update.
2976 * gdbthread.h: Update.
2977 * gnu-nat.c: Update.
2978 * go32-nat.c: Update.
2979 * inf-loop.c: Update.
2980 * inf-ptrace.c: Update.
2981 * infcall.c: Update.
2982 * infcmd.c: Update.
2983 * inflow.c: Update.
2984 * infrun.c: Update.
2985 * linux-fork.c: Update.
2986 * linux-nat.c: Update.
2987 * linux-thread-db.c: Update.
2988 * mi/mi-cmd-var.c: Update.
2989 * mi/mi-interp.c: Update.
2990 * mi/mi-main.c: Update.
2991 * nto-procfs.c: Update.
2992 * ppc-linux-tdep.c: Update.
2993 * procfs.c: Update.
2994 * python/py-inferior.c: Update.
2995 * python/py-record-btrace.c: Update.
2996 * python/py-record.c: Update.
2997 * ravenscar-thread.c: Update.
2998 * regcache.c: Update.
2999 * remote-sim.c: Update.
3000 * remote.c: Update.
3001 * sol-thread.c: Update.
3002 * solib.c: Update.
3003 * target.c: Update.
3004 * tui/tui-stack.c: Update.
3005 * varobj.c: Update.
3006 * windows-nat.c: Update.
3007 * windows-tdep.c: Update.
3008
3009 2018-07-03 Tom Tromey <tom@tromey.com>
3010
3011 * common/ptid.c (ptid_match): Remove.
3012 * common/ptid.h (ptid_match): Don't declare.
3013 * fbsd-nat.c: Update.
3014 * infcmd.c: Update.
3015 * infrun.c: Update.
3016 * linux-nat.c: Update.
3017 * record-btrace.c: Update.
3018 * regcache.c: Update.
3019 * remote.c: Update.
3020
3021 2018-07-03 Tom Tromey <tom@tromey.com>
3022
3023 * common/ptid.c (ptid_tid_p): Remove.
3024 * common/ptid.h (ptid_tid_p): Don't declare.
3025 * sol-thread.c: Update.
3026
3027 2018-07-03 Tom Tromey <tom@tromey.com>
3028
3029 * common/ptid.c (ptid_lwp_p): Remove.
3030 * common/ptid.h (ptid_lwp_p): Don't declare.
3031 * fbsd-nat.c: Update.
3032 * linux-nat.c: Update.
3033 * nat/linux-procfs.c: Update.
3034 * nat/x86-linux-dregs.c: Update.
3035 * sol-thread.c: Update.
3036
3037 2018-07-03 Tom Tromey <tom@tromey.com>
3038
3039 * common/ptid.c (ptid_is_pid): Remove.
3040 * common/ptid.h (ptid_is_pid): Don't declare.
3041 * infrun.c: Update.
3042 * linux-nat.c: Update.
3043 * mi/mi-interp.c: Update.
3044 * remote.c: Update.
3045 * thread.c: Update.
3046
3047 2018-07-03 Tom Tromey <tom@tromey.com>
3048
3049 * common/ptid.c (ptid_get_tid): Remove.
3050 * common/ptid.h (ptid_get_tid): Don't declare.
3051 * ada-tasks.c: Update.
3052 * aix-thread.c: Update.
3053 * bsd-uthread.c: Update.
3054 * darwin-nat.c: Update.
3055 * fbsd-nat.c: Update.
3056 * i386-darwin-nat.c: Update.
3057 * infrun.c: Update.
3058 * linux-tdep.c: Update.
3059 * nto-procfs.c: Update.
3060 * ppc-ravenscar-thread.c: Update.
3061 * python/py-infthread.c: Update.
3062 * ravenscar-thread.c: Update.
3063 * sol-thread.c: Update.
3064 * sparc-ravenscar-thread.c: Update.
3065 * windows-nat.c: Update.
3066
3067 2018-07-03 Tom Tromey <tom@tromey.com>
3068
3069 * common/ptid.c (ptid_get_lwp): Remove.
3070 * common/ptid.h (ptid_get_lwp): Don't declare.
3071 * aarch64-linux-nat.c: Update.
3072 * ada-tasks.c: Update.
3073 * aix-thread.c: Update.
3074 * amd64-linux-nat.c: Update.
3075 * arm-linux-nat.c: Update.
3076 * corelow.c: Update.
3077 * fbsd-nat.c: Update.
3078 * fbsd-tdep.c: Update.
3079 * gnu-nat.c: Update.
3080 * i386-cygwin-tdep.c: Update.
3081 * i386-gnu-nat.c: Update.
3082 * i386-linux-nat.c: Update.
3083 * ia64-linux-nat.c: Update.
3084 * inf-ptrace.c: Update.
3085 * infrun.c: Update.
3086 * linux-fork.c: Update.
3087 * linux-nat.c: Update.
3088 * linux-tdep.c: Update.
3089 * linux-thread-db.c: Update.
3090 * mips-linux-nat.c: Update.
3091 * nat/aarch64-linux-hw-point.c: Update.
3092 * nat/aarch64-linux.c: Update.
3093 * nat/linux-btrace.c: Update.
3094 * nat/linux-osdata.c: Update.
3095 * nat/linux-procfs.c: Update.
3096 * nat/x86-linux-dregs.c: Update.
3097 * obsd-nat.c: Update.
3098 * ppc-fbsd-nat.c: Update.
3099 * ppc-linux-nat.c: Update.
3100 * procfs.c: Update.
3101 * python/py-infthread.c: Update.
3102 * ravenscar-thread.c: Update.
3103 * remote.c: Update.
3104 * s390-linux-nat.c: Update.
3105 * sol-thread.c: Update.
3106 * sol2-tdep.c: Update.
3107 * spu-linux-nat.c: Update.
3108 * x86-linux-nat.c: Update.
3109 * xtensa-linux-nat.c: Update.
3110
3111 2018-07-03 Tom Tromey <tom@tromey.com>
3112
3113 * common/ptid.c (ptid_get_pid): Remove.
3114 * common/ptid.h (ptid_get_pid): Don't declare.
3115 * aarch64-linux-nat.c: Update.
3116 * ada-lang.c: Update.
3117 * aix-thread.c: Update.
3118 * alpha-bsd-nat.c: Update.
3119 * amd64-fbsd-nat.c: Update.
3120 * amd64-linux-nat.c: Update.
3121 * arm-linux-nat.c: Update.
3122 * arm-nbsd-nat.c: Update.
3123 * auxv.c: Update.
3124 * break-catch-syscall.c: Update.
3125 * breakpoint.c: Update.
3126 * bsd-uthread.c: Update.
3127 * corelow.c: Update.
3128 * ctf.c: Update.
3129 * darwin-nat.c: Update.
3130 * fbsd-nat.c: Update.
3131 * fbsd-tdep.c: Update.
3132 * gcore.c: Update.
3133 * gnu-nat.c: Update.
3134 * hppa-nbsd-nat.c: Update.
3135 * hppa-obsd-nat.c: Update.
3136 * i386-fbsd-nat.c: Update.
3137 * ia64-linux-nat.c: Update.
3138 * inf-ptrace.c: Update.
3139 * infcmd.c: Update.
3140 * inferior.c: Update.
3141 * inferior.h: Update.
3142 * inflow.c: Update.
3143 * infrun.c: Update.
3144 * linux-fork.c: Update.
3145 * linux-nat.c: Update.
3146 * linux-tdep.c: Update.
3147 * linux-thread-db.c: Update.
3148 * m68k-bsd-nat.c: Update.
3149 * mi/mi-interp.c: Update.
3150 * mi/mi-main.c: Update.
3151 * mips-linux-nat.c: Update.
3152 * mips-nbsd-nat.c: Update.
3153 * mips64-obsd-nat.c: Update.
3154 * nat/aarch64-linux-hw-point.c: Update.
3155 * nat/aarch64-linux.c: Update.
3156 * nat/linux-btrace.c: Update.
3157 * nat/linux-osdata.c: Update.
3158 * nat/linux-procfs.c: Update.
3159 * nat/x86-linux-dregs.c: Update.
3160 * nto-procfs.c: Update.
3161 * obsd-nat.c: Update.
3162 * ppc-linux-nat.c: Update.
3163 * ppc-nbsd-nat.c: Update.
3164 * ppc-obsd-nat.c: Update.
3165 * proc-service.c: Update.
3166 * procfs.c: Update.
3167 * python/py-inferior.c: Update.
3168 * python/py-infthread.c: Update.
3169 * ravenscar-thread.c: Update.
3170 * record.c: Update.
3171 * remote-sim.c: Update.
3172 * remote.c: Update.
3173 * rs6000-nat.c: Update.
3174 * s390-linux-nat.c: Update.
3175 * sh-nbsd-nat.c: Update.
3176 * sol-thread.c: Update.
3177 * sparc-nat.c: Update.
3178 * sparc64-tdep.c: Update.
3179 * spu-linux-nat.c: Update.
3180 * spu-tdep.c: Update.
3181 * target-debug.h: Update.
3182 * target.c: Update.
3183 * thread.c: Update.
3184 * tid-parse.c: Update.
3185 * tracefile-tfile.c: Update.
3186 * vax-bsd-nat.c: Update.
3187 * windows-nat.c: Update.
3188 * x86-linux-nat.c: Update.
3189 * x86-nat.c: Update.
3190
3191 2018-07-03 Tom Tromey <tom@tromey.com>
3192
3193 * common/ptid.c (pid_to_ptid): Remove.
3194 * common/ptid.h (pid_to_ptid): Don't declare.
3195 * aix-thread.c: Update.
3196 * arm-linux-nat.c: Update.
3197 * common/ptid.c: Update.
3198 * common/ptid.h: Update.
3199 * corelow.c: Update.
3200 * ctf.c: Update.
3201 * darwin-nat.c: Update.
3202 * fbsd-nat.c: Update.
3203 * fork-child.c: Update.
3204 * gnu-nat.c: Update.
3205 * go32-nat.c: Update.
3206 * inf-ptrace.c: Update.
3207 * infcmd.c: Update.
3208 * inferior.c: Update.
3209 * infrun.c: Update.
3210 * linux-fork.c: Update.
3211 * linux-nat.c: Update.
3212 * nat/aarch64-linux-hw-point.c: Update.
3213 * nat/fork-inferior.c: Update.
3214 * nat/x86-linux-dregs.c: Update.
3215 * nto-procfs.c: Update.
3216 * obsd-nat.c: Update.
3217 * procfs.c: Update.
3218 * progspace.c: Update.
3219 * remote.c: Update.
3220 * rs6000-nat.c: Update.
3221 * s390-linux-nat.c: Update.
3222 * sol-thread.c: Update.
3223 * spu-linux-nat.c: Update.
3224 * target.c: Update.
3225 * top.c: Update.
3226 * tracefile-tfile.c: Update.
3227 * windows-nat.c: Update.
3228
3229 2018-07-03 Tom Tromey <tom@tromey.com>
3230
3231 * common/ptid.h (ptid_build): Don't declare.
3232 * common/ptid.c (ptid_build): Remove.
3233 * aix-thread.c: Update.
3234 * bsd-kvm.c: Update.
3235 * bsd-uthread.c: Update.
3236 * common/agent.c: Update.
3237 * common/ptid.c: Update.
3238 * common/ptid.h: Update.
3239 * corelow.c: Update.
3240 * darwin-nat.c: Update.
3241 * fbsd-nat.c: Update.
3242 * gnu-nat.c: Update.
3243 * linux-fork.c: Update.
3244 * linux-nat.c: Update.
3245 * linux-thread-db.c: Update.
3246 * nat/linux-osdata.c: Update.
3247 * nat/linux-procfs.c: Update.
3248 * nto-procfs.c: Update.
3249 * obsd-nat.c: Update.
3250 * proc-service.c: Update.
3251 * procfs.c: Update.
3252 * ravenscar-thread.c: Update.
3253 * remote-sim.c: Update.
3254 * remote.c: Update.
3255 * sol-thread.c: Update.
3256 * target.c: Update.
3257 * windows-nat.c: Update.
3258
3259 2018-07-03 Tom Tromey <tom@tromey.com>
3260
3261 * infrun.c (follow_exec): Use exit_inferior_silent.
3262 * inferior.c (exit_inferior_num_silent): Remove.
3263 * inferior.h (exit_inferior_num_silent): Don't declare.
3264
3265 2018-07-03 Tom Tromey <tom@tromey.com>
3266
3267 PR cli/23340:
3268 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3269 inferior_ptid on error.
3270
3271 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3272 Simon Marchi <simon.marchi@polymtl.ca>
3273
3274 PR tdep/8282
3275 * disasm.h (gdb_disassembler): Add
3276 `m_disassembler_options_holder'. member
3277 * disasm.c (get_all_disassembler_options): New function.
3278 (gdb_disassembler::gdb_disassembler): Use it.
3279 (gdb_buffered_insn_length_init_dis): Likewise.
3280 (gdb_buffered_insn_length): Adjust accordingly.
3281 (set_disassembler_options): Handle options with arguments.
3282 (show_disassembler_options_sfunc): Likewise. Add a leading new
3283 line if showing options with descriptions.
3284 (disassembler_options_completer): Adapt to using the
3285 `disasm_options_and_args_t' structure.
3286 * mips-tdep.c (mips_disassembler_options): New variable.
3287 (mips_disassembler_options_o32): Likewise.
3288 (mips_disassembler_options_n32): Likewise.
3289 (mips_disassembler_options_n64): Likewise.
3290 (gdb_print_insn_mips): Don't set `disassembler_options'.
3291 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3292 functions.
3293 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3294 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3295 `gdbarch_disassembler_options_implicit' and
3296 `gdbarch_valid_disassembler_options'.
3297 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3298 `disasm_options_and_args_t' structure.
3299 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3300 method.
3301 (valid_disassembler_options): Switch from `disasm_options_t' to
3302 the `disasm_options_and_args_t' structure.
3303 * NEWS: Document `set disassembler-options' support for the MIPS
3304 target.
3305 * gdbarch.h: Regenerate.
3306 * gdbarch.c: Regenerate.
3307
3308 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3309
3310 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3311
3312 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3313
3314 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3315 parameter in call to amd64_target_description.
3316 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3317 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3318 (amd64fbsd_init_abi): Likewise.
3319 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3320 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3321 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3322 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3323
3324 2018-06-29 Pedro Alves <palves@redhat.com>
3325
3326 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3327 "segments" parameter.
3328 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3329 (_initialize_amd64_tdep): Update call to
3330 amd64_create_target_description.
3331 (amd64_target_description): Add "segments" parameter. Adjust
3332 the implementation to use it.
3333 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3334 call to amd64_create_target_description.
3335 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3336 * gdb/arch/amd64.h (amd64_create_target_description): Add
3337 "segments" register.
3338 * gdb/arch/amd64.c (amd64_create_target_description): Add
3339 "segments" parameter. Call create_feature_i386_64bit_segments
3340 only if SEGMENTS is true.
3341 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3342 call to amd64_create_target_description.
3343
3344 2018-06-29 Pedro Alves <palves@redhat.com>
3345
3346 * thread.c (thread_target_id_str): New, factored out from ...
3347 (print_thread_info_1): ... here. Use it to compute the max
3348 "Target Id" column width.
3349
3350 2018-06-29 Pedro Alves <palves@redhat.com>
3351
3352 * remote.c (remote_target::extra_thread_info): Delete
3353 'display_buf' and 'n' locals. from the cache, regardless of
3354 packet mechanims is in use. Use cache for qThreadExtra and qP
3355 methods too.
3356
3357 2018-06-29 Pedro Alves <palves@redhat.com>
3358
3359 * blockframe.c (find_pc_sect_containing_function): New function.
3360 * breakpoint.c (print_breakpoint_location): Don't call
3361 find_pc_sect_function.
3362 * linespec.c (create_sals_line_offset): Record the location's
3363 symbol in the sal.
3364 * linespec.c (convert_address_location_to_sals): Fill in sal's
3365 symbol with find_pc_sect_containing_function.
3366 * symtab.c (find_function_start_sal): Rename to ...
3367 (find_function_start_sal_1): ... this.
3368 (find_function_start_sal): Reimplement as wrapper around
3369 find_function_start_sal_1, and use
3370 find_pc_sect_containing_function to fill in the sal's symbol.
3371 (find_function_start_sal(symbol*, bool)): Adjust.
3372 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3373 comments.
3374 (find_pc_sect_containing_function): Declare.
3375
3376 2018-06-29 Pedro Alves <palves@redhat.com>
3377
3378 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3379 true if the the location has no symbol.
3380
3381 2018-06-28 Tom Tromey <tom@tromey.com>
3382
3383 * NEWS: Mention --enable-codesign.
3384 * silent-rules.mk (ECHO_SIGN): New variable.
3385 * configure.ac: Add --enable-codesign.
3386 * configure: Rebuild.
3387 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3388 (gdb$(EXEEXT)): Optionally invoke codesign.
3389
3390 2018-06-28 Pedro Alves <palves@redhat.com>
3391
3392 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3393 comments.
3394 (switch_to_thread_no_regs): Adjust comment.
3395 * infcmd.c (stop_pc): Delete.
3396 (post_create_inferior, info_program_command): Replace references
3397 to stop_pc with references to thread_info->suspend.stop_pc.
3398 * inferior.h (stop_pc): Delete declaration.
3399 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3400 (handle_inferior_event_1, handle_signal_stop)
3401 (process_event_stop_test, keep_going_stepped_thread)
3402 (handle_step_into_function, handle_step_into_function_backward)
3403 (print_stop_location): Replace references to stop_pc with
3404 references to thread_info->suspend.stop_pc.
3405 (struct infcall_suspend_state) <stop_pc>: Delete field.
3406 (save_infcall_suspend_state, restore_infcall_suspend_state):
3407 Remove references to inf_stat->stop_pc.
3408 * linux-fork.c (fork_load_infrun_state): Likewise.
3409 * record-btrace.c (record_btrace_set_replay): Likewise.
3410 * record-full.c (record_full_goto_entry): Likewise.
3411 * remote.c (print_one_stopped_thread): Likewise.
3412 * target.c (target_resume): Extend comment.
3413 * thread.c (set_executing_thread): New.
3414 (set_executing): Use it.
3415 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3416 Remove references to stop_pc.
3417
3418 2018-06-28 Pedro Alves <palves@redhat.com>
3419
3420 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3421 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3422
3423 2018-06-28 Tom Tromey <tom@tromey.com>
3424
3425 * coffread.c (coff_symfile_finish): Update.
3426 * xcoffread.c (xcoff_symfile_finish): Update.
3427 * elfread.c (elf_symfile_finish): Update.
3428 * symfile.h (dwarf2_free_objfile): Don't declare.
3429 * dwarf2read.c (_initialize_dwarf2_read): Use
3430 register_objfile_data_with_cleanup.
3431 (dwarf2_free_objfile): Now static. Change signature.
3432
3433 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3434
3435 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3436 option "-o" to add-symbol-file-load to add an offset to each
3437 section's load address.
3438 * symfile.c (set_objfile_default_section_offset): New function.
3439
3440 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3441
3442 * symfile.c (add_symbol_file_command): Make sure that sections
3443 with the same name are sorted in the same order.
3444
3445 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3446
3447 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3448 require the second argument. If omitted, load sections at the
3449 addresses specified in the file.
3450
3451 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3452
3453 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3454 (_initialize_symfile): Add option "-o" to symbol-file to add an
3455 offset to each section of the symbol file.
3456
3457 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3458
3459 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3460
3461 2018-06-27 Tom Tromey <tom@tromey.com>
3462
3463 * stack.c (_initialize_stack): Update "func" help text.
3464
3465 2018-06-27 Tom Tromey <tom@tromey.com>
3466
3467 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3468 std::vector.
3469 (unwind_infopy_str, pyuw_create_unwind_info)
3470 (unwind_infopy_add_saved_register, pyuw_sniffer)
3471 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3472 Update.
3473 (struct saved_reg): Add constructor.
3474 <value>: Now a gdbpy_ref<>.
3475
3476 2018-06-27 Tom Tromey <tom@tromey.com>
3477
3478 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3479
3480 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3481
3482 * gdb-gdb.py.in: Format using autopep8.
3483
3484 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3487 (type_lookup_function): Recognize CORE_ADDR values.
3488
3489 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3490
3491 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3492 print tag_name.
3493
3494 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3495
3496 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3497 <__lt__>: Add.
3498
3499 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3500
3501 * gdb-gdb.py: Move to...
3502 * gdb-gdb.py.in: ... here.
3503 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3504 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3505 dependencies.
3506 (distclean): Remove gdb-gdb.py when cleaning.
3507 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3508 * configure: Re-generate.
3509
3510 2018-06-27 Pedro Alves <palves@redhat.com>
3511
3512 * proc-service.c (get_ps_regcache): New.
3513 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3514 (ps_lsetfpregs): Use it.
3515
3516 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3517
3518 PR gdb/21695
3519 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3520 (dwarf_decode_lines_1): Adjust.
3521
3522 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3523
3524 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3525 override.
3526 <info_proc>: Likewise.
3527
3528 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3529
3530 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3531 to windows_fetch_one_register, and only handle the case of
3532 fetching one register. Move the code that reloads the context
3533 and iterates over all registers if R is negative to...
3534 (windows_nat_target::fetch_registers): ... here.
3535 (do_windows_store_inferior_registers): Rename to
3536 windows_store_one_register, and only handle the case of storing
3537 one register. Move the code that handles the case where r is
3538 negative to...
3539 (windows_nat_target::store_registers) ... here.
3540
3541 2018-06-26 Tom Tromey <tom@tromey.com>
3542
3543 PR rust/22574:
3544 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3545 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3546 Update.
3547 (rust_internal_print_type): Add podata parameter.
3548 (rust_print_type): Update.
3549
3550 2018-06-26 Tom Tromey <tom@tromey.com>
3551
3552 * typeprint.h (struct print_offset_data) <update, finish,
3553 maybe_print_hole>: New methods.
3554 <indentation>: New constant.
3555 * typeprint.c (print_offset_data::indentation): Define.
3556 (print_offset_data::maybe_print_hole, print_offset_data::update)
3557 (print_offset_data::finish): Move from c-typeprint.c and rename.
3558 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3559 (print_spaces_filtered_with_print_options): Update.
3560 (c_print_type_union_field_offset, maybe_print_hole)
3561 (c_print_type_struct_field_offset): Move to typeprint.c and
3562 rename.
3563 (c_type_print_base_struct_union): Update.
3564
3565 2018-06-25 Pedro Alves <palves@redhat.com>
3566
3567 * gdbthread.h (thread_info_ref, delete_thread)
3568 (delete_thread_silent, first_thread_of_inferior)
3569 (any_thread_of_inferior, switch_to_thread)
3570 (enable_thread_stack_temporaries)
3571 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3572 (get_last_thread_stack_temporary)
3573 (value_in_thread_stack_temporaries, can_access_registers_thread):
3574 Spell out "struct thread_info" instead of just "thread_info".
3575 * inferior.h (notice_new_inferior): Likewise.
3576
3577 2018-06-25 Pedro Alves <palves@redhat.com>
3578
3579 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3580 pass thread_info pointer to delete_thread.
3581 (windows_nat_target::detach): Pass inferior pointer to
3582 detach_inferior.
3583 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3584 delete_thread.
3585 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3586 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3587 and pass a thread_info pointer to delete_thread.
3588 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3589 pass thread_info pointer to delete_thread.
3590 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3591 delete_thread_silent call.
3592 * procfs.c (procfs_target::detach): Pass inferior pointer to
3593 detach_inferior.
3594 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3595 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3596 delete_thread_silent call.
3597 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3598 pass thread_info pointer to delete_thread.
3599 (windows_nat_target::detach): Pass inferior pointer to
3600 delete_inferior.
3601
3602 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3603
3604 * regcache.c (readable_regcache::read_part): Fix asserts.
3605 (reg_buffer::raw_collect_part): New function.
3606 (regcache::write_part): Fix asserts.
3607 (reg_buffer::raw_supply_part): New function.
3608 (regcache::transfer_regset_register): New helper function.
3609 (regcache::transfer_regset): Call new functions.
3610 (regcache_supply_regset): Use gdb_byte*.
3611 (regcache::supply_regset): Likewise.
3612 (regcache_collect_regset): Likewise.
3613 (regcache::collect_regset): Likewise.
3614 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3615 (reg_buffer::raw_supply_part): Likewise.
3616 (regcache::transfer_regset_register): Likewise.
3617 (regcache::transfer_regset): Use gdb_byte*.
3618
3619 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3620
3621 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3622
3623 2018-06-21 Pedro Alves <palves@redhat.com>
3624
3625 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3626 instead of a ptid_t. All callers adjusted.
3627 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3628 adjusted.
3629 (print_ada_task_info, display_current_task_id, task_command_1):
3630 Adjust.
3631 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3632 inferior_thread.
3633 (breakpoint_kind): Adjust.
3634 (remove_breakpoints_pid): Rename to ...
3635 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3636 pointer. All callers adjusted.
3637 (bpstat_clear_actions): Use inferior_thread.
3638 (get_bpstat_thread): New.
3639 (bpstat_do_actions): Use it.
3640 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3641 to take a thread_info pointer. All callers adjusted.
3642 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3643 (breakpoint_re_set_thread): Use inferior_thread.
3644 * breakpoint.h (struct inferior): Forward declare.
3645 (bpstat_stop_status): Update.
3646 (remove_breakpoints_pid): Delete.
3647 (remove_breakpoints_inf): New.
3648 * bsd-uthread.c (bsd_uthread_target::wait)
3649 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3650 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3651 (maint_btrace_packet_history_cmd)
3652 (maint_btrace_clear_packet_history_cmd): Adjust.
3653 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3654 inferior_thread.
3655 * cli/cli-interp.c: Include "inferior.h".
3656 * common/refcounted-object.h (struct
3657 refcounted_object_ref_policy): New.
3658 * compile/compile-object-load.c: Include gdbthread.h.
3659 (store_regs): Use inferior_thread.
3660 * corelow.c (core_target::close): Use current_inferior.
3661 (core_target_open): Adjust to use first_thread_of_inferior and use
3662 the current inferior.
3663 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3664 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3665 <thread>: ... this new field. All references adjusted.
3666 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3667 Take a thread_info pointer instead of a ptid_t.
3668 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3669 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3670 thread_info pointer instead of a ptid_t.
3671 * elfread.c: Include "inferior.h".
3672 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3673 Use inferior_thread.
3674 * eval.c (evaluate_subexp): Likewise.
3675 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3676 inferior_thread.
3677 * gdb_proc_service.h (struct thread_info): Forward declare.
3678 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3679 <thread>: ... this new field. All references adjusted.
3680 * gdbarch.h, gdbarch.c: Regenerate.
3681 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3682 'thread' parameter. All implementations and callers adjusted.
3683 * gdbthread.h (thread_info) <set_running>: New method.
3684 (delete_thread, delete_thread_silent): Take a thread_info pointer
3685 instead of a ptid.
3686 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3687 (first_thread_of_process): Delete, replaced by ...
3688 (first_thread_of_inferior): ... this new function. All callers
3689 adjusted.
3690 (any_live_thread_of_process): Delete, replaced by ...
3691 (any_live_thread_of_inferior): ... this new function. All callers
3692 adjusted.
3693 (switch_to_thread, switch_to_no_thread): Declare.
3694 (is_executing): Delete.
3695 (enable_thread_stack_temporaries): Update comment.
3696 <enable_thread_stack_temporaries>: Take a thread_info pointer
3697 instead of a ptid_t. Incref the thread.
3698 <~enable_thread_stack_temporaries>: Decref the thread.
3699 <m_ptid>: Delete
3700 <m_thr>: New.
3701 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3702 (get_last_thread_stack_temporary)
3703 (value_in_thread_stack_temporaries, can_access_registers_thread):
3704 Take a thread_info pointer instead of a ptid_t. All callers
3705 adjusted.
3706 * infcall.c (get_call_return_value): Use inferior_thread.
3707 (run_inferior_call): Work with thread pointers instead of ptid_t.
3708 (call_function_by_hand_dummy): Work with thread pointers instead
3709 of ptid_t. Use thread_info_ref.
3710 * infcmd.c (proceed_thread_callback): Access thread's state
3711 directly.
3712 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3713 access thread's state directly.
3714 (continue_command): Use inferior_thread.
3715 (info_program_command): Use find_thread_ptid and access thread
3716 state directly.
3717 (proceed_after_attach_callback): Use thread state directly.
3718 (notice_new_inferior): Take a thread_info pointer instead of a
3719 ptid_t. All callers adjusted.
3720 (exit_inferior): Take an inferior pointer instead of a pid. All
3721 callers adjusted.
3722 (exit_inferior_silent): New.
3723 (detach_inferior): Delete.
3724 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3725 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3726 (detach_inferior_command, kill_inferior_command): Use
3727 find_inferior_id instead of valid_gdb_inferior_id and
3728 gdb_inferior_id_to_pid.
3729 (inferior_command): Use inferior and thread pointers.
3730 * inferior.h (struct thread_info): Forward declare.
3731 (notice_new_inferior): Take a thread_info pointer instead of a
3732 ptid_t. All callers adjusted.
3733 (detach_inferior): Delete declaration.
3734 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3735 instead of a pid. All callers adjusted.
3736 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3737 (valid_gdb_inferior_id): Delete.
3738 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3739 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3740 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3741 ...
3742 <inf>: ... this new field.
3743 <step_ptid>: Delete, replaced by ...
3744 <step_thread>: ... this new field.
3745 (get_displaced_stepping_state): Take an inferior pointer instead
3746 of a pid. All callers adjusted.
3747 (displaced_step_in_progress_any_inferior): Adjust.
3748 (displaced_step_in_progress_thread): Take a thread pointer instead
3749 of a ptid_t. All callers adjusted.
3750 (displaced_step_in_progress, add_displaced_stepping_state): Take
3751 an inferior pointer instead of a pid. All callers adjusted.
3752 (get_displaced_step_closure_by_addr): Adjust.
3753 (remove_displaced_stepping_state): Take an inferior pointer
3754 instead of a pid. All callers adjusted.
3755 (displaced_step_prepare_throw, displaced_step_prepare)
3756 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3757 All callers adjusted.
3758 (start_step_over): Adjust.
3759 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3760 displaced step queue.
3761 (do_target_resume): Adjust.
3762 (fetch_inferior_event): Use inferior_thread.
3763 (context_switch, get_inferior_stop_soon): Take an
3764 execution_control_state pointer instead of a ptid_t. All callers
3765 adjusted.
3766 (switch_to_thread_cleanup): Delete.
3767 (stop_all_threads): Use scoped_restore_current_thread.
3768 * inline-frame.c: Include "gdbthread.h".
3769 (inline_state) <inline_state>: Take a thread pointer instead of a
3770 ptid_t. All callers adjusted.
3771 <ptid>: Delete, replaced by ...
3772 <thread>: ... this new field.
3773 (find_inline_frame_state): Take a thread pointer instead of a
3774 ptid_t. All callers adjusted.
3775 (skip_inline_frames, step_into_inline_frame)
3776 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3777 pointer instead of a ptid_t. All callers adjusted.
3778 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3779 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3780 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3781 pointers directly.
3782 * linux-nat.c (get_detach_signal): Likewise.
3783 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3784 (thread_db_notice_clone): Adjust.
3785 (thread_db_find_new_threads_silently)
3786 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3787 a thread pointer instead of a ptid_t. All callers adjusted.
3788 * mi/mi-cmd-var.c: Include "inferior.h".
3789 (mi_cmd_var_update_iter): Update to use thread pointers.
3790 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3791 inferior directly.
3792 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3793 out to ...
3794 (mi_output_running): ... this new function.
3795 (mi_on_resume_1): Adjust to use it.
3796 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3797 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3798 directly.
3799 (interrupt_thread_callback): : Adjust to use thread and inferior
3800 pointers.
3801 * proc-service.c: Include "gdbthread.h".
3802 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3803 * progspace-and-thread.c: Include "inferior.h".
3804 * progspace.c: Include "inferior.h".
3805 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3806 hold a reference to an inferior_object.
3807 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3808 inferior_thread.
3809 * python/py-inferior.c (struct inferior_object): Give the type a
3810 tag name instead of a typedef.
3811 (python_on_normal_stop): No need to check if the current thread is
3812 listed.
3813 (inferior_to_inferior_object): Change return type to
3814 inferior_object. All callers adjusted.
3815 (find_thread_object): Delete, bits factored out to ...
3816 (thread_to_thread_object): ... this new function.
3817 * python/py-infthread.c (create_thread_object): Use
3818 inferior_to_inferior_object.
3819 (thpy_is_stopped): Use thread pointer directly.
3820 (gdbpy_selected_thread): Use inferior_thread.
3821 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3822 field, replaced with ...
3823 <thread>: ... this new field. All users adjusted.
3824 (btpy_insn_or_gap_new): Drop const.
3825 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3826 callers adjusted.
3827 * python/py-record.c: Include "gdbthread.h".
3828 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3829 a ptid_t. All callers adjusted.
3830 (gdbpy_current_recording): Use inferior_thread.
3831 * python/py-record.h (recpy_record_object) <ptid>: Delete
3832 field, replaced with ...
3833 <thread>: ... this new field. All users adjusted.
3834 (recpy_element_object) <ptid>: Delete
3835 field, replaced with ...
3836 <thread>: ... this new field. All users adjusted.
3837 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3838 a ptid_t. All callers adjusted.
3839 * python/py-threadevent.c: Include "gdbthread.h".
3840 (get_event_thread): Use thread_to_thread_object.
3841 * python/python-internal.h (struct inferior_object): Forward
3842 declare.
3843 (find_thread_object, find_inferior_object): Delete declarations.
3844 (thread_to_thread_object, inferior_to_inferior_object): New
3845 declarations.
3846 * record-btrace.c: Include "inferior.h".
3847 (require_btrace_thread): Use inferior_thread.
3848 (record_btrace_frame_sniffer)
3849 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3850 (get_thread_current_frame): Use scoped_restore_current_thread and
3851 switch_to_thread.
3852 (get_thread_current_frame): Use thread pointer directly.
3853 (record_btrace_replay_at_breakpoint): Use thread's inferior
3854 pointer directly.
3855 * record-full.c: Include "inferior.h".
3856 * regcache.c: Include "gdbthread.h".
3857 (get_thread_arch_regcache): Use the inferior's address space
3858 directly.
3859 (get_thread_regcache, registers_changed_thread): New.
3860 * regcache.h (get_thread_regcache(thread_info *thread)): New
3861 overload.
3862 (registers_changed_thread): New.
3863 (remote_target) <remote_detach_1>: Swap order of parameters.
3864 (remote_add_thread): <remote_add_thread>: Return the new thread.
3865 (get_remote_thread_info(ptid_t)): New overload.
3866 (remote_target::remote_notice_new_inferior): Use thread pointers
3867 directly.
3868 (remote_target::process_initial_stop_replies): Use
3869 thread_info::set_running.
3870 (remote_target::remote_detach_1, remote_target::detach)
3871 (extended_remote_target::detach): Adjust.
3872 * stack.c (frame_show_address): Use inferior_thread.
3873 * target-debug.h (target_debug_print_thread_info_pp): New.
3874 * target-delegates.c: Regenerate.
3875 * target.c (default_thread_address_space): Delete.
3876 (memory_xfer_partial_1): Use current_inferior.
3877 (target_detach): Use current_inferior.
3878 (target_thread_address_space): Delete.
3879 (generic_mourn_inferior): Use current_inferior.
3880 * target.h (struct target_ops) <thread_address_space>: Delete.
3881 (target_thread_address_space): Delete.
3882 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3883 pointers directly.
3884 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3885 thread pointer instead of a ptid_t. Adjust all callers.
3886 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3887 (first_thread_of_process): Delete, replaced by ...
3888 (first_thread_of_inferior): ... this new function. All callers
3889 adjusted.
3890 (any_thread_of_process): Rename to ...
3891 (any_thread_of_inferior): ... this, and take an inferior pointer.
3892 (any_live_thread_of_process): Rename to ...
3893 (any_live_thread_of_inferior): ... this, and take an inferior
3894 pointer.
3895 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3896 (value_in_thread_stack_temporaries)
3897 (get_last_thread_stack_temporary): Take a thread pointer instead
3898 of a ptid_t. Adjust all callers.
3899 (thread_info::set_running): New.
3900 (validate_registers_access): Use inferior_thread.
3901 (can_access_registers_ptid): Rename to ...
3902 (can_access_registers_thread): ... this, and take a thread
3903 pointer.
3904 (print_thread_info_1): Adjust to compare thread pointers instead
3905 of ptids.
3906 (switch_to_no_thread, switch_to_thread): Make extern.
3907 (scoped_restore_current_thread::~scoped_restore_current_thread):
3908 Use m_thread pointer directly.
3909 (scoped_restore_current_thread::scoped_restore_current_thread):
3910 Use inferior_thread.
3911 (thread_command): Use thread pointer directly.
3912 (thread_num_make_value_helper): Use inferior_thread.
3913 * top.c (execute_command): Use inferior_thread.
3914 * tui/tui-interp.c: Include "inferior.h".
3915 * varobj.c (varobj_create): Use inferior_thread.
3916 (value_of_root_1): Use find_thread_global_id instead of
3917 global_thread_id_to_ptid.
3918
3919 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3920
3921 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3922 possible.
3923 (regcache::write_part): Likewise.
3924 (readable_regcache::cooked_read_part): Update comment.
3925 (readable_regcache::cooked_write_part): Likewise.
3926 * regcache.h: (readable_regcache::read_part): Likewise.
3927 (regcache::write_part): Likewise.
3928
3929 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3930 Dirk Schubert <dirk.schubert@arm.com>
3931
3932 * aarch64-linux-nat.c (post_attach): New.
3933 (aarch64_linux_nat_target::post_attach): Override post_attach to
3934 record the number of hardware debug registers.
3935
3936 2018-06-20 Tom Tromey <tom@tromey.com>
3937
3938 * python/py-param.c (add_setshow_generic): Make parameters const.
3939 (parmpy_init): Update.
3940
3941 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3942
3943 * regcache.h (regcache_cooked_read_ftype): Rename to...
3944 (register_read_ftype): ...this, change type to function_view.
3945 (class reg_buffer) <save>: Remove src parameter.
3946 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3947 parameter non-const in first overload. Remove src parameter in
3948 second overload.
3949 * regcache.c (do_cooked_read): Remove.
3950 (readonly_detached_regcache::readonly_detached_regcache): Make
3951 parameter non-const, adjust call to other constructor.
3952 (reg_buffer::save): Remove src parameter.
3953 * frame.c (do_frame_register_read): Remove.
3954 (frame_save_as_regcache): Use lambda function.
3955 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3956 parameter to ppu2spu_data *.
3957 (ppu2spu_sniffer): Use lambda function.
3958
3959 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3960
3961 * record-full.c (record_full_target::insert_breakpoint): Remove
3962 "struct" keyword, add const.
3963
3964 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3965
3966 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3967 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3968 * configure.ac: Remove AC_PREREQ, add missing quoting.
3969 * gnulib/configure.ac: Modernize usage of
3970 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3971 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3972 (AUTOMAKE_VERSION): Bump to 1.15.1.
3973 * configure: Re-generate.
3974 * config.in: Re-generate.
3975 * aclocal.m4: Re-generate.
3976 * gnulib/aclocal.m4: Re-generate.
3977 * gnulib/config.in: Re-generate.
3978 * gnulib/configure: Re-generate.
3979 * gnulib/import/Makefile.in: Re-generate.
3980
3981 2018-06-19 Pedro Alves <palves@redhat.com>
3982
3983 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3984 (lookup_minimal_symbol_by_pc_section): ... here with
3985 gdb_assert_not_reached added.
3986
3987 2018-06-19 Pedro Alves <palves@redhat.com>
3988
3989 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3990 parameter with a block parameter. Compare location's block symbol
3991 with the frame's block instead of addresses.
3992 (skip_inline_frames): Pass the current block instead of the
3993 frame's address. Break out as soon as we determine the frame
3994 should not be skipped.
3995
3996 2018-06-18 Tom Tromey <tom@tromey.com>
3997
3998 * solib-aix.c (solib_aix_get_section_offsets): Return
3999 unique_xmalloc_ptr.
4000 (solib_aix_solib_create_inferior_hook): Update.
4001
4002 2018-06-18 Tom Tromey <tom@tromey.com>
4003
4004 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4005
4006 2018-06-18 Tom Tromey <tom@tromey.com>
4007
4008 * solib-frv.c (frv_relocate_main_executable): Use
4009 unique_xmalloc_ptr.
4010 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4011 unique_xmalloc_ptr.
4012
4013 2018-06-18 Tom Tromey <tom@tromey.com>
4014
4015 * objfiles.h (inhibit_section_map_updates): Update.
4016 (resume_section_map_updates, resume_section_map_updates_cleanup):
4017 Remove.
4018 * solib-svr4.c (svr4_handle_solib_event): Update.
4019 * objfiles.c (inhibit_section_map_updates): Return
4020 scoped_restore_tmpl<int>.
4021 (resume_section_map_updates, resume_section_map_updates_cleanup):
4022 Remove.
4023
4024 2018-06-18 Tom Tromey <tom@tromey.com>
4025
4026 * valprint.h (read_string): Update.
4027 * valprint.c (read_string): Change type of "buffer".
4028 (val_print_string): Update.
4029 * python/py-value.c (valpy_string): Update.
4030 * language.h (struct language_defn) <la_get_string>: Change
4031 type of "buffer".
4032 (default_get_string, c_get_string): Update.
4033 * language.c (default_get_string): Change type of "buffer".
4034 * guile/scm-value.c (gdbscm_value_to_string): Update.
4035 * c-lang.c (c_get_string): Change type of "buffer".
4036
4037 2018-06-18 Tom Tromey <tom@tromey.com>
4038
4039 * ser-mingw.c (struct pipe_state_destroyer): New.
4040 (pipe_state_up): New typedef.
4041 (cleanup_pipe_state): Remove.
4042 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4043
4044 2018-06-18 Tom Tromey <tom@tromey.com>
4045
4046 * rust-lang.h (rust_yyerror): Don't declare.
4047 * rust-lang.c (rust_language_defn): Update.
4048 * rust-exp.y (yyerror): Now static.
4049 * parse.c (parse_exp_in_context_1): Update.
4050 * p-lang.h (p_yyerror): Don't declare.
4051 * p-lang.c (p_language_defn): Update.
4052 * p-exp.y (yyerror): Now static.
4053 * opencl-lang.c (opencl_language_defn): Update.
4054 * objc-lang.c (objc_language_defn): Update.
4055 * m2-lang.h (m2_yyerror): Don't declare.
4056 * m2-lang.c (m2_language_defn): Update.
4057 * m2-exp.y (yyerror): Now static.
4058 * language.h (struct language_defn) <la_error>: Remove.
4059 * language.c (unk_lang_error): Remove.
4060 (unknown_language_defn, auto_language_defn): Remove.
4061 * go-lang.h (go_yyerror): Don't declare.
4062 * go-lang.c (go_language_defn): Update.
4063 * go-exp.y (yyerror): Now static.
4064 * f-lang.h (f_yyerror): Don't declare.
4065 * f-lang.c (f_language_defn): Update.
4066 * f-exp.y (yyerror): Now static.
4067 * d-lang.h (d_yyerror): Don't declare.
4068 * d-lang.c (d_language_defn): Update.
4069 * d-exp.y (yyerror): Now static.
4070 * c-lang.h (c_yyerror): Don't declare.
4071 * c-lang.c (c_language_defn, cplus_language_defn)
4072 (asm_language_defn, minimal_language_defn): Update.
4073 * c-exp.y (yyerror): Now static.
4074 * ada-lang.h (ada_yyerror): Don't declare.
4075 * ada-lang.c (ada_language_defn): Update.
4076 * ada-exp.y (yyerror): Now static.
4077
4078 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4079
4080 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4081 (store_sveregs_to_thread): Likewise.
4082 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4083 (aarch64_linux_store_inferior_registers): Likewise.
4084 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4085 function.
4086 (aarch64_sve_regs_copy_to_regcache): Likewise.
4087 (aarch64_sve_regs_copy_from_regcache): Likewise.
4088 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4089 declaration.
4090 (aarch64_sve_regs_copy_to_regcache): Likewise.
4091 (aarch64_sve_regs_copy_from_regcache): Likewise.
4092 (sve_context): Structure from Linux headers.
4093 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4094 (SVE_SIG_ZREG_SIZE): Likewise.
4095 (SVE_SIG_PREG_SIZE): Likewise.
4096 (SVE_SIG_FFR_SIZE): Likewise.
4097 (SVE_SIG_REGS_OFFSET): Likewise.
4098 (SVE_SIG_ZREGS_OFFSET): Likewise.
4099 (SVE_SIG_ZREG_OFFSET): Likewise.
4100 (SVE_SIG_ZREGS_SIZE): Likewise.
4101 (SVE_SIG_PREGS_OFFSET): Likewise.
4102 (SVE_SIG_PREG_OFFSET): Likewise.
4103 (SVE_SIG_PREGS_SIZE): Likewise.
4104 (SVE_SIG_FFR_OFFSET): Likewise.
4105 (SVE_SIG_REGS_SIZE): Likewise.
4106 (SVE_SIG_CONTEXT_SIZE): Likewise.
4107 (SVE_PT_REGS_MASK): Likewise.
4108 (SVE_PT_REGS_FPSIMD): Likewise.
4109 (SVE_PT_REGS_SVE): Likewise.
4110 (SVE_PT_VL_INHERIT): Likewise.
4111 (SVE_PT_VL_ONEXEC): Likewise.
4112 (SVE_PT_REGS_OFFSET): Likewise.
4113 (SVE_PT_FPSIMD_OFFSET): Likewise.
4114 (SVE_PT_FPSIMD_SIZE): Likewise.
4115 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4116 (SVE_PT_SVE_PREG_SIZE): Likewise.
4117 (SVE_PT_SVE_FFR_SIZE): Likewise.
4118 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4119 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4120 (__SVE_SIG_TO_PT): Likewise.
4121 (SVE_PT_SVE_OFFSET): Likewise.
4122 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4123 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4124 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4125 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4126 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4127 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4128 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4129 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4130 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4131 (SVE_PT_SVE_SIZE): Likewise.
4132 (SVE_PT_SIZE): Likewise.
4133 (HAS_SVE_STATE): New define.
4134
4135 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4136
4137 * nat/aarch64-sve-linux-sigcontext.h: New file.
4138 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4139 new files.
4140 (SVE_VQ_MIN): Likewise.
4141 (SVE_VQ_MAX): Likewise.
4142 (SVE_VL_MIN): Likewise.
4143 (SVE_VL_MAX): Likewise.
4144 (SVE_NUM_ZREGS): Likewise.
4145 (SVE_NUM_PREGS): Likewise.
4146 (sve_vl_valid): Likewise.
4147 (struct user_sve_header): Likewise.
4148
4149 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4150 Richard Bunt <Richard.Bunt@arm.com>
4151
4152 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4153 was requested by GDB.
4154
4155 2018-06-15 Tom de Vries <tdevries@suse.de>
4156
4157 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4158
4159 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4160
4161 * gnulib/update-gnulib.sh: Print expected versions of
4162 autoconf/aclocal.
4163
4164 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4165
4166 * arch-utils.c (default_type_align): Use type_length_units.
4167 * gdbtypes.c (type_align): Use type_length_units.
4168
4169 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4170
4171 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4172 of 'define' command.
4173
4174 2018-06-14 Tom de Vries <tdevries@suse.de>
4175
4176 PR cli/22573
4177 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4178 get_no_prettyformat_print_options.
4179
4180 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4181
4182 * sparc-nat.h: Include target.h.
4183 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4184 <fetch_registers>: Remove this argument in function call.
4185 <store_registers>: Remove this argument in function call, remove
4186 extra semicolon.
4187 <low_forget_process>: Call sparc64_forget_process instead of
4188 sparc_forget_process.
4189
4190 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4191
4192 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4193 (procfs_target::make_corefile_notes): Adjust to new
4194 target_read_alloc return type.
4195
4196 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4197 Stephen Roberts <stephen.roberts@arm.com>
4198
4199 PR gdb/22882
4200 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4201 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4202 Move should_notify_stop local into more inner scope.
4203
4204 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4205 Stephen Roberts <stephen.roberts@arm.com>
4206
4207 PR gdb/22882
4208 * infrun.c (resume_1): Add call to mark_async_event_handler.
4209
4210 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4211
4212 * infrun.c (do_target_wait): Change old version of $pc printed.
4213
4214 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4215
4216 * dwarf2read.c (read_index_from_section): Rename to...
4217 (read_gdb_index_from_section): ... this, update all callers.
4218 (dwarf2_read_index): Rename to...
4219 (dwarf2_read_gdb_index): ... this, update all callers.
4220
4221 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4222
4223 * gdb/hppa-linux-nat.c
4224 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4225 hppa_linux_nat_target::fetch_registers.
4226
4227 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4228
4229 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4230 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4231 (AARCH64_DWARF_SVE_FFR): Likewise.
4232 (AARCH64_DWARF_SVE_P0): Likewise.
4233 (AARCH64_DWARF_SVE_Z0): Likewise.
4234
4235 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4236
4237 * common/common-regcache.h (raw_compare): New function.
4238 * regcache.c (regcache::raw_compare): Likewise.
4239 * regcache.h (regcache::raw_compare): New declaration.
4240
4241 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4242
4243 * common/common-regcache.h (reg_buffer_common): New structure.
4244 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4245 (reg_buffer::raw_supply): Likewise.
4246 (reg_buffer::raw_supply_integer): Likewise.
4247 (reg_buffer::raw_supply_zeroed): Likewise.
4248 (reg_buffer::raw_collect): Likewise.
4249 (reg_buffer::raw_collect_integer): Likewise.
4250 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4251 (reg_buffer::raw_supply): Likewise.
4252 (reg_buffer::raw_supply_integer): Likewise.
4253 (reg_buffer::raw_supply_zeroed): Likewise.
4254 (reg_buffer::raw_collect): Likewise.
4255 (reg_buffer::raw_collect_integer): Likewise.
4256
4257 2018-06-10 Tom Tromey <tom@tromey.com>
4258
4259 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4260 (class remote_state) <stop_reply_queue>: Now std::vector.
4261 (remote_state::~remote_state)
4262 (remote_target::stop_reply_queue_length): Update.
4263 (struct queue_iter_param, remove_child_of_pending_fork)
4264 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4265 (check_pending_event_prevents_wildcard_vcont_callback)
4266 (remove_stop_reply_for_inferior)
4267 (remove_stop_reply_of_remote_state)
4268 (remote_notif_remove_once_on_match)
4269 (stop_reply_match_ptid_and_ws)
4270 (remote_kill_child_of_pending_fork): Remove.
4271 (remote_target::remove_new_fork_children)
4272 (remote_target::check_pending_events_prevent_wildcard_vcont)
4273 (remote_target::discard_pending_stop_replies)
4274 (remote_target::discard_pending_stop_replies_in_queue)
4275 (remote_target::remote_notif_remove_queued_reply)
4276 (remote_target::queued_stop_reply)
4277 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4278 (remote_target::wait, remote_target::kill_new_fork_children)
4279 (remote_target::async): Update.
4280
4281 2018-06-10 Tom Tromey <tom@tromey.com>
4282
4283 * record-full.c (record_full_arch_list_cleanups): Remove.
4284 (record_full_message): Use try/catch.
4285 (record_full_wait_cleanups): Remove.
4286 (record_full_wait_1): Use try/catch.
4287 (record_full_restore): Likewise.
4288
4289 2018-06-10 Tom Tromey <tom@tromey.com>
4290
4291 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4292 declare VEC. Add constructor.
4293 <in_target_beneath>: Now bool.
4294 (record_full_breakpoints): Now a std::vector, static.
4295 (record_full_sync_record_breakpoints)
4296 (record_full_init_record_breakpoints)
4297 (record_full_target::insert_breakpoint)
4298 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4299
4300 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4301
4302 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4303 * serial.c (serial_interface_lookup): Remove struct keyword.
4304
4305 2018-06-10 Tom Tromey <tom@tromey.com>
4306
4307 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4308 method.
4309 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4310 a method.
4311 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4312 method.
4313 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4314 "beneath" as a method.
4315 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4316 Use "beneath" as a method.
4317
4318 2018-06-10 Tom Tromey <tom@tromey.com>
4319
4320 * tracefile.c (struct trace_file_writer_deleter): New.
4321 <operator()>: Rename from trace_file_writer_xfree.
4322 (trace_file_writer_up): New typedef.
4323 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4324
4325 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4326
4327 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4328 <m_registers, m_register_status>: Change type to
4329 std::unique_ptr.
4330 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4331 XCNEWVEC.
4332
4333 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4334
4335 * common/common-regcache.h (enum register_status): Add
4336 underlying type "signed char".
4337 * regcache.h (reg_buffer) <m_register_status>: Change type to
4338 register_status *.
4339 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4340 register_status instead of signed char.
4341 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4342 (reg_buffer::get_register_status): Remove cast.
4343 (readable_regcache::raw_read): Remove cast.
4344 (readable_regcache::cooked_read): Remove cast.
4345
4346 2018-06-09 Tom Tromey <tom@tromey.com>
4347
4348 * source.c (reverse_search_command, forward_search_command): Use
4349 scoped_fd.
4350
4351 2018-06-09 Tom Tromey <tom@tromey.com>
4352
4353 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4354 (serial_ops_list): Now static, std::vector.
4355 (serial_interface_lookup, serial_add_interface): Update.
4356
4357 2018-06-09 Tom Tromey <tom@tromey.com>
4358
4359 * dwarf2read.c (process_cu_includes): Update.
4360 (process_full_comp_unit): Update.
4361 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4362 std::vector.
4363
4364 2018-06-08 Paul Koning <paul_koning@dell.com>
4365
4366 PR gdb/23252
4367
4368 * python/python.c (do_start_initialization):
4369 Avoid call to internal Python API.
4370 (init__gdb_module): New function.
4371
4372 2018-06-08 Gary Benson <gbenson@redhat.com>
4373
4374 * linux-thread-db.c (valprint.h): New include.
4375 (struct check_thread_db_info): New structure.
4376 (check_thread_db_on_load, tdb_testinfo): New static globals.
4377 (check_thread_db, check_thread_db_callback): New functions.
4378 (try_thread_db_load_1): Run integrity checks if requested.
4379 (maintenance_check_libthread_db): New function.
4380 (_initialize_thread_db): Register "maint check libthread-db"
4381 and "maint set/show check-libthread-db".
4382 * NEWS: Mention the above new commands.
4383
4384 2018-06-08 Tom Tromey <tom@tromey.com>
4385
4386 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4387 now a method.
4388
4389 2018-06-08 Tom Tromey <tom@tromey.com>
4390
4391 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4392
4393 2018-06-08 Tom Tromey <tom@tromey.com>
4394
4395 * common/btrace-common.h (struct btrace_data): Add constructor,
4396 destructor, move assignment operator.
4397 <empty, clear, fini>: New methods.
4398 <format>: Initialize.
4399 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4400 (btrace_data_empty): Don't declare.
4401 * common/btrace-common.c (btrace_data_init): Remove.
4402 (btrace_data::fini): Rename from btrace_data_fini.
4403 (btrace_data::empty): Rename from btrace_data_empty.
4404 (btrace_data::clear): Rename from btrace_data_clear. Return
4405 bool.
4406 * btrace.h (make_cleanup_btrace_data): Don't declare.
4407 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4408 (parse_xml_btrace): Update.
4409 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4410 (maint_btrace_clear_packet_history_cmd): Update.
4411
4412 2018-06-07 Pedro Alves <palves@redhat.com>
4413
4414 * target.h (target_ops) <beneath>: Now a method. All references
4415 updated.
4416 (class target_stack): New.
4417 * target.c (g_target_stack): New.
4418 (g_current_top_target): Delete.
4419 (current_top_target): Get the top target out of g_target_stack.
4420 (target_stack::push, target_stack::unpush): New.
4421 (push_target, unpush_target): Reimplement.
4422 (target_is_pushed): Reimplement in terms of g_target_stack.
4423 (target_ops::beneath, target_stack::find_beneath): New.
4424
4425 2018-06-07 Pedro Alves <palves@redhat.com>
4426
4427 * target.h (find_target_beneath): Delete declaration.
4428 * target.c (find_target_beneath): Delete definition.
4429 * aix-thread.c: All callers of find_target_beneath adjusted to
4430 call target_ops::beneath instead.
4431 * bsd-uthread.c: Likewise.
4432 * linux-thread-db.c: Likewise.
4433 * ravenscar-thread.c: Likewise.
4434 * sol-thread.c: Likewise.
4435 * spu-multiarch.c: Likewise.
4436
4437 2018-06-07 Pedro Alves <palves@redhat.com>
4438
4439 * target.h (target_ops) <beneath>: Now a method. All references
4440 updated.
4441 (target_ops) <m_beneath>: New.
4442 * target.c (target_ops::beneath): New.
4443 * corelow.c: Adjust all references to target_ops::beneath.
4444 * linux-thread-db.c: Likewise.
4445 * make-target-delegates: Likewise.
4446 * record-btrace.c: Likewise.
4447 * record-full.c: Likewise.
4448 * remote.c: Likewise.
4449 * target.c: Likewise.
4450 * target-delegates.c: Regenerate.
4451
4452 2018-06-07 Pedro Alves <palves@redhat.com>
4453
4454 * target.h (target_stack): Delete.
4455 (current_top_target): Declare function.
4456 * target.c (target_stack): Delete.
4457 (g_current_top_target): New.
4458 (current_top_target): New function.
4459 * auxv.c: Use current_top_target instead of target_stack
4460 throughout.
4461 * avr-tdep.c: Likewise.
4462 * breakpoint.c: Likewise.
4463 * corefile.c: Likewise.
4464 * elfread.c: Likewise.
4465 * eval.c: Likewise.
4466 * exceptions.c: Likewise.
4467 * frame.c: Likewise.
4468 * gdbarch-selftests.c: Likewise.
4469 * gnu-v3-abi.c: Likewise.
4470 * ia64-tdep.c: Likewise.
4471 * ia64-vms-tdep.c: Likewise.
4472 * infcall.c: Likewise.
4473 * infcmd.c: Likewise.
4474 * infrun.c: Likewise.
4475 * linespec.c: Likewise.
4476 * linux-tdep.c: Likewise.
4477 * minsyms.c: Likewise.
4478 * ppc-linux-nat.c: Likewise.
4479 * ppc-linux-tdep.c: Likewise.
4480 * procfs.c: Likewise.
4481 * regcache.c: Likewise.
4482 * remote.c: Likewise.
4483 * rs6000-tdep.c: Likewise.
4484 * s390-linux-nat.c: Likewise.
4485 * s390-tdep.c: Likewise.
4486 * solib-aix.c: Likewise.
4487 * solib-darwin.c: Likewise.
4488 * solib-dsbt.c: Likewise.
4489 * solib-spu.c: Likewise.
4490 * solib-svr4.c: Likewise.
4491 * solib-target.c: Likewise.
4492 * sparc-tdep.c: Likewise.
4493 * sparc64-tdep.c: Likewise.
4494 * spu-tdep.c: Likewise.
4495 * symfile.c: Likewise.
4496 * symtab.c: Likewise.
4497 * target-descriptions.c: Likewise.
4498 * target-memory.c: Likewise.
4499 * target.c: Likewise.
4500 * target.h: Likewise.
4501 * tracefile-tfile.c: Likewise.
4502 * tracepoint.c: Likewise.
4503 * valops.c: Likewise.
4504 * valprint.c: Likewise.
4505 * value.c: Likewise.
4506 * windows-tdep.c: Likewise.
4507 * mi/mi-main.c: Likewise.
4508
4509 2018-06-07 Tom Tromey <tom@tromey.com>
4510
4511 * valprint.h (build_address_symbolic): Declare.
4512 * printcmd.c (print_address_symbolic): Update.
4513 (build_address_symbolic): Change "name" and "filename" to
4514 std::string.
4515 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4516 Update.
4517 * defs.h (build_address_symbolic): Remove declaration.
4518
4519 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4520
4521 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4522 (aarch64_vnv_type): Add function.
4523 (aarch64_pseudo_register_name): Add V regs for SVE.
4524 (aarch64_pseudo_register_type): Likewise.
4525 (aarch64_pseudo_register_reggroup_p): Likewise.
4526 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4527 (aarch64_pseudo_read_value): Add V regs for SVE.
4528 (aarch64_pseudo_write_2): Use V0 offset for SVE
4529 (aarch64_pseudo_write): Add V regs for SVE.
4530 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4531
4532 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4533
4534 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4535 (sve_vl_from_vq): Likewise.
4536
4537 2018-06-05 Tom Tromey <tom@tromey.com>
4538
4539 * cli/cli-cmds.c (show_version): Update.
4540 * top.c (print_gdb_version): Add "interactive" parameter.
4541 Update.
4542 * main.c (captured_main_1): Update.
4543 * top.h (print_gdb_version): Add "interactive" parameter and a
4544 comment.
4545
4546 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4547
4548 * common/enum-flags.h: Add trailing semicolon to example in
4549 comment.
4550
4551 2018-06-05 Tom Tromey <tom@tromey.com>
4552
4553 PR cli/12326:
4554 * NEWS: Add entry about pager.
4555 * utils.c (pagination_disabled_for_command): New global.
4556 (prompt_for_continue): Allow "c" response to prompt.
4557 (reinitialize_more_filter): Clear
4558 pagination_disabled_for_command.
4559 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4560
4561 2018-06-04 Tom Tromey <tom@tromey.com>
4562
4563 * ada-lang.h (ada_lookup_symbol_list): Update.
4564 * ada-lang.c (resolve_subexp): Update.
4565 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4566 parameter.
4567 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4568 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4569 results parameter to std::vector.
4570 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4571 Update.
4572 * ada-exp.y (block_lookup): Update.
4573 (select_possible_type_sym): Change type of syms. Remove nsyms
4574 parameter.
4575 (write_var_or_type, write_name_assoc): Update.
4576
4577 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4578
4579 * windows-nat.c (windows_nat_target::xfer_partial): Return
4580 TARGET_XFER_E_IO if we need to delegate to the target beneath
4581 but BENEATH is NULL.
4582
4583 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4584
4585 * Makefile.in (config.status): Add configure.nat as a
4586 dependency.
4587
4588 2018-06-04 Tom Tromey <tom@tromey.com>
4589
4590 * cp-name-parser.y (cpname_state): Add method declarations.
4591 (HANDLE_QUAL): Update.
4592 (cpname_state::d_grab, cpname_state::fill_comp)
4593 (cpname_state::make_operator, cpname_state::make_dtor)
4594 (cpname_state::make_builtin_type, cpname_state::make_name)
4595 (cpname_state::d_qualify, cpname_state::d_int_type)
4596 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4597 (%union): Move earlier.
4598
4599 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4600
4601 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4602
4603 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4604
4605 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4606 (aarch64_pseudo_write_1): Likewise.
4607 (aarch64_pseudo_read_value): Use helper.
4608 (aarch64_pseudo_write): Likewise.
4609
4610 2018-06-04 Pedro Alves <palves@redhat.com>
4611
4612 * darwin-nat.c (darwin_ops): Delete.
4613 (darwin_attach_pid): Use get_native_target.
4614
4615 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4616
4617 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4618 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4619
4620 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4621
4622 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4623 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4624 (aarch64_gdbarch_init): Check for SVE.
4625 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4626
4627 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4628
4629 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4630 * aarch64-tdep.h (aarch64_read_description): Likewise.
4631 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4632 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4633 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4634 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4635 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4636
4637 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4638
4639 * value.c (value_fetch_lazy_bitfield): New.
4640 (value_fetch_lazy_memory): New.
4641 (value_fetch_lazy_register): New.
4642 (value_fetch_lazy): Factor out to smaller functions.
4643
4644 2018-06-01 Tom Tromey <tom@tromey.com>
4645
4646 * cp-name-parser.y (backslashable, represented): Now const.
4647
4648 2018-06-01 Tom Tromey <tom@tromey.com>
4649
4650 * cp-name-parser.y: Include parser-defs.h.
4651 (parser_fprintf): Remove declaration.
4652
4653 2018-06-01 Tom Tromey <tom@tromey.com>
4654
4655 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4656 %parse-param.
4657 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4658 (global_result): Remove globals.
4659 (struct cpname_state): New.
4660 (yyparse): Don't declare.
4661 (yylex, yyerror): Move declarations after %union.
4662 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4663 (make_name): Add state parameter.
4664 Update all callers.
4665 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4666 parameter.
4667 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4668 Update.
4669 (yylex): Add lvalp, state parameters.
4670 (yyerror): Add state parameter.
4671 (cp_demangled_name_to_comp): Update.
4672
4673 2018-06-01 Tom Tromey <tom@tromey.com>
4674
4675 * cp-name-parser.y (parser_fprintf): Declare.
4676 (GDB_YY_REMAP_PREFIX): Define.
4677 Include yy-remap.h. Don't redefine yy* identifiers.
4678
4679 2018-06-01 Tom Tromey <tom@tromey.com>
4680
4681 * python/py-type.c (typy_legacy_template_argument): Update.
4682 * cp-support.h (cp_demangled_name_to_comp): Update.
4683 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4684 parameter to be a "std::string *".
4685 (main): Update.
4686
4687 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4688
4689 * ada-lex.l: Include "diagnostics.h" instead of
4690 "common/diagnostics.h".
4691 * unittests/environ-selftests.c: Likewise.
4692 * common/diagnostics.h: Moved to ../include.
4693
4694 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4695
4696 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4697 to language_mode_manual while calling breakpoint_re_set_one.
4698
4699 2018-06-01 Tom Tromey <tom@tromey.com>
4700
4701 * valops.c (value_cast_structs, destructor_name_p): Update.
4702 * symtab.c (gdb_mangle_name): Update.
4703 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4704 Update.
4705 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4706 (pascal_object_print_value_fields, pascal_object_print_value):
4707 Update.
4708 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4709 * linespec.c (find_methods): Update.
4710 * gdbtypes.h (type_name_no_tag): Remove.
4711 (type_name_or_error): Rename from type_name_no_tag_or_error.
4712 * gdbtypes.c (type_name_no_tag): Remove.
4713 (type_name_or_error): Rename from type_name_no_tag_or_error.
4714 (lookup_struct_elt_type, check_typedef): Update.
4715 * expprint.c (print_subexp_standard): Update.
4716 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4717 * d-namespace.c (d_lookup_nested_symbol): Update.
4718 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4719 (cp_print_class_member): Update.
4720 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4721 * completer.c (add_struct_fields): Update.
4722 * c-typeprint.c (cp_type_print_derivation_info)
4723 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4724 Update.
4725 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4726 (ada_prefer_type, ada_is_exception_sym): Update.
4727
4728 2018-06-01 Tom Tromey <tom@tromey.com>
4729
4730 * valops.c (enum_constant_from_type, value_namespace_elt)
4731 (value_maybe_namespace_elt): Update.
4732 * valarith.c (find_size_for_pointer_math): Update.
4733 * target-descriptions.c (make_gdb_type): Update.
4734 * symmisc.c (print_symbol): Update.
4735 * stabsread.c (define_symbol, read_type)
4736 (complain_about_struct_wipeout, add_undefined_type)
4737 (cleanup_undefined_types_1): Update.
4738 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4739 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4740 (rust_internal_print_type, rust_composite_type)
4741 (rust_evaluate_funcall, rust_evaluate_subexp)
4742 (rust_inclusive_range_type_p): Update.
4743 * python/py-type.c (typy_get_tag): Update.
4744 * p-typeprint.c (pascal_type_print_base): Update.
4745 * mdebugread.c (parse_symbol, parse_type): Update.
4746 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4747 Update.
4748 * guile/scm-type.c (gdbscm_type_tag): Update.
4749 * go-lang.c (sixg_string_p): Update.
4750 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4751 Update.
4752 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4753 (TYPE_TAG_NAME): Remove.
4754 * gdbtypes.c (type_name_no_tag): Simplify.
4755 (check_typedef, check_types_equal, recursive_dump_type)
4756 (copy_type_recursive, arch_composite_type): Update.
4757 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4758 in summary mode when needed.
4759 * eval.c (evaluate_funcall): Update.
4760 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4761 (process_structure_scope, read_enumeration_type)
4762 (read_namespace_type, read_module_type, determine_prefix): Update.
4763 * cp-support.c (inspect_type): Update.
4764 * coffread.c (process_coff_symbol, decode_base_type): Update.
4765 * c-varobj.c (c_is_path_expr_parent): Update.
4766 * c-typeprint.c (c_type_print_base_struct_union): Update.
4767 (c_type_print_base_1): Update. Print struct/class/union/enum in
4768 summary when using C language.
4769 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4770 (gen_maybe_namespace_elt): Update.
4771 * ada-lang.c (ada_type_name): Simplify.
4772 (empty_record, ada_template_to_fixed_record_type_1)
4773 (template_to_static_fixed_type)
4774 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4775
4776 2018-06-01 Tom Tromey <tom@tromey.com>
4777
4778 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4779 c_print_type.
4780 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4781 (c_print_type): Update.
4782 (c_print_type): New overload.
4783 (c_type_print_varspec_prefix, c_type_print_args)
4784 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4785 (c_type_print_base_struct_union, c_type_print_base_1)
4786 (cp_type_print_method_args): Add "language" parameter.
4787 (c_type_print_base): Update.
4788 * c-lang.h (c_print_type): Add new overload.
4789
4790 2018-06-01 Tom Tromey <tom@tromey.com>
4791
4792 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4793 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4794
4795 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4796
4797 * aarch64-tdep.c (aarch64_sve_register_names): New const
4798 var.
4799 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4800 (AARCH64_SVE_Z_REGS_NUM): New define.
4801 (AARCH64_SVE_P_REGS_NUM): Likewise.
4802 (AARCH64_SVE_NUM_REGS): Likewise.
4803
4804 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4805
4806 * nat/linux-ptrace.h [__alpha__]
4807 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4808 definitions.
4809
4810 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4811
4812 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4813 the endianness selected.
4814 * NEWS: Document `set endian auto' mode operation update.
4815
4816 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4817
4818 * Makefile.in: Add new header.
4819 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4820 (sve_vl_from_vg): Likewise.
4821 (sve_vq_from_vl): Likewise.
4822 (sve_vl_from_vq): Likewise.
4823 (sve_vq_from_vg): Likewise.
4824 (sve_vg_from_vq): Likewise.
4825 * configure.nat: Add new c file.
4826 * nat/aarch64-sve-linux-ptrace.c: New file.
4827 * nat/aarch64-sve-linux-ptrace.h: New file.
4828
4829 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4830
4831 * aarch64-linux-nat.c (aarch64_linux_read_description):
4832 Add parmeter zero.
4833 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4834 Likewise.
4835 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4836 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4837 (aarch64_gdbarch_init): Add parmeter zero.
4838 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4839 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4840 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4841 parmeter.
4842 * doc/gdb.texinfo: Describe SVE feature
4843 * features/aarch64-sve.c: New file.
4844
4845 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4846
4847 PR gdb/23210
4848 * gdbarch.sh (significant_addr_bit): Default to zero when
4849 not set by target architecture.
4850 * gdbarch.c: Re-generated.
4851 * utils.c (address_significant): Update.
4852
4853 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4854
4855 * stack.c (func_command): Remove trailing newline in call to error.
4856
4857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4858
4859 * regcache.h (regcache_raw_collect): Remove, update callers to
4860 use regcache::raw_collect.
4861 * regcache.c (regcache_raw_collect): Remove.
4862
4863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4864
4865 * regcache.h (regcache_raw_supply): Remove, update callers to
4866 use detached_regcache::raw_supply.
4867 * regcache.c (regcache_raw_supply): Remove.
4868
4869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * regcache.h (regcache_cooked_write_part): Remove, update
4872 callers to use regcache::cooked_write_part.
4873 * regcache.c (regcache_cooked_write_part): Remove.
4874
4875 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4876
4877 * regcache.h (regcache_cooked_read_part): Remove, update callers
4878 to use readable_regcache::cooked_read_part.
4879 * regcache.c (regcache_cooked_read_part): Remove.
4880
4881 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4882
4883 * regcache.h (regcache_cooked_read_value): Remove, update
4884 callers to use readable_regcache::cooked_read_value.
4885 * regcache.c (regcache_cooked_read_value): Remove.
4886
4887 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4888
4889 * regcache.h (regcache_cooked_write): Remove, update callers to
4890 use regcache::cooked_write.
4891 * regcache.c (regcache_cooked_write): Remove.
4892
4893 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * regcache.h (regcache_invalidate): Remove, update callers to
4896 use detached_regcache::invalidate instead.
4897 * regcache.c (regcache_invalidate): Remove.
4898
4899 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4900
4901 * regcache.h (regcache_raw_write_part): Remove, update callers
4902 to use regcache::raw_write_part instead.
4903 * regcache.c (regcache_raw_write_part): Remove.
4904
4905 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4906
4907 * regcache.h (regcache_raw_read_part): Remove, update callers to
4908 use readable_regcache::raw_read_part instead.
4909 * regcache.c (regcache_raw_read_part): Remove.
4910
4911 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4912
4913 * regcache.h (regcache_cooked_read): Remove, update callers to
4914 use readable_regcache::cooked_read instead.
4915 * regcache.c (regcache_cooked_read): Remove.
4916
4917 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4918
4919 * regcache.h (regcache_raw_write): Remove, update callers to use
4920 regcache::raw_write instead.
4921 * regcache.c (regcache_raw_write): Remove.
4922
4923 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4924
4925 * regcache.h (regcache_raw_read): Remove, update callers to use
4926 readable_regcache::raw_read instead.
4927 * regcache.c (regcache_raw_read): Remove.
4928
4929 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4930
4931 * regcache.h (regcache_raw_update): Remove, update callers to
4932 use readable_regcache::raw_update instead.
4933 * regcache.c (regcache_raw_update): Remove.
4934
4935 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4936
4937 * regcache.h (regcache_register_status): Remove, update callers
4938 to use reg_buffer::get_register_status directly instead.
4939 * regcache.c (regcache_register_status): Remove.
4940
4941 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4942
4943 * regcache.h (regcache_get_ptid): Remove, update all callers to
4944 call regcache::ptid instead.
4945 * regcache.c (regcache_get_ptid): Remove.
4946
4947 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4948
4949 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4950
4951 2018-05-30 Pedro Alves <palves@redhat.com>
4952
4953 * common/common-exceptions.h (exception_rethrow): Use
4954 ATTRIBUTE_NORETURN.
4955
4956 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4957
4958 * breakpoint.c (print_solib_event, check_status_catch_solib):
4959 Remove struct keyword in range-based for loops.
4960 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4961 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4962 Likewise.
4963 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4964 Likewise.
4965 * symfile.c (addr_info_make_relative): Likewise.
4966 * thread.c (value_in_thread_stack_temporaries): Likewise.
4967
4968 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4969
4970 PR gdb/16841
4971 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4972 aggregate type to get its real type before accessing it.
4973
4974 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4975
4976 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4977 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4978 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4979 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4980 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4981 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4982 * printcmd.c (info_address_command): Likewise.
4983
4984 2018-05-29 Tom Tromey <tom@tromey.com>
4985
4986 * windows-nat.c (handle_exception): Update fall-through comment.
4987
4988 2018-05-29 Tom Tromey <tom@tromey.com>
4989
4990 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4991 (struct program_space) <added_solibs>: Now a std::vector.
4992 * breakpoint.c (print_solib_event): Update.
4993 (check_status_catch_solib): Update.
4994 * progspace.c (clear_program_space_solib_cache): Update.
4995 * solib.c (update_solib_list): Update.
4996
4997 2018-05-29 Tom Tromey <tom@tromey.com>
4998
4999 * python/py-type.c (typy_richcompare): Update.
5000 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5001 * gdbtypes.h (types_deeply_equal): Return bool.
5002 (types_equal): Likewise.
5003 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5004 declare VEC.
5005 (check_types_equal): Change worklist to std::vector. Return
5006 bool.
5007 (struct type_equality_entry): Add constructor.
5008 (compare_maybe_null_strings): Return bool.
5009 (check_types_worklist): Return bool. Change worklist to
5010 std::vector.
5011 (types_deeply_equal): Use std::vector.
5012 (types_equal): Return bool.
5013 (compare_maybe_null_strings): Simplify.
5014
5015 2018-05-29 Tom Tromey <tom@tromey.com>
5016
5017 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5018
5019 2018-05-29 Tom Tromey <tom@tromey.com>
5020
5021 * objc-lang.h: Don't include cp-support.h.
5022 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5023 declare VEC.
5024
5025 2018-05-27 Tom Tromey <tom@tromey.com>
5026
5027 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5028
5029 2018-05-25 Tom Tromey <tom@tromey.com>
5030
5031 * value.c (value::location): Initialize.
5032
5033 2018-05-25 Tom Tromey <tom@tromey.com>
5034
5035 * dbxread.c (init_bincl_list): Remove.
5036 (bincl_list): Now a std::vector.
5037 (bincls_allocated, next_bincl): Remove.
5038 (free_bincl_list, do_free_bincl_list_cleanup)
5039 (make_cleanup_free_bincl_list): Remove.
5040 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5041 unique_xmalloc_ptr.
5042 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5043 (struct header_file_location): Add constructor.
5044 (add_bincl_to_list): Remove.
5045
5046 2018-05-25 Tom Tromey <tom@tromey.com>
5047
5048 * tui/tui.c (tui_enable): Update.
5049 * mi/mi-interp.c (mi_interp::init): Update.
5050 * interps.h (class interp) <name>: New method.
5051 <m_name>: Rename from name.
5052 (~scoped_restore_interp): Update.
5053 * interps.c (interp::interp): Update.
5054 (interp_add, interp_set, interp_lookup_existing)
5055 (current_interp_named_p): Update.
5056
5057 2018-05-25 Tom Tromey <tom@tromey.com>
5058
5059 * interps.c (interp_name): Remove.
5060 * mi/mi-interp.c (mi_interp::init): Update.
5061 * interps.h (interp_name): Remove.
5062 (~scoped_restore_interp): Update.
5063 * tui/tui.c (tui_enable): Update.
5064
5065 2018-05-25 Tom Tromey <tom@tromey.com>
5066
5067 * utils.c (fputs_maybe_filtered): Update.
5068 * linespec.c (decode_line_full): Update.
5069 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5070 (mi_print_breakpoint_for_event, mi_solib_loaded)
5071 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5072 (mi_user_selected_context_changed): Update.
5073 * mi/mi-main.c (mi_execute_command): Update.
5074 * cli/cli-script.c (execute_control_command): Update.
5075 * python/python.c (execute_gdb_command): Update.
5076 * solib.c (info_sharedlibrary_command): Update.
5077 * interps.c (interp_ui_out): Remove.
5078 * interps.h (interp_ui_out): Remove.
5079
5080 2018-05-25 Tom Tromey <tom@tromey.com>
5081
5082 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5083 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5084 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5085
5086 2018-05-25 Tom Tromey <tom@tromey.com>
5087
5088 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5089 * interps.c (interp_exec): Use scoped_restore.
5090
5091 2018-05-25 Tom Tromey <tom@tromey.com>
5092
5093 * remote.c (remote_target::remote_file_get): Use
5094 gdb::byte_vector.
5095 (remote_target::remote_file_put): Likewise.
5096
5097 2018-05-25 Tom Tromey <tom@tromey.com>
5098
5099 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5100 a std::string.
5101 (get_pe_section_index, add_pe_exported_sym): Update.
5102 (read_pe_exported_syms): Use gdb::def_vector.
5103
5104 2018-05-25 Tom Tromey <tom@tromey.com>
5105
5106 * frame.c (remove_prev_frame): Remove.
5107 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5108
5109 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5110
5111 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5112 Remove prototypes.
5113 * mips-linux-nat.c (supply_fpregset): Always call
5114 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5115 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5116 `mips_fill_fpregset'.
5117 * mips-linux-tdep.c (mips_supply_fpregset)
5118 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5119 (mips_fill_fpregset_wrapper): Remove functions.
5120 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5121 (mips_linux_fpregset): Remove variable.
5122 (mips_linux_iterate_over_regset_sections): Use
5123 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5124 (mips_linux_o32_sigframe_init): Remove comment.
5125
5126 2018-05-25 Pedro Alves <palves@redhat.com>
5127
5128 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5129 (struct readahead_cache, struct packet_reg, struct
5130 remote_arch_state, class remote_state): Move higher up in the
5131 file.
5132 (remote_target::m_remote_state): Now an object instead of a pointer.
5133 (remote_target::get_remote_state): Adjust.
5134
5135 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5136
5137 * stack.c (select_and_print_frame): Delete.
5138 (struct function_bounds): Move struct within function.
5139 (func_command): Most content moved into new function
5140 find_frame_for_function, use new function, print result, add
5141 function comment.
5142 (find_frame_for_function): New function, now returns a result.
5143
5144 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5145
5146 * stack.c (iterate_over_block_arg_vars): Fix comment.
5147 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5148
5149 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5150
5151 PR gdb/23203
5152 * frame.c
5153 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5154 Define.
5155 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5156 Define.
5157 * frame.h (class scoped_restore_selected_frame): New class.
5158 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5159 of any exception, use scoped_restore_selected_frame to restore the
5160 frame instead.
5161
5162 2018-05-24 Pedro Alves <palves@redhat.com>
5163
5164 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5165 override.
5166
5167 2018-05-23 Tom Tromey <tom@tromey.com>
5168
5169 * complaints.c (struct complaints): Remove.
5170 (symfile_complaint_book): Remove.
5171 (series): New global.
5172 (complaint_internal): Update.
5173 (clear_complaints): Update.
5174
5175 2018-05-23 Tom Tromey <tom@tromey.com>
5176
5177 * complaints.c (counters): New global.
5178 (struct complain): Remove.
5179 (struct complaints) <root>: Remove.
5180 (complaint_sentinel): Remove.
5181 (symfile_complaint_book): Update.
5182 (find_complaint) Remove.
5183 (complaint_internal, clear_complaints): Update.
5184
5185 2018-05-23 Tom Tromey <tom@tromey.com>
5186
5187 * complaints.c (struct complain) <file, line>: Remove.
5188 (find_complaint): Remove file, line parameters.
5189 (complaint_internal): Update.
5190
5191 2018-05-23 Tom Tromey <tom@tromey.com>
5192
5193 * complaints.c (vcomplaint): Remove.
5194 (complaint_internal) Merge in contents of vcomplaint.
5195
5196 2018-05-23 Tom Tromey <tom@tromey.com>
5197
5198 * complaints.c (struct complaints) <explanation>: Remove.
5199 (symfile_explanations): Remove.
5200 (symfile_complaint_book): Update.
5201 (vcomplaint): Update.
5202 (struct explanation): Remove.
5203
5204 2018-05-23 Tom Tromey <tom@tromey.com>
5205
5206 * complaints.c (symfile_complaints): Remove.
5207 (complaint_internal): Remove "complaints" parameter.
5208 (clear_complaints, vcomplaint): Remove "c" parameter.
5209 (get_complaints): Remove.
5210 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5211 (dwarf2_debug_line_missing_file_complaint)
5212 (dwarf2_debug_line_missing_end_sequence_complaint)
5213 (dwarf2_complex_location_expr_complaint)
5214 (dwarf2_const_value_length_mismatch_complaint)
5215 (dwarf2_section_buffer_overflow_complaint)
5216 (dwarf2_macro_malformed_definition_complaint)
5217 (dwarf2_invalid_attrib_class_complaint)
5218 (create_addrmap_from_index, dw2_symtab_iter_next)
5219 (dw2_expand_marked_cus)
5220 (dw2_debug_names_iterator::find_vec_in_debug_names)
5221 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5222 (create_debug_type_hash_table, init_cutu_and_read_dies)
5223 (partial_die_parent_scope, add_partial_enumeration)
5224 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5225 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5226 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5227 (create_cus_hash_table, create_dwp_hash_table)
5228 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5229 (dwarf2_rnglists_process, dwarf2_ranges_process)
5230 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5231 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5232 (handle_struct_member_die, process_structure_scope)
5233 (read_array_type, read_common_block, read_module_type)
5234 (read_tag_pointer_type, read_typedef, read_base_type)
5235 (read_subrange_type, load_partial_dies, partial_die_info::read)
5236 (partial_die_info::read, partial_die_info::read)
5237 (partial_die_info::read, read_checked_initial_length_and_offset)
5238 (dwarf2_string_attr, read_formatted_entries)
5239 (dwarf_decode_line_header)
5240 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5241 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5242 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5243 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5244 (get_signatured_type, get_DW_AT_signature_type)
5245 (decode_locdesc, file_file_name, consume_improper_spaces)
5246 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5247 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5248 (dwarf2_symbol_mark_computed, set_die_type)
5249 (read_attribute_value): Update.
5250 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5251 Update.
5252 * dbxread.c (unknown_symtype_complaint)
5253 (lbrac_mismatch_complaint, repeated_header_complaint)
5254 (set_namestring, function_outside_compilation_unit_complaint)
5255 (read_dbx_symtab, process_one_symbol): Update.
5256 * gdbtypes.c (stub_noname_complaint): Update.
5257 * windows-nat.c (handle_unload_dll): Update.
5258 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5259 (decode_base_type): Update.
5260 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5261 (eb_complaint, record_include_begin, record_include_end)
5262 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5263 (process_xcoff_symbol, read_symbol)
5264 (function_outside_compilation_unit_complaint)
5265 (scan_xcoff_symtab): Update.
5266 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5267 * buildsym.c (finish_block_internal, make_blockvector)
5268 (end_symtab_get_static_block, augment_type_symtab): Update.
5269 * dtrace-probe.c (dtrace_process_dof)
5270 (dtrace_static_probe_ops::get_probes): Update.
5271 * complaints.h (struct complaint): Don't declare.
5272 (symfile_complaints): Remove.
5273 (complaint_internal): Remove "complaints" parameter.
5274 (complaint): Likewise.
5275 (clear_complaints): Likewise.
5276 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5277 (reread_symbols): Update.
5278 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5279 (dwarf2_frame_cache, decode_frame_entry): Update.
5280 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5281 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5282 (info_selectors_command): Update.
5283 * macrotab.c (macro_include, check_for_redefinition)
5284 (macro_undef): Update.
5285 * objfiles.c (filter_overlapping_sections): Update.
5286 * stabsread.c (invalid_cpp_abbrev_complaint)
5287 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5288 (define_symbol, error_type, read_type, rs6000_builtin_type)
5289 (stabs_method_name_from_physname, read_member_functions)
5290 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5291 (attach_fields_to_type, complain_about_struct_wipeout)
5292 (read_range_type, read_args, common_block_start)
5293 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5294 Update.
5295 * mdebugread.c (index_complaint, unknown_ext_complaint)
5296 (basic_type_complaint, bad_tag_guess_complaint)
5297 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5298 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5299 (parse_procedure, parse_lines)
5300 (function_outside_compilation_unit_complaint)
5301 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5302 (bad_tag_guess_complaint, reg_value_complaint): Update.
5303 * cp-support.c (demangled_name_complaint): Update.
5304 * macroscope.c (sal_macro_scope): Update.
5305 * dwarf-index-write.c (class debug_names): Update.
5306
5307 2018-05-23 Tom Tromey <tom@tromey.com>
5308
5309 * complaints.c (clear_complaints): Remove "noisy" parameter.
5310 * complaints.h (clear_complaints): Update.
5311 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5312 (reread_symbols): Update.
5313
5314 2018-05-23 Tom Tromey <tom@tromey.com>
5315
5316 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5317 SUBSEQUENT_MESSAGE.
5318 (vcomplaint, clear_complaints): Update.
5319 (symfile_explanations): Remove some messages.
5320
5321 2018-05-23 Tom Tromey <tom@tromey.com>
5322
5323 * complaints.c (internal_complaint): Remove.
5324 * complaints.h (internal_complaint): Remove.
5325
5326 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5327
5328 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5329
5330 2018-05-22 Pedro Alves <palves@redhat.com>
5331
5332 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5333 (remote_fileio_badfd, remote_fileio_return_errno)
5334 (remote_fileio_return_success, remote_fileio_func_open)
5335 (remote_fileio_func_open, remote_fileio_func_close)
5336 (remote_fileio_func_read, remote_fileio_func_write)
5337 (remote_fileio_func_lseek, remote_fileio_func_rename)
5338 (remote_fileio_func_unlink, remote_fileio_func_stat)
5339 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5340 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5341 remote_target parameter.
5342 (remote_fio_func_map) <func>: Add remote_target parameter.
5343 (do_remote_fileio_request, remote_fileio_request):
5344 * remote-fileio.h (remote_fileio_request):
5345 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5346 remote_target parameter.
5347 (remote_notif_process, handle_notification): Adjust to pass down
5348 the remote.
5349 (remote_notif_state_allocate): Add remote_target parameter. Save
5350 it.
5351 * remote-notif.h (struct remote_target): Forward declare.
5352 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5353 remote_target parameter.
5354 (struct remote_notif_state) <remote>: New field.
5355 (remote_notif_ack, remote_notif_parse): Add remote_target
5356 parameter.
5357 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5358 remote_target parameter.
5359 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5360 (threads_listing_context, rmt_thread_action, protocol_feature)
5361 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5362 (packet_result, struct threads_listing_context, remote_state):
5363 Move definitions and declarations higher up.
5364 (remote_target) <~remote_target>: Declare.
5365 (remote_download_command_source, remote_file_put, remote_file_get)
5366 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5367 (remote_hostio_pread_vFile, remote_hostio_send_command)
5368 (remote_hostio_set_filesystem, remote_hostio_open)
5369 (remote_hostio_close, remote_hostio_unlink, remote_state)
5370 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5371 (get_memory_write_packet_size, get_memory_read_packet_size)
5372 (append_pending_thread_resumptions, remote_detach_1)
5373 (append_resumption, remote_resume_with_vcont)
5374 (add_current_inferior_and_thread, wait_ns, wait_as)
5375 (process_stop_reply, remote_notice_new_inferior)
5376 (process_initial_stop_replies, remote_add_thread)
5377 (btrace_sync_conf, remote_btrace_maybe_reopen)
5378 (remove_new_fork_children, kill_new_fork_children)
5379 (discard_pending_stop_replies, stop_reply_queue_length)
5380 (check_pending_events_prevent_wildcard_vcont)
5381 (discard_pending_stop_replies_in_queue, stop_reply)
5382 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5383 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5384 (remote_interrupt_as, remote_interrupt_ns)
5385 (remote_get_noisy_reply, remote_query_attached)
5386 (remote_add_inferior, remote_current_thread, get_current_thread)
5387 (set_thread, set_general_thread, set_continue_thread)
5388 (set_general_process, write_ptid)
5389 (remote_unpack_thread_info_response, remote_get_threadinfo)
5390 (parse_threadlist_response, remote_get_threadlist)
5391 (remote_threadlist_iterator, remote_get_threads_with_ql)
5392 (remote_get_threads_with_qxfer)
5393 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5394 (get_offsets, remote_check_symbols, remote_supported_packet)
5395 (remote_query_supported, remote_packet_size)
5396 (remote_serial_quit_handler, remote_detach_pid)
5397 (remote_vcont_probe, remote_resume_with_hc)
5398 (send_interrupt_sequence, interrupt_query)
5399 (remote_notif_get_pending_events, fetch_register_using_p)
5400 (send_g_packet, process_g_packet, fetch_registers_using_g)
5401 (store_register_using_P, store_registers_using_G)
5402 (set_remote_traceframe, check_binary_download)
5403 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5404 (remote_xfer_live_readonly_partial, remote_read_bytes)
5405 (remote_send_printf, remote_flash_write, readchar)
5406 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5407 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5408 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5409 (extended_remote_disable_randomization, extended_remote_run)
5410 (send_environment_packet, extended_remote_environment_support)
5411 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5412 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5413 (packet_command): Now methods of ...
5414 (remote_target): ... this class.
5415 (m_remote_state) <remote_target>: New field.
5416 (struct remote_state) <stop_reply_queue,
5417 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5418 fields.
5419 (remote_state::remote_state): Allocate stop_reply_queue.
5420 (remote_state): Delete global.
5421 (get_remote_state_raw): Delete.
5422 (remote_target::get_remote_state): Allocate m_remote_state on
5423 demand.
5424 (get_current_remote_target): New.
5425 (remote_ops, extended_remote_ops): Delete.
5426 (wait_forever_enabled_p, remote_async_inferior_event_token):
5427 Delete, moved to struct remote_state.
5428 (remote_target::close): Delete self. Destruction bits split to
5429 ...
5430 (remote_target::~remote_target): ... this.
5431 (show_memory_packet_size): Adjust to use
5432 get_current_remote_target.
5433 (struct protocol_feature) <func>: Add remote_target parameter.
5434 All callers adjusted.
5435 (curr_quit_handler_target): New.
5436 (remote_serial_quit_handler): Reimplement.
5437 (remote_target::open_1): Adjust to use get_current_remote_target.
5438 Heap-allocate remote_target/extended_remote_target instances.
5439 (vcont_builder::vcont_builder): Add remote_target parameter, and
5440 save it in m_remote. All callers adjusted.
5441 (vcont_builder::m_remote): New field.
5442 (vcont_builder::restart, vcont_builder::flush)
5443 (vcont_builder::push_action): Use it.
5444 (remote_target::commit_resume): Use it.
5445 (struct queue_iter_param) <remote>: New field.
5446 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5447 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5448 (check_pending_event_prevents_wildcard_vcont_callback)
5449 (remote_target::check_pending_events_prevent_wildcard_vcont)
5450 (remote_target::discard_pending_stop_replies)
5451 (remote_target::discard_pending_stop_replies_in_queue)
5452 (remote_target::remote_notif_remove_queued_reply): Fill in
5453 'remote' field.
5454 (remote_notif_get_pending_events): New.
5455 (remote_target::readchar, remote_target::remote_serial_write):
5456 Save/restore curr_quit_handler_target.
5457 (putpkt): New.
5458 (kill_new_fork_children): Fill in 'remote' field.
5459 (packet_command): Use get_current_remote_target, defer to
5460 remote_target method of same name.
5461 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5462 parameter, and save it in m_remote. All callers adjusted.
5463 (scoped_remote_fd::release): Use m_remote.
5464 (scoped_remote_fd::m_remote): New field.
5465 (remote_file_put, remote_file_get, remote_file_delete): Use
5466 get_current_remote_target, defer to remote_target method of same
5467 name.
5468 (remote_btrace_reset): Add remote_state paremeter. Update all
5469 callers.
5470 (remote_async_inferior_event_handler). Pass down 'data'.
5471 (remote_new_objfile): Use get_current_remote_target.
5472 (remote_target::vcont_r_supported): New.
5473 (set_range_stepping): Use get_current_remote_target and
5474 remote_target::vcont_r_supported.
5475 (_initialize_remote): Don't allocate 'remote_state' and
5476 'stop_reply_queue' globals.
5477 * remote.h (struct remote_target): Forward declare.
5478 (getpkt, putpkt, remote_notif_get_pending_events): Add
5479 'remote_target' parameter.
5480
5481 2018-05-22 Pedro Alves <palves@redhat.com>
5482
5483 * remote.c (vcont_builder): Now a class. Make all data members
5484 private.
5485 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5486 Declare methods.
5487 (vcont_builder_restart): Rename to ...
5488 (vcont_builder::restart): ... this.
5489 (vcont_builder_flush): Rename to ...
5490 (vcont_builder::flush): ... this.
5491 (vcont_builder_push_action): Rename to ...
5492 (vcont_builder::push_action): ... this.
5493 (remote_target::commit_resume): Adjust.
5494
5495 2018-05-22 Pedro Alves <palves@redhat.com>
5496
5497 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5498 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5499 (get_fixed_memory_packet_size): New.
5500 (get_memory_packet_size): Use it.
5501 (set_memory_packet_size): Don't override the config size with
5502 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5503 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5504 Don't refer to get_memory_packet_size if not connected to a remote
5505 target. Show "(default)" if configured size is 0.
5506
5507 2018-05-22 Pedro Alves <palves@redhat.com>
5508
5509 * remote.c (remote_target::mourn_inferior): Move
5510 discard_pending_stop_replies call here from ...
5511 (_initialize_remote): ... here.
5512
5513 2018-05-22 Pedro Alves <palves@redhat.com>
5514
5515 * remote.c (compare_section_command): Remove set_general_process
5516 call.
5517
5518 2018-05-22 Pedro Alves <palves@redhat.com>
5519
5520 * remote.c (struct packet_reg, struct remote_arch_state):
5521 Move higher up in the file.
5522 (remote_state) <m_arch_states>: Store remote_arch_state values
5523 instead of remote_arch_state pointers.
5524 (remote_state::get_remote_arch_state): Adjust.
5525
5526 2018-05-22 Pedro Alves <palves@redhat.com>
5527
5528 * remote.c: Include <unordered_map>.
5529 (remote_state): Now a class.
5530 (remote_state) <get_remote_arch_state>: Declare method.
5531 <get_remote_arch_state>: New field.
5532 (remote_arch_state) <remote_arch_state>: Declare ctor.
5533 <regs>: Now a unique_ptr.
5534 (remote_gdbarch_data_handle): Delete.
5535 (get_remote_arch_state): Delete.
5536 (remote_state::get_remote_arch_state): New.
5537 (get_remote_state): Adjust to call remote_state's
5538 get_remote_arch_state method.
5539 (init_remote_state): Delete, bits factored out to ...
5540 (remote_arch_state::remote_arch_state): ... this new method.
5541 (get_remote_packet_size, get_memory_packet_size)
5542 (process_g_packet, remote_target::fetch_registers)
5543 (remote_target::prepare_to_store, store_registers_using_G)
5544 (remote_target::store_registers, remote_target::get_trace_status):
5545 Adjust to call remote_state's method.
5546 (_initialize_remote): Remove reference to
5547 remote_gdbarch_data_handle.
5548
5549 2018-05-22 Pedro Alves <palves@redhat.com>
5550
5551 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5552 pread>: New method declarations.
5553 (remote_target::open_1): Adjust.
5554 (readahead_cache_invalidate): Rename to ...
5555 (readahead_cache::invalidate): ... this, and adjust to be a class
5556 method.
5557 (readahead_cache_invalidate_fd): Rename to ...
5558 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5559 class method.
5560 (remote_hostio_pwrite): Adjust.
5561 (remote_hostio_pread_from_cache): Rename to ...
5562 (readahead_cache::pread): ... this, and adjust to be a class
5563 method.
5564 (remote_hostio_close): Adjust.
5565
5566 2018-05-22 Pedro Alves <palves@redhat.com>
5567
5568 * remote.c (remote_hostio_close_cleanup): Delete.
5569 (class scoped_remote_fd): New.
5570 (remote_file_put, remote_file_get): Use it.
5571
5572 2018-05-22 Pedro Alves <palves@redhat.com>
5573
5574 (struct vCont_action_support): Use bool and initialize all fields.
5575 (struct readahead_cache): Initialize all fields.
5576 (remote_state): Use bool and initialize all fields.
5577 (remote_state::remote_state, remote_state::~remote_state): New.
5578 (new_remote_state): Delete.
5579 (_initialize_remote): Use new to allocate remote_state.
5580
5581 2018-05-22 Pedro Alves <palves@redhat.com>
5582 張俊芝 <zjz@zjz.name>
5583
5584 PR gdb/22973
5585 * c-exp.y: Include "c-support.h".
5586 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5587 of tolower. Use c_ident_is_alpha to scan names.
5588 * c-lang.c: Include "c-support.h".
5589 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5590 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5591 * c-support.h: New file, with bits factored out from ...
5592 * cp-name-parser.y: ... this file.
5593 Include "c-support.h".
5594 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5595 c-support.h and renamed.
5596 (symbol_end, yylex): Adjust.
5597
5598 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5599
5600 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5601 parameter type to CORE_ADDR.
5602 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5603 parameter type in declaration to CORE_ADDR.
5604 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5605 target_auxv_search to get AT_HWCAP and use the result to get the
5606 target description.
5607 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5608 to CORE_ADDR. Remove the cast of the return value to unsigned
5609 long. Fix error predicate of target_auxv_search.
5610 (ppc_linux_nat_target::read_description): Change the type of the
5611 hwcap variable to CORE_ADDR.
5612
5613 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5614
5615 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5616 if the size of fpscr is larger than 32 bits.
5617
5618 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5619
5620 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5621 (ppc32_linux_vsxregmap): New global.
5622 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5623 regcache_supply_regset, and regcache_collect_regset.
5624 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5625 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5626 (fetch_vsx_register, store_vsx_register): Remove.
5627 (fetch_vsx_registers): Add regno parameter. Get regset using
5628 ppc_linux_vsxregset. Use regset to supply registers.
5629 (store_vsx_registers): Add regno parameter. Get regset using
5630 ppc_linux_vsxregset. Use regset to collect registers.
5631 (fetch_register): Call fetch_vsx_registers instead of
5632 fetch_vsx_register.
5633 (store_register): Call store_vsx_registers instead of
5634 store_vsx_register.
5635 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5636 new regno parameter.
5637 (store_ppc_registers): Call store_vsx_registers with -1 for the
5638 new regno parameter.
5639 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5640 (ppc_collect_vsxregset): Remove.
5641
5642 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5643
5644 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5645 offset fields.
5646 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5647 for vector register offset fields.
5648 (ppc64_fbsd_reg_offsets): Likewise.
5649 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5650 to vector register offset fields.
5651 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5652 to vector register offset fields.
5653 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5654 vector register offset fields.
5655 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5656 initializers for vector register offset fields.
5657 (rs6000_aix64_reg_offsets): Likewise.
5658 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5659 (ppc_supply_vrregset): Remove.
5660 (ppc_collect_vrregset): Remove.
5661 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5662 (ppc_linux_vrregset) : New function.
5663 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5664 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5665 (ppc32_linux_vrregset): Remove.
5666 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5667 and use result instead of ppc32_linux_vrregset.
5668 (ppc32_linux_reg_offsets): Remove initializers for vector register
5669 offset fields.
5670 (ppc64_linux_reg_offsets): Likewise.
5671 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5672 * ppc-linux-nat.c: Include regset.h.
5673 (gdb_vrregset_t): Adjust comment to account for little-endian
5674 mode.
5675 (supply_vrregset, fill_vrregset): Remove.
5676 (fetch_altivec_register, store_altivec_register): Remove.
5677 (fetch_altivec_registers): Add regno parameter. Get regset using
5678 ppc_linux_vrregset. Use regset to supply registers.
5679 (store_altivec_registers): Add regno parameter. Get regset using
5680 ppc_linux_vrregset. Use regset to collect registers.
5681 (fetch_register): Call fetch_altivec_registers instead of
5682 fetch_altivec_register.
5683 (store_register): Call store_altivec_registers instead of
5684 store_altivec_register.
5685 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5686 the new regno parameter.
5687 (store_ppc_registers): Call store_altivec_registers with -1 for
5688 the new regno parameter.
5689
5690 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5691
5692 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5693 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5694 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5695 (gdb_vrregset_t): Change array type size to
5696 PPC_LINUX_SIZEOF_VRREGSET.
5697 (gdb_vsxregset_t): Change array type size to
5698 PPC_LINUX_SIZEOF_VSXREGSET.
5699 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5700 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5701 PPC_LINUX_SIZEOF_VSXREGSET.
5702
5703 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5704
5705 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5706 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5707 nat/ppc-linux.c.
5708 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5709 ppc_linux_target_wordsize with tid.
5710 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5711 wordsize with tid.
5712 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5713 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5714 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5715 tid parameter. Remove static specifier.
5716 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5717 (ppc_linux_target_wordsize): New declaration.
5718
5719 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5720
5721 * arch/ppc-linux-common.c: New file.
5722 * arch/ppc-linux-common.h: New file.
5723 * arch/ppc-linux-tdesc.h: New file.
5724 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5725 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5726 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5727 arch/ppc-linux-tdesc.h.
5728 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5729 arch/ppc-linux-tdesc.h.
5730 (ppc_linux_nat_target::read_description): Remove target
5731 description matching code. Fill a ppc_linux_features struct and
5732 call ppc_linux_match_description with it. Move comment about ISA
5733 2.05 to ppc-linux-common.c.
5734 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5735 arch/ppc-linux-tdesc.h.
5736 (ppc_linux_core_read_description): Remove target description
5737 matching code. Fill a ppc_linux_features struct and call
5738 ppc_linux_match_description with it.
5739 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5740 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5741 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5742 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5743 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5744 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5745 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5746 (tdesc_powerpc_e500l): Remove.
5747
5748 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5749
5750 * ada-lang.c (catch_assert_command): Pass empty string instead
5751 of NULL for excep_string argument.
5752
5753 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5754
5755 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5756 the width of the requested register exceeds the width of the
5757 `ptrace' data type.
5758
5759 2018-05-21 Tom Tromey <tom@tromey.com>
5760
5761 * printcmd.c (output_command): Remove.
5762 (output_command_const): Rename to output_command.
5763 * valprint.h (output_command): Rename from output_command_const.
5764 * tracepoint.c (trace_dump_actions): Call output_command.
5765
5766 2018-05-21 Tom Tromey <tom@tromey.com>
5767
5768 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5769 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5770 * ada-lang.h (create_ada_exception_catchpoint): Update.
5771 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5772 std::string.
5773 (create_excep_cond_exprs, ~ada_catchpoint)
5774 (should_stop_exception, print_one_exception)
5775 (print_mention_exception, print_recreate_exception): Update.
5776 (ada_get_next_arg): Remove.
5777 (catch_ada_exception_command_split): Use std::string. Change type
5778 of "excep_string", "cond_string".
5779 (catch_ada_exception_command): Update.
5780 (create_ada_exception_catchpoint): Change type of excep_string.
5781 (ada_exception_sal): Remove excep_string parameter.
5782 (~ada_catchpoint): Remove.
5783
5784 2018-05-21 Tom Tromey <tom@tromey.com>
5785
5786 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5787 cleanup.
5788
5789 2018-05-21 Tom Tromey <tom@tromey.com>
5790
5791 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5792 Return unique_xmalloc_ptr.
5793 (print_it_exception): Update.
5794
5795 2018-05-21 Tom Tromey <tom@tromey.com>
5796
5797 * tracepoint.c (trace_dump_actions): Use std::string.
5798
5799 2018-05-21 Tom Tromey <tom@tromey.com>
5800
5801 * symfile.c (reread_symbols): Use std::string for original_name.
5802
5803 2018-05-21 Tom Tromey <tom@tromey.com>
5804
5805 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5806 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5807 constructor.
5808
5809 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5810
5811 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5812 instance to...
5813 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5814 * objfiles.c (get_objfile_bfd_data): Allocate
5815 objfile_per_bfd_storage with obstack_new when allocating on
5816 obstack.
5817
5818 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5819
5820 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5821 OBSTACK_ZALLOC.
5822 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5823 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5824 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5825 (add_pending): Likewise.
5826 (parse_symbol): Likewise.
5827 (parse_partial_symbols): Likewise.
5828 (psymtab_to_symtab_1): Likewise.
5829 (new_psymtab): Likewise.
5830 (elfmdebug_build_psymtabs): Likewise.
5831 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5832 * objfiles.c (get_objfile_bfd_data): Likewise.
5833 (objfile_register_static_link): Likewise.
5834 * psymtab.c (allocate_psymtab): Likewise.
5835 * stabsread.c (read_member_functions): Likewise.
5836 * xcoffread.c (xcoff_end_psymtab): Likewise.
5837
5838 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5839
5840 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5841 compiler supports std::is_trivially_constructible.
5842 * common/poison.h: Include obstack.h.
5843 (IsMallocable): Define to is_trivially_constructible if the
5844 compiler supports it, define to true_type otherwise.
5845 (xobnew): New.
5846 (XOBNEW): Redefine.
5847 (xobnewvec): New.
5848 (XOBNEWVEC): Redefine.
5849 * gdb_obstack.h (obstack_zalloc): New.
5850 (OBSTACK_ZALLOC): Redefine.
5851 (obstack_calloc): New.
5852 (OBSTACK_CALLOC): Redefine.
5853 (obstack_new): New.
5854 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5855 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5856 gdbarch.c.
5857 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5858 obstack_calloc/obstack_zalloc.
5859 (gdbarch_obstack_zalloc): Remove.
5860 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5861
5862 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5863
5864 * stack.c (backtrace_command_1): Remove useless variable int i.
5865
5866 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5867
5868 * stack.c (print_frame_info): Fix comment.
5869
5870 2018-05-18 Tom Tromey <tom@tromey.com>
5871
5872 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5873 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5874 (~dwarf2_per_objfile): Update
5875 (dwarf2_get_dwz_file): Use new.
5876 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5877 unique_ptr.
5878
5879 2018-05-18 Tom Tromey <tom@tromey.com>
5880
5881 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5882 unique_ptr.
5883 * dwarf2read.c (struct dwp_file): Add constructor and
5884 initializers.
5885 (open_and_init_dwp_file): Return a unique_ptr.
5886 (dwarf2_per_objfile, create_dwp_hash_table)
5887 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5888 (lookup_dwo_unit_in_dwp): Update.
5889 (open_and_init_dwp_file, get_dwp_file): Update.
5890
5891 2018-05-18 Tom Tromey <tom@tromey.com>
5892
5893 * dwarf2read.c (dwarf2_per_objfile): Update.
5894 (struct mapped_index): Add initializers.
5895 (dwarf2_read_index): Use new.
5896 (dw2_symtab_iter_init): Update.
5897 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5898 unique_ptr.
5899
5900 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5901
5902 * dwarf2read.c (mapped_index) <total_size>: Remove.
5903
5904 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5905
5906 * unittests/format_pieces-selftests.c (test_format_specifier):
5907 Add ARI comments.
5908
5909 2018-05-18 Tom Tromey <tom@tromey.com>
5910
5911 * c-typeprint.c (maybe_print_hole): New function.
5912 (c_print_type_struct_field_offset): Update.
5913 (c_type_print_base_struct_union): Call maybe_print_hole.
5914
5915 2018-05-17 Keith Seitz <keiths@redhat.com>
5916
5917 * breakpoint.c (build_bpstat_chain): New function, moved from
5918 bpstat_stop_status.
5919 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5920 If no stop chain is passed, call build_bpstat_chain to build it.
5921 * breakpoint.h (build_bpstat_chain): Declare.
5922 (bpstat_stop_status): Move documentation here from breakpoint.c.
5923 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5924 build the stop chain and pass it to skip_inline_frames.
5925 Pass this stop chain to bpstat_stop_status.
5926 * inline-frame.c: Include breakpoint.h.
5927 (stopped_by_user_bp_inline_frame): New function.
5928 (skip_inline_frames): Add parameter `stop_chain'.
5929 Move documention to inline-frame.h.
5930 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5931 whether the frame should be elided.
5932 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5933 Add moved documentation and update for new parameter.
5934
5935 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5936
5937 PR cli/14975
5938 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5939 unittests/format_pieces-selftests.c.
5940 * common/format.h (format_piece) <operator==>: New.
5941 (format_pieces) <operator[]>: Remove.
5942 * common/format.c (format_pieces::format_pieces): Handle \e.
5943 * unittests/format_pieces-selftests.c: New.
5944
5945 2018-05-17 Tom Tromey <tom@tromey.com>
5946
5947 PR symtab/23010:
5948 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5949 (dw2_instantiate_symtab): Add skip_partial parameter.
5950 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5951 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5952 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5953 (dw2_expand_symtabs_matching_one)
5954 (dw2_find_pc_sect_compunit_symtab)
5955 (dw2_debug_names_lookup_symbol)
5956 (dw2_debug_names_expand_symtabs_for_function): Update.
5957 (init_cutu_and_read_dies): Add skip_partial parameter.
5958 (process_psymtab_comp_unit, build_type_psymtabs_1)
5959 (process_skeletonless_type_unit, load_partial_comp_unit)
5960 (psymtab_to_symtab_1): Update.
5961 (load_full_comp_unit): Add skip_partial parameter.
5962 (process_imported_unit_die, dwarf2_read_addr_index)
5963 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5964 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5965 (read_signatured_type): Update.
5966
5967 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5968
5969 * value.c (release_value): Remove unused variable.
5970 (record_latest_value): Likewise.
5971 (access_value_history): Likewise.
5972 (preserve_values): Likewise.
5973
5974 2018-05-17 Tom Tromey <tom@tromey.com>
5975
5976 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5977 Initialize.
5978
5979 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5980
5981 PR gdb/22286
5982 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5983 Also handle registers whose width is not a multiple of
5984 PTRACE_TYPE_RET.
5985 (linux_nat_trad_target::store_register): Likewise.
5986
5987 2018-05-16 Tom Tromey <tom@tromey.com>
5988
5989 * gdbcore.h (core_bfd): Redefine.
5990 * corelow.c (core_target::close): Update.
5991 (core_target_open): Update.
5992 * progspace.h (struct program_space) <cbfd>: Now a
5993 gdb_bfd_ref_ptr.
5994
5995 2018-05-16 Tom Tromey <tom@tromey.com>
5996
5997 PR cli/19551:
5998 * symfile-add-flags.h (enum symfile_add_flags)
5999 <SYMFILE_NOT_FILENAME>: New constant.
6000 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6001 objfile name from BFD.
6002 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6003 * minidebug.c (find_separate_debug_file_in_section): Put
6004 ".gnu_debugdata" into BFD's file name.
6005
6006 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6007
6008 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6009 Remove.
6010
6011 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6012
6013 PR binutils/21446
6014 * aarch64-tdep.c (aarch64_analyze_prologue,
6015 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6016 Indicate not interested in errors.
6017
6018 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6019
6020 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6021 Supply the MIPS_ZERO_REGNUM register.
6022
6023 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6024
6025 * mips-tdep.c (mask_address_var): Make variable static.
6026
6027 2018-05-14 Tom Tromey <tom@tromey.com>
6028
6029 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6030
6031 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6032
6033 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6034 FXSAVE_ADDR for the mxcsr register.
6035
6036 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6037
6038 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6039
6040 2018-05-11 Pedro Alves <palves@redhat.com>
6041
6042 * corelow.c (core_target) <core_target>: No longer inline.
6043 Initialize m_core_gdbarch, m_core_vec and build the section table
6044 here.
6045 <~core_target>: New.
6046 <core_gdbarch, get_core_register_section>: New methods.
6047 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6048 factored out from ...
6049 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6050 (core_ops): Delete.
6051 (sniff_core_bfd): Add gdbarch parameter.
6052 (core_close): Delete, merged into ...
6053 (core_target::close): ... here. Delete self.
6054 (core_close_cleanup): Delete.
6055 (core_target_open): Allocate a core_target on the heap. Use a
6056 unique_ptr instead of a cleanup. Bits moved into the core_target
6057 ctor. Adjust to use core_target methods instead of globals.
6058 (get_core_register_section): Rename to ...
6059 (core_target::get_core_register_section): ... this and adjust.
6060 (struct get_core_registers_cb_data): New.
6061 (get_core_registers_cb): Use it. Use bool.
6062 (core_target::fetch_registers, core_target::files_info)
6063 (core_target::xfer_partial, core_target::read_description)
6064 (core_target::pid_to, core_target::thread_name): Adjust to
6065 reference class fields instead of globals.
6066 * target.h (struct target_ops_deleter, target_ops_up): New.
6067
6068 2018-05-11 Pedro Alves <palves@redhat.com>
6069
6070 * corefile.c (core_file_command): Move to corelow.c.
6071 * corelow.c (the_core_target): Delete.
6072 (core_file_command): Moved from corefile.c. Check exec_bfd
6073 instead of the_core_target. Use target_detach instead of calling
6074 into the_core_target directly.
6075 (maybe_say_no_core_file_now): New.
6076 (core_target::detach): Use it.
6077 (_initialize_corelow): Remove references to the_core_target.
6078 * gdbcore.h (the_core_target): Delete.
6079
6080 2018-05-11 Tom Tromey <tromey@redhat.com>
6081 Pedro Alves <palves@redhat.com>
6082
6083 * corefile.c (core_bfd): Remove.
6084 * gdbcore.h (core_bfd): Now a macro.
6085 * progspace.h (struct program_space) <cbfd>: New field.
6086
6087 2018-05-11 Tom Tromey <tom@tromey.com>
6088
6089 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6090 gdb::def_vector.
6091
6092 2018-05-10 Tom Tromey <tom@tromey.com>
6093
6094 * configure: Rebuild.
6095 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6096
6097 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6098
6099 PR server/23158:
6100 * regformats/regdat.sh: Adjust script, following the addition
6101 of the new expedite_regs parameter to init_target_desc.
6102
6103 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6104
6105 PR gdb/23127
6106 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6107 set_gdbarch_significant_addr_bit.
6108 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6109 set_gdbarch_significant_addr_bit.
6110 * utils.c (address_significant): Update to sign extend addr.
6111
6112 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6113
6114 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6115 (xtensa_linux_init_abi): Limit tdep->num_regs by
6116 tdep->num_nopriv_regs.
6117 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6118 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6119 not initialized.
6120
6121 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6122
6123 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6124
6125 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6126
6127 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6128 (I387_MXCSR_INIT_VAL): New constant.
6129 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6130 buffer if it was supplied by the inferior.
6131 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6132 (i387_xsave_get_clear_bv): New function.
6133 (i387_supply_xsave): Only read x87 control registers from the
6134 xsave buffer if the feature is enabled, and the state will have
6135 been written, otherwise, provide a suitable default.
6136 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6137 including x87 control registers. Update control registers if they
6138 have changed from the default value, and mark features as enabled
6139 as required.
6140 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6141
6142 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6143
6144 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6145
6146 2018-05-07 Tom Tromey <tom@tromey.com>
6147
6148 * configure: Rebuild.
6149 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6150
6151 2018-05-07 Tom Tromey <tom@tromey.com>
6152
6153 PR tdep/20362:
6154 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6155 bit. Use correct value for VDIV.
6156
6157 2018-05-04 Tom Tromey <tom@tromey.com>
6158
6159 * configure: Rebuild.
6160 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6161
6162 2018-05-04 Tom Tromey <tom@tromey.com>
6163
6164 * linux-record.c (record_linux_system_call) <case
6165 RECORD_SYS_RECVFROM>: Add "break".
6166
6167 2018-05-04 Tom Tromey <tom@tromey.com>
6168
6169 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6170 Add missing "break".
6171 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6172 Add missing "break".
6173
6174 2018-05-04 Tom Tromey <tom@tromey.com>
6175
6176 * rs6000-tdep.c (ppc_process_record_op4)
6177 (ppc_process_record_op63): Add fall-through comment.
6178
6179 2018-05-04 Tom Tromey <tom@tromey.com>
6180
6181 * i386-tdep.c (i386_process_record): Add fall-through comment.
6182
6183 2018-05-04 Tom Tromey <tom@tromey.com>
6184
6185 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6186 comment.
6187
6188 2018-05-04 Tom Tromey <tom@tromey.com>
6189
6190 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6191 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6192 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6193 comment.
6194 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6195 comment.
6196 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6197 comment.
6198
6199 2018-05-04 Tom Tromey <tom@tromey.com>
6200
6201 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6202
6203 2018-05-04 Tom Tromey <tom@tromey.com>
6204
6205 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6206 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6207 * symfile.c (section_is_mapped): Fix fall-through comment.
6208 * stabsread.c (define_symbol, read_member_functions): Fix
6209 fall-through comment.
6210 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6211 comment.
6212 * remote.c (remote_wait_as): Fix fall-through comment.
6213 * p-exp.y (yylex): Fix fall-through comment.
6214 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6215 comment.
6216 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6217 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6218 * jv-exp.y (yylex): Fix fall-through comment.
6219 * go-exp.y (lex_one_token): Fix fall-through comment.
6220 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6221 fall-through comment.
6222 * f-exp.y (yylex): Fix fall-through comment.
6223 * dwarf2read.c (process_die): Fix fall-through comments.
6224 * dbxread.c (process_one_symbol): Fix fall-through comment.
6225 * d-exp.y (lex_one_token): Fix fall-through comment.
6226 * cp-name-parser.y (yylex): Fix fall-through comment.
6227 * coffread.c (coff_symtab_read): Fix fall-through comment.
6228 * c-exp.y (lex_one_token): Fix fall-through comment.
6229 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6230 comment.
6231 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6232 comment.
6233
6234 2018-05-04 Tom Tromey <tom@tromey.com>
6235
6236 PR python/22730:
6237 * NEWS: Mention gdb.execute change.
6238 * gdbcmd.h (execute_control_command): Don't declare.
6239 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6240 execute_control_commands, execute_control_commands_to_string.
6241 * cli/cli-script.h (execute_control_commands)
6242 (execute_control_commands_to_string): Declare.
6243 (execute_control_command): Add from_tty parameter.
6244 * cli/cli-script.c (execute_control_commands)
6245 (execute_control_commands_to_string): New functions.
6246 (execute_user_command): Use execute_control_commands.
6247 (execute_control_command_1): Add "from_tty" parameter. Update.
6248 (execute_control_command): Likewise.
6249
6250 2018-05-04 Tom Tromey <tom@tromey.com>
6251
6252 PR python/22731:
6253 * NEWS: Mention that breakpoint commands are writable.
6254 * python/py-breakpoint.c (bppy_set_commands): New function.
6255 (breakpoint_object_getset) <"commands">: Use it.
6256
6257 2018-05-04 Tom Tromey <tom@tromey.com>
6258
6259 * tracepoint.c (actions_command): Update.
6260 * mi/mi-cmd-break.c (mi_command_line_array)
6261 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6262 (mi_read_next_line): Remove.
6263 (mi_cmd_break_commands): Update.
6264 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6265 function_view.
6266 * cli/cli-script.c (get_command_line): Update.
6267 (process_next_line): Use function_view. Constify.
6268 (recurse_read_control_structure, read_command_lines)
6269 (read_command_lines_1): Change argument types to function_view.
6270 (do_define_command, document_command): Update.
6271 * breakpoint.h (check_tracepoint_command): Don't declare.
6272 * breakpoint.c (check_tracepoint_command): Remove.
6273 (commands_command_1, create_tracepoint_from_upload): Update.
6274
6275 2018-05-04 Tom Tromey <tom@tromey.com>
6276
6277 PR gdb/11750:
6278 * cli/cli-script.h (enum command_control_type) <define_control>:
6279 New constant.
6280 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6281 (build_command_line, execute_control_command_1)
6282 (process_next_line): Likewise.
6283 (do_define_command): New function, extracted from define_command.
6284 (define_command): Use it.
6285
6286 2018-05-04 Tom Tromey <tom@tromey.com>
6287
6288 * tracepoint.c (actions_command): Update.
6289 * cli/cli-script.h (read_command_lines): Update.
6290 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6291 (MAX_TMPBUF): Remove define.
6292 (define_command): Use string_printf.
6293 (document_command): Likewise.
6294 * breakpoint.c (commands_command_1): Update.
6295
6296 2018-05-04 Tom Tromey <tom@tromey.com>
6297
6298 * top.c (execute_command): Update.
6299 * cli/cli-script.h (print_command_lines): Now varargs.
6300 * cli/cli-script.c (print_command_lines): Now varargs.
6301 (execute_control_command_1) <case while_control, case if_control>:
6302 Update.
6303
6304 2018-05-04 Tom Tromey <tom@tromey.com>
6305
6306 * tracepoint.c (all_tracepoint_actions): Rename from
6307 all_tracepoint_actions_and_cleanup. Change return type.
6308 (actions_command, encode_actions_1, encode_actions)
6309 (trace_dump_actions, tdump_command): Update.
6310 * remote.c (remote_download_command_source): Update.
6311 * python/python.c (gdbpy_eval_from_control_command)
6312 (python_command, python_interactive_command): Update.
6313 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6314 * guile/guile.c (guile_command)
6315 (gdbscm_eval_from_control_command, guile_command): Update.
6316 * compile/compile.c (compile_code_command)
6317 (compile_print_command, compile_to_object): Update.
6318 * cli/cli-script.h (struct command_lines_deleter): New.
6319 (counted_command_line): New typedef.
6320 (struct command_line): Add constructor, destructor.
6321 <body_list>: Remove.
6322 <body_list_0, body_list_1>: New members.
6323 (command_line_up): Remove typedef.
6324 (read_command_lines, read_command_lines_1, get_command_line):
6325 Update.
6326 (copy_command_lines): Don't declare.
6327 * cli/cli-script.c (build_command_line): Use "new".
6328 (get_command_line): Return counted_command_line.
6329 (print_command_lines, execute_user_command)
6330 (execute_control_command_1, while_command, if_command): Update.
6331 (realloc_body_list): Remove.
6332 (process_next_line, recurse_read_control_structure): Update.
6333 (read_command_lines, read_command_lines_1): Return counted_command_line.
6334 (free_command_lines): Use "delete".
6335 (copy_command_lines): Remove.
6336 (define_command, document_command, show_user_1): Update.
6337 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6338 a counted_command_line.
6339 * breakpoint.h (counted_command_line): Remove typedef.
6340 (breakpoint_set_commands): Update.
6341 * breakpoint.c (check_no_tracepoint_commands)
6342 (validate_commands_for_breakpoint): Update.
6343 (breakpoint_set_commands): Change commands to be a
6344 counted_command_line.
6345 (commands_command_1, update_dprintf_command_list)
6346 (create_tracepoint_from_upload): Update.
6347
6348 2018-05-04 Tom Tromey <tom@tromey.com>
6349
6350 * cli/cli-decode.h (cmd_list_element): New constructor.
6351 (~cmd_list_element): New destructor.
6352 (struct cmd_list_element): Add initializers.
6353 * cli/cli-decode.c (do_add_cmd): Use "new".
6354 (delete_cmd): Use "delete".
6355
6356 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6357 Pedro Alves <palves@redhat.com>
6358
6359 PR breakpoints/19806 and support for PR external/20207.
6360 * NEWS: Mention Aarch64 watchpoint improvements.
6361 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6362 watchpoints and PR external/20207 watchpoints.
6363 * nat/aarch64-linux-hw-point.c
6364 (kernel_supports_any_contiguous_range): New.
6365 (aarch64_watchpoint_offset): New.
6366 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6367 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6368 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6369 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6370 next_addr_orig_p. Support PR external/20207 watchpoints.
6371 (aarch64_downgrade_regs): New.
6372 (aarch64_dr_state_insert_one_point): New parameters offset and
6373 addr_orig.
6374 (aarch64_dr_state_remove_one_point): Likewise.
6375 (aarch64_handle_breakpoint): Update caller.
6376 (aarch64_handle_aligned_watchpoint): Likewise.
6377 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6378 aligned_offset.
6379 (aarch64_linux_set_debug_regs): Remove const from state. Call
6380 aarch64_downgrade_regs.
6381 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6382 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6383 (DR_CONTROL_MASK): ... this.
6384 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6385 (unsigned int aarch64_watchpoint_offset): New prototype.
6386 (aarch64_linux_set_debug_regs): Remove const from state.
6387 * utils.c (align_up, align_down): Move to ...
6388 * common/common-utils.c (align_up, align_down): ... here.
6389 * utils.h (align_up, align_down): Move to ...
6390 * common/common-utils.h (align_up, align_down): ... here.
6391
6392 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6393
6394 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6395 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6396 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6397 Re-implement to match the ABI as summarized in GCC's
6398 gcc/config/sparc/sparc.c. All callers updated.
6399 (sparc32_store_arguments): Remove assertion.
6400
6401 2018-05-04 Tom Tromey <tom@tromey.com>
6402
6403 * printcmd.c: Don't include tui.h.
6404 (decode_format): Use skip_spaces.
6405
6406 2018-05-04 Tom Tromey <tom@tromey.com>
6407
6408 PR gdb/22619:
6409 * printcmd.c (last_count): New global.
6410 (x_command): Use saved count when repeating.
6411
6412 2018-05-04 Tom Tromey <tom@tromey.com>
6413
6414 * nto-procfs.c (do_closedir_cleanup): Remove.
6415 (procfs_pidlist): Use gdb_dir_up.
6416 * procfs.c (do_closedir_cleanup): Remove.
6417 (proc_update_threads): Use gdb_dir_up.
6418 * common/filestuff.h (struct gdb_dir_deleter): New.
6419 (gdb_dir_up): New typedef.
6420
6421 2018-05-04 Tom Tromey <tom@tromey.com>
6422
6423 * ada-lang.c (print_mention_exception): Use std::string.
6424
6425 2018-05-04 Tom Tromey <tom@tromey.com>
6426
6427 * ada-lang.c (create_excep_cond_exprs): Update.
6428 (ada_exception_catchpoint_cond_string): Use std::string.
6429
6430 2018-05-04 Tom Tromey <tom@tromey.com>
6431
6432 * ada-lang.c (xget_renaming_scope): Return std::string.
6433 (old_renaming_is_invisible): Update.
6434
6435 2018-05-04 Tom Tromey <tom@tromey.com>
6436
6437 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6438 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6439
6440 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6441
6442 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6443
6444 2018-05-04 Tom Tromey <tom@tromey.com>
6445
6446 * remote.c (remote_query_supported_append): Change type.
6447 (remote_check_symbols): Update.
6448
6449 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6450
6451 PR gdb/11420
6452 * configure.ac: Prepend libpython.
6453 * python/python-config.py: Likewise.
6454 * configure: Regenerate.
6455
6456 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6457
6458 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6459
6460 2018-05-03 Pedro Alves <palves@redhat.com>
6461
6462 * s390-linux-nat.c
6463 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6464 override. Write 'true' instead of '1'.
6465 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6466 declaration.
6467
6468 2018-05-02 Pedro Alves <palves@redhat.com>
6469
6470 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6471 add_inf_child_target.
6472 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6473 add_inf_child_target.
6474 * aix-thread.c (aix_thread_target_info): New.
6475 (aix_thread_target) <shortname, longname, doc>: Delete.
6476 <info>: New.
6477 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6478 add_inf_child_target.
6479 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6480 add_inf_child_target.
6481 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6482 add_inf_child_target.
6483 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6484 add_inf_child_target.
6485 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6486 add_inf_child_target.
6487 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6488 add_inf_child_target.
6489 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6490 add_inf_child_target.
6491 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6492 add_inf_child_target.
6493 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6494 add_inf_child_target.
6495 * bfd-target.c (target_bfd_target_info): New.
6496 (target_bfd) <shortname, longname, doc>: Delete.
6497 <info>: New.
6498 * bsd-kvm.c (bsd_kvm_target_info): New.
6499 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6500 <info>: New.
6501 (bsd_kvm_target::open): Rename to ...
6502 (bsd_kvm_target_open): ... this. Adjust.
6503 * bsd-uthread.c (bsd_uthread_target_info): New.
6504 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6505 <info>: New.
6506 * corefile.c (core_file_command): Adjust.
6507 * corelow.c (core_target_info): New.
6508 (core_target) <shortname, longname, doc>: Delete.
6509 <info>: New.
6510 (core_target::open): Rename to ...
6511 (core_target_open): ... this. Adjust.
6512 * ctf.c (ctf_target_info): New.
6513 (ctf_target) <shortname, longname, doc>: Delete.
6514 <info>: New.
6515 (ctf_target::open): Rename to ...
6516 (ctf_target_open): ... this.
6517 (_initialize_ctf): Adjust.
6518 * exec.c (exec_target_info): New.
6519 (exec_target) <shortname, longname, doc>: Delete.
6520 <info>: New.
6521 (exec_target::open): Rename to ...
6522 (exec_target_open): ... this.
6523 * gdbcore.h (core_target_open): Declare.
6524 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6525 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6526 add_inf_child_target.
6527 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6528 add_inf_child_target.
6529 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6530 add_inf_child_target.
6531 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6532 add_inf_child_target.
6533 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6534 add_inf_child_target.
6535 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6536 add_inf_child_target.
6537 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6538 add_inf_child_target.
6539 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6540 add_inf_child_target.
6541 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6542 add_inf_child_target.
6543 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6544 add_inf_child_target.
6545 * inf-child.c (inf_child_target_info): New.
6546 (inf_child_target::info): New.
6547 (inf_child_open_target): Remove 'target' parameter. Use
6548 get_native_target instead.
6549 (inf_child_target::open): Delete.
6550 (add_inf_child_target): New.
6551 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6552 Delete.
6553 <info>: New.
6554 (add_inf_child_target): Declare.
6555 (inf_child_open_target): Declare.
6556 * linux-thread-db.c (thread_db_target_info): New.
6557 (thread_db_target) <shortname, longname, doc>: Delete.
6558 <info>: New.
6559 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6560 add_inf_child_target.
6561 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6562 add_inf_child_target.
6563 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6564 add_inf_child_target.
6565 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6566 add_inf_child_target.
6567 * make-target-delegates (print_class): Adjust.
6568 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6569 add_inf_child_target.
6570 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6571 add_inf_child_target.
6572 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6573 add_inf_child_target.
6574 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6575 add_inf_child_target.
6576 * nto-procfs.c (nto_native_target_info): New.
6577 (nto_procfs_target_native) <shortname, longname, doc>:
6578 Delete.
6579 <info>: New.
6580 (nto_procfs_target_info): New.
6581 (nto_procfs_target_procfs) <shortname, longname, doc>:
6582 Delete.
6583 <info>: New.
6584 (init_procfs_targets): Adjust.
6585 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6586 add_inf_child_target.
6587 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6588 add_inf_child_target.
6589 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6590 add_inf_child_target.
6591 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6592 add_inf_child_target.
6593 * ravenscar-thread.c (ravenscar_target_info): New.
6594 (ravenscar_thread_target) <shortname, longname, doc>:
6595 Delete.
6596 <info>: New.
6597 * record-btrace.c (record_btrace_target_info):
6598 (record_btrace_target) <shortname, longname, doc>: Delete.
6599 <info>: New.
6600 (record_btrace_target::open): Rename to ...
6601 (record_btrace_target_open): ... this. Adjust.
6602 * record-full.c (record_longname, record_doc): New.
6603 (record_full_base_target) <shortname, longname, doc>: Delete.
6604 <info>: New.
6605 (record_full_target_info): New.
6606 (record_full_target): <shortname>: Delete.
6607 <info>: New.
6608 (record_full_core_open_1, record_full_open_1): Update comments.
6609 (record_full_base_target::open): Rename to ...
6610 (record_full_open): ... this.
6611 (cmd_record_full_restore): Update.
6612 (_initialize_record_full): Update.
6613 * remote-sim.c (remote_sim_target_info): New.
6614 (gdbsim_target) <shortname, longname, doc>: Delete.
6615 <info>: New.
6616 (gdbsim_target::open): Rename to ...
6617 (gdbsim_target_open): ... this.
6618 (_initialize_remote_sim): Adjust.
6619 * remote.c (remote_doc): New.
6620 (remote_target_info): New.
6621 (remote_target) <shortname, longname, doc>: Delete.
6622 <info>: New.
6623 (extended_remote_target_info): New.
6624 (extended_remote_target) <shortname, longname, doc>: Delete.
6625 <info>: New.
6626 (remote_target::open_1): Make static. Adjust.
6627 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6628 * s390-linux-nat.c (_initialize_s390_nat): Use
6629 add_inf_child_target.
6630 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6631 add_inf_child_target.
6632 * sol-thread.c (thread_db_target_info): New.
6633 (sol_thread_target) <shortname, longname, doc>: Delete.
6634 <info>: New.
6635 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6636 add_inf_child_target.
6637 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6638 add_inf_child_target.
6639 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6640 add_inf_child_target.
6641 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6642 add_inf_child_target.
6643 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6644 add_inf_child_target.
6645 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6646 add_inf_child_target.
6647 * spu-linux-nat.c (_initialize_spu_nat): Use
6648 add_inf_child_target.
6649 * spu-multiarch.c (spu_multiarch_target_info): New.
6650 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6651 <info>: New.
6652 * target-delegates.c: Regenerate.
6653 * target.c: Include <unordered_map>.
6654 (target_ops_p): Delete.
6655 (DEF_VEC_P(target_ops_p)): Delete.
6656 (target_factories): New.
6657 (test_target_info): New.
6658 (test_target_ops::info): New.
6659 (open_target): Adjust to use target_factories.
6660 (add_target_with_completer): Rename to ...
6661 (add_target): ... this. Change prototype. Register target_info
6662 and open callback in target_factories. Register target_info in
6663 command context instead of target_ops.
6664 (add_target): Delete old implementation.
6665 (add_deprecated_target_alias): Change prototype. Adjust.
6666 (the_native_target): New.
6667 (set_native_target, get_native_target): New.
6668 (find_default_run_target): Use the_native_target.
6669 (find_attach_target, find_run_target): Simplify.
6670 (target_ops::open): Delete.
6671 (dummy_target_info): New.
6672 (dummy_target::shortname, dummy_target::longname)
6673 (dummy_target::doc): Delete.
6674 (dummy_target::info): New.
6675 (debug_target::shortname, debug_target::longname)
6676 (debug_target::doc): Delete.
6677 (debug_target::info): New.
6678 * target.h (struct target_info): New.
6679 (target_ops::~target_ops): Add comment.
6680 (target_ops::info): New.
6681 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6682 longer virtual. Implement in terms of target_info.
6683 (set_native_target, get_native_target): Declare.
6684 (target_open_ftype): New.
6685 (add_target, add_target_with_completer)
6686 (add_deprecated_target_alias): Change prototype.
6687 (test_target) <shortname, longname, doc>: Delete.
6688 <info>: New.
6689 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6690 add_inf_child_target.
6691 * tracefile-tfile.c (tfile_target_info): New.
6692 (tfile_target) <shortname, longname, doc>: Delete.
6693 <info>: New.
6694 (tfile_target::open): Rename to ...
6695 (tfile_target_open): ... this.
6696 (_initialize_tracefile_tfile): Adjust.
6697 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6698 add_inf_child_target.
6699 * windows-nat.c (_initialize_windows_nat): Use
6700 add_inf_child_target.
6701 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6702 add_inf_child_target.
6703
6704 2018-05-02 Pedro Alves <palves@redhat.com>
6705
6706 * linux-nat.h (linux_nat_target) <low_new_thread,
6707 low_delete_thread, low_new_fork, low_forget_process,
6708 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6709 New virtual methods.
6710 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6711 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6712 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6713 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6714 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6715 Delete.
6716 * linux-fork.c (delete_fork): Adjust to call low method.
6717 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6718 (linux_nat_new_fork, linux_nat_forget_process_hook)
6719 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6720 (linux_nat_status_is_event):
6721 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6722 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6723 to call low method.
6724 (sigtrap_is_event): Rename to ...
6725 (linux_nat_target::low_status_is_event): ... this.
6726 (linux_nat_set_status_is_event): Delete.
6727 (save_stop_reason, linux_nat_wait_1)
6728 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6729 low methods.
6730 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6731 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6732 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6733 (linux_nat_set_prepare_to_resume): Delete.
6734 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6735 low virtual methods.
6736 * amd64-linux-nat.c: Likewise.
6737 * arm-linux-nat.c: Likewise.
6738 * i386-linux-nat.c: Likewise.
6739 * ia64-linux-nat.c: Likewise.
6740 * mips-linux-nat.c: Likewise.
6741 * ppc-linux-nat.c: Likewise.
6742 * s390-linux-nat.c: Likewise.
6743 * sparc64-linux-nat.c: Likewise.
6744 * x86-linux-nat.c: Likewise.
6745 * x86-linux-nat.h: Include "nat/x86-linux.h".
6746 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6747 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6748 Override methods.
6749
6750 2018-05-02 Pedro Alves <palves@redhat.com>
6751
6752 * target.h (target_ops)
6753 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6754 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6755 stopped_by_watchpoint, have_continuable_watchpoint,
6756 stopped_data_address, watchpoint_addr_within_range,
6757 can_accel_watchpoint_condition, can_run, thread_alive,
6758 has_all_memory, has_memory, has_stack, has_registers,
6759 has_execution, can_async_p, is_async_p, supports_non_stop,
6760 always_non_stop_p, can_execute_reverse, supports_multi_process,
6761 supports_enable_disable_tracepoint,
6762 supports_disable_randomization, supports_string_tracing,
6763 supports_evaluation_of_breakpoint_conditions,
6764 can_run_breakpoint_commands, filesystem_is_local,
6765 can_download_tracepoint, get_trace_state_variable_value,
6766 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6767 record_is_replaying, record_will_replay,
6768 augmented_libraries_svr4_read>: Adjust to return bool.
6769 * aarch64-linux-nat.c: All implementations adjusted.
6770 * aix-thread.c: All implementations adjusted.
6771 * arm-linux-nat.c: All implementations adjusted.
6772 * breakpoint.c: All implementations adjusted.
6773 * bsd-kvm.c: All implementations adjusted.
6774 * bsd-uthread.c: All implementations adjusted.
6775 * corelow.c: All implementations adjusted.
6776 * ctf.c: All implementations adjusted.
6777 * darwin-nat.c: All implementations adjusted.
6778 * darwin-nat.h: All implementations adjusted.
6779 * exec.c: All implementations adjusted.
6780 * fbsd-nat.c: All implementations adjusted.
6781 * fbsd-nat.h: All implementations adjusted.
6782 * gnu-nat.c: All implementations adjusted.
6783 * gnu-nat.h: All implementations adjusted.
6784 * go32-nat.c: All implementations adjusted.
6785 * ia64-linux-nat.c: All implementations adjusted.
6786 * inf-child.c: All implementations adjusted.
6787 * inf-child.h: All implementations adjusted.
6788 * inf-ptrace.c: All implementations adjusted.
6789 * inf-ptrace.h: All implementations adjusted.
6790 * linux-nat.c: All implementations adjusted.
6791 * linux-nat.h: All implementations adjusted.
6792 * mips-linux-nat.c: All implementations adjusted.
6793 * nto-procfs.c: All implementations adjusted.
6794 * ppc-linux-nat.c: All implementations adjusted.
6795 * procfs.c: All implementations adjusted.
6796 * ravenscar-thread.c: All implementations adjusted.
6797 * record-btrace.c: All implementations adjusted.
6798 * record-full.c: All implementations adjusted.
6799 * remote-sim.c: All implementations adjusted.
6800 * remote.c: All implementations adjusted.
6801 * s390-linux-nat.c: All implementations adjusted.
6802 * sol-thread.c: All implementations adjusted.
6803 * spu-multiarch.c: All implementations adjusted.
6804 * target-delegates.c: All implementations adjusted.
6805 * target.c: All implementations adjusted.
6806 * target.h: All implementations adjusted.
6807 * tracefile-tfile.c: All implementations adjusted.
6808 * tracefile.c: All implementations adjusted.
6809 * tracefile.h: All implementations adjusted.
6810 * windows-nat.c: All implementations adjusted.
6811 * x86-linux-nat.h: All implementations adjusted.
6812 * x86-nat.h: All implementations adjusted.
6813
6814 2018-05-02 Pedro Alves <palves@redhat.com>
6815
6816 * make-target-delegates (scan_target_h): Don't trim lines here.
6817 Replace sequences of tabs and/or whitespace with a single
6818 whitespace.
6819 (top level, parsing methods): Trim each line before processing it
6820 here.
6821
6822 2018-05-02 Pedro Alves <palves@redhat.com>
6823 John Baldwin <jhb@freebsd.org>
6824
6825 * target.h (enum strata) <debug_stratum>: New.
6826 (struct target_ops) <all delegation methods>: Replace by C++
6827 virtual methods, and drop "to_" prefix. All references updated
6828 throughout.
6829 <to_shortname, to_longname, to_doc, to_data,
6830 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6831 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6832 virtual methods. All references updated throughout.
6833 <can_attach, supports_terminal_ours, can_create_inferior,
6834 get_thread_control_capabilities, attach_no_wait>: New
6835 virtual methods.
6836 <insert_breakpoint, remove_breakpoint>: Now
6837 TARGET_DEFAULT_NORETURN methods.
6838 <info_proc>: Now returns bool.
6839 <to_magic>: Delete.
6840 (OPS_MAGIC): Delete.
6841 (current_target): Delete. All references replaced by references
6842 to ...
6843 (target_stack): ... this. New.
6844 (target_shortname, target_longname): Adjust.
6845 (target_can_run): Now a function declaration.
6846 (default_child_has_all_memory, default_child_has_memory)
6847 (default_child_has_stack, default_child_has_registers)
6848 (default_child_has_execution): Remove target_ops parameter.
6849 (complete_target_initialization): Delete.
6850 (memory_breakpoint_target): New template class.
6851 (test_target_ops): Refactor as a C++ class with virtual methods.
6852 * make-target-delegates (NAME_PART): Tighten.
6853 (POINTER_PART, CP_SYMBOL): New.
6854 (SIMPLE_RETURN_PART): Reimplement.
6855 (VEC_RETURN_PART): Expect less.
6856 (RETURN_PART, VIRTUAL_PART): New.
6857 (METHOD): Adjust to C++ virtual methods.
6858 (scan_target_h): Remove reference to C99.
6859 (dname): Output "target_ops::" prefix.
6860 (write_function_header): Adjust to output a C++ class method.
6861 (write_declaration): New.
6862 (write_delegator): Adjust to output a C++ class method.
6863 (tdname): Output "dummy_target::" prefix.
6864 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6865 method.
6866 (tdefault_names, debug_names): Delete.
6867 (return_types, tdefaults, styles, argtypes_array): New.
6868 (top level): All methods are delegators.
6869 (print_class): New.
6870 (top level): Print dummy_target and debug_target classes.
6871 * target-delegates.c: Regenerate.
6872 * target-debug.h (target_debug_print_enum_info_proc_what)
6873 (target_debug_print_thread_control_capabilities)
6874 (target_debug_print_thread_info_p): New.
6875 * target.c (dummy_target): Delete.
6876 (the_dummy_target, the_debug_target): New.
6877 (target_stack): Now extern.
6878 (set_targetdebug): Push/unpush debug target.
6879 (default_child_has_all_memory, default_child_has_memory)
6880 (default_child_has_stack, default_child_has_registers)
6881 (default_child_has_execution): Remove target_ops parameter.
6882 (complete_target_initialization): Delete.
6883 (add_target_with_completer): No longer call
6884 complete_target_initialization.
6885 (target_supports_terminal_ours): Use regular delegation.
6886 (update_current_target): Delete.
6887 (push_target): No longer check magic number. Don't call
6888 update_current_target.
6889 (unpush_target): Don't call update_current_target.
6890 (target_is_pushed): No longer check magic number.
6891 (target_require_runnable): Skip for all stratums over
6892 process_stratum.
6893 (target_ops::info_proc): New.
6894 (target_info_proc): Use find_target_at and
6895 find_default_run_target.
6896 (target_supports_disable_randomization): Use regular delegation.
6897 (target_get_osdata): Use find_target_at.
6898 (target_ops::open, target_ops::close, target_ops::can_attach)
6899 (target_ops::attach, target_ops::can_create_inferior)
6900 (target_ops::create_inferior, target_ops::can_run)
6901 (target_can_run): New.
6902 (default_fileio_target): Use regular delegation.
6903 (target_ops::fileio_open, target_ops::fileio_pwrite)
6904 (target_ops::fileio_pread, target_ops::fileio_fstat)
6905 (target_ops::fileio_close, target_ops::fileio_unlink)
6906 (target_ops::fileio_readlink): New.
6907 (target_fileio_open_1, target_fileio_unlink)
6908 (target_fileio_readlink): Always call the target method. Handle
6909 FILEIO_ENOSYS.
6910 (return_zero, return_zero_has_execution): Delete.
6911 (init_dummy_target): Delete.
6912 (dummy_target::dummy_target, dummy_target::shortname)
6913 (dummy_target::longname, dummy_target::doc)
6914 (debug_target::debug_target, debug_target::shortname)
6915 (debug_target::longname, debug_target::doc): New.
6916 (target_supports_delete_record): Use regular delegation.
6917 (setup_target_debug): Delete.
6918 (maintenance_print_target_stack): Skip debug_stratum.
6919 (initialize_targets): Instantiate the_dummy_target and
6920 the_debug_target.
6921 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6922 use target_stack.
6923 (target_auxv_search, fprint_target_auxv): Adjust.
6924 (info_auxv_command): Adjust to use target_stack.
6925 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6926 * exceptions.c (print_flush): Handle a NULL target_stack.
6927 * regcache.c (target_ops_no_register): Refactor as class with
6928 virtual methods.
6929
6930 * exec.c (exec_target): New class.
6931 (exec_ops): Now an exec_target.
6932 (exec_open, exec_close_1, exec_get_section_table)
6933 (exec_xfer_partial, exec_files_info, exec_has_memory)
6934 (exec_make_note_section): Refactor as exec_target methods.
6935 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6936 Delete.
6937 (exec_target::find_memory_regions): New.
6938 (_initialize_exec): Don't call init_exec_ops.
6939 * gdbcore.h (exec_file_clear): Delete.
6940
6941 * corefile.c (core_target): Delete.
6942 (core_file_command): Adjust.
6943 * corelow.c (core_target): New class.
6944 (the_core_target): New.
6945 (core_close): Remove target_ops parameter.
6946 (core_close_cleanup): Adjust.
6947 (core_target::close): New.
6948 (core_open, core_detach, get_core_registers, core_files_info)
6949 (core_xfer_partial, core_thread_alive, core_read_description)
6950 (core_pid_to_str, core_thread_name, core_has_memory)
6951 (core_has_stack, core_has_registers, core_info_proc): Rework as
6952 core_target methods.
6953 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6954 (_initialize_corelow): Initialize the_core_target.
6955 * gdbcore.h (core_target): Delete.
6956 (the_core_target): New.
6957
6958 * ctf.c: (ctf_target): New class.
6959 (ctf_ops): Now a ctf_target.
6960 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6961 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6962 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6963 methods.
6964 (init_ctf_ops): Delete.
6965 (_initialize_ctf): Don't call it.
6966 * tracefile-tfile.c (tfile_target): New class.
6967 (tfile_ops): Now a tfile_target.
6968 (tfile_open, tfile_close, tfile_files_info)
6969 (tfile_get_tracepoint_status, tfile_trace_find)
6970 (tfile_fetch_registers, tfile_xfer_partial)
6971 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6972 Refactor as tfile_target methods.
6973 (tfile_xfer_partial_features): Remove target_ops parameter.
6974 (init_tfile_ops): Delete.
6975 (_initialize_tracefile_tfile): Don't call it.
6976 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6977 (tracefile_has_stack, tracefile_has_registers)
6978 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6979 tracefile_target methods.
6980 (init_tracefile_ops): Delete.
6981 (tracefile_target::tracefile_target): New.
6982 * tracefile.h: Include "target.h".
6983 (tracefile_target): New class.
6984 (init_tracefile_ops): Delete.
6985
6986 * spu-multiarch.c (spu_multiarch_target): New class.
6987 (spu_ops): Now a spu_multiarch_target.
6988 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6989 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6990 (spu_search_memory, spu_mourn_inferior): Refactor as
6991 spu_multiarch_target methods.
6992 (init_spu_ops): Delete.
6993 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6994 complete_target_initialization.
6995
6996 * ravenscar-thread.c (ravenscar_thread_target): New class.
6997 (ravenscar_ops): Now a ravenscar_thread_target.
6998 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6999 (ravenscar_thread_alive, ravenscar_pid_to_str)
7000 (ravenscar_fetch_registers, ravenscar_store_registers)
7001 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7002 (ravenscar_stopped_by_hw_breakpoint)
7003 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7004 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7005 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7006 methods.
7007 (init_ravenscar_thread_ops): Delete.
7008 (_initialize_ravenscar): Remove references to
7009 init_ravenscar_thread_ops and complete_target_initialization.
7010
7011 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7012 (bsd_uthread_target): New class.
7013 (bsd_uthread_ops): Now a bsd_uthread_target.
7014 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7015 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7016 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7017 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7018 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7019 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7020 (bsd_uthread_target): Delete function.
7021 (_initialize_bsd_uthread): Remove reference to
7022 complete_target_initialization.
7023
7024 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7025 (target_bfd): ... this new class.
7026 (target_bfd_xfer_partial, target_bfd_get_section_table)
7027 (target_bfd_close): Refactor as target_bfd methods.
7028 (target_bfd::~target_bfd): New.
7029 (target_bfd_reopen): Adjust.
7030 (target_bfd::close): New.
7031
7032 * record-btrace.c (record_btrace_target): New class.
7033 (record_btrace_ops): Now a record_btrace_target.
7034 (record_btrace_open, record_btrace_stop_recording)
7035 (record_btrace_disconnect, record_btrace_close)
7036 (record_btrace_async, record_btrace_info)
7037 (record_btrace_insn_history, record_btrace_insn_history_range)
7038 (record_btrace_insn_history_from, record_btrace_call_history)
7039 (record_btrace_call_history_range)
7040 (record_btrace_call_history_from, record_btrace_record_method)
7041 (record_btrace_is_replaying, record_btrace_will_replay)
7042 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7043 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7044 (record_btrace_store_registers, record_btrace_prepare_to_store)
7045 (record_btrace_to_get_unwinder)
7046 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7047 (record_btrace_commit_resume, record_btrace_wait)
7048 (record_btrace_stop, record_btrace_can_execute_reverse)
7049 (record_btrace_stopped_by_sw_breakpoint)
7050 (record_btrace_supports_stopped_by_sw_breakpoint)
7051 (record_btrace_stopped_by_hw_breakpoint)
7052 (record_btrace_supports_stopped_by_hw_breakpoint)
7053 (record_btrace_update_thread_list, record_btrace_thread_alive)
7054 (record_btrace_goto_begin, record_btrace_goto_end)
7055 (record_btrace_goto, record_btrace_stop_replaying_all)
7056 (record_btrace_execution_direction)
7057 (record_btrace_prepare_to_generate_core)
7058 (record_btrace_done_generating_core): Refactor as
7059 record_btrace_target methods.
7060 (init_record_btrace_ops): Delete.
7061 (_initialize_record_btrace): Remove reference to
7062 init_record_btrace_ops.
7063 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7064 the execution_direction global.
7065 (record_full_base_target, record_full_target)
7066 (record_full_core_target): New classes.
7067 (record_full_ops): Now a record_full_target.
7068 (record_full_core_ops): Now a record_full_core_target.
7069 (record_full_target::detach, record_full_target::disconnect)
7070 (record_full_core_target::disconnect)
7071 (record_full_target::mourn_inferior, record_full_target::kill):
7072 New.
7073 (record_full_open, record_full_close, record_full_async): Refactor
7074 as methods of the record_full_base_target class.
7075 (record_full_resume, record_full_commit_resume): Refactor
7076 as methods of the record_full_target class.
7077 (record_full_wait, record_full_stopped_by_watchpoint)
7078 (record_full_stopped_data_address)
7079 (record_full_stopped_by_sw_breakpoint)
7080 (record_full_supports_stopped_by_sw_breakpoint)
7081 (record_full_stopped_by_hw_breakpoint)
7082 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7083 methods of the record_full_base_target class.
7084 (record_full_store_registers, record_full_xfer_partial)
7085 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7086 Refactor as methods of the record_full_target class.
7087 (record_full_can_execute_reverse, record_full_get_bookmark)
7088 (record_full_goto_bookmark, record_full_execution_direction)
7089 (record_full_record_method, record_full_info, record_full_delete)
7090 (record_full_is_replaying, record_full_will_replay)
7091 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7092 (record_full_stop_replaying): Refactor as methods of the
7093 record_full_base_target class.
7094 (record_full_core_resume, record_full_core_kill)
7095 (record_full_core_fetch_registers)
7096 (record_full_core_prepare_to_store)
7097 (record_full_core_store_registers, record_full_core_xfer_partial)
7098 (record_full_core_insert_breakpoint)
7099 (record_full_core_remove_breakpoint)
7100 (record_full_core_has_execution): Refactor
7101 as methods of the record_full_core_target class.
7102 (record_full_base_target::supports_delete_record): New.
7103 (init_record_full_ops): Delete.
7104 (init_record_full_core_ops): Delete.
7105 (record_full_save): Refactor as method of the
7106 record_full_base_target class.
7107 (_initialize_record_full): Remove references to
7108 init_record_full_ops and init_record_full_core_ops.
7109
7110 * remote.c (remote_target, extended_remote_target): New classes.
7111 (remote_ops): Now a remote_target.
7112 (extended_remote_ops): Now an extended_remote_target.
7113 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7114 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7115 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7116 (remote_pass_signals, remote_set_syscall_catchpoint)
7117 (remote_program_signals, )
7118 (remote_thread_always_alive): Remove target_ops parameter.
7119 (remote_thread_alive, remote_thread_name)
7120 (remote_update_thread_list, remote_threads_extra_info)
7121 (remote_static_tracepoint_marker_at)
7122 (remote_static_tracepoint_markers_by_strid)
7123 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7124 (remote_open): Refactor as methods of remote_target.
7125 (extended_remote_open, extended_remote_detach)
7126 (extended_remote_attach, extended_remote_post_attach):
7127 (extended_remote_supports_disable_randomization)
7128 (extended_remote_create_inferior): : Refactor as method of
7129 extended_remote_target.
7130 (remote_set_permissions, remote_open_1, remote_detach)
7131 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7132 (remote_resume, remote_commit_resume, remote_stop)
7133 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7134 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7135 (remote_prepare_to_store, remote_store_registers)
7136 (remote_flash_erase, remote_flash_done, remote_files_info)
7137 (remote_kill, remote_mourn, remote_insert_breakpoint)
7138 (remote_remove_breakpoint, remote_insert_watchpoint)
7139 (remote_watchpoint_addr_within_range)
7140 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7141 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7142 (remote_supports_stopped_by_sw_breakpoint)
7143 (remote_stopped_by_hw_breakpoint)
7144 (remote_supports_stopped_by_hw_breakpoint)
7145 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7146 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7147 (remote_verify_memory): Refactor as methods of remote_target.
7148 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7149 parameter.
7150 (remote_xfer_partial, remote_get_memory_xfer_limit)
7151 (remote_search_memory, remote_rcmd, remote_memory_map)
7152 (remote_pid_to_str, remote_get_thread_local_address)
7153 (remote_get_tib_address, remote_read_description): Refactor as
7154 methods of remote_target.
7155 (remote_target::fileio_open, remote_target::fileio_pwrite)
7156 (remote_target::fileio_pread, remote_target::fileio_close): New.
7157 (remote_hostio_readlink, remote_hostio_fstat)
7158 (remote_filesystem_is_local, remote_can_execute_reverse)
7159 (remote_supports_non_stop, remote_supports_disable_randomization)
7160 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7161 (remote_supports_enable_disable_tracepoint)
7162 (remote_supports_string_tracing)
7163 (remote_can_run_breakpoint_commands, remote_trace_init)
7164 (remote_download_tracepoint, remote_can_download_tracepoint)
7165 (remote_download_trace_state_variable, remote_enable_tracepoint)
7166 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7167 (remote_trace_start, remote_get_trace_status)
7168 (remote_get_tracepoint_status, remote_trace_stop)
7169 (remote_trace_find, remote_get_trace_state_variable_value)
7170 (remote_save_trace_data, remote_get_raw_trace_data)
7171 (remote_set_disconnected_tracing, remote_core_of_thread)
7172 (remote_set_circular_trace_buffer, remote_traceframe_info)
7173 (remote_get_min_fast_tracepoint_insn_len)
7174 (remote_set_trace_buffer_size, remote_set_trace_notes)
7175 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7176 (remote_disable_btrace, remote_teardown_btrace)
7177 (remote_read_btrace, remote_btrace_conf)
7178 (remote_augmented_libraries_svr4_read, remote_load)
7179 (remote_pid_to_exec_file, remote_can_do_single_step)
7180 (remote_execution_direction, remote_thread_handle_to_thread_info):
7181 Refactor as methods of remote_target.
7182 (init_remote_ops, init_extended_remote_ops): Delete.
7183 (remote_can_async_p, remote_is_async_p, remote_async)
7184 (remote_thread_events, remote_upload_tracepoints)
7185 (remote_upload_trace_state_variables): Refactor as methods of
7186 remote_target.
7187 (_initialize_remote): Remove references to init_remote_ops and
7188 init_extended_remote_ops.
7189
7190 * remote-sim.c (gdbsim_target): New class.
7191 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7192 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7193 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7194 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7195 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7196 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7197 Refactor as methods of gdbsim_target.
7198 (gdbsim_ops): Now a gdbsim_target.
7199 (init_gdbsim_ops): Delete.
7200 (gdbsim_cntrl_c): Adjust.
7201 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7202
7203 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7204 (the_amd64_linux_nat_target): New.
7205 (amd64_linux_fetch_inferior_registers)
7206 (amd64_linux_store_inferior_registers): Refactor as methods of
7207 amd64_linux_nat_target.
7208 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7209 * i386-linux-nat.c: Don't include "linux-nat.h".
7210 (i386_linux_nat_target): New class.
7211 (the_i386_linux_nat_target): New.
7212 (i386_linux_fetch_inferior_registers)
7213 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7214 as methods of i386_linux_nat_target.
7215 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7216 * inf-child.c (inf_child_ops): Delete.
7217 (inf_child_fetch_inferior_registers)
7218 (inf_child_store_inferior_registers): Delete.
7219 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7220 methods of inf_child_target.
7221 (inf_child_target::supports_terminal_ours)
7222 (inf_child_target::terminal_init)
7223 (inf_child_target::terminal_inferior)
7224 (inf_child_target::terminal_ours_for_output)
7225 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7226 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7227 New.
7228 (inf_child_open, inf_child_disconnect, inf_child_close)
7229 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7230 (inf_child_post_startup_inferior, inf_child_can_run)
7231 (inf_child_pid_to_exec_file): Refactor as methods of
7232 inf_child_target.
7233 (inf_child_follow_fork): Delete.
7234 (inf_child_target::can_create_inferior)
7235 (inf_child_target::can_attach): New.
7236 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7237 (inf_child_target::has_stack, inf_child_target::has_registers)
7238 (inf_child_target::has_execution): New.
7239 (inf_child_fileio_open, inf_child_fileio_pwrite)
7240 (inf_child_fileio_pread, inf_child_fileio_fstat)
7241 (inf_child_fileio_close, inf_child_fileio_unlink)
7242 (inf_child_fileio_readlink, inf_child_use_agent)
7243 (inf_child_can_use_agent): Refactor as methods of
7244 inf_child_target.
7245 (return_zero, inf_child_target): Delete.
7246 (inf_child_target::inf_child_target): New.
7247 * inf-child.h: Include "target.h".
7248 (inf_child_target): Delete function prototype.
7249 (inf_child_target): New class.
7250 (inf_child_open_target, inf_child_mourn_inferior)
7251 (inf_child_maybe_unpush_target): Delete.
7252 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7253 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7254 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7255 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7256 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7257 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7258 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7259 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7260 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7261 methods of inf_ptrace_target.
7262 (inf_ptrace_target): Delete function.
7263 * inf-ptrace.h: Include "inf-child.h".
7264 (inf_ptrace_target): Delete function declaration.
7265 (inf_ptrace_target): New class.
7266 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7267 * linux-nat.c (linux_target): New.
7268 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7269 (linux_nat_target::~linux_nat_target): New.
7270 (linux_child_post_attach, linux_child_post_startup_inferior)
7271 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7272 (linux_child_remove_fork_catchpoint)
7273 (linux_child_insert_vfork_catchpoint)
7274 (linux_child_remove_vfork_catchpoint)
7275 (linux_child_insert_exec_catchpoint)
7276 (linux_child_remove_exec_catchpoint)
7277 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7278 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7279 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7280 (linux_nat_stopped_data_address)
7281 (linux_nat_stopped_by_sw_breakpoint)
7282 (linux_nat_supports_stopped_by_sw_breakpoint)
7283 (linux_nat_stopped_by_hw_breakpoint)
7284 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7285 (linux_nat_kill, linux_nat_mourn_inferior)
7286 (linux_nat_xfer_partial, linux_nat_thread_alive)
7287 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7288 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7289 (linux_child_static_tracepoint_markers_by_strid)
7290 (linux_nat_is_async_p, linux_nat_can_async_p)
7291 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7292 (linux_nat_supports_multi_process)
7293 (linux_nat_supports_disable_randomization, linux_nat_async)
7294 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7295 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7296 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7297 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7298 methods of linux_nat_target.
7299 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7300 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7301 parameter.
7302 (check_stopped_by_watchpoint): Adjust.
7303 (linux_xfer_partial): Delete.
7304 (linux_target_install_ops, linux_target, linux_nat_add_target):
7305 Delete.
7306 (linux_nat_target::linux_nat_target): New.
7307 * linux-nat.h: Include "inf-ptrace.h".
7308 (linux_nat_target): New.
7309 (linux_target, linux_target_install_ops, linux_nat_add_target):
7310 Delete function declarations.
7311 (linux_target): Declare global.
7312 * linux-thread-db.c (thread_db_target): New.
7313 (thread_db_target::thread_db_target): New.
7314 (thread_db_ops): Delete.
7315 (the_thread_db_target): New.
7316 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7317 (thread_db_update_thread_list, thread_db_pid_to_str)
7318 (thread_db_extra_thread_info)
7319 (thread_db_thread_handle_to_thread_info)
7320 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7321 (thread_db_resume): Refactor as methods of thread_db_target.
7322 (init_thread_db_ops): Delete.
7323 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7324 * x86-linux-nat.c: Don't include "linux-nat.h".
7325 (super_post_startup_inferior): Delete.
7326 (x86_linux_nat_target::~x86_linux_nat_target): New.
7327 (x86_linux_child_post_startup_inferior)
7328 (x86_linux_read_description, x86_linux_enable_btrace)
7329 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7330 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7331 methods of x86_linux_nat_target.
7332 (x86_linux_create_target): Delete. Bits folded ...
7333 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7334 pointer.
7335 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7336 (x86_linux_nat_target): New class.
7337 (x86_linux_create_target): Delete.
7338 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7339 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7340 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7341 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7342 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7343 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7344 make extern.
7345 (x86_use_watchpoints): Delete.
7346 * x86-nat.h: Include "breakpoint.h" and "target.h".
7347 (x86_use_watchpoints): Delete.
7348 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7349 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7350 (x86_insert_watchpoint, x86_remove_watchpoint)
7351 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7352 (x86_stopped_by_hw_breakpoint): New declarations.
7353 (x86_nat_target): New template class.
7354
7355 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7356 (the_ppc_linux_nat_target): New.
7357 (ppc_linux_fetch_inferior_registers)
7358 (ppc_linux_can_use_hw_breakpoint)
7359 (ppc_linux_region_ok_for_hw_watchpoint)
7360 (ppc_linux_ranged_break_num_registers)
7361 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7362 (ppc_linux_insert_mask_watchpoint)
7363 (ppc_linux_remove_mask_watchpoint)
7364 (ppc_linux_can_accel_watchpoint_condition)
7365 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7366 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7367 (ppc_linux_watchpoint_addr_within_range)
7368 (ppc_linux_masked_watch_num_registers)
7369 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7370 (ppc_linux_read_description): Refactor as methods of
7371 ppc_linux_nat_target.
7372 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7373
7374 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7375 (procfs_target): New class.
7376 (the_procfs_target): New.
7377 (procfs_target): Delete function.
7378 (procfs_auxv_parse, procfs_attach, procfs_detach)
7379 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7380 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7381 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7382 (procfs_create_inferior, procfs_update_thread_list)
7383 (procfs_thread_alive, procfs_pid_to_str)
7384 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7385 (procfs_stopped_data_address, procfs_insert_watchpoint)
7386 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7387 (proc_find_memory_regions, procfs_info_proc)
7388 (procfs_make_note_section): Refactor as methods of procfs_target.
7389 (_initialize_procfs): Adjust.
7390 * sol-thread.c (sol_thread_target): New class.
7391 (sol_thread_ops): Now a sol_thread_target.
7392 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7393 (sol_thread_fetch_registers, sol_thread_store_registers)
7394 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7395 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7396 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7397 (init_sol_thread_ops): Delete.
7398 (_initialize_sol_thread): Adjust. Remove references to
7399 init_sol_thread_ops and complete_target_initialization.
7400
7401 * windows-nat.c (windows_nat_target): New class.
7402 (windows_fetch_inferior_registers)
7403 (windows_store_inferior_registers, windows_resume, windows_wait)
7404 (windows_attach, windows_detach, windows_pid_to_exec_file)
7405 (windows_files_info, windows_create_inferior)
7406 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7407 (windows_close, windows_pid_to_str, windows_xfer_partial)
7408 (windows_get_tib_address, windows_get_ada_task_ptid)
7409 (windows_thread_name, windows_thread_alive): Refactor as
7410 windows_nat_target methods.
7411 (do_initial_windows_stuff): Adjust.
7412 (windows_target): Delete function.
7413 (_initialize_windows_nat): Adjust.
7414
7415 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7416 (darwin_mourn_inferior, darwin_kill_inferior)
7417 (darwin_create_inferior, darwin_attach, darwin_detach)
7418 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7419 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7420 (darwin_supports_multi_process): Refactor as darwin_nat_target
7421 methods.
7422 (darwin_resume_to, darwin_files_info): Delete.
7423 (_initialize_darwin_inferior): Rename to ...
7424 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7425 * darwin-nat.h: Include "inf-child.h".
7426 (darwin_nat_target): New class.
7427 (darwin_complete_target): Delete.
7428 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7429 (darwin_target): New.
7430 (i386_darwin_fetch_inferior_registers)
7431 (i386_darwin_store_inferior_registers): Refactor as methods of
7432 darwin_nat_target.
7433 (darwin_complete_target): Delete, with ...
7434 (_initialize_i386_darwin_nat): ... bits factored out here.
7435
7436 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7437 (the_alpha_linux_nat_target): New.
7438 (alpha_linux_register_u_offset): Refactor as
7439 alpha_linux_nat_target method.
7440 (_initialize_alpha_linux_nat): Adjust.
7441 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7442 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7443 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7444 methods of linux_nat_trad_target.
7445 (linux_trad_target): Delete.
7446 * linux-nat-trad.h (linux_trad_target): Delete function.
7447 (linux_nat_trad_target): New class.
7448 * mips-linux-nat.c (mips_linux_nat_target): New class.
7449 (super_fetch_registers, super_store_registers, super_close):
7450 Delete.
7451 (the_mips_linux_nat_target): New.
7452 (mips64_linux_regsets_fetch_registers)
7453 (mips64_linux_regsets_store_registers)
7454 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7455 (mips_linux_register_u_offset, mips_linux_read_description)
7456 (mips_linux_can_use_hw_breakpoint)
7457 (mips_linux_stopped_by_watchpoint)
7458 (mips_linux_stopped_data_address)
7459 (mips_linux_region_ok_for_hw_watchpoint)
7460 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7461 (mips_linux_close): Refactor as methods of mips_linux_nat.
7462 (_initialize_mips_linux_nat): Adjust to C++ification.
7463
7464 * aix-thread.c (aix_thread_target): New class.
7465 (aix_thread_ops): Now an aix_thread_target.
7466 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7467 (aix_thread_fetch_registers, aix_thread_store_registers)
7468 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7469 (aix_thread_thread_alive, aix_thread_pid_to_str)
7470 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7471 Refactor as methods of aix_thread_target.
7472 (init_aix_thread_ops): Delete.
7473 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7474 and complete_target_initialization.
7475 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7476 (rs6000_nat_target): New class.
7477 (the_rs6000_nat_target): New.
7478 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7479 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7480 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7481 (super_create_inferior): Delete.
7482 (_initialize_rs6000_nat): Adjust to C++ification.
7483
7484 * arm-linux-nat.c (arm_linux_nat_target): New class.
7485 (the_arm_linux_nat_target): New.
7486 (arm_linux_fetch_inferior_registers)
7487 (arm_linux_store_inferior_registers, arm_linux_read_description)
7488 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7489 (arm_linux_remove_hw_breakpoint)
7490 (arm_linux_region_ok_for_hw_watchpoint)
7491 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7492 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7493 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7494 arm_linux_nat_target.
7495 (_initialize_arm_linux_nat): Adjust to C++ification.
7496
7497 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7498 (the_aarch64_linux_nat_target): New.
7499 (aarch64_linux_fetch_inferior_registers)
7500 (aarch64_linux_store_inferior_registers)
7501 (aarch64_linux_child_post_startup_inferior)
7502 (aarch64_linux_read_description)
7503 (aarch64_linux_can_use_hw_breakpoint)
7504 (aarch64_linux_insert_hw_breakpoint)
7505 (aarch64_linux_remove_hw_breakpoint)
7506 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7507 (aarch64_linux_region_ok_for_hw_watchpoint)
7508 (aarch64_linux_stopped_data_address)
7509 (aarch64_linux_stopped_by_watchpoint)
7510 (aarch64_linux_watchpoint_addr_within_range)
7511 (aarch64_linux_can_do_single_step): Refactor as methods of
7512 aarch64_linux_nat_target.
7513 (super_post_startup_inferior): Delete.
7514 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7515
7516 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7517 (the_hppa_linux_nat_target): New.
7518 (hppa_linux_fetch_inferior_registers)
7519 (hppa_linux_store_inferior_registers): Refactor as methods of
7520 hppa_linux_nat_target.
7521 (_initialize_hppa_linux_nat): Adjust to C++ification.
7522
7523 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7524 (the_ia64_linux_nat_target): New.
7525 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7526 (ia64_linux_stopped_data_address)
7527 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7528 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7529 ia64_linux_nat_target methods.
7530 (super_xfer_partial): Delete.
7531 (_initialize_ia64_linux_nat): Adjust to C++ification.
7532
7533 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7534 (the_m32r_linux_nat_target): New.
7535 (m32r_linux_fetch_inferior_registers)
7536 (m32r_linux_store_inferior_registers): Refactor as
7537 m32r_linux_nat_target methods.
7538 (_initialize_m32r_linux_nat): Adjust to C++ification.
7539
7540 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7541 (the_m68k_linux_nat_target): New.
7542 (m68k_linux_fetch_inferior_registers)
7543 (m68k_linux_store_inferior_registers): Refactor as
7544 m68k_linux_nat_target methods.
7545 (_initialize_m68k_linux_nat): Adjust to C++ification.
7546
7547 * s390-linux-nat.c (s390_linux_nat_target): New class.
7548 (the_s390_linux_nat_target): New.
7549 (s390_linux_fetch_inferior_registers)
7550 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7551 (s390_insert_watchpoint, s390_remove_watchpoint)
7552 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7553 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7554 (s390_auxv_parse, s390_read_description): Refactor as methods of
7555 s390_linux_nat_target.
7556 (_initialize_s390_nat): Adjust to C++ification.
7557
7558 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7559 (the_sparc_linux_nat_target): New.
7560 (_initialize_sparc_linux_nat): Adjust to C++ification.
7561 * sparc-nat.c (sparc_fetch_inferior_registers)
7562 (sparc_store_inferior_registers): Remove target_ops parameter.
7563 * sparc-nat.h (sparc_fetch_inferior_registers)
7564 (sparc_store_inferior_registers): Remove target_ops parameter.
7565 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7566 (the_sparc64_linux_nat_target): New.
7567 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7568
7569 * spu-linux-nat.c (spu_linux_nat_target): New class.
7570 (the_spu_linux_nat_target): New.
7571 (spu_child_post_startup_inferior, spu_child_post_attach)
7572 (spu_child_wait, spu_fetch_inferior_registers)
7573 (spu_store_inferior_registers, spu_xfer_partial)
7574 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7575 methods.
7576 (_initialize_spu_nat): Adjust to C++ification.
7577
7578 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7579 (the_tilegx_linux_nat_target): New.
7580 (fetch_inferior_registers, store_inferior_registers):
7581 Refactor as methods.
7582 (_initialize_tile_linux_nat): Adjust to C++ification.
7583
7584 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7585 (the_xtensa_linux_nat_target): New.
7586 (xtensa_linux_fetch_inferior_registers)
7587 (xtensa_linux_store_inferior_registers): Refactor as
7588 xtensa_linux_nat_target methods.
7589 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7590
7591 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7592 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7593 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7594 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7595 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7596 (fbsd_stopped_by_sw_breakpoint)
7597 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7598 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7599 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7600 (fbsd_post_startup_inferior, fbsd_post_attach)
7601 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7602 (fbsd_set_syscall_catchpoint)
7603 (super_xfer_partial, super_resume, super_wait)
7604 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7605 (fbsd_handle_debug_trap): Remove target_ops parameter.
7606 (fbsd_nat_add_target): Delete.
7607 * fbsd-nat.h: Include "inf-ptrace.h".
7608 (fbsd_nat_add_target): Delete.
7609 (USE_SIGTRAP_SIGINFO): Define.
7610 (fbsd_nat_target): New class.
7611
7612 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7613 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7614 (amd64bsd_target): Delete.
7615 * amd64-bsd-nat.h: New file.
7616 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7617 "x86-bsd-nat.h".
7618 (amd64_fbsd_nat_target): New class.
7619 (the_amd64_fbsd_nat_target): New.
7620 (amd64fbsd_read_description): Refactor as method of
7621 amd64_fbsd_nat_target.
7622 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7623 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7624 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7625 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7626 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7627 (i386bsd_target): Delete.
7628 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7629 (i386bsd_fetch_inferior_registers)
7630 (i386bsd_store_inferior_registers): Declare.
7631 (i386_bsd_nat_target): New class.
7632 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7633 (the_i386_fbsd_nat_target): New.
7634 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7635 i386_fbsd_nat_target methods.
7636 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7637 (_initialize_i386fbsd_nat): Adjust to C++ification.
7638 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7639 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7640 (_initialize_x86_bsd_nat): Adjust to C++ification.
7641 * x86-bsd-nat.h: Include "x86-nat.h".
7642 (x86bsd_target): Delete declaration.
7643 (x86bsd_nat_target): New class.
7644
7645 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7646 (the_aarch64_fbsd_nat_target): New.
7647 (aarch64_fbsd_fetch_inferior_registers)
7648 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7649 aarch64_fbsd_nat_target.
7650 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7651 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7652 (the_alpha_bsd_nat_target): New.
7653 (alphabsd_fetch_inferior_registers)
7654 (alphabsd_store_inferior_registers): Refactor as
7655 alpha_bsd_nat_target methods.
7656 (_initialize_alphabsd_nat): Refactor as methods of
7657 alpha_bsd_nat_target.
7658 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7659 (the_amd64_nbsd_nat_target): New.
7660 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7661 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7662 (the_amd64_obsd_nat_target): New.
7663 (_initialize_amd64obsd_nat): Adjust to C++ification.
7664 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7665 (the_arm_fbsd_nat_target): New.
7666 (arm_fbsd_fetch_inferior_registers)
7667 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7668 (_initialize_arm_fbsd_nat): Refactor as methods of
7669 arm_fbsd_nat_target.
7670 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7671 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7672 (the_arm_netbsd_nat_target): New.
7673 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7674 arm_netbsd_nat_target.
7675 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7676 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7677 (the_hppa_nbsd_nat_target): New.
7678 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7679 hppa_nbsd_nat_target methods.
7680 (_initialize_hppanbsd_nat): Adjust to C++ification.
7681 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7682 (the_hppa_obsd_nat_target): New.
7683 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7684 methods of hppa_obsd_nat_target.
7685 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7686 add_target.
7687 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7688 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7689 add_target.
7690 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7691 (_initialize_i386obsd_nat): Use add_target.
7692 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7693 (the_m68k_bsd_nat_target): New.
7694 (m68kbsd_fetch_inferior_registers)
7695 (m68kbsd_store_inferior_registers): Refactor as methods of
7696 m68k_bsd_nat_target.
7697 (_initialize_m68kbsd_nat): Adjust to C++ification.
7698 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7699 (the_mips_fbsd_nat_target): New.
7700 (mips_fbsd_fetch_inferior_registers)
7701 (mips_fbsd_store_inferior_registers): Refactor as methods of
7702 mips_fbsd_nat_target.
7703 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7704 add_target.
7705 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7706 (the_mips_nbsd_nat_target): New.
7707 (mipsnbsd_fetch_inferior_registers)
7708 (mipsnbsd_store_inferior_registers): Refactor as methods of
7709 mips_nbsd_nat_target.
7710 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7711 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7712 (the_mips64_obsd_nat_target): New.
7713 (mips64obsd_fetch_inferior_registers)
7714 (mips64obsd_store_inferior_registers): Refactor as methods of
7715 mips64_obsd_nat_target.
7716 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7717 add_target.
7718 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7719 nbsd_nat_target.
7720 * nbsd-nat.h: Include "inf-ptrace.h".
7721 (nbsd_nat_target): New class.
7722 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7723 (obsd_wait): Refactor as methods of obsd_nat_target.
7724 (obsd_add_target): Delete.
7725 * obsd-nat.h: Include "inf-ptrace.h".
7726 (obsd_nat_target): New class.
7727 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7728 (the_ppc_fbsd_nat_target): New.
7729 (ppcfbsd_fetch_inferior_registers)
7730 (ppcfbsd_store_inferior_registers): Refactor as methods of
7731 ppc_fbsd_nat_target.
7732 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7733 add_target.
7734 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7735 (the_ppc_nbsd_nat_target): New.
7736 (ppcnbsd_fetch_inferior_registers)
7737 (ppcnbsd_store_inferior_registers): Refactor as methods of
7738 ppc_nbsd_nat_target.
7739 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7740 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7741 (the_ppc_obsd_nat_target): New.
7742 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7743 methods of ppc_obsd_nat_target.
7744 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7745 add_target.
7746 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7747 (the_sh_nbsd_nat_target): New.
7748 (shnbsd_fetch_inferior_registers)
7749 (shnbsd_store_inferior_registers): Refactor as methods of
7750 sh_nbsd_nat_target.
7751 (_initialize_shnbsd_nat): Adjust to C++ification.
7752 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7753 (inf_ptrace_xfer_partial): Delete.
7754 (sparc_xfer_partial, sparc_target): Delete.
7755 * sparc-nat.h (sparc_fetch_inferior_registers)
7756 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7757 (sparc_target): Delete function declaration.
7758 (sparc_target): New template class.
7759 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7760 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7761 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7762 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7763 add_target.
7764 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7765 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7766 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7767 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7768 add_target.
7769 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7770 (the_vax_bsd_nat_target): New.
7771 (vaxbsd_fetch_inferior_registers)
7772 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7773 methods.
7774 (_initialize_vaxbsd_nat): Adjust to C++ification.
7775
7776 * bsd-kvm.c (bsd_kvm_target): New class.
7777 (bsd_kvm_ops): Now a bsd_kvm_target.
7778 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7779 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7780 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7781 bsd_kvm_target.
7782 (bsd_kvm_return_one): Delete.
7783 (bsd_kvm_add_target): Adjust to C++ification.
7784
7785 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7786 (nto_procfs_target_procfs): New classes.
7787 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7788 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7789 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7790 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7791 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7792 (procfs_remove_hw_breakpoint, procfs_resume)
7793 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7794 (procfs_kill_inferior, procfs_store_registers)
7795 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7796 as methods of nto_procfs_target.
7797 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7798 (nto_native_ops): Delete.
7799 (procfs_open, procfs_native_open): Delete.
7800 (nto_native_ops): Now an nto_procfs_target_native.
7801 (init_procfs_targets): Adjust to C++ification.
7802 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7803 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7804 Refactor as methods of nto_procfs_target.
7805
7806 * go32-nat.c (go32_nat_target): New class.
7807 (the_go32_nat_target): New.
7808 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7809 (go32_store_registers, go32_xfer_partial, go32_files_info)
7810 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7811 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7812 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7813 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7814 (go32_target): Delete.
7815 (_initialize_go32_nat): Adjust to C++ification.
7816
7817 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7818 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7819 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7820 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7821 gnu_nat_target.
7822 (gnu_target): Delete.
7823 * gnu-nat.h (gnu_target): Delete.
7824 (gnu_nat_target): New class.
7825 * i386-gnu-nat.c (gnu_base_target): New.
7826 (i386_gnu_nat_target): New class.
7827 (the_i386_gnu_nat_target): New.
7828 (_initialize_i386gnu_nat): Adjust to C++ification.
7829
7830 2018-05-02 Pedro Alves <palves@redhat.com>
7831
7832 * bfd-target.c (target_bfd_xclose): Rename to ...
7833 (target_bfd_close): ... this.
7834 (target_bfd_reopen): Adjust.
7835 * target.c (target_close): Remove references to to_xclose.
7836 * target.h (target_ops::to_xclose): Delete.
7837 (target_ops::to_close): Update comments.
7838
7839 2018-05-02 Pedro Alves <palves@redhat.com>
7840
7841 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7842 "linux-nat.h".
7843 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7844 * inf-ptrace.c (inf_ptrace_register_u_offset)
7845 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7846 (inf_ptrace_store_register, inf_ptrace_store_registers)
7847 (inf_ptrace_trad_target): Move to ...
7848 * linux-nat-trad.c: ... this new file.
7849 * linux-nat-trad.h: New file.
7850 * linux-nat.c (linux_target_install_ops): Make extern.
7851 (linux_trad_target): Delete.
7852 * linux-nat.h (linux_trad_target): Delete declaration.
7853 (linux_target_install_ops): Declare.
7854 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7855 "linux-nat.h".
7856
7857 2018-05-02 Pedro Alves <palves@redhat.com>
7858
7859 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7860 procfs_target/add_target here.
7861 * procfs.c (procfs_target): Make static.
7862 (_initialize_procfs): Call add_target here.
7863 * procfs.h (struct target_ops): Remove forward declaration.
7864 (procfs_target): Remove declaration.
7865 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7866
7867 2018-05-02 Pedro Alves <palves@redhat.com>
7868
7869 * procfs.c (procfs_stopped_by_watchpoint)
7870 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7871 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7872 Forward declare.
7873 (procfs_use_watchpoints): Delete, move contents...
7874 (procfs_target): ... here.
7875 * procfs.h (procfs_use_watchpoints): Delete declaration.
7876 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7877 procfs_use_watchpoints.
7878 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7879 procfs_use_watchpoints.
7880
7881 2018-05-02 Tom Tromey <tom@tromey.com>
7882
7883 PR python/20084:
7884 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7885 and var_zuinteger_unlimited.
7886 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7887 and PARAM_ZUINTEGER_UNLIMITED.
7888 (set_parameter_value): Handle var_zuinteger and
7889 var_zuinteger_unlimited.
7890 (add_setshow_generic): Likewise.
7891 (parmpy_init): Likewise.
7892
7893 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7894
7895 PR rust/23124
7896 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7897 pointer is not null before dereferencing it.
7898
7899 2018-04-30 Tom Tromey <tom@tromey.com>
7900
7901 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7902 is_mi_like_p.
7903
7904 2018-04-30 Tom Tromey <tom@tromey.com>
7905
7906 * breakpoint.c (mention): Remove use of is_mi_like_p.
7907 (print_mention_ranged_breakpoint): Likewise.
7908 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7909 of is_mi_like_p.
7910
7911 2018-04-30 Tom Tromey <tom@tromey.com>
7912
7913 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7914
7915 2018-04-30 Tom Tromey <tom@tromey.com>
7916
7917 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7918 (info_spu_event_command): Remove some uses of is_mi_like_p.
7919
7920 2018-04-30 Tom Tromey <tom@tromey.com>
7921
7922 * python/py-framefilter.c (py_print_single_arg)
7923 (enumerate_locals, py_print_args, py_print_frame): Remove some
7924 uses of is_mi_like_p.
7925
7926 2018-04-30 Tom Tromey <tom@tromey.com>
7927
7928 * ui-out.c: Update.
7929 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7930 * ui-out.h (ui_out::is_mi_like_p): Now const.
7931 (ui_out::do_is_mi_like_p): Now const.
7932 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7933
7934 2018-04-30 Tom Tromey <tom@tromey.com>
7935
7936 * varobj.c (varobj_set_visualizer): Use new_reference.
7937 * python/python.c (gdbpy_decode_line): Use new_reference.
7938 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7939 new_reference.
7940
7941 2018-04-30 Tom Tromey <tom@tromey.com>
7942
7943 * varobj.c (install_new_value): Use new_reference.
7944 * value.h (value_incref): Return void. Swap intro comment with
7945 value_decref.
7946 * value.c (set_value_parent): Use new_reference.
7947 (value_incref): Return void. Update intro comment.
7948 (release_value): Use new_reference.
7949 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7950
7951 2018-04-30 Tom Tromey <tom@tromey.com>
7952
7953 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7954 * gdb_bfd.h (new_bfd_ref): Remove.
7955 (gdb_bfd_open): Update comment.
7956 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7957 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7958 (gdb_bfd_fdopenr): Use new_reference.
7959 * exec.c (exec_file_attach): Use new_reference.
7960
7961 2018-04-30 Tom Tromey <tom@tromey.com>
7962
7963 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7964 method.
7965
7966 2018-04-30 Tom Tromey <tom@tromey.com>
7967
7968 * jit.c (jit_read_code_entry): Use type_align.
7969 * i386-tdep.c (i386_gdbarch_init): Don't call
7970 set_gdbarch_long_long_align_bit.
7971 * gdbarch.sh: Remove long_long_align_bit.
7972 * gdbarch.c, gdbarch.h: Rebuild.
7973 * arc-tdep.c (arc_type_align): New function.
7974 (arc_gdbarch_init): Use arc_type_align. Don't call
7975 set_gdbarch_long_long_align_bit.
7976
7977 2018-04-30 Tom Tromey <tom@tromey.com>
7978
7979 * rust-lang.c (rust_type_alignment): Remove.
7980 (rust_composite_type): Use type_align.
7981
7982 2018-04-30 Tom Tromey <tom@tromey.com>
7983
7984 * NEWS: Mention Type.align.
7985 * python/py-type.c (typy_get_alignof): New function.
7986 (type_object_getset): Add "alignof".
7987
7988 2018-04-30 Tom Tromey <tom@tromey.com>
7989
7990 PR exp/17095:
7991 * NEWS: Update.
7992 * std-operator.def (UNOP_ALIGNOF): New operator.
7993 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7994 New.
7995 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7996 * c-lang.c (c_op_print_tab): Add alignof.
7997 * c-exp.y (ALIGNOF): New token.
7998 (exp): Add "ALIGNOF" production.
7999 (ident_tokens): Add _Alignof and alignof.
8000
8001 2018-04-30 Tom Tromey <tom@tromey.com>
8002
8003 * i386-tdep.c (i386_type_align): New function.
8004 (i386_gdbarch_init): Update.
8005 * gdbarch.sh (type_align): New method.
8006 * gdbarch.c, gdbarch.h: Rebuild.
8007 * arch-utils.h (default_type_align): Declare.
8008 * arch-utils.c (default_type_align): New function.
8009 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8010 (struct type) <align_log2>: New field.
8011 <instance_flags>: Now a bitfield.
8012 (TYPE_RAW_ALIGN): New macro.
8013 (type_align, type_raw_align, set_type_align): Declare.
8014 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8015 functions.
8016 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8017 (get_alignment, maybe_set_alignment): New functions.
8018 (read_structure_type, read_enumeration_type, read_array_type)
8019 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8020 (read_subrange_type, read_base_type): Set type alignment.
8021
8022 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8023
8024 * dwarf2read.c (read_index_from_section): Use bool.
8025
8026 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8027
8028 PR gdb/22950
8029 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8030 with #ifdef.
8031
8032 2018-04-29 John Reiser <jreiser@BitWagon.com>
8033
8034 PR build/22873
8035 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8036 last step, and do it atomically.
8037
8038 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8039
8040 * compile/compile-c-types.c (convert_int, convert_float):
8041 Update for C FE v1.
8042
8043 2018-04-27 Tom Tromey <tom@tromey.com>
8044
8045 PR rust/22545:
8046 * rust-lang.c (rust_inclusive_range_type_p): New function.
8047 (rust_range): Handle inclusive ranges.
8048 (rust_compute_range): Likewise.
8049 * rust-exp.y (struct rust_op) <inclusive>: New field.
8050 (DOTDOTEQ): New constant.
8051 (range_expr): Add "..=" productions.
8052 (operator_tokens): Add "..=" token.
8053 (ast_range): Add "inclusive" parameter.
8054 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8055 ranges.
8056 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8057 bounds values.
8058 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8059 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8060 Update comments.
8061 * expprint.c (print_subexp_standard): Handle new bounds values.
8062 (dump_subexp_body_standard): Likewise.
8063
8064 2018-04-27 Tom Tromey <tom@tromey.com>
8065
8066 * configure: Rebuild.
8067 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8068 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8069 "OVERRIDE".
8070 (class symbol_needs_eval_context): Likewise.
8071 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8072 (mock_mapped_index::symbol_name_at): Use "override". Remove
8073 "virtual".
8074 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8075 "override".
8076 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8077 * aarch64-tdep.c (instruction_reader::read): Use "override".
8078 (instruction_reader_test::read): Likewise.
8079 * arm-tdep.c (instruction_reader::read): Use "override".
8080 (instruction_reader_thumb::read): Likewise.
8081
8082 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8083
8084 PR remote/9665
8085 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8086 instead of remote_send.
8087 (remote_send): Remove.
8088
8089 2018-04-26 Pedro Alves <palves@redhat.com>
8090
8091 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8092 find_function_start_sal instead of find_pc_line.
8093
8094 2018-04-26 Pedro Alves <palves@redhat.com>
8095
8096 * breakpoint.c (set_breakpoint_location_function): Handle
8097 mst_data_gnu_ifunc.
8098 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8099 * elfread.c (elf_symtab_read): Give data symbols with
8100 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8101 (elf_rel_plt_read): Update comment.
8102 * linespec.c (convert_linespec_to_sals): Handle
8103 mst_data_gnu_ifunc.
8104 (minsym_found): Handle mst_data_gnu_ifunc.
8105 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8106 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8107 * parse.c (find_minsym_type_and_address): Handle
8108 mst_data_gnu_ifunc.
8109 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8110 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8111 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8112 comment.
8113 <mst_data_gnu_ifunc>: New enumerator.
8114
8115 2018-04-26 Pedro Alves <palves@redhat.com>
8116
8117 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8118 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8119 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8120 Handle it.
8121 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8122 (lookup_minimal_symbol_by_pc): Adjust.
8123 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8124 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8125 * minsyms.h (lookup_msym_prefer): New enum.
8126 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8127 parameter by a lookup_msym_prefer parameter.
8128
8129 2018-04-26 Pedro Alves <palves@redhat.com>
8130
8131 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8132 ends in "@plt" instead of looking at the symbol's section.
8133
8134 2018-04-26 Pedro Alves <palves@redhat.com>
8135
8136 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8137 all references.
8138 (find_pc_partial_function_gnu_ifunc): Rename to ...
8139 (find_pc_partial_function): ... this, and remove references to
8140 'is_gnu_ifunc_p'.
8141 (find_pc_partial_function): Delete old implementation.
8142 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8143
8144 2018-04-26 Pedro Alves <palves@redhat.com>
8145
8146 * linespec.c (struct bound_minimal_symbol_search_key): New.
8147 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8148 skip first line if we found a GNU ifunc minimal symbol by name.
8149 (compare_msymbols): Change parameters to work with a destructured
8150 lhs minsym.
8151 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8152 functions.
8153
8154 2018-04-26 Pedro Alves <palves@redhat.com>
8155
8156 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8157 ifunc targets here. Instead, if we have an ifunc minsym, use its
8158 address/name.
8159 (add_location_to_breakpoint): Store the minsym and the objfile in
8160 the breakpoint location.
8161 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8162 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8163 Record the minsym in the sal.
8164 * symtab.h (symtab_and_line) <msymbol>: New field.
8165
8166 2018-04-26 Pedro Alves <palves@redhat.com>
8167
8168 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8169 unless we actually resolved the ifunc.
8170
8171 2018-04-26 Pedro Alves <palves@redhat.com>
8172
8173 * c-exp.y (variable production): Prefer ifunc minsyms over
8174 regular function symbols.
8175 * symtab.c (find_gnu_ifunc): New function.
8176 * minsyms.h (lookup_msym_prefer): New enum.
8177 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8178 parameter by a lookup_msym_prefer parameter.
8179 * symtab.h (find_gnu_ifunc): New declaration.
8180
8181 2018-04-26 Pedro Alves <palves@redhat.com>
8182
8183 * blockframe.c (find_gnu_ifunc_target_type): New function.
8184 (find_function_type): New.
8185 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8186 return a value with a memory address.
8187 (eval_call): For calls to GNU ifunc functions, try to find the
8188 type of the target function from the type that the resolver
8189 returns.
8190 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8191 symbols.
8192 * infcall.c (find_function_return_type): Delete.
8193 (find_function_addr): Add 'function_type' parameter. For calls to
8194 GNU ifunc functions, try to find the type of the target function
8195 from the type that the resolver returns, and return it via
8196 FUNCTION_TYPE.
8197 (call_function_by_hand_dummy): Adjust to use the function type
8198 returned by find_function_addr.
8199 (find_function_addr): Add 'function_type' parameter and move
8200 description here.
8201 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8202 declarations.
8203
8204 2018-04-26 Pedro Alves <palves@redhat.com>
8205
8206 * c-exp.y (variable production): Skip finding an alias for ifunc
8207 symbols.
8208
8209 2018-04-26 Pedro Alves <palves@redhat.com>
8210
8211 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8212
8213 2018-04-25 Pedro Alves <palves@redhat.com>
8214
8215 * infcmd.c (kill_command): Print the pid as string, not the whole
8216 thread's ptid. Add comment. s/has been killed/killed/ in output
8217 message.
8218 * remote.c (remote_detach_1): Print the pid as string, not the
8219 whole thread's ptid.
8220
8221 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8222 Sergio Durigan Junior <sergiodj@redhat.com>
8223 Pedro Alves <palves@redhat.com>
8224
8225 * infcmd.c (kill_command): Print message when inferior has
8226 been killed.
8227 * inferior.c (print_inferior_events): Remove 'static'. Set as
8228 '1'.
8229 (add_inferior): Improve message printed when
8230 'print_inferior_events' is on.
8231 (exit_inferior): Remove message printed when
8232 'print_inferior_events' is on.
8233 (detach_inferior): Improve message printed when
8234 'print_inferior_events' is on.
8235 (initialize_inferiors): Use 'add_inferior_silent' to set
8236 'current_inferior_'.
8237 * inferior.h (print_inferior_events): Declare here as
8238 'extern'.
8239 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8240 '[Detaching...]' messages when 'print_inferior_events' is on.
8241 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8242 as prefix/suffix for messages. Remove periods. Fix erroneous
8243 'Detaching after fork from child...', replace it by '... from
8244 parent...'.
8245 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8246 prefix/suffix when printing 'Detaching...' messages. Print
8247 them when 'print_inferior_events' is on.
8248 * remote.c (remote_detach_1): Print message when detaching
8249 from inferior and '!is_fork_parent'.
8250
8251 2018-04-24 Tom Tromey <tom@tromey.com>
8252
8253 * cli-out.h: Reindent.
8254
8255 2018-04-24 Tom Tromey <tom@tromey.com>
8256
8257 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8258 (cli_ui_out::do_field_string): Use fputs_filtered.
8259 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8260
8261 2018-04-23 Tom Tromey <tom@tromey.com>
8262
8263 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8264 gdb::unique_xmalloc_ptr.
8265
8266 2018-04-23 Tom Tromey <tom@tromey.com>
8267
8268 * configure: Rebuild.
8269
8270 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8271
8272 PR gdb/23095
8273 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8274 prepare_for_testing. Set normal_bp to r_debug_state if target
8275 is bsd.
8276
8277 2018-04-21 Pedro Alves <palves@redhat.com>
8278 Rajendra SY <rajendra.sy@gmail.com>
8279
8280 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8281 * remote.c (extended_remote_attach): In all-stop mode, mark the
8282 thread as executing.
8283
8284 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8285
8286 * thread.c (thread_apply_all_command): Fix comment.
8287 (thread_command): Fix comment.
8288
8289 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8290
8291 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8292 parameter.
8293 * features/aarch64-core.c (create_feature_aarch64_core):
8294 Regenerate.
8295 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8296 Likewise.
8297 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8298 Likewise.
8299 * features/i386/32bit-avx512.c
8300 (create_feature_i386_32bit_avx512): Likewise.
8301 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8302 Likewise.
8303 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8304 Likewise.
8305 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8306 Likewise.
8307 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8308 Likewise.
8309 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8310 Likewise.
8311 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8312 Likewise.
8313 * features/i386/64bit-avx512.c
8314 (create_feature_i386_64bit_avx512): Likewise.
8315 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8316 Likewise.
8317 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8318 Likewise.
8319 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8320 Likewise.
8321 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8322 Likewise.
8323 * features/i386/64bit-segments.c
8324 (create_feature_i386_64bit_segments): Likewise.
8325 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8326 Likewise.
8327 * features/i386/x32-core.c
8328 (create_feature_i386_x32_core): Likewise.
8329 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8330 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8331 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8332 * target-descriptions.c: In generated code, don't pass xml
8333 filename.
8334
8335 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8336
8337 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8338 (print_xml_feature::visit_post): Likewise.
8339 (print_xml_feature::visit): Likewise.
8340 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8341 (print_xml_feature): Add new class.
8342 * regformats/regdat.sh: Null xmltarget on feature targets.
8343 * target-descriptions.c (struct target_desc): Add xmltarget.
8344 (maintenance_check_tdesc_xml_convert): Add unittest function.
8345 (tdesc_get_features_xml): Add function to get xml.
8346 (maintenance_check_xml_descriptions): Test xml generation.
8347 * xml-tdesc.c (string_read_description_xml): Add function.
8348 * xml-tdesc.h (string_read_description_xml): Add declaration.
8349
8350 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8351
8352 * features/Makefile: Add feature marker to targets with new style
8353 target descriptions.
8354 * regformats/aarch64.dat: Regenerate.
8355 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8356 * regformats/i386/amd64-avx-linux.dat: Likewise.
8357 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8358 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8359 * regformats/i386/amd64-linux.dat: Likewise.
8360 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8361 * regformats/i386/amd64.dat: Likewise.
8362 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8363 * regformats/i386/i386-avx-linux.dat: Likewise.
8364 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8365 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8366 * regformats/i386/i386-linux.dat: Likewise.
8367 * regformats/i386/i386-mmx-linux.dat: Likewise.
8368 * regformats/i386/i386-mpx-linux.dat: Likewise.
8369 * regformats/i386/i386.dat: Likewise.
8370 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8371 * regformats/i386/x32-avx-linux.dat: Likewise.
8372 * regformats/i386/x32-linux.dat: Likewise.
8373 * regformats/tic6x-c62x-linux.dat: Likewise.
8374 * regformats/tic6x-c64x-linux.dat: Likewise.
8375 * regformats/tic6x-c64xp-linux.dat: Likewise.
8376 * regformats/regdat.sh: Parse feature marker.
8377
8378 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8379
8380 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8381 (tdesc_osabi_name): Likewise.
8382 * target-descriptions.c (tdesc_architecture_name): Add new
8383 function.
8384 (tdesc_osabi_name): Likewise.
8385
8386 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8387
8388 * common/tdesc.c (tdesc_predefined_type): Move to here.
8389 (tdesc_named_type): Likewise.
8390 (tdesc_create_vector): Likewise.
8391 (tdesc_create_struct): Likewise.
8392 (tdesc_set_struct_size): Likewise.
8393 (tdesc_create_union): Likewise.
8394 (tdesc_create_flags): Likewise.
8395 (tdesc_create_enum): Likewise.
8396 (tdesc_add_field): Likewise.
8397 (tdesc_add_typed_bitfield): Likewise.
8398 (tdesc_add_bitfield): Likewise.
8399 (tdesc_add_flag): Likewise.
8400 (tdesc_add_enum_value): Likewise.
8401 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8402 (struct tdesc_type_vector): Likewise.
8403 (struct tdesc_type_field): Likewise.
8404 (struct tdesc_type_with_fields): Likewise.
8405 (tdesc_create_enum): Add declaration.
8406 (tdesc_add_typed_bitfield): Likewise.
8407 (tdesc_add_enum_value): Likewise.
8408 * target-descriptions.c (tdesc_type_field): Move from here.
8409 (tdesc_type_builtin): Likewise.
8410 (tdesc_type_vector): Likewise.
8411 (tdesc_type_with_fields): Likewise.
8412 (tdesc_predefined_types): Likewise.
8413 (tdesc_named_type): Likewise.
8414 (tdesc_create_vector): Likewise.
8415 (tdesc_create_struct): Likewise.
8416 (tdesc_set_struct_size): Likewise.
8417 (tdesc_create_union): Likewise.
8418 (tdesc_create_flags): Likewise.
8419 (tdesc_create_enum): Likewise.
8420 (tdesc_add_field): Likewise.
8421 (tdesc_add_typed_bitfield): Likewise.
8422 (tdesc_add_bitfield): Likewise.
8423 (tdesc_add_flag): Likewise.
8424 (tdesc_add_enum_value): Likewise.
8425 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8426 (tdesc_add_typed_bitfield): Likewise.
8427 (tdesc_add_enum_value): Likewise.
8428
8429 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8430
8431 * common/tdesc.c (tdesc_feature::accept): Move to here.
8432 (tdesc_feature::operator==): Likewise.
8433 (tdesc_create_reg): Likewise.
8434 * common/tdesc.h (tdesc_type_kind): Likewise.
8435 (struct tdesc_type): Likewise.
8436 (struct tdesc_feature): Likewise.
8437 * regformats/regdat.sh: Create a feature.
8438 * target-descriptions.c (tdesc_type_kind): Move from here.
8439 (tdesc_type): Likewise.
8440 (tdesc_type_up): Likewise.
8441 (tdesc_feature): Likewise.
8442 (tdesc_create_reg): Likewise.
8443
8444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8445
8446 * Makefile.in: Add arch/tdesc.c
8447 * common/tdesc.c: New file.
8448 * common/tdesc.h (tdesc_element_visitor): Move to here.
8449 (tdesc_element): Likewise.
8450 (tdesc_reg): Likewise.
8451 (tdesc_reg_up): Likewise.
8452 * regformats/regdef.h (reg): Add offset to constructors.
8453 * target-descriptions.c (tdesc_element_visitor): Move from here.
8454 (tdesc_element): Likewise.
8455 (tdesc_reg): Likewise.
8456 (tdesc_reg_up): Likewise.
8457
8458 2018-04-17 Tom Tromey <tom@tromey.com>
8459
8460 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8461 discriminant field.
8462
8463 2018-04-17 Tom Tromey <tom@tromey.com>
8464
8465 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8466
8467 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8468
8469 * symtab.c (print_symbol_info): Skip printing filename and line
8470 number when `last' is NULL.
8471 (symtab_symbol_info): Use empty string instead of NULL for first
8472 invocation of print_symbol_info.
8473 (rbreak_command): Pass NULL to `last' parameter of
8474 print_symbol_info.
8475
8476 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8477
8478 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8479 instead of nullptr.
8480
8481 2018-04-16 Pedro Alves <palves@redhat.com>
8482
8483 * MAINTAINERS (sh): Remove.
8484 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8485 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8486 (ALLDEPFILES): Remove sh64-tdep.c.
8487 * NEWS: Mentions that support for SH-5/SH64 is removed.
8488 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8489 (sh*-*-openbsd*): Ditto.
8490 (sh64-*-elf*): Remove.
8491 (sh*): Remove.
8492 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8493 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8494 * sh-tdep.c: No longer include "sh64-tdep.h".
8495 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8496 * sh64-tdep.c, sh64-tdep.h: Remove files.
8497
8498 2018-04-16 Pedro Alves <palves@redhat.com>
8499
8500 * MAINTAINERS: Remove m88k.
8501 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8502 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8503 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8504 * NEWS: Mention that support for m88k was removed.
8505 * configure.host (m88*-*-*): Remove support.
8506 * configure.nat (m88k-*-*): Remove support.
8507 * configure.tgt (m88*-*-openbsd*): Remove.
8508 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8509
8510 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8511
8512 * configure.tgt (x86_tobjs): New variable.
8513 (amd64_tobjs, i386_tobjs): Use it.
8514
8515 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8516
8517 * symtab.c (print_symbol_info): Precede the symbol definition by
8518 the line number when available.
8519 * NEWS: Advertise this enhancement.
8520
8521 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8522
8523 * NEWS (New options): announce set/show record btrace cpu.
8524 * btrace.c: Include record-btrace.h.
8525 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8526 the vendor is unknown.
8527 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8528 Maybe overwrite the btrace configuration's cpu.
8529 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8530 (btrace_fetch): Add cpu parameter. Update callers.
8531 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8532 Maybe overwrite the btrace configuration's cpu. Skip enabling
8533 errata workarounds if the vendor is unknown.
8534 * python/py-record-btrace.c: Include record-btrace.h.
8535 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8536 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8537 * record-btrace.c (record_btrace_cpu_state_kind): New.
8538 (record_btrace_cpu): New.
8539 (set_record_btrace_cpu_cmdlist): New.
8540 (record_btrace_get_cpu): New.
8541 (require_btrace_thread, record_btrace_info)
8542 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8543 (cmd_set_record_btrace_cpu_none): New.
8544 (cmd_set_record_btrace_cpu_auto): New.
8545 (cmd_set_record_btrace_cpu): New.
8546 (cmd_show_record_btrace_cpu): New.
8547 (_initialize_record_btrace): Initialize set/show record btrace cpu
8548 commands.
8549 * record-btrace.h (record_btrace_get_cpu): New.
8550
8551 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8552
8553 * record.c (set_record_command): Fix typo in message.
8554
8555 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8556
8557 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8558
8559 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8560
8561 * infrun.c (process_event_stop_test): Call
8562 gdbarch_in_indirect_branch_thunk.
8563 * gdbarch.sh (in_indirect_branch_thunk): New.
8564 * gdbarch.c: Regenerated.
8565 * gdbarch.h: Regenerated.
8566 * x86-tdep.h: New.
8567 * x86-tdep.c: New.
8568 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8569 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8570 (ALLDEPFILES): Add x86-tdep.c.
8571 * arch-utils.h (default_in_indirect_branch_thunk): New.
8572 * arch-utils.c (default_in_indirect_branch_thunk): New.
8573 * i386-tdep: Include x86-tdep.h.
8574 (i386_in_indirect_branch_thunk): New.
8575 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8576 function.
8577 * amd64-tdep: Include x86-tdep.h.
8578 (amd64_in_indirect_branch_thunk): New.
8579 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8580
8581 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8582
8583 PR gdb/23053
8584 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8585 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8586 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8587 regression.
8588
8589 2018-04-12 Tom Tromey <tom@tromey.com>
8590
8591 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8592 (rust_evaluate_subexp): Likewise.
8593
8594 2018-04-12 Pedro Alves <palves@redhat.com>
8595
8596 * procfs.c (procfs_detach): Make forward declaration's prototype
8597 match definition's protototype.
8598 (proc_get_LDT_entry): Remove stale do_cleanups call.
8599
8600 2018-04-12 Pedro Alves <palves@redhat.com>
8601
8602 * target.h (target_ops::to_has_exited): Delete.
8603 (target_has_exited): Delete.
8604 * target-delegates.c: Regenerate.
8605
8606 2018-04-11 Pedro Alves <palves@redhat.com>
8607
8608 * target.c (fileio_fh_t::t): Add comment.
8609 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8610 (target_fileio_close): Handle a NULL target.
8611 (invalidate_fileio_fh): New.
8612 (target_close): Call it.
8613 * remote.c (remote_hostio_send_command): No longer check whether
8614 remote_desc is open.
8615
8616 2018-04-11 Pedro Alves <palves@redhat.com>
8617
8618 * target.c (fileio_fh_t): Make it a named struct instead of a
8619 typedef.
8620 (fileio_fh_t::is_closed): New method.
8621 (DEF_VEC_O (fileio_fh_t)): Remove.
8622 (fileio_fhandles): Now a std::vector.
8623 (is_closed_fileio_fh): Delete.
8624 (acquire_fileio_fd): Adjust. Rename parameters.
8625 (release_fileio_fd): Adjust.
8626 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8627 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8628 (target_fileio_close): Adjust.
8629
8630 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8631
8632 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8633 index.
8634
8635 2018-04-10 Pedro Alves <palves@redhat.com>
8636
8637 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8638 (scoped_finish_thread_state): New class.
8639 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8640 cleanup.
8641 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8642 (fetch_inferior_event, normal_stop): Likewise.
8643 * thread.c (finish_thread_state_cleanup): Delete.
8644
8645 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8646 Pedro Alves <palves@redhat.com>
8647
8648 * value.c: Include "selftest.h" and "common/array-view.h".
8649 (struct range) <operator ==>: New.
8650 (test_ranges_contain): New.
8651 (check_ranges_vector): New.
8652 (test_insert_into_bit_range_vector): New.
8653 (_initialize_values): Register selftests.
8654 * common/array-view.h (operator==, operator!=): New.
8655
8656 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8657
8658 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8659 an iterator.
8660 * inline-frame.c: Include <algorithm>.
8661 (struct inline_state): Add constructor.
8662 (inline_state_s): Remove.
8663 (DEF_VEC_O(inline_state_s)): Remove.
8664 (inline_states): Change type to std::vector.
8665 (find_inline_frame_state): Adjust to std::vector.
8666 (allocate_inline_frame_state): Remove.
8667 (clear_inline_frame_state): Adjust to std::vector.
8668 (skip_inline_frames): Adjust to std::vector.
8669
8670 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8671
8672 * tracepoint.h (struct trace_state_variable): Add constructor.
8673 <name>: Change type to std::string.
8674 * tracepoint.c (tsv_s): Remove.
8675 (DEF_VEC_O(tsv_s)): Remove.
8676 (tvariables): Change to std::vector.
8677 (create_trace_state_variable): Adjust to std::vector.
8678 (find_trace_state_variable): Likewise.
8679 (find_trace_state_variable_by_number): Likewise.
8680 (delete_trace_state_variable): Likewise.
8681 (trace_variable_command): Adjust to std::string.
8682 (delete_trace_variable_command): Likewise.
8683 (tvariables_info_1): Adjust to std::vector.
8684 (save_trace_state_variables): Likewise.
8685 (start_tracing): Likewise.
8686 (merge_uploaded_trace_state_variables): Adjust to std::vector
8687 and std::string.
8688 * target.h (struct target_ops)
8689 <to_download_trace_state_variable>: Pass reference to
8690 trace_state_variable.
8691 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8692 * target-delegates.c: Re-generate.
8693 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8694 (mi_tsv_deleted): Likewise.
8695 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8696 * remote.c (remote_download_trace_state_variable): Change
8697 pointer to reference and adjust.
8698 * make-target-delegates (parse_argtypes): Handle references.
8699 (write_function_header): Likewise.
8700 (munge_type): Likewise.
8701
8702 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8703
8704 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8705 string_view-selftests.c.
8706 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8707 testsuite.
8708 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8709 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8710 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8711 * unittests/basic_string_view/element_access/char/1.cc:
8712 Likewise.
8713 * unittests/basic_string_view/element_access/char/empty.cc:
8714 Likewise.
8715 * unittests/basic_string_view/element_access/char/front_back.cc:
8716 Likewise.
8717 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8718 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8719 Likewise.
8720 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8721 Likewise.
8722 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8723 Likewise.
8724 * unittests/basic_string_view/operations/compare/char/1.cc:
8725 Likewise.
8726 * unittests/basic_string_view/operations/compare/char/13650.cc:
8727 Likewise.
8728 * unittests/basic_string_view/operations/copy/char/1.cc:
8729 Likewise.
8730 * unittests/basic_string_view/operations/data/char/1.cc:
8731 Likewise.
8732 * unittests/basic_string_view/operations/find/char/1.cc:
8733 Likewise.
8734 * unittests/basic_string_view/operations/find/char/2.cc:
8735 Likewise.
8736 * unittests/basic_string_view/operations/find/char/3.cc:
8737 Likewise.
8738 * unittests/basic_string_view/operations/find/char/4.cc:
8739 Likewise.
8740 * unittests/basic_string_view/operations/rfind/char/1.cc:
8741 Likewise.
8742 * unittests/basic_string_view/operations/rfind/char/2.cc:
8743 Likewise.
8744 * unittests/basic_string_view/operations/rfind/char/3.cc:
8745 Likewise.
8746 * unittests/basic_string_view/operations/substr/char/1.cc:
8747 Likewise.
8748 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8749 * unittests/string_view-selftests.c: New file.
8750
8751 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8752
8753 * unittests/basic_string_view/capacity/1.cc: New file.
8754 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8755 * unittests/basic_string_view/cons/char/1.cc: New file.
8756 * unittests/basic_string_view/cons/char/2.cc: New file.
8757 * unittests/basic_string_view/cons/char/3.cc: New file.
8758 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8759 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8760 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8761 * unittests/basic_string_view/element_access/char/1.cc: New file.
8762 * unittests/basic_string_view/element_access/char/2.cc: New file.
8763 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8764 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8765 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8766 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8767 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8768 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8769 * unittests/basic_string_view/include.cc: New file.
8770 * unittests/basic_string_view/inserters/char/1.cc: New file.
8771 * unittests/basic_string_view/inserters/char/2.cc: New file.
8772 * unittests/basic_string_view/inserters/char/3.cc: New file.
8773 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8774 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8775 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8776 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8777 * unittests/basic_string_view/literals/types.cc: New file.
8778 * unittests/basic_string_view/literals/values.cc: New file.
8779 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8780 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8781 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8782 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8783 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8784 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8785 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8786 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8787 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8788 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8789 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8790 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8791 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8792 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8793 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8794 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8795 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8796 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8797 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8798 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8799 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8800 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8801 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8802 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8803 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8804 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8805 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8806 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8807 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8808 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8809 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8810 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8811 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8812 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8813 * unittests/basic_string_view/operators/char/2.cc: New file.
8814 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8815 * unittests/basic_string_view/range_access/char/1.cc: New file.
8816 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8817 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8818 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8819 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8820 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8821 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8822 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8823 * unittests/basic_string_view/typedefs.cc: New file.
8824 * unittests/basic_string_view/types/1.cc: New file.
8825
8826 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8827
8828 * common/gdb_string_view.h: Remove libstdc++ implementation
8829 details, adjust to gdb reality.
8830 * common/gdb_string_view.tcc: Likewise.
8831 * cli/cli-script.c (struct string_view): Remove.
8832 (user_args) <m_args>: Change element type to gdb::string_view.
8833 (user_args::insert_args): Adjust.
8834
8835 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8836
8837 * common/gdb_string_view.h: New file.
8838 * common/gdb_string_view.tcc: New file.
8839
8840 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8841
8842 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8843 * configure: Re-generate.
8844
8845 2018-04-09 Pedro Alves <palves@redhat.com>
8846
8847 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8848 (set_target_gdbarch): Call
8849 gdb::observers::architecture_changed.notify instead of
8850 observer_notify_architecture_changed.
8851
8852 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8853
8854 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8855 (do_restore_current_traceframe_cleanup): Remove.
8856 (restore_current_traceframe_cleanup_dtor): Remove.
8857 (make_cleanup_restore_current_traceframe): Remove.
8858 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8859 New.
8860 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8861 * infrun.c (fetch_inferior_event): Use
8862 scoped_restore_current_traceframe.
8863
8864 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8865
8866 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8867 Remove.
8868 <n_allocated_type_units>: Remove.
8869 <all_type_units>: Change to std::vector.
8870 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8871 to std::vector change.
8872 (dwarf2_per_objfile::get_cutu): Likewise.
8873 (dwarf2_per_objfile::get_tu): Likewise.
8874 (create_signatured_type_table_from_index): Likewise.
8875 (create_signatured_type_table_from_debug_names): Likewise.
8876 (dw2_symtab_iter_next): Likewise.
8877 (dw2_print_stats): Likewise.
8878 (dw2_expand_all_symtabs): Likewise.
8879 (dw2_expand_marked_cus): Likewise.
8880 (dw2_debug_names_iterator::next): Likewise.
8881 (dwarf2_initialize_objfile): Likewise.
8882 (add_signatured_type_cu_to_table): Likewise.
8883 (create_all_type_units): Likewise.
8884 (add_type_unit): Likewise.
8885 (struct tu_abbrev_offset): Add constructor.
8886 (build_type_psymtabs_1): Adjust to std::vector change.
8887 (print_tu_stats): Likewise.
8888 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8889 (write_debug_names): Likewise.
8890
8891 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8892
8893 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8894 Make an std::vector.
8895 <n_comp_units>: Remove.
8896 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8897 to std::vector change.
8898 (dwarf2_per_objfile::get_cutu): Likewise.
8899 (dwarf2_per_objfile::get_cu): Likewise.
8900 (create_cus_from_index): Likewise.
8901 (create_addrmap_from_index): Likewise.
8902 (create_addrmap_from_aranges): Likewise.
8903 (dwarf2_read_index): Likewise.
8904 (dw2_find_last_source_symtab): Likewise.
8905 (dw2_map_symtabs_matching_filename): Likewise.
8906 (dw2_symtab_iter_next): Likewise.
8907 (dw2_print_stats): Likewise.
8908 (dw2_expand_all_symtabs): Likewise.
8909 (dw2_expand_symtabs_with_fullname): Likewise.
8910 (dw2_expand_marked_cus): Likewise.
8911 (dw2_map_symbol_filenames): Likewise.
8912 (create_cus_from_debug_names): Likewise.
8913 (dwarf2_read_debug_names): Likewise.
8914 (dw2_debug_names_iterator::next): Likewise.
8915 (dwarf2_initialize_objfile): Likewise.
8916 (set_partial_user): Likewise.
8917 (dwarf2_build_psymtabs_hard): Likewise.
8918 (read_comp_units_from_section): Remove arguments, adjust to
8919 std::vector change.
8920 (create_all_comp_units): Adjust to std::vector and
8921 read_comp_units_from_section changes.
8922 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8923 change.
8924 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8925 (psyms_seen_size): Likewise.
8926 (write_gdbindex): Likewise.
8927 (write_debug_names): Likewise.
8928
8929 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8930
8931 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8932 with dwarf2_per_objfile.
8933 (create_cus_from_index): Likewise.
8934 (create_signatured_type_table_from_index): Likewise.
8935 (dwarf2_read_index): Likewise.
8936 (dwarf2_initialize_objfile): Likewise.
8937 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8938 per_cu rather than get_dwarf2_per_objfile.
8939
8940 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8941
8942 * dwarf2read.h (struct signatured_type): Forward declare.
8943 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8944 New methods.
8945 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8946 (dw2_get_cutu): ...this.
8947 (dwarf2_per_objfile::get_cu): Rename from...
8948 (dw2_get_cu): ...this.
8949 (dwarf2_per_objfile::get_tu): New.
8950 (create_addrmap_from_index): Adjust.
8951 (create_addrmap_from_aranges): Adjust.
8952 (dw2_find_last_source_symtab): Adjust.
8953 (dw2_map_symtabs_matching_filename): Adjust.
8954 (dw2_symtab_iter_next): Adjust.
8955 (dw2_print_stats): Adjust.
8956 (dw2_expand_all_symtabs): Adjust.
8957 (dw2_expand_symtabs_with_fullname): Adjust.
8958 (dw2_expand_marked_cus): Adjust.
8959 (dw_expand_symtabs_matching_file_matcher): Adjust.
8960 (dw2_map_symbol_filenames): Adjust.
8961 (dw2_debug_names_iterator::next): Adjust.
8962 (dwarf2_initialize_objfile): Adjust.
8963 (set_partial_user): Adjust.
8964 (dwarf2_build_psymtabs_hard): Adjust.
8965
8966 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8967
8968 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8969 Remove unused variables.
8970 (dw2_map_symtabs_matching_filename): Likewise.
8971 (dwarf2_record_block_ranges): Likewise.
8972 (dwarf2_read_addr_index): Likewise.
8973 (follow_die_offset): Likewise.
8974
8975 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8976
8977 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8978 to symbol_file_add_main.
8979
8980 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8981
8982 PR mi/22299
8983 * mi/mi-console.c (do_fputc_async_safe): New.
8984 (mi_console_file::write_async_safe): New.
8985 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8986 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8987 New.
8988 * ui-file.c (ui_file::putstrn): Adjust call to
8989 fputstrn_unfiltered.
8990 * utils.c (printchar): Replace do_fputs and do_fprintf
8991 parameters by do_fputc.
8992 (fputstr_filtered): Adjust call to printchar.
8993 (fputstr_unfiltered): Likewise.
8994 (fputstrn_filtered): Likewise.
8995 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8996 printchar.
8997 * utils.h (do_fputc_ftype): New typedef.
8998 (fputstrn_unfiltered): Add do_fputc parameter.
8999
9000 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9001
9002 * regformats/i386/i386-avx.dat: Remove.
9003
9004 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9005
9006 PR gdb/22979
9007 * amd64-tdep.c (amd64_none_init_abi): New function.
9008 (amd64_x32_none_init_abi): New function.
9009 (_initialize_amd64_tdep): Register handlers for x86-64 and
9010 x64_32 with GDB_OSABI_NONE.
9011 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9012 GDB_OSABI_NONE osabi.
9013
9014 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9015
9016 PR gdb/22980
9017 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9018 GDB_OSABI_NONE.
9019 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9020 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9021
9022 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9023
9024 * common/byte-vector.h (char_vector): New type.
9025 * target.h (target_read_alloc): Return
9026 gdb::optional<byte_vector>.
9027 (target_read_stralloc): Return gdb::optional<char_vector>.
9028 (target_get_osdata): Return gdb::optional<char_vector>.
9029 * target.c (target_read_alloc_1): Templatize. Replacement
9030 manual memory management with vector.
9031 (target_read_alloc): Change return type, adjust.
9032 (target_read_stralloc): Change return type, adjust.
9033 (target_get_osdata): Change return type, adjust.
9034 * auxv.c (struct auxv_info) <length>: Remove.
9035 <data>: Change type to gdb::optional<byte_vector>.
9036 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9037 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9038 (target_auxv_search): Adjust.
9039 (fprint_target_auxv): Adjust.
9040 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9041 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9042 (linux_make_corefile_notes): Adjust.
9043 * osdata.c (get_osdata): Adjust.
9044 * remote.c (remote_get_threads_with_qxfer): Adjust.
9045 (remote_memory_map): Adjust.
9046 (remote_traceframe_info): Adjust.
9047 (btrace_read_config): Adjust.
9048 (remote_read_btrace): Adjust.
9049 (remote_pid_to_exec_file): Adjust.
9050 * solib-aix.c (solib_aix_get_library_list): Adjust.
9051 * solib-dsbt.c (decode_loadmap): Don't free buf.
9052 (dsbt_get_initial_loadmaps): Adjust.
9053 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9054 * solib-target.c (solib_target_current_sos): Adjust.
9055 * tracepoint.c (sdata_make_value): Adjust.
9056 * xml-support.c (xinclude_start_include): Adjust.
9057 (xml_fetch_content_from_file): Adjust.
9058 * xml-support.h (xml_fetch_another): Change return type.
9059 (xml_fetch_content_from_file): Change return type.
9060 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9061 * xml-tdesc.c (file_read_description_xml): Adjust.
9062 (fetch_available_features_from_target): Change return type.
9063 (target_fetch_description_xml): Adjust.
9064 (target_read_description_xml): Adjust.
9065
9066 2018-04-06 Tom Tromey <tom@tromey.com>
9067
9068 * value.c (~value): Update.
9069 (struct value) <contents>: Now unique_xmalloc_ptr.
9070 (value_contents_bits_eq, allocate_value_contents)
9071 (value_contents_raw, value_contents_all_raw)
9072 (value_contents_for_printing, value_contents_for_printing_const)
9073 (set_value_enclosing_type): Update.
9074
9075 2018-04-06 Tom Tromey <tom@tromey.com>
9076
9077 * value.c (range_s): Remove typedef, VEC.
9078 (struct range): Add operator<.
9079 (range_lessthan): Remove.
9080 (ranges_contain): Change type.
9081 (~value): Update.
9082 (struct value) <unavailable, optimized_out>: Now std::vector.
9083 (value_entirely_available)
9084 (value_entirely_covered_by_range_vector)
9085 (value_entirely_unavailable, value_entirely_optimized_out):
9086 Update.
9087 (insert_into_bit_range_vector): Change argument type.
9088 (find_first_range_overlap): Likewise.
9089 (struct ranges_and_idx, value_contents_bits_eq)
9090 (require_not_optimized_out, require_available): Update.
9091 (ranges_copy_adjusted): Change argument types.
9092 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9093
9094 2018-04-06 Tom Tromey <tom@tromey.com>
9095
9096 * value.c (~value): Update.
9097 (struct value) <parent>: Now a value_ref_ptr.
9098 (value_parent, set_value_parent, value_address, value_copy):
9099 Update.
9100
9101 2018-04-06 Tom Tromey <tom@tromey.com>
9102
9103 * value.c (struct value): Add constructor, destructor, and member
9104 initializers.
9105 (allocate_value_lazy, value_decref): Update.
9106
9107 2018-04-06 Tom Tromey <tom@tromey.com>
9108
9109 * value.c (struct value) <released, next>: Remove.
9110 (all_values): Now a std::vector.
9111 (allocate_value_lazy): Update.
9112 (value_next): Remove.
9113 (value_mark, value_free_to_mark, release_value)
9114 (value_release_to_mark): Update.
9115
9116 2018-04-06 Tom Tromey <tom@tromey.com>
9117
9118 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9119 (free_value_chain): Remove.
9120 * value.c (free_value_chain): Remove.
9121 (value_release_to_mark): Return a std::vector.
9122 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9123 std::vector.
9124 (check_condition): Update.
9125 * eval.c (fetch_subexp_value): Change "val_chain" to a
9126 std::vector.
9127 * breakpoint.c (update_watchpoint): Update.
9128 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9129
9130 2018-04-06 Tom Tromey <tom@tromey.com>
9131
9132 * value.h (free_all_values): Remove.
9133 * value.c (free_all_values): Remove.
9134
9135 2018-04-06 Tom Tromey <tom@tromey.com>
9136
9137 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9138 (value_history_chain, value_history_count): Remove.
9139 (value_history): New global.
9140 (record_latest_value, access_value_history, show_values)
9141 (preserve_values): Update.
9142
9143 2018-04-06 Tom Tromey <tom@tromey.com>
9144
9145 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9146 * varobj.c (varobj_set_display_format, varobj_set_value)
9147 (install_default_visualizer, construct_visualizer)
9148 (install_new_value, ~varobj, varobj_get_value_type)
9149 (my_value_of_variable, varobj_editable_p): Update.
9150 * c-varobj.c (c_describe_child, c_value_of_variable)
9151 (cplus_number_of_children, cplus_describe_child): Update.
9152 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9153 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9154 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9155
9156 2018-04-06 Tom Tromey <tom@tromey.com>
9157
9158 * printcmd.c (last_examine_address): Change type to
9159 value_ref_ptr.
9160 (do_examine, x_command): Update.
9161
9162 2018-04-06 Tom Tromey <tom@tromey.com>
9163
9164 * value.c (release_value): Update.
9165 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9166 (struct bpstats) <val>: Now a value_ref_ptr.
9167 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9168 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9169 (~watchpoint, print_it_watchpoint, watch_command_1)
9170 (invalidate_bp_value_on_memory_change): Update.
9171
9172 2018-04-06 Tom Tromey <tom@tromey.com>
9173
9174 * varobj.c (varobj_clear_saved_item)
9175 (update_dynamic_varobj_children, install_new_value, ~varobj):
9176 Update.
9177 * value.h (value_incref): Move declaration earlier.
9178 (value_decref): Rename from value_free.
9179 (struct value_ref_policy): New.
9180 (value_ref_ptr): New typedef.
9181 (struct value_deleter): Remove.
9182 (gdb_value_up): Remove typedef.
9183 (release_value): Change return type.
9184 (release_value_or_incref): Remove.
9185 * value.c (set_value_parent): Update.
9186 (value_incref): Change return type.
9187 (value_decref): Rename from value_free.
9188 (value_free_to_mark, free_all_values, free_value_chain): Update.
9189 (release_value): Return value_ref_ptr.
9190 (release_value_or_incref): Remove.
9191 (record_latest_value, set_internalvar, clear_internalvar):
9192 Update.
9193 * stack.c (info_frame_command): Don't call value_free.
9194 * python/py-value.c (valpy_dealloc, valpy_new)
9195 (value_to_value_object): Update.
9196 * printcmd.c (do_examine): Update.
9197 * opencl-lang.c (lval_func_free_closure): Update.
9198 * mi/mi-main.c (register_changed_p): Don't call value_free.
9199 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9200 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9201 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9202 value_free.
9203 * guile/scm-value.c (vlscm_free_value_smob)
9204 (vlscm_scm_from_value): Update.
9205 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9206 (frame_unwind_register_unsigned, get_frame_register_bytes)
9207 (put_frame_register_bytes): Don't call value_free.
9208 * findvar.c (address_from_register): Don't call value_free.
9209 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9210 * dwarf2loc.c (entry_data_value_free_closure)
9211 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9212 (dwarf2_evaluate_loc_desc_full): Update.
9213 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9214 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9215 (~watchpoint, watch_command_1)
9216 (invalidate_bp_value_on_memory_change): Update.
9217 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9218
9219 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9220
9221 PR gdb/23022
9222 * warning.m4: Add -Wno-error=deprecated-register.
9223 * configure: Re-generate.
9224
9225 2018-04-05 Tom Tromey <tom@tromey.com>
9226
9227 * linespec.h: Remove include of "vec.h".
9228
9229 2018-04-05 Tom Tromey <tom@tromey.com>
9230
9231 * linespec.c (typep): Remove typedef.
9232 (find_methods, find_superclass_methods): Take a std::vector.
9233 (find_method): Use std::vector.
9234
9235 2018-04-05 Tom Tromey <tom@tromey.com>
9236
9237 * utils.c (compare_strings): Remove.
9238 * utils.h (compare_strings): Remove.
9239 * objc-lang.h (find_imps): Update.
9240 * objc-lang.c (find_methods): Take a std::vector.
9241 (uniquify_strings, find_imps): Likewise.
9242 * linespec.c (find_methods): Take a std::vector.
9243 (decode_objc): Use std::vector.
9244 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9245 a std::vector.
9246 (find_method, find_function_symbols): Use std::vector.
9247
9248 2018-04-05 Tom Tromey <tom@tromey.com>
9249
9250 * completer.c (completion_tracker::completion_tracker): Remove
9251 cast.
9252 (completion_tracker::discard_completions): Likewise.
9253 * breakpoint.c (ambiguous_names_p): Remove cast.
9254 * ada-lang.c (_initialize_ada_language): Remove cast.
9255 * utils.h (streq): Update.
9256 (streq_hash): Add new declaration.
9257 * utils.c (streq): Return bool.
9258 (streq_hash): New function.
9259
9260 2018-04-05 Tom Tromey <tom@tromey.com>
9261
9262 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9263 Remove a string copy.
9264
9265 2018-04-05 Tom Tromey <tom@tromey.com>
9266
9267 * linespec.c (filter_results): Use std::vector.
9268 (decode_line_2, decode_line_full): Update.
9269
9270 2018-04-05 Tom Tromey <tom@tromey.com>
9271
9272 * linespec.c (canonical_to_fullform): Return std::string.
9273 (filter_results): Update.
9274 (struct decode_line_2_item): Add constructor.
9275 <fullform, displayform>: Now std::string.
9276 (decode_line_2_compare_items): Now a std::sort comparator.
9277 (decode_line_2): Update.
9278
9279 2018-04-05 Tom Tromey <tom@tromey.com>
9280
9281 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9282 (unexpected_linespec_error): Update.
9283 (linespec_parse_basic, parse_linespec): Update.
9284
9285 2018-04-05 Tom Tromey <tom@tromey.com>
9286
9287 * linespec.c (linespec_parse_basic): Reindent.
9288
9289 2018-04-05 Tom Tromey <tom@tromey.com>
9290
9291 * minsyms.h (iterate_over_minimal_symbols): Update.
9292 * minsyms.c (iterate_over_minimal_symbols): Take a
9293 gdb::function_view.
9294 * linespec.c (struct collect_minsyms): Remove.
9295 (compare_msyms): Now a std::sort comparator.
9296 (add_minsym): Add parameters.
9297 (search_minsyms_for_name): Update. Use std::vector.
9298
9299 2018-04-03 Tom Tromey <tom@tromey.com>
9300
9301 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9302 gdb::byte_vector.
9303
9304 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9305
9306 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9307
9308 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9309
9310 PR gdb/16959
9311 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9312 printing static type.
9313
9314 2018-04-01 Tom Tromey <tom@tromey.com>
9315
9316 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9317 (rs6000_xfer_shared_libraries): Update.
9318
9319 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9320
9321 * common/gdb_vecs.h (char_ptr): Remove.
9322 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9323
9324 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9325
9326 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9327 with std::vector.
9328 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9329
9330 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9331
9332 * tracepoint.h (struct uploaded_tp): Initialize fields.
9333 <actions, step_actions, cmd_strings>: Change type to
9334 std::vector<char *>.
9335 * tracepoint.c (get_uploaded_tp): Allocate with new.
9336 (free_uploaded_tps): Free with delete.
9337 (parse_tracepoint_definition): Adjust to std::vector change.
9338 * breakpoint.c (read_uploaded_action): Likewise.
9339 (create_tracepoint_from_upload): Likewise.
9340 * ctf.c (ctf_write_uploaded_tp): Likewise.
9341 (SET_ARRAY_FIELD): Likewise.
9342 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9343
9344 2018-03-30 Tom Tromey <tom@tromey.com>
9345
9346 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9347 std::unique_ptr.
9348 (svr4_keep_data_in_core): Update.
9349 (svr4_read_so_list): Update.
9350
9351 2018-03-30 Tom Tromey <tom@tromey.com>
9352
9353 * windows-nat.c (handle_output_debug_string, handle_exception):
9354 Update.
9355 * target.h (target_read_string): Update.
9356 * target.c (target_read_string): Change "string" to
9357 unique_xmalloc_ptr.
9358 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9359 Update.
9360 * solib-frv.c (frv_current_sos): Update.
9361 * solib-dsbt.c (dsbt_current_sos): Update.
9362 * solib-darwin.c (darwin_current_sos): Update.
9363 * linux-thread-db.c (inferior_has_bug): Update.
9364 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9365 Update. Remove alloca.
9366 * ada-lang.c (ada_main_name): Update.
9367
9368 2018-03-30 Tom Tromey <tom@tromey.com>
9369
9370 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9371 (struct dwo_file_deleter): New.
9372 (dwo_file_up): New typedef.
9373 (open_and_init_dwo_file): Use dwo_file_up.
9374 (free_dwo_file_cleanup): Remove.
9375
9376 2018-03-30 Tom Tromey <tom@tromey.com>
9377
9378 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9379 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9380
9381 2018-03-30 Tom Tromey <tom@tromey.com>
9382
9383 * dwarf2read.c (class free_cached_comp_units): New class.
9384 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9385 (free_cached_comp_units): Remove function.
9386
9387 2018-03-30 Tom Tromey <tom@tromey.com>
9388
9389 * utils.h (make_cleanup_unpush_target): Remove.
9390 * inf-ptrace.c (struct target_unpusher): New.
9391 (target_unpush_up) New typedef.
9392 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9393 target_unpush_up.
9394 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9395
9396 2018-03-27 Tom Tromey <tom@tromey.com>
9397
9398 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9399
9400 2018-03-27 Pedro Alves <palves@redhat.com>
9401 Tom Tromey <tom@tromey.com>
9402
9403 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9404 destructor. Now a class.
9405 (gdb_readline_wrapper_cleanup): Remove function.
9406 (gdb_readline_wrapper): Remove cleanups.
9407
9408 2018-03-27 Tom Tromey <tom@tromey.com>
9409
9410 * typeprint.h (struct type_print_options) <local_typedefs,
9411 global_typedefs>: Remove "struct" keyword.
9412 (class typedef_hash_table): New class.
9413 (recursively_update_typedef_hash, add_template_parameters)
9414 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9415 (find_typedef_in_hash): Don't declare.
9416 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9417 (typedef_hash_table::recursively_update): Rename from
9418 recursively_update_typedef_hash. Now a member.
9419 (typedef_hash_table::add_template_parameters): Rename from
9420 add_template_parameters. Now a member.
9421 (typedef_hash_table::typedef_hash_table): Now a constructor;
9422 rename from create_typedef_hash.
9423 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9424 rename from free_typedef_hash.
9425 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9426 (do_free_global_table): Remove.
9427 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9428 from copy_type_recursive.
9429 (create_global_typedef_table): Remove.
9430 (typedef_hash_table::find_global_typedef): Now a member of
9431 typedef_hash_table.
9432 (typedef_hash_table::find_typedef): Rename from
9433 find_typedef_in_hash; now a member.
9434 (whatis_exp): Update.
9435 * extension.h (struct ext_lang_type_printers): Add constructor and
9436 destructor.
9437 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9438 declare.
9439 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9440 Now a constructor; rename from start_ext_lang_type_printers.
9441 (ext_lang_type_printers): Now a destructor; rename from
9442 free_ext_lang_type_printers.
9443 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9444 Update.
9445 (c_type_print_base_struct_union): Update. Remove cleanups.
9446
9447 2018-03-27 Tom Tromey <tom@tromey.com>
9448
9449 * dwarf-index-write.c: Include <cmath>.
9450
9451 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9452
9453 * NEWS: Add entry describing new "set|show varsize-limit" command.
9454 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9455 command.
9456 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9457 "set variable".
9458
9459 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9460
9461 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9462 dwarf-index-write.c
9463 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9464 * dwarf-index-common.c: New file.
9465 * dwarf-index-common.h: New file.
9466 * dwarf-index-write.c: New file.
9467 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9468 (struct dwarf2_section_info): Move from here.
9469 (dwarf2_section_info_def): Likewise.
9470 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9471 (offset_type): Likewise.
9472 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9473 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9474 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9475 (byte_swap): Likewise.
9476 (MAYBE_SWAP): Likewise.
9477 (dwarf2_per_cu_ptr): Likewise.
9478 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9479 (struct tu_stats): Likewise.
9480 (struct dwarf2_per_objfile): Likewise.
9481 (struct dwarf2_per_cu_data): Likewise.
9482 (struct signatured_type): Likewise.
9483 (sig_type_ptr): Likewise.
9484 (DEF_VEC_P (sig_type_ptr)): Likewise.
9485 (INDEX4_SUFFIX): Likewise.
9486 (INDEX5_SUFFIX): Likewise.
9487 (DEBUG_STR_SUFFIX): Likewise.
9488 (dwarf2_read_section): Make non-static.
9489 (mapped_index_string_hash): Move from here.
9490 (dwarf5_djb_hash): Likewise.
9491 (file_write): Likewise.
9492 (class data_buf): Likewise.
9493 (struct symtab_index_entry): Likewise.
9494 (struct mapped_symtab): Likewise.
9495 (find_slot): Likewise.
9496 (hash_expand): Likewise.
9497 (add_index_entry): Likewise.
9498 (uniquify_cu_indices): Likewise.
9499 (class c_str_view): Likewise.
9500 (class c_str_view_hasher): Likewise.
9501 (class vector_hasher): Likewise.
9502 (write_hash_table): Likewise.
9503 (psym_index_map): Likewise.
9504 (struct addrmap_index_data): Likewise.
9505 (add_address_entry): Likewise.
9506 (add_address_entry_worker): Likewise.
9507 (write_address_map): Likewise.
9508 (symbol_kind): Likewise.
9509 (write_psymbols): Likewise.
9510 (struct signatured_type_index_data): Likewise.
9511 (write_one_signatured_type): Likewise.
9512 (recursively_count_psymbols): Likewise.
9513 (recursively_write_psymbols): Likewise.
9514 (class debug_names): Likewise.
9515 (check_dwarf64_offsets): Likewise.
9516 (psyms_seen_size): Likewise.
9517 (write_gdbindex): Likewise.
9518 (write_debug_names): Likewise.
9519 (assert_file_size): Likewise.
9520 (write_psymtabs_to_index): Likewise.
9521 (save_gdb_index_command): Likewise.
9522 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9523 command.
9524 * dwarf2read.h: New file.
9525
9526 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9527
9528 PR gdb/22670
9529 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9530 symbol name if the CU's language stores symbol names in linkage
9531 format.
9532 * language.h (struct language_defn)
9533 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9534 all instances of this struct.
9535
9536 2018-03-26 Tom Tromey <tom@tromey.com>
9537
9538 * stack.c (backtrace_command_1): Remove verbose code.
9539
9540 2018-03-26 Tom Tromey <tom@tromey.com>
9541
9542 * python/py-framefilter.c (py_print_type): Don't catch
9543 exceptions. Return void.
9544 (py_print_value): Likewise.
9545 (py_print_single_arg): Likewise.
9546 (enumerate_args): Don't catch exceptions.
9547 (py_print_args): Likewise.
9548 (py_print_frame): Likewise.
9549 (gdbpy_apply_frame_filter): Catch exceptions here.
9550
9551 2018-03-26 Tom Tromey <tom@tromey.com>
9552
9553 * stack.c (_initialize_stack): Remove trailing newlines from help
9554 text. Add "Usage" line to "backtrace" help.
9555
9556 2018-03-26 Tom Tromey <tom@tromey.com>
9557
9558 PR python/16486:
9559 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9560
9561 2018-03-26 Tom Tromey <tom@tromey.com>
9562
9563 * python/py-framefilter.c (py_print_single_arg): Return
9564 EXT_LANG_BT_ERROR from catch.
9565
9566 2018-03-26 Tom Tromey <tom@tromey.com>
9567
9568 PR backtrace/15584:
9569 * stack.c (backtrace_command_1): Move some code into no-filters
9570 "if".
9571
9572 2018-03-26 Tom Tromey <tom@tromey.com>
9573
9574 * python/py-framefilter.c (throw_quit_or_print_exception): New
9575 function.
9576 (gdbpy_apply_frame_filter): Use it.
9577
9578 2018-03-26 Tom Tromey <tom@tromey.com>
9579
9580 PR cli/17716:
9581 * python/py-framefilter.c (py_print_type, py_print_value)
9582 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9583 RETURN_MASK_ERROR.
9584
9585 2018-03-26 Tom Tromey <tom@tromey.com>
9586
9587 * python/py-framefilter.c (enumerate_args): Use
9588 gdb::unique_xmalloc_ptr.
9589
9590 2018-03-26 Tom Tromey <tom@tromey.com>
9591
9592 * python/py-framefilter.c (py_print_frame): Return
9593 EXT_LANG_BT_OK.
9594 (gdbpy_apply_frame_filter): Update comment.
9595 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9596 Remove.
9597 <EXT_LANG_BT_NO_FILTERS>: Change value.
9598
9599 2018-03-26 Tom Tromey <tom@tromey.com>
9600
9601 PR backtrace/15582:
9602 * stack.c (backtrace_command): Parse "hide" argument.
9603 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9604 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9605 constant.
9606
9607 2018-03-26 Tom Tromey <tom@tromey.com>
9608
9609 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9610 add "flags".
9611 (backtrace_command): Remove "fulltrace", add "flags".
9612
9613 2018-03-26 Tom Tromey <tom@tromey.com>
9614
9615 * stack.c (backtrace_command): Rewrite command line parsing.
9616
9617 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9618
9619 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9620
9621 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9622
9623 * filename-seen-cache.h: Add include guard.
9624
9625 2018-03-26 Keith Seitz <keiths@redhat.com>
9626
9627 * symfile.c (place_section): Remove "struct" from section_addr_info
9628 in comment.
9629 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9630 "struct" keyword from section_addr_info.
9631
9632 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9633
9634 * regformats/regdef.h (reg): Add constructors.
9635
9636 2018-03-25 Pedro Alves <palves@redhat.com>
9637
9638 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9639 if then/else bodies in var_func_name extraction.
9640
9641 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9642
9643 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9644 lookup_minimal_symbol() to find symbol entry.
9645 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9646
9647 2018-03-23 Keith Seitz <keiths@redhat.com>
9648
9649 PR c++/22968
9650 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9651 nested type definitions for C++, too.
9652
9653 2018-03-23 Tom Tromey <tom@tromey.com>
9654
9655 * machoread.c (struct oso_el): Add a constructor. Don't define as
9656 a typedef.
9657 (macho_register_oso): Remove.
9658 (macho_symtab_read): Take a std::vector.
9659 (oso_el_compare_name): Now a std::sort comparator.
9660 (macho_symfile_read_all_oso): Take a std::vector.
9661 (macho_symfile_read): Use std::vector. Remove cleanups.
9662
9663 2018-03-22 Tom Tromey <tom@tromey.com>
9664
9665 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9666 (record_full_goto_bookmark): Use std::string.
9667
9668 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9669
9670 PR tdep/18295
9671 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9672 a single mask.
9673
9674 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9675
9676 * rs6000-tdep.c (store_insn_p): New function.
9677 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9678 and cr_reg to their unshifted values. Use store_insn_p to
9679 match LR saves using either R1 or fdata->alloca_reg. Use
9680 store_insn_p to match CR saves. Set alloca_reg_offset
9681 when alloca_reg and framep are set. Remove lr_reg shift
9682 when assigning to fdata->lr_register.
9683
9684 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9685
9686 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9687 command line args instead of emitting a warning.
9688
9689 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9690
9691 * tracepoint.h (struct static_tracepoint_marker): Initialize
9692 fields, define default constructor, move constructor and move
9693 assignment, disable the rest.
9694 <str_id, extra>: Make std::string.
9695 (release_static_tracepoint_marker): Remove.
9696 (free_current_marker): Remove.
9697 * tracepoint.c (free_current_marker): Remove.
9698 (parse_static_tracepoint_marker_definition): Adjust to
9699 std::string, use new hex2str overload.
9700 (release_static_tracepoint_marker): Remove.
9701 (print_one_static_tracepoint_marker): Get marker by reference
9702 and adjust to std::string.
9703 (info_static_tracepoint_markers_command): Adjust to std::vector
9704 changes
9705 * target.h (static_tracepoint_marker_p): Remove typedef.
9706 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9707 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9708 bool.
9709 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9710 * target-debug.h
9711 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9712 (target_debug_print_std_vector_static_tracepoint_marker): New.
9713 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9714 to...
9715 (target_debug_print_static_tracepoint_marker_p): ... this.
9716 * target-delegates.c: Re-generate.
9717 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9718 Make std::string.
9719 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9720 (decode_static_tracepoint_spec): Adjust to std::vector.
9721 (tracepoint_print_one_detail): Adjust to std::string.
9722 (strace_marker_decode_location): Adjust to std::string.
9723 (update_static_tracepoint): Adjust to std::string, remove call
9724 to release_static_tracepoint_marker.
9725 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9726 Adjust to std::vector.
9727 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9728 (remote_static_tracepoint_markers_by_strid): Adjust to
9729 std::vector.
9730 * common/rsp-low.h (hex2str): New overload with explicit count
9731 of bytes.
9732 * common/rsp-low.c (hex2str): New overload with explicit count
9733 of bytes.
9734 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9735 (_initialize_rsp_low_selftests): Add test_hex2str test.
9736 * unittests/tracepoint-selftests.c
9737 (test_parse_static_tracepoint_marker_definition): Adjust to
9738 std::string.
9739
9740 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9741
9742 * tracepoint.c (parse_static_tracepoint_marker_definition):
9743 Consider case where the definition is followed by more
9744 definitions.
9745 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9746 tracepoint-selftests.c.
9747 * unittests/tracepoint-selftests.c: New.
9748
9749 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9750
9751 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9752 Carvalho.
9753
9754 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9755
9756 * symtab.c (find_pc_sect_line): fixed indentation.
9757
9758 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9759
9760 * symtab.c (find_pc_sect_line): now uses binary search.
9761
9762 2018-03-19 Tom Tromey <tom@tromey.com>
9763
9764 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9765 "IDENT" production.
9766
9767 2018-03-19 Pedro Alves <palves@redhat.com>
9768 Tom Tromey <tom@tromey.com>
9769
9770 * unittests/observable-selftests.c: New file.
9771 * common/observable.h: New file.
9772 * observable.h: New file.
9773 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9774 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9775 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9776 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9777 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9778 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9779 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9780 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9781 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9782 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9783 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9784 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9785 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9786 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9787 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9788 tui/tui-interp.c, valops.c: Update all users.
9789 * tui/tui-hooks.c (tui_bp_created_observer)
9790 (tui_bp_deleted_observer, tui_bp_modified_observer)
9791 (tui_inferior_exit_observer, tui_before_prompt_observer)
9792 (tui_normal_stop_observer, tui_register_changed_observer):
9793 Remove.
9794 (tui_observers_token): New global.
9795 (attach_or_detach, tui_attach_detach_observers): New functions.
9796 (tui_install_hooks, tui_remove_hooks): Use
9797 tui_attach_detach_observers.
9798 * record-btrace.c (record_btrace_thread_observer): Remove.
9799 (record_btrace_thread_observer_token): New global.
9800 * observer.sh: Remove.
9801 * observer.c: Rename to observable.c.
9802 * observable.c (namespace gdb_observers): Define new objects.
9803 (observer_debug): Move into gdb_observers namespace.
9804 (struct observer, struct observer_list, xalloc_observer_list_node)
9805 (xfree_observer_list_node, generic_observer_attach)
9806 (generic_observer_detach, generic_observer_notify): Remove.
9807 (_initialize_observer): Update.
9808 Don't include observer.inc.
9809 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9810 (clean mostlyclean): Likewise.
9811 (observer.h, observer.inc): Remove targets.
9812 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9813 (COMMON_SFILES): Use observable.c, not observer.c.
9814 * .gitignore: Remove observer.h.
9815
9816 2018-03-18 Tom Tromey <tom@tromey.com>
9817
9818 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9819 gdb::def_vector.
9820 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9821
9822 2018-03-17 Tom Tromey <tom@tromey.com>
9823
9824 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9825
9826 2018-03-17 Tom Tromey <tom@tromey.com>
9827
9828 * target.c (class scoped_target_fd): New.
9829 (target_fileio_close_cleanup): Remove.
9830 (target_fileio_read_alloc_1): Use scoped_target_fd.
9831
9832 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9833
9834 * silent-rules.mk: New.
9835 * Makefile.in: Include silent-rules.mk
9836 (srcdir, VPATH, top_srcdir): Move up.
9837 (COMPILE): Add ECHO_CXX.
9838 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9839 (init.c): Add ECHO_INIT_C.
9840 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9841 (version.c): Add ECHO_GEN.
9842 (printcmd.o): Add ECHO_CXX.
9843 (target-float.o): Add ECHO_CXX.
9844 (ada-exp.o): Add ECHO_CXX.
9845 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9846 (insight$(EXEEXT)): Add ECHO_CXXLD.
9847 * gnulib/configure.ac: Add AM_SILENT_RULES.
9848 * gnulib/aclocal.m4: Re-generate.
9849 * gnulib/configure: Re-generate.
9850 * gnulib/import/Makefile.in: Re-generate.
9851
9852 2018-03-16 Tom Tromey <tom@tromey.com>
9853
9854 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9855 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9856 * utils.c (do_free_section_addr_info)
9857 (make_cleanup_free_section_addr_info): Remove.
9858 * symfile.h (struct other_sections): Add constructor.
9859 (struct section_addr_info): Remove.
9860 (section_addr_info): New typedef.
9861 (struct sym_fns) <sym_offsets>: Change type of parameter.
9862 (build_section_addr_info_from_objfile)
9863 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9864 (default_symfile_offsets, symbol_file_add)
9865 (symbol_file_add_from_bfd)
9866 (build_section_addr_info_from_section_table): Update.
9867 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9868 * symfile.c (alloc_section_addr_info): Remove.
9869 (build_section_addr_info_from_section_table): Change return type.
9870 Update.
9871 (build_section_addr_info_from_bfd)
9872 (build_section_addr_info_from_objfile): Likewise.
9873 (free_section_addr_info): Remove.
9874 (relative_addr_info_to_section_offsets): Change type of "addrs".
9875 (addrs_section_compar): Now a std::sort comparator.
9876 (addrs_section_sort): Change return type.
9877 (addr_info_make_relative): Change type of "addrs". Update.
9878 (default_symfile_offsets, syms_from_objfile_1)
9879 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9880 (symbol_file_add_separate): Update.
9881 (symbol_file_add): Change type of "addrs". Update.
9882 (add_symbol_file_command): Update. Remove cleanups.
9883 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9884 cleanups.
9885 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9886 * solib.c (solib_read_symbols): Update.
9887 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9888 * machoread.c (macho_symfile_offsets): Update.
9889 * jit.c (jit_bfd_try_read_symtab): Update.
9890
9891 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9892
9893 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9894 unittests/utils-selftests.c.
9895 * unittests/utils-selftests.c: New file.
9896
9897 2018-03-14 Tom Tromey <tom@tromey.com>
9898
9899 PR cli/14977:
9900 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9901 for NULL.
9902
9903 2018-03-14 Tom Tromey <tom@tromey.com>
9904
9905 PR cli/19918:
9906 * printcmd.c (printf_pointer): Allow "-" in format.
9907
9908 2018-03-14 Tom Tromey <tom@tromey.com>
9909
9910 * printcmd.c (_initialize_printcmd): Add usage to printf.
9911
9912 2018-03-14 Yao Qi <qiyao@sourceware.org>
9913
9914 * MAINTAINERS: Update my email address.
9915
9916 2018-03-13 Tom Tromey <tom@tromey.com>
9917
9918 * machoread.c (macho_check_dsym): Change filenamep to a
9919 std::string*.
9920 (macho_symfile_read): Update.
9921 * symfile.c (load_command): Use std::string.
9922
9923 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9924
9925 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9926 to error message string.
9927 (riscv_register_name): Use xsnprintf instead of sprintf.
9928 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9929 internal_error.
9930 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9931 error.
9932 (riscv_push_dummy_call): Likewise.
9933
9934 2018-03-12 Tom Tromey <tom@tromey.com>
9935
9936 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9937 Use gdb::byte_vector.
9938 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9939
9940 2018-03-12 Yao Qi <yao.qi@linaro.org>
9941
9942 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9943 parameter type to readable_regcache.
9944 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9945 the declaration.
9946
9947 2018-03-11 Tom Tromey <tom@tromey.com>
9948
9949 * dwarf2read.c (struct nextfield): Add initializers.
9950 (struct nextfnfield): Remove.
9951 (struct fnfieldlist): Add initializers. Remove "length" and
9952 "head", use std::vector.
9953 (struct decl_field_list): Remove.
9954 (struct field_info): Add initializers.
9955 <fields, baseclasses>: Now std::vector.
9956 <nbaseclasses, nfnfields, typedef_field_list_count,
9957 nested_types_list_count>: Remove.
9958 (dwarf2_add_field, dwarf2_add_type_defn)
9959 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9960 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9961 (process_structure_scope): Update.
9962
9963 2018-03-11 Tom Tromey <tom@tromey.com>
9964
9965 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9966 for use by std::sort.
9967 (build_type_psymtabs_1): Use std::vector.
9968
9969 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9970
9971 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9972 and LIBMPFR in the printed configuration.
9973
9974 2018-03-08 Tom Tromey <tom@tromey.com>
9975
9976 * source.c (get_filename_and_charpos): Use scoped_fd.
9977 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9978 (procfs_pidlist): Likewise.
9979 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9980 (iterate_over_mappings): Likewise.
9981
9982 2018-03-08 Tom Tromey <tom@tromey.com>
9983
9984 * infcall.c (struct call_return_meta_info)
9985 <stack_temporaries_enabled>: Remove.
9986 (get_call_return_value, call_function_by_hand_dummy): Update.
9987 * thread.c (disable_thread_stack_temporaries): Remove.
9988 (enable_thread_stack_temporaries): Remove.
9989 (thread_stack_temporaries_enabled_p): Return bool.
9990 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9991 (get_last_thread_stack_temporary): Update.
9992 * eval.c (evaluate_subexp): Update.
9993 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9994 class, not a function.
9995 (value_ptr, value_vec): Remove typedefs.
9996 (class thread_info) <stack_temporaries_enabled>: Now bool.
9997 <stack_temporaries>: Now a std::vector.
9998 (thread_stack_temporaries_enabled_p)
9999 (value_in_thread_stack_temporaries): Return bool.
10000
10001 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10002
10003 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10004 (getpkt_or_notif_sane_1): Likewise.
10005
10006 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10007
10008 * build-id.c (build_id_to_debug_bfd): Use std::string.
10009
10010 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10011
10012 * build-id.c (find_separate_debug_file_by_buildid): Return
10013 std::string.
10014 * build-id.h (find_separate_debug_file_by_buildid): Return
10015 std::string.
10016 * coffread.c (coff_symfile_read): Adjust to std::string.
10017 * elfread.c (elf_symfile_read): Adjust to std::string.
10018 * symfile.c (separate_debug_file_exists): Change parameter to
10019 std::string.
10020 (find_separate_debug_file): Return std::string.
10021 (find_separate_debug_file_by_debuglink): Return std::string.
10022 * symfile.h (find_separate_debug_file_by_debuglink): Return
10023 std::string.
10024
10025 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10026
10027 * common/xml-utils.c (xml_escape_text): Move code to...
10028 (xml_escape_text_append): ... this new function.
10029 * common/xml-utils.h (xml_escape_text_append): New declaration.
10030 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10031 New function.
10032 (_initialize_xml_utils): register test_xml_escape_text_append as
10033 a selftest.
10034
10035 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10036
10037 * defs.h: Remove MAX_REGISTER_SIZE.
10038 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10039 asserts.
10040 * python/py-unwind.c (pyuw_sniffer): Likewise.
10041
10042 2018-03-07 Tom Tromey <tom@tromey.com>
10043
10044 * linux-tdep.c (linux_info_proc): Update.
10045 * target.h (struct target_ops) <to_fileio_readlink>: Return
10046 optional<string>.
10047 (target_fileio_readlink): Return optional<string>.
10048 * remote.c (remote_hostio_readlink): Return optional<string>.
10049 * inf-child.c (inf_child_fileio_readlink): Return
10050 optional<string>.
10051 * target.c (target_fileio_readlink): Return optional<string>.
10052
10053 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10054
10055 * regcache.c (cooked_read_test): Add riscv to the list of
10056 architectures that have a save_reggroup.
10057
10058 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10059
10060 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10061 value is not a dynamic class object.
10062
10063 2018-03-06 Tom Tromey <tom@tromey.com>
10064
10065 * rust-exp.y: Formatting fixes.
10066
10067 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10068
10069 * riscv-tdep.c (riscv_register_name): Remove target description
10070 support.
10071 (riscv_gdbarch_init): Remove target description check.
10072
10073 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10074
10075 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10076 comment.
10077 * riscv-tdep.h: Likewise.
10078
10079 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10080
10081 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10082 (riscv_pseudo_register_write): Delete.
10083 (riscv_gdbarch_init): Remove all use of pseudo registers.
10084
10085 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10086
10087 * record-btrace.c (btrace_print_lines): Replace cleanup
10088 parameter with RAII equivalents.
10089 (btrace_insn_history): Replace cleanup with RAII equivalents.
10090 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10091 make_cleanup_ui_out_tuple_begin_end): Remove.
10092 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10093 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10094 make_cleanup_ui_out_list_begin_end): Remove.
10095
10096 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10097
10098 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10099 parameter types to std::vector. Use bool.
10100 (record_btrace_wait): Replace VEC(tp_t) with
10101 std::vector<thread_info *>.
10102 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10103
10104 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10105
10106 * record-btrace.c (record_btrace_disable_callback): Remove.
10107 (struct scoped_btrace_disable): New.
10108 (record_btrace_open): Use scoped_btrace_disable.
10109
10110 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10111
10112 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10113 reading values from registers.
10114
10115 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10116
10117 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10118 where appropriate.
10119
10120 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10121
10122 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10123 change parameter type. Use GDB's print functions, and use
10124 core_addr_to_string where appropriate.
10125 (riscv_push_dummy_call): Use core_addr_to_string where
10126 appropriate, update call to riscv_print_arg_location, and reindent
10127 a few lines.
10128 (riscv_return_value): Update call to riscv_print_arg_location.
10129
10130 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10131 Tim Newsome <tim@sifive.com>
10132 Albert Ou <a0u@eecs.berkeley.edu>
10133 Darius Rad <darius@bluespec.com>
10134
10135 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10136 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10137 (ALLDEPFILES): Add riscv-tdep.c
10138 * configure.tgt: Add riscv support.
10139 * riscv-tdep.c: New file.
10140 * riscv-tdep.h: New file.
10141 * NEWS: Mention new target.
10142 * MAINTAINERS: Add entry for riscv.
10143
10144 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10145
10146 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10147 fields within aggregates.
10148
10149 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10150
10151 * record-btrace.c (btrace_print_lines): Change type of flags to
10152 gdb_disassembly_flags.
10153
10154 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10155
10156 * fbsd-nat.c: Include "inf-ptrace.h".
10157 (USE_SIGTRAP_SIGINFO): Conditionally define.
10158 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10159 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10160 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10161 function.
10162 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10163 Likewise.
10164 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10165 Likewise.
10166 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10167 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10168 "supports_stopped_by_hw_breakpoint" target methods.
10169
10170 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10171
10172 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10173 * fbsd-nat.c (debug_fbsd_nat): New variable.
10174 (show_fbsd_nat_debug): New function.
10175 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10176 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10177
10178 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10179
10180 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10181 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10182 prototype.
10183 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10184 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10185 method.
10186
10187 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10188
10189 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10190 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10191
10192 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10193
10194 * charset.c (struct charset_vector): New.
10195 (charsets): Change type to charset_vector.
10196 (find_charset_names): Adjust.
10197 (add_one): Adjust.
10198 (_initialize_charset): Adjust.
10199
10200 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10201
10202 * progspace.h (struct program_space) <deleted_solibs>: Change
10203 type to std::vector<std::string>.
10204 * progspace.c (clear_program_space_solib_cache): Adjust.
10205 * breakpoint.c (print_solib_event): Adjust.
10206 (check_status_catch_solib): Adjust.
10207 * solib.c (update_solib_list): Adjust.
10208 * ui-out.h (class ui_out) <field_string>: New overload.
10209 * ui-out.c (ui_out::field_string): New overload.
10210
10211 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10212
10213 * progspace.h (struct program_space): Add constructor and
10214 destructor, initialize fields.
10215 (add_program_space): Remove.
10216 * progspace.c (add_program_space): Rename to...
10217 (program_space::program_space): ... this.
10218 (release_program_space): Rename to...
10219 (program_space::~program_space): ... this.
10220 (delete_program_space): Use delete to delete program_space.
10221 (initialize_progspace): Use new to allocate program_space.
10222 * inferior.c (add_inferior_with_spaces): Likewise.
10223 (clone_inferior_command): Likewise.
10224 * infrun.c (follow_fork_inferior): Likewise.
10225 (handle_vfork_child_exec_or_exit): Likewise.
10226
10227 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10228
10229 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10230 (delim_string_to_char_ptr_vec): Return std::vector of
10231 gdb::unique_xmalloc_ptr.
10232 (dirnames_to_char_ptr_vec_append): Take std::vector of
10233 gdb::unique_xmalloc_ptr.
10234 (dirnames_to_char_ptr_vec): Return std::vector of
10235 gdb::unique_xmalloc_ptr.
10236 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10237 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10238 (delim_string_to_char_ptr_vec): Return an std::vector of
10239 gdb::unique_xmalloc_ptr, adjust the code.
10240 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10241 gdb::unique_xmalloc_ptr, adjust the code.
10242 (dirnames_to_char_ptr_vec): Return an std::vector of
10243 gdb::unique_xmalloc_ptr, adjust the code.
10244 * auto-load.c (auto_load_safe_path_vec): Change type to
10245 std::vector of gdb::unique_xmalloc_ptr.
10246 (auto_load_expand_dir_vars): Return an std::vector of
10247 gdb::unique_xmalloc_ptr, adjust the code.
10248 (auto_load_safe_path_vec_update): Adjust.
10249 (filename_is_in_auto_load_safe_path_vec): Adjust.
10250 (auto_load_objfile_script_1): Adjust.
10251 * build-id.c (build_id_to_debug_bfd): Adjust.
10252 * linux-thread-db.c (thread_db_load_search): Adjust.
10253 * source.c (add_path): Adjust.
10254 (openp): Adjust.
10255 * symfile.c (find_separate_debug_file): Adjust.
10256 * utils.c (do_free_char_ptr_vec): Remove.
10257 (make_cleanup_free_char_ptr_vec): Remove.
10258
10259 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10260
10261 PR gdb/22907
10262 * common/pathstuff.c: Conditionally include "<windows.h>".
10263
10264 2018-03-01 Georg Sauthoff <mail@georg.so>
10265
10266 PR gdb/22888
10267 * gcore.in: Quote variables and switch interpreter to bash.
10268
10269 2018-03-01 Tom Tromey <tom@tromey.com>
10270
10271 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10272 assertion. Add assertion for discriminant_index.
10273 (quirk_rust_enum): Use correct base type name in univariant case.
10274
10275 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10276
10277 * record.c (get_call_history_modifiers): Return a
10278 record_print_flags.
10279 (cmd_record_call_history): Adjust.
10280 * record-btrace.c (record_btrace_call_history): Adjust.
10281 (record_btrace_call_history_range): Adjust.
10282 (record_btrace_call_history_from): Adjust.
10283 * target-debug.h (target_debug_print_record_print_flags): New.
10284 * target-delegates.c: Re-generate.
10285 * target.c (target_call_history): Change flags type.
10286 (target_call_history_from): Likewise.
10287 (target_call_history_range): Likewise.
10288 * target.h (struct target_ops) <target_call_history>: Likewise.
10289 (target_call_history_from): Likewise.
10290 (target_call_history_range): Likewise.
10291
10292 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10293 Simon Marchi <simon.marchi@polymtl.ca>
10294
10295 * common/common-utils.c: Include "sys/stat.h".
10296 (is_regular_file): Move here from "source.c"; change return
10297 type to "bool".
10298 * common/common-utils.h (is_regular_file): New prototype.
10299 * common/pathstuff.c (contains_dir_separator): New function.
10300 * common/pathstuff.h (contains_dir_separator): New prototype.
10301 * source.c: Don't include "sys/stat.h".
10302 (is_regular_file): Move to "common/common-utils.c".
10303
10304 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10305
10306 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10307 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10308 * auto-load.c: Include "common/pathstuff.h".
10309 * common/common-def.h (current_directory): Move here.
10310 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10311 function.
10312 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10313 prototype.
10314 * common/pathstuff.c: New file.
10315 * common/pathstuff.h: New file.
10316 * compile/compile.c: Include "common/pathstuff.h".
10317 * defs.h (current_directory): Move to "common/common-defs.h".
10318 * dwarf2read.c: Include "common/pathstuff.h".
10319 * exec.c: Likewise.
10320 * guile/scm-safe-call.c: Likewise.
10321 * linux-thread-db.c: Likewise.
10322 * main.c: Likewise.
10323 * nto-tdep.c: Likewise.
10324 * objfiles.c: Likewise.
10325 * source.c: Likewise.
10326 * symtab.c: Likewise.
10327 * utils.c: Include "common/pathstuff.h".
10328 (gdb_realpath): Move to "common/pathstuff.c".
10329 (gdb_realpath_keepfile): Likewise.
10330 (gdb_abspath): Likewise.
10331 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10332 (gdb_realpath_keepfile): Likewise.
10333 (gdb_abspath): Likewise.
10334
10335 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10336
10337 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10338 wildcard process pid for super_resume for kernels with a
10339 specific bug.
10340
10341 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10342
10343 * compile/compile.c (get_args): Add additional comments
10344 explaining function.
10345
10346 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10347 Tom Tromey <tom@tromey.com>
10348
10349 * target.h (memory_write_request_s): Remove typedef. Don't define
10350 VEC.
10351 (target_write_memory_blocks): Change argument to std::vector.
10352 (struct memory_write_request): Add constructor.
10353 * target-memory.c (compare_block_starting_address): Return bool.
10354 Change argument types.
10355 (claim_memory): Change arguments to use std::vector.
10356 (split_regular_and_flash_blocks, blocks_to_erase)
10357 (compute_garbled_blocks): Likewise.
10358 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10359 (target_write_memory_blocks): Change argument to std::vector.
10360 * symfile.c (struct load_section_data): Add constructor and
10361 destructor. Use std::vector for "requests".
10362 (struct load_progress_data): Add initializers.
10363 (load_section_callback): Update. Use "new".
10364 (clear_memory_write_data): Remove.
10365 (generic_load): Update.
10366
10367 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10368
10369 * arch/aarch64.h: Use common/tdesc.h.
10370
10371 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10372
10373 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10374 architecture with a 64-bit ABI.
10375
10376 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10377
10378 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10379 ahead of target description loading.
10380
10381 2018-02-26 Tom Tromey <tom@tromey.com>
10382
10383 * stack.c (backtrace_command_1): Update.
10384 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10385 of "flags".
10386 * python/py-framefilter.c (py_print_frame)
10387 (gdbpy_apply_frame_filter): Change type of "flags".
10388 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10389 of "flags".
10390 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10391 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10392 * extension.h (enum frame_filter_flag): Rename from
10393 frame_filter_flags.
10394 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10395 (apply_ext_lang_frame_filter): Change type of "flags".
10396 * extension.c (apply_ext_lang_frame_filter): Change type of
10397 "flags".
10398 * extension-priv.h (struct extension_language_ops)
10399 <apply_frame_filter>: Change type of "flags".
10400
10401 2018-02-26 Tom Tromey <tom@tromey.com>
10402
10403 PR python/16497:
10404 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10405 off-by-one in py_end computation.
10406 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10407 PRINT_MORE_FRAMES.
10408 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10409 constant.
10410
10411 2018-02-26 Tom Tromey <tom@tromey.com>
10412
10413 * dwarf2read.c (struct variant_field): New.
10414 (struct nextfield) <variant>: New field.
10415 (dwarf2_add_field): Handle DW_TAG_variant_part.
10416 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10417 discriminated union.
10418 (read_structure_type): Handle DW_TAG_variant_part.
10419 (handle_struct_member_die): New function, extracted from
10420 process_structure_scope. Handle DW_TAG_variant.
10421 (process_structure_scope): Handle discriminated unions. Call
10422 handle_struct_member_die.
10423
10424 2018-02-26 Tom Tromey <tom@tromey.com>
10425
10426 * rust-lang.h (rust_last_path_segment): Declare.
10427 * rust-lang.c (rust_last_path_segment): Now public. Change
10428 contract.
10429 (struct disr_info): Remove.
10430 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10431 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10432 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10433 (rust_enum_p, rust_enum_variant): New function.
10434 (rust_underscore_fields): Remove "offset" parameter.
10435 (rust_print_enum): New function.
10436 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10437 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10438 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10439 enums.
10440 (rust_internal_print_type): New function, from rust_print_type.
10441 Remove enum code.
10442 (rust_print_type): Call rust_internal_print_type.
10443 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10444 Update enum handling.
10445 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10446 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10447 (rust_union_quirks): New functions.
10448 (process_full_comp_unit, process_full_type_unit): Call
10449 rust_union_quirks.
10450 (process_structure_scope): Update rust_unions if necessary.
10451
10452 2018-02-26 Tom Tromey <tom@tromey.com>
10453
10454 * value.h (value_union_variant): Declare.
10455 * valops.c (value_union_variant): New function.
10456 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10457 (struct discriminant_info): New.
10458 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10459 enumerator.
10460 (struct main_type) <flag_discriminated_union>: New field.
10461
10462 2018-02-26 Tom Tromey <tom@tromey.com>
10463
10464 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10465 unittests/unpack-selftests.c.
10466 * unittests/unpack-selftests.c: New file.
10467 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10468
10469 2018-02-26 Yao Qi <yao.qi@linaro.org>
10470
10471 * dwarf2read.c (struct partial_die_info) <read>: New method.
10472 (read_partial_die): Remove the declaration.
10473 (load_partial_dies): Update.
10474 (partial_die_info::partial_die_info):
10475 (read_partial_die): Change it to partial_die_info::read.
10476
10477 2018-02-26 Yao Qi <yao.qi@linaro.org>
10478
10479 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10480 (fixup_partial_die): Remove declaration.
10481 (scan_partial_symbols): Update.
10482 (partial_die_parent_scope): Likewise.
10483 (partial_die_full_name): Likewise.
10484 (fixup_partial_die): Change it to partial_die_info::fixup.
10485
10486 2018-02-26 Yao Qi <yao.qi@linaro.org>
10487
10488 * dwarf2read.c (read_partial_die): Update the declaration.
10489 (load_partial_dies): Caller update.
10490 (read_partial_die): Remove one argument abbrev_len.
10491
10492 2018-02-26 Yao Qi <yao.qi@linaro.org>
10493
10494 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10495 assignment operator.
10496 (load_partial_dies): Use ctor and copy ctor.
10497 (read_partial_die): Update.
10498 (dwarf2_cu::find_partial_die): Use ctor.
10499
10500 2018-02-26 Yao Qi <yao.qi@linaro.org>
10501
10502 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10503 (find_partial_die_in_comp_unit): Change it to
10504 dwarf2_cu::find_partial_die.
10505 (find_partial_die): Update.
10506
10507 2018-02-26 Yao Qi <yao.qi@linaro.org>
10508
10509 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10510 is NULL.
10511
10512 2018-02-26 Yao Qi <yao.qi@linaro.org>
10513
10514 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10515
10516 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10517
10518 * arch/amd64.h: Use common/tdesc.h.
10519 * arch/i386.c: Likewise.
10520 * arch/i386.h: Likewise.
10521 * arch/tic6x.c: Likewise.
10522 * arch/tdesc.h: Move file from here...
10523 * common/tdesc.h: ...to here.
10524 * features/aarch64-core.c: Regenerate.
10525 * features/aarch64-fpu.c: Regenerate.
10526 * features/i386/32bit-avx.c: Regenerate.
10527 * features/i386/32bit-avx512.c: Regenerate.
10528 * features/i386/32bit-core.c: Regenerate.
10529 * features/i386/32bit-linux.c: Regenerate.
10530 * features/i386/32bit-mpx.c: Regenerate.
10531 * features/i386/32bit-pkeys.c: Regenerate.
10532 * features/i386/32bit-sse.c: Regenerate.
10533 * features/i386/64bit-avx.c: Regenerate.
10534 * features/i386/64bit-avx512.c: Regenerate.
10535 * features/i386/64bit-core.c: Regenerate.
10536 * features/i386/64bit-linux.c: Regenerate.
10537 * features/i386/64bit-mpx.c: Regenerate.
10538 * features/i386/64bit-pkeys.c: Regenerate.
10539 * features/i386/64bit-segments.c: Regenerate.
10540 * features/i386/64bit-sse.c: Regenerate.
10541 * features/i386/x32-core.c: Regenerate.
10542 * features/tic6x-c6xp.c: Regenerate.
10543 * features/tic6x-core.c: Regenerate.
10544 * features/tic6x-gp.c: Regenerate.
10545 * target-descriptions.c: Use common/tdesc.h.
10546 * target-descriptions.h: Likewise.
10547
10548 2018-02-24 Tom Tromey <tom@tromey.com>
10549
10550 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10551 (try_thread_db_load_from_dir, thread_db_load_search): Use
10552 std::string.
10553 (info_auto_load_libthread_db_compare): Return bool. Change
10554 argument types.
10555 (info_auto_load_libthread_db): Use std::vector, std::string.
10556 Remove cleanups.
10557
10558 2018-02-24 Tom Tromey <tom@tromey.com>
10559
10560 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10561 std::string.
10562 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10563 std::string*.
10564 * gdbarch.c: Rebuild.
10565 * gdbarch.h: Rebuild.
10566 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10567 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10568 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10569 std::string*.
10570
10571 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10572
10573 * gdbtypes.h (sect_offset): Change type to uint64_t.
10574 (sect_offset_str): New function.
10575 * dwarf2read.c (create_addrmap_from_aranges): Use
10576 sect_offset_str.
10577 (error_check_comp_unit_head): Likewise.
10578 (create_debug_type_hash_table): Likewise.
10579 (read_cutu_die_from_dwo): Likewise.
10580 (init_cutu_and_read_dies): Likewise.
10581 (init_cutu_and_read_dies_no_follow): Likewise.
10582 (process_psymtab_comp_unit_reader): Likewise.
10583 (partial_die_parent_scope): Likewise.
10584 (peek_die_abbrev): Likewise.
10585 (process_queue): Likewise.
10586 (dwarf2_physname): Likewise.
10587 (read_namespace_alias): Likewise.
10588 (read_import_statement): Likewise.
10589 (create_dwo_cu_reader): Likewise.
10590 (create_cus_hash_table): Likewise.
10591 (lookup_dwo_cutu): Likewise.
10592 (inherit_abstract_dies): Likewise.
10593 (read_func_scope): Likewise.
10594 (read_call_site_scope): Likewise.
10595 (dwarf2_add_member_fn): Likewise.
10596 (read_common_block): Likewise.
10597 (read_module_type): Likewise.
10598 (read_typedef): Likewise.
10599 (read_subrange_type): Likewise.
10600 (load_partial_dies): Likewise.
10601 (read_partial_die): Likewise.
10602 (find_partial_die): Likewise.
10603 (read_str_index): Likewise.
10604 (dwarf2_string_attr): Likewise.
10605 (build_error_marker_type): Likewise.
10606 (lookup_die_type): Likewise.
10607 (dump_die_shallow): Likewise.
10608 (follow_die_ref): Likewise.
10609 (dwarf2_fetch_die_loc_sect_off): Likewise.
10610 (dwarf2_fetch_constant_bytes): Likewise.
10611 (follow_die_sig): Likewise.
10612 (get_signatured_type): Likewise.
10613 (get_DW_AT_signature_type): Likewise.
10614 (dwarf2_find_containing_comp_unit): Likewise.
10615 (set_die_type): Likewise.
10616
10617 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10618
10619 * arch/aarch64.c: Include "common-defs.h".
10620 * arch/amd64.c: Likewise.
10621 * arch/i386.c: Likewise.
10622
10623 2018-02-21 Tom Tromey <tom@tromey.com>
10624
10625 * value.h: (extract_field_op): Update.
10626 * eval.c (extract_field_op): Return a const char *.
10627 * expression.h (parse_expression_for_completion): Update.
10628 * completer.c (complete_expression): Update.
10629 (add_struct_fields): Make fieldname const.
10630 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10631 (mark_completion_tag, parse_exp_in_context_1): Update.
10632 (parse_expression_for_completion): Change "name" to
10633 unique_xmalloc_ptr*.
10634
10635 2018-02-21 Tom Tromey <tom@tromey.com>
10636
10637 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10638
10639 2018-02-21 Yao Qi <yao.qi@linaro.org>
10640
10641 * avr-tdep.c (avr_read_pc): Change parameter type to
10642 readable_regcache.
10643 * gdbarch.sh (read_pc): Likewise.
10644 * gdbarch.c: Re-generated.
10645 * gdbarch.h: Re-generated.
10646 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10647 readable_regcache.
10648 * ia64-tdep.c (ia64_read_pc): Likewise.
10649 * mips-tdep.c (mips_read_pc): Likewise.
10650 * spu-tdep.c (spu_read_pc): Likewise.
10651
10652 2018-02-21 Yao Qi <yao.qi@linaro.org>
10653
10654 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10655 * regcache-dump.c: New file.
10656 * regcache.c: Move register_dump to regcache-dump.c.
10657 (maintenance_print_registers): Likewise.
10658 (maintenance_print_raw_registers): Likewise.
10659 (maintenance_print_cooked_registers): Likewise.
10660 (maintenance_print_register_groups): Likewise.
10661 (maintenance_print_remote_registers): Likewise.
10662 (_initialize_regcache): Likewise.
10663 * regcache.h (register_dump): Moved from regcache.c.
10664
10665 2018-02-21 Yao Qi <yao.qi@linaro.org>
10666
10667 * regcache.c (regcache::regcache): Update.
10668 (regcache::invalidate): Move it to detached_regcache::invalidate.
10669 (get_thread_arch_aspace_regcache): Update.
10670 (regcache::raw_update): Update.
10671 (regcache::cooked_read): Remove some code.
10672 (regcache::cooked_read_value): Likewise.
10673 (regcache::raw_write): Remove assert on m_readonly_p.
10674 (regcache::raw_supply_integer): Move it to
10675 detached_regcache::raw_supply_integer.
10676 (regcache::raw_supply_zeroed): Likewise.
10677 * regcache.h (detached_regcache) <raw_supply_integer>: New
10678 declaration.
10679 <raw_supply_zeroed, invalidate>: Likewise.
10680 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10681 <invalidate>: Likewise.
10682 <m_readonly_p>: Removed.
10683
10684 2018-02-21 Yao Qi <yao.qi@linaro.org>
10685
10686 * infcmd.c (get_return_value): Let stop_regs point to
10687 get_current_regcache.
10688 * regcache.c (regcache::regcache): Remove.
10689 (register_dump_reg_buffer): New class.
10690 (regcache_print): Adjust.
10691 * regcache.h (regcache): Remove constructors.
10692
10693 2018-02-21 Yao Qi <yao.qi@linaro.org>
10694
10695 * regcache.c (class register_dump): New class.
10696 (register_dump_regcache, register_dump_none): New class.
10697 (register_dump_remote, register_dump_groups): New class.
10698 (regcache_print): Update.
10699 * regcache.h (regcache_dump_what): Move it to regcache.c.
10700 (regcache) <dump>: Remove.
10701
10702 2018-02-21 Yao Qi <yao.qi@linaro.org>
10703
10704 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10705 reg_buffer_rw *.
10706 (jit_unwind_reg_set_impl): Call raw_supply.
10707 (jit_frame_sniffer): Use reg_buffer_rw.
10708 * record-full.c (record_full_core_regbuf): Change its type.
10709 (record_full_core_open_1): Use reg_buffer_rw.
10710 (record_full_close): Likewise.
10711 (record_full_core_fetch_registers): Use regcache->raw_supply.
10712 (record_full_core_store_registers): Likewise.
10713 * regcache.c (regcache::get_register_status): Move it to
10714 reg_buffer.
10715 (regcache_raw_set_cached_value): Remove.
10716 (regcache::raw_set_cached_value): Remove.
10717 (regcache::raw_write): Call raw_supply.
10718 (regcache::raw_supply): Move it to reg_buffer_rw.
10719 * regcache.h (regcache_raw_set_cached_value): Remove.
10720 (reg_buffer_rw): New class.
10721
10722 2018-02-21 Yao Qi <yao.qi@linaro.org>
10723
10724 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10725 readonly_detached_regcache.
10726 (dummy_frame_prev_register): Use regcache->cooked_read.
10727 * frame.c (frame_save_as_regcache): Change return type.
10728 (frame_pop): Update.
10729 * frame.h (frame_save_as_regcache): Update declaration.
10730 * inferior.h (get_infcall_suspend_state_regcache): Update
10731 declaration.
10732 * infrun.c (infcall_suspend_state) <registers>: use
10733 readonly_detached_regcache.
10734 (save_infcall_suspend_state): Don't use regcache_dup.
10735 (get_infcall_suspend_state_regcache): Change return type.
10736 * linux-fork.c (struct fork_info) <savedregs>: Change to
10737 readonly_detached_regcache.
10738 <pc>: New field.
10739 (fork_save_infrun_state): Don't use regcache_dup.
10740 (info_checkpoints_command): Adjust.
10741 * mi/mi-main.c (register_changed_p): Update declaration.
10742 (mi_cmd_data_list_changed_registers): Use
10743 readonly_detached_regcache.
10744 (register_changed_p): Change parameter type to
10745 readonly_detached_regcache.
10746 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10747 readonly_detached_regcache.
10748 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10749 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10750 New.
10751 (regcache::save): Move it to reg_buffer.
10752 (regcache::restore): Change parameter type.
10753 (regcache_dup): Remove.
10754 * regcache.h (reg_buffer) <save>: New method.
10755 (readonly_detached_regcache): New class.
10756 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10757 readonly_detached_regcache.
10758 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10759
10760 2018-02-21 Yao Qi <yao.qi@linaro.org>
10761
10762 * frame.c (frame_save_as_regcache): Use regcache method save.
10763 (frame_pop): Use regcache method restore.
10764 * infrun.c (restore_infcall_suspend_state): Likewise.
10765 * linux-fork.c (fork_load_infrun_state): Likewise.
10766 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10767 save.
10768 * regcache.c (regcache_save): Remove.
10769 (regcache::restore): More asserts.
10770 (regcache_cpy): Remove.
10771 * regcache.h (regcache_save): Remove the declaration.
10772 (regcache::restore): Move from private to public.
10773 Remove the friend declaration of regcache_cpy.
10774 (regcache_cpy): Remove declaration.
10775
10776 2018-02-21 Yao Qi <yao.qi@linaro.org>
10777
10778 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10779 parameter type to 'readable_regcache *'.
10780 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10781 * arm-tdep.c (arm_neon_quad_read): Likewise.
10782 (arm_pseudo_read): Likewise.
10783 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10784 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10785 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10786 * gdbarch.c: Re-generated.
10787 * gdbarch.h: Re-generated.
10788 * gdbarch.sh (pseudo_register_read): Change parameter type to
10789 'readable_regcache *'.
10790 (pseudo_register_read_value): Likewise.
10791 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10792 (h8300_pseudo_register_read): Likewise.
10793 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10794 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10795 (i386_pseudo_register_read_into_value): Likewise.
10796 (i386_pseudo_register_read_value): Likewise.
10797 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10798 declaration.
10799 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10800 * m32c-tdep.c (m32c_raw_read): Likewise.
10801 (m32c_read_flg): Likewise.
10802 (m32c_banked_register): Likewise.
10803 (m32c_banked_read): Likewise.
10804 (m32c_sb_read): Likewise.
10805 (m32c_part_read): Likewise.
10806 (m32c_cat_read): Likewise.
10807 (m32c_r3r2r1r0_read): Likewise.
10808 (m32c_pseudo_register_read): Likewise.
10809 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10810 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10811 (mep_pseudo_cr64_read): Likewise.
10812 (mep_pseudo_register_read): Likewise.
10813 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10814 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10815 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10816 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10817 (regcache::cooked_read): Likewise.
10818 (regcache::cooked_read_value): Likewise.
10819 (regcache_cooked_read_signed):
10820 (regcache::cooked_read): Likewise.
10821 * regcache.h (readable_regcache): New class.
10822 (regcache): Inherit readable_regcache. Move some methods to
10823 readable_regcache.
10824 * rl78-tdep.c (rl78_pseudo_register_read): Change
10825 parameter type to 'readable_regcache *'.
10826 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10827 (e500_pseudo_register_read): Change parameter type to
10828 'readable_regcache *'.
10829 (dfp_pseudo_register_read): Likewise.
10830 (vsx_pseudo_register_read): Likewise.
10831 (efpr_pseudo_register_read): Likewise.
10832 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10833 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10834 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10835 (sh64_pseudo_register_read): Likewise.
10836 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10837 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10838 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10839 (spu_pseudo_register_read): Likewise.
10840 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10841 (xtensa_pseudo_register_read): Likewise.
10842
10843 2018-02-21 Yao Qi <yao.qi@linaro.org>
10844
10845 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10846 (regcache::arch): Move it to reg_buffer::arch.
10847 (regcache::register_buffer): Likewise.
10848 (regcache::assert_regnum): Likewise.
10849 (regcache::num_raw_registers): Likewise.
10850 * regcache.h (reg_buffer): New class.
10851 (regcache): Inherit reg_buffer.
10852
10853 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10854
10855 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10856 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10857
10858 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10859
10860 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10861
10862 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10863
10864 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10865 (SFILES): Remove common/*.c files.
10866 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10867 * common/common.host: Add common reference.
10868 * configure.ac: Likewise.
10869 * configure: Regenerate.
10870
10871 2018-02-16 Yao Qi <yao.qi@linaro.org>
10872
10873 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10874 (block_initialize_namespace): Use new.
10875 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10876 (dwarf2_free_objfile): Use delete.
10877 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10878 (copy_type_recursive): Use new.
10879 * gdb_obstack.h (allocate_on_obstack): New.
10880
10881 2018-02-15 Yao Qi <yao.qi@linaro.org>
10882
10883 PR gdb/22849
10884 * inferior.c (exit_inferior_1): Reset inf->control.
10885
10886 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10887
10888 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10889 declaration.
10890
10891 2018-02-14 Pedro Alves <palves@redhat.com>
10892
10893 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10894 frame_cleanup_after_sniffer on exception.
10895
10896 2018-02-14 Tom Tromey <tom@tromey.com>
10897
10898 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10899 const.
10900 (solib_bfd_open): Make pathname const.
10901 * solib.c (solib_bfd_open): Make pathname const.
10902 * solib-spu.c (spu_bfd_fopen): Make name const.
10903 (spu_bfd_open): Make pathname const.
10904 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10905 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10906
10907 2018-02-14 Tom Tromey <tom@tromey.com>
10908
10909 * symfile.c (symfile_bfd_open): Update.
10910 * source.h (openp, source_full_path_of, find_and_open_source):
10911 Change argument type to unique_xmalloc_ptr.
10912 * source.c (openp): Take a unique_xmalloc_ptr.
10913 (source_full_path_of, find_and_open_source): Likewise.
10914 (open_source_file, symtab_to_fullname): Update.
10915 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10916 unique_xmalloc_ptr.
10917 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10918 (exec_file_find): Update.
10919 * psymtab.c (psymtab_to_fullname): Update.
10920 * nto-tdep.h (nto_find_and_open_solib): Update.
10921 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10922 unique_xmalloc_ptr.
10923 * exec.c (exec_file_attach): Update.
10924 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10925 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10926
10927 2018-02-14 Tom Tromey <tom@tromey.com>
10928
10929 * solib.c: Include source.h.
10930 * nto-tdep.c: Include source.h.
10931 * mi/mi-cmd-env.c: Include source.h.
10932 * infcmd.c: Include source.h.
10933 * exec.c: Include source.h.
10934 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10935 (add_path, directory_switch, source_path, init_source_path): Move
10936 declarations...
10937 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10938 (add_path, directory_switch, source_path, init_source_path):
10939 ...here.
10940
10941 2018-02-14 Tom Tromey <tom@tromey.com>
10942
10943 * solist.h (exec_file_find, solib_find): Return
10944 unique_xmalloc_ptr.
10945 (solib_bfd_fopen): Take a const char *.
10946 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10947 (exec_file_find, solib_find): Likewise.
10948 (solib_bfd_fopen): Do not take ownership of "pathname".
10949 (solib_bfd_open): Use unique_xmalloc_ptr.
10950 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10951 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10952 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10953 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10954
10955 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10956
10957 * ada-lang.c (name_match_type_from_name): Remove reference to
10958 ada_name_for_lookup in function's documentation.
10959 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10960
10961 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10962
10963 * defs.h (enum openp_flags): New enum.
10964 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10965 Move to enum openp_flags.
10966 (openp_flags): New enum flags.
10967 (openp): Change parameter type to openp_flags.
10968 * source.c (openp): Change parameter type to openp_flags.
10969 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10970 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10971
10972 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10973
10974 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10975 per-command.
10976
10977 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10978
10979 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10980 into...
10981 (class dwarf2_queue_guard): ...the destructor of this new class.
10982 (dw2_do_instantiate_symtab): Create instance of the new class
10983 dwarf2_queue_guard, remove cleanup.
10984
10985 2018-02-09 Tom Tromey <tom@tromey.com>
10986
10987 * source.c (find_source_lines): Don't reference past the end of
10988 the vector.
10989
10990 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10991
10992 * remote.c (remote_btrace_maybe_reopen): Change error message.
10993 * btrace.c (btrace_enable): Likewise.
10994 (parse_xml_btrace): Likewise.
10995 (parse_xml_btrace_conf): Likewise.
10996
10997 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10998
10999 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11000 (linux_enable_pt, linux_enable_bts): Call
11001 diagnose_perf_event_open_fail.
11002
11003 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11004
11005 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11006 Remove parameter and change return type. Update callers. Move it.
11007 (linux_enable_bts, linux_enable_pt): Improve error message.
11008 (linux_enable_pt): Remove zero buffer size check.
11009 (linux_enable_btrace): Improve error messages. Remove NULL return
11010 check.
11011
11012 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11013
11014 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11015 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11016 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11017 (linux_supports_pt, linux_supports_btrace): Remove.
11018 (linux_enable_bts): Call cpu_supports_bts.
11019 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11020 * remote.c (remote_supports_btrace): Remove.
11021 (init_remote_ops): Remove remote_supports_btrace.
11022 * target-delegates.c: Regenerated.
11023 * target.c (target_supports_btrace): Remove.
11024 * target.h (target_ops) <to_supports_btrace>: Remove
11025 (target_supports_btrace): Remove.
11026 * x86-linux-nat.c (x86_linux_create_target): Remove
11027 linux_supports_btrace.
11028
11029 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11030
11031 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11032 btrace failed.
11033 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11034 exception and use message in own exception.
11035
11036 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11037
11038 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11039 (perf_event_pt_event_type): Use gdb_file_up.
11040 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11041 scoped_fd, and scoped_mmap.
11042
11043 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11044
11045 * common/scoped_mmap.h: New.
11046 * unittests/scoped_mmap-selftest.c: New.
11047 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11048 unittests/scoped_mmap-selftest.c.
11049
11050 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11051
11052 * common/scoped_fd.h: New.
11053 * unittests/scoped_fd-selftest.c: New.
11054 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11055 unittests/scoped_fd-selftest.c.
11056
11057 2018-02-09 Tom Tromey <tom@tromey.com>
11058
11059 * auto-load.c (auto_load_section_scripts): Use
11060 gdb::unique_xmalloc_ptr.
11061
11062 2018-02-09 Tom Tromey <tom@tromey.com>
11063
11064 * auto-load.c (execute_script_contents): Use std::string.
11065
11066 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11067
11068 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11069 Python function, rather than a new command.
11070
11071 2018-02-08 Tom Tromey <tom@tromey.com>
11072
11073 * solib.c (solib_find_1): Use std::string.
11074 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11075
11076 2018-02-08 Tom Tromey <tom@tromey.com>
11077
11078 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11079
11080 2018-02-08 Tom Tromey <tom@tromey.com>
11081
11082 * source.c (find_source_lines): Use gdb::def_vector.
11083
11084 2018-02-08 Tom Tromey <tom@tromey.com>
11085
11086 * macrocmd.c (struct temporary_macro_definition): New.
11087 (macro_define_command): Use temporary_macro_definition. Remove
11088 cleanups.
11089 (free_macro_definition_ptr): Remove.
11090
11091 2018-02-08 Tom Tromey <tom@tromey.com>
11092
11093 * macroexp.c (maybe_expand): Use std::string.
11094
11095 2018-02-08 Tom Tromey <tom@tromey.com>
11096
11097 * macroexp.c (struct macro_buffer): Add initializers for some
11098 members.
11099 (init_buffer, init_shared_buffer, free_buffer)
11100 (free_buffer_return_text): Remove.
11101 (macro_buffer): New constructors.
11102 (~macro_buffer): New destructor.
11103 (macro_buffer::set_shared): New method.
11104 (macro_buffer::resize_buffer, macro_buffer::appendc)
11105 (macro_buffer::appendmem): Now methods, not free functions.
11106 (set_token, append_tokens_without_splicing, stringify)
11107 (macro_stringify): Update.
11108 (gather_arguments): Change return type. Remove argc_p argument,
11109 add args_ptr argument. Use std::vector.
11110 (substitute_args): Remove argc argument. Accept std::vector.
11111 (expand): Update. Use std::vector.
11112 (scan, macro_expand, macro_expand_next): Update.
11113
11114 2018-02-08 Tom Tromey <tom@tromey.com>
11115
11116 * symtab.c (default_collect_symbol_completion_matches_break_on):
11117 Use unique_xmalloc_ptr.
11118 * macroscope.h: (sal_macro_scope, user_macro_scope)
11119 (default_macro_scope): Return unique_xmalloc_ptr.
11120 * macroscope.c (sal_macro_scope, user_macro_scope)
11121 (default_macro_scope): Return unique_xmalloc_ptr.
11122 * macroexp.h (macro_expand, macro_expand_once): Return
11123 unique_xmalloc_ptr.
11124 * macroexp.c (macro_expand, macro_expand_once): Return
11125 unique_xmalloc_ptr.
11126 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11127 (info_macro_command, info_macros_command): Use
11128 unique_xmalloc_ptr.
11129 * compile/compile-c-support.c (write_macro_definitions): Use
11130 unique_xmalloc_ptr.
11131 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11132
11133 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11134
11135 * value.c (value_static_field): Assign field type instead of
11136 containing type when returning an optimized out value.
11137
11138 2018-02-06 Yao Qi <yao.qi@linaro.org>
11139
11140 * ft32-tdep.c (ft32_read_pc): Remove.
11141 (ft32_write_pc): Remove.
11142 (ft32_gdbarch_init): Update.
11143 * m32r-tdep.c (m32r_read_pc): Remove.
11144 (m32r_gdbarch_init): Update.
11145 * mep-tdep.c (mep_read_pc): Remove.
11146 (mep_gdbarch_init): Update.
11147 * microblaze-tdep.c (microblaze_write_pc): Remove.
11148 (microblaze_gdbarch_init): Update.
11149 * mn10300-tdep.c (mn10300_read_pc): Remove.
11150 (mn10300_write_pc): Remove.
11151 (mn10300_gdbarch_init): Update.
11152 * moxie-tdep.c (moxie_read_pc): Remove.
11153 (moxie_write_pc): Remove.
11154 (moxie_gdbarch_init): Update.
11155
11156 2018-02-06 Yao Qi <yao.qi@linaro.org>
11157
11158 * expprint.c (print_subexp_standard): Handle
11159 OP_F77_UNDETERMINED_ARGLIST.
11160 (dump_subexp_body_standard): Likewise.
11161
11162 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11163
11164 * target-descriptions.c (tdesc_element_visitor) Add empty
11165 implementations.
11166 (tdesc_type): Move make_gdb_type from here.
11167 (tdesc_type_builtin): Likewise.
11168 (tdesc_type_vector): Likewise.
11169 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11170 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11171 (make_gdb_type_union): Likewise.
11172 (make_gdb_type_flags): Likewise.
11173 (make_gdb_type_enum): Likewise.
11174 (make_gdb_type): New function.
11175 (tdesc_register_type): Use static make_gdb_type.
11176
11177 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11178
11179 * infcmd.c (default_print_one_register_info): Align natural-format
11180 column values consistently one under another.
11181 (pad_to_column): New function.
11182
11183 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11184
11185 * dwarf2read.c (dwarf2_physname): Move commment.
11186
11187 2018-02-01 Leszek Swirski <leszeks@google.com>
11188
11189 * varobj.c (varobj_formatted_print_options): Allow recursive
11190 pretty printing if pretty printing is enabled.
11191
11192 2018-02-01 Leszek Swirski <leszeks@google.com>
11193
11194 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11195 names after a structop as a filename.
11196
11197 2018-02-01 Yao Qi <yao.qi@linaro.org>
11198
11199 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11200 (arm_record_coproc_data_proc): Likewise.
11201
11202 2018-02-01 Yao Qi <yao.qi@linaro.org>
11203
11204 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11205
11206 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11207
11208 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11209 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11210
11211 2018-01-31 Pedro Alves <palves@redhat.com>
11212
11213 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11214 * inflow.c (child_terminal_save_inferior): Wrap reference to
11215 tcgetpgrp in HAVE_TERMIOS_H.
11216 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11217 _WIN32.
11218 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11219 always iterate over all inferiors.
11220 (gdbsim_cntrl_c): Adjust.
11221 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11222
11223 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11224
11225 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11226 index type is objfile-owned if the element type is as well.
11227
11228 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11229
11230 GDB 8.1 released.
11231
11232 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11233
11234 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11235 "features/s390x-linux64.c".
11236 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11237 s390_linux32 and s390x_linux64.
11238 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11239 default tdesc.
11240 * s390-tdep.c: Include "features/s390-linux32.c" and
11241 "features/s390x-linux64.c".
11242 (s390_tdesc_valid): Add check for tdesc_has_registers.
11243 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11244 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11245 tdesc_s390x_linux64.
11246 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11247 tdesc_s390x_linux64 to...
11248 * s390-tdep.h: ...here.
11249
11250 2018-01-30 Pedro Alves <palves@redhat.com>
11251
11252 PR gdb/13211
11253 * config.in, configure: Regenerate.
11254 * configure.ac: Check for getpgid.
11255 * go32-nat.c (go32_pass_ctrlc): New.
11256 (go32_target): Install it.
11257 * inf-child.c (inf_child_target): Install
11258 child_terminal_save_inferior, child_pass_ctrlc and
11259 child_interrupt.
11260 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11261 (inf_ptrace_target): No longer install it.
11262 * infcmd.c (interrupt_target_1): Adjust.
11263 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11264 (child_interrupt): Declare.
11265 (inferior::terminal_state): New.
11266 * inflow.c (struct terminal_info): Update comments.
11267 (inferior_process_group): Delete.
11268 (terminal_is_ours): Delete.
11269 (gdb_tty_state): New.
11270 (child_terminal_init): Adjust.
11271 (is_gdb_terminal, sharing_input_terminal_1)
11272 (sharing_input_terminal): New functions.
11273 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11274 Set the process's actual process group in the foreground if
11275 possible. Handle is_ours_for_output/is_ours distinction. Don't
11276 mark terminal as the inferior's if not sharing GDB's terminal.
11277 Don't check attach_flag.
11278 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11279 pass down a target_terminal_state.
11280 (child_terminal_save_inferior): New, factored out from ...
11281 (child_terminal_ours_1): ... this. Handle
11282 target_terminal_state::is_ours_for_output.
11283 (child_interrupt, child_pass_ctrlc): New.
11284 (inflow_inferior_exit): Clear the inferior's terminal_state.
11285 (copy_terminal_info): Copy the inferior's terminal state.
11286 (_initialize_inflow): Remove reference to terminal_is_ours.
11287 * inflow.h (inferior_process_group): Delete.
11288 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11289 * procfs.c (procfs_target): Don't install procfs_interrupt.
11290 (procfs_interrupt): Delete.
11291 * remote.c (remote_serial_quit_handler): Adjust.
11292 (remote_interrupt): Remove ptid parameter. Adjust.
11293 * target-delegates.c: Regenerate.
11294 * target.c: Include "terminal.h".
11295 (target_terminal::terminal_state): Rename to ...
11296 (target_terminal::m_terminal_state): ... this.
11297 (target_terminal::init): Adjust.
11298 (target_terminal::inferior): Adjust to per-inferior
11299 terminal_state.
11300 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11301 (target_terminal::ours, target_terminal::ours_for_output): Use
11302 target_terminal_is_ours_kind.
11303 (target_interrupt): Remove ptid parameter. Adjust.
11304 (default_target_pass_ctrlc): Adjust.
11305 * target.h (target_ops::to_terminal_save_inferior): New field.
11306 (target_ops::to_interrupt): Remove ptid_t parameter.
11307 (target_interrupt): Remove ptid_t parameter. Update comment.
11308 (target_pass_ctrlc): Update comment.
11309 * target/target.h (target_terminal_state): New scoped enum,
11310 factored out of ...
11311 (target_terminal::terminal_state): ... here.
11312 (target_terminal::inferior): Update comments.
11313 (target_terminal::restore_inferior): New.
11314 (target_terminal::is_inferior, target_terminal::is_ours)
11315 (target_terminal::is_ours_for_output): Adjust.
11316 (target_terminal::scoped_restore_terminal_state): Adjust to
11317 rename, and call restore_inferior() instead of inferior().
11318 (target_terminal::scoped_restore_terminal_state::m_state): Change
11319 type.
11320 (target_terminal::terminal_state): Rename to ...
11321 (target_terminal::m_terminal_state): ... this and change type.
11322
11323 2018-01-30 Pedro Alves <palves@redhat.com>
11324
11325 * linux-nat.c (wait_for_signal): New function.
11326 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11327 directly.
11328 (async_terminal_is_ours)
11329 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11330 (linux_nat_add_target): Don't override
11331 to_terminal_inferior/to_terminal_ours.
11332
11333 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11334
11335 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11336
11337 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11338
11339 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11340 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11341 dwarf2_per_objfile_free here.
11342 (dwarf2_per_objfile_free): Remove.
11343 (_initialize_dwarf2_read): Don't register
11344 dwarf2_per_objfile_free as a registry cleanup.
11345
11346 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11347
11348 Avoid compilation errors in MinGW native builds
11349
11350 The error is triggered by including python-internal.h, and the
11351 error message is:
11352
11353 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11354 from build-gnulib/import/math.h:27,
11355 from d:/usr/Python26/include/pyport.h:235,
11356 from d:/usr/Python26/include/Python.h:58,
11357 from python/python-internal.h:94,
11358 from python/py-arch.c:24:
11359 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11360 using ::hypot;
11361 ^~~~~
11362
11363 This happens because Python headers define 'hypot' to expand t
11364 '_hypot' in the Windows builds.
11365 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11366 'hypoth'. This avoids a compilation error.
11367
11368 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11369
11370 * MAINTAINERS (Write After Approval): Fix ordering.
11371
11372 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11373
11374 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11375
11376 2018-01-26 Alan Modra <amodra@gmail.com>
11377
11378 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11379 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11380 Remove nop. Make const. Comment.
11381 (powerpc32_plt_stub_so_2): New.
11382 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11383 Correct count. Update uses.
11384 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11385 Move common code reading PLT entry word. Correct
11386 powerpc32_plt_stub PLT address calculation.
11387 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11388 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11389 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11390 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11391 (ppc64_standard_linkage8): Likewise.
11392 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11393 Correct insns description.
11394 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11395
11396 2018-01-24 Pedro Alves <palves@redhat.com>
11397
11398 GCC PR libstdc++/83906
11399 * gdbtypes.c (operator==(const dynamic_prop &,
11400 const dynamic_prop &)): New.
11401 (operator==(const range_bounds &, const range_bounds &)): New.
11402 (check_types_equal): Use them instead of memcmp.
11403 * gdbtypes.h (operator==(const dynamic_prop &,
11404 const dynamic_prop &)): Declare.
11405 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11406 (operator==(const range_bounds &, const range_bounds &)): Declare.
11407 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11408
11409 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11410
11411 * s390-linux-tdep.c (s390_record_address_mask)
11412 (s390_record_calc_disp_common, s390_record_calc_disp)
11413 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11414 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11415 (s390_process_record): Move to s390-tdep.c.
11416 (s390_linux_init_abi_any): Adjust.
11417 * s390-tdep.c (s390_record_address_mask)
11418 (s390_record_calc_disp_common, s390_record_calc_disp)
11419 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11420 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11421 (s390_process_record): Moved from s390-linux-tdep.c
11422 (s390_gdbarch_init): Adjust.
11423
11424 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11425
11426 * s390-linux-nat.c (s390-tdep.h): New include.
11427 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11428 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11429 (ALLDEPFILES): Add s390-tdep.c.
11430 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11431 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11432 * s390-tdep.h: ...this. New file.
11433 * s390-linux-tdep.c (s390-tdep.h): New include.
11434 (_initialize_s390_tdep): Rename to...
11435 (_initialize_s390_linux_tdep): ...this and adjust.
11436 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11437 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11438 s390-tdep.h.
11439 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11440 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11441 (s390_is_partial_instruction, s390_software_single_step)
11442 (is_non_branch_ril, s390_displaced_step_copy_insn)
11443 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11444 (s390_prologue_data, s390_addr, s390_store, s390_load)
11445 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11446 (s390_register_call_saved, s390_guess_tracepoint_registers)
11447 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11448 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11449 (s390_pseudo_register_name, s390_pseudo_register_type)
11450 (s390_pseudo_register_read, s390_pseudo_register_write)
11451 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11452 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11453 (s390_addr_bits_remove, s390_address_class_type_flags)
11454 (s390_address_class_type_flags_to_name)
11455 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11456 (s390_function_arg_float, s390_function_arg_vector)
11457 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11458 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11459 (s390_frame_align, s390_register_return_value, s390_return_value)
11460 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11461 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11462 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11463 (s390_trad_frame_prev_register, s390_unwind_cache)
11464 (s390_prologue_frame_unwind_cache)
11465 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11466 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11467 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11468 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11469 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11470 (s390_frame_base_address, s390_local_base_address)
11471 (s390_frame_base, s390_gcc_target_options)
11472 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11473 (s390_validate_reg_range, s390_tdesc_valid)
11474 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11475 * s390-tdep.c: ...this. New file.
11476
11477 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11478
11479 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11480 (s390_process_record, s390_gdbarch_tdep_alloc)
11481 (s390_linux_init_abi_any): Use/set new hook.
11482
11483 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11484
11485 * s390-linux-tdep.c (osabi.h): New include.
11486 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11487 (s390_linux_init_abi_any): New functions.
11488 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11489
11490 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11491
11492 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11493 tdesc_has_registers check
11494
11495 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11496
11497 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11498 (s390_validate_reg_range): New macro.
11499 (s390_gdbarch_init): Adjust.
11500
11501 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11502
11503 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11504 (s390_gdbarch_tdep_alloc): Adjust.
11505 (s390_gdbarch_init): Adjust.
11506
11507 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11508
11509 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11510 <have_tdb>: Change type to bool.
11511 (s390_gdbarch_tdep_alloc): Adjust.
11512 (s390_gdbarch_init): Adjust.
11513
11514 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11515
11516 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11517 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11518 (s390_gdbarch_tdep_alloc): New function.
11519 (s390_gdbarch_init): Allocate tdep at start and use its fields
11520 instead of separate variables.
11521
11522 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11523
11524 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11525 when looking for cached gdbarch and add comment for remaining.
11526
11527 2018-01-22 Pedro Alves <palves@redhat.com>
11528 Sergio Durigan Junior <sergiodj@redhat.com>
11529
11530 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11531 case.
11532
11533 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11534
11535 * MAINTAINERS: Update my company e-mail address.
11536
11537 2018-01-22 Yao Qi <yao.qi@linaro.org>
11538
11539 * regcache.c (cooked_write_test): New function.
11540 (_initialize_regcache): Register the test.
11541
11542 2018-01-22 Yao Qi <yao.qi@linaro.org>
11543
11544 * ia64-tdep.c (ia64_pseudo_register_read): Call
11545 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11546 * m32c-tdep.c (m32c_cat_read): Likewise.
11547 (m32c_r3r2r1r0_read): Likewise.
11548 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11549 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11550
11551 2018-01-22 Yao Qi <yao.qi@linaro.org>
11552
11553 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11554 method raw_read instead of regcache_raw_read.
11555 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11556 * arm-tdep.c (arm_neon_quad_read): Likewise.
11557 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11558 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11559 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11560 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11561 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11562 (i386_pseudo_register_read_into_value): Likewise.
11563 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11564 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11565 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11566 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11567 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11568 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11569 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11570 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11571 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11572
11573 2018-01-22 Yao Qi <yao.qi@linaro.org>
11574
11575 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11576 * configure.tgt: Remove target mt.
11577 * mt-tdep.c: Remove.
11578 * regcache.c (cooked_read_test): Remove the check for mt.
11579
11580 2018-01-22 Yao Qi <yao.qi@linaro.org>
11581
11582 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11583 instead of gdbarch_pseudo_register_read_value.
11584
11585 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11586
11587 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11588 language is Ada.
11589
11590 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11591
11592 * linespec.c (create_sals_line_offset): Remove code that preserved
11593 the symtab_and_line's line number.
11594
11595 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11596
11597 * varobj.c (varobj_create): Don't set valid_block when creating a
11598 floating varobj.
11599
11600 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11601
11602 * varobj.c (varobj_create): Remove out of date comment.
11603
11604 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11605
11606 PR mi/20395
11607 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11608 updating innermost block.
11609 * parse.c (innermost_block_tracker::update): Take extra type
11610 parameter, and check types match before updating innermost block.
11611 (write_dollar_variable): Update innermost block for registers.
11612 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11613 (innermost_block_tracker::innermost_block_tracker): Initialise
11614 m_types member.
11615 (innermost_block_tracker::reset): Take type parameter.
11616 (innermost_block_tracker::update): Take type parameter, and pass
11617 type through as needed.
11618 (innermost_block_tracker::m_types): New member.
11619 * varobj.c (varobj_create): Pass type when reseting innermost
11620 block.
11621
11622 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11623
11624 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11625 * ada-lang.c (resolve_subexp): Likewise.
11626 * breakpoint.c (set_breakpoint_condition) Likewise.
11627 (watch_command_1) Likewise.
11628 * c-exp.y (variable): Likewise.
11629 * d-exp.y (PrimaryExpression): Likewise.
11630 * f-exp.y (variable): Likewise.
11631 * go-exp.y (variable): Likewise.
11632 * m2-exp.y (variable): Likewise.
11633 * objfiles.c (objfile::~objfile): Likewise.
11634 * p-exp.y (variable): Likewise.
11635 * parse.c (innermost_block): Change type.
11636 * parser-defs.h (class innermost_block_tracker): New.
11637 (innermost_block): Change to innermost_block_tracker.
11638 * printcmd.c (display_command): Switch to innermost_block API.
11639 (do_one_display): Likewise.
11640 * rust-exp.y (do_one_display): Likewise.
11641 * symfile.c (clear_symtab_users): Likewise.
11642 * varobj.c (varobj_create): Switch to innermost_block API, replace
11643 use of innermost_block with block stored on varobj object.
11644
11645 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11646
11647 * expression.h (innermost_block): Remove declaration.
11648 * varobj.c: Add 'parser-defs.h' include.
11649
11650 2018-01-19 Tom Tromey <tom@tromey.com>
11651
11652 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11653 symbols in the static and global blocks.
11654
11655 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11656
11657 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11658 gdb_ptrace.h, and move including gdb_wait.h ...
11659 * nat/linux-ptrace.h: ... to here.
11660
11661 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11662
11663 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11664 inf_ptrace_detach_success.
11665 (inf_ptrace_detach_success): Add inferior parameter, use it
11666 instead of inferior_ptid, pass it to detach_inferior.
11667 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11668 parameter.
11669 * inferior.c (detach_inferior): Add overload that takes an
11670 inferior object.
11671 * inferior.h (detach_inferior): Likewise.
11672 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11673 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11674 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11675
11676 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11677
11678 * target.h (struct target_ops) <to_detach>: Add inferior
11679 parameter.
11680 (target_detach): Likewise.
11681 * target.c (dispose_inferior): Pass inferior down.
11682 (target_detach): Pass inferior down. Assert that it is equal to
11683 the current inferior.
11684 * aix-thread.c (aix_thread_detach): Pass inferior down.
11685 * corefile.c (core_file_command): Pass current_inferior() down.
11686 * corelow.c (core_detach): Add inferior parameter.
11687 * darwin-nat.c (darwin_detach): Likewise.
11688 * gnu-nat.c (gnu_detach): Likewise.
11689 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11690 * infcmd.c (detach_command): Pass current_inferior() down to
11691 target_detach.
11692 * infrun.c (follow_fork_inferior): Pass parent_inf to
11693 target_detach.
11694 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11695 target_detach.
11696 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11697 * linux-thread-db.c (thread_db_detach): Likewise.
11698 * nto-procfs.c (procfs_detach): Likewise.
11699 * procfs.c (procfs_detach): Likewise.
11700 * record.c (record_detach): Likewise.
11701 * record.h (struct inferior): Forward-declare.
11702 (record_detach): Add inferior parameter.
11703 * remote-sim.c (gdbsim_detach): Likewise.
11704 * remote.c (remote_detach_1): Likewise.
11705 (remote_detach): Likewise.
11706 (extended_remote_detach): Likewise.
11707 * sol-thread.c (sol_thread_detach): Likewise.
11708 * target-debug.h (target_debug_print_inferior_p): New macro.
11709 * target-delegates.c: Re-generate.
11710 * top.c (kill_or_detach): Pass inferior down to target_detach.
11711 * windows-nat.c (windows_detach): Add inferior parameter.
11712
11713 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11714
11715 * target.h (struct target_ops) <to_detach>: Remove args
11716 parameter.
11717 (target_detach): Likewise.
11718 * target.c (dispose_inferior): Adjust.
11719 (target_detach): Remove args parameter, adjust.
11720 * aix-thread.c (aix_thread_detach): Adjust.
11721 * corefile.c (core_file_command): Adjust.
11722 * corelow.c (core_detach): Adjust.
11723 * darwin-nat.c (darwin_detach): Adjust.
11724 * gnu-nat.c (gnu_detach): Adjust.
11725 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11726 * infcmd.c (detach_command): Adjust
11727 * infrun.c (follow_fork_inferior): Adjust.
11728 (handle_vfork_child_exec_or_exit): Adjust.
11729 * linux-fork.c (linux_fork_detach): Remove args parameter.
11730 * linux-fork.h (linux_fork_detach): Likewise.
11731 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11732 * linux-thread-db.c (thread_db_detach): Likewise.
11733 * nto-procfs.c (procfs_detach): Likewise.
11734 * procfs.c (procfs_detach): Likewise.
11735 (do_detach): Remove signo parameter.
11736 * record.c (record_detach): Remove args parameter.
11737 * record.h (record_detach): Likewise.
11738 * remote-sim.c (gdbsim_detach): Likewise.
11739 * remote.c (remote_detach_1): Likewise.
11740 (remote_detach): Likewise.
11741 (extended_remote_detach): Likewise.
11742 * sol-thread.c (sol_thread_detach): Likewise.
11743 * target-delegates.c: Re-generate.
11744 * top.c (struct qt_args) <args>: Remove field.
11745 (kill_or_detach): Don't pass args.
11746 (quit_force): Don't set args.
11747 * windows-nat.c (windows_detach): Remove args parameter.
11748
11749 2018-01-19 Yao Qi <yao.qi@linaro.org>
11750
11751 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11752 (arm_linux_init_abi): Install it.
11753
11754 2018-01-19 Yao Qi <yao.qi@linaro.org>
11755
11756 * osabi.c (gdb_osabi_names): Extend the regexp for
11757 arm-linux-gnueabihf.
11758
11759 2018-01-18 Yao Qi <yao.qi@linaro.org>
11760
11761 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11762 m_abbrevs.
11763 (abbrev_table::add_abbrev): Update.
11764 (abbrev_table::lookup_abbrev): Update.
11765
11766 2018-01-18 Yao Qi <yao.qi@linaro.org>
11767
11768 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11769
11770 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11771
11772 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11773 to "std::string".
11774
11775 2018-01-17 Tom Tromey <tom@tromey.com>
11776
11777 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11778
11779 2018-01-17 Tom Tromey <tom@tromey.com>
11780
11781 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11782 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11783 (create_array_type_with_stride): Update.
11784 * dwarf2read.c (set_die_type): Update.
11785
11786 2018-01-17 Tom Tromey <tom@tromey.com>
11787
11788 * dwarf2read.c (delayed_method_info): Remove typedef.
11789 (dwarf2_cu::method_info): Now a std::vector.
11790 (add_to_method_list): Update.
11791 (free_delayed_list): Remove.
11792 (compute_delayed_physnames): Update.
11793 (process_full_comp_unit, process_full_type_unit): Clear the method
11794 list. Remove cleanups.
11795 (psymtab_include_file_name): Add name_holder parameter. Use
11796 unique_xmalloc_ptr.
11797 (dwarf_decode_lines): Update.
11798
11799 2018-01-17 Tom Tromey <tom@tromey.com>
11800 Simon Marchi <simon.marchi@ericsson.com>
11801
11802 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11803 (dwarf2_per_objfile::free_cached_comp_units)
11804 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11805 (init_cutu_and_read_dies_no_follow): Update.
11806 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11807 (dwarf2_cu::~dwarf2_cu): New.
11808 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11809 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11810
11811 2018-01-17 Tom Tromey <tom@tromey.com>
11812 Simon Marchi <simon.marchi@ericsson.com>
11813
11814 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11815 (struct die_reader_specs) <abbrev_table>: New member.
11816 (struct abbrev_table): Add constructor.
11817 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11818 <abbrev_obstack>: Now an auto_obstack.
11819 (abbrev_table_up): New typedef.
11820 (init_cu_die_reader): Add abbrev_table parameter.
11821 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11822 Add result_dwo_abbrev_table.
11823 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11824 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11825 Update.
11826 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11827 parameter.
11828 (skip_children): Update.
11829 (abbrev_table::alloc_abbrev): Rename from
11830 abbrev_table_alloc_abbrev.
11831 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11832 (abbrev_table::lookup_abbrev): Rename from
11833 abbrev_table_lookup_abbrev.
11834 (abbrev_table_read_table): Return abbrev_table_up.
11835 (abbrev_table_free, abbrev_table_free_cleanup)
11836 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11837 (load_partial_dies): Update.
11838
11839 2018-01-17 Tom Tromey <tom@tromey.com>
11840
11841 * dwarf2read.c (dwarf2_compute_name): Update comment.
11842 (read_func_scope, read_variable): Update.
11843 (new_symbol): Remove.
11844 (new_symbol_full): Rename to new_symbol.
11845
11846 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11847
11848 PR gdb/16577
11849 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11850 a warning instead of throwing an error, set section size to 0 and return
11851 NULL.
11852 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11853
11854 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11855
11856 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11857 std::string.
11858 (linux_ptrace_attach_fail_reason_string): Likewise.
11859 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11860 Likewise.
11861 (linux_ptrace_attach_fail_reason_string): Likewise.
11862 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11863
11864 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11865
11866 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11867
11868 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11869
11870 PR gdb/21559
11871 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11872 checking for fs_base/gs_base fields in struct user_regs_struct.
11873 * configure: Regenerate.
11874
11875 2018-01-17 Yao Qi <yao.qi@linaro.org>
11876
11877 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11878 function.
11879 (aarch64_linux_init_abi): Install it to gdbarch hook
11880 gcc_target_options.
11881
11882 2018-01-15 Pedro Alves <palves@redhat.com>
11883
11884 * common/signals-state-save-restore.c
11885 (save_original_signals_state): Fix typos.
11886
11887 2017-01-12 Tom Tromey <tom@tromey.com>
11888 Sergio Durigan Junior <sergiodj@redhat.com>
11889
11890 * Makefile.in (install-only): Install gdb-add-index.
11891
11892 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11893
11894 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11895
11896 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11897
11898 * infrun.c (keep_going_pass_signal): Clear step-over info when
11899 insert_breakpoints fails.
11900
11901 2018-01-11 Pedro Alves <palves@redhat.com>
11902
11903 PR gdb/22583
11904 * infrun.c (resume): Rename to ...
11905 (resume_1): ... this.
11906 (resume): Reimplement as wrapper around resume_1.
11907
11908 2018-01-11 Pedro Alves <palves@redhat.com>
11909
11910 PR remote/22597
11911 * remote.c (remote_parse_stop_reply): Default to the last-set
11912 general thread instead of to 'magic_null_ptid'.
11913
11914 2018-01-10 Pedro Alves <palves@redhat.com>
11915
11916 * language.h (language_get_symbol_name_matcher): Rename ...
11917 (get_symbol_name_matcher): ... this.
11918 * language.c (language_get_symbol_name_matcher): Ditto.
11919 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11920 callers adjusted.
11921
11922 2018-01-10 Pedro Alves <palves@redhat.com>
11923
11924 PR gdb/22670
11925 * dwarf2read.c
11926 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11927 Adjust to use language_get_symbol_name_matcher instead of
11928 language_defn::la_get_symbol_name_matcher.
11929 * language.c (language_get_symbol_name_matcher): If in Ada mode
11930 and the lookup name is a verbatim match, return Ada's matcher.
11931 * language.h (language_get_symbol_name_matcher): Adjust comment.
11932 (ada_lookup_name_info::verbatim_p):: New method.
11933
11934 2018-01-10 Pedro Alves <palves@redhat.com>
11935
11936 PR gdb/22670
11937 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11938 minsym's language is language_auto or language_cplus, pass down
11939 language_ada instead.
11940 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11941
11942 2018-01-10 Pedro Alves <palves@redhat.com>
11943
11944 PR gdb/22670
11945 * minsyms.c (linkage_name_str): New function.
11946 (iterate_over_minimal_symbols): Use it.
11947
11948 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11949
11950 * NEWS: Document that 'info proc' now works on FreeBSD.
11951
11952 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11953
11954 * configure.ac: Check for kinfo_getfile in libutil.
11955 * configure: Regenerate.
11956 * config.in: Regenerate.
11957 * fbsd-nat.c: Include "fbsd-tdep.h".
11958 (fbsd_fetch_cmdline): New.
11959 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11960 rather than calling error.
11961 (fbsd_info_proc): New.
11962 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11963 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11964 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11965
11966 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11967
11968 * fbsd-nat.c (struct free_deleter): Remove.
11969 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11970
11971 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11972
11973 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11974 NULL for an empty pathname.
11975
11976 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11977
11978 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11979 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11980 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11981 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11982 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11983 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11984 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11985 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11986 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11987 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11988 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11989 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11990 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11991 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11992 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11993
11994 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11995
11996 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11997 (gnu_xfer_auxv): New function.
11998 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11999 TARGET_OBJECT_AUXV.
12000
12001 2018-01-08 Yao Qi <yao.qi@linaro.org>
12002 Simon Marchi <simon.marchi@ericsson.com>
12003
12004 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12005 common/selftest.c.
12006 (COMMON_OBS): Remove selftest.o.
12007 * configure.ac: Append selftest-arch.c and common/selftest.c to
12008 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12009 * configure: Re-generated.
12010 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12011 GDB_SELF_TEST.
12012 (maintenance_info_selftests): Likewise.
12013
12014 2018-01-08 Xavier Roirand <roirand@adacore.com>
12015
12016 * ada-valprint.c (val_print_packed_array_elements): Use
12017 proper number of elements when printing an array indexed
12018 by an enumeration type.
12019
12020 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12021
12022 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12023 (dw2_get_file_names_reader): Adjust.
12024 (lookup_dwo_signatured_type): Adjust.
12025 (lookup_dwp_signatured_type): Adjust.
12026 (lookup_signatured_type): Adjust.
12027 (create_type_unit_group): Adjust.
12028 (get_type_unit_group): Adjust.
12029 (process_psymtab_comp_unit_reader): Adjust.
12030 (build_type_psymtabs_reader): Adjust.
12031 (scan_partial_symbols): Adjust.
12032 (add_partial_symbol): Adjust.
12033 (add_partial_subprogram): Adjust.
12034 (peek_die_abbrev): Adjust.
12035 (fixup_go_packaging): Adjust.
12036 (process_imported_unit_die): Adjust.
12037 (dwarf2_compute_name): Adjust.
12038 (dwarf2_physname): Adjust.
12039 (read_import_statement): Adjust.
12040 (handle_DW_AT_stmt_list): Adjust.
12041 (read_file_scope): Adjust.
12042 (read_func_scope): Adjust.
12043 (read_lexical_block_scope): Adjust.
12044 (read_call_site_scope): Adjust.
12045 (read_variable): Adjust.
12046 (dwarf2_rnglists_process): Adjust.
12047 (dwarf2_ranges_process): Adjust.
12048 (dwarf2_ranges_read): Adjust.
12049 (dwarf2_get_pc_bounds): Adjust.
12050 (dwarf2_record_block_ranges): Adjust.
12051 (dwarf2_add_field): Adjust.
12052 (dwarf2_add_member_fn): Adjust.
12053 (read_structure_type): Adjust.
12054 (process_structure_scope): Adjust.
12055 (read_enumeration_type): Adjust.
12056 (read_array_type): Adjust.
12057 (mark_common_block_symbol_computed): Adjust.
12058 (read_common_block): Adjust.
12059 (read_namespace_type): Adjust.
12060 (read_namespace): Adjust.
12061 (read_module_type): Adjust.
12062 (read_tag_pointer_type): Adjust.
12063 (read_tag_ptr_to_member_type): Adjust.
12064 (read_tag_string_type): Adjust.
12065 (read_subroutine_type): Adjust.
12066 (read_typedef): Adjust.
12067 (read_base_type): Adjust.
12068 (attr_to_dynamic_prop): Adjust.
12069 (read_subrange_type): Adjust.
12070 (read_unspecified_type): Adjust.
12071 (dwarf2_read_abbrevs): Adjust.
12072 (load_partial_dies): Adjust.
12073 (read_partial_die): Adjust.
12074 (find_partial_die): Adjust.
12075 (guess_partial_die_structure_name): Adjust.
12076 (fixup_partial_die): Adjust.
12077 (read_attribute_value): Adjust.
12078 (read_addr_index): Adjust.
12079 (read_addr_index_from_leb128): Adjust.
12080 (read_str_index): Adjust.
12081 (dwarf2_string_attr): Adjust.
12082 (get_debug_line_section): Adjust.
12083 (dwarf_decode_line_header): Adjust.
12084 (lnp_state_machine::check_line_address): Adjust.
12085 (dwarf_decode_lines_1): Adjust.
12086 (dwarf_decode_lines): Adjust.
12087 (dwarf2_start_symtab): Adjust.
12088 (var_decode_location): Adjust.
12089 (new_symbol_full): Adjust.
12090 (dwarf2_const_value_data): Adjust.
12091 (dwarf2_const_value_attr): Adjust.
12092 (dwarf2_const_value): Adjust.
12093 (die_type): Adjust.
12094 (die_containing_type): Adjust.
12095 (build_error_marker_type): Adjust.
12096 (lookup_die_type): Adjust.
12097 (guess_full_die_structure_name): Adjust.
12098 (anonymous_struct_prefix): Adjust.
12099 (determine_prefix): Adjust.
12100 (dwarf2_name): Adjust.
12101 (follow_die_ref_or_sig): Adjust.
12102 (follow_die_offset): Adjust.
12103 (follow_die_ref): Adjust.
12104 (follow_die_sig_1): Adjust.
12105 (follow_die_sig): Adjust.
12106 (get_signatured_type): Adjust.
12107 (get_DW_AT_signature_type): Adjust.
12108 (decode_locdesc): Adjust.
12109 (dwarf_decode_macros): Adjust.
12110 (cu_debug_loc_section): Adjust.
12111 (fill_in_loclist_baton): Adjust.
12112 (dwarf2_symbol_mark_computed): Adjust.
12113 (init_one_comp_unit): Don't assign
12114 dwarf2_cu::dwarf2_per_objfile.
12115 (set_die_type): Adjust.
12116
12117 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12118
12119 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12120 <dwarf2_per_objfile>: New field.
12121 (dwarf2_per_objfile): Remove global.
12122 (get_dwarf2_per_objfile): New function.
12123 (set_dwarf2_per_objfile): New function.
12124 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12125 dwarf2_per_objfile.
12126 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12127 (read_abbrev_offset): Likewise.
12128 (read_indirect_string): Likewise.
12129 (read_indirect_line_string): Likewise.
12130 (read_indirect_string_at_offset): Likewise.
12131 (read_indirect_string_from_dwz): Likewise.
12132 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12133 dwarf2_per_objfile.
12134 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12135 (create_all_comp_units): Change objfile parameter to
12136 dwarf2_per_objfile.
12137 (create_all_type_units): Likewise.
12138 (process_queue): Add dwarf2_per_objfile parameter.
12139 (read_and_check_comp_unit_head): Likewise.
12140 (lookup_dwo_unit_in_dwp): Likewise.
12141 (get_dwp_file): Likewise.
12142 (process_cu_includes): Likewise.
12143 (struct free_dwo_file_cleanup_data): New struct.
12144 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12145 set_dwarf2_per_objfile.
12146 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12147 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12148 context, adjust calls.
12149 (dw2_instantiate_symtab): Likewise.
12150 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12151 (dw2_get_cu): Likewise.
12152 (create_cu_from_index_list): Change objfile parameter to
12153 dwarf2_per_objfile.
12154 (create_cus_from_index_list): Get dwarf2_per_objfile from
12155 context, adjust calls.
12156 (create_cus_from_index): Likewise.
12157 (create_signatured_type_table_from_index): Change objfile
12158 parameter to dwarf2_per_objfile.
12159 (create_signatured_type_table_from_debug_names): Change objfile
12160 parameter to dwarf2_per_objfile.
12161 (create_addrmap_from_index): Likewise.
12162 (create_addrmap_from_aranges): Likewise.
12163 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12164 (dw2_setup): Remove.
12165 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12166 context.
12167 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12168 get_dwarf2_per_objfile.
12169 (dw2_forget_cached_source_info): Likewise.
12170 (dw2_map_symtabs_matching_filename): Likewise.
12171 (struct dw2_symtab_iterator) <index>: Remove.
12172 <dwarf2_per_objfile>: New field.
12173 (dw2_symtab_iter_init): Replace index parameter with
12174 dwarf2_per_objfile.
12175 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12176 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12177 (dw2_print_stats): Likewise.
12178 (dw2_dump): Likewise.
12179 (dw2_expand_symtabs_for_function): Likewise.
12180 (dw2_expand_all_symtabs): Likewise.
12181 (dw2_expand_symtabs_with_fullname): Likewise.
12182 (dw2_expand_marked_cus): Replace index and objfile parameters
12183 with dwarf2_per_objfile.
12184 (dw_expand_symtabs_matching_file_matcher): Add
12185 dwarf2_per_objfile parameter and adjust calls.
12186 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12187 adjust calls.
12188 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12189 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12190 adjust calls.
12191 (create_cus_from_debug_names_list): Replace objfile parameter
12192 with dwarf2_per_objfile and adjust calls.
12193 (create_cus_from_debug_names): Likewise.
12194 (dwarf2_read_debug_names): Likewise.
12195 (mapped_debug_names::namei_to_name): Adjust call.
12196 (dw2_debug_names_iterator::next): Likewise.
12197 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12198 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12199 (dw2_debug_names_dump): Likewise.
12200 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12201 (dw2_debug_names_expand_symtabs_matching): Likewise.
12202 (dwarf2_initialize_objfile): Likewise.
12203 (dwarf2_build_psymtabs): Likewise.
12204 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12205 this_cu.
12206 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12207 (read_and_check_comp_unit_head): Likewise.
12208 (read_abbrev_offset): Likewise.
12209 (create_debug_type_hash_table): Likewise.
12210 (create_debug_types_hash_table): Likewise.
12211 (create_all_type_units): Replace objfile parameter with
12212 dwarf2_per_objfile.
12213 (add_type_unit): Add dwarf2_per_objfile parameter.
12214 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12215 with dwarf2_per_objfile.
12216 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12217 (lookup_dwp_signatured_type): Likewise.
12218 (lookup_signatured_type): Likewise.
12219 (read_cutu_die_from_dwo): Likewise.
12220 (init_tu_and_read_dwo_dies): Likewise.
12221 (init_cutu_and_read_dies): Likewise.
12222 (init_cutu_and_read_dies_no_follow): Likewise.
12223 (allocate_type_unit_groups_table): Add objfile parameter.
12224 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12225 (get_type_unit_group): Likewise.
12226 (process_psymtab_comp_unit): Update call.
12227 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12228 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12229 (print_tu_stats): Likewise.
12230 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12231 in void* parameter.
12232 (build_type_psymtabs): Change objfile parameter to
12233 dwarf2_per_objfile.
12234 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12235 passed in void* parameter.
12236 (process_skeletonless_type_units): Change objfile parameter to
12237 dwarf2_per_objfile.
12238 (set_partial_user): Likewise.
12239 (dwarf2_build_psymtabs_hard): Likewise.
12240 (read_comp_units_from_section): Likewise.
12241 (create_all_comp_units): Likewise.
12242 (scan_partial_symbols): Update calls.
12243 (add_partial_symbol): Likewise.
12244 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12245 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12246 (process_queue): Add dwarf2_per_objfile parameter.
12247 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12248 (compute_compunit_symtab_includes): Likewise.
12249 (process_cu_includes): Add dwarf2_per_objfile parameter.
12250 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12251 (process_full_type_unit): Likewise.
12252 (process_imported_unit_die): Update call.
12253 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12254 (read_file_scope): Likewise.
12255 (allocate_dwo_file_hash_table): Add objfile parameter.
12256 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12257 (create_cus_hash_table): Likewise.
12258 (create_dwp_hash_table): Likewise.
12259 (create_dwo_unit_in_dwp_v1): Likewise.
12260 (create_dwp_v2_section): Likewise.
12261 (create_dwo_unit_in_dwp_v2): Likewise.
12262 (lookup_dwo_unit_in_dwp): Likewise.
12263 (try_open_dwop_file): Likewise.
12264 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12265 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12266 cleanup to include a reference to dwarf2_per_objfile.
12267 (open_dwp_file): Add dwarf2_per_objfile parameter.
12268 (open_and_init_dwp_file): Likewise.
12269 (get_dwp_file): Likewise.
12270 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12271 (queue_and_load_all_dwo_tus): Update call.
12272 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12273 data.
12274 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12275 (dwarf2_ranges_process): Likewise.
12276 (dwarf2_get_pc_bounds): Likewise.
12277 (mark_common_block_symbol_computed): Likewise.
12278 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12279 (dwarf2_read_abbrevs): Update call.
12280 (read_partial_die): Use dwarf2_per_objfile from cu.
12281 (find_partial_die): Likewise.
12282 (fixup_partial_die): Likewise.
12283 (read_attribute_value): Likewise.
12284 (read_indirect_string_at_offset_from): Add objfile parameter.
12285 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12286 parameter.
12287 (read_indirect_string_from_dwz): Add objfile parameter.
12288 (read_indirect_string): Add objfile parameter.
12289 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12290 (read_addr_index): Use dwarf2_per_objfile from cu.
12291 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12292 call dw2_setup.
12293 (read_str_index): Use dwarf2_per_objfile from cu.
12294 (get_debug_line_section): Likewise.
12295 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12296 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12297 (new_symbol_full): Use dwarf2_per_objfile from cu.
12298 (build_error_marker_type): Likewise.
12299 (lookup_die_type): Likewise.
12300 (determine_prefix): Likewise.
12301 (follow_die_offset): Likewise.
12302 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12303 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12304 (dwarf2_fetch_die_type_sect_off): Likewise.
12305 (dwarf2_get_die_type): Likewise.
12306 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12307 (get_signatured_type): Likewise.
12308 (get_DW_AT_signature_type): Likewise.
12309 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12310 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12311 (cu_debug_loc_section): Likewise.
12312 (fill_in_loclist_baton): Likewise.
12313 (dwarf2_symbol_mark_computed): Likewise.
12314 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12315 dwarf2_per_objfile.
12316 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12317 parameter.
12318 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12319 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12320 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12321 (set_die_type): Use dwarf2_free_objfile from cu.
12322 (get_die_type_at_offset): Likewise.
12323 (dwarf2_per_objfile_free): Don't assign global variable.
12324 (debug_names) <constructor>: Add dwarf2_per_objfile
12325 parameter, update m_debugstrlookup construction.
12326 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12327 parameter.
12328 <m_dwarf2_per_objfile>: New field.
12329 <lookup>: Use m_dwarf2_per_objfile.
12330 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12331 (psyms_seen_size): Likewise.
12332 (write_gdbindex): Replace objfile parameter with
12333 dwarf2_per_objfile.
12334 (write_debug_names): Likewise.
12335 (write_psymtabs_to_index): Likewise.
12336 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12337 calls.
12338
12339 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12340
12341 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12342 <dwarf2_per_objfile>: New field.
12343 (struct dwarf2_per_cu_data) <objfile>: Remove.
12344 <dwarf2_per_objfile>: New field.
12345 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12346 of objfile.
12347 (create_signatured_type_table_from_index): Likewise.
12348 (create_debug_type_hash_table): Likewise.
12349 (fill_in_sig_entry_from_dwo_entry): Likewise.
12350 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12351 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12352 objfile.
12353 (create_partial_symtab): Access objfile through
12354 dwarf2_per_objfile.
12355 (process_psymtab_comp_unit_reader): Likewise.
12356 (read_comp_units_from_section): Likewise.
12357 (scan_partial_symbols): Likewise.
12358 (add_partial_symbol): Likewise.
12359 (add_partial_subprogram): Likewise.
12360 (peek_die_abbrev): Likewise.
12361 (fixup_go_packaging): Likewise.
12362 (process_full_comp_unit): Likewise.
12363 (process_full_type_unit): Likewise.
12364 (process_imported_unit_die): Likewise.
12365 (dwarf2_compute_name): Likewise.
12366 (dwarf2_physname): Likewise.
12367 (read_import_statement): Likewise.
12368 (create_cus_hash_table): Assign dwarf2_physname instead of
12369 objfile.
12370 (read_func_scope): Access objfile through dwarf2_per_objfile.
12371 (read_lexical_block_scope): Likewise.
12372 (read_call_site_scope): Likewise.
12373 (read_variable): Likewise.
12374 (dwarf2_rnglists_process): Likewise.
12375 (dwarf2_ranges_process): Likewise.
12376 (dwarf2_ranges_read): Likewise.
12377 (dwarf2_record_block_ranges): Likewise.
12378 (dwarf2_add_field): Likewise.
12379 (dwarf2_add_member_fn): Likewise.
12380 (read_structure_type): Likewise.
12381 (process_structure_scope): Likewise.
12382 (read_enumeration_type): Likewise.
12383 (read_array_type): Likewise.
12384 (read_common_block): Likewise.
12385 (read_namespace_type): Likewise.
12386 (read_namespace): Likewise.
12387 (read_module_type): Likewise.
12388 (read_tag_pointer_type): Likewise.
12389 (read_tag_ptr_to_member_type): Likewise.
12390 (read_tag_string_type): Likewise.
12391 (read_subroutine_type): Likewise.
12392 (read_typedef): Likewise.
12393 (read_base_type): Likewise.
12394 (attr_to_dynamic_prop): Likewise.
12395 (read_subrange_type): Likewise.
12396 (read_unspecified_type): Likewise.
12397 (load_partial_dies): Likewise.
12398 (read_partial_die): Likewise.
12399 (find_partial_die): Likewise.
12400 (guess_partial_die_structure_name): Likewise.
12401 (fixup_partial_die): Likewise.
12402 (read_attribute_value): Likewise.
12403 (read_addr_index_from_leb128): Likewise.
12404 (dwarf2_read_addr_index): Likewise.
12405 (dwarf2_string_attr): Likewise.
12406 (lnp_state_machine::check_line_address): Likewise.
12407 (dwarf_decode_lines_1): Likewise.
12408 (dwarf_decode_lines): Likewise.
12409 (dwarf2_start_symtab): Likewise.
12410 (var_decode_location): Likewise.
12411 (new_symbol_full): Likewise.
12412 (dwarf2_const_value_data): Likewise.
12413 (dwarf2_const_value_attr): Likewise.
12414 (dwarf2_const_value): Likewise.
12415 (die_type): Likewise.
12416 (die_containing_type): Likewise.
12417 (lookup_die_type): Likewise.
12418 (guess_full_die_structure_name): Likewise.
12419 (anonymous_struct_prefix): Likewise.
12420 (dwarf2_name): Likewise.
12421 (follow_die_ref_or_sig): Likewise.
12422 (follow_die_offset): Likewise.
12423 (follow_die_ref): Likewise.
12424 (dwarf2_fetch_die_loc_sect_off): Likewise.
12425 (dwarf2_fetch_constant_bytes): Likewise.
12426 (dwarf2_fetch_die_type_sect_off): Likewise.
12427 (dwarf2_get_die_type): Likewise.
12428 (follow_die_sig): Likewise.
12429 (decode_locdesc): Likewise.
12430 (dwarf2_per_cu_objfile): Likewise.
12431 (dwarf2_per_cu_text_offset): Likewise.
12432 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12433 objfile.
12434 (set_die_type): Access objfile through
12435 dwarf2_per_objfile.
12436
12437 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12438
12439 * valprint.c (converted_character_d): Remove typedef.
12440 (DEF_VEC_O (converted_character_d)): Remove.
12441 (count_next_character): Use std::vector.
12442 (print_converted_chars_to_obstack): Likewise.
12443 (generic_printstr): Likewise.
12444
12445 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12446
12447 * xml-support.h (struct gdb_xml_value): Add constructor.
12448 <value>: Change type to unique_xmalloc_ptr.
12449 (gdb_xml_value_s): Remove typedef.
12450 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12451 (gdb_xml_element_start_handler): Change parameter type to
12452 std::vector.
12453 (xml_find_attribute): Likewise.
12454 * xml-support.c (xml_find_attribute): Change parameter type to
12455 std::vector and adjust.
12456 (gdb_xml_values_cleanup): Remove.
12457 (gdb_xml_parser::start_element): Adjust to std::vector.
12458 (xinclude_start_include): Change paraeter type to std::vector
12459 and adjust.
12460 * btrace.c (check_xml_btrace_version): Likewise.
12461 (parse_xml_btrace_block): Likewise.
12462 (parse_xml_btrace_pt_config_cpu): Likewise.
12463 (parse_xml_btrace_pt): Likewise.
12464 (parse_xml_btrace_conf_bts): Likewise.
12465 (parse_xml_btrace_conf_pt): Likewise.
12466 * memory-map.c (memory_map_start_memory): Likewise.
12467 (memory_map_start_property): Likewise.
12468 * osdata.c (osdata_start_osdata): Likewise.
12469 (osdata_start_item): Likewise.
12470 (osdata_start_column): Likewise.
12471 * remote.c (start_thread): Likewise.
12472 * solib-aix.c (library_list_start_library): Likewise.
12473 (library_list_start_list): Likewise.
12474 * solib-svr4.c (library_list_start_library): Likewise.
12475 (svr4_library_list_start_list): Likewise.
12476 * solib-target.c (library_list_start_segment): Likewise.
12477 (library_list_start_section): Likewise.
12478 (library_list_start_library): Likewise.
12479 (library_list_start_list): Likewise.
12480 * tracepoint.c (traceframe_info_start_memory): Likewise.
12481 (traceframe_info_start_tvar): Likewise.
12482 * xml-syscall.c (syscall_start_syscall): Likewise.
12483 * xml-tdesc.c (tdesc_start_target): Likewise.
12484 (tdesc_start_feature): Likewise.
12485 (tdesc_start_reg): Likewise.
12486 (tdesc_start_union): Likewise.
12487 (tdesc_start_struct): Likewise.
12488 (tdesc_start_flags): Likewise.
12489 (tdesc_start_enum): Likewise.
12490 (tdesc_start_field): Likewise.
12491 (tdesc_start_enum_value): Likewise.
12492 (tdesc_start_vector): Likewise.
12493
12494 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12495
12496 * extension.h (struct xmethod_worker) <clone>: Remove.
12497 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12498 Remove.
12499 (python_xmethod_worker::clone): Remove.
12500 * valops.c (find_overload_match): Use std::move instead of
12501 clone.
12502
12503 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12504
12505 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12506 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12507 <free_xmethod_worker_data>: Remove.
12508 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12509 <get_xmethod_arg_types>: Remove.
12510 <get_xmethod_result_type>: Remove.
12511 <invoke_xmethod>: Remove.
12512 * extension.c (new_xmethod_worker): Remove.
12513 (clone_xmethod_worker): Remove.
12514 (get_matching_xmethod_workers): Return void, pass std::vector by
12515 pointer.
12516 (get_xmethod_arg_types): Rename to...
12517 (xmethod_worker::get_arg_types): ... this, and adjust.
12518 (get_xmethod_result_type): Rename to...
12519 (xmethod_worker::get_result_type): ... this, and adjust.
12520 (invoke_xmethod): Remove.
12521 (free_xmethod_worker): Remove.
12522 (free_xmethod_worker_vec): Remove.
12523 * extension.h (enum ext_lang_rc): Move here from
12524 extension-priv.h.
12525 (struct xmethod_worker): Add constructor and destructor.
12526 <data>: Remove.
12527 <value>: Remove.
12528 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12529 virtual pure methods.
12530 <get_arg_types, get_result_type>: New methods.
12531 (xmethod_worker_ptr): Remove typedef.
12532 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12533 (xmethod_worker_vec): Remove typedef.
12534 (xmethod_worker_up): New typedef.
12535 (invoke_xmethod): Remove.
12536 (clone_xmethod_worker): Remove.
12537 (free_xmethod_worker): Remove.
12538 (free_xmethod_worker_vec): Remove.
12539 (get_xmethod_arg_types): Remove.
12540 (get_xmethod_result_type): Remove.
12541 * valops.c (find_method_list): Use std::vector, don't use
12542 intermediate vector.
12543 (value_find_oload_method_list): Use std::vector.
12544 (find_overload_match): Use std::vector.
12545 (find_oload_champ): Use std::vector.
12546 * value.c (value_free): Use operator delete.
12547 (value_of_xmethod): Rename to...
12548 (value_from_xmethod): ... this. Don't assign
12549 xmethod_worker::value, take rvalue-reference.
12550 (result_type_of_xmethod): Adjust.
12551 (call_xmethod): Adjust.
12552 * value.h: Include extension.h.
12553 (struct xmethod_worker): Don't forward-declare.
12554 (value_of_xmethod): Rename to...
12555 (value_from_xmethod): ... this, take rvalue-reference.
12556 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12557 (struct python_xmethod_worker): ... this, add constructor and
12558 destructor.
12559 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12560 (gdbpy_free_xmethod_worker_data): Rename to...
12561 (python_xmethod_worker::~python_xmethod_worker): ... this and
12562 adjust.
12563 (gdbpy_clone_xmethod_worker_data): Rename to...
12564 (python_xmethod_worker::clone): ... this and adjust.
12565 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12566 temporary vector.
12567 (gdbpy_get_xmethod_arg_types): Rename to...
12568 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12569 (gdbpy_get_xmethod_result_type): Rename to...
12570 (python_xmethod_worker::do_get_result_type): ... this and
12571 adjust.
12572 (gdbpy_invoke_xmethod): Rename to...
12573 (python_xmethod_worker::invoke): ... this and adjust.
12574 (new_python_xmethod_worker): Rename to...
12575 (python_xmethod_worker::python_xmethod_worker): ... this and
12576 adjust.
12577 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12578 Remove.
12579 (gdbpy_free_xmethod_worker_data): Remove.
12580 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12581 (gdbpy_get_xmethod_arg_types): Remove.
12582 (gdbpy_get_xmethod_result_type): Remove.
12583 (gdbpy_invoke_xmethod): Remove.
12584 * python/python.c (python_extension_ops): Remove obsolete
12585 callbacks.
12586
12587 2018-01-05 Pedro Alves <palves@redhat.com>
12588
12589 PR gdb/18653
12590 * common/signals-state-save-restore.c
12591 (save_original_signals_state): New parameter 'quiet'. Warn if we
12592 find a custom handler preinstalled, instead of internal erroring.
12593 But only warn if !quiet.
12594 * common/signals-state-save-restore.h
12595 (save_original_signals_state): New parameter 'quiet'.
12596 * main.c (captured_main_1): Move save_original_signals_state call
12597 after option handling, and pass QUIET.
12598
12599 2018-01-05 Pedro Alves <palves@redhat.com>
12600
12601 * spu-tdep.c (spu_catch_start): Pass
12602 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12603
12604 2018-01-05 Pedro Alves <palves@redhat.com>
12605
12606 PR gdb/22670
12607 * ada-lang.c (literal_symbol_name_matcher): New function.
12608 (ada_get_symbol_name_matcher): Use it for
12609 symbol_name_match_type::SEARCH_NAME.
12610 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12611 it down instead of assuming symbol_name_match_type::FULL.
12612 * block.h (block_lookup_symbol): New parameter 'match_type'.
12613 * c-valprint.c (print_unpacked_pointer): Use
12614 lookup_symbol_search_name instead of lookup_symbol.
12615 * compile/compile-object-load.c (get_out_value_type): Pass down
12616 symbol_name_match_type::SEARCH_NAME.
12617 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12618 symbol_name_match_type::FULL.
12619 * cp-support.c (cp_get_symbol_name_matcher): Handle
12620 symbol_name_match_type::SEARCH_NAME.
12621 * infrun.c (insert_exception_resume_breakpoint): Use
12622 lookup_symbol_search_name.
12623 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12624 * psymtab.c (maintenance_check_psymtabs): Use
12625 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12626 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12627 SYMBOL_SEARCH_NAME.
12628 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12629 if symbol_name_match_type::SEARCH_NAME.
12630 (lookup_symbol_in_language): Pass down
12631 symbol_name_match_type::FULL.
12632 (lookup_symbol_search_name): New.
12633 (lookup_language_this): Pass down
12634 symbol_name_match_type::SEARCH_NAME.
12635 (lookup_symbol_aux, lookup_local_symbol): New parameter
12636 'match_type'. Pass it down.
12637 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12638 (lookup_symbol_search_name): New declaration.
12639 (lookup_symbol_in_block): New 'match_type' parameter.
12640
12641 2018-01-05 Pedro Alves <palves@redhat.com>
12642
12643 PR gdb/22670
12644 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12645 ada_lookup_symbol.
12646 (ada_lookup_symbol): Reimplement in terms of
12647 ada_lookup_symbol_list, bits factored out from
12648 ada_lookup_encoded_symbol.
12649
12650 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12651
12652 * ada-exp.y (write_object_renaming): When subscripting an array
12653 using a symbol as the index, pass the block in call to
12654 ada_lookup_encoded_symbol when looking that symbol up.
12655
12656 2018-01-05 Jerome Guitton <guitton@adacore.com>
12657
12658 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12659 TYPE_INDEX_TYPE.
12660
12661 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12662
12663 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12664 the case where VALUE_LVAL (val0) is not lval_memory.
12665
12666 2018-01-05 Xavier Roirand <roirand@adacore.com>
12667
12668 * ada-valprint.c (print_optional_low_bound): Handle
12669 character-indexed array printing like boolean-indexed array
12670 printing.
12671
12672 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12673
12674 * NEWS: Create a new section for the next release branch.
12675 Rename the section of the current branch, now that it has
12676 been cut.
12677
12678 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12679
12680 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12681 * version.in: Bump version to 8.1.50.DATE-git.
12682
12683 2018-01-03 Xavier Roirand <roirand@adacore.com>
12684
12685 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12686 Add field.
12687 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12688 Add field.
12689 (default_exception_support_info) <catch_handlers_sym>: Add field.
12690 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12691 (ada_exception_name_addr_1): Add "catch handlers" handling.
12692 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12693 Update all callers.
12694 (create_excep_cond_exprs) <ex>: Add parameter.
12695 (re_set_exception): Update create_excep_cond_exprs call.
12696 (print_it_exception, print_one_exception, print_mention_exception)
12697 (print_recreate_exception): Add "catch handler" handling.
12698 (allocate_location_catch_handlers, re_set_catch_handlers)
12699 (check_status_catch_handlers, print_it_catch_handlers)
12700 (print_one_catch_handlers, print_mention_catch_handlers)
12701 (print_recreate_catch_handlers): New function.
12702 (catch_handlers_breakpoint_ops): New variable.
12703 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12704 Add parameter. Add "catch handler" handling.
12705 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12706 Add "catch handler" handling.
12707 (ada_exception_catchpoint_cond_string): Add "catch handler"
12708 handling.
12709 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12710 call.
12711 (catch_ada_handlers_command): New function.
12712 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12713 operations structure.
12714 (_initialize_ada_language): Add "catch handlers" command entry.
12715 * NEWS: Document "catch handlers" feature.
12716
12717 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12718
12719 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12720 account when creating the array type of the slice.
12721 (ada_value_slice): Likewise.
12722
12723 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12724
12725 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12726 New enum value.
12727 (create_array_type_with_stride): Add byte_stride_prop parameter.
12728 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12729 New parameter. Update all callers in this file.
12730 (array_type_has_dynamic_stride): New function.
12731 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12732 of arrays with dynamic byte strides.
12733 * dwarf2read.c (read_array_type): Add support for dynamic
12734 DW_AT_byte_stride attributes.
12735
12736 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12737
12738 * dwarf2read.c (read_unspecified_type): Treat
12739 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12740
12741 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12742
12743 Update copyright year range in all GDB files.
12744
12745 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12746
12747 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12748 and gdb/testsuite/gdb.base/step-line.c.
12749
12750 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12751
12752 * copyright.py (main): Dump the contents of
12753 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12754 even if BY_HAND is empty.
12755
12756 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12757
12758 * top.c (print_gdb_version): Update Copyright year in version
12759 message.
12760
12761 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12762
12763 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12764
12765 For older changes see ChangeLog-2017.
12766 \f
12767 Local Variables:
12768 mode: change-log
12769 left-margin: 8
12770 fill-column: 74
12771 version-control: never
12772 coding: utf-8
12773 End:
This page took 0.274775 seconds and 5 git commands to generate.