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