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