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