]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Fix help text for "python" command
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-10 Tom Tromey <tom@tromey.com>
2
3 PR python/18380:
4 * python/python.c (_initialize_python): Make example in "python"
5 help work in Python 3.
6
7 2018-09-10 Eli Zaretskii <eliz@gnu.org>
8
9 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
10 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
11 $(EXEEXT) to the script, as it is not a program.
12
13 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
14
15 * python/py-prettyprint.c (pretty_print_one_value): Return
16 gdbpy_ref<>.
17 (print_string_repr): Adjust.
18 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
19 * python/python-internal.h (apply_varobj_pretty_printer): Return
20 gdbpy_ref<>.
21 * varobj.c (varobj_value_get_print_value): Adjust.
22
23 2018-09-08 Tom Tromey <tom@tromey.com>
24
25 PR python/16047:
26 * python/py-prettyprint.c (pretty_print_one_value): Check for
27 to_string method.
28
29 2018-09-08 Joel Brobecker <brobecker@adacore.com>
30
31 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
32 replace_operator_with_call.
33
34 2018-09-08 Joel Brobecker <brobecker@adacore.com>
35
36 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
37
38 2018-09-08 Joel Brobecker <brobecker@adacore.com>
39
40 * ada-typeprint.c (print_range): Print the bounds using TYPE
41 rather than its TYPE_TARGET_TYPE.
42
43 2018-09-08 Joel Brobecker <brobecker@adacore.com>
44
45 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
46 call to ada_to_fixed_value_create.
47
48 2018-09-08 Jerome Guitton <guitton@adacore.com>
49
50 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
51
52 2018-09-08 Joel Brobecker <brobecker@adacore.com>
53
54 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
55 by calls to error.
56
57 2018-09-08 Joel Brobecker <brobecker@adacore.com>
58
59 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
60 Move update of loop variable "fi".
61
62 2018-09-08 Joel Brobecker <brobecker@adacore.com>
63
64 * ada-lang.c (value_assign_to_component): In the case of
65 big-endian targets, extract the bits of the given VAL
66 using an src_offset of zero if container is not a scalar.
67
68 2018-09-06 Simon Ser <contact@emersion.fr>
69
70 PR gdb/23105
71 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
72 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
73 * fbsd-tdep.c (fbsd_make_note_desc): New.
74 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
75 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
76 * target.h (enum target_object) Add FreeBSD-specific
77 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
78
79 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
80
81 * compile/compile-c.h (generate_c_for_variable_locations):
82 Change reference to pointer.
83 * compile/compile-c-support.c (compile_program) <compute>:
84 Likewise.
85 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
86 (generate_c_for_for_one_variable): Likewise
87 (generate_c_for_variable_locations): Likewise
88 * compile/compile-c-types.c (compile_c_instance::convert_type):
89 Likewise
90 * compile/compile-cplus-symbols.c (convert_one_symbol):
91 std::move the scope passed to enter_scope.
92 * compile/compile-cplus-types.c
93 (compile_cplus_instance::enter_scope): Make parameter
94 rvalue-reference.
95 (compile_cplus_instance::new_scope): Change reference to
96 pointer.
97 (compile_cplus_instance::convert_type): Likewise
98 (compile_cplus_convert_typedef): std::move the scope passed to
99 enter_scope.
100 (compile_cplus_convert_struct_or_union): Likewise.
101 (compile_cplus_convert_enum): Likewise.
102 (compile_cplus_convert_namespace): Likewise.
103 * compile/compile-cplus.h (compile_cplus_instance)
104 <enter_scope>: Make parameter rvalue-reference.
105 * compile/compile-internal.h (compile_instance)
106 <get_cached_type>: Likewise
107 * compile/compile-loc2c.c (push): Likewise
108 (pushf): Likewise
109 (unary): Likewise
110 (binary): Likewise
111 (print_label): Likewise
112 (pushf_register_address): Likewise
113 (pushf_register): Likewise
114 (do_compile_dwarf_expr_to_c): Likewise
115 (compile_dwarf_expr_to_c): Likewise
116 (compile_dwarf_bounds_to_c): Likewise
117 * compile/compile.c (compile_instance::get_cached_type):
118 Likewise
119 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
120 (compile_dwarf_bounds_to_c): Likewise
121 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
122 (dwarf2_compile_property_to_c): Likewise
123 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
124 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
125 Likewise
126
127 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
128
129 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
130 * tui/tui-data.c (init_content_element): Don't initialize it.
131
132 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
133
134 * tui/tui-data.h (struct tui_win_info)
135 <detail::opaque>: Remove.
136 * tui/tui-data.c (init_win_info): Remove assignment.
137
138 2018-09-05 Tom Tromey <tom@tromey.com>
139
140 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
141 -Wformat-nonliteral.
142 * target-float.c (host_float_ops<T>::to_string)
143 (host_float_ops<T>::from_string): Use
144 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
145 * configure: Rebuild.
146
147 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
148
149 * printcmd.c (printf_c_string): Use
150 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
151 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
152
153 2018-09-05 Tom Tromey <tom@tromey.com>
154
155 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
156
157 2018-09-05 Tom de Vries <tdevries@suse.de>
158
159 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
160 with resolve_abstract_p == true.
161 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
162 defaulting to false. Propagate resolve_abstract_p to
163 dwarf2_fetch_die_loc_sect_off.
164 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
165 parameter, defaulting to false.
166 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
167 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
168 parameter.
169 * dwarf2read.h (struct die_info): Forward-declare.
170 (die_info_ptr): New typedef.
171 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
172
173 2018-09-05 Joel Brobecker <brobecker@adacore.com>
174
175 GDB 8.2 released.
176
177 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
178 Pedro Alves <palves@redhat.com>
179
180 * gnulib/Makefile.in (aclocal_m4_deps): Move to
181 "aclocal-m4-deps.mk". Include file here.
182 $(srcdir)/aclocal.m4: Add "configure.ac".
183 * gnulib/aclocal-m4-deps.mk: New file.
184 * gnulib/update-gnulib.sh: Automatically update
185 "aclocal-m4-deps.mk".
186
187 2018-09-04 Tom Tromey <tom@tromey.com>
188
189 * configure: Rebuild.
190 * configure.ac: Remove multi-ice code.
191
192 2018-09-04 Tom Tromey <tom@tromey.com>
193
194 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
195 (ada-exp.o): Update.
196
197 2018-09-04 Tom Tromey <tom@tromey.com>
198
199 * Makefile.in (printcmd.o, target-float.o): Remove.
200 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
201
202 2018-09-04 Tom Tromey <tom@tromey.com>
203
204 * gnulib/Makefile.in: Remove obsolete comment.
205 * Makefile.in: Remove obsolete comment.
206
207 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
208
209 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
210 line with '+'.
211
212 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
213
214 * riscv-tdep.c: Add 'prologue-value.h' include.
215 (struct riscv_unwind_cache): New struct.
216 (riscv_debug_unwinder): New global.
217 (riscv_scan_prologue): Update arguments, capture register details
218 from prologue scan.
219 (riscv_skip_prologue): Reformat arguments line, move end of
220 prologue calculation into riscv_scan_prologue.
221 (riscv_frame_cache): Update return type, create
222 riscv_unwind_cache, scan the prologue, and fill in remaining cache
223 details.
224 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
225 (riscv_frame_prev_register): Use the trad_frame within the
226 riscv_unwind_cache.
227 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
228 flag.
229
230 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
231
232 * trad-frame.h (trad_frame_set_realreg): Declare.
233 (trad_frame_set_addr): Declare.
234 * trad-frame.c (trad_frame_set_realreg): Define new function.
235 (trad_frame_set_addr): Define new function.
236 (trad_frame_set_reg_realreg): Use new function.
237 (trad_frame_set_reg_addr): Use new function.
238
239 2018-09-01 Keith Seitz <keiths@redhat.com>
240
241 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
242 pulongest instead of "%lld".
243 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
244 ATTRIBUTE_UNUSED.
245
246 2018-08-31 Tom Tromey <tom@tromey.com>
247
248 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
249 variant part type.
250
251 2018-08-31 Pedro Alves <palves@redhat.com>
252
253 * gdbarch.h: Regenerate.
254
255 2018-08-31 Pedro Alves <palves@redhat.com>
256
257 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
258 * target.h (Hardware watchpoint interfaces): Describe
259 continuable/steppable/non-steppable watchpoints.
260 * gdbarch.h, gdbarch.c: Regenerate.
261
262 2018-08-31 Pedro Alves <palves@redhat.com>
263
264 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
265 Delete.
266 * s390-linux-nat.c
267 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
268 * target.h (target_ops::have_continuable_watchpoint): Delete.
269 (target_have_continuable_watchpoint): Delete.
270 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
271 * target-delegates.c: Regenerate.
272
273 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
274
275 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
276 the files present in "gnulib/import/m4/".
277
278 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
279
280 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
281 c.sw, c.swsp, and c.sdsp.
282
283 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
284
285 * riscv-tdep.c (struct riscv_inferior_data): Delete.
286 (riscv_read_misa_reg): Don't cache value read into inferior data.
287 (riscv_new_inferior_data): Delete.
288 (riscv_inferior_data_cleanup): Delete.
289 (riscv_inferior_data): Delete.
290 (riscv_invalidate_inferior_data): Delete.
291 (_initialize_riscv_tdep): Remove initialisation of inferior data.
292
293 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
294
295 * compile/compile-cplus-types.c
296 (compile_cplus_instance::leave_scope): Take the address of scope
297 object.
298 (compile_cplus_instance::convert_qualified_base): Compare quals
299 to 0.
300
301 2018-08-30 Keith Seitz <keiths@redhat.com>
302
303 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
304 Use "%s" and host_address_to_string instead of "%p" in printf.
305
306 2018-08-29 Keith Seitz <keiths@redhat.com>
307
308 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
309 and compile-cplus-types.c.
310 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
311 * c-lang.c (cplus_language_defn): Set C++ compile functions.
312 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
313 Declare.
314 * compile/compile-c-support.c: Include compile-cplus.h.
315 (load_libcompile): Templatize.
316 (get_compile_context): "New" function.
317 (c_get_compile_context): Use get_compile_context.
318 (cplus_get_compile_context): New function.
319 (cplus_push_user_expression, cplus_pop_user_expression)
320 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
321 (cplus_compute_program): Define new structs/functions.
322 * compile/compile-cplus-symmbols.c: New file.
323 * compile/compile-cplus-types.c: New file.
324 * compile/compile-cplus.h: New file.
325 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
326 Declare.
327 * compile/compile-object-load.c (get_out_value_type): Use
328 strncmp_iw when comparing symbol names.
329 (compile_object_load): Add mst_bss and mst_data.
330 * compile/compile.c (_initialize_compile): Remove
331 -Wno-implicit-function-declaration from `compile_args'.
332 * compile/gcc-cp-plugin.h: New file.
333 * NEWS: Mention C++ compile support and new debug options.
334
335 2018-08-29 Keith Seitz <keiths@redhat.com>
336
337 * linespec.c (collect_info::add_symbol): Make virtual.
338 (struct symbol_searcher_collect_info): New struct.
339 (symbol_searcher::find_all_symbols): New method.
340 * symtab.h (class symbol_searcher): New class.
341
342 2018-08-29 Keith Seitz <keiths@redhat.com>
343
344 * linespec.c (struct linespec) <function_symbols, label_symbols>:
345 Change to vector of block_symbol. Update all users.
346 (struct collect_info) <symbols>: Likewise.
347 (collect_info::add_symbol): Take block_symbol as argument.
348 Update all callers.
349 (decode_compound_collector) <m_symbols>: Change type to vector
350 of block_symbol. Update all users.
351 (decode_compound_collector::operator ()): Change parameter type
352 to block_symbol.
353 (find_method, find_function_symbols, find_linespec_symbols)
354 (find_label_symbols_in_block, find_label_symbols): Change symbol
355 vectors to block_symbol vectors.
356 * symtab.h (symbol_found_callback_ftype): Change parameter type to
357 block_symbol.
358
359 2018-08-29 Keith Seitz <keiths@redhat.com>
360
361 * linespec.c (symbolp): Remove typedef and VEC definitions.
362 (bound_minimal_symbol_d): Likewise.
363
364 2018-08-29 Keith Seitz <keiths@redhat.com>
365
366 * linespec.c (decode_compound_collector::decode_compound_collector):
367 Remove initialization for `m_symtabs'.
368 (decode_compound_collector::release_symbols): Change return type
369 to std::vector. Update all callers.
370 (class decode_compound_collector) <m_symbols>: Change type to
371 std::vector.
372 (lookup_prefix_sym): Change return type to std::vector. Update all
373 callers.
374 (compare_symbols): Remove.
375 (std_compare_symbols): Rename to `compare_symbols'.
376 (find_method): Change `sym_classes' parameter to std::vector.
377 Update all callers. Use std::sort to sort sym_classes.
378 (find_linespec_symbols): Remove cleanup.
379
380 2018-08-29 Keith Seitz <keiths@redhat.com>
381
382 * linespec.c (struct linespec) <minimal_symbols>: Change type to
383 std::vector. Update all users.
384 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
385 (struct collect_info) <minimal_symbols>: Likewise.
386 (compare_msymbols): Return bool. Change parameters to const
387 bound_minimal_symbol references.
388 (find_method, find_function_symbols, find_linespec_symbols): Change
389 `minsyms' parameter to std::vector. Update all callers.
390
391 2018-08-29 Keith Seitz <keiths@redhat.com>
392
393 * linespec.c (struct linespec) <label_symbols>: Change type to
394 std::vector. Update all users.
395 (find_label_symbols_in_block): Change `result' parameter to
396 std::vector. Update all callers.
397 (find_label_symbols): Return std::vector. Update all callers.
398
399 2018-08-29 Keith Seitz <keiths@redhat.com>
400
401 * linespec.c (struct linespec) <function_symbols>: Change type to
402 std::vector. Update all users.
403 (struct collect_info) <function_symbols>: Likewise.
404 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
405 (std_compare_symbols): New function.
406 (find_method, find_function_symbols, find_linespec_symbols)
407 (find_label_symbols_in_block): Change `symbols' parameter to
408 std::vector. Update all callers.
409 (find_label_symbols): Likewise for `function_symbols' and
410 `label_funcs_ret'.
411
412 2018-08-29 Keith Seitz <keiths@redhat.com>
413
414 * linespec.c (symtab_vector_up): Define.
415 (struct linespec) <file_symtabs>: Change type to std::vector *.
416 Update all uses.
417 (struct collect_info) <file_symtabs>: Likewise.
418 (collect_symtabs_from_filename): Return symtab_vector_up.
419 Update all callers.
420 (decode_objc): Remove cleanup.
421 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
422 (symtab_collector::release_symtabs): Return symtab_vector_up.
423 Update all callers.
424 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
425 Update all users.
426 (collect_symtabs_from_filename, symtabs_from_filename): Return
427 symtab_vector_up. Update all callers.
428
429 2018-08-29 Tom Tromey <tom@tromey.com>
430
431 * csky-tdep.c (csky_analyze_prologue): Use
432 core_addr_to_string_nz.
433
434 2018-08-29 Tom Tromey <tom@tromey.com>
435
436 * windows-nat.c (struct xlate_exception) <them>: Change type to
437 DWORD.
438 (xlate): Fix formatting. Remove last entry.
439 (struct xlate_exception, xlate): Comment out.
440 (windows_nat_target::resume): Use ranged for.
441
442 2018-08-29 Jim Wilson <jimw@sifive.com>
443
444 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
445 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
446 of NT_PRFPREG.
447 (riscv_linux_nat_target::store_registers): Likewise.
448
449 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
450
451 PR gdb/23555
452 PR gdb/23558
453 * gnulib/aclocal.m4: Regenerate.
454 * gnulib/config.in: Regenerate.
455 * gnulib/configure: Regenerate.
456 * gnulib/import/Makefile.am: Update.
457 * gnulib/import/Makefile.in: Update.
458 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
459 * gnulib/import/_Noreturn.h: ... this.
460 * gnulib/import/alloca.in.h: Update.
461 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
462 * gnulib/import/arg-nonnull.h: ... this.
463 * gnulib/import/assure.h: Update.
464 * gnulib/import/at-func.c: Update.
465 * gnulib/import/basename-lgpl.c: Update.
466 * gnulib/import/extra/snippet/c++defs.h: Rename to...
467 * gnulib/import/c++defs.h: ... this.
468 * gnulib/import/canonicalize-lgpl.c: Update.
469 * gnulib/import/cdefs.h: Update.
470 * gnulib/import/chdir-long.c: Update.
471 * gnulib/import/chdir-long.h: Update.
472 * gnulib/import/cloexec.c: Update.
473 * gnulib/import/cloexec.h: Update.
474 * gnulib/import/close.c: Update.
475 * gnulib/import/closedir.c: Update.
476 * gnulib/import/config.charset: Update.
477 * gnulib/import/dirent-private.h: Update.
478 * gnulib/import/dirent.in.h: Update.
479 * gnulib/import/dirfd.c: Update.
480 * gnulib/import/dirname-lgpl.c: Update.
481 * gnulib/import/dirname.h: Update.
482 * gnulib/import/dosname.h: Update.
483 * gnulib/import/dup-safer-flag.c: Update.
484 * gnulib/import/dup-safer.c: Update.
485 * gnulib/import/dup.c: Update.
486 * gnulib/import/dup2.c: Update.
487 * gnulib/import/errno.in.h: Update.
488 * gnulib/import/error.c: Update.
489 * gnulib/import/error.h: Update.
490 * gnulib/import/exitfail.c: Update.
491 * gnulib/import/exitfail.h: Update.
492 * gnulib/import/extra/update-copyright: Update.
493 * gnulib/import/fchdir.c: Update.
494 * gnulib/import/fcntl.c: Update.
495 * gnulib/import/fcntl.in.h: Update.
496 * gnulib/import/fd-hook.c: Update.
497 * gnulib/import/fd-hook.h: Update.
498 * gnulib/import/fd-safer-flag.c: Update.
499 * gnulib/import/fd-safer.c: Update.
500 * gnulib/import/fdopendir.c: Update.
501 * gnulib/import/filename.h: Update.
502 * gnulib/import/filenamecat-lgpl.c: Update.
503 * gnulib/import/filenamecat.h: Update.
504 * gnulib/import/flexmember.h: Update.
505 * gnulib/import/float+.h: Update.
506 * gnulib/import/float.c: Update.
507 * gnulib/import/float.in.h: Update.
508 * gnulib/import/fnmatch.c: Update.
509 * gnulib/import/fnmatch.in.h: Update.
510 * gnulib/import/fnmatch_loop.c: Update.
511 * gnulib/import/fpucw.h: Update.
512 * gnulib/import/frexp.c: Update.
513 * gnulib/import/frexpl.c: Update.
514 * gnulib/import/fstat.c: Update.
515 * gnulib/import/fstatat.c: Update.
516 * gnulib/import/getcwd-lgpl.c: Update.
517 * gnulib/import/getcwd.c: Update.
518 * gnulib/import/getdtablesize.c: Update.
519 * gnulib/import/getlogin_r.c: Update.
520 * gnulib/import/getprogname.c: Update.
521 * gnulib/import/getprogname.h: Update.
522 * gnulib/import/gettext.h: Update.
523 * gnulib/import/gettimeofday.c: Update.
524 * gnulib/import/glob-libc.h: Update.
525 * gnulib/import/glob.c: Update.
526 * gnulib/import/glob.in.h: Update.
527 * gnulib/import/glob_internal.h: Update.
528 * gnulib/import/glob_pattern_p.c: Update.
529 * gnulib/import/globfree.c: Update.
530 * gnulib/import/hard-locale.c: Update.
531 * gnulib/import/hard-locale.h: Update.
532 * gnulib/import/intprops.h: Update.
533 * gnulib/import/inttypes.in.h: Update.
534 * gnulib/import/isnan.c: Update.
535 * gnulib/import/isnand-nolibm.h: Update.
536 * gnulib/import/isnand.c: Update.
537 * gnulib/import/isnanl-nolibm.h: Update.
538 * gnulib/import/isnanl.c: Update.
539 * gnulib/import/itold.c: Update.
540 * gnulib/import/libc-config.h: Update.
541 * gnulib/import/limits.in.h: Update.
542 * gnulib/import/localcharset.c: Update.
543 * gnulib/import/localcharset.h: Update.
544 * gnulib/import/localtime-buffer.c: Update.
545 * gnulib/import/localtime-buffer.h: Update.
546 * gnulib/import/lstat.c: Update.
547 * gnulib/import/m4/00gnulib.m4: Update.
548 * gnulib/import/m4/__inline.m4: Update.
549 * gnulib/import/m4/absolute-header.m4: Update.
550 * gnulib/import/m4/alloca.m4: Update.
551 * gnulib/import/m4/builtin-expect.m4: Update.
552 * gnulib/import/m4/canonicalize.m4: Update.
553 * gnulib/import/m4/chdir-long.m4: Update.
554 * gnulib/import/m4/close.m4: Update.
555 * gnulib/import/m4/closedir.m4: Update.
556 * gnulib/import/m4/configmake.m4: Update.
557 * gnulib/import/m4/d-ino.m4: Update.
558 * gnulib/import/m4/d-type.m4: Update.
559 * gnulib/import/m4/dirent_h.m4: Update.
560 * gnulib/import/m4/dirfd.m4: Update.
561 * gnulib/import/m4/dirname.m4: Update.
562 * gnulib/import/m4/double-slash-root.m4: Update.
563 * gnulib/import/m4/dup.m4: Update.
564 * gnulib/import/m4/dup2.m4: Update.
565 * gnulib/import/m4/eealloc.m4: Update.
566 * gnulib/import/m4/environ.m4: Update.
567 * gnulib/import/m4/errno_h.m4: Update.
568 * gnulib/import/m4/error.m4: Update.
569 * gnulib/import/m4/exponentd.m4: Update.
570 * gnulib/import/m4/exponentl.m4: Update.
571 * gnulib/import/m4/extensions.m4: Update.
572 * gnulib/import/m4/extern-inline.m4: Update.
573 * gnulib/import/m4/fchdir.m4: Update.
574 * gnulib/import/m4/fcntl-o.m4: Update.
575 * gnulib/import/m4/fcntl.m4: Update.
576 * gnulib/import/m4/fcntl_h.m4: Update.
577 * gnulib/import/m4/fdopendir.m4: Update.
578 * gnulib/import/m4/filenamecat.m4: Update.
579 * gnulib/import/m4/flexmember.m4: Update.
580 * gnulib/import/m4/float_h.m4: Update.
581 * gnulib/import/m4/fnmatch.m4: Update.
582 * gnulib/import/m4/fnmatch_h.m4: Update.
583 * gnulib/import/m4/fpieee.m4: Update.
584 * gnulib/import/m4/frexp.m4: Update.
585 * gnulib/import/m4/frexpl.m4: Update.
586 * gnulib/import/m4/fstat.m4: Update.
587 * gnulib/import/m4/fstatat.m4: Update.
588 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
589 * gnulib/import/m4/getcwd-path-max.m4: Update.
590 * gnulib/import/m4/getcwd.m4: Update.
591 * gnulib/import/m4/getdtablesize.m4: Update.
592 * gnulib/import/m4/getlogin.m4: Update.
593 * gnulib/import/m4/getlogin_r.m4: Update.
594 * gnulib/import/m4/getpagesize.m4: Update.
595 * gnulib/import/m4/getprogname.m4: Update.
596 * gnulib/import/m4/gettimeofday.m4: Update.
597 * gnulib/import/m4/glibc21.m4: Update.
598 * gnulib/import/m4/glob.m4: Update.
599 * gnulib/import/m4/glob_h.m4: Update.
600 * gnulib/import/m4/gnulib-cache.m4: Update.
601 * gnulib/import/m4/gnulib-common.m4: Update.
602 * gnulib/import/m4/gnulib-comp.m4: Update.
603 * gnulib/import/m4/gnulib-tool.m4: Update.
604 * gnulib/import/m4/hard-locale.m4: Update.
605 * gnulib/import/m4/include_next.m4: Update.
606 * gnulib/import/m4/inttypes-pri.m4: Update.
607 * gnulib/import/m4/inttypes.m4: Update.
608 * gnulib/import/m4/isnand.m4: Update.
609 * gnulib/import/m4/isnanl.m4: Update.
610 * gnulib/import/m4/largefile.m4: Update.
611 * gnulib/import/m4/limits-h.m4: Update.
612 * gnulib/import/m4/localcharset.m4: Update.
613 * gnulib/import/m4/locale-fr.m4: Update.
614 * gnulib/import/m4/locale-ja.m4: Update.
615 * gnulib/import/m4/locale-zh.m4: Update.
616 * gnulib/import/m4/localtime-buffer.m4: Update.
617 * gnulib/import/m4/longlong.m4: Update.
618 * gnulib/import/m4/lstat.m4: Update.
619 * gnulib/import/m4/malloc.m4: Update.
620 * gnulib/import/m4/malloca.m4: Update.
621 * gnulib/import/m4/math_h.m4: Update.
622 * gnulib/import/m4/mbrtowc.m4: Update.
623 * gnulib/import/m4/mbsinit.m4: Update.
624 * gnulib/import/m4/mbsrtowcs.m4: Update.
625 * gnulib/import/m4/mbstate_t.m4: Update.
626 * gnulib/import/m4/memchr.m4: Update.
627 * gnulib/import/m4/memmem.m4: Update.
628 * gnulib/import/m4/mempcpy.m4: Update.
629 * gnulib/import/m4/memrchr.m4: Update.
630 * gnulib/import/m4/mkdir.m4: Update.
631 * gnulib/import/m4/mkstemp.m4: Update.
632 * gnulib/import/m4/mmap-anon.m4: Update.
633 * gnulib/import/m4/mode_t.m4: Update.
634 * gnulib/import/m4/msvc-inval.m4: Update.
635 * gnulib/import/m4/msvc-nothrow.m4: Update.
636 * gnulib/import/m4/multiarch.m4: Update.
637 * gnulib/import/m4/nocrash.m4: Update.
638 * gnulib/import/m4/off_t.m4: Update.
639 * gnulib/import/m4/onceonly.m4: Update.
640 * gnulib/import/m4/open-cloexec.m4: Update.
641 * gnulib/import/m4/open.m4: Update.
642 * gnulib/import/m4/openat.m4: Update.
643 * gnulib/import/m4/opendir.m4: Update.
644 * gnulib/import/m4/pathmax.m4: Update.
645 * gnulib/import/m4/rawmemchr.m4: Update.
646 * gnulib/import/m4/readdir.m4: Update.
647 * gnulib/import/m4/readlink.m4: Update.
648 * gnulib/import/m4/realloc.m4: Update.
649 * gnulib/import/m4/rename.m4: Update.
650 * gnulib/import/m4/rewinddir.m4: Update.
651 * gnulib/import/m4/rmdir.m4: Update.
652 * gnulib/import/m4/save-cwd.m4: Update.
653 * gnulib/import/m4/secure_getenv.m4: Update.
654 * gnulib/import/m4/setenv.m4: Update.
655 * gnulib/import/m4/signal_h.m4: Update.
656 * gnulib/import/m4/ssize_t.m4: Update.
657 * gnulib/import/m4/stat-time.m4: Update.
658 * gnulib/import/m4/stat.m4: Update.
659 * gnulib/import/m4/std-gnu11.m4: Update.
660 * gnulib/import/m4/stdbool.m4: Update.
661 * gnulib/import/m4/stddef_h.m4: Update.
662 * gnulib/import/m4/stdint.m4: Update.
663 * gnulib/import/m4/stdio_h.m4: Update.
664 * gnulib/import/m4/stdlib_h.m4: Update.
665 * gnulib/import/m4/strchrnul.m4: Update.
666 * gnulib/import/m4/strdup.m4: Update.
667 * gnulib/import/m4/strerror.m4: Update.
668 * gnulib/import/m4/string_h.m4: Update.
669 * gnulib/import/m4/strstr.m4: Update.
670 * gnulib/import/m4/strtok_r.m4: Update.
671 * gnulib/import/m4/sys_socket_h.m4: Update.
672 * gnulib/import/m4/sys_stat_h.m4: Update.
673 * gnulib/import/m4/sys_time_h.m4: Update.
674 * gnulib/import/m4/sys_types_h.m4: Update.
675 * gnulib/import/m4/tempname.m4: Update.
676 * gnulib/import/m4/time_h.m4: Update.
677 * gnulib/import/m4/unistd-safer.m4: Update.
678 * gnulib/import/m4/unistd_h.m4: Update.
679 * gnulib/import/m4/warn-on-use.m4: Update.
680 * gnulib/import/m4/wchar_h.m4: Update.
681 * gnulib/import/m4/wchar_t.m4: Update.
682 * gnulib/import/m4/wctype_h.m4: Update.
683 * gnulib/import/m4/wint_t.m4: Update.
684 * gnulib/import/malloc.c: Update.
685 * gnulib/import/malloc/scratch_buffer.h: Update.
686 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
687 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
688 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
689 * gnulib/import/malloca.c: Update.
690 * gnulib/import/malloca.h: Update.
691 * gnulib/import/malloca.valgrind: Update.
692 * gnulib/import/math.in.h: Update.
693 * gnulib/import/mbrtowc.c: Update.
694 * gnulib/import/mbsinit.c: Update.
695 * gnulib/import/mbsrtowcs-impl.h: Update.
696 * gnulib/import/mbsrtowcs-state.c: Update.
697 * gnulib/import/mbsrtowcs.c: Update.
698 * gnulib/import/memchr.c: Update.
699 * gnulib/import/memmem.c: Update.
700 * gnulib/import/mempcpy.c: Update.
701 * gnulib/import/memrchr.c: Update.
702 * gnulib/import/mkdir.c: Update.
703 * gnulib/import/mkstemp.c: Update.
704 * gnulib/import/msvc-inval.c: Update.
705 * gnulib/import/msvc-inval.h: Update.
706 * gnulib/import/msvc-nothrow.c: Update.
707 * gnulib/import/msvc-nothrow.h: Update.
708 * gnulib/import/open.c: Update.
709 * gnulib/import/openat-die.c: Update.
710 * gnulib/import/openat-priv.h: Update.
711 * gnulib/import/openat-proc.c: Update.
712 * gnulib/import/openat.c: Update.
713 * gnulib/import/openat.h: Update.
714 * gnulib/import/opendir.c: Update.
715 * gnulib/import/pathmax.h: Update.
716 * gnulib/import/pipe-safer.c: Update.
717 * gnulib/import/rawmemchr.c: Update.
718 * gnulib/import/readdir.c: Update.
719 * gnulib/import/readlink.c: Update.
720 * gnulib/import/realloc.c: Update.
721 * gnulib/import/ref-add.sin: Update.
722 * gnulib/import/ref-del.sin: Update.
723 * gnulib/import/rename.c: Update.
724 * gnulib/import/rewinddir.c: Update.
725 * gnulib/import/rmdir.c: Update.
726 * gnulib/import/same-inode.h: Update.
727 * gnulib/import/save-cwd.c: Update.
728 * gnulib/import/save-cwd.h: Update.
729 * gnulib/import/scratch_buffer.h: Update.
730 * gnulib/import/secure_getenv.c: Update.
731 * gnulib/import/setenv.c: Update.
732 * gnulib/import/signal.in.h: Update.
733 * gnulib/import/stat-time.c: Update.
734 * gnulib/import/stat-time.h: Update.
735 * gnulib/import/stat-w32.c: Update.
736 * gnulib/import/stat-w32.h: Update.
737 * gnulib/import/stat.c: Update.
738 * gnulib/import/stdbool.in.h: Update.
739 * gnulib/import/stddef.in.h: Update.
740 * gnulib/import/stdint.in.h: Update.
741 * gnulib/import/stdio.in.h: Update.
742 * gnulib/import/stdlib.in.h: Update.
743 * gnulib/import/str-two-way.h: Update.
744 * gnulib/import/strchrnul.c: Update.
745 * gnulib/import/strdup.c: Update.
746 * gnulib/import/streq.h: Update.
747 * gnulib/import/strerror-override.c: Update.
748 * gnulib/import/strerror-override.h: Update.
749 * gnulib/import/strerror.c: Update.
750 * gnulib/import/string.in.h: Update.
751 * gnulib/import/stripslash.c: Update.
752 * gnulib/import/strnlen1.c: Update.
753 * gnulib/import/strnlen1.h: Update.
754 * gnulib/import/strstr.c: Update.
755 * gnulib/import/strtok_r.c: Update.
756 * gnulib/import/sys_stat.in.h: Update.
757 * gnulib/import/sys_time.in.h: Update.
758 * gnulib/import/sys_types.in.h: Update.
759 * gnulib/import/tempname.c: Update.
760 * gnulib/import/tempname.h: Update.
761 * gnulib/import/time.in.h: Update.
762 * gnulib/import/unistd--.h: Update.
763 * gnulib/import/unistd-safer.h: Update.
764 * gnulib/import/unistd.in.h: Update.
765 * gnulib/import/unsetenv.c: Update.
766 * gnulib/import/verify.h: Update.
767 * gnulib/import/extra/snippet/warn-on-use.h: Update.
768 * gnulib/import/wchar.in.h: Update.
769 * gnulib/import/wctype.in.h: Update.
770 * gnulib/import/xalloc-oversized.h: Update.
771 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
772 "53e2c179f26a890fa6685af4b6c1397ee370433b".
773
774 2018-08-16 Gary Benson <gbenson@redhat.com>
775
776 PR gdb/13000:
777 * gdb/main.c (captured_main_1): Exit with nonzero status
778 in batch mode if the last command to be executed failed.
779 * NEWS: Mention the above.
780
781 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
782
783 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
784 end of warning message.
785
786 2018-08-29 Alan Hayward <alan.hayward@arm.com>
787
788 PR gdb/22943:
789 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
790 (aarch64_extract_return_value): Use
791 aapcs_is_vfp_call_or_return_candidate.
792 (aarch64_return_in_memory): Likewise.
793 (aarch64_store_return_value): Likewise.
794
795 2018-08-29 Alan Hayward <alan.hayward@arm.com>
796
797 * aarch64-tdep.c
798 (aapcs_is_vfp_call_or_return_candidate): Make static
799 (pass_in_v_or_stack): Remove function.
800 (pass_in_v_vfp_candidate): New function.
801 (aarch64_push_dummy_call): Check for float register candidates.
802
803 2018-08-29 Alan Hayward <alan.hayward@arm.com>
804
805 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
806 (aapcs_is_vfp_call_or_return_candidate_1): New function.
807 (aapcs_is_vfp_call_or_return_candidate): Likewise.
808
809 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
810
811 PR build/23399
812 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
813 (struct ipa_sym_addresses): Rename to...
814 (struct ipa_sym_addresses_common): ... this.
815 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
816
817 2018-08-28 Tom Tromey <tom@tromey.com>
818
819 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
820 (token_fifo): Now a std::vector.
821 (yylex, c_parse): Update.
822 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
823 (token_fifo): Now a std::vector.
824 (yylex, d_parse): Update.
825 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
826 (token_fifo): Now a std::vector.
827 (yylex, go_parse): Update.
828
829 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
830
831 * parser-defs.h (struct type_stack) <elements>: Change type to
832 std::vector<union type_stack_elt>.
833 <depth, size>: Remove.
834 * parse.c (parse_exp_in_context_1): Adjust.
835 (type_stack_reserve): Remove.
836 (check_type_stack_depth): Remove.
837 (insert_into_type_stack): Adjust to std::vector.
838 (insert_type): Likewise.
839 (push_type): Likewise.
840 (push_type_int): Likewise.
841 (insert_type_address_space): Likewise.
842 (pop_type): Likewise.
843 (pop_type_int): Likewise.
844 (pop_typelist): Likewise.
845 (pop_type_stack): Likewise.
846 (append_type_stack): Likewise.
847 (push_type_stack): Likewise.
848 (get_type_stack): Likewise.
849 (type_stack_cleanup): Likewise.
850 (push_typelist): Likewise.
851 (follow_types): Likewise.
852 (_initialize_parse): Likewise.
853
854 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
855
856 * NEWS: Mention csky target.
857
858 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
859 Hafiz Abid Qadeer <abidh@codesourcery.com>
860 Don Breazeal <donb@codesourcery.com>
861
862 * csky-linux-tdep.c: New file.
863 * csky-tdep.c: Likewise.
864 * csky-tdep.h: Likewise.
865 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
866 csky-tdep.o.
867 (HFILES_NO_SRCDIR): Add csky-tdep.h.
868 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
869 * configure.tgt: Add csky support.
870
871 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
872
873 * python/py-framefilter.c (py_print_frame): Print frame architecture
874 when printing on an MI output.
875
876 2018-08-27 Tom Tromey <tom@tromey.com>
877
878 PR build/23087:
879 * configure: Rebuild.
880 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
881
882 2018-08-27 Tom Tromey <tom@tromey.com>
883
884 * aarch64-linux-tdep.c
885 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
886 casts to int.
887
888 2018-08-27 Tom Tromey <tom@tromey.com>
889
890 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
891 unsigned.
892 (ppc64_standard_linkage1, ppc64_standard_linkage2)
893 (ppc64_standard_linkage3, ppc64_standard_linkage4)
894 (ppc64_standard_linkage5, ppc64_standard_linkage6)
895 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
896 unsigned.
897
898 2018-08-27 Tom Tromey <tom@tromey.com>
899
900 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
901 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
902
903 2018-08-27 Tom Tromey <tom@tromey.com>
904
905 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
906 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
907 ULONGEST_MAX.
908 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
909 ULONGEST_MAX.
910 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
911 ULONGEST_MAX.
912 * sparc-linux-tdep.c (sparc32_linux_sigframe)
913 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
914 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
915 ULONGEST_MAX.
916 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
917 (ppc64_linux_sigaction_tramp_frame)
918 (ppc32_linux_sighandler_tramp_frame)
919 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
920 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
921 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
922 * mn10300-linux-tdep.c (am33_linux_sigframe)
923 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
924 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
925 * mips-linux-tdep.c (mips_linux_o32_sigframe)
926 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
927 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
928 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
929 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
930 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
931 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
932 * microblaze-linux-tdep.c
933 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
934 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
935 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
936 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
937 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
938 * common/common-types.h (ULONGEST_MAX): New define.
939 (CORE_ADDR_MAX): Fix formatting.
940 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
941 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
942 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
943 (arm_linux_rt_sigreturn_tramp_frame)
944 (arm_eabi_linux_sigreturn_tramp_frame)
945 (arm_eabi_linux_rt_sigreturn_tramp_frame)
946 (thumb2_eabi_linux_sigreturn_tramp_frame)
947 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
948 (arm_linux_restart_syscall_tramp_frame)
949 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
950 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
951 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
952 ULONGEST_MAX.
953 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
954
955 2018-08-27 Tom Tromey <tom@tromey.com>
956
957 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
958 CORE_ADDR_MAX.
959 * mips-tdep.c (mips_deal_with_atomic_sequence)
960 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
961 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
962 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
963 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
964 CORE_ADDR_MAX.
965 * aarch64-tdep.c (aarch64_software_single_step): Use
966 CORE_ADDR_MAX.
967
968 2018-08-27 Tom Tromey <tom@tromey.com>
969
970 * linespec.c (complete_linespec_component): Add cast to "char".
971 * completer.c (completion_tracker::build_completion_result): Add
972 cast to "char".
973
974 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * solist.h (struct solist, struct target_so_ops): Fix
977 indentation.
978
979 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * ada-tasks.c (ada_task_info_s): Remove typedef.
982 (DEF_VEC_O(ada_task_info_s)): Remove.
983 (struct ada_tasks_inferior_data): Initialize fields.
984 <task_list>: Make an std::vector.
985 (get_ada_tasks_inferior_data): Allocate with new.
986 (ada_get_task_number): Adjust.
987 (get_task_number_from_id): Likewise.
988 (valid_task_id): Likewise.
989 (ada_get_task_info_from_ptid): Likewise.
990 (iterate_over_live_ada_tasks): Likewise.
991 (add_ada_task): Likewise.
992 (read_known_tasks): Likewise.
993 (ada_build_task_list): Likewise.
994 (print_ada_task_info): Likewise.
995 (info_task): Likewise.
996 (task_command_1): Likewise.
997
998 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * ada-lang.c (add_angle_brackets): Return std::string.
1001
1002 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1003
1004 * python/py-threadevent.c (py_get_event_thread): Initialize
1005 pythread.
1006
1007 2018-08-24 Pedro Alves <palves@redhat.com>
1008
1009 * python/py-bpevent.c (create_breakpoint_event_object): Use
1010 copy-initialization.
1011 * python/py-continueevent.c (emit_continue_event): Use
1012 copy-initialization.
1013 * python/py-exitedevent.c (create_exited_event_object): Return a
1014 gdbpy_ref<>.
1015 (emit_exited_event): Use copy-initialization.
1016 * python/py-inferior.c (python_new_inferior)
1017 (python_inferior_deleted, add_thread_object): Use
1018 copy-initialization.
1019 * python/py-infevents.c (create_inferior_call_event_object)
1020 (create_register_changed_event_object)
1021 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1022 (emit_inferior_call_event, emit_memory_changed_event)
1023 (emit_register_changed_event): Use copy-initialization.
1024 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1025 Return a gdbpy_ref<>.
1026 (emit_new_objfile_event): Use copy-initialization.
1027 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1028 (emit_clear_objfiles_event): Use copy-initialization.
1029 * python/py-signalevent.c (create_signal_event_object): Use
1030 copy-initialization.
1031 * python/py-threadevent.c (create_thread_event_object): Use
1032 copy-initialization.
1033
1034 2018-08-24 Pedro Alves <palves@redhat.com>
1035 Simon Marchi <simon.marchi@ericsson.com>
1036
1037 PR gdb/23379
1038 * python/py-continueevent.c: Include "gdbthread.h".
1039 (create_continue_event_object): Add intro comment. Add 'ptid'
1040 parameter. Use it to find thread to pass to
1041 create_thread_event_object.
1042 (emit_continue_event): Pass PTID down to
1043 create_continue_event_object.
1044 * python/py-event.h (py_get_event_thread): Declare.
1045 (create_thread_event_object): Remove default from 'thread'
1046 parameter.
1047 * python/py-stopevent.c (create_stop_event_object): Use
1048 py_get_event_thread.
1049 * python/py-threadevent.c (get_event_thread): Rename to ...
1050 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1051 and use it to find the thread.
1052 (create_thread_event_object): Assert that THREAD isn't null.
1053 Don't find the event thread here.
1054
1055 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1056
1057 * block.h (blockrange, blockranges): New struct declarations.
1058 (struct block): Add new field named `ranges'.
1059 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1060 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1061 macros for accessing ranges in struct block.
1062 (make_blockranges): New declaration.
1063 block.c (make_blockranges): New function.
1064 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1065 for block.
1066 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1067 * blockframe.c (cache_pc_function_block): New static global.
1068 (clear_pc_function_cache): Clear cache_pc_function_block.
1069 (find_pc_partial_function): Move comment to symtab.h. Add
1070 support for non-contiguous blocks.
1071 * cli/cli-cmds.c (block.h): Include.
1072 (print_disassembly): Handle printing of non-contiguous blocks.
1073 (disassemble_current_function): Likewise.
1074 (disassemble_command): Likewise.
1075
1076 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1077 BLOCK_START.
1078 * blockframe.c (get_pc_function_start): Likewise.
1079 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1080 (gcc_symbol_address): Likewise.
1081 * compile/compile-object-run.c (compile_object_run): Likewise.
1082 * compile/compile.c (get_expr_block_and_pc): Likewise.
1083 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1084 (func_addr_to_tail_call_list): Likewise.
1085 * findvar.c (default_read_var_value): Likewise.
1086 * inline-frame.c (inline_frame_this_id): Likewise.
1087 (skip-inline_frames): Likewise.
1088 * infcmd.c (until_next_command): Likewise.
1089 * linespec.c (convert_linespec_to_sals): Likewise.
1090 * parse.c (parse_exp_in_context_1): Likewise.
1091 * printcmd.c (build_address_symbolic): likewise.
1092 (info_address_command): Likewise.
1093 symtab.c (find_function_start_sal): Likewise.
1094 (skip_prologue_sal): Likewise.
1095 (find_function_alias_target): Likewise.
1096 (find_gnu_ifunc): Likewise.
1097 * stack.c (find_frame_funname): Likewise.
1098 * symtab.c (fixup_symbol_section): Likewise.
1099 (find_function_start_sal): Likewise.
1100 (skip_prologue_sal): Likewsie.
1101 (find_function_alias_target): Likewise.
1102 (find_gnu_ifunc): Likewise.
1103 * tracepoint.c (info_scope_command): Likewise.
1104 * value.c (value_fn_field): Likewise.
1105
1106 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1107 in place of find_pc_partial_function.
1108 * blockframe.c (find_function_entry_range_from_pc): New function.
1109 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1110 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1111 for each range in a block.
1112
1113
1114 2018-08-23 Xavier Roirand <roirand@adacore.com>
1115
1116 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1117 incrementation.
1118
1119 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1120
1121 * solib-svr4.c (read_program_headers_from_bfd): Return
1122 gdb::optional<gdb::byte_vector>.
1123 (svr4_exec_displacement): Adjust.
1124
1125 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * solib-svr4.c (read_program_header): Return
1128 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1129 (find_program_interpreter): Return
1130 gdb::optional<gdb::byte_vector>.
1131 (scan_dyntag_auxv): Adjust.
1132 (enable_break): Adjust.
1133 (svr4_exec_displacement): Adjust.
1134
1135 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1136
1137 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1138 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1139
1140 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1141
1142 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1143 string_vprintf.
1144 * guile/scm-utils.c (gdbscm_printf): Likewise.
1145 * serial.c (serial_printf): Likewise.
1146 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1147
1148 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1149
1150 * stack.c (print_frame): Print frame architecture when printing on
1151 an MI output.
1152 * NEWS: Mention new "arch" attribute in frame output.
1153
1154 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1155
1156 * arch/aarch64.h (aarch64_regnum): Update comment.
1157
1158 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1159
1160 * NEWS: Add SVE to 8.2 section.
1161
1162 2018-08-21 Pedro Alves <palves@redhat.com>
1163
1164 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1165 out from gdbscm_parse_function_args.
1166 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1167 gdbscm_parse_function_args_1.
1168
1169 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1170
1171 PR gdb/17816
1172 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1173 operator.
1174
1175 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1176
1177 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1178
1179 2018-08-19 Michael Spang <spang@google.com>
1180
1181 PR gdb/11786
1182 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1183 for PT_TLS segments.
1184
1185 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1186
1187 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1188 dwarf_variable_value.
1189 * dwarf2-frame.c (class dwarf_expr_executor):
1190 Add override for dwarf_variable_value.
1191 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1192 (class symbol_needs_eval_context): Likewise.
1193 (indirect_synthetic_pointer): Add forward declaration.
1194 (sect_variable_value): New function.
1195 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1196 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1197 for DW_OP_GNU_variable_value.
1198
1199 2018-08-16 Tom Tromey <tom@tromey.com>
1200
1201 * top.c (read_command_file): Update.
1202 (command_line_input): Remove "repeat" argument.
1203 * ada-lang.c (get_selections): Update.
1204 * linespec.c (decode_line_2): Update.
1205 * defs.h (command_line_input): Remove argument.
1206 * cli/cli-script.c (read_next_line): Update.
1207 * python/py-gdb-readline.c: Update.
1208
1209 2018-08-17 Tom Tromey <tom@tromey.com>
1210
1211 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1212 command_line_input.
1213
1214 2018-08-15 Tom Tromey <tom@tromey.com>
1215
1216 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1217
1218 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1219
1220 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1221 If used, use find_pc_partial_function to find address range
1222 to disassemble.
1223 * mi/mi-main.c (mi_cmd_list_features): Report
1224 "data-disassemble-a-option" feature.
1225 * NEWS: Mention new -data-disassemble option -a.
1226
1227 2018-08-13 Tom Tromey <tom@tromey.com>
1228
1229 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1230
1231 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1232
1233 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1234 (aarch64_linux_collect_sve_regset): Likewise.
1235 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1236 * regcache.h (regcache_map_entry_size): New function.
1237
1238 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1239
1240 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1241 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1242 (SVE_HEADER_VL_LENGTH): Likewise.
1243 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1244 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1245 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1246 (SVE_HEADER_SIZE_OFFSET): Likewise.
1247 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1248 (SVE_HEADER_VL_OFFSET): Likewise.
1249 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1250 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1251 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1252 (SVE_HEADER_SIZE): Likewise.
1253 (aarch64_linux_core_read_vq): Add function.
1254 (aarch64_linux_core_read_description): Check for SVE section.
1255
1256 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1257
1258 * aarch64-fbsd-tdep.c
1259 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1260 collect_size.
1261 * aarch64-linux-tdep.c
1262 (aarch64_linux_iterate_over_regset_sections): Likewise.
1263 * alpha-linux-tdep.c
1264 (alpha_linux_iterate_over_regset_sections):
1265 * alpha-nbsd-tdep.c
1266 (alphanbsd_iterate_over_regset_sections): Likewise.
1267 * amd64-fbsd-tdep.c
1268 (amd64fbsd_iterate_over_regset_sections): Likewise.
1269 * amd64-linux-tdep.c
1270 (amd64_linux_iterate_over_regset_sections): Likewise.
1271 * arm-bsd-tdep.c
1272 (armbsd_iterate_over_regset_sections): Likewise.
1273 * arm-fbsd-tdep.c
1274 (arm_fbsd_iterate_over_regset_sections): Likewise.
1275 * arm-linux-tdep.c
1276 (arm_linux_iterate_over_regset_sections): Likewise.
1277 * corelow.c (get_core_registers_cb): Likewise.
1278 (core_target::fetch_registers): Likewise.
1279 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1280 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1281 * gdbarch.h (void): Regenerate.
1282 * gdbarch.sh: Add supply_size and collect_size.
1283 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1284 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1285 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1286 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1287 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1288 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1289 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1290 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1291 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1292 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1293 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1294 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1295 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1296 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1297 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1298 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1299 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1300 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1301 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1302 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1303 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1304 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1305 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1306 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1307 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1308 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1309 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1310 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1311 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1312 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1313
1314 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1315
1316 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1317 with string_printf.
1318
1319 2018-08-10 Keith Seitz <keiths@redhat.com>
1320
1321 * compile/compile-c-support.c (add_code_header, add_code_footer):
1322 Move into policy class.
1323 (c_push_user_expression, pop_user_expression_nop)
1324 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1325 (compile_program): New host class.
1326 (c_compile_program): New typedef.
1327 (c_compute_porgram): Use c_compile_program.
1328
1329 2018-08-10 Keith Seitz <keiths@redhat.com>
1330
1331 * compile/compile-internal.h (compile_instance::~compile_instance):
1332 Remove calls to htab_delete.
1333 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1334 * compile.c (compile_instance::compile_instance): Initialize
1335 htab unique pointers.
1336 (compile_instance::get_cached_type, compile_instance::insert_type)
1337 (compile_instance::error_symbol_once): Update for unique_ptr.
1338
1339 2018-08-10 Keith Seitz <keiths@redhat.com>
1340
1341 * compile/compile-c-symbols.c (struct symbol_error)
1342 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1343 (compile_instance::insert_symbol_error)
1344 (compile_instance::error_symbol_once): Move to ...
1345 * compile/compile.c: ... here.
1346
1347 2018-08-10 Keith Seitz <keiths@redhat.com>
1348
1349 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1350 instead of `new_compile_instance'.
1351 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1352 Update description.
1353 If the symbol error map is not initialized, create it.
1354 (generate_c_for_for_one_symbol): Do not check/initialize
1355 the symbol error map.
1356 * compile/compile-c-types.c (compile_c_instance): Make a class.
1357 Update all callers.
1358 (compile_instance::compile_instance): Initialize the type cache.
1359 (get_cached_type): New function.
1360 (insert_type): Update description.
1361 (compile_c_instance::m_default_cflags): Define.
1362 (convert_type): Update description. Use get_cached_type.
1363 (delete_instance): Moved to destructor.
1364 (new_compile_instance): Moved to constructor.
1365 * compile/compile-c.h (compile_c_instance): Make class inheriting
1366 from compile_instance.
1367 <base>: Remove field.
1368 <type_map, symbol_err_map>: Move to base class.
1369 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1370 * compile/compile-internal.h (compile_instance): Make class.
1371 <type_map_t, symbol_err_map_t>: Define.
1372 <fe>: Rename to `m_gcc_fe'.
1373 <scope, block, gcc_target_options>: Add `m_' prefix.
1374 <m_type_map, m_symbol_err_map>: New fields, moved from
1375 compile_c_instance.
1376 <destroy>: Remove.
1377 (convert_type, new_compile_instance): Remove.
1378 * compile/compile.c (cleanup_compile_instance): Remove.
1379 (compile_to_object): Use unique_ptr to eliminate cleanups.
1380 (compile_instance::set_print_callback, compile_instance::version)
1381 (compile_instance::set_verbose)
1382 (compile_instance::set_driver_filename)
1383 (compile_instance::set_triplet_regexp)
1384 (compile_instance::set_arguments)
1385 (compile_instance::set_source_file)
1386 (compile_instance::compile): Define.
1387
1388 2018-08-10 Keith Seitz <keiths@redhat.com>
1389
1390 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1391 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1392 gcc-c-fe.def to define C plugin.
1393 (delete_instance): Delete `c_plugin'.
1394 (new_compile_instance): Initialize `c_plugin'.
1395 * compile/compile-c.h: Include gcc_c_plugin.h.
1396 (struct compile_c_instance) <c_plugin>: New member.
1397 * gcc-c-plugin.h: New file.
1398 Update all callers with API change.
1399
1400 2018-08-10 Keith Seitz <keiths@redhat.com>
1401
1402 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1403 (HFILES_NO_SRCDIR): ... to here.
1404 Add compile-internal.h and compile-c.h.
1405 * compile/compile-c-support.c: Include compile-c.h.
1406 * compile/compile-c-symbols.c: Include compile-c.h.
1407 (generate_c_for_variable_locations): Update comment.
1408 * compile/compile-c-types.c: Include compile-c.h.
1409 * compile/compile-c.h: New file -- moved C language declarations
1410 from other files here.
1411 * compile/compile-internal.h: Do not include hashtab.h or
1412 common/enum-flags.h.
1413 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1414 (gcc_convert_symbol, gcc_symbol_address)
1415 (generate_c_for_variable_locations, c_get_mode_for_size)
1416 (c_get_range_decl_name): Definitions moved to compile-c.h.
1417 * compile/compile-loc2c.c: Include compile-c.h.
1418
1419 2018-08-10 Keith Seitz <keiths@redhat.com>
1420
1421 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1422 (c_symbol_substitution_name): ... this.
1423 Update all callers.
1424
1425 2018-08-10 Keith Seitz <keiths@redhat.com>
1426
1427 * compile/compile-c-support.c (c_compute_program): Use
1428 unique_xmalloc_ptr to eliminate cleanup.
1429 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1430 Return a unique_xmalloc_ptr and eliminate cleanup.
1431 * compile/compile-internal.h (generate_c_for_variable_locations):
1432 Return unique_xmalloc_ptr and update description.
1433
1434 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1435
1436 * corelow.c (core_target::get_core_register_section): Rename
1437 min_size to section_min_size.
1438
1439 2018-08-09 Jim Wilson <jimw@sifive.com>
1440
1441 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1442 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1443 * NEWS: Mention new GNU/Linux RISC-V target.
1444 * configure.host: Add riscv*-*-linux*.
1445 * configure.nat: Add riscv*.
1446 * configure.tgt: Add riscv*-*-linux*.
1447 * riscv-linux-nat.c: New file.
1448 * riscv-linux-tdep.c: New file.
1449
1450 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1451
1452 * infrun.c (resume): Make static, add forward declaration.
1453 (proceed): Update header comment.
1454 * infrun.h (resume): Delete declaration.
1455
1456 2018-08-09 Tom Tromey <tom@tromey.com>
1457
1458 * riscv-tdep.h: Minor formatting fixes.
1459
1460 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1461
1462 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1463 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1464 (test_mkdir_recursive): Likewise.
1465 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1466
1467 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1468
1469 * valarith.c (value_subscripted_rvalue): If an array is not in
1470 memory, and we don't know the upper bound, then we can't know that
1471 the requested element exists or not.
1472
1473 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1474
1475 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1476 (target_options_to_string): Add comment.
1477
1478 2018-08-08 Tom Tromey <tom@tromey.com>
1479
1480 * unittests/scoped_mmap-selftests.c: Check result of "write".
1481
1482 2018-08-08 Jim Wilson <jimw@sifive.com>
1483
1484 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1485 (decode_register_index_short): New.
1486 (decode_j_type_insn, decode_cj_type_insn): New.
1487 (decode_b_type_insn, decode_cb_type_insn): New.
1488 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1489 local xlen. Check xlen when decoding ambiguous compressed insns. In
1490 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1491 is_c_sw_insn instead of is_sw_insn.
1492 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1493 (riscv_software_single_step): New.
1494 * riscv-tdep.h (riscv_software_single_step): Declare.
1495
1496 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1497 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1498
1499 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1500
1501 PR gdb/18050:
1502 * target.c (dispose_inferior): Don't dispose of inferiors that are
1503 already killed.
1504
1505 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1506
1507 * remote.c (remote_target::download_tracepoint): Change char* to
1508 const char*.
1509
1510 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1511
1512 * target.h (target_options_to_string): Return an std::string.
1513 * target.c (str_comma_list_concat_elem): Return void, use
1514 std::string.
1515 (do_option): Likewise.
1516 (target_options_to_string): Return an std::string.
1517 * linux-nat.c (linux_nat_target::wait): Adjust.
1518 * target-debug.h (target_debug_print_options): Adjust.
1519
1520 2018-08-07 Tom Tromey <tom@tromey.com>
1521
1522 * Makefile.in (CPPFLAGS): New variable.
1523 (INTERNAL_CPPFLAGS): Use it.
1524
1525 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * NEWS: Mention the index cache.
1528
1529 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * common/pathstuff.h (get_standard_cache_dir): New.
1532 * common/pathstuff.c (get_standard_cache_dir): New.
1533 * build-id.h (build_id_to_string): New.
1534 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1535 DEBUG_STR_SUFFIX): Move to here.
1536 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1537 DEBUG_STR_SUFFIX): Move from there.
1538 (write_psymtabs_to_index): Make non-static, add basename
1539 parameter. Write to temporary files, rename when done.
1540 (save_gdb_index_command): Adjust call to
1541 write_psymtabs_to_index.
1542 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1543 field.
1544 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1545 (get_gdb_index_contents_from_cache): New.
1546 (get_gdb_index_contents_from_cache_dwz): New.
1547 (dwarf2_initialize_objfile): Read index from cache.
1548 (dwarf2_build_psymtabs): Save to index.
1549 * dwarf-index-cache.h: New file.
1550 * dwarf-index-cache.c: New file.
1551 * dwarf-index-write.h: New file.
1552
1553 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1554
1555 * gnulib/aclocal.m4: Re-generate.
1556 * gnulib/config.in: Re-generate.
1557 * gnulib/configure: Re-generate.
1558 * gnulib/import/Makefile.am: Re-generate.
1559 * gnulib/import/Makefile.in: Re-generate.
1560 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1561 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1562 * gnulib/import/m4/mkdir.m4: New file.
1563 * gnulib/import/mkdir.c: New file.
1564 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1565 module.
1566
1567 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1568
1569 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1570 * common/scoped_mmap.c: New file.
1571 * common/scoped_mmap.h (destroy): New method.
1572 (~scoped_mmap, reset): Use destroy.
1573 (scoped_mmap): New move constructor.
1574 (mmap_file): New declaration.
1575 * unittests/scoped_mmap-selftests.c (test_normal,
1576 test_invalid_filename, run_tests): New functions.
1577 (_initialize_scoped_mmap_selftests): Register selftest.
1578
1579 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1582 (read_gdb_index_from_buffer): ... this. Remove section
1583 parameter, add buffer parameter.
1584 (get_gdb_index_contents_ftype,
1585 get_gdb_index_contents_dwz_ftype): New typedefs.
1586 (dwarf2_read_gdb_index): Add callback parameters to get the
1587 index contents.
1588 (get_gdb_index_contents_from_section): New.
1589 (dwarf2_initialize_objfile): Update call to
1590 dwarf2_read_gdb_index.
1591
1592 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1593
1594 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1595 (gdb_open_cloexec): Likewise.
1596 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1597 (commandline_from_pid): Likewise.
1598 (linux_xfer_osdata_threads): Likewise.
1599 (linux_xfer_osdata_fds): Likewise.
1600 * ada-lang.c (is_package_name): Likewise.
1601 * auxv.c (procfs_xfer_auxv): Likewise.
1602 * breakpoint.c (print_one_breakpoint_location): Use
1603 uiout::field_fmt.
1604 (print_one_catch_solib): Use string_printf.
1605 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1606 (add_pe_forwarded_sym): Likewise.
1607 * dwarf2read.c (create_type_unit_group): Likewise.
1608 (build_error_marker_type): Likewise.
1609 * infcall.c (get_function_name): Likewise.
1610 * valprint.c (print_converted_chars_to_obstack): Likewise.
1611 * xtensa-tdep.c (xtensa_register_type): Likewise.
1612
1613 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1614
1615 * remote.c (remote_target::download_tracepoint): Fix format
1616 string errors.
1617
1618 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1619
1620 * tracefile.c: Include common/byte-vector.h.
1621 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1622 with trace_regblock_size if needed. Update uses of buf.
1623
1624 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1625
1626 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1627 std::vector<unsigned char>.
1628 * tracepoint.c (collection_list::collection_list): Remove
1629 m_regs_mask initializer from initializer list. Resize
1630 m_regs_mask using the largest remote register number.
1631 (collection_list::add_remote_register): Remove size check on
1632 m_regs_mask. Use at to access element.
1633 (collection_list::stringify): Change type of temp_buf to
1634 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1635 stringify the register mask. Use pack_hex_byte for the register
1636 mask.
1637
1638 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1639
1640 * tracepoint.h (class collection_list) <add_register>: Remove.
1641 <add_remote_register, add_ax_registers, add_local_register>:
1642 Declare.
1643 <add_memrange>: Add scope parameter.
1644 * tracepoint.c (encode_actions_1): Likewise.
1645 (collection_list::add_register): Rename to ...
1646 (collection_list::add_remote_register): ... this. Update
1647 comment.
1648 (collection_list::add_ax_registers, add_local_register): New
1649 methods.
1650 (collection_list::add_memrange): Add scope parameter. Call
1651 add_local_register instead of add_register.
1652 (finalize_tracepoint_aexpr): New function.
1653 (collection_list::collect_symbol): Update calls to add_memrange.
1654 Call add_local_register instead of add_register. Call
1655 add_ax_registers. Call finalize_tracepoint_aexpr.
1656 (encode_actions_1): Get remote regnos for $reg action. Call
1657 add_remote_register, add_ax_registers, and add_local_register.
1658 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1659 (validate_actionline): Call finalize_tracepoint_aexpr.
1660
1661 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1662
1663 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1664 Replace array buf with gdb::char_vector buf, of size
1665 get_remote_packet_size (). Replace references to buf and
1666 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1667 and xsnprintf with snprintf. Raise errors if the buffer is too
1668 small.
1669
1670 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1671
1672 * remote.c (remote_target::download_tracepoint): Fix the has_more
1673 predicate in the QTDP action list iteration.
1674
1675 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1676
1677 * remote.c (remote_target::download_tracepoint): Fix indentation
1678 in for block.
1679
1680 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1681
1682 * proc-api.c (_initialize_proc_api): Remove c, unused.
1683 * procfs.c (procfs_init_inferior): Remove signals, unused.
1684 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1685 unused.
1686
1687 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1688 Andrew Burgess <andrew.burgess@embecosm.com>
1689
1690 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1691 'W_STOPCODE (0)' as this could be ambiguous.
1692
1693 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1694
1695 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1696 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1697 "ai_socktype").
1698
1699 2018-08-02 Tom Tromey <tom@tromey.com>
1700
1701 PR symtab/16842.
1702 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1703 symbols.
1704 (process_structure_scope): Likewise.
1705
1706 2018-08-02 Xavier Roirand <roirand@adacore.com>
1707
1708 PR gdb/22629:
1709 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1710 kill inferior.
1711
1712 2018-08-02 Tom Tromey <tom@tromey.com>
1713
1714 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1715 (darwin_suspend_inferior, darwin_resume_inferior)
1716 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1717 (darwin_check_new_threads): Check result of get_darwin_inferior.
1718
1719 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1720
1721 GDB 8.1.1 released.
1722
1723 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1724
1725 * varobj.c (varobj_get_path_expr_parent): Report an error if
1726 parent is a dynamic varobj.
1727
1728 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1729
1730 * gnulib/aclocal.m4: Re-generate.
1731 * gnulib/config.in: Re-generate.
1732 * gnulib/configure: Re-generate.
1733 * gnulib/import/Makefile.in: Re-generate.
1734 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1735 * gnulib/import/m4/onceonly.m4: Re-generate.
1736
1737 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1738
1739 * target-descriptions.c (struct xml_test_tdesc): New.
1740 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1741 (record_xml_tdesc): Update.
1742 (maintenance_check_xml_descriptions): Update.
1743 * target-descriptions.h (record_xml_tdesc): Update comment.
1744
1745 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1746
1747 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1748 checking array bounds are defined.
1749
1750 2018-07-30 Tom Tromey <tom@tromey.com>
1751
1752 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1753 irreflexivity violation.
1754
1755 2018-07-30 Tom Tromey <tom@tromey.com>
1756
1757 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1758 * value.c (unpack_long): Remove lint code.
1759 * valops.c (value_ind): Remove lint code.
1760 * valarith.c (value_x_binop, value_x_unop, value_equal)
1761 (value_pos): Remove lint code.
1762
1763 2018-07-28 Tom de Vries <tdevries@suse.de>
1764
1765 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1766 with undefined upper bound as <optimized out>.
1767
1768 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1769
1770 * gcore.in: Rename variable "name" to "prefix". Expand
1771 "usage" text.
1772
1773 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1774
1775 * windows-nat.c (windows_nat_target::create_inferior): Update to
1776 call close() in global namespace.
1777
1778 2018-07-26 Tom Tromey <tom@tromey.com>
1779
1780 * dwarf-index-write.c (add_address_entry): Don't add objfile
1781 offsets.
1782 * dbxread.c (find_stab_function): Rename from
1783 find_stab_function_addr. Return a bound_minimal_symbol.
1784 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1785 Don't add objfile offsets.
1786 (end_psymtab): Use raw_text_low, raw_text_high,
1787 MSYMBOL_VALUE_RAW_ADDRESS.
1788 (read_ofile_symtab): Update.
1789 (process_one_symbol): Update.
1790 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1791 offsets.
1792 (dw2_relocate): Remove.
1793 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1794 searching addrmap.
1795 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1796 Update.
1797 (process_psymtab_comp_unit_reader, add_partial_symbol)
1798 (add_partial_subprogram, dwarf2_ranges_read): Update.
1799 (load_partial_dies): Update.
1800 (add_address_entry): Don't add objfile offsets.
1801 (dwarf2_build_include_psymtabs): Update.
1802 (create_addrmap_from_aranges): Don't add objfile offsets.
1803 (dw2_find_pc_sect_compunit_symtab): Update.
1804 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1805 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1806 Update.
1807 (parse_partial_symbols): Don't add objfile offsets. Use
1808 raw_text_low, raw_text_high. Update.
1809 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1810 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1811 or call 'relocate' quick function. Clear psymbol_map.
1812 * psympriv.h (struct partial_symbol) <address>: Add section
1813 offset.
1814 <set_unrelocated_address>: Rename from set_address.
1815 <raw_text_low, raw_text_high>: New methods.
1816 <text_low, text_high>: Add objfile parameter.
1817 (add_psymbol_to_bcache): Add 'section' parameter. Call
1818 set_unrelocated_address.
1819 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1820 (find_pc_psymbol): Update.
1821 (fixup_psymbol_section, relocate_psymtabs): Remove.
1822 (dump_psymtab, psym_functions): Update.
1823 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1824 parameter.
1825 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1826 (start_psymtab_common): Update.
1827 * symfile-debug.c (debug_qf_relocate): Remove.
1828 (debug_sym_quick_functions): Update.
1829 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1830 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1831 Update.
1832
1833 2018-07-26 Tom Tromey <tromey@redhat.com>
1834
1835 * dbxread.c (end_psymtab): Use text_high_valid and
1836 text_low_valid.
1837 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1838 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1839 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1840 Update comment.
1841 <text_low_valid, text_high_valid>: New fields.
1842 <set_text_low, set_text_high>: Update.
1843 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1844
1845 2018-07-26 Tom Tromey <tom@tromey.com>
1846
1847 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1848 Update.
1849 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1850 textlow and texthigh fields.
1851 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1852 Update.
1853 * mdebugread.c (parse_lines, parse_partial_symbols)
1854 (psymtab_to_symtab_1): Update.
1855 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1856 Rename fields. Update comment. Now private.
1857 <text_low, text_high, set_text_low, set_text_high>: New methods.
1858 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1859 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1860 (start_psymtab_common, maintenance_info_psymtabs)
1861 (maintenance_check_psymtabs): Update.
1862 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1863 texthigh fields.
1864 (scan_xcoff_symtab): Update.
1865
1866 2018-07-26 Tom Tromey <tromey@redhat.com>
1867
1868 * psympriv.h (struct partial_symbol) <unrelocated_address,
1869 address, set_address>: New methods.
1870 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1871 (fixup_psymbol_section, relocate_psymtabs): Update.
1872 (print_partial_symbols): Add 'objfile' parameter. Update.
1873 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1874 Update.
1875
1876 2018-07-26 Tom Tromey <tom@tromey.com>
1877
1878 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1879 (debug_names::write_psymbols): Update.
1880 * psympriv.h (struct partial_symbol): Derive from
1881 general_symbol_info.
1882 <obj_section>: New method.
1883 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1884 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1885 (find_pc_sect_psymbol, fixup_psymbol_section)
1886 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1887 (print_partial_symbols, recursively_search_psymtabs)
1888 (compare_psymbols, psymbol_hash, psymbol_compare)
1889 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1890 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1891
1892 2018-07-26 Tom Tromey <tromey@redhat.com>
1893
1894 * dbxread.c (end_psymtab): Remove dead code.
1895
1896 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1897
1898 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1899 DWARF unwinders are disabled.
1900 * dwarf2-frame.c: Add dwarf2read.h include.
1901 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1902 disabled.
1903 (dwarf2_frame_unwinders_enabled_p): Define.
1904 (show_dwarf_unwinders_enabled_p): New function.
1905 (_initialize_dwarf2_frame): Register switch to control DWARF
1906 unwinder use.
1907 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1908 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1909 (show_dwarf_cmdlist): Remove static keyword.
1910 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1911 (show_dwarf_cmdlist): Declare.
1912 * NEWS: Document new feature.
1913
1914 2018-07-26 Tom de Vries <tdevries@suse.de>
1915
1916 PR breakpoints/23366
1917 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1918
1919 2018-07-26 Tom de Vries <tdevries@suse.de>
1920
1921 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1922 DW_AT_count can't be translated to a dynamic prop.
1923
1924 2018-07-25 Tom de Vries <tdevries@suse.de>
1925
1926 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1927 try/catch.
1928
1929 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1930
1931 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1932
1933 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1934
1935 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1936
1937 2018-07-24 Keith Seitz <keiths@redhat.comt
1938
1939 PR symtab/23010
1940 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1941 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1942 instead of add_symbol_to_list.
1943 (read_file_scope): Call prepare_one_comp_unit before reading
1944 any other DIEs.
1945
1946 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1947
1948 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1949
1950 2018-07-24 Tom Tromey <tom@tromey.com>
1951
1952 * utils.c (malloc, realloc, free): Don't declare.
1953 * configure, config.in: Rebuild.
1954 * configure.ac: Don't check for declarations of free, malloc, or
1955 realloc.
1956
1957 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1958
1959 * aarch64-linux-nat.c
1960 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1961 variable.
1962 * arm-linux-nat.c (fetch_regs): Likewise.
1963 (store_regs): Likewise.
1964 (fetch_vfp_regs): Likewise.
1965 (store_vfp_regs): Likewise.
1966 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1967 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1968 (arm_linux_nat_target::insert_watchpoint): Likewise.
1969 (arm_linux_nat_target::remove_watchpoint): Likewise.
1970 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1971 Likewise.
1972 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1973 Likewise.
1974 * ppc-linux-nat.c (fetch_register): Likewise.
1975 (fetch_all_gp_regs): Likewise.
1976 (fetch_ppc_registers): Likewise.
1977 (store_all_gp_regs): Likewise.
1978 (store_ppc_registers): Likewise.
1979 (hwdebug_insert_point): Likewise.
1980 (can_use_watchpoint_cond_accel): Likewise.
1981 * remote-sim.c (gdb_os_write_stdout): Likewise.
1982
1983 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1984 Tom Tromey <tom@tromey.com>
1985
1986 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1987 test for it.
1988 * configure: Rebuild.
1989
1990 2018-07-22 Tom Tromey <tom@tromey.com>
1991
1992 * regformats/regdat.sh: Define xmltarget_${name} inside
1993 #ifndef IN_PROCESS_AGENT.
1994
1995 2018-07-22 Tom Tromey <tom@tromey.com>
1996
1997 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1998
1999 2018-07-22 Tom Tromey <tom@tromey.com>
2000
2001 * symfile.c (reread_symbols): Notify iter, not objfile.
2002
2003 2018-07-22 Tom Tromey <tom@tromey.com>
2004
2005 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2006 Use arch_ops.
2007 (ravenscar_thread_target::prepare_to_store): Likewise.
2008
2009 2018-07-22 Tom Tromey <tom@tromey.com>
2010
2011 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2012 unused variable. Call value_fetch_lazy when needed.
2013 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2014 Remove unused variable. Call value_fetch_lazy when needed.
2015
2016 2018-07-22 Tom Tromey <tom@tromey.com>
2017
2018 * m32c-tdep.c (mark_dma): Return void.
2019 (make_regs): Remove unused declarations.
2020
2021 2018-07-22 Tom Tromey <tom@tromey.com>
2022
2023 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2024 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2025 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2026 bkscm_get_valid_block_smob_arg_unsafe for effect.
2027
2028 2018-07-22 Tom Tromey <tom@tromey.com>
2029
2030 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2031 value_type.
2032
2033 2018-07-22 Tom Tromey <tom@tromey.com>
2034
2035 * windows-nat.c (saved_context): Conditionally define.
2036 * remote.c (remote_target::remote_btrace_maybe_reopen):
2037 Conditionally declare "warned".
2038 * inflow.c (sigquit_ours): Conditionally define.
2039 (new_tty): Move "tty" declaration inside #if.
2040 * guile/guile.c (guile_datadir): Conditionally define.
2041 * charset.c (set_be_le_names): Move some declarations inside #if.
2042 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2043 #if.
2044 (parse_xml_btrace_conf): Likewise.
2045
2046 2018-07-22 Tom Tromey <tom@tromey.com>
2047
2048 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2049
2050 2018-07-22 Tom Tromey <tom@tromey.com>
2051
2052 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2053 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2054 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2055 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2056 * stack.c (frame_apply_level_command): Remove unused variable.
2057 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2058 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2059 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2060 unused variable.
2061 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2062 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2063 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2064 variable.
2065 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2066 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2067 variable.
2068 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2069 Remove unused variable.
2070 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2071 variable.
2072 * common/tdesc.c (print_xml_feature::visit): Remove unused
2073 variable.
2074 * compile/compile-object-load.c (store_regs): Remove unused
2075 variables.
2076 * complaints.c (clear_complaints): Remove unused variable.
2077 * corelow.c (core_target_open): Remove unused variable.
2078 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2079 variable.
2080 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2081 variable.
2082 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2083 variable.
2084 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2085 variable.
2086 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2087 variable.
2088 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2089 variable.
2090 * ia64-tdep.c (examine_prologue): Remove unused variable.
2091 * infcall.c (run_inferior_call): Remove unused variable.
2092 * inferior.c (exit_inferior): Remove unused variable.
2093 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2094 * linespec.c (decode_line_2): Remove unused variable.
2095 * linux-nat.c (super_close): Remove.
2096 * linux-tdep.c (linux_info_proc): Remove unused variable.
2097 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2098 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2099 Remove unused variable.
2100 * parse.c (find_minsym_type_and_address): Remove unused variable.
2101 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2102 variable.
2103 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2104 variable.
2105 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2106 variables.
2107 * record-btrace.c (record_btrace_target::store_registers): Remove
2108 unused variable.
2109 (cmd_show_record_btrace_cpu): Remove unused variable.
2110 * riscv-tdep.c (riscv_register_reggroup_p)
2111 (riscv_push_dummy_call, riscv_return_value): Remove unused
2112 variable.
2113 * rust-exp.y (literal): Remove unused variable.
2114 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2115 unused variable.
2116 <STRUCTOP_ANONYMOUS>: Likewise.
2117 * s390-linux-tdep.c (s390_linux_init_abi_31)
2118 (s390_linux_init_abi_64): Remove unused variable.
2119 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2120 (file_select_thread, net_windows_open, _initialize_ser_windows):
2121 Remove unused variables.
2122 * symtab.c (find_pc_sect_line): Remove unused variable.
2123 * target-memory.c (compute_garbled_blocks): Remove unused
2124 variable.
2125 (target_write_memory_blocks): Remove unused variable.
2126 * target.c (target_stack::unpush): Remove unused variables.
2127 * tracepoint.c (start_tracing, all_tracepoint_actions)
2128 (merge_uploaded_trace_state_variables)
2129 (print_one_static_tracepoint_marker): Remove unused variable.
2130 * unittests/basic_string_view/element_access/char/1.cc (test01):
2131 Remove unused variable.
2132 * windows-nat.c (windows_continue, windows_add_all_dlls)
2133 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2134 Remove unused variables.
2135
2136 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2137
2138 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2139 attr_profile in HAVE_ELF.
2140 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2141 HAVE_ELF.
2142
2143 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2144
2145 * frame.c (frame_register_unwind): Change parameter name.
2146 (frame_unwind_register): Likewise.
2147 (frame_unwind_register_value): Likewise.
2148 (frame_unwind_register_signed): Likewise.
2149 (frame_unwind_register_unsigned): Likewise.
2150 * frame.h (frame_register_unwind): Likewise.
2151 (frame_unwind_register): Likewise.
2152 (frame_unwind_register_value): Likewise.
2153 (frame_unwind_register_signed): Likewise.
2154 (frame_unwind_register_unsigned): Likewise.
2155 (frame_unwind_arch): Likewise.
2156
2157 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2158
2159 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2160 ISA maintenance.
2161
2162 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2163
2164 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2165 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2166 hand.
2167
2168 2018-07-20 Keith Seitz <keiths@redhat.com>
2169
2170 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2171 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2172 m_compunit_symtab, m_language>: Add "m_" prefix.
2173 Update all uses.
2174 * buildsym.c: Update all uses.
2175
2176 2018-07-20 Tom Tromey <tom@tromey.com>
2177
2178 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2179 * buildsym.h (record_line_ftype): Remove typedef.
2180
2181 2018-07-20 Tom Tromey <tom@tromey.com>
2182
2183 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2184 (end_expandable_symtab): Likewise.
2185 (end_symtab_get_static_block): Likewise.
2186 (end_symtab_from_static_block): Likewise.
2187 * buildsym-legacy.c (augment_type_symtab): Remove.
2188 (end_expandable_symtab): Remove.
2189 (end_symtab_get_static_block): Remove.
2190 (end_symtab_from_static_block): Remove.
2191
2192 2018-07-20 Tom Tromey <tom@tromey.com>
2193
2194 * dwarf2read.c: Include buildsym.h.
2195 (struct dwarf2_cu) <builder>: New method.
2196 (fixup_go_packaging): Update.
2197 (process_full_comp_unit, process_full_type_unit): Update. Don't
2198 use scoped_free_pendings.
2199 (using_directives): Add "cu" parameter, remove "language".
2200 (read_import_statement, setup_type_unit_groups, )
2201 (read_func_scope, read_lexical_block_scope)
2202 (dwarf2_record_block_ranges, read_namespace): Update.
2203 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2204 (lnp_state_machine::handle_end_sequence): Update.
2205 (class lnp_state_machine) <m_cu>: New member.
2206 <m_record_line_callback>: Remove.
2207 <m_currently_recording_lines>: New member.
2208 (lnp_state_machine::handle_set_file): Update.
2209 (noop_record_line): Remove.
2210 (dwarf_record_line_p): Add cu parameter.
2211 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2212 (lnp_state_machine::record_line)
2213 (lnp_state_machine::lnp_state_machine)
2214 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2215 (dwarf_decode_lines): Update.
2216 (dwarf2_start_subfile): Add cu parameter.
2217 (dwarf2_start_symtab, new_symbol): Update.
2218 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2219 Remove dwarf2_per_objfile parameter.
2220 (dwarf_decode_macros): Update.
2221
2222 2018-07-20 Tom Tromey <tom@tromey.com>
2223
2224 * stabsread.c (define_symbol): Update.
2225 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2226 * dwarf2read.c (new_symbol): Update.
2227 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2228 * cp-namespace.c: Include buildsym.h.
2229 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2230 * buildsym-legacy.c (get_buildsym_compunit): New function.
2231
2232 2018-07-20 Tom Tromey <tom@tromey.com>
2233
2234 * xcoffread.c: Include buildsym-legacy.h.
2235 * windows-nat.c: Include buildsym-legacy.h.
2236 * stabsread.c: Include buildsym-legacy.h.
2237 * mdebugread.c: Include buildsym-legacy.h.
2238 * buildsym-legacy.h: New file.
2239 * buildsym-legacy.c: New file, from buildsym.c.
2240 * go32-nat.c: Include buildsym-legacy.h.
2241 * dwarf2read.c: Include buildsym-legacy.h.
2242 * dbxread.c: Include buildsym-legacy.h.
2243 * cp-namespace.c: Include buildsym-legacy.h.
2244 * coffread.c: Include buildsym-legacy.h.
2245 * buildsym.h: Move some contents to buildsym-legacy.h.
2246 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2247 buildsym-legacy.c.
2248 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2249
2250 2018-07-20 Tom Tromey <tom@tromey.com>
2251
2252 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2253 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2254 (buildsym_compunit::buildsym_compunit)
2255 (buildsym_compunit::~buildsym_compunit)
2256 (buildsym_compunit::get_macro_table): Define.
2257
2258 2018-07-20 Tom Tromey <tom@tromey.com>
2259
2260 * buildsym.c (reset_symtab_globals): Remove.
2261 (buildsym_compunit::end_symtab_from_static_block): Update.
2262 (buildsym_compunit::augment_type_symtab): Update.
2263 (end_symtab_from_static_block): Call free_buildsym_compunit.
2264 (augment_type_symtab, end_symtab, end_expandable_symtab):
2265 Likewise.
2266
2267 2018-07-20 Tom Tromey <tom@tromey.com>
2268
2269 * arch-utils.c: Do not include buildsym.h.
2270 * mipsread.c: Do not include buildsym.h.
2271 * machoread.c: Do not include buildsym.h.
2272 * elfread.c: Do not include buildsym.h.
2273
2274 2018-07-20 Tom Tromey <tom@tromey.com>
2275
2276 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2277 initialization.
2278 (buildsym_compunit): Add new constructor.
2279 (struct buildsym_compunit) <get_last_source_file, finish_block,
2280 record_block_range, start_subfile, patch_subfile_names,
2281 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2282 set_last_source_start_addr, get_last_source_start_addr,
2283 get_local_using_directives, set_local_using_directives,
2284 get_global_using_directives, outermost_context_p,
2285 get_current_context_stack, get_context_stack_depth,
2286 get_current_subfile, get_local_symbols, get_file_symbols,
2287 get_global_symbols, record_debugformat, record_producer,
2288 push_context, pop_context, end_symtab_get_static_block,
2289 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2290 New public methods.
2291 <record_pending_block, finish_block_internal, make_blockvector,
2292 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2293 private methods.
2294 Update all users.
2295
2296 2018-05-22 Tom Tromey <tom@tromey.com>
2297
2298 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2299 parameter.
2300 (finish_block_internal): Update.
2301
2302 2018-07-20 Tom Tromey <tom@tromey.com>
2303
2304 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2305 parameter.
2306 (finish_block_internal): Update.
2307
2308 2018-07-20 Tom Tromey <tom@tromey.com>
2309
2310 * buildsym.h (EXTERN): Don't define or undef.
2311 * buildsym.c (EXTERN): Don't define.
2312
2313 2018-07-20 Tom Tromey <tom@tromey.com>
2314
2315 * buildsym.c: Remove TODO comment.
2316
2317 2018-07-20 Tom Tromey <tom@tromey.com>
2318
2319 * coffread.c (coff_symtab_read): Update.
2320 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2321 (xcoff_new_init): Update.
2322 * mipsread.c (mipscoff_new_init): Update.
2323 * mdebugread.c (mdebug_build_psymtabs): Update.
2324 * elfread.c (elf_new_init): Update.
2325 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2326 Update.
2327 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2328 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2329 (stabsect_build_psymtabs): Update.
2330 * buildsym.h (buildsym_init): Don't declare.
2331 * buildsym.c: Update comment.
2332 (prepare_for_building): Remove.
2333 (start_symtab, restart_symtab): Update.
2334 (reset_symtab_globals): Update comment.
2335 (buildsym_init): Remove.
2336
2337 2018-07-20 Tom Tromey <tom@tromey.com>
2338
2339 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2340 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2341 (read_enum_type, common_block_start, common_block_end)
2342 (cleanup_undefined_types_1, finish_global_stabs): Update.
2343 * mdebugread.c (psymtab_to_symtab_1): Update.
2344 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2345 (read_lexical_block_scope, new_symbol): Update.
2346 * dbxread.c (process_one_symbol): Update.
2347 * coffread.c (coff_symtab_read, process_coff_symbol)
2348 (coff_read_enum_type): Update.
2349 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2350 declare.
2351 (get_local_symbols, get_file_symbols, get_global_symbols): New
2352 functions.
2353 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2354 m_global_symbols.
2355 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2356 (~scoped_free_pendings): Update.
2357 (finish_block, prepare_for_building, reset_symtab_globals)
2358 (end_symtab_get_static_block, end_symtab_with_blockvector)
2359 (augment_type_symtab, push_context): Update.
2360 (get_local_symbols, get_file_symbols, get_global_symbols): New
2361 functions.
2362 (buildsym_init): Update.
2363
2364 2018-07-20 Tom Tromey <tom@tromey.com>
2365
2366 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2367 (process_full_type_unit): Likewise.
2368 (dwarf2_start_symtab): Set list_in_scope.
2369
2370 2018-07-20 Tom Tromey <tom@tromey.com>
2371
2372 * dwarf2read.c (process_psymtab_comp_unit_reader)
2373 (build_type_psymtabs_reader): Do not set list_in_scope.
2374
2375 2018-07-20 Tom Tromey <tom@tromey.com>
2376
2377 * buildsym.c (free_pendings): Remove.
2378 (add_symbol_to_list, scoped_free_pendings)
2379 (finish_block_internal, buildsym_init): Update.
2380
2381 2018-07-20 Tom Tromey <tom@tromey.com>
2382
2383 * xcoffread.c (read_xcoff_symtab): Update.
2384 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2385 Update.
2386 * dbxread.c (process_one_symbol): Update.
2387 * coffread.c (coff_symtab_read): Update.
2388 * buildsym.h (finish_block): Update.
2389 * buildsym.c (finish_block): Remove "listhead" argument.
2390 (end_symtab_get_static_block): Update.
2391
2392 2018-07-20 Tom Tromey <tom@tromey.com>
2393
2394 * buildsym.h (class scoped_free_pendings): Remove constructor.
2395 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2396 method.
2397 <m_pending_block_obstack, m_pending_blocks>: New members.
2398 (pending_block_obstack, pending_blocks): Remove.
2399 (scoped_free_pendings::scoped_free_pendings): Default.
2400 (~scoped_free_pendings): Update.
2401 (free_pending_blocks): Remove.
2402 (finish_block_internal, record_pending_block, make_blockvector)
2403 (end_symtab_get_static_block, augment_type_symtab, push_context)
2404 (buildsym_init): Update.
2405
2406 2018-07-20 Tom Tromey <tom@tromey.com>
2407
2408 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2409 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2410 members.
2411 (pending_addrmap, pending_addrmap_obstack)
2412 (pending_addrmap_interesting): Remove.
2413 (scoped_free_pendings, record_block_range, make_blockvector)
2414 (prepare_for_building, reset_symtab_globals, buildsym_init):
2415 Update.
2416
2417 2018-07-20 Tom Tromey <tom@tromey.com>
2418
2419 * xcoffread.c (process_linenos): Update.
2420 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2421 * mdebugread.c (psymtab_to_symtab_1): Update.
2422 * dwarf2read.c (setup_type_unit_groups)
2423 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2424 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2425 * dbxread.c (process_one_symbol): Update.
2426 * coffread.c (coff_symtab_read, enter_linenos)
2427 (process_coff_symbol): Update.
2428 * buildsym.h (current_subfile): Don't declare.
2429 (get_current_subfile): Declare.
2430 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2431 member.
2432 (start_subfile, free_buildsym_compunit, push_subfile)
2433 (prepare_for_building, start_symtab): Update.
2434 (get_current_subfile): New function.
2435
2436 2018-07-20 Tom Tromey <tom@tromey.com>
2437
2438 * coffread.c (coff_symtab_read): Update.
2439 * xcoffread.c (read_xcoff_symtab): Update.
2440 * dwarf2read.c (new_symbol): Update.
2441 (read_func_scope, read_lexical_block_scope): Update.
2442 * dbxread.c (process_one_symbol): Update.
2443 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2444 (outermost_context_p): Remove macro.
2445 (outermost_context_p, get_current_context_stack)
2446 (get_context_stack_depth): Declare.
2447 (pop_context): Return struct context_stack.
2448 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2449 member.
2450 (context_stack_size): Remove.
2451 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2452 (prepare_for_building, end_symtab_get_static_block)
2453 (augment_type_symtab, push_context): Update.
2454 (pop_context): Return struct context_stack.
2455 (outermost_context_p, get_current_context_stack)
2456 (get_context_stack_depth): New functions.
2457 (buildsym_init): Update.
2458
2459 2018-07-20 Tom Tromey <tom@tromey.com>
2460
2461 * rust-exp.y: Now a pure parser. Update all rules.
2462 (%union): Move earlier.
2463 (current_parser, work_obstack): Remove globals.
2464 (rust_parser, ~rust_parser): Update.
2465 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2466 lex_character, lex_number, lex_string, lex_identifier,
2467 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2468 convert_name, convert_params_to_expression,
2469 convert_ast_to_expression, ast_basic_type, ast_operation,
2470 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2471 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2472 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2473 ast_array_type, ast_slice_type, ast_reference_type,
2474 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2475 (rust_parse): Update.
2476 (rustyyerror, rustyylex): Add parser parameter.
2477 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2478 (rust_lex_stringish_test, rust_lex_test_sequence)
2479 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2480 (rust_lex_test_push_back, rust_lex_tests): Update.
2481
2482 2018-07-19 Pedro Alves <palves@redhat.com>
2483
2484 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2485 gdb::unique_xmalloc_ptr.
2486 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2487 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2488 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2489 copy-initialization.
2490 * guile/scm-pretty-print.c (ppscm_print_children): Use
2491 gdb::unique_xmalloc_ptr instead of cleanups.
2492 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2493 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2494 gdb::unique_xmalloc_ptr.
2495 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2496 Adjust to use gdb::unique_xmalloc_ptr.
2497 * guile/scm-utils.c (extract_arg): Adjust.
2498 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2499 gdb::unique_xmalloc_ptr instead of a cleanup.
2500
2501 2018-07-19 Tom Tromey <tom@tromey.com>
2502
2503 * utils.c (do_value_free_to_mark)
2504 (make_cleanup_value_free_to_mark): Remove.
2505 * utils.h (make_cleanup_value_free_to_mark): Remove.
2506
2507 2018-07-19 Pedro Alves <palves@redhat.com>
2508
2509 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2510 forwarding reference.
2511
2512 2018-07-18 Pedro Alves <palves@redhat.com>
2513
2514 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2515 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2516 cleanup.
2517
2518 2018-07-18 Pedro Alves <palves@redhat.com>
2519
2520 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2521 exceptions.
2522 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2523 (gdbscm_wrap): New.
2524 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2525 directly instead of a cleanup.
2526 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2527 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2528 (vlscm_binop_gdbthrow): New, factored out from ...
2529 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2530 (vlscm_rich_compare): Use gdbscm_wrap.
2531 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2532 instead of a cleanup.
2533 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2534 cleanup.
2535 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2536 Use xfree directly instead of a cleanup.
2537 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2538 Adjust to use gdbscm_wrap and scoped_value_mark.
2539 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2540 (gdbscm_value_address, gdbscm_value_dereference)
2541 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2542 scoped_value_mark.
2543 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2544 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2545 scoped_value_mark.
2546 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2547 gdbscm_wrap and scoped_value_mark.
2548 (gdbscm_value_to_string): Use xfree directly instead of a
2549 cleanup. Move 'buffer' unique_ptr to TRY scope.
2550 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2551 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2552 scoped_value_mark.
2553 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2554 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2555 scoped_value_mark.
2556 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2557 gdbscm_wrap.
2558
2559 2018-07-18 Tom de Vries <tdevries@suse.de>
2560
2561 * findvar.c (default_read_var_value): Also resolve dynamic type for
2562 LOC_OPTIMIZED_OUT vars.
2563
2564 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2565
2566 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2567 decoding.
2568
2569 2018-07-17 Tom Tromey <tom@tromey.com>
2570
2571 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2572 (compute_enum_list, pascm_set_param_value_x)
2573 (gdbscm_parameter_value): Update.
2574 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2575 (gdbscm_scm_to_host_string): Update.
2576 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2577 Update.
2578 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2579 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2580 * guile/scm-string.c (gdbscm_scm_to_string): Return
2581 unique_xmalloc_ptr.
2582 (gdbscm_scm_to_host_string): Likewise.
2583
2584 2018-07-17 Tom Tromey <tom@tromey.com>
2585
2586 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2587 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2588 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2589 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2590 unique_xmalloc_ptr.
2591
2592 2018-07-17 Tom Tromey <tom@tromey.com>
2593
2594 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2595 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2596 Update.
2597 * guile/scm-cmd.c (cmdscm_function): Update.
2598 * guile/scm-pretty-print.c
2599 (ppscm_print_exception_unless_memory_error): Update.
2600 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2601 Return unique_xmalloc_ptr.
2602
2603 2018-07-17 Tom Tromey <tom@tromey.com>
2604
2605 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2606 Use string_printf.
2607
2608 2018-07-17 Jim Wilson <jimw@sifive.com>
2609
2610 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2611 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2612 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2613 unecessary braces after EF_RISCV_RVC test. Delete call to
2614 set_gdbarch_decr_pc_after_break.
2615
2616 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2617 RISCV_LAST_FP_REGNUM + 1.
2618 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2619
2620 2018-07-17 Tom Tromey <tom@tromey.com>
2621
2622 * configure.ac: Remove --disable-gdbcli.
2623 * configure: Rebuild.
2624 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2625 (SUBDIR_CLI_CFLAGS): Remove.
2626 (SFILES): Use SUBDIR_CLI_SRCS.
2627 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2628
2629 2018-07-17 Tom Tromey <tom@tromey.com>
2630
2631 PR gdb/18624:
2632 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2633
2634 2018-07-16 Jim Wilson <jimw@sifive.com>
2635
2636 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2637
2638 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2641 variable.
2642 (libunwind_frame_sniffer): Likewise.
2643 (libunwind_frame_prev_register): Likewise.
2644 (libunwind_sigtramp_frame_sniffer): Likewise.
2645 * ia64-tdep.c (ia64_access_reg): Likewise.
2646 (ia64_access_rse_reg): Likewise.
2647 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2648 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2649
2650 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2651
2652 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2653
2654 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2655
2656 * remote-sim.c (gdbsim_target::close,
2657 gdbsim_target::mourn_inferior): Remove unused variables.
2658
2659 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2660
2661 * ia64-tdep.c (ktab_buf): New global.
2662 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2663 (get_kernel_table): Adjust.
2664
2665 2018-07-16 Tom Tromey <tom@tromey.com>
2666
2667 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2668 * dwarf2read.c (using_directives, new_symbol): Use
2669 outermost_context_p.
2670 * dbxread.c (process_one_symbol): Use outermost_context_p.
2671 * coffread.c (coff_symtab_read): Use outermost_context_p.
2672
2673 2018-07-16 Tom Tromey <tom@tromey.com>
2674
2675 * dwarf2read.c (using_directives, read_func_scope)
2676 (read_lexical_block_scope): Update.
2677 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2678 * buildsym.h (local_using_directives, global_using_directives):
2679 Don't declare.
2680 (get_local_using_directives, set_local_using_directives)
2681 (get_global_using_directives): Declare.
2682 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2683 m_global_using_directives>: New members.
2684 (finish_block_internal, prepare_for_building)
2685 (reset_symtab_globals, end_symtab_get_static_block)
2686 (push_context): Update.
2687 (get_local_using_directives, set_local_using_directives)
2688 (get_global_using_directives): New functions.
2689 (buildsym_init): Update.
2690
2691 2018-07-16 Tom Tromey <tom@tromey.com>
2692
2693 * xcoffread.c (xcoff_initial_scan): Don't call
2694 free_pending_blocks.
2695 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2696 * buildsym.h (class scoped_free_pendings): Add constructor.
2697 (free_pending_blocks): Don't declare.
2698 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2699 (free_pending_blocks): Now static.
2700
2701 2018-07-16 Tom Tromey <tom@tromey.com>
2702
2703 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2704 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2705 member.
2706 (struct subfile_stack): Remove.
2707 (subfile_stack): Remove.
2708 (push_subfile, pop_subfile, buildsym_init): Update.
2709
2710 2018-07-16 Tom Tromey <tom@tromey.com>
2711
2712 * buildsym.c (push_subfile): Use gdb_assert.
2713 (pop_subfile): Use gdb_assert.
2714
2715 2018-07-16 Tom Tromey <tom@tromey.com>
2716
2717 * buildsym.h (merge_symbol_lists): Remove.
2718 * buildsym.c (merge_symbol_lists): Remove.
2719
2720 2018-07-16 Tom Tromey <tom@tromey.com>
2721
2722 * stabsread.c (scan_file_globals): Update comment.
2723 * stabsread.h (scan_file_globals): Move from buildsym.h.
2724 * buildsym.h (scan_file_globals): Move to stabsread.h.
2725
2726 2018-07-16 Tom Tromey <tom@tromey.com>
2727
2728 * xcoffread.c (xcoff_new_init): Update.
2729 * mipsread.c (mipscoff_new_init): Update.
2730 * mdebugread.c (mdebug_build_psymtabs): Update.
2731 * elfread.c (elf_new_init): Update.
2732 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2733 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2734 * buildsym.h (buildsym_new_init): Don't declare.
2735 * buildsym.c (buildsym_new_init): Remove.
2736
2737 2018-07-16 Tom Tromey <tom@tromey.com>
2738
2739 * stabsread.h (within_function): Move from buildsym.h.
2740 * stabsread.c (start_stabs): Clear within_function.
2741 * coffread.c (coff_start_symtab): Clear within_function.
2742 * buildsym.h (within_function): Move to stabsread.h.
2743 * buildsym.c (prepare_for_building): Update.
2744
2745 2018-07-16 Tom Tromey <tom@tromey.com>
2746
2747 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2748 * dwarf2read.c (dwarf2_start_symtab): Don't set
2749 processing_gcc_compilation.
2750 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2751
2752 2018-07-16 Tom Tromey <tom@tromey.com>
2753
2754 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2755 (next_symbol_text_func): Move from buildsym.h.
2756 * stabsread.c (hashname): Move from buildsym.c.
2757 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2758 (next_symbol_text_func, hashname): Move to stabsread.h.
2759 * buildsym.c: Don't include bcache.h
2760 (hashname): Move to stasbread.c.
2761
2762 2018-07-16 Tom Tromey <tom@tromey.com>
2763
2764 * buildsym.h (context_stack_size): Don't declare.
2765 * buildsym.c (context_stack_size): New global.
2766
2767 2018-07-16 Tom Tromey <tom@tromey.com>
2768
2769 * dbxread.c (processing_acc_compilation): New global.
2770 * buildsym.h (processing_acc_compilation): Don't declare.
2771
2772 2018-07-16 Tom Tromey <tom@tromey.com>
2773
2774 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2775 * dbxread.c (read_ofile_symtab): Update.
2776 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2777 * buildsym.h (last_source_start_addr): Remove.
2778 (set_last_source_start_addr, get_last_source_start_addr):
2779 Declare.
2780 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2781 parameter.
2782 (struct buildsym_compunit) <m_last_source_start_addr>: New
2783 member.
2784 (prepare_for_building): Remove start_addr parameter.
2785 (start_symtab, restart_symtab, end_symtab_get_static_block)
2786 (end_symtab_with_blockvector): Update.
2787 (set_last_source_start_addr, get_last_source_start_addr): New
2788 functions.
2789
2790 2018-07-16 Tom Tromey <tom@tromey.com>
2791
2792 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2793 member.
2794 (have_line_numbers): Remove.
2795 (record_line, prepare_for_building, end_symtab_get_static_block)
2796 (augment_type_symtab): Update.
2797
2798 2018-07-16 Tom Tromey <tom@tromey.com>
2799
2800 * buildsym.c (~buildsym_compunit): Free the macro table.
2801 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2802 methods.
2803 <m_pending_macros>: New member.
2804 (pending_macros): Remove.
2805 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2806 (reset_symtab_globals, end_symtab_get_static_block)
2807 (end_symtab_with_blockvector, augment_type_symtab)
2808 (buildsym_init): Update.
2809
2810 2018-07-16 Tom Tromey <tom@tromey.com>
2811
2812 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2813 parameter.
2814 (buildsym_compunit::set_last_source_file): New method.
2815 <m_last_source_file>: New member.
2816 (prepare_for_building): Remove "name" parameter.
2817 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2818 (last_source_file): Remove.
2819 (set_last_source_file, get_last_source_file): Update.
2820
2821 2018-07-16 Tom Tromey <tom@tromey.com>
2822
2823 * buildsym.c (prepare_for_building): Add assert.
2824
2825 2018-07-16 Tom Tromey <tom@tromey.com>
2826
2827 * buildsym.c (~buildsym_compunit): Update.
2828 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2829 (start_subfile, patch_subfile_names)
2830 (end_symtab_with_blockvector): Update.
2831
2832 2018-07-16 Tom Tromey <tom@tromey.com>
2833
2834 * buildsym.c (struct buildsym_compunit): Add constructor,
2835 destructor, initializers.
2836 (start_buildsym_compunit): Remove.
2837 (free_buildsym_compunit): Use "delete".
2838 (start_symtab, restart_symtab): Use "new".
2839
2840 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * symfile.c (set_objfile_default_section_offset): Remove struct
2843 keyword.
2844
2845 2018-07-14 Stafford Horne <shorne@gmail.com>
2846
2847 * (Responsible Maintainers): Add myself as or1k maintainer.
2848
2849 2018-07-13 Tom Tromey <tom@tromey.com>
2850
2851 * symfile.c (set_objfile_default_section_offset): Use extra braces
2852 around initializer.
2853
2854 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2855
2856 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2857 non-branching basr.
2858
2859 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2860
2861 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2862 unittests/cli-utils-selftests.c
2863 * unittests/cli-utils-selftests.c: New file.
2864
2865 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2866
2867 * NEWS: Mention new commands. Mention change to 'thread apply'.
2868
2869 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2870
2871 * thread.c (thr_try_catch_cmd): New function.
2872 (thread_apply_all_command): Handle qcs flags.
2873 (thread_apply_command): Handle qcs flags.
2874 (taas_command): New function.
2875 (tfaas_command): New function.
2876 (_initialize_thread): Update to setup the new commands 'taas
2877 and 'tfaas'. Change doc string for 'thread apply'.
2878
2879 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2880
2881 * stack.c: (trailing_outermost_frame): New function, mostly
2882 extracted from backtrace_command_1.
2883 (leading_innermost_frame): New function.
2884 (backtrace_command_1): Update to call trailing_outermost_frame.
2885 (frame_apply_command_count): New function.
2886 (frame_apply_level_command): New function.
2887 (frame_apply_all_command): New function.
2888 (frame_apply_command): New function.
2889 (faas_command): New function.
2890 (frame_cmd_list): New variable.
2891 (_initialize_stack): Update to setup the new commands 'frame apply'
2892 and 'faas'.
2893
2894 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2895
2896 * cli-utils.c (number_or_range_parser::get_number): Only handle
2897 numbers or convenience var as numbers.
2898 (parse_flags): New function.
2899 (parse_flags_qcs): New function.
2900 (number_or_range_parser::finished): Ensure parsing end is detected
2901 before end of string.
2902 * cli-utils.h (parse_flags): New function.
2903 (parse_flags_qcs): New function.
2904 (number_or_range_parser): Remove m_finished bool.
2905 (number_or_range_parser::skip_range): Set m_in_range to false.
2906
2907 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2908
2909 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2910 on Windows.
2911
2912 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2913 Jan Kratochvil <jan.kratochvil@redhat.com>
2914 Paul Fertser <fercerpav@gmail.com>
2915 Tsutomu Seki <sekiriki@gmail.com>
2916 Pedro Alves <palves@redhat.com>
2917
2918 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2919 'unittests/parse-connection-spec-selftests.c'.
2920 (COMMON_SFILES): Add 'common/netstuff.c'.
2921 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2922 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2923 * common/netstuff.c: New file.
2924 * common/netstuff.h: New file.
2925 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2926 (wait_for_connect): Update comment. New parameter
2927 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2928 Use 'sock' directly instead of 'scb->fd'.
2929 (try_connect): New function, with code from 'net_open'.
2930 (net_open): Rewrite main loop to deal with multiple
2931 sockets/addresses. Handle IPv6-style hostnames; implement
2932 support for IPv6 connections.
2933 * unittests/parse-connection-spec-selftests.c: New file.
2934
2935 2018-07-11 Pedro Alves <palves@redhat.com>
2936
2937 PR gdb/23377
2938 * remote.c (remote_target::remote_detach_pid): Call
2939 set_current_process.
2940
2941 2018-07-11 Pedro Alves <palves@redhat.com>
2942
2943 * h8300-tdep.c (h8300_gdbarch_init): Remove
2944 set_gdbarch_ecoff_reg_to_regnum calls.
2945
2946 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2947
2948 PR c++/23373
2949 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2950 offsets/sizes for static members of a class/struct.
2951
2952 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2953
2954 * target-descriptions.c (tdesc_register_bitsize): Rename.
2955 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2956 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2957 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2958
2959 2018-07-10 Tom Tromey <tom@tromey.com>
2960
2961 * breakpoint.c (moribund_locations): Now static and a
2962 std::vector.
2963 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2964 (build_bpstat_chain, update_global_location_list)
2965 (breakpoint_retire_moribund): Update.
2966 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2967 VEC.
2968
2969 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2970
2971 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2972 (riscv_register_reggroup_p): Use new function, remove unneeded
2973 parenthesis.
2974 (riscv_push_dummy_call): Extend assert to compare against xlen or
2975 flen based on register type.
2976
2977 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2978
2979 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2980
2981 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2982
2983 * remote.c (show_hardware_watchpoint_limit): New function.
2984 (show_hardware_watchpoint_length_limit): New function.
2985 (show_hardware_breakpoint_limit): New function.
2986 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2987 where appropriate, update help text.
2988
2989 2018-07-09 Tom Tromey <tom@tromey.com>
2990
2991 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2992 (CLIBS): Don't mention NAT_CLIBS.
2993
2994 2018-07-09 Tom Tromey <tom@tromey.com>
2995
2996 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2997 (LIBGDB_OBS, clean mostlyclean): Update.
2998 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2999
3000 2018-07-09 Tom Tromey <tom@tromey.com>
3001
3002 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3003 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3004 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3005
3006 2018-07-09 Tom Tromey <tom@tromey.com>
3007
3008 * Makefile.in (ALLDEPFILES): Remove exec.c.
3009 (COMMON_OBS): Remove exec.o.
3010 (COMMON_SFILES): Add exec.c.
3011
3012 2018-07-09 Tom Tromey <tom@tromey.com>
3013
3014 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3015
3016 2018-07-09 Tom Tromey <tom@tromey.com>
3017
3018 * Makefile.in (clean mostlyclean): Remove stamp-version.
3019 (version.c): Depend on stamp-version.
3020 (stamp-version): New rule, from version.c rule.
3021
3022 2018-07-09 Tom Tromey <tom@tromey.com>
3023
3024 * Makefile.in (init.c): Depend on stamp-init.
3025 (stamp-init): New rule, from init.c rule.
3026 (clean mostlyclean): Remove stamp-init.
3027
3028 2018-07-09 Tom Tromey <tom@tromey.com>
3029
3030 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3031 SUBDIR_GCC_COMPILE_SRCS.
3032
3033 2018-07-09 Tom Tromey <tom@tromey.com>
3034
3035 * Makefile.in (init.c): Remove some unused sed rules.
3036
3037 2018-07-09 Tom Tromey <tom@tromey.com>
3038
3039 * Makefile.in (TSOBS): Remove.
3040 (INIT_FILES): Update.
3041 (LIBGDB_OBS): Update.
3042 (COMMON_SFILES): Add inflow.c.
3043 (SFILES): Remove inflow.c.
3044
3045 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3046
3047 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3048
3049 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3050
3051 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3052 get_saveloc_name, is_signal_frame_name, step_name,
3053 init_remote_name, create_addr_space_name,
3054 destroy_addr_space_name, search_unwind_table_name,
3055 find_dyn_list_name): Constify.
3056
3057 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * darwin-nat.c (darwin_pthread_kill): New function.
3060 (darwin_resume_thread): Use darwin_pthread_kill.
3061
3062 2018-07-05 Tom de Vries <tdevries@suse.de>
3063
3064 * macroexp.c (macro_buffer) <operator=>: New member function.
3065
3066 2018-07-04 Tom Tromey <tom@tromey.com>
3067
3068 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3069
3070 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3071
3072 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3073 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3074 * maint.c: Likewise.
3075 * top.c: Likewise.
3076
3077 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3078
3079 * NEWS: Create a new section for the next release branch.
3080 Rename the section of the current branch, now that it has
3081 been cut.
3082
3083 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3084
3085 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3086 * version.in: Bump version to 8.2.50.DATE-git.
3087
3088 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3089 Pedro Alves <palves@redhat.com>
3090
3091 * linux-nat.c (linux_init_ptrace): Rename to ...
3092 (linux_init_ptrace_procfs): ... this. Call
3093 linux_proc_init_warnings.
3094 (linux_nat_target::post_attach)
3095 (linux_nat_target::post_startup_inferior): Adjust.
3096 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3097 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3098
3099 2018-07-04 Tom de Vries <tdevries@suse.de>
3100
3101 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3102 check ...
3103 (read_comp_unit_head): ... here.
3104
3105 2018-07-03 Tom Tromey <tom@tromey.com>
3106
3107 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3108 (stop_tracing, tstatus_command)
3109 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3110 (print_one_static_tracepoint_marker): Update.
3111 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3112 std::vector.
3113 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3114 VEC.
3115 (all_tracepoints, static_tracepoints_here): Return std::vector.
3116
3117 2018-07-03 Tom Tromey <tom@tromey.com>
3118
3119 * common/ptid.c (ptid_equal): Remove.
3120 * common/ptid.h (ptid_equal): Don't declare.
3121 * ada-tasks.c: Update.
3122 * breakpoint.c: Update.
3123 * common/agent.c: Update.
3124 * corelow.c: Update.
3125 * darwin-nat-info.c: Update.
3126 * darwin-nat.c: Update.
3127 * dcache.c: Update.
3128 * dtrace-probe.c: Update.
3129 * dummy-frame.c: Update.
3130 * fbsd-nat.c: Update.
3131 * frame.c: Update.
3132 * gdbthread.h: Update.
3133 * gnu-nat.c: Update.
3134 * go32-nat.c: Update.
3135 * inf-loop.c: Update.
3136 * inf-ptrace.c: Update.
3137 * infcall.c: Update.
3138 * infcmd.c: Update.
3139 * inflow.c: Update.
3140 * infrun.c: Update.
3141 * linux-fork.c: Update.
3142 * linux-nat.c: Update.
3143 * linux-thread-db.c: Update.
3144 * mi/mi-cmd-var.c: Update.
3145 * mi/mi-interp.c: Update.
3146 * mi/mi-main.c: Update.
3147 * nto-procfs.c: Update.
3148 * ppc-linux-tdep.c: Update.
3149 * procfs.c: Update.
3150 * python/py-inferior.c: Update.
3151 * python/py-record-btrace.c: Update.
3152 * python/py-record.c: Update.
3153 * ravenscar-thread.c: Update.
3154 * regcache.c: Update.
3155 * remote-sim.c: Update.
3156 * remote.c: Update.
3157 * sol-thread.c: Update.
3158 * solib.c: Update.
3159 * target.c: Update.
3160 * tui/tui-stack.c: Update.
3161 * varobj.c: Update.
3162 * windows-nat.c: Update.
3163 * windows-tdep.c: Update.
3164
3165 2018-07-03 Tom Tromey <tom@tromey.com>
3166
3167 * common/ptid.c (ptid_match): Remove.
3168 * common/ptid.h (ptid_match): Don't declare.
3169 * fbsd-nat.c: Update.
3170 * infcmd.c: Update.
3171 * infrun.c: Update.
3172 * linux-nat.c: Update.
3173 * record-btrace.c: Update.
3174 * regcache.c: Update.
3175 * remote.c: Update.
3176
3177 2018-07-03 Tom Tromey <tom@tromey.com>
3178
3179 * common/ptid.c (ptid_tid_p): Remove.
3180 * common/ptid.h (ptid_tid_p): Don't declare.
3181 * sol-thread.c: Update.
3182
3183 2018-07-03 Tom Tromey <tom@tromey.com>
3184
3185 * common/ptid.c (ptid_lwp_p): Remove.
3186 * common/ptid.h (ptid_lwp_p): Don't declare.
3187 * fbsd-nat.c: Update.
3188 * linux-nat.c: Update.
3189 * nat/linux-procfs.c: Update.
3190 * nat/x86-linux-dregs.c: Update.
3191 * sol-thread.c: Update.
3192
3193 2018-07-03 Tom Tromey <tom@tromey.com>
3194
3195 * common/ptid.c (ptid_is_pid): Remove.
3196 * common/ptid.h (ptid_is_pid): Don't declare.
3197 * infrun.c: Update.
3198 * linux-nat.c: Update.
3199 * mi/mi-interp.c: Update.
3200 * remote.c: Update.
3201 * thread.c: Update.
3202
3203 2018-07-03 Tom Tromey <tom@tromey.com>
3204
3205 * common/ptid.c (ptid_get_tid): Remove.
3206 * common/ptid.h (ptid_get_tid): Don't declare.
3207 * ada-tasks.c: Update.
3208 * aix-thread.c: Update.
3209 * bsd-uthread.c: Update.
3210 * darwin-nat.c: Update.
3211 * fbsd-nat.c: Update.
3212 * i386-darwin-nat.c: Update.
3213 * infrun.c: Update.
3214 * linux-tdep.c: Update.
3215 * nto-procfs.c: Update.
3216 * ppc-ravenscar-thread.c: Update.
3217 * python/py-infthread.c: Update.
3218 * ravenscar-thread.c: Update.
3219 * sol-thread.c: Update.
3220 * sparc-ravenscar-thread.c: Update.
3221 * windows-nat.c: Update.
3222
3223 2018-07-03 Tom Tromey <tom@tromey.com>
3224
3225 * common/ptid.c (ptid_get_lwp): Remove.
3226 * common/ptid.h (ptid_get_lwp): Don't declare.
3227 * aarch64-linux-nat.c: Update.
3228 * ada-tasks.c: Update.
3229 * aix-thread.c: Update.
3230 * amd64-linux-nat.c: Update.
3231 * arm-linux-nat.c: Update.
3232 * corelow.c: Update.
3233 * fbsd-nat.c: Update.
3234 * fbsd-tdep.c: Update.
3235 * gnu-nat.c: Update.
3236 * i386-cygwin-tdep.c: Update.
3237 * i386-gnu-nat.c: Update.
3238 * i386-linux-nat.c: Update.
3239 * ia64-linux-nat.c: Update.
3240 * inf-ptrace.c: Update.
3241 * infrun.c: Update.
3242 * linux-fork.c: Update.
3243 * linux-nat.c: Update.
3244 * linux-tdep.c: Update.
3245 * linux-thread-db.c: Update.
3246 * mips-linux-nat.c: Update.
3247 * nat/aarch64-linux-hw-point.c: Update.
3248 * nat/aarch64-linux.c: Update.
3249 * nat/linux-btrace.c: Update.
3250 * nat/linux-osdata.c: Update.
3251 * nat/linux-procfs.c: Update.
3252 * nat/x86-linux-dregs.c: Update.
3253 * obsd-nat.c: Update.
3254 * ppc-fbsd-nat.c: Update.
3255 * ppc-linux-nat.c: Update.
3256 * procfs.c: Update.
3257 * python/py-infthread.c: Update.
3258 * ravenscar-thread.c: Update.
3259 * remote.c: Update.
3260 * s390-linux-nat.c: Update.
3261 * sol-thread.c: Update.
3262 * sol2-tdep.c: Update.
3263 * spu-linux-nat.c: Update.
3264 * x86-linux-nat.c: Update.
3265 * xtensa-linux-nat.c: Update.
3266
3267 2018-07-03 Tom Tromey <tom@tromey.com>
3268
3269 * common/ptid.c (ptid_get_pid): Remove.
3270 * common/ptid.h (ptid_get_pid): Don't declare.
3271 * aarch64-linux-nat.c: Update.
3272 * ada-lang.c: Update.
3273 * aix-thread.c: Update.
3274 * alpha-bsd-nat.c: Update.
3275 * amd64-fbsd-nat.c: Update.
3276 * amd64-linux-nat.c: Update.
3277 * arm-linux-nat.c: Update.
3278 * arm-nbsd-nat.c: Update.
3279 * auxv.c: Update.
3280 * break-catch-syscall.c: Update.
3281 * breakpoint.c: Update.
3282 * bsd-uthread.c: Update.
3283 * corelow.c: Update.
3284 * ctf.c: Update.
3285 * darwin-nat.c: Update.
3286 * fbsd-nat.c: Update.
3287 * fbsd-tdep.c: Update.
3288 * gcore.c: Update.
3289 * gnu-nat.c: Update.
3290 * hppa-nbsd-nat.c: Update.
3291 * hppa-obsd-nat.c: Update.
3292 * i386-fbsd-nat.c: Update.
3293 * ia64-linux-nat.c: Update.
3294 * inf-ptrace.c: Update.
3295 * infcmd.c: Update.
3296 * inferior.c: Update.
3297 * inferior.h: Update.
3298 * inflow.c: Update.
3299 * infrun.c: Update.
3300 * linux-fork.c: Update.
3301 * linux-nat.c: Update.
3302 * linux-tdep.c: Update.
3303 * linux-thread-db.c: Update.
3304 * m68k-bsd-nat.c: Update.
3305 * mi/mi-interp.c: Update.
3306 * mi/mi-main.c: Update.
3307 * mips-linux-nat.c: Update.
3308 * mips-nbsd-nat.c: Update.
3309 * mips64-obsd-nat.c: Update.
3310 * nat/aarch64-linux-hw-point.c: Update.
3311 * nat/aarch64-linux.c: Update.
3312 * nat/linux-btrace.c: Update.
3313 * nat/linux-osdata.c: Update.
3314 * nat/linux-procfs.c: Update.
3315 * nat/x86-linux-dregs.c: Update.
3316 * nto-procfs.c: Update.
3317 * obsd-nat.c: Update.
3318 * ppc-linux-nat.c: Update.
3319 * ppc-nbsd-nat.c: Update.
3320 * ppc-obsd-nat.c: Update.
3321 * proc-service.c: Update.
3322 * procfs.c: Update.
3323 * python/py-inferior.c: Update.
3324 * python/py-infthread.c: Update.
3325 * ravenscar-thread.c: Update.
3326 * record.c: Update.
3327 * remote-sim.c: Update.
3328 * remote.c: Update.
3329 * rs6000-nat.c: Update.
3330 * s390-linux-nat.c: Update.
3331 * sh-nbsd-nat.c: Update.
3332 * sol-thread.c: Update.
3333 * sparc-nat.c: Update.
3334 * sparc64-tdep.c: Update.
3335 * spu-linux-nat.c: Update.
3336 * spu-tdep.c: Update.
3337 * target-debug.h: Update.
3338 * target.c: Update.
3339 * thread.c: Update.
3340 * tid-parse.c: Update.
3341 * tracefile-tfile.c: Update.
3342 * vax-bsd-nat.c: Update.
3343 * windows-nat.c: Update.
3344 * x86-linux-nat.c: Update.
3345 * x86-nat.c: Update.
3346
3347 2018-07-03 Tom Tromey <tom@tromey.com>
3348
3349 * common/ptid.c (pid_to_ptid): Remove.
3350 * common/ptid.h (pid_to_ptid): Don't declare.
3351 * aix-thread.c: Update.
3352 * arm-linux-nat.c: Update.
3353 * common/ptid.c: Update.
3354 * common/ptid.h: Update.
3355 * corelow.c: Update.
3356 * ctf.c: Update.
3357 * darwin-nat.c: Update.
3358 * fbsd-nat.c: Update.
3359 * fork-child.c: Update.
3360 * gnu-nat.c: Update.
3361 * go32-nat.c: Update.
3362 * inf-ptrace.c: Update.
3363 * infcmd.c: Update.
3364 * inferior.c: Update.
3365 * infrun.c: Update.
3366 * linux-fork.c: Update.
3367 * linux-nat.c: Update.
3368 * nat/aarch64-linux-hw-point.c: Update.
3369 * nat/fork-inferior.c: Update.
3370 * nat/x86-linux-dregs.c: Update.
3371 * nto-procfs.c: Update.
3372 * obsd-nat.c: Update.
3373 * procfs.c: Update.
3374 * progspace.c: Update.
3375 * remote.c: Update.
3376 * rs6000-nat.c: Update.
3377 * s390-linux-nat.c: Update.
3378 * sol-thread.c: Update.
3379 * spu-linux-nat.c: Update.
3380 * target.c: Update.
3381 * top.c: Update.
3382 * tracefile-tfile.c: Update.
3383 * windows-nat.c: Update.
3384
3385 2018-07-03 Tom Tromey <tom@tromey.com>
3386
3387 * common/ptid.h (ptid_build): Don't declare.
3388 * common/ptid.c (ptid_build): Remove.
3389 * aix-thread.c: Update.
3390 * bsd-kvm.c: Update.
3391 * bsd-uthread.c: Update.
3392 * common/agent.c: Update.
3393 * common/ptid.c: Update.
3394 * common/ptid.h: Update.
3395 * corelow.c: Update.
3396 * darwin-nat.c: Update.
3397 * fbsd-nat.c: Update.
3398 * gnu-nat.c: Update.
3399 * linux-fork.c: Update.
3400 * linux-nat.c: Update.
3401 * linux-thread-db.c: Update.
3402 * nat/linux-osdata.c: Update.
3403 * nat/linux-procfs.c: Update.
3404 * nto-procfs.c: Update.
3405 * obsd-nat.c: Update.
3406 * proc-service.c: Update.
3407 * procfs.c: Update.
3408 * ravenscar-thread.c: Update.
3409 * remote-sim.c: Update.
3410 * remote.c: Update.
3411 * sol-thread.c: Update.
3412 * target.c: Update.
3413 * windows-nat.c: Update.
3414
3415 2018-07-03 Tom Tromey <tom@tromey.com>
3416
3417 * infrun.c (follow_exec): Use exit_inferior_silent.
3418 * inferior.c (exit_inferior_num_silent): Remove.
3419 * inferior.h (exit_inferior_num_silent): Don't declare.
3420
3421 2018-07-03 Tom Tromey <tom@tromey.com>
3422
3423 PR cli/23340:
3424 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3425 inferior_ptid on error.
3426
3427 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3428 Simon Marchi <simon.marchi@polymtl.ca>
3429
3430 PR tdep/8282
3431 * disasm.h (gdb_disassembler): Add
3432 `m_disassembler_options_holder'. member
3433 * disasm.c (get_all_disassembler_options): New function.
3434 (gdb_disassembler::gdb_disassembler): Use it.
3435 (gdb_buffered_insn_length_init_dis): Likewise.
3436 (gdb_buffered_insn_length): Adjust accordingly.
3437 (set_disassembler_options): Handle options with arguments.
3438 (show_disassembler_options_sfunc): Likewise. Add a leading new
3439 line if showing options with descriptions.
3440 (disassembler_options_completer): Adapt to using the
3441 `disasm_options_and_args_t' structure.
3442 * mips-tdep.c (mips_disassembler_options): New variable.
3443 (mips_disassembler_options_o32): Likewise.
3444 (mips_disassembler_options_n32): Likewise.
3445 (mips_disassembler_options_n64): Likewise.
3446 (gdb_print_insn_mips): Don't set `disassembler_options'.
3447 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3448 functions.
3449 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3450 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3451 `gdbarch_disassembler_options_implicit' and
3452 `gdbarch_valid_disassembler_options'.
3453 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3454 `disasm_options_and_args_t' structure.
3455 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3456 method.
3457 (valid_disassembler_options): Switch from `disasm_options_t' to
3458 the `disasm_options_and_args_t' structure.
3459 * NEWS: Document `set disassembler-options' support for the MIPS
3460 target.
3461 * gdbarch.h: Regenerate.
3462 * gdbarch.c: Regenerate.
3463
3464 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3465
3466 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3467
3468 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3469
3470 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3471 parameter in call to amd64_target_description.
3472 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3473 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3474 (amd64fbsd_init_abi): Likewise.
3475 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3476 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3477 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3478 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3479
3480 2018-06-29 Pedro Alves <palves@redhat.com>
3481
3482 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3483 "segments" parameter.
3484 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3485 (_initialize_amd64_tdep): Update call to
3486 amd64_create_target_description.
3487 (amd64_target_description): Add "segments" parameter. Adjust
3488 the implementation to use it.
3489 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3490 call to amd64_create_target_description.
3491 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3492 * gdb/arch/amd64.h (amd64_create_target_description): Add
3493 "segments" register.
3494 * gdb/arch/amd64.c (amd64_create_target_description): Add
3495 "segments" parameter. Call create_feature_i386_64bit_segments
3496 only if SEGMENTS is true.
3497 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3498 call to amd64_create_target_description.
3499
3500 2018-06-29 Pedro Alves <palves@redhat.com>
3501
3502 * thread.c (thread_target_id_str): New, factored out from ...
3503 (print_thread_info_1): ... here. Use it to compute the max
3504 "Target Id" column width.
3505
3506 2018-06-29 Pedro Alves <palves@redhat.com>
3507
3508 * remote.c (remote_target::extra_thread_info): Delete
3509 'display_buf' and 'n' locals. from the cache, regardless of
3510 packet mechanims is in use. Use cache for qThreadExtra and qP
3511 methods too.
3512
3513 2018-06-29 Pedro Alves <palves@redhat.com>
3514
3515 * blockframe.c (find_pc_sect_containing_function): New function.
3516 * breakpoint.c (print_breakpoint_location): Don't call
3517 find_pc_sect_function.
3518 * linespec.c (create_sals_line_offset): Record the location's
3519 symbol in the sal.
3520 * linespec.c (convert_address_location_to_sals): Fill in sal's
3521 symbol with find_pc_sect_containing_function.
3522 * symtab.c (find_function_start_sal): Rename to ...
3523 (find_function_start_sal_1): ... this.
3524 (find_function_start_sal): Reimplement as wrapper around
3525 find_function_start_sal_1, and use
3526 find_pc_sect_containing_function to fill in the sal's symbol.
3527 (find_function_start_sal(symbol*, bool)): Adjust.
3528 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3529 comments.
3530 (find_pc_sect_containing_function): Declare.
3531
3532 2018-06-29 Pedro Alves <palves@redhat.com>
3533
3534 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3535 true if the the location has no symbol.
3536
3537 2018-06-28 Tom Tromey <tom@tromey.com>
3538
3539 * NEWS: Mention --enable-codesign.
3540 * silent-rules.mk (ECHO_SIGN): New variable.
3541 * configure.ac: Add --enable-codesign.
3542 * configure: Rebuild.
3543 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3544 (gdb$(EXEEXT)): Optionally invoke codesign.
3545
3546 2018-06-28 Pedro Alves <palves@redhat.com>
3547
3548 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3549 comments.
3550 (switch_to_thread_no_regs): Adjust comment.
3551 * infcmd.c (stop_pc): Delete.
3552 (post_create_inferior, info_program_command): Replace references
3553 to stop_pc with references to thread_info->suspend.stop_pc.
3554 * inferior.h (stop_pc): Delete declaration.
3555 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3556 (handle_inferior_event_1, handle_signal_stop)
3557 (process_event_stop_test, keep_going_stepped_thread)
3558 (handle_step_into_function, handle_step_into_function_backward)
3559 (print_stop_location): Replace references to stop_pc with
3560 references to thread_info->suspend.stop_pc.
3561 (struct infcall_suspend_state) <stop_pc>: Delete field.
3562 (save_infcall_suspend_state, restore_infcall_suspend_state):
3563 Remove references to inf_stat->stop_pc.
3564 * linux-fork.c (fork_load_infrun_state): Likewise.
3565 * record-btrace.c (record_btrace_set_replay): Likewise.
3566 * record-full.c (record_full_goto_entry): Likewise.
3567 * remote.c (print_one_stopped_thread): Likewise.
3568 * target.c (target_resume): Extend comment.
3569 * thread.c (set_executing_thread): New.
3570 (set_executing): Use it.
3571 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3572 Remove references to stop_pc.
3573
3574 2018-06-28 Pedro Alves <palves@redhat.com>
3575
3576 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3577 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3578
3579 2018-06-28 Tom Tromey <tom@tromey.com>
3580
3581 * coffread.c (coff_symfile_finish): Update.
3582 * xcoffread.c (xcoff_symfile_finish): Update.
3583 * elfread.c (elf_symfile_finish): Update.
3584 * symfile.h (dwarf2_free_objfile): Don't declare.
3585 * dwarf2read.c (_initialize_dwarf2_read): Use
3586 register_objfile_data_with_cleanup.
3587 (dwarf2_free_objfile): Now static. Change signature.
3588
3589 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3590
3591 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3592 option "-o" to add-symbol-file-load to add an offset to each
3593 section's load address.
3594 * symfile.c (set_objfile_default_section_offset): New function.
3595
3596 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3597
3598 * symfile.c (add_symbol_file_command): Make sure that sections
3599 with the same name are sorted in the same order.
3600
3601 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3602
3603 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3604 require the second argument. If omitted, load sections at the
3605 addresses specified in the file.
3606
3607 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3608
3609 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3610 (_initialize_symfile): Add option "-o" to symbol-file to add an
3611 offset to each section of the symbol file.
3612
3613 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3614
3615 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3616
3617 2018-06-27 Tom Tromey <tom@tromey.com>
3618
3619 * stack.c (_initialize_stack): Update "func" help text.
3620
3621 2018-06-27 Tom Tromey <tom@tromey.com>
3622
3623 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3624 std::vector.
3625 (unwind_infopy_str, pyuw_create_unwind_info)
3626 (unwind_infopy_add_saved_register, pyuw_sniffer)
3627 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3628 Update.
3629 (struct saved_reg): Add constructor.
3630 <value>: Now a gdbpy_ref<>.
3631
3632 2018-06-27 Tom Tromey <tom@tromey.com>
3633
3634 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3635
3636 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * gdb-gdb.py.in: Format using autopep8.
3639
3640 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3641
3642 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3643 (type_lookup_function): Recognize CORE_ADDR values.
3644
3645 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3646
3647 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3648 print tag_name.
3649
3650 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3651
3652 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3653 <__lt__>: Add.
3654
3655 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * gdb-gdb.py: Move to...
3658 * gdb-gdb.py.in: ... here.
3659 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3660 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3661 dependencies.
3662 (distclean): Remove gdb-gdb.py when cleaning.
3663 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3664 * configure: Re-generate.
3665
3666 2018-06-27 Pedro Alves <palves@redhat.com>
3667
3668 * proc-service.c (get_ps_regcache): New.
3669 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3670 (ps_lsetfpregs): Use it.
3671
3672 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3673
3674 PR gdb/21695
3675 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3676 (dwarf_decode_lines_1): Adjust.
3677
3678 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3679
3680 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3681 override.
3682 <info_proc>: Likewise.
3683
3684 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3685
3686 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3687 to windows_fetch_one_register, and only handle the case of
3688 fetching one register. Move the code that reloads the context
3689 and iterates over all registers if R is negative to...
3690 (windows_nat_target::fetch_registers): ... here.
3691 (do_windows_store_inferior_registers): Rename to
3692 windows_store_one_register, and only handle the case of storing
3693 one register. Move the code that handles the case where r is
3694 negative to...
3695 (windows_nat_target::store_registers) ... here.
3696
3697 2018-06-26 Tom Tromey <tom@tromey.com>
3698
3699 PR rust/22574:
3700 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3701 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3702 Update.
3703 (rust_internal_print_type): Add podata parameter.
3704 (rust_print_type): Update.
3705
3706 2018-06-26 Tom Tromey <tom@tromey.com>
3707
3708 * typeprint.h (struct print_offset_data) <update, finish,
3709 maybe_print_hole>: New methods.
3710 <indentation>: New constant.
3711 * typeprint.c (print_offset_data::indentation): Define.
3712 (print_offset_data::maybe_print_hole, print_offset_data::update)
3713 (print_offset_data::finish): Move from c-typeprint.c and rename.
3714 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3715 (print_spaces_filtered_with_print_options): Update.
3716 (c_print_type_union_field_offset, maybe_print_hole)
3717 (c_print_type_struct_field_offset): Move to typeprint.c and
3718 rename.
3719 (c_type_print_base_struct_union): Update.
3720
3721 2018-06-25 Pedro Alves <palves@redhat.com>
3722
3723 * gdbthread.h (thread_info_ref, delete_thread)
3724 (delete_thread_silent, first_thread_of_inferior)
3725 (any_thread_of_inferior, switch_to_thread)
3726 (enable_thread_stack_temporaries)
3727 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3728 (get_last_thread_stack_temporary)
3729 (value_in_thread_stack_temporaries, can_access_registers_thread):
3730 Spell out "struct thread_info" instead of just "thread_info".
3731 * inferior.h (notice_new_inferior): Likewise.
3732
3733 2018-06-25 Pedro Alves <palves@redhat.com>
3734
3735 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3736 pass thread_info pointer to delete_thread.
3737 (windows_nat_target::detach): Pass inferior pointer to
3738 detach_inferior.
3739 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3740 delete_thread.
3741 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3742 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3743 and pass a thread_info pointer to delete_thread.
3744 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3745 pass thread_info pointer to delete_thread.
3746 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3747 delete_thread_silent call.
3748 * procfs.c (procfs_target::detach): Pass inferior pointer to
3749 detach_inferior.
3750 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3751 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3752 delete_thread_silent call.
3753 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3754 pass thread_info pointer to delete_thread.
3755 (windows_nat_target::detach): Pass inferior pointer to
3756 delete_inferior.
3757
3758 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3759
3760 * regcache.c (readable_regcache::read_part): Fix asserts.
3761 (reg_buffer::raw_collect_part): New function.
3762 (regcache::write_part): Fix asserts.
3763 (reg_buffer::raw_supply_part): New function.
3764 (regcache::transfer_regset_register): New helper function.
3765 (regcache::transfer_regset): Call new functions.
3766 (regcache_supply_regset): Use gdb_byte*.
3767 (regcache::supply_regset): Likewise.
3768 (regcache_collect_regset): Likewise.
3769 (regcache::collect_regset): Likewise.
3770 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3771 (reg_buffer::raw_supply_part): Likewise.
3772 (regcache::transfer_regset_register): Likewise.
3773 (regcache::transfer_regset): Use gdb_byte*.
3774
3775 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3776
3777 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3778
3779 2018-06-21 Pedro Alves <palves@redhat.com>
3780
3781 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3782 instead of a ptid_t. All callers adjusted.
3783 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3784 adjusted.
3785 (print_ada_task_info, display_current_task_id, task_command_1):
3786 Adjust.
3787 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3788 inferior_thread.
3789 (breakpoint_kind): Adjust.
3790 (remove_breakpoints_pid): Rename to ...
3791 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3792 pointer. All callers adjusted.
3793 (bpstat_clear_actions): Use inferior_thread.
3794 (get_bpstat_thread): New.
3795 (bpstat_do_actions): Use it.
3796 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3797 to take a thread_info pointer. All callers adjusted.
3798 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3799 (breakpoint_re_set_thread): Use inferior_thread.
3800 * breakpoint.h (struct inferior): Forward declare.
3801 (bpstat_stop_status): Update.
3802 (remove_breakpoints_pid): Delete.
3803 (remove_breakpoints_inf): New.
3804 * bsd-uthread.c (bsd_uthread_target::wait)
3805 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3806 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3807 (maint_btrace_packet_history_cmd)
3808 (maint_btrace_clear_packet_history_cmd): Adjust.
3809 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3810 inferior_thread.
3811 * cli/cli-interp.c: Include "inferior.h".
3812 * common/refcounted-object.h (struct
3813 refcounted_object_ref_policy): New.
3814 * compile/compile-object-load.c: Include gdbthread.h.
3815 (store_regs): Use inferior_thread.
3816 * corelow.c (core_target::close): Use current_inferior.
3817 (core_target_open): Adjust to use first_thread_of_inferior and use
3818 the current inferior.
3819 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3820 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3821 <thread>: ... this new field. All references adjusted.
3822 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3823 Take a thread_info pointer instead of a ptid_t.
3824 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3825 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3826 thread_info pointer instead of a ptid_t.
3827 * elfread.c: Include "inferior.h".
3828 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3829 Use inferior_thread.
3830 * eval.c (evaluate_subexp): Likewise.
3831 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3832 inferior_thread.
3833 * gdb_proc_service.h (struct thread_info): Forward declare.
3834 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3835 <thread>: ... this new field. All references adjusted.
3836 * gdbarch.h, gdbarch.c: Regenerate.
3837 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3838 'thread' parameter. All implementations and callers adjusted.
3839 * gdbthread.h (thread_info) <set_running>: New method.
3840 (delete_thread, delete_thread_silent): Take a thread_info pointer
3841 instead of a ptid.
3842 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3843 (first_thread_of_process): Delete, replaced by ...
3844 (first_thread_of_inferior): ... this new function. All callers
3845 adjusted.
3846 (any_live_thread_of_process): Delete, replaced by ...
3847 (any_live_thread_of_inferior): ... this new function. All callers
3848 adjusted.
3849 (switch_to_thread, switch_to_no_thread): Declare.
3850 (is_executing): Delete.
3851 (enable_thread_stack_temporaries): Update comment.
3852 <enable_thread_stack_temporaries>: Take a thread_info pointer
3853 instead of a ptid_t. Incref the thread.
3854 <~enable_thread_stack_temporaries>: Decref the thread.
3855 <m_ptid>: Delete
3856 <m_thr>: New.
3857 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3858 (get_last_thread_stack_temporary)
3859 (value_in_thread_stack_temporaries, can_access_registers_thread):
3860 Take a thread_info pointer instead of a ptid_t. All callers
3861 adjusted.
3862 * infcall.c (get_call_return_value): Use inferior_thread.
3863 (run_inferior_call): Work with thread pointers instead of ptid_t.
3864 (call_function_by_hand_dummy): Work with thread pointers instead
3865 of ptid_t. Use thread_info_ref.
3866 * infcmd.c (proceed_thread_callback): Access thread's state
3867 directly.
3868 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3869 access thread's state directly.
3870 (continue_command): Use inferior_thread.
3871 (info_program_command): Use find_thread_ptid and access thread
3872 state directly.
3873 (proceed_after_attach_callback): Use thread state directly.
3874 (notice_new_inferior): Take a thread_info pointer instead of a
3875 ptid_t. All callers adjusted.
3876 (exit_inferior): Take an inferior pointer instead of a pid. All
3877 callers adjusted.
3878 (exit_inferior_silent): New.
3879 (detach_inferior): Delete.
3880 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3881 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3882 (detach_inferior_command, kill_inferior_command): Use
3883 find_inferior_id instead of valid_gdb_inferior_id and
3884 gdb_inferior_id_to_pid.
3885 (inferior_command): Use inferior and thread pointers.
3886 * inferior.h (struct thread_info): Forward declare.
3887 (notice_new_inferior): Take a thread_info pointer instead of a
3888 ptid_t. All callers adjusted.
3889 (detach_inferior): Delete declaration.
3890 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3891 instead of a pid. All callers adjusted.
3892 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3893 (valid_gdb_inferior_id): Delete.
3894 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3895 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3896 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3897 ...
3898 <inf>: ... this new field.
3899 <step_ptid>: Delete, replaced by ...
3900 <step_thread>: ... this new field.
3901 (get_displaced_stepping_state): Take an inferior pointer instead
3902 of a pid. All callers adjusted.
3903 (displaced_step_in_progress_any_inferior): Adjust.
3904 (displaced_step_in_progress_thread): Take a thread pointer instead
3905 of a ptid_t. All callers adjusted.
3906 (displaced_step_in_progress, add_displaced_stepping_state): Take
3907 an inferior pointer instead of a pid. All callers adjusted.
3908 (get_displaced_step_closure_by_addr): Adjust.
3909 (remove_displaced_stepping_state): Take an inferior pointer
3910 instead of a pid. All callers adjusted.
3911 (displaced_step_prepare_throw, displaced_step_prepare)
3912 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3913 All callers adjusted.
3914 (start_step_over): Adjust.
3915 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3916 displaced step queue.
3917 (do_target_resume): Adjust.
3918 (fetch_inferior_event): Use inferior_thread.
3919 (context_switch, get_inferior_stop_soon): Take an
3920 execution_control_state pointer instead of a ptid_t. All callers
3921 adjusted.
3922 (switch_to_thread_cleanup): Delete.
3923 (stop_all_threads): Use scoped_restore_current_thread.
3924 * inline-frame.c: Include "gdbthread.h".
3925 (inline_state) <inline_state>: Take a thread pointer instead of a
3926 ptid_t. All callers adjusted.
3927 <ptid>: Delete, replaced by ...
3928 <thread>: ... this new field.
3929 (find_inline_frame_state): Take a thread pointer instead of a
3930 ptid_t. All callers adjusted.
3931 (skip_inline_frames, step_into_inline_frame)
3932 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3933 pointer instead of a ptid_t. All callers adjusted.
3934 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3935 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3936 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3937 pointers directly.
3938 * linux-nat.c (get_detach_signal): Likewise.
3939 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3940 (thread_db_notice_clone): Adjust.
3941 (thread_db_find_new_threads_silently)
3942 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3943 a thread pointer instead of a ptid_t. All callers adjusted.
3944 * mi/mi-cmd-var.c: Include "inferior.h".
3945 (mi_cmd_var_update_iter): Update to use thread pointers.
3946 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3947 inferior directly.
3948 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3949 out to ...
3950 (mi_output_running): ... this new function.
3951 (mi_on_resume_1): Adjust to use it.
3952 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3953 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3954 directly.
3955 (interrupt_thread_callback): : Adjust to use thread and inferior
3956 pointers.
3957 * proc-service.c: Include "gdbthread.h".
3958 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3959 * progspace-and-thread.c: Include "inferior.h".
3960 * progspace.c: Include "inferior.h".
3961 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3962 hold a reference to an inferior_object.
3963 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3964 inferior_thread.
3965 * python/py-inferior.c (struct inferior_object): Give the type a
3966 tag name instead of a typedef.
3967 (python_on_normal_stop): No need to check if the current thread is
3968 listed.
3969 (inferior_to_inferior_object): Change return type to
3970 inferior_object. All callers adjusted.
3971 (find_thread_object): Delete, bits factored out to ...
3972 (thread_to_thread_object): ... this new function.
3973 * python/py-infthread.c (create_thread_object): Use
3974 inferior_to_inferior_object.
3975 (thpy_is_stopped): Use thread pointer directly.
3976 (gdbpy_selected_thread): Use inferior_thread.
3977 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3978 field, replaced with ...
3979 <thread>: ... this new field. All users adjusted.
3980 (btpy_insn_or_gap_new): Drop const.
3981 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3982 callers adjusted.
3983 * python/py-record.c: Include "gdbthread.h".
3984 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3985 a ptid_t. All callers adjusted.
3986 (gdbpy_current_recording): Use inferior_thread.
3987 * python/py-record.h (recpy_record_object) <ptid>: Delete
3988 field, replaced with ...
3989 <thread>: ... this new field. All users adjusted.
3990 (recpy_element_object) <ptid>: Delete
3991 field, replaced with ...
3992 <thread>: ... this new field. All users adjusted.
3993 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3994 a ptid_t. All callers adjusted.
3995 * python/py-threadevent.c: Include "gdbthread.h".
3996 (get_event_thread): Use thread_to_thread_object.
3997 * python/python-internal.h (struct inferior_object): Forward
3998 declare.
3999 (find_thread_object, find_inferior_object): Delete declarations.
4000 (thread_to_thread_object, inferior_to_inferior_object): New
4001 declarations.
4002 * record-btrace.c: Include "inferior.h".
4003 (require_btrace_thread): Use inferior_thread.
4004 (record_btrace_frame_sniffer)
4005 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4006 (get_thread_current_frame): Use scoped_restore_current_thread and
4007 switch_to_thread.
4008 (get_thread_current_frame): Use thread pointer directly.
4009 (record_btrace_replay_at_breakpoint): Use thread's inferior
4010 pointer directly.
4011 * record-full.c: Include "inferior.h".
4012 * regcache.c: Include "gdbthread.h".
4013 (get_thread_arch_regcache): Use the inferior's address space
4014 directly.
4015 (get_thread_regcache, registers_changed_thread): New.
4016 * regcache.h (get_thread_regcache(thread_info *thread)): New
4017 overload.
4018 (registers_changed_thread): New.
4019 (remote_target) <remote_detach_1>: Swap order of parameters.
4020 (remote_add_thread): <remote_add_thread>: Return the new thread.
4021 (get_remote_thread_info(ptid_t)): New overload.
4022 (remote_target::remote_notice_new_inferior): Use thread pointers
4023 directly.
4024 (remote_target::process_initial_stop_replies): Use
4025 thread_info::set_running.
4026 (remote_target::remote_detach_1, remote_target::detach)
4027 (extended_remote_target::detach): Adjust.
4028 * stack.c (frame_show_address): Use inferior_thread.
4029 * target-debug.h (target_debug_print_thread_info_pp): New.
4030 * target-delegates.c: Regenerate.
4031 * target.c (default_thread_address_space): Delete.
4032 (memory_xfer_partial_1): Use current_inferior.
4033 (target_detach): Use current_inferior.
4034 (target_thread_address_space): Delete.
4035 (generic_mourn_inferior): Use current_inferior.
4036 * target.h (struct target_ops) <thread_address_space>: Delete.
4037 (target_thread_address_space): Delete.
4038 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4039 pointers directly.
4040 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4041 thread pointer instead of a ptid_t. Adjust all callers.
4042 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4043 (first_thread_of_process): Delete, replaced by ...
4044 (first_thread_of_inferior): ... this new function. All callers
4045 adjusted.
4046 (any_thread_of_process): Rename to ...
4047 (any_thread_of_inferior): ... this, and take an inferior pointer.
4048 (any_live_thread_of_process): Rename to ...
4049 (any_live_thread_of_inferior): ... this, and take an inferior
4050 pointer.
4051 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4052 (value_in_thread_stack_temporaries)
4053 (get_last_thread_stack_temporary): Take a thread pointer instead
4054 of a ptid_t. Adjust all callers.
4055 (thread_info::set_running): New.
4056 (validate_registers_access): Use inferior_thread.
4057 (can_access_registers_ptid): Rename to ...
4058 (can_access_registers_thread): ... this, and take a thread
4059 pointer.
4060 (print_thread_info_1): Adjust to compare thread pointers instead
4061 of ptids.
4062 (switch_to_no_thread, switch_to_thread): Make extern.
4063 (scoped_restore_current_thread::~scoped_restore_current_thread):
4064 Use m_thread pointer directly.
4065 (scoped_restore_current_thread::scoped_restore_current_thread):
4066 Use inferior_thread.
4067 (thread_command): Use thread pointer directly.
4068 (thread_num_make_value_helper): Use inferior_thread.
4069 * top.c (execute_command): Use inferior_thread.
4070 * tui/tui-interp.c: Include "inferior.h".
4071 * varobj.c (varobj_create): Use inferior_thread.
4072 (value_of_root_1): Use find_thread_global_id instead of
4073 global_thread_id_to_ptid.
4074
4075 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4076
4077 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4078 possible.
4079 (regcache::write_part): Likewise.
4080 (readable_regcache::cooked_read_part): Update comment.
4081 (readable_regcache::cooked_write_part): Likewise.
4082 * regcache.h: (readable_regcache::read_part): Likewise.
4083 (regcache::write_part): Likewise.
4084
4085 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4086 Dirk Schubert <dirk.schubert@arm.com>
4087
4088 * aarch64-linux-nat.c (post_attach): New.
4089 (aarch64_linux_nat_target::post_attach): Override post_attach to
4090 record the number of hardware debug registers.
4091
4092 2018-06-20 Tom Tromey <tom@tromey.com>
4093
4094 * python/py-param.c (add_setshow_generic): Make parameters const.
4095 (parmpy_init): Update.
4096
4097 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4098
4099 * regcache.h (regcache_cooked_read_ftype): Rename to...
4100 (register_read_ftype): ...this, change type to function_view.
4101 (class reg_buffer) <save>: Remove src parameter.
4102 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4103 parameter non-const in first overload. Remove src parameter in
4104 second overload.
4105 * regcache.c (do_cooked_read): Remove.
4106 (readonly_detached_regcache::readonly_detached_regcache): Make
4107 parameter non-const, adjust call to other constructor.
4108 (reg_buffer::save): Remove src parameter.
4109 * frame.c (do_frame_register_read): Remove.
4110 (frame_save_as_regcache): Use lambda function.
4111 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4112 parameter to ppu2spu_data *.
4113 (ppu2spu_sniffer): Use lambda function.
4114
4115 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4116
4117 * record-full.c (record_full_target::insert_breakpoint): Remove
4118 "struct" keyword, add const.
4119
4120 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4121
4122 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4123 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4124 * configure.ac: Remove AC_PREREQ, add missing quoting.
4125 * gnulib/configure.ac: Modernize usage of
4126 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4127 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4128 (AUTOMAKE_VERSION): Bump to 1.15.1.
4129 * configure: Re-generate.
4130 * config.in: Re-generate.
4131 * aclocal.m4: Re-generate.
4132 * gnulib/aclocal.m4: Re-generate.
4133 * gnulib/config.in: Re-generate.
4134 * gnulib/configure: Re-generate.
4135 * gnulib/import/Makefile.in: Re-generate.
4136
4137 2018-06-19 Pedro Alves <palves@redhat.com>
4138
4139 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4140 (lookup_minimal_symbol_by_pc_section): ... here with
4141 gdb_assert_not_reached added.
4142
4143 2018-06-19 Pedro Alves <palves@redhat.com>
4144
4145 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4146 parameter with a block parameter. Compare location's block symbol
4147 with the frame's block instead of addresses.
4148 (skip_inline_frames): Pass the current block instead of the
4149 frame's address. Break out as soon as we determine the frame
4150 should not be skipped.
4151
4152 2018-06-18 Tom Tromey <tom@tromey.com>
4153
4154 * solib-aix.c (solib_aix_get_section_offsets): Return
4155 unique_xmalloc_ptr.
4156 (solib_aix_solib_create_inferior_hook): Update.
4157
4158 2018-06-18 Tom Tromey <tom@tromey.com>
4159
4160 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4161
4162 2018-06-18 Tom Tromey <tom@tromey.com>
4163
4164 * solib-frv.c (frv_relocate_main_executable): Use
4165 unique_xmalloc_ptr.
4166 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4167 unique_xmalloc_ptr.
4168
4169 2018-06-18 Tom Tromey <tom@tromey.com>
4170
4171 * objfiles.h (inhibit_section_map_updates): Update.
4172 (resume_section_map_updates, resume_section_map_updates_cleanup):
4173 Remove.
4174 * solib-svr4.c (svr4_handle_solib_event): Update.
4175 * objfiles.c (inhibit_section_map_updates): Return
4176 scoped_restore_tmpl<int>.
4177 (resume_section_map_updates, resume_section_map_updates_cleanup):
4178 Remove.
4179
4180 2018-06-18 Tom Tromey <tom@tromey.com>
4181
4182 * valprint.h (read_string): Update.
4183 * valprint.c (read_string): Change type of "buffer".
4184 (val_print_string): Update.
4185 * python/py-value.c (valpy_string): Update.
4186 * language.h (struct language_defn) <la_get_string>: Change
4187 type of "buffer".
4188 (default_get_string, c_get_string): Update.
4189 * language.c (default_get_string): Change type of "buffer".
4190 * guile/scm-value.c (gdbscm_value_to_string): Update.
4191 * c-lang.c (c_get_string): Change type of "buffer".
4192
4193 2018-06-18 Tom Tromey <tom@tromey.com>
4194
4195 * ser-mingw.c (struct pipe_state_destroyer): New.
4196 (pipe_state_up): New typedef.
4197 (cleanup_pipe_state): Remove.
4198 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4199
4200 2018-06-18 Tom Tromey <tom@tromey.com>
4201
4202 * rust-lang.h (rust_yyerror): Don't declare.
4203 * rust-lang.c (rust_language_defn): Update.
4204 * rust-exp.y (yyerror): Now static.
4205 * parse.c (parse_exp_in_context_1): Update.
4206 * p-lang.h (p_yyerror): Don't declare.
4207 * p-lang.c (p_language_defn): Update.
4208 * p-exp.y (yyerror): Now static.
4209 * opencl-lang.c (opencl_language_defn): Update.
4210 * objc-lang.c (objc_language_defn): Update.
4211 * m2-lang.h (m2_yyerror): Don't declare.
4212 * m2-lang.c (m2_language_defn): Update.
4213 * m2-exp.y (yyerror): Now static.
4214 * language.h (struct language_defn) <la_error>: Remove.
4215 * language.c (unk_lang_error): Remove.
4216 (unknown_language_defn, auto_language_defn): Remove.
4217 * go-lang.h (go_yyerror): Don't declare.
4218 * go-lang.c (go_language_defn): Update.
4219 * go-exp.y (yyerror): Now static.
4220 * f-lang.h (f_yyerror): Don't declare.
4221 * f-lang.c (f_language_defn): Update.
4222 * f-exp.y (yyerror): Now static.
4223 * d-lang.h (d_yyerror): Don't declare.
4224 * d-lang.c (d_language_defn): Update.
4225 * d-exp.y (yyerror): Now static.
4226 * c-lang.h (c_yyerror): Don't declare.
4227 * c-lang.c (c_language_defn, cplus_language_defn)
4228 (asm_language_defn, minimal_language_defn): Update.
4229 * c-exp.y (yyerror): Now static.
4230 * ada-lang.h (ada_yyerror): Don't declare.
4231 * ada-lang.c (ada_language_defn): Update.
4232 * ada-exp.y (yyerror): Now static.
4233
4234 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4235
4236 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4237 (store_sveregs_to_thread): Likewise.
4238 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4239 (aarch64_linux_store_inferior_registers): Likewise.
4240 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4241 function.
4242 (aarch64_sve_regs_copy_to_regcache): Likewise.
4243 (aarch64_sve_regs_copy_from_regcache): Likewise.
4244 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4245 declaration.
4246 (aarch64_sve_regs_copy_to_regcache): Likewise.
4247 (aarch64_sve_regs_copy_from_regcache): Likewise.
4248 (sve_context): Structure from Linux headers.
4249 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4250 (SVE_SIG_ZREG_SIZE): Likewise.
4251 (SVE_SIG_PREG_SIZE): Likewise.
4252 (SVE_SIG_FFR_SIZE): Likewise.
4253 (SVE_SIG_REGS_OFFSET): Likewise.
4254 (SVE_SIG_ZREGS_OFFSET): Likewise.
4255 (SVE_SIG_ZREG_OFFSET): Likewise.
4256 (SVE_SIG_ZREGS_SIZE): Likewise.
4257 (SVE_SIG_PREGS_OFFSET): Likewise.
4258 (SVE_SIG_PREG_OFFSET): Likewise.
4259 (SVE_SIG_PREGS_SIZE): Likewise.
4260 (SVE_SIG_FFR_OFFSET): Likewise.
4261 (SVE_SIG_REGS_SIZE): Likewise.
4262 (SVE_SIG_CONTEXT_SIZE): Likewise.
4263 (SVE_PT_REGS_MASK): Likewise.
4264 (SVE_PT_REGS_FPSIMD): Likewise.
4265 (SVE_PT_REGS_SVE): Likewise.
4266 (SVE_PT_VL_INHERIT): Likewise.
4267 (SVE_PT_VL_ONEXEC): Likewise.
4268 (SVE_PT_REGS_OFFSET): Likewise.
4269 (SVE_PT_FPSIMD_OFFSET): Likewise.
4270 (SVE_PT_FPSIMD_SIZE): Likewise.
4271 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4272 (SVE_PT_SVE_PREG_SIZE): Likewise.
4273 (SVE_PT_SVE_FFR_SIZE): Likewise.
4274 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4275 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4276 (__SVE_SIG_TO_PT): Likewise.
4277 (SVE_PT_SVE_OFFSET): Likewise.
4278 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4279 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4280 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4281 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4282 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4283 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4284 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4285 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4286 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4287 (SVE_PT_SVE_SIZE): Likewise.
4288 (SVE_PT_SIZE): Likewise.
4289 (HAS_SVE_STATE): New define.
4290
4291 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4292
4293 * nat/aarch64-sve-linux-sigcontext.h: New file.
4294 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4295 new files.
4296 (SVE_VQ_MIN): Likewise.
4297 (SVE_VQ_MAX): Likewise.
4298 (SVE_VL_MIN): Likewise.
4299 (SVE_VL_MAX): Likewise.
4300 (SVE_NUM_ZREGS): Likewise.
4301 (SVE_NUM_PREGS): Likewise.
4302 (sve_vl_valid): Likewise.
4303 (struct user_sve_header): Likewise.
4304
4305 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4306 Richard Bunt <Richard.Bunt@arm.com>
4307
4308 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4309 was requested by GDB.
4310
4311 2018-06-15 Tom de Vries <tdevries@suse.de>
4312
4313 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4314
4315 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4316
4317 * gnulib/update-gnulib.sh: Print expected versions of
4318 autoconf/aclocal.
4319
4320 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4321
4322 * arch-utils.c (default_type_align): Use type_length_units.
4323 * gdbtypes.c (type_align): Use type_length_units.
4324
4325 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4326
4327 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4328 of 'define' command.
4329
4330 2018-06-14 Tom de Vries <tdevries@suse.de>
4331
4332 PR cli/22573
4333 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4334 get_no_prettyformat_print_options.
4335
4336 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4337
4338 * sparc-nat.h: Include target.h.
4339 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4340 <fetch_registers>: Remove this argument in function call.
4341 <store_registers>: Remove this argument in function call, remove
4342 extra semicolon.
4343 <low_forget_process>: Call sparc64_forget_process instead of
4344 sparc_forget_process.
4345
4346 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4347
4348 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4349 (procfs_target::make_corefile_notes): Adjust to new
4350 target_read_alloc return type.
4351
4352 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4353 Stephen Roberts <stephen.roberts@arm.com>
4354
4355 PR gdb/22882
4356 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4357 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4358 Move should_notify_stop local into more inner scope.
4359
4360 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4361 Stephen Roberts <stephen.roberts@arm.com>
4362
4363 PR gdb/22882
4364 * infrun.c (resume_1): Add call to mark_async_event_handler.
4365
4366 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4367
4368 * infrun.c (do_target_wait): Change old version of $pc printed.
4369
4370 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4371
4372 * dwarf2read.c (read_index_from_section): Rename to...
4373 (read_gdb_index_from_section): ... this, update all callers.
4374 (dwarf2_read_index): Rename to...
4375 (dwarf2_read_gdb_index): ... this, update all callers.
4376
4377 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4378
4379 * gdb/hppa-linux-nat.c
4380 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4381 hppa_linux_nat_target::fetch_registers.
4382
4383 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4384
4385 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4386 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4387 (AARCH64_DWARF_SVE_FFR): Likewise.
4388 (AARCH64_DWARF_SVE_P0): Likewise.
4389 (AARCH64_DWARF_SVE_Z0): Likewise.
4390
4391 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4392
4393 * common/common-regcache.h (raw_compare): New function.
4394 * regcache.c (regcache::raw_compare): Likewise.
4395 * regcache.h (regcache::raw_compare): New declaration.
4396
4397 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4398
4399 * common/common-regcache.h (reg_buffer_common): New structure.
4400 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4401 (reg_buffer::raw_supply): Likewise.
4402 (reg_buffer::raw_supply_integer): Likewise.
4403 (reg_buffer::raw_supply_zeroed): Likewise.
4404 (reg_buffer::raw_collect): Likewise.
4405 (reg_buffer::raw_collect_integer): Likewise.
4406 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4407 (reg_buffer::raw_supply): Likewise.
4408 (reg_buffer::raw_supply_integer): Likewise.
4409 (reg_buffer::raw_supply_zeroed): Likewise.
4410 (reg_buffer::raw_collect): Likewise.
4411 (reg_buffer::raw_collect_integer): Likewise.
4412
4413 2018-06-10 Tom Tromey <tom@tromey.com>
4414
4415 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4416 (class remote_state) <stop_reply_queue>: Now std::vector.
4417 (remote_state::~remote_state)
4418 (remote_target::stop_reply_queue_length): Update.
4419 (struct queue_iter_param, remove_child_of_pending_fork)
4420 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4421 (check_pending_event_prevents_wildcard_vcont_callback)
4422 (remove_stop_reply_for_inferior)
4423 (remove_stop_reply_of_remote_state)
4424 (remote_notif_remove_once_on_match)
4425 (stop_reply_match_ptid_and_ws)
4426 (remote_kill_child_of_pending_fork): Remove.
4427 (remote_target::remove_new_fork_children)
4428 (remote_target::check_pending_events_prevent_wildcard_vcont)
4429 (remote_target::discard_pending_stop_replies)
4430 (remote_target::discard_pending_stop_replies_in_queue)
4431 (remote_target::remote_notif_remove_queued_reply)
4432 (remote_target::queued_stop_reply)
4433 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4434 (remote_target::wait, remote_target::kill_new_fork_children)
4435 (remote_target::async): Update.
4436
4437 2018-06-10 Tom Tromey <tom@tromey.com>
4438
4439 * record-full.c (record_full_arch_list_cleanups): Remove.
4440 (record_full_message): Use try/catch.
4441 (record_full_wait_cleanups): Remove.
4442 (record_full_wait_1): Use try/catch.
4443 (record_full_restore): Likewise.
4444
4445 2018-06-10 Tom Tromey <tom@tromey.com>
4446
4447 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4448 declare VEC. Add constructor.
4449 <in_target_beneath>: Now bool.
4450 (record_full_breakpoints): Now a std::vector, static.
4451 (record_full_sync_record_breakpoints)
4452 (record_full_init_record_breakpoints)
4453 (record_full_target::insert_breakpoint)
4454 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4455
4456 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4457
4458 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4459 * serial.c (serial_interface_lookup): Remove struct keyword.
4460
4461 2018-06-10 Tom Tromey <tom@tromey.com>
4462
4463 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4464 method.
4465 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4466 a method.
4467 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4468 method.
4469 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4470 "beneath" as a method.
4471 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4472 Use "beneath" as a method.
4473
4474 2018-06-10 Tom Tromey <tom@tromey.com>
4475
4476 * tracefile.c (struct trace_file_writer_deleter): New.
4477 <operator()>: Rename from trace_file_writer_xfree.
4478 (trace_file_writer_up): New typedef.
4479 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4480
4481 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4482
4483 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4484 <m_registers, m_register_status>: Change type to
4485 std::unique_ptr.
4486 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4487 XCNEWVEC.
4488
4489 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4490
4491 * common/common-regcache.h (enum register_status): Add
4492 underlying type "signed char".
4493 * regcache.h (reg_buffer) <m_register_status>: Change type to
4494 register_status *.
4495 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4496 register_status instead of signed char.
4497 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4498 (reg_buffer::get_register_status): Remove cast.
4499 (readable_regcache::raw_read): Remove cast.
4500 (readable_regcache::cooked_read): Remove cast.
4501
4502 2018-06-09 Tom Tromey <tom@tromey.com>
4503
4504 * source.c (reverse_search_command, forward_search_command): Use
4505 scoped_fd.
4506
4507 2018-06-09 Tom Tromey <tom@tromey.com>
4508
4509 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4510 (serial_ops_list): Now static, std::vector.
4511 (serial_interface_lookup, serial_add_interface): Update.
4512
4513 2018-06-09 Tom Tromey <tom@tromey.com>
4514
4515 * dwarf2read.c (process_cu_includes): Update.
4516 (process_full_comp_unit): Update.
4517 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4518 std::vector.
4519
4520 2018-06-08 Paul Koning <paul_koning@dell.com>
4521
4522 PR gdb/23252
4523
4524 * python/python.c (do_start_initialization):
4525 Avoid call to internal Python API.
4526 (init__gdb_module): New function.
4527
4528 2018-06-08 Gary Benson <gbenson@redhat.com>
4529
4530 * linux-thread-db.c (valprint.h): New include.
4531 (struct check_thread_db_info): New structure.
4532 (check_thread_db_on_load, tdb_testinfo): New static globals.
4533 (check_thread_db, check_thread_db_callback): New functions.
4534 (try_thread_db_load_1): Run integrity checks if requested.
4535 (maintenance_check_libthread_db): New function.
4536 (_initialize_thread_db): Register "maint check libthread-db"
4537 and "maint set/show check-libthread-db".
4538 * NEWS: Mention the above new commands.
4539
4540 2018-06-08 Tom Tromey <tom@tromey.com>
4541
4542 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4543 now a method.
4544
4545 2018-06-08 Tom Tromey <tom@tromey.com>
4546
4547 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4548
4549 2018-06-08 Tom Tromey <tom@tromey.com>
4550
4551 * common/btrace-common.h (struct btrace_data): Add constructor,
4552 destructor, move assignment operator.
4553 <empty, clear, fini>: New methods.
4554 <format>: Initialize.
4555 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4556 (btrace_data_empty): Don't declare.
4557 * common/btrace-common.c (btrace_data_init): Remove.
4558 (btrace_data::fini): Rename from btrace_data_fini.
4559 (btrace_data::empty): Rename from btrace_data_empty.
4560 (btrace_data::clear): Rename from btrace_data_clear. Return
4561 bool.
4562 * btrace.h (make_cleanup_btrace_data): Don't declare.
4563 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4564 (parse_xml_btrace): Update.
4565 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4566 (maint_btrace_clear_packet_history_cmd): Update.
4567
4568 2018-06-07 Pedro Alves <palves@redhat.com>
4569
4570 * target.h (target_ops) <beneath>: Now a method. All references
4571 updated.
4572 (class target_stack): New.
4573 * target.c (g_target_stack): New.
4574 (g_current_top_target): Delete.
4575 (current_top_target): Get the top target out of g_target_stack.
4576 (target_stack::push, target_stack::unpush): New.
4577 (push_target, unpush_target): Reimplement.
4578 (target_is_pushed): Reimplement in terms of g_target_stack.
4579 (target_ops::beneath, target_stack::find_beneath): New.
4580
4581 2018-06-07 Pedro Alves <palves@redhat.com>
4582
4583 * target.h (find_target_beneath): Delete declaration.
4584 * target.c (find_target_beneath): Delete definition.
4585 * aix-thread.c: All callers of find_target_beneath adjusted to
4586 call target_ops::beneath instead.
4587 * bsd-uthread.c: Likewise.
4588 * linux-thread-db.c: Likewise.
4589 * ravenscar-thread.c: Likewise.
4590 * sol-thread.c: Likewise.
4591 * spu-multiarch.c: Likewise.
4592
4593 2018-06-07 Pedro Alves <palves@redhat.com>
4594
4595 * target.h (target_ops) <beneath>: Now a method. All references
4596 updated.
4597 (target_ops) <m_beneath>: New.
4598 * target.c (target_ops::beneath): New.
4599 * corelow.c: Adjust all references to target_ops::beneath.
4600 * linux-thread-db.c: Likewise.
4601 * make-target-delegates: Likewise.
4602 * record-btrace.c: Likewise.
4603 * record-full.c: Likewise.
4604 * remote.c: Likewise.
4605 * target.c: Likewise.
4606 * target-delegates.c: Regenerate.
4607
4608 2018-06-07 Pedro Alves <palves@redhat.com>
4609
4610 * target.h (target_stack): Delete.
4611 (current_top_target): Declare function.
4612 * target.c (target_stack): Delete.
4613 (g_current_top_target): New.
4614 (current_top_target): New function.
4615 * auxv.c: Use current_top_target instead of target_stack
4616 throughout.
4617 * avr-tdep.c: Likewise.
4618 * breakpoint.c: Likewise.
4619 * corefile.c: Likewise.
4620 * elfread.c: Likewise.
4621 * eval.c: Likewise.
4622 * exceptions.c: Likewise.
4623 * frame.c: Likewise.
4624 * gdbarch-selftests.c: Likewise.
4625 * gnu-v3-abi.c: Likewise.
4626 * ia64-tdep.c: Likewise.
4627 * ia64-vms-tdep.c: Likewise.
4628 * infcall.c: Likewise.
4629 * infcmd.c: Likewise.
4630 * infrun.c: Likewise.
4631 * linespec.c: Likewise.
4632 * linux-tdep.c: Likewise.
4633 * minsyms.c: Likewise.
4634 * ppc-linux-nat.c: Likewise.
4635 * ppc-linux-tdep.c: Likewise.
4636 * procfs.c: Likewise.
4637 * regcache.c: Likewise.
4638 * remote.c: Likewise.
4639 * rs6000-tdep.c: Likewise.
4640 * s390-linux-nat.c: Likewise.
4641 * s390-tdep.c: Likewise.
4642 * solib-aix.c: Likewise.
4643 * solib-darwin.c: Likewise.
4644 * solib-dsbt.c: Likewise.
4645 * solib-spu.c: Likewise.
4646 * solib-svr4.c: Likewise.
4647 * solib-target.c: Likewise.
4648 * sparc-tdep.c: Likewise.
4649 * sparc64-tdep.c: Likewise.
4650 * spu-tdep.c: Likewise.
4651 * symfile.c: Likewise.
4652 * symtab.c: Likewise.
4653 * target-descriptions.c: Likewise.
4654 * target-memory.c: Likewise.
4655 * target.c: Likewise.
4656 * target.h: Likewise.
4657 * tracefile-tfile.c: Likewise.
4658 * tracepoint.c: Likewise.
4659 * valops.c: Likewise.
4660 * valprint.c: Likewise.
4661 * value.c: Likewise.
4662 * windows-tdep.c: Likewise.
4663 * mi/mi-main.c: Likewise.
4664
4665 2018-06-07 Tom Tromey <tom@tromey.com>
4666
4667 * valprint.h (build_address_symbolic): Declare.
4668 * printcmd.c (print_address_symbolic): Update.
4669 (build_address_symbolic): Change "name" and "filename" to
4670 std::string.
4671 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4672 Update.
4673 * defs.h (build_address_symbolic): Remove declaration.
4674
4675 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4676
4677 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4678 (aarch64_vnv_type): Add function.
4679 (aarch64_pseudo_register_name): Add V regs for SVE.
4680 (aarch64_pseudo_register_type): Likewise.
4681 (aarch64_pseudo_register_reggroup_p): Likewise.
4682 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4683 (aarch64_pseudo_read_value): Add V regs for SVE.
4684 (aarch64_pseudo_write_2): Use V0 offset for SVE
4685 (aarch64_pseudo_write): Add V regs for SVE.
4686 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4687
4688 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4689
4690 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4691 (sve_vl_from_vq): Likewise.
4692
4693 2018-06-05 Tom Tromey <tom@tromey.com>
4694
4695 * cli/cli-cmds.c (show_version): Update.
4696 * top.c (print_gdb_version): Add "interactive" parameter.
4697 Update.
4698 * main.c (captured_main_1): Update.
4699 * top.h (print_gdb_version): Add "interactive" parameter and a
4700 comment.
4701
4702 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4703
4704 * common/enum-flags.h: Add trailing semicolon to example in
4705 comment.
4706
4707 2018-06-05 Tom Tromey <tom@tromey.com>
4708
4709 PR cli/12326:
4710 * NEWS: Add entry about pager.
4711 * utils.c (pagination_disabled_for_command): New global.
4712 (prompt_for_continue): Allow "c" response to prompt.
4713 (reinitialize_more_filter): Clear
4714 pagination_disabled_for_command.
4715 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4716
4717 2018-06-04 Tom Tromey <tom@tromey.com>
4718
4719 * ada-lang.h (ada_lookup_symbol_list): Update.
4720 * ada-lang.c (resolve_subexp): Update.
4721 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4722 parameter.
4723 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4724 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4725 results parameter to std::vector.
4726 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4727 Update.
4728 * ada-exp.y (block_lookup): Update.
4729 (select_possible_type_sym): Change type of syms. Remove nsyms
4730 parameter.
4731 (write_var_or_type, write_name_assoc): Update.
4732
4733 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4734
4735 * windows-nat.c (windows_nat_target::xfer_partial): Return
4736 TARGET_XFER_E_IO if we need to delegate to the target beneath
4737 but BENEATH is NULL.
4738
4739 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4740
4741 * Makefile.in (config.status): Add configure.nat as a
4742 dependency.
4743
4744 2018-06-04 Tom Tromey <tom@tromey.com>
4745
4746 * cp-name-parser.y (cpname_state): Add method declarations.
4747 (HANDLE_QUAL): Update.
4748 (cpname_state::d_grab, cpname_state::fill_comp)
4749 (cpname_state::make_operator, cpname_state::make_dtor)
4750 (cpname_state::make_builtin_type, cpname_state::make_name)
4751 (cpname_state::d_qualify, cpname_state::d_int_type)
4752 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4753 (%union): Move earlier.
4754
4755 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4756
4757 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4758
4759 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4760
4761 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4762 (aarch64_pseudo_write_1): Likewise.
4763 (aarch64_pseudo_read_value): Use helper.
4764 (aarch64_pseudo_write): Likewise.
4765
4766 2018-06-04 Pedro Alves <palves@redhat.com>
4767
4768 * darwin-nat.c (darwin_ops): Delete.
4769 (darwin_attach_pid): Use get_native_target.
4770
4771 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4772
4773 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4774 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4775
4776 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4777
4778 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4779 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4780 (aarch64_gdbarch_init): Check for SVE.
4781 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4782
4783 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4784
4785 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4786 * aarch64-tdep.h (aarch64_read_description): Likewise.
4787 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4788 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4789 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4790 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4791 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4792
4793 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4794
4795 * value.c (value_fetch_lazy_bitfield): New.
4796 (value_fetch_lazy_memory): New.
4797 (value_fetch_lazy_register): New.
4798 (value_fetch_lazy): Factor out to smaller functions.
4799
4800 2018-06-01 Tom Tromey <tom@tromey.com>
4801
4802 * cp-name-parser.y (backslashable, represented): Now const.
4803
4804 2018-06-01 Tom Tromey <tom@tromey.com>
4805
4806 * cp-name-parser.y: Include parser-defs.h.
4807 (parser_fprintf): Remove declaration.
4808
4809 2018-06-01 Tom Tromey <tom@tromey.com>
4810
4811 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4812 %parse-param.
4813 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4814 (global_result): Remove globals.
4815 (struct cpname_state): New.
4816 (yyparse): Don't declare.
4817 (yylex, yyerror): Move declarations after %union.
4818 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4819 (make_name): Add state parameter.
4820 Update all callers.
4821 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4822 parameter.
4823 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4824 Update.
4825 (yylex): Add lvalp, state parameters.
4826 (yyerror): Add state parameter.
4827 (cp_demangled_name_to_comp): Update.
4828
4829 2018-06-01 Tom Tromey <tom@tromey.com>
4830
4831 * cp-name-parser.y (parser_fprintf): Declare.
4832 (GDB_YY_REMAP_PREFIX): Define.
4833 Include yy-remap.h. Don't redefine yy* identifiers.
4834
4835 2018-06-01 Tom Tromey <tom@tromey.com>
4836
4837 * python/py-type.c (typy_legacy_template_argument): Update.
4838 * cp-support.h (cp_demangled_name_to_comp): Update.
4839 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4840 parameter to be a "std::string *".
4841 (main): Update.
4842
4843 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4844
4845 * ada-lex.l: Include "diagnostics.h" instead of
4846 "common/diagnostics.h".
4847 * unittests/environ-selftests.c: Likewise.
4848 * common/diagnostics.h: Moved to ../include.
4849
4850 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4851
4852 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4853 to language_mode_manual while calling breakpoint_re_set_one.
4854
4855 2018-06-01 Tom Tromey <tom@tromey.com>
4856
4857 * valops.c (value_cast_structs, destructor_name_p): Update.
4858 * symtab.c (gdb_mangle_name): Update.
4859 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4860 Update.
4861 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4862 (pascal_object_print_value_fields, pascal_object_print_value):
4863 Update.
4864 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4865 * linespec.c (find_methods): Update.
4866 * gdbtypes.h (type_name_no_tag): Remove.
4867 (type_name_or_error): Rename from type_name_no_tag_or_error.
4868 * gdbtypes.c (type_name_no_tag): Remove.
4869 (type_name_or_error): Rename from type_name_no_tag_or_error.
4870 (lookup_struct_elt_type, check_typedef): Update.
4871 * expprint.c (print_subexp_standard): Update.
4872 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4873 * d-namespace.c (d_lookup_nested_symbol): Update.
4874 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4875 (cp_print_class_member): Update.
4876 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4877 * completer.c (add_struct_fields): Update.
4878 * c-typeprint.c (cp_type_print_derivation_info)
4879 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4880 Update.
4881 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4882 (ada_prefer_type, ada_is_exception_sym): Update.
4883
4884 2018-06-01 Tom Tromey <tom@tromey.com>
4885
4886 * valops.c (enum_constant_from_type, value_namespace_elt)
4887 (value_maybe_namespace_elt): Update.
4888 * valarith.c (find_size_for_pointer_math): Update.
4889 * target-descriptions.c (make_gdb_type): Update.
4890 * symmisc.c (print_symbol): Update.
4891 * stabsread.c (define_symbol, read_type)
4892 (complain_about_struct_wipeout, add_undefined_type)
4893 (cleanup_undefined_types_1): Update.
4894 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4895 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4896 (rust_internal_print_type, rust_composite_type)
4897 (rust_evaluate_funcall, rust_evaluate_subexp)
4898 (rust_inclusive_range_type_p): Update.
4899 * python/py-type.c (typy_get_tag): Update.
4900 * p-typeprint.c (pascal_type_print_base): Update.
4901 * mdebugread.c (parse_symbol, parse_type): Update.
4902 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4903 Update.
4904 * guile/scm-type.c (gdbscm_type_tag): Update.
4905 * go-lang.c (sixg_string_p): Update.
4906 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4907 Update.
4908 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4909 (TYPE_TAG_NAME): Remove.
4910 * gdbtypes.c (type_name_no_tag): Simplify.
4911 (check_typedef, check_types_equal, recursive_dump_type)
4912 (copy_type_recursive, arch_composite_type): Update.
4913 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4914 in summary mode when needed.
4915 * eval.c (evaluate_funcall): Update.
4916 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4917 (process_structure_scope, read_enumeration_type)
4918 (read_namespace_type, read_module_type, determine_prefix): Update.
4919 * cp-support.c (inspect_type): Update.
4920 * coffread.c (process_coff_symbol, decode_base_type): Update.
4921 * c-varobj.c (c_is_path_expr_parent): Update.
4922 * c-typeprint.c (c_type_print_base_struct_union): Update.
4923 (c_type_print_base_1): Update. Print struct/class/union/enum in
4924 summary when using C language.
4925 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4926 (gen_maybe_namespace_elt): Update.
4927 * ada-lang.c (ada_type_name): Simplify.
4928 (empty_record, ada_template_to_fixed_record_type_1)
4929 (template_to_static_fixed_type)
4930 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4931
4932 2018-06-01 Tom Tromey <tom@tromey.com>
4933
4934 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4935 c_print_type.
4936 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4937 (c_print_type): Update.
4938 (c_print_type): New overload.
4939 (c_type_print_varspec_prefix, c_type_print_args)
4940 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4941 (c_type_print_base_struct_union, c_type_print_base_1)
4942 (cp_type_print_method_args): Add "language" parameter.
4943 (c_type_print_base): Update.
4944 * c-lang.h (c_print_type): Add new overload.
4945
4946 2018-06-01 Tom Tromey <tom@tromey.com>
4947
4948 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4949 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4950
4951 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4952
4953 * aarch64-tdep.c (aarch64_sve_register_names): New const
4954 var.
4955 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4956 (AARCH64_SVE_Z_REGS_NUM): New define.
4957 (AARCH64_SVE_P_REGS_NUM): Likewise.
4958 (AARCH64_SVE_NUM_REGS): Likewise.
4959
4960 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4961
4962 * nat/linux-ptrace.h [__alpha__]
4963 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4964 definitions.
4965
4966 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4967
4968 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4969 the endianness selected.
4970 * NEWS: Document `set endian auto' mode operation update.
4971
4972 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4973
4974 * Makefile.in: Add new header.
4975 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4976 (sve_vl_from_vg): Likewise.
4977 (sve_vq_from_vl): Likewise.
4978 (sve_vl_from_vq): Likewise.
4979 (sve_vq_from_vg): Likewise.
4980 (sve_vg_from_vq): Likewise.
4981 * configure.nat: Add new c file.
4982 * nat/aarch64-sve-linux-ptrace.c: New file.
4983 * nat/aarch64-sve-linux-ptrace.h: New file.
4984
4985 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4986
4987 * aarch64-linux-nat.c (aarch64_linux_read_description):
4988 Add parmeter zero.
4989 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4990 Likewise.
4991 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4992 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4993 (aarch64_gdbarch_init): Add parmeter zero.
4994 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4995 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4996 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4997 parmeter.
4998 * doc/gdb.texinfo: Describe SVE feature
4999 * features/aarch64-sve.c: New file.
5000
5001 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5002
5003 PR gdb/23210
5004 * gdbarch.sh (significant_addr_bit): Default to zero when
5005 not set by target architecture.
5006 * gdbarch.c: Re-generated.
5007 * utils.c (address_significant): Update.
5008
5009 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5010
5011 * stack.c (func_command): Remove trailing newline in call to error.
5012
5013 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5014
5015 * regcache.h (regcache_raw_collect): Remove, update callers to
5016 use regcache::raw_collect.
5017 * regcache.c (regcache_raw_collect): Remove.
5018
5019 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5020
5021 * regcache.h (regcache_raw_supply): Remove, update callers to
5022 use detached_regcache::raw_supply.
5023 * regcache.c (regcache_raw_supply): Remove.
5024
5025 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5026
5027 * regcache.h (regcache_cooked_write_part): Remove, update
5028 callers to use regcache::cooked_write_part.
5029 * regcache.c (regcache_cooked_write_part): Remove.
5030
5031 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5032
5033 * regcache.h (regcache_cooked_read_part): Remove, update callers
5034 to use readable_regcache::cooked_read_part.
5035 * regcache.c (regcache_cooked_read_part): Remove.
5036
5037 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5038
5039 * regcache.h (regcache_cooked_read_value): Remove, update
5040 callers to use readable_regcache::cooked_read_value.
5041 * regcache.c (regcache_cooked_read_value): Remove.
5042
5043 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5044
5045 * regcache.h (regcache_cooked_write): Remove, update callers to
5046 use regcache::cooked_write.
5047 * regcache.c (regcache_cooked_write): Remove.
5048
5049 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5050
5051 * regcache.h (regcache_invalidate): Remove, update callers to
5052 use detached_regcache::invalidate instead.
5053 * regcache.c (regcache_invalidate): Remove.
5054
5055 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5056
5057 * regcache.h (regcache_raw_write_part): Remove, update callers
5058 to use regcache::raw_write_part instead.
5059 * regcache.c (regcache_raw_write_part): Remove.
5060
5061 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5062
5063 * regcache.h (regcache_raw_read_part): Remove, update callers to
5064 use readable_regcache::raw_read_part instead.
5065 * regcache.c (regcache_raw_read_part): Remove.
5066
5067 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5068
5069 * regcache.h (regcache_cooked_read): Remove, update callers to
5070 use readable_regcache::cooked_read instead.
5071 * regcache.c (regcache_cooked_read): Remove.
5072
5073 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5074
5075 * regcache.h (regcache_raw_write): Remove, update callers to use
5076 regcache::raw_write instead.
5077 * regcache.c (regcache_raw_write): Remove.
5078
5079 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5080
5081 * regcache.h (regcache_raw_read): Remove, update callers to use
5082 readable_regcache::raw_read instead.
5083 * regcache.c (regcache_raw_read): Remove.
5084
5085 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5086
5087 * regcache.h (regcache_raw_update): Remove, update callers to
5088 use readable_regcache::raw_update instead.
5089 * regcache.c (regcache_raw_update): Remove.
5090
5091 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5092
5093 * regcache.h (regcache_register_status): Remove, update callers
5094 to use reg_buffer::get_register_status directly instead.
5095 * regcache.c (regcache_register_status): Remove.
5096
5097 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5098
5099 * regcache.h (regcache_get_ptid): Remove, update all callers to
5100 call regcache::ptid instead.
5101 * regcache.c (regcache_get_ptid): Remove.
5102
5103 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5104
5105 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5106
5107 2018-05-30 Pedro Alves <palves@redhat.com>
5108
5109 * common/common-exceptions.h (exception_rethrow): Use
5110 ATTRIBUTE_NORETURN.
5111
5112 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5113
5114 * breakpoint.c (print_solib_event, check_status_catch_solib):
5115 Remove struct keyword in range-based for loops.
5116 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5117 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5118 Likewise.
5119 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5120 Likewise.
5121 * symfile.c (addr_info_make_relative): Likewise.
5122 * thread.c (value_in_thread_stack_temporaries): Likewise.
5123
5124 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5125
5126 PR gdb/16841
5127 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5128 aggregate type to get its real type before accessing it.
5129
5130 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5131
5132 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5133 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5134 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5135 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5136 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5137 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5138 * printcmd.c (info_address_command): Likewise.
5139
5140 2018-05-29 Tom Tromey <tom@tromey.com>
5141
5142 * windows-nat.c (handle_exception): Update fall-through comment.
5143
5144 2018-05-29 Tom Tromey <tom@tromey.com>
5145
5146 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5147 (struct program_space) <added_solibs>: Now a std::vector.
5148 * breakpoint.c (print_solib_event): Update.
5149 (check_status_catch_solib): Update.
5150 * progspace.c (clear_program_space_solib_cache): Update.
5151 * solib.c (update_solib_list): Update.
5152
5153 2018-05-29 Tom Tromey <tom@tromey.com>
5154
5155 * python/py-type.c (typy_richcompare): Update.
5156 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5157 * gdbtypes.h (types_deeply_equal): Return bool.
5158 (types_equal): Likewise.
5159 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5160 declare VEC.
5161 (check_types_equal): Change worklist to std::vector. Return
5162 bool.
5163 (struct type_equality_entry): Add constructor.
5164 (compare_maybe_null_strings): Return bool.
5165 (check_types_worklist): Return bool. Change worklist to
5166 std::vector.
5167 (types_deeply_equal): Use std::vector.
5168 (types_equal): Return bool.
5169 (compare_maybe_null_strings): Simplify.
5170
5171 2018-05-29 Tom Tromey <tom@tromey.com>
5172
5173 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5174
5175 2018-05-29 Tom Tromey <tom@tromey.com>
5176
5177 * objc-lang.h: Don't include cp-support.h.
5178 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5179 declare VEC.
5180
5181 2018-05-27 Tom Tromey <tom@tromey.com>
5182
5183 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5184
5185 2018-05-25 Tom Tromey <tom@tromey.com>
5186
5187 * value.c (value::location): Initialize.
5188
5189 2018-05-25 Tom Tromey <tom@tromey.com>
5190
5191 * dbxread.c (init_bincl_list): Remove.
5192 (bincl_list): Now a std::vector.
5193 (bincls_allocated, next_bincl): Remove.
5194 (free_bincl_list, do_free_bincl_list_cleanup)
5195 (make_cleanup_free_bincl_list): Remove.
5196 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5197 unique_xmalloc_ptr.
5198 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5199 (struct header_file_location): Add constructor.
5200 (add_bincl_to_list): Remove.
5201
5202 2018-05-25 Tom Tromey <tom@tromey.com>
5203
5204 * tui/tui.c (tui_enable): Update.
5205 * mi/mi-interp.c (mi_interp::init): Update.
5206 * interps.h (class interp) <name>: New method.
5207 <m_name>: Rename from name.
5208 (~scoped_restore_interp): Update.
5209 * interps.c (interp::interp): Update.
5210 (interp_add, interp_set, interp_lookup_existing)
5211 (current_interp_named_p): Update.
5212
5213 2018-05-25 Tom Tromey <tom@tromey.com>
5214
5215 * interps.c (interp_name): Remove.
5216 * mi/mi-interp.c (mi_interp::init): Update.
5217 * interps.h (interp_name): Remove.
5218 (~scoped_restore_interp): Update.
5219 * tui/tui.c (tui_enable): Update.
5220
5221 2018-05-25 Tom Tromey <tom@tromey.com>
5222
5223 * utils.c (fputs_maybe_filtered): Update.
5224 * linespec.c (decode_line_full): Update.
5225 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5226 (mi_print_breakpoint_for_event, mi_solib_loaded)
5227 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5228 (mi_user_selected_context_changed): Update.
5229 * mi/mi-main.c (mi_execute_command): Update.
5230 * cli/cli-script.c (execute_control_command): Update.
5231 * python/python.c (execute_gdb_command): Update.
5232 * solib.c (info_sharedlibrary_command): Update.
5233 * interps.c (interp_ui_out): Remove.
5234 * interps.h (interp_ui_out): Remove.
5235
5236 2018-05-25 Tom Tromey <tom@tromey.com>
5237
5238 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5239 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5240 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5241
5242 2018-05-25 Tom Tromey <tom@tromey.com>
5243
5244 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5245 * interps.c (interp_exec): Use scoped_restore.
5246
5247 2018-05-25 Tom Tromey <tom@tromey.com>
5248
5249 * remote.c (remote_target::remote_file_get): Use
5250 gdb::byte_vector.
5251 (remote_target::remote_file_put): Likewise.
5252
5253 2018-05-25 Tom Tromey <tom@tromey.com>
5254
5255 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5256 a std::string.
5257 (get_pe_section_index, add_pe_exported_sym): Update.
5258 (read_pe_exported_syms): Use gdb::def_vector.
5259
5260 2018-05-25 Tom Tromey <tom@tromey.com>
5261
5262 * frame.c (remove_prev_frame): Remove.
5263 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5264
5265 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5266
5267 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5268 Remove prototypes.
5269 * mips-linux-nat.c (supply_fpregset): Always call
5270 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5271 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5272 `mips_fill_fpregset'.
5273 * mips-linux-tdep.c (mips_supply_fpregset)
5274 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5275 (mips_fill_fpregset_wrapper): Remove functions.
5276 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5277 (mips_linux_fpregset): Remove variable.
5278 (mips_linux_iterate_over_regset_sections): Use
5279 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5280 (mips_linux_o32_sigframe_init): Remove comment.
5281
5282 2018-05-25 Pedro Alves <palves@redhat.com>
5283
5284 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5285 (struct readahead_cache, struct packet_reg, struct
5286 remote_arch_state, class remote_state): Move higher up in the
5287 file.
5288 (remote_target::m_remote_state): Now an object instead of a pointer.
5289 (remote_target::get_remote_state): Adjust.
5290
5291 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5292
5293 * stack.c (select_and_print_frame): Delete.
5294 (struct function_bounds): Move struct within function.
5295 (func_command): Most content moved into new function
5296 find_frame_for_function, use new function, print result, add
5297 function comment.
5298 (find_frame_for_function): New function, now returns a result.
5299
5300 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5301
5302 * stack.c (iterate_over_block_arg_vars): Fix comment.
5303 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5304
5305 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5306
5307 PR gdb/23203
5308 * frame.c
5309 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5310 Define.
5311 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5312 Define.
5313 * frame.h (class scoped_restore_selected_frame): New class.
5314 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5315 of any exception, use scoped_restore_selected_frame to restore the
5316 frame instead.
5317
5318 2018-05-24 Pedro Alves <palves@redhat.com>
5319
5320 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5321 override.
5322
5323 2018-05-23 Tom Tromey <tom@tromey.com>
5324
5325 * complaints.c (struct complaints): Remove.
5326 (symfile_complaint_book): Remove.
5327 (series): New global.
5328 (complaint_internal): Update.
5329 (clear_complaints): Update.
5330
5331 2018-05-23 Tom Tromey <tom@tromey.com>
5332
5333 * complaints.c (counters): New global.
5334 (struct complain): Remove.
5335 (struct complaints) <root>: Remove.
5336 (complaint_sentinel): Remove.
5337 (symfile_complaint_book): Update.
5338 (find_complaint) Remove.
5339 (complaint_internal, clear_complaints): Update.
5340
5341 2018-05-23 Tom Tromey <tom@tromey.com>
5342
5343 * complaints.c (struct complain) <file, line>: Remove.
5344 (find_complaint): Remove file, line parameters.
5345 (complaint_internal): Update.
5346
5347 2018-05-23 Tom Tromey <tom@tromey.com>
5348
5349 * complaints.c (vcomplaint): Remove.
5350 (complaint_internal) Merge in contents of vcomplaint.
5351
5352 2018-05-23 Tom Tromey <tom@tromey.com>
5353
5354 * complaints.c (struct complaints) <explanation>: Remove.
5355 (symfile_explanations): Remove.
5356 (symfile_complaint_book): Update.
5357 (vcomplaint): Update.
5358 (struct explanation): Remove.
5359
5360 2018-05-23 Tom Tromey <tom@tromey.com>
5361
5362 * complaints.c (symfile_complaints): Remove.
5363 (complaint_internal): Remove "complaints" parameter.
5364 (clear_complaints, vcomplaint): Remove "c" parameter.
5365 (get_complaints): Remove.
5366 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5367 (dwarf2_debug_line_missing_file_complaint)
5368 (dwarf2_debug_line_missing_end_sequence_complaint)
5369 (dwarf2_complex_location_expr_complaint)
5370 (dwarf2_const_value_length_mismatch_complaint)
5371 (dwarf2_section_buffer_overflow_complaint)
5372 (dwarf2_macro_malformed_definition_complaint)
5373 (dwarf2_invalid_attrib_class_complaint)
5374 (create_addrmap_from_index, dw2_symtab_iter_next)
5375 (dw2_expand_marked_cus)
5376 (dw2_debug_names_iterator::find_vec_in_debug_names)
5377 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5378 (create_debug_type_hash_table, init_cutu_and_read_dies)
5379 (partial_die_parent_scope, add_partial_enumeration)
5380 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5381 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5382 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5383 (create_cus_hash_table, create_dwp_hash_table)
5384 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5385 (dwarf2_rnglists_process, dwarf2_ranges_process)
5386 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5387 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5388 (handle_struct_member_die, process_structure_scope)
5389 (read_array_type, read_common_block, read_module_type)
5390 (read_tag_pointer_type, read_typedef, read_base_type)
5391 (read_subrange_type, load_partial_dies, partial_die_info::read)
5392 (partial_die_info::read, partial_die_info::read)
5393 (partial_die_info::read, read_checked_initial_length_and_offset)
5394 (dwarf2_string_attr, read_formatted_entries)
5395 (dwarf_decode_line_header)
5396 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5397 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5398 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5399 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5400 (get_signatured_type, get_DW_AT_signature_type)
5401 (decode_locdesc, file_file_name, consume_improper_spaces)
5402 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5403 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5404 (dwarf2_symbol_mark_computed, set_die_type)
5405 (read_attribute_value): Update.
5406 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5407 Update.
5408 * dbxread.c (unknown_symtype_complaint)
5409 (lbrac_mismatch_complaint, repeated_header_complaint)
5410 (set_namestring, function_outside_compilation_unit_complaint)
5411 (read_dbx_symtab, process_one_symbol): Update.
5412 * gdbtypes.c (stub_noname_complaint): Update.
5413 * windows-nat.c (handle_unload_dll): Update.
5414 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5415 (decode_base_type): Update.
5416 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5417 (eb_complaint, record_include_begin, record_include_end)
5418 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5419 (process_xcoff_symbol, read_symbol)
5420 (function_outside_compilation_unit_complaint)
5421 (scan_xcoff_symtab): Update.
5422 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5423 * buildsym.c (finish_block_internal, make_blockvector)
5424 (end_symtab_get_static_block, augment_type_symtab): Update.
5425 * dtrace-probe.c (dtrace_process_dof)
5426 (dtrace_static_probe_ops::get_probes): Update.
5427 * complaints.h (struct complaint): Don't declare.
5428 (symfile_complaints): Remove.
5429 (complaint_internal): Remove "complaints" parameter.
5430 (complaint): Likewise.
5431 (clear_complaints): Likewise.
5432 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5433 (reread_symbols): Update.
5434 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5435 (dwarf2_frame_cache, decode_frame_entry): Update.
5436 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5437 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5438 (info_selectors_command): Update.
5439 * macrotab.c (macro_include, check_for_redefinition)
5440 (macro_undef): Update.
5441 * objfiles.c (filter_overlapping_sections): Update.
5442 * stabsread.c (invalid_cpp_abbrev_complaint)
5443 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5444 (define_symbol, error_type, read_type, rs6000_builtin_type)
5445 (stabs_method_name_from_physname, read_member_functions)
5446 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5447 (attach_fields_to_type, complain_about_struct_wipeout)
5448 (read_range_type, read_args, common_block_start)
5449 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5450 Update.
5451 * mdebugread.c (index_complaint, unknown_ext_complaint)
5452 (basic_type_complaint, bad_tag_guess_complaint)
5453 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5454 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5455 (parse_procedure, parse_lines)
5456 (function_outside_compilation_unit_complaint)
5457 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5458 (bad_tag_guess_complaint, reg_value_complaint): Update.
5459 * cp-support.c (demangled_name_complaint): Update.
5460 * macroscope.c (sal_macro_scope): Update.
5461 * dwarf-index-write.c (class debug_names): Update.
5462
5463 2018-05-23 Tom Tromey <tom@tromey.com>
5464
5465 * complaints.c (clear_complaints): Remove "noisy" parameter.
5466 * complaints.h (clear_complaints): Update.
5467 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5468 (reread_symbols): Update.
5469
5470 2018-05-23 Tom Tromey <tom@tromey.com>
5471
5472 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5473 SUBSEQUENT_MESSAGE.
5474 (vcomplaint, clear_complaints): Update.
5475 (symfile_explanations): Remove some messages.
5476
5477 2018-05-23 Tom Tromey <tom@tromey.com>
5478
5479 * complaints.c (internal_complaint): Remove.
5480 * complaints.h (internal_complaint): Remove.
5481
5482 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5483
5484 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5485
5486 2018-05-22 Pedro Alves <palves@redhat.com>
5487
5488 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5489 (remote_fileio_badfd, remote_fileio_return_errno)
5490 (remote_fileio_return_success, remote_fileio_func_open)
5491 (remote_fileio_func_open, remote_fileio_func_close)
5492 (remote_fileio_func_read, remote_fileio_func_write)
5493 (remote_fileio_func_lseek, remote_fileio_func_rename)
5494 (remote_fileio_func_unlink, remote_fileio_func_stat)
5495 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5496 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5497 remote_target parameter.
5498 (remote_fio_func_map) <func>: Add remote_target parameter.
5499 (do_remote_fileio_request, remote_fileio_request):
5500 * remote-fileio.h (remote_fileio_request):
5501 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5502 remote_target parameter.
5503 (remote_notif_process, handle_notification): Adjust to pass down
5504 the remote.
5505 (remote_notif_state_allocate): Add remote_target parameter. Save
5506 it.
5507 * remote-notif.h (struct remote_target): Forward declare.
5508 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5509 remote_target parameter.
5510 (struct remote_notif_state) <remote>: New field.
5511 (remote_notif_ack, remote_notif_parse): Add remote_target
5512 parameter.
5513 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5514 remote_target parameter.
5515 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5516 (threads_listing_context, rmt_thread_action, protocol_feature)
5517 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5518 (packet_result, struct threads_listing_context, remote_state):
5519 Move definitions and declarations higher up.
5520 (remote_target) <~remote_target>: Declare.
5521 (remote_download_command_source, remote_file_put, remote_file_get)
5522 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5523 (remote_hostio_pread_vFile, remote_hostio_send_command)
5524 (remote_hostio_set_filesystem, remote_hostio_open)
5525 (remote_hostio_close, remote_hostio_unlink, remote_state)
5526 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5527 (get_memory_write_packet_size, get_memory_read_packet_size)
5528 (append_pending_thread_resumptions, remote_detach_1)
5529 (append_resumption, remote_resume_with_vcont)
5530 (add_current_inferior_and_thread, wait_ns, wait_as)
5531 (process_stop_reply, remote_notice_new_inferior)
5532 (process_initial_stop_replies, remote_add_thread)
5533 (btrace_sync_conf, remote_btrace_maybe_reopen)
5534 (remove_new_fork_children, kill_new_fork_children)
5535 (discard_pending_stop_replies, stop_reply_queue_length)
5536 (check_pending_events_prevent_wildcard_vcont)
5537 (discard_pending_stop_replies_in_queue, stop_reply)
5538 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5539 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5540 (remote_interrupt_as, remote_interrupt_ns)
5541 (remote_get_noisy_reply, remote_query_attached)
5542 (remote_add_inferior, remote_current_thread, get_current_thread)
5543 (set_thread, set_general_thread, set_continue_thread)
5544 (set_general_process, write_ptid)
5545 (remote_unpack_thread_info_response, remote_get_threadinfo)
5546 (parse_threadlist_response, remote_get_threadlist)
5547 (remote_threadlist_iterator, remote_get_threads_with_ql)
5548 (remote_get_threads_with_qxfer)
5549 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5550 (get_offsets, remote_check_symbols, remote_supported_packet)
5551 (remote_query_supported, remote_packet_size)
5552 (remote_serial_quit_handler, remote_detach_pid)
5553 (remote_vcont_probe, remote_resume_with_hc)
5554 (send_interrupt_sequence, interrupt_query)
5555 (remote_notif_get_pending_events, fetch_register_using_p)
5556 (send_g_packet, process_g_packet, fetch_registers_using_g)
5557 (store_register_using_P, store_registers_using_G)
5558 (set_remote_traceframe, check_binary_download)
5559 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5560 (remote_xfer_live_readonly_partial, remote_read_bytes)
5561 (remote_send_printf, remote_flash_write, readchar)
5562 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5563 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5564 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5565 (extended_remote_disable_randomization, extended_remote_run)
5566 (send_environment_packet, extended_remote_environment_support)
5567 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5568 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5569 (packet_command): Now methods of ...
5570 (remote_target): ... this class.
5571 (m_remote_state) <remote_target>: New field.
5572 (struct remote_state) <stop_reply_queue,
5573 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5574 fields.
5575 (remote_state::remote_state): Allocate stop_reply_queue.
5576 (remote_state): Delete global.
5577 (get_remote_state_raw): Delete.
5578 (remote_target::get_remote_state): Allocate m_remote_state on
5579 demand.
5580 (get_current_remote_target): New.
5581 (remote_ops, extended_remote_ops): Delete.
5582 (wait_forever_enabled_p, remote_async_inferior_event_token):
5583 Delete, moved to struct remote_state.
5584 (remote_target::close): Delete self. Destruction bits split to
5585 ...
5586 (remote_target::~remote_target): ... this.
5587 (show_memory_packet_size): Adjust to use
5588 get_current_remote_target.
5589 (struct protocol_feature) <func>: Add remote_target parameter.
5590 All callers adjusted.
5591 (curr_quit_handler_target): New.
5592 (remote_serial_quit_handler): Reimplement.
5593 (remote_target::open_1): Adjust to use get_current_remote_target.
5594 Heap-allocate remote_target/extended_remote_target instances.
5595 (vcont_builder::vcont_builder): Add remote_target parameter, and
5596 save it in m_remote. All callers adjusted.
5597 (vcont_builder::m_remote): New field.
5598 (vcont_builder::restart, vcont_builder::flush)
5599 (vcont_builder::push_action): Use it.
5600 (remote_target::commit_resume): Use it.
5601 (struct queue_iter_param) <remote>: New field.
5602 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5603 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5604 (check_pending_event_prevents_wildcard_vcont_callback)
5605 (remote_target::check_pending_events_prevent_wildcard_vcont)
5606 (remote_target::discard_pending_stop_replies)
5607 (remote_target::discard_pending_stop_replies_in_queue)
5608 (remote_target::remote_notif_remove_queued_reply): Fill in
5609 'remote' field.
5610 (remote_notif_get_pending_events): New.
5611 (remote_target::readchar, remote_target::remote_serial_write):
5612 Save/restore curr_quit_handler_target.
5613 (putpkt): New.
5614 (kill_new_fork_children): Fill in 'remote' field.
5615 (packet_command): Use get_current_remote_target, defer to
5616 remote_target method of same name.
5617 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5618 parameter, and save it in m_remote. All callers adjusted.
5619 (scoped_remote_fd::release): Use m_remote.
5620 (scoped_remote_fd::m_remote): New field.
5621 (remote_file_put, remote_file_get, remote_file_delete): Use
5622 get_current_remote_target, defer to remote_target method of same
5623 name.
5624 (remote_btrace_reset): Add remote_state paremeter. Update all
5625 callers.
5626 (remote_async_inferior_event_handler). Pass down 'data'.
5627 (remote_new_objfile): Use get_current_remote_target.
5628 (remote_target::vcont_r_supported): New.
5629 (set_range_stepping): Use get_current_remote_target and
5630 remote_target::vcont_r_supported.
5631 (_initialize_remote): Don't allocate 'remote_state' and
5632 'stop_reply_queue' globals.
5633 * remote.h (struct remote_target): Forward declare.
5634 (getpkt, putpkt, remote_notif_get_pending_events): Add
5635 'remote_target' parameter.
5636
5637 2018-05-22 Pedro Alves <palves@redhat.com>
5638
5639 * remote.c (vcont_builder): Now a class. Make all data members
5640 private.
5641 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5642 Declare methods.
5643 (vcont_builder_restart): Rename to ...
5644 (vcont_builder::restart): ... this.
5645 (vcont_builder_flush): Rename to ...
5646 (vcont_builder::flush): ... this.
5647 (vcont_builder_push_action): Rename to ...
5648 (vcont_builder::push_action): ... this.
5649 (remote_target::commit_resume): Adjust.
5650
5651 2018-05-22 Pedro Alves <palves@redhat.com>
5652
5653 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5654 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5655 (get_fixed_memory_packet_size): New.
5656 (get_memory_packet_size): Use it.
5657 (set_memory_packet_size): Don't override the config size with
5658 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5659 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5660 Don't refer to get_memory_packet_size if not connected to a remote
5661 target. Show "(default)" if configured size is 0.
5662
5663 2018-05-22 Pedro Alves <palves@redhat.com>
5664
5665 * remote.c (remote_target::mourn_inferior): Move
5666 discard_pending_stop_replies call here from ...
5667 (_initialize_remote): ... here.
5668
5669 2018-05-22 Pedro Alves <palves@redhat.com>
5670
5671 * remote.c (compare_section_command): Remove set_general_process
5672 call.
5673
5674 2018-05-22 Pedro Alves <palves@redhat.com>
5675
5676 * remote.c (struct packet_reg, struct remote_arch_state):
5677 Move higher up in the file.
5678 (remote_state) <m_arch_states>: Store remote_arch_state values
5679 instead of remote_arch_state pointers.
5680 (remote_state::get_remote_arch_state): Adjust.
5681
5682 2018-05-22 Pedro Alves <palves@redhat.com>
5683
5684 * remote.c: Include <unordered_map>.
5685 (remote_state): Now a class.
5686 (remote_state) <get_remote_arch_state>: Declare method.
5687 <get_remote_arch_state>: New field.
5688 (remote_arch_state) <remote_arch_state>: Declare ctor.
5689 <regs>: Now a unique_ptr.
5690 (remote_gdbarch_data_handle): Delete.
5691 (get_remote_arch_state): Delete.
5692 (remote_state::get_remote_arch_state): New.
5693 (get_remote_state): Adjust to call remote_state's
5694 get_remote_arch_state method.
5695 (init_remote_state): Delete, bits factored out to ...
5696 (remote_arch_state::remote_arch_state): ... this new method.
5697 (get_remote_packet_size, get_memory_packet_size)
5698 (process_g_packet, remote_target::fetch_registers)
5699 (remote_target::prepare_to_store, store_registers_using_G)
5700 (remote_target::store_registers, remote_target::get_trace_status):
5701 Adjust to call remote_state's method.
5702 (_initialize_remote): Remove reference to
5703 remote_gdbarch_data_handle.
5704
5705 2018-05-22 Pedro Alves <palves@redhat.com>
5706
5707 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5708 pread>: New method declarations.
5709 (remote_target::open_1): Adjust.
5710 (readahead_cache_invalidate): Rename to ...
5711 (readahead_cache::invalidate): ... this, and adjust to be a class
5712 method.
5713 (readahead_cache_invalidate_fd): Rename to ...
5714 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5715 class method.
5716 (remote_hostio_pwrite): Adjust.
5717 (remote_hostio_pread_from_cache): Rename to ...
5718 (readahead_cache::pread): ... this, and adjust to be a class
5719 method.
5720 (remote_hostio_close): Adjust.
5721
5722 2018-05-22 Pedro Alves <palves@redhat.com>
5723
5724 * remote.c (remote_hostio_close_cleanup): Delete.
5725 (class scoped_remote_fd): New.
5726 (remote_file_put, remote_file_get): Use it.
5727
5728 2018-05-22 Pedro Alves <palves@redhat.com>
5729
5730 (struct vCont_action_support): Use bool and initialize all fields.
5731 (struct readahead_cache): Initialize all fields.
5732 (remote_state): Use bool and initialize all fields.
5733 (remote_state::remote_state, remote_state::~remote_state): New.
5734 (new_remote_state): Delete.
5735 (_initialize_remote): Use new to allocate remote_state.
5736
5737 2018-05-22 Pedro Alves <palves@redhat.com>
5738 張俊芝 <zjz@zjz.name>
5739
5740 PR gdb/22973
5741 * c-exp.y: Include "c-support.h".
5742 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5743 of tolower. Use c_ident_is_alpha to scan names.
5744 * c-lang.c: Include "c-support.h".
5745 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5746 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5747 * c-support.h: New file, with bits factored out from ...
5748 * cp-name-parser.y: ... this file.
5749 Include "c-support.h".
5750 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5751 c-support.h and renamed.
5752 (symbol_end, yylex): Adjust.
5753
5754 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5755
5756 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5757 parameter type to CORE_ADDR.
5758 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5759 parameter type in declaration to CORE_ADDR.
5760 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5761 target_auxv_search to get AT_HWCAP and use the result to get the
5762 target description.
5763 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5764 to CORE_ADDR. Remove the cast of the return value to unsigned
5765 long. Fix error predicate of target_auxv_search.
5766 (ppc_linux_nat_target::read_description): Change the type of the
5767 hwcap variable to CORE_ADDR.
5768
5769 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5770
5771 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5772 if the size of fpscr is larger than 32 bits.
5773
5774 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5775
5776 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5777 (ppc32_linux_vsxregmap): New global.
5778 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5779 regcache_supply_regset, and regcache_collect_regset.
5780 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5781 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5782 (fetch_vsx_register, store_vsx_register): Remove.
5783 (fetch_vsx_registers): Add regno parameter. Get regset using
5784 ppc_linux_vsxregset. Use regset to supply registers.
5785 (store_vsx_registers): Add regno parameter. Get regset using
5786 ppc_linux_vsxregset. Use regset to collect registers.
5787 (fetch_register): Call fetch_vsx_registers instead of
5788 fetch_vsx_register.
5789 (store_register): Call store_vsx_registers instead of
5790 store_vsx_register.
5791 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5792 new regno parameter.
5793 (store_ppc_registers): Call store_vsx_registers with -1 for the
5794 new regno parameter.
5795 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5796 (ppc_collect_vsxregset): Remove.
5797
5798 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5799
5800 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5801 offset fields.
5802 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5803 for vector register offset fields.
5804 (ppc64_fbsd_reg_offsets): Likewise.
5805 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5806 to vector register offset fields.
5807 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5808 to vector register offset fields.
5809 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5810 vector register offset fields.
5811 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5812 initializers for vector register offset fields.
5813 (rs6000_aix64_reg_offsets): Likewise.
5814 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5815 (ppc_supply_vrregset): Remove.
5816 (ppc_collect_vrregset): Remove.
5817 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5818 (ppc_linux_vrregset) : New function.
5819 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5820 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5821 (ppc32_linux_vrregset): Remove.
5822 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5823 and use result instead of ppc32_linux_vrregset.
5824 (ppc32_linux_reg_offsets): Remove initializers for vector register
5825 offset fields.
5826 (ppc64_linux_reg_offsets): Likewise.
5827 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5828 * ppc-linux-nat.c: Include regset.h.
5829 (gdb_vrregset_t): Adjust comment to account for little-endian
5830 mode.
5831 (supply_vrregset, fill_vrregset): Remove.
5832 (fetch_altivec_register, store_altivec_register): Remove.
5833 (fetch_altivec_registers): Add regno parameter. Get regset using
5834 ppc_linux_vrregset. Use regset to supply registers.
5835 (store_altivec_registers): Add regno parameter. Get regset using
5836 ppc_linux_vrregset. Use regset to collect registers.
5837 (fetch_register): Call fetch_altivec_registers instead of
5838 fetch_altivec_register.
5839 (store_register): Call store_altivec_registers instead of
5840 store_altivec_register.
5841 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5842 the new regno parameter.
5843 (store_ppc_registers): Call store_altivec_registers with -1 for
5844 the new regno parameter.
5845
5846 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5847
5848 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5849 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5850 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5851 (gdb_vrregset_t): Change array type size to
5852 PPC_LINUX_SIZEOF_VRREGSET.
5853 (gdb_vsxregset_t): Change array type size to
5854 PPC_LINUX_SIZEOF_VSXREGSET.
5855 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5856 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5857 PPC_LINUX_SIZEOF_VSXREGSET.
5858
5859 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5860
5861 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5862 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5863 nat/ppc-linux.c.
5864 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5865 ppc_linux_target_wordsize with tid.
5866 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5867 wordsize with tid.
5868 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5869 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5870 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5871 tid parameter. Remove static specifier.
5872 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5873 (ppc_linux_target_wordsize): New declaration.
5874
5875 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5876
5877 * arch/ppc-linux-common.c: New file.
5878 * arch/ppc-linux-common.h: New file.
5879 * arch/ppc-linux-tdesc.h: New file.
5880 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5881 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5882 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5883 arch/ppc-linux-tdesc.h.
5884 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5885 arch/ppc-linux-tdesc.h.
5886 (ppc_linux_nat_target::read_description): Remove target
5887 description matching code. Fill a ppc_linux_features struct and
5888 call ppc_linux_match_description with it. Move comment about ISA
5889 2.05 to ppc-linux-common.c.
5890 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5891 arch/ppc-linux-tdesc.h.
5892 (ppc_linux_core_read_description): Remove target description
5893 matching code. Fill a ppc_linux_features struct and call
5894 ppc_linux_match_description with it.
5895 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5896 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5897 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5898 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5899 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5900 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5901 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5902 (tdesc_powerpc_e500l): Remove.
5903
5904 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5905
5906 * ada-lang.c (catch_assert_command): Pass empty string instead
5907 of NULL for excep_string argument.
5908
5909 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5910
5911 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5912 the width of the requested register exceeds the width of the
5913 `ptrace' data type.
5914
5915 2018-05-21 Tom Tromey <tom@tromey.com>
5916
5917 * printcmd.c (output_command): Remove.
5918 (output_command_const): Rename to output_command.
5919 * valprint.h (output_command): Rename from output_command_const.
5920 * tracepoint.c (trace_dump_actions): Call output_command.
5921
5922 2018-05-21 Tom Tromey <tom@tromey.com>
5923
5924 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5925 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5926 * ada-lang.h (create_ada_exception_catchpoint): Update.
5927 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5928 std::string.
5929 (create_excep_cond_exprs, ~ada_catchpoint)
5930 (should_stop_exception, print_one_exception)
5931 (print_mention_exception, print_recreate_exception): Update.
5932 (ada_get_next_arg): Remove.
5933 (catch_ada_exception_command_split): Use std::string. Change type
5934 of "excep_string", "cond_string".
5935 (catch_ada_exception_command): Update.
5936 (create_ada_exception_catchpoint): Change type of excep_string.
5937 (ada_exception_sal): Remove excep_string parameter.
5938 (~ada_catchpoint): Remove.
5939
5940 2018-05-21 Tom Tromey <tom@tromey.com>
5941
5942 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5943 cleanup.
5944
5945 2018-05-21 Tom Tromey <tom@tromey.com>
5946
5947 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5948 Return unique_xmalloc_ptr.
5949 (print_it_exception): Update.
5950
5951 2018-05-21 Tom Tromey <tom@tromey.com>
5952
5953 * tracepoint.c (trace_dump_actions): Use std::string.
5954
5955 2018-05-21 Tom Tromey <tom@tromey.com>
5956
5957 * symfile.c (reread_symbols): Use std::string for original_name.
5958
5959 2018-05-21 Tom Tromey <tom@tromey.com>
5960
5961 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5962 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5963 constructor.
5964
5965 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5966
5967 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5968 instance to...
5969 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5970 * objfiles.c (get_objfile_bfd_data): Allocate
5971 objfile_per_bfd_storage with obstack_new when allocating on
5972 obstack.
5973
5974 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5975
5976 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5977 OBSTACK_ZALLOC.
5978 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5979 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5980 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5981 (add_pending): Likewise.
5982 (parse_symbol): Likewise.
5983 (parse_partial_symbols): Likewise.
5984 (psymtab_to_symtab_1): Likewise.
5985 (new_psymtab): Likewise.
5986 (elfmdebug_build_psymtabs): Likewise.
5987 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5988 * objfiles.c (get_objfile_bfd_data): Likewise.
5989 (objfile_register_static_link): Likewise.
5990 * psymtab.c (allocate_psymtab): Likewise.
5991 * stabsread.c (read_member_functions): Likewise.
5992 * xcoffread.c (xcoff_end_psymtab): Likewise.
5993
5994 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5995
5996 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5997 compiler supports std::is_trivially_constructible.
5998 * common/poison.h: Include obstack.h.
5999 (IsMallocable): Define to is_trivially_constructible if the
6000 compiler supports it, define to true_type otherwise.
6001 (xobnew): New.
6002 (XOBNEW): Redefine.
6003 (xobnewvec): New.
6004 (XOBNEWVEC): Redefine.
6005 * gdb_obstack.h (obstack_zalloc): New.
6006 (OBSTACK_ZALLOC): Redefine.
6007 (obstack_calloc): New.
6008 (OBSTACK_CALLOC): Redefine.
6009 (obstack_new): New.
6010 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6011 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6012 gdbarch.c.
6013 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6014 obstack_calloc/obstack_zalloc.
6015 (gdbarch_obstack_zalloc): Remove.
6016 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6017
6018 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6019
6020 * stack.c (backtrace_command_1): Remove useless variable int i.
6021
6022 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6023
6024 * stack.c (print_frame_info): Fix comment.
6025
6026 2018-05-18 Tom Tromey <tom@tromey.com>
6027
6028 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6029 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6030 (~dwarf2_per_objfile): Update
6031 (dwarf2_get_dwz_file): Use new.
6032 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6033 unique_ptr.
6034
6035 2018-05-18 Tom Tromey <tom@tromey.com>
6036
6037 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6038 unique_ptr.
6039 * dwarf2read.c (struct dwp_file): Add constructor and
6040 initializers.
6041 (open_and_init_dwp_file): Return a unique_ptr.
6042 (dwarf2_per_objfile, create_dwp_hash_table)
6043 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6044 (lookup_dwo_unit_in_dwp): Update.
6045 (open_and_init_dwp_file, get_dwp_file): Update.
6046
6047 2018-05-18 Tom Tromey <tom@tromey.com>
6048
6049 * dwarf2read.c (dwarf2_per_objfile): Update.
6050 (struct mapped_index): Add initializers.
6051 (dwarf2_read_index): Use new.
6052 (dw2_symtab_iter_init): Update.
6053 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6054 unique_ptr.
6055
6056 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6057
6058 * dwarf2read.c (mapped_index) <total_size>: Remove.
6059
6060 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * unittests/format_pieces-selftests.c (test_format_specifier):
6063 Add ARI comments.
6064
6065 2018-05-18 Tom Tromey <tom@tromey.com>
6066
6067 * c-typeprint.c (maybe_print_hole): New function.
6068 (c_print_type_struct_field_offset): Update.
6069 (c_type_print_base_struct_union): Call maybe_print_hole.
6070
6071 2018-05-17 Keith Seitz <keiths@redhat.com>
6072
6073 * breakpoint.c (build_bpstat_chain): New function, moved from
6074 bpstat_stop_status.
6075 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6076 If no stop chain is passed, call build_bpstat_chain to build it.
6077 * breakpoint.h (build_bpstat_chain): Declare.
6078 (bpstat_stop_status): Move documentation here from breakpoint.c.
6079 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6080 build the stop chain and pass it to skip_inline_frames.
6081 Pass this stop chain to bpstat_stop_status.
6082 * inline-frame.c: Include breakpoint.h.
6083 (stopped_by_user_bp_inline_frame): New function.
6084 (skip_inline_frames): Add parameter `stop_chain'.
6085 Move documention to inline-frame.h.
6086 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6087 whether the frame should be elided.
6088 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6089 Add moved documentation and update for new parameter.
6090
6091 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6092
6093 PR cli/14975
6094 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6095 unittests/format_pieces-selftests.c.
6096 * common/format.h (format_piece) <operator==>: New.
6097 (format_pieces) <operator[]>: Remove.
6098 * common/format.c (format_pieces::format_pieces): Handle \e.
6099 * unittests/format_pieces-selftests.c: New.
6100
6101 2018-05-17 Tom Tromey <tom@tromey.com>
6102
6103 PR symtab/23010:
6104 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6105 (dw2_instantiate_symtab): Add skip_partial parameter.
6106 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6107 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6108 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6109 (dw2_expand_symtabs_matching_one)
6110 (dw2_find_pc_sect_compunit_symtab)
6111 (dw2_debug_names_lookup_symbol)
6112 (dw2_debug_names_expand_symtabs_for_function): Update.
6113 (init_cutu_and_read_dies): Add skip_partial parameter.
6114 (process_psymtab_comp_unit, build_type_psymtabs_1)
6115 (process_skeletonless_type_unit, load_partial_comp_unit)
6116 (psymtab_to_symtab_1): Update.
6117 (load_full_comp_unit): Add skip_partial parameter.
6118 (process_imported_unit_die, dwarf2_read_addr_index)
6119 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6120 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6121 (read_signatured_type): Update.
6122
6123 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6124
6125 * value.c (release_value): Remove unused variable.
6126 (record_latest_value): Likewise.
6127 (access_value_history): Likewise.
6128 (preserve_values): Likewise.
6129
6130 2018-05-17 Tom Tromey <tom@tromey.com>
6131
6132 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6133 Initialize.
6134
6135 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6136
6137 PR gdb/22286
6138 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6139 Also handle registers whose width is not a multiple of
6140 PTRACE_TYPE_RET.
6141 (linux_nat_trad_target::store_register): Likewise.
6142
6143 2018-05-16 Tom Tromey <tom@tromey.com>
6144
6145 * gdbcore.h (core_bfd): Redefine.
6146 * corelow.c (core_target::close): Update.
6147 (core_target_open): Update.
6148 * progspace.h (struct program_space) <cbfd>: Now a
6149 gdb_bfd_ref_ptr.
6150
6151 2018-05-16 Tom Tromey <tom@tromey.com>
6152
6153 PR cli/19551:
6154 * symfile-add-flags.h (enum symfile_add_flags)
6155 <SYMFILE_NOT_FILENAME>: New constant.
6156 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6157 objfile name from BFD.
6158 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6159 * minidebug.c (find_separate_debug_file_in_section): Put
6160 ".gnu_debugdata" into BFD's file name.
6161
6162 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6163
6164 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6165 Remove.
6166
6167 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6168
6169 PR binutils/21446
6170 * aarch64-tdep.c (aarch64_analyze_prologue,
6171 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6172 Indicate not interested in errors.
6173
6174 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6175
6176 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6177 Supply the MIPS_ZERO_REGNUM register.
6178
6179 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6180
6181 * mips-tdep.c (mask_address_var): Make variable static.
6182
6183 2018-05-14 Tom Tromey <tom@tromey.com>
6184
6185 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6186
6187 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6188
6189 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6190 FXSAVE_ADDR for the mxcsr register.
6191
6192 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6193
6194 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6195
6196 2018-05-11 Pedro Alves <palves@redhat.com>
6197
6198 * corelow.c (core_target) <core_target>: No longer inline.
6199 Initialize m_core_gdbarch, m_core_vec and build the section table
6200 here.
6201 <~core_target>: New.
6202 <core_gdbarch, get_core_register_section>: New methods.
6203 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6204 factored out from ...
6205 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6206 (core_ops): Delete.
6207 (sniff_core_bfd): Add gdbarch parameter.
6208 (core_close): Delete, merged into ...
6209 (core_target::close): ... here. Delete self.
6210 (core_close_cleanup): Delete.
6211 (core_target_open): Allocate a core_target on the heap. Use a
6212 unique_ptr instead of a cleanup. Bits moved into the core_target
6213 ctor. Adjust to use core_target methods instead of globals.
6214 (get_core_register_section): Rename to ...
6215 (core_target::get_core_register_section): ... this and adjust.
6216 (struct get_core_registers_cb_data): New.
6217 (get_core_registers_cb): Use it. Use bool.
6218 (core_target::fetch_registers, core_target::files_info)
6219 (core_target::xfer_partial, core_target::read_description)
6220 (core_target::pid_to, core_target::thread_name): Adjust to
6221 reference class fields instead of globals.
6222 * target.h (struct target_ops_deleter, target_ops_up): New.
6223
6224 2018-05-11 Pedro Alves <palves@redhat.com>
6225
6226 * corefile.c (core_file_command): Move to corelow.c.
6227 * corelow.c (the_core_target): Delete.
6228 (core_file_command): Moved from corefile.c. Check exec_bfd
6229 instead of the_core_target. Use target_detach instead of calling
6230 into the_core_target directly.
6231 (maybe_say_no_core_file_now): New.
6232 (core_target::detach): Use it.
6233 (_initialize_corelow): Remove references to the_core_target.
6234 * gdbcore.h (the_core_target): Delete.
6235
6236 2018-05-11 Tom Tromey <tromey@redhat.com>
6237 Pedro Alves <palves@redhat.com>
6238
6239 * corefile.c (core_bfd): Remove.
6240 * gdbcore.h (core_bfd): Now a macro.
6241 * progspace.h (struct program_space) <cbfd>: New field.
6242
6243 2018-05-11 Tom Tromey <tom@tromey.com>
6244
6245 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6246 gdb::def_vector.
6247
6248 2018-05-10 Tom Tromey <tom@tromey.com>
6249
6250 * configure: Rebuild.
6251 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6252
6253 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6254
6255 PR server/23158:
6256 * regformats/regdat.sh: Adjust script, following the addition
6257 of the new expedite_regs parameter to init_target_desc.
6258
6259 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6260
6261 PR gdb/23127
6262 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6263 set_gdbarch_significant_addr_bit.
6264 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6265 set_gdbarch_significant_addr_bit.
6266 * utils.c (address_significant): Update to sign extend addr.
6267
6268 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6269
6270 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6271 (xtensa_linux_init_abi): Limit tdep->num_regs by
6272 tdep->num_nopriv_regs.
6273 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6274 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6275 not initialized.
6276
6277 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6278
6279 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6280
6281 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6282
6283 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6284 (I387_MXCSR_INIT_VAL): New constant.
6285 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6286 buffer if it was supplied by the inferior.
6287 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6288 (i387_xsave_get_clear_bv): New function.
6289 (i387_supply_xsave): Only read x87 control registers from the
6290 xsave buffer if the feature is enabled, and the state will have
6291 been written, otherwise, provide a suitable default.
6292 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6293 including x87 control registers. Update control registers if they
6294 have changed from the default value, and mark features as enabled
6295 as required.
6296 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6297
6298 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6299
6300 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6301
6302 2018-05-07 Tom Tromey <tom@tromey.com>
6303
6304 * configure: Rebuild.
6305 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6306
6307 2018-05-07 Tom Tromey <tom@tromey.com>
6308
6309 PR tdep/20362:
6310 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6311 bit. Use correct value for VDIV.
6312
6313 2018-05-04 Tom Tromey <tom@tromey.com>
6314
6315 * configure: Rebuild.
6316 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6317
6318 2018-05-04 Tom Tromey <tom@tromey.com>
6319
6320 * linux-record.c (record_linux_system_call) <case
6321 RECORD_SYS_RECVFROM>: Add "break".
6322
6323 2018-05-04 Tom Tromey <tom@tromey.com>
6324
6325 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6326 Add missing "break".
6327 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6328 Add missing "break".
6329
6330 2018-05-04 Tom Tromey <tom@tromey.com>
6331
6332 * rs6000-tdep.c (ppc_process_record_op4)
6333 (ppc_process_record_op63): Add fall-through comment.
6334
6335 2018-05-04 Tom Tromey <tom@tromey.com>
6336
6337 * i386-tdep.c (i386_process_record): Add fall-through comment.
6338
6339 2018-05-04 Tom Tromey <tom@tromey.com>
6340
6341 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6342 comment.
6343
6344 2018-05-04 Tom Tromey <tom@tromey.com>
6345
6346 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6347 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6348 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6349 comment.
6350 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6351 comment.
6352 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6353 comment.
6354
6355 2018-05-04 Tom Tromey <tom@tromey.com>
6356
6357 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6358
6359 2018-05-04 Tom Tromey <tom@tromey.com>
6360
6361 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6362 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6363 * symfile.c (section_is_mapped): Fix fall-through comment.
6364 * stabsread.c (define_symbol, read_member_functions): Fix
6365 fall-through comment.
6366 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6367 comment.
6368 * remote.c (remote_wait_as): Fix fall-through comment.
6369 * p-exp.y (yylex): Fix fall-through comment.
6370 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6371 comment.
6372 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6373 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6374 * jv-exp.y (yylex): Fix fall-through comment.
6375 * go-exp.y (lex_one_token): Fix fall-through comment.
6376 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6377 fall-through comment.
6378 * f-exp.y (yylex): Fix fall-through comment.
6379 * dwarf2read.c (process_die): Fix fall-through comments.
6380 * dbxread.c (process_one_symbol): Fix fall-through comment.
6381 * d-exp.y (lex_one_token): Fix fall-through comment.
6382 * cp-name-parser.y (yylex): Fix fall-through comment.
6383 * coffread.c (coff_symtab_read): Fix fall-through comment.
6384 * c-exp.y (lex_one_token): Fix fall-through comment.
6385 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6386 comment.
6387 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6388 comment.
6389
6390 2018-05-04 Tom Tromey <tom@tromey.com>
6391
6392 PR python/22730:
6393 * NEWS: Mention gdb.execute change.
6394 * gdbcmd.h (execute_control_command): Don't declare.
6395 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6396 execute_control_commands, execute_control_commands_to_string.
6397 * cli/cli-script.h (execute_control_commands)
6398 (execute_control_commands_to_string): Declare.
6399 (execute_control_command): Add from_tty parameter.
6400 * cli/cli-script.c (execute_control_commands)
6401 (execute_control_commands_to_string): New functions.
6402 (execute_user_command): Use execute_control_commands.
6403 (execute_control_command_1): Add "from_tty" parameter. Update.
6404 (execute_control_command): Likewise.
6405
6406 2018-05-04 Tom Tromey <tom@tromey.com>
6407
6408 PR python/22731:
6409 * NEWS: Mention that breakpoint commands are writable.
6410 * python/py-breakpoint.c (bppy_set_commands): New function.
6411 (breakpoint_object_getset) <"commands">: Use it.
6412
6413 2018-05-04 Tom Tromey <tom@tromey.com>
6414
6415 * tracepoint.c (actions_command): Update.
6416 * mi/mi-cmd-break.c (mi_command_line_array)
6417 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6418 (mi_read_next_line): Remove.
6419 (mi_cmd_break_commands): Update.
6420 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6421 function_view.
6422 * cli/cli-script.c (get_command_line): Update.
6423 (process_next_line): Use function_view. Constify.
6424 (recurse_read_control_structure, read_command_lines)
6425 (read_command_lines_1): Change argument types to function_view.
6426 (do_define_command, document_command): Update.
6427 * breakpoint.h (check_tracepoint_command): Don't declare.
6428 * breakpoint.c (check_tracepoint_command): Remove.
6429 (commands_command_1, create_tracepoint_from_upload): Update.
6430
6431 2018-05-04 Tom Tromey <tom@tromey.com>
6432
6433 PR gdb/11750:
6434 * cli/cli-script.h (enum command_control_type) <define_control>:
6435 New constant.
6436 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6437 (build_command_line, execute_control_command_1)
6438 (process_next_line): Likewise.
6439 (do_define_command): New function, extracted from define_command.
6440 (define_command): Use it.
6441
6442 2018-05-04 Tom Tromey <tom@tromey.com>
6443
6444 * tracepoint.c (actions_command): Update.
6445 * cli/cli-script.h (read_command_lines): Update.
6446 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6447 (MAX_TMPBUF): Remove define.
6448 (define_command): Use string_printf.
6449 (document_command): Likewise.
6450 * breakpoint.c (commands_command_1): Update.
6451
6452 2018-05-04 Tom Tromey <tom@tromey.com>
6453
6454 * top.c (execute_command): Update.
6455 * cli/cli-script.h (print_command_lines): Now varargs.
6456 * cli/cli-script.c (print_command_lines): Now varargs.
6457 (execute_control_command_1) <case while_control, case if_control>:
6458 Update.
6459
6460 2018-05-04 Tom Tromey <tom@tromey.com>
6461
6462 * tracepoint.c (all_tracepoint_actions): Rename from
6463 all_tracepoint_actions_and_cleanup. Change return type.
6464 (actions_command, encode_actions_1, encode_actions)
6465 (trace_dump_actions, tdump_command): Update.
6466 * remote.c (remote_download_command_source): Update.
6467 * python/python.c (gdbpy_eval_from_control_command)
6468 (python_command, python_interactive_command): Update.
6469 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6470 * guile/guile.c (guile_command)
6471 (gdbscm_eval_from_control_command, guile_command): Update.
6472 * compile/compile.c (compile_code_command)
6473 (compile_print_command, compile_to_object): Update.
6474 * cli/cli-script.h (struct command_lines_deleter): New.
6475 (counted_command_line): New typedef.
6476 (struct command_line): Add constructor, destructor.
6477 <body_list>: Remove.
6478 <body_list_0, body_list_1>: New members.
6479 (command_line_up): Remove typedef.
6480 (read_command_lines, read_command_lines_1, get_command_line):
6481 Update.
6482 (copy_command_lines): Don't declare.
6483 * cli/cli-script.c (build_command_line): Use "new".
6484 (get_command_line): Return counted_command_line.
6485 (print_command_lines, execute_user_command)
6486 (execute_control_command_1, while_command, if_command): Update.
6487 (realloc_body_list): Remove.
6488 (process_next_line, recurse_read_control_structure): Update.
6489 (read_command_lines, read_command_lines_1): Return counted_command_line.
6490 (free_command_lines): Use "delete".
6491 (copy_command_lines): Remove.
6492 (define_command, document_command, show_user_1): Update.
6493 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6494 a counted_command_line.
6495 * breakpoint.h (counted_command_line): Remove typedef.
6496 (breakpoint_set_commands): Update.
6497 * breakpoint.c (check_no_tracepoint_commands)
6498 (validate_commands_for_breakpoint): Update.
6499 (breakpoint_set_commands): Change commands to be a
6500 counted_command_line.
6501 (commands_command_1, update_dprintf_command_list)
6502 (create_tracepoint_from_upload): Update.
6503
6504 2018-05-04 Tom Tromey <tom@tromey.com>
6505
6506 * cli/cli-decode.h (cmd_list_element): New constructor.
6507 (~cmd_list_element): New destructor.
6508 (struct cmd_list_element): Add initializers.
6509 * cli/cli-decode.c (do_add_cmd): Use "new".
6510 (delete_cmd): Use "delete".
6511
6512 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6513 Pedro Alves <palves@redhat.com>
6514
6515 PR breakpoints/19806 and support for PR external/20207.
6516 * NEWS: Mention Aarch64 watchpoint improvements.
6517 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6518 watchpoints and PR external/20207 watchpoints.
6519 * nat/aarch64-linux-hw-point.c
6520 (kernel_supports_any_contiguous_range): New.
6521 (aarch64_watchpoint_offset): New.
6522 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6523 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6524 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6525 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6526 next_addr_orig_p. Support PR external/20207 watchpoints.
6527 (aarch64_downgrade_regs): New.
6528 (aarch64_dr_state_insert_one_point): New parameters offset and
6529 addr_orig.
6530 (aarch64_dr_state_remove_one_point): Likewise.
6531 (aarch64_handle_breakpoint): Update caller.
6532 (aarch64_handle_aligned_watchpoint): Likewise.
6533 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6534 aligned_offset.
6535 (aarch64_linux_set_debug_regs): Remove const from state. Call
6536 aarch64_downgrade_regs.
6537 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6538 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6539 (DR_CONTROL_MASK): ... this.
6540 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6541 (unsigned int aarch64_watchpoint_offset): New prototype.
6542 (aarch64_linux_set_debug_regs): Remove const from state.
6543 * utils.c (align_up, align_down): Move to ...
6544 * common/common-utils.c (align_up, align_down): ... here.
6545 * utils.h (align_up, align_down): Move to ...
6546 * common/common-utils.h (align_up, align_down): ... here.
6547
6548 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6549
6550 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6551 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6552 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6553 Re-implement to match the ABI as summarized in GCC's
6554 gcc/config/sparc/sparc.c. All callers updated.
6555 (sparc32_store_arguments): Remove assertion.
6556
6557 2018-05-04 Tom Tromey <tom@tromey.com>
6558
6559 * printcmd.c: Don't include tui.h.
6560 (decode_format): Use skip_spaces.
6561
6562 2018-05-04 Tom Tromey <tom@tromey.com>
6563
6564 PR gdb/22619:
6565 * printcmd.c (last_count): New global.
6566 (x_command): Use saved count when repeating.
6567
6568 2018-05-04 Tom Tromey <tom@tromey.com>
6569
6570 * nto-procfs.c (do_closedir_cleanup): Remove.
6571 (procfs_pidlist): Use gdb_dir_up.
6572 * procfs.c (do_closedir_cleanup): Remove.
6573 (proc_update_threads): Use gdb_dir_up.
6574 * common/filestuff.h (struct gdb_dir_deleter): New.
6575 (gdb_dir_up): New typedef.
6576
6577 2018-05-04 Tom Tromey <tom@tromey.com>
6578
6579 * ada-lang.c (print_mention_exception): Use std::string.
6580
6581 2018-05-04 Tom Tromey <tom@tromey.com>
6582
6583 * ada-lang.c (create_excep_cond_exprs): Update.
6584 (ada_exception_catchpoint_cond_string): Use std::string.
6585
6586 2018-05-04 Tom Tromey <tom@tromey.com>
6587
6588 * ada-lang.c (xget_renaming_scope): Return std::string.
6589 (old_renaming_is_invisible): Update.
6590
6591 2018-05-04 Tom Tromey <tom@tromey.com>
6592
6593 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6594 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6595
6596 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6597
6598 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6599
6600 2018-05-04 Tom Tromey <tom@tromey.com>
6601
6602 * remote.c (remote_query_supported_append): Change type.
6603 (remote_check_symbols): Update.
6604
6605 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6606
6607 PR gdb/11420
6608 * configure.ac: Prepend libpython.
6609 * python/python-config.py: Likewise.
6610 * configure: Regenerate.
6611
6612 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6613
6614 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6615
6616 2018-05-03 Pedro Alves <palves@redhat.com>
6617
6618 * s390-linux-nat.c
6619 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6620 override. Write 'true' instead of '1'.
6621 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6622 declaration.
6623
6624 2018-05-02 Pedro Alves <palves@redhat.com>
6625
6626 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6627 add_inf_child_target.
6628 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6629 add_inf_child_target.
6630 * aix-thread.c (aix_thread_target_info): New.
6631 (aix_thread_target) <shortname, longname, doc>: Delete.
6632 <info>: New.
6633 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6634 add_inf_child_target.
6635 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6636 add_inf_child_target.
6637 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6638 add_inf_child_target.
6639 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6640 add_inf_child_target.
6641 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6642 add_inf_child_target.
6643 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6644 add_inf_child_target.
6645 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6646 add_inf_child_target.
6647 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6648 add_inf_child_target.
6649 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6650 add_inf_child_target.
6651 * bfd-target.c (target_bfd_target_info): New.
6652 (target_bfd) <shortname, longname, doc>: Delete.
6653 <info>: New.
6654 * bsd-kvm.c (bsd_kvm_target_info): New.
6655 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6656 <info>: New.
6657 (bsd_kvm_target::open): Rename to ...
6658 (bsd_kvm_target_open): ... this. Adjust.
6659 * bsd-uthread.c (bsd_uthread_target_info): New.
6660 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6661 <info>: New.
6662 * corefile.c (core_file_command): Adjust.
6663 * corelow.c (core_target_info): New.
6664 (core_target) <shortname, longname, doc>: Delete.
6665 <info>: New.
6666 (core_target::open): Rename to ...
6667 (core_target_open): ... this. Adjust.
6668 * ctf.c (ctf_target_info): New.
6669 (ctf_target) <shortname, longname, doc>: Delete.
6670 <info>: New.
6671 (ctf_target::open): Rename to ...
6672 (ctf_target_open): ... this.
6673 (_initialize_ctf): Adjust.
6674 * exec.c (exec_target_info): New.
6675 (exec_target) <shortname, longname, doc>: Delete.
6676 <info>: New.
6677 (exec_target::open): Rename to ...
6678 (exec_target_open): ... this.
6679 * gdbcore.h (core_target_open): Declare.
6680 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6681 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6682 add_inf_child_target.
6683 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6684 add_inf_child_target.
6685 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6686 add_inf_child_target.
6687 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6688 add_inf_child_target.
6689 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6690 add_inf_child_target.
6691 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6692 add_inf_child_target.
6693 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6694 add_inf_child_target.
6695 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6696 add_inf_child_target.
6697 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6698 add_inf_child_target.
6699 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6700 add_inf_child_target.
6701 * inf-child.c (inf_child_target_info): New.
6702 (inf_child_target::info): New.
6703 (inf_child_open_target): Remove 'target' parameter. Use
6704 get_native_target instead.
6705 (inf_child_target::open): Delete.
6706 (add_inf_child_target): New.
6707 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6708 Delete.
6709 <info>: New.
6710 (add_inf_child_target): Declare.
6711 (inf_child_open_target): Declare.
6712 * linux-thread-db.c (thread_db_target_info): New.
6713 (thread_db_target) <shortname, longname, doc>: Delete.
6714 <info>: New.
6715 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6716 add_inf_child_target.
6717 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6718 add_inf_child_target.
6719 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6720 add_inf_child_target.
6721 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6722 add_inf_child_target.
6723 * make-target-delegates (print_class): Adjust.
6724 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6725 add_inf_child_target.
6726 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6727 add_inf_child_target.
6728 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6729 add_inf_child_target.
6730 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6731 add_inf_child_target.
6732 * nto-procfs.c (nto_native_target_info): New.
6733 (nto_procfs_target_native) <shortname, longname, doc>:
6734 Delete.
6735 <info>: New.
6736 (nto_procfs_target_info): New.
6737 (nto_procfs_target_procfs) <shortname, longname, doc>:
6738 Delete.
6739 <info>: New.
6740 (init_procfs_targets): Adjust.
6741 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6742 add_inf_child_target.
6743 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6744 add_inf_child_target.
6745 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6746 add_inf_child_target.
6747 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6748 add_inf_child_target.
6749 * ravenscar-thread.c (ravenscar_target_info): New.
6750 (ravenscar_thread_target) <shortname, longname, doc>:
6751 Delete.
6752 <info>: New.
6753 * record-btrace.c (record_btrace_target_info):
6754 (record_btrace_target) <shortname, longname, doc>: Delete.
6755 <info>: New.
6756 (record_btrace_target::open): Rename to ...
6757 (record_btrace_target_open): ... this. Adjust.
6758 * record-full.c (record_longname, record_doc): New.
6759 (record_full_base_target) <shortname, longname, doc>: Delete.
6760 <info>: New.
6761 (record_full_target_info): New.
6762 (record_full_target): <shortname>: Delete.
6763 <info>: New.
6764 (record_full_core_open_1, record_full_open_1): Update comments.
6765 (record_full_base_target::open): Rename to ...
6766 (record_full_open): ... this.
6767 (cmd_record_full_restore): Update.
6768 (_initialize_record_full): Update.
6769 * remote-sim.c (remote_sim_target_info): New.
6770 (gdbsim_target) <shortname, longname, doc>: Delete.
6771 <info>: New.
6772 (gdbsim_target::open): Rename to ...
6773 (gdbsim_target_open): ... this.
6774 (_initialize_remote_sim): Adjust.
6775 * remote.c (remote_doc): New.
6776 (remote_target_info): New.
6777 (remote_target) <shortname, longname, doc>: Delete.
6778 <info>: New.
6779 (extended_remote_target_info): New.
6780 (extended_remote_target) <shortname, longname, doc>: Delete.
6781 <info>: New.
6782 (remote_target::open_1): Make static. Adjust.
6783 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6784 * s390-linux-nat.c (_initialize_s390_nat): Use
6785 add_inf_child_target.
6786 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6787 add_inf_child_target.
6788 * sol-thread.c (thread_db_target_info): New.
6789 (sol_thread_target) <shortname, longname, doc>: Delete.
6790 <info>: New.
6791 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6792 add_inf_child_target.
6793 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6794 add_inf_child_target.
6795 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6796 add_inf_child_target.
6797 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6798 add_inf_child_target.
6799 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6800 add_inf_child_target.
6801 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6802 add_inf_child_target.
6803 * spu-linux-nat.c (_initialize_spu_nat): Use
6804 add_inf_child_target.
6805 * spu-multiarch.c (spu_multiarch_target_info): New.
6806 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6807 <info>: New.
6808 * target-delegates.c: Regenerate.
6809 * target.c: Include <unordered_map>.
6810 (target_ops_p): Delete.
6811 (DEF_VEC_P(target_ops_p)): Delete.
6812 (target_factories): New.
6813 (test_target_info): New.
6814 (test_target_ops::info): New.
6815 (open_target): Adjust to use target_factories.
6816 (add_target_with_completer): Rename to ...
6817 (add_target): ... this. Change prototype. Register target_info
6818 and open callback in target_factories. Register target_info in
6819 command context instead of target_ops.
6820 (add_target): Delete old implementation.
6821 (add_deprecated_target_alias): Change prototype. Adjust.
6822 (the_native_target): New.
6823 (set_native_target, get_native_target): New.
6824 (find_default_run_target): Use the_native_target.
6825 (find_attach_target, find_run_target): Simplify.
6826 (target_ops::open): Delete.
6827 (dummy_target_info): New.
6828 (dummy_target::shortname, dummy_target::longname)
6829 (dummy_target::doc): Delete.
6830 (dummy_target::info): New.
6831 (debug_target::shortname, debug_target::longname)
6832 (debug_target::doc): Delete.
6833 (debug_target::info): New.
6834 * target.h (struct target_info): New.
6835 (target_ops::~target_ops): Add comment.
6836 (target_ops::info): New.
6837 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6838 longer virtual. Implement in terms of target_info.
6839 (set_native_target, get_native_target): Declare.
6840 (target_open_ftype): New.
6841 (add_target, add_target_with_completer)
6842 (add_deprecated_target_alias): Change prototype.
6843 (test_target) <shortname, longname, doc>: Delete.
6844 <info>: New.
6845 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6846 add_inf_child_target.
6847 * tracefile-tfile.c (tfile_target_info): New.
6848 (tfile_target) <shortname, longname, doc>: Delete.
6849 <info>: New.
6850 (tfile_target::open): Rename to ...
6851 (tfile_target_open): ... this.
6852 (_initialize_tracefile_tfile): Adjust.
6853 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6854 add_inf_child_target.
6855 * windows-nat.c (_initialize_windows_nat): Use
6856 add_inf_child_target.
6857 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6858 add_inf_child_target.
6859
6860 2018-05-02 Pedro Alves <palves@redhat.com>
6861
6862 * linux-nat.h (linux_nat_target) <low_new_thread,
6863 low_delete_thread, low_new_fork, low_forget_process,
6864 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6865 New virtual methods.
6866 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6867 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6868 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6869 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6870 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6871 Delete.
6872 * linux-fork.c (delete_fork): Adjust to call low method.
6873 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6874 (linux_nat_new_fork, linux_nat_forget_process_hook)
6875 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6876 (linux_nat_status_is_event):
6877 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6878 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6879 to call low method.
6880 (sigtrap_is_event): Rename to ...
6881 (linux_nat_target::low_status_is_event): ... this.
6882 (linux_nat_set_status_is_event): Delete.
6883 (save_stop_reason, linux_nat_wait_1)
6884 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6885 low methods.
6886 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6887 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6888 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6889 (linux_nat_set_prepare_to_resume): Delete.
6890 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6891 low virtual methods.
6892 * amd64-linux-nat.c: Likewise.
6893 * arm-linux-nat.c: Likewise.
6894 * i386-linux-nat.c: Likewise.
6895 * ia64-linux-nat.c: Likewise.
6896 * mips-linux-nat.c: Likewise.
6897 * ppc-linux-nat.c: Likewise.
6898 * s390-linux-nat.c: Likewise.
6899 * sparc64-linux-nat.c: Likewise.
6900 * x86-linux-nat.c: Likewise.
6901 * x86-linux-nat.h: Include "nat/x86-linux.h".
6902 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6903 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6904 Override methods.
6905
6906 2018-05-02 Pedro Alves <palves@redhat.com>
6907
6908 * target.h (target_ops)
6909 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6910 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6911 stopped_by_watchpoint, have_continuable_watchpoint,
6912 stopped_data_address, watchpoint_addr_within_range,
6913 can_accel_watchpoint_condition, can_run, thread_alive,
6914 has_all_memory, has_memory, has_stack, has_registers,
6915 has_execution, can_async_p, is_async_p, supports_non_stop,
6916 always_non_stop_p, can_execute_reverse, supports_multi_process,
6917 supports_enable_disable_tracepoint,
6918 supports_disable_randomization, supports_string_tracing,
6919 supports_evaluation_of_breakpoint_conditions,
6920 can_run_breakpoint_commands, filesystem_is_local,
6921 can_download_tracepoint, get_trace_state_variable_value,
6922 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6923 record_is_replaying, record_will_replay,
6924 augmented_libraries_svr4_read>: Adjust to return bool.
6925 * aarch64-linux-nat.c: All implementations adjusted.
6926 * aix-thread.c: All implementations adjusted.
6927 * arm-linux-nat.c: All implementations adjusted.
6928 * breakpoint.c: All implementations adjusted.
6929 * bsd-kvm.c: All implementations adjusted.
6930 * bsd-uthread.c: All implementations adjusted.
6931 * corelow.c: All implementations adjusted.
6932 * ctf.c: All implementations adjusted.
6933 * darwin-nat.c: All implementations adjusted.
6934 * darwin-nat.h: All implementations adjusted.
6935 * exec.c: All implementations adjusted.
6936 * fbsd-nat.c: All implementations adjusted.
6937 * fbsd-nat.h: All implementations adjusted.
6938 * gnu-nat.c: All implementations adjusted.
6939 * gnu-nat.h: All implementations adjusted.
6940 * go32-nat.c: All implementations adjusted.
6941 * ia64-linux-nat.c: All implementations adjusted.
6942 * inf-child.c: All implementations adjusted.
6943 * inf-child.h: All implementations adjusted.
6944 * inf-ptrace.c: All implementations adjusted.
6945 * inf-ptrace.h: All implementations adjusted.
6946 * linux-nat.c: All implementations adjusted.
6947 * linux-nat.h: All implementations adjusted.
6948 * mips-linux-nat.c: All implementations adjusted.
6949 * nto-procfs.c: All implementations adjusted.
6950 * ppc-linux-nat.c: All implementations adjusted.
6951 * procfs.c: All implementations adjusted.
6952 * ravenscar-thread.c: All implementations adjusted.
6953 * record-btrace.c: All implementations adjusted.
6954 * record-full.c: All implementations adjusted.
6955 * remote-sim.c: All implementations adjusted.
6956 * remote.c: All implementations adjusted.
6957 * s390-linux-nat.c: All implementations adjusted.
6958 * sol-thread.c: All implementations adjusted.
6959 * spu-multiarch.c: All implementations adjusted.
6960 * target-delegates.c: All implementations adjusted.
6961 * target.c: All implementations adjusted.
6962 * target.h: All implementations adjusted.
6963 * tracefile-tfile.c: All implementations adjusted.
6964 * tracefile.c: All implementations adjusted.
6965 * tracefile.h: All implementations adjusted.
6966 * windows-nat.c: All implementations adjusted.
6967 * x86-linux-nat.h: All implementations adjusted.
6968 * x86-nat.h: All implementations adjusted.
6969
6970 2018-05-02 Pedro Alves <palves@redhat.com>
6971
6972 * make-target-delegates (scan_target_h): Don't trim lines here.
6973 Replace sequences of tabs and/or whitespace with a single
6974 whitespace.
6975 (top level, parsing methods): Trim each line before processing it
6976 here.
6977
6978 2018-05-02 Pedro Alves <palves@redhat.com>
6979 John Baldwin <jhb@freebsd.org>
6980
6981 * target.h (enum strata) <debug_stratum>: New.
6982 (struct target_ops) <all delegation methods>: Replace by C++
6983 virtual methods, and drop "to_" prefix. All references updated
6984 throughout.
6985 <to_shortname, to_longname, to_doc, to_data,
6986 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6987 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6988 virtual methods. All references updated throughout.
6989 <can_attach, supports_terminal_ours, can_create_inferior,
6990 get_thread_control_capabilities, attach_no_wait>: New
6991 virtual methods.
6992 <insert_breakpoint, remove_breakpoint>: Now
6993 TARGET_DEFAULT_NORETURN methods.
6994 <info_proc>: Now returns bool.
6995 <to_magic>: Delete.
6996 (OPS_MAGIC): Delete.
6997 (current_target): Delete. All references replaced by references
6998 to ...
6999 (target_stack): ... this. New.
7000 (target_shortname, target_longname): Adjust.
7001 (target_can_run): Now a function declaration.
7002 (default_child_has_all_memory, default_child_has_memory)
7003 (default_child_has_stack, default_child_has_registers)
7004 (default_child_has_execution): Remove target_ops parameter.
7005 (complete_target_initialization): Delete.
7006 (memory_breakpoint_target): New template class.
7007 (test_target_ops): Refactor as a C++ class with virtual methods.
7008 * make-target-delegates (NAME_PART): Tighten.
7009 (POINTER_PART, CP_SYMBOL): New.
7010 (SIMPLE_RETURN_PART): Reimplement.
7011 (VEC_RETURN_PART): Expect less.
7012 (RETURN_PART, VIRTUAL_PART): New.
7013 (METHOD): Adjust to C++ virtual methods.
7014 (scan_target_h): Remove reference to C99.
7015 (dname): Output "target_ops::" prefix.
7016 (write_function_header): Adjust to output a C++ class method.
7017 (write_declaration): New.
7018 (write_delegator): Adjust to output a C++ class method.
7019 (tdname): Output "dummy_target::" prefix.
7020 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7021 method.
7022 (tdefault_names, debug_names): Delete.
7023 (return_types, tdefaults, styles, argtypes_array): New.
7024 (top level): All methods are delegators.
7025 (print_class): New.
7026 (top level): Print dummy_target and debug_target classes.
7027 * target-delegates.c: Regenerate.
7028 * target-debug.h (target_debug_print_enum_info_proc_what)
7029 (target_debug_print_thread_control_capabilities)
7030 (target_debug_print_thread_info_p): New.
7031 * target.c (dummy_target): Delete.
7032 (the_dummy_target, the_debug_target): New.
7033 (target_stack): Now extern.
7034 (set_targetdebug): Push/unpush debug target.
7035 (default_child_has_all_memory, default_child_has_memory)
7036 (default_child_has_stack, default_child_has_registers)
7037 (default_child_has_execution): Remove target_ops parameter.
7038 (complete_target_initialization): Delete.
7039 (add_target_with_completer): No longer call
7040 complete_target_initialization.
7041 (target_supports_terminal_ours): Use regular delegation.
7042 (update_current_target): Delete.
7043 (push_target): No longer check magic number. Don't call
7044 update_current_target.
7045 (unpush_target): Don't call update_current_target.
7046 (target_is_pushed): No longer check magic number.
7047 (target_require_runnable): Skip for all stratums over
7048 process_stratum.
7049 (target_ops::info_proc): New.
7050 (target_info_proc): Use find_target_at and
7051 find_default_run_target.
7052 (target_supports_disable_randomization): Use regular delegation.
7053 (target_get_osdata): Use find_target_at.
7054 (target_ops::open, target_ops::close, target_ops::can_attach)
7055 (target_ops::attach, target_ops::can_create_inferior)
7056 (target_ops::create_inferior, target_ops::can_run)
7057 (target_can_run): New.
7058 (default_fileio_target): Use regular delegation.
7059 (target_ops::fileio_open, target_ops::fileio_pwrite)
7060 (target_ops::fileio_pread, target_ops::fileio_fstat)
7061 (target_ops::fileio_close, target_ops::fileio_unlink)
7062 (target_ops::fileio_readlink): New.
7063 (target_fileio_open_1, target_fileio_unlink)
7064 (target_fileio_readlink): Always call the target method. Handle
7065 FILEIO_ENOSYS.
7066 (return_zero, return_zero_has_execution): Delete.
7067 (init_dummy_target): Delete.
7068 (dummy_target::dummy_target, dummy_target::shortname)
7069 (dummy_target::longname, dummy_target::doc)
7070 (debug_target::debug_target, debug_target::shortname)
7071 (debug_target::longname, debug_target::doc): New.
7072 (target_supports_delete_record): Use regular delegation.
7073 (setup_target_debug): Delete.
7074 (maintenance_print_target_stack): Skip debug_stratum.
7075 (initialize_targets): Instantiate the_dummy_target and
7076 the_debug_target.
7077 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7078 use target_stack.
7079 (target_auxv_search, fprint_target_auxv): Adjust.
7080 (info_auxv_command): Adjust to use target_stack.
7081 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7082 * exceptions.c (print_flush): Handle a NULL target_stack.
7083 * regcache.c (target_ops_no_register): Refactor as class with
7084 virtual methods.
7085
7086 * exec.c (exec_target): New class.
7087 (exec_ops): Now an exec_target.
7088 (exec_open, exec_close_1, exec_get_section_table)
7089 (exec_xfer_partial, exec_files_info, exec_has_memory)
7090 (exec_make_note_section): Refactor as exec_target methods.
7091 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7092 Delete.
7093 (exec_target::find_memory_regions): New.
7094 (_initialize_exec): Don't call init_exec_ops.
7095 * gdbcore.h (exec_file_clear): Delete.
7096
7097 * corefile.c (core_target): Delete.
7098 (core_file_command): Adjust.
7099 * corelow.c (core_target): New class.
7100 (the_core_target): New.
7101 (core_close): Remove target_ops parameter.
7102 (core_close_cleanup): Adjust.
7103 (core_target::close): New.
7104 (core_open, core_detach, get_core_registers, core_files_info)
7105 (core_xfer_partial, core_thread_alive, core_read_description)
7106 (core_pid_to_str, core_thread_name, core_has_memory)
7107 (core_has_stack, core_has_registers, core_info_proc): Rework as
7108 core_target methods.
7109 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7110 (_initialize_corelow): Initialize the_core_target.
7111 * gdbcore.h (core_target): Delete.
7112 (the_core_target): New.
7113
7114 * ctf.c: (ctf_target): New class.
7115 (ctf_ops): Now a ctf_target.
7116 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7117 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7118 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7119 methods.
7120 (init_ctf_ops): Delete.
7121 (_initialize_ctf): Don't call it.
7122 * tracefile-tfile.c (tfile_target): New class.
7123 (tfile_ops): Now a tfile_target.
7124 (tfile_open, tfile_close, tfile_files_info)
7125 (tfile_get_tracepoint_status, tfile_trace_find)
7126 (tfile_fetch_registers, tfile_xfer_partial)
7127 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7128 Refactor as tfile_target methods.
7129 (tfile_xfer_partial_features): Remove target_ops parameter.
7130 (init_tfile_ops): Delete.
7131 (_initialize_tracefile_tfile): Don't call it.
7132 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7133 (tracefile_has_stack, tracefile_has_registers)
7134 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7135 tracefile_target methods.
7136 (init_tracefile_ops): Delete.
7137 (tracefile_target::tracefile_target): New.
7138 * tracefile.h: Include "target.h".
7139 (tracefile_target): New class.
7140 (init_tracefile_ops): Delete.
7141
7142 * spu-multiarch.c (spu_multiarch_target): New class.
7143 (spu_ops): Now a spu_multiarch_target.
7144 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7145 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7146 (spu_search_memory, spu_mourn_inferior): Refactor as
7147 spu_multiarch_target methods.
7148 (init_spu_ops): Delete.
7149 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7150 complete_target_initialization.
7151
7152 * ravenscar-thread.c (ravenscar_thread_target): New class.
7153 (ravenscar_ops): Now a ravenscar_thread_target.
7154 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7155 (ravenscar_thread_alive, ravenscar_pid_to_str)
7156 (ravenscar_fetch_registers, ravenscar_store_registers)
7157 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7158 (ravenscar_stopped_by_hw_breakpoint)
7159 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7160 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7161 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7162 methods.
7163 (init_ravenscar_thread_ops): Delete.
7164 (_initialize_ravenscar): Remove references to
7165 init_ravenscar_thread_ops and complete_target_initialization.
7166
7167 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7168 (bsd_uthread_target): New class.
7169 (bsd_uthread_ops): Now a bsd_uthread_target.
7170 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7171 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7172 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7173 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7174 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7175 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7176 (bsd_uthread_target): Delete function.
7177 (_initialize_bsd_uthread): Remove reference to
7178 complete_target_initialization.
7179
7180 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7181 (target_bfd): ... this new class.
7182 (target_bfd_xfer_partial, target_bfd_get_section_table)
7183 (target_bfd_close): Refactor as target_bfd methods.
7184 (target_bfd::~target_bfd): New.
7185 (target_bfd_reopen): Adjust.
7186 (target_bfd::close): New.
7187
7188 * record-btrace.c (record_btrace_target): New class.
7189 (record_btrace_ops): Now a record_btrace_target.
7190 (record_btrace_open, record_btrace_stop_recording)
7191 (record_btrace_disconnect, record_btrace_close)
7192 (record_btrace_async, record_btrace_info)
7193 (record_btrace_insn_history, record_btrace_insn_history_range)
7194 (record_btrace_insn_history_from, record_btrace_call_history)
7195 (record_btrace_call_history_range)
7196 (record_btrace_call_history_from, record_btrace_record_method)
7197 (record_btrace_is_replaying, record_btrace_will_replay)
7198 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7199 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7200 (record_btrace_store_registers, record_btrace_prepare_to_store)
7201 (record_btrace_to_get_unwinder)
7202 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7203 (record_btrace_commit_resume, record_btrace_wait)
7204 (record_btrace_stop, record_btrace_can_execute_reverse)
7205 (record_btrace_stopped_by_sw_breakpoint)
7206 (record_btrace_supports_stopped_by_sw_breakpoint)
7207 (record_btrace_stopped_by_hw_breakpoint)
7208 (record_btrace_supports_stopped_by_hw_breakpoint)
7209 (record_btrace_update_thread_list, record_btrace_thread_alive)
7210 (record_btrace_goto_begin, record_btrace_goto_end)
7211 (record_btrace_goto, record_btrace_stop_replaying_all)
7212 (record_btrace_execution_direction)
7213 (record_btrace_prepare_to_generate_core)
7214 (record_btrace_done_generating_core): Refactor as
7215 record_btrace_target methods.
7216 (init_record_btrace_ops): Delete.
7217 (_initialize_record_btrace): Remove reference to
7218 init_record_btrace_ops.
7219 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7220 the execution_direction global.
7221 (record_full_base_target, record_full_target)
7222 (record_full_core_target): New classes.
7223 (record_full_ops): Now a record_full_target.
7224 (record_full_core_ops): Now a record_full_core_target.
7225 (record_full_target::detach, record_full_target::disconnect)
7226 (record_full_core_target::disconnect)
7227 (record_full_target::mourn_inferior, record_full_target::kill):
7228 New.
7229 (record_full_open, record_full_close, record_full_async): Refactor
7230 as methods of the record_full_base_target class.
7231 (record_full_resume, record_full_commit_resume): Refactor
7232 as methods of the record_full_target class.
7233 (record_full_wait, record_full_stopped_by_watchpoint)
7234 (record_full_stopped_data_address)
7235 (record_full_stopped_by_sw_breakpoint)
7236 (record_full_supports_stopped_by_sw_breakpoint)
7237 (record_full_stopped_by_hw_breakpoint)
7238 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7239 methods of the record_full_base_target class.
7240 (record_full_store_registers, record_full_xfer_partial)
7241 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7242 Refactor as methods of the record_full_target class.
7243 (record_full_can_execute_reverse, record_full_get_bookmark)
7244 (record_full_goto_bookmark, record_full_execution_direction)
7245 (record_full_record_method, record_full_info, record_full_delete)
7246 (record_full_is_replaying, record_full_will_replay)
7247 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7248 (record_full_stop_replaying): Refactor as methods of the
7249 record_full_base_target class.
7250 (record_full_core_resume, record_full_core_kill)
7251 (record_full_core_fetch_registers)
7252 (record_full_core_prepare_to_store)
7253 (record_full_core_store_registers, record_full_core_xfer_partial)
7254 (record_full_core_insert_breakpoint)
7255 (record_full_core_remove_breakpoint)
7256 (record_full_core_has_execution): Refactor
7257 as methods of the record_full_core_target class.
7258 (record_full_base_target::supports_delete_record): New.
7259 (init_record_full_ops): Delete.
7260 (init_record_full_core_ops): Delete.
7261 (record_full_save): Refactor as method of the
7262 record_full_base_target class.
7263 (_initialize_record_full): Remove references to
7264 init_record_full_ops and init_record_full_core_ops.
7265
7266 * remote.c (remote_target, extended_remote_target): New classes.
7267 (remote_ops): Now a remote_target.
7268 (extended_remote_ops): Now an extended_remote_target.
7269 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7270 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7271 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7272 (remote_pass_signals, remote_set_syscall_catchpoint)
7273 (remote_program_signals, )
7274 (remote_thread_always_alive): Remove target_ops parameter.
7275 (remote_thread_alive, remote_thread_name)
7276 (remote_update_thread_list, remote_threads_extra_info)
7277 (remote_static_tracepoint_marker_at)
7278 (remote_static_tracepoint_markers_by_strid)
7279 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7280 (remote_open): Refactor as methods of remote_target.
7281 (extended_remote_open, extended_remote_detach)
7282 (extended_remote_attach, extended_remote_post_attach):
7283 (extended_remote_supports_disable_randomization)
7284 (extended_remote_create_inferior): : Refactor as method of
7285 extended_remote_target.
7286 (remote_set_permissions, remote_open_1, remote_detach)
7287 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7288 (remote_resume, remote_commit_resume, remote_stop)
7289 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7290 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7291 (remote_prepare_to_store, remote_store_registers)
7292 (remote_flash_erase, remote_flash_done, remote_files_info)
7293 (remote_kill, remote_mourn, remote_insert_breakpoint)
7294 (remote_remove_breakpoint, remote_insert_watchpoint)
7295 (remote_watchpoint_addr_within_range)
7296 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7297 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7298 (remote_supports_stopped_by_sw_breakpoint)
7299 (remote_stopped_by_hw_breakpoint)
7300 (remote_supports_stopped_by_hw_breakpoint)
7301 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7302 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7303 (remote_verify_memory): Refactor as methods of remote_target.
7304 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7305 parameter.
7306 (remote_xfer_partial, remote_get_memory_xfer_limit)
7307 (remote_search_memory, remote_rcmd, remote_memory_map)
7308 (remote_pid_to_str, remote_get_thread_local_address)
7309 (remote_get_tib_address, remote_read_description): Refactor as
7310 methods of remote_target.
7311 (remote_target::fileio_open, remote_target::fileio_pwrite)
7312 (remote_target::fileio_pread, remote_target::fileio_close): New.
7313 (remote_hostio_readlink, remote_hostio_fstat)
7314 (remote_filesystem_is_local, remote_can_execute_reverse)
7315 (remote_supports_non_stop, remote_supports_disable_randomization)
7316 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7317 (remote_supports_enable_disable_tracepoint)
7318 (remote_supports_string_tracing)
7319 (remote_can_run_breakpoint_commands, remote_trace_init)
7320 (remote_download_tracepoint, remote_can_download_tracepoint)
7321 (remote_download_trace_state_variable, remote_enable_tracepoint)
7322 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7323 (remote_trace_start, remote_get_trace_status)
7324 (remote_get_tracepoint_status, remote_trace_stop)
7325 (remote_trace_find, remote_get_trace_state_variable_value)
7326 (remote_save_trace_data, remote_get_raw_trace_data)
7327 (remote_set_disconnected_tracing, remote_core_of_thread)
7328 (remote_set_circular_trace_buffer, remote_traceframe_info)
7329 (remote_get_min_fast_tracepoint_insn_len)
7330 (remote_set_trace_buffer_size, remote_set_trace_notes)
7331 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7332 (remote_disable_btrace, remote_teardown_btrace)
7333 (remote_read_btrace, remote_btrace_conf)
7334 (remote_augmented_libraries_svr4_read, remote_load)
7335 (remote_pid_to_exec_file, remote_can_do_single_step)
7336 (remote_execution_direction, remote_thread_handle_to_thread_info):
7337 Refactor as methods of remote_target.
7338 (init_remote_ops, init_extended_remote_ops): Delete.
7339 (remote_can_async_p, remote_is_async_p, remote_async)
7340 (remote_thread_events, remote_upload_tracepoints)
7341 (remote_upload_trace_state_variables): Refactor as methods of
7342 remote_target.
7343 (_initialize_remote): Remove references to init_remote_ops and
7344 init_extended_remote_ops.
7345
7346 * remote-sim.c (gdbsim_target): New class.
7347 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7348 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7349 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7350 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7351 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7352 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7353 Refactor as methods of gdbsim_target.
7354 (gdbsim_ops): Now a gdbsim_target.
7355 (init_gdbsim_ops): Delete.
7356 (gdbsim_cntrl_c): Adjust.
7357 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7358
7359 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7360 (the_amd64_linux_nat_target): New.
7361 (amd64_linux_fetch_inferior_registers)
7362 (amd64_linux_store_inferior_registers): Refactor as methods of
7363 amd64_linux_nat_target.
7364 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7365 * i386-linux-nat.c: Don't include "linux-nat.h".
7366 (i386_linux_nat_target): New class.
7367 (the_i386_linux_nat_target): New.
7368 (i386_linux_fetch_inferior_registers)
7369 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7370 as methods of i386_linux_nat_target.
7371 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7372 * inf-child.c (inf_child_ops): Delete.
7373 (inf_child_fetch_inferior_registers)
7374 (inf_child_store_inferior_registers): Delete.
7375 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7376 methods of inf_child_target.
7377 (inf_child_target::supports_terminal_ours)
7378 (inf_child_target::terminal_init)
7379 (inf_child_target::terminal_inferior)
7380 (inf_child_target::terminal_ours_for_output)
7381 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7382 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7383 New.
7384 (inf_child_open, inf_child_disconnect, inf_child_close)
7385 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7386 (inf_child_post_startup_inferior, inf_child_can_run)
7387 (inf_child_pid_to_exec_file): Refactor as methods of
7388 inf_child_target.
7389 (inf_child_follow_fork): Delete.
7390 (inf_child_target::can_create_inferior)
7391 (inf_child_target::can_attach): New.
7392 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7393 (inf_child_target::has_stack, inf_child_target::has_registers)
7394 (inf_child_target::has_execution): New.
7395 (inf_child_fileio_open, inf_child_fileio_pwrite)
7396 (inf_child_fileio_pread, inf_child_fileio_fstat)
7397 (inf_child_fileio_close, inf_child_fileio_unlink)
7398 (inf_child_fileio_readlink, inf_child_use_agent)
7399 (inf_child_can_use_agent): Refactor as methods of
7400 inf_child_target.
7401 (return_zero, inf_child_target): Delete.
7402 (inf_child_target::inf_child_target): New.
7403 * inf-child.h: Include "target.h".
7404 (inf_child_target): Delete function prototype.
7405 (inf_child_target): New class.
7406 (inf_child_open_target, inf_child_mourn_inferior)
7407 (inf_child_maybe_unpush_target): Delete.
7408 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7409 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7410 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7411 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7412 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7413 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7414 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7415 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7416 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7417 methods of inf_ptrace_target.
7418 (inf_ptrace_target): Delete function.
7419 * inf-ptrace.h: Include "inf-child.h".
7420 (inf_ptrace_target): Delete function declaration.
7421 (inf_ptrace_target): New class.
7422 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7423 * linux-nat.c (linux_target): New.
7424 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7425 (linux_nat_target::~linux_nat_target): New.
7426 (linux_child_post_attach, linux_child_post_startup_inferior)
7427 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7428 (linux_child_remove_fork_catchpoint)
7429 (linux_child_insert_vfork_catchpoint)
7430 (linux_child_remove_vfork_catchpoint)
7431 (linux_child_insert_exec_catchpoint)
7432 (linux_child_remove_exec_catchpoint)
7433 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7434 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7435 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7436 (linux_nat_stopped_data_address)
7437 (linux_nat_stopped_by_sw_breakpoint)
7438 (linux_nat_supports_stopped_by_sw_breakpoint)
7439 (linux_nat_stopped_by_hw_breakpoint)
7440 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7441 (linux_nat_kill, linux_nat_mourn_inferior)
7442 (linux_nat_xfer_partial, linux_nat_thread_alive)
7443 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7444 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7445 (linux_child_static_tracepoint_markers_by_strid)
7446 (linux_nat_is_async_p, linux_nat_can_async_p)
7447 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7448 (linux_nat_supports_multi_process)
7449 (linux_nat_supports_disable_randomization, linux_nat_async)
7450 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7451 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7452 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7453 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7454 methods of linux_nat_target.
7455 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7456 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7457 parameter.
7458 (check_stopped_by_watchpoint): Adjust.
7459 (linux_xfer_partial): Delete.
7460 (linux_target_install_ops, linux_target, linux_nat_add_target):
7461 Delete.
7462 (linux_nat_target::linux_nat_target): New.
7463 * linux-nat.h: Include "inf-ptrace.h".
7464 (linux_nat_target): New.
7465 (linux_target, linux_target_install_ops, linux_nat_add_target):
7466 Delete function declarations.
7467 (linux_target): Declare global.
7468 * linux-thread-db.c (thread_db_target): New.
7469 (thread_db_target::thread_db_target): New.
7470 (thread_db_ops): Delete.
7471 (the_thread_db_target): New.
7472 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7473 (thread_db_update_thread_list, thread_db_pid_to_str)
7474 (thread_db_extra_thread_info)
7475 (thread_db_thread_handle_to_thread_info)
7476 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7477 (thread_db_resume): Refactor as methods of thread_db_target.
7478 (init_thread_db_ops): Delete.
7479 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7480 * x86-linux-nat.c: Don't include "linux-nat.h".
7481 (super_post_startup_inferior): Delete.
7482 (x86_linux_nat_target::~x86_linux_nat_target): New.
7483 (x86_linux_child_post_startup_inferior)
7484 (x86_linux_read_description, x86_linux_enable_btrace)
7485 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7486 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7487 methods of x86_linux_nat_target.
7488 (x86_linux_create_target): Delete. Bits folded ...
7489 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7490 pointer.
7491 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7492 (x86_linux_nat_target): New class.
7493 (x86_linux_create_target): Delete.
7494 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7495 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7496 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7497 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7498 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7499 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7500 make extern.
7501 (x86_use_watchpoints): Delete.
7502 * x86-nat.h: Include "breakpoint.h" and "target.h".
7503 (x86_use_watchpoints): Delete.
7504 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7505 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7506 (x86_insert_watchpoint, x86_remove_watchpoint)
7507 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7508 (x86_stopped_by_hw_breakpoint): New declarations.
7509 (x86_nat_target): New template class.
7510
7511 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7512 (the_ppc_linux_nat_target): New.
7513 (ppc_linux_fetch_inferior_registers)
7514 (ppc_linux_can_use_hw_breakpoint)
7515 (ppc_linux_region_ok_for_hw_watchpoint)
7516 (ppc_linux_ranged_break_num_registers)
7517 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7518 (ppc_linux_insert_mask_watchpoint)
7519 (ppc_linux_remove_mask_watchpoint)
7520 (ppc_linux_can_accel_watchpoint_condition)
7521 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7522 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7523 (ppc_linux_watchpoint_addr_within_range)
7524 (ppc_linux_masked_watch_num_registers)
7525 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7526 (ppc_linux_read_description): Refactor as methods of
7527 ppc_linux_nat_target.
7528 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7529
7530 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7531 (procfs_target): New class.
7532 (the_procfs_target): New.
7533 (procfs_target): Delete function.
7534 (procfs_auxv_parse, procfs_attach, procfs_detach)
7535 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7536 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7537 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7538 (procfs_create_inferior, procfs_update_thread_list)
7539 (procfs_thread_alive, procfs_pid_to_str)
7540 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7541 (procfs_stopped_data_address, procfs_insert_watchpoint)
7542 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7543 (proc_find_memory_regions, procfs_info_proc)
7544 (procfs_make_note_section): Refactor as methods of procfs_target.
7545 (_initialize_procfs): Adjust.
7546 * sol-thread.c (sol_thread_target): New class.
7547 (sol_thread_ops): Now a sol_thread_target.
7548 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7549 (sol_thread_fetch_registers, sol_thread_store_registers)
7550 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7551 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7552 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7553 (init_sol_thread_ops): Delete.
7554 (_initialize_sol_thread): Adjust. Remove references to
7555 init_sol_thread_ops and complete_target_initialization.
7556
7557 * windows-nat.c (windows_nat_target): New class.
7558 (windows_fetch_inferior_registers)
7559 (windows_store_inferior_registers, windows_resume, windows_wait)
7560 (windows_attach, windows_detach, windows_pid_to_exec_file)
7561 (windows_files_info, windows_create_inferior)
7562 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7563 (windows_close, windows_pid_to_str, windows_xfer_partial)
7564 (windows_get_tib_address, windows_get_ada_task_ptid)
7565 (windows_thread_name, windows_thread_alive): Refactor as
7566 windows_nat_target methods.
7567 (do_initial_windows_stuff): Adjust.
7568 (windows_target): Delete function.
7569 (_initialize_windows_nat): Adjust.
7570
7571 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7572 (darwin_mourn_inferior, darwin_kill_inferior)
7573 (darwin_create_inferior, darwin_attach, darwin_detach)
7574 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7575 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7576 (darwin_supports_multi_process): Refactor as darwin_nat_target
7577 methods.
7578 (darwin_resume_to, darwin_files_info): Delete.
7579 (_initialize_darwin_inferior): Rename to ...
7580 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7581 * darwin-nat.h: Include "inf-child.h".
7582 (darwin_nat_target): New class.
7583 (darwin_complete_target): Delete.
7584 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7585 (darwin_target): New.
7586 (i386_darwin_fetch_inferior_registers)
7587 (i386_darwin_store_inferior_registers): Refactor as methods of
7588 darwin_nat_target.
7589 (darwin_complete_target): Delete, with ...
7590 (_initialize_i386_darwin_nat): ... bits factored out here.
7591
7592 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7593 (the_alpha_linux_nat_target): New.
7594 (alpha_linux_register_u_offset): Refactor as
7595 alpha_linux_nat_target method.
7596 (_initialize_alpha_linux_nat): Adjust.
7597 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7598 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7599 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7600 methods of linux_nat_trad_target.
7601 (linux_trad_target): Delete.
7602 * linux-nat-trad.h (linux_trad_target): Delete function.
7603 (linux_nat_trad_target): New class.
7604 * mips-linux-nat.c (mips_linux_nat_target): New class.
7605 (super_fetch_registers, super_store_registers, super_close):
7606 Delete.
7607 (the_mips_linux_nat_target): New.
7608 (mips64_linux_regsets_fetch_registers)
7609 (mips64_linux_regsets_store_registers)
7610 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7611 (mips_linux_register_u_offset, mips_linux_read_description)
7612 (mips_linux_can_use_hw_breakpoint)
7613 (mips_linux_stopped_by_watchpoint)
7614 (mips_linux_stopped_data_address)
7615 (mips_linux_region_ok_for_hw_watchpoint)
7616 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7617 (mips_linux_close): Refactor as methods of mips_linux_nat.
7618 (_initialize_mips_linux_nat): Adjust to C++ification.
7619
7620 * aix-thread.c (aix_thread_target): New class.
7621 (aix_thread_ops): Now an aix_thread_target.
7622 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7623 (aix_thread_fetch_registers, aix_thread_store_registers)
7624 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7625 (aix_thread_thread_alive, aix_thread_pid_to_str)
7626 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7627 Refactor as methods of aix_thread_target.
7628 (init_aix_thread_ops): Delete.
7629 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7630 and complete_target_initialization.
7631 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7632 (rs6000_nat_target): New class.
7633 (the_rs6000_nat_target): New.
7634 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7635 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7636 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7637 (super_create_inferior): Delete.
7638 (_initialize_rs6000_nat): Adjust to C++ification.
7639
7640 * arm-linux-nat.c (arm_linux_nat_target): New class.
7641 (the_arm_linux_nat_target): New.
7642 (arm_linux_fetch_inferior_registers)
7643 (arm_linux_store_inferior_registers, arm_linux_read_description)
7644 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7645 (arm_linux_remove_hw_breakpoint)
7646 (arm_linux_region_ok_for_hw_watchpoint)
7647 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7648 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7649 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7650 arm_linux_nat_target.
7651 (_initialize_arm_linux_nat): Adjust to C++ification.
7652
7653 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7654 (the_aarch64_linux_nat_target): New.
7655 (aarch64_linux_fetch_inferior_registers)
7656 (aarch64_linux_store_inferior_registers)
7657 (aarch64_linux_child_post_startup_inferior)
7658 (aarch64_linux_read_description)
7659 (aarch64_linux_can_use_hw_breakpoint)
7660 (aarch64_linux_insert_hw_breakpoint)
7661 (aarch64_linux_remove_hw_breakpoint)
7662 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7663 (aarch64_linux_region_ok_for_hw_watchpoint)
7664 (aarch64_linux_stopped_data_address)
7665 (aarch64_linux_stopped_by_watchpoint)
7666 (aarch64_linux_watchpoint_addr_within_range)
7667 (aarch64_linux_can_do_single_step): Refactor as methods of
7668 aarch64_linux_nat_target.
7669 (super_post_startup_inferior): Delete.
7670 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7671
7672 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7673 (the_hppa_linux_nat_target): New.
7674 (hppa_linux_fetch_inferior_registers)
7675 (hppa_linux_store_inferior_registers): Refactor as methods of
7676 hppa_linux_nat_target.
7677 (_initialize_hppa_linux_nat): Adjust to C++ification.
7678
7679 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7680 (the_ia64_linux_nat_target): New.
7681 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7682 (ia64_linux_stopped_data_address)
7683 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7684 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7685 ia64_linux_nat_target methods.
7686 (super_xfer_partial): Delete.
7687 (_initialize_ia64_linux_nat): Adjust to C++ification.
7688
7689 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7690 (the_m32r_linux_nat_target): New.
7691 (m32r_linux_fetch_inferior_registers)
7692 (m32r_linux_store_inferior_registers): Refactor as
7693 m32r_linux_nat_target methods.
7694 (_initialize_m32r_linux_nat): Adjust to C++ification.
7695
7696 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7697 (the_m68k_linux_nat_target): New.
7698 (m68k_linux_fetch_inferior_registers)
7699 (m68k_linux_store_inferior_registers): Refactor as
7700 m68k_linux_nat_target methods.
7701 (_initialize_m68k_linux_nat): Adjust to C++ification.
7702
7703 * s390-linux-nat.c (s390_linux_nat_target): New class.
7704 (the_s390_linux_nat_target): New.
7705 (s390_linux_fetch_inferior_registers)
7706 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7707 (s390_insert_watchpoint, s390_remove_watchpoint)
7708 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7709 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7710 (s390_auxv_parse, s390_read_description): Refactor as methods of
7711 s390_linux_nat_target.
7712 (_initialize_s390_nat): Adjust to C++ification.
7713
7714 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7715 (the_sparc_linux_nat_target): New.
7716 (_initialize_sparc_linux_nat): Adjust to C++ification.
7717 * sparc-nat.c (sparc_fetch_inferior_registers)
7718 (sparc_store_inferior_registers): Remove target_ops parameter.
7719 * sparc-nat.h (sparc_fetch_inferior_registers)
7720 (sparc_store_inferior_registers): Remove target_ops parameter.
7721 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7722 (the_sparc64_linux_nat_target): New.
7723 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7724
7725 * spu-linux-nat.c (spu_linux_nat_target): New class.
7726 (the_spu_linux_nat_target): New.
7727 (spu_child_post_startup_inferior, spu_child_post_attach)
7728 (spu_child_wait, spu_fetch_inferior_registers)
7729 (spu_store_inferior_registers, spu_xfer_partial)
7730 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7731 methods.
7732 (_initialize_spu_nat): Adjust to C++ification.
7733
7734 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7735 (the_tilegx_linux_nat_target): New.
7736 (fetch_inferior_registers, store_inferior_registers):
7737 Refactor as methods.
7738 (_initialize_tile_linux_nat): Adjust to C++ification.
7739
7740 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7741 (the_xtensa_linux_nat_target): New.
7742 (xtensa_linux_fetch_inferior_registers)
7743 (xtensa_linux_store_inferior_registers): Refactor as
7744 xtensa_linux_nat_target methods.
7745 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7746
7747 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7748 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7749 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7750 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7751 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7752 (fbsd_stopped_by_sw_breakpoint)
7753 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7754 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7755 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7756 (fbsd_post_startup_inferior, fbsd_post_attach)
7757 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7758 (fbsd_set_syscall_catchpoint)
7759 (super_xfer_partial, super_resume, super_wait)
7760 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7761 (fbsd_handle_debug_trap): Remove target_ops parameter.
7762 (fbsd_nat_add_target): Delete.
7763 * fbsd-nat.h: Include "inf-ptrace.h".
7764 (fbsd_nat_add_target): Delete.
7765 (USE_SIGTRAP_SIGINFO): Define.
7766 (fbsd_nat_target): New class.
7767
7768 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7769 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7770 (amd64bsd_target): Delete.
7771 * amd64-bsd-nat.h: New file.
7772 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7773 "x86-bsd-nat.h".
7774 (amd64_fbsd_nat_target): New class.
7775 (the_amd64_fbsd_nat_target): New.
7776 (amd64fbsd_read_description): Refactor as method of
7777 amd64_fbsd_nat_target.
7778 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7779 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7780 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7781 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7782 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7783 (i386bsd_target): Delete.
7784 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7785 (i386bsd_fetch_inferior_registers)
7786 (i386bsd_store_inferior_registers): Declare.
7787 (i386_bsd_nat_target): New class.
7788 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7789 (the_i386_fbsd_nat_target): New.
7790 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7791 i386_fbsd_nat_target methods.
7792 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7793 (_initialize_i386fbsd_nat): Adjust to C++ification.
7794 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7795 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7796 (_initialize_x86_bsd_nat): Adjust to C++ification.
7797 * x86-bsd-nat.h: Include "x86-nat.h".
7798 (x86bsd_target): Delete declaration.
7799 (x86bsd_nat_target): New class.
7800
7801 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7802 (the_aarch64_fbsd_nat_target): New.
7803 (aarch64_fbsd_fetch_inferior_registers)
7804 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7805 aarch64_fbsd_nat_target.
7806 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7807 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7808 (the_alpha_bsd_nat_target): New.
7809 (alphabsd_fetch_inferior_registers)
7810 (alphabsd_store_inferior_registers): Refactor as
7811 alpha_bsd_nat_target methods.
7812 (_initialize_alphabsd_nat): Refactor as methods of
7813 alpha_bsd_nat_target.
7814 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7815 (the_amd64_nbsd_nat_target): New.
7816 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7817 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7818 (the_amd64_obsd_nat_target): New.
7819 (_initialize_amd64obsd_nat): Adjust to C++ification.
7820 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7821 (the_arm_fbsd_nat_target): New.
7822 (arm_fbsd_fetch_inferior_registers)
7823 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7824 (_initialize_arm_fbsd_nat): Refactor as methods of
7825 arm_fbsd_nat_target.
7826 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7827 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7828 (the_arm_netbsd_nat_target): New.
7829 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7830 arm_netbsd_nat_target.
7831 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7832 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7833 (the_hppa_nbsd_nat_target): New.
7834 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7835 hppa_nbsd_nat_target methods.
7836 (_initialize_hppanbsd_nat): Adjust to C++ification.
7837 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7838 (the_hppa_obsd_nat_target): New.
7839 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7840 methods of hppa_obsd_nat_target.
7841 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7842 add_target.
7843 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7844 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7845 add_target.
7846 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7847 (_initialize_i386obsd_nat): Use add_target.
7848 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7849 (the_m68k_bsd_nat_target): New.
7850 (m68kbsd_fetch_inferior_registers)
7851 (m68kbsd_store_inferior_registers): Refactor as methods of
7852 m68k_bsd_nat_target.
7853 (_initialize_m68kbsd_nat): Adjust to C++ification.
7854 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7855 (the_mips_fbsd_nat_target): New.
7856 (mips_fbsd_fetch_inferior_registers)
7857 (mips_fbsd_store_inferior_registers): Refactor as methods of
7858 mips_fbsd_nat_target.
7859 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7860 add_target.
7861 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7862 (the_mips_nbsd_nat_target): New.
7863 (mipsnbsd_fetch_inferior_registers)
7864 (mipsnbsd_store_inferior_registers): Refactor as methods of
7865 mips_nbsd_nat_target.
7866 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7867 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7868 (the_mips64_obsd_nat_target): New.
7869 (mips64obsd_fetch_inferior_registers)
7870 (mips64obsd_store_inferior_registers): Refactor as methods of
7871 mips64_obsd_nat_target.
7872 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7873 add_target.
7874 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7875 nbsd_nat_target.
7876 * nbsd-nat.h: Include "inf-ptrace.h".
7877 (nbsd_nat_target): New class.
7878 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7879 (obsd_wait): Refactor as methods of obsd_nat_target.
7880 (obsd_add_target): Delete.
7881 * obsd-nat.h: Include "inf-ptrace.h".
7882 (obsd_nat_target): New class.
7883 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7884 (the_ppc_fbsd_nat_target): New.
7885 (ppcfbsd_fetch_inferior_registers)
7886 (ppcfbsd_store_inferior_registers): Refactor as methods of
7887 ppc_fbsd_nat_target.
7888 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7889 add_target.
7890 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7891 (the_ppc_nbsd_nat_target): New.
7892 (ppcnbsd_fetch_inferior_registers)
7893 (ppcnbsd_store_inferior_registers): Refactor as methods of
7894 ppc_nbsd_nat_target.
7895 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7896 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7897 (the_ppc_obsd_nat_target): New.
7898 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7899 methods of ppc_obsd_nat_target.
7900 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7901 add_target.
7902 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7903 (the_sh_nbsd_nat_target): New.
7904 (shnbsd_fetch_inferior_registers)
7905 (shnbsd_store_inferior_registers): Refactor as methods of
7906 sh_nbsd_nat_target.
7907 (_initialize_shnbsd_nat): Adjust to C++ification.
7908 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7909 (inf_ptrace_xfer_partial): Delete.
7910 (sparc_xfer_partial, sparc_target): Delete.
7911 * sparc-nat.h (sparc_fetch_inferior_registers)
7912 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7913 (sparc_target): Delete function declaration.
7914 (sparc_target): New template class.
7915 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7916 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7917 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7918 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7919 add_target.
7920 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7921 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7922 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7923 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7924 add_target.
7925 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7926 (the_vax_bsd_nat_target): New.
7927 (vaxbsd_fetch_inferior_registers)
7928 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7929 methods.
7930 (_initialize_vaxbsd_nat): Adjust to C++ification.
7931
7932 * bsd-kvm.c (bsd_kvm_target): New class.
7933 (bsd_kvm_ops): Now a bsd_kvm_target.
7934 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7935 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7936 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7937 bsd_kvm_target.
7938 (bsd_kvm_return_one): Delete.
7939 (bsd_kvm_add_target): Adjust to C++ification.
7940
7941 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7942 (nto_procfs_target_procfs): New classes.
7943 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7944 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7945 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7946 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7947 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7948 (procfs_remove_hw_breakpoint, procfs_resume)
7949 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7950 (procfs_kill_inferior, procfs_store_registers)
7951 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7952 as methods of nto_procfs_target.
7953 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7954 (nto_native_ops): Delete.
7955 (procfs_open, procfs_native_open): Delete.
7956 (nto_native_ops): Now an nto_procfs_target_native.
7957 (init_procfs_targets): Adjust to C++ification.
7958 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7959 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7960 Refactor as methods of nto_procfs_target.
7961
7962 * go32-nat.c (go32_nat_target): New class.
7963 (the_go32_nat_target): New.
7964 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7965 (go32_store_registers, go32_xfer_partial, go32_files_info)
7966 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7967 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7968 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7969 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7970 (go32_target): Delete.
7971 (_initialize_go32_nat): Adjust to C++ification.
7972
7973 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7974 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7975 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7976 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7977 gnu_nat_target.
7978 (gnu_target): Delete.
7979 * gnu-nat.h (gnu_target): Delete.
7980 (gnu_nat_target): New class.
7981 * i386-gnu-nat.c (gnu_base_target): New.
7982 (i386_gnu_nat_target): New class.
7983 (the_i386_gnu_nat_target): New.
7984 (_initialize_i386gnu_nat): Adjust to C++ification.
7985
7986 2018-05-02 Pedro Alves <palves@redhat.com>
7987
7988 * bfd-target.c (target_bfd_xclose): Rename to ...
7989 (target_bfd_close): ... this.
7990 (target_bfd_reopen): Adjust.
7991 * target.c (target_close): Remove references to to_xclose.
7992 * target.h (target_ops::to_xclose): Delete.
7993 (target_ops::to_close): Update comments.
7994
7995 2018-05-02 Pedro Alves <palves@redhat.com>
7996
7997 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7998 "linux-nat.h".
7999 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8000 * inf-ptrace.c (inf_ptrace_register_u_offset)
8001 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8002 (inf_ptrace_store_register, inf_ptrace_store_registers)
8003 (inf_ptrace_trad_target): Move to ...
8004 * linux-nat-trad.c: ... this new file.
8005 * linux-nat-trad.h: New file.
8006 * linux-nat.c (linux_target_install_ops): Make extern.
8007 (linux_trad_target): Delete.
8008 * linux-nat.h (linux_trad_target): Delete declaration.
8009 (linux_target_install_ops): Declare.
8010 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8011 "linux-nat.h".
8012
8013 2018-05-02 Pedro Alves <palves@redhat.com>
8014
8015 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8016 procfs_target/add_target here.
8017 * procfs.c (procfs_target): Make static.
8018 (_initialize_procfs): Call add_target here.
8019 * procfs.h (struct target_ops): Remove forward declaration.
8020 (procfs_target): Remove declaration.
8021 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8022
8023 2018-05-02 Pedro Alves <palves@redhat.com>
8024
8025 * procfs.c (procfs_stopped_by_watchpoint)
8026 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8027 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8028 Forward declare.
8029 (procfs_use_watchpoints): Delete, move contents...
8030 (procfs_target): ... here.
8031 * procfs.h (procfs_use_watchpoints): Delete declaration.
8032 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8033 procfs_use_watchpoints.
8034 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8035 procfs_use_watchpoints.
8036
8037 2018-05-02 Tom Tromey <tom@tromey.com>
8038
8039 PR python/20084:
8040 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8041 and var_zuinteger_unlimited.
8042 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8043 and PARAM_ZUINTEGER_UNLIMITED.
8044 (set_parameter_value): Handle var_zuinteger and
8045 var_zuinteger_unlimited.
8046 (add_setshow_generic): Likewise.
8047 (parmpy_init): Likewise.
8048
8049 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8050
8051 PR rust/23124
8052 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8053 pointer is not null before dereferencing it.
8054
8055 2018-04-30 Tom Tromey <tom@tromey.com>
8056
8057 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8058 is_mi_like_p.
8059
8060 2018-04-30 Tom Tromey <tom@tromey.com>
8061
8062 * breakpoint.c (mention): Remove use of is_mi_like_p.
8063 (print_mention_ranged_breakpoint): Likewise.
8064 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8065 of is_mi_like_p.
8066
8067 2018-04-30 Tom Tromey <tom@tromey.com>
8068
8069 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8070
8071 2018-04-30 Tom Tromey <tom@tromey.com>
8072
8073 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8074 (info_spu_event_command): Remove some uses of is_mi_like_p.
8075
8076 2018-04-30 Tom Tromey <tom@tromey.com>
8077
8078 * python/py-framefilter.c (py_print_single_arg)
8079 (enumerate_locals, py_print_args, py_print_frame): Remove some
8080 uses of is_mi_like_p.
8081
8082 2018-04-30 Tom Tromey <tom@tromey.com>
8083
8084 * ui-out.c: Update.
8085 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8086 * ui-out.h (ui_out::is_mi_like_p): Now const.
8087 (ui_out::do_is_mi_like_p): Now const.
8088 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8089
8090 2018-04-30 Tom Tromey <tom@tromey.com>
8091
8092 * varobj.c (varobj_set_visualizer): Use new_reference.
8093 * python/python.c (gdbpy_decode_line): Use new_reference.
8094 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8095 new_reference.
8096
8097 2018-04-30 Tom Tromey <tom@tromey.com>
8098
8099 * varobj.c (install_new_value): Use new_reference.
8100 * value.h (value_incref): Return void. Swap intro comment with
8101 value_decref.
8102 * value.c (set_value_parent): Use new_reference.
8103 (value_incref): Return void. Update intro comment.
8104 (release_value): Use new_reference.
8105 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8106
8107 2018-04-30 Tom Tromey <tom@tromey.com>
8108
8109 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8110 * gdb_bfd.h (new_bfd_ref): Remove.
8111 (gdb_bfd_open): Update comment.
8112 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8113 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8114 (gdb_bfd_fdopenr): Use new_reference.
8115 * exec.c (exec_file_attach): Use new_reference.
8116
8117 2018-04-30 Tom Tromey <tom@tromey.com>
8118
8119 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8120 method.
8121
8122 2018-04-30 Tom Tromey <tom@tromey.com>
8123
8124 * jit.c (jit_read_code_entry): Use type_align.
8125 * i386-tdep.c (i386_gdbarch_init): Don't call
8126 set_gdbarch_long_long_align_bit.
8127 * gdbarch.sh: Remove long_long_align_bit.
8128 * gdbarch.c, gdbarch.h: Rebuild.
8129 * arc-tdep.c (arc_type_align): New function.
8130 (arc_gdbarch_init): Use arc_type_align. Don't call
8131 set_gdbarch_long_long_align_bit.
8132
8133 2018-04-30 Tom Tromey <tom@tromey.com>
8134
8135 * rust-lang.c (rust_type_alignment): Remove.
8136 (rust_composite_type): Use type_align.
8137
8138 2018-04-30 Tom Tromey <tom@tromey.com>
8139
8140 * NEWS: Mention Type.align.
8141 * python/py-type.c (typy_get_alignof): New function.
8142 (type_object_getset): Add "alignof".
8143
8144 2018-04-30 Tom Tromey <tom@tromey.com>
8145
8146 PR exp/17095:
8147 * NEWS: Update.
8148 * std-operator.def (UNOP_ALIGNOF): New operator.
8149 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8150 New.
8151 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8152 * c-lang.c (c_op_print_tab): Add alignof.
8153 * c-exp.y (ALIGNOF): New token.
8154 (exp): Add "ALIGNOF" production.
8155 (ident_tokens): Add _Alignof and alignof.
8156
8157 2018-04-30 Tom Tromey <tom@tromey.com>
8158
8159 * i386-tdep.c (i386_type_align): New function.
8160 (i386_gdbarch_init): Update.
8161 * gdbarch.sh (type_align): New method.
8162 * gdbarch.c, gdbarch.h: Rebuild.
8163 * arch-utils.h (default_type_align): Declare.
8164 * arch-utils.c (default_type_align): New function.
8165 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8166 (struct type) <align_log2>: New field.
8167 <instance_flags>: Now a bitfield.
8168 (TYPE_RAW_ALIGN): New macro.
8169 (type_align, type_raw_align, set_type_align): Declare.
8170 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8171 functions.
8172 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8173 (get_alignment, maybe_set_alignment): New functions.
8174 (read_structure_type, read_enumeration_type, read_array_type)
8175 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8176 (read_subrange_type, read_base_type): Set type alignment.
8177
8178 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8179
8180 * dwarf2read.c (read_index_from_section): Use bool.
8181
8182 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8183
8184 PR gdb/22950
8185 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8186 with #ifdef.
8187
8188 2018-04-29 John Reiser <jreiser@BitWagon.com>
8189
8190 PR build/22873
8191 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8192 last step, and do it atomically.
8193
8194 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8195
8196 * compile/compile-c-types.c (convert_int, convert_float):
8197 Update for C FE v1.
8198
8199 2018-04-27 Tom Tromey <tom@tromey.com>
8200
8201 PR rust/22545:
8202 * rust-lang.c (rust_inclusive_range_type_p): New function.
8203 (rust_range): Handle inclusive ranges.
8204 (rust_compute_range): Likewise.
8205 * rust-exp.y (struct rust_op) <inclusive>: New field.
8206 (DOTDOTEQ): New constant.
8207 (range_expr): Add "..=" productions.
8208 (operator_tokens): Add "..=" token.
8209 (ast_range): Add "inclusive" parameter.
8210 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8211 ranges.
8212 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8213 bounds values.
8214 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8215 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8216 Update comments.
8217 * expprint.c (print_subexp_standard): Handle new bounds values.
8218 (dump_subexp_body_standard): Likewise.
8219
8220 2018-04-27 Tom Tromey <tom@tromey.com>
8221
8222 * configure: Rebuild.
8223 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8224 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8225 "OVERRIDE".
8226 (class symbol_needs_eval_context): Likewise.
8227 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8228 (mock_mapped_index::symbol_name_at): Use "override". Remove
8229 "virtual".
8230 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8231 "override".
8232 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8233 * aarch64-tdep.c (instruction_reader::read): Use "override".
8234 (instruction_reader_test::read): Likewise.
8235 * arm-tdep.c (instruction_reader::read): Use "override".
8236 (instruction_reader_thumb::read): Likewise.
8237
8238 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8239
8240 PR remote/9665
8241 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8242 instead of remote_send.
8243 (remote_send): Remove.
8244
8245 2018-04-26 Pedro Alves <palves@redhat.com>
8246
8247 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8248 find_function_start_sal instead of find_pc_line.
8249
8250 2018-04-26 Pedro Alves <palves@redhat.com>
8251
8252 * breakpoint.c (set_breakpoint_location_function): Handle
8253 mst_data_gnu_ifunc.
8254 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8255 * elfread.c (elf_symtab_read): Give data symbols with
8256 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8257 (elf_rel_plt_read): Update comment.
8258 * linespec.c (convert_linespec_to_sals): Handle
8259 mst_data_gnu_ifunc.
8260 (minsym_found): Handle mst_data_gnu_ifunc.
8261 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8262 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8263 * parse.c (find_minsym_type_and_address): Handle
8264 mst_data_gnu_ifunc.
8265 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8266 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8267 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8268 comment.
8269 <mst_data_gnu_ifunc>: New enumerator.
8270
8271 2018-04-26 Pedro Alves <palves@redhat.com>
8272
8273 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8274 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8275 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8276 Handle it.
8277 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8278 (lookup_minimal_symbol_by_pc): Adjust.
8279 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8280 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8281 * minsyms.h (lookup_msym_prefer): New enum.
8282 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8283 parameter by a lookup_msym_prefer parameter.
8284
8285 2018-04-26 Pedro Alves <palves@redhat.com>
8286
8287 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8288 ends in "@plt" instead of looking at the symbol's section.
8289
8290 2018-04-26 Pedro Alves <palves@redhat.com>
8291
8292 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8293 all references.
8294 (find_pc_partial_function_gnu_ifunc): Rename to ...
8295 (find_pc_partial_function): ... this, and remove references to
8296 'is_gnu_ifunc_p'.
8297 (find_pc_partial_function): Delete old implementation.
8298 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8299
8300 2018-04-26 Pedro Alves <palves@redhat.com>
8301
8302 * linespec.c (struct bound_minimal_symbol_search_key): New.
8303 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8304 skip first line if we found a GNU ifunc minimal symbol by name.
8305 (compare_msymbols): Change parameters to work with a destructured
8306 lhs minsym.
8307 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8308 functions.
8309
8310 2018-04-26 Pedro Alves <palves@redhat.com>
8311
8312 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8313 ifunc targets here. Instead, if we have an ifunc minsym, use its
8314 address/name.
8315 (add_location_to_breakpoint): Store the minsym and the objfile in
8316 the breakpoint location.
8317 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8318 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8319 Record the minsym in the sal.
8320 * symtab.h (symtab_and_line) <msymbol>: New field.
8321
8322 2018-04-26 Pedro Alves <palves@redhat.com>
8323
8324 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8325 unless we actually resolved the ifunc.
8326
8327 2018-04-26 Pedro Alves <palves@redhat.com>
8328
8329 * c-exp.y (variable production): Prefer ifunc minsyms over
8330 regular function symbols.
8331 * symtab.c (find_gnu_ifunc): New function.
8332 * minsyms.h (lookup_msym_prefer): New enum.
8333 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8334 parameter by a lookup_msym_prefer parameter.
8335 * symtab.h (find_gnu_ifunc): New declaration.
8336
8337 2018-04-26 Pedro Alves <palves@redhat.com>
8338
8339 * blockframe.c (find_gnu_ifunc_target_type): New function.
8340 (find_function_type): New.
8341 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8342 return a value with a memory address.
8343 (eval_call): For calls to GNU ifunc functions, try to find the
8344 type of the target function from the type that the resolver
8345 returns.
8346 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8347 symbols.
8348 * infcall.c (find_function_return_type): Delete.
8349 (find_function_addr): Add 'function_type' parameter. For calls to
8350 GNU ifunc functions, try to find the type of the target function
8351 from the type that the resolver returns, and return it via
8352 FUNCTION_TYPE.
8353 (call_function_by_hand_dummy): Adjust to use the function type
8354 returned by find_function_addr.
8355 (find_function_addr): Add 'function_type' parameter and move
8356 description here.
8357 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8358 declarations.
8359
8360 2018-04-26 Pedro Alves <palves@redhat.com>
8361
8362 * c-exp.y (variable production): Skip finding an alias for ifunc
8363 symbols.
8364
8365 2018-04-26 Pedro Alves <palves@redhat.com>
8366
8367 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8368
8369 2018-04-25 Pedro Alves <palves@redhat.com>
8370
8371 * infcmd.c (kill_command): Print the pid as string, not the whole
8372 thread's ptid. Add comment. s/has been killed/killed/ in output
8373 message.
8374 * remote.c (remote_detach_1): Print the pid as string, not the
8375 whole thread's ptid.
8376
8377 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8378 Sergio Durigan Junior <sergiodj@redhat.com>
8379 Pedro Alves <palves@redhat.com>
8380
8381 * infcmd.c (kill_command): Print message when inferior has
8382 been killed.
8383 * inferior.c (print_inferior_events): Remove 'static'. Set as
8384 '1'.
8385 (add_inferior): Improve message printed when
8386 'print_inferior_events' is on.
8387 (exit_inferior): Remove message printed when
8388 'print_inferior_events' is on.
8389 (detach_inferior): Improve message printed when
8390 'print_inferior_events' is on.
8391 (initialize_inferiors): Use 'add_inferior_silent' to set
8392 'current_inferior_'.
8393 * inferior.h (print_inferior_events): Declare here as
8394 'extern'.
8395 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8396 '[Detaching...]' messages when 'print_inferior_events' is on.
8397 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8398 as prefix/suffix for messages. Remove periods. Fix erroneous
8399 'Detaching after fork from child...', replace it by '... from
8400 parent...'.
8401 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8402 prefix/suffix when printing 'Detaching...' messages. Print
8403 them when 'print_inferior_events' is on.
8404 * remote.c (remote_detach_1): Print message when detaching
8405 from inferior and '!is_fork_parent'.
8406
8407 2018-04-24 Tom Tromey <tom@tromey.com>
8408
8409 * cli-out.h: Reindent.
8410
8411 2018-04-24 Tom Tromey <tom@tromey.com>
8412
8413 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8414 (cli_ui_out::do_field_string): Use fputs_filtered.
8415 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8416
8417 2018-04-23 Tom Tromey <tom@tromey.com>
8418
8419 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8420 gdb::unique_xmalloc_ptr.
8421
8422 2018-04-23 Tom Tromey <tom@tromey.com>
8423
8424 * configure: Rebuild.
8425
8426 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8427
8428 PR gdb/23095
8429 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8430 prepare_for_testing. Set normal_bp to r_debug_state if target
8431 is bsd.
8432
8433 2018-04-21 Pedro Alves <palves@redhat.com>
8434 Rajendra SY <rajendra.sy@gmail.com>
8435
8436 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8437 * remote.c (extended_remote_attach): In all-stop mode, mark the
8438 thread as executing.
8439
8440 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8441
8442 * thread.c (thread_apply_all_command): Fix comment.
8443 (thread_command): Fix comment.
8444
8445 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8446
8447 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8448 parameter.
8449 * features/aarch64-core.c (create_feature_aarch64_core):
8450 Regenerate.
8451 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8452 Likewise.
8453 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8454 Likewise.
8455 * features/i386/32bit-avx512.c
8456 (create_feature_i386_32bit_avx512): Likewise.
8457 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8458 Likewise.
8459 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8460 Likewise.
8461 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8462 Likewise.
8463 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8464 Likewise.
8465 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8466 Likewise.
8467 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8468 Likewise.
8469 * features/i386/64bit-avx512.c
8470 (create_feature_i386_64bit_avx512): Likewise.
8471 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8472 Likewise.
8473 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8474 Likewise.
8475 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8476 Likewise.
8477 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8478 Likewise.
8479 * features/i386/64bit-segments.c
8480 (create_feature_i386_64bit_segments): Likewise.
8481 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8482 Likewise.
8483 * features/i386/x32-core.c
8484 (create_feature_i386_x32_core): Likewise.
8485 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8486 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8487 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8488 * target-descriptions.c: In generated code, don't pass xml
8489 filename.
8490
8491 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8492
8493 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8494 (print_xml_feature::visit_post): Likewise.
8495 (print_xml_feature::visit): Likewise.
8496 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8497 (print_xml_feature): Add new class.
8498 * regformats/regdat.sh: Null xmltarget on feature targets.
8499 * target-descriptions.c (struct target_desc): Add xmltarget.
8500 (maintenance_check_tdesc_xml_convert): Add unittest function.
8501 (tdesc_get_features_xml): Add function to get xml.
8502 (maintenance_check_xml_descriptions): Test xml generation.
8503 * xml-tdesc.c (string_read_description_xml): Add function.
8504 * xml-tdesc.h (string_read_description_xml): Add declaration.
8505
8506 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8507
8508 * features/Makefile: Add feature marker to targets with new style
8509 target descriptions.
8510 * regformats/aarch64.dat: Regenerate.
8511 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8512 * regformats/i386/amd64-avx-linux.dat: Likewise.
8513 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8514 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8515 * regformats/i386/amd64-linux.dat: Likewise.
8516 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8517 * regformats/i386/amd64.dat: Likewise.
8518 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8519 * regformats/i386/i386-avx-linux.dat: Likewise.
8520 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8521 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8522 * regformats/i386/i386-linux.dat: Likewise.
8523 * regformats/i386/i386-mmx-linux.dat: Likewise.
8524 * regformats/i386/i386-mpx-linux.dat: Likewise.
8525 * regformats/i386/i386.dat: Likewise.
8526 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8527 * regformats/i386/x32-avx-linux.dat: Likewise.
8528 * regformats/i386/x32-linux.dat: Likewise.
8529 * regformats/tic6x-c62x-linux.dat: Likewise.
8530 * regformats/tic6x-c64x-linux.dat: Likewise.
8531 * regformats/tic6x-c64xp-linux.dat: Likewise.
8532 * regformats/regdat.sh: Parse feature marker.
8533
8534 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8535
8536 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8537 (tdesc_osabi_name): Likewise.
8538 * target-descriptions.c (tdesc_architecture_name): Add new
8539 function.
8540 (tdesc_osabi_name): Likewise.
8541
8542 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8543
8544 * common/tdesc.c (tdesc_predefined_type): Move to here.
8545 (tdesc_named_type): Likewise.
8546 (tdesc_create_vector): Likewise.
8547 (tdesc_create_struct): Likewise.
8548 (tdesc_set_struct_size): Likewise.
8549 (tdesc_create_union): Likewise.
8550 (tdesc_create_flags): Likewise.
8551 (tdesc_create_enum): Likewise.
8552 (tdesc_add_field): Likewise.
8553 (tdesc_add_typed_bitfield): Likewise.
8554 (tdesc_add_bitfield): Likewise.
8555 (tdesc_add_flag): Likewise.
8556 (tdesc_add_enum_value): Likewise.
8557 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8558 (struct tdesc_type_vector): Likewise.
8559 (struct tdesc_type_field): Likewise.
8560 (struct tdesc_type_with_fields): Likewise.
8561 (tdesc_create_enum): Add declaration.
8562 (tdesc_add_typed_bitfield): Likewise.
8563 (tdesc_add_enum_value): Likewise.
8564 * target-descriptions.c (tdesc_type_field): Move from here.
8565 (tdesc_type_builtin): Likewise.
8566 (tdesc_type_vector): Likewise.
8567 (tdesc_type_with_fields): Likewise.
8568 (tdesc_predefined_types): Likewise.
8569 (tdesc_named_type): Likewise.
8570 (tdesc_create_vector): Likewise.
8571 (tdesc_create_struct): Likewise.
8572 (tdesc_set_struct_size): Likewise.
8573 (tdesc_create_union): Likewise.
8574 (tdesc_create_flags): Likewise.
8575 (tdesc_create_enum): Likewise.
8576 (tdesc_add_field): Likewise.
8577 (tdesc_add_typed_bitfield): Likewise.
8578 (tdesc_add_bitfield): Likewise.
8579 (tdesc_add_flag): Likewise.
8580 (tdesc_add_enum_value): Likewise.
8581 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8582 (tdesc_add_typed_bitfield): Likewise.
8583 (tdesc_add_enum_value): Likewise.
8584
8585 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8586
8587 * common/tdesc.c (tdesc_feature::accept): Move to here.
8588 (tdesc_feature::operator==): Likewise.
8589 (tdesc_create_reg): Likewise.
8590 * common/tdesc.h (tdesc_type_kind): Likewise.
8591 (struct tdesc_type): Likewise.
8592 (struct tdesc_feature): Likewise.
8593 * regformats/regdat.sh: Create a feature.
8594 * target-descriptions.c (tdesc_type_kind): Move from here.
8595 (tdesc_type): Likewise.
8596 (tdesc_type_up): Likewise.
8597 (tdesc_feature): Likewise.
8598 (tdesc_create_reg): Likewise.
8599
8600 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8601
8602 * Makefile.in: Add arch/tdesc.c
8603 * common/tdesc.c: New file.
8604 * common/tdesc.h (tdesc_element_visitor): Move to here.
8605 (tdesc_element): Likewise.
8606 (tdesc_reg): Likewise.
8607 (tdesc_reg_up): Likewise.
8608 * regformats/regdef.h (reg): Add offset to constructors.
8609 * target-descriptions.c (tdesc_element_visitor): Move from here.
8610 (tdesc_element): Likewise.
8611 (tdesc_reg): Likewise.
8612 (tdesc_reg_up): Likewise.
8613
8614 2018-04-17 Tom Tromey <tom@tromey.com>
8615
8616 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8617 discriminant field.
8618
8619 2018-04-17 Tom Tromey <tom@tromey.com>
8620
8621 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8622
8623 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8624
8625 * symtab.c (print_symbol_info): Skip printing filename and line
8626 number when `last' is NULL.
8627 (symtab_symbol_info): Use empty string instead of NULL for first
8628 invocation of print_symbol_info.
8629 (rbreak_command): Pass NULL to `last' parameter of
8630 print_symbol_info.
8631
8632 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8633
8634 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8635 instead of nullptr.
8636
8637 2018-04-16 Pedro Alves <palves@redhat.com>
8638
8639 * MAINTAINERS (sh): Remove.
8640 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8641 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8642 (ALLDEPFILES): Remove sh64-tdep.c.
8643 * NEWS: Mentions that support for SH-5/SH64 is removed.
8644 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8645 (sh*-*-openbsd*): Ditto.
8646 (sh64-*-elf*): Remove.
8647 (sh*): Remove.
8648 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8649 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8650 * sh-tdep.c: No longer include "sh64-tdep.h".
8651 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8652 * sh64-tdep.c, sh64-tdep.h: Remove files.
8653
8654 2018-04-16 Pedro Alves <palves@redhat.com>
8655
8656 * MAINTAINERS: Remove m88k.
8657 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8658 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8659 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8660 * NEWS: Mention that support for m88k was removed.
8661 * configure.host (m88*-*-*): Remove support.
8662 * configure.nat (m88k-*-*): Remove support.
8663 * configure.tgt (m88*-*-openbsd*): Remove.
8664 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8665
8666 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8667
8668 * configure.tgt (x86_tobjs): New variable.
8669 (amd64_tobjs, i386_tobjs): Use it.
8670
8671 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8672
8673 * symtab.c (print_symbol_info): Precede the symbol definition by
8674 the line number when available.
8675 * NEWS: Advertise this enhancement.
8676
8677 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8678
8679 * NEWS (New options): announce set/show record btrace cpu.
8680 * btrace.c: Include record-btrace.h.
8681 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8682 the vendor is unknown.
8683 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8684 Maybe overwrite the btrace configuration's cpu.
8685 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8686 (btrace_fetch): Add cpu parameter. Update callers.
8687 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8688 Maybe overwrite the btrace configuration's cpu. Skip enabling
8689 errata workarounds if the vendor is unknown.
8690 * python/py-record-btrace.c: Include record-btrace.h.
8691 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8692 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8693 * record-btrace.c (record_btrace_cpu_state_kind): New.
8694 (record_btrace_cpu): New.
8695 (set_record_btrace_cpu_cmdlist): New.
8696 (record_btrace_get_cpu): New.
8697 (require_btrace_thread, record_btrace_info)
8698 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8699 (cmd_set_record_btrace_cpu_none): New.
8700 (cmd_set_record_btrace_cpu_auto): New.
8701 (cmd_set_record_btrace_cpu): New.
8702 (cmd_show_record_btrace_cpu): New.
8703 (_initialize_record_btrace): Initialize set/show record btrace cpu
8704 commands.
8705 * record-btrace.h (record_btrace_get_cpu): New.
8706
8707 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8708
8709 * record.c (set_record_command): Fix typo in message.
8710
8711 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8712
8713 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8714
8715 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8716
8717 * infrun.c (process_event_stop_test): Call
8718 gdbarch_in_indirect_branch_thunk.
8719 * gdbarch.sh (in_indirect_branch_thunk): New.
8720 * gdbarch.c: Regenerated.
8721 * gdbarch.h: Regenerated.
8722 * x86-tdep.h: New.
8723 * x86-tdep.c: New.
8724 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8725 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8726 (ALLDEPFILES): Add x86-tdep.c.
8727 * arch-utils.h (default_in_indirect_branch_thunk): New.
8728 * arch-utils.c (default_in_indirect_branch_thunk): New.
8729 * i386-tdep: Include x86-tdep.h.
8730 (i386_in_indirect_branch_thunk): New.
8731 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8732 function.
8733 * amd64-tdep: Include x86-tdep.h.
8734 (amd64_in_indirect_branch_thunk): New.
8735 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8736
8737 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8738
8739 PR gdb/23053
8740 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8741 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8742 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8743 regression.
8744
8745 2018-04-12 Tom Tromey <tom@tromey.com>
8746
8747 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8748 (rust_evaluate_subexp): Likewise.
8749
8750 2018-04-12 Pedro Alves <palves@redhat.com>
8751
8752 * procfs.c (procfs_detach): Make forward declaration's prototype
8753 match definition's protototype.
8754 (proc_get_LDT_entry): Remove stale do_cleanups call.
8755
8756 2018-04-12 Pedro Alves <palves@redhat.com>
8757
8758 * target.h (target_ops::to_has_exited): Delete.
8759 (target_has_exited): Delete.
8760 * target-delegates.c: Regenerate.
8761
8762 2018-04-11 Pedro Alves <palves@redhat.com>
8763
8764 * target.c (fileio_fh_t::t): Add comment.
8765 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8766 (target_fileio_close): Handle a NULL target.
8767 (invalidate_fileio_fh): New.
8768 (target_close): Call it.
8769 * remote.c (remote_hostio_send_command): No longer check whether
8770 remote_desc is open.
8771
8772 2018-04-11 Pedro Alves <palves@redhat.com>
8773
8774 * target.c (fileio_fh_t): Make it a named struct instead of a
8775 typedef.
8776 (fileio_fh_t::is_closed): New method.
8777 (DEF_VEC_O (fileio_fh_t)): Remove.
8778 (fileio_fhandles): Now a std::vector.
8779 (is_closed_fileio_fh): Delete.
8780 (acquire_fileio_fd): Adjust. Rename parameters.
8781 (release_fileio_fd): Adjust.
8782 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8783 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8784 (target_fileio_close): Adjust.
8785
8786 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8787
8788 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8789 index.
8790
8791 2018-04-10 Pedro Alves <palves@redhat.com>
8792
8793 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8794 (scoped_finish_thread_state): New class.
8795 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8796 cleanup.
8797 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8798 (fetch_inferior_event, normal_stop): Likewise.
8799 * thread.c (finish_thread_state_cleanup): Delete.
8800
8801 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8802 Pedro Alves <palves@redhat.com>
8803
8804 * value.c: Include "selftest.h" and "common/array-view.h".
8805 (struct range) <operator ==>: New.
8806 (test_ranges_contain): New.
8807 (check_ranges_vector): New.
8808 (test_insert_into_bit_range_vector): New.
8809 (_initialize_values): Register selftests.
8810 * common/array-view.h (operator==, operator!=): New.
8811
8812 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8813
8814 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8815 an iterator.
8816 * inline-frame.c: Include <algorithm>.
8817 (struct inline_state): Add constructor.
8818 (inline_state_s): Remove.
8819 (DEF_VEC_O(inline_state_s)): Remove.
8820 (inline_states): Change type to std::vector.
8821 (find_inline_frame_state): Adjust to std::vector.
8822 (allocate_inline_frame_state): Remove.
8823 (clear_inline_frame_state): Adjust to std::vector.
8824 (skip_inline_frames): Adjust to std::vector.
8825
8826 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8827
8828 * tracepoint.h (struct trace_state_variable): Add constructor.
8829 <name>: Change type to std::string.
8830 * tracepoint.c (tsv_s): Remove.
8831 (DEF_VEC_O(tsv_s)): Remove.
8832 (tvariables): Change to std::vector.
8833 (create_trace_state_variable): Adjust to std::vector.
8834 (find_trace_state_variable): Likewise.
8835 (find_trace_state_variable_by_number): Likewise.
8836 (delete_trace_state_variable): Likewise.
8837 (trace_variable_command): Adjust to std::string.
8838 (delete_trace_variable_command): Likewise.
8839 (tvariables_info_1): Adjust to std::vector.
8840 (save_trace_state_variables): Likewise.
8841 (start_tracing): Likewise.
8842 (merge_uploaded_trace_state_variables): Adjust to std::vector
8843 and std::string.
8844 * target.h (struct target_ops)
8845 <to_download_trace_state_variable>: Pass reference to
8846 trace_state_variable.
8847 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8848 * target-delegates.c: Re-generate.
8849 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8850 (mi_tsv_deleted): Likewise.
8851 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8852 * remote.c (remote_download_trace_state_variable): Change
8853 pointer to reference and adjust.
8854 * make-target-delegates (parse_argtypes): Handle references.
8855 (write_function_header): Likewise.
8856 (munge_type): Likewise.
8857
8858 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8859
8860 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8861 string_view-selftests.c.
8862 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8863 testsuite.
8864 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8865 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8866 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8867 * unittests/basic_string_view/element_access/char/1.cc:
8868 Likewise.
8869 * unittests/basic_string_view/element_access/char/empty.cc:
8870 Likewise.
8871 * unittests/basic_string_view/element_access/char/front_back.cc:
8872 Likewise.
8873 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8874 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8875 Likewise.
8876 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8877 Likewise.
8878 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8879 Likewise.
8880 * unittests/basic_string_view/operations/compare/char/1.cc:
8881 Likewise.
8882 * unittests/basic_string_view/operations/compare/char/13650.cc:
8883 Likewise.
8884 * unittests/basic_string_view/operations/copy/char/1.cc:
8885 Likewise.
8886 * unittests/basic_string_view/operations/data/char/1.cc:
8887 Likewise.
8888 * unittests/basic_string_view/operations/find/char/1.cc:
8889 Likewise.
8890 * unittests/basic_string_view/operations/find/char/2.cc:
8891 Likewise.
8892 * unittests/basic_string_view/operations/find/char/3.cc:
8893 Likewise.
8894 * unittests/basic_string_view/operations/find/char/4.cc:
8895 Likewise.
8896 * unittests/basic_string_view/operations/rfind/char/1.cc:
8897 Likewise.
8898 * unittests/basic_string_view/operations/rfind/char/2.cc:
8899 Likewise.
8900 * unittests/basic_string_view/operations/rfind/char/3.cc:
8901 Likewise.
8902 * unittests/basic_string_view/operations/substr/char/1.cc:
8903 Likewise.
8904 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8905 * unittests/string_view-selftests.c: New file.
8906
8907 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8908
8909 * unittests/basic_string_view/capacity/1.cc: New file.
8910 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8911 * unittests/basic_string_view/cons/char/1.cc: New file.
8912 * unittests/basic_string_view/cons/char/2.cc: New file.
8913 * unittests/basic_string_view/cons/char/3.cc: New file.
8914 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8915 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8916 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8917 * unittests/basic_string_view/element_access/char/1.cc: New file.
8918 * unittests/basic_string_view/element_access/char/2.cc: New file.
8919 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8920 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8921 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8922 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8923 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8924 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8925 * unittests/basic_string_view/include.cc: New file.
8926 * unittests/basic_string_view/inserters/char/1.cc: New file.
8927 * unittests/basic_string_view/inserters/char/2.cc: New file.
8928 * unittests/basic_string_view/inserters/char/3.cc: New file.
8929 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8930 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8931 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8932 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8933 * unittests/basic_string_view/literals/types.cc: New file.
8934 * unittests/basic_string_view/literals/values.cc: New file.
8935 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8936 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8937 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8938 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8939 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8940 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8941 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8942 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8943 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8944 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8945 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8946 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8947 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8948 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8949 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8950 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8951 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8952 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8953 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8954 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8955 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8956 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8957 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8958 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8959 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8960 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8961 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8962 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8963 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8964 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8965 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8966 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8967 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8968 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8969 * unittests/basic_string_view/operators/char/2.cc: New file.
8970 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8971 * unittests/basic_string_view/range_access/char/1.cc: New file.
8972 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8973 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8974 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8975 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8976 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8977 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8978 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8979 * unittests/basic_string_view/typedefs.cc: New file.
8980 * unittests/basic_string_view/types/1.cc: New file.
8981
8982 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8983
8984 * common/gdb_string_view.h: Remove libstdc++ implementation
8985 details, adjust to gdb reality.
8986 * common/gdb_string_view.tcc: Likewise.
8987 * cli/cli-script.c (struct string_view): Remove.
8988 (user_args) <m_args>: Change element type to gdb::string_view.
8989 (user_args::insert_args): Adjust.
8990
8991 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8992
8993 * common/gdb_string_view.h: New file.
8994 * common/gdb_string_view.tcc: New file.
8995
8996 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8997
8998 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8999 * configure: Re-generate.
9000
9001 2018-04-09 Pedro Alves <palves@redhat.com>
9002
9003 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9004 (set_target_gdbarch): Call
9005 gdb::observers::architecture_changed.notify instead of
9006 observer_notify_architecture_changed.
9007
9008 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9009
9010 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9011 (do_restore_current_traceframe_cleanup): Remove.
9012 (restore_current_traceframe_cleanup_dtor): Remove.
9013 (make_cleanup_restore_current_traceframe): Remove.
9014 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9015 New.
9016 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9017 * infrun.c (fetch_inferior_event): Use
9018 scoped_restore_current_traceframe.
9019
9020 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9021
9022 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9023 Remove.
9024 <n_allocated_type_units>: Remove.
9025 <all_type_units>: Change to std::vector.
9026 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9027 to std::vector change.
9028 (dwarf2_per_objfile::get_cutu): Likewise.
9029 (dwarf2_per_objfile::get_tu): Likewise.
9030 (create_signatured_type_table_from_index): Likewise.
9031 (create_signatured_type_table_from_debug_names): Likewise.
9032 (dw2_symtab_iter_next): Likewise.
9033 (dw2_print_stats): Likewise.
9034 (dw2_expand_all_symtabs): Likewise.
9035 (dw2_expand_marked_cus): Likewise.
9036 (dw2_debug_names_iterator::next): Likewise.
9037 (dwarf2_initialize_objfile): Likewise.
9038 (add_signatured_type_cu_to_table): Likewise.
9039 (create_all_type_units): Likewise.
9040 (add_type_unit): Likewise.
9041 (struct tu_abbrev_offset): Add constructor.
9042 (build_type_psymtabs_1): Adjust to std::vector change.
9043 (print_tu_stats): Likewise.
9044 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9045 (write_debug_names): Likewise.
9046
9047 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9048
9049 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9050 Make an std::vector.
9051 <n_comp_units>: Remove.
9052 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9053 to std::vector change.
9054 (dwarf2_per_objfile::get_cutu): Likewise.
9055 (dwarf2_per_objfile::get_cu): Likewise.
9056 (create_cus_from_index): Likewise.
9057 (create_addrmap_from_index): Likewise.
9058 (create_addrmap_from_aranges): Likewise.
9059 (dwarf2_read_index): Likewise.
9060 (dw2_find_last_source_symtab): Likewise.
9061 (dw2_map_symtabs_matching_filename): Likewise.
9062 (dw2_symtab_iter_next): Likewise.
9063 (dw2_print_stats): Likewise.
9064 (dw2_expand_all_symtabs): Likewise.
9065 (dw2_expand_symtabs_with_fullname): Likewise.
9066 (dw2_expand_marked_cus): Likewise.
9067 (dw2_map_symbol_filenames): Likewise.
9068 (create_cus_from_debug_names): Likewise.
9069 (dwarf2_read_debug_names): Likewise.
9070 (dw2_debug_names_iterator::next): Likewise.
9071 (dwarf2_initialize_objfile): Likewise.
9072 (set_partial_user): Likewise.
9073 (dwarf2_build_psymtabs_hard): Likewise.
9074 (read_comp_units_from_section): Remove arguments, adjust to
9075 std::vector change.
9076 (create_all_comp_units): Adjust to std::vector and
9077 read_comp_units_from_section changes.
9078 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9079 change.
9080 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9081 (psyms_seen_size): Likewise.
9082 (write_gdbindex): Likewise.
9083 (write_debug_names): Likewise.
9084
9085 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9086
9087 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9088 with dwarf2_per_objfile.
9089 (create_cus_from_index): Likewise.
9090 (create_signatured_type_table_from_index): Likewise.
9091 (dwarf2_read_index): Likewise.
9092 (dwarf2_initialize_objfile): Likewise.
9093 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9094 per_cu rather than get_dwarf2_per_objfile.
9095
9096 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9097
9098 * dwarf2read.h (struct signatured_type): Forward declare.
9099 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9100 New methods.
9101 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9102 (dw2_get_cutu): ...this.
9103 (dwarf2_per_objfile::get_cu): Rename from...
9104 (dw2_get_cu): ...this.
9105 (dwarf2_per_objfile::get_tu): New.
9106 (create_addrmap_from_index): Adjust.
9107 (create_addrmap_from_aranges): Adjust.
9108 (dw2_find_last_source_symtab): Adjust.
9109 (dw2_map_symtabs_matching_filename): Adjust.
9110 (dw2_symtab_iter_next): Adjust.
9111 (dw2_print_stats): Adjust.
9112 (dw2_expand_all_symtabs): Adjust.
9113 (dw2_expand_symtabs_with_fullname): Adjust.
9114 (dw2_expand_marked_cus): Adjust.
9115 (dw_expand_symtabs_matching_file_matcher): Adjust.
9116 (dw2_map_symbol_filenames): Adjust.
9117 (dw2_debug_names_iterator::next): Adjust.
9118 (dwarf2_initialize_objfile): Adjust.
9119 (set_partial_user): Adjust.
9120 (dwarf2_build_psymtabs_hard): Adjust.
9121
9122 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9123
9124 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9125 Remove unused variables.
9126 (dw2_map_symtabs_matching_filename): Likewise.
9127 (dwarf2_record_block_ranges): Likewise.
9128 (dwarf2_read_addr_index): Likewise.
9129 (follow_die_offset): Likewise.
9130
9131 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9132
9133 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9134 to symbol_file_add_main.
9135
9136 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9137
9138 PR mi/22299
9139 * mi/mi-console.c (do_fputc_async_safe): New.
9140 (mi_console_file::write_async_safe): New.
9141 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9142 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9143 New.
9144 * ui-file.c (ui_file::putstrn): Adjust call to
9145 fputstrn_unfiltered.
9146 * utils.c (printchar): Replace do_fputs and do_fprintf
9147 parameters by do_fputc.
9148 (fputstr_filtered): Adjust call to printchar.
9149 (fputstr_unfiltered): Likewise.
9150 (fputstrn_filtered): Likewise.
9151 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9152 printchar.
9153 * utils.h (do_fputc_ftype): New typedef.
9154 (fputstrn_unfiltered): Add do_fputc parameter.
9155
9156 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9157
9158 * regformats/i386/i386-avx.dat: Remove.
9159
9160 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9161
9162 PR gdb/22979
9163 * amd64-tdep.c (amd64_none_init_abi): New function.
9164 (amd64_x32_none_init_abi): New function.
9165 (_initialize_amd64_tdep): Register handlers for x86-64 and
9166 x64_32 with GDB_OSABI_NONE.
9167 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9168 GDB_OSABI_NONE osabi.
9169
9170 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9171
9172 PR gdb/22980
9173 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9174 GDB_OSABI_NONE.
9175 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9176 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9177
9178 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9179
9180 * common/byte-vector.h (char_vector): New type.
9181 * target.h (target_read_alloc): Return
9182 gdb::optional<byte_vector>.
9183 (target_read_stralloc): Return gdb::optional<char_vector>.
9184 (target_get_osdata): Return gdb::optional<char_vector>.
9185 * target.c (target_read_alloc_1): Templatize. Replacement
9186 manual memory management with vector.
9187 (target_read_alloc): Change return type, adjust.
9188 (target_read_stralloc): Change return type, adjust.
9189 (target_get_osdata): Change return type, adjust.
9190 * auxv.c (struct auxv_info) <length>: Remove.
9191 <data>: Change type to gdb::optional<byte_vector>.
9192 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9193 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9194 (target_auxv_search): Adjust.
9195 (fprint_target_auxv): Adjust.
9196 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9197 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9198 (linux_make_corefile_notes): Adjust.
9199 * osdata.c (get_osdata): Adjust.
9200 * remote.c (remote_get_threads_with_qxfer): Adjust.
9201 (remote_memory_map): Adjust.
9202 (remote_traceframe_info): Adjust.
9203 (btrace_read_config): Adjust.
9204 (remote_read_btrace): Adjust.
9205 (remote_pid_to_exec_file): Adjust.
9206 * solib-aix.c (solib_aix_get_library_list): Adjust.
9207 * solib-dsbt.c (decode_loadmap): Don't free buf.
9208 (dsbt_get_initial_loadmaps): Adjust.
9209 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9210 * solib-target.c (solib_target_current_sos): Adjust.
9211 * tracepoint.c (sdata_make_value): Adjust.
9212 * xml-support.c (xinclude_start_include): Adjust.
9213 (xml_fetch_content_from_file): Adjust.
9214 * xml-support.h (xml_fetch_another): Change return type.
9215 (xml_fetch_content_from_file): Change return type.
9216 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9217 * xml-tdesc.c (file_read_description_xml): Adjust.
9218 (fetch_available_features_from_target): Change return type.
9219 (target_fetch_description_xml): Adjust.
9220 (target_read_description_xml): Adjust.
9221
9222 2018-04-06 Tom Tromey <tom@tromey.com>
9223
9224 * value.c (~value): Update.
9225 (struct value) <contents>: Now unique_xmalloc_ptr.
9226 (value_contents_bits_eq, allocate_value_contents)
9227 (value_contents_raw, value_contents_all_raw)
9228 (value_contents_for_printing, value_contents_for_printing_const)
9229 (set_value_enclosing_type): Update.
9230
9231 2018-04-06 Tom Tromey <tom@tromey.com>
9232
9233 * value.c (range_s): Remove typedef, VEC.
9234 (struct range): Add operator<.
9235 (range_lessthan): Remove.
9236 (ranges_contain): Change type.
9237 (~value): Update.
9238 (struct value) <unavailable, optimized_out>: Now std::vector.
9239 (value_entirely_available)
9240 (value_entirely_covered_by_range_vector)
9241 (value_entirely_unavailable, value_entirely_optimized_out):
9242 Update.
9243 (insert_into_bit_range_vector): Change argument type.
9244 (find_first_range_overlap): Likewise.
9245 (struct ranges_and_idx, value_contents_bits_eq)
9246 (require_not_optimized_out, require_available): Update.
9247 (ranges_copy_adjusted): Change argument types.
9248 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9249
9250 2018-04-06 Tom Tromey <tom@tromey.com>
9251
9252 * value.c (~value): Update.
9253 (struct value) <parent>: Now a value_ref_ptr.
9254 (value_parent, set_value_parent, value_address, value_copy):
9255 Update.
9256
9257 2018-04-06 Tom Tromey <tom@tromey.com>
9258
9259 * value.c (struct value): Add constructor, destructor, and member
9260 initializers.
9261 (allocate_value_lazy, value_decref): Update.
9262
9263 2018-04-06 Tom Tromey <tom@tromey.com>
9264
9265 * value.c (struct value) <released, next>: Remove.
9266 (all_values): Now a std::vector.
9267 (allocate_value_lazy): Update.
9268 (value_next): Remove.
9269 (value_mark, value_free_to_mark, release_value)
9270 (value_release_to_mark): Update.
9271
9272 2018-04-06 Tom Tromey <tom@tromey.com>
9273
9274 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9275 (free_value_chain): Remove.
9276 * value.c (free_value_chain): Remove.
9277 (value_release_to_mark): Return a std::vector.
9278 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9279 std::vector.
9280 (check_condition): Update.
9281 * eval.c (fetch_subexp_value): Change "val_chain" to a
9282 std::vector.
9283 * breakpoint.c (update_watchpoint): Update.
9284 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9285
9286 2018-04-06 Tom Tromey <tom@tromey.com>
9287
9288 * value.h (free_all_values): Remove.
9289 * value.c (free_all_values): Remove.
9290
9291 2018-04-06 Tom Tromey <tom@tromey.com>
9292
9293 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9294 (value_history_chain, value_history_count): Remove.
9295 (value_history): New global.
9296 (record_latest_value, access_value_history, show_values)
9297 (preserve_values): Update.
9298
9299 2018-04-06 Tom Tromey <tom@tromey.com>
9300
9301 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9302 * varobj.c (varobj_set_display_format, varobj_set_value)
9303 (install_default_visualizer, construct_visualizer)
9304 (install_new_value, ~varobj, varobj_get_value_type)
9305 (my_value_of_variable, varobj_editable_p): Update.
9306 * c-varobj.c (c_describe_child, c_value_of_variable)
9307 (cplus_number_of_children, cplus_describe_child): Update.
9308 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9309 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9310 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9311
9312 2018-04-06 Tom Tromey <tom@tromey.com>
9313
9314 * printcmd.c (last_examine_address): Change type to
9315 value_ref_ptr.
9316 (do_examine, x_command): Update.
9317
9318 2018-04-06 Tom Tromey <tom@tromey.com>
9319
9320 * value.c (release_value): Update.
9321 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9322 (struct bpstats) <val>: Now a value_ref_ptr.
9323 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9324 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9325 (~watchpoint, print_it_watchpoint, watch_command_1)
9326 (invalidate_bp_value_on_memory_change): Update.
9327
9328 2018-04-06 Tom Tromey <tom@tromey.com>
9329
9330 * varobj.c (varobj_clear_saved_item)
9331 (update_dynamic_varobj_children, install_new_value, ~varobj):
9332 Update.
9333 * value.h (value_incref): Move declaration earlier.
9334 (value_decref): Rename from value_free.
9335 (struct value_ref_policy): New.
9336 (value_ref_ptr): New typedef.
9337 (struct value_deleter): Remove.
9338 (gdb_value_up): Remove typedef.
9339 (release_value): Change return type.
9340 (release_value_or_incref): Remove.
9341 * value.c (set_value_parent): Update.
9342 (value_incref): Change return type.
9343 (value_decref): Rename from value_free.
9344 (value_free_to_mark, free_all_values, free_value_chain): Update.
9345 (release_value): Return value_ref_ptr.
9346 (release_value_or_incref): Remove.
9347 (record_latest_value, set_internalvar, clear_internalvar):
9348 Update.
9349 * stack.c (info_frame_command): Don't call value_free.
9350 * python/py-value.c (valpy_dealloc, valpy_new)
9351 (value_to_value_object): Update.
9352 * printcmd.c (do_examine): Update.
9353 * opencl-lang.c (lval_func_free_closure): Update.
9354 * mi/mi-main.c (register_changed_p): Don't call value_free.
9355 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9356 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9357 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9358 value_free.
9359 * guile/scm-value.c (vlscm_free_value_smob)
9360 (vlscm_scm_from_value): Update.
9361 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9362 (frame_unwind_register_unsigned, get_frame_register_bytes)
9363 (put_frame_register_bytes): Don't call value_free.
9364 * findvar.c (address_from_register): Don't call value_free.
9365 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9366 * dwarf2loc.c (entry_data_value_free_closure)
9367 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9368 (dwarf2_evaluate_loc_desc_full): Update.
9369 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9370 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9371 (~watchpoint, watch_command_1)
9372 (invalidate_bp_value_on_memory_change): Update.
9373 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9374
9375 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9376
9377 PR gdb/23022
9378 * warning.m4: Add -Wno-error=deprecated-register.
9379 * configure: Re-generate.
9380
9381 2018-04-05 Tom Tromey <tom@tromey.com>
9382
9383 * linespec.h: Remove include of "vec.h".
9384
9385 2018-04-05 Tom Tromey <tom@tromey.com>
9386
9387 * linespec.c (typep): Remove typedef.
9388 (find_methods, find_superclass_methods): Take a std::vector.
9389 (find_method): Use std::vector.
9390
9391 2018-04-05 Tom Tromey <tom@tromey.com>
9392
9393 * utils.c (compare_strings): Remove.
9394 * utils.h (compare_strings): Remove.
9395 * objc-lang.h (find_imps): Update.
9396 * objc-lang.c (find_methods): Take a std::vector.
9397 (uniquify_strings, find_imps): Likewise.
9398 * linespec.c (find_methods): Take a std::vector.
9399 (decode_objc): Use std::vector.
9400 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9401 a std::vector.
9402 (find_method, find_function_symbols): Use std::vector.
9403
9404 2018-04-05 Tom Tromey <tom@tromey.com>
9405
9406 * completer.c (completion_tracker::completion_tracker): Remove
9407 cast.
9408 (completion_tracker::discard_completions): Likewise.
9409 * breakpoint.c (ambiguous_names_p): Remove cast.
9410 * ada-lang.c (_initialize_ada_language): Remove cast.
9411 * utils.h (streq): Update.
9412 (streq_hash): Add new declaration.
9413 * utils.c (streq): Return bool.
9414 (streq_hash): New function.
9415
9416 2018-04-05 Tom Tromey <tom@tromey.com>
9417
9418 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9419 Remove a string copy.
9420
9421 2018-04-05 Tom Tromey <tom@tromey.com>
9422
9423 * linespec.c (filter_results): Use std::vector.
9424 (decode_line_2, decode_line_full): Update.
9425
9426 2018-04-05 Tom Tromey <tom@tromey.com>
9427
9428 * linespec.c (canonical_to_fullform): Return std::string.
9429 (filter_results): Update.
9430 (struct decode_line_2_item): Add constructor.
9431 <fullform, displayform>: Now std::string.
9432 (decode_line_2_compare_items): Now a std::sort comparator.
9433 (decode_line_2): Update.
9434
9435 2018-04-05 Tom Tromey <tom@tromey.com>
9436
9437 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9438 (unexpected_linespec_error): Update.
9439 (linespec_parse_basic, parse_linespec): Update.
9440
9441 2018-04-05 Tom Tromey <tom@tromey.com>
9442
9443 * linespec.c (linespec_parse_basic): Reindent.
9444
9445 2018-04-05 Tom Tromey <tom@tromey.com>
9446
9447 * minsyms.h (iterate_over_minimal_symbols): Update.
9448 * minsyms.c (iterate_over_minimal_symbols): Take a
9449 gdb::function_view.
9450 * linespec.c (struct collect_minsyms): Remove.
9451 (compare_msyms): Now a std::sort comparator.
9452 (add_minsym): Add parameters.
9453 (search_minsyms_for_name): Update. Use std::vector.
9454
9455 2018-04-03 Tom Tromey <tom@tromey.com>
9456
9457 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9458 gdb::byte_vector.
9459
9460 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9461
9462 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9463
9464 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9465
9466 PR gdb/16959
9467 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9468 printing static type.
9469
9470 2018-04-01 Tom Tromey <tom@tromey.com>
9471
9472 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9473 (rs6000_xfer_shared_libraries): Update.
9474
9475 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9476
9477 * common/gdb_vecs.h (char_ptr): Remove.
9478 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9479
9480 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9481
9482 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9483 with std::vector.
9484 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9485
9486 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9487
9488 * tracepoint.h (struct uploaded_tp): Initialize fields.
9489 <actions, step_actions, cmd_strings>: Change type to
9490 std::vector<char *>.
9491 * tracepoint.c (get_uploaded_tp): Allocate with new.
9492 (free_uploaded_tps): Free with delete.
9493 (parse_tracepoint_definition): Adjust to std::vector change.
9494 * breakpoint.c (read_uploaded_action): Likewise.
9495 (create_tracepoint_from_upload): Likewise.
9496 * ctf.c (ctf_write_uploaded_tp): Likewise.
9497 (SET_ARRAY_FIELD): Likewise.
9498 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9499
9500 2018-03-30 Tom Tromey <tom@tromey.com>
9501
9502 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9503 std::unique_ptr.
9504 (svr4_keep_data_in_core): Update.
9505 (svr4_read_so_list): Update.
9506
9507 2018-03-30 Tom Tromey <tom@tromey.com>
9508
9509 * windows-nat.c (handle_output_debug_string, handle_exception):
9510 Update.
9511 * target.h (target_read_string): Update.
9512 * target.c (target_read_string): Change "string" to
9513 unique_xmalloc_ptr.
9514 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9515 Update.
9516 * solib-frv.c (frv_current_sos): Update.
9517 * solib-dsbt.c (dsbt_current_sos): Update.
9518 * solib-darwin.c (darwin_current_sos): Update.
9519 * linux-thread-db.c (inferior_has_bug): Update.
9520 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9521 Update. Remove alloca.
9522 * ada-lang.c (ada_main_name): Update.
9523
9524 2018-03-30 Tom Tromey <tom@tromey.com>
9525
9526 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9527 (struct dwo_file_deleter): New.
9528 (dwo_file_up): New typedef.
9529 (open_and_init_dwo_file): Use dwo_file_up.
9530 (free_dwo_file_cleanup): Remove.
9531
9532 2018-03-30 Tom Tromey <tom@tromey.com>
9533
9534 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9535 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9536
9537 2018-03-30 Tom Tromey <tom@tromey.com>
9538
9539 * dwarf2read.c (class free_cached_comp_units): New class.
9540 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9541 (free_cached_comp_units): Remove function.
9542
9543 2018-03-30 Tom Tromey <tom@tromey.com>
9544
9545 * utils.h (make_cleanup_unpush_target): Remove.
9546 * inf-ptrace.c (struct target_unpusher): New.
9547 (target_unpush_up) New typedef.
9548 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9549 target_unpush_up.
9550 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9551
9552 2018-03-27 Tom Tromey <tom@tromey.com>
9553
9554 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9555
9556 2018-03-27 Pedro Alves <palves@redhat.com>
9557 Tom Tromey <tom@tromey.com>
9558
9559 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9560 destructor. Now a class.
9561 (gdb_readline_wrapper_cleanup): Remove function.
9562 (gdb_readline_wrapper): Remove cleanups.
9563
9564 2018-03-27 Tom Tromey <tom@tromey.com>
9565
9566 * typeprint.h (struct type_print_options) <local_typedefs,
9567 global_typedefs>: Remove "struct" keyword.
9568 (class typedef_hash_table): New class.
9569 (recursively_update_typedef_hash, add_template_parameters)
9570 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9571 (find_typedef_in_hash): Don't declare.
9572 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9573 (typedef_hash_table::recursively_update): Rename from
9574 recursively_update_typedef_hash. Now a member.
9575 (typedef_hash_table::add_template_parameters): Rename from
9576 add_template_parameters. Now a member.
9577 (typedef_hash_table::typedef_hash_table): Now a constructor;
9578 rename from create_typedef_hash.
9579 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9580 rename from free_typedef_hash.
9581 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9582 (do_free_global_table): Remove.
9583 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9584 from copy_type_recursive.
9585 (create_global_typedef_table): Remove.
9586 (typedef_hash_table::find_global_typedef): Now a member of
9587 typedef_hash_table.
9588 (typedef_hash_table::find_typedef): Rename from
9589 find_typedef_in_hash; now a member.
9590 (whatis_exp): Update.
9591 * extension.h (struct ext_lang_type_printers): Add constructor and
9592 destructor.
9593 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9594 declare.
9595 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9596 Now a constructor; rename from start_ext_lang_type_printers.
9597 (ext_lang_type_printers): Now a destructor; rename from
9598 free_ext_lang_type_printers.
9599 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9600 Update.
9601 (c_type_print_base_struct_union): Update. Remove cleanups.
9602
9603 2018-03-27 Tom Tromey <tom@tromey.com>
9604
9605 * dwarf-index-write.c: Include <cmath>.
9606
9607 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9608
9609 * NEWS: Add entry describing new "set|show varsize-limit" command.
9610 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9611 command.
9612 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9613 "set variable".
9614
9615 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9616
9617 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9618 dwarf-index-write.c
9619 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9620 * dwarf-index-common.c: New file.
9621 * dwarf-index-common.h: New file.
9622 * dwarf-index-write.c: New file.
9623 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9624 (struct dwarf2_section_info): Move from here.
9625 (dwarf2_section_info_def): Likewise.
9626 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9627 (offset_type): Likewise.
9628 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9629 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9630 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9631 (byte_swap): Likewise.
9632 (MAYBE_SWAP): Likewise.
9633 (dwarf2_per_cu_ptr): Likewise.
9634 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9635 (struct tu_stats): Likewise.
9636 (struct dwarf2_per_objfile): Likewise.
9637 (struct dwarf2_per_cu_data): Likewise.
9638 (struct signatured_type): Likewise.
9639 (sig_type_ptr): Likewise.
9640 (DEF_VEC_P (sig_type_ptr)): Likewise.
9641 (INDEX4_SUFFIX): Likewise.
9642 (INDEX5_SUFFIX): Likewise.
9643 (DEBUG_STR_SUFFIX): Likewise.
9644 (dwarf2_read_section): Make non-static.
9645 (mapped_index_string_hash): Move from here.
9646 (dwarf5_djb_hash): Likewise.
9647 (file_write): Likewise.
9648 (class data_buf): Likewise.
9649 (struct symtab_index_entry): Likewise.
9650 (struct mapped_symtab): Likewise.
9651 (find_slot): Likewise.
9652 (hash_expand): Likewise.
9653 (add_index_entry): Likewise.
9654 (uniquify_cu_indices): Likewise.
9655 (class c_str_view): Likewise.
9656 (class c_str_view_hasher): Likewise.
9657 (class vector_hasher): Likewise.
9658 (write_hash_table): Likewise.
9659 (psym_index_map): Likewise.
9660 (struct addrmap_index_data): Likewise.
9661 (add_address_entry): Likewise.
9662 (add_address_entry_worker): Likewise.
9663 (write_address_map): Likewise.
9664 (symbol_kind): Likewise.
9665 (write_psymbols): Likewise.
9666 (struct signatured_type_index_data): Likewise.
9667 (write_one_signatured_type): Likewise.
9668 (recursively_count_psymbols): Likewise.
9669 (recursively_write_psymbols): Likewise.
9670 (class debug_names): Likewise.
9671 (check_dwarf64_offsets): Likewise.
9672 (psyms_seen_size): Likewise.
9673 (write_gdbindex): Likewise.
9674 (write_debug_names): Likewise.
9675 (assert_file_size): Likewise.
9676 (write_psymtabs_to_index): Likewise.
9677 (save_gdb_index_command): Likewise.
9678 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9679 command.
9680 * dwarf2read.h: New file.
9681
9682 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9683
9684 PR gdb/22670
9685 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9686 symbol name if the CU's language stores symbol names in linkage
9687 format.
9688 * language.h (struct language_defn)
9689 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9690 all instances of this struct.
9691
9692 2018-03-26 Tom Tromey <tom@tromey.com>
9693
9694 * stack.c (backtrace_command_1): Remove verbose code.
9695
9696 2018-03-26 Tom Tromey <tom@tromey.com>
9697
9698 * python/py-framefilter.c (py_print_type): Don't catch
9699 exceptions. Return void.
9700 (py_print_value): Likewise.
9701 (py_print_single_arg): Likewise.
9702 (enumerate_args): Don't catch exceptions.
9703 (py_print_args): Likewise.
9704 (py_print_frame): Likewise.
9705 (gdbpy_apply_frame_filter): Catch exceptions here.
9706
9707 2018-03-26 Tom Tromey <tom@tromey.com>
9708
9709 * stack.c (_initialize_stack): Remove trailing newlines from help
9710 text. Add "Usage" line to "backtrace" help.
9711
9712 2018-03-26 Tom Tromey <tom@tromey.com>
9713
9714 PR python/16486:
9715 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9716
9717 2018-03-26 Tom Tromey <tom@tromey.com>
9718
9719 * python/py-framefilter.c (py_print_single_arg): Return
9720 EXT_LANG_BT_ERROR from catch.
9721
9722 2018-03-26 Tom Tromey <tom@tromey.com>
9723
9724 PR backtrace/15584:
9725 * stack.c (backtrace_command_1): Move some code into no-filters
9726 "if".
9727
9728 2018-03-26 Tom Tromey <tom@tromey.com>
9729
9730 * python/py-framefilter.c (throw_quit_or_print_exception): New
9731 function.
9732 (gdbpy_apply_frame_filter): Use it.
9733
9734 2018-03-26 Tom Tromey <tom@tromey.com>
9735
9736 PR cli/17716:
9737 * python/py-framefilter.c (py_print_type, py_print_value)
9738 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9739 RETURN_MASK_ERROR.
9740
9741 2018-03-26 Tom Tromey <tom@tromey.com>
9742
9743 * python/py-framefilter.c (enumerate_args): Use
9744 gdb::unique_xmalloc_ptr.
9745
9746 2018-03-26 Tom Tromey <tom@tromey.com>
9747
9748 * python/py-framefilter.c (py_print_frame): Return
9749 EXT_LANG_BT_OK.
9750 (gdbpy_apply_frame_filter): Update comment.
9751 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9752 Remove.
9753 <EXT_LANG_BT_NO_FILTERS>: Change value.
9754
9755 2018-03-26 Tom Tromey <tom@tromey.com>
9756
9757 PR backtrace/15582:
9758 * stack.c (backtrace_command): Parse "hide" argument.
9759 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9760 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9761 constant.
9762
9763 2018-03-26 Tom Tromey <tom@tromey.com>
9764
9765 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9766 add "flags".
9767 (backtrace_command): Remove "fulltrace", add "flags".
9768
9769 2018-03-26 Tom Tromey <tom@tromey.com>
9770
9771 * stack.c (backtrace_command): Rewrite command line parsing.
9772
9773 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9774
9775 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9776
9777 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9778
9779 * filename-seen-cache.h: Add include guard.
9780
9781 2018-03-26 Keith Seitz <keiths@redhat.com>
9782
9783 * symfile.c (place_section): Remove "struct" from section_addr_info
9784 in comment.
9785 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9786 "struct" keyword from section_addr_info.
9787
9788 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9789
9790 * regformats/regdef.h (reg): Add constructors.
9791
9792 2018-03-25 Pedro Alves <palves@redhat.com>
9793
9794 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9795 if then/else bodies in var_func_name extraction.
9796
9797 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9798
9799 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9800 lookup_minimal_symbol() to find symbol entry.
9801 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9802
9803 2018-03-23 Keith Seitz <keiths@redhat.com>
9804
9805 PR c++/22968
9806 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9807 nested type definitions for C++, too.
9808
9809 2018-03-23 Tom Tromey <tom@tromey.com>
9810
9811 * machoread.c (struct oso_el): Add a constructor. Don't define as
9812 a typedef.
9813 (macho_register_oso): Remove.
9814 (macho_symtab_read): Take a std::vector.
9815 (oso_el_compare_name): Now a std::sort comparator.
9816 (macho_symfile_read_all_oso): Take a std::vector.
9817 (macho_symfile_read): Use std::vector. Remove cleanups.
9818
9819 2018-03-22 Tom Tromey <tom@tromey.com>
9820
9821 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9822 (record_full_goto_bookmark): Use std::string.
9823
9824 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9825
9826 PR tdep/18295
9827 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9828 a single mask.
9829
9830 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9831
9832 * rs6000-tdep.c (store_insn_p): New function.
9833 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9834 and cr_reg to their unshifted values. Use store_insn_p to
9835 match LR saves using either R1 or fdata->alloca_reg. Use
9836 store_insn_p to match CR saves. Set alloca_reg_offset
9837 when alloca_reg and framep are set. Remove lr_reg shift
9838 when assigning to fdata->lr_register.
9839
9840 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9841
9842 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9843 command line args instead of emitting a warning.
9844
9845 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9846
9847 * tracepoint.h (struct static_tracepoint_marker): Initialize
9848 fields, define default constructor, move constructor and move
9849 assignment, disable the rest.
9850 <str_id, extra>: Make std::string.
9851 (release_static_tracepoint_marker): Remove.
9852 (free_current_marker): Remove.
9853 * tracepoint.c (free_current_marker): Remove.
9854 (parse_static_tracepoint_marker_definition): Adjust to
9855 std::string, use new hex2str overload.
9856 (release_static_tracepoint_marker): Remove.
9857 (print_one_static_tracepoint_marker): Get marker by reference
9858 and adjust to std::string.
9859 (info_static_tracepoint_markers_command): Adjust to std::vector
9860 changes
9861 * target.h (static_tracepoint_marker_p): Remove typedef.
9862 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9863 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9864 bool.
9865 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9866 * target-debug.h
9867 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9868 (target_debug_print_std_vector_static_tracepoint_marker): New.
9869 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9870 to...
9871 (target_debug_print_static_tracepoint_marker_p): ... this.
9872 * target-delegates.c: Re-generate.
9873 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9874 Make std::string.
9875 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9876 (decode_static_tracepoint_spec): Adjust to std::vector.
9877 (tracepoint_print_one_detail): Adjust to std::string.
9878 (strace_marker_decode_location): Adjust to std::string.
9879 (update_static_tracepoint): Adjust to std::string, remove call
9880 to release_static_tracepoint_marker.
9881 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9882 Adjust to std::vector.
9883 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9884 (remote_static_tracepoint_markers_by_strid): Adjust to
9885 std::vector.
9886 * common/rsp-low.h (hex2str): New overload with explicit count
9887 of bytes.
9888 * common/rsp-low.c (hex2str): New overload with explicit count
9889 of bytes.
9890 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9891 (_initialize_rsp_low_selftests): Add test_hex2str test.
9892 * unittests/tracepoint-selftests.c
9893 (test_parse_static_tracepoint_marker_definition): Adjust to
9894 std::string.
9895
9896 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9897
9898 * tracepoint.c (parse_static_tracepoint_marker_definition):
9899 Consider case where the definition is followed by more
9900 definitions.
9901 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9902 tracepoint-selftests.c.
9903 * unittests/tracepoint-selftests.c: New.
9904
9905 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9906
9907 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9908 Carvalho.
9909
9910 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9911
9912 * symtab.c (find_pc_sect_line): fixed indentation.
9913
9914 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9915
9916 * symtab.c (find_pc_sect_line): now uses binary search.
9917
9918 2018-03-19 Tom Tromey <tom@tromey.com>
9919
9920 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9921 "IDENT" production.
9922
9923 2018-03-19 Pedro Alves <palves@redhat.com>
9924 Tom Tromey <tom@tromey.com>
9925
9926 * unittests/observable-selftests.c: New file.
9927 * common/observable.h: New file.
9928 * observable.h: New file.
9929 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9930 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9931 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9932 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9933 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9934 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9935 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9936 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9937 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9938 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9939 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9940 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9941 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9942 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9943 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9944 tui/tui-interp.c, valops.c: Update all users.
9945 * tui/tui-hooks.c (tui_bp_created_observer)
9946 (tui_bp_deleted_observer, tui_bp_modified_observer)
9947 (tui_inferior_exit_observer, tui_before_prompt_observer)
9948 (tui_normal_stop_observer, tui_register_changed_observer):
9949 Remove.
9950 (tui_observers_token): New global.
9951 (attach_or_detach, tui_attach_detach_observers): New functions.
9952 (tui_install_hooks, tui_remove_hooks): Use
9953 tui_attach_detach_observers.
9954 * record-btrace.c (record_btrace_thread_observer): Remove.
9955 (record_btrace_thread_observer_token): New global.
9956 * observer.sh: Remove.
9957 * observer.c: Rename to observable.c.
9958 * observable.c (namespace gdb_observers): Define new objects.
9959 (observer_debug): Move into gdb_observers namespace.
9960 (struct observer, struct observer_list, xalloc_observer_list_node)
9961 (xfree_observer_list_node, generic_observer_attach)
9962 (generic_observer_detach, generic_observer_notify): Remove.
9963 (_initialize_observer): Update.
9964 Don't include observer.inc.
9965 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9966 (clean mostlyclean): Likewise.
9967 (observer.h, observer.inc): Remove targets.
9968 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9969 (COMMON_SFILES): Use observable.c, not observer.c.
9970 * .gitignore: Remove observer.h.
9971
9972 2018-03-18 Tom Tromey <tom@tromey.com>
9973
9974 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9975 gdb::def_vector.
9976 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9977
9978 2018-03-17 Tom Tromey <tom@tromey.com>
9979
9980 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9981
9982 2018-03-17 Tom Tromey <tom@tromey.com>
9983
9984 * target.c (class scoped_target_fd): New.
9985 (target_fileio_close_cleanup): Remove.
9986 (target_fileio_read_alloc_1): Use scoped_target_fd.
9987
9988 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9989
9990 * silent-rules.mk: New.
9991 * Makefile.in: Include silent-rules.mk
9992 (srcdir, VPATH, top_srcdir): Move up.
9993 (COMPILE): Add ECHO_CXX.
9994 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9995 (init.c): Add ECHO_INIT_C.
9996 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9997 (version.c): Add ECHO_GEN.
9998 (printcmd.o): Add ECHO_CXX.
9999 (target-float.o): Add ECHO_CXX.
10000 (ada-exp.o): Add ECHO_CXX.
10001 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10002 (insight$(EXEEXT)): Add ECHO_CXXLD.
10003 * gnulib/configure.ac: Add AM_SILENT_RULES.
10004 * gnulib/aclocal.m4: Re-generate.
10005 * gnulib/configure: Re-generate.
10006 * gnulib/import/Makefile.in: Re-generate.
10007
10008 2018-03-16 Tom Tromey <tom@tromey.com>
10009
10010 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10011 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10012 * utils.c (do_free_section_addr_info)
10013 (make_cleanup_free_section_addr_info): Remove.
10014 * symfile.h (struct other_sections): Add constructor.
10015 (struct section_addr_info): Remove.
10016 (section_addr_info): New typedef.
10017 (struct sym_fns) <sym_offsets>: Change type of parameter.
10018 (build_section_addr_info_from_objfile)
10019 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10020 (default_symfile_offsets, symbol_file_add)
10021 (symbol_file_add_from_bfd)
10022 (build_section_addr_info_from_section_table): Update.
10023 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10024 * symfile.c (alloc_section_addr_info): Remove.
10025 (build_section_addr_info_from_section_table): Change return type.
10026 Update.
10027 (build_section_addr_info_from_bfd)
10028 (build_section_addr_info_from_objfile): Likewise.
10029 (free_section_addr_info): Remove.
10030 (relative_addr_info_to_section_offsets): Change type of "addrs".
10031 (addrs_section_compar): Now a std::sort comparator.
10032 (addrs_section_sort): Change return type.
10033 (addr_info_make_relative): Change type of "addrs". Update.
10034 (default_symfile_offsets, syms_from_objfile_1)
10035 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10036 (symbol_file_add_separate): Update.
10037 (symbol_file_add): Change type of "addrs". Update.
10038 (add_symbol_file_command): Update. Remove cleanups.
10039 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10040 cleanups.
10041 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10042 * solib.c (solib_read_symbols): Update.
10043 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10044 * machoread.c (macho_symfile_offsets): Update.
10045 * jit.c (jit_bfd_try_read_symtab): Update.
10046
10047 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10048
10049 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10050 unittests/utils-selftests.c.
10051 * unittests/utils-selftests.c: New file.
10052
10053 2018-03-14 Tom Tromey <tom@tromey.com>
10054
10055 PR cli/14977:
10056 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10057 for NULL.
10058
10059 2018-03-14 Tom Tromey <tom@tromey.com>
10060
10061 PR cli/19918:
10062 * printcmd.c (printf_pointer): Allow "-" in format.
10063
10064 2018-03-14 Tom Tromey <tom@tromey.com>
10065
10066 * printcmd.c (_initialize_printcmd): Add usage to printf.
10067
10068 2018-03-14 Yao Qi <qiyao@sourceware.org>
10069
10070 * MAINTAINERS: Update my email address.
10071
10072 2018-03-13 Tom Tromey <tom@tromey.com>
10073
10074 * machoread.c (macho_check_dsym): Change filenamep to a
10075 std::string*.
10076 (macho_symfile_read): Update.
10077 * symfile.c (load_command): Use std::string.
10078
10079 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10080
10081 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10082 to error message string.
10083 (riscv_register_name): Use xsnprintf instead of sprintf.
10084 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10085 internal_error.
10086 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10087 error.
10088 (riscv_push_dummy_call): Likewise.
10089
10090 2018-03-12 Tom Tromey <tom@tromey.com>
10091
10092 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10093 Use gdb::byte_vector.
10094 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10095
10096 2018-03-12 Yao Qi <yao.qi@linaro.org>
10097
10098 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10099 parameter type to readable_regcache.
10100 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10101 the declaration.
10102
10103 2018-03-11 Tom Tromey <tom@tromey.com>
10104
10105 * dwarf2read.c (struct nextfield): Add initializers.
10106 (struct nextfnfield): Remove.
10107 (struct fnfieldlist): Add initializers. Remove "length" and
10108 "head", use std::vector.
10109 (struct decl_field_list): Remove.
10110 (struct field_info): Add initializers.
10111 <fields, baseclasses>: Now std::vector.
10112 <nbaseclasses, nfnfields, typedef_field_list_count,
10113 nested_types_list_count>: Remove.
10114 (dwarf2_add_field, dwarf2_add_type_defn)
10115 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10116 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10117 (process_structure_scope): Update.
10118
10119 2018-03-11 Tom Tromey <tom@tromey.com>
10120
10121 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10122 for use by std::sort.
10123 (build_type_psymtabs_1): Use std::vector.
10124
10125 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10126
10127 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10128 and LIBMPFR in the printed configuration.
10129
10130 2018-03-08 Tom Tromey <tom@tromey.com>
10131
10132 * source.c (get_filename_and_charpos): Use scoped_fd.
10133 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10134 (procfs_pidlist): Likewise.
10135 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10136 (iterate_over_mappings): Likewise.
10137
10138 2018-03-08 Tom Tromey <tom@tromey.com>
10139
10140 * infcall.c (struct call_return_meta_info)
10141 <stack_temporaries_enabled>: Remove.
10142 (get_call_return_value, call_function_by_hand_dummy): Update.
10143 * thread.c (disable_thread_stack_temporaries): Remove.
10144 (enable_thread_stack_temporaries): Remove.
10145 (thread_stack_temporaries_enabled_p): Return bool.
10146 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10147 (get_last_thread_stack_temporary): Update.
10148 * eval.c (evaluate_subexp): Update.
10149 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10150 class, not a function.
10151 (value_ptr, value_vec): Remove typedefs.
10152 (class thread_info) <stack_temporaries_enabled>: Now bool.
10153 <stack_temporaries>: Now a std::vector.
10154 (thread_stack_temporaries_enabled_p)
10155 (value_in_thread_stack_temporaries): Return bool.
10156
10157 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10158
10159 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10160 (getpkt_or_notif_sane_1): Likewise.
10161
10162 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10163
10164 * build-id.c (build_id_to_debug_bfd): Use std::string.
10165
10166 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10167
10168 * build-id.c (find_separate_debug_file_by_buildid): Return
10169 std::string.
10170 * build-id.h (find_separate_debug_file_by_buildid): Return
10171 std::string.
10172 * coffread.c (coff_symfile_read): Adjust to std::string.
10173 * elfread.c (elf_symfile_read): Adjust to std::string.
10174 * symfile.c (separate_debug_file_exists): Change parameter to
10175 std::string.
10176 (find_separate_debug_file): Return std::string.
10177 (find_separate_debug_file_by_debuglink): Return std::string.
10178 * symfile.h (find_separate_debug_file_by_debuglink): Return
10179 std::string.
10180
10181 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10182
10183 * common/xml-utils.c (xml_escape_text): Move code to...
10184 (xml_escape_text_append): ... this new function.
10185 * common/xml-utils.h (xml_escape_text_append): New declaration.
10186 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10187 New function.
10188 (_initialize_xml_utils): register test_xml_escape_text_append as
10189 a selftest.
10190
10191 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10192
10193 * defs.h: Remove MAX_REGISTER_SIZE.
10194 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10195 asserts.
10196 * python/py-unwind.c (pyuw_sniffer): Likewise.
10197
10198 2018-03-07 Tom Tromey <tom@tromey.com>
10199
10200 * linux-tdep.c (linux_info_proc): Update.
10201 * target.h (struct target_ops) <to_fileio_readlink>: Return
10202 optional<string>.
10203 (target_fileio_readlink): Return optional<string>.
10204 * remote.c (remote_hostio_readlink): Return optional<string>.
10205 * inf-child.c (inf_child_fileio_readlink): Return
10206 optional<string>.
10207 * target.c (target_fileio_readlink): Return optional<string>.
10208
10209 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10210
10211 * regcache.c (cooked_read_test): Add riscv to the list of
10212 architectures that have a save_reggroup.
10213
10214 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10215
10216 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10217 value is not a dynamic class object.
10218
10219 2018-03-06 Tom Tromey <tom@tromey.com>
10220
10221 * rust-exp.y: Formatting fixes.
10222
10223 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10224
10225 * riscv-tdep.c (riscv_register_name): Remove target description
10226 support.
10227 (riscv_gdbarch_init): Remove target description check.
10228
10229 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10230
10231 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10232 comment.
10233 * riscv-tdep.h: Likewise.
10234
10235 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10236
10237 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10238 (riscv_pseudo_register_write): Delete.
10239 (riscv_gdbarch_init): Remove all use of pseudo registers.
10240
10241 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10242
10243 * record-btrace.c (btrace_print_lines): Replace cleanup
10244 parameter with RAII equivalents.
10245 (btrace_insn_history): Replace cleanup with RAII equivalents.
10246 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10247 make_cleanup_ui_out_tuple_begin_end): Remove.
10248 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10249 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10250 make_cleanup_ui_out_list_begin_end): Remove.
10251
10252 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10253
10254 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10255 parameter types to std::vector. Use bool.
10256 (record_btrace_wait): Replace VEC(tp_t) with
10257 std::vector<thread_info *>.
10258 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10259
10260 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10261
10262 * record-btrace.c (record_btrace_disable_callback): Remove.
10263 (struct scoped_btrace_disable): New.
10264 (record_btrace_open): Use scoped_btrace_disable.
10265
10266 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10267
10268 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10269 reading values from registers.
10270
10271 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10272
10273 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10274 where appropriate.
10275
10276 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10277
10278 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10279 change parameter type. Use GDB's print functions, and use
10280 core_addr_to_string where appropriate.
10281 (riscv_push_dummy_call): Use core_addr_to_string where
10282 appropriate, update call to riscv_print_arg_location, and reindent
10283 a few lines.
10284 (riscv_return_value): Update call to riscv_print_arg_location.
10285
10286 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10287 Tim Newsome <tim@sifive.com>
10288 Albert Ou <a0u@eecs.berkeley.edu>
10289 Darius Rad <darius@bluespec.com>
10290
10291 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10292 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10293 (ALLDEPFILES): Add riscv-tdep.c
10294 * configure.tgt: Add riscv support.
10295 * riscv-tdep.c: New file.
10296 * riscv-tdep.h: New file.
10297 * NEWS: Mention new target.
10298 * MAINTAINERS: Add entry for riscv.
10299
10300 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10301
10302 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10303 fields within aggregates.
10304
10305 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10306
10307 * record-btrace.c (btrace_print_lines): Change type of flags to
10308 gdb_disassembly_flags.
10309
10310 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10311
10312 * fbsd-nat.c: Include "inf-ptrace.h".
10313 (USE_SIGTRAP_SIGINFO): Conditionally define.
10314 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10315 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10316 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10317 function.
10318 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10319 Likewise.
10320 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10321 Likewise.
10322 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10323 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10324 "supports_stopped_by_hw_breakpoint" target methods.
10325
10326 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10327
10328 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10329 * fbsd-nat.c (debug_fbsd_nat): New variable.
10330 (show_fbsd_nat_debug): New function.
10331 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10332 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10333
10334 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10335
10336 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10337 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10338 prototype.
10339 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10340 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10341 method.
10342
10343 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10344
10345 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10346 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10347
10348 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10349
10350 * charset.c (struct charset_vector): New.
10351 (charsets): Change type to charset_vector.
10352 (find_charset_names): Adjust.
10353 (add_one): Adjust.
10354 (_initialize_charset): Adjust.
10355
10356 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10357
10358 * progspace.h (struct program_space) <deleted_solibs>: Change
10359 type to std::vector<std::string>.
10360 * progspace.c (clear_program_space_solib_cache): Adjust.
10361 * breakpoint.c (print_solib_event): Adjust.
10362 (check_status_catch_solib): Adjust.
10363 * solib.c (update_solib_list): Adjust.
10364 * ui-out.h (class ui_out) <field_string>: New overload.
10365 * ui-out.c (ui_out::field_string): New overload.
10366
10367 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10368
10369 * progspace.h (struct program_space): Add constructor and
10370 destructor, initialize fields.
10371 (add_program_space): Remove.
10372 * progspace.c (add_program_space): Rename to...
10373 (program_space::program_space): ... this.
10374 (release_program_space): Rename to...
10375 (program_space::~program_space): ... this.
10376 (delete_program_space): Use delete to delete program_space.
10377 (initialize_progspace): Use new to allocate program_space.
10378 * inferior.c (add_inferior_with_spaces): Likewise.
10379 (clone_inferior_command): Likewise.
10380 * infrun.c (follow_fork_inferior): Likewise.
10381 (handle_vfork_child_exec_or_exit): Likewise.
10382
10383 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10384
10385 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10386 (delim_string_to_char_ptr_vec): Return std::vector of
10387 gdb::unique_xmalloc_ptr.
10388 (dirnames_to_char_ptr_vec_append): Take std::vector of
10389 gdb::unique_xmalloc_ptr.
10390 (dirnames_to_char_ptr_vec): Return std::vector of
10391 gdb::unique_xmalloc_ptr.
10392 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10393 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10394 (delim_string_to_char_ptr_vec): Return an std::vector of
10395 gdb::unique_xmalloc_ptr, adjust the code.
10396 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10397 gdb::unique_xmalloc_ptr, adjust the code.
10398 (dirnames_to_char_ptr_vec): Return an std::vector of
10399 gdb::unique_xmalloc_ptr, adjust the code.
10400 * auto-load.c (auto_load_safe_path_vec): Change type to
10401 std::vector of gdb::unique_xmalloc_ptr.
10402 (auto_load_expand_dir_vars): Return an std::vector of
10403 gdb::unique_xmalloc_ptr, adjust the code.
10404 (auto_load_safe_path_vec_update): Adjust.
10405 (filename_is_in_auto_load_safe_path_vec): Adjust.
10406 (auto_load_objfile_script_1): Adjust.
10407 * build-id.c (build_id_to_debug_bfd): Adjust.
10408 * linux-thread-db.c (thread_db_load_search): Adjust.
10409 * source.c (add_path): Adjust.
10410 (openp): Adjust.
10411 * symfile.c (find_separate_debug_file): Adjust.
10412 * utils.c (do_free_char_ptr_vec): Remove.
10413 (make_cleanup_free_char_ptr_vec): Remove.
10414
10415 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10416
10417 PR gdb/22907
10418 * common/pathstuff.c: Conditionally include "<windows.h>".
10419
10420 2018-03-01 Georg Sauthoff <mail@georg.so>
10421
10422 PR gdb/22888
10423 * gcore.in: Quote variables and switch interpreter to bash.
10424
10425 2018-03-01 Tom Tromey <tom@tromey.com>
10426
10427 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10428 assertion. Add assertion for discriminant_index.
10429 (quirk_rust_enum): Use correct base type name in univariant case.
10430
10431 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10432
10433 * record.c (get_call_history_modifiers): Return a
10434 record_print_flags.
10435 (cmd_record_call_history): Adjust.
10436 * record-btrace.c (record_btrace_call_history): Adjust.
10437 (record_btrace_call_history_range): Adjust.
10438 (record_btrace_call_history_from): Adjust.
10439 * target-debug.h (target_debug_print_record_print_flags): New.
10440 * target-delegates.c: Re-generate.
10441 * target.c (target_call_history): Change flags type.
10442 (target_call_history_from): Likewise.
10443 (target_call_history_range): Likewise.
10444 * target.h (struct target_ops) <target_call_history>: Likewise.
10445 (target_call_history_from): Likewise.
10446 (target_call_history_range): Likewise.
10447
10448 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10449 Simon Marchi <simon.marchi@polymtl.ca>
10450
10451 * common/common-utils.c: Include "sys/stat.h".
10452 (is_regular_file): Move here from "source.c"; change return
10453 type to "bool".
10454 * common/common-utils.h (is_regular_file): New prototype.
10455 * common/pathstuff.c (contains_dir_separator): New function.
10456 * common/pathstuff.h (contains_dir_separator): New prototype.
10457 * source.c: Don't include "sys/stat.h".
10458 (is_regular_file): Move to "common/common-utils.c".
10459
10460 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10461
10462 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10463 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10464 * auto-load.c: Include "common/pathstuff.h".
10465 * common/common-def.h (current_directory): Move here.
10466 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10467 function.
10468 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10469 prototype.
10470 * common/pathstuff.c: New file.
10471 * common/pathstuff.h: New file.
10472 * compile/compile.c: Include "common/pathstuff.h".
10473 * defs.h (current_directory): Move to "common/common-defs.h".
10474 * dwarf2read.c: Include "common/pathstuff.h".
10475 * exec.c: Likewise.
10476 * guile/scm-safe-call.c: Likewise.
10477 * linux-thread-db.c: Likewise.
10478 * main.c: Likewise.
10479 * nto-tdep.c: Likewise.
10480 * objfiles.c: Likewise.
10481 * source.c: Likewise.
10482 * symtab.c: Likewise.
10483 * utils.c: Include "common/pathstuff.h".
10484 (gdb_realpath): Move to "common/pathstuff.c".
10485 (gdb_realpath_keepfile): Likewise.
10486 (gdb_abspath): Likewise.
10487 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10488 (gdb_realpath_keepfile): Likewise.
10489 (gdb_abspath): Likewise.
10490
10491 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10492
10493 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10494 wildcard process pid for super_resume for kernels with a
10495 specific bug.
10496
10497 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10498
10499 * compile/compile.c (get_args): Add additional comments
10500 explaining function.
10501
10502 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10503 Tom Tromey <tom@tromey.com>
10504
10505 * target.h (memory_write_request_s): Remove typedef. Don't define
10506 VEC.
10507 (target_write_memory_blocks): Change argument to std::vector.
10508 (struct memory_write_request): Add constructor.
10509 * target-memory.c (compare_block_starting_address): Return bool.
10510 Change argument types.
10511 (claim_memory): Change arguments to use std::vector.
10512 (split_regular_and_flash_blocks, blocks_to_erase)
10513 (compute_garbled_blocks): Likewise.
10514 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10515 (target_write_memory_blocks): Change argument to std::vector.
10516 * symfile.c (struct load_section_data): Add constructor and
10517 destructor. Use std::vector for "requests".
10518 (struct load_progress_data): Add initializers.
10519 (load_section_callback): Update. Use "new".
10520 (clear_memory_write_data): Remove.
10521 (generic_load): Update.
10522
10523 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10524
10525 * arch/aarch64.h: Use common/tdesc.h.
10526
10527 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10528
10529 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10530 architecture with a 64-bit ABI.
10531
10532 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10533
10534 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10535 ahead of target description loading.
10536
10537 2018-02-26 Tom Tromey <tom@tromey.com>
10538
10539 * stack.c (backtrace_command_1): Update.
10540 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10541 of "flags".
10542 * python/py-framefilter.c (py_print_frame)
10543 (gdbpy_apply_frame_filter): Change type of "flags".
10544 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10545 of "flags".
10546 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10547 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10548 * extension.h (enum frame_filter_flag): Rename from
10549 frame_filter_flags.
10550 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10551 (apply_ext_lang_frame_filter): Change type of "flags".
10552 * extension.c (apply_ext_lang_frame_filter): Change type of
10553 "flags".
10554 * extension-priv.h (struct extension_language_ops)
10555 <apply_frame_filter>: Change type of "flags".
10556
10557 2018-02-26 Tom Tromey <tom@tromey.com>
10558
10559 PR python/16497:
10560 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10561 off-by-one in py_end computation.
10562 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10563 PRINT_MORE_FRAMES.
10564 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10565 constant.
10566
10567 2018-02-26 Tom Tromey <tom@tromey.com>
10568
10569 * dwarf2read.c (struct variant_field): New.
10570 (struct nextfield) <variant>: New field.
10571 (dwarf2_add_field): Handle DW_TAG_variant_part.
10572 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10573 discriminated union.
10574 (read_structure_type): Handle DW_TAG_variant_part.
10575 (handle_struct_member_die): New function, extracted from
10576 process_structure_scope. Handle DW_TAG_variant.
10577 (process_structure_scope): Handle discriminated unions. Call
10578 handle_struct_member_die.
10579
10580 2018-02-26 Tom Tromey <tom@tromey.com>
10581
10582 * rust-lang.h (rust_last_path_segment): Declare.
10583 * rust-lang.c (rust_last_path_segment): Now public. Change
10584 contract.
10585 (struct disr_info): Remove.
10586 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10587 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10588 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10589 (rust_enum_p, rust_enum_variant): New function.
10590 (rust_underscore_fields): Remove "offset" parameter.
10591 (rust_print_enum): New function.
10592 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10593 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10594 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10595 enums.
10596 (rust_internal_print_type): New function, from rust_print_type.
10597 Remove enum code.
10598 (rust_print_type): Call rust_internal_print_type.
10599 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10600 Update enum handling.
10601 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10602 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10603 (rust_union_quirks): New functions.
10604 (process_full_comp_unit, process_full_type_unit): Call
10605 rust_union_quirks.
10606 (process_structure_scope): Update rust_unions if necessary.
10607
10608 2018-02-26 Tom Tromey <tom@tromey.com>
10609
10610 * value.h (value_union_variant): Declare.
10611 * valops.c (value_union_variant): New function.
10612 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10613 (struct discriminant_info): New.
10614 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10615 enumerator.
10616 (struct main_type) <flag_discriminated_union>: New field.
10617
10618 2018-02-26 Tom Tromey <tom@tromey.com>
10619
10620 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10621 unittests/unpack-selftests.c.
10622 * unittests/unpack-selftests.c: New file.
10623 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10624
10625 2018-02-26 Yao Qi <yao.qi@linaro.org>
10626
10627 * dwarf2read.c (struct partial_die_info) <read>: New method.
10628 (read_partial_die): Remove the declaration.
10629 (load_partial_dies): Update.
10630 (partial_die_info::partial_die_info):
10631 (read_partial_die): Change it to partial_die_info::read.
10632
10633 2018-02-26 Yao Qi <yao.qi@linaro.org>
10634
10635 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10636 (fixup_partial_die): Remove declaration.
10637 (scan_partial_symbols): Update.
10638 (partial_die_parent_scope): Likewise.
10639 (partial_die_full_name): Likewise.
10640 (fixup_partial_die): Change it to partial_die_info::fixup.
10641
10642 2018-02-26 Yao Qi <yao.qi@linaro.org>
10643
10644 * dwarf2read.c (read_partial_die): Update the declaration.
10645 (load_partial_dies): Caller update.
10646 (read_partial_die): Remove one argument abbrev_len.
10647
10648 2018-02-26 Yao Qi <yao.qi@linaro.org>
10649
10650 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10651 assignment operator.
10652 (load_partial_dies): Use ctor and copy ctor.
10653 (read_partial_die): Update.
10654 (dwarf2_cu::find_partial_die): Use ctor.
10655
10656 2018-02-26 Yao Qi <yao.qi@linaro.org>
10657
10658 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10659 (find_partial_die_in_comp_unit): Change it to
10660 dwarf2_cu::find_partial_die.
10661 (find_partial_die): Update.
10662
10663 2018-02-26 Yao Qi <yao.qi@linaro.org>
10664
10665 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10666 is NULL.
10667
10668 2018-02-26 Yao Qi <yao.qi@linaro.org>
10669
10670 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10671
10672 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10673
10674 * arch/amd64.h: Use common/tdesc.h.
10675 * arch/i386.c: Likewise.
10676 * arch/i386.h: Likewise.
10677 * arch/tic6x.c: Likewise.
10678 * arch/tdesc.h: Move file from here...
10679 * common/tdesc.h: ...to here.
10680 * features/aarch64-core.c: Regenerate.
10681 * features/aarch64-fpu.c: Regenerate.
10682 * features/i386/32bit-avx.c: Regenerate.
10683 * features/i386/32bit-avx512.c: Regenerate.
10684 * features/i386/32bit-core.c: Regenerate.
10685 * features/i386/32bit-linux.c: Regenerate.
10686 * features/i386/32bit-mpx.c: Regenerate.
10687 * features/i386/32bit-pkeys.c: Regenerate.
10688 * features/i386/32bit-sse.c: Regenerate.
10689 * features/i386/64bit-avx.c: Regenerate.
10690 * features/i386/64bit-avx512.c: Regenerate.
10691 * features/i386/64bit-core.c: Regenerate.
10692 * features/i386/64bit-linux.c: Regenerate.
10693 * features/i386/64bit-mpx.c: Regenerate.
10694 * features/i386/64bit-pkeys.c: Regenerate.
10695 * features/i386/64bit-segments.c: Regenerate.
10696 * features/i386/64bit-sse.c: Regenerate.
10697 * features/i386/x32-core.c: Regenerate.
10698 * features/tic6x-c6xp.c: Regenerate.
10699 * features/tic6x-core.c: Regenerate.
10700 * features/tic6x-gp.c: Regenerate.
10701 * target-descriptions.c: Use common/tdesc.h.
10702 * target-descriptions.h: Likewise.
10703
10704 2018-02-24 Tom Tromey <tom@tromey.com>
10705
10706 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10707 (try_thread_db_load_from_dir, thread_db_load_search): Use
10708 std::string.
10709 (info_auto_load_libthread_db_compare): Return bool. Change
10710 argument types.
10711 (info_auto_load_libthread_db): Use std::vector, std::string.
10712 Remove cleanups.
10713
10714 2018-02-24 Tom Tromey <tom@tromey.com>
10715
10716 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10717 std::string.
10718 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10719 std::string*.
10720 * gdbarch.c: Rebuild.
10721 * gdbarch.h: Rebuild.
10722 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10723 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10724 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10725 std::string*.
10726
10727 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10728
10729 * gdbtypes.h (sect_offset): Change type to uint64_t.
10730 (sect_offset_str): New function.
10731 * dwarf2read.c (create_addrmap_from_aranges): Use
10732 sect_offset_str.
10733 (error_check_comp_unit_head): Likewise.
10734 (create_debug_type_hash_table): Likewise.
10735 (read_cutu_die_from_dwo): Likewise.
10736 (init_cutu_and_read_dies): Likewise.
10737 (init_cutu_and_read_dies_no_follow): Likewise.
10738 (process_psymtab_comp_unit_reader): Likewise.
10739 (partial_die_parent_scope): Likewise.
10740 (peek_die_abbrev): Likewise.
10741 (process_queue): Likewise.
10742 (dwarf2_physname): Likewise.
10743 (read_namespace_alias): Likewise.
10744 (read_import_statement): Likewise.
10745 (create_dwo_cu_reader): Likewise.
10746 (create_cus_hash_table): Likewise.
10747 (lookup_dwo_cutu): Likewise.
10748 (inherit_abstract_dies): Likewise.
10749 (read_func_scope): Likewise.
10750 (read_call_site_scope): Likewise.
10751 (dwarf2_add_member_fn): Likewise.
10752 (read_common_block): Likewise.
10753 (read_module_type): Likewise.
10754 (read_typedef): Likewise.
10755 (read_subrange_type): Likewise.
10756 (load_partial_dies): Likewise.
10757 (read_partial_die): Likewise.
10758 (find_partial_die): Likewise.
10759 (read_str_index): Likewise.
10760 (dwarf2_string_attr): Likewise.
10761 (build_error_marker_type): Likewise.
10762 (lookup_die_type): Likewise.
10763 (dump_die_shallow): Likewise.
10764 (follow_die_ref): Likewise.
10765 (dwarf2_fetch_die_loc_sect_off): Likewise.
10766 (dwarf2_fetch_constant_bytes): Likewise.
10767 (follow_die_sig): Likewise.
10768 (get_signatured_type): Likewise.
10769 (get_DW_AT_signature_type): Likewise.
10770 (dwarf2_find_containing_comp_unit): Likewise.
10771 (set_die_type): Likewise.
10772
10773 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10774
10775 * arch/aarch64.c: Include "common-defs.h".
10776 * arch/amd64.c: Likewise.
10777 * arch/i386.c: Likewise.
10778
10779 2018-02-21 Tom Tromey <tom@tromey.com>
10780
10781 * value.h: (extract_field_op): Update.
10782 * eval.c (extract_field_op): Return a const char *.
10783 * expression.h (parse_expression_for_completion): Update.
10784 * completer.c (complete_expression): Update.
10785 (add_struct_fields): Make fieldname const.
10786 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10787 (mark_completion_tag, parse_exp_in_context_1): Update.
10788 (parse_expression_for_completion): Change "name" to
10789 unique_xmalloc_ptr*.
10790
10791 2018-02-21 Tom Tromey <tom@tromey.com>
10792
10793 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10794
10795 2018-02-21 Yao Qi <yao.qi@linaro.org>
10796
10797 * avr-tdep.c (avr_read_pc): Change parameter type to
10798 readable_regcache.
10799 * gdbarch.sh (read_pc): Likewise.
10800 * gdbarch.c: Re-generated.
10801 * gdbarch.h: Re-generated.
10802 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10803 readable_regcache.
10804 * ia64-tdep.c (ia64_read_pc): Likewise.
10805 * mips-tdep.c (mips_read_pc): Likewise.
10806 * spu-tdep.c (spu_read_pc): Likewise.
10807
10808 2018-02-21 Yao Qi <yao.qi@linaro.org>
10809
10810 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10811 * regcache-dump.c: New file.
10812 * regcache.c: Move register_dump to regcache-dump.c.
10813 (maintenance_print_registers): Likewise.
10814 (maintenance_print_raw_registers): Likewise.
10815 (maintenance_print_cooked_registers): Likewise.
10816 (maintenance_print_register_groups): Likewise.
10817 (maintenance_print_remote_registers): Likewise.
10818 (_initialize_regcache): Likewise.
10819 * regcache.h (register_dump): Moved from regcache.c.
10820
10821 2018-02-21 Yao Qi <yao.qi@linaro.org>
10822
10823 * regcache.c (regcache::regcache): Update.
10824 (regcache::invalidate): Move it to detached_regcache::invalidate.
10825 (get_thread_arch_aspace_regcache): Update.
10826 (regcache::raw_update): Update.
10827 (regcache::cooked_read): Remove some code.
10828 (regcache::cooked_read_value): Likewise.
10829 (regcache::raw_write): Remove assert on m_readonly_p.
10830 (regcache::raw_supply_integer): Move it to
10831 detached_regcache::raw_supply_integer.
10832 (regcache::raw_supply_zeroed): Likewise.
10833 * regcache.h (detached_regcache) <raw_supply_integer>: New
10834 declaration.
10835 <raw_supply_zeroed, invalidate>: Likewise.
10836 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10837 <invalidate>: Likewise.
10838 <m_readonly_p>: Removed.
10839
10840 2018-02-21 Yao Qi <yao.qi@linaro.org>
10841
10842 * infcmd.c (get_return_value): Let stop_regs point to
10843 get_current_regcache.
10844 * regcache.c (regcache::regcache): Remove.
10845 (register_dump_reg_buffer): New class.
10846 (regcache_print): Adjust.
10847 * regcache.h (regcache): Remove constructors.
10848
10849 2018-02-21 Yao Qi <yao.qi@linaro.org>
10850
10851 * regcache.c (class register_dump): New class.
10852 (register_dump_regcache, register_dump_none): New class.
10853 (register_dump_remote, register_dump_groups): New class.
10854 (regcache_print): Update.
10855 * regcache.h (regcache_dump_what): Move it to regcache.c.
10856 (regcache) <dump>: Remove.
10857
10858 2018-02-21 Yao Qi <yao.qi@linaro.org>
10859
10860 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10861 reg_buffer_rw *.
10862 (jit_unwind_reg_set_impl): Call raw_supply.
10863 (jit_frame_sniffer): Use reg_buffer_rw.
10864 * record-full.c (record_full_core_regbuf): Change its type.
10865 (record_full_core_open_1): Use reg_buffer_rw.
10866 (record_full_close): Likewise.
10867 (record_full_core_fetch_registers): Use regcache->raw_supply.
10868 (record_full_core_store_registers): Likewise.
10869 * regcache.c (regcache::get_register_status): Move it to
10870 reg_buffer.
10871 (regcache_raw_set_cached_value): Remove.
10872 (regcache::raw_set_cached_value): Remove.
10873 (regcache::raw_write): Call raw_supply.
10874 (regcache::raw_supply): Move it to reg_buffer_rw.
10875 * regcache.h (regcache_raw_set_cached_value): Remove.
10876 (reg_buffer_rw): New class.
10877
10878 2018-02-21 Yao Qi <yao.qi@linaro.org>
10879
10880 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10881 readonly_detached_regcache.
10882 (dummy_frame_prev_register): Use regcache->cooked_read.
10883 * frame.c (frame_save_as_regcache): Change return type.
10884 (frame_pop): Update.
10885 * frame.h (frame_save_as_regcache): Update declaration.
10886 * inferior.h (get_infcall_suspend_state_regcache): Update
10887 declaration.
10888 * infrun.c (infcall_suspend_state) <registers>: use
10889 readonly_detached_regcache.
10890 (save_infcall_suspend_state): Don't use regcache_dup.
10891 (get_infcall_suspend_state_regcache): Change return type.
10892 * linux-fork.c (struct fork_info) <savedregs>: Change to
10893 readonly_detached_regcache.
10894 <pc>: New field.
10895 (fork_save_infrun_state): Don't use regcache_dup.
10896 (info_checkpoints_command): Adjust.
10897 * mi/mi-main.c (register_changed_p): Update declaration.
10898 (mi_cmd_data_list_changed_registers): Use
10899 readonly_detached_regcache.
10900 (register_changed_p): Change parameter type to
10901 readonly_detached_regcache.
10902 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10903 readonly_detached_regcache.
10904 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10905 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10906 New.
10907 (regcache::save): Move it to reg_buffer.
10908 (regcache::restore): Change parameter type.
10909 (regcache_dup): Remove.
10910 * regcache.h (reg_buffer) <save>: New method.
10911 (readonly_detached_regcache): New class.
10912 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10913 readonly_detached_regcache.
10914 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10915
10916 2018-02-21 Yao Qi <yao.qi@linaro.org>
10917
10918 * frame.c (frame_save_as_regcache): Use regcache method save.
10919 (frame_pop): Use regcache method restore.
10920 * infrun.c (restore_infcall_suspend_state): Likewise.
10921 * linux-fork.c (fork_load_infrun_state): Likewise.
10922 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10923 save.
10924 * regcache.c (regcache_save): Remove.
10925 (regcache::restore): More asserts.
10926 (regcache_cpy): Remove.
10927 * regcache.h (regcache_save): Remove the declaration.
10928 (regcache::restore): Move from private to public.
10929 Remove the friend declaration of regcache_cpy.
10930 (regcache_cpy): Remove declaration.
10931
10932 2018-02-21 Yao Qi <yao.qi@linaro.org>
10933
10934 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10935 parameter type to 'readable_regcache *'.
10936 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10937 * arm-tdep.c (arm_neon_quad_read): Likewise.
10938 (arm_pseudo_read): Likewise.
10939 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10940 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10941 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10942 * gdbarch.c: Re-generated.
10943 * gdbarch.h: Re-generated.
10944 * gdbarch.sh (pseudo_register_read): Change parameter type to
10945 'readable_regcache *'.
10946 (pseudo_register_read_value): Likewise.
10947 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10948 (h8300_pseudo_register_read): Likewise.
10949 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10950 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10951 (i386_pseudo_register_read_into_value): Likewise.
10952 (i386_pseudo_register_read_value): Likewise.
10953 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10954 declaration.
10955 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10956 * m32c-tdep.c (m32c_raw_read): Likewise.
10957 (m32c_read_flg): Likewise.
10958 (m32c_banked_register): Likewise.
10959 (m32c_banked_read): Likewise.
10960 (m32c_sb_read): Likewise.
10961 (m32c_part_read): Likewise.
10962 (m32c_cat_read): Likewise.
10963 (m32c_r3r2r1r0_read): Likewise.
10964 (m32c_pseudo_register_read): Likewise.
10965 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10966 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10967 (mep_pseudo_cr64_read): Likewise.
10968 (mep_pseudo_register_read): Likewise.
10969 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10970 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10971 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10972 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10973 (regcache::cooked_read): Likewise.
10974 (regcache::cooked_read_value): Likewise.
10975 (regcache_cooked_read_signed):
10976 (regcache::cooked_read): Likewise.
10977 * regcache.h (readable_regcache): New class.
10978 (regcache): Inherit readable_regcache. Move some methods to
10979 readable_regcache.
10980 * rl78-tdep.c (rl78_pseudo_register_read): Change
10981 parameter type to 'readable_regcache *'.
10982 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10983 (e500_pseudo_register_read): Change parameter type to
10984 'readable_regcache *'.
10985 (dfp_pseudo_register_read): Likewise.
10986 (vsx_pseudo_register_read): Likewise.
10987 (efpr_pseudo_register_read): Likewise.
10988 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10989 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10990 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10991 (sh64_pseudo_register_read): Likewise.
10992 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10993 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10994 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10995 (spu_pseudo_register_read): Likewise.
10996 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10997 (xtensa_pseudo_register_read): Likewise.
10998
10999 2018-02-21 Yao Qi <yao.qi@linaro.org>
11000
11001 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11002 (regcache::arch): Move it to reg_buffer::arch.
11003 (regcache::register_buffer): Likewise.
11004 (regcache::assert_regnum): Likewise.
11005 (regcache::num_raw_registers): Likewise.
11006 * regcache.h (reg_buffer): New class.
11007 (regcache): Inherit reg_buffer.
11008
11009 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11010
11011 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11012 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11013
11014 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11015
11016 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11017
11018 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11019
11020 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11021 (SFILES): Remove common/*.c files.
11022 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11023 * common/common.host: Add common reference.
11024 * configure.ac: Likewise.
11025 * configure: Regenerate.
11026
11027 2018-02-16 Yao Qi <yao.qi@linaro.org>
11028
11029 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11030 (block_initialize_namespace): Use new.
11031 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11032 (dwarf2_free_objfile): Use delete.
11033 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11034 (copy_type_recursive): Use new.
11035 * gdb_obstack.h (allocate_on_obstack): New.
11036
11037 2018-02-15 Yao Qi <yao.qi@linaro.org>
11038
11039 PR gdb/22849
11040 * inferior.c (exit_inferior_1): Reset inf->control.
11041
11042 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11043
11044 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11045 declaration.
11046
11047 2018-02-14 Pedro Alves <palves@redhat.com>
11048
11049 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11050 frame_cleanup_after_sniffer on exception.
11051
11052 2018-02-14 Tom Tromey <tom@tromey.com>
11053
11054 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11055 const.
11056 (solib_bfd_open): Make pathname const.
11057 * solib.c (solib_bfd_open): Make pathname const.
11058 * solib-spu.c (spu_bfd_fopen): Make name const.
11059 (spu_bfd_open): Make pathname const.
11060 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11061 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11062
11063 2018-02-14 Tom Tromey <tom@tromey.com>
11064
11065 * symfile.c (symfile_bfd_open): Update.
11066 * source.h (openp, source_full_path_of, find_and_open_source):
11067 Change argument type to unique_xmalloc_ptr.
11068 * source.c (openp): Take a unique_xmalloc_ptr.
11069 (source_full_path_of, find_and_open_source): Likewise.
11070 (open_source_file, symtab_to_fullname): Update.
11071 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11072 unique_xmalloc_ptr.
11073 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11074 (exec_file_find): Update.
11075 * psymtab.c (psymtab_to_fullname): Update.
11076 * nto-tdep.h (nto_find_and_open_solib): Update.
11077 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11078 unique_xmalloc_ptr.
11079 * exec.c (exec_file_attach): Update.
11080 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11081 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11082
11083 2018-02-14 Tom Tromey <tom@tromey.com>
11084
11085 * solib.c: Include source.h.
11086 * nto-tdep.c: Include source.h.
11087 * mi/mi-cmd-env.c: Include source.h.
11088 * infcmd.c: Include source.h.
11089 * exec.c: Include source.h.
11090 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11091 (add_path, directory_switch, source_path, init_source_path): Move
11092 declarations...
11093 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11094 (add_path, directory_switch, source_path, init_source_path):
11095 ...here.
11096
11097 2018-02-14 Tom Tromey <tom@tromey.com>
11098
11099 * solist.h (exec_file_find, solib_find): Return
11100 unique_xmalloc_ptr.
11101 (solib_bfd_fopen): Take a const char *.
11102 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11103 (exec_file_find, solib_find): Likewise.
11104 (solib_bfd_fopen): Do not take ownership of "pathname".
11105 (solib_bfd_open): Use unique_xmalloc_ptr.
11106 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11107 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11108 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11109 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11110
11111 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11112
11113 * ada-lang.c (name_match_type_from_name): Remove reference to
11114 ada_name_for_lookup in function's documentation.
11115 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11116
11117 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11118
11119 * defs.h (enum openp_flags): New enum.
11120 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11121 Move to enum openp_flags.
11122 (openp_flags): New enum flags.
11123 (openp): Change parameter type to openp_flags.
11124 * source.c (openp): Change parameter type to openp_flags.
11125 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11126 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11127
11128 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11129
11130 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11131 per-command.
11132
11133 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11134
11135 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11136 into...
11137 (class dwarf2_queue_guard): ...the destructor of this new class.
11138 (dw2_do_instantiate_symtab): Create instance of the new class
11139 dwarf2_queue_guard, remove cleanup.
11140
11141 2018-02-09 Tom Tromey <tom@tromey.com>
11142
11143 * source.c (find_source_lines): Don't reference past the end of
11144 the vector.
11145
11146 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11147
11148 * remote.c (remote_btrace_maybe_reopen): Change error message.
11149 * btrace.c (btrace_enable): Likewise.
11150 (parse_xml_btrace): Likewise.
11151 (parse_xml_btrace_conf): Likewise.
11152
11153 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11154
11155 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11156 (linux_enable_pt, linux_enable_bts): Call
11157 diagnose_perf_event_open_fail.
11158
11159 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11160
11161 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11162 Remove parameter and change return type. Update callers. Move it.
11163 (linux_enable_bts, linux_enable_pt): Improve error message.
11164 (linux_enable_pt): Remove zero buffer size check.
11165 (linux_enable_btrace): Improve error messages. Remove NULL return
11166 check.
11167
11168 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11169
11170 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11171 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11172 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11173 (linux_supports_pt, linux_supports_btrace): Remove.
11174 (linux_enable_bts): Call cpu_supports_bts.
11175 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11176 * remote.c (remote_supports_btrace): Remove.
11177 (init_remote_ops): Remove remote_supports_btrace.
11178 * target-delegates.c: Regenerated.
11179 * target.c (target_supports_btrace): Remove.
11180 * target.h (target_ops) <to_supports_btrace>: Remove
11181 (target_supports_btrace): Remove.
11182 * x86-linux-nat.c (x86_linux_create_target): Remove
11183 linux_supports_btrace.
11184
11185 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11186
11187 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11188 btrace failed.
11189 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11190 exception and use message in own exception.
11191
11192 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11193
11194 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11195 (perf_event_pt_event_type): Use gdb_file_up.
11196 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11197 scoped_fd, and scoped_mmap.
11198
11199 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11200
11201 * common/scoped_mmap.h: New.
11202 * unittests/scoped_mmap-selftest.c: New.
11203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11204 unittests/scoped_mmap-selftest.c.
11205
11206 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11207
11208 * common/scoped_fd.h: New.
11209 * unittests/scoped_fd-selftest.c: New.
11210 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11211 unittests/scoped_fd-selftest.c.
11212
11213 2018-02-09 Tom Tromey <tom@tromey.com>
11214
11215 * auto-load.c (auto_load_section_scripts): Use
11216 gdb::unique_xmalloc_ptr.
11217
11218 2018-02-09 Tom Tromey <tom@tromey.com>
11219
11220 * auto-load.c (execute_script_contents): Use std::string.
11221
11222 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11223
11224 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11225 Python function, rather than a new command.
11226
11227 2018-02-08 Tom Tromey <tom@tromey.com>
11228
11229 * solib.c (solib_find_1): Use std::string.
11230 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11231
11232 2018-02-08 Tom Tromey <tom@tromey.com>
11233
11234 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11235
11236 2018-02-08 Tom Tromey <tom@tromey.com>
11237
11238 * source.c (find_source_lines): Use gdb::def_vector.
11239
11240 2018-02-08 Tom Tromey <tom@tromey.com>
11241
11242 * macrocmd.c (struct temporary_macro_definition): New.
11243 (macro_define_command): Use temporary_macro_definition. Remove
11244 cleanups.
11245 (free_macro_definition_ptr): Remove.
11246
11247 2018-02-08 Tom Tromey <tom@tromey.com>
11248
11249 * macroexp.c (maybe_expand): Use std::string.
11250
11251 2018-02-08 Tom Tromey <tom@tromey.com>
11252
11253 * macroexp.c (struct macro_buffer): Add initializers for some
11254 members.
11255 (init_buffer, init_shared_buffer, free_buffer)
11256 (free_buffer_return_text): Remove.
11257 (macro_buffer): New constructors.
11258 (~macro_buffer): New destructor.
11259 (macro_buffer::set_shared): New method.
11260 (macro_buffer::resize_buffer, macro_buffer::appendc)
11261 (macro_buffer::appendmem): Now methods, not free functions.
11262 (set_token, append_tokens_without_splicing, stringify)
11263 (macro_stringify): Update.
11264 (gather_arguments): Change return type. Remove argc_p argument,
11265 add args_ptr argument. Use std::vector.
11266 (substitute_args): Remove argc argument. Accept std::vector.
11267 (expand): Update. Use std::vector.
11268 (scan, macro_expand, macro_expand_next): Update.
11269
11270 2018-02-08 Tom Tromey <tom@tromey.com>
11271
11272 * symtab.c (default_collect_symbol_completion_matches_break_on):
11273 Use unique_xmalloc_ptr.
11274 * macroscope.h: (sal_macro_scope, user_macro_scope)
11275 (default_macro_scope): Return unique_xmalloc_ptr.
11276 * macroscope.c (sal_macro_scope, user_macro_scope)
11277 (default_macro_scope): Return unique_xmalloc_ptr.
11278 * macroexp.h (macro_expand, macro_expand_once): Return
11279 unique_xmalloc_ptr.
11280 * macroexp.c (macro_expand, macro_expand_once): Return
11281 unique_xmalloc_ptr.
11282 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11283 (info_macro_command, info_macros_command): Use
11284 unique_xmalloc_ptr.
11285 * compile/compile-c-support.c (write_macro_definitions): Use
11286 unique_xmalloc_ptr.
11287 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11288
11289 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11290
11291 * value.c (value_static_field): Assign field type instead of
11292 containing type when returning an optimized out value.
11293
11294 2018-02-06 Yao Qi <yao.qi@linaro.org>
11295
11296 * ft32-tdep.c (ft32_read_pc): Remove.
11297 (ft32_write_pc): Remove.
11298 (ft32_gdbarch_init): Update.
11299 * m32r-tdep.c (m32r_read_pc): Remove.
11300 (m32r_gdbarch_init): Update.
11301 * mep-tdep.c (mep_read_pc): Remove.
11302 (mep_gdbarch_init): Update.
11303 * microblaze-tdep.c (microblaze_write_pc): Remove.
11304 (microblaze_gdbarch_init): Update.
11305 * mn10300-tdep.c (mn10300_read_pc): Remove.
11306 (mn10300_write_pc): Remove.
11307 (mn10300_gdbarch_init): Update.
11308 * moxie-tdep.c (moxie_read_pc): Remove.
11309 (moxie_write_pc): Remove.
11310 (moxie_gdbarch_init): Update.
11311
11312 2018-02-06 Yao Qi <yao.qi@linaro.org>
11313
11314 * expprint.c (print_subexp_standard): Handle
11315 OP_F77_UNDETERMINED_ARGLIST.
11316 (dump_subexp_body_standard): Likewise.
11317
11318 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11319
11320 * target-descriptions.c (tdesc_element_visitor) Add empty
11321 implementations.
11322 (tdesc_type): Move make_gdb_type from here.
11323 (tdesc_type_builtin): Likewise.
11324 (tdesc_type_vector): Likewise.
11325 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11326 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11327 (make_gdb_type_union): Likewise.
11328 (make_gdb_type_flags): Likewise.
11329 (make_gdb_type_enum): Likewise.
11330 (make_gdb_type): New function.
11331 (tdesc_register_type): Use static make_gdb_type.
11332
11333 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11334
11335 * infcmd.c (default_print_one_register_info): Align natural-format
11336 column values consistently one under another.
11337 (pad_to_column): New function.
11338
11339 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11340
11341 * dwarf2read.c (dwarf2_physname): Move commment.
11342
11343 2018-02-01 Leszek Swirski <leszeks@google.com>
11344
11345 * varobj.c (varobj_formatted_print_options): Allow recursive
11346 pretty printing if pretty printing is enabled.
11347
11348 2018-02-01 Leszek Swirski <leszeks@google.com>
11349
11350 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11351 names after a structop as a filename.
11352
11353 2018-02-01 Yao Qi <yao.qi@linaro.org>
11354
11355 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11356 (arm_record_coproc_data_proc): Likewise.
11357
11358 2018-02-01 Yao Qi <yao.qi@linaro.org>
11359
11360 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11361
11362 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11363
11364 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11365 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11366
11367 2018-01-31 Pedro Alves <palves@redhat.com>
11368
11369 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11370 * inflow.c (child_terminal_save_inferior): Wrap reference to
11371 tcgetpgrp in HAVE_TERMIOS_H.
11372 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11373 _WIN32.
11374 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11375 always iterate over all inferiors.
11376 (gdbsim_cntrl_c): Adjust.
11377 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11378
11379 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11380
11381 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11382 index type is objfile-owned if the element type is as well.
11383
11384 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11385
11386 GDB 8.1 released.
11387
11388 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11389
11390 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11391 "features/s390x-linux64.c".
11392 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11393 s390_linux32 and s390x_linux64.
11394 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11395 default tdesc.
11396 * s390-tdep.c: Include "features/s390-linux32.c" and
11397 "features/s390x-linux64.c".
11398 (s390_tdesc_valid): Add check for tdesc_has_registers.
11399 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11400 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11401 tdesc_s390x_linux64.
11402 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11403 tdesc_s390x_linux64 to...
11404 * s390-tdep.h: ...here.
11405
11406 2018-01-30 Pedro Alves <palves@redhat.com>
11407
11408 PR gdb/13211
11409 * config.in, configure: Regenerate.
11410 * configure.ac: Check for getpgid.
11411 * go32-nat.c (go32_pass_ctrlc): New.
11412 (go32_target): Install it.
11413 * inf-child.c (inf_child_target): Install
11414 child_terminal_save_inferior, child_pass_ctrlc and
11415 child_interrupt.
11416 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11417 (inf_ptrace_target): No longer install it.
11418 * infcmd.c (interrupt_target_1): Adjust.
11419 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11420 (child_interrupt): Declare.
11421 (inferior::terminal_state): New.
11422 * inflow.c (struct terminal_info): Update comments.
11423 (inferior_process_group): Delete.
11424 (terminal_is_ours): Delete.
11425 (gdb_tty_state): New.
11426 (child_terminal_init): Adjust.
11427 (is_gdb_terminal, sharing_input_terminal_1)
11428 (sharing_input_terminal): New functions.
11429 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11430 Set the process's actual process group in the foreground if
11431 possible. Handle is_ours_for_output/is_ours distinction. Don't
11432 mark terminal as the inferior's if not sharing GDB's terminal.
11433 Don't check attach_flag.
11434 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11435 pass down a target_terminal_state.
11436 (child_terminal_save_inferior): New, factored out from ...
11437 (child_terminal_ours_1): ... this. Handle
11438 target_terminal_state::is_ours_for_output.
11439 (child_interrupt, child_pass_ctrlc): New.
11440 (inflow_inferior_exit): Clear the inferior's terminal_state.
11441 (copy_terminal_info): Copy the inferior's terminal state.
11442 (_initialize_inflow): Remove reference to terminal_is_ours.
11443 * inflow.h (inferior_process_group): Delete.
11444 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11445 * procfs.c (procfs_target): Don't install procfs_interrupt.
11446 (procfs_interrupt): Delete.
11447 * remote.c (remote_serial_quit_handler): Adjust.
11448 (remote_interrupt): Remove ptid parameter. Adjust.
11449 * target-delegates.c: Regenerate.
11450 * target.c: Include "terminal.h".
11451 (target_terminal::terminal_state): Rename to ...
11452 (target_terminal::m_terminal_state): ... this.
11453 (target_terminal::init): Adjust.
11454 (target_terminal::inferior): Adjust to per-inferior
11455 terminal_state.
11456 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11457 (target_terminal::ours, target_terminal::ours_for_output): Use
11458 target_terminal_is_ours_kind.
11459 (target_interrupt): Remove ptid parameter. Adjust.
11460 (default_target_pass_ctrlc): Adjust.
11461 * target.h (target_ops::to_terminal_save_inferior): New field.
11462 (target_ops::to_interrupt): Remove ptid_t parameter.
11463 (target_interrupt): Remove ptid_t parameter. Update comment.
11464 (target_pass_ctrlc): Update comment.
11465 * target/target.h (target_terminal_state): New scoped enum,
11466 factored out of ...
11467 (target_terminal::terminal_state): ... here.
11468 (target_terminal::inferior): Update comments.
11469 (target_terminal::restore_inferior): New.
11470 (target_terminal::is_inferior, target_terminal::is_ours)
11471 (target_terminal::is_ours_for_output): Adjust.
11472 (target_terminal::scoped_restore_terminal_state): Adjust to
11473 rename, and call restore_inferior() instead of inferior().
11474 (target_terminal::scoped_restore_terminal_state::m_state): Change
11475 type.
11476 (target_terminal::terminal_state): Rename to ...
11477 (target_terminal::m_terminal_state): ... this and change type.
11478
11479 2018-01-30 Pedro Alves <palves@redhat.com>
11480
11481 * linux-nat.c (wait_for_signal): New function.
11482 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11483 directly.
11484 (async_terminal_is_ours)
11485 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11486 (linux_nat_add_target): Don't override
11487 to_terminal_inferior/to_terminal_ours.
11488
11489 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11490
11491 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11492
11493 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11494
11495 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11496 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11497 dwarf2_per_objfile_free here.
11498 (dwarf2_per_objfile_free): Remove.
11499 (_initialize_dwarf2_read): Don't register
11500 dwarf2_per_objfile_free as a registry cleanup.
11501
11502 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11503
11504 Avoid compilation errors in MinGW native builds
11505
11506 The error is triggered by including python-internal.h, and the
11507 error message is:
11508
11509 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11510 from build-gnulib/import/math.h:27,
11511 from d:/usr/Python26/include/pyport.h:235,
11512 from d:/usr/Python26/include/Python.h:58,
11513 from python/python-internal.h:94,
11514 from python/py-arch.c:24:
11515 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11516 using ::hypot;
11517 ^~~~~
11518
11519 This happens because Python headers define 'hypot' to expand t
11520 '_hypot' in the Windows builds.
11521 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11522 'hypoth'. This avoids a compilation error.
11523
11524 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11525
11526 * MAINTAINERS (Write After Approval): Fix ordering.
11527
11528 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11529
11530 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11531
11532 2018-01-26 Alan Modra <amodra@gmail.com>
11533
11534 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11535 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11536 Remove nop. Make const. Comment.
11537 (powerpc32_plt_stub_so_2): New.
11538 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11539 Correct count. Update uses.
11540 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11541 Move common code reading PLT entry word. Correct
11542 powerpc32_plt_stub PLT address calculation.
11543 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11544 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11545 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11546 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11547 (ppc64_standard_linkage8): Likewise.
11548 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11549 Correct insns description.
11550 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11551
11552 2018-01-24 Pedro Alves <palves@redhat.com>
11553
11554 GCC PR libstdc++/83906
11555 * gdbtypes.c (operator==(const dynamic_prop &,
11556 const dynamic_prop &)): New.
11557 (operator==(const range_bounds &, const range_bounds &)): New.
11558 (check_types_equal): Use them instead of memcmp.
11559 * gdbtypes.h (operator==(const dynamic_prop &,
11560 const dynamic_prop &)): Declare.
11561 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11562 (operator==(const range_bounds &, const range_bounds &)): Declare.
11563 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11564
11565 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11566
11567 * s390-linux-tdep.c (s390_record_address_mask)
11568 (s390_record_calc_disp_common, s390_record_calc_disp)
11569 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11570 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11571 (s390_process_record): Move to s390-tdep.c.
11572 (s390_linux_init_abi_any): Adjust.
11573 * s390-tdep.c (s390_record_address_mask)
11574 (s390_record_calc_disp_common, s390_record_calc_disp)
11575 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11576 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11577 (s390_process_record): Moved from s390-linux-tdep.c
11578 (s390_gdbarch_init): Adjust.
11579
11580 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11581
11582 * s390-linux-nat.c (s390-tdep.h): New include.
11583 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11584 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11585 (ALLDEPFILES): Add s390-tdep.c.
11586 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11587 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11588 * s390-tdep.h: ...this. New file.
11589 * s390-linux-tdep.c (s390-tdep.h): New include.
11590 (_initialize_s390_tdep): Rename to...
11591 (_initialize_s390_linux_tdep): ...this and adjust.
11592 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11593 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11594 s390-tdep.h.
11595 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11596 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11597 (s390_is_partial_instruction, s390_software_single_step)
11598 (is_non_branch_ril, s390_displaced_step_copy_insn)
11599 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11600 (s390_prologue_data, s390_addr, s390_store, s390_load)
11601 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11602 (s390_register_call_saved, s390_guess_tracepoint_registers)
11603 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11604 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11605 (s390_pseudo_register_name, s390_pseudo_register_type)
11606 (s390_pseudo_register_read, s390_pseudo_register_write)
11607 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11608 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11609 (s390_addr_bits_remove, s390_address_class_type_flags)
11610 (s390_address_class_type_flags_to_name)
11611 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11612 (s390_function_arg_float, s390_function_arg_vector)
11613 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11614 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11615 (s390_frame_align, s390_register_return_value, s390_return_value)
11616 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11617 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11618 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11619 (s390_trad_frame_prev_register, s390_unwind_cache)
11620 (s390_prologue_frame_unwind_cache)
11621 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11622 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11623 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11624 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11625 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11626 (s390_frame_base_address, s390_local_base_address)
11627 (s390_frame_base, s390_gcc_target_options)
11628 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11629 (s390_validate_reg_range, s390_tdesc_valid)
11630 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11631 * s390-tdep.c: ...this. New file.
11632
11633 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11634
11635 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11636 (s390_process_record, s390_gdbarch_tdep_alloc)
11637 (s390_linux_init_abi_any): Use/set new hook.
11638
11639 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11640
11641 * s390-linux-tdep.c (osabi.h): New include.
11642 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11643 (s390_linux_init_abi_any): New functions.
11644 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11645
11646 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11647
11648 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11649 tdesc_has_registers check
11650
11651 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11652
11653 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11654 (s390_validate_reg_range): New macro.
11655 (s390_gdbarch_init): Adjust.
11656
11657 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11658
11659 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11660 (s390_gdbarch_tdep_alloc): Adjust.
11661 (s390_gdbarch_init): Adjust.
11662
11663 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11664
11665 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11666 <have_tdb>: Change type to bool.
11667 (s390_gdbarch_tdep_alloc): Adjust.
11668 (s390_gdbarch_init): Adjust.
11669
11670 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11671
11672 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11673 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11674 (s390_gdbarch_tdep_alloc): New function.
11675 (s390_gdbarch_init): Allocate tdep at start and use its fields
11676 instead of separate variables.
11677
11678 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11679
11680 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11681 when looking for cached gdbarch and add comment for remaining.
11682
11683 2018-01-22 Pedro Alves <palves@redhat.com>
11684 Sergio Durigan Junior <sergiodj@redhat.com>
11685
11686 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11687 case.
11688
11689 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11690
11691 * MAINTAINERS: Update my company e-mail address.
11692
11693 2018-01-22 Yao Qi <yao.qi@linaro.org>
11694
11695 * regcache.c (cooked_write_test): New function.
11696 (_initialize_regcache): Register the test.
11697
11698 2018-01-22 Yao Qi <yao.qi@linaro.org>
11699
11700 * ia64-tdep.c (ia64_pseudo_register_read): Call
11701 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11702 * m32c-tdep.c (m32c_cat_read): Likewise.
11703 (m32c_r3r2r1r0_read): Likewise.
11704 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11705 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11706
11707 2018-01-22 Yao Qi <yao.qi@linaro.org>
11708
11709 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11710 method raw_read instead of regcache_raw_read.
11711 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11712 * arm-tdep.c (arm_neon_quad_read): Likewise.
11713 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11714 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11715 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11716 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11717 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11718 (i386_pseudo_register_read_into_value): Likewise.
11719 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11720 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11721 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11722 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11723 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11724 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11725 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11726 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11727 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11728
11729 2018-01-22 Yao Qi <yao.qi@linaro.org>
11730
11731 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11732 * configure.tgt: Remove target mt.
11733 * mt-tdep.c: Remove.
11734 * regcache.c (cooked_read_test): Remove the check for mt.
11735
11736 2018-01-22 Yao Qi <yao.qi@linaro.org>
11737
11738 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11739 instead of gdbarch_pseudo_register_read_value.
11740
11741 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11742
11743 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11744 language is Ada.
11745
11746 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11747
11748 * linespec.c (create_sals_line_offset): Remove code that preserved
11749 the symtab_and_line's line number.
11750
11751 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11752
11753 * varobj.c (varobj_create): Don't set valid_block when creating a
11754 floating varobj.
11755
11756 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11757
11758 * varobj.c (varobj_create): Remove out of date comment.
11759
11760 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11761
11762 PR mi/20395
11763 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11764 updating innermost block.
11765 * parse.c (innermost_block_tracker::update): Take extra type
11766 parameter, and check types match before updating innermost block.
11767 (write_dollar_variable): Update innermost block for registers.
11768 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11769 (innermost_block_tracker::innermost_block_tracker): Initialise
11770 m_types member.
11771 (innermost_block_tracker::reset): Take type parameter.
11772 (innermost_block_tracker::update): Take type parameter, and pass
11773 type through as needed.
11774 (innermost_block_tracker::m_types): New member.
11775 * varobj.c (varobj_create): Pass type when reseting innermost
11776 block.
11777
11778 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11779
11780 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11781 * ada-lang.c (resolve_subexp): Likewise.
11782 * breakpoint.c (set_breakpoint_condition) Likewise.
11783 (watch_command_1) Likewise.
11784 * c-exp.y (variable): Likewise.
11785 * d-exp.y (PrimaryExpression): Likewise.
11786 * f-exp.y (variable): Likewise.
11787 * go-exp.y (variable): Likewise.
11788 * m2-exp.y (variable): Likewise.
11789 * objfiles.c (objfile::~objfile): Likewise.
11790 * p-exp.y (variable): Likewise.
11791 * parse.c (innermost_block): Change type.
11792 * parser-defs.h (class innermost_block_tracker): New.
11793 (innermost_block): Change to innermost_block_tracker.
11794 * printcmd.c (display_command): Switch to innermost_block API.
11795 (do_one_display): Likewise.
11796 * rust-exp.y (do_one_display): Likewise.
11797 * symfile.c (clear_symtab_users): Likewise.
11798 * varobj.c (varobj_create): Switch to innermost_block API, replace
11799 use of innermost_block with block stored on varobj object.
11800
11801 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11802
11803 * expression.h (innermost_block): Remove declaration.
11804 * varobj.c: Add 'parser-defs.h' include.
11805
11806 2018-01-19 Tom Tromey <tom@tromey.com>
11807
11808 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11809 symbols in the static and global blocks.
11810
11811 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11812
11813 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11814 gdb_ptrace.h, and move including gdb_wait.h ...
11815 * nat/linux-ptrace.h: ... to here.
11816
11817 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11818
11819 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11820 inf_ptrace_detach_success.
11821 (inf_ptrace_detach_success): Add inferior parameter, use it
11822 instead of inferior_ptid, pass it to detach_inferior.
11823 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11824 parameter.
11825 * inferior.c (detach_inferior): Add overload that takes an
11826 inferior object.
11827 * inferior.h (detach_inferior): Likewise.
11828 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11829 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11830 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11831
11832 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11833
11834 * target.h (struct target_ops) <to_detach>: Add inferior
11835 parameter.
11836 (target_detach): Likewise.
11837 * target.c (dispose_inferior): Pass inferior down.
11838 (target_detach): Pass inferior down. Assert that it is equal to
11839 the current inferior.
11840 * aix-thread.c (aix_thread_detach): Pass inferior down.
11841 * corefile.c (core_file_command): Pass current_inferior() down.
11842 * corelow.c (core_detach): Add inferior parameter.
11843 * darwin-nat.c (darwin_detach): Likewise.
11844 * gnu-nat.c (gnu_detach): Likewise.
11845 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11846 * infcmd.c (detach_command): Pass current_inferior() down to
11847 target_detach.
11848 * infrun.c (follow_fork_inferior): Pass parent_inf to
11849 target_detach.
11850 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11851 target_detach.
11852 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11853 * linux-thread-db.c (thread_db_detach): Likewise.
11854 * nto-procfs.c (procfs_detach): Likewise.
11855 * procfs.c (procfs_detach): Likewise.
11856 * record.c (record_detach): Likewise.
11857 * record.h (struct inferior): Forward-declare.
11858 (record_detach): Add inferior parameter.
11859 * remote-sim.c (gdbsim_detach): Likewise.
11860 * remote.c (remote_detach_1): Likewise.
11861 (remote_detach): Likewise.
11862 (extended_remote_detach): Likewise.
11863 * sol-thread.c (sol_thread_detach): Likewise.
11864 * target-debug.h (target_debug_print_inferior_p): New macro.
11865 * target-delegates.c: Re-generate.
11866 * top.c (kill_or_detach): Pass inferior down to target_detach.
11867 * windows-nat.c (windows_detach): Add inferior parameter.
11868
11869 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11870
11871 * target.h (struct target_ops) <to_detach>: Remove args
11872 parameter.
11873 (target_detach): Likewise.
11874 * target.c (dispose_inferior): Adjust.
11875 (target_detach): Remove args parameter, adjust.
11876 * aix-thread.c (aix_thread_detach): Adjust.
11877 * corefile.c (core_file_command): Adjust.
11878 * corelow.c (core_detach): Adjust.
11879 * darwin-nat.c (darwin_detach): Adjust.
11880 * gnu-nat.c (gnu_detach): Adjust.
11881 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11882 * infcmd.c (detach_command): Adjust
11883 * infrun.c (follow_fork_inferior): Adjust.
11884 (handle_vfork_child_exec_or_exit): Adjust.
11885 * linux-fork.c (linux_fork_detach): Remove args parameter.
11886 * linux-fork.h (linux_fork_detach): Likewise.
11887 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11888 * linux-thread-db.c (thread_db_detach): Likewise.
11889 * nto-procfs.c (procfs_detach): Likewise.
11890 * procfs.c (procfs_detach): Likewise.
11891 (do_detach): Remove signo parameter.
11892 * record.c (record_detach): Remove args parameter.
11893 * record.h (record_detach): Likewise.
11894 * remote-sim.c (gdbsim_detach): Likewise.
11895 * remote.c (remote_detach_1): Likewise.
11896 (remote_detach): Likewise.
11897 (extended_remote_detach): Likewise.
11898 * sol-thread.c (sol_thread_detach): Likewise.
11899 * target-delegates.c: Re-generate.
11900 * top.c (struct qt_args) <args>: Remove field.
11901 (kill_or_detach): Don't pass args.
11902 (quit_force): Don't set args.
11903 * windows-nat.c (windows_detach): Remove args parameter.
11904
11905 2018-01-19 Yao Qi <yao.qi@linaro.org>
11906
11907 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11908 (arm_linux_init_abi): Install it.
11909
11910 2018-01-19 Yao Qi <yao.qi@linaro.org>
11911
11912 * osabi.c (gdb_osabi_names): Extend the regexp for
11913 arm-linux-gnueabihf.
11914
11915 2018-01-18 Yao Qi <yao.qi@linaro.org>
11916
11917 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11918 m_abbrevs.
11919 (abbrev_table::add_abbrev): Update.
11920 (abbrev_table::lookup_abbrev): Update.
11921
11922 2018-01-18 Yao Qi <yao.qi@linaro.org>
11923
11924 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11925
11926 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11927
11928 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11929 to "std::string".
11930
11931 2018-01-17 Tom Tromey <tom@tromey.com>
11932
11933 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11934
11935 2018-01-17 Tom Tromey <tom@tromey.com>
11936
11937 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11938 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11939 (create_array_type_with_stride): Update.
11940 * dwarf2read.c (set_die_type): Update.
11941
11942 2018-01-17 Tom Tromey <tom@tromey.com>
11943
11944 * dwarf2read.c (delayed_method_info): Remove typedef.
11945 (dwarf2_cu::method_info): Now a std::vector.
11946 (add_to_method_list): Update.
11947 (free_delayed_list): Remove.
11948 (compute_delayed_physnames): Update.
11949 (process_full_comp_unit, process_full_type_unit): Clear the method
11950 list. Remove cleanups.
11951 (psymtab_include_file_name): Add name_holder parameter. Use
11952 unique_xmalloc_ptr.
11953 (dwarf_decode_lines): Update.
11954
11955 2018-01-17 Tom Tromey <tom@tromey.com>
11956 Simon Marchi <simon.marchi@ericsson.com>
11957
11958 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11959 (dwarf2_per_objfile::free_cached_comp_units)
11960 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11961 (init_cutu_and_read_dies_no_follow): Update.
11962 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11963 (dwarf2_cu::~dwarf2_cu): New.
11964 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11965 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11966
11967 2018-01-17 Tom Tromey <tom@tromey.com>
11968 Simon Marchi <simon.marchi@ericsson.com>
11969
11970 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11971 (struct die_reader_specs) <abbrev_table>: New member.
11972 (struct abbrev_table): Add constructor.
11973 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11974 <abbrev_obstack>: Now an auto_obstack.
11975 (abbrev_table_up): New typedef.
11976 (init_cu_die_reader): Add abbrev_table parameter.
11977 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11978 Add result_dwo_abbrev_table.
11979 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11980 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11981 Update.
11982 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11983 parameter.
11984 (skip_children): Update.
11985 (abbrev_table::alloc_abbrev): Rename from
11986 abbrev_table_alloc_abbrev.
11987 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11988 (abbrev_table::lookup_abbrev): Rename from
11989 abbrev_table_lookup_abbrev.
11990 (abbrev_table_read_table): Return abbrev_table_up.
11991 (abbrev_table_free, abbrev_table_free_cleanup)
11992 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11993 (load_partial_dies): Update.
11994
11995 2018-01-17 Tom Tromey <tom@tromey.com>
11996
11997 * dwarf2read.c (dwarf2_compute_name): Update comment.
11998 (read_func_scope, read_variable): Update.
11999 (new_symbol): Remove.
12000 (new_symbol_full): Rename to new_symbol.
12001
12002 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12003
12004 PR gdb/16577
12005 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12006 a warning instead of throwing an error, set section size to 0 and return
12007 NULL.
12008 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12009
12010 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12011
12012 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12013 std::string.
12014 (linux_ptrace_attach_fail_reason_string): Likewise.
12015 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12016 Likewise.
12017 (linux_ptrace_attach_fail_reason_string): Likewise.
12018 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12019
12020 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12021
12022 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12023
12024 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12025
12026 PR gdb/21559
12027 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12028 checking for fs_base/gs_base fields in struct user_regs_struct.
12029 * configure: Regenerate.
12030
12031 2018-01-17 Yao Qi <yao.qi@linaro.org>
12032
12033 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12034 function.
12035 (aarch64_linux_init_abi): Install it to gdbarch hook
12036 gcc_target_options.
12037
12038 2018-01-15 Pedro Alves <palves@redhat.com>
12039
12040 * common/signals-state-save-restore.c
12041 (save_original_signals_state): Fix typos.
12042
12043 2017-01-12 Tom Tromey <tom@tromey.com>
12044 Sergio Durigan Junior <sergiodj@redhat.com>
12045
12046 * Makefile.in (install-only): Install gdb-add-index.
12047
12048 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12049
12050 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12051
12052 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12053
12054 * infrun.c (keep_going_pass_signal): Clear step-over info when
12055 insert_breakpoints fails.
12056
12057 2018-01-11 Pedro Alves <palves@redhat.com>
12058
12059 PR gdb/22583
12060 * infrun.c (resume): Rename to ...
12061 (resume_1): ... this.
12062 (resume): Reimplement as wrapper around resume_1.
12063
12064 2018-01-11 Pedro Alves <palves@redhat.com>
12065
12066 PR remote/22597
12067 * remote.c (remote_parse_stop_reply): Default to the last-set
12068 general thread instead of to 'magic_null_ptid'.
12069
12070 2018-01-10 Pedro Alves <palves@redhat.com>
12071
12072 * language.h (language_get_symbol_name_matcher): Rename ...
12073 (get_symbol_name_matcher): ... this.
12074 * language.c (language_get_symbol_name_matcher): Ditto.
12075 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12076 callers adjusted.
12077
12078 2018-01-10 Pedro Alves <palves@redhat.com>
12079
12080 PR gdb/22670
12081 * dwarf2read.c
12082 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12083 Adjust to use language_get_symbol_name_matcher instead of
12084 language_defn::la_get_symbol_name_matcher.
12085 * language.c (language_get_symbol_name_matcher): If in Ada mode
12086 and the lookup name is a verbatim match, return Ada's matcher.
12087 * language.h (language_get_symbol_name_matcher): Adjust comment.
12088 (ada_lookup_name_info::verbatim_p):: New method.
12089
12090 2018-01-10 Pedro Alves <palves@redhat.com>
12091
12092 PR gdb/22670
12093 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12094 minsym's language is language_auto or language_cplus, pass down
12095 language_ada instead.
12096 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12097
12098 2018-01-10 Pedro Alves <palves@redhat.com>
12099
12100 PR gdb/22670
12101 * minsyms.c (linkage_name_str): New function.
12102 (iterate_over_minimal_symbols): Use it.
12103
12104 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12105
12106 * NEWS: Document that 'info proc' now works on FreeBSD.
12107
12108 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12109
12110 * configure.ac: Check for kinfo_getfile in libutil.
12111 * configure: Regenerate.
12112 * config.in: Regenerate.
12113 * fbsd-nat.c: Include "fbsd-tdep.h".
12114 (fbsd_fetch_cmdline): New.
12115 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12116 rather than calling error.
12117 (fbsd_info_proc): New.
12118 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12119 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12120 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12121
12122 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12123
12124 * fbsd-nat.c (struct free_deleter): Remove.
12125 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12126
12127 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12128
12129 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12130 NULL for an empty pathname.
12131
12132 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12133
12134 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12135 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12136 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12137 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12138 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12139 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12140 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12141 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12142 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12143 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12144 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12145 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12146 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12147 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12148 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12149
12150 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12151
12152 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12153 (gnu_xfer_auxv): New function.
12154 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12155 TARGET_OBJECT_AUXV.
12156
12157 2018-01-08 Yao Qi <yao.qi@linaro.org>
12158 Simon Marchi <simon.marchi@ericsson.com>
12159
12160 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12161 common/selftest.c.
12162 (COMMON_OBS): Remove selftest.o.
12163 * configure.ac: Append selftest-arch.c and common/selftest.c to
12164 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12165 * configure: Re-generated.
12166 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12167 GDB_SELF_TEST.
12168 (maintenance_info_selftests): Likewise.
12169
12170 2018-01-08 Xavier Roirand <roirand@adacore.com>
12171
12172 * ada-valprint.c (val_print_packed_array_elements): Use
12173 proper number of elements when printing an array indexed
12174 by an enumeration type.
12175
12176 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12177
12178 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12179 (dw2_get_file_names_reader): Adjust.
12180 (lookup_dwo_signatured_type): Adjust.
12181 (lookup_dwp_signatured_type): Adjust.
12182 (lookup_signatured_type): Adjust.
12183 (create_type_unit_group): Adjust.
12184 (get_type_unit_group): Adjust.
12185 (process_psymtab_comp_unit_reader): Adjust.
12186 (build_type_psymtabs_reader): Adjust.
12187 (scan_partial_symbols): Adjust.
12188 (add_partial_symbol): Adjust.
12189 (add_partial_subprogram): Adjust.
12190 (peek_die_abbrev): Adjust.
12191 (fixup_go_packaging): Adjust.
12192 (process_imported_unit_die): Adjust.
12193 (dwarf2_compute_name): Adjust.
12194 (dwarf2_physname): Adjust.
12195 (read_import_statement): Adjust.
12196 (handle_DW_AT_stmt_list): Adjust.
12197 (read_file_scope): Adjust.
12198 (read_func_scope): Adjust.
12199 (read_lexical_block_scope): Adjust.
12200 (read_call_site_scope): Adjust.
12201 (read_variable): Adjust.
12202 (dwarf2_rnglists_process): Adjust.
12203 (dwarf2_ranges_process): Adjust.
12204 (dwarf2_ranges_read): Adjust.
12205 (dwarf2_get_pc_bounds): Adjust.
12206 (dwarf2_record_block_ranges): Adjust.
12207 (dwarf2_add_field): Adjust.
12208 (dwarf2_add_member_fn): Adjust.
12209 (read_structure_type): Adjust.
12210 (process_structure_scope): Adjust.
12211 (read_enumeration_type): Adjust.
12212 (read_array_type): Adjust.
12213 (mark_common_block_symbol_computed): Adjust.
12214 (read_common_block): Adjust.
12215 (read_namespace_type): Adjust.
12216 (read_namespace): Adjust.
12217 (read_module_type): Adjust.
12218 (read_tag_pointer_type): Adjust.
12219 (read_tag_ptr_to_member_type): Adjust.
12220 (read_tag_string_type): Adjust.
12221 (read_subroutine_type): Adjust.
12222 (read_typedef): Adjust.
12223 (read_base_type): Adjust.
12224 (attr_to_dynamic_prop): Adjust.
12225 (read_subrange_type): Adjust.
12226 (read_unspecified_type): Adjust.
12227 (dwarf2_read_abbrevs): Adjust.
12228 (load_partial_dies): Adjust.
12229 (read_partial_die): Adjust.
12230 (find_partial_die): Adjust.
12231 (guess_partial_die_structure_name): Adjust.
12232 (fixup_partial_die): Adjust.
12233 (read_attribute_value): Adjust.
12234 (read_addr_index): Adjust.
12235 (read_addr_index_from_leb128): Adjust.
12236 (read_str_index): Adjust.
12237 (dwarf2_string_attr): Adjust.
12238 (get_debug_line_section): Adjust.
12239 (dwarf_decode_line_header): Adjust.
12240 (lnp_state_machine::check_line_address): Adjust.
12241 (dwarf_decode_lines_1): Adjust.
12242 (dwarf_decode_lines): Adjust.
12243 (dwarf2_start_symtab): Adjust.
12244 (var_decode_location): Adjust.
12245 (new_symbol_full): Adjust.
12246 (dwarf2_const_value_data): Adjust.
12247 (dwarf2_const_value_attr): Adjust.
12248 (dwarf2_const_value): Adjust.
12249 (die_type): Adjust.
12250 (die_containing_type): Adjust.
12251 (build_error_marker_type): Adjust.
12252 (lookup_die_type): Adjust.
12253 (guess_full_die_structure_name): Adjust.
12254 (anonymous_struct_prefix): Adjust.
12255 (determine_prefix): Adjust.
12256 (dwarf2_name): Adjust.
12257 (follow_die_ref_or_sig): Adjust.
12258 (follow_die_offset): Adjust.
12259 (follow_die_ref): Adjust.
12260 (follow_die_sig_1): Adjust.
12261 (follow_die_sig): Adjust.
12262 (get_signatured_type): Adjust.
12263 (get_DW_AT_signature_type): Adjust.
12264 (decode_locdesc): Adjust.
12265 (dwarf_decode_macros): Adjust.
12266 (cu_debug_loc_section): Adjust.
12267 (fill_in_loclist_baton): Adjust.
12268 (dwarf2_symbol_mark_computed): Adjust.
12269 (init_one_comp_unit): Don't assign
12270 dwarf2_cu::dwarf2_per_objfile.
12271 (set_die_type): Adjust.
12272
12273 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12274
12275 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12276 <dwarf2_per_objfile>: New field.
12277 (dwarf2_per_objfile): Remove global.
12278 (get_dwarf2_per_objfile): New function.
12279 (set_dwarf2_per_objfile): New function.
12280 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12281 dwarf2_per_objfile.
12282 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12283 (read_abbrev_offset): Likewise.
12284 (read_indirect_string): Likewise.
12285 (read_indirect_line_string): Likewise.
12286 (read_indirect_string_at_offset): Likewise.
12287 (read_indirect_string_from_dwz): Likewise.
12288 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12289 dwarf2_per_objfile.
12290 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12291 (create_all_comp_units): Change objfile parameter to
12292 dwarf2_per_objfile.
12293 (create_all_type_units): Likewise.
12294 (process_queue): Add dwarf2_per_objfile parameter.
12295 (read_and_check_comp_unit_head): Likewise.
12296 (lookup_dwo_unit_in_dwp): Likewise.
12297 (get_dwp_file): Likewise.
12298 (process_cu_includes): Likewise.
12299 (struct free_dwo_file_cleanup_data): New struct.
12300 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12301 set_dwarf2_per_objfile.
12302 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12303 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12304 context, adjust calls.
12305 (dw2_instantiate_symtab): Likewise.
12306 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12307 (dw2_get_cu): Likewise.
12308 (create_cu_from_index_list): Change objfile parameter to
12309 dwarf2_per_objfile.
12310 (create_cus_from_index_list): Get dwarf2_per_objfile from
12311 context, adjust calls.
12312 (create_cus_from_index): Likewise.
12313 (create_signatured_type_table_from_index): Change objfile
12314 parameter to dwarf2_per_objfile.
12315 (create_signatured_type_table_from_debug_names): Change objfile
12316 parameter to dwarf2_per_objfile.
12317 (create_addrmap_from_index): Likewise.
12318 (create_addrmap_from_aranges): Likewise.
12319 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12320 (dw2_setup): Remove.
12321 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12322 context.
12323 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12324 get_dwarf2_per_objfile.
12325 (dw2_forget_cached_source_info): Likewise.
12326 (dw2_map_symtabs_matching_filename): Likewise.
12327 (struct dw2_symtab_iterator) <index>: Remove.
12328 <dwarf2_per_objfile>: New field.
12329 (dw2_symtab_iter_init): Replace index parameter with
12330 dwarf2_per_objfile.
12331 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12332 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12333 (dw2_print_stats): Likewise.
12334 (dw2_dump): Likewise.
12335 (dw2_expand_symtabs_for_function): Likewise.
12336 (dw2_expand_all_symtabs): Likewise.
12337 (dw2_expand_symtabs_with_fullname): Likewise.
12338 (dw2_expand_marked_cus): Replace index and objfile parameters
12339 with dwarf2_per_objfile.
12340 (dw_expand_symtabs_matching_file_matcher): Add
12341 dwarf2_per_objfile parameter and adjust calls.
12342 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12343 adjust calls.
12344 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12345 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12346 adjust calls.
12347 (create_cus_from_debug_names_list): Replace objfile parameter
12348 with dwarf2_per_objfile and adjust calls.
12349 (create_cus_from_debug_names): Likewise.
12350 (dwarf2_read_debug_names): Likewise.
12351 (mapped_debug_names::namei_to_name): Adjust call.
12352 (dw2_debug_names_iterator::next): Likewise.
12353 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12354 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12355 (dw2_debug_names_dump): Likewise.
12356 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12357 (dw2_debug_names_expand_symtabs_matching): Likewise.
12358 (dwarf2_initialize_objfile): Likewise.
12359 (dwarf2_build_psymtabs): Likewise.
12360 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12361 this_cu.
12362 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12363 (read_and_check_comp_unit_head): Likewise.
12364 (read_abbrev_offset): Likewise.
12365 (create_debug_type_hash_table): Likewise.
12366 (create_debug_types_hash_table): Likewise.
12367 (create_all_type_units): Replace objfile parameter with
12368 dwarf2_per_objfile.
12369 (add_type_unit): Add dwarf2_per_objfile parameter.
12370 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12371 with dwarf2_per_objfile.
12372 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12373 (lookup_dwp_signatured_type): Likewise.
12374 (lookup_signatured_type): Likewise.
12375 (read_cutu_die_from_dwo): Likewise.
12376 (init_tu_and_read_dwo_dies): Likewise.
12377 (init_cutu_and_read_dies): Likewise.
12378 (init_cutu_and_read_dies_no_follow): Likewise.
12379 (allocate_type_unit_groups_table): Add objfile parameter.
12380 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12381 (get_type_unit_group): Likewise.
12382 (process_psymtab_comp_unit): Update call.
12383 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12384 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12385 (print_tu_stats): Likewise.
12386 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12387 in void* parameter.
12388 (build_type_psymtabs): Change objfile parameter to
12389 dwarf2_per_objfile.
12390 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12391 passed in void* parameter.
12392 (process_skeletonless_type_units): Change objfile parameter to
12393 dwarf2_per_objfile.
12394 (set_partial_user): Likewise.
12395 (dwarf2_build_psymtabs_hard): Likewise.
12396 (read_comp_units_from_section): Likewise.
12397 (create_all_comp_units): Likewise.
12398 (scan_partial_symbols): Update calls.
12399 (add_partial_symbol): Likewise.
12400 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12401 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12402 (process_queue): Add dwarf2_per_objfile parameter.
12403 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12404 (compute_compunit_symtab_includes): Likewise.
12405 (process_cu_includes): Add dwarf2_per_objfile parameter.
12406 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12407 (process_full_type_unit): Likewise.
12408 (process_imported_unit_die): Update call.
12409 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12410 (read_file_scope): Likewise.
12411 (allocate_dwo_file_hash_table): Add objfile parameter.
12412 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12413 (create_cus_hash_table): Likewise.
12414 (create_dwp_hash_table): Likewise.
12415 (create_dwo_unit_in_dwp_v1): Likewise.
12416 (create_dwp_v2_section): Likewise.
12417 (create_dwo_unit_in_dwp_v2): Likewise.
12418 (lookup_dwo_unit_in_dwp): Likewise.
12419 (try_open_dwop_file): Likewise.
12420 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12421 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12422 cleanup to include a reference to dwarf2_per_objfile.
12423 (open_dwp_file): Add dwarf2_per_objfile parameter.
12424 (open_and_init_dwp_file): Likewise.
12425 (get_dwp_file): Likewise.
12426 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12427 (queue_and_load_all_dwo_tus): Update call.
12428 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12429 data.
12430 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12431 (dwarf2_ranges_process): Likewise.
12432 (dwarf2_get_pc_bounds): Likewise.
12433 (mark_common_block_symbol_computed): Likewise.
12434 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12435 (dwarf2_read_abbrevs): Update call.
12436 (read_partial_die): Use dwarf2_per_objfile from cu.
12437 (find_partial_die): Likewise.
12438 (fixup_partial_die): Likewise.
12439 (read_attribute_value): Likewise.
12440 (read_indirect_string_at_offset_from): Add objfile parameter.
12441 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12442 parameter.
12443 (read_indirect_string_from_dwz): Add objfile parameter.
12444 (read_indirect_string): Add objfile parameter.
12445 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12446 (read_addr_index): Use dwarf2_per_objfile from cu.
12447 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12448 call dw2_setup.
12449 (read_str_index): Use dwarf2_per_objfile from cu.
12450 (get_debug_line_section): Likewise.
12451 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12452 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12453 (new_symbol_full): Use dwarf2_per_objfile from cu.
12454 (build_error_marker_type): Likewise.
12455 (lookup_die_type): Likewise.
12456 (determine_prefix): Likewise.
12457 (follow_die_offset): Likewise.
12458 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12459 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12460 (dwarf2_fetch_die_type_sect_off): Likewise.
12461 (dwarf2_get_die_type): Likewise.
12462 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12463 (get_signatured_type): Likewise.
12464 (get_DW_AT_signature_type): Likewise.
12465 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12466 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12467 (cu_debug_loc_section): Likewise.
12468 (fill_in_loclist_baton): Likewise.
12469 (dwarf2_symbol_mark_computed): Likewise.
12470 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12471 dwarf2_per_objfile.
12472 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12473 parameter.
12474 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12475 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12476 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12477 (set_die_type): Use dwarf2_free_objfile from cu.
12478 (get_die_type_at_offset): Likewise.
12479 (dwarf2_per_objfile_free): Don't assign global variable.
12480 (debug_names) <constructor>: Add dwarf2_per_objfile
12481 parameter, update m_debugstrlookup construction.
12482 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12483 parameter.
12484 <m_dwarf2_per_objfile>: New field.
12485 <lookup>: Use m_dwarf2_per_objfile.
12486 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12487 (psyms_seen_size): Likewise.
12488 (write_gdbindex): Replace objfile parameter with
12489 dwarf2_per_objfile.
12490 (write_debug_names): Likewise.
12491 (write_psymtabs_to_index): Likewise.
12492 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12493 calls.
12494
12495 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12496
12497 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12498 <dwarf2_per_objfile>: New field.
12499 (struct dwarf2_per_cu_data) <objfile>: Remove.
12500 <dwarf2_per_objfile>: New field.
12501 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12502 of objfile.
12503 (create_signatured_type_table_from_index): Likewise.
12504 (create_debug_type_hash_table): Likewise.
12505 (fill_in_sig_entry_from_dwo_entry): Likewise.
12506 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12507 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12508 objfile.
12509 (create_partial_symtab): Access objfile through
12510 dwarf2_per_objfile.
12511 (process_psymtab_comp_unit_reader): Likewise.
12512 (read_comp_units_from_section): Likewise.
12513 (scan_partial_symbols): Likewise.
12514 (add_partial_symbol): Likewise.
12515 (add_partial_subprogram): Likewise.
12516 (peek_die_abbrev): Likewise.
12517 (fixup_go_packaging): Likewise.
12518 (process_full_comp_unit): Likewise.
12519 (process_full_type_unit): Likewise.
12520 (process_imported_unit_die): Likewise.
12521 (dwarf2_compute_name): Likewise.
12522 (dwarf2_physname): Likewise.
12523 (read_import_statement): Likewise.
12524 (create_cus_hash_table): Assign dwarf2_physname instead of
12525 objfile.
12526 (read_func_scope): Access objfile through dwarf2_per_objfile.
12527 (read_lexical_block_scope): Likewise.
12528 (read_call_site_scope): Likewise.
12529 (read_variable): Likewise.
12530 (dwarf2_rnglists_process): Likewise.
12531 (dwarf2_ranges_process): Likewise.
12532 (dwarf2_ranges_read): Likewise.
12533 (dwarf2_record_block_ranges): Likewise.
12534 (dwarf2_add_field): Likewise.
12535 (dwarf2_add_member_fn): Likewise.
12536 (read_structure_type): Likewise.
12537 (process_structure_scope): Likewise.
12538 (read_enumeration_type): Likewise.
12539 (read_array_type): Likewise.
12540 (read_common_block): Likewise.
12541 (read_namespace_type): Likewise.
12542 (read_namespace): Likewise.
12543 (read_module_type): Likewise.
12544 (read_tag_pointer_type): Likewise.
12545 (read_tag_ptr_to_member_type): Likewise.
12546 (read_tag_string_type): Likewise.
12547 (read_subroutine_type): Likewise.
12548 (read_typedef): Likewise.
12549 (read_base_type): Likewise.
12550 (attr_to_dynamic_prop): Likewise.
12551 (read_subrange_type): Likewise.
12552 (read_unspecified_type): Likewise.
12553 (load_partial_dies): Likewise.
12554 (read_partial_die): Likewise.
12555 (find_partial_die): Likewise.
12556 (guess_partial_die_structure_name): Likewise.
12557 (fixup_partial_die): Likewise.
12558 (read_attribute_value): Likewise.
12559 (read_addr_index_from_leb128): Likewise.
12560 (dwarf2_read_addr_index): Likewise.
12561 (dwarf2_string_attr): Likewise.
12562 (lnp_state_machine::check_line_address): Likewise.
12563 (dwarf_decode_lines_1): Likewise.
12564 (dwarf_decode_lines): Likewise.
12565 (dwarf2_start_symtab): Likewise.
12566 (var_decode_location): Likewise.
12567 (new_symbol_full): Likewise.
12568 (dwarf2_const_value_data): Likewise.
12569 (dwarf2_const_value_attr): Likewise.
12570 (dwarf2_const_value): Likewise.
12571 (die_type): Likewise.
12572 (die_containing_type): Likewise.
12573 (lookup_die_type): Likewise.
12574 (guess_full_die_structure_name): Likewise.
12575 (anonymous_struct_prefix): Likewise.
12576 (dwarf2_name): Likewise.
12577 (follow_die_ref_or_sig): Likewise.
12578 (follow_die_offset): Likewise.
12579 (follow_die_ref): Likewise.
12580 (dwarf2_fetch_die_loc_sect_off): Likewise.
12581 (dwarf2_fetch_constant_bytes): Likewise.
12582 (dwarf2_fetch_die_type_sect_off): Likewise.
12583 (dwarf2_get_die_type): Likewise.
12584 (follow_die_sig): Likewise.
12585 (decode_locdesc): Likewise.
12586 (dwarf2_per_cu_objfile): Likewise.
12587 (dwarf2_per_cu_text_offset): Likewise.
12588 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12589 objfile.
12590 (set_die_type): Access objfile through
12591 dwarf2_per_objfile.
12592
12593 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12594
12595 * valprint.c (converted_character_d): Remove typedef.
12596 (DEF_VEC_O (converted_character_d)): Remove.
12597 (count_next_character): Use std::vector.
12598 (print_converted_chars_to_obstack): Likewise.
12599 (generic_printstr): Likewise.
12600
12601 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12602
12603 * xml-support.h (struct gdb_xml_value): Add constructor.
12604 <value>: Change type to unique_xmalloc_ptr.
12605 (gdb_xml_value_s): Remove typedef.
12606 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12607 (gdb_xml_element_start_handler): Change parameter type to
12608 std::vector.
12609 (xml_find_attribute): Likewise.
12610 * xml-support.c (xml_find_attribute): Change parameter type to
12611 std::vector and adjust.
12612 (gdb_xml_values_cleanup): Remove.
12613 (gdb_xml_parser::start_element): Adjust to std::vector.
12614 (xinclude_start_include): Change paraeter type to std::vector
12615 and adjust.
12616 * btrace.c (check_xml_btrace_version): Likewise.
12617 (parse_xml_btrace_block): Likewise.
12618 (parse_xml_btrace_pt_config_cpu): Likewise.
12619 (parse_xml_btrace_pt): Likewise.
12620 (parse_xml_btrace_conf_bts): Likewise.
12621 (parse_xml_btrace_conf_pt): Likewise.
12622 * memory-map.c (memory_map_start_memory): Likewise.
12623 (memory_map_start_property): Likewise.
12624 * osdata.c (osdata_start_osdata): Likewise.
12625 (osdata_start_item): Likewise.
12626 (osdata_start_column): Likewise.
12627 * remote.c (start_thread): Likewise.
12628 * solib-aix.c (library_list_start_library): Likewise.
12629 (library_list_start_list): Likewise.
12630 * solib-svr4.c (library_list_start_library): Likewise.
12631 (svr4_library_list_start_list): Likewise.
12632 * solib-target.c (library_list_start_segment): Likewise.
12633 (library_list_start_section): Likewise.
12634 (library_list_start_library): Likewise.
12635 (library_list_start_list): Likewise.
12636 * tracepoint.c (traceframe_info_start_memory): Likewise.
12637 (traceframe_info_start_tvar): Likewise.
12638 * xml-syscall.c (syscall_start_syscall): Likewise.
12639 * xml-tdesc.c (tdesc_start_target): Likewise.
12640 (tdesc_start_feature): Likewise.
12641 (tdesc_start_reg): Likewise.
12642 (tdesc_start_union): Likewise.
12643 (tdesc_start_struct): Likewise.
12644 (tdesc_start_flags): Likewise.
12645 (tdesc_start_enum): Likewise.
12646 (tdesc_start_field): Likewise.
12647 (tdesc_start_enum_value): Likewise.
12648 (tdesc_start_vector): Likewise.
12649
12650 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12651
12652 * extension.h (struct xmethod_worker) <clone>: Remove.
12653 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12654 Remove.
12655 (python_xmethod_worker::clone): Remove.
12656 * valops.c (find_overload_match): Use std::move instead of
12657 clone.
12658
12659 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12660
12661 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12662 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12663 <free_xmethod_worker_data>: Remove.
12664 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12665 <get_xmethod_arg_types>: Remove.
12666 <get_xmethod_result_type>: Remove.
12667 <invoke_xmethod>: Remove.
12668 * extension.c (new_xmethod_worker): Remove.
12669 (clone_xmethod_worker): Remove.
12670 (get_matching_xmethod_workers): Return void, pass std::vector by
12671 pointer.
12672 (get_xmethod_arg_types): Rename to...
12673 (xmethod_worker::get_arg_types): ... this, and adjust.
12674 (get_xmethod_result_type): Rename to...
12675 (xmethod_worker::get_result_type): ... this, and adjust.
12676 (invoke_xmethod): Remove.
12677 (free_xmethod_worker): Remove.
12678 (free_xmethod_worker_vec): Remove.
12679 * extension.h (enum ext_lang_rc): Move here from
12680 extension-priv.h.
12681 (struct xmethod_worker): Add constructor and destructor.
12682 <data>: Remove.
12683 <value>: Remove.
12684 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12685 virtual pure methods.
12686 <get_arg_types, get_result_type>: New methods.
12687 (xmethod_worker_ptr): Remove typedef.
12688 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12689 (xmethod_worker_vec): Remove typedef.
12690 (xmethod_worker_up): New typedef.
12691 (invoke_xmethod): Remove.
12692 (clone_xmethod_worker): Remove.
12693 (free_xmethod_worker): Remove.
12694 (free_xmethod_worker_vec): Remove.
12695 (get_xmethod_arg_types): Remove.
12696 (get_xmethod_result_type): Remove.
12697 * valops.c (find_method_list): Use std::vector, don't use
12698 intermediate vector.
12699 (value_find_oload_method_list): Use std::vector.
12700 (find_overload_match): Use std::vector.
12701 (find_oload_champ): Use std::vector.
12702 * value.c (value_free): Use operator delete.
12703 (value_of_xmethod): Rename to...
12704 (value_from_xmethod): ... this. Don't assign
12705 xmethod_worker::value, take rvalue-reference.
12706 (result_type_of_xmethod): Adjust.
12707 (call_xmethod): Adjust.
12708 * value.h: Include extension.h.
12709 (struct xmethod_worker): Don't forward-declare.
12710 (value_of_xmethod): Rename to...
12711 (value_from_xmethod): ... this, take rvalue-reference.
12712 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12713 (struct python_xmethod_worker): ... this, add constructor and
12714 destructor.
12715 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12716 (gdbpy_free_xmethod_worker_data): Rename to...
12717 (python_xmethod_worker::~python_xmethod_worker): ... this and
12718 adjust.
12719 (gdbpy_clone_xmethod_worker_data): Rename to...
12720 (python_xmethod_worker::clone): ... this and adjust.
12721 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12722 temporary vector.
12723 (gdbpy_get_xmethod_arg_types): Rename to...
12724 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12725 (gdbpy_get_xmethod_result_type): Rename to...
12726 (python_xmethod_worker::do_get_result_type): ... this and
12727 adjust.
12728 (gdbpy_invoke_xmethod): Rename to...
12729 (python_xmethod_worker::invoke): ... this and adjust.
12730 (new_python_xmethod_worker): Rename to...
12731 (python_xmethod_worker::python_xmethod_worker): ... this and
12732 adjust.
12733 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12734 Remove.
12735 (gdbpy_free_xmethod_worker_data): Remove.
12736 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12737 (gdbpy_get_xmethod_arg_types): Remove.
12738 (gdbpy_get_xmethod_result_type): Remove.
12739 (gdbpy_invoke_xmethod): Remove.
12740 * python/python.c (python_extension_ops): Remove obsolete
12741 callbacks.
12742
12743 2018-01-05 Pedro Alves <palves@redhat.com>
12744
12745 PR gdb/18653
12746 * common/signals-state-save-restore.c
12747 (save_original_signals_state): New parameter 'quiet'. Warn if we
12748 find a custom handler preinstalled, instead of internal erroring.
12749 But only warn if !quiet.
12750 * common/signals-state-save-restore.h
12751 (save_original_signals_state): New parameter 'quiet'.
12752 * main.c (captured_main_1): Move save_original_signals_state call
12753 after option handling, and pass QUIET.
12754
12755 2018-01-05 Pedro Alves <palves@redhat.com>
12756
12757 * spu-tdep.c (spu_catch_start): Pass
12758 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12759
12760 2018-01-05 Pedro Alves <palves@redhat.com>
12761
12762 PR gdb/22670
12763 * ada-lang.c (literal_symbol_name_matcher): New function.
12764 (ada_get_symbol_name_matcher): Use it for
12765 symbol_name_match_type::SEARCH_NAME.
12766 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12767 it down instead of assuming symbol_name_match_type::FULL.
12768 * block.h (block_lookup_symbol): New parameter 'match_type'.
12769 * c-valprint.c (print_unpacked_pointer): Use
12770 lookup_symbol_search_name instead of lookup_symbol.
12771 * compile/compile-object-load.c (get_out_value_type): Pass down
12772 symbol_name_match_type::SEARCH_NAME.
12773 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12774 symbol_name_match_type::FULL.
12775 * cp-support.c (cp_get_symbol_name_matcher): Handle
12776 symbol_name_match_type::SEARCH_NAME.
12777 * infrun.c (insert_exception_resume_breakpoint): Use
12778 lookup_symbol_search_name.
12779 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12780 * psymtab.c (maintenance_check_psymtabs): Use
12781 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12782 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12783 SYMBOL_SEARCH_NAME.
12784 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12785 if symbol_name_match_type::SEARCH_NAME.
12786 (lookup_symbol_in_language): Pass down
12787 symbol_name_match_type::FULL.
12788 (lookup_symbol_search_name): New.
12789 (lookup_language_this): Pass down
12790 symbol_name_match_type::SEARCH_NAME.
12791 (lookup_symbol_aux, lookup_local_symbol): New parameter
12792 'match_type'. Pass it down.
12793 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12794 (lookup_symbol_search_name): New declaration.
12795 (lookup_symbol_in_block): New 'match_type' parameter.
12796
12797 2018-01-05 Pedro Alves <palves@redhat.com>
12798
12799 PR gdb/22670
12800 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12801 ada_lookup_symbol.
12802 (ada_lookup_symbol): Reimplement in terms of
12803 ada_lookup_symbol_list, bits factored out from
12804 ada_lookup_encoded_symbol.
12805
12806 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12807
12808 * ada-exp.y (write_object_renaming): When subscripting an array
12809 using a symbol as the index, pass the block in call to
12810 ada_lookup_encoded_symbol when looking that symbol up.
12811
12812 2018-01-05 Jerome Guitton <guitton@adacore.com>
12813
12814 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12815 TYPE_INDEX_TYPE.
12816
12817 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12818
12819 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12820 the case where VALUE_LVAL (val0) is not lval_memory.
12821
12822 2018-01-05 Xavier Roirand <roirand@adacore.com>
12823
12824 * ada-valprint.c (print_optional_low_bound): Handle
12825 character-indexed array printing like boolean-indexed array
12826 printing.
12827
12828 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12829
12830 * NEWS: Create a new section for the next release branch.
12831 Rename the section of the current branch, now that it has
12832 been cut.
12833
12834 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12835
12836 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12837 * version.in: Bump version to 8.1.50.DATE-git.
12838
12839 2018-01-03 Xavier Roirand <roirand@adacore.com>
12840
12841 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12842 Add field.
12843 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12844 Add field.
12845 (default_exception_support_info) <catch_handlers_sym>: Add field.
12846 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12847 (ada_exception_name_addr_1): Add "catch handlers" handling.
12848 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12849 Update all callers.
12850 (create_excep_cond_exprs) <ex>: Add parameter.
12851 (re_set_exception): Update create_excep_cond_exprs call.
12852 (print_it_exception, print_one_exception, print_mention_exception)
12853 (print_recreate_exception): Add "catch handler" handling.
12854 (allocate_location_catch_handlers, re_set_catch_handlers)
12855 (check_status_catch_handlers, print_it_catch_handlers)
12856 (print_one_catch_handlers, print_mention_catch_handlers)
12857 (print_recreate_catch_handlers): New function.
12858 (catch_handlers_breakpoint_ops): New variable.
12859 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12860 Add parameter. Add "catch handler" handling.
12861 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12862 Add "catch handler" handling.
12863 (ada_exception_catchpoint_cond_string): Add "catch handler"
12864 handling.
12865 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12866 call.
12867 (catch_ada_handlers_command): New function.
12868 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12869 operations structure.
12870 (_initialize_ada_language): Add "catch handlers" command entry.
12871 * NEWS: Document "catch handlers" feature.
12872
12873 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12874
12875 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12876 account when creating the array type of the slice.
12877 (ada_value_slice): Likewise.
12878
12879 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12880
12881 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12882 New enum value.
12883 (create_array_type_with_stride): Add byte_stride_prop parameter.
12884 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12885 New parameter. Update all callers in this file.
12886 (array_type_has_dynamic_stride): New function.
12887 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12888 of arrays with dynamic byte strides.
12889 * dwarf2read.c (read_array_type): Add support for dynamic
12890 DW_AT_byte_stride attributes.
12891
12892 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12893
12894 * dwarf2read.c (read_unspecified_type): Treat
12895 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12896
12897 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12898
12899 Update copyright year range in all GDB files.
12900
12901 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12902
12903 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12904 and gdb/testsuite/gdb.base/step-line.c.
12905
12906 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12907
12908 * copyright.py (main): Dump the contents of
12909 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12910 even if BY_HAND is empty.
12911
12912 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12913
12914 * top.c (print_gdb_version): Update Copyright year in version
12915 message.
12916
12917 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12918
12919 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12920
12921 For older changes see ChangeLog-2017.
12922 \f
12923 Local Variables:
12924 mode: change-log
12925 left-margin: 8
12926 fill-column: 74
12927 version-control: never
12928 coding: utf-8
12929 End: