1 2018-05-02 Pedro Alves <palves@redhat.com>
3 * bfd-target.c (target_bfd_xclose): Rename to ...
4 (target_bfd_close): ... this.
5 (target_bfd_reopen): Adjust.
6 * target.c (target_close): Remove references to to_xclose.
7 * target.h (target_ops::to_xclose): Delete.
8 (target_ops::to_close): Update comments.
10 2018-05-02 Pedro Alves <palves@redhat.com>
12 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
14 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
15 * inf-ptrace.c (inf_ptrace_register_u_offset)
16 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
17 (inf_ptrace_store_register, inf_ptrace_store_registers)
18 (inf_ptrace_trad_target): Move to ...
19 * linux-nat-trad.c: ... this new file.
20 * linux-nat-trad.h: New file.
21 * linux-nat.c (linux_target_install_ops): Make extern.
22 (linux_trad_target): Delete.
23 * linux-nat.h (linux_trad_target): Delete declaration.
24 (linux_target_install_ops): Declare.
25 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
28 2018-05-02 Pedro Alves <palves@redhat.com>
30 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
31 procfs_target/add_target here.
32 * procfs.c (procfs_target): Make static.
33 (_initialize_procfs): Call add_target here.
34 * procfs.h (struct target_ops): Remove forward declaration.
35 (procfs_target): Remove declaration.
36 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
38 2018-05-02 Pedro Alves <palves@redhat.com>
40 * procfs.c (procfs_stopped_by_watchpoint)
41 (procfs_insert_watchpoint, procfs_remove_watchpoint)
42 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
44 (procfs_use_watchpoints): Delete, move contents...
45 (procfs_target): ... here.
46 * procfs.h (procfs_use_watchpoints): Delete declaration.
47 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
48 procfs_use_watchpoints.
49 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
50 procfs_use_watchpoints.
52 2018-05-02 Tom Tromey <tom@tromey.com>
55 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
56 and var_zuinteger_unlimited.
57 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
58 and PARAM_ZUINTEGER_UNLIMITED.
59 (set_parameter_value): Handle var_zuinteger and
60 var_zuinteger_unlimited.
61 (add_setshow_generic): Likewise.
62 (parmpy_init): Likewise.
64 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
67 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
68 pointer is not null before dereferencing it.
70 2018-04-30 Tom Tromey <tom@tromey.com>
72 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
75 2018-04-30 Tom Tromey <tom@tromey.com>
77 * breakpoint.c (mention): Remove use of is_mi_like_p.
78 (print_mention_ranged_breakpoint): Likewise.
79 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
82 2018-04-30 Tom Tromey <tom@tromey.com>
84 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
86 2018-04-30 Tom Tromey <tom@tromey.com>
88 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
89 (info_spu_event_command): Remove some uses of is_mi_like_p.
91 2018-04-30 Tom Tromey <tom@tromey.com>
93 * python/py-framefilter.c (py_print_single_arg)
94 (enumerate_locals, py_print_args, py_print_frame): Remove some
97 2018-04-30 Tom Tromey <tom@tromey.com>
100 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
101 * ui-out.h (ui_out::is_mi_like_p): Now const.
102 (ui_out::do_is_mi_like_p): Now const.
103 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
105 2018-04-30 Tom Tromey <tom@tromey.com>
107 * varobj.c (varobj_set_visualizer): Use new_reference.
108 * python/python.c (gdbpy_decode_line): Use new_reference.
109 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
112 2018-04-30 Tom Tromey <tom@tromey.com>
114 * varobj.c (install_new_value): Use new_reference.
115 * value.h (value_incref): Return void. Swap intro comment with
117 * value.c (set_value_parent): Use new_reference.
118 (value_incref): Return void. Update intro comment.
119 (release_value): Use new_reference.
120 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
122 2018-04-30 Tom Tromey <tom@tromey.com>
124 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
125 * gdb_bfd.h (new_bfd_ref): Remove.
126 (gdb_bfd_open): Update comment.
127 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
128 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
129 (gdb_bfd_fdopenr): Use new_reference.
130 * exec.c (exec_file_attach): Use new_reference.
132 2018-04-30 Tom Tromey <tom@tromey.com>
134 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
137 2018-04-30 Tom Tromey <tom@tromey.com>
139 * jit.c (jit_read_code_entry): Use type_align.
140 * i386-tdep.c (i386_gdbarch_init): Don't call
141 set_gdbarch_long_long_align_bit.
142 * gdbarch.sh: Remove long_long_align_bit.
143 * gdbarch.c, gdbarch.h: Rebuild.
144 * arc-tdep.c (arc_type_align): New function.
145 (arc_gdbarch_init): Use arc_type_align. Don't call
146 set_gdbarch_long_long_align_bit.
148 2018-04-30 Tom Tromey <tom@tromey.com>
150 * rust-lang.c (rust_type_alignment): Remove.
151 (rust_composite_type): Use type_align.
153 2018-04-30 Tom Tromey <tom@tromey.com>
155 * NEWS: Mention Type.align.
156 * python/py-type.c (typy_get_alignof): New function.
157 (type_object_getset): Add "alignof".
159 2018-04-30 Tom Tromey <tom@tromey.com>
163 * std-operator.def (UNOP_ALIGNOF): New operator.
164 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
166 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
167 * c-lang.c (c_op_print_tab): Add alignof.
168 * c-exp.y (ALIGNOF): New token.
169 (exp): Add "ALIGNOF" production.
170 (ident_tokens): Add _Alignof and alignof.
172 2018-04-30 Tom Tromey <tom@tromey.com>
174 * i386-tdep.c (i386_type_align): New function.
175 (i386_gdbarch_init): Update.
176 * gdbarch.sh (type_align): New method.
177 * gdbarch.c, gdbarch.h: Rebuild.
178 * arch-utils.h (default_type_align): Declare.
179 * arch-utils.c (default_type_align): New function.
180 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
181 (struct type) <align_log2>: New field.
182 <instance_flags>: Now a bitfield.
183 (TYPE_RAW_ALIGN): New macro.
184 (type_align, type_raw_align, set_type_align): Declare.
185 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
187 * dwarf2read.c (quirk_rust_enum): Set type alignment.
188 (get_alignment, maybe_set_alignment): New functions.
189 (read_structure_type, read_enumeration_type, read_array_type)
190 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
191 (read_subrange_type, read_base_type): Set type alignment.
193 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
195 * dwarf2read.c (read_index_from_section): Use bool.
197 2018-04-29 Fabian Groffen <grobian@gentoo.org>
200 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
203 2018-04-29 John Reiser <jreiser@BitWagon.com>
206 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
207 last step, and do it atomically.
209 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
211 * compile/compile-c-types.c (convert_int, convert_float):
214 2018-04-27 Tom Tromey <tom@tromey.com>
217 * rust-lang.c (rust_inclusive_range_type_p): New function.
218 (rust_range): Handle inclusive ranges.
219 (rust_compute_range): Likewise.
220 * rust-exp.y (struct rust_op) <inclusive>: New field.
221 (DOTDOTEQ): New constant.
222 (range_expr): Add "..=" productions.
223 (operator_tokens): Add "..=" token.
224 (ast_range): Add "inclusive" parameter.
225 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
227 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
229 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
230 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
232 * expprint.c (print_subexp_standard): Handle new bounds values.
233 (dump_subexp_body_standard): Likewise.
235 2018-04-27 Tom Tromey <tom@tromey.com>
237 * configure: Rebuild.
238 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
239 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
241 (class symbol_needs_eval_context): Likewise.
242 * dwarf2read.c (mock_mapped_index::symbol_name_count)
243 (mock_mapped_index::symbol_name_at): Use "override". Remove
245 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
247 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
248 * aarch64-tdep.c (instruction_reader::read): Use "override".
249 (instruction_reader_test::read): Likewise.
250 * arm-tdep.c (instruction_reader::read): Use "override".
251 (instruction_reader_thumb::read): Likewise.
253 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
256 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
257 instead of remote_send.
258 (remote_send): Remove.
260 2018-04-26 Pedro Alves <palves@redhat.com>
262 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
263 find_function_start_sal instead of find_pc_line.
265 2018-04-26 Pedro Alves <palves@redhat.com>
267 * breakpoint.c (set_breakpoint_location_function): Handle
269 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
270 * elfread.c (elf_symtab_read): Give data symbols with
271 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
272 (elf_rel_plt_read): Update comment.
273 * linespec.c (convert_linespec_to_sals): Handle
275 (minsym_found): Handle mst_data_gnu_ifunc.
276 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
277 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
278 * parse.c (find_minsym_type_and_address): Handle
280 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
281 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
282 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
284 <mst_data_gnu_ifunc>: New enumerator.
286 2018-04-26 Pedro Alves <palves@redhat.com>
288 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
289 (lookup_minimal_symbol_by_pc_section): ... this. Replace
290 'want_trampoline' parameter by a lookup_msym_prefer parameter.
292 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
293 (lookup_minimal_symbol_by_pc): Adjust.
294 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
295 (lookup_solib_trampoline_symbol_by_pc): Adjust.
296 * minsyms.h (lookup_msym_prefer): New enum.
297 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
298 parameter by a lookup_msym_prefer parameter.
300 2018-04-26 Pedro Alves <palves@redhat.com>
302 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
303 ends in "@plt" instead of looking at the symbol's section.
305 2018-04-26 Pedro Alves <palves@redhat.com>
307 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
309 (find_pc_partial_function_gnu_ifunc): Rename to ...
310 (find_pc_partial_function): ... this, and remove references to
312 (find_pc_partial_function): Delete old implementation.
313 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
315 2018-04-26 Pedro Alves <palves@redhat.com>
317 * linespec.c (struct bound_minimal_symbol_search_key): New.
318 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
319 skip first line if we found a GNU ifunc minimal symbol by name.
320 (compare_msymbols): Change parameters to work with a destructured
322 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
325 2018-04-26 Pedro Alves <palves@redhat.com>
327 * breakpoint.c (set_breakpoint_location_function): Don't resolve
328 ifunc targets here. Instead, if we have an ifunc minsym, use its
330 (add_location_to_breakpoint): Store the minsym and the objfile in
331 the breakpoint location.
332 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
333 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
334 Record the minsym in the sal.
335 * symtab.h (symtab_and_line) <msymbol>: New field.
337 2018-04-26 Pedro Alves <palves@redhat.com>
339 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
340 unless we actually resolved the ifunc.
342 2018-04-26 Pedro Alves <palves@redhat.com>
344 * c-exp.y (variable production): Prefer ifunc minsyms over
345 regular function symbols.
346 * symtab.c (find_gnu_ifunc): New function.
347 * minsyms.h (lookup_msym_prefer): New enum.
348 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
349 parameter by a lookup_msym_prefer parameter.
350 * symtab.h (find_gnu_ifunc): New declaration.
352 2018-04-26 Pedro Alves <palves@redhat.com>
354 * blockframe.c (find_gnu_ifunc_target_type): New function.
355 (find_function_type): New.
356 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
357 return a value with a memory address.
358 (eval_call): For calls to GNU ifunc functions, try to find the
359 type of the target function from the type that the resolver
361 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
363 * infcall.c (find_function_return_type): Delete.
364 (find_function_addr): Add 'function_type' parameter. For calls to
365 GNU ifunc functions, try to find the type of the target function
366 from the type that the resolver returns, and return it via
368 (call_function_by_hand_dummy): Adjust to use the function type
369 returned by find_function_addr.
370 (find_function_addr): Add 'function_type' parameter and move
372 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
375 2018-04-26 Pedro Alves <palves@redhat.com>
377 * c-exp.y (variable production): Skip finding an alias for ifunc
380 2018-04-26 Pedro Alves <palves@redhat.com>
382 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
384 2018-04-25 Pedro Alves <palves@redhat.com>
386 * infcmd.c (kill_command): Print the pid as string, not the whole
387 thread's ptid. Add comment. s/has been killed/killed/ in output
389 * remote.c (remote_detach_1): Print the pid as string, not the
392 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
393 Sergio Durigan Junior <sergiodj@redhat.com>
394 Pedro Alves <palves@redhat.com>
396 * infcmd.c (kill_command): Print message when inferior has
398 * inferior.c (print_inferior_events): Remove 'static'. Set as
400 (add_inferior): Improve message printed when
401 'print_inferior_events' is on.
402 (exit_inferior): Remove message printed when
403 'print_inferior_events' is on.
404 (detach_inferior): Improve message printed when
405 'print_inferior_events' is on.
406 (initialize_inferiors): Use 'add_inferior_silent' to set
408 * inferior.h (print_inferior_events): Declare here as
410 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
411 '[Detaching...]' messages when 'print_inferior_events' is on.
412 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
413 as prefix/suffix for messages. Remove periods. Fix erroneous
414 'Detaching after fork from child...', replace it by '... from
416 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
417 prefix/suffix when printing 'Detaching...' messages. Print
418 them when 'print_inferior_events' is on.
419 * remote.c (remote_detach_1): Print message when detaching
420 from inferior and '!is_fork_parent'.
422 2018-04-24 Tom Tromey <tom@tromey.com>
424 * cli-out.h: Reindent.
426 2018-04-24 Tom Tromey <tom@tromey.com>
428 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
429 (cli_ui_out::do_field_string): Use fputs_filtered.
430 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
432 2018-04-23 Tom Tromey <tom@tromey.com>
434 * guile/scm-frame.c (gdbscm_frame_read_var): Use
435 gdb::unique_xmalloc_ptr.
437 2018-04-23 Tom Tromey <tom@tromey.com>
439 * configure: Rebuild.
441 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
444 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
445 prepare_for_testing. Set normal_bp to r_debug_state if target
448 2018-04-21 Pedro Alves <palves@redhat.com>
449 Rajendra SY <rajendra.sy@gmail.com>
451 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
452 * remote.c (extended_remote_attach): In all-stop mode, mark the
455 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
457 * thread.c (thread_apply_all_command): Fix comment.
458 (thread_command): Fix comment.
460 2018-04-10 Alan Hayward <alan.hayward@arm.com>
462 * common/tdesc.h (tdesc_create_feature): Remove xml filename
464 * features/aarch64-core.c (create_feature_aarch64_core):
466 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
468 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
470 * features/i386/32bit-avx512.c
471 (create_feature_i386_32bit_avx512): Likewise.
472 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
474 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
476 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
478 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
480 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
482 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
484 * features/i386/64bit-avx512.c
485 (create_feature_i386_64bit_avx512): Likewise.
486 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
488 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
490 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
492 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
494 * features/i386/64bit-segments.c
495 (create_feature_i386_64bit_segments): Likewise.
496 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
498 * features/i386/x32-core.c
499 (create_feature_i386_x32_core): Likewise.
500 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
501 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
502 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
503 * target-descriptions.c: In generated code, don't pass xml
506 2018-04-18 Alan Hayward <alan.hayward@arm.com>
508 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
509 (print_xml_feature::visit_post): Likewise.
510 (print_xml_feature::visit): Likewise.
511 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
512 (print_xml_feature): Add new class.
513 * regformats/regdat.sh: Null xmltarget on feature targets.
514 * target-descriptions.c (struct target_desc): Add xmltarget.
515 (maintenance_check_tdesc_xml_convert): Add unittest function.
516 (tdesc_get_features_xml): Add function to get xml.
517 (maintenance_check_xml_descriptions): Test xml generation.
518 * xml-tdesc.c (string_read_description_xml): Add function.
519 * xml-tdesc.h (string_read_description_xml): Add declaration.
521 2018-04-18 Alan Hayward <alan.hayward@arm.com>
523 * features/Makefile: Add feature marker to targets with new style
525 * regformats/aarch64.dat: Regenerate.
526 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
527 * regformats/i386/amd64-avx-linux.dat: Likewise.
528 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
529 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
530 * regformats/i386/amd64-linux.dat: Likewise.
531 * regformats/i386/amd64-mpx-linux.dat: Likewise.
532 * regformats/i386/amd64.dat: Likewise.
533 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
534 * regformats/i386/i386-avx-linux.dat: Likewise.
535 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
536 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
537 * regformats/i386/i386-linux.dat: Likewise.
538 * regformats/i386/i386-mmx-linux.dat: Likewise.
539 * regformats/i386/i386-mpx-linux.dat: Likewise.
540 * regformats/i386/i386.dat: Likewise.
541 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
542 * regformats/i386/x32-avx-linux.dat: Likewise.
543 * regformats/i386/x32-linux.dat: Likewise.
544 * regformats/tic6x-c62x-linux.dat: Likewise.
545 * regformats/tic6x-c64x-linux.dat: Likewise.
546 * regformats/tic6x-c64xp-linux.dat: Likewise.
547 * regformats/regdat.sh: Parse feature marker.
549 2018-04-18 Alan Hayward <alan.hayward@arm.com>
551 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
552 (tdesc_osabi_name): Likewise.
553 * target-descriptions.c (tdesc_architecture_name): Add new
555 (tdesc_osabi_name): Likewise.
557 2018-04-18 Alan Hayward <alan.hayward@arm.com>
559 * common/tdesc.c (tdesc_predefined_type): Move to here.
560 (tdesc_named_type): Likewise.
561 (tdesc_create_vector): Likewise.
562 (tdesc_create_struct): Likewise.
563 (tdesc_set_struct_size): Likewise.
564 (tdesc_create_union): Likewise.
565 (tdesc_create_flags): Likewise.
566 (tdesc_create_enum): Likewise.
567 (tdesc_add_field): Likewise.
568 (tdesc_add_typed_bitfield): Likewise.
569 (tdesc_add_bitfield): Likewise.
570 (tdesc_add_flag): Likewise.
571 (tdesc_add_enum_value): Likewise.
572 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
573 (struct tdesc_type_vector): Likewise.
574 (struct tdesc_type_field): Likewise.
575 (struct tdesc_type_with_fields): Likewise.
576 (tdesc_create_enum): Add declaration.
577 (tdesc_add_typed_bitfield): Likewise.
578 (tdesc_add_enum_value): Likewise.
579 * target-descriptions.c (tdesc_type_field): Move from here.
580 (tdesc_type_builtin): Likewise.
581 (tdesc_type_vector): Likewise.
582 (tdesc_type_with_fields): Likewise.
583 (tdesc_predefined_types): Likewise.
584 (tdesc_named_type): Likewise.
585 (tdesc_create_vector): Likewise.
586 (tdesc_create_struct): Likewise.
587 (tdesc_set_struct_size): Likewise.
588 (tdesc_create_union): Likewise.
589 (tdesc_create_flags): Likewise.
590 (tdesc_create_enum): Likewise.
591 (tdesc_add_field): Likewise.
592 (tdesc_add_typed_bitfield): Likewise.
593 (tdesc_add_bitfield): Likewise.
594 (tdesc_add_flag): Likewise.
595 (tdesc_add_enum_value): Likewise.
596 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
597 (tdesc_add_typed_bitfield): Likewise.
598 (tdesc_add_enum_value): Likewise.
600 2018-04-18 Alan Hayward <alan.hayward@arm.com>
602 * common/tdesc.c (tdesc_feature::accept): Move to here.
603 (tdesc_feature::operator==): Likewise.
604 (tdesc_create_reg): Likewise.
605 * common/tdesc.h (tdesc_type_kind): Likewise.
606 (struct tdesc_type): Likewise.
607 (struct tdesc_feature): Likewise.
608 * regformats/regdat.sh: Create a feature.
609 * target-descriptions.c (tdesc_type_kind): Move from here.
610 (tdesc_type): Likewise.
611 (tdesc_type_up): Likewise.
612 (tdesc_feature): Likewise.
613 (tdesc_create_reg): Likewise.
615 2018-04-18 Alan Hayward <alan.hayward@arm.com>
617 * Makefile.in: Add arch/tdesc.c
618 * common/tdesc.c: New file.
619 * common/tdesc.h (tdesc_element_visitor): Move to here.
620 (tdesc_element): Likewise.
621 (tdesc_reg): Likewise.
622 (tdesc_reg_up): Likewise.
623 * regformats/regdef.h (reg): Add offset to constructors.
624 * target-descriptions.c (tdesc_element_visitor): Move from here.
625 (tdesc_element): Likewise.
626 (tdesc_reg): Likewise.
627 (tdesc_reg_up): Likewise.
629 2018-04-17 Tom Tromey <tom@tromey.com>
631 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
634 2018-04-17 Tom Tromey <tom@tromey.com>
636 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
638 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
640 * symtab.c (print_symbol_info): Skip printing filename and line
641 number when `last' is NULL.
642 (symtab_symbol_info): Use empty string instead of NULL for first
643 invocation of print_symbol_info.
644 (rbreak_command): Pass NULL to `last' parameter of
647 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
649 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
652 2018-04-16 Pedro Alves <palves@redhat.com>
654 * MAINTAINERS (sh): Remove.
655 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
656 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
657 (ALLDEPFILES): Remove sh64-tdep.c.
658 * NEWS: Mentions that support for SH-5/SH64 is removed.
659 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
660 (sh*-*-openbsd*): Ditto.
661 (sh64-*-elf*): Remove.
663 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
664 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
665 * sh-tdep.c: No longer include "sh64-tdep.h".
666 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
667 * sh64-tdep.c, sh64-tdep.h: Remove files.
669 2018-04-16 Pedro Alves <palves@redhat.com>
671 * MAINTAINERS: Remove m88k.
672 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
673 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
674 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
675 * NEWS: Mention that support for m88k was removed.
676 * configure.host (m88*-*-*): Remove support.
677 * configure.nat (m88k-*-*): Remove support.
678 * configure.tgt (m88*-*-openbsd*): Remove.
679 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
681 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
683 * configure.tgt (x86_tobjs): New variable.
684 (amd64_tobjs, i386_tobjs): Use it.
686 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
688 * symtab.c (print_symbol_info): Precede the symbol definition by
689 the line number when available.
690 * NEWS: Advertise this enhancement.
692 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
694 * NEWS (New options): announce set/show record btrace cpu.
695 * btrace.c: Include record-btrace.h.
696 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
697 the vendor is unknown.
698 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
699 Maybe overwrite the btrace configuration's cpu.
700 (btrace_compute_ftrace): Add cpu parameter. Update callers.
701 (btrace_fetch): Add cpu parameter. Update callers.
702 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
703 Maybe overwrite the btrace configuration's cpu. Skip enabling
704 errata workarounds if the vendor is unknown.
705 * python/py-record-btrace.c: Include record-btrace.h.
706 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
707 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
708 * record-btrace.c (record_btrace_cpu_state_kind): New.
709 (record_btrace_cpu): New.
710 (set_record_btrace_cpu_cmdlist): New.
711 (record_btrace_get_cpu): New.
712 (require_btrace_thread, record_btrace_info)
713 (record_btrace_resume_thread): Call record_btrace_get_cpu.
714 (cmd_set_record_btrace_cpu_none): New.
715 (cmd_set_record_btrace_cpu_auto): New.
716 (cmd_set_record_btrace_cpu): New.
717 (cmd_show_record_btrace_cpu): New.
718 (_initialize_record_btrace): Initialize set/show record btrace cpu
720 * record-btrace.h (record_btrace_get_cpu): New.
722 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
724 * record.c (set_record_command): Fix typo in message.
726 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
728 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
730 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
732 * infrun.c (process_event_stop_test): Call
733 gdbarch_in_indirect_branch_thunk.
734 * gdbarch.sh (in_indirect_branch_thunk): New.
735 * gdbarch.c: Regenerated.
736 * gdbarch.h: Regenerated.
739 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
740 (HFILES_NO_SRCDIR): Add x86-tdep.h.
741 (ALLDEPFILES): Add x86-tdep.c.
742 * arch-utils.h (default_in_indirect_branch_thunk): New.
743 * arch-utils.c (default_in_indirect_branch_thunk): New.
744 * i386-tdep: Include x86-tdep.h.
745 (i386_in_indirect_branch_thunk): New.
746 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
748 * amd64-tdep: Include x86-tdep.h.
749 (amd64_in_indirect_branch_thunk): New.
750 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
752 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
755 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
756 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
757 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
760 2018-04-12 Tom Tromey <tom@tromey.com>
762 * rust-lang.c (rust_print_struct_def): Remove univariant code.
763 (rust_evaluate_subexp): Likewise.
765 2018-04-12 Pedro Alves <palves@redhat.com>
767 * procfs.c (procfs_detach): Make forward declaration's prototype
768 match definition's protototype.
769 (proc_get_LDT_entry): Remove stale do_cleanups call.
771 2018-04-12 Pedro Alves <palves@redhat.com>
773 * target.h (target_ops::to_has_exited): Delete.
774 (target_has_exited): Delete.
775 * target-delegates.c: Regenerate.
777 2018-04-11 Pedro Alves <palves@redhat.com>
779 * target.c (fileio_fh_t::t): Add comment.
780 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
781 (target_fileio_close): Handle a NULL target.
782 (invalidate_fileio_fh): New.
783 (target_close): Call it.
784 * remote.c (remote_hostio_send_command): No longer check whether
787 2018-04-11 Pedro Alves <palves@redhat.com>
789 * target.c (fileio_fh_t): Make it a named struct instead of a
791 (fileio_fh_t::is_closed): New method.
792 (DEF_VEC_O (fileio_fh_t)): Remove.
793 (fileio_fhandles): Now a std::vector.
794 (is_closed_fileio_fh): Delete.
795 (acquire_fileio_fd): Adjust. Rename parameters.
796 (release_fileio_fd): Adjust.
797 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
798 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
799 (target_fileio_close): Adjust.
801 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
803 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
806 2018-04-10 Pedro Alves <palves@redhat.com>
808 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
809 (scoped_finish_thread_state): New class.
810 * infcmd.c (run_command_1): Use it instead of finish_thread_state
812 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
813 (fetch_inferior_event, normal_stop): Likewise.
814 * thread.c (finish_thread_state_cleanup): Delete.
816 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
817 Pedro Alves <palves@redhat.com>
819 * value.c: Include "selftest.h" and "common/array-view.h".
820 (struct range) <operator ==>: New.
821 (test_ranges_contain): New.
822 (check_ranges_vector): New.
823 (test_insert_into_bit_range_vector): New.
824 (_initialize_values): Register selftests.
825 * common/array-view.h (operator==, operator!=): New.
827 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
829 * common/gdb_vecs.h (unordered_remove): Add overload that takes
831 * inline-frame.c: Include <algorithm>.
832 (struct inline_state): Add constructor.
833 (inline_state_s): Remove.
834 (DEF_VEC_O(inline_state_s)): Remove.
835 (inline_states): Change type to std::vector.
836 (find_inline_frame_state): Adjust to std::vector.
837 (allocate_inline_frame_state): Remove.
838 (clear_inline_frame_state): Adjust to std::vector.
839 (skip_inline_frames): Adjust to std::vector.
841 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
843 * tracepoint.h (struct trace_state_variable): Add constructor.
844 <name>: Change type to std::string.
845 * tracepoint.c (tsv_s): Remove.
846 (DEF_VEC_O(tsv_s)): Remove.
847 (tvariables): Change to std::vector.
848 (create_trace_state_variable): Adjust to std::vector.
849 (find_trace_state_variable): Likewise.
850 (find_trace_state_variable_by_number): Likewise.
851 (delete_trace_state_variable): Likewise.
852 (trace_variable_command): Adjust to std::string.
853 (delete_trace_variable_command): Likewise.
854 (tvariables_info_1): Adjust to std::vector.
855 (save_trace_state_variables): Likewise.
856 (start_tracing): Likewise.
857 (merge_uploaded_trace_state_variables): Adjust to std::vector
859 * target.h (struct target_ops)
860 <to_download_trace_state_variable>: Pass reference to
861 trace_state_variable.
862 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
863 * target-delegates.c: Re-generate.
864 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
865 (mi_tsv_deleted): Likewise.
866 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
867 * remote.c (remote_download_trace_state_variable): Change
868 pointer to reference and adjust.
869 * make-target-delegates (parse_argtypes): Handle references.
870 (write_function_header): Likewise.
871 (munge_type): Likewise.
873 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
875 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
876 string_view-selftests.c.
877 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
879 * unittests/basic_string_view/cons/char/1.cc: Likewise.
880 * unittests/basic_string_view/cons/char/2.cc: Likewise.
881 * unittests/basic_string_view/cons/char/3.cc: Likewise.
882 * unittests/basic_string_view/element_access/char/1.cc:
884 * unittests/basic_string_view/element_access/char/empty.cc:
886 * unittests/basic_string_view/element_access/char/front_back.cc:
888 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
889 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
891 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
893 * unittests/basic_string_view/modifiers/swap/char/1.cc:
895 * unittests/basic_string_view/operations/compare/char/1.cc:
897 * unittests/basic_string_view/operations/compare/char/13650.cc:
899 * unittests/basic_string_view/operations/copy/char/1.cc:
901 * unittests/basic_string_view/operations/data/char/1.cc:
903 * unittests/basic_string_view/operations/find/char/1.cc:
905 * unittests/basic_string_view/operations/find/char/2.cc:
907 * unittests/basic_string_view/operations/find/char/3.cc:
909 * unittests/basic_string_view/operations/find/char/4.cc:
911 * unittests/basic_string_view/operations/rfind/char/1.cc:
913 * unittests/basic_string_view/operations/rfind/char/2.cc:
915 * unittests/basic_string_view/operations/rfind/char/3.cc:
917 * unittests/basic_string_view/operations/substr/char/1.cc:
919 * unittests/basic_string_view/operators/char/2.cc: Likewise.
920 * unittests/string_view-selftests.c: New file.
922 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
924 * unittests/basic_string_view/capacity/1.cc: New file.
925 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
926 * unittests/basic_string_view/cons/char/1.cc: New file.
927 * unittests/basic_string_view/cons/char/2.cc: New file.
928 * unittests/basic_string_view/cons/char/3.cc: New file.
929 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
930 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
931 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
932 * unittests/basic_string_view/element_access/char/1.cc: New file.
933 * unittests/basic_string_view/element_access/char/2.cc: New file.
934 * unittests/basic_string_view/element_access/char/empty.cc: New file.
935 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
936 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
937 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
938 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
939 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
940 * unittests/basic_string_view/include.cc: New file.
941 * unittests/basic_string_view/inserters/char/1.cc: New file.
942 * unittests/basic_string_view/inserters/char/2.cc: New file.
943 * unittests/basic_string_view/inserters/char/3.cc: New file.
944 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
945 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
946 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
947 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
948 * unittests/basic_string_view/literals/types.cc: New file.
949 * unittests/basic_string_view/literals/values.cc: New file.
950 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
951 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
952 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
953 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
954 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
955 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
956 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
957 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
958 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
959 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
960 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
961 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
962 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
963 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
964 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
965 * unittests/basic_string_view/operations/data/char/1.cc: New file.
966 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
967 * unittests/basic_string_view/operations/find/char/1.cc: New file.
968 * unittests/basic_string_view/operations/find/char/2.cc: New file.
969 * unittests/basic_string_view/operations/find/char/3.cc: New file.
970 * unittests/basic_string_view/operations/find/char/4.cc: New file.
971 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
972 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
973 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
974 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
975 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
976 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
977 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
978 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
979 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
980 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
981 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
982 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
983 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
984 * unittests/basic_string_view/operators/char/2.cc: New file.
985 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
986 * unittests/basic_string_view/range_access/char/1.cc: New file.
987 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
988 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
989 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
990 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
991 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
992 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
993 * unittests/basic_string_view/requirements/typedefs.cc: New file.
994 * unittests/basic_string_view/typedefs.cc: New file.
995 * unittests/basic_string_view/types/1.cc: New file.
997 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
999 * common/gdb_string_view.h: Remove libstdc++ implementation
1000 details, adjust to gdb reality.
1001 * common/gdb_string_view.tcc: Likewise.
1002 * cli/cli-script.c (struct string_view): Remove.
1003 (user_args) <m_args>: Change element type to gdb::string_view.
1004 (user_args::insert_args): Adjust.
1006 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1008 * common/gdb_string_view.h: New file.
1009 * common/gdb_string_view.tcc: New file.
1011 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1013 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
1014 * configure: Re-generate.
1016 2018-04-09 Pedro Alves <palves@redhat.com>
1018 * gdbarch.sh: Include "observable.h" instead of "observer.h".
1019 (set_target_gdbarch): Call
1020 gdb::observers::architecture_changed.notify instead of
1021 observer_notify_architecture_changed.
1023 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1025 * tracepoint.c (struct current_traceframe_cleanup): Remove.
1026 (do_restore_current_traceframe_cleanup): Remove.
1027 (restore_current_traceframe_cleanup_dtor): Remove.
1028 (make_cleanup_restore_current_traceframe): Remove.
1029 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
1031 * tracepoint.h (struct scoped_restore_current_traceframe): New.
1032 * infrun.c (fetch_inferior_event): Use
1033 scoped_restore_current_traceframe.
1035 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1037 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
1039 <n_allocated_type_units>: Remove.
1040 <all_type_units>: Change to std::vector.
1041 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
1042 to std::vector change.
1043 (dwarf2_per_objfile::get_cutu): Likewise.
1044 (dwarf2_per_objfile::get_tu): Likewise.
1045 (create_signatured_type_table_from_index): Likewise.
1046 (create_signatured_type_table_from_debug_names): Likewise.
1047 (dw2_symtab_iter_next): Likewise.
1048 (dw2_print_stats): Likewise.
1049 (dw2_expand_all_symtabs): Likewise.
1050 (dw2_expand_marked_cus): Likewise.
1051 (dw2_debug_names_iterator::next): Likewise.
1052 (dwarf2_initialize_objfile): Likewise.
1053 (add_signatured_type_cu_to_table): Likewise.
1054 (create_all_type_units): Likewise.
1055 (add_type_unit): Likewise.
1056 (struct tu_abbrev_offset): Add constructor.
1057 (build_type_psymtabs_1): Adjust to std::vector change.
1058 (print_tu_stats): Likewise.
1059 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
1060 (write_debug_names): Likewise.
1062 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1064 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
1065 Make an std::vector.
1066 <n_comp_units>: Remove.
1067 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
1068 to std::vector change.
1069 (dwarf2_per_objfile::get_cutu): Likewise.
1070 (dwarf2_per_objfile::get_cu): Likewise.
1071 (create_cus_from_index): Likewise.
1072 (create_addrmap_from_index): Likewise.
1073 (create_addrmap_from_aranges): Likewise.
1074 (dwarf2_read_index): Likewise.
1075 (dw2_find_last_source_symtab): Likewise.
1076 (dw2_map_symtabs_matching_filename): Likewise.
1077 (dw2_symtab_iter_next): Likewise.
1078 (dw2_print_stats): Likewise.
1079 (dw2_expand_all_symtabs): Likewise.
1080 (dw2_expand_symtabs_with_fullname): Likewise.
1081 (dw2_expand_marked_cus): Likewise.
1082 (dw2_map_symbol_filenames): Likewise.
1083 (create_cus_from_debug_names): Likewise.
1084 (dwarf2_read_debug_names): Likewise.
1085 (dw2_debug_names_iterator::next): Likewise.
1086 (dwarf2_initialize_objfile): Likewise.
1087 (set_partial_user): Likewise.
1088 (dwarf2_build_psymtabs_hard): Likewise.
1089 (read_comp_units_from_section): Remove arguments, adjust to
1091 (create_all_comp_units): Adjust to std::vector and
1092 read_comp_units_from_section changes.
1093 (dwarf2_find_containing_comp_unit): Adjust to std::vector
1095 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
1096 (psyms_seen_size): Likewise.
1097 (write_gdbindex): Likewise.
1098 (write_debug_names): Likewise.
1100 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1102 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
1103 with dwarf2_per_objfile.
1104 (create_cus_from_index): Likewise.
1105 (create_signatured_type_table_from_index): Likewise.
1106 (dwarf2_read_index): Likewise.
1107 (dwarf2_initialize_objfile): Likewise.
1108 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
1109 per_cu rather than get_dwarf2_per_objfile.
1111 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1113 * dwarf2read.h (struct signatured_type): Forward declare.
1114 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
1116 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
1117 (dw2_get_cutu): ...this.
1118 (dwarf2_per_objfile::get_cu): Rename from...
1119 (dw2_get_cu): ...this.
1120 (dwarf2_per_objfile::get_tu): New.
1121 (create_addrmap_from_index): Adjust.
1122 (create_addrmap_from_aranges): Adjust.
1123 (dw2_find_last_source_symtab): Adjust.
1124 (dw2_map_symtabs_matching_filename): Adjust.
1125 (dw2_symtab_iter_next): Adjust.
1126 (dw2_print_stats): Adjust.
1127 (dw2_expand_all_symtabs): Adjust.
1128 (dw2_expand_symtabs_with_fullname): Adjust.
1129 (dw2_expand_marked_cus): Adjust.
1130 (dw_expand_symtabs_matching_file_matcher): Adjust.
1131 (dw2_map_symbol_filenames): Adjust.
1132 (dw2_debug_names_iterator::next): Adjust.
1133 (dwarf2_initialize_objfile): Adjust.
1134 (set_partial_user): Adjust.
1135 (dwarf2_build_psymtabs_hard): Adjust.
1137 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1139 * dwarf2read.c (create_signatured_type_table_from_debug_names):
1140 Remove unused variables.
1141 (dw2_map_symtabs_matching_filename): Likewise.
1142 (dwarf2_record_block_ranges): Likewise.
1143 (dwarf2_read_addr_index): Likewise.
1144 (follow_die_offset): Likewise.
1146 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1148 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
1149 to symbol_file_add_main.
1151 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1154 * mi/mi-console.c (do_fputc_async_safe): New.
1155 (mi_console_file::write_async_safe): New.
1156 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
1157 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
1159 * ui-file.c (ui_file::putstrn): Adjust call to
1160 fputstrn_unfiltered.
1161 * utils.c (printchar): Replace do_fputs and do_fprintf
1162 parameters by do_fputc.
1163 (fputstr_filtered): Adjust call to printchar.
1164 (fputstr_unfiltered): Likewise.
1165 (fputstrn_filtered): Likewise.
1166 (fputstrn_unfiltered): Add do_fputc parameter, pass to
1168 * utils.h (do_fputc_ftype): New typedef.
1169 (fputstrn_unfiltered): Add do_fputc parameter.
1171 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1173 * regformats/i386/i386-avx.dat: Remove.
1175 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
1178 * amd64-tdep.c (amd64_none_init_abi): New function.
1179 (amd64_x32_none_init_abi): New function.
1180 (_initialize_amd64_tdep): Register handlers for x86-64 and
1181 x64_32 with GDB_OSABI_NONE.
1182 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
1183 GDB_OSABI_NONE osabi.
1185 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
1188 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
1190 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
1191 * osabi.c (gdb_osabi_names): Add "unknown" entry.
1193 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
1195 * common/byte-vector.h (char_vector): New type.
1196 * target.h (target_read_alloc): Return
1197 gdb::optional<byte_vector>.
1198 (target_read_stralloc): Return gdb::optional<char_vector>.
1199 (target_get_osdata): Return gdb::optional<char_vector>.
1200 * target.c (target_read_alloc_1): Templatize. Replacement
1201 manual memory management with vector.
1202 (target_read_alloc): Change return type, adjust.
1203 (target_read_stralloc): Change return type, adjust.
1204 (target_get_osdata): Change return type, adjust.
1205 * auxv.c (struct auxv_info) <length>: Remove.
1206 <data>: Change type to gdb::optional<byte_vector>.
1207 (auxv_inferior_data_cleanup): Free auxv_info with delete.
1208 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
1209 (target_auxv_search): Adjust.
1210 (fprint_target_auxv): Adjust.
1211 * avr-tdep.c (avr_io_reg_read_command): Adjust.
1212 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
1213 (linux_make_corefile_notes): Adjust.
1214 * osdata.c (get_osdata): Adjust.
1215 * remote.c (remote_get_threads_with_qxfer): Adjust.
1216 (remote_memory_map): Adjust.
1217 (remote_traceframe_info): Adjust.
1218 (btrace_read_config): Adjust.
1219 (remote_read_btrace): Adjust.
1220 (remote_pid_to_exec_file): Adjust.
1221 * solib-aix.c (solib_aix_get_library_list): Adjust.
1222 * solib-dsbt.c (decode_loadmap): Don't free buf.
1223 (dsbt_get_initial_loadmaps): Adjust.
1224 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
1225 * solib-target.c (solib_target_current_sos): Adjust.
1226 * tracepoint.c (sdata_make_value): Adjust.
1227 * xml-support.c (xinclude_start_include): Adjust.
1228 (xml_fetch_content_from_file): Adjust.
1229 * xml-support.h (xml_fetch_another): Change return type.
1230 (xml_fetch_content_from_file): Change return type.
1231 * xml-syscall.c (xml_init_syscalls_info): Adjust.
1232 * xml-tdesc.c (file_read_description_xml): Adjust.
1233 (fetch_available_features_from_target): Change return type.
1234 (target_fetch_description_xml): Adjust.
1235 (target_read_description_xml): Adjust.
1237 2018-04-06 Tom Tromey <tom@tromey.com>
1239 * value.c (~value): Update.
1240 (struct value) <contents>: Now unique_xmalloc_ptr.
1241 (value_contents_bits_eq, allocate_value_contents)
1242 (value_contents_raw, value_contents_all_raw)
1243 (value_contents_for_printing, value_contents_for_printing_const)
1244 (set_value_enclosing_type): Update.
1246 2018-04-06 Tom Tromey <tom@tromey.com>
1248 * value.c (range_s): Remove typedef, VEC.
1249 (struct range): Add operator<.
1250 (range_lessthan): Remove.
1251 (ranges_contain): Change type.
1253 (struct value) <unavailable, optimized_out>: Now std::vector.
1254 (value_entirely_available)
1255 (value_entirely_covered_by_range_vector)
1256 (value_entirely_unavailable, value_entirely_optimized_out):
1258 (insert_into_bit_range_vector): Change argument type.
1259 (find_first_range_overlap): Likewise.
1260 (struct ranges_and_idx, value_contents_bits_eq)
1261 (require_not_optimized_out, require_available): Update.
1262 (ranges_copy_adjusted): Change argument types.
1263 (value_optimized_out, value_copy, value_fetch_lazy): Update.
1265 2018-04-06 Tom Tromey <tom@tromey.com>
1267 * value.c (~value): Update.
1268 (struct value) <parent>: Now a value_ref_ptr.
1269 (value_parent, set_value_parent, value_address, value_copy):
1272 2018-04-06 Tom Tromey <tom@tromey.com>
1274 * value.c (struct value): Add constructor, destructor, and member
1276 (allocate_value_lazy, value_decref): Update.
1278 2018-04-06 Tom Tromey <tom@tromey.com>
1280 * value.c (struct value) <released, next>: Remove.
1281 (all_values): Now a std::vector.
1282 (allocate_value_lazy): Update.
1283 (value_next): Remove.
1284 (value_mark, value_free_to_mark, release_value)
1285 (value_release_to_mark): Update.
1287 2018-04-06 Tom Tromey <tom@tromey.com>
1289 * value.h (fetch_subexp_value, value_release_to_mark): Update.
1290 (free_value_chain): Remove.
1291 * value.c (free_value_chain): Remove.
1292 (value_release_to_mark): Return a std::vector.
1293 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
1295 (check_condition): Update.
1296 * eval.c (fetch_subexp_value): Change "val_chain" to a
1298 * breakpoint.c (update_watchpoint): Update.
1299 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
1301 2018-04-06 Tom Tromey <tom@tromey.com>
1303 * value.h (free_all_values): Remove.
1304 * value.c (free_all_values): Remove.
1306 2018-04-06 Tom Tromey <tom@tromey.com>
1308 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
1309 (value_history_chain, value_history_count): Remove.
1310 (value_history): New global.
1311 (record_latest_value, access_value_history, show_values)
1312 (preserve_values): Update.
1314 2018-04-06 Tom Tromey <tom@tromey.com>
1316 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
1317 * varobj.c (varobj_set_display_format, varobj_set_value)
1318 (install_default_visualizer, construct_visualizer)
1319 (install_new_value, ~varobj, varobj_get_value_type)
1320 (my_value_of_variable, varobj_editable_p): Update.
1321 * c-varobj.c (c_describe_child, c_value_of_variable)
1322 (cplus_number_of_children, cplus_describe_child): Update.
1323 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
1324 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
1325 (ada_value_of_variable, ada_value_is_changeable_p): Update.
1327 2018-04-06 Tom Tromey <tom@tromey.com>
1329 * printcmd.c (last_examine_address): Change type to
1331 (do_examine, x_command): Update.
1333 2018-04-06 Tom Tromey <tom@tromey.com>
1335 * value.c (release_value): Update.
1336 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
1337 (struct bpstats) <val>: Now a value_ref_ptr.
1338 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
1339 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
1340 (~watchpoint, print_it_watchpoint, watch_command_1)
1341 (invalidate_bp_value_on_memory_change): Update.
1343 2018-04-06 Tom Tromey <tom@tromey.com>
1345 * varobj.c (varobj_clear_saved_item)
1346 (update_dynamic_varobj_children, install_new_value, ~varobj):
1348 * value.h (value_incref): Move declaration earlier.
1349 (value_decref): Rename from value_free.
1350 (struct value_ref_policy): New.
1351 (value_ref_ptr): New typedef.
1352 (struct value_deleter): Remove.
1353 (gdb_value_up): Remove typedef.
1354 (release_value): Change return type.
1355 (release_value_or_incref): Remove.
1356 * value.c (set_value_parent): Update.
1357 (value_incref): Change return type.
1358 (value_decref): Rename from value_free.
1359 (value_free_to_mark, free_all_values, free_value_chain): Update.
1360 (release_value): Return value_ref_ptr.
1361 (release_value_or_incref): Remove.
1362 (record_latest_value, set_internalvar, clear_internalvar):
1364 * stack.c (info_frame_command): Don't call value_free.
1365 * python/py-value.c (valpy_dealloc, valpy_new)
1366 (value_to_value_object): Update.
1367 * printcmd.c (do_examine): Update.
1368 * opencl-lang.c (lval_func_free_closure): Update.
1369 * mi/mi-main.c (register_changed_p): Don't call value_free.
1370 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
1371 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
1372 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
1374 * guile/scm-value.c (vlscm_free_value_smob)
1375 (vlscm_scm_from_value): Update.
1376 * frame.c (frame_register_unwind, frame_unwind_register_signed)
1377 (frame_unwind_register_unsigned, get_frame_register_bytes)
1378 (put_frame_register_bytes): Don't call value_free.
1379 * findvar.c (address_from_register): Don't call value_free.
1380 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
1381 * dwarf2loc.c (entry_data_value_free_closure)
1382 (value_of_dwarf_reg_entry, free_pieced_value_closure)
1383 (dwarf2_evaluate_loc_desc_full): Update.
1384 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
1385 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
1386 (~watchpoint, watch_command_1)
1387 (invalidate_bp_value_on_memory_change): Update.
1388 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
1390 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
1393 * warning.m4: Add -Wno-error=deprecated-register.
1394 * configure: Re-generate.
1396 2018-04-05 Tom Tromey <tom@tromey.com>
1398 * linespec.h: Remove include of "vec.h".
1400 2018-04-05 Tom Tromey <tom@tromey.com>
1402 * linespec.c (typep): Remove typedef.
1403 (find_methods, find_superclass_methods): Take a std::vector.
1404 (find_method): Use std::vector.
1406 2018-04-05 Tom Tromey <tom@tromey.com>
1408 * utils.c (compare_strings): Remove.
1409 * utils.h (compare_strings): Remove.
1410 * objc-lang.h (find_imps): Update.
1411 * objc-lang.c (find_methods): Take a std::vector.
1412 (uniquify_strings, find_imps): Likewise.
1413 * linespec.c (find_methods): Take a std::vector.
1414 (decode_objc): Use std::vector.
1415 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
1417 (find_method, find_function_symbols): Use std::vector.
1419 2018-04-05 Tom Tromey <tom@tromey.com>
1421 * completer.c (completion_tracker::completion_tracker): Remove
1423 (completion_tracker::discard_completions): Likewise.
1424 * breakpoint.c (ambiguous_names_p): Remove cast.
1425 * ada-lang.c (_initialize_ada_language): Remove cast.
1426 * utils.h (streq): Update.
1427 (streq_hash): Add new declaration.
1428 * utils.c (streq): Return bool.
1429 (streq_hash): New function.
1431 2018-04-05 Tom Tromey <tom@tromey.com>
1433 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
1434 Remove a string copy.
1436 2018-04-05 Tom Tromey <tom@tromey.com>
1438 * linespec.c (filter_results): Use std::vector.
1439 (decode_line_2, decode_line_full): Update.
1441 2018-04-05 Tom Tromey <tom@tromey.com>
1443 * linespec.c (canonical_to_fullform): Return std::string.
1444 (filter_results): Update.
1445 (struct decode_line_2_item): Add constructor.
1446 <fullform, displayform>: Now std::string.
1447 (decode_line_2_compare_items): Now a std::sort comparator.
1448 (decode_line_2): Update.
1450 2018-04-05 Tom Tromey <tom@tromey.com>
1452 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
1453 (unexpected_linespec_error): Update.
1454 (linespec_parse_basic, parse_linespec): Update.
1456 2018-04-05 Tom Tromey <tom@tromey.com>
1458 * linespec.c (linespec_parse_basic): Reindent.
1460 2018-04-05 Tom Tromey <tom@tromey.com>
1462 * minsyms.h (iterate_over_minimal_symbols): Update.
1463 * minsyms.c (iterate_over_minimal_symbols): Take a
1465 * linespec.c (struct collect_minsyms): Remove.
1466 (compare_msyms): Now a std::sort comparator.
1467 (add_minsym): Add parameters.
1468 (search_minsyms_for_name): Update. Use std::vector.
1470 2018-04-03 Tom Tromey <tom@tromey.com>
1472 * mipsread.c (read_alphacoff_dynamic_symtab): Use
1475 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
1477 * MAINTAINERS (Write After Approval): Add Weimin Pan.
1479 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
1482 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
1483 printing static type.
1485 2018-04-01 Tom Tromey <tom@tromey.com>
1487 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
1488 (rs6000_xfer_shared_libraries): Update.
1490 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
1492 * common/gdb_vecs.h (char_ptr): Remove.
1493 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
1495 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1497 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
1499 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
1501 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1503 * tracepoint.h (struct uploaded_tp): Initialize fields.
1504 <actions, step_actions, cmd_strings>: Change type to
1505 std::vector<char *>.
1506 * tracepoint.c (get_uploaded_tp): Allocate with new.
1507 (free_uploaded_tps): Free with delete.
1508 (parse_tracepoint_definition): Adjust to std::vector change.
1509 * breakpoint.c (read_uploaded_action): Likewise.
1510 (create_tracepoint_from_upload): Likewise.
1511 * ctf.c (ctf_write_uploaded_tp): Likewise.
1512 (SET_ARRAY_FIELD): Likewise.
1513 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
1515 2018-03-30 Tom Tromey <tom@tromey.com>
1517 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
1519 (svr4_keep_data_in_core): Update.
1520 (svr4_read_so_list): Update.
1522 2018-03-30 Tom Tromey <tom@tromey.com>
1524 * windows-nat.c (handle_output_debug_string, handle_exception):
1526 * target.h (target_read_string): Update.
1527 * target.c (target_read_string): Change "string" to
1529 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
1531 * solib-frv.c (frv_current_sos): Update.
1532 * solib-dsbt.c (dsbt_current_sos): Update.
1533 * solib-darwin.c (darwin_current_sos): Update.
1534 * linux-thread-db.c (inferior_has_bug): Update.
1535 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
1536 Update. Remove alloca.
1537 * ada-lang.c (ada_main_name): Update.
1539 2018-03-30 Tom Tromey <tom@tromey.com>
1541 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
1542 (struct dwo_file_deleter): New.
1543 (dwo_file_up): New typedef.
1544 (open_and_init_dwo_file): Use dwo_file_up.
1545 (free_dwo_file_cleanup): Remove.
1547 2018-03-30 Tom Tromey <tom@tromey.com>
1549 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
1550 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
1552 2018-03-30 Tom Tromey <tom@tromey.com>
1554 * dwarf2read.c (class free_cached_comp_units): New class.
1555 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
1556 (free_cached_comp_units): Remove function.
1558 2018-03-30 Tom Tromey <tom@tromey.com>
1560 * utils.h (make_cleanup_unpush_target): Remove.
1561 * inf-ptrace.c (struct target_unpusher): New.
1562 (target_unpush_up) New typedef.
1563 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
1565 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
1567 2018-03-27 Tom Tromey <tom@tromey.com>
1569 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
1571 2018-03-27 Pedro Alves <palves@redhat.com>
1572 Tom Tromey <tom@tromey.com>
1574 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
1575 destructor. Now a class.
1576 (gdb_readline_wrapper_cleanup): Remove function.
1577 (gdb_readline_wrapper): Remove cleanups.
1579 2018-03-27 Tom Tromey <tom@tromey.com>
1581 * typeprint.h (struct type_print_options) <local_typedefs,
1582 global_typedefs>: Remove "struct" keyword.
1583 (class typedef_hash_table): New class.
1584 (recursively_update_typedef_hash, add_template_parameters)
1585 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
1586 (find_typedef_in_hash): Don't declare.
1587 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
1588 (typedef_hash_table::recursively_update): Rename from
1589 recursively_update_typedef_hash. Now a member.
1590 (typedef_hash_table::add_template_parameters): Rename from
1591 add_template_parameters. Now a member.
1592 (typedef_hash_table::typedef_hash_table): Now a constructor;
1593 rename from create_typedef_hash.
1594 (typedef_hash_table::~typedef_hash_table): Now a destructor;
1595 rename from free_typedef_hash.
1596 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
1597 (do_free_global_table): Remove.
1598 (typedef_hash_table::typedef_hash_table): New constructor; renamed
1599 from copy_type_recursive.
1600 (create_global_typedef_table): Remove.
1601 (typedef_hash_table::find_global_typedef): Now a member of
1603 (typedef_hash_table::find_typedef): Rename from
1604 find_typedef_in_hash; now a member.
1605 (whatis_exp): Update.
1606 * extension.h (struct ext_lang_type_printers): Add constructor and
1608 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
1610 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
1611 Now a constructor; rename from start_ext_lang_type_printers.
1612 (ext_lang_type_printers): Now a destructor; rename from
1613 free_ext_lang_type_printers.
1614 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
1616 (c_type_print_base_struct_union): Update. Remove cleanups.
1618 2018-03-27 Tom Tromey <tom@tromey.com>
1620 * dwarf-index-write.c: Include <cmath>.
1622 2018-03-27 Joel Brobecker <brobecker@adacore.com>
1624 * NEWS: Add entry describing new "set|show varsize-limit" command.
1625 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
1627 * printcmd.c (_initialize_printcmd): Add "set var" alias of
1630 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
1632 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
1634 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
1635 * dwarf-index-common.c: New file.
1636 * dwarf-index-common.h: New file.
1637 * dwarf-index-write.c: New file.
1638 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
1639 (struct dwarf2_section_info): Move from here.
1640 (dwarf2_section_info_def): Likewise.
1641 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
1642 (offset_type): Likewise.
1643 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
1644 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
1645 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
1646 (byte_swap): Likewise.
1647 (MAYBE_SWAP): Likewise.
1648 (dwarf2_per_cu_ptr): Likewise.
1649 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
1650 (struct tu_stats): Likewise.
1651 (struct dwarf2_per_objfile): Likewise.
1652 (struct dwarf2_per_cu_data): Likewise.
1653 (struct signatured_type): Likewise.
1654 (sig_type_ptr): Likewise.
1655 (DEF_VEC_P (sig_type_ptr)): Likewise.
1656 (INDEX4_SUFFIX): Likewise.
1657 (INDEX5_SUFFIX): Likewise.
1658 (DEBUG_STR_SUFFIX): Likewise.
1659 (dwarf2_read_section): Make non-static.
1660 (mapped_index_string_hash): Move from here.
1661 (dwarf5_djb_hash): Likewise.
1662 (file_write): Likewise.
1663 (class data_buf): Likewise.
1664 (struct symtab_index_entry): Likewise.
1665 (struct mapped_symtab): Likewise.
1666 (find_slot): Likewise.
1667 (hash_expand): Likewise.
1668 (add_index_entry): Likewise.
1669 (uniquify_cu_indices): Likewise.
1670 (class c_str_view): Likewise.
1671 (class c_str_view_hasher): Likewise.
1672 (class vector_hasher): Likewise.
1673 (write_hash_table): Likewise.
1674 (psym_index_map): Likewise.
1675 (struct addrmap_index_data): Likewise.
1676 (add_address_entry): Likewise.
1677 (add_address_entry_worker): Likewise.
1678 (write_address_map): Likewise.
1679 (symbol_kind): Likewise.
1680 (write_psymbols): Likewise.
1681 (struct signatured_type_index_data): Likewise.
1682 (write_one_signatured_type): Likewise.
1683 (recursively_count_psymbols): Likewise.
1684 (recursively_write_psymbols): Likewise.
1685 (class debug_names): Likewise.
1686 (check_dwarf64_offsets): Likewise.
1687 (psyms_seen_size): Likewise.
1688 (write_gdbindex): Likewise.
1689 (write_debug_names): Likewise.
1690 (assert_file_size): Likewise.
1691 (write_psymtabs_to_index): Likewise.
1692 (save_gdb_index_command): Likewise.
1693 (_initialize_dwarf2_read): Don't register the "save gdb-index"
1695 * dwarf2read.h: New file.
1697 2018-03-27 Joel Brobecker <brobecker@adacore.com>
1700 * dwarf2read.c (dwarf2_physname): Do not return the demangled
1701 symbol name if the CU's language stores symbol names in linkage
1703 * language.h (struct language_defn)
1704 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
1705 all instances of this struct.
1707 2018-03-26 Tom Tromey <tom@tromey.com>
1709 * stack.c (backtrace_command_1): Remove verbose code.
1711 2018-03-26 Tom Tromey <tom@tromey.com>
1713 * python/py-framefilter.c (py_print_type): Don't catch
1714 exceptions. Return void.
1715 (py_print_value): Likewise.
1716 (py_print_single_arg): Likewise.
1717 (enumerate_args): Don't catch exceptions.
1718 (py_print_args): Likewise.
1719 (py_print_frame): Likewise.
1720 (gdbpy_apply_frame_filter): Catch exceptions here.
1722 2018-03-26 Tom Tromey <tom@tromey.com>
1724 * stack.c (_initialize_stack): Remove trailing newlines from help
1725 text. Add "Usage" line to "backtrace" help.
1727 2018-03-26 Tom Tromey <tom@tromey.com>
1730 * python/py-framefilter.c (py_print_args): Call wrap_hint.
1732 2018-03-26 Tom Tromey <tom@tromey.com>
1734 * python/py-framefilter.c (py_print_single_arg): Return
1735 EXT_LANG_BT_ERROR from catch.
1737 2018-03-26 Tom Tromey <tom@tromey.com>
1740 * stack.c (backtrace_command_1): Move some code into no-filters
1743 2018-03-26 Tom Tromey <tom@tromey.com>
1745 * python/py-framefilter.c (throw_quit_or_print_exception): New
1747 (gdbpy_apply_frame_filter): Use it.
1749 2018-03-26 Tom Tromey <tom@tromey.com>
1752 * python/py-framefilter.c (py_print_type, py_print_value)
1753 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
1756 2018-03-26 Tom Tromey <tom@tromey.com>
1758 * python/py-framefilter.c (enumerate_args): Use
1759 gdb::unique_xmalloc_ptr.
1761 2018-03-26 Tom Tromey <tom@tromey.com>
1763 * python/py-framefilter.c (py_print_frame): Return
1765 (gdbpy_apply_frame_filter): Update comment.
1766 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
1768 <EXT_LANG_BT_NO_FILTERS>: Change value.
1770 2018-03-26 Tom Tromey <tom@tromey.com>
1773 * stack.c (backtrace_command): Parse "hide" argument.
1774 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
1775 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
1778 2018-03-26 Tom Tromey <tom@tromey.com>
1780 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
1782 (backtrace_command): Remove "fulltrace", add "flags".
1784 2018-03-26 Tom Tromey <tom@tromey.com>
1786 * stack.c (backtrace_command): Rewrite command line parsing.
1788 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1790 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
1792 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1794 * filename-seen-cache.h: Add include guard.
1796 2018-03-26 Keith Seitz <keiths@redhat.com>
1798 * symfile.c (place_section): Remove "struct" from section_addr_info
1800 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
1801 "struct" keyword from section_addr_info.
1803 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1805 * regformats/regdef.h (reg): Add constructors.
1807 2018-03-25 Pedro Alves <palves@redhat.com>
1809 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
1810 if then/else bodies in var_func_name extraction.
1812 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
1814 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
1815 lookup_minimal_symbol() to find symbol entry.
1816 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
1818 2018-03-23 Keith Seitz <keiths@redhat.com>
1821 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
1822 nested type definitions for C++, too.
1824 2018-03-23 Tom Tromey <tom@tromey.com>
1826 * machoread.c (struct oso_el): Add a constructor. Don't define as
1828 (macho_register_oso): Remove.
1829 (macho_symtab_read): Take a std::vector.
1830 (oso_el_compare_name): Now a std::sort comparator.
1831 (macho_symfile_read_all_oso): Take a std::vector.
1832 (macho_symfile_read): Use std::vector. Remove cleanups.
1834 2018-03-22 Tom Tromey <tom@tromey.com>
1836 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
1837 (record_full_goto_bookmark): Use std::string.
1839 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1842 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
1845 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1847 * rs6000-tdep.c (store_insn_p): New function.
1848 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
1849 and cr_reg to their unshifted values. Use store_insn_p to
1850 match LR saves using either R1 or fdata->alloca_reg. Use
1851 store_insn_p to match CR saves. Set alloca_reg_offset
1852 when alloca_reg and framep are set. Remove lr_reg shift
1853 when assigning to fdata->lr_register.
1855 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1857 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
1858 command line args instead of emitting a warning.
1860 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1862 * tracepoint.h (struct static_tracepoint_marker): Initialize
1863 fields, define default constructor, move constructor and move
1864 assignment, disable the rest.
1865 <str_id, extra>: Make std::string.
1866 (release_static_tracepoint_marker): Remove.
1867 (free_current_marker): Remove.
1868 * tracepoint.c (free_current_marker): Remove.
1869 (parse_static_tracepoint_marker_definition): Adjust to
1870 std::string, use new hex2str overload.
1871 (release_static_tracepoint_marker): Remove.
1872 (print_one_static_tracepoint_marker): Get marker by reference
1873 and adjust to std::string.
1874 (info_static_tracepoint_markers_command): Adjust to std::vector
1876 * target.h (static_tracepoint_marker_p): Remove typedef.
1877 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
1878 (struct target_ops) <to_static_tracepoint_marker_at>: Return
1880 <to_static_tracepoint_markers_by_strid>: Return std::vector.
1882 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
1883 (target_debug_print_std_vector_static_tracepoint_marker): New.
1884 (target_debug_print_struct_static_tracepoint_marker_p): Rename
1886 (target_debug_print_static_tracepoint_marker_p): ... this.
1887 * target-delegates.c: Re-generate.
1888 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
1890 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
1891 (decode_static_tracepoint_spec): Adjust to std::vector.
1892 (tracepoint_print_one_detail): Adjust to std::string.
1893 (strace_marker_decode_location): Adjust to std::string.
1894 (update_static_tracepoint): Adjust to std::string, remove call
1895 to release_static_tracepoint_marker.
1896 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1897 Adjust to std::vector.
1898 * remote.c (remote_static_tracepoint_marker_at): Return bool.
1899 (remote_static_tracepoint_markers_by_strid): Adjust to
1901 * common/rsp-low.h (hex2str): New overload with explicit count
1903 * common/rsp-low.c (hex2str): New overload with explicit count
1905 * unittests/rsp-low-selftests.c (test_hex2str): New function.
1906 (_initialize_rsp_low_selftests): Add test_hex2str test.
1907 * unittests/tracepoint-selftests.c
1908 (test_parse_static_tracepoint_marker_definition): Adjust to
1911 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1913 * tracepoint.c (parse_static_tracepoint_marker_definition):
1914 Consider case where the definition is followed by more
1916 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1917 tracepoint-selftests.c.
1918 * unittests/tracepoint-selftests.c: New.
1920 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1922 * MAINTAINERS (Write After Approval): Add Pedro Franco de
1925 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1927 * symtab.c (find_pc_sect_line): fixed indentation.
1929 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1931 * symtab.c (find_pc_sect_line): now uses binary search.
1933 2018-03-19 Tom Tromey <tom@tromey.com>
1935 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
1938 2018-03-19 Pedro Alves <palves@redhat.com>
1939 Tom Tromey <tom@tromey.com>
1941 * unittests/observable-selftests.c: New file.
1942 * common/observable.h: New file.
1943 * observable.h: New file.
1944 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
1945 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
1946 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
1947 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
1948 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
1949 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
1950 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
1951 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
1952 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
1953 python/py-breakpoint.c, python/py-finishbreakpoint.c,
1954 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
1955 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
1956 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
1957 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
1958 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
1959 tui/tui-interp.c, valops.c: Update all users.
1960 * tui/tui-hooks.c (tui_bp_created_observer)
1961 (tui_bp_deleted_observer, tui_bp_modified_observer)
1962 (tui_inferior_exit_observer, tui_before_prompt_observer)
1963 (tui_normal_stop_observer, tui_register_changed_observer):
1965 (tui_observers_token): New global.
1966 (attach_or_detach, tui_attach_detach_observers): New functions.
1967 (tui_install_hooks, tui_remove_hooks): Use
1968 tui_attach_detach_observers.
1969 * record-btrace.c (record_btrace_thread_observer): Remove.
1970 (record_btrace_thread_observer_token): New global.
1971 * observer.sh: Remove.
1972 * observer.c: Rename to observable.c.
1973 * observable.c (namespace gdb_observers): Define new objects.
1974 (observer_debug): Move into gdb_observers namespace.
1975 (struct observer, struct observer_list, xalloc_observer_list_node)
1976 (xfree_observer_list_node, generic_observer_attach)
1977 (generic_observer_detach, generic_observer_notify): Remove.
1978 (_initialize_observer): Update.
1979 Don't include observer.inc.
1980 * Makefile.in (generated_files): Remove observer.h, observer.inc.
1981 (clean mostlyclean): Likewise.
1982 (observer.h, observer.inc): Remove targets.
1983 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
1984 (COMMON_SFILES): Use observable.c, not observer.c.
1985 * .gitignore: Remove observer.h.
1987 2018-03-18 Tom Tromey <tom@tromey.com>
1989 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
1991 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
1993 2018-03-17 Tom Tromey <tom@tromey.com>
1995 * auto-load.c (auto_load_objfile_script_1): Use std::string.
1997 2018-03-17 Tom Tromey <tom@tromey.com>
1999 * target.c (class scoped_target_fd): New.
2000 (target_fileio_close_cleanup): Remove.
2001 (target_fileio_read_alloc_1): Use scoped_target_fd.
2003 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2005 * silent-rules.mk: New.
2006 * Makefile.in: Include silent-rules.mk
2007 (srcdir, VPATH, top_srcdir): Move up.
2008 (COMPILE): Add ECHO_CXX.
2009 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
2010 (init.c): Add ECHO_INIT_C.
2011 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2012 (version.c): Add ECHO_GEN.
2013 (printcmd.o): Add ECHO_CXX.
2014 (target-float.o): Add ECHO_CXX.
2015 (ada-exp.o): Add ECHO_CXX.
2016 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
2017 (insight$(EXEEXT)): Add ECHO_CXXLD.
2018 * gnulib/configure.ac: Add AM_SILENT_RULES.
2019 * gnulib/aclocal.m4: Re-generate.
2020 * gnulib/configure: Re-generate.
2021 * gnulib/import/Makefile.in: Re-generate.
2023 2018-03-16 Tom Tromey <tom@tromey.com>
2025 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
2026 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
2027 * utils.c (do_free_section_addr_info)
2028 (make_cleanup_free_section_addr_info): Remove.
2029 * symfile.h (struct other_sections): Add constructor.
2030 (struct section_addr_info): Remove.
2031 (section_addr_info): New typedef.
2032 (struct sym_fns) <sym_offsets>: Change type of parameter.
2033 (build_section_addr_info_from_objfile)
2034 (relative_addr_info_to_section_offsets, addr_info_make_relative)
2035 (default_symfile_offsets, symbol_file_add)
2036 (symbol_file_add_from_bfd)
2037 (build_section_addr_info_from_section_table): Update.
2038 (alloc_section_addr_info, free_section_addr_info): Don't declare.
2039 * symfile.c (alloc_section_addr_info): Remove.
2040 (build_section_addr_info_from_section_table): Change return type.
2042 (build_section_addr_info_from_bfd)
2043 (build_section_addr_info_from_objfile): Likewise.
2044 (free_section_addr_info): Remove.
2045 (relative_addr_info_to_section_offsets): Change type of "addrs".
2046 (addrs_section_compar): Now a std::sort comparator.
2047 (addrs_section_sort): Change return type.
2048 (addr_info_make_relative): Change type of "addrs". Update.
2049 (default_symfile_offsets, syms_from_objfile_1)
2050 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
2051 (symbol_file_add_separate): Update.
2052 (symbol_file_add): Change type of "addrs". Update.
2053 (add_symbol_file_command): Update. Remove cleanups.
2054 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
2056 * symfile-debug.c (debug_sym_offsets): Change type of "info".
2057 * solib.c (solib_read_symbols): Update.
2058 * objfiles.c (objfile_relocate): Update. Remove cleanups.
2059 * machoread.c (macho_symfile_offsets): Update.
2060 * jit.c (jit_bfd_try_read_symtab): Update.
2062 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
2064 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2065 unittests/utils-selftests.c.
2066 * unittests/utils-selftests.c: New file.
2068 2018-03-14 Tom Tromey <tom@tromey.com>
2071 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
2074 2018-03-14 Tom Tromey <tom@tromey.com>
2077 * printcmd.c (printf_pointer): Allow "-" in format.
2079 2018-03-14 Tom Tromey <tom@tromey.com>
2081 * printcmd.c (_initialize_printcmd): Add usage to printf.
2083 2018-03-14 Yao Qi <qiyao@sourceware.org>
2085 * MAINTAINERS: Update my email address.
2087 2018-03-13 Tom Tromey <tom@tromey.com>
2089 * machoread.c (macho_check_dsym): Change filenamep to a
2091 (macho_symfile_read): Update.
2092 * symfile.c (load_command): Use std::string.
2094 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
2096 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
2097 to error message string.
2098 (riscv_register_name): Use xsnprintf instead of sprintf.
2099 (riscv_insn::fetch_instruction): Use gdb_assert instead of
2101 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
2103 (riscv_push_dummy_call): Likewise.
2105 2018-03-12 Tom Tromey <tom@tromey.com>
2107 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
2108 Use gdb::byte_vector.
2109 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
2111 2018-03-12 Yao Qi <yao.qi@linaro.org>
2113 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
2114 parameter type to readable_regcache.
2115 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
2118 2018-03-11 Tom Tromey <tom@tromey.com>
2120 * dwarf2read.c (struct nextfield): Add initializers.
2121 (struct nextfnfield): Remove.
2122 (struct fnfieldlist): Add initializers. Remove "length" and
2123 "head", use std::vector.
2124 (struct decl_field_list): Remove.
2125 (struct field_info): Add initializers.
2126 <fields, baseclasses>: Now std::vector.
2127 <nbaseclasses, nfnfields, typedef_field_list_count,
2128 nested_types_list_count>: Remove.
2129 (dwarf2_add_field, dwarf2_add_type_defn)
2130 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
2131 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
2132 (process_structure_scope): Update.
2134 2018-03-11 Tom Tromey <tom@tromey.com>
2136 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
2137 for use by std::sort.
2138 (build_type_psymtabs_1): Use std::vector.
2140 2018-03-09 Eli Zaretskii <eliz@gnu.org>
2142 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
2143 and LIBMPFR in the printed configuration.
2145 2018-03-08 Tom Tromey <tom@tromey.com>
2147 * source.c (get_filename_and_charpos): Use scoped_fd.
2148 * nto-procfs.c (procfs_open_1): Use scoped_fd.
2149 (procfs_pidlist): Likewise.
2150 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
2151 (iterate_over_mappings): Likewise.
2153 2018-03-08 Tom Tromey <tom@tromey.com>
2155 * infcall.c (struct call_return_meta_info)
2156 <stack_temporaries_enabled>: Remove.
2157 (get_call_return_value, call_function_by_hand_dummy): Update.
2158 * thread.c (disable_thread_stack_temporaries): Remove.
2159 (enable_thread_stack_temporaries): Remove.
2160 (thread_stack_temporaries_enabled_p): Return bool.
2161 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
2162 (get_last_thread_stack_temporary): Update.
2163 * eval.c (evaluate_subexp): Update.
2164 * gdbthread.h (class enable_thread_stack_temporaries): Now a
2165 class, not a function.
2166 (value_ptr, value_vec): Remove typedefs.
2167 (class thread_info) <stack_temporaries_enabled>: Now bool.
2168 <stack_temporaries>: Now a std::vector.
2169 (thread_stack_temporaries_enabled_p)
2170 (value_in_thread_stack_temporaries): Return bool.
2172 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
2174 * remote.c (putpkt_binary): Fix omitted bytes reporting.
2175 (getpkt_or_notif_sane_1): Likewise.
2177 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2179 * build-id.c (build_id_to_debug_bfd): Use std::string.
2181 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2183 * build-id.c (find_separate_debug_file_by_buildid): Return
2185 * build-id.h (find_separate_debug_file_by_buildid): Return
2187 * coffread.c (coff_symfile_read): Adjust to std::string.
2188 * elfread.c (elf_symfile_read): Adjust to std::string.
2189 * symfile.c (separate_debug_file_exists): Change parameter to
2191 (find_separate_debug_file): Return std::string.
2192 (find_separate_debug_file_by_debuglink): Return std::string.
2193 * symfile.h (find_separate_debug_file_by_debuglink): Return
2196 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2198 * common/xml-utils.c (xml_escape_text): Move code to...
2199 (xml_escape_text_append): ... this new function.
2200 * common/xml-utils.h (xml_escape_text_append): New declaration.
2201 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
2203 (_initialize_xml_utils): register test_xml_escape_text_append as
2206 2018-03-07 Alan Hayward <alan.hayward@arm.com>
2208 * defs.h: Remove MAX_REGISTER_SIZE.
2209 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
2211 * python/py-unwind.c (pyuw_sniffer): Likewise.
2213 2018-03-07 Tom Tromey <tom@tromey.com>
2215 * linux-tdep.c (linux_info_proc): Update.
2216 * target.h (struct target_ops) <to_fileio_readlink>: Return
2218 (target_fileio_readlink): Return optional<string>.
2219 * remote.c (remote_hostio_readlink): Return optional<string>.
2220 * inf-child.c (inf_child_fileio_readlink): Return
2222 * target.c (target_fileio_readlink): Return optional<string>.
2224 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
2226 * regcache.c (cooked_read_test): Add riscv to the list of
2227 architectures that have a save_reggroup.
2229 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
2231 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
2232 value is not a dynamic class object.
2234 2018-03-06 Tom Tromey <tom@tromey.com>
2236 * rust-exp.y: Formatting fixes.
2238 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2240 * riscv-tdep.c (riscv_register_name): Remove target description
2242 (riscv_gdbarch_init): Remove target description check.
2244 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2246 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
2248 * riscv-tdep.h: Likewise.
2250 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2252 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
2253 (riscv_pseudo_register_write): Delete.
2254 (riscv_gdbarch_init): Remove all use of pseudo registers.
2256 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2258 * record-btrace.c (btrace_print_lines): Replace cleanup
2259 parameter with RAII equivalents.
2260 (btrace_insn_history): Replace cleanup with RAII equivalents.
2261 * ui-out.h (make_cleanup_ui_out_list_begin_end,
2262 make_cleanup_ui_out_tuple_begin_end): Remove.
2263 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
2264 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
2265 make_cleanup_ui_out_list_begin_end): Remove.
2267 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2269 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
2270 parameter types to std::vector. Use bool.
2271 (record_btrace_wait): Replace VEC(tp_t) with
2272 std::vector<thread_info *>.
2273 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
2275 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2277 * record-btrace.c (record_btrace_disable_callback): Remove.
2278 (struct scoped_btrace_disable): New.
2279 (record_btrace_open): Use scoped_btrace_disable.
2281 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2283 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
2284 reading values from registers.
2286 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2288 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
2291 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2293 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
2294 change parameter type. Use GDB's print functions, and use
2295 core_addr_to_string where appropriate.
2296 (riscv_push_dummy_call): Use core_addr_to_string where
2297 appropriate, update call to riscv_print_arg_location, and reindent
2299 (riscv_return_value): Update call to riscv_print_arg_location.
2301 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2302 Tim Newsome <tim@sifive.com>
2303 Albert Ou <a0u@eecs.berkeley.edu>
2304 Darius Rad <darius@bluespec.com>
2306 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
2307 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
2308 (ALLDEPFILES): Add riscv-tdep.c
2309 * configure.tgt: Add riscv support.
2310 * riscv-tdep.c: New file.
2311 * riscv-tdep.h: New file.
2312 * NEWS: Mention new target.
2313 * MAINTAINERS: Add entry for riscv.
2315 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2317 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
2318 fields within aggregates.
2320 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
2322 * record-btrace.c (btrace_print_lines): Change type of flags to
2323 gdb_disassembly_flags.
2325 2018-03-04 John Baldwin <jhb@FreeBSD.org>
2327 * fbsd-nat.c: Include "inf-ptrace.h".
2328 (USE_SIGTRAP_SIGINFO): Conditionally define.
2329 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
2330 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
2331 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
2333 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
2335 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
2337 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
2338 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
2339 "supports_stopped_by_hw_breakpoint" target methods.
2341 2018-03-04 John Baldwin <jhb@FreeBSD.org>
2343 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
2344 * fbsd-nat.c (debug_fbsd_nat): New variable.
2345 (show_fbsd_nat_debug): New function.
2346 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
2347 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
2349 2018-03-04 John Baldwin <jhb@FreeBSD.org>
2351 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
2352 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
2354 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
2355 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
2358 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2360 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
2361 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
2363 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2365 * charset.c (struct charset_vector): New.
2366 (charsets): Change type to charset_vector.
2367 (find_charset_names): Adjust.
2369 (_initialize_charset): Adjust.
2371 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2373 * progspace.h (struct program_space) <deleted_solibs>: Change
2374 type to std::vector<std::string>.
2375 * progspace.c (clear_program_space_solib_cache): Adjust.
2376 * breakpoint.c (print_solib_event): Adjust.
2377 (check_status_catch_solib): Adjust.
2378 * solib.c (update_solib_list): Adjust.
2379 * ui-out.h (class ui_out) <field_string>: New overload.
2380 * ui-out.c (ui_out::field_string): New overload.
2382 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2384 * progspace.h (struct program_space): Add constructor and
2385 destructor, initialize fields.
2386 (add_program_space): Remove.
2387 * progspace.c (add_program_space): Rename to...
2388 (program_space::program_space): ... this.
2389 (release_program_space): Rename to...
2390 (program_space::~program_space): ... this.
2391 (delete_program_space): Use delete to delete program_space.
2392 (initialize_progspace): Use new to allocate program_space.
2393 * inferior.c (add_inferior_with_spaces): Likewise.
2394 (clone_inferior_command): Likewise.
2395 * infrun.c (follow_fork_inferior): Likewise.
2396 (handle_vfork_child_exec_or_exit): Likewise.
2398 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2400 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
2401 (delim_string_to_char_ptr_vec): Return std::vector of
2402 gdb::unique_xmalloc_ptr.
2403 (dirnames_to_char_ptr_vec_append): Take std::vector of
2404 gdb::unique_xmalloc_ptr.
2405 (dirnames_to_char_ptr_vec): Return std::vector of
2406 gdb::unique_xmalloc_ptr.
2407 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
2408 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
2409 (delim_string_to_char_ptr_vec): Return an std::vector of
2410 gdb::unique_xmalloc_ptr, adjust the code.
2411 (dirnames_to_char_ptr_vec_append): Take an std::vector of
2412 gdb::unique_xmalloc_ptr, adjust the code.
2413 (dirnames_to_char_ptr_vec): Return an std::vector of
2414 gdb::unique_xmalloc_ptr, adjust the code.
2415 * auto-load.c (auto_load_safe_path_vec): Change type to
2416 std::vector of gdb::unique_xmalloc_ptr.
2417 (auto_load_expand_dir_vars): Return an std::vector of
2418 gdb::unique_xmalloc_ptr, adjust the code.
2419 (auto_load_safe_path_vec_update): Adjust.
2420 (filename_is_in_auto_load_safe_path_vec): Adjust.
2421 (auto_load_objfile_script_1): Adjust.
2422 * build-id.c (build_id_to_debug_bfd): Adjust.
2423 * linux-thread-db.c (thread_db_load_search): Adjust.
2424 * source.c (add_path): Adjust.
2426 * symfile.c (find_separate_debug_file): Adjust.
2427 * utils.c (do_free_char_ptr_vec): Remove.
2428 (make_cleanup_free_char_ptr_vec): Remove.
2430 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
2433 * common/pathstuff.c: Conditionally include "<windows.h>".
2435 2018-03-01 Georg Sauthoff <mail@georg.so>
2438 * gcore.in: Quote variables and switch interpreter to bash.
2440 2018-03-01 Tom Tromey <tom@tromey.com>
2442 * dwarf2read.c (alloc_discriminant_info): Fix default_index
2443 assertion. Add assertion for discriminant_index.
2444 (quirk_rust_enum): Use correct base type name in univariant case.
2446 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
2448 * record.c (get_call_history_modifiers): Return a
2450 (cmd_record_call_history): Adjust.
2451 * record-btrace.c (record_btrace_call_history): Adjust.
2452 (record_btrace_call_history_range): Adjust.
2453 (record_btrace_call_history_from): Adjust.
2454 * target-debug.h (target_debug_print_record_print_flags): New.
2455 * target-delegates.c: Re-generate.
2456 * target.c (target_call_history): Change flags type.
2457 (target_call_history_from): Likewise.
2458 (target_call_history_range): Likewise.
2459 * target.h (struct target_ops) <target_call_history>: Likewise.
2460 (target_call_history_from): Likewise.
2461 (target_call_history_range): Likewise.
2463 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2464 Simon Marchi <simon.marchi@polymtl.ca>
2466 * common/common-utils.c: Include "sys/stat.h".
2467 (is_regular_file): Move here from "source.c"; change return
2469 * common/common-utils.h (is_regular_file): New prototype.
2470 * common/pathstuff.c (contains_dir_separator): New function.
2471 * common/pathstuff.h (contains_dir_separator): New prototype.
2472 * source.c: Don't include "sys/stat.h".
2473 (is_regular_file): Move to "common/common-utils.c".
2475 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2477 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
2478 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
2479 * auto-load.c: Include "common/pathstuff.h".
2480 * common/common-def.h (current_directory): Move here.
2481 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
2483 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
2485 * common/pathstuff.c: New file.
2486 * common/pathstuff.h: New file.
2487 * compile/compile.c: Include "common/pathstuff.h".
2488 * defs.h (current_directory): Move to "common/common-defs.h".
2489 * dwarf2read.c: Include "common/pathstuff.h".
2491 * guile/scm-safe-call.c: Likewise.
2492 * linux-thread-db.c: Likewise.
2494 * nto-tdep.c: Likewise.
2495 * objfiles.c: Likewise.
2496 * source.c: Likewise.
2497 * symtab.c: Likewise.
2498 * utils.c: Include "common/pathstuff.h".
2499 (gdb_realpath): Move to "common/pathstuff.c".
2500 (gdb_realpath_keepfile): Likewise.
2501 (gdb_abspath): Likewise.
2502 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
2503 (gdb_realpath_keepfile): Likewise.
2504 (gdb_abspath): Likewise.
2506 2018-02-28 John Baldwin <jhb@FreeBSD.org>
2508 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
2509 wildcard process pid for super_resume for kernels with a
2512 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
2514 * compile/compile.c (get_args): Add additional comments
2515 explaining function.
2517 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
2518 Tom Tromey <tom@tromey.com>
2520 * target.h (memory_write_request_s): Remove typedef. Don't define
2522 (target_write_memory_blocks): Change argument to std::vector.
2523 (struct memory_write_request): Add constructor.
2524 * target-memory.c (compare_block_starting_address): Return bool.
2525 Change argument types.
2526 (claim_memory): Change arguments to use std::vector.
2527 (split_regular_and_flash_blocks, blocks_to_erase)
2528 (compute_garbled_blocks): Likewise.
2529 (cleanup_request_data, cleanup_write_requests_vector): Remove.
2530 (target_write_memory_blocks): Change argument to std::vector.
2531 * symfile.c (struct load_section_data): Add constructor and
2532 destructor. Use std::vector for "requests".
2533 (struct load_progress_data): Add initializers.
2534 (load_section_callback): Update. Use "new".
2535 (clear_memory_write_data): Remove.
2536 (generic_load): Update.
2538 2018-02-27 Alan Hayward <alan.hayward@arm.com>
2540 * arch/aarch64.h: Use common/tdesc.h.
2542 2018-02-26 Maciej W. Rozycki <macro@mips.com>
2544 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
2545 architecture with a 64-bit ABI.
2547 2018-02-26 Maciej W. Rozycki <macro@mips.com>
2549 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
2550 ahead of target description loading.
2552 2018-02-26 Tom Tromey <tom@tromey.com>
2554 * stack.c (backtrace_command_1): Update.
2555 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
2557 * python/py-framefilter.c (py_print_frame)
2558 (gdbpy_apply_frame_filter): Change type of "flags".
2559 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
2561 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
2562 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
2563 * extension.h (enum frame_filter_flag): Rename from
2565 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
2566 (apply_ext_lang_frame_filter): Change type of "flags".
2567 * extension.c (apply_ext_lang_frame_filter): Change type of
2569 * extension-priv.h (struct extension_language_ops)
2570 <apply_frame_filter>: Change type of "flags".
2572 2018-02-26 Tom Tromey <tom@tromey.com>
2575 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
2576 off-by-one in py_end computation.
2577 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
2579 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
2582 2018-02-26 Tom Tromey <tom@tromey.com>
2584 * dwarf2read.c (struct variant_field): New.
2585 (struct nextfield) <variant>: New field.
2586 (dwarf2_add_field): Handle DW_TAG_variant_part.
2587 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
2588 discriminated union.
2589 (read_structure_type): Handle DW_TAG_variant_part.
2590 (handle_struct_member_die): New function, extracted from
2591 process_structure_scope. Handle DW_TAG_variant.
2592 (process_structure_scope): Handle discriminated unions. Call
2593 handle_struct_member_die.
2595 2018-02-26 Tom Tromey <tom@tromey.com>
2597 * rust-lang.h (rust_last_path_segment): Declare.
2598 * rust-lang.c (rust_last_path_segment): Now public. Change
2600 (struct disr_info): Remove.
2601 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
2602 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
2603 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
2604 (rust_enum_p, rust_enum_variant): New function.
2605 (rust_underscore_fields): Remove "offset" parameter.
2606 (rust_print_enum): New function.
2607 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
2608 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
2609 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
2611 (rust_internal_print_type): New function, from rust_print_type.
2613 (rust_print_type): Call rust_internal_print_type.
2614 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
2615 Update enum handling.
2616 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
2617 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
2618 (rust_union_quirks): New functions.
2619 (process_full_comp_unit, process_full_type_unit): Call
2621 (process_structure_scope): Update rust_unions if necessary.
2623 2018-02-26 Tom Tromey <tom@tromey.com>
2625 * value.h (value_union_variant): Declare.
2626 * valops.c (value_union_variant): New function.
2627 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
2628 (struct discriminant_info): New.
2629 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
2631 (struct main_type) <flag_discriminated_union>: New field.
2633 2018-02-26 Tom Tromey <tom@tromey.com>
2635 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2636 unittests/unpack-selftests.c.
2637 * unittests/unpack-selftests.c: New file.
2638 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
2640 2018-02-26 Yao Qi <yao.qi@linaro.org>
2642 * dwarf2read.c (struct partial_die_info) <read>: New method.
2643 (read_partial_die): Remove the declaration.
2644 (load_partial_dies): Update.
2645 (partial_die_info::partial_die_info):
2646 (read_partial_die): Change it to partial_die_info::read.
2648 2018-02-26 Yao Qi <yao.qi@linaro.org>
2650 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
2651 (fixup_partial_die): Remove declaration.
2652 (scan_partial_symbols): Update.
2653 (partial_die_parent_scope): Likewise.
2654 (partial_die_full_name): Likewise.
2655 (fixup_partial_die): Change it to partial_die_info::fixup.
2657 2018-02-26 Yao Qi <yao.qi@linaro.org>
2659 * dwarf2read.c (read_partial_die): Update the declaration.
2660 (load_partial_dies): Caller update.
2661 (read_partial_die): Remove one argument abbrev_len.
2663 2018-02-26 Yao Qi <yao.qi@linaro.org>
2665 * dwarf2read.c (struct partial_die_info): Add ctor, delete
2666 assignment operator.
2667 (load_partial_dies): Use ctor and copy ctor.
2668 (read_partial_die): Update.
2669 (dwarf2_cu::find_partial_die): Use ctor.
2671 2018-02-26 Yao Qi <yao.qi@linaro.org>
2673 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
2674 (find_partial_die_in_comp_unit): Change it to
2675 dwarf2_cu::find_partial_die.
2676 (find_partial_die): Update.
2678 2018-02-26 Yao Qi <yao.qi@linaro.org>
2680 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
2683 2018-02-26 Yao Qi <yao.qi@linaro.org>
2685 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
2687 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2689 * arch/amd64.h: Use common/tdesc.h.
2690 * arch/i386.c: Likewise.
2691 * arch/i386.h: Likewise.
2692 * arch/tic6x.c: Likewise.
2693 * arch/tdesc.h: Move file from here...
2694 * common/tdesc.h: ...to here.
2695 * features/aarch64-core.c: Regenerate.
2696 * features/aarch64-fpu.c: Regenerate.
2697 * features/i386/32bit-avx.c: Regenerate.
2698 * features/i386/32bit-avx512.c: Regenerate.
2699 * features/i386/32bit-core.c: Regenerate.
2700 * features/i386/32bit-linux.c: Regenerate.
2701 * features/i386/32bit-mpx.c: Regenerate.
2702 * features/i386/32bit-pkeys.c: Regenerate.
2703 * features/i386/32bit-sse.c: Regenerate.
2704 * features/i386/64bit-avx.c: Regenerate.
2705 * features/i386/64bit-avx512.c: Regenerate.
2706 * features/i386/64bit-core.c: Regenerate.
2707 * features/i386/64bit-linux.c: Regenerate.
2708 * features/i386/64bit-mpx.c: Regenerate.
2709 * features/i386/64bit-pkeys.c: Regenerate.
2710 * features/i386/64bit-segments.c: Regenerate.
2711 * features/i386/64bit-sse.c: Regenerate.
2712 * features/i386/x32-core.c: Regenerate.
2713 * features/tic6x-c6xp.c: Regenerate.
2714 * features/tic6x-core.c: Regenerate.
2715 * features/tic6x-gp.c: Regenerate.
2716 * target-descriptions.c: Use common/tdesc.h.
2717 * target-descriptions.h: Likewise.
2719 2018-02-24 Tom Tromey <tom@tromey.com>
2721 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
2722 (try_thread_db_load_from_dir, thread_db_load_search): Use
2724 (info_auto_load_libthread_db_compare): Return bool. Change
2726 (info_auto_load_libthread_db): Use std::vector, std::string.
2729 2018-02-24 Tom Tromey <tom@tromey.com>
2731 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
2733 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
2735 * gdbarch.c: Rebuild.
2736 * gdbarch.h: Rebuild.
2737 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
2738 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
2739 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
2742 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
2744 * gdbtypes.h (sect_offset): Change type to uint64_t.
2745 (sect_offset_str): New function.
2746 * dwarf2read.c (create_addrmap_from_aranges): Use
2748 (error_check_comp_unit_head): Likewise.
2749 (create_debug_type_hash_table): Likewise.
2750 (read_cutu_die_from_dwo): Likewise.
2751 (init_cutu_and_read_dies): Likewise.
2752 (init_cutu_and_read_dies_no_follow): Likewise.
2753 (process_psymtab_comp_unit_reader): Likewise.
2754 (partial_die_parent_scope): Likewise.
2755 (peek_die_abbrev): Likewise.
2756 (process_queue): Likewise.
2757 (dwarf2_physname): Likewise.
2758 (read_namespace_alias): Likewise.
2759 (read_import_statement): Likewise.
2760 (create_dwo_cu_reader): Likewise.
2761 (create_cus_hash_table): Likewise.
2762 (lookup_dwo_cutu): Likewise.
2763 (inherit_abstract_dies): Likewise.
2764 (read_func_scope): Likewise.
2765 (read_call_site_scope): Likewise.
2766 (dwarf2_add_member_fn): Likewise.
2767 (read_common_block): Likewise.
2768 (read_module_type): Likewise.
2769 (read_typedef): Likewise.
2770 (read_subrange_type): Likewise.
2771 (load_partial_dies): Likewise.
2772 (read_partial_die): Likewise.
2773 (find_partial_die): Likewise.
2774 (read_str_index): Likewise.
2775 (dwarf2_string_attr): Likewise.
2776 (build_error_marker_type): Likewise.
2777 (lookup_die_type): Likewise.
2778 (dump_die_shallow): Likewise.
2779 (follow_die_ref): Likewise.
2780 (dwarf2_fetch_die_loc_sect_off): Likewise.
2781 (dwarf2_fetch_constant_bytes): Likewise.
2782 (follow_die_sig): Likewise.
2783 (get_signatured_type): Likewise.
2784 (get_DW_AT_signature_type): Likewise.
2785 (dwarf2_find_containing_comp_unit): Likewise.
2786 (set_die_type): Likewise.
2788 2018-02-21 John Baldwin <jhb@FreeBSD.org>
2790 * arch/aarch64.c: Include "common-defs.h".
2791 * arch/amd64.c: Likewise.
2792 * arch/i386.c: Likewise.
2794 2018-02-21 Tom Tromey <tom@tromey.com>
2796 * value.h: (extract_field_op): Update.
2797 * eval.c (extract_field_op): Return a const char *.
2798 * expression.h (parse_expression_for_completion): Update.
2799 * completer.c (complete_expression): Update.
2800 (add_struct_fields): Make fieldname const.
2801 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
2802 (mark_completion_tag, parse_exp_in_context_1): Update.
2803 (parse_expression_for_completion): Change "name" to
2804 unique_xmalloc_ptr*.
2806 2018-02-21 Tom Tromey <tom@tromey.com>
2808 * infcall.c (call_function_by_hand_dummy): Use std::vector.
2810 2018-02-21 Yao Qi <yao.qi@linaro.org>
2812 * avr-tdep.c (avr_read_pc): Change parameter type to
2814 * gdbarch.sh (read_pc): Likewise.
2815 * gdbarch.c: Re-generated.
2816 * gdbarch.h: Re-generated.
2817 * hppa-tdep.c (hppa_read_pc): Change parameter type to
2819 * ia64-tdep.c (ia64_read_pc): Likewise.
2820 * mips-tdep.c (mips_read_pc): Likewise.
2821 * spu-tdep.c (spu_read_pc): Likewise.
2823 2018-02-21 Yao Qi <yao.qi@linaro.org>
2825 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
2826 * regcache-dump.c: New file.
2827 * regcache.c: Move register_dump to regcache-dump.c.
2828 (maintenance_print_registers): Likewise.
2829 (maintenance_print_raw_registers): Likewise.
2830 (maintenance_print_cooked_registers): Likewise.
2831 (maintenance_print_register_groups): Likewise.
2832 (maintenance_print_remote_registers): Likewise.
2833 (_initialize_regcache): Likewise.
2834 * regcache.h (register_dump): Moved from regcache.c.
2836 2018-02-21 Yao Qi <yao.qi@linaro.org>
2838 * regcache.c (regcache::regcache): Update.
2839 (regcache::invalidate): Move it to detached_regcache::invalidate.
2840 (get_thread_arch_aspace_regcache): Update.
2841 (regcache::raw_update): Update.
2842 (regcache::cooked_read): Remove some code.
2843 (regcache::cooked_read_value): Likewise.
2844 (regcache::raw_write): Remove assert on m_readonly_p.
2845 (regcache::raw_supply_integer): Move it to
2846 detached_regcache::raw_supply_integer.
2847 (regcache::raw_supply_zeroed): Likewise.
2848 * regcache.h (detached_regcache) <raw_supply_integer>: New
2850 <raw_supply_zeroed, invalidate>: Likewise.
2851 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
2852 <invalidate>: Likewise.
2853 <m_readonly_p>: Removed.
2855 2018-02-21 Yao Qi <yao.qi@linaro.org>
2857 * infcmd.c (get_return_value): Let stop_regs point to
2858 get_current_regcache.
2859 * regcache.c (regcache::regcache): Remove.
2860 (register_dump_reg_buffer): New class.
2861 (regcache_print): Adjust.
2862 * regcache.h (regcache): Remove constructors.
2864 2018-02-21 Yao Qi <yao.qi@linaro.org>
2866 * regcache.c (class register_dump): New class.
2867 (register_dump_regcache, register_dump_none): New class.
2868 (register_dump_remote, register_dump_groups): New class.
2869 (regcache_print): Update.
2870 * regcache.h (regcache_dump_what): Move it to regcache.c.
2871 (regcache) <dump>: Remove.
2873 2018-02-21 Yao Qi <yao.qi@linaro.org>
2875 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
2877 (jit_unwind_reg_set_impl): Call raw_supply.
2878 (jit_frame_sniffer): Use reg_buffer_rw.
2879 * record-full.c (record_full_core_regbuf): Change its type.
2880 (record_full_core_open_1): Use reg_buffer_rw.
2881 (record_full_close): Likewise.
2882 (record_full_core_fetch_registers): Use regcache->raw_supply.
2883 (record_full_core_store_registers): Likewise.
2884 * regcache.c (regcache::get_register_status): Move it to
2886 (regcache_raw_set_cached_value): Remove.
2887 (regcache::raw_set_cached_value): Remove.
2888 (regcache::raw_write): Call raw_supply.
2889 (regcache::raw_supply): Move it to reg_buffer_rw.
2890 * regcache.h (regcache_raw_set_cached_value): Remove.
2891 (reg_buffer_rw): New class.
2893 2018-02-21 Yao Qi <yao.qi@linaro.org>
2895 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
2896 readonly_detached_regcache.
2897 (dummy_frame_prev_register): Use regcache->cooked_read.
2898 * frame.c (frame_save_as_regcache): Change return type.
2899 (frame_pop): Update.
2900 * frame.h (frame_save_as_regcache): Update declaration.
2901 * inferior.h (get_infcall_suspend_state_regcache): Update
2903 * infrun.c (infcall_suspend_state) <registers>: use
2904 readonly_detached_regcache.
2905 (save_infcall_suspend_state): Don't use regcache_dup.
2906 (get_infcall_suspend_state_regcache): Change return type.
2907 * linux-fork.c (struct fork_info) <savedregs>: Change to
2908 readonly_detached_regcache.
2910 (fork_save_infrun_state): Don't use regcache_dup.
2911 (info_checkpoints_command): Adjust.
2912 * mi/mi-main.c (register_changed_p): Update declaration.
2913 (mi_cmd_data_list_changed_registers): Use
2914 readonly_detached_regcache.
2915 (register_changed_p): Change parameter type to
2916 readonly_detached_regcache.
2917 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
2918 readonly_detached_regcache.
2919 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
2920 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
2922 (regcache::save): Move it to reg_buffer.
2923 (regcache::restore): Change parameter type.
2924 (regcache_dup): Remove.
2925 * regcache.h (reg_buffer) <save>: New method.
2926 (readonly_detached_regcache): New class.
2927 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
2928 readonly_detached_regcache.
2929 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
2931 2018-02-21 Yao Qi <yao.qi@linaro.org>
2933 * frame.c (frame_save_as_regcache): Use regcache method save.
2934 (frame_pop): Use regcache method restore.
2935 * infrun.c (restore_infcall_suspend_state): Likewise.
2936 * linux-fork.c (fork_load_infrun_state): Likewise.
2937 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
2939 * regcache.c (regcache_save): Remove.
2940 (regcache::restore): More asserts.
2941 (regcache_cpy): Remove.
2942 * regcache.h (regcache_save): Remove the declaration.
2943 (regcache::restore): Move from private to public.
2944 Remove the friend declaration of regcache_cpy.
2945 (regcache_cpy): Remove declaration.
2947 2018-02-21 Yao Qi <yao.qi@linaro.org>
2949 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
2950 parameter type to 'readable_regcache *'.
2951 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2952 * arm-tdep.c (arm_neon_quad_read): Likewise.
2953 (arm_pseudo_read): Likewise.
2954 * avr-tdep.c (avr_pseudo_register_read): Likewise.
2955 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2956 * frv-tdep.c (frv_pseudo_register_read): Likewise.
2957 * gdbarch.c: Re-generated.
2958 * gdbarch.h: Re-generated.
2959 * gdbarch.sh (pseudo_register_read): Change parameter type to
2960 'readable_regcache *'.
2961 (pseudo_register_read_value): Likewise.
2962 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
2963 (h8300_pseudo_register_read): Likewise.
2964 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
2965 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2966 (i386_pseudo_register_read_into_value): Likewise.
2967 (i386_pseudo_register_read_value): Likewise.
2968 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
2970 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
2971 * m32c-tdep.c (m32c_raw_read): Likewise.
2972 (m32c_read_flg): Likewise.
2973 (m32c_banked_register): Likewise.
2974 (m32c_banked_read): Likewise.
2975 (m32c_sb_read): Likewise.
2976 (m32c_part_read): Likewise.
2977 (m32c_cat_read): Likewise.
2978 (m32c_r3r2r1r0_read): Likewise.
2979 (m32c_pseudo_register_read): Likewise.
2980 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2981 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2982 (mep_pseudo_cr64_read): Likewise.
2983 (mep_pseudo_register_read): Likewise.
2984 * mips-tdep.c (mips_pseudo_register_read): Likewise.
2985 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2986 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2987 * regcache.c (regcache::raw_read): Move it to readable_regcache.
2988 (regcache::cooked_read): Likewise.
2989 (regcache::cooked_read_value): Likewise.
2990 (regcache_cooked_read_signed):
2991 (regcache::cooked_read): Likewise.
2992 * regcache.h (readable_regcache): New class.
2993 (regcache): Inherit readable_regcache. Move some methods to
2995 * rl78-tdep.c (rl78_pseudo_register_read): Change
2996 parameter type to 'readable_regcache *'.
2997 * rs6000-tdep.c (do_regcache_raw_read): Remove.
2998 (e500_pseudo_register_read): Change parameter type to
2999 'readable_regcache *'.
3000 (dfp_pseudo_register_read): Likewise.
3001 (vsx_pseudo_register_read): Likewise.
3002 (efpr_pseudo_register_read): Likewise.
3003 * s390-tdep.c (s390_pseudo_register_read): Likewise.
3004 * sh-tdep.c (sh_pseudo_register_read): Likewise.
3005 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
3006 (sh64_pseudo_register_read): Likewise.
3007 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
3008 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
3009 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
3010 (spu_pseudo_register_read): Likewise.
3011 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
3012 (xtensa_pseudo_register_read): Likewise.
3014 2018-02-21 Yao Qi <yao.qi@linaro.org>
3016 * regcache.c (regcache::regcache): Call reg_buffer ctor.
3017 (regcache::arch): Move it to reg_buffer::arch.
3018 (regcache::register_buffer): Likewise.
3019 (regcache::assert_regnum): Likewise.
3020 (regcache::num_raw_registers): Likewise.
3021 * regcache.h (reg_buffer): New class.
3022 (regcache): Inherit reg_buffer.
3024 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
3026 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
3027 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
3029 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
3031 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
3033 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3035 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
3036 (SFILES): Remove common/*.c files.
3037 (COMMON_OBS): Remove some *.o files built from common/*.c files.
3038 * common/common.host: Add common reference.
3039 * configure.ac: Likewise.
3040 * configure: Regenerate.
3042 2018-02-16 Yao Qi <yao.qi@linaro.org>
3044 * block.c (block_namespace_info): Inherit allocate_on_obstack.
3045 (block_initialize_namespace): Use new.
3046 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
3047 (dwarf2_free_objfile): Use delete.
3048 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
3049 (copy_type_recursive): Use new.
3050 * gdb_obstack.h (allocate_on_obstack): New.
3052 2018-02-15 Yao Qi <yao.qi@linaro.org>
3055 * inferior.c (exit_inferior_1): Reset inf->control.
3057 2018-02-15 Joel Brobecker <brobecker@adacore.com>
3059 * ada-lang.c (ada_to_fixed_value_create): Delete advance
3062 2018-02-14 Pedro Alves <palves@redhat.com>
3064 * frame-unwind.c (frame_unwind_try_unwinder): Always call
3065 frame_cleanup_after_sniffer on exception.
3067 2018-02-14 Tom Tromey <tom@tromey.com>
3069 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
3071 (solib_bfd_open): Make pathname const.
3072 * solib.c (solib_bfd_open): Make pathname const.
3073 * solib-spu.c (spu_bfd_fopen): Make name const.
3074 (spu_bfd_open): Make pathname const.
3075 * solib-darwin.c (darwin_bfd_open): Make pathname const.
3076 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
3078 2018-02-14 Tom Tromey <tom@tromey.com>
3080 * symfile.c (symfile_bfd_open): Update.
3081 * source.h (openp, source_full_path_of, find_and_open_source):
3082 Change argument type to unique_xmalloc_ptr.
3083 * source.c (openp): Take a unique_xmalloc_ptr.
3084 (source_full_path_of, find_and_open_source): Likewise.
3085 (open_source_file, symtab_to_fullname): Update.
3086 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
3088 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
3089 (exec_file_find): Update.
3090 * psymtab.c (psymtab_to_fullname): Update.
3091 * nto-tdep.h (nto_find_and_open_solib): Update.
3092 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
3094 * exec.c (exec_file_attach): Update.
3095 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
3096 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
3098 2018-02-14 Tom Tromey <tom@tromey.com>
3100 * solib.c: Include source.h.
3101 * nto-tdep.c: Include source.h.
3102 * mi/mi-cmd-env.c: Include source.h.
3103 * infcmd.c: Include source.h.
3104 * exec.c: Include source.h.
3105 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
3106 (add_path, directory_switch, source_path, init_source_path): Move
3108 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
3109 (add_path, directory_switch, source_path, init_source_path):
3112 2018-02-14 Tom Tromey <tom@tromey.com>
3114 * solist.h (exec_file_find, solib_find): Return
3116 (solib_bfd_fopen): Take a const char *.
3117 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
3118 (exec_file_find, solib_find): Likewise.
3119 (solib_bfd_fopen): Do not take ownership of "pathname".
3120 (solib_bfd_open): Use unique_xmalloc_ptr.
3121 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
3122 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
3123 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
3124 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
3126 2018-02-14 Joel Brobecker <brobecker@adacore.com>
3128 * ada-lang.c (name_match_type_from_name): Remove reference to
3129 ada_name_for_lookup in function's documentation.
3130 * ada-lang.h (ada_name_for_lookup): Delete declaration.
3132 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
3134 * defs.h (enum openp_flags): New enum.
3135 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
3136 Move to enum openp_flags.
3137 (openp_flags): New enum flags.
3138 (openp): Change parameter type to openp_flags.
3139 * source.c (openp): Change parameter type to openp_flags.
3140 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
3141 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
3143 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
3145 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
3148 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
3150 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
3152 (class dwarf2_queue_guard): ...the destructor of this new class.
3153 (dw2_do_instantiate_symtab): Create instance of the new class
3154 dwarf2_queue_guard, remove cleanup.
3156 2018-02-09 Tom Tromey <tom@tromey.com>
3158 * source.c (find_source_lines): Don't reference past the end of
3161 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3163 * remote.c (remote_btrace_maybe_reopen): Change error message.
3164 * btrace.c (btrace_enable): Likewise.
3165 (parse_xml_btrace): Likewise.
3166 (parse_xml_btrace_conf): Likewise.
3168 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3170 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
3171 (linux_enable_pt, linux_enable_bts): Call
3172 diagnose_perf_event_open_fail.
3174 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3176 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
3177 Remove parameter and change return type. Update callers. Move it.
3178 (linux_enable_bts, linux_enable_pt): Improve error message.
3179 (linux_enable_pt): Remove zero buffer size check.
3180 (linux_enable_btrace): Improve error messages. Remove NULL return
3183 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3185 * btrace.c (btrace_enable): Remove target_supports_btrace call.
3186 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
3187 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
3188 (linux_supports_pt, linux_supports_btrace): Remove.
3189 (linux_enable_bts): Call cpu_supports_bts.
3190 * nat/linux-btrace.h (linux_supports_btrace): Remove.
3191 * remote.c (remote_supports_btrace): Remove.
3192 (init_remote_ops): Remove remote_supports_btrace.
3193 * target-delegates.c: Regenerated.
3194 * target.c (target_supports_btrace): Remove.
3195 * target.h (target_ops) <to_supports_btrace>: Remove
3196 (target_supports_btrace): Remove.
3197 * x86-linux-nat.c (x86_linux_create_target): Remove
3198 linux_supports_btrace.
3200 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3202 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
3204 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
3205 exception and use message in own exception.
3207 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3209 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
3210 (perf_event_pt_event_type): Use gdb_file_up.
3211 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
3212 scoped_fd, and scoped_mmap.
3214 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3216 * common/scoped_mmap.h: New.
3217 * unittests/scoped_mmap-selftest.c: New.
3218 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3219 unittests/scoped_mmap-selftest.c.
3221 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3223 * common/scoped_fd.h: New.
3224 * unittests/scoped_fd-selftest.c: New.
3225 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3226 unittests/scoped_fd-selftest.c.
3228 2018-02-09 Tom Tromey <tom@tromey.com>
3230 * auto-load.c (auto_load_section_scripts): Use
3231 gdb::unique_xmalloc_ptr.
3233 2018-02-09 Tom Tromey <tom@tromey.com>
3235 * auto-load.c (execute_script_contents): Use std::string.
3237 2018-02-09 Joel Brobecker <brobecker@adacore.com>
3239 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
3240 Python function, rather than a new command.
3242 2018-02-08 Tom Tromey <tom@tromey.com>
3244 * solib.c (solib_find_1): Use std::string.
3245 (solib_bfd_fopen): Use unique_xmalloc_ptr.
3247 2018-02-08 Tom Tromey <tom@tromey.com>
3249 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
3251 2018-02-08 Tom Tromey <tom@tromey.com>
3253 * source.c (find_source_lines): Use gdb::def_vector.
3255 2018-02-08 Tom Tromey <tom@tromey.com>
3257 * macrocmd.c (struct temporary_macro_definition): New.
3258 (macro_define_command): Use temporary_macro_definition. Remove
3260 (free_macro_definition_ptr): Remove.
3262 2018-02-08 Tom Tromey <tom@tromey.com>
3264 * macroexp.c (maybe_expand): Use std::string.
3266 2018-02-08 Tom Tromey <tom@tromey.com>
3268 * macroexp.c (struct macro_buffer): Add initializers for some
3270 (init_buffer, init_shared_buffer, free_buffer)
3271 (free_buffer_return_text): Remove.
3272 (macro_buffer): New constructors.
3273 (~macro_buffer): New destructor.
3274 (macro_buffer::set_shared): New method.
3275 (macro_buffer::resize_buffer, macro_buffer::appendc)
3276 (macro_buffer::appendmem): Now methods, not free functions.
3277 (set_token, append_tokens_without_splicing, stringify)
3278 (macro_stringify): Update.
3279 (gather_arguments): Change return type. Remove argc_p argument,
3280 add args_ptr argument. Use std::vector.
3281 (substitute_args): Remove argc argument. Accept std::vector.
3282 (expand): Update. Use std::vector.
3283 (scan, macro_expand, macro_expand_next): Update.
3285 2018-02-08 Tom Tromey <tom@tromey.com>
3287 * symtab.c (default_collect_symbol_completion_matches_break_on):
3288 Use unique_xmalloc_ptr.
3289 * macroscope.h: (sal_macro_scope, user_macro_scope)
3290 (default_macro_scope): Return unique_xmalloc_ptr.
3291 * macroscope.c (sal_macro_scope, user_macro_scope)
3292 (default_macro_scope): Return unique_xmalloc_ptr.
3293 * macroexp.h (macro_expand, macro_expand_once): Return
3295 * macroexp.c (macro_expand, macro_expand_once): Return
3297 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3298 (info_macro_command, info_macros_command): Use
3300 * compile/compile-c-support.c (write_macro_definitions): Use
3302 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
3304 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
3306 * value.c (value_static_field): Assign field type instead of
3307 containing type when returning an optimized out value.
3309 2018-02-06 Yao Qi <yao.qi@linaro.org>
3311 * ft32-tdep.c (ft32_read_pc): Remove.
3312 (ft32_write_pc): Remove.
3313 (ft32_gdbarch_init): Update.
3314 * m32r-tdep.c (m32r_read_pc): Remove.
3315 (m32r_gdbarch_init): Update.
3316 * mep-tdep.c (mep_read_pc): Remove.
3317 (mep_gdbarch_init): Update.
3318 * microblaze-tdep.c (microblaze_write_pc): Remove.
3319 (microblaze_gdbarch_init): Update.
3320 * mn10300-tdep.c (mn10300_read_pc): Remove.
3321 (mn10300_write_pc): Remove.
3322 (mn10300_gdbarch_init): Update.
3323 * moxie-tdep.c (moxie_read_pc): Remove.
3324 (moxie_write_pc): Remove.
3325 (moxie_gdbarch_init): Update.
3327 2018-02-06 Yao Qi <yao.qi@linaro.org>
3329 * expprint.c (print_subexp_standard): Handle
3330 OP_F77_UNDETERMINED_ARGLIST.
3331 (dump_subexp_body_standard): Likewise.
3333 2018-02-05 Alan Hayward <alan.hayward@arm.com>
3335 * target-descriptions.c (tdesc_element_visitor) Add empty
3337 (tdesc_type): Move make_gdb_type from here.
3338 (tdesc_type_builtin): Likewise.
3339 (tdesc_type_vector): Likewise.
3340 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
3341 (make_gdb_type_struct): Move from tdesc_type_with_fields.
3342 (make_gdb_type_union): Likewise.
3343 (make_gdb_type_flags): Likewise.
3344 (make_gdb_type_enum): Likewise.
3345 (make_gdb_type): New function.
3346 (tdesc_register_type): Use static make_gdb_type.
3348 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
3350 * infcmd.c (default_print_one_register_info): Align natural-format
3351 column values consistently one under another.
3352 (pad_to_column): New function.
3354 2018-02-05 Joel Brobecker <brobecker@adacore.com>
3356 * dwarf2read.c (dwarf2_physname): Move commment.
3358 2018-02-01 Leszek Swirski <leszeks@google.com>
3360 * varobj.c (varobj_formatted_print_options): Allow recursive
3361 pretty printing if pretty printing is enabled.
3363 2018-02-01 Leszek Swirski <leszeks@google.com>
3365 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
3366 names after a structop as a filename.
3368 2018-02-01 Yao Qi <yao.qi@linaro.org>
3370 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
3371 (arm_record_coproc_data_proc): Likewise.
3373 2018-02-01 Yao Qi <yao.qi@linaro.org>
3375 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
3377 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
3379 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
3380 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
3382 2018-01-31 Pedro Alves <palves@redhat.com>
3384 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
3385 * inflow.c (child_terminal_save_inferior): Wrap reference to
3386 tcgetpgrp in HAVE_TERMIOS_H.
3387 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
3389 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
3390 always iterate over all inferiors.
3391 (gdbsim_cntrl_c): Adjust.
3392 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
3394 2018-01-31 Joel Brobecker <brobecker@adacore.com>
3396 * gdbtypes.c (lookup_array_range_type): Make sure the array's
3397 index type is objfile-owned if the element type is as well.
3399 2018-01-31 Joel Brobecker <brobecker@adacore.com>
3403 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
3405 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
3406 "features/s390x-linux64.c".
3407 (_initialize_s390_linux_tdep): Remove initialization of tdescs
3408 s390_linux32 and s390x_linux64.
3409 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
3411 * s390-tdep.c: Include "features/s390-linux32.c" and
3412 "features/s390x-linux64.c".
3413 (s390_tdesc_valid): Add check for tdesc_has_registers.
3414 (s390_gdbarch_init): Make sure there is always a valid tdesc.
3415 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
3416 tdesc_s390x_linux64.
3417 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
3418 tdesc_s390x_linux64 to...
3419 * s390-tdep.h: ...here.
3421 2018-01-30 Pedro Alves <palves@redhat.com>
3424 * config.in, configure: Regenerate.
3425 * configure.ac: Check for getpgid.
3426 * go32-nat.c (go32_pass_ctrlc): New.
3427 (go32_target): Install it.
3428 * inf-child.c (inf_child_target): Install
3429 child_terminal_save_inferior, child_pass_ctrlc and
3431 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
3432 (inf_ptrace_target): No longer install it.
3433 * infcmd.c (interrupt_target_1): Adjust.
3434 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
3435 (child_interrupt): Declare.
3436 (inferior::terminal_state): New.
3437 * inflow.c (struct terminal_info): Update comments.
3438 (inferior_process_group): Delete.
3439 (terminal_is_ours): Delete.
3440 (gdb_tty_state): New.
3441 (child_terminal_init): Adjust.
3442 (is_gdb_terminal, sharing_input_terminal_1)
3443 (sharing_input_terminal): New functions.
3444 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
3445 Set the process's actual process group in the foreground if
3446 possible. Handle is_ours_for_output/is_ours distinction. Don't
3447 mark terminal as the inferior's if not sharing GDB's terminal.
3448 Don't check attach_flag.
3449 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
3450 pass down a target_terminal_state.
3451 (child_terminal_save_inferior): New, factored out from ...
3452 (child_terminal_ours_1): ... this. Handle
3453 target_terminal_state::is_ours_for_output.
3454 (child_interrupt, child_pass_ctrlc): New.
3455 (inflow_inferior_exit): Clear the inferior's terminal_state.
3456 (copy_terminal_info): Copy the inferior's terminal state.
3457 (_initialize_inflow): Remove reference to terminal_is_ours.
3458 * inflow.h (inferior_process_group): Delete.
3459 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
3460 * procfs.c (procfs_target): Don't install procfs_interrupt.
3461 (procfs_interrupt): Delete.
3462 * remote.c (remote_serial_quit_handler): Adjust.
3463 (remote_interrupt): Remove ptid parameter. Adjust.
3464 * target-delegates.c: Regenerate.
3465 * target.c: Include "terminal.h".
3466 (target_terminal::terminal_state): Rename to ...
3467 (target_terminal::m_terminal_state): ... this.
3468 (target_terminal::init): Adjust.
3469 (target_terminal::inferior): Adjust to per-inferior
3471 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
3472 (target_terminal::ours, target_terminal::ours_for_output): Use
3473 target_terminal_is_ours_kind.
3474 (target_interrupt): Remove ptid parameter. Adjust.
3475 (default_target_pass_ctrlc): Adjust.
3476 * target.h (target_ops::to_terminal_save_inferior): New field.
3477 (target_ops::to_interrupt): Remove ptid_t parameter.
3478 (target_interrupt): Remove ptid_t parameter. Update comment.
3479 (target_pass_ctrlc): Update comment.
3480 * target/target.h (target_terminal_state): New scoped enum,
3482 (target_terminal::terminal_state): ... here.
3483 (target_terminal::inferior): Update comments.
3484 (target_terminal::restore_inferior): New.
3485 (target_terminal::is_inferior, target_terminal::is_ours)
3486 (target_terminal::is_ours_for_output): Adjust.
3487 (target_terminal::scoped_restore_terminal_state): Adjust to
3488 rename, and call restore_inferior() instead of inferior().
3489 (target_terminal::scoped_restore_terminal_state::m_state): Change
3491 (target_terminal::terminal_state): Rename to ...
3492 (target_terminal::m_terminal_state): ... this and change type.
3494 2018-01-30 Pedro Alves <palves@redhat.com>
3496 * linux-nat.c (wait_for_signal): New function.
3497 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
3499 (async_terminal_is_ours)
3500 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
3501 (linux_nat_add_target): Don't override
3502 to_terminal_inferior/to_terminal_ours.
3504 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
3506 * remote.c (remote_follow_fork): Don't call "detach_inferior".
3508 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
3510 * dwarf2read.c (free_dwo_files): Add forward-declaration.
3511 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
3512 dwarf2_per_objfile_free here.
3513 (dwarf2_per_objfile_free): Remove.
3514 (_initialize_dwarf2_read): Don't register
3515 dwarf2_per_objfile_free as a registry cleanup.
3517 2018-01-27 Eli Zaretskii <eliz@gnu.org>
3519 Avoid compilation errors in MinGW native builds
3521 The error is triggered by including python-internal.h, and the
3524 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
3525 from build-gnulib/import/math.h:27,
3526 from d:/usr/Python26/include/pyport.h:235,
3527 from d:/usr/Python26/include/Python.h:58,
3528 from python/python-internal.h:94,
3529 from python/py-arch.c:24:
3530 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
3534 This happens because Python headers define 'hypot' to expand t
3535 '_hypot' in the Windows builds.
3536 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
3537 'hypoth'. This avoids a compilation error.
3539 2018-01-26 Alan Hayward <alan.hayward@arm.com>
3541 * MAINTAINERS (Write After Approval): Fix ordering.
3543 2018-01-26 Alan Hayward <alan.hayward@arm.com>
3545 * MAINTAINERS (Write After Approval): Add Alan Hayward.
3547 2018-01-26 Alan Modra <amodra@gmail.com>
3549 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
3550 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
3551 Remove nop. Make const. Comment.
3552 (powerpc32_plt_stub_so_2): New.
3553 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
3554 Correct count. Update uses.
3555 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
3556 Move common code reading PLT entry word. Correct
3557 powerpc32_plt_stub PLT address calculation.
3558 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
3559 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
3560 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
3561 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
3562 (ppc64_standard_linkage8): Likewise.
3563 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
3564 Correct insns description.
3565 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
3567 2018-01-24 Pedro Alves <palves@redhat.com>
3569 GCC PR libstdc++/83906
3570 * gdbtypes.c (operator==(const dynamic_prop &,
3571 const dynamic_prop &)): New.
3572 (operator==(const range_bounds &, const range_bounds &)): New.
3573 (check_types_equal): Use them instead of memcmp.
3574 * gdbtypes.h (operator==(const dynamic_prop &,
3575 const dynamic_prop &)): Declare.
3576 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
3577 (operator==(const range_bounds &, const range_bounds &)): Declare.
3578 (operator!=(const range_bounds &, const range_bounds &)): Declare.
3580 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3582 * s390-linux-tdep.c (s390_record_address_mask)
3583 (s390_record_calc_disp_common, s390_record_calc_disp)
3584 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
3585 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
3586 (s390_process_record): Move to s390-tdep.c.
3587 (s390_linux_init_abi_any): Adjust.
3588 * s390-tdep.c (s390_record_address_mask)
3589 (s390_record_calc_disp_common, s390_record_calc_disp)
3590 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
3591 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
3592 (s390_process_record): Moved from s390-linux-tdep.c
3593 (s390_gdbarch_init): Adjust.
3595 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3597 * s390-linux-nat.c (s390-tdep.h): New include.
3598 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
3599 (HFILES_NO_SRCDIR): Add s390-tdep.h.
3600 (ALLDEPFILES): Add s390-tdep.c.
3601 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
3602 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
3603 * s390-tdep.h: ...this. New file.
3604 * s390-linux-tdep.c (s390-tdep.h): New include.
3605 (_initialize_s390_tdep): Rename to...
3606 (_initialize_s390_linux_tdep): ...this and adjust.
3607 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
3608 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
3610 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
3611 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
3612 (s390_is_partial_instruction, s390_software_single_step)
3613 (is_non_branch_ril, s390_displaced_step_copy_insn)
3614 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
3615 (s390_prologue_data, s390_addr, s390_store, s390_load)
3616 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
3617 (s390_register_call_saved, s390_guess_tracepoint_registers)
3618 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
3619 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
3620 (s390_pseudo_register_name, s390_pseudo_register_type)
3621 (s390_pseudo_register_read, s390_pseudo_register_write)
3622 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
3623 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
3624 (s390_addr_bits_remove, s390_address_class_type_flags)
3625 (s390_address_class_type_flags_to_name)
3626 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
3627 (s390_function_arg_float, s390_function_arg_vector)
3628 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
3629 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
3630 (s390_frame_align, s390_register_return_value, s390_return_value)
3631 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
3632 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
3633 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
3634 (s390_trad_frame_prev_register, s390_unwind_cache)
3635 (s390_prologue_frame_unwind_cache)
3636 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
3637 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
3638 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
3639 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
3640 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
3641 (s390_frame_base_address, s390_local_base_address)
3642 (s390_frame_base, s390_gcc_target_options)
3643 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
3644 (s390_validate_reg_range, s390_tdesc_valid)
3645 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
3646 * s390-tdep.c: ...this. New file.
3648 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3650 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
3651 (s390_process_record, s390_gdbarch_tdep_alloc)
3652 (s390_linux_init_abi_any): Use/set new hook.
3654 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3656 * s390-linux-tdep.c (osabi.h): New include.
3657 (s390_linux_init_abi_31, s390_linux_init_abi_64)
3658 (s390_linux_init_abi_any): New functions.
3659 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
3661 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3663 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
3664 tdesc_has_registers check
3666 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3668 * s390-linux-tdep.c (s390_tdesc_valid): New function.
3669 (s390_validate_reg_range): New macro.
3670 (s390_gdbarch_init): Adjust.
3672 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3674 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
3675 (s390_gdbarch_tdep_alloc): Adjust.
3676 (s390_gdbarch_init): Adjust.
3678 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3680 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
3681 <have_tdb>: Change type to bool.
3682 (s390_gdbarch_tdep_alloc): Adjust.
3683 (s390_gdbarch_init): Adjust.
3685 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3687 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
3688 (gdbarch_tdep) <have_upper, have_vx>: New fields.
3689 (s390_gdbarch_tdep_alloc): New function.
3690 (s390_gdbarch_init): Allocate tdep at start and use its fields
3691 instead of separate variables.
3693 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3695 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
3696 when looking for cached gdbarch and add comment for remaining.
3698 2018-01-22 Pedro Alves <palves@redhat.com>
3699 Sergio Durigan Junior <sergiodj@redhat.com>
3701 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
3704 2018-01-22 Maciej W. Rozycki <macro@mips.com>
3706 * MAINTAINERS: Update my company e-mail address.
3708 2018-01-22 Yao Qi <yao.qi@linaro.org>
3710 * regcache.c (cooked_write_test): New function.
3711 (_initialize_regcache): Register the test.
3713 2018-01-22 Yao Qi <yao.qi@linaro.org>
3715 * ia64-tdep.c (ia64_pseudo_register_read): Call
3716 regcache->cooked_read instead of regcache_cooked_read_unsigned.
3717 * m32c-tdep.c (m32c_cat_read): Likewise.
3718 (m32c_r3r2r1r0_read): Likewise.
3719 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
3720 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
3722 2018-01-22 Yao Qi <yao.qi@linaro.org>
3724 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
3725 method raw_read instead of regcache_raw_read.
3726 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
3727 * arm-tdep.c (arm_neon_quad_read): Likewise.
3728 * avr-tdep.c (avr_pseudo_register_read): Likewise.
3729 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
3730 * frv-tdep.c (frv_pseudo_register_read): Likewise.
3731 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
3732 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3733 (i386_pseudo_register_read_into_value): Likewise.
3734 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
3735 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
3736 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
3737 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
3738 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
3739 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
3740 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
3741 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
3742 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
3744 2018-01-22 Yao Qi <yao.qi@linaro.org>
3746 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
3747 * configure.tgt: Remove target mt.
3748 * mt-tdep.c: Remove.
3749 * regcache.c (cooked_read_test): Remove the check for mt.
3751 2018-01-22 Yao Qi <yao.qi@linaro.org>
3753 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
3754 instead of gdbarch_pseudo_register_read_value.
3756 2018-01-22 Joel Brobecker <brobecker@adacore.com>
3758 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
3761 2018-01-22 Joel Brobecker <brobecker@adacore.com>
3763 * linespec.c (create_sals_line_offset): Remove code that preserved
3764 the symtab_and_line's line number.
3766 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3768 * varobj.c (varobj_create): Don't set valid_block when creating a
3771 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3773 * varobj.c (varobj_create): Remove out of date comment.
3775 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3778 * ada-exp.y (write_var_from_sym): Pass extra parameter when
3779 updating innermost block.
3780 * parse.c (innermost_block_tracker::update): Take extra type
3781 parameter, and check types match before updating innermost block.
3782 (write_dollar_variable): Update innermost block for registers.
3783 * parser-defs.h (enum innermost_block_tracker_type): New enum.
3784 (innermost_block_tracker::innermost_block_tracker): Initialise
3786 (innermost_block_tracker::reset): Take type parameter.
3787 (innermost_block_tracker::update): Take type parameter, and pass
3788 type through as needed.
3789 (innermost_block_tracker::m_types): New member.
3790 * varobj.c (varobj_create): Pass type when reseting innermost
3793 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3795 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
3796 * ada-lang.c (resolve_subexp): Likewise.
3797 * breakpoint.c (set_breakpoint_condition) Likewise.
3798 (watch_command_1) Likewise.
3799 * c-exp.y (variable): Likewise.
3800 * d-exp.y (PrimaryExpression): Likewise.
3801 * f-exp.y (variable): Likewise.
3802 * go-exp.y (variable): Likewise.
3803 * m2-exp.y (variable): Likewise.
3804 * objfiles.c (objfile::~objfile): Likewise.
3805 * p-exp.y (variable): Likewise.
3806 * parse.c (innermost_block): Change type.
3807 * parser-defs.h (class innermost_block_tracker): New.
3808 (innermost_block): Change to innermost_block_tracker.
3809 * printcmd.c (display_command): Switch to innermost_block API.
3810 (do_one_display): Likewise.
3811 * rust-exp.y (do_one_display): Likewise.
3812 * symfile.c (clear_symtab_users): Likewise.
3813 * varobj.c (varobj_create): Switch to innermost_block API, replace
3814 use of innermost_block with block stored on varobj object.
3816 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3818 * expression.h (innermost_block): Remove declaration.
3819 * varobj.c: Add 'parser-defs.h' include.
3821 2018-01-19 Tom Tromey <tom@tromey.com>
3823 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
3824 symbols in the static and global blocks.
3826 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3828 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
3829 gdb_ptrace.h, and move including gdb_wait.h ...
3830 * nat/linux-ptrace.h: ... to here.
3832 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3834 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
3835 inf_ptrace_detach_success.
3836 (inf_ptrace_detach_success): Add inferior parameter, use it
3837 instead of inferior_ptid, pass it to detach_inferior.
3838 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
3840 * inferior.c (detach_inferior): Add overload that takes an
3842 * inferior.h (detach_inferior): Likewise.
3843 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
3844 use inferior_ptid, adjust call to inf_ptrace_detach_success.
3845 * linux-thread-db.c (thread_db_detach): Use inf parameter.
3847 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3849 * target.h (struct target_ops) <to_detach>: Add inferior
3851 (target_detach): Likewise.
3852 * target.c (dispose_inferior): Pass inferior down.
3853 (target_detach): Pass inferior down. Assert that it is equal to
3854 the current inferior.
3855 * aix-thread.c (aix_thread_detach): Pass inferior down.
3856 * corefile.c (core_file_command): Pass current_inferior() down.
3857 * corelow.c (core_detach): Add inferior parameter.
3858 * darwin-nat.c (darwin_detach): Likewise.
3859 * gnu-nat.c (gnu_detach): Likewise.
3860 * inf-ptrace.c (inf_ptrace_detach): Likewise.
3861 * infcmd.c (detach_command): Pass current_inferior() down to
3863 * infrun.c (follow_fork_inferior): Pass parent_inf to
3865 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
3867 * linux-nat.c (linux_nat_detach): Add inferior parameter.
3868 * linux-thread-db.c (thread_db_detach): Likewise.
3869 * nto-procfs.c (procfs_detach): Likewise.
3870 * procfs.c (procfs_detach): Likewise.
3871 * record.c (record_detach): Likewise.
3872 * record.h (struct inferior): Forward-declare.
3873 (record_detach): Add inferior parameter.
3874 * remote-sim.c (gdbsim_detach): Likewise.
3875 * remote.c (remote_detach_1): Likewise.
3876 (remote_detach): Likewise.
3877 (extended_remote_detach): Likewise.
3878 * sol-thread.c (sol_thread_detach): Likewise.
3879 * target-debug.h (target_debug_print_inferior_p): New macro.
3880 * target-delegates.c: Re-generate.
3881 * top.c (kill_or_detach): Pass inferior down to target_detach.
3882 * windows-nat.c (windows_detach): Add inferior parameter.
3884 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3886 * target.h (struct target_ops) <to_detach>: Remove args
3888 (target_detach): Likewise.
3889 * target.c (dispose_inferior): Adjust.
3890 (target_detach): Remove args parameter, adjust.
3891 * aix-thread.c (aix_thread_detach): Adjust.
3892 * corefile.c (core_file_command): Adjust.
3893 * corelow.c (core_detach): Adjust.
3894 * darwin-nat.c (darwin_detach): Adjust.
3895 * gnu-nat.c (gnu_detach): Adjust.
3896 * inf-ptrace.c (inf_ptrace_detach): Adjust.
3897 * infcmd.c (detach_command): Adjust
3898 * infrun.c (follow_fork_inferior): Adjust.
3899 (handle_vfork_child_exec_or_exit): Adjust.
3900 * linux-fork.c (linux_fork_detach): Remove args parameter.
3901 * linux-fork.h (linux_fork_detach): Likewise.
3902 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
3903 * linux-thread-db.c (thread_db_detach): Likewise.
3904 * nto-procfs.c (procfs_detach): Likewise.
3905 * procfs.c (procfs_detach): Likewise.
3906 (do_detach): Remove signo parameter.
3907 * record.c (record_detach): Remove args parameter.
3908 * record.h (record_detach): Likewise.
3909 * remote-sim.c (gdbsim_detach): Likewise.
3910 * remote.c (remote_detach_1): Likewise.
3911 (remote_detach): Likewise.
3912 (extended_remote_detach): Likewise.
3913 * sol-thread.c (sol_thread_detach): Likewise.
3914 * target-delegates.c: Re-generate.
3915 * top.c (struct qt_args) <args>: Remove field.
3916 (kill_or_detach): Don't pass args.
3917 (quit_force): Don't set args.
3918 * windows-nat.c (windows_detach): Remove args parameter.
3920 2018-01-19 Yao Qi <yao.qi@linaro.org>
3922 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
3923 (arm_linux_init_abi): Install it.
3925 2018-01-19 Yao Qi <yao.qi@linaro.org>
3927 * osabi.c (gdb_osabi_names): Extend the regexp for
3928 arm-linux-gnueabihf.
3930 2018-01-18 Yao Qi <yao.qi@linaro.org>
3932 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
3934 (abbrev_table::add_abbrev): Update.
3935 (abbrev_table::lookup_abbrev): Update.
3937 2018-01-18 Yao Qi <yao.qi@linaro.org>
3939 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
3941 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
3943 * compile/compile.c (compile_to_object): Convert "triplet_rx"
3946 2018-01-17 Tom Tromey <tom@tromey.com>
3948 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
3950 2018-01-17 Tom Tromey <tom@tromey.com>
3952 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
3953 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
3954 (create_array_type_with_stride): Update.
3955 * dwarf2read.c (set_die_type): Update.
3957 2018-01-17 Tom Tromey <tom@tromey.com>
3959 * dwarf2read.c (delayed_method_info): Remove typedef.
3960 (dwarf2_cu::method_info): Now a std::vector.
3961 (add_to_method_list): Update.
3962 (free_delayed_list): Remove.
3963 (compute_delayed_physnames): Update.
3964 (process_full_comp_unit, process_full_type_unit): Clear the method
3965 list. Remove cleanups.
3966 (psymtab_include_file_name): Add name_holder parameter. Use
3968 (dwarf_decode_lines): Update.
3970 2018-01-17 Tom Tromey <tom@tromey.com>
3971 Simon Marchi <simon.marchi@ericsson.com>
3973 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
3974 (dwarf2_per_objfile::free_cached_comp_units)
3975 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3976 (init_cutu_and_read_dies_no_follow): Update.
3977 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
3978 (dwarf2_cu::~dwarf2_cu): New.
3979 (free_heap_comp_unit, free_stack_comp_unit): Remove.
3980 (age_cached_comp_units, free_one_cached_comp_unit): Update.
3982 2018-01-17 Tom Tromey <tom@tromey.com>
3983 Simon Marchi <simon.marchi@ericsson.com>
3985 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
3986 (struct die_reader_specs) <abbrev_table>: New member.
3987 (struct abbrev_table): Add constructor.
3988 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
3989 <abbrev_obstack>: Now an auto_obstack.
3990 (abbrev_table_up): New typedef.
3991 (init_cu_die_reader): Add abbrev_table parameter.
3992 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
3993 Add result_dwo_abbrev_table.
3994 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3995 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
3997 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
3999 (skip_children): Update.
4000 (abbrev_table::alloc_abbrev): Rename from
4001 abbrev_table_alloc_abbrev.
4002 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
4003 (abbrev_table::lookup_abbrev): Rename from
4004 abbrev_table_lookup_abbrev.
4005 (abbrev_table_read_table): Return abbrev_table_up.
4006 (abbrev_table_free, abbrev_table_free_cleanup)
4007 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
4008 (load_partial_dies): Update.
4010 2018-01-17 Tom Tromey <tom@tromey.com>
4012 * dwarf2read.c (dwarf2_compute_name): Update comment.
4013 (read_func_scope, read_variable): Update.
4014 (new_symbol): Remove.
4015 (new_symbol_full): Rename to new_symbol.
4017 2018-01-17 Mike Gulick <mgulick@mathworks.com>
4020 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
4021 a warning instead of throwing an error, set section size to 0 and return
4023 * gdb_bfd.h (gdb_bfd_map_section): Update description.
4025 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
4027 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
4029 (linux_ptrace_attach_fail_reason_string): Likewise.
4030 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
4032 (linux_ptrace_attach_fail_reason_string): Likewise.
4033 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
4035 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
4037 * linux-nat.c (linux_nat_attach): Remove xstrdup.
4039 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
4042 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
4043 checking for fs_base/gs_base fields in struct user_regs_struct.
4044 * configure: Regenerate.
4046 2018-01-17 Yao Qi <yao.qi@linaro.org>
4048 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
4050 (aarch64_linux_init_abi): Install it to gdbarch hook
4053 2018-01-15 Pedro Alves <palves@redhat.com>
4055 * common/signals-state-save-restore.c
4056 (save_original_signals_state): Fix typos.
4058 2017-01-12 Tom Tromey <tom@tromey.com>
4059 Sergio Durigan Junior <sergiodj@redhat.com>
4061 * Makefile.in (install-only): Install gdb-add-index.
4063 2018-01-12 John Baldwin <jhb@FreeBSD.org>
4065 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
4067 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4069 * infrun.c (keep_going_pass_signal): Clear step-over info when
4070 insert_breakpoints fails.
4072 2018-01-11 Pedro Alves <palves@redhat.com>
4075 * infrun.c (resume): Rename to ...
4076 (resume_1): ... this.
4077 (resume): Reimplement as wrapper around resume_1.
4079 2018-01-11 Pedro Alves <palves@redhat.com>
4082 * remote.c (remote_parse_stop_reply): Default to the last-set
4083 general thread instead of to 'magic_null_ptid'.
4085 2018-01-10 Pedro Alves <palves@redhat.com>
4087 * language.h (language_get_symbol_name_matcher): Rename ...
4088 (get_symbol_name_matcher): ... this.
4089 * language.c (language_get_symbol_name_matcher): Ditto.
4090 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
4093 2018-01-10 Pedro Alves <palves@redhat.com>
4097 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
4098 Adjust to use language_get_symbol_name_matcher instead of
4099 language_defn::la_get_symbol_name_matcher.
4100 * language.c (language_get_symbol_name_matcher): If in Ada mode
4101 and the lookup name is a verbatim match, return Ada's matcher.
4102 * language.h (language_get_symbol_name_matcher): Adjust comment.
4103 (ada_lookup_name_info::verbatim_p):: New method.
4105 2018-01-10 Pedro Alves <palves@redhat.com>
4108 * ada-lang.c (ada_collect_symbol_completion_matches): If the
4109 minsym's language is language_auto or language_cplus, pass down
4110 language_ada instead.
4111 * symtab.c (compare_symbol_name): Don't frob symbol language here.
4113 2018-01-10 Pedro Alves <palves@redhat.com>
4116 * minsyms.c (linkage_name_str): New function.
4117 (iterate_over_minimal_symbols): Use it.
4119 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4121 * NEWS: Document that 'info proc' now works on FreeBSD.
4123 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4125 * configure.ac: Check for kinfo_getfile in libutil.
4126 * configure: Regenerate.
4127 * config.in: Regenerate.
4128 * fbsd-nat.c: Include "fbsd-tdep.h".
4129 (fbsd_fetch_cmdline): New.
4130 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
4131 rather than calling error.
4132 (fbsd_info_proc): New.
4133 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
4134 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
4135 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
4137 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4139 * fbsd-nat.c (struct free_deleter): Remove.
4140 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
4142 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4144 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
4145 NULL for an empty pathname.
4147 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4149 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
4150 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
4151 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
4152 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
4153 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
4154 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
4155 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
4156 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
4157 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
4158 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
4159 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
4160 (fbsd_core_fetch_timeval, fbsd_print_sigset)
4161 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
4162 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
4163 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
4165 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
4167 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
4168 (gnu_xfer_auxv): New function.
4169 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
4172 2018-01-08 Yao Qi <yao.qi@linaro.org>
4173 Simon Marchi <simon.marchi@ericsson.com>
4175 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
4177 (COMMON_OBS): Remove selftest.o.
4178 * configure.ac: Append selftest-arch.c and common/selftest.c to
4179 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
4180 * configure: Re-generated.
4181 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
4183 (maintenance_info_selftests): Likewise.
4185 2018-01-08 Xavier Roirand <roirand@adacore.com>
4187 * ada-valprint.c (val_print_packed_array_elements): Use
4188 proper number of elements when printing an array indexed
4189 by an enumeration type.
4191 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4193 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
4194 (dw2_get_file_names_reader): Adjust.
4195 (lookup_dwo_signatured_type): Adjust.
4196 (lookup_dwp_signatured_type): Adjust.
4197 (lookup_signatured_type): Adjust.
4198 (create_type_unit_group): Adjust.
4199 (get_type_unit_group): Adjust.
4200 (process_psymtab_comp_unit_reader): Adjust.
4201 (build_type_psymtabs_reader): Adjust.
4202 (scan_partial_symbols): Adjust.
4203 (add_partial_symbol): Adjust.
4204 (add_partial_subprogram): Adjust.
4205 (peek_die_abbrev): Adjust.
4206 (fixup_go_packaging): Adjust.
4207 (process_imported_unit_die): Adjust.
4208 (dwarf2_compute_name): Adjust.
4209 (dwarf2_physname): Adjust.
4210 (read_import_statement): Adjust.
4211 (handle_DW_AT_stmt_list): Adjust.
4212 (read_file_scope): Adjust.
4213 (read_func_scope): Adjust.
4214 (read_lexical_block_scope): Adjust.
4215 (read_call_site_scope): Adjust.
4216 (read_variable): Adjust.
4217 (dwarf2_rnglists_process): Adjust.
4218 (dwarf2_ranges_process): Adjust.
4219 (dwarf2_ranges_read): Adjust.
4220 (dwarf2_get_pc_bounds): Adjust.
4221 (dwarf2_record_block_ranges): Adjust.
4222 (dwarf2_add_field): Adjust.
4223 (dwarf2_add_member_fn): Adjust.
4224 (read_structure_type): Adjust.
4225 (process_structure_scope): Adjust.
4226 (read_enumeration_type): Adjust.
4227 (read_array_type): Adjust.
4228 (mark_common_block_symbol_computed): Adjust.
4229 (read_common_block): Adjust.
4230 (read_namespace_type): Adjust.
4231 (read_namespace): Adjust.
4232 (read_module_type): Adjust.
4233 (read_tag_pointer_type): Adjust.
4234 (read_tag_ptr_to_member_type): Adjust.
4235 (read_tag_string_type): Adjust.
4236 (read_subroutine_type): Adjust.
4237 (read_typedef): Adjust.
4238 (read_base_type): Adjust.
4239 (attr_to_dynamic_prop): Adjust.
4240 (read_subrange_type): Adjust.
4241 (read_unspecified_type): Adjust.
4242 (dwarf2_read_abbrevs): Adjust.
4243 (load_partial_dies): Adjust.
4244 (read_partial_die): Adjust.
4245 (find_partial_die): Adjust.
4246 (guess_partial_die_structure_name): Adjust.
4247 (fixup_partial_die): Adjust.
4248 (read_attribute_value): Adjust.
4249 (read_addr_index): Adjust.
4250 (read_addr_index_from_leb128): Adjust.
4251 (read_str_index): Adjust.
4252 (dwarf2_string_attr): Adjust.
4253 (get_debug_line_section): Adjust.
4254 (dwarf_decode_line_header): Adjust.
4255 (lnp_state_machine::check_line_address): Adjust.
4256 (dwarf_decode_lines_1): Adjust.
4257 (dwarf_decode_lines): Adjust.
4258 (dwarf2_start_symtab): Adjust.
4259 (var_decode_location): Adjust.
4260 (new_symbol_full): Adjust.
4261 (dwarf2_const_value_data): Adjust.
4262 (dwarf2_const_value_attr): Adjust.
4263 (dwarf2_const_value): Adjust.
4265 (die_containing_type): Adjust.
4266 (build_error_marker_type): Adjust.
4267 (lookup_die_type): Adjust.
4268 (guess_full_die_structure_name): Adjust.
4269 (anonymous_struct_prefix): Adjust.
4270 (determine_prefix): Adjust.
4271 (dwarf2_name): Adjust.
4272 (follow_die_ref_or_sig): Adjust.
4273 (follow_die_offset): Adjust.
4274 (follow_die_ref): Adjust.
4275 (follow_die_sig_1): Adjust.
4276 (follow_die_sig): Adjust.
4277 (get_signatured_type): Adjust.
4278 (get_DW_AT_signature_type): Adjust.
4279 (decode_locdesc): Adjust.
4280 (dwarf_decode_macros): Adjust.
4281 (cu_debug_loc_section): Adjust.
4282 (fill_in_loclist_baton): Adjust.
4283 (dwarf2_symbol_mark_computed): Adjust.
4284 (init_one_comp_unit): Don't assign
4285 dwarf2_cu::dwarf2_per_objfile.
4286 (set_die_type): Adjust.
4288 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4290 * dwarf2read.c (struct mapped_debug_names): Add constructor.
4291 <dwarf2_per_objfile>: New field.
4292 (dwarf2_per_objfile): Remove global.
4293 (get_dwarf2_per_objfile): New function.
4294 (set_dwarf2_per_objfile): New function.
4295 (dwarf2_build_psymtabs_hard): Change objfile parameter to
4297 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
4298 (read_abbrev_offset): Likewise.
4299 (read_indirect_string): Likewise.
4300 (read_indirect_line_string): Likewise.
4301 (read_indirect_string_at_offset): Likewise.
4302 (read_indirect_string_from_dwz): Likewise.
4303 (dwarf2_find_containing_comp_unit): Change objfile parameter to
4305 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
4306 (create_all_comp_units): Change objfile parameter to
4308 (create_all_type_units): Likewise.
4309 (process_queue): Add dwarf2_per_objfile parameter.
4310 (read_and_check_comp_unit_head): Likewise.
4311 (lookup_dwo_unit_in_dwp): Likewise.
4312 (get_dwp_file): Likewise.
4313 (process_cu_includes): Likewise.
4314 (struct free_dwo_file_cleanup_data): New struct.
4315 (dwarf2_has_info): Use get_dwarf2_per_objfile and
4316 set_dwarf2_per_objfile.
4317 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
4318 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
4319 context, adjust calls.
4320 (dw2_instantiate_symtab): Likewise.
4321 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
4322 (dw2_get_cu): Likewise.
4323 (create_cu_from_index_list): Change objfile parameter to
4325 (create_cus_from_index_list): Get dwarf2_per_objfile from
4326 context, adjust calls.
4327 (create_cus_from_index): Likewise.
4328 (create_signatured_type_table_from_index): Change objfile
4329 parameter to dwarf2_per_objfile.
4330 (create_signatured_type_table_from_debug_names): Change objfile
4331 parameter to dwarf2_per_objfile.
4332 (create_addrmap_from_index): Likewise.
4333 (create_addrmap_from_aranges): Likewise.
4334 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
4335 (dw2_setup): Remove.
4336 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
4338 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
4339 get_dwarf2_per_objfile.
4340 (dw2_forget_cached_source_info): Likewise.
4341 (dw2_map_symtabs_matching_filename): Likewise.
4342 (struct dw2_symtab_iterator) <index>: Remove.
4343 <dwarf2_per_objfile>: New field.
4344 (dw2_symtab_iter_init): Replace index parameter with
4346 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
4347 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
4348 (dw2_print_stats): Likewise.
4349 (dw2_dump): Likewise.
4350 (dw2_expand_symtabs_for_function): Likewise.
4351 (dw2_expand_all_symtabs): Likewise.
4352 (dw2_expand_symtabs_with_fullname): Likewise.
4353 (dw2_expand_marked_cus): Replace index and objfile parameters
4354 with dwarf2_per_objfile.
4355 (dw_expand_symtabs_matching_file_matcher): Add
4356 dwarf2_per_objfile parameter and adjust calls.
4357 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
4359 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
4360 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
4362 (create_cus_from_debug_names_list): Replace objfile parameter
4363 with dwarf2_per_objfile and adjust calls.
4364 (create_cus_from_debug_names): Likewise.
4365 (dwarf2_read_debug_names): Likewise.
4366 (mapped_debug_names::namei_to_name): Adjust call.
4367 (dw2_debug_names_iterator::next): Likewise.
4368 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
4369 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
4370 (dw2_debug_names_dump): Likewise.
4371 (dw2_debug_names_expand_symtabs_for_function): Likewise.
4372 (dw2_debug_names_expand_symtabs_matching): Likewise.
4373 (dwarf2_initialize_objfile): Likewise.
4374 (dwarf2_build_psymtabs): Likewise.
4375 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
4377 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
4378 (read_and_check_comp_unit_head): Likewise.
4379 (read_abbrev_offset): Likewise.
4380 (create_debug_type_hash_table): Likewise.
4381 (create_debug_types_hash_table): Likewise.
4382 (create_all_type_units): Replace objfile parameter with
4384 (add_type_unit): Add dwarf2_per_objfile parameter.
4385 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
4386 with dwarf2_per_objfile.
4387 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
4388 (lookup_dwp_signatured_type): Likewise.
4389 (lookup_signatured_type): Likewise.
4390 (read_cutu_die_from_dwo): Likewise.
4391 (init_tu_and_read_dwo_dies): Likewise.
4392 (init_cutu_and_read_dies): Likewise.
4393 (init_cutu_and_read_dies_no_follow): Likewise.
4394 (allocate_type_unit_groups_table): Add objfile parameter.
4395 (create_type_unit_group): Use dwarf2_per_objfile from cu.
4396 (get_type_unit_group): Likewise.
4397 (process_psymtab_comp_unit): Update call.
4398 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
4399 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
4400 (print_tu_stats): Likewise.
4401 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
4403 (build_type_psymtabs): Change objfile parameter to
4405 (process_skeletonless_type_unit): Use dwarf2_per_objfile
4406 passed in void* parameter.
4407 (process_skeletonless_type_units): Change objfile parameter to
4409 (set_partial_user): Likewise.
4410 (dwarf2_build_psymtabs_hard): Likewise.
4411 (read_comp_units_from_section): Likewise.
4412 (create_all_comp_units): Likewise.
4413 (scan_partial_symbols): Update calls.
4414 (add_partial_symbol): Likewise.
4415 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
4416 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
4417 (process_queue): Add dwarf2_per_objfile parameter.
4418 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
4419 (compute_compunit_symtab_includes): Likewise.
4420 (process_cu_includes): Add dwarf2_per_objfile parameter.
4421 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
4422 (process_full_type_unit): Likewise.
4423 (process_imported_unit_die): Update call.
4424 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
4425 (read_file_scope): Likewise.
4426 (allocate_dwo_file_hash_table): Add objfile parameter.
4427 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
4428 (create_cus_hash_table): Likewise.
4429 (create_dwp_hash_table): Likewise.
4430 (create_dwo_unit_in_dwp_v1): Likewise.
4431 (create_dwp_v2_section): Likewise.
4432 (create_dwo_unit_in_dwp_v2): Likewise.
4433 (lookup_dwo_unit_in_dwp): Likewise.
4434 (try_open_dwop_file): Likewise.
4435 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
4436 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
4437 cleanup to include a reference to dwarf2_per_objfile.
4438 (open_dwp_file): Add dwarf2_per_objfile parameter.
4439 (open_and_init_dwp_file): Likewise.
4440 (get_dwp_file): Likewise.
4441 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
4442 (queue_and_load_all_dwo_tus): Update call.
4443 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
4445 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
4446 (dwarf2_ranges_process): Likewise.
4447 (dwarf2_get_pc_bounds): Likewise.
4448 (mark_common_block_symbol_computed): Likewise.
4449 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
4450 (dwarf2_read_abbrevs): Update call.
4451 (read_partial_die): Use dwarf2_per_objfile from cu.
4452 (find_partial_die): Likewise.
4453 (fixup_partial_die): Likewise.
4454 (read_attribute_value): Likewise.
4455 (read_indirect_string_at_offset_from): Add objfile parameter.
4456 (read_indirect_string_at_offset): Add dwarf2_per_objfile
4458 (read_indirect_string_from_dwz): Add objfile parameter.
4459 (read_indirect_string): Add objfile parameter.
4460 (read_addr_index_1): Add dwarf2_per_objfile parameter.
4461 (read_addr_index): Use dwarf2_per_objfile from cu.
4462 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
4464 (read_str_index): Use dwarf2_per_objfile from cu.
4465 (get_debug_line_section): Likewise.
4466 (read_formatted_entries): Add dwarf2_per_objfile parameter.
4467 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
4468 (new_symbol_full): Use dwarf2_per_objfile from cu.
4469 (build_error_marker_type): Likewise.
4470 (lookup_die_type): Likewise.
4471 (determine_prefix): Likewise.
4472 (follow_die_offset): Likewise.
4473 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
4474 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
4475 (dwarf2_fetch_die_type_sect_off): Likewise.
4476 (dwarf2_get_die_type): Likewise.
4477 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
4478 (get_signatured_type): Likewise.
4479 (get_DW_AT_signature_type): Likewise.
4480 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
4481 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
4482 (cu_debug_loc_section): Likewise.
4483 (fill_in_loclist_baton): Likewise.
4484 (dwarf2_symbol_mark_computed): Likewise.
4485 (dwarf2_find_containing_comp_unit): Change objfile parameter to
4487 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
4489 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
4490 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
4491 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
4492 (set_die_type): Use dwarf2_free_objfile from cu.
4493 (get_die_type_at_offset): Likewise.
4494 (dwarf2_per_objfile_free): Don't assign global variable.
4495 (debug_names) <constructor>: Add dwarf2_per_objfile
4496 parameter, update m_debugstrlookup construction.
4497 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
4499 <m_dwarf2_per_objfile>: New field.
4500 <lookup>: Use m_dwarf2_per_objfile.
4501 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
4502 (psyms_seen_size): Likewise.
4503 (write_gdbindex): Replace objfile parameter with
4505 (write_debug_names): Likewise.
4506 (write_psymtabs_to_index): Likewise.
4507 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
4510 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4512 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
4513 <dwarf2_per_objfile>: New field.
4514 (struct dwarf2_per_cu_data) <objfile>: Remove.
4515 <dwarf2_per_objfile>: New field.
4516 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
4518 (create_signatured_type_table_from_index): Likewise.
4519 (create_debug_type_hash_table): Likewise.
4520 (fill_in_sig_entry_from_dwo_entry): Likewise.
4521 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
4522 (create_type_unit_group): Assign dwarf2_per_objfile instead of
4524 (create_partial_symtab): Access objfile through
4526 (process_psymtab_comp_unit_reader): Likewise.
4527 (read_comp_units_from_section): Likewise.
4528 (scan_partial_symbols): Likewise.
4529 (add_partial_symbol): Likewise.
4530 (add_partial_subprogram): Likewise.
4531 (peek_die_abbrev): Likewise.
4532 (fixup_go_packaging): Likewise.
4533 (process_full_comp_unit): Likewise.
4534 (process_full_type_unit): Likewise.
4535 (process_imported_unit_die): Likewise.
4536 (dwarf2_compute_name): Likewise.
4537 (dwarf2_physname): Likewise.
4538 (read_import_statement): Likewise.
4539 (create_cus_hash_table): Assign dwarf2_physname instead of
4541 (read_func_scope): Access objfile through dwarf2_per_objfile.
4542 (read_lexical_block_scope): Likewise.
4543 (read_call_site_scope): Likewise.
4544 (read_variable): Likewise.
4545 (dwarf2_rnglists_process): Likewise.
4546 (dwarf2_ranges_process): Likewise.
4547 (dwarf2_ranges_read): Likewise.
4548 (dwarf2_record_block_ranges): Likewise.
4549 (dwarf2_add_field): Likewise.
4550 (dwarf2_add_member_fn): Likewise.
4551 (read_structure_type): Likewise.
4552 (process_structure_scope): Likewise.
4553 (read_enumeration_type): Likewise.
4554 (read_array_type): Likewise.
4555 (read_common_block): Likewise.
4556 (read_namespace_type): Likewise.
4557 (read_namespace): Likewise.
4558 (read_module_type): Likewise.
4559 (read_tag_pointer_type): Likewise.
4560 (read_tag_ptr_to_member_type): Likewise.
4561 (read_tag_string_type): Likewise.
4562 (read_subroutine_type): Likewise.
4563 (read_typedef): Likewise.
4564 (read_base_type): Likewise.
4565 (attr_to_dynamic_prop): Likewise.
4566 (read_subrange_type): Likewise.
4567 (read_unspecified_type): Likewise.
4568 (load_partial_dies): Likewise.
4569 (read_partial_die): Likewise.
4570 (find_partial_die): Likewise.
4571 (guess_partial_die_structure_name): Likewise.
4572 (fixup_partial_die): Likewise.
4573 (read_attribute_value): Likewise.
4574 (read_addr_index_from_leb128): Likewise.
4575 (dwarf2_read_addr_index): Likewise.
4576 (dwarf2_string_attr): Likewise.
4577 (lnp_state_machine::check_line_address): Likewise.
4578 (dwarf_decode_lines_1): Likewise.
4579 (dwarf_decode_lines): Likewise.
4580 (dwarf2_start_symtab): Likewise.
4581 (var_decode_location): Likewise.
4582 (new_symbol_full): Likewise.
4583 (dwarf2_const_value_data): Likewise.
4584 (dwarf2_const_value_attr): Likewise.
4585 (dwarf2_const_value): Likewise.
4586 (die_type): Likewise.
4587 (die_containing_type): Likewise.
4588 (lookup_die_type): Likewise.
4589 (guess_full_die_structure_name): Likewise.
4590 (anonymous_struct_prefix): Likewise.
4591 (dwarf2_name): Likewise.
4592 (follow_die_ref_or_sig): Likewise.
4593 (follow_die_offset): Likewise.
4594 (follow_die_ref): Likewise.
4595 (dwarf2_fetch_die_loc_sect_off): Likewise.
4596 (dwarf2_fetch_constant_bytes): Likewise.
4597 (dwarf2_fetch_die_type_sect_off): Likewise.
4598 (dwarf2_get_die_type): Likewise.
4599 (follow_die_sig): Likewise.
4600 (decode_locdesc): Likewise.
4601 (dwarf2_per_cu_objfile): Likewise.
4602 (dwarf2_per_cu_text_offset): Likewise.
4603 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
4605 (set_die_type): Access objfile through
4608 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4610 * valprint.c (converted_character_d): Remove typedef.
4611 (DEF_VEC_O (converted_character_d)): Remove.
4612 (count_next_character): Use std::vector.
4613 (print_converted_chars_to_obstack): Likewise.
4614 (generic_printstr): Likewise.
4616 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4618 * xml-support.h (struct gdb_xml_value): Add constructor.
4619 <value>: Change type to unique_xmalloc_ptr.
4620 (gdb_xml_value_s): Remove typedef.
4621 (DEF_VEC_O (gdb_xml_value_s)): Remove.
4622 (gdb_xml_element_start_handler): Change parameter type to
4624 (xml_find_attribute): Likewise.
4625 * xml-support.c (xml_find_attribute): Change parameter type to
4626 std::vector and adjust.
4627 (gdb_xml_values_cleanup): Remove.
4628 (gdb_xml_parser::start_element): Adjust to std::vector.
4629 (xinclude_start_include): Change paraeter type to std::vector
4631 * btrace.c (check_xml_btrace_version): Likewise.
4632 (parse_xml_btrace_block): Likewise.
4633 (parse_xml_btrace_pt_config_cpu): Likewise.
4634 (parse_xml_btrace_pt): Likewise.
4635 (parse_xml_btrace_conf_bts): Likewise.
4636 (parse_xml_btrace_conf_pt): Likewise.
4637 * memory-map.c (memory_map_start_memory): Likewise.
4638 (memory_map_start_property): Likewise.
4639 * osdata.c (osdata_start_osdata): Likewise.
4640 (osdata_start_item): Likewise.
4641 (osdata_start_column): Likewise.
4642 * remote.c (start_thread): Likewise.
4643 * solib-aix.c (library_list_start_library): Likewise.
4644 (library_list_start_list): Likewise.
4645 * solib-svr4.c (library_list_start_library): Likewise.
4646 (svr4_library_list_start_list): Likewise.
4647 * solib-target.c (library_list_start_segment): Likewise.
4648 (library_list_start_section): Likewise.
4649 (library_list_start_library): Likewise.
4650 (library_list_start_list): Likewise.
4651 * tracepoint.c (traceframe_info_start_memory): Likewise.
4652 (traceframe_info_start_tvar): Likewise.
4653 * xml-syscall.c (syscall_start_syscall): Likewise.
4654 * xml-tdesc.c (tdesc_start_target): Likewise.
4655 (tdesc_start_feature): Likewise.
4656 (tdesc_start_reg): Likewise.
4657 (tdesc_start_union): Likewise.
4658 (tdesc_start_struct): Likewise.
4659 (tdesc_start_flags): Likewise.
4660 (tdesc_start_enum): Likewise.
4661 (tdesc_start_field): Likewise.
4662 (tdesc_start_enum_value): Likewise.
4663 (tdesc_start_vector): Likewise.
4665 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4667 * extension.h (struct xmethod_worker) <clone>: Remove.
4668 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
4670 (python_xmethod_worker::clone): Remove.
4671 * valops.c (find_overload_match): Use std::move instead of
4674 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4676 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
4677 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
4678 <free_xmethod_worker_data>: Remove.
4679 <get_matching_xmethod_workers>: Chance VEC to std::vector.
4680 <get_xmethod_arg_types>: Remove.
4681 <get_xmethod_result_type>: Remove.
4682 <invoke_xmethod>: Remove.
4683 * extension.c (new_xmethod_worker): Remove.
4684 (clone_xmethod_worker): Remove.
4685 (get_matching_xmethod_workers): Return void, pass std::vector by
4687 (get_xmethod_arg_types): Rename to...
4688 (xmethod_worker::get_arg_types): ... this, and adjust.
4689 (get_xmethod_result_type): Rename to...
4690 (xmethod_worker::get_result_type): ... this, and adjust.
4691 (invoke_xmethod): Remove.
4692 (free_xmethod_worker): Remove.
4693 (free_xmethod_worker_vec): Remove.
4694 * extension.h (enum ext_lang_rc): Move here from
4696 (struct xmethod_worker): Add constructor and destructor.
4699 <invoke, clone, do_get_result_type, do_get_arg_types>: New
4700 virtual pure methods.
4701 <get_arg_types, get_result_type>: New methods.
4702 (xmethod_worker_ptr): Remove typedef.
4703 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
4704 (xmethod_worker_vec): Remove typedef.
4705 (xmethod_worker_up): New typedef.
4706 (invoke_xmethod): Remove.
4707 (clone_xmethod_worker): Remove.
4708 (free_xmethod_worker): Remove.
4709 (free_xmethod_worker_vec): Remove.
4710 (get_xmethod_arg_types): Remove.
4711 (get_xmethod_result_type): Remove.
4712 * valops.c (find_method_list): Use std::vector, don't use
4713 intermediate vector.
4714 (value_find_oload_method_list): Use std::vector.
4715 (find_overload_match): Use std::vector.
4716 (find_oload_champ): Use std::vector.
4717 * value.c (value_free): Use operator delete.
4718 (value_of_xmethod): Rename to...
4719 (value_from_xmethod): ... this. Don't assign
4720 xmethod_worker::value, take rvalue-reference.
4721 (result_type_of_xmethod): Adjust.
4722 (call_xmethod): Adjust.
4723 * value.h: Include extension.h.
4724 (struct xmethod_worker): Don't forward-declare.
4725 (value_of_xmethod): Rename to...
4726 (value_from_xmethod): ... this, take rvalue-reference.
4727 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
4728 (struct python_xmethod_worker): ... this, add constructor and
4730 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
4731 (gdbpy_free_xmethod_worker_data): Rename to...
4732 (python_xmethod_worker::~python_xmethod_worker): ... this and
4734 (gdbpy_clone_xmethod_worker_data): Rename to...
4735 (python_xmethod_worker::clone): ... this and adjust.
4736 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
4738 (gdbpy_get_xmethod_arg_types): Rename to...
4739 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
4740 (gdbpy_get_xmethod_result_type): Rename to...
4741 (python_xmethod_worker::do_get_result_type): ... this and
4743 (gdbpy_invoke_xmethod): Rename to...
4744 (python_xmethod_worker::invoke): ... this and adjust.
4745 (new_python_xmethod_worker): Rename to...
4746 (python_xmethod_worker::python_xmethod_worker): ... this and
4748 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
4750 (gdbpy_free_xmethod_worker_data): Remove.
4751 (gdbpy_get_matching_xmethod_workers): Use std::vector.
4752 (gdbpy_get_xmethod_arg_types): Remove.
4753 (gdbpy_get_xmethod_result_type): Remove.
4754 (gdbpy_invoke_xmethod): Remove.
4755 * python/python.c (python_extension_ops): Remove obsolete
4758 2018-01-05 Pedro Alves <palves@redhat.com>
4761 * common/signals-state-save-restore.c
4762 (save_original_signals_state): New parameter 'quiet'. Warn if we
4763 find a custom handler preinstalled, instead of internal erroring.
4764 But only warn if !quiet.
4765 * common/signals-state-save-restore.h
4766 (save_original_signals_state): New parameter 'quiet'.
4767 * main.c (captured_main_1): Move save_original_signals_state call
4768 after option handling, and pass QUIET.
4770 2018-01-05 Pedro Alves <palves@redhat.com>
4772 * spu-tdep.c (spu_catch_start): Pass
4773 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
4775 2018-01-05 Pedro Alves <palves@redhat.com>
4778 * ada-lang.c (literal_symbol_name_matcher): New function.
4779 (ada_get_symbol_name_matcher): Use it for
4780 symbol_name_match_type::SEARCH_NAME.
4781 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
4782 it down instead of assuming symbol_name_match_type::FULL.
4783 * block.h (block_lookup_symbol): New parameter 'match_type'.
4784 * c-valprint.c (print_unpacked_pointer): Use
4785 lookup_symbol_search_name instead of lookup_symbol.
4786 * compile/compile-object-load.c (get_out_value_type): Pass down
4787 symbol_name_match_type::SEARCH_NAME.
4788 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
4789 symbol_name_match_type::FULL.
4790 * cp-support.c (cp_get_symbol_name_matcher): Handle
4791 symbol_name_match_type::SEARCH_NAME.
4792 * infrun.c (insert_exception_resume_breakpoint): Use
4793 lookup_symbol_search_name.
4794 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
4795 * psymtab.c (maintenance_check_psymtabs): Use
4796 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
4797 * stack.c (print_frame_args): Use lookup_symbol_search_name and
4799 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
4800 if symbol_name_match_type::SEARCH_NAME.
4801 (lookup_symbol_in_language): Pass down
4802 symbol_name_match_type::FULL.
4803 (lookup_symbol_search_name): New.
4804 (lookup_language_this): Pass down
4805 symbol_name_match_type::SEARCH_NAME.
4806 (lookup_symbol_aux, lookup_local_symbol): New parameter
4807 'match_type'. Pass it down.
4808 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
4809 (lookup_symbol_search_name): New declaration.
4810 (lookup_symbol_in_block): New 'match_type' parameter.
4812 2018-01-05 Pedro Alves <palves@redhat.com>
4815 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
4817 (ada_lookup_symbol): Reimplement in terms of
4818 ada_lookup_symbol_list, bits factored out from
4819 ada_lookup_encoded_symbol.
4821 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4823 * ada-exp.y (write_object_renaming): When subscripting an array
4824 using a symbol as the index, pass the block in call to
4825 ada_lookup_encoded_symbol when looking that symbol up.
4827 2018-01-05 Jerome Guitton <guitton@adacore.com>
4829 * ada-lang.c (ada_array_length): Use ada_index_type instead of
4832 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4834 * ada-lang.c (ada_to_fixed_value_create): Add handling of
4835 the case where VALUE_LVAL (val0) is not lval_memory.
4837 2018-01-05 Xavier Roirand <roirand@adacore.com>
4839 * ada-valprint.c (print_optional_low_bound): Handle
4840 character-indexed array printing like boolean-indexed array
4843 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4845 * NEWS: Create a new section for the next release branch.
4846 Rename the section of the current branch, now that it has
4849 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4851 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
4852 * version.in: Bump version to 8.1.50.DATE-git.
4854 2018-01-03 Xavier Roirand <roirand@adacore.com>
4856 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
4858 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
4860 (default_exception_support_info) <catch_handlers_sym>: Add field.
4861 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
4862 (ada_exception_name_addr_1): Add "catch handlers" handling.
4863 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
4865 (create_excep_cond_exprs) <ex>: Add parameter.
4866 (re_set_exception): Update create_excep_cond_exprs call.
4867 (print_it_exception, print_one_exception, print_mention_exception)
4868 (print_recreate_exception): Add "catch handler" handling.
4869 (allocate_location_catch_handlers, re_set_catch_handlers)
4870 (check_status_catch_handlers, print_it_catch_handlers)
4871 (print_one_catch_handlers, print_mention_catch_handlers)
4872 (print_recreate_catch_handlers): New function.
4873 (catch_handlers_breakpoint_ops): New variable.
4874 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
4875 Add parameter. Add "catch handler" handling.
4876 (ada_exception_sym_name, ada_exception_breakpoint_ops):
4877 Add "catch handler" handling.
4878 (ada_exception_catchpoint_cond_string): Add "catch handler"
4880 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
4882 (catch_ada_handlers_command): New function.
4883 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
4884 operations structure.
4885 (_initialize_ada_language): Add "catch handlers" command entry.
4886 * NEWS: Document "catch handlers" feature.
4888 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4890 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
4891 account when creating the array type of the slice.
4892 (ada_value_slice): Likewise.
4894 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4896 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
4898 (create_array_type_with_stride): Add byte_stride_prop parameter.
4899 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
4900 New parameter. Update all callers in this file.
4901 (array_type_has_dynamic_stride): New function.
4902 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
4903 of arrays with dynamic byte strides.
4904 * dwarf2read.c (read_array_type): Add support for dynamic
4905 DW_AT_byte_stride attributes.
4907 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4909 * dwarf2read.c (read_unspecified_type): Treat
4910 DW_TAG_enumeration_type DIEs from Ada units as stubs.
4912 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4914 Update copyright year range in all GDB files.
4916 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4918 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
4919 and gdb/testsuite/gdb.base/step-line.c.
4921 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4923 * copyright.py (main): Dump the contents of
4924 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
4925 even if BY_HAND is empty.
4927 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4929 * top.c (print_gdb_version): Update Copyright year in version
4932 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4934 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
4936 For older changes see ChangeLog-2017.
4942 version-control: never