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