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