Use ELF_SECTION_IN_SEGMENT to map segments
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2
3 * Makefile.in (config.status): Add configure.nat as a
4 dependency.
5
6 2018-06-04 Tom Tromey <tom@tromey.com>
7
8 * cp-name-parser.y (cpname_state): Add method declarations.
9 (HANDLE_QUAL): Update.
10 (cpname_state::d_grab, cpname_state::fill_comp)
11 (cpname_state::make_operator, cpname_state::make_dtor)
12 (cpname_state::make_builtin_type, cpname_state::make_name)
13 (cpname_state::d_qualify, cpname_state::d_int_type)
14 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
15 (%union): Move earlier.
16
17 2018-06-04 Alan Hayward <alan.hayward@arm.com>
18
19 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
20
21 2018-06-04 Alan Hayward <alan.hayward@arm.com>
22
23 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
24 (aarch64_pseudo_write_1): Likewise.
25 (aarch64_pseudo_read_value): Use helper.
26 (aarch64_pseudo_write): Likewise.
27
28 2018-06-04 Pedro Alves <palves@redhat.com>
29
30 * darwin-nat.c (darwin_ops): Delete.
31 (darwin_attach_pid): Use get_native_target.
32
33 2018-06-04 Alan Hayward <alan.hayward@arm.com>
34
35 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
36 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
37
38 2018-06-04 Alan Hayward <alan.hayward@arm.com>
39
40 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
41 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
42 (aarch64_gdbarch_init): Check for SVE.
43 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
44
45 2018-06-04 Alan Hayward <alan.hayward@arm.com>
46
47 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
48 * aarch64-tdep.h (aarch64_read_description): Likewise.
49 * arch/aarch64.c (aarch64_create_target_description): Likewise.
50 * arch/aarch64.h (aarch64_create_target_description): Likewise.
51 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
52 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
53 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
54
55 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
56
57 * value.c (value_fetch_lazy_bitfield): New.
58 (value_fetch_lazy_memory): New.
59 (value_fetch_lazy_register): New.
60 (value_fetch_lazy): Factor out to smaller functions.
61
62 2018-06-01 Tom Tromey <tom@tromey.com>
63
64 * cp-name-parser.y (backslashable, represented): Now const.
65
66 2018-06-01 Tom Tromey <tom@tromey.com>
67
68 * cp-name-parser.y: Include parser-defs.h.
69 (parser_fprintf): Remove declaration.
70
71 2018-06-01 Tom Tromey <tom@tromey.com>
72
73 * cp-name-parser.y: Use %pure-parser, %lex-param, and
74 %parse-param.
75 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
76 (global_result): Remove globals.
77 (struct cpname_state): New.
78 (yyparse): Don't declare.
79 (yylex, yyerror): Move declarations after %union.
80 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
81 (make_name): Add state parameter.
82 Update all callers.
83 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
84 parameter.
85 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
86 Update.
87 (yylex): Add lvalp, state parameters.
88 (yyerror): Add state parameter.
89 (cp_demangled_name_to_comp): Update.
90
91 2018-06-01 Tom Tromey <tom@tromey.com>
92
93 * cp-name-parser.y (parser_fprintf): Declare.
94 (GDB_YY_REMAP_PREFIX): Define.
95 Include yy-remap.h. Don't redefine yy* identifiers.
96
97 2018-06-01 Tom Tromey <tom@tromey.com>
98
99 * python/py-type.c (typy_legacy_template_argument): Update.
100 * cp-support.h (cp_demangled_name_to_comp): Update.
101 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
102 parameter to be a "std::string *".
103 (main): Update.
104
105 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
106
107 * ada-lex.l: Include "diagnostics.h" instead of
108 "common/diagnostics.h".
109 * unittests/environ-selftests.c: Likewise.
110 * common/diagnostics.h: Moved to ../include.
111
112 2018-06-01 Joel Brobecker <brobecker@adacore.com>
113
114 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
115 to language_mode_manual while calling breakpoint_re_set_one.
116
117 2018-06-01 Tom Tromey <tom@tromey.com>
118
119 * valops.c (value_cast_structs, destructor_name_p): Update.
120 * symtab.c (gdb_mangle_name): Update.
121 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
122 Update.
123 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
124 (pascal_object_print_value_fields, pascal_object_print_value):
125 Update.
126 * p-typeprint.c (pascal_type_print_derivation_info): Update.
127 * linespec.c (find_methods): Update.
128 * gdbtypes.h (type_name_no_tag): Remove.
129 (type_name_or_error): Rename from type_name_no_tag_or_error.
130 * gdbtypes.c (type_name_no_tag): Remove.
131 (type_name_or_error): Rename from type_name_no_tag_or_error.
132 (lookup_struct_elt_type, check_typedef): Update.
133 * expprint.c (print_subexp_standard): Update.
134 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
135 * d-namespace.c (d_lookup_nested_symbol): Update.
136 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
137 (cp_print_class_member): Update.
138 * cp-namespace.c (cp_lookup_nested_symbol): Update.
139 * completer.c (add_struct_fields): Update.
140 * c-typeprint.c (cp_type_print_derivation_info)
141 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
142 Update.
143 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
144 (ada_prefer_type, ada_is_exception_sym): Update.
145
146 2018-06-01 Tom Tromey <tom@tromey.com>
147
148 * valops.c (enum_constant_from_type, value_namespace_elt)
149 (value_maybe_namespace_elt): Update.
150 * valarith.c (find_size_for_pointer_math): Update.
151 * target-descriptions.c (make_gdb_type): Update.
152 * symmisc.c (print_symbol): Update.
153 * stabsread.c (define_symbol, read_type)
154 (complain_about_struct_wipeout, add_undefined_type)
155 (cleanup_undefined_types_1): Update.
156 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
157 (rust_range_type_p, val_print_struct, rust_print_struct_def)
158 (rust_internal_print_type, rust_composite_type)
159 (rust_evaluate_funcall, rust_evaluate_subexp)
160 (rust_inclusive_range_type_p): Update.
161 * python/py-type.c (typy_get_tag): Update.
162 * p-typeprint.c (pascal_type_print_base): Update.
163 * mdebugread.c (parse_symbol, parse_type): Update.
164 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
165 Update.
166 * guile/scm-type.c (gdbscm_type_tag): Update.
167 * go-lang.c (sixg_string_p): Update.
168 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
169 Update.
170 * gdbtypes.h (struct main_type) <tag_name>: Remove.
171 (TYPE_TAG_NAME): Remove.
172 * gdbtypes.c (type_name_no_tag): Simplify.
173 (check_typedef, check_types_equal, recursive_dump_type)
174 (copy_type_recursive, arch_composite_type): Update.
175 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
176 in summary mode when needed.
177 * eval.c (evaluate_funcall): Update.
178 * dwarf2read.c (fixup_go_packaging, read_structure_type)
179 (process_structure_scope, read_enumeration_type)
180 (read_namespace_type, read_module_type, determine_prefix): Update.
181 * cp-support.c (inspect_type): Update.
182 * coffread.c (process_coff_symbol, decode_base_type): Update.
183 * c-varobj.c (c_is_path_expr_parent): Update.
184 * c-typeprint.c (c_type_print_base_struct_union): Update.
185 (c_type_print_base_1): Update. Print struct/class/union/enum in
186 summary when using C language.
187 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
188 (gen_maybe_namespace_elt): Update.
189 * ada-lang.c (ada_type_name): Simplify.
190 (empty_record, ada_template_to_fixed_record_type_1)
191 (template_to_static_fixed_type)
192 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
193
194 2018-06-01 Tom Tromey <tom@tromey.com>
195
196 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
197 c_print_type.
198 * c-typeprint.c (c_print_type_1): Add "language" parameter.
199 (c_print_type): Update.
200 (c_print_type): New overload.
201 (c_type_print_varspec_prefix, c_type_print_args)
202 (c_type_print_varspec_suffix, c_print_type_no_offsets)
203 (c_type_print_base_struct_union, c_type_print_base_1)
204 (cp_type_print_method_args): Add "language" parameter.
205 (c_type_print_base): Update.
206 * c-lang.h (c_print_type): Add new overload.
207
208 2018-06-01 Tom Tromey <tom@tromey.com>
209
210 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
211 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
212
213 2018-06-01 Alan Hayward <alan.hayward@arm.com>
214
215 * aarch64-tdep.c (aarch64_sve_register_names): New const
216 var.
217 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
218 (AARCH64_SVE_Z_REGS_NUM): New define.
219 (AARCH64_SVE_P_REGS_NUM): Likewise.
220 (AARCH64_SVE_NUM_REGS): Likewise.
221
222 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
223
224 * nat/linux-ptrace.h [__alpha__]
225 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
226 definitions.
227
228 2018-05-31 Maciej W. Rozycki <macro@mips.com>
229
230 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
231 the endianness selected.
232 * NEWS: Document `set endian auto' mode operation update.
233
234 2018-05-31 Alan Hayward <alan.hayward@arm.com>
235
236 * Makefile.in: Add new header.
237 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
238 (sve_vl_from_vg): Likewise.
239 (sve_vq_from_vl): Likewise.
240 (sve_vl_from_vq): Likewise.
241 (sve_vq_from_vg): Likewise.
242 (sve_vg_from_vq): Likewise.
243 * configure.nat: Add new c file.
244 * nat/aarch64-sve-linux-ptrace.c: New file.
245 * nat/aarch64-sve-linux-ptrace.h: New file.
246
247 2018-05-31 Alan Hayward <alan.hayward@arm.com>
248
249 * aarch64-linux-nat.c (aarch64_linux_read_description):
250 Add parmeter zero.
251 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
252 Likewise.
253 * aarch64-tdep.c (tdesc_aarch64_list): Add.
254 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
255 (aarch64_gdbarch_init): Add parmeter zero.
256 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
257 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
258 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
259 parmeter.
260 * doc/gdb.texinfo: Describe SVE feature
261 * features/aarch64-sve.c: New file.
262
263 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
264
265 PR gdb/23210
266 * gdbarch.sh (significant_addr_bit): Default to zero when
267 not set by target architecture.
268 * gdbarch.c: Re-generated.
269 * utils.c (address_significant): Update.
270
271 2018-05-30 Joel Brobecker <brobecker@adacore.com>
272
273 * stack.c (func_command): Remove trailing newline in call to error.
274
275 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
276
277 * regcache.h (regcache_raw_collect): Remove, update callers to
278 use regcache::raw_collect.
279 * regcache.c (regcache_raw_collect): Remove.
280
281 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
282
283 * regcache.h (regcache_raw_supply): Remove, update callers to
284 use detached_regcache::raw_supply.
285 * regcache.c (regcache_raw_supply): Remove.
286
287 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
288
289 * regcache.h (regcache_cooked_write_part): Remove, update
290 callers to use regcache::cooked_write_part.
291 * regcache.c (regcache_cooked_write_part): Remove.
292
293 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
294
295 * regcache.h (regcache_cooked_read_part): Remove, update callers
296 to use readable_regcache::cooked_read_part.
297 * regcache.c (regcache_cooked_read_part): Remove.
298
299 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
300
301 * regcache.h (regcache_cooked_read_value): Remove, update
302 callers to use readable_regcache::cooked_read_value.
303 * regcache.c (regcache_cooked_read_value): Remove.
304
305 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
306
307 * regcache.h (regcache_cooked_write): Remove, update callers to
308 use regcache::cooked_write.
309 * regcache.c (regcache_cooked_write): Remove.
310
311 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
312
313 * regcache.h (regcache_invalidate): Remove, update callers to
314 use detached_regcache::invalidate instead.
315 * regcache.c (regcache_invalidate): Remove.
316
317 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
318
319 * regcache.h (regcache_raw_write_part): Remove, update callers
320 to use regcache::raw_write_part instead.
321 * regcache.c (regcache_raw_write_part): Remove.
322
323 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
324
325 * regcache.h (regcache_raw_read_part): Remove, update callers to
326 use readable_regcache::raw_read_part instead.
327 * regcache.c (regcache_raw_read_part): Remove.
328
329 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
330
331 * regcache.h (regcache_cooked_read): Remove, update callers to
332 use readable_regcache::cooked_read instead.
333 * regcache.c (regcache_cooked_read): Remove.
334
335 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
336
337 * regcache.h (regcache_raw_write): Remove, update callers to use
338 regcache::raw_write instead.
339 * regcache.c (regcache_raw_write): Remove.
340
341 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
342
343 * regcache.h (regcache_raw_read): Remove, update callers to use
344 readable_regcache::raw_read instead.
345 * regcache.c (regcache_raw_read): Remove.
346
347 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
348
349 * regcache.h (regcache_raw_update): Remove, update callers to
350 use readable_regcache::raw_update instead.
351 * regcache.c (regcache_raw_update): Remove.
352
353 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
354
355 * regcache.h (regcache_register_status): Remove, update callers
356 to use reg_buffer::get_register_status directly instead.
357 * regcache.c (regcache_register_status): Remove.
358
359 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
360
361 * regcache.h (regcache_get_ptid): Remove, update all callers to
362 call regcache::ptid instead.
363 * regcache.c (regcache_get_ptid): Remove.
364
365 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
366
367 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
368
369 2018-05-30 Pedro Alves <palves@redhat.com>
370
371 * common/common-exceptions.h (exception_rethrow): Use
372 ATTRIBUTE_NORETURN.
373
374 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
375
376 * breakpoint.c (print_solib_event, check_status_catch_solib):
377 Remove struct keyword in range-based for loops.
378 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
379 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
380 Likewise.
381 * linespec.c (find_superclass_methods, search_minsyms_for_name):
382 Likewise.
383 * symfile.c (addr_info_make_relative): Likewise.
384 * thread.c (value_in_thread_stack_temporaries): Likewise.
385
386 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
387
388 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
389 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
390 * coff-pe-read.c (add_pe_forwarded_sym): Replace
391 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
392 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
393 * jit.c (jit_breakpoint_re_set_internal): Likewise.
394 * printcmd.c (info_address_command): Likewise.
395
396 2018-05-29 Tom Tromey <tom@tromey.com>
397
398 * windows-nat.c (handle_exception): Update fall-through comment.
399
400 2018-05-29 Tom Tromey <tom@tromey.com>
401
402 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
403 (struct program_space) <added_solibs>: Now a std::vector.
404 * breakpoint.c (print_solib_event): Update.
405 (check_status_catch_solib): Update.
406 * progspace.c (clear_program_space_solib_cache): Update.
407 * solib.c (update_solib_list): Update.
408
409 2018-05-29 Tom Tromey <tom@tromey.com>
410
411 * python/py-type.c (typy_richcompare): Update.
412 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
413 * gdbtypes.h (types_deeply_equal): Return bool.
414 (types_equal): Likewise.
415 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
416 declare VEC.
417 (check_types_equal): Change worklist to std::vector. Return
418 bool.
419 (struct type_equality_entry): Add constructor.
420 (compare_maybe_null_strings): Return bool.
421 (check_types_worklist): Return bool. Change worklist to
422 std::vector.
423 (types_deeply_equal): Use std::vector.
424 (types_equal): Return bool.
425 (compare_maybe_null_strings): Simplify.
426
427 2018-05-29 Tom Tromey <tom@tromey.com>
428
429 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
430
431 2018-05-29 Tom Tromey <tom@tromey.com>
432
433 * objc-lang.h: Don't include cp-support.h.
434 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
435 declare VEC.
436
437 2018-05-27 Tom Tromey <tom@tromey.com>
438
439 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
440
441 2018-05-25 Tom Tromey <tom@tromey.com>
442
443 * value.c (value::location): Initialize.
444
445 2018-05-25 Tom Tromey <tom@tromey.com>
446
447 * dbxread.c (init_bincl_list): Remove.
448 (bincl_list): Now a std::vector.
449 (bincls_allocated, next_bincl): Remove.
450 (free_bincl_list, do_free_bincl_list_cleanup)
451 (make_cleanup_free_bincl_list): Remove.
452 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
453 unique_xmalloc_ptr.
454 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
455 (struct header_file_location): Add constructor.
456 (add_bincl_to_list): Remove.
457
458 2018-05-25 Tom Tromey <tom@tromey.com>
459
460 * tui/tui.c (tui_enable): Update.
461 * mi/mi-interp.c (mi_interp::init): Update.
462 * interps.h (class interp) <name>: New method.
463 <m_name>: Rename from name.
464 (~scoped_restore_interp): Update.
465 * interps.c (interp::interp): Update.
466 (interp_add, interp_set, interp_lookup_existing)
467 (current_interp_named_p): Update.
468
469 2018-05-25 Tom Tromey <tom@tromey.com>
470
471 * interps.c (interp_name): Remove.
472 * mi/mi-interp.c (mi_interp::init): Update.
473 * interps.h (interp_name): Remove.
474 (~scoped_restore_interp): Update.
475 * tui/tui.c (tui_enable): Update.
476
477 2018-05-25 Tom Tromey <tom@tromey.com>
478
479 * utils.c (fputs_maybe_filtered): Update.
480 * linespec.c (decode_line_full): Update.
481 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
482 (mi_print_breakpoint_for_event, mi_solib_loaded)
483 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
484 (mi_user_selected_context_changed): Update.
485 * mi/mi-main.c (mi_execute_command): Update.
486 * cli/cli-script.c (execute_control_command): Update.
487 * python/python.c (execute_gdb_command): Update.
488 * solib.c (info_sharedlibrary_command): Update.
489 * interps.c (interp_ui_out): Remove.
490 * interps.h (interp_ui_out): Remove.
491
492 2018-05-25 Tom Tromey <tom@tromey.com>
493
494 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
495 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
496 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
497
498 2018-05-25 Tom Tromey <tom@tromey.com>
499
500 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
501 * interps.c (interp_exec): Use scoped_restore.
502
503 2018-05-25 Tom Tromey <tom@tromey.com>
504
505 * remote.c (remote_target::remote_file_get): Use
506 gdb::byte_vector.
507 (remote_target::remote_file_put): Likewise.
508
509 2018-05-25 Tom Tromey <tom@tromey.com>
510
511 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
512 a std::string.
513 (get_pe_section_index, add_pe_exported_sym): Update.
514 (read_pe_exported_syms): Use gdb::def_vector.
515
516 2018-05-25 Tom Tromey <tom@tromey.com>
517
518 * frame.c (remove_prev_frame): Remove.
519 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
520
521 2018-05-25 Maciej W. Rozycki <macro@mips.com>
522
523 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
524 Remove prototypes.
525 * mips-linux-nat.c (supply_fpregset): Always call
526 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
527 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
528 `mips_fill_fpregset'.
529 * mips-linux-tdep.c (mips_supply_fpregset)
530 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
531 (mips_fill_fpregset_wrapper): Remove functions.
532 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
533 (mips_linux_fpregset): Remove variable.
534 (mips_linux_iterate_over_regset_sections): Use
535 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
536 (mips_linux_o32_sigframe_init): Remove comment.
537
538 2018-05-25 Pedro Alves <palves@redhat.com>
539
540 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
541 (struct readahead_cache, struct packet_reg, struct
542 remote_arch_state, class remote_state): Move higher up in the
543 file.
544 (remote_target::m_remote_state): Now an object instead of a pointer.
545 (remote_target::get_remote_state): Adjust.
546
547 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
548
549 * stack.c (select_and_print_frame): Delete.
550 (struct function_bounds): Move struct within function.
551 (func_command): Most content moved into new function
552 find_frame_for_function, use new function, print result, add
553 function comment.
554 (find_frame_for_function): New function, now returns a result.
555
556 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
557
558 * stack.c (iterate_over_block_arg_vars): Fix comment.
559 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
560
561 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
562
563 PR gdb/23203
564 * frame.c
565 (scoped_restore_selected_frame::scoped_restore_selected_frame):
566 Define.
567 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
568 Define.
569 * frame.h (class scoped_restore_selected_frame): New class.
570 * stack.c (print_frame_local_vars): Remove catching and rethrowing
571 of any exception, use scoped_restore_selected_frame to restore the
572 frame instead.
573
574 2018-05-24 Pedro Alves <palves@redhat.com>
575
576 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
577 override.
578
579 2018-05-23 Tom Tromey <tom@tromey.com>
580
581 * complaints.c (struct complaints): Remove.
582 (symfile_complaint_book): Remove.
583 (series): New global.
584 (complaint_internal): Update.
585 (clear_complaints): Update.
586
587 2018-05-23 Tom Tromey <tom@tromey.com>
588
589 * complaints.c (counters): New global.
590 (struct complain): Remove.
591 (struct complaints) <root>: Remove.
592 (complaint_sentinel): Remove.
593 (symfile_complaint_book): Update.
594 (find_complaint) Remove.
595 (complaint_internal, clear_complaints): Update.
596
597 2018-05-23 Tom Tromey <tom@tromey.com>
598
599 * complaints.c (struct complain) <file, line>: Remove.
600 (find_complaint): Remove file, line parameters.
601 (complaint_internal): Update.
602
603 2018-05-23 Tom Tromey <tom@tromey.com>
604
605 * complaints.c (vcomplaint): Remove.
606 (complaint_internal) Merge in contents of vcomplaint.
607
608 2018-05-23 Tom Tromey <tom@tromey.com>
609
610 * complaints.c (struct complaints) <explanation>: Remove.
611 (symfile_explanations): Remove.
612 (symfile_complaint_book): Update.
613 (vcomplaint): Update.
614 (struct explanation): Remove.
615
616 2018-05-23 Tom Tromey <tom@tromey.com>
617
618 * complaints.c (symfile_complaints): Remove.
619 (complaint_internal): Remove "complaints" parameter.
620 (clear_complaints, vcomplaint): Remove "c" parameter.
621 (get_complaints): Remove.
622 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
623 (dwarf2_debug_line_missing_file_complaint)
624 (dwarf2_debug_line_missing_end_sequence_complaint)
625 (dwarf2_complex_location_expr_complaint)
626 (dwarf2_const_value_length_mismatch_complaint)
627 (dwarf2_section_buffer_overflow_complaint)
628 (dwarf2_macro_malformed_definition_complaint)
629 (dwarf2_invalid_attrib_class_complaint)
630 (create_addrmap_from_index, dw2_symtab_iter_next)
631 (dw2_expand_marked_cus)
632 (dw2_debug_names_iterator::find_vec_in_debug_names)
633 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
634 (create_debug_type_hash_table, init_cutu_and_read_dies)
635 (partial_die_parent_scope, add_partial_enumeration)
636 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
637 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
638 (read_import_statement, read_file_scope, create_dwo_cu_reader)
639 (create_cus_hash_table, create_dwp_hash_table)
640 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
641 (dwarf2_rnglists_process, dwarf2_ranges_process)
642 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
643 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
644 (handle_struct_member_die, process_structure_scope)
645 (read_array_type, read_common_block, read_module_type)
646 (read_tag_pointer_type, read_typedef, read_base_type)
647 (read_subrange_type, load_partial_dies, partial_die_info::read)
648 (partial_die_info::read, partial_die_info::read)
649 (partial_die_info::read, read_checked_initial_length_and_offset)
650 (dwarf2_string_attr, read_formatted_entries)
651 (dwarf_decode_line_header)
652 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
653 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
654 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
655 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
656 (get_signatured_type, get_DW_AT_signature_type)
657 (decode_locdesc, file_file_name, consume_improper_spaces)
658 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
659 (dwarf_decode_macro_bytes, dwarf_decode_macros)
660 (dwarf2_symbol_mark_computed, set_die_type)
661 (read_attribute_value): Update.
662 * stap-probe.c (handle_stap_probe, get_stap_base_address):
663 Update.
664 * dbxread.c (unknown_symtype_complaint)
665 (lbrac_mismatch_complaint, repeated_header_complaint)
666 (set_namestring, function_outside_compilation_unit_complaint)
667 (read_dbx_symtab, process_one_symbol): Update.
668 * gdbtypes.c (stub_noname_complaint): Update.
669 * windows-nat.c (handle_unload_dll): Update.
670 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
671 (decode_base_type): Update.
672 * xcoffread.c (bf_notfound_complaint, ef_complaint)
673 (eb_complaint, record_include_begin, record_include_end)
674 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
675 (process_xcoff_symbol, read_symbol)
676 (function_outside_compilation_unit_complaint)
677 (scan_xcoff_symtab): Update.
678 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
679 * buildsym.c (finish_block_internal, make_blockvector)
680 (end_symtab_get_static_block, augment_type_symtab): Update.
681 * dtrace-probe.c (dtrace_process_dof)
682 (dtrace_static_probe_ops::get_probes): Update.
683 * complaints.h (struct complaint): Don't declare.
684 (symfile_complaints): Remove.
685 (complaint_internal): Remove "complaints" parameter.
686 (complaint): Likewise.
687 (clear_complaints): Likewise.
688 * symfile.c (syms_from_objfile_1, finish_new_objfile)
689 (reread_symbols): Update.
690 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
691 (dwarf2_frame_cache, decode_frame_entry): Update.
692 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
693 * objc-lang.c (lookup_objc_class, lookup_child_selector)
694 (info_selectors_command): Update.
695 * macrotab.c (macro_include, check_for_redefinition)
696 (macro_undef): Update.
697 * objfiles.c (filter_overlapping_sections): Update.
698 * stabsread.c (invalid_cpp_abbrev_complaint)
699 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
700 (define_symbol, error_type, read_type, rs6000_builtin_type)
701 (stabs_method_name_from_physname, read_member_functions)
702 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
703 (attach_fields_to_type, complain_about_struct_wipeout)
704 (read_range_type, read_args, common_block_start)
705 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
706 Update.
707 * mdebugread.c (index_complaint, unknown_ext_complaint)
708 (basic_type_complaint, bad_tag_guess_complaint)
709 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
710 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
711 (parse_procedure, parse_lines)
712 (function_outside_compilation_unit_complaint)
713 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
714 (bad_tag_guess_complaint, reg_value_complaint): Update.
715 * cp-support.c (demangled_name_complaint): Update.
716 * macroscope.c (sal_macro_scope): Update.
717 * dwarf-index-write.c (class debug_names): Update.
718
719 2018-05-23 Tom Tromey <tom@tromey.com>
720
721 * complaints.c (clear_complaints): Remove "noisy" parameter.
722 * complaints.h (clear_complaints): Update.
723 * symfile.c (syms_from_objfile_1, finish_new_objfile)
724 (reread_symbols): Update.
725
726 2018-05-23 Tom Tromey <tom@tromey.com>
727
728 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
729 SUBSEQUENT_MESSAGE.
730 (vcomplaint, clear_complaints): Update.
731 (symfile_explanations): Remove some messages.
732
733 2018-05-23 Tom Tromey <tom@tromey.com>
734
735 * complaints.c (internal_complaint): Remove.
736 * complaints.h (internal_complaint): Remove.
737
738 2018-05-22 Maciej W. Rozycki <macro@mips.com>
739
740 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
741
742 2018-05-22 Pedro Alves <palves@redhat.com>
743
744 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
745 (remote_fileio_badfd, remote_fileio_return_errno)
746 (remote_fileio_return_success, remote_fileio_func_open)
747 (remote_fileio_func_open, remote_fileio_func_close)
748 (remote_fileio_func_read, remote_fileio_func_write)
749 (remote_fileio_func_lseek, remote_fileio_func_rename)
750 (remote_fileio_func_unlink, remote_fileio_func_stat)
751 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
752 (remote_fileio_func_isatty, remote_fileio_func_system): Add
753 remote_target parameter.
754 (remote_fio_func_map) <func>: Add remote_target parameter.
755 (do_remote_fileio_request, remote_fileio_request):
756 * remote-fileio.h (remote_fileio_request):
757 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
758 remote_target parameter.
759 (remote_notif_process, handle_notification): Adjust to pass down
760 the remote.
761 (remote_notif_state_allocate): Add remote_target parameter. Save
762 it.
763 * remote-notif.h (struct remote_target): Forward declare.
764 (struct notif_client) <parse, ack, can_get_pending_events>: Add
765 remote_target parameter.
766 (struct remote_notif_state) <remote>: New field.
767 (remote_notif_ack, remote_notif_parse): Add remote_target
768 parameter.
769 (remote_notif_state_allocate, remote_notif_state_allocate): Add
770 remote_target parameter.
771 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
772 (threads_listing_context, rmt_thread_action, protocol_feature)
773 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
774 (packet_result, struct threads_listing_context, remote_state):
775 Move definitions and declarations higher up.
776 (remote_target) <~remote_target>: Declare.
777 (remote_download_command_source, remote_file_put, remote_file_get)
778 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
779 (remote_hostio_pread_vFile, remote_hostio_send_command)
780 (remote_hostio_set_filesystem, remote_hostio_open)
781 (remote_hostio_close, remote_hostio_unlink, remote_state)
782 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
783 (get_memory_write_packet_size, get_memory_read_packet_size)
784 (append_pending_thread_resumptions, remote_detach_1)
785 (append_resumption, remote_resume_with_vcont)
786 (add_current_inferior_and_thread, wait_ns, wait_as)
787 (process_stop_reply, remote_notice_new_inferior)
788 (process_initial_stop_replies, remote_add_thread)
789 (btrace_sync_conf, remote_btrace_maybe_reopen)
790 (remove_new_fork_children, kill_new_fork_children)
791 (discard_pending_stop_replies, stop_reply_queue_length)
792 (check_pending_events_prevent_wildcard_vcont)
793 (discard_pending_stop_replies_in_queue, stop_reply)
794 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
795 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
796 (remote_interrupt_as, remote_interrupt_ns)
797 (remote_get_noisy_reply, remote_query_attached)
798 (remote_add_inferior, remote_current_thread, get_current_thread)
799 (set_thread, set_general_thread, set_continue_thread)
800 (set_general_process, write_ptid)
801 (remote_unpack_thread_info_response, remote_get_threadinfo)
802 (parse_threadlist_response, remote_get_threadlist)
803 (remote_threadlist_iterator, remote_get_threads_with_ql)
804 (remote_get_threads_with_qxfer)
805 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
806 (get_offsets, remote_check_symbols, remote_supported_packet)
807 (remote_query_supported, remote_packet_size)
808 (remote_serial_quit_handler, remote_detach_pid)
809 (remote_vcont_probe, remote_resume_with_hc)
810 (send_interrupt_sequence, interrupt_query)
811 (remote_notif_get_pending_events, fetch_register_using_p)
812 (send_g_packet, process_g_packet, fetch_registers_using_g)
813 (store_register_using_P, store_registers_using_G)
814 (set_remote_traceframe, check_binary_download)
815 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
816 (remote_xfer_live_readonly_partial, remote_read_bytes)
817 (remote_send_printf, remote_flash_write, readchar)
818 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
819 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
820 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
821 (extended_remote_disable_randomization, extended_remote_run)
822 (send_environment_packet, extended_remote_environment_support)
823 (extended_remote_set_inferior_cwd, remote_write_qxfer)
824 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
825 (packet_command): Now methods of ...
826 (remote_target): ... this class.
827 (m_remote_state) <remote_target>: New field.
828 (struct remote_state) <stop_reply_queue,
829 remote_async_inferior_event_token, wait_forever_enabled_p>: New
830 fields.
831 (remote_state::remote_state): Allocate stop_reply_queue.
832 (remote_state): Delete global.
833 (get_remote_state_raw): Delete.
834 (remote_target::get_remote_state): Allocate m_remote_state on
835 demand.
836 (get_current_remote_target): New.
837 (remote_ops, extended_remote_ops): Delete.
838 (wait_forever_enabled_p, remote_async_inferior_event_token):
839 Delete, moved to struct remote_state.
840 (remote_target::close): Delete self. Destruction bits split to
841 ...
842 (remote_target::~remote_target): ... this.
843 (show_memory_packet_size): Adjust to use
844 get_current_remote_target.
845 (struct protocol_feature) <func>: Add remote_target parameter.
846 All callers adjusted.
847 (curr_quit_handler_target): New.
848 (remote_serial_quit_handler): Reimplement.
849 (remote_target::open_1): Adjust to use get_current_remote_target.
850 Heap-allocate remote_target/extended_remote_target instances.
851 (vcont_builder::vcont_builder): Add remote_target parameter, and
852 save it in m_remote. All callers adjusted.
853 (vcont_builder::m_remote): New field.
854 (vcont_builder::restart, vcont_builder::flush)
855 (vcont_builder::push_action): Use it.
856 (remote_target::commit_resume): Use it.
857 (struct queue_iter_param) <remote>: New field.
858 (remote_target::remove_new_fork_children): Fill in 'remote' field.
859 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
860 (check_pending_event_prevents_wildcard_vcont_callback)
861 (remote_target::check_pending_events_prevent_wildcard_vcont)
862 (remote_target::discard_pending_stop_replies)
863 (remote_target::discard_pending_stop_replies_in_queue)
864 (remote_target::remote_notif_remove_queued_reply): Fill in
865 'remote' field.
866 (remote_notif_get_pending_events): New.
867 (remote_target::readchar, remote_target::remote_serial_write):
868 Save/restore curr_quit_handler_target.
869 (putpkt): New.
870 (kill_new_fork_children): Fill in 'remote' field.
871 (packet_command): Use get_current_remote_target, defer to
872 remote_target method of same name.
873 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
874 parameter, and save it in m_remote. All callers adjusted.
875 (scoped_remote_fd::release): Use m_remote.
876 (scoped_remote_fd::m_remote): New field.
877 (remote_file_put, remote_file_get, remote_file_delete): Use
878 get_current_remote_target, defer to remote_target method of same
879 name.
880 (remote_btrace_reset): Add remote_state paremeter. Update all
881 callers.
882 (remote_async_inferior_event_handler). Pass down 'data'.
883 (remote_new_objfile): Use get_current_remote_target.
884 (remote_target::vcont_r_supported): New.
885 (set_range_stepping): Use get_current_remote_target and
886 remote_target::vcont_r_supported.
887 (_initialize_remote): Don't allocate 'remote_state' and
888 'stop_reply_queue' globals.
889 * remote.h (struct remote_target): Forward declare.
890 (getpkt, putpkt, remote_notif_get_pending_events): Add
891 'remote_target' parameter.
892
893 2018-05-22 Pedro Alves <palves@redhat.com>
894
895 * remote.c (vcont_builder): Now a class. Make all data members
896 private.
897 (vcont_builder) <vcont_builder, restart, flush, push_action>:
898 Declare methods.
899 (vcont_builder_restart): Rename to ...
900 (vcont_builder::restart): ... this.
901 (vcont_builder_flush): Rename to ...
902 (vcont_builder::flush): ... this.
903 (vcont_builder_push_action): Rename to ...
904 (vcont_builder::push_action): ... this.
905 (remote_target::commit_resume): Adjust.
906
907 2018-05-22 Pedro Alves <palves@redhat.com>
908
909 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
910 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
911 (get_fixed_memory_packet_size): New.
912 (get_memory_packet_size): Use it.
913 (set_memory_packet_size): Don't override the config size with
914 DEFAULT_MAX_MEMORY_PACKET_SIZE.
915 (show_memory_packet_size): Use get_fixed_memory_packet_size.
916 Don't refer to get_memory_packet_size if not connected to a remote
917 target. Show "(default)" if configured size is 0.
918
919 2018-05-22 Pedro Alves <palves@redhat.com>
920
921 * remote.c (remote_target::mourn_inferior): Move
922 discard_pending_stop_replies call here from ...
923 (_initialize_remote): ... here.
924
925 2018-05-22 Pedro Alves <palves@redhat.com>
926
927 * remote.c (compare_section_command): Remove set_general_process
928 call.
929
930 2018-05-22 Pedro Alves <palves@redhat.com>
931
932 * remote.c (struct packet_reg, struct remote_arch_state):
933 Move higher up in the file.
934 (remote_state) <m_arch_states>: Store remote_arch_state values
935 instead of remote_arch_state pointers.
936 (remote_state::get_remote_arch_state): Adjust.
937
938 2018-05-22 Pedro Alves <palves@redhat.com>
939
940 * remote.c: Include <unordered_map>.
941 (remote_state): Now a class.
942 (remote_state) <get_remote_arch_state>: Declare method.
943 <get_remote_arch_state>: New field.
944 (remote_arch_state) <remote_arch_state>: Declare ctor.
945 <regs>: Now a unique_ptr.
946 (remote_gdbarch_data_handle): Delete.
947 (get_remote_arch_state): Delete.
948 (remote_state::get_remote_arch_state): New.
949 (get_remote_state): Adjust to call remote_state's
950 get_remote_arch_state method.
951 (init_remote_state): Delete, bits factored out to ...
952 (remote_arch_state::remote_arch_state): ... this new method.
953 (get_remote_packet_size, get_memory_packet_size)
954 (process_g_packet, remote_target::fetch_registers)
955 (remote_target::prepare_to_store, store_registers_using_G)
956 (remote_target::store_registers, remote_target::get_trace_status):
957 Adjust to call remote_state's method.
958 (_initialize_remote): Remove reference to
959 remote_gdbarch_data_handle.
960
961 2018-05-22 Pedro Alves <palves@redhat.com>
962
963 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
964 pread>: New method declarations.
965 (remote_target::open_1): Adjust.
966 (readahead_cache_invalidate): Rename to ...
967 (readahead_cache::invalidate): ... this, and adjust to be a class
968 method.
969 (readahead_cache_invalidate_fd): Rename to ...
970 (readahead_cache::invalidate_fd): ... this, and adjust to be a
971 class method.
972 (remote_hostio_pwrite): Adjust.
973 (remote_hostio_pread_from_cache): Rename to ...
974 (readahead_cache::pread): ... this, and adjust to be a class
975 method.
976 (remote_hostio_close): Adjust.
977
978 2018-05-22 Pedro Alves <palves@redhat.com>
979
980 * remote.c (remote_hostio_close_cleanup): Delete.
981 (class scoped_remote_fd): New.
982 (remote_file_put, remote_file_get): Use it.
983
984 2018-05-22 Pedro Alves <palves@redhat.com>
985
986 (struct vCont_action_support): Use bool and initialize all fields.
987 (struct readahead_cache): Initialize all fields.
988 (remote_state): Use bool and initialize all fields.
989 (remote_state::remote_state, remote_state::~remote_state): New.
990 (new_remote_state): Delete.
991 (_initialize_remote): Use new to allocate remote_state.
992
993 2018-05-22 Pedro Alves <palves@redhat.com>
994 張俊芝 <zjz@zjz.name>
995
996 PR gdb/22973
997 * c-exp.y: Include "c-support.h".
998 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
999 of tolower. Use c_ident_is_alpha to scan names.
1000 * c-lang.c: Include "c-support.h".
1001 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1002 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1003 * c-support.h: New file, with bits factored out from ...
1004 * cp-name-parser.y: ... this file.
1005 Include "c-support.h".
1006 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1007 c-support.h and renamed.
1008 (symbol_end, yylex): Adjust.
1009
1010 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1011
1012 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1013 parameter type to CORE_ADDR.
1014 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1015 parameter type in declaration to CORE_ADDR.
1016 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1017 target_auxv_search to get AT_HWCAP and use the result to get the
1018 target description.
1019 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1020 to CORE_ADDR. Remove the cast of the return value to unsigned
1021 long. Fix error predicate of target_auxv_search.
1022 (ppc_linux_nat_target::read_description): Change the type of the
1023 hwcap variable to CORE_ADDR.
1024
1025 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1026
1027 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1028 if the size of fpscr is larger than 32 bits.
1029
1030 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1031
1032 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1033 (ppc32_linux_vsxregmap): New global.
1034 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1035 regcache_supply_regset, and regcache_collect_regset.
1036 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1037 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1038 (fetch_vsx_register, store_vsx_register): Remove.
1039 (fetch_vsx_registers): Add regno parameter. Get regset using
1040 ppc_linux_vsxregset. Use regset to supply registers.
1041 (store_vsx_registers): Add regno parameter. Get regset using
1042 ppc_linux_vsxregset. Use regset to collect registers.
1043 (fetch_register): Call fetch_vsx_registers instead of
1044 fetch_vsx_register.
1045 (store_register): Call store_vsx_registers instead of
1046 store_vsx_register.
1047 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1048 new regno parameter.
1049 (store_ppc_registers): Call store_vsx_registers with -1 for the
1050 new regno parameter.
1051 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1052 (ppc_collect_vsxregset): Remove.
1053
1054 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1055
1056 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1057 offset fields.
1058 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1059 for vector register offset fields.
1060 (ppc64_fbsd_reg_offsets): Likewise.
1061 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1062 to vector register offset fields.
1063 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1064 to vector register offset fields.
1065 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1066 vector register offset fields.
1067 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1068 initializers for vector register offset fields.
1069 (rs6000_aix64_reg_offsets): Likewise.
1070 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1071 (ppc_supply_vrregset): Remove.
1072 (ppc_collect_vrregset): Remove.
1073 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1074 (ppc_linux_vrregset) : New function.
1075 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1076 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1077 (ppc32_linux_vrregset): Remove.
1078 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1079 and use result instead of ppc32_linux_vrregset.
1080 (ppc32_linux_reg_offsets): Remove initializers for vector register
1081 offset fields.
1082 (ppc64_linux_reg_offsets): Likewise.
1083 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1084 * ppc-linux-nat.c: Include regset.h.
1085 (gdb_vrregset_t): Adjust comment to account for little-endian
1086 mode.
1087 (supply_vrregset, fill_vrregset): Remove.
1088 (fetch_altivec_register, store_altivec_register): Remove.
1089 (fetch_altivec_registers): Add regno parameter. Get regset using
1090 ppc_linux_vrregset. Use regset to supply registers.
1091 (store_altivec_registers): Add regno parameter. Get regset using
1092 ppc_linux_vrregset. Use regset to collect registers.
1093 (fetch_register): Call fetch_altivec_registers instead of
1094 fetch_altivec_register.
1095 (store_register): Call store_altivec_registers instead of
1096 store_altivec_register.
1097 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1098 the new regno parameter.
1099 (store_ppc_registers): Call store_altivec_registers with -1 for
1100 the new regno parameter.
1101
1102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1103
1104 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1105 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1106 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1107 (gdb_vrregset_t): Change array type size to
1108 PPC_LINUX_SIZEOF_VRREGSET.
1109 (gdb_vsxregset_t): Change array type size to
1110 PPC_LINUX_SIZEOF_VSXREGSET.
1111 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1112 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1113 PPC_LINUX_SIZEOF_VSXREGSET.
1114
1115 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1116
1117 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1118 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1119 nat/ppc-linux.c.
1120 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1121 ppc_linux_target_wordsize with tid.
1122 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1123 wordsize with tid.
1124 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1125 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1126 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1127 tid parameter. Remove static specifier.
1128 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1129 (ppc_linux_target_wordsize): New declaration.
1130
1131 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1132
1133 * arch/ppc-linux-common.c: New file.
1134 * arch/ppc-linux-common.h: New file.
1135 * arch/ppc-linux-tdesc.h: New file.
1136 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1137 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1138 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1139 arch/ppc-linux-tdesc.h.
1140 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1141 arch/ppc-linux-tdesc.h.
1142 (ppc_linux_nat_target::read_description): Remove target
1143 description matching code. Fill a ppc_linux_features struct and
1144 call ppc_linux_match_description with it. Move comment about ISA
1145 2.05 to ppc-linux-common.c.
1146 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1147 arch/ppc-linux-tdesc.h.
1148 (ppc_linux_core_read_description): Remove target description
1149 matching code. Fill a ppc_linux_features struct and call
1150 ppc_linux_match_description with it.
1151 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1152 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1153 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1154 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1155 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1156 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1157 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1158 (tdesc_powerpc_e500l): Remove.
1159
1160 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1161
1162 * ada-lang.c (catch_assert_command): Pass empty string instead
1163 of NULL for excep_string argument.
1164
1165 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1166
1167 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1168 the width of the requested register exceeds the width of the
1169 `ptrace' data type.
1170
1171 2018-05-21 Tom Tromey <tom@tromey.com>
1172
1173 * printcmd.c (output_command): Remove.
1174 (output_command_const): Rename to output_command.
1175 * valprint.h (output_command): Rename from output_command_const.
1176 * tracepoint.c (trace_dump_actions): Call output_command.
1177
1178 2018-05-21 Tom Tromey <tom@tromey.com>
1179
1180 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1181 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1182 * ada-lang.h (create_ada_exception_catchpoint): Update.
1183 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1184 std::string.
1185 (create_excep_cond_exprs, ~ada_catchpoint)
1186 (should_stop_exception, print_one_exception)
1187 (print_mention_exception, print_recreate_exception): Update.
1188 (ada_get_next_arg): Remove.
1189 (catch_ada_exception_command_split): Use std::string. Change type
1190 of "excep_string", "cond_string".
1191 (catch_ada_exception_command): Update.
1192 (create_ada_exception_catchpoint): Change type of excep_string.
1193 (ada_exception_sal): Remove excep_string parameter.
1194 (~ada_catchpoint): Remove.
1195
1196 2018-05-21 Tom Tromey <tom@tromey.com>
1197
1198 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1199 cleanup.
1200
1201 2018-05-21 Tom Tromey <tom@tromey.com>
1202
1203 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1204 Return unique_xmalloc_ptr.
1205 (print_it_exception): Update.
1206
1207 2018-05-21 Tom Tromey <tom@tromey.com>
1208
1209 * tracepoint.c (trace_dump_actions): Use std::string.
1210
1211 2018-05-21 Tom Tromey <tom@tromey.com>
1212
1213 * symfile.c (reread_symbols): Use std::string for original_name.
1214
1215 2018-05-21 Tom Tromey <tom@tromey.com>
1216
1217 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1218 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1219 constructor.
1220
1221 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1222
1223 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1224 instance to...
1225 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1226 * objfiles.c (get_objfile_bfd_data): Allocate
1227 objfile_per_bfd_storage with obstack_new when allocating on
1228 obstack.
1229
1230 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1233 OBSTACK_ZALLOC.
1234 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1235 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1236 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1237 (add_pending): Likewise.
1238 (parse_symbol): Likewise.
1239 (parse_partial_symbols): Likewise.
1240 (psymtab_to_symtab_1): Likewise.
1241 (new_psymtab): Likewise.
1242 (elfmdebug_build_psymtabs): Likewise.
1243 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1244 * objfiles.c (get_objfile_bfd_data): Likewise.
1245 (objfile_register_static_link): Likewise.
1246 * psymtab.c (allocate_psymtab): Likewise.
1247 * stabsread.c (read_member_functions): Likewise.
1248 * xcoffread.c (xcoff_end_psymtab): Likewise.
1249
1250 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1251
1252 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1253 compiler supports std::is_trivially_constructible.
1254 * common/poison.h: Include obstack.h.
1255 (IsMallocable): Define to is_trivially_constructible if the
1256 compiler supports it, define to true_type otherwise.
1257 (xobnew): New.
1258 (XOBNEW): Redefine.
1259 (xobnewvec): New.
1260 (XOBNEWVEC): Redefine.
1261 * gdb_obstack.h (obstack_zalloc): New.
1262 (OBSTACK_ZALLOC): Redefine.
1263 (obstack_calloc): New.
1264 (OBSTACK_CALLOC): Redefine.
1265 (obstack_new): New.
1266 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1267 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1268 gdbarch.c.
1269 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1270 obstack_calloc/obstack_zalloc.
1271 (gdbarch_obstack_zalloc): Remove.
1272 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1273
1274 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1275
1276 * stack.c (backtrace_command_1): Remove useless variable int i.
1277
1278 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1279
1280 * stack.c (print_frame_info): Fix comment.
1281
1282 2018-05-18 Tom Tromey <tom@tromey.com>
1283
1284 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1285 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1286 (~dwarf2_per_objfile): Update
1287 (dwarf2_get_dwz_file): Use new.
1288 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1289 unique_ptr.
1290
1291 2018-05-18 Tom Tromey <tom@tromey.com>
1292
1293 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1294 unique_ptr.
1295 * dwarf2read.c (struct dwp_file): Add constructor and
1296 initializers.
1297 (open_and_init_dwp_file): Return a unique_ptr.
1298 (dwarf2_per_objfile, create_dwp_hash_table)
1299 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1300 (lookup_dwo_unit_in_dwp): Update.
1301 (open_and_init_dwp_file, get_dwp_file): Update.
1302
1303 2018-05-18 Tom Tromey <tom@tromey.com>
1304
1305 * dwarf2read.c (dwarf2_per_objfile): Update.
1306 (struct mapped_index): Add initializers.
1307 (dwarf2_read_index): Use new.
1308 (dw2_symtab_iter_init): Update.
1309 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1310 unique_ptr.
1311
1312 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1313
1314 * dwarf2read.c (mapped_index) <total_size>: Remove.
1315
1316 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1317
1318 * unittests/format_pieces-selftests.c (test_format_specifier):
1319 Add ARI comments.
1320
1321 2018-05-18 Tom Tromey <tom@tromey.com>
1322
1323 * c-typeprint.c (maybe_print_hole): New function.
1324 (c_print_type_struct_field_offset): Update.
1325 (c_type_print_base_struct_union): Call maybe_print_hole.
1326
1327 2018-05-17 Keith Seitz <keiths@redhat.com>
1328
1329 * breakpoint.c (build_bpstat_chain): New function, moved from
1330 bpstat_stop_status.
1331 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1332 If no stop chain is passed, call build_bpstat_chain to build it.
1333 * breakpoint.h (build_bpstat_chain): Declare.
1334 (bpstat_stop_status): Move documentation here from breakpoint.c.
1335 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1336 build the stop chain and pass it to skip_inline_frames.
1337 Pass this stop chain to bpstat_stop_status.
1338 * inline-frame.c: Include breakpoint.h.
1339 (stopped_by_user_bp_inline_frame): New function.
1340 (skip_inline_frames): Add parameter `stop_chain'.
1341 Move documention to inline-frame.h.
1342 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1343 whether the frame should be elided.
1344 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1345 Add moved documentation and update for new parameter.
1346
1347 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 PR cli/14975
1350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1351 unittests/format_pieces-selftests.c.
1352 * common/format.h (format_piece) <operator==>: New.
1353 (format_pieces) <operator[]>: Remove.
1354 * common/format.c (format_pieces::format_pieces): Handle \e.
1355 * unittests/format_pieces-selftests.c: New.
1356
1357 2018-05-17 Tom Tromey <tom@tromey.com>
1358
1359 PR symtab/23010:
1360 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1361 (dw2_instantiate_symtab): Add skip_partial parameter.
1362 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1363 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1364 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1365 (dw2_expand_symtabs_matching_one)
1366 (dw2_find_pc_sect_compunit_symtab)
1367 (dw2_debug_names_lookup_symbol)
1368 (dw2_debug_names_expand_symtabs_for_function): Update.
1369 (init_cutu_and_read_dies): Add skip_partial parameter.
1370 (process_psymtab_comp_unit, build_type_psymtabs_1)
1371 (process_skeletonless_type_unit, load_partial_comp_unit)
1372 (psymtab_to_symtab_1): Update.
1373 (load_full_comp_unit): Add skip_partial parameter.
1374 (process_imported_unit_die, dwarf2_read_addr_index)
1375 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1376 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1377 (read_signatured_type): Update.
1378
1379 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * value.c (release_value): Remove unused variable.
1382 (record_latest_value): Likewise.
1383 (access_value_history): Likewise.
1384 (preserve_values): Likewise.
1385
1386 2018-05-17 Tom Tromey <tom@tromey.com>
1387
1388 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1389 Initialize.
1390
1391 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1392
1393 PR gdb/22286
1394 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1395 Also handle registers whose width is not a multiple of
1396 PTRACE_TYPE_RET.
1397 (linux_nat_trad_target::store_register): Likewise.
1398
1399 2018-05-16 Tom Tromey <tom@tromey.com>
1400
1401 * gdbcore.h (core_bfd): Redefine.
1402 * corelow.c (core_target::close): Update.
1403 (core_target_open): Update.
1404 * progspace.h (struct program_space) <cbfd>: Now a
1405 gdb_bfd_ref_ptr.
1406
1407 2018-05-16 Tom Tromey <tom@tromey.com>
1408
1409 PR cli/19551:
1410 * symfile-add-flags.h (enum symfile_add_flags)
1411 <SYMFILE_NOT_FILENAME>: New constant.
1412 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1413 objfile name from BFD.
1414 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1415 * minidebug.c (find_separate_debug_file_in_section): Put
1416 ".gnu_debugdata" into BFD's file name.
1417
1418 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1419
1420 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1421 Remove.
1422
1423 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1424
1425 PR binutils/21446
1426 * aarch64-tdep.c (aarch64_analyze_prologue,
1427 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1428 Indicate not interested in errors.
1429
1430 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1431
1432 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1433 Supply the MIPS_ZERO_REGNUM register.
1434
1435 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1436
1437 * mips-tdep.c (mask_address_var): Make variable static.
1438
1439 2018-05-14 Tom Tromey <tom@tromey.com>
1440
1441 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1442
1443 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1444
1445 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1446 FXSAVE_ADDR for the mxcsr register.
1447
1448 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1449
1450 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1451
1452 2018-05-11 Pedro Alves <palves@redhat.com>
1453
1454 * corelow.c (core_target) <core_target>: No longer inline.
1455 Initialize m_core_gdbarch, m_core_vec and build the section table
1456 here.
1457 <~core_target>: New.
1458 <core_gdbarch, get_core_register_section>: New methods.
1459 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1460 factored out from ...
1461 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1462 (core_ops): Delete.
1463 (sniff_core_bfd): Add gdbarch parameter.
1464 (core_close): Delete, merged into ...
1465 (core_target::close): ... here. Delete self.
1466 (core_close_cleanup): Delete.
1467 (core_target_open): Allocate a core_target on the heap. Use a
1468 unique_ptr instead of a cleanup. Bits moved into the core_target
1469 ctor. Adjust to use core_target methods instead of globals.
1470 (get_core_register_section): Rename to ...
1471 (core_target::get_core_register_section): ... this and adjust.
1472 (struct get_core_registers_cb_data): New.
1473 (get_core_registers_cb): Use it. Use bool.
1474 (core_target::fetch_registers, core_target::files_info)
1475 (core_target::xfer_partial, core_target::read_description)
1476 (core_target::pid_to, core_target::thread_name): Adjust to
1477 reference class fields instead of globals.
1478 * target.h (struct target_ops_deleter, target_ops_up): New.
1479
1480 2018-05-11 Pedro Alves <palves@redhat.com>
1481
1482 * corefile.c (core_file_command): Move to corelow.c.
1483 * corelow.c (the_core_target): Delete.
1484 (core_file_command): Moved from corefile.c. Check exec_bfd
1485 instead of the_core_target. Use target_detach instead of calling
1486 into the_core_target directly.
1487 (maybe_say_no_core_file_now): New.
1488 (core_target::detach): Use it.
1489 (_initialize_corelow): Remove references to the_core_target.
1490 * gdbcore.h (the_core_target): Delete.
1491
1492 2018-05-11 Tom Tromey <tromey@redhat.com>
1493 Pedro Alves <palves@redhat.com>
1494
1495 * corefile.c (core_bfd): Remove.
1496 * gdbcore.h (core_bfd): Now a macro.
1497 * progspace.h (struct program_space) <cbfd>: New field.
1498
1499 2018-05-11 Tom Tromey <tom@tromey.com>
1500
1501 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1502 gdb::def_vector.
1503
1504 2018-05-10 Tom Tromey <tom@tromey.com>
1505
1506 * configure: Rebuild.
1507 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1508
1509 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1510
1511 PR server/23158:
1512 * regformats/regdat.sh: Adjust script, following the addition
1513 of the new expedite_regs parameter to init_target_desc.
1514
1515 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1516
1517 PR gdb/23127
1518 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1519 set_gdbarch_significant_addr_bit.
1520 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1521 set_gdbarch_significant_addr_bit.
1522 * utils.c (address_significant): Update to sign extend addr.
1523
1524 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1525
1526 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1527 (xtensa_linux_init_abi): Limit tdep->num_regs by
1528 tdep->num_nopriv_regs.
1529 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1530 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1531 not initialized.
1532
1533 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1534
1535 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1536
1537 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1538
1539 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1540 (I387_MXCSR_INIT_VAL): New constant.
1541 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1542 buffer if it was supplied by the inferior.
1543 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1544 (i387_xsave_get_clear_bv): New function.
1545 (i387_supply_xsave): Only read x87 control registers from the
1546 xsave buffer if the feature is enabled, and the state will have
1547 been written, otherwise, provide a suitable default.
1548 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1549 including x87 control registers. Update control registers if they
1550 have changed from the default value, and mark features as enabled
1551 as required.
1552 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1553
1554 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1555
1556 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1557
1558 2018-05-07 Tom Tromey <tom@tromey.com>
1559
1560 * configure: Rebuild.
1561 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1562
1563 2018-05-07 Tom Tromey <tom@tromey.com>
1564
1565 PR tdep/20362:
1566 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1567 bit. Use correct value for VDIV.
1568
1569 2018-05-04 Tom Tromey <tom@tromey.com>
1570
1571 * configure: Rebuild.
1572 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1573
1574 2018-05-04 Tom Tromey <tom@tromey.com>
1575
1576 * linux-record.c (record_linux_system_call) <case
1577 RECORD_SYS_RECVFROM>: Add "break".
1578
1579 2018-05-04 Tom Tromey <tom@tromey.com>
1580
1581 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1582 Add missing "break".
1583 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1584 Add missing "break".
1585
1586 2018-05-04 Tom Tromey <tom@tromey.com>
1587
1588 * rs6000-tdep.c (ppc_process_record_op4)
1589 (ppc_process_record_op63): Add fall-through comment.
1590
1591 2018-05-04 Tom Tromey <tom@tromey.com>
1592
1593 * i386-tdep.c (i386_process_record): Add fall-through comment.
1594
1595 2018-05-04 Tom Tromey <tom@tromey.com>
1596
1597 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1598 comment.
1599
1600 2018-05-04 Tom Tromey <tom@tromey.com>
1601
1602 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1603 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1604 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1605 comment.
1606 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1607 comment.
1608 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1609 comment.
1610
1611 2018-05-04 Tom Tromey <tom@tromey.com>
1612
1613 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1614
1615 2018-05-04 Tom Tromey <tom@tromey.com>
1616
1617 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1618 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1619 * symfile.c (section_is_mapped): Fix fall-through comment.
1620 * stabsread.c (define_symbol, read_member_functions): Fix
1621 fall-through comment.
1622 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1623 comment.
1624 * remote.c (remote_wait_as): Fix fall-through comment.
1625 * p-exp.y (yylex): Fix fall-through comment.
1626 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1627 comment.
1628 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1629 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1630 * jv-exp.y (yylex): Fix fall-through comment.
1631 * go-exp.y (lex_one_token): Fix fall-through comment.
1632 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1633 fall-through comment.
1634 * f-exp.y (yylex): Fix fall-through comment.
1635 * dwarf2read.c (process_die): Fix fall-through comments.
1636 * dbxread.c (process_one_symbol): Fix fall-through comment.
1637 * d-exp.y (lex_one_token): Fix fall-through comment.
1638 * cp-name-parser.y (yylex): Fix fall-through comment.
1639 * coffread.c (coff_symtab_read): Fix fall-through comment.
1640 * c-exp.y (lex_one_token): Fix fall-through comment.
1641 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1642 comment.
1643 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1644 comment.
1645
1646 2018-05-04 Tom Tromey <tom@tromey.com>
1647
1648 PR python/22730:
1649 * NEWS: Mention gdb.execute change.
1650 * gdbcmd.h (execute_control_command): Don't declare.
1651 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1652 execute_control_commands, execute_control_commands_to_string.
1653 * cli/cli-script.h (execute_control_commands)
1654 (execute_control_commands_to_string): Declare.
1655 (execute_control_command): Add from_tty parameter.
1656 * cli/cli-script.c (execute_control_commands)
1657 (execute_control_commands_to_string): New functions.
1658 (execute_user_command): Use execute_control_commands.
1659 (execute_control_command_1): Add "from_tty" parameter. Update.
1660 (execute_control_command): Likewise.
1661
1662 2018-05-04 Tom Tromey <tom@tromey.com>
1663
1664 PR python/22731:
1665 * NEWS: Mention that breakpoint commands are writable.
1666 * python/py-breakpoint.c (bppy_set_commands): New function.
1667 (breakpoint_object_getset) <"commands">: Use it.
1668
1669 2018-05-04 Tom Tromey <tom@tromey.com>
1670
1671 * tracepoint.c (actions_command): Update.
1672 * mi/mi-cmd-break.c (mi_command_line_array)
1673 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1674 (mi_read_next_line): Remove.
1675 (mi_cmd_break_commands): Update.
1676 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1677 function_view.
1678 * cli/cli-script.c (get_command_line): Update.
1679 (process_next_line): Use function_view. Constify.
1680 (recurse_read_control_structure, read_command_lines)
1681 (read_command_lines_1): Change argument types to function_view.
1682 (do_define_command, document_command): Update.
1683 * breakpoint.h (check_tracepoint_command): Don't declare.
1684 * breakpoint.c (check_tracepoint_command): Remove.
1685 (commands_command_1, create_tracepoint_from_upload): Update.
1686
1687 2018-05-04 Tom Tromey <tom@tromey.com>
1688
1689 PR gdb/11750:
1690 * cli/cli-script.h (enum command_control_type) <define_control>:
1691 New constant.
1692 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1693 (build_command_line, execute_control_command_1)
1694 (process_next_line): Likewise.
1695 (do_define_command): New function, extracted from define_command.
1696 (define_command): Use it.
1697
1698 2018-05-04 Tom Tromey <tom@tromey.com>
1699
1700 * tracepoint.c (actions_command): Update.
1701 * cli/cli-script.h (read_command_lines): Update.
1702 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1703 (MAX_TMPBUF): Remove define.
1704 (define_command): Use string_printf.
1705 (document_command): Likewise.
1706 * breakpoint.c (commands_command_1): Update.
1707
1708 2018-05-04 Tom Tromey <tom@tromey.com>
1709
1710 * top.c (execute_command): Update.
1711 * cli/cli-script.h (print_command_lines): Now varargs.
1712 * cli/cli-script.c (print_command_lines): Now varargs.
1713 (execute_control_command_1) <case while_control, case if_control>:
1714 Update.
1715
1716 2018-05-04 Tom Tromey <tom@tromey.com>
1717
1718 * tracepoint.c (all_tracepoint_actions): Rename from
1719 all_tracepoint_actions_and_cleanup. Change return type.
1720 (actions_command, encode_actions_1, encode_actions)
1721 (trace_dump_actions, tdump_command): Update.
1722 * remote.c (remote_download_command_source): Update.
1723 * python/python.c (gdbpy_eval_from_control_command)
1724 (python_command, python_interactive_command): Update.
1725 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1726 * guile/guile.c (guile_command)
1727 (gdbscm_eval_from_control_command, guile_command): Update.
1728 * compile/compile.c (compile_code_command)
1729 (compile_print_command, compile_to_object): Update.
1730 * cli/cli-script.h (struct command_lines_deleter): New.
1731 (counted_command_line): New typedef.
1732 (struct command_line): Add constructor, destructor.
1733 <body_list>: Remove.
1734 <body_list_0, body_list_1>: New members.
1735 (command_line_up): Remove typedef.
1736 (read_command_lines, read_command_lines_1, get_command_line):
1737 Update.
1738 (copy_command_lines): Don't declare.
1739 * cli/cli-script.c (build_command_line): Use "new".
1740 (get_command_line): Return counted_command_line.
1741 (print_command_lines, execute_user_command)
1742 (execute_control_command_1, while_command, if_command): Update.
1743 (realloc_body_list): Remove.
1744 (process_next_line, recurse_read_control_structure): Update.
1745 (read_command_lines, read_command_lines_1): Return counted_command_line.
1746 (free_command_lines): Use "delete".
1747 (copy_command_lines): Remove.
1748 (define_command, document_command, show_user_1): Update.
1749 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1750 a counted_command_line.
1751 * breakpoint.h (counted_command_line): Remove typedef.
1752 (breakpoint_set_commands): Update.
1753 * breakpoint.c (check_no_tracepoint_commands)
1754 (validate_commands_for_breakpoint): Update.
1755 (breakpoint_set_commands): Change commands to be a
1756 counted_command_line.
1757 (commands_command_1, update_dprintf_command_list)
1758 (create_tracepoint_from_upload): Update.
1759
1760 2018-05-04 Tom Tromey <tom@tromey.com>
1761
1762 * cli/cli-decode.h (cmd_list_element): New constructor.
1763 (~cmd_list_element): New destructor.
1764 (struct cmd_list_element): Add initializers.
1765 * cli/cli-decode.c (do_add_cmd): Use "new".
1766 (delete_cmd): Use "delete".
1767
1768 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1769 Pedro Alves <palves@redhat.com>
1770
1771 PR breakpoints/19806 and support for PR external/20207.
1772 * NEWS: Mention Aarch64 watchpoint improvements.
1773 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1774 watchpoints and PR external/20207 watchpoints.
1775 * nat/aarch64-linux-hw-point.c
1776 (kernel_supports_any_contiguous_range): New.
1777 (aarch64_watchpoint_offset): New.
1778 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1779 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1780 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1781 (aarch64_align_watchpoint): New parameters aligned_offset_p and
1782 next_addr_orig_p. Support PR external/20207 watchpoints.
1783 (aarch64_downgrade_regs): New.
1784 (aarch64_dr_state_insert_one_point): New parameters offset and
1785 addr_orig.
1786 (aarch64_dr_state_remove_one_point): Likewise.
1787 (aarch64_handle_breakpoint): Update caller.
1788 (aarch64_handle_aligned_watchpoint): Likewise.
1789 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1790 aligned_offset.
1791 (aarch64_linux_set_debug_regs): Remove const from state. Call
1792 aarch64_downgrade_regs.
1793 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1794 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1795 (DR_CONTROL_MASK): ... this.
1796 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1797 (unsigned int aarch64_watchpoint_offset): New prototype.
1798 (aarch64_linux_set_debug_regs): Remove const from state.
1799 * utils.c (align_up, align_down): Move to ...
1800 * common/common-utils.c (align_up, align_down): ... here.
1801 * utils.h (align_up, align_down): Move to ...
1802 * common/common-utils.h (align_up, align_down): ... here.
1803
1804 2018-05-04 Joel Brobecker <brobecker@adacore.com>
1805
1806 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1807 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1808 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1809 Re-implement to match the ABI as summarized in GCC's
1810 gcc/config/sparc/sparc.c. All callers updated.
1811 (sparc32_store_arguments): Remove assertion.
1812
1813 2018-05-04 Tom Tromey <tom@tromey.com>
1814
1815 * printcmd.c: Don't include tui.h.
1816 (decode_format): Use skip_spaces.
1817
1818 2018-05-04 Tom Tromey <tom@tromey.com>
1819
1820 PR gdb/22619:
1821 * printcmd.c (last_count): New global.
1822 (x_command): Use saved count when repeating.
1823
1824 2018-05-04 Tom Tromey <tom@tromey.com>
1825
1826 * nto-procfs.c (do_closedir_cleanup): Remove.
1827 (procfs_pidlist): Use gdb_dir_up.
1828 * procfs.c (do_closedir_cleanup): Remove.
1829 (proc_update_threads): Use gdb_dir_up.
1830 * common/filestuff.h (struct gdb_dir_deleter): New.
1831 (gdb_dir_up): New typedef.
1832
1833 2018-05-04 Tom Tromey <tom@tromey.com>
1834
1835 * ada-lang.c (print_mention_exception): Use std::string.
1836
1837 2018-05-04 Tom Tromey <tom@tromey.com>
1838
1839 * ada-lang.c (create_excep_cond_exprs): Update.
1840 (ada_exception_catchpoint_cond_string): Use std::string.
1841
1842 2018-05-04 Tom Tromey <tom@tromey.com>
1843
1844 * ada-lang.c (xget_renaming_scope): Return std::string.
1845 (old_renaming_is_invisible): Update.
1846
1847 2018-05-04 Tom Tromey <tom@tromey.com>
1848
1849 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1850 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1851
1852 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
1853
1854 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1855
1856 2018-05-04 Tom Tromey <tom@tromey.com>
1857
1858 * remote.c (remote_query_supported_append): Change type.
1859 (remote_check_symbols): Update.
1860
1861 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
1862
1863 PR gdb/11420
1864 * configure.ac: Prepend libpython.
1865 * python/python-config.py: Likewise.
1866 * configure: Regenerate.
1867
1868 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
1869
1870 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1871
1872 2018-05-03 Pedro Alves <palves@redhat.com>
1873
1874 * s390-linux-nat.c
1875 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1876 override. Write 'true' instead of '1'.
1877 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1878 declaration.
1879
1880 2018-05-02 Pedro Alves <palves@redhat.com>
1881
1882 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1883 add_inf_child_target.
1884 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1885 add_inf_child_target.
1886 * aix-thread.c (aix_thread_target_info): New.
1887 (aix_thread_target) <shortname, longname, doc>: Delete.
1888 <info>: New.
1889 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1890 add_inf_child_target.
1891 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1892 add_inf_child_target.
1893 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1894 add_inf_child_target.
1895 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1896 add_inf_child_target.
1897 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1898 add_inf_child_target.
1899 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1900 add_inf_child_target.
1901 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1902 add_inf_child_target.
1903 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1904 add_inf_child_target.
1905 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1906 add_inf_child_target.
1907 * bfd-target.c (target_bfd_target_info): New.
1908 (target_bfd) <shortname, longname, doc>: Delete.
1909 <info>: New.
1910 * bsd-kvm.c (bsd_kvm_target_info): New.
1911 (bsd_kvm_target) <shortname, longname, doc>: Delete.
1912 <info>: New.
1913 (bsd_kvm_target::open): Rename to ...
1914 (bsd_kvm_target_open): ... this. Adjust.
1915 * bsd-uthread.c (bsd_uthread_target_info): New.
1916 (bsd_uthread_target) <shortname, longname, doc>: Delete.
1917 <info>: New.
1918 * corefile.c (core_file_command): Adjust.
1919 * corelow.c (core_target_info): New.
1920 (core_target) <shortname, longname, doc>: Delete.
1921 <info>: New.
1922 (core_target::open): Rename to ...
1923 (core_target_open): ... this. Adjust.
1924 * ctf.c (ctf_target_info): New.
1925 (ctf_target) <shortname, longname, doc>: Delete.
1926 <info>: New.
1927 (ctf_target::open): Rename to ...
1928 (ctf_target_open): ... this.
1929 (_initialize_ctf): Adjust.
1930 * exec.c (exec_target_info): New.
1931 (exec_target) <shortname, longname, doc>: Delete.
1932 <info>: New.
1933 (exec_target::open): Rename to ...
1934 (exec_target_open): ... this.
1935 * gdbcore.h (core_target_open): Declare.
1936 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1937 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1938 add_inf_child_target.
1939 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1940 add_inf_child_target.
1941 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1942 add_inf_child_target.
1943 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1944 add_inf_child_target.
1945 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1946 add_inf_child_target.
1947 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1948 add_inf_child_target.
1949 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1950 add_inf_child_target.
1951 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1952 add_inf_child_target.
1953 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1954 add_inf_child_target.
1955 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1956 add_inf_child_target.
1957 * inf-child.c (inf_child_target_info): New.
1958 (inf_child_target::info): New.
1959 (inf_child_open_target): Remove 'target' parameter. Use
1960 get_native_target instead.
1961 (inf_child_target::open): Delete.
1962 (add_inf_child_target): New.
1963 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1964 Delete.
1965 <info>: New.
1966 (add_inf_child_target): Declare.
1967 (inf_child_open_target): Declare.
1968 * linux-thread-db.c (thread_db_target_info): New.
1969 (thread_db_target) <shortname, longname, doc>: Delete.
1970 <info>: New.
1971 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1972 add_inf_child_target.
1973 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1974 add_inf_child_target.
1975 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1976 add_inf_child_target.
1977 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1978 add_inf_child_target.
1979 * make-target-delegates (print_class): Adjust.
1980 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1981 add_inf_child_target.
1982 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1983 add_inf_child_target.
1984 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1985 add_inf_child_target.
1986 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1987 add_inf_child_target.
1988 * nto-procfs.c (nto_native_target_info): New.
1989 (nto_procfs_target_native) <shortname, longname, doc>:
1990 Delete.
1991 <info>: New.
1992 (nto_procfs_target_info): New.
1993 (nto_procfs_target_procfs) <shortname, longname, doc>:
1994 Delete.
1995 <info>: New.
1996 (init_procfs_targets): Adjust.
1997 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1998 add_inf_child_target.
1999 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2000 add_inf_child_target.
2001 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2002 add_inf_child_target.
2003 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2004 add_inf_child_target.
2005 * ravenscar-thread.c (ravenscar_target_info): New.
2006 (ravenscar_thread_target) <shortname, longname, doc>:
2007 Delete.
2008 <info>: New.
2009 * record-btrace.c (record_btrace_target_info):
2010 (record_btrace_target) <shortname, longname, doc>: Delete.
2011 <info>: New.
2012 (record_btrace_target::open): Rename to ...
2013 (record_btrace_target_open): ... this. Adjust.
2014 * record-full.c (record_longname, record_doc): New.
2015 (record_full_base_target) <shortname, longname, doc>: Delete.
2016 <info>: New.
2017 (record_full_target_info): New.
2018 (record_full_target): <shortname>: Delete.
2019 <info>: New.
2020 (record_full_core_open_1, record_full_open_1): Update comments.
2021 (record_full_base_target::open): Rename to ...
2022 (record_full_open): ... this.
2023 (cmd_record_full_restore): Update.
2024 (_initialize_record_full): Update.
2025 * remote-sim.c (remote_sim_target_info): New.
2026 (gdbsim_target) <shortname, longname, doc>: Delete.
2027 <info>: New.
2028 (gdbsim_target::open): Rename to ...
2029 (gdbsim_target_open): ... this.
2030 (_initialize_remote_sim): Adjust.
2031 * remote.c (remote_doc): New.
2032 (remote_target_info): New.
2033 (remote_target) <shortname, longname, doc>: Delete.
2034 <info>: New.
2035 (extended_remote_target_info): New.
2036 (extended_remote_target) <shortname, longname, doc>: Delete.
2037 <info>: New.
2038 (remote_target::open_1): Make static. Adjust.
2039 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2040 * s390-linux-nat.c (_initialize_s390_nat): Use
2041 add_inf_child_target.
2042 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2043 add_inf_child_target.
2044 * sol-thread.c (thread_db_target_info): New.
2045 (sol_thread_target) <shortname, longname, doc>: Delete.
2046 <info>: New.
2047 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2048 add_inf_child_target.
2049 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2050 add_inf_child_target.
2051 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2052 add_inf_child_target.
2053 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2054 add_inf_child_target.
2055 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2056 add_inf_child_target.
2057 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2058 add_inf_child_target.
2059 * spu-linux-nat.c (_initialize_spu_nat): Use
2060 add_inf_child_target.
2061 * spu-multiarch.c (spu_multiarch_target_info): New.
2062 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2063 <info>: New.
2064 * target-delegates.c: Regenerate.
2065 * target.c: Include <unordered_map>.
2066 (target_ops_p): Delete.
2067 (DEF_VEC_P(target_ops_p)): Delete.
2068 (target_factories): New.
2069 (test_target_info): New.
2070 (test_target_ops::info): New.
2071 (open_target): Adjust to use target_factories.
2072 (add_target_with_completer): Rename to ...
2073 (add_target): ... this. Change prototype. Register target_info
2074 and open callback in target_factories. Register target_info in
2075 command context instead of target_ops.
2076 (add_target): Delete old implementation.
2077 (add_deprecated_target_alias): Change prototype. Adjust.
2078 (the_native_target): New.
2079 (set_native_target, get_native_target): New.
2080 (find_default_run_target): Use the_native_target.
2081 (find_attach_target, find_run_target): Simplify.
2082 (target_ops::open): Delete.
2083 (dummy_target_info): New.
2084 (dummy_target::shortname, dummy_target::longname)
2085 (dummy_target::doc): Delete.
2086 (dummy_target::info): New.
2087 (debug_target::shortname, debug_target::longname)
2088 (debug_target::doc): Delete.
2089 (debug_target::info): New.
2090 * target.h (struct target_info): New.
2091 (target_ops::~target_ops): Add comment.
2092 (target_ops::info): New.
2093 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2094 longer virtual. Implement in terms of target_info.
2095 (set_native_target, get_native_target): Declare.
2096 (target_open_ftype): New.
2097 (add_target, add_target_with_completer)
2098 (add_deprecated_target_alias): Change prototype.
2099 (test_target) <shortname, longname, doc>: Delete.
2100 <info>: New.
2101 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2102 add_inf_child_target.
2103 * tracefile-tfile.c (tfile_target_info): New.
2104 (tfile_target) <shortname, longname, doc>: Delete.
2105 <info>: New.
2106 (tfile_target::open): Rename to ...
2107 (tfile_target_open): ... this.
2108 (_initialize_tracefile_tfile): Adjust.
2109 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2110 add_inf_child_target.
2111 * windows-nat.c (_initialize_windows_nat): Use
2112 add_inf_child_target.
2113 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2114 add_inf_child_target.
2115
2116 2018-05-02 Pedro Alves <palves@redhat.com>
2117
2118 * linux-nat.h (linux_nat_target) <low_new_thread,
2119 low_delete_thread, low_new_fork, low_forget_process,
2120 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2121 New virtual methods.
2122 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2123 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2124 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2125 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2126 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2127 Delete.
2128 * linux-fork.c (delete_fork): Adjust to call low method.
2129 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2130 (linux_nat_new_fork, linux_nat_forget_process_hook)
2131 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2132 (linux_nat_status_is_event):
2133 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2134 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2135 to call low method.
2136 (sigtrap_is_event): Rename to ...
2137 (linux_nat_target::low_status_is_event): ... this.
2138 (linux_nat_set_status_is_event): Delete.
2139 (save_stop_reason, linux_nat_wait_1)
2140 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2141 low methods.
2142 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2143 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2144 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2145 (linux_nat_set_prepare_to_resume): Delete.
2146 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2147 low virtual methods.
2148 * amd64-linux-nat.c: Likewise.
2149 * arm-linux-nat.c: Likewise.
2150 * i386-linux-nat.c: Likewise.
2151 * ia64-linux-nat.c: Likewise.
2152 * mips-linux-nat.c: Likewise.
2153 * ppc-linux-nat.c: Likewise.
2154 * s390-linux-nat.c: Likewise.
2155 * sparc64-linux-nat.c: Likewise.
2156 * x86-linux-nat.c: Likewise.
2157 * x86-linux-nat.h: Include "nat/x86-linux.h".
2158 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2159 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2160 Override methods.
2161
2162 2018-05-02 Pedro Alves <palves@redhat.com>
2163
2164 * target.h (target_ops)
2165 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2166 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2167 stopped_by_watchpoint, have_continuable_watchpoint,
2168 stopped_data_address, watchpoint_addr_within_range,
2169 can_accel_watchpoint_condition, can_run, thread_alive,
2170 has_all_memory, has_memory, has_stack, has_registers,
2171 has_execution, can_async_p, is_async_p, supports_non_stop,
2172 always_non_stop_p, can_execute_reverse, supports_multi_process,
2173 supports_enable_disable_tracepoint,
2174 supports_disable_randomization, supports_string_tracing,
2175 supports_evaluation_of_breakpoint_conditions,
2176 can_run_breakpoint_commands, filesystem_is_local,
2177 can_download_tracepoint, get_trace_state_variable_value,
2178 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2179 record_is_replaying, record_will_replay,
2180 augmented_libraries_svr4_read>: Adjust to return bool.
2181 * aarch64-linux-nat.c: All implementations adjusted.
2182 * aix-thread.c: All implementations adjusted.
2183 * arm-linux-nat.c: All implementations adjusted.
2184 * breakpoint.c: All implementations adjusted.
2185 * bsd-kvm.c: All implementations adjusted.
2186 * bsd-uthread.c: All implementations adjusted.
2187 * corelow.c: All implementations adjusted.
2188 * ctf.c: All implementations adjusted.
2189 * darwin-nat.c: All implementations adjusted.
2190 * darwin-nat.h: All implementations adjusted.
2191 * exec.c: All implementations adjusted.
2192 * fbsd-nat.c: All implementations adjusted.
2193 * fbsd-nat.h: All implementations adjusted.
2194 * gnu-nat.c: All implementations adjusted.
2195 * gnu-nat.h: All implementations adjusted.
2196 * go32-nat.c: All implementations adjusted.
2197 * ia64-linux-nat.c: All implementations adjusted.
2198 * inf-child.c: All implementations adjusted.
2199 * inf-child.h: All implementations adjusted.
2200 * inf-ptrace.c: All implementations adjusted.
2201 * inf-ptrace.h: All implementations adjusted.
2202 * linux-nat.c: All implementations adjusted.
2203 * linux-nat.h: All implementations adjusted.
2204 * mips-linux-nat.c: All implementations adjusted.
2205 * nto-procfs.c: All implementations adjusted.
2206 * ppc-linux-nat.c: All implementations adjusted.
2207 * procfs.c: All implementations adjusted.
2208 * ravenscar-thread.c: All implementations adjusted.
2209 * record-btrace.c: All implementations adjusted.
2210 * record-full.c: All implementations adjusted.
2211 * remote-sim.c: All implementations adjusted.
2212 * remote.c: All implementations adjusted.
2213 * s390-linux-nat.c: All implementations adjusted.
2214 * sol-thread.c: All implementations adjusted.
2215 * spu-multiarch.c: All implementations adjusted.
2216 * target-delegates.c: All implementations adjusted.
2217 * target.c: All implementations adjusted.
2218 * target.h: All implementations adjusted.
2219 * tracefile-tfile.c: All implementations adjusted.
2220 * tracefile.c: All implementations adjusted.
2221 * tracefile.h: All implementations adjusted.
2222 * windows-nat.c: All implementations adjusted.
2223 * x86-linux-nat.h: All implementations adjusted.
2224 * x86-nat.h: All implementations adjusted.
2225
2226 2018-05-02 Pedro Alves <palves@redhat.com>
2227
2228 * make-target-delegates (scan_target_h): Don't trim lines here.
2229 Replace sequences of tabs and/or whitespace with a single
2230 whitespace.
2231 (top level, parsing methods): Trim each line before processing it
2232 here.
2233
2234 2018-05-02 Pedro Alves <palves@redhat.com>
2235 John Baldwin <jhb@freebsd.org>
2236
2237 * target.h (enum strata) <debug_stratum>: New.
2238 (struct target_ops) <all delegation methods>: Replace by C++
2239 virtual methods, and drop "to_" prefix. All references updated
2240 throughout.
2241 <to_shortname, to_longname, to_doc, to_data,
2242 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2243 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2244 virtual methods. All references updated throughout.
2245 <can_attach, supports_terminal_ours, can_create_inferior,
2246 get_thread_control_capabilities, attach_no_wait>: New
2247 virtual methods.
2248 <insert_breakpoint, remove_breakpoint>: Now
2249 TARGET_DEFAULT_NORETURN methods.
2250 <info_proc>: Now returns bool.
2251 <to_magic>: Delete.
2252 (OPS_MAGIC): Delete.
2253 (current_target): Delete. All references replaced by references
2254 to ...
2255 (target_stack): ... this. New.
2256 (target_shortname, target_longname): Adjust.
2257 (target_can_run): Now a function declaration.
2258 (default_child_has_all_memory, default_child_has_memory)
2259 (default_child_has_stack, default_child_has_registers)
2260 (default_child_has_execution): Remove target_ops parameter.
2261 (complete_target_initialization): Delete.
2262 (memory_breakpoint_target): New template class.
2263 (test_target_ops): Refactor as a C++ class with virtual methods.
2264 * make-target-delegates (NAME_PART): Tighten.
2265 (POINTER_PART, CP_SYMBOL): New.
2266 (SIMPLE_RETURN_PART): Reimplement.
2267 (VEC_RETURN_PART): Expect less.
2268 (RETURN_PART, VIRTUAL_PART): New.
2269 (METHOD): Adjust to C++ virtual methods.
2270 (scan_target_h): Remove reference to C99.
2271 (dname): Output "target_ops::" prefix.
2272 (write_function_header): Adjust to output a C++ class method.
2273 (write_declaration): New.
2274 (write_delegator): Adjust to output a C++ class method.
2275 (tdname): Output "dummy_target::" prefix.
2276 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2277 method.
2278 (tdefault_names, debug_names): Delete.
2279 (return_types, tdefaults, styles, argtypes_array): New.
2280 (top level): All methods are delegators.
2281 (print_class): New.
2282 (top level): Print dummy_target and debug_target classes.
2283 * target-delegates.c: Regenerate.
2284 * target-debug.h (target_debug_print_enum_info_proc_what)
2285 (target_debug_print_thread_control_capabilities)
2286 (target_debug_print_thread_info_p): New.
2287 * target.c (dummy_target): Delete.
2288 (the_dummy_target, the_debug_target): New.
2289 (target_stack): Now extern.
2290 (set_targetdebug): Push/unpush debug target.
2291 (default_child_has_all_memory, default_child_has_memory)
2292 (default_child_has_stack, default_child_has_registers)
2293 (default_child_has_execution): Remove target_ops parameter.
2294 (complete_target_initialization): Delete.
2295 (add_target_with_completer): No longer call
2296 complete_target_initialization.
2297 (target_supports_terminal_ours): Use regular delegation.
2298 (update_current_target): Delete.
2299 (push_target): No longer check magic number. Don't call
2300 update_current_target.
2301 (unpush_target): Don't call update_current_target.
2302 (target_is_pushed): No longer check magic number.
2303 (target_require_runnable): Skip for all stratums over
2304 process_stratum.
2305 (target_ops::info_proc): New.
2306 (target_info_proc): Use find_target_at and
2307 find_default_run_target.
2308 (target_supports_disable_randomization): Use regular delegation.
2309 (target_get_osdata): Use find_target_at.
2310 (target_ops::open, target_ops::close, target_ops::can_attach)
2311 (target_ops::attach, target_ops::can_create_inferior)
2312 (target_ops::create_inferior, target_ops::can_run)
2313 (target_can_run): New.
2314 (default_fileio_target): Use regular delegation.
2315 (target_ops::fileio_open, target_ops::fileio_pwrite)
2316 (target_ops::fileio_pread, target_ops::fileio_fstat)
2317 (target_ops::fileio_close, target_ops::fileio_unlink)
2318 (target_ops::fileio_readlink): New.
2319 (target_fileio_open_1, target_fileio_unlink)
2320 (target_fileio_readlink): Always call the target method. Handle
2321 FILEIO_ENOSYS.
2322 (return_zero, return_zero_has_execution): Delete.
2323 (init_dummy_target): Delete.
2324 (dummy_target::dummy_target, dummy_target::shortname)
2325 (dummy_target::longname, dummy_target::doc)
2326 (debug_target::debug_target, debug_target::shortname)
2327 (debug_target::longname, debug_target::doc): New.
2328 (target_supports_delete_record): Use regular delegation.
2329 (setup_target_debug): Delete.
2330 (maintenance_print_target_stack): Skip debug_stratum.
2331 (initialize_targets): Instantiate the_dummy_target and
2332 the_debug_target.
2333 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2334 use target_stack.
2335 (target_auxv_search, fprint_target_auxv): Adjust.
2336 (info_auxv_command): Adjust to use target_stack.
2337 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2338 * exceptions.c (print_flush): Handle a NULL target_stack.
2339 * regcache.c (target_ops_no_register): Refactor as class with
2340 virtual methods.
2341
2342 * exec.c (exec_target): New class.
2343 (exec_ops): Now an exec_target.
2344 (exec_open, exec_close_1, exec_get_section_table)
2345 (exec_xfer_partial, exec_files_info, exec_has_memory)
2346 (exec_make_note_section): Refactor as exec_target methods.
2347 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2348 Delete.
2349 (exec_target::find_memory_regions): New.
2350 (_initialize_exec): Don't call init_exec_ops.
2351 * gdbcore.h (exec_file_clear): Delete.
2352
2353 * corefile.c (core_target): Delete.
2354 (core_file_command): Adjust.
2355 * corelow.c (core_target): New class.
2356 (the_core_target): New.
2357 (core_close): Remove target_ops parameter.
2358 (core_close_cleanup): Adjust.
2359 (core_target::close): New.
2360 (core_open, core_detach, get_core_registers, core_files_info)
2361 (core_xfer_partial, core_thread_alive, core_read_description)
2362 (core_pid_to_str, core_thread_name, core_has_memory)
2363 (core_has_stack, core_has_registers, core_info_proc): Rework as
2364 core_target methods.
2365 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2366 (_initialize_corelow): Initialize the_core_target.
2367 * gdbcore.h (core_target): Delete.
2368 (the_core_target): New.
2369
2370 * ctf.c: (ctf_target): New class.
2371 (ctf_ops): Now a ctf_target.
2372 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2373 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2374 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2375 methods.
2376 (init_ctf_ops): Delete.
2377 (_initialize_ctf): Don't call it.
2378 * tracefile-tfile.c (tfile_target): New class.
2379 (tfile_ops): Now a tfile_target.
2380 (tfile_open, tfile_close, tfile_files_info)
2381 (tfile_get_tracepoint_status, tfile_trace_find)
2382 (tfile_fetch_registers, tfile_xfer_partial)
2383 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2384 Refactor as tfile_target methods.
2385 (tfile_xfer_partial_features): Remove target_ops parameter.
2386 (init_tfile_ops): Delete.
2387 (_initialize_tracefile_tfile): Don't call it.
2388 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2389 (tracefile_has_stack, tracefile_has_registers)
2390 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2391 tracefile_target methods.
2392 (init_tracefile_ops): Delete.
2393 (tracefile_target::tracefile_target): New.
2394 * tracefile.h: Include "target.h".
2395 (tracefile_target): New class.
2396 (init_tracefile_ops): Delete.
2397
2398 * spu-multiarch.c (spu_multiarch_target): New class.
2399 (spu_ops): Now a spu_multiarch_target.
2400 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2401 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2402 (spu_search_memory, spu_mourn_inferior): Refactor as
2403 spu_multiarch_target methods.
2404 (init_spu_ops): Delete.
2405 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2406 complete_target_initialization.
2407
2408 * ravenscar-thread.c (ravenscar_thread_target): New class.
2409 (ravenscar_ops): Now a ravenscar_thread_target.
2410 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2411 (ravenscar_thread_alive, ravenscar_pid_to_str)
2412 (ravenscar_fetch_registers, ravenscar_store_registers)
2413 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2414 (ravenscar_stopped_by_hw_breakpoint)
2415 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2416 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2417 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2418 methods.
2419 (init_ravenscar_thread_ops): Delete.
2420 (_initialize_ravenscar): Remove references to
2421 init_ravenscar_thread_ops and complete_target_initialization.
2422
2423 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2424 (bsd_uthread_target): New class.
2425 (bsd_uthread_ops): Now a bsd_uthread_target.
2426 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2427 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2428 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2429 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2430 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2431 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2432 (bsd_uthread_target): Delete function.
2433 (_initialize_bsd_uthread): Remove reference to
2434 complete_target_initialization.
2435
2436 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2437 (target_bfd): ... this new class.
2438 (target_bfd_xfer_partial, target_bfd_get_section_table)
2439 (target_bfd_close): Refactor as target_bfd methods.
2440 (target_bfd::~target_bfd): New.
2441 (target_bfd_reopen): Adjust.
2442 (target_bfd::close): New.
2443
2444 * record-btrace.c (record_btrace_target): New class.
2445 (record_btrace_ops): Now a record_btrace_target.
2446 (record_btrace_open, record_btrace_stop_recording)
2447 (record_btrace_disconnect, record_btrace_close)
2448 (record_btrace_async, record_btrace_info)
2449 (record_btrace_insn_history, record_btrace_insn_history_range)
2450 (record_btrace_insn_history_from, record_btrace_call_history)
2451 (record_btrace_call_history_range)
2452 (record_btrace_call_history_from, record_btrace_record_method)
2453 (record_btrace_is_replaying, record_btrace_will_replay)
2454 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2455 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2456 (record_btrace_store_registers, record_btrace_prepare_to_store)
2457 (record_btrace_to_get_unwinder)
2458 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2459 (record_btrace_commit_resume, record_btrace_wait)
2460 (record_btrace_stop, record_btrace_can_execute_reverse)
2461 (record_btrace_stopped_by_sw_breakpoint)
2462 (record_btrace_supports_stopped_by_sw_breakpoint)
2463 (record_btrace_stopped_by_hw_breakpoint)
2464 (record_btrace_supports_stopped_by_hw_breakpoint)
2465 (record_btrace_update_thread_list, record_btrace_thread_alive)
2466 (record_btrace_goto_begin, record_btrace_goto_end)
2467 (record_btrace_goto, record_btrace_stop_replaying_all)
2468 (record_btrace_execution_direction)
2469 (record_btrace_prepare_to_generate_core)
2470 (record_btrace_done_generating_core): Refactor as
2471 record_btrace_target methods.
2472 (init_record_btrace_ops): Delete.
2473 (_initialize_record_btrace): Remove reference to
2474 init_record_btrace_ops.
2475 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2476 the execution_direction global.
2477 (record_full_base_target, record_full_target)
2478 (record_full_core_target): New classes.
2479 (record_full_ops): Now a record_full_target.
2480 (record_full_core_ops): Now a record_full_core_target.
2481 (record_full_target::detach, record_full_target::disconnect)
2482 (record_full_core_target::disconnect)
2483 (record_full_target::mourn_inferior, record_full_target::kill):
2484 New.
2485 (record_full_open, record_full_close, record_full_async): Refactor
2486 as methods of the record_full_base_target class.
2487 (record_full_resume, record_full_commit_resume): Refactor
2488 as methods of the record_full_target class.
2489 (record_full_wait, record_full_stopped_by_watchpoint)
2490 (record_full_stopped_data_address)
2491 (record_full_stopped_by_sw_breakpoint)
2492 (record_full_supports_stopped_by_sw_breakpoint)
2493 (record_full_stopped_by_hw_breakpoint)
2494 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2495 methods of the record_full_base_target class.
2496 (record_full_store_registers, record_full_xfer_partial)
2497 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2498 Refactor as methods of the record_full_target class.
2499 (record_full_can_execute_reverse, record_full_get_bookmark)
2500 (record_full_goto_bookmark, record_full_execution_direction)
2501 (record_full_record_method, record_full_info, record_full_delete)
2502 (record_full_is_replaying, record_full_will_replay)
2503 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2504 (record_full_stop_replaying): Refactor as methods of the
2505 record_full_base_target class.
2506 (record_full_core_resume, record_full_core_kill)
2507 (record_full_core_fetch_registers)
2508 (record_full_core_prepare_to_store)
2509 (record_full_core_store_registers, record_full_core_xfer_partial)
2510 (record_full_core_insert_breakpoint)
2511 (record_full_core_remove_breakpoint)
2512 (record_full_core_has_execution): Refactor
2513 as methods of the record_full_core_target class.
2514 (record_full_base_target::supports_delete_record): New.
2515 (init_record_full_ops): Delete.
2516 (init_record_full_core_ops): Delete.
2517 (record_full_save): Refactor as method of the
2518 record_full_base_target class.
2519 (_initialize_record_full): Remove references to
2520 init_record_full_ops and init_record_full_core_ops.
2521
2522 * remote.c (remote_target, extended_remote_target): New classes.
2523 (remote_ops): Now a remote_target.
2524 (extended_remote_ops): Now an extended_remote_target.
2525 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2526 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2527 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2528 (remote_pass_signals, remote_set_syscall_catchpoint)
2529 (remote_program_signals, )
2530 (remote_thread_always_alive): Remove target_ops parameter.
2531 (remote_thread_alive, remote_thread_name)
2532 (remote_update_thread_list, remote_threads_extra_info)
2533 (remote_static_tracepoint_marker_at)
2534 (remote_static_tracepoint_markers_by_strid)
2535 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2536 (remote_open): Refactor as methods of remote_target.
2537 (extended_remote_open, extended_remote_detach)
2538 (extended_remote_attach, extended_remote_post_attach):
2539 (extended_remote_supports_disable_randomization)
2540 (extended_remote_create_inferior): : Refactor as method of
2541 extended_remote_target.
2542 (remote_set_permissions, remote_open_1, remote_detach)
2543 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2544 (remote_resume, remote_commit_resume, remote_stop)
2545 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2546 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2547 (remote_prepare_to_store, remote_store_registers)
2548 (remote_flash_erase, remote_flash_done, remote_files_info)
2549 (remote_kill, remote_mourn, remote_insert_breakpoint)
2550 (remote_remove_breakpoint, remote_insert_watchpoint)
2551 (remote_watchpoint_addr_within_range)
2552 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2553 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2554 (remote_supports_stopped_by_sw_breakpoint)
2555 (remote_stopped_by_hw_breakpoint)
2556 (remote_supports_stopped_by_hw_breakpoint)
2557 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2558 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2559 (remote_verify_memory): Refactor as methods of remote_target.
2560 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2561 parameter.
2562 (remote_xfer_partial, remote_get_memory_xfer_limit)
2563 (remote_search_memory, remote_rcmd, remote_memory_map)
2564 (remote_pid_to_str, remote_get_thread_local_address)
2565 (remote_get_tib_address, remote_read_description): Refactor as
2566 methods of remote_target.
2567 (remote_target::fileio_open, remote_target::fileio_pwrite)
2568 (remote_target::fileio_pread, remote_target::fileio_close): New.
2569 (remote_hostio_readlink, remote_hostio_fstat)
2570 (remote_filesystem_is_local, remote_can_execute_reverse)
2571 (remote_supports_non_stop, remote_supports_disable_randomization)
2572 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2573 (remote_supports_enable_disable_tracepoint)
2574 (remote_supports_string_tracing)
2575 (remote_can_run_breakpoint_commands, remote_trace_init)
2576 (remote_download_tracepoint, remote_can_download_tracepoint)
2577 (remote_download_trace_state_variable, remote_enable_tracepoint)
2578 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2579 (remote_trace_start, remote_get_trace_status)
2580 (remote_get_tracepoint_status, remote_trace_stop)
2581 (remote_trace_find, remote_get_trace_state_variable_value)
2582 (remote_save_trace_data, remote_get_raw_trace_data)
2583 (remote_set_disconnected_tracing, remote_core_of_thread)
2584 (remote_set_circular_trace_buffer, remote_traceframe_info)
2585 (remote_get_min_fast_tracepoint_insn_len)
2586 (remote_set_trace_buffer_size, remote_set_trace_notes)
2587 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2588 (remote_disable_btrace, remote_teardown_btrace)
2589 (remote_read_btrace, remote_btrace_conf)
2590 (remote_augmented_libraries_svr4_read, remote_load)
2591 (remote_pid_to_exec_file, remote_can_do_single_step)
2592 (remote_execution_direction, remote_thread_handle_to_thread_info):
2593 Refactor as methods of remote_target.
2594 (init_remote_ops, init_extended_remote_ops): Delete.
2595 (remote_can_async_p, remote_is_async_p, remote_async)
2596 (remote_thread_events, remote_upload_tracepoints)
2597 (remote_upload_trace_state_variables): Refactor as methods of
2598 remote_target.
2599 (_initialize_remote): Remove references to init_remote_ops and
2600 init_extended_remote_ops.
2601
2602 * remote-sim.c (gdbsim_target): New class.
2603 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2604 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2605 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2606 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2607 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2608 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2609 Refactor as methods of gdbsim_target.
2610 (gdbsim_ops): Now a gdbsim_target.
2611 (init_gdbsim_ops): Delete.
2612 (gdbsim_cntrl_c): Adjust.
2613 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2614
2615 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2616 (the_amd64_linux_nat_target): New.
2617 (amd64_linux_fetch_inferior_registers)
2618 (amd64_linux_store_inferior_registers): Refactor as methods of
2619 amd64_linux_nat_target.
2620 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2621 * i386-linux-nat.c: Don't include "linux-nat.h".
2622 (i386_linux_nat_target): New class.
2623 (the_i386_linux_nat_target): New.
2624 (i386_linux_fetch_inferior_registers)
2625 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2626 as methods of i386_linux_nat_target.
2627 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2628 * inf-child.c (inf_child_ops): Delete.
2629 (inf_child_fetch_inferior_registers)
2630 (inf_child_store_inferior_registers): Delete.
2631 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2632 methods of inf_child_target.
2633 (inf_child_target::supports_terminal_ours)
2634 (inf_child_target::terminal_init)
2635 (inf_child_target::terminal_inferior)
2636 (inf_child_target::terminal_ours_for_output)
2637 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2638 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2639 New.
2640 (inf_child_open, inf_child_disconnect, inf_child_close)
2641 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2642 (inf_child_post_startup_inferior, inf_child_can_run)
2643 (inf_child_pid_to_exec_file): Refactor as methods of
2644 inf_child_target.
2645 (inf_child_follow_fork): Delete.
2646 (inf_child_target::can_create_inferior)
2647 (inf_child_target::can_attach): New.
2648 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2649 (inf_child_target::has_stack, inf_child_target::has_registers)
2650 (inf_child_target::has_execution): New.
2651 (inf_child_fileio_open, inf_child_fileio_pwrite)
2652 (inf_child_fileio_pread, inf_child_fileio_fstat)
2653 (inf_child_fileio_close, inf_child_fileio_unlink)
2654 (inf_child_fileio_readlink, inf_child_use_agent)
2655 (inf_child_can_use_agent): Refactor as methods of
2656 inf_child_target.
2657 (return_zero, inf_child_target): Delete.
2658 (inf_child_target::inf_child_target): New.
2659 * inf-child.h: Include "target.h".
2660 (inf_child_target): Delete function prototype.
2661 (inf_child_target): New class.
2662 (inf_child_open_target, inf_child_mourn_inferior)
2663 (inf_child_maybe_unpush_target): Delete.
2664 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2665 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2666 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2667 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2668 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2669 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2670 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2671 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2672 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2673 methods of inf_ptrace_target.
2674 (inf_ptrace_target): Delete function.
2675 * inf-ptrace.h: Include "inf-child.h".
2676 (inf_ptrace_target): Delete function declaration.
2677 (inf_ptrace_target): New class.
2678 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2679 * linux-nat.c (linux_target): New.
2680 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2681 (linux_nat_target::~linux_nat_target): New.
2682 (linux_child_post_attach, linux_child_post_startup_inferior)
2683 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2684 (linux_child_remove_fork_catchpoint)
2685 (linux_child_insert_vfork_catchpoint)
2686 (linux_child_remove_vfork_catchpoint)
2687 (linux_child_insert_exec_catchpoint)
2688 (linux_child_remove_exec_catchpoint)
2689 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2690 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2691 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2692 (linux_nat_stopped_data_address)
2693 (linux_nat_stopped_by_sw_breakpoint)
2694 (linux_nat_supports_stopped_by_sw_breakpoint)
2695 (linux_nat_stopped_by_hw_breakpoint)
2696 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2697 (linux_nat_kill, linux_nat_mourn_inferior)
2698 (linux_nat_xfer_partial, linux_nat_thread_alive)
2699 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2700 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2701 (linux_child_static_tracepoint_markers_by_strid)
2702 (linux_nat_is_async_p, linux_nat_can_async_p)
2703 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2704 (linux_nat_supports_multi_process)
2705 (linux_nat_supports_disable_randomization, linux_nat_async)
2706 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2707 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2708 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2709 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2710 methods of linux_nat_target.
2711 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2712 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2713 parameter.
2714 (check_stopped_by_watchpoint): Adjust.
2715 (linux_xfer_partial): Delete.
2716 (linux_target_install_ops, linux_target, linux_nat_add_target):
2717 Delete.
2718 (linux_nat_target::linux_nat_target): New.
2719 * linux-nat.h: Include "inf-ptrace.h".
2720 (linux_nat_target): New.
2721 (linux_target, linux_target_install_ops, linux_nat_add_target):
2722 Delete function declarations.
2723 (linux_target): Declare global.
2724 * linux-thread-db.c (thread_db_target): New.
2725 (thread_db_target::thread_db_target): New.
2726 (thread_db_ops): Delete.
2727 (the_thread_db_target): New.
2728 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2729 (thread_db_update_thread_list, thread_db_pid_to_str)
2730 (thread_db_extra_thread_info)
2731 (thread_db_thread_handle_to_thread_info)
2732 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2733 (thread_db_resume): Refactor as methods of thread_db_target.
2734 (init_thread_db_ops): Delete.
2735 (_initialize_thread_db): Remove reference to init_thread_db_ops.
2736 * x86-linux-nat.c: Don't include "linux-nat.h".
2737 (super_post_startup_inferior): Delete.
2738 (x86_linux_nat_target::~x86_linux_nat_target): New.
2739 (x86_linux_child_post_startup_inferior)
2740 (x86_linux_read_description, x86_linux_enable_btrace)
2741 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2742 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2743 methods of x86_linux_nat_target.
2744 (x86_linux_create_target): Delete. Bits folded ...
2745 (x86_linux_add_target): ... here. Now takes a linux_nat_target
2746 pointer.
2747 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2748 (x86_linux_nat_target): New class.
2749 (x86_linux_create_target): Delete.
2750 (x86_linux_add_target): Now takes a linux_nat_target pointer.
2751 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2752 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2753 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2754 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2755 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2756 make extern.
2757 (x86_use_watchpoints): Delete.
2758 * x86-nat.h: Include "breakpoint.h" and "target.h".
2759 (x86_use_watchpoints): Delete.
2760 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2761 (x86_stopped_by_watchpoint, x86_stopped_data_address)
2762 (x86_insert_watchpoint, x86_remove_watchpoint)
2763 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2764 (x86_stopped_by_hw_breakpoint): New declarations.
2765 (x86_nat_target): New template class.
2766
2767 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2768 (the_ppc_linux_nat_target): New.
2769 (ppc_linux_fetch_inferior_registers)
2770 (ppc_linux_can_use_hw_breakpoint)
2771 (ppc_linux_region_ok_for_hw_watchpoint)
2772 (ppc_linux_ranged_break_num_registers)
2773 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2774 (ppc_linux_insert_mask_watchpoint)
2775 (ppc_linux_remove_mask_watchpoint)
2776 (ppc_linux_can_accel_watchpoint_condition)
2777 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2778 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2779 (ppc_linux_watchpoint_addr_within_range)
2780 (ppc_linux_masked_watch_num_registers)
2781 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2782 (ppc_linux_read_description): Refactor as methods of
2783 ppc_linux_nat_target.
2784 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
2785
2786 * procfs.c (procfs_xfer_partial): Delete forward declaration.
2787 (procfs_target): New class.
2788 (the_procfs_target): New.
2789 (procfs_target): Delete function.
2790 (procfs_auxv_parse, procfs_attach, procfs_detach)
2791 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2792 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2793 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2794 (procfs_create_inferior, procfs_update_thread_list)
2795 (procfs_thread_alive, procfs_pid_to_str)
2796 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2797 (procfs_stopped_data_address, procfs_insert_watchpoint)
2798 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2799 (proc_find_memory_regions, procfs_info_proc)
2800 (procfs_make_note_section): Refactor as methods of procfs_target.
2801 (_initialize_procfs): Adjust.
2802 * sol-thread.c (sol_thread_target): New class.
2803 (sol_thread_ops): Now a sol_thread_target.
2804 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2805 (sol_thread_fetch_registers, sol_thread_store_registers)
2806 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2807 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2808 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2809 (init_sol_thread_ops): Delete.
2810 (_initialize_sol_thread): Adjust. Remove references to
2811 init_sol_thread_ops and complete_target_initialization.
2812
2813 * windows-nat.c (windows_nat_target): New class.
2814 (windows_fetch_inferior_registers)
2815 (windows_store_inferior_registers, windows_resume, windows_wait)
2816 (windows_attach, windows_detach, windows_pid_to_exec_file)
2817 (windows_files_info, windows_create_inferior)
2818 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2819 (windows_close, windows_pid_to_str, windows_xfer_partial)
2820 (windows_get_tib_address, windows_get_ada_task_ptid)
2821 (windows_thread_name, windows_thread_alive): Refactor as
2822 windows_nat_target methods.
2823 (do_initial_windows_stuff): Adjust.
2824 (windows_target): Delete function.
2825 (_initialize_windows_nat): Adjust.
2826
2827 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2828 (darwin_mourn_inferior, darwin_kill_inferior)
2829 (darwin_create_inferior, darwin_attach, darwin_detach)
2830 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2831 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2832 (darwin_supports_multi_process): Refactor as darwin_nat_target
2833 methods.
2834 (darwin_resume_to, darwin_files_info): Delete.
2835 (_initialize_darwin_inferior): Rename to ...
2836 (_initialize_darwin_nat): ... this. Adjust to C++ification.
2837 * darwin-nat.h: Include "inf-child.h".
2838 (darwin_nat_target): New class.
2839 (darwin_complete_target): Delete.
2840 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2841 (darwin_target): New.
2842 (i386_darwin_fetch_inferior_registers)
2843 (i386_darwin_store_inferior_registers): Refactor as methods of
2844 darwin_nat_target.
2845 (darwin_complete_target): Delete, with ...
2846 (_initialize_i386_darwin_nat): ... bits factored out here.
2847
2848 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2849 (the_alpha_linux_nat_target): New.
2850 (alpha_linux_register_u_offset): Refactor as
2851 alpha_linux_nat_target method.
2852 (_initialize_alpha_linux_nat): Adjust.
2853 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2854 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2855 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2856 methods of linux_nat_trad_target.
2857 (linux_trad_target): Delete.
2858 * linux-nat-trad.h (linux_trad_target): Delete function.
2859 (linux_nat_trad_target): New class.
2860 * mips-linux-nat.c (mips_linux_nat_target): New class.
2861 (super_fetch_registers, super_store_registers, super_close):
2862 Delete.
2863 (the_mips_linux_nat_target): New.
2864 (mips64_linux_regsets_fetch_registers)
2865 (mips64_linux_regsets_store_registers)
2866 (mips64_linux_fetch_registers, mips64_linux_store_registers)
2867 (mips_linux_register_u_offset, mips_linux_read_description)
2868 (mips_linux_can_use_hw_breakpoint)
2869 (mips_linux_stopped_by_watchpoint)
2870 (mips_linux_stopped_data_address)
2871 (mips_linux_region_ok_for_hw_watchpoint)
2872 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2873 (mips_linux_close): Refactor as methods of mips_linux_nat.
2874 (_initialize_mips_linux_nat): Adjust to C++ification.
2875
2876 * aix-thread.c (aix_thread_target): New class.
2877 (aix_thread_ops): Now an aix_thread_target.
2878 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2879 (aix_thread_fetch_registers, aix_thread_store_registers)
2880 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2881 (aix_thread_thread_alive, aix_thread_pid_to_str)
2882 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2883 Refactor as methods of aix_thread_target.
2884 (init_aix_thread_ops): Delete.
2885 (_initialize_aix_thread): Remove references to init_aix_thread_ops
2886 and complete_target_initialization.
2887 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2888 (rs6000_nat_target): New class.
2889 (the_rs6000_nat_target): New.
2890 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2891 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2892 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2893 (super_create_inferior): Delete.
2894 (_initialize_rs6000_nat): Adjust to C++ification.
2895
2896 * arm-linux-nat.c (arm_linux_nat_target): New class.
2897 (the_arm_linux_nat_target): New.
2898 (arm_linux_fetch_inferior_registers)
2899 (arm_linux_store_inferior_registers, arm_linux_read_description)
2900 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2901 (arm_linux_remove_hw_breakpoint)
2902 (arm_linux_region_ok_for_hw_watchpoint)
2903 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2904 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2905 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2906 arm_linux_nat_target.
2907 (_initialize_arm_linux_nat): Adjust to C++ification.
2908
2909 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2910 (the_aarch64_linux_nat_target): New.
2911 (aarch64_linux_fetch_inferior_registers)
2912 (aarch64_linux_store_inferior_registers)
2913 (aarch64_linux_child_post_startup_inferior)
2914 (aarch64_linux_read_description)
2915 (aarch64_linux_can_use_hw_breakpoint)
2916 (aarch64_linux_insert_hw_breakpoint)
2917 (aarch64_linux_remove_hw_breakpoint)
2918 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2919 (aarch64_linux_region_ok_for_hw_watchpoint)
2920 (aarch64_linux_stopped_data_address)
2921 (aarch64_linux_stopped_by_watchpoint)
2922 (aarch64_linux_watchpoint_addr_within_range)
2923 (aarch64_linux_can_do_single_step): Refactor as methods of
2924 aarch64_linux_nat_target.
2925 (super_post_startup_inferior): Delete.
2926 (_initialize_aarch64_linux_nat): Adjust to C++ification.
2927
2928 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2929 (the_hppa_linux_nat_target): New.
2930 (hppa_linux_fetch_inferior_registers)
2931 (hppa_linux_store_inferior_registers): Refactor as methods of
2932 hppa_linux_nat_target.
2933 (_initialize_hppa_linux_nat): Adjust to C++ification.
2934
2935 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2936 (the_ia64_linux_nat_target): New.
2937 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2938 (ia64_linux_stopped_data_address)
2939 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2940 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2941 ia64_linux_nat_target methods.
2942 (super_xfer_partial): Delete.
2943 (_initialize_ia64_linux_nat): Adjust to C++ification.
2944
2945 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2946 (the_m32r_linux_nat_target): New.
2947 (m32r_linux_fetch_inferior_registers)
2948 (m32r_linux_store_inferior_registers): Refactor as
2949 m32r_linux_nat_target methods.
2950 (_initialize_m32r_linux_nat): Adjust to C++ification.
2951
2952 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2953 (the_m68k_linux_nat_target): New.
2954 (m68k_linux_fetch_inferior_registers)
2955 (m68k_linux_store_inferior_registers): Refactor as
2956 m68k_linux_nat_target methods.
2957 (_initialize_m68k_linux_nat): Adjust to C++ification.
2958
2959 * s390-linux-nat.c (s390_linux_nat_target): New class.
2960 (the_s390_linux_nat_target): New.
2961 (s390_linux_fetch_inferior_registers)
2962 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2963 (s390_insert_watchpoint, s390_remove_watchpoint)
2964 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2965 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2966 (s390_auxv_parse, s390_read_description): Refactor as methods of
2967 s390_linux_nat_target.
2968 (_initialize_s390_nat): Adjust to C++ification.
2969
2970 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2971 (the_sparc_linux_nat_target): New.
2972 (_initialize_sparc_linux_nat): Adjust to C++ification.
2973 * sparc-nat.c (sparc_fetch_inferior_registers)
2974 (sparc_store_inferior_registers): Remove target_ops parameter.
2975 * sparc-nat.h (sparc_fetch_inferior_registers)
2976 (sparc_store_inferior_registers): Remove target_ops parameter.
2977 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2978 (the_sparc64_linux_nat_target): New.
2979 (_initialize_sparc64_linux_nat): Adjust to C++ification.
2980
2981 * spu-linux-nat.c (spu_linux_nat_target): New class.
2982 (the_spu_linux_nat_target): New.
2983 (spu_child_post_startup_inferior, spu_child_post_attach)
2984 (spu_child_wait, spu_fetch_inferior_registers)
2985 (spu_store_inferior_registers, spu_xfer_partial)
2986 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2987 methods.
2988 (_initialize_spu_nat): Adjust to C++ification.
2989
2990 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2991 (the_tilegx_linux_nat_target): New.
2992 (fetch_inferior_registers, store_inferior_registers):
2993 Refactor as methods.
2994 (_initialize_tile_linux_nat): Adjust to C++ification.
2995
2996 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2997 (the_xtensa_linux_nat_target): New.
2998 (xtensa_linux_fetch_inferior_registers)
2999 (xtensa_linux_store_inferior_registers): Refactor as
3000 xtensa_linux_nat_target methods.
3001 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3002
3003 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3004 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3005 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3006 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3007 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3008 (fbsd_stopped_by_sw_breakpoint)
3009 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3010 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3011 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3012 (fbsd_post_startup_inferior, fbsd_post_attach)
3013 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3014 (fbsd_set_syscall_catchpoint)
3015 (super_xfer_partial, super_resume, super_wait)
3016 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3017 (fbsd_handle_debug_trap): Remove target_ops parameter.
3018 (fbsd_nat_add_target): Delete.
3019 * fbsd-nat.h: Include "inf-ptrace.h".
3020 (fbsd_nat_add_target): Delete.
3021 (USE_SIGTRAP_SIGINFO): Define.
3022 (fbsd_nat_target): New class.
3023
3024 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3025 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3026 (amd64bsd_target): Delete.
3027 * amd64-bsd-nat.h: New file.
3028 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3029 "x86-bsd-nat.h".
3030 (amd64_fbsd_nat_target): New class.
3031 (the_amd64_fbsd_nat_target): New.
3032 (amd64fbsd_read_description): Refactor as method of
3033 amd64_fbsd_nat_target.
3034 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3035 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3036 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3037 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3038 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3039 (i386bsd_target): Delete.
3040 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3041 (i386bsd_fetch_inferior_registers)
3042 (i386bsd_store_inferior_registers): Declare.
3043 (i386_bsd_nat_target): New class.
3044 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3045 (the_i386_fbsd_nat_target): New.
3046 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3047 i386_fbsd_nat_target methods.
3048 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3049 (_initialize_i386fbsd_nat): Adjust to C++ification.
3050 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3051 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3052 (_initialize_x86_bsd_nat): Adjust to C++ification.
3053 * x86-bsd-nat.h: Include "x86-nat.h".
3054 (x86bsd_target): Delete declaration.
3055 (x86bsd_nat_target): New class.
3056
3057 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3058 (the_aarch64_fbsd_nat_target): New.
3059 (aarch64_fbsd_fetch_inferior_registers)
3060 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3061 aarch64_fbsd_nat_target.
3062 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3063 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3064 (the_alpha_bsd_nat_target): New.
3065 (alphabsd_fetch_inferior_registers)
3066 (alphabsd_store_inferior_registers): Refactor as
3067 alpha_bsd_nat_target methods.
3068 (_initialize_alphabsd_nat): Refactor as methods of
3069 alpha_bsd_nat_target.
3070 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3071 (the_amd64_nbsd_nat_target): New.
3072 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3073 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3074 (the_amd64_obsd_nat_target): New.
3075 (_initialize_amd64obsd_nat): Adjust to C++ification.
3076 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3077 (the_arm_fbsd_nat_target): New.
3078 (arm_fbsd_fetch_inferior_registers)
3079 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3080 (_initialize_arm_fbsd_nat): Refactor as methods of
3081 arm_fbsd_nat_target.
3082 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3083 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3084 (the_arm_netbsd_nat_target): New.
3085 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3086 arm_netbsd_nat_target.
3087 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3088 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3089 (the_hppa_nbsd_nat_target): New.
3090 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3091 hppa_nbsd_nat_target methods.
3092 (_initialize_hppanbsd_nat): Adjust to C++ification.
3093 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3094 (the_hppa_obsd_nat_target): New.
3095 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3096 methods of hppa_obsd_nat_target.
3097 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3098 add_target.
3099 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3100 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3101 add_target.
3102 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3103 (_initialize_i386obsd_nat): Use add_target.
3104 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3105 (the_m68k_bsd_nat_target): New.
3106 (m68kbsd_fetch_inferior_registers)
3107 (m68kbsd_store_inferior_registers): Refactor as methods of
3108 m68k_bsd_nat_target.
3109 (_initialize_m68kbsd_nat): Adjust to C++ification.
3110 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3111 (the_mips_fbsd_nat_target): New.
3112 (mips_fbsd_fetch_inferior_registers)
3113 (mips_fbsd_store_inferior_registers): Refactor as methods of
3114 mips_fbsd_nat_target.
3115 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3116 add_target.
3117 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3118 (the_mips_nbsd_nat_target): New.
3119 (mipsnbsd_fetch_inferior_registers)
3120 (mipsnbsd_store_inferior_registers): Refactor as methods of
3121 mips_nbsd_nat_target.
3122 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3123 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3124 (the_mips64_obsd_nat_target): New.
3125 (mips64obsd_fetch_inferior_registers)
3126 (mips64obsd_store_inferior_registers): Refactor as methods of
3127 mips64_obsd_nat_target.
3128 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3129 add_target.
3130 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3131 nbsd_nat_target.
3132 * nbsd-nat.h: Include "inf-ptrace.h".
3133 (nbsd_nat_target): New class.
3134 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3135 (obsd_wait): Refactor as methods of obsd_nat_target.
3136 (obsd_add_target): Delete.
3137 * obsd-nat.h: Include "inf-ptrace.h".
3138 (obsd_nat_target): New class.
3139 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3140 (the_ppc_fbsd_nat_target): New.
3141 (ppcfbsd_fetch_inferior_registers)
3142 (ppcfbsd_store_inferior_registers): Refactor as methods of
3143 ppc_fbsd_nat_target.
3144 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3145 add_target.
3146 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3147 (the_ppc_nbsd_nat_target): New.
3148 (ppcnbsd_fetch_inferior_registers)
3149 (ppcnbsd_store_inferior_registers): Refactor as methods of
3150 ppc_nbsd_nat_target.
3151 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3152 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3153 (the_ppc_obsd_nat_target): New.
3154 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3155 methods of ppc_obsd_nat_target.
3156 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3157 add_target.
3158 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3159 (the_sh_nbsd_nat_target): New.
3160 (shnbsd_fetch_inferior_registers)
3161 (shnbsd_store_inferior_registers): Refactor as methods of
3162 sh_nbsd_nat_target.
3163 (_initialize_shnbsd_nat): Adjust to C++ification.
3164 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3165 (inf_ptrace_xfer_partial): Delete.
3166 (sparc_xfer_partial, sparc_target): Delete.
3167 * sparc-nat.h (sparc_fetch_inferior_registers)
3168 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3169 (sparc_target): Delete function declaration.
3170 (sparc_target): New template class.
3171 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3172 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3173 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3174 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3175 add_target.
3176 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3177 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3178 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3179 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3180 add_target.
3181 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3182 (the_vax_bsd_nat_target): New.
3183 (vaxbsd_fetch_inferior_registers)
3184 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3185 methods.
3186 (_initialize_vaxbsd_nat): Adjust to C++ification.
3187
3188 * bsd-kvm.c (bsd_kvm_target): New class.
3189 (bsd_kvm_ops): Now a bsd_kvm_target.
3190 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3191 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3192 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3193 bsd_kvm_target.
3194 (bsd_kvm_return_one): Delete.
3195 (bsd_kvm_add_target): Adjust to C++ification.
3196
3197 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3198 (nto_procfs_target_procfs): New classes.
3199 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3200 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3201 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3202 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3203 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3204 (procfs_remove_hw_breakpoint, procfs_resume)
3205 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3206 (procfs_kill_inferior, procfs_store_registers)
3207 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3208 as methods of nto_procfs_target.
3209 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3210 (nto_native_ops): Delete.
3211 (procfs_open, procfs_native_open): Delete.
3212 (nto_native_ops): Now an nto_procfs_target_native.
3213 (init_procfs_targets): Adjust to C++ification.
3214 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3215 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3216 Refactor as methods of nto_procfs_target.
3217
3218 * go32-nat.c (go32_nat_target): New class.
3219 (the_go32_nat_target): New.
3220 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3221 (go32_store_registers, go32_xfer_partial, go32_files_info)
3222 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3223 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3224 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3225 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3226 (go32_target): Delete.
3227 (_initialize_go32_nat): Adjust to C++ification.
3228
3229 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3230 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3231 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3232 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3233 gnu_nat_target.
3234 (gnu_target): Delete.
3235 * gnu-nat.h (gnu_target): Delete.
3236 (gnu_nat_target): New class.
3237 * i386-gnu-nat.c (gnu_base_target): New.
3238 (i386_gnu_nat_target): New class.
3239 (the_i386_gnu_nat_target): New.
3240 (_initialize_i386gnu_nat): Adjust to C++ification.
3241
3242 2018-05-02 Pedro Alves <palves@redhat.com>
3243
3244 * bfd-target.c (target_bfd_xclose): Rename to ...
3245 (target_bfd_close): ... this.
3246 (target_bfd_reopen): Adjust.
3247 * target.c (target_close): Remove references to to_xclose.
3248 * target.h (target_ops::to_xclose): Delete.
3249 (target_ops::to_close): Update comments.
3250
3251 2018-05-02 Pedro Alves <palves@redhat.com>
3252
3253 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3254 "linux-nat.h".
3255 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3256 * inf-ptrace.c (inf_ptrace_register_u_offset)
3257 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3258 (inf_ptrace_store_register, inf_ptrace_store_registers)
3259 (inf_ptrace_trad_target): Move to ...
3260 * linux-nat-trad.c: ... this new file.
3261 * linux-nat-trad.h: New file.
3262 * linux-nat.c (linux_target_install_ops): Make extern.
3263 (linux_trad_target): Delete.
3264 * linux-nat.h (linux_trad_target): Delete declaration.
3265 (linux_target_install_ops): Declare.
3266 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3267 "linux-nat.h".
3268
3269 2018-05-02 Pedro Alves <palves@redhat.com>
3270
3271 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3272 procfs_target/add_target here.
3273 * procfs.c (procfs_target): Make static.
3274 (_initialize_procfs): Call add_target here.
3275 * procfs.h (struct target_ops): Remove forward declaration.
3276 (procfs_target): Remove declaration.
3277 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3278
3279 2018-05-02 Pedro Alves <palves@redhat.com>
3280
3281 * procfs.c (procfs_stopped_by_watchpoint)
3282 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3283 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3284 Forward declare.
3285 (procfs_use_watchpoints): Delete, move contents...
3286 (procfs_target): ... here.
3287 * procfs.h (procfs_use_watchpoints): Delete declaration.
3288 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3289 procfs_use_watchpoints.
3290 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3291 procfs_use_watchpoints.
3292
3293 2018-05-02 Tom Tromey <tom@tromey.com>
3294
3295 PR python/20084:
3296 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3297 and var_zuinteger_unlimited.
3298 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3299 and PARAM_ZUINTEGER_UNLIMITED.
3300 (set_parameter_value): Handle var_zuinteger and
3301 var_zuinteger_unlimited.
3302 (add_setshow_generic): Likewise.
3303 (parmpy_init): Likewise.
3304
3305 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3306
3307 PR rust/23124
3308 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3309 pointer is not null before dereferencing it.
3310
3311 2018-04-30 Tom Tromey <tom@tromey.com>
3312
3313 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3314 is_mi_like_p.
3315
3316 2018-04-30 Tom Tromey <tom@tromey.com>
3317
3318 * breakpoint.c (mention): Remove use of is_mi_like_p.
3319 (print_mention_ranged_breakpoint): Likewise.
3320 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3321 of is_mi_like_p.
3322
3323 2018-04-30 Tom Tromey <tom@tromey.com>
3324
3325 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3326
3327 2018-04-30 Tom Tromey <tom@tromey.com>
3328
3329 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3330 (info_spu_event_command): Remove some uses of is_mi_like_p.
3331
3332 2018-04-30 Tom Tromey <tom@tromey.com>
3333
3334 * python/py-framefilter.c (py_print_single_arg)
3335 (enumerate_locals, py_print_args, py_print_frame): Remove some
3336 uses of is_mi_like_p.
3337
3338 2018-04-30 Tom Tromey <tom@tromey.com>
3339
3340 * ui-out.c: Update.
3341 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3342 * ui-out.h (ui_out::is_mi_like_p): Now const.
3343 (ui_out::do_is_mi_like_p): Now const.
3344 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3345
3346 2018-04-30 Tom Tromey <tom@tromey.com>
3347
3348 * varobj.c (varobj_set_visualizer): Use new_reference.
3349 * python/python.c (gdbpy_decode_line): Use new_reference.
3350 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3351 new_reference.
3352
3353 2018-04-30 Tom Tromey <tom@tromey.com>
3354
3355 * varobj.c (install_new_value): Use new_reference.
3356 * value.h (value_incref): Return void. Swap intro comment with
3357 value_decref.
3358 * value.c (set_value_parent): Use new_reference.
3359 (value_incref): Return void. Update intro comment.
3360 (release_value): Use new_reference.
3361 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3362
3363 2018-04-30 Tom Tromey <tom@tromey.com>
3364
3365 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3366 * gdb_bfd.h (new_bfd_ref): Remove.
3367 (gdb_bfd_open): Update comment.
3368 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3369 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3370 (gdb_bfd_fdopenr): Use new_reference.
3371 * exec.c (exec_file_attach): Use new_reference.
3372
3373 2018-04-30 Tom Tromey <tom@tromey.com>
3374
3375 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3376 method.
3377
3378 2018-04-30 Tom Tromey <tom@tromey.com>
3379
3380 * jit.c (jit_read_code_entry): Use type_align.
3381 * i386-tdep.c (i386_gdbarch_init): Don't call
3382 set_gdbarch_long_long_align_bit.
3383 * gdbarch.sh: Remove long_long_align_bit.
3384 * gdbarch.c, gdbarch.h: Rebuild.
3385 * arc-tdep.c (arc_type_align): New function.
3386 (arc_gdbarch_init): Use arc_type_align. Don't call
3387 set_gdbarch_long_long_align_bit.
3388
3389 2018-04-30 Tom Tromey <tom@tromey.com>
3390
3391 * rust-lang.c (rust_type_alignment): Remove.
3392 (rust_composite_type): Use type_align.
3393
3394 2018-04-30 Tom Tromey <tom@tromey.com>
3395
3396 * NEWS: Mention Type.align.
3397 * python/py-type.c (typy_get_alignof): New function.
3398 (type_object_getset): Add "alignof".
3399
3400 2018-04-30 Tom Tromey <tom@tromey.com>
3401
3402 PR exp/17095:
3403 * NEWS: Update.
3404 * std-operator.def (UNOP_ALIGNOF): New operator.
3405 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3406 New.
3407 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3408 * c-lang.c (c_op_print_tab): Add alignof.
3409 * c-exp.y (ALIGNOF): New token.
3410 (exp): Add "ALIGNOF" production.
3411 (ident_tokens): Add _Alignof and alignof.
3412
3413 2018-04-30 Tom Tromey <tom@tromey.com>
3414
3415 * i386-tdep.c (i386_type_align): New function.
3416 (i386_gdbarch_init): Update.
3417 * gdbarch.sh (type_align): New method.
3418 * gdbarch.c, gdbarch.h: Rebuild.
3419 * arch-utils.h (default_type_align): Declare.
3420 * arch-utils.c (default_type_align): New function.
3421 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3422 (struct type) <align_log2>: New field.
3423 <instance_flags>: Now a bitfield.
3424 (TYPE_RAW_ALIGN): New macro.
3425 (type_align, type_raw_align, set_type_align): Declare.
3426 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3427 functions.
3428 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3429 (get_alignment, maybe_set_alignment): New functions.
3430 (read_structure_type, read_enumeration_type, read_array_type)
3431 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3432 (read_subrange_type, read_base_type): Set type alignment.
3433
3434 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3435
3436 * dwarf2read.c (read_index_from_section): Use bool.
3437
3438 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3439
3440 PR gdb/22950
3441 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3442 with #ifdef.
3443
3444 2018-04-29 John Reiser <jreiser@BitWagon.com>
3445
3446 PR build/22873
3447 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3448 last step, and do it atomically.
3449
3450 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3451
3452 * compile/compile-c-types.c (convert_int, convert_float):
3453 Update for C FE v1.
3454
3455 2018-04-27 Tom Tromey <tom@tromey.com>
3456
3457 PR rust/22545:
3458 * rust-lang.c (rust_inclusive_range_type_p): New function.
3459 (rust_range): Handle inclusive ranges.
3460 (rust_compute_range): Likewise.
3461 * rust-exp.y (struct rust_op) <inclusive>: New field.
3462 (DOTDOTEQ): New constant.
3463 (range_expr): Add "..=" productions.
3464 (operator_tokens): Add "..=" token.
3465 (ast_range): Add "inclusive" parameter.
3466 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3467 ranges.
3468 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3469 bounds values.
3470 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3471 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3472 Update comments.
3473 * expprint.c (print_subexp_standard): Handle new bounds values.
3474 (dump_subexp_body_standard): Likewise.
3475
3476 2018-04-27 Tom Tromey <tom@tromey.com>
3477
3478 * configure: Rebuild.
3479 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3480 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3481 "OVERRIDE".
3482 (class symbol_needs_eval_context): Likewise.
3483 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3484 (mock_mapped_index::symbol_name_at): Use "override". Remove
3485 "virtual".
3486 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3487 "override".
3488 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3489 * aarch64-tdep.c (instruction_reader::read): Use "override".
3490 (instruction_reader_test::read): Likewise.
3491 * arm-tdep.c (instruction_reader::read): Use "override".
3492 (instruction_reader_thumb::read): Likewise.
3493
3494 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3495
3496 PR remote/9665
3497 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3498 instead of remote_send.
3499 (remote_send): Remove.
3500
3501 2018-04-26 Pedro Alves <palves@redhat.com>
3502
3503 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3504 find_function_start_sal instead of find_pc_line.
3505
3506 2018-04-26 Pedro Alves <palves@redhat.com>
3507
3508 * breakpoint.c (set_breakpoint_location_function): Handle
3509 mst_data_gnu_ifunc.
3510 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3511 * elfread.c (elf_symtab_read): Give data symbols with
3512 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3513 (elf_rel_plt_read): Update comment.
3514 * linespec.c (convert_linespec_to_sals): Handle
3515 mst_data_gnu_ifunc.
3516 (minsym_found): Handle mst_data_gnu_ifunc.
3517 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3518 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3519 * parse.c (find_minsym_type_and_address): Handle
3520 mst_data_gnu_ifunc.
3521 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3522 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3523 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3524 comment.
3525 <mst_data_gnu_ifunc>: New enumerator.
3526
3527 2018-04-26 Pedro Alves <palves@redhat.com>
3528
3529 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3530 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3531 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3532 Handle it.
3533 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3534 (lookup_minimal_symbol_by_pc): Adjust.
3535 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3536 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3537 * minsyms.h (lookup_msym_prefer): New enum.
3538 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3539 parameter by a lookup_msym_prefer parameter.
3540
3541 2018-04-26 Pedro Alves <palves@redhat.com>
3542
3543 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3544 ends in "@plt" instead of looking at the symbol's section.
3545
3546 2018-04-26 Pedro Alves <palves@redhat.com>
3547
3548 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3549 all references.
3550 (find_pc_partial_function_gnu_ifunc): Rename to ...
3551 (find_pc_partial_function): ... this, and remove references to
3552 'is_gnu_ifunc_p'.
3553 (find_pc_partial_function): Delete old implementation.
3554 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3555
3556 2018-04-26 Pedro Alves <palves@redhat.com>
3557
3558 * linespec.c (struct bound_minimal_symbol_search_key): New.
3559 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3560 skip first line if we found a GNU ifunc minimal symbol by name.
3561 (compare_msymbols): Change parameters to work with a destructured
3562 lhs minsym.
3563 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3564 functions.
3565
3566 2018-04-26 Pedro Alves <palves@redhat.com>
3567
3568 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3569 ifunc targets here. Instead, if we have an ifunc minsym, use its
3570 address/name.
3571 (add_location_to_breakpoint): Store the minsym and the objfile in
3572 the breakpoint location.
3573 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3574 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3575 Record the minsym in the sal.
3576 * symtab.h (symtab_and_line) <msymbol>: New field.
3577
3578 2018-04-26 Pedro Alves <palves@redhat.com>
3579
3580 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3581 unless we actually resolved the ifunc.
3582
3583 2018-04-26 Pedro Alves <palves@redhat.com>
3584
3585 * c-exp.y (variable production): Prefer ifunc minsyms over
3586 regular function symbols.
3587 * symtab.c (find_gnu_ifunc): New function.
3588 * minsyms.h (lookup_msym_prefer): New enum.
3589 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3590 parameter by a lookup_msym_prefer parameter.
3591 * symtab.h (find_gnu_ifunc): New declaration.
3592
3593 2018-04-26 Pedro Alves <palves@redhat.com>
3594
3595 * blockframe.c (find_gnu_ifunc_target_type): New function.
3596 (find_function_type): New.
3597 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3598 return a value with a memory address.
3599 (eval_call): For calls to GNU ifunc functions, try to find the
3600 type of the target function from the type that the resolver
3601 returns.
3602 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3603 symbols.
3604 * infcall.c (find_function_return_type): Delete.
3605 (find_function_addr): Add 'function_type' parameter. For calls to
3606 GNU ifunc functions, try to find the type of the target function
3607 from the type that the resolver returns, and return it via
3608 FUNCTION_TYPE.
3609 (call_function_by_hand_dummy): Adjust to use the function type
3610 returned by find_function_addr.
3611 (find_function_addr): Add 'function_type' parameter and move
3612 description here.
3613 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3614 declarations.
3615
3616 2018-04-26 Pedro Alves <palves@redhat.com>
3617
3618 * c-exp.y (variable production): Skip finding an alias for ifunc
3619 symbols.
3620
3621 2018-04-26 Pedro Alves <palves@redhat.com>
3622
3623 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3624
3625 2018-04-25 Pedro Alves <palves@redhat.com>
3626
3627 * infcmd.c (kill_command): Print the pid as string, not the whole
3628 thread's ptid. Add comment. s/has been killed/killed/ in output
3629 message.
3630 * remote.c (remote_detach_1): Print the pid as string, not the
3631 whole thread's ptid.
3632
3633 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3634 Sergio Durigan Junior <sergiodj@redhat.com>
3635 Pedro Alves <palves@redhat.com>
3636
3637 * infcmd.c (kill_command): Print message when inferior has
3638 been killed.
3639 * inferior.c (print_inferior_events): Remove 'static'. Set as
3640 '1'.
3641 (add_inferior): Improve message printed when
3642 'print_inferior_events' is on.
3643 (exit_inferior): Remove message printed when
3644 'print_inferior_events' is on.
3645 (detach_inferior): Improve message printed when
3646 'print_inferior_events' is on.
3647 (initialize_inferiors): Use 'add_inferior_silent' to set
3648 'current_inferior_'.
3649 * inferior.h (print_inferior_events): Declare here as
3650 'extern'.
3651 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3652 '[Detaching...]' messages when 'print_inferior_events' is on.
3653 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3654 as prefix/suffix for messages. Remove periods. Fix erroneous
3655 'Detaching after fork from child...', replace it by '... from
3656 parent...'.
3657 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3658 prefix/suffix when printing 'Detaching...' messages. Print
3659 them when 'print_inferior_events' is on.
3660 * remote.c (remote_detach_1): Print message when detaching
3661 from inferior and '!is_fork_parent'.
3662
3663 2018-04-24 Tom Tromey <tom@tromey.com>
3664
3665 * cli-out.h: Reindent.
3666
3667 2018-04-24 Tom Tromey <tom@tromey.com>
3668
3669 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3670 (cli_ui_out::do_field_string): Use fputs_filtered.
3671 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3672
3673 2018-04-23 Tom Tromey <tom@tromey.com>
3674
3675 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3676 gdb::unique_xmalloc_ptr.
3677
3678 2018-04-23 Tom Tromey <tom@tromey.com>
3679
3680 * configure: Rebuild.
3681
3682 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3683
3684 PR gdb/23095
3685 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3686 prepare_for_testing. Set normal_bp to r_debug_state if target
3687 is bsd.
3688
3689 2018-04-21 Pedro Alves <palves@redhat.com>
3690 Rajendra SY <rajendra.sy@gmail.com>
3691
3692 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3693 * remote.c (extended_remote_attach): In all-stop mode, mark the
3694 thread as executing.
3695
3696 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3697
3698 * thread.c (thread_apply_all_command): Fix comment.
3699 (thread_command): Fix comment.
3700
3701 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3702
3703 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3704 parameter.
3705 * features/aarch64-core.c (create_feature_aarch64_core):
3706 Regenerate.
3707 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3708 Likewise.
3709 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3710 Likewise.
3711 * features/i386/32bit-avx512.c
3712 (create_feature_i386_32bit_avx512): Likewise.
3713 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3714 Likewise.
3715 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3716 Likewise.
3717 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3718 Likewise.
3719 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3720 Likewise.
3721 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3722 Likewise.
3723 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3724 Likewise.
3725 * features/i386/64bit-avx512.c
3726 (create_feature_i386_64bit_avx512): Likewise.
3727 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3728 Likewise.
3729 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3730 Likewise.
3731 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3732 Likewise.
3733 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3734 Likewise.
3735 * features/i386/64bit-segments.c
3736 (create_feature_i386_64bit_segments): Likewise.
3737 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3738 Likewise.
3739 * features/i386/x32-core.c
3740 (create_feature_i386_x32_core): Likewise.
3741 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3742 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3743 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3744 * target-descriptions.c: In generated code, don't pass xml
3745 filename.
3746
3747 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3748
3749 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3750 (print_xml_feature::visit_post): Likewise.
3751 (print_xml_feature::visit): Likewise.
3752 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3753 (print_xml_feature): Add new class.
3754 * regformats/regdat.sh: Null xmltarget on feature targets.
3755 * target-descriptions.c (struct target_desc): Add xmltarget.
3756 (maintenance_check_tdesc_xml_convert): Add unittest function.
3757 (tdesc_get_features_xml): Add function to get xml.
3758 (maintenance_check_xml_descriptions): Test xml generation.
3759 * xml-tdesc.c (string_read_description_xml): Add function.
3760 * xml-tdesc.h (string_read_description_xml): Add declaration.
3761
3762 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3763
3764 * features/Makefile: Add feature marker to targets with new style
3765 target descriptions.
3766 * regformats/aarch64.dat: Regenerate.
3767 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3768 * regformats/i386/amd64-avx-linux.dat: Likewise.
3769 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3770 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3771 * regformats/i386/amd64-linux.dat: Likewise.
3772 * regformats/i386/amd64-mpx-linux.dat: Likewise.
3773 * regformats/i386/amd64.dat: Likewise.
3774 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3775 * regformats/i386/i386-avx-linux.dat: Likewise.
3776 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3777 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3778 * regformats/i386/i386-linux.dat: Likewise.
3779 * regformats/i386/i386-mmx-linux.dat: Likewise.
3780 * regformats/i386/i386-mpx-linux.dat: Likewise.
3781 * regformats/i386/i386.dat: Likewise.
3782 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3783 * regformats/i386/x32-avx-linux.dat: Likewise.
3784 * regformats/i386/x32-linux.dat: Likewise.
3785 * regformats/tic6x-c62x-linux.dat: Likewise.
3786 * regformats/tic6x-c64x-linux.dat: Likewise.
3787 * regformats/tic6x-c64xp-linux.dat: Likewise.
3788 * regformats/regdat.sh: Parse feature marker.
3789
3790 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3791
3792 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3793 (tdesc_osabi_name): Likewise.
3794 * target-descriptions.c (tdesc_architecture_name): Add new
3795 function.
3796 (tdesc_osabi_name): Likewise.
3797
3798 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3799
3800 * common/tdesc.c (tdesc_predefined_type): Move to here.
3801 (tdesc_named_type): Likewise.
3802 (tdesc_create_vector): Likewise.
3803 (tdesc_create_struct): Likewise.
3804 (tdesc_set_struct_size): Likewise.
3805 (tdesc_create_union): Likewise.
3806 (tdesc_create_flags): Likewise.
3807 (tdesc_create_enum): Likewise.
3808 (tdesc_add_field): Likewise.
3809 (tdesc_add_typed_bitfield): Likewise.
3810 (tdesc_add_bitfield): Likewise.
3811 (tdesc_add_flag): Likewise.
3812 (tdesc_add_enum_value): Likewise.
3813 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3814 (struct tdesc_type_vector): Likewise.
3815 (struct tdesc_type_field): Likewise.
3816 (struct tdesc_type_with_fields): Likewise.
3817 (tdesc_create_enum): Add declaration.
3818 (tdesc_add_typed_bitfield): Likewise.
3819 (tdesc_add_enum_value): Likewise.
3820 * target-descriptions.c (tdesc_type_field): Move from here.
3821 (tdesc_type_builtin): Likewise.
3822 (tdesc_type_vector): Likewise.
3823 (tdesc_type_with_fields): Likewise.
3824 (tdesc_predefined_types): Likewise.
3825 (tdesc_named_type): Likewise.
3826 (tdesc_create_vector): Likewise.
3827 (tdesc_create_struct): Likewise.
3828 (tdesc_set_struct_size): Likewise.
3829 (tdesc_create_union): Likewise.
3830 (tdesc_create_flags): Likewise.
3831 (tdesc_create_enum): Likewise.
3832 (tdesc_add_field): Likewise.
3833 (tdesc_add_typed_bitfield): Likewise.
3834 (tdesc_add_bitfield): Likewise.
3835 (tdesc_add_flag): Likewise.
3836 (tdesc_add_enum_value): Likewise.
3837 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3838 (tdesc_add_typed_bitfield): Likewise.
3839 (tdesc_add_enum_value): Likewise.
3840
3841 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3842
3843 * common/tdesc.c (tdesc_feature::accept): Move to here.
3844 (tdesc_feature::operator==): Likewise.
3845 (tdesc_create_reg): Likewise.
3846 * common/tdesc.h (tdesc_type_kind): Likewise.
3847 (struct tdesc_type): Likewise.
3848 (struct tdesc_feature): Likewise.
3849 * regformats/regdat.sh: Create a feature.
3850 * target-descriptions.c (tdesc_type_kind): Move from here.
3851 (tdesc_type): Likewise.
3852 (tdesc_type_up): Likewise.
3853 (tdesc_feature): Likewise.
3854 (tdesc_create_reg): Likewise.
3855
3856 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3857
3858 * Makefile.in: Add arch/tdesc.c
3859 * common/tdesc.c: New file.
3860 * common/tdesc.h (tdesc_element_visitor): Move to here.
3861 (tdesc_element): Likewise.
3862 (tdesc_reg): Likewise.
3863 (tdesc_reg_up): Likewise.
3864 * regformats/regdef.h (reg): Add offset to constructors.
3865 * target-descriptions.c (tdesc_element_visitor): Move from here.
3866 (tdesc_element): Likewise.
3867 (tdesc_reg): Likewise.
3868 (tdesc_reg_up): Likewise.
3869
3870 2018-04-17 Tom Tromey <tom@tromey.com>
3871
3872 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3873 discriminant field.
3874
3875 2018-04-17 Tom Tromey <tom@tromey.com>
3876
3877 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3878
3879 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
3880
3881 * symtab.c (print_symbol_info): Skip printing filename and line
3882 number when `last' is NULL.
3883 (symtab_symbol_info): Use empty string instead of NULL for first
3884 invocation of print_symbol_info.
3885 (rbreak_command): Pass NULL to `last' parameter of
3886 print_symbol_info.
3887
3888 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
3889
3890 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3891 instead of nullptr.
3892
3893 2018-04-16 Pedro Alves <palves@redhat.com>
3894
3895 * MAINTAINERS (sh): Remove.
3896 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3897 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3898 (ALLDEPFILES): Remove sh64-tdep.c.
3899 * NEWS: Mentions that support for SH-5/SH64 is removed.
3900 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3901 (sh*-*-openbsd*): Ditto.
3902 (sh64-*-elf*): Remove.
3903 (sh*): Remove.
3904 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3905 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3906 * sh-tdep.c: No longer include "sh64-tdep.h".
3907 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3908 * sh64-tdep.c, sh64-tdep.h: Remove files.
3909
3910 2018-04-16 Pedro Alves <palves@redhat.com>
3911
3912 * MAINTAINERS: Remove m88k.
3913 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3914 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3915 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3916 * NEWS: Mention that support for m88k was removed.
3917 * configure.host (m88*-*-*): Remove support.
3918 * configure.nat (m88k-*-*): Remove support.
3919 * configure.tgt (m88*-*-openbsd*): Remove.
3920 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3921
3922 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
3923
3924 * configure.tgt (x86_tobjs): New variable.
3925 (amd64_tobjs, i386_tobjs): Use it.
3926
3927 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3928
3929 * symtab.c (print_symbol_info): Precede the symbol definition by
3930 the line number when available.
3931 * NEWS: Advertise this enhancement.
3932
3933 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3934
3935 * NEWS (New options): announce set/show record btrace cpu.
3936 * btrace.c: Include record-btrace.h.
3937 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3938 the vendor is unknown.
3939 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
3940 Maybe overwrite the btrace configuration's cpu.
3941 (btrace_compute_ftrace): Add cpu parameter. Update callers.
3942 (btrace_fetch): Add cpu parameter. Update callers.
3943 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3944 Maybe overwrite the btrace configuration's cpu. Skip enabling
3945 errata workarounds if the vendor is unknown.
3946 * python/py-record-btrace.c: Include record-btrace.h.
3947 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3948 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3949 * record-btrace.c (record_btrace_cpu_state_kind): New.
3950 (record_btrace_cpu): New.
3951 (set_record_btrace_cpu_cmdlist): New.
3952 (record_btrace_get_cpu): New.
3953 (require_btrace_thread, record_btrace_info)
3954 (record_btrace_resume_thread): Call record_btrace_get_cpu.
3955 (cmd_set_record_btrace_cpu_none): New.
3956 (cmd_set_record_btrace_cpu_auto): New.
3957 (cmd_set_record_btrace_cpu): New.
3958 (cmd_show_record_btrace_cpu): New.
3959 (_initialize_record_btrace): Initialize set/show record btrace cpu
3960 commands.
3961 * record-btrace.h (record_btrace_get_cpu): New.
3962
3963 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3964
3965 * record.c (set_record_command): Fix typo in message.
3966
3967 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3968
3969 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3970
3971 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3972
3973 * infrun.c (process_event_stop_test): Call
3974 gdbarch_in_indirect_branch_thunk.
3975 * gdbarch.sh (in_indirect_branch_thunk): New.
3976 * gdbarch.c: Regenerated.
3977 * gdbarch.h: Regenerated.
3978 * x86-tdep.h: New.
3979 * x86-tdep.c: New.
3980 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3981 (HFILES_NO_SRCDIR): Add x86-tdep.h.
3982 (ALLDEPFILES): Add x86-tdep.c.
3983 * arch-utils.h (default_in_indirect_branch_thunk): New.
3984 * arch-utils.c (default_in_indirect_branch_thunk): New.
3985 * i386-tdep: Include x86-tdep.h.
3986 (i386_in_indirect_branch_thunk): New.
3987 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3988 function.
3989 * amd64-tdep: Include x86-tdep.h.
3990 (amd64_in_indirect_branch_thunk): New.
3991 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3992
3993 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3994
3995 PR gdb/23053
3996 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3997 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3998 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3999 regression.
4000
4001 2018-04-12 Tom Tromey <tom@tromey.com>
4002
4003 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4004 (rust_evaluate_subexp): Likewise.
4005
4006 2018-04-12 Pedro Alves <palves@redhat.com>
4007
4008 * procfs.c (procfs_detach): Make forward declaration's prototype
4009 match definition's protototype.
4010 (proc_get_LDT_entry): Remove stale do_cleanups call.
4011
4012 2018-04-12 Pedro Alves <palves@redhat.com>
4013
4014 * target.h (target_ops::to_has_exited): Delete.
4015 (target_has_exited): Delete.
4016 * target-delegates.c: Regenerate.
4017
4018 2018-04-11 Pedro Alves <palves@redhat.com>
4019
4020 * target.c (fileio_fh_t::t): Add comment.
4021 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4022 (target_fileio_close): Handle a NULL target.
4023 (invalidate_fileio_fh): New.
4024 (target_close): Call it.
4025 * remote.c (remote_hostio_send_command): No longer check whether
4026 remote_desc is open.
4027
4028 2018-04-11 Pedro Alves <palves@redhat.com>
4029
4030 * target.c (fileio_fh_t): Make it a named struct instead of a
4031 typedef.
4032 (fileio_fh_t::is_closed): New method.
4033 (DEF_VEC_O (fileio_fh_t)): Remove.
4034 (fileio_fhandles): Now a std::vector.
4035 (is_closed_fileio_fh): Delete.
4036 (acquire_fileio_fd): Adjust. Rename parameters.
4037 (release_fileio_fd): Adjust.
4038 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4039 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4040 (target_fileio_close): Adjust.
4041
4042 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4043
4044 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4045 index.
4046
4047 2018-04-10 Pedro Alves <palves@redhat.com>
4048
4049 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4050 (scoped_finish_thread_state): New class.
4051 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4052 cleanup.
4053 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4054 (fetch_inferior_event, normal_stop): Likewise.
4055 * thread.c (finish_thread_state_cleanup): Delete.
4056
4057 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4058 Pedro Alves <palves@redhat.com>
4059
4060 * value.c: Include "selftest.h" and "common/array-view.h".
4061 (struct range) <operator ==>: New.
4062 (test_ranges_contain): New.
4063 (check_ranges_vector): New.
4064 (test_insert_into_bit_range_vector): New.
4065 (_initialize_values): Register selftests.
4066 * common/array-view.h (operator==, operator!=): New.
4067
4068 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4069
4070 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4071 an iterator.
4072 * inline-frame.c: Include <algorithm>.
4073 (struct inline_state): Add constructor.
4074 (inline_state_s): Remove.
4075 (DEF_VEC_O(inline_state_s)): Remove.
4076 (inline_states): Change type to std::vector.
4077 (find_inline_frame_state): Adjust to std::vector.
4078 (allocate_inline_frame_state): Remove.
4079 (clear_inline_frame_state): Adjust to std::vector.
4080 (skip_inline_frames): Adjust to std::vector.
4081
4082 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4083
4084 * tracepoint.h (struct trace_state_variable): Add constructor.
4085 <name>: Change type to std::string.
4086 * tracepoint.c (tsv_s): Remove.
4087 (DEF_VEC_O(tsv_s)): Remove.
4088 (tvariables): Change to std::vector.
4089 (create_trace_state_variable): Adjust to std::vector.
4090 (find_trace_state_variable): Likewise.
4091 (find_trace_state_variable_by_number): Likewise.
4092 (delete_trace_state_variable): Likewise.
4093 (trace_variable_command): Adjust to std::string.
4094 (delete_trace_variable_command): Likewise.
4095 (tvariables_info_1): Adjust to std::vector.
4096 (save_trace_state_variables): Likewise.
4097 (start_tracing): Likewise.
4098 (merge_uploaded_trace_state_variables): Adjust to std::vector
4099 and std::string.
4100 * target.h (struct target_ops)
4101 <to_download_trace_state_variable>: Pass reference to
4102 trace_state_variable.
4103 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4104 * target-delegates.c: Re-generate.
4105 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4106 (mi_tsv_deleted): Likewise.
4107 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4108 * remote.c (remote_download_trace_state_variable): Change
4109 pointer to reference and adjust.
4110 * make-target-delegates (parse_argtypes): Handle references.
4111 (write_function_header): Likewise.
4112 (munge_type): Likewise.
4113
4114 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4115
4116 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4117 string_view-selftests.c.
4118 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4119 testsuite.
4120 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4121 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4122 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4123 * unittests/basic_string_view/element_access/char/1.cc:
4124 Likewise.
4125 * unittests/basic_string_view/element_access/char/empty.cc:
4126 Likewise.
4127 * unittests/basic_string_view/element_access/char/front_back.cc:
4128 Likewise.
4129 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4130 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4131 Likewise.
4132 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4133 Likewise.
4134 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4135 Likewise.
4136 * unittests/basic_string_view/operations/compare/char/1.cc:
4137 Likewise.
4138 * unittests/basic_string_view/operations/compare/char/13650.cc:
4139 Likewise.
4140 * unittests/basic_string_view/operations/copy/char/1.cc:
4141 Likewise.
4142 * unittests/basic_string_view/operations/data/char/1.cc:
4143 Likewise.
4144 * unittests/basic_string_view/operations/find/char/1.cc:
4145 Likewise.
4146 * unittests/basic_string_view/operations/find/char/2.cc:
4147 Likewise.
4148 * unittests/basic_string_view/operations/find/char/3.cc:
4149 Likewise.
4150 * unittests/basic_string_view/operations/find/char/4.cc:
4151 Likewise.
4152 * unittests/basic_string_view/operations/rfind/char/1.cc:
4153 Likewise.
4154 * unittests/basic_string_view/operations/rfind/char/2.cc:
4155 Likewise.
4156 * unittests/basic_string_view/operations/rfind/char/3.cc:
4157 Likewise.
4158 * unittests/basic_string_view/operations/substr/char/1.cc:
4159 Likewise.
4160 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4161 * unittests/string_view-selftests.c: New file.
4162
4163 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4164
4165 * unittests/basic_string_view/capacity/1.cc: New file.
4166 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4167 * unittests/basic_string_view/cons/char/1.cc: New file.
4168 * unittests/basic_string_view/cons/char/2.cc: New file.
4169 * unittests/basic_string_view/cons/char/3.cc: New file.
4170 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4171 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4172 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4173 * unittests/basic_string_view/element_access/char/1.cc: New file.
4174 * unittests/basic_string_view/element_access/char/2.cc: New file.
4175 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4176 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4177 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4178 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4179 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4180 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4181 * unittests/basic_string_view/include.cc: New file.
4182 * unittests/basic_string_view/inserters/char/1.cc: New file.
4183 * unittests/basic_string_view/inserters/char/2.cc: New file.
4184 * unittests/basic_string_view/inserters/char/3.cc: New file.
4185 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4186 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4187 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4188 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4189 * unittests/basic_string_view/literals/types.cc: New file.
4190 * unittests/basic_string_view/literals/values.cc: New file.
4191 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4192 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4193 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4194 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4195 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4196 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4197 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4198 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4199 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4200 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4201 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4202 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4203 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4204 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4205 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4206 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4207 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4208 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4209 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4210 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4211 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4212 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4213 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4214 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4215 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4216 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4217 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4218 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4219 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4220 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4221 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4222 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4223 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4224 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4225 * unittests/basic_string_view/operators/char/2.cc: New file.
4226 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4227 * unittests/basic_string_view/range_access/char/1.cc: New file.
4228 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4229 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4230 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4231 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4232 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4233 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4234 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4235 * unittests/basic_string_view/typedefs.cc: New file.
4236 * unittests/basic_string_view/types/1.cc: New file.
4237
4238 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4239
4240 * common/gdb_string_view.h: Remove libstdc++ implementation
4241 details, adjust to gdb reality.
4242 * common/gdb_string_view.tcc: Likewise.
4243 * cli/cli-script.c (struct string_view): Remove.
4244 (user_args) <m_args>: Change element type to gdb::string_view.
4245 (user_args::insert_args): Adjust.
4246
4247 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4248
4249 * common/gdb_string_view.h: New file.
4250 * common/gdb_string_view.tcc: New file.
4251
4252 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4253
4254 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4255 * configure: Re-generate.
4256
4257 2018-04-09 Pedro Alves <palves@redhat.com>
4258
4259 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4260 (set_target_gdbarch): Call
4261 gdb::observers::architecture_changed.notify instead of
4262 observer_notify_architecture_changed.
4263
4264 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4265
4266 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4267 (do_restore_current_traceframe_cleanup): Remove.
4268 (restore_current_traceframe_cleanup_dtor): Remove.
4269 (make_cleanup_restore_current_traceframe): Remove.
4270 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4271 New.
4272 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4273 * infrun.c (fetch_inferior_event): Use
4274 scoped_restore_current_traceframe.
4275
4276 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4277
4278 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4279 Remove.
4280 <n_allocated_type_units>: Remove.
4281 <all_type_units>: Change to std::vector.
4282 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4283 to std::vector change.
4284 (dwarf2_per_objfile::get_cutu): Likewise.
4285 (dwarf2_per_objfile::get_tu): Likewise.
4286 (create_signatured_type_table_from_index): Likewise.
4287 (create_signatured_type_table_from_debug_names): Likewise.
4288 (dw2_symtab_iter_next): Likewise.
4289 (dw2_print_stats): Likewise.
4290 (dw2_expand_all_symtabs): Likewise.
4291 (dw2_expand_marked_cus): Likewise.
4292 (dw2_debug_names_iterator::next): Likewise.
4293 (dwarf2_initialize_objfile): Likewise.
4294 (add_signatured_type_cu_to_table): Likewise.
4295 (create_all_type_units): Likewise.
4296 (add_type_unit): Likewise.
4297 (struct tu_abbrev_offset): Add constructor.
4298 (build_type_psymtabs_1): Adjust to std::vector change.
4299 (print_tu_stats): Likewise.
4300 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4301 (write_debug_names): Likewise.
4302
4303 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4304
4305 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4306 Make an std::vector.
4307 <n_comp_units>: Remove.
4308 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4309 to std::vector change.
4310 (dwarf2_per_objfile::get_cutu): Likewise.
4311 (dwarf2_per_objfile::get_cu): Likewise.
4312 (create_cus_from_index): Likewise.
4313 (create_addrmap_from_index): Likewise.
4314 (create_addrmap_from_aranges): Likewise.
4315 (dwarf2_read_index): Likewise.
4316 (dw2_find_last_source_symtab): Likewise.
4317 (dw2_map_symtabs_matching_filename): Likewise.
4318 (dw2_symtab_iter_next): Likewise.
4319 (dw2_print_stats): Likewise.
4320 (dw2_expand_all_symtabs): Likewise.
4321 (dw2_expand_symtabs_with_fullname): Likewise.
4322 (dw2_expand_marked_cus): Likewise.
4323 (dw2_map_symbol_filenames): Likewise.
4324 (create_cus_from_debug_names): Likewise.
4325 (dwarf2_read_debug_names): Likewise.
4326 (dw2_debug_names_iterator::next): Likewise.
4327 (dwarf2_initialize_objfile): Likewise.
4328 (set_partial_user): Likewise.
4329 (dwarf2_build_psymtabs_hard): Likewise.
4330 (read_comp_units_from_section): Remove arguments, adjust to
4331 std::vector change.
4332 (create_all_comp_units): Adjust to std::vector and
4333 read_comp_units_from_section changes.
4334 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4335 change.
4336 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4337 (psyms_seen_size): Likewise.
4338 (write_gdbindex): Likewise.
4339 (write_debug_names): Likewise.
4340
4341 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4342
4343 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4344 with dwarf2_per_objfile.
4345 (create_cus_from_index): Likewise.
4346 (create_signatured_type_table_from_index): Likewise.
4347 (dwarf2_read_index): Likewise.
4348 (dwarf2_initialize_objfile): Likewise.
4349 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4350 per_cu rather than get_dwarf2_per_objfile.
4351
4352 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4353
4354 * dwarf2read.h (struct signatured_type): Forward declare.
4355 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4356 New methods.
4357 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4358 (dw2_get_cutu): ...this.
4359 (dwarf2_per_objfile::get_cu): Rename from...
4360 (dw2_get_cu): ...this.
4361 (dwarf2_per_objfile::get_tu): New.
4362 (create_addrmap_from_index): Adjust.
4363 (create_addrmap_from_aranges): Adjust.
4364 (dw2_find_last_source_symtab): Adjust.
4365 (dw2_map_symtabs_matching_filename): Adjust.
4366 (dw2_symtab_iter_next): Adjust.
4367 (dw2_print_stats): Adjust.
4368 (dw2_expand_all_symtabs): Adjust.
4369 (dw2_expand_symtabs_with_fullname): Adjust.
4370 (dw2_expand_marked_cus): Adjust.
4371 (dw_expand_symtabs_matching_file_matcher): Adjust.
4372 (dw2_map_symbol_filenames): Adjust.
4373 (dw2_debug_names_iterator::next): Adjust.
4374 (dwarf2_initialize_objfile): Adjust.
4375 (set_partial_user): Adjust.
4376 (dwarf2_build_psymtabs_hard): Adjust.
4377
4378 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4379
4380 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4381 Remove unused variables.
4382 (dw2_map_symtabs_matching_filename): Likewise.
4383 (dwarf2_record_block_ranges): Likewise.
4384 (dwarf2_read_addr_index): Likewise.
4385 (follow_die_offset): Likewise.
4386
4387 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4388
4389 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4390 to symbol_file_add_main.
4391
4392 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4393
4394 PR mi/22299
4395 * mi/mi-console.c (do_fputc_async_safe): New.
4396 (mi_console_file::write_async_safe): New.
4397 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4398 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4399 New.
4400 * ui-file.c (ui_file::putstrn): Adjust call to
4401 fputstrn_unfiltered.
4402 * utils.c (printchar): Replace do_fputs and do_fprintf
4403 parameters by do_fputc.
4404 (fputstr_filtered): Adjust call to printchar.
4405 (fputstr_unfiltered): Likewise.
4406 (fputstrn_filtered): Likewise.
4407 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4408 printchar.
4409 * utils.h (do_fputc_ftype): New typedef.
4410 (fputstrn_unfiltered): Add do_fputc parameter.
4411
4412 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4413
4414 * regformats/i386/i386-avx.dat: Remove.
4415
4416 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4417
4418 PR gdb/22979
4419 * amd64-tdep.c (amd64_none_init_abi): New function.
4420 (amd64_x32_none_init_abi): New function.
4421 (_initialize_amd64_tdep): Register handlers for x86-64 and
4422 x64_32 with GDB_OSABI_NONE.
4423 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4424 GDB_OSABI_NONE osabi.
4425
4426 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4427
4428 PR gdb/22980
4429 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4430 GDB_OSABI_NONE.
4431 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4432 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4433
4434 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4435
4436 * common/byte-vector.h (char_vector): New type.
4437 * target.h (target_read_alloc): Return
4438 gdb::optional<byte_vector>.
4439 (target_read_stralloc): Return gdb::optional<char_vector>.
4440 (target_get_osdata): Return gdb::optional<char_vector>.
4441 * target.c (target_read_alloc_1): Templatize. Replacement
4442 manual memory management with vector.
4443 (target_read_alloc): Change return type, adjust.
4444 (target_read_stralloc): Change return type, adjust.
4445 (target_get_osdata): Change return type, adjust.
4446 * auxv.c (struct auxv_info) <length>: Remove.
4447 <data>: Change type to gdb::optional<byte_vector>.
4448 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4449 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4450 (target_auxv_search): Adjust.
4451 (fprint_target_auxv): Adjust.
4452 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4453 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4454 (linux_make_corefile_notes): Adjust.
4455 * osdata.c (get_osdata): Adjust.
4456 * remote.c (remote_get_threads_with_qxfer): Adjust.
4457 (remote_memory_map): Adjust.
4458 (remote_traceframe_info): Adjust.
4459 (btrace_read_config): Adjust.
4460 (remote_read_btrace): Adjust.
4461 (remote_pid_to_exec_file): Adjust.
4462 * solib-aix.c (solib_aix_get_library_list): Adjust.
4463 * solib-dsbt.c (decode_loadmap): Don't free buf.
4464 (dsbt_get_initial_loadmaps): Adjust.
4465 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4466 * solib-target.c (solib_target_current_sos): Adjust.
4467 * tracepoint.c (sdata_make_value): Adjust.
4468 * xml-support.c (xinclude_start_include): Adjust.
4469 (xml_fetch_content_from_file): Adjust.
4470 * xml-support.h (xml_fetch_another): Change return type.
4471 (xml_fetch_content_from_file): Change return type.
4472 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4473 * xml-tdesc.c (file_read_description_xml): Adjust.
4474 (fetch_available_features_from_target): Change return type.
4475 (target_fetch_description_xml): Adjust.
4476 (target_read_description_xml): Adjust.
4477
4478 2018-04-06 Tom Tromey <tom@tromey.com>
4479
4480 * value.c (~value): Update.
4481 (struct value) <contents>: Now unique_xmalloc_ptr.
4482 (value_contents_bits_eq, allocate_value_contents)
4483 (value_contents_raw, value_contents_all_raw)
4484 (value_contents_for_printing, value_contents_for_printing_const)
4485 (set_value_enclosing_type): Update.
4486
4487 2018-04-06 Tom Tromey <tom@tromey.com>
4488
4489 * value.c (range_s): Remove typedef, VEC.
4490 (struct range): Add operator<.
4491 (range_lessthan): Remove.
4492 (ranges_contain): Change type.
4493 (~value): Update.
4494 (struct value) <unavailable, optimized_out>: Now std::vector.
4495 (value_entirely_available)
4496 (value_entirely_covered_by_range_vector)
4497 (value_entirely_unavailable, value_entirely_optimized_out):
4498 Update.
4499 (insert_into_bit_range_vector): Change argument type.
4500 (find_first_range_overlap): Likewise.
4501 (struct ranges_and_idx, value_contents_bits_eq)
4502 (require_not_optimized_out, require_available): Update.
4503 (ranges_copy_adjusted): Change argument types.
4504 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4505
4506 2018-04-06 Tom Tromey <tom@tromey.com>
4507
4508 * value.c (~value): Update.
4509 (struct value) <parent>: Now a value_ref_ptr.
4510 (value_parent, set_value_parent, value_address, value_copy):
4511 Update.
4512
4513 2018-04-06 Tom Tromey <tom@tromey.com>
4514
4515 * value.c (struct value): Add constructor, destructor, and member
4516 initializers.
4517 (allocate_value_lazy, value_decref): Update.
4518
4519 2018-04-06 Tom Tromey <tom@tromey.com>
4520
4521 * value.c (struct value) <released, next>: Remove.
4522 (all_values): Now a std::vector.
4523 (allocate_value_lazy): Update.
4524 (value_next): Remove.
4525 (value_mark, value_free_to_mark, release_value)
4526 (value_release_to_mark): Update.
4527
4528 2018-04-06 Tom Tromey <tom@tromey.com>
4529
4530 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4531 (free_value_chain): Remove.
4532 * value.c (free_value_chain): Remove.
4533 (value_release_to_mark): Return a std::vector.
4534 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4535 std::vector.
4536 (check_condition): Update.
4537 * eval.c (fetch_subexp_value): Change "val_chain" to a
4538 std::vector.
4539 * breakpoint.c (update_watchpoint): Update.
4540 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4541
4542 2018-04-06 Tom Tromey <tom@tromey.com>
4543
4544 * value.h (free_all_values): Remove.
4545 * value.c (free_all_values): Remove.
4546
4547 2018-04-06 Tom Tromey <tom@tromey.com>
4548
4549 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4550 (value_history_chain, value_history_count): Remove.
4551 (value_history): New global.
4552 (record_latest_value, access_value_history, show_values)
4553 (preserve_values): Update.
4554
4555 2018-04-06 Tom Tromey <tom@tromey.com>
4556
4557 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4558 * varobj.c (varobj_set_display_format, varobj_set_value)
4559 (install_default_visualizer, construct_visualizer)
4560 (install_new_value, ~varobj, varobj_get_value_type)
4561 (my_value_of_variable, varobj_editable_p): Update.
4562 * c-varobj.c (c_describe_child, c_value_of_variable)
4563 (cplus_number_of_children, cplus_describe_child): Update.
4564 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4565 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4566 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4567
4568 2018-04-06 Tom Tromey <tom@tromey.com>
4569
4570 * printcmd.c (last_examine_address): Change type to
4571 value_ref_ptr.
4572 (do_examine, x_command): Update.
4573
4574 2018-04-06 Tom Tromey <tom@tromey.com>
4575
4576 * value.c (release_value): Update.
4577 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4578 (struct bpstats) <val>: Now a value_ref_ptr.
4579 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4580 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4581 (~watchpoint, print_it_watchpoint, watch_command_1)
4582 (invalidate_bp_value_on_memory_change): Update.
4583
4584 2018-04-06 Tom Tromey <tom@tromey.com>
4585
4586 * varobj.c (varobj_clear_saved_item)
4587 (update_dynamic_varobj_children, install_new_value, ~varobj):
4588 Update.
4589 * value.h (value_incref): Move declaration earlier.
4590 (value_decref): Rename from value_free.
4591 (struct value_ref_policy): New.
4592 (value_ref_ptr): New typedef.
4593 (struct value_deleter): Remove.
4594 (gdb_value_up): Remove typedef.
4595 (release_value): Change return type.
4596 (release_value_or_incref): Remove.
4597 * value.c (set_value_parent): Update.
4598 (value_incref): Change return type.
4599 (value_decref): Rename from value_free.
4600 (value_free_to_mark, free_all_values, free_value_chain): Update.
4601 (release_value): Return value_ref_ptr.
4602 (release_value_or_incref): Remove.
4603 (record_latest_value, set_internalvar, clear_internalvar):
4604 Update.
4605 * stack.c (info_frame_command): Don't call value_free.
4606 * python/py-value.c (valpy_dealloc, valpy_new)
4607 (value_to_value_object): Update.
4608 * printcmd.c (do_examine): Update.
4609 * opencl-lang.c (lval_func_free_closure): Update.
4610 * mi/mi-main.c (register_changed_p): Don't call value_free.
4611 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4612 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4613 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4614 value_free.
4615 * guile/scm-value.c (vlscm_free_value_smob)
4616 (vlscm_scm_from_value): Update.
4617 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4618 (frame_unwind_register_unsigned, get_frame_register_bytes)
4619 (put_frame_register_bytes): Don't call value_free.
4620 * findvar.c (address_from_register): Don't call value_free.
4621 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4622 * dwarf2loc.c (entry_data_value_free_closure)
4623 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4624 (dwarf2_evaluate_loc_desc_full): Update.
4625 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4626 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4627 (~watchpoint, watch_command_1)
4628 (invalidate_bp_value_on_memory_change): Update.
4629 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4630
4631 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4632
4633 PR gdb/23022
4634 * warning.m4: Add -Wno-error=deprecated-register.
4635 * configure: Re-generate.
4636
4637 2018-04-05 Tom Tromey <tom@tromey.com>
4638
4639 * linespec.h: Remove include of "vec.h".
4640
4641 2018-04-05 Tom Tromey <tom@tromey.com>
4642
4643 * linespec.c (typep): Remove typedef.
4644 (find_methods, find_superclass_methods): Take a std::vector.
4645 (find_method): Use std::vector.
4646
4647 2018-04-05 Tom Tromey <tom@tromey.com>
4648
4649 * utils.c (compare_strings): Remove.
4650 * utils.h (compare_strings): Remove.
4651 * objc-lang.h (find_imps): Update.
4652 * objc-lang.c (find_methods): Take a std::vector.
4653 (uniquify_strings, find_imps): Likewise.
4654 * linespec.c (find_methods): Take a std::vector.
4655 (decode_objc): Use std::vector.
4656 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4657 a std::vector.
4658 (find_method, find_function_symbols): Use std::vector.
4659
4660 2018-04-05 Tom Tromey <tom@tromey.com>
4661
4662 * completer.c (completion_tracker::completion_tracker): Remove
4663 cast.
4664 (completion_tracker::discard_completions): Likewise.
4665 * breakpoint.c (ambiguous_names_p): Remove cast.
4666 * ada-lang.c (_initialize_ada_language): Remove cast.
4667 * utils.h (streq): Update.
4668 (streq_hash): Add new declaration.
4669 * utils.c (streq): Return bool.
4670 (streq_hash): New function.
4671
4672 2018-04-05 Tom Tromey <tom@tromey.com>
4673
4674 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4675 Remove a string copy.
4676
4677 2018-04-05 Tom Tromey <tom@tromey.com>
4678
4679 * linespec.c (filter_results): Use std::vector.
4680 (decode_line_2, decode_line_full): Update.
4681
4682 2018-04-05 Tom Tromey <tom@tromey.com>
4683
4684 * linespec.c (canonical_to_fullform): Return std::string.
4685 (filter_results): Update.
4686 (struct decode_line_2_item): Add constructor.
4687 <fullform, displayform>: Now std::string.
4688 (decode_line_2_compare_items): Now a std::sort comparator.
4689 (decode_line_2): Update.
4690
4691 2018-04-05 Tom Tromey <tom@tromey.com>
4692
4693 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4694 (unexpected_linespec_error): Update.
4695 (linespec_parse_basic, parse_linespec): Update.
4696
4697 2018-04-05 Tom Tromey <tom@tromey.com>
4698
4699 * linespec.c (linespec_parse_basic): Reindent.
4700
4701 2018-04-05 Tom Tromey <tom@tromey.com>
4702
4703 * minsyms.h (iterate_over_minimal_symbols): Update.
4704 * minsyms.c (iterate_over_minimal_symbols): Take a
4705 gdb::function_view.
4706 * linespec.c (struct collect_minsyms): Remove.
4707 (compare_msyms): Now a std::sort comparator.
4708 (add_minsym): Add parameters.
4709 (search_minsyms_for_name): Update. Use std::vector.
4710
4711 2018-04-03 Tom Tromey <tom@tromey.com>
4712
4713 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4714 gdb::byte_vector.
4715
4716 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4717
4718 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4719
4720 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4721
4722 PR gdb/16959
4723 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
4724 printing static type.
4725
4726 2018-04-01 Tom Tromey <tom@tromey.com>
4727
4728 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4729 (rs6000_xfer_shared_libraries): Update.
4730
4731 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
4732
4733 * common/gdb_vecs.h (char_ptr): Remove.
4734 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4735
4736 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4737
4738 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4739 with std::vector.
4740 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4741
4742 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4743
4744 * tracepoint.h (struct uploaded_tp): Initialize fields.
4745 <actions, step_actions, cmd_strings>: Change type to
4746 std::vector<char *>.
4747 * tracepoint.c (get_uploaded_tp): Allocate with new.
4748 (free_uploaded_tps): Free with delete.
4749 (parse_tracepoint_definition): Adjust to std::vector change.
4750 * breakpoint.c (read_uploaded_action): Likewise.
4751 (create_tracepoint_from_upload): Likewise.
4752 * ctf.c (ctf_write_uploaded_tp): Likewise.
4753 (SET_ARRAY_FIELD): Likewise.
4754 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4755
4756 2018-03-30 Tom Tromey <tom@tromey.com>
4757
4758 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
4759 std::unique_ptr.
4760 (svr4_keep_data_in_core): Update.
4761 (svr4_read_so_list): Update.
4762
4763 2018-03-30 Tom Tromey <tom@tromey.com>
4764
4765 * windows-nat.c (handle_output_debug_string, handle_exception):
4766 Update.
4767 * target.h (target_read_string): Update.
4768 * target.c (target_read_string): Change "string" to
4769 unique_xmalloc_ptr.
4770 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4771 Update.
4772 * solib-frv.c (frv_current_sos): Update.
4773 * solib-dsbt.c (dsbt_current_sos): Update.
4774 * solib-darwin.c (darwin_current_sos): Update.
4775 * linux-thread-db.c (inferior_has_bug): Update.
4776 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4777 Update. Remove alloca.
4778 * ada-lang.c (ada_main_name): Update.
4779
4780 2018-03-30 Tom Tromey <tom@tromey.com>
4781
4782 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4783 (struct dwo_file_deleter): New.
4784 (dwo_file_up): New typedef.
4785 (open_and_init_dwo_file): Use dwo_file_up.
4786 (free_dwo_file_cleanup): Remove.
4787
4788 2018-03-30 Tom Tromey <tom@tromey.com>
4789
4790 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4791 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4792
4793 2018-03-30 Tom Tromey <tom@tromey.com>
4794
4795 * dwarf2read.c (class free_cached_comp_units): New class.
4796 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4797 (free_cached_comp_units): Remove function.
4798
4799 2018-03-30 Tom Tromey <tom@tromey.com>
4800
4801 * utils.h (make_cleanup_unpush_target): Remove.
4802 * inf-ptrace.c (struct target_unpusher): New.
4803 (target_unpush_up) New typedef.
4804 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4805 target_unpush_up.
4806 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4807
4808 2018-03-27 Tom Tromey <tom@tromey.com>
4809
4810 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4811
4812 2018-03-27 Pedro Alves <palves@redhat.com>
4813 Tom Tromey <tom@tromey.com>
4814
4815 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4816 destructor. Now a class.
4817 (gdb_readline_wrapper_cleanup): Remove function.
4818 (gdb_readline_wrapper): Remove cleanups.
4819
4820 2018-03-27 Tom Tromey <tom@tromey.com>
4821
4822 * typeprint.h (struct type_print_options) <local_typedefs,
4823 global_typedefs>: Remove "struct" keyword.
4824 (class typedef_hash_table): New class.
4825 (recursively_update_typedef_hash, add_template_parameters)
4826 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4827 (find_typedef_in_hash): Don't declare.
4828 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4829 (typedef_hash_table::recursively_update): Rename from
4830 recursively_update_typedef_hash. Now a member.
4831 (typedef_hash_table::add_template_parameters): Rename from
4832 add_template_parameters. Now a member.
4833 (typedef_hash_table::typedef_hash_table): Now a constructor;
4834 rename from create_typedef_hash.
4835 (typedef_hash_table::~typedef_hash_table): Now a destructor;
4836 rename from free_typedef_hash.
4837 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4838 (do_free_global_table): Remove.
4839 (typedef_hash_table::typedef_hash_table): New constructor; renamed
4840 from copy_type_recursive.
4841 (create_global_typedef_table): Remove.
4842 (typedef_hash_table::find_global_typedef): Now a member of
4843 typedef_hash_table.
4844 (typedef_hash_table::find_typedef): Rename from
4845 find_typedef_in_hash; now a member.
4846 (whatis_exp): Update.
4847 * extension.h (struct ext_lang_type_printers): Add constructor and
4848 destructor.
4849 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4850 declare.
4851 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4852 Now a constructor; rename from start_ext_lang_type_printers.
4853 (ext_lang_type_printers): Now a destructor; rename from
4854 free_ext_lang_type_printers.
4855 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4856 Update.
4857 (c_type_print_base_struct_union): Update. Remove cleanups.
4858
4859 2018-03-27 Tom Tromey <tom@tromey.com>
4860
4861 * dwarf-index-write.c: Include <cmath>.
4862
4863 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4864
4865 * NEWS: Add entry describing new "set|show varsize-limit" command.
4866 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4867 command.
4868 * printcmd.c (_initialize_printcmd): Add "set var" alias of
4869 "set variable".
4870
4871 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
4872
4873 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4874 dwarf-index-write.c
4875 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4876 * dwarf-index-common.c: New file.
4877 * dwarf-index-common.h: New file.
4878 * dwarf-index-write.c: New file.
4879 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4880 (struct dwarf2_section_info): Move from here.
4881 (dwarf2_section_info_def): Likewise.
4882 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4883 (offset_type): Likewise.
4884 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4885 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4886 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4887 (byte_swap): Likewise.
4888 (MAYBE_SWAP): Likewise.
4889 (dwarf2_per_cu_ptr): Likewise.
4890 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4891 (struct tu_stats): Likewise.
4892 (struct dwarf2_per_objfile): Likewise.
4893 (struct dwarf2_per_cu_data): Likewise.
4894 (struct signatured_type): Likewise.
4895 (sig_type_ptr): Likewise.
4896 (DEF_VEC_P (sig_type_ptr)): Likewise.
4897 (INDEX4_SUFFIX): Likewise.
4898 (INDEX5_SUFFIX): Likewise.
4899 (DEBUG_STR_SUFFIX): Likewise.
4900 (dwarf2_read_section): Make non-static.
4901 (mapped_index_string_hash): Move from here.
4902 (dwarf5_djb_hash): Likewise.
4903 (file_write): Likewise.
4904 (class data_buf): Likewise.
4905 (struct symtab_index_entry): Likewise.
4906 (struct mapped_symtab): Likewise.
4907 (find_slot): Likewise.
4908 (hash_expand): Likewise.
4909 (add_index_entry): Likewise.
4910 (uniquify_cu_indices): Likewise.
4911 (class c_str_view): Likewise.
4912 (class c_str_view_hasher): Likewise.
4913 (class vector_hasher): Likewise.
4914 (write_hash_table): Likewise.
4915 (psym_index_map): Likewise.
4916 (struct addrmap_index_data): Likewise.
4917 (add_address_entry): Likewise.
4918 (add_address_entry_worker): Likewise.
4919 (write_address_map): Likewise.
4920 (symbol_kind): Likewise.
4921 (write_psymbols): Likewise.
4922 (struct signatured_type_index_data): Likewise.
4923 (write_one_signatured_type): Likewise.
4924 (recursively_count_psymbols): Likewise.
4925 (recursively_write_psymbols): Likewise.
4926 (class debug_names): Likewise.
4927 (check_dwarf64_offsets): Likewise.
4928 (psyms_seen_size): Likewise.
4929 (write_gdbindex): Likewise.
4930 (write_debug_names): Likewise.
4931 (assert_file_size): Likewise.
4932 (write_psymtabs_to_index): Likewise.
4933 (save_gdb_index_command): Likewise.
4934 (_initialize_dwarf2_read): Don't register the "save gdb-index"
4935 command.
4936 * dwarf2read.h: New file.
4937
4938 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4939
4940 PR gdb/22670
4941 * dwarf2read.c (dwarf2_physname): Do not return the demangled
4942 symbol name if the CU's language stores symbol names in linkage
4943 format.
4944 * language.h (struct language_defn)
4945 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
4946 all instances of this struct.
4947
4948 2018-03-26 Tom Tromey <tom@tromey.com>
4949
4950 * stack.c (backtrace_command_1): Remove verbose code.
4951
4952 2018-03-26 Tom Tromey <tom@tromey.com>
4953
4954 * python/py-framefilter.c (py_print_type): Don't catch
4955 exceptions. Return void.
4956 (py_print_value): Likewise.
4957 (py_print_single_arg): Likewise.
4958 (enumerate_args): Don't catch exceptions.
4959 (py_print_args): Likewise.
4960 (py_print_frame): Likewise.
4961 (gdbpy_apply_frame_filter): Catch exceptions here.
4962
4963 2018-03-26 Tom Tromey <tom@tromey.com>
4964
4965 * stack.c (_initialize_stack): Remove trailing newlines from help
4966 text. Add "Usage" line to "backtrace" help.
4967
4968 2018-03-26 Tom Tromey <tom@tromey.com>
4969
4970 PR python/16486:
4971 * python/py-framefilter.c (py_print_args): Call wrap_hint.
4972
4973 2018-03-26 Tom Tromey <tom@tromey.com>
4974
4975 * python/py-framefilter.c (py_print_single_arg): Return
4976 EXT_LANG_BT_ERROR from catch.
4977
4978 2018-03-26 Tom Tromey <tom@tromey.com>
4979
4980 PR backtrace/15584:
4981 * stack.c (backtrace_command_1): Move some code into no-filters
4982 "if".
4983
4984 2018-03-26 Tom Tromey <tom@tromey.com>
4985
4986 * python/py-framefilter.c (throw_quit_or_print_exception): New
4987 function.
4988 (gdbpy_apply_frame_filter): Use it.
4989
4990 2018-03-26 Tom Tromey <tom@tromey.com>
4991
4992 PR cli/17716:
4993 * python/py-framefilter.c (py_print_type, py_print_value)
4994 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4995 RETURN_MASK_ERROR.
4996
4997 2018-03-26 Tom Tromey <tom@tromey.com>
4998
4999 * python/py-framefilter.c (enumerate_args): Use
5000 gdb::unique_xmalloc_ptr.
5001
5002 2018-03-26 Tom Tromey <tom@tromey.com>
5003
5004 * python/py-framefilter.c (py_print_frame): Return
5005 EXT_LANG_BT_OK.
5006 (gdbpy_apply_frame_filter): Update comment.
5007 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5008 Remove.
5009 <EXT_LANG_BT_NO_FILTERS>: Change value.
5010
5011 2018-03-26 Tom Tromey <tom@tromey.com>
5012
5013 PR backtrace/15582:
5014 * stack.c (backtrace_command): Parse "hide" argument.
5015 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5016 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5017 constant.
5018
5019 2018-03-26 Tom Tromey <tom@tromey.com>
5020
5021 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5022 add "flags".
5023 (backtrace_command): Remove "fulltrace", add "flags".
5024
5025 2018-03-26 Tom Tromey <tom@tromey.com>
5026
5027 * stack.c (backtrace_command): Rewrite command line parsing.
5028
5029 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5030
5031 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5032
5033 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 * filename-seen-cache.h: Add include guard.
5036
5037 2018-03-26 Keith Seitz <keiths@redhat.com>
5038
5039 * symfile.c (place_section): Remove "struct" from section_addr_info
5040 in comment.
5041 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5042 "struct" keyword from section_addr_info.
5043
5044 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5045
5046 * regformats/regdef.h (reg): Add constructors.
5047
5048 2018-03-25 Pedro Alves <palves@redhat.com>
5049
5050 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5051 if then/else bodies in var_func_name extraction.
5052
5053 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5054
5055 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5056 lookup_minimal_symbol() to find symbol entry.
5057 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5058
5059 2018-03-23 Keith Seitz <keiths@redhat.com>
5060
5061 PR c++/22968
5062 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5063 nested type definitions for C++, too.
5064
5065 2018-03-23 Tom Tromey <tom@tromey.com>
5066
5067 * machoread.c (struct oso_el): Add a constructor. Don't define as
5068 a typedef.
5069 (macho_register_oso): Remove.
5070 (macho_symtab_read): Take a std::vector.
5071 (oso_el_compare_name): Now a std::sort comparator.
5072 (macho_symfile_read_all_oso): Take a std::vector.
5073 (macho_symfile_read): Use std::vector. Remove cleanups.
5074
5075 2018-03-22 Tom Tromey <tom@tromey.com>
5076
5077 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5078 (record_full_goto_bookmark): Use std::string.
5079
5080 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5081
5082 PR tdep/18295
5083 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5084 a single mask.
5085
5086 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5087
5088 * rs6000-tdep.c (store_insn_p): New function.
5089 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5090 and cr_reg to their unshifted values. Use store_insn_p to
5091 match LR saves using either R1 or fdata->alloca_reg. Use
5092 store_insn_p to match CR saves. Set alloca_reg_offset
5093 when alloca_reg and framep are set. Remove lr_reg shift
5094 when assigning to fdata->lr_register.
5095
5096 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5097
5098 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5099 command line args instead of emitting a warning.
5100
5101 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5102
5103 * tracepoint.h (struct static_tracepoint_marker): Initialize
5104 fields, define default constructor, move constructor and move
5105 assignment, disable the rest.
5106 <str_id, extra>: Make std::string.
5107 (release_static_tracepoint_marker): Remove.
5108 (free_current_marker): Remove.
5109 * tracepoint.c (free_current_marker): Remove.
5110 (parse_static_tracepoint_marker_definition): Adjust to
5111 std::string, use new hex2str overload.
5112 (release_static_tracepoint_marker): Remove.
5113 (print_one_static_tracepoint_marker): Get marker by reference
5114 and adjust to std::string.
5115 (info_static_tracepoint_markers_command): Adjust to std::vector
5116 changes
5117 * target.h (static_tracepoint_marker_p): Remove typedef.
5118 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5119 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5120 bool.
5121 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5122 * target-debug.h
5123 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5124 (target_debug_print_std_vector_static_tracepoint_marker): New.
5125 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5126 to...
5127 (target_debug_print_static_tracepoint_marker_p): ... this.
5128 * target-delegates.c: Re-generate.
5129 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5130 Make std::string.
5131 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5132 (decode_static_tracepoint_spec): Adjust to std::vector.
5133 (tracepoint_print_one_detail): Adjust to std::string.
5134 (strace_marker_decode_location): Adjust to std::string.
5135 (update_static_tracepoint): Adjust to std::string, remove call
5136 to release_static_tracepoint_marker.
5137 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5138 Adjust to std::vector.
5139 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5140 (remote_static_tracepoint_markers_by_strid): Adjust to
5141 std::vector.
5142 * common/rsp-low.h (hex2str): New overload with explicit count
5143 of bytes.
5144 * common/rsp-low.c (hex2str): New overload with explicit count
5145 of bytes.
5146 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5147 (_initialize_rsp_low_selftests): Add test_hex2str test.
5148 * unittests/tracepoint-selftests.c
5149 (test_parse_static_tracepoint_marker_definition): Adjust to
5150 std::string.
5151
5152 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5153
5154 * tracepoint.c (parse_static_tracepoint_marker_definition):
5155 Consider case where the definition is followed by more
5156 definitions.
5157 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5158 tracepoint-selftests.c.
5159 * unittests/tracepoint-selftests.c: New.
5160
5161 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5162
5163 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5164 Carvalho.
5165
5166 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5167
5168 * symtab.c (find_pc_sect_line): fixed indentation.
5169
5170 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5171
5172 * symtab.c (find_pc_sect_line): now uses binary search.
5173
5174 2018-03-19 Tom Tromey <tom@tromey.com>
5175
5176 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5177 "IDENT" production.
5178
5179 2018-03-19 Pedro Alves <palves@redhat.com>
5180 Tom Tromey <tom@tromey.com>
5181
5182 * unittests/observable-selftests.c: New file.
5183 * common/observable.h: New file.
5184 * observable.h: New file.
5185 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5186 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5187 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5188 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5189 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5190 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5191 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5192 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5193 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5194 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5195 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5196 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5197 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5198 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5199 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5200 tui/tui-interp.c, valops.c: Update all users.
5201 * tui/tui-hooks.c (tui_bp_created_observer)
5202 (tui_bp_deleted_observer, tui_bp_modified_observer)
5203 (tui_inferior_exit_observer, tui_before_prompt_observer)
5204 (tui_normal_stop_observer, tui_register_changed_observer):
5205 Remove.
5206 (tui_observers_token): New global.
5207 (attach_or_detach, tui_attach_detach_observers): New functions.
5208 (tui_install_hooks, tui_remove_hooks): Use
5209 tui_attach_detach_observers.
5210 * record-btrace.c (record_btrace_thread_observer): Remove.
5211 (record_btrace_thread_observer_token): New global.
5212 * observer.sh: Remove.
5213 * observer.c: Rename to observable.c.
5214 * observable.c (namespace gdb_observers): Define new objects.
5215 (observer_debug): Move into gdb_observers namespace.
5216 (struct observer, struct observer_list, xalloc_observer_list_node)
5217 (xfree_observer_list_node, generic_observer_attach)
5218 (generic_observer_detach, generic_observer_notify): Remove.
5219 (_initialize_observer): Update.
5220 Don't include observer.inc.
5221 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5222 (clean mostlyclean): Likewise.
5223 (observer.h, observer.inc): Remove targets.
5224 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5225 (COMMON_SFILES): Use observable.c, not observer.c.
5226 * .gitignore: Remove observer.h.
5227
5228 2018-03-18 Tom Tromey <tom@tromey.com>
5229
5230 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5231 gdb::def_vector.
5232 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5233
5234 2018-03-17 Tom Tromey <tom@tromey.com>
5235
5236 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5237
5238 2018-03-17 Tom Tromey <tom@tromey.com>
5239
5240 * target.c (class scoped_target_fd): New.
5241 (target_fileio_close_cleanup): Remove.
5242 (target_fileio_read_alloc_1): Use scoped_target_fd.
5243
5244 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5245
5246 * silent-rules.mk: New.
5247 * Makefile.in: Include silent-rules.mk
5248 (srcdir, VPATH, top_srcdir): Move up.
5249 (COMPILE): Add ECHO_CXX.
5250 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5251 (init.c): Add ECHO_INIT_C.
5252 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5253 (version.c): Add ECHO_GEN.
5254 (printcmd.o): Add ECHO_CXX.
5255 (target-float.o): Add ECHO_CXX.
5256 (ada-exp.o): Add ECHO_CXX.
5257 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5258 (insight$(EXEEXT)): Add ECHO_CXXLD.
5259 * gnulib/configure.ac: Add AM_SILENT_RULES.
5260 * gnulib/aclocal.m4: Re-generate.
5261 * gnulib/configure: Re-generate.
5262 * gnulib/import/Makefile.in: Re-generate.
5263
5264 2018-03-16 Tom Tromey <tom@tromey.com>
5265
5266 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5267 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5268 * utils.c (do_free_section_addr_info)
5269 (make_cleanup_free_section_addr_info): Remove.
5270 * symfile.h (struct other_sections): Add constructor.
5271 (struct section_addr_info): Remove.
5272 (section_addr_info): New typedef.
5273 (struct sym_fns) <sym_offsets>: Change type of parameter.
5274 (build_section_addr_info_from_objfile)
5275 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5276 (default_symfile_offsets, symbol_file_add)
5277 (symbol_file_add_from_bfd)
5278 (build_section_addr_info_from_section_table): Update.
5279 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5280 * symfile.c (alloc_section_addr_info): Remove.
5281 (build_section_addr_info_from_section_table): Change return type.
5282 Update.
5283 (build_section_addr_info_from_bfd)
5284 (build_section_addr_info_from_objfile): Likewise.
5285 (free_section_addr_info): Remove.
5286 (relative_addr_info_to_section_offsets): Change type of "addrs".
5287 (addrs_section_compar): Now a std::sort comparator.
5288 (addrs_section_sort): Change return type.
5289 (addr_info_make_relative): Change type of "addrs". Update.
5290 (default_symfile_offsets, syms_from_objfile_1)
5291 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5292 (symbol_file_add_separate): Update.
5293 (symbol_file_add): Change type of "addrs". Update.
5294 (add_symbol_file_command): Update. Remove cleanups.
5295 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5296 cleanups.
5297 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5298 * solib.c (solib_read_symbols): Update.
5299 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5300 * machoread.c (macho_symfile_offsets): Update.
5301 * jit.c (jit_bfd_try_read_symtab): Update.
5302
5303 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5304
5305 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5306 unittests/utils-selftests.c.
5307 * unittests/utils-selftests.c: New file.
5308
5309 2018-03-14 Tom Tromey <tom@tromey.com>
5310
5311 PR cli/14977:
5312 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5313 for NULL.
5314
5315 2018-03-14 Tom Tromey <tom@tromey.com>
5316
5317 PR cli/19918:
5318 * printcmd.c (printf_pointer): Allow "-" in format.
5319
5320 2018-03-14 Tom Tromey <tom@tromey.com>
5321
5322 * printcmd.c (_initialize_printcmd): Add usage to printf.
5323
5324 2018-03-14 Yao Qi <qiyao@sourceware.org>
5325
5326 * MAINTAINERS: Update my email address.
5327
5328 2018-03-13 Tom Tromey <tom@tromey.com>
5329
5330 * machoread.c (macho_check_dsym): Change filenamep to a
5331 std::string*.
5332 (macho_symfile_read): Update.
5333 * symfile.c (load_command): Use std::string.
5334
5335 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5336
5337 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5338 to error message string.
5339 (riscv_register_name): Use xsnprintf instead of sprintf.
5340 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5341 internal_error.
5342 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5343 error.
5344 (riscv_push_dummy_call): Likewise.
5345
5346 2018-03-12 Tom Tromey <tom@tromey.com>
5347
5348 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5349 Use gdb::byte_vector.
5350 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5351
5352 2018-03-12 Yao Qi <yao.qi@linaro.org>
5353
5354 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5355 parameter type to readable_regcache.
5356 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5357 the declaration.
5358
5359 2018-03-11 Tom Tromey <tom@tromey.com>
5360
5361 * dwarf2read.c (struct nextfield): Add initializers.
5362 (struct nextfnfield): Remove.
5363 (struct fnfieldlist): Add initializers. Remove "length" and
5364 "head", use std::vector.
5365 (struct decl_field_list): Remove.
5366 (struct field_info): Add initializers.
5367 <fields, baseclasses>: Now std::vector.
5368 <nbaseclasses, nfnfields, typedef_field_list_count,
5369 nested_types_list_count>: Remove.
5370 (dwarf2_add_field, dwarf2_add_type_defn)
5371 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5372 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5373 (process_structure_scope): Update.
5374
5375 2018-03-11 Tom Tromey <tom@tromey.com>
5376
5377 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5378 for use by std::sort.
5379 (build_type_psymtabs_1): Use std::vector.
5380
5381 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5382
5383 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5384 and LIBMPFR in the printed configuration.
5385
5386 2018-03-08 Tom Tromey <tom@tromey.com>
5387
5388 * source.c (get_filename_and_charpos): Use scoped_fd.
5389 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5390 (procfs_pidlist): Likewise.
5391 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5392 (iterate_over_mappings): Likewise.
5393
5394 2018-03-08 Tom Tromey <tom@tromey.com>
5395
5396 * infcall.c (struct call_return_meta_info)
5397 <stack_temporaries_enabled>: Remove.
5398 (get_call_return_value, call_function_by_hand_dummy): Update.
5399 * thread.c (disable_thread_stack_temporaries): Remove.
5400 (enable_thread_stack_temporaries): Remove.
5401 (thread_stack_temporaries_enabled_p): Return bool.
5402 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5403 (get_last_thread_stack_temporary): Update.
5404 * eval.c (evaluate_subexp): Update.
5405 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5406 class, not a function.
5407 (value_ptr, value_vec): Remove typedefs.
5408 (class thread_info) <stack_temporaries_enabled>: Now bool.
5409 <stack_temporaries>: Now a std::vector.
5410 (thread_stack_temporaries_enabled_p)
5411 (value_in_thread_stack_temporaries): Return bool.
5412
5413 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5414
5415 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5416 (getpkt_or_notif_sane_1): Likewise.
5417
5418 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5419
5420 * build-id.c (build_id_to_debug_bfd): Use std::string.
5421
5422 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5423
5424 * build-id.c (find_separate_debug_file_by_buildid): Return
5425 std::string.
5426 * build-id.h (find_separate_debug_file_by_buildid): Return
5427 std::string.
5428 * coffread.c (coff_symfile_read): Adjust to std::string.
5429 * elfread.c (elf_symfile_read): Adjust to std::string.
5430 * symfile.c (separate_debug_file_exists): Change parameter to
5431 std::string.
5432 (find_separate_debug_file): Return std::string.
5433 (find_separate_debug_file_by_debuglink): Return std::string.
5434 * symfile.h (find_separate_debug_file_by_debuglink): Return
5435 std::string.
5436
5437 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5438
5439 * common/xml-utils.c (xml_escape_text): Move code to...
5440 (xml_escape_text_append): ... this new function.
5441 * common/xml-utils.h (xml_escape_text_append): New declaration.
5442 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5443 New function.
5444 (_initialize_xml_utils): register test_xml_escape_text_append as
5445 a selftest.
5446
5447 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5448
5449 * defs.h: Remove MAX_REGISTER_SIZE.
5450 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5451 asserts.
5452 * python/py-unwind.c (pyuw_sniffer): Likewise.
5453
5454 2018-03-07 Tom Tromey <tom@tromey.com>
5455
5456 * linux-tdep.c (linux_info_proc): Update.
5457 * target.h (struct target_ops) <to_fileio_readlink>: Return
5458 optional<string>.
5459 (target_fileio_readlink): Return optional<string>.
5460 * remote.c (remote_hostio_readlink): Return optional<string>.
5461 * inf-child.c (inf_child_fileio_readlink): Return
5462 optional<string>.
5463 * target.c (target_fileio_readlink): Return optional<string>.
5464
5465 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5466
5467 * regcache.c (cooked_read_test): Add riscv to the list of
5468 architectures that have a save_reggroup.
5469
5470 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5471
5472 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5473 value is not a dynamic class object.
5474
5475 2018-03-06 Tom Tromey <tom@tromey.com>
5476
5477 * rust-exp.y: Formatting fixes.
5478
5479 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5480
5481 * riscv-tdep.c (riscv_register_name): Remove target description
5482 support.
5483 (riscv_gdbarch_init): Remove target description check.
5484
5485 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5486
5487 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5488 comment.
5489 * riscv-tdep.h: Likewise.
5490
5491 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5492
5493 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5494 (riscv_pseudo_register_write): Delete.
5495 (riscv_gdbarch_init): Remove all use of pseudo registers.
5496
5497 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5498
5499 * record-btrace.c (btrace_print_lines): Replace cleanup
5500 parameter with RAII equivalents.
5501 (btrace_insn_history): Replace cleanup with RAII equivalents.
5502 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5503 make_cleanup_ui_out_tuple_begin_end): Remove.
5504 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5505 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5506 make_cleanup_ui_out_list_begin_end): Remove.
5507
5508 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5509
5510 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5511 parameter types to std::vector. Use bool.
5512 (record_btrace_wait): Replace VEC(tp_t) with
5513 std::vector<thread_info *>.
5514 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5515
5516 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5517
5518 * record-btrace.c (record_btrace_disable_callback): Remove.
5519 (struct scoped_btrace_disable): New.
5520 (record_btrace_open): Use scoped_btrace_disable.
5521
5522 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5523
5524 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5525 reading values from registers.
5526
5527 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5528
5529 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5530 where appropriate.
5531
5532 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5533
5534 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5535 change parameter type. Use GDB's print functions, and use
5536 core_addr_to_string where appropriate.
5537 (riscv_push_dummy_call): Use core_addr_to_string where
5538 appropriate, update call to riscv_print_arg_location, and reindent
5539 a few lines.
5540 (riscv_return_value): Update call to riscv_print_arg_location.
5541
5542 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5543 Tim Newsome <tim@sifive.com>
5544 Albert Ou <a0u@eecs.berkeley.edu>
5545 Darius Rad <darius@bluespec.com>
5546
5547 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5548 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5549 (ALLDEPFILES): Add riscv-tdep.c
5550 * configure.tgt: Add riscv support.
5551 * riscv-tdep.c: New file.
5552 * riscv-tdep.h: New file.
5553 * NEWS: Mention new target.
5554 * MAINTAINERS: Add entry for riscv.
5555
5556 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5557
5558 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5559 fields within aggregates.
5560
5561 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5562
5563 * record-btrace.c (btrace_print_lines): Change type of flags to
5564 gdb_disassembly_flags.
5565
5566 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5567
5568 * fbsd-nat.c: Include "inf-ptrace.h".
5569 (USE_SIGTRAP_SIGINFO): Conditionally define.
5570 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5571 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5572 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5573 function.
5574 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5575 Likewise.
5576 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5577 Likewise.
5578 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5579 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5580 "supports_stopped_by_hw_breakpoint" target methods.
5581
5582 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5583
5584 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5585 * fbsd-nat.c (debug_fbsd_nat): New variable.
5586 (show_fbsd_nat_debug): New function.
5587 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5588 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5589
5590 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5591
5592 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5593 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5594 prototype.
5595 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5596 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5597 method.
5598
5599 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5600
5601 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5602 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5603
5604 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5605
5606 * charset.c (struct charset_vector): New.
5607 (charsets): Change type to charset_vector.
5608 (find_charset_names): Adjust.
5609 (add_one): Adjust.
5610 (_initialize_charset): Adjust.
5611
5612 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5613
5614 * progspace.h (struct program_space) <deleted_solibs>: Change
5615 type to std::vector<std::string>.
5616 * progspace.c (clear_program_space_solib_cache): Adjust.
5617 * breakpoint.c (print_solib_event): Adjust.
5618 (check_status_catch_solib): Adjust.
5619 * solib.c (update_solib_list): Adjust.
5620 * ui-out.h (class ui_out) <field_string>: New overload.
5621 * ui-out.c (ui_out::field_string): New overload.
5622
5623 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5624
5625 * progspace.h (struct program_space): Add constructor and
5626 destructor, initialize fields.
5627 (add_program_space): Remove.
5628 * progspace.c (add_program_space): Rename to...
5629 (program_space::program_space): ... this.
5630 (release_program_space): Rename to...
5631 (program_space::~program_space): ... this.
5632 (delete_program_space): Use delete to delete program_space.
5633 (initialize_progspace): Use new to allocate program_space.
5634 * inferior.c (add_inferior_with_spaces): Likewise.
5635 (clone_inferior_command): Likewise.
5636 * infrun.c (follow_fork_inferior): Likewise.
5637 (handle_vfork_child_exec_or_exit): Likewise.
5638
5639 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5640
5641 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5642 (delim_string_to_char_ptr_vec): Return std::vector of
5643 gdb::unique_xmalloc_ptr.
5644 (dirnames_to_char_ptr_vec_append): Take std::vector of
5645 gdb::unique_xmalloc_ptr.
5646 (dirnames_to_char_ptr_vec): Return std::vector of
5647 gdb::unique_xmalloc_ptr.
5648 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5649 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5650 (delim_string_to_char_ptr_vec): Return an std::vector of
5651 gdb::unique_xmalloc_ptr, adjust the code.
5652 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5653 gdb::unique_xmalloc_ptr, adjust the code.
5654 (dirnames_to_char_ptr_vec): Return an std::vector of
5655 gdb::unique_xmalloc_ptr, adjust the code.
5656 * auto-load.c (auto_load_safe_path_vec): Change type to
5657 std::vector of gdb::unique_xmalloc_ptr.
5658 (auto_load_expand_dir_vars): Return an std::vector of
5659 gdb::unique_xmalloc_ptr, adjust the code.
5660 (auto_load_safe_path_vec_update): Adjust.
5661 (filename_is_in_auto_load_safe_path_vec): Adjust.
5662 (auto_load_objfile_script_1): Adjust.
5663 * build-id.c (build_id_to_debug_bfd): Adjust.
5664 * linux-thread-db.c (thread_db_load_search): Adjust.
5665 * source.c (add_path): Adjust.
5666 (openp): Adjust.
5667 * symfile.c (find_separate_debug_file): Adjust.
5668 * utils.c (do_free_char_ptr_vec): Remove.
5669 (make_cleanup_free_char_ptr_vec): Remove.
5670
5671 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5672
5673 PR gdb/22907
5674 * common/pathstuff.c: Conditionally include "<windows.h>".
5675
5676 2018-03-01 Georg Sauthoff <mail@georg.so>
5677
5678 PR gdb/22888
5679 * gcore.in: Quote variables and switch interpreter to bash.
5680
5681 2018-03-01 Tom Tromey <tom@tromey.com>
5682
5683 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5684 assertion. Add assertion for discriminant_index.
5685 (quirk_rust_enum): Use correct base type name in univariant case.
5686
5687 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5688
5689 * record.c (get_call_history_modifiers): Return a
5690 record_print_flags.
5691 (cmd_record_call_history): Adjust.
5692 * record-btrace.c (record_btrace_call_history): Adjust.
5693 (record_btrace_call_history_range): Adjust.
5694 (record_btrace_call_history_from): Adjust.
5695 * target-debug.h (target_debug_print_record_print_flags): New.
5696 * target-delegates.c: Re-generate.
5697 * target.c (target_call_history): Change flags type.
5698 (target_call_history_from): Likewise.
5699 (target_call_history_range): Likewise.
5700 * target.h (struct target_ops) <target_call_history>: Likewise.
5701 (target_call_history_from): Likewise.
5702 (target_call_history_range): Likewise.
5703
5704 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5705 Simon Marchi <simon.marchi@polymtl.ca>
5706
5707 * common/common-utils.c: Include "sys/stat.h".
5708 (is_regular_file): Move here from "source.c"; change return
5709 type to "bool".
5710 * common/common-utils.h (is_regular_file): New prototype.
5711 * common/pathstuff.c (contains_dir_separator): New function.
5712 * common/pathstuff.h (contains_dir_separator): New prototype.
5713 * source.c: Don't include "sys/stat.h".
5714 (is_regular_file): Move to "common/common-utils.c".
5715
5716 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5717
5718 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5719 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5720 * auto-load.c: Include "common/pathstuff.h".
5721 * common/common-def.h (current_directory): Move here.
5722 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5723 function.
5724 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5725 prototype.
5726 * common/pathstuff.c: New file.
5727 * common/pathstuff.h: New file.
5728 * compile/compile.c: Include "common/pathstuff.h".
5729 * defs.h (current_directory): Move to "common/common-defs.h".
5730 * dwarf2read.c: Include "common/pathstuff.h".
5731 * exec.c: Likewise.
5732 * guile/scm-safe-call.c: Likewise.
5733 * linux-thread-db.c: Likewise.
5734 * main.c: Likewise.
5735 * nto-tdep.c: Likewise.
5736 * objfiles.c: Likewise.
5737 * source.c: Likewise.
5738 * symtab.c: Likewise.
5739 * utils.c: Include "common/pathstuff.h".
5740 (gdb_realpath): Move to "common/pathstuff.c".
5741 (gdb_realpath_keepfile): Likewise.
5742 (gdb_abspath): Likewise.
5743 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5744 (gdb_realpath_keepfile): Likewise.
5745 (gdb_abspath): Likewise.
5746
5747 2018-02-28 John Baldwin <jhb@FreeBSD.org>
5748
5749 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5750 wildcard process pid for super_resume for kernels with a
5751 specific bug.
5752
5753 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
5754
5755 * compile/compile.c (get_args): Add additional comments
5756 explaining function.
5757
5758 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
5759 Tom Tromey <tom@tromey.com>
5760
5761 * target.h (memory_write_request_s): Remove typedef. Don't define
5762 VEC.
5763 (target_write_memory_blocks): Change argument to std::vector.
5764 (struct memory_write_request): Add constructor.
5765 * target-memory.c (compare_block_starting_address): Return bool.
5766 Change argument types.
5767 (claim_memory): Change arguments to use std::vector.
5768 (split_regular_and_flash_blocks, blocks_to_erase)
5769 (compute_garbled_blocks): Likewise.
5770 (cleanup_request_data, cleanup_write_requests_vector): Remove.
5771 (target_write_memory_blocks): Change argument to std::vector.
5772 * symfile.c (struct load_section_data): Add constructor and
5773 destructor. Use std::vector for "requests".
5774 (struct load_progress_data): Add initializers.
5775 (load_section_callback): Update. Use "new".
5776 (clear_memory_write_data): Remove.
5777 (generic_load): Update.
5778
5779 2018-02-27 Alan Hayward <alan.hayward@arm.com>
5780
5781 * arch/aarch64.h: Use common/tdesc.h.
5782
5783 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5784
5785 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5786 architecture with a 64-bit ABI.
5787
5788 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5789
5790 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5791 ahead of target description loading.
5792
5793 2018-02-26 Tom Tromey <tom@tromey.com>
5794
5795 * stack.c (backtrace_command_1): Update.
5796 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5797 of "flags".
5798 * python/py-framefilter.c (py_print_frame)
5799 (gdbpy_apply_frame_filter): Change type of "flags".
5800 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5801 of "flags".
5802 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5803 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5804 * extension.h (enum frame_filter_flag): Rename from
5805 frame_filter_flags.
5806 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5807 (apply_ext_lang_frame_filter): Change type of "flags".
5808 * extension.c (apply_ext_lang_frame_filter): Change type of
5809 "flags".
5810 * extension-priv.h (struct extension_language_ops)
5811 <apply_frame_filter>: Change type of "flags".
5812
5813 2018-02-26 Tom Tromey <tom@tromey.com>
5814
5815 PR python/16497:
5816 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
5817 off-by-one in py_end computation.
5818 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5819 PRINT_MORE_FRAMES.
5820 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5821 constant.
5822
5823 2018-02-26 Tom Tromey <tom@tromey.com>
5824
5825 * dwarf2read.c (struct variant_field): New.
5826 (struct nextfield) <variant>: New field.
5827 (dwarf2_add_field): Handle DW_TAG_variant_part.
5828 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5829 discriminated union.
5830 (read_structure_type): Handle DW_TAG_variant_part.
5831 (handle_struct_member_die): New function, extracted from
5832 process_structure_scope. Handle DW_TAG_variant.
5833 (process_structure_scope): Handle discriminated unions. Call
5834 handle_struct_member_die.
5835
5836 2018-02-26 Tom Tromey <tom@tromey.com>
5837
5838 * rust-lang.h (rust_last_path_segment): Declare.
5839 * rust-lang.c (rust_last_path_segment): Now public. Change
5840 contract.
5841 (struct disr_info): Remove.
5842 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5843 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5844 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5845 (rust_enum_p, rust_enum_variant): New function.
5846 (rust_underscore_fields): Remove "offset" parameter.
5847 (rust_print_enum): New function.
5848 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5849 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5850 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
5851 enums.
5852 (rust_internal_print_type): New function, from rust_print_type.
5853 Remove enum code.
5854 (rust_print_type): Call rust_internal_print_type.
5855 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5856 Update enum handling.
5857 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5858 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5859 (rust_union_quirks): New functions.
5860 (process_full_comp_unit, process_full_type_unit): Call
5861 rust_union_quirks.
5862 (process_structure_scope): Update rust_unions if necessary.
5863
5864 2018-02-26 Tom Tromey <tom@tromey.com>
5865
5866 * value.h (value_union_variant): Declare.
5867 * valops.c (value_union_variant): New function.
5868 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5869 (struct discriminant_info): New.
5870 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5871 enumerator.
5872 (struct main_type) <flag_discriminated_union>: New field.
5873
5874 2018-02-26 Tom Tromey <tom@tromey.com>
5875
5876 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5877 unittests/unpack-selftests.c.
5878 * unittests/unpack-selftests.c: New file.
5879 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5880
5881 2018-02-26 Yao Qi <yao.qi@linaro.org>
5882
5883 * dwarf2read.c (struct partial_die_info) <read>: New method.
5884 (read_partial_die): Remove the declaration.
5885 (load_partial_dies): Update.
5886 (partial_die_info::partial_die_info):
5887 (read_partial_die): Change it to partial_die_info::read.
5888
5889 2018-02-26 Yao Qi <yao.qi@linaro.org>
5890
5891 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5892 (fixup_partial_die): Remove declaration.
5893 (scan_partial_symbols): Update.
5894 (partial_die_parent_scope): Likewise.
5895 (partial_die_full_name): Likewise.
5896 (fixup_partial_die): Change it to partial_die_info::fixup.
5897
5898 2018-02-26 Yao Qi <yao.qi@linaro.org>
5899
5900 * dwarf2read.c (read_partial_die): Update the declaration.
5901 (load_partial_dies): Caller update.
5902 (read_partial_die): Remove one argument abbrev_len.
5903
5904 2018-02-26 Yao Qi <yao.qi@linaro.org>
5905
5906 * dwarf2read.c (struct partial_die_info): Add ctor, delete
5907 assignment operator.
5908 (load_partial_dies): Use ctor and copy ctor.
5909 (read_partial_die): Update.
5910 (dwarf2_cu::find_partial_die): Use ctor.
5911
5912 2018-02-26 Yao Qi <yao.qi@linaro.org>
5913
5914 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5915 (find_partial_die_in_comp_unit): Change it to
5916 dwarf2_cu::find_partial_die.
5917 (find_partial_die): Update.
5918
5919 2018-02-26 Yao Qi <yao.qi@linaro.org>
5920
5921 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5922 is NULL.
5923
5924 2018-02-26 Yao Qi <yao.qi@linaro.org>
5925
5926 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5927
5928 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5929
5930 * arch/amd64.h: Use common/tdesc.h.
5931 * arch/i386.c: Likewise.
5932 * arch/i386.h: Likewise.
5933 * arch/tic6x.c: Likewise.
5934 * arch/tdesc.h: Move file from here...
5935 * common/tdesc.h: ...to here.
5936 * features/aarch64-core.c: Regenerate.
5937 * features/aarch64-fpu.c: Regenerate.
5938 * features/i386/32bit-avx.c: Regenerate.
5939 * features/i386/32bit-avx512.c: Regenerate.
5940 * features/i386/32bit-core.c: Regenerate.
5941 * features/i386/32bit-linux.c: Regenerate.
5942 * features/i386/32bit-mpx.c: Regenerate.
5943 * features/i386/32bit-pkeys.c: Regenerate.
5944 * features/i386/32bit-sse.c: Regenerate.
5945 * features/i386/64bit-avx.c: Regenerate.
5946 * features/i386/64bit-avx512.c: Regenerate.
5947 * features/i386/64bit-core.c: Regenerate.
5948 * features/i386/64bit-linux.c: Regenerate.
5949 * features/i386/64bit-mpx.c: Regenerate.
5950 * features/i386/64bit-pkeys.c: Regenerate.
5951 * features/i386/64bit-segments.c: Regenerate.
5952 * features/i386/64bit-sse.c: Regenerate.
5953 * features/i386/x32-core.c: Regenerate.
5954 * features/tic6x-c6xp.c: Regenerate.
5955 * features/tic6x-core.c: Regenerate.
5956 * features/tic6x-gp.c: Regenerate.
5957 * target-descriptions.c: Use common/tdesc.h.
5958 * target-descriptions.h: Likewise.
5959
5960 2018-02-24 Tom Tromey <tom@tromey.com>
5961
5962 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5963 (try_thread_db_load_from_dir, thread_db_load_search): Use
5964 std::string.
5965 (info_auto_load_libthread_db_compare): Return bool. Change
5966 argument types.
5967 (info_auto_load_libthread_db): Use std::vector, std::string.
5968 Remove cleanups.
5969
5970 2018-02-24 Tom Tromey <tom@tromey.com>
5971
5972 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5973 std::string.
5974 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5975 std::string*.
5976 * gdbarch.c: Rebuild.
5977 * gdbarch.h: Rebuild.
5978 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5979 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5980 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5981 std::string*.
5982
5983 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
5984
5985 * gdbtypes.h (sect_offset): Change type to uint64_t.
5986 (sect_offset_str): New function.
5987 * dwarf2read.c (create_addrmap_from_aranges): Use
5988 sect_offset_str.
5989 (error_check_comp_unit_head): Likewise.
5990 (create_debug_type_hash_table): Likewise.
5991 (read_cutu_die_from_dwo): Likewise.
5992 (init_cutu_and_read_dies): Likewise.
5993 (init_cutu_and_read_dies_no_follow): Likewise.
5994 (process_psymtab_comp_unit_reader): Likewise.
5995 (partial_die_parent_scope): Likewise.
5996 (peek_die_abbrev): Likewise.
5997 (process_queue): Likewise.
5998 (dwarf2_physname): Likewise.
5999 (read_namespace_alias): Likewise.
6000 (read_import_statement): Likewise.
6001 (create_dwo_cu_reader): Likewise.
6002 (create_cus_hash_table): Likewise.
6003 (lookup_dwo_cutu): Likewise.
6004 (inherit_abstract_dies): Likewise.
6005 (read_func_scope): Likewise.
6006 (read_call_site_scope): Likewise.
6007 (dwarf2_add_member_fn): Likewise.
6008 (read_common_block): Likewise.
6009 (read_module_type): Likewise.
6010 (read_typedef): Likewise.
6011 (read_subrange_type): Likewise.
6012 (load_partial_dies): Likewise.
6013 (read_partial_die): Likewise.
6014 (find_partial_die): Likewise.
6015 (read_str_index): Likewise.
6016 (dwarf2_string_attr): Likewise.
6017 (build_error_marker_type): Likewise.
6018 (lookup_die_type): Likewise.
6019 (dump_die_shallow): Likewise.
6020 (follow_die_ref): Likewise.
6021 (dwarf2_fetch_die_loc_sect_off): Likewise.
6022 (dwarf2_fetch_constant_bytes): Likewise.
6023 (follow_die_sig): Likewise.
6024 (get_signatured_type): Likewise.
6025 (get_DW_AT_signature_type): Likewise.
6026 (dwarf2_find_containing_comp_unit): Likewise.
6027 (set_die_type): Likewise.
6028
6029 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6030
6031 * arch/aarch64.c: Include "common-defs.h".
6032 * arch/amd64.c: Likewise.
6033 * arch/i386.c: Likewise.
6034
6035 2018-02-21 Tom Tromey <tom@tromey.com>
6036
6037 * value.h: (extract_field_op): Update.
6038 * eval.c (extract_field_op): Return a const char *.
6039 * expression.h (parse_expression_for_completion): Update.
6040 * completer.c (complete_expression): Update.
6041 (add_struct_fields): Make fieldname const.
6042 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6043 (mark_completion_tag, parse_exp_in_context_1): Update.
6044 (parse_expression_for_completion): Change "name" to
6045 unique_xmalloc_ptr*.
6046
6047 2018-02-21 Tom Tromey <tom@tromey.com>
6048
6049 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6050
6051 2018-02-21 Yao Qi <yao.qi@linaro.org>
6052
6053 * avr-tdep.c (avr_read_pc): Change parameter type to
6054 readable_regcache.
6055 * gdbarch.sh (read_pc): Likewise.
6056 * gdbarch.c: Re-generated.
6057 * gdbarch.h: Re-generated.
6058 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6059 readable_regcache.
6060 * ia64-tdep.c (ia64_read_pc): Likewise.
6061 * mips-tdep.c (mips_read_pc): Likewise.
6062 * spu-tdep.c (spu_read_pc): Likewise.
6063
6064 2018-02-21 Yao Qi <yao.qi@linaro.org>
6065
6066 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6067 * regcache-dump.c: New file.
6068 * regcache.c: Move register_dump to regcache-dump.c.
6069 (maintenance_print_registers): Likewise.
6070 (maintenance_print_raw_registers): Likewise.
6071 (maintenance_print_cooked_registers): Likewise.
6072 (maintenance_print_register_groups): Likewise.
6073 (maintenance_print_remote_registers): Likewise.
6074 (_initialize_regcache): Likewise.
6075 * regcache.h (register_dump): Moved from regcache.c.
6076
6077 2018-02-21 Yao Qi <yao.qi@linaro.org>
6078
6079 * regcache.c (regcache::regcache): Update.
6080 (regcache::invalidate): Move it to detached_regcache::invalidate.
6081 (get_thread_arch_aspace_regcache): Update.
6082 (regcache::raw_update): Update.
6083 (regcache::cooked_read): Remove some code.
6084 (regcache::cooked_read_value): Likewise.
6085 (regcache::raw_write): Remove assert on m_readonly_p.
6086 (regcache::raw_supply_integer): Move it to
6087 detached_regcache::raw_supply_integer.
6088 (regcache::raw_supply_zeroed): Likewise.
6089 * regcache.h (detached_regcache) <raw_supply_integer>: New
6090 declaration.
6091 <raw_supply_zeroed, invalidate>: Likewise.
6092 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6093 <invalidate>: Likewise.
6094 <m_readonly_p>: Removed.
6095
6096 2018-02-21 Yao Qi <yao.qi@linaro.org>
6097
6098 * infcmd.c (get_return_value): Let stop_regs point to
6099 get_current_regcache.
6100 * regcache.c (regcache::regcache): Remove.
6101 (register_dump_reg_buffer): New class.
6102 (regcache_print): Adjust.
6103 * regcache.h (regcache): Remove constructors.
6104
6105 2018-02-21 Yao Qi <yao.qi@linaro.org>
6106
6107 * regcache.c (class register_dump): New class.
6108 (register_dump_regcache, register_dump_none): New class.
6109 (register_dump_remote, register_dump_groups): New class.
6110 (regcache_print): Update.
6111 * regcache.h (regcache_dump_what): Move it to regcache.c.
6112 (regcache) <dump>: Remove.
6113
6114 2018-02-21 Yao Qi <yao.qi@linaro.org>
6115
6116 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6117 reg_buffer_rw *.
6118 (jit_unwind_reg_set_impl): Call raw_supply.
6119 (jit_frame_sniffer): Use reg_buffer_rw.
6120 * record-full.c (record_full_core_regbuf): Change its type.
6121 (record_full_core_open_1): Use reg_buffer_rw.
6122 (record_full_close): Likewise.
6123 (record_full_core_fetch_registers): Use regcache->raw_supply.
6124 (record_full_core_store_registers): Likewise.
6125 * regcache.c (regcache::get_register_status): Move it to
6126 reg_buffer.
6127 (regcache_raw_set_cached_value): Remove.
6128 (regcache::raw_set_cached_value): Remove.
6129 (regcache::raw_write): Call raw_supply.
6130 (regcache::raw_supply): Move it to reg_buffer_rw.
6131 * regcache.h (regcache_raw_set_cached_value): Remove.
6132 (reg_buffer_rw): New class.
6133
6134 2018-02-21 Yao Qi <yao.qi@linaro.org>
6135
6136 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6137 readonly_detached_regcache.
6138 (dummy_frame_prev_register): Use regcache->cooked_read.
6139 * frame.c (frame_save_as_regcache): Change return type.
6140 (frame_pop): Update.
6141 * frame.h (frame_save_as_regcache): Update declaration.
6142 * inferior.h (get_infcall_suspend_state_regcache): Update
6143 declaration.
6144 * infrun.c (infcall_suspend_state) <registers>: use
6145 readonly_detached_regcache.
6146 (save_infcall_suspend_state): Don't use regcache_dup.
6147 (get_infcall_suspend_state_regcache): Change return type.
6148 * linux-fork.c (struct fork_info) <savedregs>: Change to
6149 readonly_detached_regcache.
6150 <pc>: New field.
6151 (fork_save_infrun_state): Don't use regcache_dup.
6152 (info_checkpoints_command): Adjust.
6153 * mi/mi-main.c (register_changed_p): Update declaration.
6154 (mi_cmd_data_list_changed_registers): Use
6155 readonly_detached_regcache.
6156 (register_changed_p): Change parameter type to
6157 readonly_detached_regcache.
6158 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6159 readonly_detached_regcache.
6160 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6161 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6162 New.
6163 (regcache::save): Move it to reg_buffer.
6164 (regcache::restore): Change parameter type.
6165 (regcache_dup): Remove.
6166 * regcache.h (reg_buffer) <save>: New method.
6167 (readonly_detached_regcache): New class.
6168 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6169 readonly_detached_regcache.
6170 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6171
6172 2018-02-21 Yao Qi <yao.qi@linaro.org>
6173
6174 * frame.c (frame_save_as_regcache): Use regcache method save.
6175 (frame_pop): Use regcache method restore.
6176 * infrun.c (restore_infcall_suspend_state): Likewise.
6177 * linux-fork.c (fork_load_infrun_state): Likewise.
6178 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6179 save.
6180 * regcache.c (regcache_save): Remove.
6181 (regcache::restore): More asserts.
6182 (regcache_cpy): Remove.
6183 * regcache.h (regcache_save): Remove the declaration.
6184 (regcache::restore): Move from private to public.
6185 Remove the friend declaration of regcache_cpy.
6186 (regcache_cpy): Remove declaration.
6187
6188 2018-02-21 Yao Qi <yao.qi@linaro.org>
6189
6190 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6191 parameter type to 'readable_regcache *'.
6192 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6193 * arm-tdep.c (arm_neon_quad_read): Likewise.
6194 (arm_pseudo_read): Likewise.
6195 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6196 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6197 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6198 * gdbarch.c: Re-generated.
6199 * gdbarch.h: Re-generated.
6200 * gdbarch.sh (pseudo_register_read): Change parameter type to
6201 'readable_regcache *'.
6202 (pseudo_register_read_value): Likewise.
6203 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6204 (h8300_pseudo_register_read): Likewise.
6205 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6206 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6207 (i386_pseudo_register_read_into_value): Likewise.
6208 (i386_pseudo_register_read_value): Likewise.
6209 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6210 declaration.
6211 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6212 * m32c-tdep.c (m32c_raw_read): Likewise.
6213 (m32c_read_flg): Likewise.
6214 (m32c_banked_register): Likewise.
6215 (m32c_banked_read): Likewise.
6216 (m32c_sb_read): Likewise.
6217 (m32c_part_read): Likewise.
6218 (m32c_cat_read): Likewise.
6219 (m32c_r3r2r1r0_read): Likewise.
6220 (m32c_pseudo_register_read): Likewise.
6221 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6222 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6223 (mep_pseudo_cr64_read): Likewise.
6224 (mep_pseudo_register_read): Likewise.
6225 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6226 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6227 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6228 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6229 (regcache::cooked_read): Likewise.
6230 (regcache::cooked_read_value): Likewise.
6231 (regcache_cooked_read_signed):
6232 (regcache::cooked_read): Likewise.
6233 * regcache.h (readable_regcache): New class.
6234 (regcache): Inherit readable_regcache. Move some methods to
6235 readable_regcache.
6236 * rl78-tdep.c (rl78_pseudo_register_read): Change
6237 parameter type to 'readable_regcache *'.
6238 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6239 (e500_pseudo_register_read): Change parameter type to
6240 'readable_regcache *'.
6241 (dfp_pseudo_register_read): Likewise.
6242 (vsx_pseudo_register_read): Likewise.
6243 (efpr_pseudo_register_read): Likewise.
6244 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6245 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6246 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6247 (sh64_pseudo_register_read): Likewise.
6248 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6249 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6250 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6251 (spu_pseudo_register_read): Likewise.
6252 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6253 (xtensa_pseudo_register_read): Likewise.
6254
6255 2018-02-21 Yao Qi <yao.qi@linaro.org>
6256
6257 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6258 (regcache::arch): Move it to reg_buffer::arch.
6259 (regcache::register_buffer): Likewise.
6260 (regcache::assert_regnum): Likewise.
6261 (regcache::num_raw_registers): Likewise.
6262 * regcache.h (reg_buffer): New class.
6263 (regcache): Inherit reg_buffer.
6264
6265 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6266
6267 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6268 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6269
6270 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6271
6272 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6273
6274 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6275
6276 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6277 (SFILES): Remove common/*.c files.
6278 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6279 * common/common.host: Add common reference.
6280 * configure.ac: Likewise.
6281 * configure: Regenerate.
6282
6283 2018-02-16 Yao Qi <yao.qi@linaro.org>
6284
6285 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6286 (block_initialize_namespace): Use new.
6287 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6288 (dwarf2_free_objfile): Use delete.
6289 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6290 (copy_type_recursive): Use new.
6291 * gdb_obstack.h (allocate_on_obstack): New.
6292
6293 2018-02-15 Yao Qi <yao.qi@linaro.org>
6294
6295 PR gdb/22849
6296 * inferior.c (exit_inferior_1): Reset inf->control.
6297
6298 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6299
6300 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6301 declaration.
6302
6303 2018-02-14 Pedro Alves <palves@redhat.com>
6304
6305 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6306 frame_cleanup_after_sniffer on exception.
6307
6308 2018-02-14 Tom Tromey <tom@tromey.com>
6309
6310 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6311 const.
6312 (solib_bfd_open): Make pathname const.
6313 * solib.c (solib_bfd_open): Make pathname const.
6314 * solib-spu.c (spu_bfd_fopen): Make name const.
6315 (spu_bfd_open): Make pathname const.
6316 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6317 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6318
6319 2018-02-14 Tom Tromey <tom@tromey.com>
6320
6321 * symfile.c (symfile_bfd_open): Update.
6322 * source.h (openp, source_full_path_of, find_and_open_source):
6323 Change argument type to unique_xmalloc_ptr.
6324 * source.c (openp): Take a unique_xmalloc_ptr.
6325 (source_full_path_of, find_and_open_source): Likewise.
6326 (open_source_file, symtab_to_fullname): Update.
6327 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6328 unique_xmalloc_ptr.
6329 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6330 (exec_file_find): Update.
6331 * psymtab.c (psymtab_to_fullname): Update.
6332 * nto-tdep.h (nto_find_and_open_solib): Update.
6333 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6334 unique_xmalloc_ptr.
6335 * exec.c (exec_file_attach): Update.
6336 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6337 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6338
6339 2018-02-14 Tom Tromey <tom@tromey.com>
6340
6341 * solib.c: Include source.h.
6342 * nto-tdep.c: Include source.h.
6343 * mi/mi-cmd-env.c: Include source.h.
6344 * infcmd.c: Include source.h.
6345 * exec.c: Include source.h.
6346 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6347 (add_path, directory_switch, source_path, init_source_path): Move
6348 declarations...
6349 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6350 (add_path, directory_switch, source_path, init_source_path):
6351 ...here.
6352
6353 2018-02-14 Tom Tromey <tom@tromey.com>
6354
6355 * solist.h (exec_file_find, solib_find): Return
6356 unique_xmalloc_ptr.
6357 (solib_bfd_fopen): Take a const char *.
6358 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6359 (exec_file_find, solib_find): Likewise.
6360 (solib_bfd_fopen): Do not take ownership of "pathname".
6361 (solib_bfd_open): Use unique_xmalloc_ptr.
6362 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6363 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6364 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6365 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6366
6367 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6368
6369 * ada-lang.c (name_match_type_from_name): Remove reference to
6370 ada_name_for_lookup in function's documentation.
6371 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6372
6373 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6374
6375 * defs.h (enum openp_flags): New enum.
6376 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6377 Move to enum openp_flags.
6378 (openp_flags): New enum flags.
6379 (openp): Change parameter type to openp_flags.
6380 * source.c (openp): Change parameter type to openp_flags.
6381 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6382 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6383
6384 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6385
6386 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6387 per-command.
6388
6389 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6390
6391 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6392 into...
6393 (class dwarf2_queue_guard): ...the destructor of this new class.
6394 (dw2_do_instantiate_symtab): Create instance of the new class
6395 dwarf2_queue_guard, remove cleanup.
6396
6397 2018-02-09 Tom Tromey <tom@tromey.com>
6398
6399 * source.c (find_source_lines): Don't reference past the end of
6400 the vector.
6401
6402 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6403
6404 * remote.c (remote_btrace_maybe_reopen): Change error message.
6405 * btrace.c (btrace_enable): Likewise.
6406 (parse_xml_btrace): Likewise.
6407 (parse_xml_btrace_conf): Likewise.
6408
6409 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6410
6411 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6412 (linux_enable_pt, linux_enable_bts): Call
6413 diagnose_perf_event_open_fail.
6414
6415 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6416
6417 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6418 Remove parameter and change return type. Update callers. Move it.
6419 (linux_enable_bts, linux_enable_pt): Improve error message.
6420 (linux_enable_pt): Remove zero buffer size check.
6421 (linux_enable_btrace): Improve error messages. Remove NULL return
6422 check.
6423
6424 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6425
6426 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6427 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6428 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6429 (linux_supports_pt, linux_supports_btrace): Remove.
6430 (linux_enable_bts): Call cpu_supports_bts.
6431 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6432 * remote.c (remote_supports_btrace): Remove.
6433 (init_remote_ops): Remove remote_supports_btrace.
6434 * target-delegates.c: Regenerated.
6435 * target.c (target_supports_btrace): Remove.
6436 * target.h (target_ops) <to_supports_btrace>: Remove
6437 (target_supports_btrace): Remove.
6438 * x86-linux-nat.c (x86_linux_create_target): Remove
6439 linux_supports_btrace.
6440
6441 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6442
6443 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6444 btrace failed.
6445 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6446 exception and use message in own exception.
6447
6448 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6449
6450 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6451 (perf_event_pt_event_type): Use gdb_file_up.
6452 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6453 scoped_fd, and scoped_mmap.
6454
6455 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6456
6457 * common/scoped_mmap.h: New.
6458 * unittests/scoped_mmap-selftest.c: New.
6459 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6460 unittests/scoped_mmap-selftest.c.
6461
6462 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6463
6464 * common/scoped_fd.h: New.
6465 * unittests/scoped_fd-selftest.c: New.
6466 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6467 unittests/scoped_fd-selftest.c.
6468
6469 2018-02-09 Tom Tromey <tom@tromey.com>
6470
6471 * auto-load.c (auto_load_section_scripts): Use
6472 gdb::unique_xmalloc_ptr.
6473
6474 2018-02-09 Tom Tromey <tom@tromey.com>
6475
6476 * auto-load.c (execute_script_contents): Use std::string.
6477
6478 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6479
6480 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6481 Python function, rather than a new command.
6482
6483 2018-02-08 Tom Tromey <tom@tromey.com>
6484
6485 * solib.c (solib_find_1): Use std::string.
6486 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6487
6488 2018-02-08 Tom Tromey <tom@tromey.com>
6489
6490 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6491
6492 2018-02-08 Tom Tromey <tom@tromey.com>
6493
6494 * source.c (find_source_lines): Use gdb::def_vector.
6495
6496 2018-02-08 Tom Tromey <tom@tromey.com>
6497
6498 * macrocmd.c (struct temporary_macro_definition): New.
6499 (macro_define_command): Use temporary_macro_definition. Remove
6500 cleanups.
6501 (free_macro_definition_ptr): Remove.
6502
6503 2018-02-08 Tom Tromey <tom@tromey.com>
6504
6505 * macroexp.c (maybe_expand): Use std::string.
6506
6507 2018-02-08 Tom Tromey <tom@tromey.com>
6508
6509 * macroexp.c (struct macro_buffer): Add initializers for some
6510 members.
6511 (init_buffer, init_shared_buffer, free_buffer)
6512 (free_buffer_return_text): Remove.
6513 (macro_buffer): New constructors.
6514 (~macro_buffer): New destructor.
6515 (macro_buffer::set_shared): New method.
6516 (macro_buffer::resize_buffer, macro_buffer::appendc)
6517 (macro_buffer::appendmem): Now methods, not free functions.
6518 (set_token, append_tokens_without_splicing, stringify)
6519 (macro_stringify): Update.
6520 (gather_arguments): Change return type. Remove argc_p argument,
6521 add args_ptr argument. Use std::vector.
6522 (substitute_args): Remove argc argument. Accept std::vector.
6523 (expand): Update. Use std::vector.
6524 (scan, macro_expand, macro_expand_next): Update.
6525
6526 2018-02-08 Tom Tromey <tom@tromey.com>
6527
6528 * symtab.c (default_collect_symbol_completion_matches_break_on):
6529 Use unique_xmalloc_ptr.
6530 * macroscope.h: (sal_macro_scope, user_macro_scope)
6531 (default_macro_scope): Return unique_xmalloc_ptr.
6532 * macroscope.c (sal_macro_scope, user_macro_scope)
6533 (default_macro_scope): Return unique_xmalloc_ptr.
6534 * macroexp.h (macro_expand, macro_expand_once): Return
6535 unique_xmalloc_ptr.
6536 * macroexp.c (macro_expand, macro_expand_once): Return
6537 unique_xmalloc_ptr.
6538 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6539 (info_macro_command, info_macros_command): Use
6540 unique_xmalloc_ptr.
6541 * compile/compile-c-support.c (write_macro_definitions): Use
6542 unique_xmalloc_ptr.
6543 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6544
6545 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6546
6547 * value.c (value_static_field): Assign field type instead of
6548 containing type when returning an optimized out value.
6549
6550 2018-02-06 Yao Qi <yao.qi@linaro.org>
6551
6552 * ft32-tdep.c (ft32_read_pc): Remove.
6553 (ft32_write_pc): Remove.
6554 (ft32_gdbarch_init): Update.
6555 * m32r-tdep.c (m32r_read_pc): Remove.
6556 (m32r_gdbarch_init): Update.
6557 * mep-tdep.c (mep_read_pc): Remove.
6558 (mep_gdbarch_init): Update.
6559 * microblaze-tdep.c (microblaze_write_pc): Remove.
6560 (microblaze_gdbarch_init): Update.
6561 * mn10300-tdep.c (mn10300_read_pc): Remove.
6562 (mn10300_write_pc): Remove.
6563 (mn10300_gdbarch_init): Update.
6564 * moxie-tdep.c (moxie_read_pc): Remove.
6565 (moxie_write_pc): Remove.
6566 (moxie_gdbarch_init): Update.
6567
6568 2018-02-06 Yao Qi <yao.qi@linaro.org>
6569
6570 * expprint.c (print_subexp_standard): Handle
6571 OP_F77_UNDETERMINED_ARGLIST.
6572 (dump_subexp_body_standard): Likewise.
6573
6574 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6575
6576 * target-descriptions.c (tdesc_element_visitor) Add empty
6577 implementations.
6578 (tdesc_type): Move make_gdb_type from here.
6579 (tdesc_type_builtin): Likewise.
6580 (tdesc_type_vector): Likewise.
6581 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6582 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6583 (make_gdb_type_union): Likewise.
6584 (make_gdb_type_flags): Likewise.
6585 (make_gdb_type_enum): Likewise.
6586 (make_gdb_type): New function.
6587 (tdesc_register_type): Use static make_gdb_type.
6588
6589 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6590
6591 * infcmd.c (default_print_one_register_info): Align natural-format
6592 column values consistently one under another.
6593 (pad_to_column): New function.
6594
6595 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6596
6597 * dwarf2read.c (dwarf2_physname): Move commment.
6598
6599 2018-02-01 Leszek Swirski <leszeks@google.com>
6600
6601 * varobj.c (varobj_formatted_print_options): Allow recursive
6602 pretty printing if pretty printing is enabled.
6603
6604 2018-02-01 Leszek Swirski <leszeks@google.com>
6605
6606 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6607 names after a structop as a filename.
6608
6609 2018-02-01 Yao Qi <yao.qi@linaro.org>
6610
6611 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6612 (arm_record_coproc_data_proc): Likewise.
6613
6614 2018-02-01 Yao Qi <yao.qi@linaro.org>
6615
6616 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6617
6618 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6619
6620 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6621 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6622
6623 2018-01-31 Pedro Alves <palves@redhat.com>
6624
6625 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6626 * inflow.c (child_terminal_save_inferior): Wrap reference to
6627 tcgetpgrp in HAVE_TERMIOS_H.
6628 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6629 _WIN32.
6630 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6631 always iterate over all inferiors.
6632 (gdbsim_cntrl_c): Adjust.
6633 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6634
6635 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6636
6637 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6638 index type is objfile-owned if the element type is as well.
6639
6640 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6641
6642 GDB 8.1 released.
6643
6644 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6645
6646 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6647 "features/s390x-linux64.c".
6648 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6649 s390_linux32 and s390x_linux64.
6650 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6651 default tdesc.
6652 * s390-tdep.c: Include "features/s390-linux32.c" and
6653 "features/s390x-linux64.c".
6654 (s390_tdesc_valid): Add check for tdesc_has_registers.
6655 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6656 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6657 tdesc_s390x_linux64.
6658 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6659 tdesc_s390x_linux64 to...
6660 * s390-tdep.h: ...here.
6661
6662 2018-01-30 Pedro Alves <palves@redhat.com>
6663
6664 PR gdb/13211
6665 * config.in, configure: Regenerate.
6666 * configure.ac: Check for getpgid.
6667 * go32-nat.c (go32_pass_ctrlc): New.
6668 (go32_target): Install it.
6669 * inf-child.c (inf_child_target): Install
6670 child_terminal_save_inferior, child_pass_ctrlc and
6671 child_interrupt.
6672 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6673 (inf_ptrace_target): No longer install it.
6674 * infcmd.c (interrupt_target_1): Adjust.
6675 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6676 (child_interrupt): Declare.
6677 (inferior::terminal_state): New.
6678 * inflow.c (struct terminal_info): Update comments.
6679 (inferior_process_group): Delete.
6680 (terminal_is_ours): Delete.
6681 (gdb_tty_state): New.
6682 (child_terminal_init): Adjust.
6683 (is_gdb_terminal, sharing_input_terminal_1)
6684 (sharing_input_terminal): New functions.
6685 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6686 Set the process's actual process group in the foreground if
6687 possible. Handle is_ours_for_output/is_ours distinction. Don't
6688 mark terminal as the inferior's if not sharing GDB's terminal.
6689 Don't check attach_flag.
6690 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6691 pass down a target_terminal_state.
6692 (child_terminal_save_inferior): New, factored out from ...
6693 (child_terminal_ours_1): ... this. Handle
6694 target_terminal_state::is_ours_for_output.
6695 (child_interrupt, child_pass_ctrlc): New.
6696 (inflow_inferior_exit): Clear the inferior's terminal_state.
6697 (copy_terminal_info): Copy the inferior's terminal state.
6698 (_initialize_inflow): Remove reference to terminal_is_ours.
6699 * inflow.h (inferior_process_group): Delete.
6700 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6701 * procfs.c (procfs_target): Don't install procfs_interrupt.
6702 (procfs_interrupt): Delete.
6703 * remote.c (remote_serial_quit_handler): Adjust.
6704 (remote_interrupt): Remove ptid parameter. Adjust.
6705 * target-delegates.c: Regenerate.
6706 * target.c: Include "terminal.h".
6707 (target_terminal::terminal_state): Rename to ...
6708 (target_terminal::m_terminal_state): ... this.
6709 (target_terminal::init): Adjust.
6710 (target_terminal::inferior): Adjust to per-inferior
6711 terminal_state.
6712 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6713 (target_terminal::ours, target_terminal::ours_for_output): Use
6714 target_terminal_is_ours_kind.
6715 (target_interrupt): Remove ptid parameter. Adjust.
6716 (default_target_pass_ctrlc): Adjust.
6717 * target.h (target_ops::to_terminal_save_inferior): New field.
6718 (target_ops::to_interrupt): Remove ptid_t parameter.
6719 (target_interrupt): Remove ptid_t parameter. Update comment.
6720 (target_pass_ctrlc): Update comment.
6721 * target/target.h (target_terminal_state): New scoped enum,
6722 factored out of ...
6723 (target_terminal::terminal_state): ... here.
6724 (target_terminal::inferior): Update comments.
6725 (target_terminal::restore_inferior): New.
6726 (target_terminal::is_inferior, target_terminal::is_ours)
6727 (target_terminal::is_ours_for_output): Adjust.
6728 (target_terminal::scoped_restore_terminal_state): Adjust to
6729 rename, and call restore_inferior() instead of inferior().
6730 (target_terminal::scoped_restore_terminal_state::m_state): Change
6731 type.
6732 (target_terminal::terminal_state): Rename to ...
6733 (target_terminal::m_terminal_state): ... this and change type.
6734
6735 2018-01-30 Pedro Alves <palves@redhat.com>
6736
6737 * linux-nat.c (wait_for_signal): New function.
6738 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6739 directly.
6740 (async_terminal_is_ours)
6741 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6742 (linux_nat_add_target): Don't override
6743 to_terminal_inferior/to_terminal_ours.
6744
6745 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
6746
6747 * remote.c (remote_follow_fork): Don't call "detach_inferior".
6748
6749 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
6750
6751 * dwarf2read.c (free_dwo_files): Add forward-declaration.
6752 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6753 dwarf2_per_objfile_free here.
6754 (dwarf2_per_objfile_free): Remove.
6755 (_initialize_dwarf2_read): Don't register
6756 dwarf2_per_objfile_free as a registry cleanup.
6757
6758 2018-01-27 Eli Zaretskii <eliz@gnu.org>
6759
6760 Avoid compilation errors in MinGW native builds
6761
6762 The error is triggered by including python-internal.h, and the
6763 error message is:
6764
6765 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6766 from build-gnulib/import/math.h:27,
6767 from d:/usr/Python26/include/pyport.h:235,
6768 from d:/usr/Python26/include/Python.h:58,
6769 from python/python-internal.h:94,
6770 from python/py-arch.c:24:
6771 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6772 using ::hypot;
6773 ^~~~~
6774
6775 This happens because Python headers define 'hypot' to expand t
6776 '_hypot' in the Windows builds.
6777 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6778 'hypoth'. This avoids a compilation error.
6779
6780 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6781
6782 * MAINTAINERS (Write After Approval): Fix ordering.
6783
6784 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6785
6786 * MAINTAINERS (Write After Approval): Add Alan Hayward.
6787
6788 2018-01-26 Alan Modra <amodra@gmail.com>
6789
6790 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6791 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6792 Remove nop. Make const. Comment.
6793 (powerpc32_plt_stub_so_2): New.
6794 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6795 Correct count. Update uses.
6796 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6797 Move common code reading PLT entry word. Correct
6798 powerpc32_plt_stub PLT address calculation.
6799 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6800 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6801 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6802 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6803 (ppc64_standard_linkage8): Likewise.
6804 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6805 Correct insns description.
6806 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6807
6808 2018-01-24 Pedro Alves <palves@redhat.com>
6809
6810 GCC PR libstdc++/83906
6811 * gdbtypes.c (operator==(const dynamic_prop &,
6812 const dynamic_prop &)): New.
6813 (operator==(const range_bounds &, const range_bounds &)): New.
6814 (check_types_equal): Use them instead of memcmp.
6815 * gdbtypes.h (operator==(const dynamic_prop &,
6816 const dynamic_prop &)): Declare.
6817 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6818 (operator==(const range_bounds &, const range_bounds &)): Declare.
6819 (operator!=(const range_bounds &, const range_bounds &)): Declare.
6820
6821 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6822
6823 * s390-linux-tdep.c (s390_record_address_mask)
6824 (s390_record_calc_disp_common, s390_record_calc_disp)
6825 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6826 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6827 (s390_process_record): Move to s390-tdep.c.
6828 (s390_linux_init_abi_any): Adjust.
6829 * s390-tdep.c (s390_record_address_mask)
6830 (s390_record_calc_disp_common, s390_record_calc_disp)
6831 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6832 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6833 (s390_process_record): Moved from s390-linux-tdep.c
6834 (s390_gdbarch_init): Adjust.
6835
6836 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6837
6838 * s390-linux-nat.c (s390-tdep.h): New include.
6839 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6840 (HFILES_NO_SRCDIR): Add s390-tdep.h.
6841 (ALLDEPFILES): Add s390-tdep.c.
6842 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6843 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6844 * s390-tdep.h: ...this. New file.
6845 * s390-linux-tdep.c (s390-tdep.h): New include.
6846 (_initialize_s390_tdep): Rename to...
6847 (_initialize_s390_linux_tdep): ...this and adjust.
6848 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6849 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6850 s390-tdep.h.
6851 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6852 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6853 (s390_is_partial_instruction, s390_software_single_step)
6854 (is_non_branch_ril, s390_displaced_step_copy_insn)
6855 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6856 (s390_prologue_data, s390_addr, s390_store, s390_load)
6857 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6858 (s390_register_call_saved, s390_guess_tracepoint_registers)
6859 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6860 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6861 (s390_pseudo_register_name, s390_pseudo_register_type)
6862 (s390_pseudo_register_read, s390_pseudo_register_write)
6863 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6864 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6865 (s390_addr_bits_remove, s390_address_class_type_flags)
6866 (s390_address_class_type_flags_to_name)
6867 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6868 (s390_function_arg_float, s390_function_arg_vector)
6869 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6870 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6871 (s390_frame_align, s390_register_return_value, s390_return_value)
6872 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6873 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6874 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6875 (s390_trad_frame_prev_register, s390_unwind_cache)
6876 (s390_prologue_frame_unwind_cache)
6877 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6878 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6879 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6880 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6881 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6882 (s390_frame_base_address, s390_local_base_address)
6883 (s390_frame_base, s390_gcc_target_options)
6884 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6885 (s390_validate_reg_range, s390_tdesc_valid)
6886 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6887 * s390-tdep.c: ...this. New file.
6888
6889 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6890
6891 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6892 (s390_process_record, s390_gdbarch_tdep_alloc)
6893 (s390_linux_init_abi_any): Use/set new hook.
6894
6895 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6896
6897 * s390-linux-tdep.c (osabi.h): New include.
6898 (s390_linux_init_abi_31, s390_linux_init_abi_64)
6899 (s390_linux_init_abi_any): New functions.
6900 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6901
6902 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6903
6904 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6905 tdesc_has_registers check
6906
6907 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6908
6909 * s390-linux-tdep.c (s390_tdesc_valid): New function.
6910 (s390_validate_reg_range): New macro.
6911 (s390_gdbarch_init): Adjust.
6912
6913 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6914
6915 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6916 (s390_gdbarch_tdep_alloc): Adjust.
6917 (s390_gdbarch_init): Adjust.
6918
6919 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6920
6921 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6922 <have_tdb>: Change type to bool.
6923 (s390_gdbarch_tdep_alloc): Adjust.
6924 (s390_gdbarch_init): Adjust.
6925
6926 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6927
6928 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6929 (gdbarch_tdep) <have_upper, have_vx>: New fields.
6930 (s390_gdbarch_tdep_alloc): New function.
6931 (s390_gdbarch_init): Allocate tdep at start and use its fields
6932 instead of separate variables.
6933
6934 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6935
6936 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6937 when looking for cached gdbarch and add comment for remaining.
6938
6939 2018-01-22 Pedro Alves <palves@redhat.com>
6940 Sergio Durigan Junior <sergiodj@redhat.com>
6941
6942 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6943 case.
6944
6945 2018-01-22 Maciej W. Rozycki <macro@mips.com>
6946
6947 * MAINTAINERS: Update my company e-mail address.
6948
6949 2018-01-22 Yao Qi <yao.qi@linaro.org>
6950
6951 * regcache.c (cooked_write_test): New function.
6952 (_initialize_regcache): Register the test.
6953
6954 2018-01-22 Yao Qi <yao.qi@linaro.org>
6955
6956 * ia64-tdep.c (ia64_pseudo_register_read): Call
6957 regcache->cooked_read instead of regcache_cooked_read_unsigned.
6958 * m32c-tdep.c (m32c_cat_read): Likewise.
6959 (m32c_r3r2r1r0_read): Likewise.
6960 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6961 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6962
6963 2018-01-22 Yao Qi <yao.qi@linaro.org>
6964
6965 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6966 method raw_read instead of regcache_raw_read.
6967 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6968 * arm-tdep.c (arm_neon_quad_read): Likewise.
6969 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6970 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6971 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6972 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6973 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6974 (i386_pseudo_register_read_into_value): Likewise.
6975 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6976 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6977 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6978 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6979 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6980 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6981 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6982 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6983 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6984
6985 2018-01-22 Yao Qi <yao.qi@linaro.org>
6986
6987 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6988 * configure.tgt: Remove target mt.
6989 * mt-tdep.c: Remove.
6990 * regcache.c (cooked_read_test): Remove the check for mt.
6991
6992 2018-01-22 Yao Qi <yao.qi@linaro.org>
6993
6994 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6995 instead of gdbarch_pseudo_register_read_value.
6996
6997 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6998
6999 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7000 language is Ada.
7001
7002 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7003
7004 * linespec.c (create_sals_line_offset): Remove code that preserved
7005 the symtab_and_line's line number.
7006
7007 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7008
7009 * varobj.c (varobj_create): Don't set valid_block when creating a
7010 floating varobj.
7011
7012 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7013
7014 * varobj.c (varobj_create): Remove out of date comment.
7015
7016 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7017
7018 PR mi/20395
7019 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7020 updating innermost block.
7021 * parse.c (innermost_block_tracker::update): Take extra type
7022 parameter, and check types match before updating innermost block.
7023 (write_dollar_variable): Update innermost block for registers.
7024 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7025 (innermost_block_tracker::innermost_block_tracker): Initialise
7026 m_types member.
7027 (innermost_block_tracker::reset): Take type parameter.
7028 (innermost_block_tracker::update): Take type parameter, and pass
7029 type through as needed.
7030 (innermost_block_tracker::m_types): New member.
7031 * varobj.c (varobj_create): Pass type when reseting innermost
7032 block.
7033
7034 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7035
7036 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7037 * ada-lang.c (resolve_subexp): Likewise.
7038 * breakpoint.c (set_breakpoint_condition) Likewise.
7039 (watch_command_1) Likewise.
7040 * c-exp.y (variable): Likewise.
7041 * d-exp.y (PrimaryExpression): Likewise.
7042 * f-exp.y (variable): Likewise.
7043 * go-exp.y (variable): Likewise.
7044 * m2-exp.y (variable): Likewise.
7045 * objfiles.c (objfile::~objfile): Likewise.
7046 * p-exp.y (variable): Likewise.
7047 * parse.c (innermost_block): Change type.
7048 * parser-defs.h (class innermost_block_tracker): New.
7049 (innermost_block): Change to innermost_block_tracker.
7050 * printcmd.c (display_command): Switch to innermost_block API.
7051 (do_one_display): Likewise.
7052 * rust-exp.y (do_one_display): Likewise.
7053 * symfile.c (clear_symtab_users): Likewise.
7054 * varobj.c (varobj_create): Switch to innermost_block API, replace
7055 use of innermost_block with block stored on varobj object.
7056
7057 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7058
7059 * expression.h (innermost_block): Remove declaration.
7060 * varobj.c: Add 'parser-defs.h' include.
7061
7062 2018-01-19 Tom Tromey <tom@tromey.com>
7063
7064 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7065 symbols in the static and global blocks.
7066
7067 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7068
7069 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7070 gdb_ptrace.h, and move including gdb_wait.h ...
7071 * nat/linux-ptrace.h: ... to here.
7072
7073 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7074
7075 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7076 inf_ptrace_detach_success.
7077 (inf_ptrace_detach_success): Add inferior parameter, use it
7078 instead of inferior_ptid, pass it to detach_inferior.
7079 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7080 parameter.
7081 * inferior.c (detach_inferior): Add overload that takes an
7082 inferior object.
7083 * inferior.h (detach_inferior): Likewise.
7084 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7085 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7086 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7087
7088 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7089
7090 * target.h (struct target_ops) <to_detach>: Add inferior
7091 parameter.
7092 (target_detach): Likewise.
7093 * target.c (dispose_inferior): Pass inferior down.
7094 (target_detach): Pass inferior down. Assert that it is equal to
7095 the current inferior.
7096 * aix-thread.c (aix_thread_detach): Pass inferior down.
7097 * corefile.c (core_file_command): Pass current_inferior() down.
7098 * corelow.c (core_detach): Add inferior parameter.
7099 * darwin-nat.c (darwin_detach): Likewise.
7100 * gnu-nat.c (gnu_detach): Likewise.
7101 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7102 * infcmd.c (detach_command): Pass current_inferior() down to
7103 target_detach.
7104 * infrun.c (follow_fork_inferior): Pass parent_inf to
7105 target_detach.
7106 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7107 target_detach.
7108 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7109 * linux-thread-db.c (thread_db_detach): Likewise.
7110 * nto-procfs.c (procfs_detach): Likewise.
7111 * procfs.c (procfs_detach): Likewise.
7112 * record.c (record_detach): Likewise.
7113 * record.h (struct inferior): Forward-declare.
7114 (record_detach): Add inferior parameter.
7115 * remote-sim.c (gdbsim_detach): Likewise.
7116 * remote.c (remote_detach_1): Likewise.
7117 (remote_detach): Likewise.
7118 (extended_remote_detach): Likewise.
7119 * sol-thread.c (sol_thread_detach): Likewise.
7120 * target-debug.h (target_debug_print_inferior_p): New macro.
7121 * target-delegates.c: Re-generate.
7122 * top.c (kill_or_detach): Pass inferior down to target_detach.
7123 * windows-nat.c (windows_detach): Add inferior parameter.
7124
7125 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7126
7127 * target.h (struct target_ops) <to_detach>: Remove args
7128 parameter.
7129 (target_detach): Likewise.
7130 * target.c (dispose_inferior): Adjust.
7131 (target_detach): Remove args parameter, adjust.
7132 * aix-thread.c (aix_thread_detach): Adjust.
7133 * corefile.c (core_file_command): Adjust.
7134 * corelow.c (core_detach): Adjust.
7135 * darwin-nat.c (darwin_detach): Adjust.
7136 * gnu-nat.c (gnu_detach): Adjust.
7137 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7138 * infcmd.c (detach_command): Adjust
7139 * infrun.c (follow_fork_inferior): Adjust.
7140 (handle_vfork_child_exec_or_exit): Adjust.
7141 * linux-fork.c (linux_fork_detach): Remove args parameter.
7142 * linux-fork.h (linux_fork_detach): Likewise.
7143 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7144 * linux-thread-db.c (thread_db_detach): Likewise.
7145 * nto-procfs.c (procfs_detach): Likewise.
7146 * procfs.c (procfs_detach): Likewise.
7147 (do_detach): Remove signo parameter.
7148 * record.c (record_detach): Remove args parameter.
7149 * record.h (record_detach): Likewise.
7150 * remote-sim.c (gdbsim_detach): Likewise.
7151 * remote.c (remote_detach_1): Likewise.
7152 (remote_detach): Likewise.
7153 (extended_remote_detach): Likewise.
7154 * sol-thread.c (sol_thread_detach): Likewise.
7155 * target-delegates.c: Re-generate.
7156 * top.c (struct qt_args) <args>: Remove field.
7157 (kill_or_detach): Don't pass args.
7158 (quit_force): Don't set args.
7159 * windows-nat.c (windows_detach): Remove args parameter.
7160
7161 2018-01-19 Yao Qi <yao.qi@linaro.org>
7162
7163 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7164 (arm_linux_init_abi): Install it.
7165
7166 2018-01-19 Yao Qi <yao.qi@linaro.org>
7167
7168 * osabi.c (gdb_osabi_names): Extend the regexp for
7169 arm-linux-gnueabihf.
7170
7171 2018-01-18 Yao Qi <yao.qi@linaro.org>
7172
7173 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7174 m_abbrevs.
7175 (abbrev_table::add_abbrev): Update.
7176 (abbrev_table::lookup_abbrev): Update.
7177
7178 2018-01-18 Yao Qi <yao.qi@linaro.org>
7179
7180 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7181
7182 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7183
7184 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7185 to "std::string".
7186
7187 2018-01-17 Tom Tromey <tom@tromey.com>
7188
7189 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7190
7191 2018-01-17 Tom Tromey <tom@tromey.com>
7192
7193 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7194 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7195 (create_array_type_with_stride): Update.
7196 * dwarf2read.c (set_die_type): Update.
7197
7198 2018-01-17 Tom Tromey <tom@tromey.com>
7199
7200 * dwarf2read.c (delayed_method_info): Remove typedef.
7201 (dwarf2_cu::method_info): Now a std::vector.
7202 (add_to_method_list): Update.
7203 (free_delayed_list): Remove.
7204 (compute_delayed_physnames): Update.
7205 (process_full_comp_unit, process_full_type_unit): Clear the method
7206 list. Remove cleanups.
7207 (psymtab_include_file_name): Add name_holder parameter. Use
7208 unique_xmalloc_ptr.
7209 (dwarf_decode_lines): Update.
7210
7211 2018-01-17 Tom Tromey <tom@tromey.com>
7212 Simon Marchi <simon.marchi@ericsson.com>
7213
7214 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7215 (dwarf2_per_objfile::free_cached_comp_units)
7216 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7217 (init_cutu_and_read_dies_no_follow): Update.
7218 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7219 (dwarf2_cu::~dwarf2_cu): New.
7220 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7221 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7222
7223 2018-01-17 Tom Tromey <tom@tromey.com>
7224 Simon Marchi <simon.marchi@ericsson.com>
7225
7226 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7227 (struct die_reader_specs) <abbrev_table>: New member.
7228 (struct abbrev_table): Add constructor.
7229 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7230 <abbrev_obstack>: Now an auto_obstack.
7231 (abbrev_table_up): New typedef.
7232 (init_cu_die_reader): Add abbrev_table parameter.
7233 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7234 Add result_dwo_abbrev_table.
7235 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7236 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7237 Update.
7238 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7239 parameter.
7240 (skip_children): Update.
7241 (abbrev_table::alloc_abbrev): Rename from
7242 abbrev_table_alloc_abbrev.
7243 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7244 (abbrev_table::lookup_abbrev): Rename from
7245 abbrev_table_lookup_abbrev.
7246 (abbrev_table_read_table): Return abbrev_table_up.
7247 (abbrev_table_free, abbrev_table_free_cleanup)
7248 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7249 (load_partial_dies): Update.
7250
7251 2018-01-17 Tom Tromey <tom@tromey.com>
7252
7253 * dwarf2read.c (dwarf2_compute_name): Update comment.
7254 (read_func_scope, read_variable): Update.
7255 (new_symbol): Remove.
7256 (new_symbol_full): Rename to new_symbol.
7257
7258 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7259
7260 PR gdb/16577
7261 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7262 a warning instead of throwing an error, set section size to 0 and return
7263 NULL.
7264 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7265
7266 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7267
7268 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7269 std::string.
7270 (linux_ptrace_attach_fail_reason_string): Likewise.
7271 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7272 Likewise.
7273 (linux_ptrace_attach_fail_reason_string): Likewise.
7274 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7275
7276 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7277
7278 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7279
7280 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7281
7282 PR gdb/21559
7283 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7284 checking for fs_base/gs_base fields in struct user_regs_struct.
7285 * configure: Regenerate.
7286
7287 2018-01-17 Yao Qi <yao.qi@linaro.org>
7288
7289 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7290 function.
7291 (aarch64_linux_init_abi): Install it to gdbarch hook
7292 gcc_target_options.
7293
7294 2018-01-15 Pedro Alves <palves@redhat.com>
7295
7296 * common/signals-state-save-restore.c
7297 (save_original_signals_state): Fix typos.
7298
7299 2017-01-12 Tom Tromey <tom@tromey.com>
7300 Sergio Durigan Junior <sergiodj@redhat.com>
7301
7302 * Makefile.in (install-only): Install gdb-add-index.
7303
7304 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7305
7306 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7307
7308 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7309
7310 * infrun.c (keep_going_pass_signal): Clear step-over info when
7311 insert_breakpoints fails.
7312
7313 2018-01-11 Pedro Alves <palves@redhat.com>
7314
7315 PR gdb/22583
7316 * infrun.c (resume): Rename to ...
7317 (resume_1): ... this.
7318 (resume): Reimplement as wrapper around resume_1.
7319
7320 2018-01-11 Pedro Alves <palves@redhat.com>
7321
7322 PR remote/22597
7323 * remote.c (remote_parse_stop_reply): Default to the last-set
7324 general thread instead of to 'magic_null_ptid'.
7325
7326 2018-01-10 Pedro Alves <palves@redhat.com>
7327
7328 * language.h (language_get_symbol_name_matcher): Rename ...
7329 (get_symbol_name_matcher): ... this.
7330 * language.c (language_get_symbol_name_matcher): Ditto.
7331 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7332 callers adjusted.
7333
7334 2018-01-10 Pedro Alves <palves@redhat.com>
7335
7336 PR gdb/22670
7337 * dwarf2read.c
7338 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7339 Adjust to use language_get_symbol_name_matcher instead of
7340 language_defn::la_get_symbol_name_matcher.
7341 * language.c (language_get_symbol_name_matcher): If in Ada mode
7342 and the lookup name is a verbatim match, return Ada's matcher.
7343 * language.h (language_get_symbol_name_matcher): Adjust comment.
7344 (ada_lookup_name_info::verbatim_p):: New method.
7345
7346 2018-01-10 Pedro Alves <palves@redhat.com>
7347
7348 PR gdb/22670
7349 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7350 minsym's language is language_auto or language_cplus, pass down
7351 language_ada instead.
7352 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7353
7354 2018-01-10 Pedro Alves <palves@redhat.com>
7355
7356 PR gdb/22670
7357 * minsyms.c (linkage_name_str): New function.
7358 (iterate_over_minimal_symbols): Use it.
7359
7360 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7361
7362 * NEWS: Document that 'info proc' now works on FreeBSD.
7363
7364 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7365
7366 * configure.ac: Check for kinfo_getfile in libutil.
7367 * configure: Regenerate.
7368 * config.in: Regenerate.
7369 * fbsd-nat.c: Include "fbsd-tdep.h".
7370 (fbsd_fetch_cmdline): New.
7371 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7372 rather than calling error.
7373 (fbsd_info_proc): New.
7374 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7375 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7376 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7377
7378 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7379
7380 * fbsd-nat.c (struct free_deleter): Remove.
7381 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7382
7383 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7384
7385 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7386 NULL for an empty pathname.
7387
7388 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7389
7390 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7391 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7392 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7393 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7394 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7395 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7396 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7397 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7398 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7399 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7400 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7401 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7402 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7403 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7404 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7405
7406 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7407
7408 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7409 (gnu_xfer_auxv): New function.
7410 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7411 TARGET_OBJECT_AUXV.
7412
7413 2018-01-08 Yao Qi <yao.qi@linaro.org>
7414 Simon Marchi <simon.marchi@ericsson.com>
7415
7416 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7417 common/selftest.c.
7418 (COMMON_OBS): Remove selftest.o.
7419 * configure.ac: Append selftest-arch.c and common/selftest.c to
7420 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7421 * configure: Re-generated.
7422 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7423 GDB_SELF_TEST.
7424 (maintenance_info_selftests): Likewise.
7425
7426 2018-01-08 Xavier Roirand <roirand@adacore.com>
7427
7428 * ada-valprint.c (val_print_packed_array_elements): Use
7429 proper number of elements when printing an array indexed
7430 by an enumeration type.
7431
7432 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7433
7434 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7435 (dw2_get_file_names_reader): Adjust.
7436 (lookup_dwo_signatured_type): Adjust.
7437 (lookup_dwp_signatured_type): Adjust.
7438 (lookup_signatured_type): Adjust.
7439 (create_type_unit_group): Adjust.
7440 (get_type_unit_group): Adjust.
7441 (process_psymtab_comp_unit_reader): Adjust.
7442 (build_type_psymtabs_reader): Adjust.
7443 (scan_partial_symbols): Adjust.
7444 (add_partial_symbol): Adjust.
7445 (add_partial_subprogram): Adjust.
7446 (peek_die_abbrev): Adjust.
7447 (fixup_go_packaging): Adjust.
7448 (process_imported_unit_die): Adjust.
7449 (dwarf2_compute_name): Adjust.
7450 (dwarf2_physname): Adjust.
7451 (read_import_statement): Adjust.
7452 (handle_DW_AT_stmt_list): Adjust.
7453 (read_file_scope): Adjust.
7454 (read_func_scope): Adjust.
7455 (read_lexical_block_scope): Adjust.
7456 (read_call_site_scope): Adjust.
7457 (read_variable): Adjust.
7458 (dwarf2_rnglists_process): Adjust.
7459 (dwarf2_ranges_process): Adjust.
7460 (dwarf2_ranges_read): Adjust.
7461 (dwarf2_get_pc_bounds): Adjust.
7462 (dwarf2_record_block_ranges): Adjust.
7463 (dwarf2_add_field): Adjust.
7464 (dwarf2_add_member_fn): Adjust.
7465 (read_structure_type): Adjust.
7466 (process_structure_scope): Adjust.
7467 (read_enumeration_type): Adjust.
7468 (read_array_type): Adjust.
7469 (mark_common_block_symbol_computed): Adjust.
7470 (read_common_block): Adjust.
7471 (read_namespace_type): Adjust.
7472 (read_namespace): Adjust.
7473 (read_module_type): Adjust.
7474 (read_tag_pointer_type): Adjust.
7475 (read_tag_ptr_to_member_type): Adjust.
7476 (read_tag_string_type): Adjust.
7477 (read_subroutine_type): Adjust.
7478 (read_typedef): Adjust.
7479 (read_base_type): Adjust.
7480 (attr_to_dynamic_prop): Adjust.
7481 (read_subrange_type): Adjust.
7482 (read_unspecified_type): Adjust.
7483 (dwarf2_read_abbrevs): Adjust.
7484 (load_partial_dies): Adjust.
7485 (read_partial_die): Adjust.
7486 (find_partial_die): Adjust.
7487 (guess_partial_die_structure_name): Adjust.
7488 (fixup_partial_die): Adjust.
7489 (read_attribute_value): Adjust.
7490 (read_addr_index): Adjust.
7491 (read_addr_index_from_leb128): Adjust.
7492 (read_str_index): Adjust.
7493 (dwarf2_string_attr): Adjust.
7494 (get_debug_line_section): Adjust.
7495 (dwarf_decode_line_header): Adjust.
7496 (lnp_state_machine::check_line_address): Adjust.
7497 (dwarf_decode_lines_1): Adjust.
7498 (dwarf_decode_lines): Adjust.
7499 (dwarf2_start_symtab): Adjust.
7500 (var_decode_location): Adjust.
7501 (new_symbol_full): Adjust.
7502 (dwarf2_const_value_data): Adjust.
7503 (dwarf2_const_value_attr): Adjust.
7504 (dwarf2_const_value): Adjust.
7505 (die_type): Adjust.
7506 (die_containing_type): Adjust.
7507 (build_error_marker_type): Adjust.
7508 (lookup_die_type): Adjust.
7509 (guess_full_die_structure_name): Adjust.
7510 (anonymous_struct_prefix): Adjust.
7511 (determine_prefix): Adjust.
7512 (dwarf2_name): Adjust.
7513 (follow_die_ref_or_sig): Adjust.
7514 (follow_die_offset): Adjust.
7515 (follow_die_ref): Adjust.
7516 (follow_die_sig_1): Adjust.
7517 (follow_die_sig): Adjust.
7518 (get_signatured_type): Adjust.
7519 (get_DW_AT_signature_type): Adjust.
7520 (decode_locdesc): Adjust.
7521 (dwarf_decode_macros): Adjust.
7522 (cu_debug_loc_section): Adjust.
7523 (fill_in_loclist_baton): Adjust.
7524 (dwarf2_symbol_mark_computed): Adjust.
7525 (init_one_comp_unit): Don't assign
7526 dwarf2_cu::dwarf2_per_objfile.
7527 (set_die_type): Adjust.
7528
7529 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7530
7531 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7532 <dwarf2_per_objfile>: New field.
7533 (dwarf2_per_objfile): Remove global.
7534 (get_dwarf2_per_objfile): New function.
7535 (set_dwarf2_per_objfile): New function.
7536 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7537 dwarf2_per_objfile.
7538 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7539 (read_abbrev_offset): Likewise.
7540 (read_indirect_string): Likewise.
7541 (read_indirect_line_string): Likewise.
7542 (read_indirect_string_at_offset): Likewise.
7543 (read_indirect_string_from_dwz): Likewise.
7544 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7545 dwarf2_per_objfile.
7546 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7547 (create_all_comp_units): Change objfile parameter to
7548 dwarf2_per_objfile.
7549 (create_all_type_units): Likewise.
7550 (process_queue): Add dwarf2_per_objfile parameter.
7551 (read_and_check_comp_unit_head): Likewise.
7552 (lookup_dwo_unit_in_dwp): Likewise.
7553 (get_dwp_file): Likewise.
7554 (process_cu_includes): Likewise.
7555 (struct free_dwo_file_cleanup_data): New struct.
7556 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7557 set_dwarf2_per_objfile.
7558 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7559 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7560 context, adjust calls.
7561 (dw2_instantiate_symtab): Likewise.
7562 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7563 (dw2_get_cu): Likewise.
7564 (create_cu_from_index_list): Change objfile parameter to
7565 dwarf2_per_objfile.
7566 (create_cus_from_index_list): Get dwarf2_per_objfile from
7567 context, adjust calls.
7568 (create_cus_from_index): Likewise.
7569 (create_signatured_type_table_from_index): Change objfile
7570 parameter to dwarf2_per_objfile.
7571 (create_signatured_type_table_from_debug_names): Change objfile
7572 parameter to dwarf2_per_objfile.
7573 (create_addrmap_from_index): Likewise.
7574 (create_addrmap_from_aranges): Likewise.
7575 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7576 (dw2_setup): Remove.
7577 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7578 context.
7579 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7580 get_dwarf2_per_objfile.
7581 (dw2_forget_cached_source_info): Likewise.
7582 (dw2_map_symtabs_matching_filename): Likewise.
7583 (struct dw2_symtab_iterator) <index>: Remove.
7584 <dwarf2_per_objfile>: New field.
7585 (dw2_symtab_iter_init): Replace index parameter with
7586 dwarf2_per_objfile.
7587 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7588 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7589 (dw2_print_stats): Likewise.
7590 (dw2_dump): Likewise.
7591 (dw2_expand_symtabs_for_function): Likewise.
7592 (dw2_expand_all_symtabs): Likewise.
7593 (dw2_expand_symtabs_with_fullname): Likewise.
7594 (dw2_expand_marked_cus): Replace index and objfile parameters
7595 with dwarf2_per_objfile.
7596 (dw_expand_symtabs_matching_file_matcher): Add
7597 dwarf2_per_objfile parameter and adjust calls.
7598 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7599 adjust calls.
7600 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7601 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7602 adjust calls.
7603 (create_cus_from_debug_names_list): Replace objfile parameter
7604 with dwarf2_per_objfile and adjust calls.
7605 (create_cus_from_debug_names): Likewise.
7606 (dwarf2_read_debug_names): Likewise.
7607 (mapped_debug_names::namei_to_name): Adjust call.
7608 (dw2_debug_names_iterator::next): Likewise.
7609 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7610 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7611 (dw2_debug_names_dump): Likewise.
7612 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7613 (dw2_debug_names_expand_symtabs_matching): Likewise.
7614 (dwarf2_initialize_objfile): Likewise.
7615 (dwarf2_build_psymtabs): Likewise.
7616 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7617 this_cu.
7618 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7619 (read_and_check_comp_unit_head): Likewise.
7620 (read_abbrev_offset): Likewise.
7621 (create_debug_type_hash_table): Likewise.
7622 (create_debug_types_hash_table): Likewise.
7623 (create_all_type_units): Replace objfile parameter with
7624 dwarf2_per_objfile.
7625 (add_type_unit): Add dwarf2_per_objfile parameter.
7626 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7627 with dwarf2_per_objfile.
7628 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7629 (lookup_dwp_signatured_type): Likewise.
7630 (lookup_signatured_type): Likewise.
7631 (read_cutu_die_from_dwo): Likewise.
7632 (init_tu_and_read_dwo_dies): Likewise.
7633 (init_cutu_and_read_dies): Likewise.
7634 (init_cutu_and_read_dies_no_follow): Likewise.
7635 (allocate_type_unit_groups_table): Add objfile parameter.
7636 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7637 (get_type_unit_group): Likewise.
7638 (process_psymtab_comp_unit): Update call.
7639 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7640 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7641 (print_tu_stats): Likewise.
7642 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7643 in void* parameter.
7644 (build_type_psymtabs): Change objfile parameter to
7645 dwarf2_per_objfile.
7646 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7647 passed in void* parameter.
7648 (process_skeletonless_type_units): Change objfile parameter to
7649 dwarf2_per_objfile.
7650 (set_partial_user): Likewise.
7651 (dwarf2_build_psymtabs_hard): Likewise.
7652 (read_comp_units_from_section): Likewise.
7653 (create_all_comp_units): Likewise.
7654 (scan_partial_symbols): Update calls.
7655 (add_partial_symbol): Likewise.
7656 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7657 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7658 (process_queue): Add dwarf2_per_objfile parameter.
7659 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7660 (compute_compunit_symtab_includes): Likewise.
7661 (process_cu_includes): Add dwarf2_per_objfile parameter.
7662 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7663 (process_full_type_unit): Likewise.
7664 (process_imported_unit_die): Update call.
7665 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7666 (read_file_scope): Likewise.
7667 (allocate_dwo_file_hash_table): Add objfile parameter.
7668 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7669 (create_cus_hash_table): Likewise.
7670 (create_dwp_hash_table): Likewise.
7671 (create_dwo_unit_in_dwp_v1): Likewise.
7672 (create_dwp_v2_section): Likewise.
7673 (create_dwo_unit_in_dwp_v2): Likewise.
7674 (lookup_dwo_unit_in_dwp): Likewise.
7675 (try_open_dwop_file): Likewise.
7676 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7677 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7678 cleanup to include a reference to dwarf2_per_objfile.
7679 (open_dwp_file): Add dwarf2_per_objfile parameter.
7680 (open_and_init_dwp_file): Likewise.
7681 (get_dwp_file): Likewise.
7682 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7683 (queue_and_load_all_dwo_tus): Update call.
7684 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7685 data.
7686 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7687 (dwarf2_ranges_process): Likewise.
7688 (dwarf2_get_pc_bounds): Likewise.
7689 (mark_common_block_symbol_computed): Likewise.
7690 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7691 (dwarf2_read_abbrevs): Update call.
7692 (read_partial_die): Use dwarf2_per_objfile from cu.
7693 (find_partial_die): Likewise.
7694 (fixup_partial_die): Likewise.
7695 (read_attribute_value): Likewise.
7696 (read_indirect_string_at_offset_from): Add objfile parameter.
7697 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7698 parameter.
7699 (read_indirect_string_from_dwz): Add objfile parameter.
7700 (read_indirect_string): Add objfile parameter.
7701 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7702 (read_addr_index): Use dwarf2_per_objfile from cu.
7703 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7704 call dw2_setup.
7705 (read_str_index): Use dwarf2_per_objfile from cu.
7706 (get_debug_line_section): Likewise.
7707 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7708 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7709 (new_symbol_full): Use dwarf2_per_objfile from cu.
7710 (build_error_marker_type): Likewise.
7711 (lookup_die_type): Likewise.
7712 (determine_prefix): Likewise.
7713 (follow_die_offset): Likewise.
7714 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7715 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7716 (dwarf2_fetch_die_type_sect_off): Likewise.
7717 (dwarf2_get_die_type): Likewise.
7718 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7719 (get_signatured_type): Likewise.
7720 (get_DW_AT_signature_type): Likewise.
7721 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7722 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7723 (cu_debug_loc_section): Likewise.
7724 (fill_in_loclist_baton): Likewise.
7725 (dwarf2_symbol_mark_computed): Likewise.
7726 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7727 dwarf2_per_objfile.
7728 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7729 parameter.
7730 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7731 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7732 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7733 (set_die_type): Use dwarf2_free_objfile from cu.
7734 (get_die_type_at_offset): Likewise.
7735 (dwarf2_per_objfile_free): Don't assign global variable.
7736 (debug_names) <constructor>: Add dwarf2_per_objfile
7737 parameter, update m_debugstrlookup construction.
7738 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7739 parameter.
7740 <m_dwarf2_per_objfile>: New field.
7741 <lookup>: Use m_dwarf2_per_objfile.
7742 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7743 (psyms_seen_size): Likewise.
7744 (write_gdbindex): Replace objfile parameter with
7745 dwarf2_per_objfile.
7746 (write_debug_names): Likewise.
7747 (write_psymtabs_to_index): Likewise.
7748 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7749 calls.
7750
7751 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7752
7753 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7754 <dwarf2_per_objfile>: New field.
7755 (struct dwarf2_per_cu_data) <objfile>: Remove.
7756 <dwarf2_per_objfile>: New field.
7757 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7758 of objfile.
7759 (create_signatured_type_table_from_index): Likewise.
7760 (create_debug_type_hash_table): Likewise.
7761 (fill_in_sig_entry_from_dwo_entry): Likewise.
7762 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7763 (create_type_unit_group): Assign dwarf2_per_objfile instead of
7764 objfile.
7765 (create_partial_symtab): Access objfile through
7766 dwarf2_per_objfile.
7767 (process_psymtab_comp_unit_reader): Likewise.
7768 (read_comp_units_from_section): Likewise.
7769 (scan_partial_symbols): Likewise.
7770 (add_partial_symbol): Likewise.
7771 (add_partial_subprogram): Likewise.
7772 (peek_die_abbrev): Likewise.
7773 (fixup_go_packaging): Likewise.
7774 (process_full_comp_unit): Likewise.
7775 (process_full_type_unit): Likewise.
7776 (process_imported_unit_die): Likewise.
7777 (dwarf2_compute_name): Likewise.
7778 (dwarf2_physname): Likewise.
7779 (read_import_statement): Likewise.
7780 (create_cus_hash_table): Assign dwarf2_physname instead of
7781 objfile.
7782 (read_func_scope): Access objfile through dwarf2_per_objfile.
7783 (read_lexical_block_scope): Likewise.
7784 (read_call_site_scope): Likewise.
7785 (read_variable): Likewise.
7786 (dwarf2_rnglists_process): Likewise.
7787 (dwarf2_ranges_process): Likewise.
7788 (dwarf2_ranges_read): Likewise.
7789 (dwarf2_record_block_ranges): Likewise.
7790 (dwarf2_add_field): Likewise.
7791 (dwarf2_add_member_fn): Likewise.
7792 (read_structure_type): Likewise.
7793 (process_structure_scope): Likewise.
7794 (read_enumeration_type): Likewise.
7795 (read_array_type): Likewise.
7796 (read_common_block): Likewise.
7797 (read_namespace_type): Likewise.
7798 (read_namespace): Likewise.
7799 (read_module_type): Likewise.
7800 (read_tag_pointer_type): Likewise.
7801 (read_tag_ptr_to_member_type): Likewise.
7802 (read_tag_string_type): Likewise.
7803 (read_subroutine_type): Likewise.
7804 (read_typedef): Likewise.
7805 (read_base_type): Likewise.
7806 (attr_to_dynamic_prop): Likewise.
7807 (read_subrange_type): Likewise.
7808 (read_unspecified_type): Likewise.
7809 (load_partial_dies): Likewise.
7810 (read_partial_die): Likewise.
7811 (find_partial_die): Likewise.
7812 (guess_partial_die_structure_name): Likewise.
7813 (fixup_partial_die): Likewise.
7814 (read_attribute_value): Likewise.
7815 (read_addr_index_from_leb128): Likewise.
7816 (dwarf2_read_addr_index): Likewise.
7817 (dwarf2_string_attr): Likewise.
7818 (lnp_state_machine::check_line_address): Likewise.
7819 (dwarf_decode_lines_1): Likewise.
7820 (dwarf_decode_lines): Likewise.
7821 (dwarf2_start_symtab): Likewise.
7822 (var_decode_location): Likewise.
7823 (new_symbol_full): Likewise.
7824 (dwarf2_const_value_data): Likewise.
7825 (dwarf2_const_value_attr): Likewise.
7826 (dwarf2_const_value): Likewise.
7827 (die_type): Likewise.
7828 (die_containing_type): Likewise.
7829 (lookup_die_type): Likewise.
7830 (guess_full_die_structure_name): Likewise.
7831 (anonymous_struct_prefix): Likewise.
7832 (dwarf2_name): Likewise.
7833 (follow_die_ref_or_sig): Likewise.
7834 (follow_die_offset): Likewise.
7835 (follow_die_ref): Likewise.
7836 (dwarf2_fetch_die_loc_sect_off): Likewise.
7837 (dwarf2_fetch_constant_bytes): Likewise.
7838 (dwarf2_fetch_die_type_sect_off): Likewise.
7839 (dwarf2_get_die_type): Likewise.
7840 (follow_die_sig): Likewise.
7841 (decode_locdesc): Likewise.
7842 (dwarf2_per_cu_objfile): Likewise.
7843 (dwarf2_per_cu_text_offset): Likewise.
7844 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7845 objfile.
7846 (set_die_type): Access objfile through
7847 dwarf2_per_objfile.
7848
7849 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7850
7851 * valprint.c (converted_character_d): Remove typedef.
7852 (DEF_VEC_O (converted_character_d)): Remove.
7853 (count_next_character): Use std::vector.
7854 (print_converted_chars_to_obstack): Likewise.
7855 (generic_printstr): Likewise.
7856
7857 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7858
7859 * xml-support.h (struct gdb_xml_value): Add constructor.
7860 <value>: Change type to unique_xmalloc_ptr.
7861 (gdb_xml_value_s): Remove typedef.
7862 (DEF_VEC_O (gdb_xml_value_s)): Remove.
7863 (gdb_xml_element_start_handler): Change parameter type to
7864 std::vector.
7865 (xml_find_attribute): Likewise.
7866 * xml-support.c (xml_find_attribute): Change parameter type to
7867 std::vector and adjust.
7868 (gdb_xml_values_cleanup): Remove.
7869 (gdb_xml_parser::start_element): Adjust to std::vector.
7870 (xinclude_start_include): Change paraeter type to std::vector
7871 and adjust.
7872 * btrace.c (check_xml_btrace_version): Likewise.
7873 (parse_xml_btrace_block): Likewise.
7874 (parse_xml_btrace_pt_config_cpu): Likewise.
7875 (parse_xml_btrace_pt): Likewise.
7876 (parse_xml_btrace_conf_bts): Likewise.
7877 (parse_xml_btrace_conf_pt): Likewise.
7878 * memory-map.c (memory_map_start_memory): Likewise.
7879 (memory_map_start_property): Likewise.
7880 * osdata.c (osdata_start_osdata): Likewise.
7881 (osdata_start_item): Likewise.
7882 (osdata_start_column): Likewise.
7883 * remote.c (start_thread): Likewise.
7884 * solib-aix.c (library_list_start_library): Likewise.
7885 (library_list_start_list): Likewise.
7886 * solib-svr4.c (library_list_start_library): Likewise.
7887 (svr4_library_list_start_list): Likewise.
7888 * solib-target.c (library_list_start_segment): Likewise.
7889 (library_list_start_section): Likewise.
7890 (library_list_start_library): Likewise.
7891 (library_list_start_list): Likewise.
7892 * tracepoint.c (traceframe_info_start_memory): Likewise.
7893 (traceframe_info_start_tvar): Likewise.
7894 * xml-syscall.c (syscall_start_syscall): Likewise.
7895 * xml-tdesc.c (tdesc_start_target): Likewise.
7896 (tdesc_start_feature): Likewise.
7897 (tdesc_start_reg): Likewise.
7898 (tdesc_start_union): Likewise.
7899 (tdesc_start_struct): Likewise.
7900 (tdesc_start_flags): Likewise.
7901 (tdesc_start_enum): Likewise.
7902 (tdesc_start_field): Likewise.
7903 (tdesc_start_enum_value): Likewise.
7904 (tdesc_start_vector): Likewise.
7905
7906 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7907
7908 * extension.h (struct xmethod_worker) <clone>: Remove.
7909 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7910 Remove.
7911 (python_xmethod_worker::clone): Remove.
7912 * valops.c (find_overload_match): Use std::move instead of
7913 clone.
7914
7915 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7916
7917 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7918 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7919 <free_xmethod_worker_data>: Remove.
7920 <get_matching_xmethod_workers>: Chance VEC to std::vector.
7921 <get_xmethod_arg_types>: Remove.
7922 <get_xmethod_result_type>: Remove.
7923 <invoke_xmethod>: Remove.
7924 * extension.c (new_xmethod_worker): Remove.
7925 (clone_xmethod_worker): Remove.
7926 (get_matching_xmethod_workers): Return void, pass std::vector by
7927 pointer.
7928 (get_xmethod_arg_types): Rename to...
7929 (xmethod_worker::get_arg_types): ... this, and adjust.
7930 (get_xmethod_result_type): Rename to...
7931 (xmethod_worker::get_result_type): ... this, and adjust.
7932 (invoke_xmethod): Remove.
7933 (free_xmethod_worker): Remove.
7934 (free_xmethod_worker_vec): Remove.
7935 * extension.h (enum ext_lang_rc): Move here from
7936 extension-priv.h.
7937 (struct xmethod_worker): Add constructor and destructor.
7938 <data>: Remove.
7939 <value>: Remove.
7940 <invoke, clone, do_get_result_type, do_get_arg_types>: New
7941 virtual pure methods.
7942 <get_arg_types, get_result_type>: New methods.
7943 (xmethod_worker_ptr): Remove typedef.
7944 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7945 (xmethod_worker_vec): Remove typedef.
7946 (xmethod_worker_up): New typedef.
7947 (invoke_xmethod): Remove.
7948 (clone_xmethod_worker): Remove.
7949 (free_xmethod_worker): Remove.
7950 (free_xmethod_worker_vec): Remove.
7951 (get_xmethod_arg_types): Remove.
7952 (get_xmethod_result_type): Remove.
7953 * valops.c (find_method_list): Use std::vector, don't use
7954 intermediate vector.
7955 (value_find_oload_method_list): Use std::vector.
7956 (find_overload_match): Use std::vector.
7957 (find_oload_champ): Use std::vector.
7958 * value.c (value_free): Use operator delete.
7959 (value_of_xmethod): Rename to...
7960 (value_from_xmethod): ... this. Don't assign
7961 xmethod_worker::value, take rvalue-reference.
7962 (result_type_of_xmethod): Adjust.
7963 (call_xmethod): Adjust.
7964 * value.h: Include extension.h.
7965 (struct xmethod_worker): Don't forward-declare.
7966 (value_of_xmethod): Rename to...
7967 (value_from_xmethod): ... this, take rvalue-reference.
7968 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7969 (struct python_xmethod_worker): ... this, add constructor and
7970 destructor.
7971 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7972 (gdbpy_free_xmethod_worker_data): Rename to...
7973 (python_xmethod_worker::~python_xmethod_worker): ... this and
7974 adjust.
7975 (gdbpy_clone_xmethod_worker_data): Rename to...
7976 (python_xmethod_worker::clone): ... this and adjust.
7977 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7978 temporary vector.
7979 (gdbpy_get_xmethod_arg_types): Rename to...
7980 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7981 (gdbpy_get_xmethod_result_type): Rename to...
7982 (python_xmethod_worker::do_get_result_type): ... this and
7983 adjust.
7984 (gdbpy_invoke_xmethod): Rename to...
7985 (python_xmethod_worker::invoke): ... this and adjust.
7986 (new_python_xmethod_worker): Rename to...
7987 (python_xmethod_worker::python_xmethod_worker): ... this and
7988 adjust.
7989 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7990 Remove.
7991 (gdbpy_free_xmethod_worker_data): Remove.
7992 (gdbpy_get_matching_xmethod_workers): Use std::vector.
7993 (gdbpy_get_xmethod_arg_types): Remove.
7994 (gdbpy_get_xmethod_result_type): Remove.
7995 (gdbpy_invoke_xmethod): Remove.
7996 * python/python.c (python_extension_ops): Remove obsolete
7997 callbacks.
7998
7999 2018-01-05 Pedro Alves <palves@redhat.com>
8000
8001 PR gdb/18653
8002 * common/signals-state-save-restore.c
8003 (save_original_signals_state): New parameter 'quiet'. Warn if we
8004 find a custom handler preinstalled, instead of internal erroring.
8005 But only warn if !quiet.
8006 * common/signals-state-save-restore.h
8007 (save_original_signals_state): New parameter 'quiet'.
8008 * main.c (captured_main_1): Move save_original_signals_state call
8009 after option handling, and pass QUIET.
8010
8011 2018-01-05 Pedro Alves <palves@redhat.com>
8012
8013 * spu-tdep.c (spu_catch_start): Pass
8014 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8015
8016 2018-01-05 Pedro Alves <palves@redhat.com>
8017
8018 PR gdb/22670
8019 * ada-lang.c (literal_symbol_name_matcher): New function.
8020 (ada_get_symbol_name_matcher): Use it for
8021 symbol_name_match_type::SEARCH_NAME.
8022 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8023 it down instead of assuming symbol_name_match_type::FULL.
8024 * block.h (block_lookup_symbol): New parameter 'match_type'.
8025 * c-valprint.c (print_unpacked_pointer): Use
8026 lookup_symbol_search_name instead of lookup_symbol.
8027 * compile/compile-object-load.c (get_out_value_type): Pass down
8028 symbol_name_match_type::SEARCH_NAME.
8029 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8030 symbol_name_match_type::FULL.
8031 * cp-support.c (cp_get_symbol_name_matcher): Handle
8032 symbol_name_match_type::SEARCH_NAME.
8033 * infrun.c (insert_exception_resume_breakpoint): Use
8034 lookup_symbol_search_name.
8035 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8036 * psymtab.c (maintenance_check_psymtabs): Use
8037 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8038 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8039 SYMBOL_SEARCH_NAME.
8040 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8041 if symbol_name_match_type::SEARCH_NAME.
8042 (lookup_symbol_in_language): Pass down
8043 symbol_name_match_type::FULL.
8044 (lookup_symbol_search_name): New.
8045 (lookup_language_this): Pass down
8046 symbol_name_match_type::SEARCH_NAME.
8047 (lookup_symbol_aux, lookup_local_symbol): New parameter
8048 'match_type'. Pass it down.
8049 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8050 (lookup_symbol_search_name): New declaration.
8051 (lookup_symbol_in_block): New 'match_type' parameter.
8052
8053 2018-01-05 Pedro Alves <palves@redhat.com>
8054
8055 PR gdb/22670
8056 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8057 ada_lookup_symbol.
8058 (ada_lookup_symbol): Reimplement in terms of
8059 ada_lookup_symbol_list, bits factored out from
8060 ada_lookup_encoded_symbol.
8061
8062 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8063
8064 * ada-exp.y (write_object_renaming): When subscripting an array
8065 using a symbol as the index, pass the block in call to
8066 ada_lookup_encoded_symbol when looking that symbol up.
8067
8068 2018-01-05 Jerome Guitton <guitton@adacore.com>
8069
8070 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8071 TYPE_INDEX_TYPE.
8072
8073 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8074
8075 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8076 the case where VALUE_LVAL (val0) is not lval_memory.
8077
8078 2018-01-05 Xavier Roirand <roirand@adacore.com>
8079
8080 * ada-valprint.c (print_optional_low_bound): Handle
8081 character-indexed array printing like boolean-indexed array
8082 printing.
8083
8084 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8085
8086 * NEWS: Create a new section for the next release branch.
8087 Rename the section of the current branch, now that it has
8088 been cut.
8089
8090 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8091
8092 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8093 * version.in: Bump version to 8.1.50.DATE-git.
8094
8095 2018-01-03 Xavier Roirand <roirand@adacore.com>
8096
8097 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8098 Add field.
8099 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8100 Add field.
8101 (default_exception_support_info) <catch_handlers_sym>: Add field.
8102 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8103 (ada_exception_name_addr_1): Add "catch handlers" handling.
8104 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8105 Update all callers.
8106 (create_excep_cond_exprs) <ex>: Add parameter.
8107 (re_set_exception): Update create_excep_cond_exprs call.
8108 (print_it_exception, print_one_exception, print_mention_exception)
8109 (print_recreate_exception): Add "catch handler" handling.
8110 (allocate_location_catch_handlers, re_set_catch_handlers)
8111 (check_status_catch_handlers, print_it_catch_handlers)
8112 (print_one_catch_handlers, print_mention_catch_handlers)
8113 (print_recreate_catch_handlers): New function.
8114 (catch_handlers_breakpoint_ops): New variable.
8115 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8116 Add parameter. Add "catch handler" handling.
8117 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8118 Add "catch handler" handling.
8119 (ada_exception_catchpoint_cond_string): Add "catch handler"
8120 handling.
8121 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8122 call.
8123 (catch_ada_handlers_command): New function.
8124 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8125 operations structure.
8126 (_initialize_ada_language): Add "catch handlers" command entry.
8127 * NEWS: Document "catch handlers" feature.
8128
8129 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8130
8131 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8132 account when creating the array type of the slice.
8133 (ada_value_slice): Likewise.
8134
8135 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8136
8137 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8138 New enum value.
8139 (create_array_type_with_stride): Add byte_stride_prop parameter.
8140 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8141 New parameter. Update all callers in this file.
8142 (array_type_has_dynamic_stride): New function.
8143 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8144 of arrays with dynamic byte strides.
8145 * dwarf2read.c (read_array_type): Add support for dynamic
8146 DW_AT_byte_stride attributes.
8147
8148 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8149
8150 * dwarf2read.c (read_unspecified_type): Treat
8151 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8152
8153 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8154
8155 Update copyright year range in all GDB files.
8156
8157 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8158
8159 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8160 and gdb/testsuite/gdb.base/step-line.c.
8161
8162 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8163
8164 * copyright.py (main): Dump the contents of
8165 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8166 even if BY_HAND is empty.
8167
8168 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8169
8170 * top.c (print_gdb_version): Update Copyright year in version
8171 message.
8172
8173 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8174
8175 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8176
8177 For older changes see ChangeLog-2017.
8178 \f
8179 Local Variables:
8180 mode: change-log
8181 left-margin: 8
8182 fill-column: 74
8183 version-control: never
8184 coding: utf-8
8185 End:
This page took 0.20312 seconds and 4 git commands to generate.