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