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