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