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