1 2018-07-20 Tom Tromey <tom@tromey.com>
3 * buildsym.h (EXTERN): Don't define or undef.
4 * buildsym.c (EXTERN): Don't define.
6 2018-07-20 Tom Tromey <tom@tromey.com>
8 * buildsym.c: Remove TODO comment.
10 2018-07-20 Tom Tromey <tom@tromey.com>
12 * coffread.c (coff_symtab_read): Update.
13 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
14 (xcoff_new_init): Update.
15 * mipsread.c (mipscoff_new_init): Update.
16 * mdebugread.c (mdebug_build_psymtabs): Update.
17 * elfread.c (elf_new_init): Update.
18 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
20 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
21 (coffstab_build_psymtabs, elfstab_build_psymtabs)
22 (stabsect_build_psymtabs): Update.
23 * buildsym.h (buildsym_init): Don't declare.
24 * buildsym.c: Update comment.
25 (prepare_for_building): Remove.
26 (start_symtab, restart_symtab): Update.
27 (reset_symtab_globals): Update comment.
28 (buildsym_init): Remove.
30 2018-07-20 Tom Tromey <tom@tromey.com>
32 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
33 * stabsread.c (patch_block_stabs, define_symbol, read_type)
34 (read_enum_type, common_block_start, common_block_end)
35 (cleanup_undefined_types_1, finish_global_stabs): Update.
36 * mdebugread.c (psymtab_to_symtab_1): Update.
37 * dwarf2read.c (fixup_go_packaging, read_func_scope)
38 (read_lexical_block_scope, new_symbol): Update.
39 * dbxread.c (process_one_symbol): Update.
40 * coffread.c (coff_symtab_read, process_coff_symbol)
41 (coff_read_enum_type): Update.
42 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
44 (get_local_symbols, get_file_symbols, get_global_symbols): New
46 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
48 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
49 (~scoped_free_pendings): Update.
50 (finish_block, prepare_for_building, reset_symtab_globals)
51 (end_symtab_get_static_block, end_symtab_with_blockvector)
52 (augment_type_symtab, push_context): Update.
53 (get_local_symbols, get_file_symbols, get_global_symbols): New
55 (buildsym_init): Update.
57 2018-07-20 Tom Tromey <tom@tromey.com>
59 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
60 (process_full_type_unit): Likewise.
61 (dwarf2_start_symtab): Set list_in_scope.
63 2018-07-20 Tom Tromey <tom@tromey.com>
65 * dwarf2read.c (process_psymtab_comp_unit_reader)
66 (build_type_psymtabs_reader): Do not set list_in_scope.
68 2018-07-20 Tom Tromey <tom@tromey.com>
70 * buildsym.c (free_pendings): Remove.
71 (add_symbol_to_list, scoped_free_pendings)
72 (finish_block_internal, buildsym_init): Update.
74 2018-07-20 Tom Tromey <tom@tromey.com>
76 * xcoffread.c (read_xcoff_symtab): Update.
77 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
79 * dbxread.c (process_one_symbol): Update.
80 * coffread.c (coff_symtab_read): Update.
81 * buildsym.h (finish_block): Update.
82 * buildsym.c (finish_block): Remove "listhead" argument.
83 (end_symtab_get_static_block): Update.
85 2018-07-20 Tom Tromey <tom@tromey.com>
87 * buildsym.h (class scoped_free_pendings): Remove constructor.
88 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
90 <m_pending_block_obstack, m_pending_blocks>: New members.
91 (pending_block_obstack, pending_blocks): Remove.
92 (scoped_free_pendings::scoped_free_pendings): Default.
93 (~scoped_free_pendings): Update.
94 (free_pending_blocks): Remove.
95 (finish_block_internal, record_pending_block, make_blockvector)
96 (end_symtab_get_static_block, augment_type_symtab, push_context)
97 (buildsym_init): Update.
99 2018-07-20 Tom Tromey <tom@tromey.com>
101 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
102 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
104 (pending_addrmap, pending_addrmap_obstack)
105 (pending_addrmap_interesting): Remove.
106 (scoped_free_pendings, record_block_range, make_blockvector)
107 (prepare_for_building, reset_symtab_globals, buildsym_init):
110 2018-07-20 Tom Tromey <tom@tromey.com>
112 * xcoffread.c (process_linenos): Update.
113 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
114 * mdebugread.c (psymtab_to_symtab_1): Update.
115 * dwarf2read.c (setup_type_unit_groups)
116 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
117 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
118 * dbxread.c (process_one_symbol): Update.
119 * coffread.c (coff_symtab_read, enter_linenos)
120 (process_coff_symbol): Update.
121 * buildsym.h (current_subfile): Don't declare.
122 (get_current_subfile): Declare.
123 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
125 (start_subfile, free_buildsym_compunit, push_subfile)
126 (prepare_for_building, start_symtab): Update.
127 (get_current_subfile): New function.
129 2018-07-20 Tom Tromey <tom@tromey.com>
131 * coffread.c (coff_symtab_read): Update.
132 * xcoffread.c (read_xcoff_symtab): Update.
133 * dwarf2read.c (new_symbol): Update.
134 (read_func_scope, read_lexical_block_scope): Update.
135 * dbxread.c (process_one_symbol): Update.
136 * buildsym.h (context_stack, context_stack_depth): Don't declare.
137 (outermost_context_p): Remove macro.
138 (outermost_context_p, get_current_context_stack)
139 (get_context_stack_depth): Declare.
140 (pop_context): Return struct context_stack.
141 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
143 (context_stack_size): Remove.
144 (INITIAL_CONTEXT_STACK_SIZE): Remove.
145 (prepare_for_building, end_symtab_get_static_block)
146 (augment_type_symtab, push_context): Update.
147 (pop_context): Return struct context_stack.
148 (outermost_context_p, get_current_context_stack)
149 (get_context_stack_depth): New functions.
150 (buildsym_init): Update.
152 2018-07-20 Tom Tromey <tom@tromey.com>
154 * rust-exp.y: Now a pure parser. Update all rules.
155 (%union): Move earlier.
156 (current_parser, work_obstack): Remove globals.
157 (rust_parser, ~rust_parser): Update.
158 (class rust_parser) <copy_name, concat3, crate_name, super_name,
159 lex_character, lex_number, lex_string, lex_identifier,
160 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
161 convert_name, convert_params_to_expression,
162 convert_ast_to_expression, ast_basic_type, ast_operation,
163 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
164 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
165 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
166 ast_array_type, ast_slice_type, ast_reference_type,
167 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
168 (rust_parse): Update.
169 (rustyyerror, rustyylex): Add parser parameter.
170 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
171 (rust_lex_stringish_test, rust_lex_test_sequence)
172 (rust_lex_test_trailing_dot, rust_lex_test_completion)
173 (rust_lex_test_push_back, rust_lex_tests): Update.
175 2018-07-19 Pedro Alves <palves@redhat.com>
177 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
178 gdb::unique_xmalloc_ptr.
179 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
180 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
181 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
183 * guile/scm-pretty-print.c (ppscm_print_children): Use
184 gdb::unique_xmalloc_ptr instead of cleanups.
185 (gdbscm_apply_val_pretty_printer): Remove cleanups.
186 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
187 gdb::unique_xmalloc_ptr.
188 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
189 Adjust to use gdb::unique_xmalloc_ptr.
190 * guile/scm-utils.c (extract_arg): Adjust.
191 * guile/scm-value.c (gdbscm_value_field): Adjust to use
192 gdb::unique_xmalloc_ptr instead of a cleanup.
194 2018-07-19 Tom Tromey <tom@tromey.com>
196 * utils.c (do_value_free_to_mark)
197 (make_cleanup_value_free_to_mark): Remove.
198 * utils.h (make_cleanup_value_free_to_mark): Remove.
200 2018-07-19 Pedro Alves <palves@redhat.com>
202 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
203 forwarding reference.
205 2018-07-18 Pedro Alves <palves@redhat.com>
207 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
208 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
211 2018-07-18 Pedro Alves <palves@redhat.com>
213 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
215 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
217 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
218 directly instead of a cleanup.
219 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
220 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
221 (vlscm_binop_gdbthrow): New, factored out from ...
222 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
223 (vlscm_rich_compare): Use gdbscm_wrap.
224 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
225 instead of a cleanup.
226 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
228 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
229 Use xfree directly instead of a cleanup.
230 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
231 Adjust to use gdbscm_wrap and scoped_value_mark.
232 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
233 (gdbscm_value_address, gdbscm_value_dereference)
234 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
236 (gdbscm_value_dynamic_type): Use scoped_value_mark.
237 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
239 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
240 gdbscm_wrap and scoped_value_mark.
241 (gdbscm_value_to_string): Use xfree directly instead of a
242 cleanup. Move 'buffer' unique_ptr to TRY scope.
243 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
244 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
246 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
247 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
249 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
252 2018-07-18 Tom de Vries <tdevries@suse.de>
254 * findvar.c (default_read_var_value): Also resolve dynamic type for
255 LOC_OPTIMIZED_OUT vars.
257 2018-07-18 Maciej W. Rozycki <macro@mips.com>
259 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
262 2018-07-17 Tom Tromey <tom@tromey.com>
264 * guile/scm-param.c (pascm_set_func, pascm_show_func)
265 (compute_enum_list, pascm_set_param_value_x)
266 (gdbscm_parameter_value): Update.
267 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
268 (gdbscm_scm_to_host_string): Update.
269 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
271 * guile/scm-cmd.c (cmdscm_add_completion): Update.
272 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
273 * guile/scm-string.c (gdbscm_scm_to_string): Return
275 (gdbscm_scm_to_host_string): Likewise.
277 2018-07-17 Tom Tromey <tom@tromey.com>
279 * guile/guile.c (gdbscm_eval_from_control_command): Update.
280 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
281 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
282 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
285 2018-07-17 Tom Tromey <tom@tromey.com>
287 * guile/scm-param.c (pascm_signal_setshow_error): Update.
288 * guile/guile-internal.h (gdbscm_exception_message_to_string):
290 * guile/scm-cmd.c (cmdscm_function): Update.
291 * guile/scm-pretty-print.c
292 (ppscm_print_exception_unless_memory_error): Update.
293 * guile/scm-exception.c (gdbscm_exception_message_to_string):
294 Return unique_xmalloc_ptr.
296 2018-07-17 Tom Tromey <tom@tromey.com>
298 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
301 2018-07-17 Jim Wilson <jimw@sifive.com>
303 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
304 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
305 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
306 unecessary braces after EF_RISCV_RVC test. Delete call to
307 set_gdbarch_decr_pc_after_break.
309 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
310 RISCV_LAST_FP_REGNUM + 1.
311 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
313 2018-07-17 Tom Tromey <tom@tromey.com>
315 * configure.ac: Remove --disable-gdbcli.
316 * configure: Rebuild.
317 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
318 (SUBDIR_CLI_CFLAGS): Remove.
319 (SFILES): Use SUBDIR_CLI_SRCS.
320 (COMMON_OBS): Use SUBDIR_CLI_OBS.
322 2018-07-17 Tom Tromey <tom@tromey.com>
325 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
327 2018-07-16 Jim Wilson <jimw@sifive.com>
329 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
331 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
333 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
335 (libunwind_frame_sniffer): Likewise.
336 (libunwind_frame_prev_register): Likewise.
337 (libunwind_sigtramp_frame_sniffer): Likewise.
338 * ia64-tdep.c (ia64_access_reg): Likewise.
339 (ia64_access_rse_reg): Likewise.
340 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
341 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
343 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
345 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
347 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
349 * remote-sim.c (gdbsim_target::close,
350 gdbsim_target::mourn_inferior): Remove unused variables.
352 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
354 * ia64-tdep.c (ktab_buf): New global.
355 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
356 (get_kernel_table): Adjust.
358 2018-07-16 Tom Tromey <tom@tromey.com>
360 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
361 * dwarf2read.c (using_directives, new_symbol): Use
363 * dbxread.c (process_one_symbol): Use outermost_context_p.
364 * coffread.c (coff_symtab_read): Use outermost_context_p.
366 2018-07-16 Tom Tromey <tom@tromey.com>
368 * dwarf2read.c (using_directives, read_func_scope)
369 (read_lexical_block_scope): Update.
370 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
371 * buildsym.h (local_using_directives, global_using_directives):
373 (get_local_using_directives, set_local_using_directives)
374 (get_global_using_directives): Declare.
375 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
376 m_global_using_directives>: New members.
377 (finish_block_internal, prepare_for_building)
378 (reset_symtab_globals, end_symtab_get_static_block)
379 (push_context): Update.
380 (get_local_using_directives, set_local_using_directives)
381 (get_global_using_directives): New functions.
382 (buildsym_init): Update.
384 2018-07-16 Tom Tromey <tom@tromey.com>
386 * xcoffread.c (xcoff_initial_scan): Don't call
388 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
389 * buildsym.h (class scoped_free_pendings): Add constructor.
390 (free_pending_blocks): Don't declare.
391 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
392 (free_pending_blocks): Now static.
394 2018-07-16 Tom Tromey <tom@tromey.com>
396 * buildsym.h (push_subfile, pop_subfile): Update declarations.
397 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
399 (struct subfile_stack): Remove.
400 (subfile_stack): Remove.
401 (push_subfile, pop_subfile, buildsym_init): Update.
403 2018-07-16 Tom Tromey <tom@tromey.com>
405 * buildsym.c (push_subfile): Use gdb_assert.
406 (pop_subfile): Use gdb_assert.
408 2018-07-16 Tom Tromey <tom@tromey.com>
410 * buildsym.h (merge_symbol_lists): Remove.
411 * buildsym.c (merge_symbol_lists): Remove.
413 2018-07-16 Tom Tromey <tom@tromey.com>
415 * stabsread.c (scan_file_globals): Update comment.
416 * stabsread.h (scan_file_globals): Move from buildsym.h.
417 * buildsym.h (scan_file_globals): Move to stabsread.h.
419 2018-07-16 Tom Tromey <tom@tromey.com>
421 * xcoffread.c (xcoff_new_init): Update.
422 * mipsread.c (mipscoff_new_init): Update.
423 * mdebugread.c (mdebug_build_psymtabs): Update.
424 * elfread.c (elf_new_init): Update.
425 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
426 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
427 * buildsym.h (buildsym_new_init): Don't declare.
428 * buildsym.c (buildsym_new_init): Remove.
430 2018-07-16 Tom Tromey <tom@tromey.com>
432 * stabsread.h (within_function): Move from buildsym.h.
433 * stabsread.c (start_stabs): Clear within_function.
434 * coffread.c (coff_start_symtab): Clear within_function.
435 * buildsym.h (within_function): Move to stabsread.h.
436 * buildsym.c (prepare_for_building): Update.
438 2018-07-16 Tom Tromey <tom@tromey.com>
440 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
441 * dwarf2read.c (dwarf2_start_symtab): Don't set
442 processing_gcc_compilation.
443 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
445 2018-07-16 Tom Tromey <tom@tromey.com>
447 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
448 (next_symbol_text_func): Move from buildsym.h.
449 * stabsread.c (hashname): Move from buildsym.c.
450 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
451 (next_symbol_text_func, hashname): Move to stabsread.h.
452 * buildsym.c: Don't include bcache.h
453 (hashname): Move to stasbread.c.
455 2018-07-16 Tom Tromey <tom@tromey.com>
457 * buildsym.h (context_stack_size): Don't declare.
458 * buildsym.c (context_stack_size): New global.
460 2018-07-16 Tom Tromey <tom@tromey.com>
462 * dbxread.c (processing_acc_compilation): New global.
463 * buildsym.h (processing_acc_compilation): Don't declare.
465 2018-07-16 Tom Tromey <tom@tromey.com>
467 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
468 * dbxread.c (read_ofile_symtab): Update.
469 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
470 * buildsym.h (last_source_start_addr): Remove.
471 (set_last_source_start_addr, get_last_source_start_addr):
473 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
475 (struct buildsym_compunit) <m_last_source_start_addr>: New
477 (prepare_for_building): Remove start_addr parameter.
478 (start_symtab, restart_symtab, end_symtab_get_static_block)
479 (end_symtab_with_blockvector): Update.
480 (set_last_source_start_addr, get_last_source_start_addr): New
483 2018-07-16 Tom Tromey <tom@tromey.com>
485 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
487 (have_line_numbers): Remove.
488 (record_line, prepare_for_building, end_symtab_get_static_block)
489 (augment_type_symtab): Update.
491 2018-07-16 Tom Tromey <tom@tromey.com>
493 * buildsym.c (~buildsym_compunit): Free the macro table.
494 (struct buildsym_compunit) <get_macro_table, release_macros>: New
496 <m_pending_macros>: New member.
497 (pending_macros): Remove.
498 (~scoped_free_pendings, get_macro_table, prepare_for_building)
499 (reset_symtab_globals, end_symtab_get_static_block)
500 (end_symtab_with_blockvector, augment_type_symtab)
501 (buildsym_init): Update.
503 2018-07-16 Tom Tromey <tom@tromey.com>
505 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
507 (buildsym_compunit::set_last_source_file): New method.
508 <m_last_source_file>: New member.
509 (prepare_for_building): Remove "name" parameter.
510 (start_symtab, restart_symtab, reset_symtab_globals): Update.
511 (last_source_file): Remove.
512 (set_last_source_file, get_last_source_file): Update.
514 2018-07-16 Tom Tromey <tom@tromey.com>
516 * buildsym.c (prepare_for_building): Add assert.
518 2018-07-16 Tom Tromey <tom@tromey.com>
520 * buildsym.c (~buildsym_compunit): Update.
521 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
522 (start_subfile, patch_subfile_names)
523 (end_symtab_with_blockvector): Update.
525 2018-07-16 Tom Tromey <tom@tromey.com>
527 * buildsym.c (struct buildsym_compunit): Add constructor,
528 destructor, initializers.
529 (start_buildsym_compunit): Remove.
530 (free_buildsym_compunit): Use "delete".
531 (start_symtab, restart_symtab): Use "new".
533 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
535 * symfile.c (set_objfile_default_section_offset): Remove struct
538 2018-07-14 Stafford Horne <shorne@gmail.com>
540 * (Responsible Maintainers): Add myself as or1k maintainer.
542 2018-07-13 Tom Tromey <tom@tromey.com>
544 * symfile.c (set_objfile_default_section_offset): Use extra braces
547 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
549 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
552 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
554 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
555 unittests/cli-utils-selftests.c
556 * unittests/cli-utils-selftests.c: New file.
558 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
560 * NEWS: Mention new commands. Mention change to 'thread apply'.
562 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
564 * thread.c (thr_try_catch_cmd): New function.
565 (thread_apply_all_command): Handle qcs flags.
566 (thread_apply_command): Handle qcs flags.
567 (taas_command): New function.
568 (tfaas_command): New function.
569 (_initialize_thread): Update to setup the new commands 'taas
570 and 'tfaas'. Change doc string for 'thread apply'.
572 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
574 * stack.c: (trailing_outermost_frame): New function, mostly
575 extracted from backtrace_command_1.
576 (leading_innermost_frame): New function.
577 (backtrace_command_1): Update to call trailing_outermost_frame.
578 (frame_apply_command_count): New function.
579 (frame_apply_level_command): New function.
580 (frame_apply_all_command): New function.
581 (frame_apply_command): New function.
582 (faas_command): New function.
583 (frame_cmd_list): New variable.
584 (_initialize_stack): Update to setup the new commands 'frame apply'
587 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
589 * cli-utils.c (number_or_range_parser::get_number): Only handle
590 numbers or convenience var as numbers.
591 (parse_flags): New function.
592 (parse_flags_qcs): New function.
593 (number_or_range_parser::finished): Ensure parsing end is detected
594 before end of string.
595 * cli-utils.h (parse_flags): New function.
596 (parse_flags_qcs): New function.
597 (number_or_range_parser): Remove m_finished bool.
598 (number_or_range_parser::skip_range): Set m_in_range to false.
600 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
602 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
605 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
606 Jan Kratochvil <jan.kratochvil@redhat.com>
607 Paul Fertser <fercerpav@gmail.com>
608 Tsutomu Seki <sekiriki@gmail.com>
609 Pedro Alves <palves@redhat.com>
611 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
612 'unittests/parse-connection-spec-selftests.c'.
613 (COMMON_SFILES): Add 'common/netstuff.c'.
614 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
615 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
616 * common/netstuff.c: New file.
617 * common/netstuff.h: New file.
618 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
619 (wait_for_connect): Update comment. New parameter
620 'gdb::optional<int> sock' instead of 'struct serial *scb'.
621 Use 'sock' directly instead of 'scb->fd'.
622 (try_connect): New function, with code from 'net_open'.
623 (net_open): Rewrite main loop to deal with multiple
624 sockets/addresses. Handle IPv6-style hostnames; implement
625 support for IPv6 connections.
626 * unittests/parse-connection-spec-selftests.c: New file.
628 2018-07-11 Pedro Alves <palves@redhat.com>
631 * remote.c (remote_target::remote_detach_pid): Call
634 2018-07-11 Pedro Alves <palves@redhat.com>
636 * h8300-tdep.c (h8300_gdbarch_init): Remove
637 set_gdbarch_ecoff_reg_to_regnum calls.
639 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
642 * c-typeprint.c (c_type_print_base_struct_union): Don't print
643 offsets/sizes for static members of a class/struct.
645 2018-07-11 Alan Hayward <alan.hayward@arm.com>
647 * target-descriptions.c (tdesc_register_bitsize): Rename.
648 * target-descriptions.h (tdesc_register_bitsize): Likewise.
649 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
650 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
652 2018-07-10 Tom Tromey <tom@tromey.com>
654 * breakpoint.c (moribund_locations): Now static and a
656 (breakpoint_init_inferior, moribund_breakpoint_here_p)
657 (build_bpstat_chain, update_global_location_list)
658 (breakpoint_retire_moribund): Update.
659 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
662 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
664 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
665 (riscv_register_reggroup_p): Use new function, remove unneeded
667 (riscv_push_dummy_call): Extend assert to compare against xlen or
668 flen based on register type.
670 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
672 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
674 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
676 * remote.c (show_hardware_watchpoint_limit): New function.
677 (show_hardware_watchpoint_length_limit): New function.
678 (show_hardware_breakpoint_limit): New function.
679 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
680 where appropriate, update help text.
682 2018-07-09 Tom Tromey <tom@tromey.com>
684 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
685 (CLIBS): Don't mention NAT_CLIBS.
687 2018-07-09 Tom Tromey <tom@tromey.com>
689 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
690 (LIBGDB_OBS, clean mostlyclean): Update.
691 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
693 2018-07-09 Tom Tromey <tom@tromey.com>
695 * Makefile.in (%.c: %.y): Use ECHO_YACC.
696 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
697 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
699 2018-07-09 Tom Tromey <tom@tromey.com>
701 * Makefile.in (ALLDEPFILES): Remove exec.c.
702 (COMMON_OBS): Remove exec.o.
703 (COMMON_SFILES): Add exec.c.
705 2018-07-09 Tom Tromey <tom@tromey.com>
707 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
709 2018-07-09 Tom Tromey <tom@tromey.com>
711 * Makefile.in (clean mostlyclean): Remove stamp-version.
712 (version.c): Depend on stamp-version.
713 (stamp-version): New rule, from version.c rule.
715 2018-07-09 Tom Tromey <tom@tromey.com>
717 * Makefile.in (init.c): Depend on stamp-init.
718 (stamp-init): New rule, from init.c rule.
719 (clean mostlyclean): Remove stamp-init.
721 2018-07-09 Tom Tromey <tom@tromey.com>
723 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
724 SUBDIR_GCC_COMPILE_SRCS.
726 2018-07-09 Tom Tromey <tom@tromey.com>
728 * Makefile.in (init.c): Remove some unused sed rules.
730 2018-07-09 Tom Tromey <tom@tromey.com>
732 * Makefile.in (TSOBS): Remove.
733 (INIT_FILES): Update.
734 (LIBGDB_OBS): Update.
735 (COMMON_SFILES): Add inflow.c.
736 (SFILES): Remove inflow.c.
738 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
740 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
742 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
744 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
745 get_saveloc_name, is_signal_frame_name, step_name,
746 init_remote_name, create_addr_space_name,
747 destroy_addr_space_name, search_unwind_table_name,
748 find_dyn_list_name): Constify.
750 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
752 * darwin-nat.c (darwin_pthread_kill): New function.
753 (darwin_resume_thread): Use darwin_pthread_kill.
755 2018-07-05 Tom de Vries <tdevries@suse.de>
757 * macroexp.c (macro_buffer) <operator=>: New member function.
759 2018-07-04 Tom Tromey <tom@tromey.com>
761 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
763 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
765 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
766 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
770 2018-07-04 Joel Brobecker <brobecker@adacore.com>
772 * NEWS: Create a new section for the next release branch.
773 Rename the section of the current branch, now that it has
776 2018-07-04 Joel Brobecker <brobecker@adacore.com>
778 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
779 * version.in: Bump version to 8.2.50.DATE-git.
781 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
782 Pedro Alves <palves@redhat.com>
784 * linux-nat.c (linux_init_ptrace): Rename to ...
785 (linux_init_ptrace_procfs): ... this. Call
786 linux_proc_init_warnings.
787 (linux_nat_target::post_attach)
788 (linux_nat_target::post_startup_inferior): Adjust.
789 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
790 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
792 2018-07-04 Tom de Vries <tdevries@suse.de>
794 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
796 (read_comp_unit_head): ... here.
798 2018-07-03 Tom Tromey <tom@tromey.com>
800 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
801 (stop_tracing, tstatus_command)
802 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
803 (print_one_static_tracepoint_marker): Update.
804 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
806 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
808 (all_tracepoints, static_tracepoints_here): Return std::vector.
810 2018-07-03 Tom Tromey <tom@tromey.com>
812 * common/ptid.c (ptid_equal): Remove.
813 * common/ptid.h (ptid_equal): Don't declare.
814 * ada-tasks.c: Update.
815 * breakpoint.c: Update.
816 * common/agent.c: Update.
818 * darwin-nat-info.c: Update.
819 * darwin-nat.c: Update.
821 * dtrace-probe.c: Update.
822 * dummy-frame.c: Update.
823 * fbsd-nat.c: Update.
825 * gdbthread.h: Update.
827 * go32-nat.c: Update.
828 * inf-loop.c: Update.
829 * inf-ptrace.c: Update.
834 * linux-fork.c: Update.
835 * linux-nat.c: Update.
836 * linux-thread-db.c: Update.
837 * mi/mi-cmd-var.c: Update.
838 * mi/mi-interp.c: Update.
839 * mi/mi-main.c: Update.
840 * nto-procfs.c: Update.
841 * ppc-linux-tdep.c: Update.
843 * python/py-inferior.c: Update.
844 * python/py-record-btrace.c: Update.
845 * python/py-record.c: Update.
846 * ravenscar-thread.c: Update.
847 * regcache.c: Update.
848 * remote-sim.c: Update.
850 * sol-thread.c: Update.
853 * tui/tui-stack.c: Update.
855 * windows-nat.c: Update.
856 * windows-tdep.c: Update.
858 2018-07-03 Tom Tromey <tom@tromey.com>
860 * common/ptid.c (ptid_match): Remove.
861 * common/ptid.h (ptid_match): Don't declare.
862 * fbsd-nat.c: Update.
865 * linux-nat.c: Update.
866 * record-btrace.c: Update.
867 * regcache.c: Update.
870 2018-07-03 Tom Tromey <tom@tromey.com>
872 * common/ptid.c (ptid_tid_p): Remove.
873 * common/ptid.h (ptid_tid_p): Don't declare.
874 * sol-thread.c: Update.
876 2018-07-03 Tom Tromey <tom@tromey.com>
878 * common/ptid.c (ptid_lwp_p): Remove.
879 * common/ptid.h (ptid_lwp_p): Don't declare.
880 * fbsd-nat.c: Update.
881 * linux-nat.c: Update.
882 * nat/linux-procfs.c: Update.
883 * nat/x86-linux-dregs.c: Update.
884 * sol-thread.c: Update.
886 2018-07-03 Tom Tromey <tom@tromey.com>
888 * common/ptid.c (ptid_is_pid): Remove.
889 * common/ptid.h (ptid_is_pid): Don't declare.
891 * linux-nat.c: Update.
892 * mi/mi-interp.c: Update.
896 2018-07-03 Tom Tromey <tom@tromey.com>
898 * common/ptid.c (ptid_get_tid): Remove.
899 * common/ptid.h (ptid_get_tid): Don't declare.
900 * ada-tasks.c: Update.
901 * aix-thread.c: Update.
902 * bsd-uthread.c: Update.
903 * darwin-nat.c: Update.
904 * fbsd-nat.c: Update.
905 * i386-darwin-nat.c: Update.
907 * linux-tdep.c: Update.
908 * nto-procfs.c: Update.
909 * ppc-ravenscar-thread.c: Update.
910 * python/py-infthread.c: Update.
911 * ravenscar-thread.c: Update.
912 * sol-thread.c: Update.
913 * sparc-ravenscar-thread.c: Update.
914 * windows-nat.c: Update.
916 2018-07-03 Tom Tromey <tom@tromey.com>
918 * common/ptid.c (ptid_get_lwp): Remove.
919 * common/ptid.h (ptid_get_lwp): Don't declare.
920 * aarch64-linux-nat.c: Update.
921 * ada-tasks.c: Update.
922 * aix-thread.c: Update.
923 * amd64-linux-nat.c: Update.
924 * arm-linux-nat.c: Update.
926 * fbsd-nat.c: Update.
927 * fbsd-tdep.c: Update.
929 * i386-cygwin-tdep.c: Update.
930 * i386-gnu-nat.c: Update.
931 * i386-linux-nat.c: Update.
932 * ia64-linux-nat.c: Update.
933 * inf-ptrace.c: Update.
935 * linux-fork.c: Update.
936 * linux-nat.c: Update.
937 * linux-tdep.c: Update.
938 * linux-thread-db.c: Update.
939 * mips-linux-nat.c: Update.
940 * nat/aarch64-linux-hw-point.c: Update.
941 * nat/aarch64-linux.c: Update.
942 * nat/linux-btrace.c: Update.
943 * nat/linux-osdata.c: Update.
944 * nat/linux-procfs.c: Update.
945 * nat/x86-linux-dregs.c: Update.
946 * obsd-nat.c: Update.
947 * ppc-fbsd-nat.c: Update.
948 * ppc-linux-nat.c: Update.
950 * python/py-infthread.c: Update.
951 * ravenscar-thread.c: Update.
953 * s390-linux-nat.c: Update.
954 * sol-thread.c: Update.
955 * sol2-tdep.c: Update.
956 * spu-linux-nat.c: Update.
957 * x86-linux-nat.c: Update.
958 * xtensa-linux-nat.c: Update.
960 2018-07-03 Tom Tromey <tom@tromey.com>
962 * common/ptid.c (ptid_get_pid): Remove.
963 * common/ptid.h (ptid_get_pid): Don't declare.
964 * aarch64-linux-nat.c: Update.
965 * ada-lang.c: Update.
966 * aix-thread.c: Update.
967 * alpha-bsd-nat.c: Update.
968 * amd64-fbsd-nat.c: Update.
969 * amd64-linux-nat.c: Update.
970 * arm-linux-nat.c: Update.
971 * arm-nbsd-nat.c: Update.
973 * break-catch-syscall.c: Update.
974 * breakpoint.c: Update.
975 * bsd-uthread.c: Update.
978 * darwin-nat.c: Update.
979 * fbsd-nat.c: Update.
980 * fbsd-tdep.c: Update.
983 * hppa-nbsd-nat.c: Update.
984 * hppa-obsd-nat.c: Update.
985 * i386-fbsd-nat.c: Update.
986 * ia64-linux-nat.c: Update.
987 * inf-ptrace.c: Update.
989 * inferior.c: Update.
990 * inferior.h: Update.
993 * linux-fork.c: Update.
994 * linux-nat.c: Update.
995 * linux-tdep.c: Update.
996 * linux-thread-db.c: Update.
997 * m68k-bsd-nat.c: Update.
998 * mi/mi-interp.c: Update.
999 * mi/mi-main.c: Update.
1000 * mips-linux-nat.c: Update.
1001 * mips-nbsd-nat.c: Update.
1002 * mips64-obsd-nat.c: Update.
1003 * nat/aarch64-linux-hw-point.c: Update.
1004 * nat/aarch64-linux.c: Update.
1005 * nat/linux-btrace.c: Update.
1006 * nat/linux-osdata.c: Update.
1007 * nat/linux-procfs.c: Update.
1008 * nat/x86-linux-dregs.c: Update.
1009 * nto-procfs.c: Update.
1010 * obsd-nat.c: Update.
1011 * ppc-linux-nat.c: Update.
1012 * ppc-nbsd-nat.c: Update.
1013 * ppc-obsd-nat.c: Update.
1014 * proc-service.c: Update.
1016 * python/py-inferior.c: Update.
1017 * python/py-infthread.c: Update.
1018 * ravenscar-thread.c: Update.
1020 * remote-sim.c: Update.
1022 * rs6000-nat.c: Update.
1023 * s390-linux-nat.c: Update.
1024 * sh-nbsd-nat.c: Update.
1025 * sol-thread.c: Update.
1026 * sparc-nat.c: Update.
1027 * sparc64-tdep.c: Update.
1028 * spu-linux-nat.c: Update.
1029 * spu-tdep.c: Update.
1030 * target-debug.h: Update.
1033 * tid-parse.c: Update.
1034 * tracefile-tfile.c: Update.
1035 * vax-bsd-nat.c: Update.
1036 * windows-nat.c: Update.
1037 * x86-linux-nat.c: Update.
1038 * x86-nat.c: Update.
1040 2018-07-03 Tom Tromey <tom@tromey.com>
1042 * common/ptid.c (pid_to_ptid): Remove.
1043 * common/ptid.h (pid_to_ptid): Don't declare.
1044 * aix-thread.c: Update.
1045 * arm-linux-nat.c: Update.
1046 * common/ptid.c: Update.
1047 * common/ptid.h: Update.
1048 * corelow.c: Update.
1050 * darwin-nat.c: Update.
1051 * fbsd-nat.c: Update.
1052 * fork-child.c: Update.
1053 * gnu-nat.c: Update.
1054 * go32-nat.c: Update.
1055 * inf-ptrace.c: Update.
1057 * inferior.c: Update.
1059 * linux-fork.c: Update.
1060 * linux-nat.c: Update.
1061 * nat/aarch64-linux-hw-point.c: Update.
1062 * nat/fork-inferior.c: Update.
1063 * nat/x86-linux-dregs.c: Update.
1064 * nto-procfs.c: Update.
1065 * obsd-nat.c: Update.
1067 * progspace.c: Update.
1069 * rs6000-nat.c: Update.
1070 * s390-linux-nat.c: Update.
1071 * sol-thread.c: Update.
1072 * spu-linux-nat.c: Update.
1075 * tracefile-tfile.c: Update.
1076 * windows-nat.c: Update.
1078 2018-07-03 Tom Tromey <tom@tromey.com>
1080 * common/ptid.h (ptid_build): Don't declare.
1081 * common/ptid.c (ptid_build): Remove.
1082 * aix-thread.c: Update.
1083 * bsd-kvm.c: Update.
1084 * bsd-uthread.c: Update.
1085 * common/agent.c: Update.
1086 * common/ptid.c: Update.
1087 * common/ptid.h: Update.
1088 * corelow.c: Update.
1089 * darwin-nat.c: Update.
1090 * fbsd-nat.c: Update.
1091 * gnu-nat.c: Update.
1092 * linux-fork.c: Update.
1093 * linux-nat.c: Update.
1094 * linux-thread-db.c: Update.
1095 * nat/linux-osdata.c: Update.
1096 * nat/linux-procfs.c: Update.
1097 * nto-procfs.c: Update.
1098 * obsd-nat.c: Update.
1099 * proc-service.c: Update.
1101 * ravenscar-thread.c: Update.
1102 * remote-sim.c: Update.
1104 * sol-thread.c: Update.
1106 * windows-nat.c: Update.
1108 2018-07-03 Tom Tromey <tom@tromey.com>
1110 * infrun.c (follow_exec): Use exit_inferior_silent.
1111 * inferior.c (exit_inferior_num_silent): Remove.
1112 * inferior.h (exit_inferior_num_silent): Don't declare.
1114 2018-07-03 Tom Tromey <tom@tromey.com>
1117 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1118 inferior_ptid on error.
1120 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1121 Simon Marchi <simon.marchi@polymtl.ca>
1124 * disasm.h (gdb_disassembler): Add
1125 `m_disassembler_options_holder'. member
1126 * disasm.c (get_all_disassembler_options): New function.
1127 (gdb_disassembler::gdb_disassembler): Use it.
1128 (gdb_buffered_insn_length_init_dis): Likewise.
1129 (gdb_buffered_insn_length): Adjust accordingly.
1130 (set_disassembler_options): Handle options with arguments.
1131 (show_disassembler_options_sfunc): Likewise. Add a leading new
1132 line if showing options with descriptions.
1133 (disassembler_options_completer): Adapt to using the
1134 `disasm_options_and_args_t' structure.
1135 * mips-tdep.c (mips_disassembler_options): New variable.
1136 (mips_disassembler_options_o32): Likewise.
1137 (mips_disassembler_options_n32): Likewise.
1138 (mips_disassembler_options_n64): Likewise.
1139 (gdb_print_insn_mips): Don't set `disassembler_options'.
1140 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1142 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1143 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1144 `gdbarch_disassembler_options_implicit' and
1145 `gdbarch_valid_disassembler_options'.
1146 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1147 `disasm_options_and_args_t' structure.
1148 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1150 (valid_disassembler_options): Switch from `disasm_options_t' to
1151 the `disasm_options_and_args_t' structure.
1152 * NEWS: Document `set disassembler-options' support for the MIPS
1154 * gdbarch.h: Regenerate.
1155 * gdbarch.c: Regenerate.
1157 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1159 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1161 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1163 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1164 parameter in call to amd64_target_description.
1165 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1166 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1167 (amd64fbsd_init_abi): Likewise.
1168 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1169 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1170 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1171 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1173 2018-06-29 Pedro Alves <palves@redhat.com>
1175 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1176 "segments" parameter.
1177 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1178 (_initialize_amd64_tdep): Update call to
1179 amd64_create_target_description.
1180 (amd64_target_description): Add "segments" parameter. Adjust
1181 the implementation to use it.
1182 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1183 call to amd64_create_target_description.
1184 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1185 * gdb/arch/amd64.h (amd64_create_target_description): Add
1186 "segments" register.
1187 * gdb/arch/amd64.c (amd64_create_target_description): Add
1188 "segments" parameter. Call create_feature_i386_64bit_segments
1189 only if SEGMENTS is true.
1190 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1191 call to amd64_create_target_description.
1193 2018-06-29 Pedro Alves <palves@redhat.com>
1195 * thread.c (thread_target_id_str): New, factored out from ...
1196 (print_thread_info_1): ... here. Use it to compute the max
1197 "Target Id" column width.
1199 2018-06-29 Pedro Alves <palves@redhat.com>
1201 * remote.c (remote_target::extra_thread_info): Delete
1202 'display_buf' and 'n' locals. from the cache, regardless of
1203 packet mechanims is in use. Use cache for qThreadExtra and qP
1206 2018-06-29 Pedro Alves <palves@redhat.com>
1208 * blockframe.c (find_pc_sect_containing_function): New function.
1209 * breakpoint.c (print_breakpoint_location): Don't call
1210 find_pc_sect_function.
1211 * linespec.c (create_sals_line_offset): Record the location's
1213 * linespec.c (convert_address_location_to_sals): Fill in sal's
1214 symbol with find_pc_sect_containing_function.
1215 * symtab.c (find_function_start_sal): Rename to ...
1216 (find_function_start_sal_1): ... this.
1217 (find_function_start_sal): Reimplement as wrapper around
1218 find_function_start_sal_1, and use
1219 find_pc_sect_containing_function to fill in the sal's symbol.
1220 (find_function_start_sal(symbol*, bool)): Adjust.
1221 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1223 (find_pc_sect_containing_function): Declare.
1225 2018-06-29 Pedro Alves <palves@redhat.com>
1227 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1228 true if the the location has no symbol.
1230 2018-06-28 Tom Tromey <tom@tromey.com>
1232 * NEWS: Mention --enable-codesign.
1233 * silent-rules.mk (ECHO_SIGN): New variable.
1234 * configure.ac: Add --enable-codesign.
1235 * configure: Rebuild.
1236 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1237 (gdb$(EXEEXT)): Optionally invoke codesign.
1239 2018-06-28 Pedro Alves <palves@redhat.com>
1241 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1243 (switch_to_thread_no_regs): Adjust comment.
1244 * infcmd.c (stop_pc): Delete.
1245 (post_create_inferior, info_program_command): Replace references
1246 to stop_pc with references to thread_info->suspend.stop_pc.
1247 * inferior.h (stop_pc): Delete declaration.
1248 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1249 (handle_inferior_event_1, handle_signal_stop)
1250 (process_event_stop_test, keep_going_stepped_thread)
1251 (handle_step_into_function, handle_step_into_function_backward)
1252 (print_stop_location): Replace references to stop_pc with
1253 references to thread_info->suspend.stop_pc.
1254 (struct infcall_suspend_state) <stop_pc>: Delete field.
1255 (save_infcall_suspend_state, restore_infcall_suspend_state):
1256 Remove references to inf_stat->stop_pc.
1257 * linux-fork.c (fork_load_infrun_state): Likewise.
1258 * record-btrace.c (record_btrace_set_replay): Likewise.
1259 * record-full.c (record_full_goto_entry): Likewise.
1260 * remote.c (print_one_stopped_thread): Likewise.
1261 * target.c (target_resume): Extend comment.
1262 * thread.c (set_executing_thread): New.
1263 (set_executing): Use it.
1264 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1265 Remove references to stop_pc.
1267 2018-06-28 Pedro Alves <palves@redhat.com>
1269 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1270 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1272 2018-06-28 Tom Tromey <tom@tromey.com>
1274 * coffread.c (coff_symfile_finish): Update.
1275 * xcoffread.c (xcoff_symfile_finish): Update.
1276 * elfread.c (elf_symfile_finish): Update.
1277 * symfile.h (dwarf2_free_objfile): Don't declare.
1278 * dwarf2read.c (_initialize_dwarf2_read): Use
1279 register_objfile_data_with_cleanup.
1280 (dwarf2_free_objfile): Now static. Change signature.
1282 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1284 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1285 option "-o" to add-symbol-file-load to add an offset to each
1286 section's load address.
1287 * symfile.c (set_objfile_default_section_offset): New function.
1289 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1291 * symfile.c (add_symbol_file_command): Make sure that sections
1292 with the same name are sorted in the same order.
1294 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1296 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1297 require the second argument. If omitted, load sections at the
1298 addresses specified in the file.
1300 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1302 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1303 (_initialize_symfile): Add option "-o" to symbol-file to add an
1304 offset to each section of the symbol file.
1306 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1308 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1310 2018-06-27 Tom Tromey <tom@tromey.com>
1312 * stack.c (_initialize_stack): Update "func" help text.
1314 2018-06-27 Tom Tromey <tom@tromey.com>
1316 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1318 (unwind_infopy_str, pyuw_create_unwind_info)
1319 (unwind_infopy_add_saved_register, pyuw_sniffer)
1320 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1322 (struct saved_reg): Add constructor.
1323 <value>: Now a gdbpy_ref<>.
1325 2018-06-27 Tom Tromey <tom@tromey.com>
1327 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1329 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1331 * gdb-gdb.py.in: Format using autopep8.
1333 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1335 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1336 (type_lookup_function): Recognize CORE_ADDR values.
1338 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1340 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1343 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1345 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1348 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1350 * gdb-gdb.py: Move to...
1351 * gdb-gdb.py.in: ... here.
1352 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1353 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1355 (distclean): Remove gdb-gdb.py when cleaning.
1356 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1357 * configure: Re-generate.
1359 2018-06-27 Pedro Alves <palves@redhat.com>
1361 * proc-service.c (get_ps_regcache): New.
1362 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1363 (ps_lsetfpregs): Use it.
1365 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1368 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1369 (dwarf_decode_lines_1): Adjust.
1371 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1373 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1375 <info_proc>: Likewise.
1377 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1379 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1380 to windows_fetch_one_register, and only handle the case of
1381 fetching one register. Move the code that reloads the context
1382 and iterates over all registers if R is negative to...
1383 (windows_nat_target::fetch_registers): ... here.
1384 (do_windows_store_inferior_registers): Rename to
1385 windows_store_one_register, and only handle the case of storing
1386 one register. Move the code that handles the case where r is
1388 (windows_nat_target::store_registers) ... here.
1390 2018-06-26 Tom Tromey <tom@tromey.com>
1393 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1394 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1396 (rust_internal_print_type): Add podata parameter.
1397 (rust_print_type): Update.
1399 2018-06-26 Tom Tromey <tom@tromey.com>
1401 * typeprint.h (struct print_offset_data) <update, finish,
1402 maybe_print_hole>: New methods.
1403 <indentation>: New constant.
1404 * typeprint.c (print_offset_data::indentation): Define.
1405 (print_offset_data::maybe_print_hole, print_offset_data::update)
1406 (print_offset_data::finish): Move from c-typeprint.c and rename.
1407 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1408 (print_spaces_filtered_with_print_options): Update.
1409 (c_print_type_union_field_offset, maybe_print_hole)
1410 (c_print_type_struct_field_offset): Move to typeprint.c and
1412 (c_type_print_base_struct_union): Update.
1414 2018-06-25 Pedro Alves <palves@redhat.com>
1416 * gdbthread.h (thread_info_ref, delete_thread)
1417 (delete_thread_silent, first_thread_of_inferior)
1418 (any_thread_of_inferior, switch_to_thread)
1419 (enable_thread_stack_temporaries)
1420 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1421 (get_last_thread_stack_temporary)
1422 (value_in_thread_stack_temporaries, can_access_registers_thread):
1423 Spell out "struct thread_info" instead of just "thread_info".
1424 * inferior.h (notice_new_inferior): Likewise.
1426 2018-06-25 Pedro Alves <palves@redhat.com>
1428 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1429 pass thread_info pointer to delete_thread.
1430 (windows_nat_target::detach): Pass inferior pointer to
1432 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1434 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1435 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1436 and pass a thread_info pointer to delete_thread.
1437 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1438 pass thread_info pointer to delete_thread.
1439 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1440 delete_thread_silent call.
1441 * procfs.c (procfs_target::detach): Pass inferior pointer to
1443 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1444 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1445 delete_thread_silent call.
1446 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1447 pass thread_info pointer to delete_thread.
1448 (windows_nat_target::detach): Pass inferior pointer to
1451 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1453 * regcache.c (readable_regcache::read_part): Fix asserts.
1454 (reg_buffer::raw_collect_part): New function.
1455 (regcache::write_part): Fix asserts.
1456 (reg_buffer::raw_supply_part): New function.
1457 (regcache::transfer_regset_register): New helper function.
1458 (regcache::transfer_regset): Call new functions.
1459 (regcache_supply_regset): Use gdb_byte*.
1460 (regcache::supply_regset): Likewise.
1461 (regcache_collect_regset): Likewise.
1462 (regcache::collect_regset): Likewise.
1463 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1464 (reg_buffer::raw_supply_part): Likewise.
1465 (regcache::transfer_regset_register): Likewise.
1466 (regcache::transfer_regset): Use gdb_byte*.
1468 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1470 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1472 2018-06-21 Pedro Alves <palves@redhat.com>
1474 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1475 instead of a ptid_t. All callers adjusted.
1476 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1478 (print_ada_task_info, display_current_task_id, task_command_1):
1480 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1482 (breakpoint_kind): Adjust.
1483 (remove_breakpoints_pid): Rename to ...
1484 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1485 pointer. All callers adjusted.
1486 (bpstat_clear_actions): Use inferior_thread.
1487 (get_bpstat_thread): New.
1488 (bpstat_do_actions): Use it.
1489 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1490 to take a thread_info pointer. All callers adjusted.
1491 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1492 (breakpoint_re_set_thread): Use inferior_thread.
1493 * breakpoint.h (struct inferior): Forward declare.
1494 (bpstat_stop_status): Update.
1495 (remove_breakpoints_pid): Delete.
1496 (remove_breakpoints_inf): New.
1497 * bsd-uthread.c (bsd_uthread_target::wait)
1498 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1499 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1500 (maint_btrace_packet_history_cmd)
1501 (maint_btrace_clear_packet_history_cmd): Adjust.
1502 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1504 * cli/cli-interp.c: Include "inferior.h".
1505 * common/refcounted-object.h (struct
1506 refcounted_object_ref_policy): New.
1507 * compile/compile-object-load.c: Include gdbthread.h.
1508 (store_regs): Use inferior_thread.
1509 * corelow.c (core_target::close): Use current_inferior.
1510 (core_target_open): Adjust to use first_thread_of_inferior and use
1511 the current inferior.
1512 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1513 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1514 <thread>: ... this new field. All references adjusted.
1515 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1516 Take a thread_info pointer instead of a ptid_t.
1517 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1518 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1519 thread_info pointer instead of a ptid_t.
1520 * elfread.c: Include "inferior.h".
1521 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1522 Use inferior_thread.
1523 * eval.c (evaluate_subexp): Likewise.
1524 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1526 * gdb_proc_service.h (struct thread_info): Forward declare.
1527 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1528 <thread>: ... this new field. All references adjusted.
1529 * gdbarch.h, gdbarch.c: Regenerate.
1530 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1531 'thread' parameter. All implementations and callers adjusted.
1532 * gdbthread.h (thread_info) <set_running>: New method.
1533 (delete_thread, delete_thread_silent): Take a thread_info pointer
1535 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1536 (first_thread_of_process): Delete, replaced by ...
1537 (first_thread_of_inferior): ... this new function. All callers
1539 (any_live_thread_of_process): Delete, replaced by ...
1540 (any_live_thread_of_inferior): ... this new function. All callers
1542 (switch_to_thread, switch_to_no_thread): Declare.
1543 (is_executing): Delete.
1544 (enable_thread_stack_temporaries): Update comment.
1545 <enable_thread_stack_temporaries>: Take a thread_info pointer
1546 instead of a ptid_t. Incref the thread.
1547 <~enable_thread_stack_temporaries>: Decref the thread.
1550 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1551 (get_last_thread_stack_temporary)
1552 (value_in_thread_stack_temporaries, can_access_registers_thread):
1553 Take a thread_info pointer instead of a ptid_t. All callers
1555 * infcall.c (get_call_return_value): Use inferior_thread.
1556 (run_inferior_call): Work with thread pointers instead of ptid_t.
1557 (call_function_by_hand_dummy): Work with thread pointers instead
1558 of ptid_t. Use thread_info_ref.
1559 * infcmd.c (proceed_thread_callback): Access thread's state
1561 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1562 access thread's state directly.
1563 (continue_command): Use inferior_thread.
1564 (info_program_command): Use find_thread_ptid and access thread
1566 (proceed_after_attach_callback): Use thread state directly.
1567 (notice_new_inferior): Take a thread_info pointer instead of a
1568 ptid_t. All callers adjusted.
1569 (exit_inferior): Take an inferior pointer instead of a pid. All
1571 (exit_inferior_silent): New.
1572 (detach_inferior): Delete.
1573 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1574 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1575 (detach_inferior_command, kill_inferior_command): Use
1576 find_inferior_id instead of valid_gdb_inferior_id and
1577 gdb_inferior_id_to_pid.
1578 (inferior_command): Use inferior and thread pointers.
1579 * inferior.h (struct thread_info): Forward declare.
1580 (notice_new_inferior): Take a thread_info pointer instead of a
1581 ptid_t. All callers adjusted.
1582 (detach_inferior): Delete declaration.
1583 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1584 instead of a pid. All callers adjusted.
1585 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1586 (valid_gdb_inferior_id): Delete.
1587 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1588 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1589 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1591 <inf>: ... this new field.
1592 <step_ptid>: Delete, replaced by ...
1593 <step_thread>: ... this new field.
1594 (get_displaced_stepping_state): Take an inferior pointer instead
1595 of a pid. All callers adjusted.
1596 (displaced_step_in_progress_any_inferior): Adjust.
1597 (displaced_step_in_progress_thread): Take a thread pointer instead
1598 of a ptid_t. All callers adjusted.
1599 (displaced_step_in_progress, add_displaced_stepping_state): Take
1600 an inferior pointer instead of a pid. All callers adjusted.
1601 (get_displaced_step_closure_by_addr): Adjust.
1602 (remove_displaced_stepping_state): Take an inferior pointer
1603 instead of a pid. All callers adjusted.
1604 (displaced_step_prepare_throw, displaced_step_prepare)
1605 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1606 All callers adjusted.
1607 (start_step_over): Adjust.
1608 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1609 displaced step queue.
1610 (do_target_resume): Adjust.
1611 (fetch_inferior_event): Use inferior_thread.
1612 (context_switch, get_inferior_stop_soon): Take an
1613 execution_control_state pointer instead of a ptid_t. All callers
1615 (switch_to_thread_cleanup): Delete.
1616 (stop_all_threads): Use scoped_restore_current_thread.
1617 * inline-frame.c: Include "gdbthread.h".
1618 (inline_state) <inline_state>: Take a thread pointer instead of a
1619 ptid_t. All callers adjusted.
1620 <ptid>: Delete, replaced by ...
1621 <thread>: ... this new field.
1622 (find_inline_frame_state): Take a thread pointer instead of a
1623 ptid_t. All callers adjusted.
1624 (skip_inline_frames, step_into_inline_frame)
1625 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1626 pointer instead of a ptid_t. All callers adjusted.
1627 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1628 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1629 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1631 * linux-nat.c (get_detach_signal): Likewise.
1632 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1633 (thread_db_notice_clone): Adjust.
1634 (thread_db_find_new_threads_silently)
1635 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1636 a thread pointer instead of a ptid_t. All callers adjusted.
1637 * mi/mi-cmd-var.c: Include "inferior.h".
1638 (mi_cmd_var_update_iter): Update to use thread pointers.
1639 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1641 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1643 (mi_output_running): ... this new function.
1644 (mi_on_resume_1): Adjust to use it.
1645 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1646 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1648 (interrupt_thread_callback): : Adjust to use thread and inferior
1650 * proc-service.c: Include "gdbthread.h".
1651 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1652 * progspace-and-thread.c: Include "inferior.h".
1653 * progspace.c: Include "inferior.h".
1654 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1655 hold a reference to an inferior_object.
1656 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1658 * python/py-inferior.c (struct inferior_object): Give the type a
1659 tag name instead of a typedef.
1660 (python_on_normal_stop): No need to check if the current thread is
1662 (inferior_to_inferior_object): Change return type to
1663 inferior_object. All callers adjusted.
1664 (find_thread_object): Delete, bits factored out to ...
1665 (thread_to_thread_object): ... this new function.
1666 * python/py-infthread.c (create_thread_object): Use
1667 inferior_to_inferior_object.
1668 (thpy_is_stopped): Use thread pointer directly.
1669 (gdbpy_selected_thread): Use inferior_thread.
1670 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1671 field, replaced with ...
1672 <thread>: ... this new field. All users adjusted.
1673 (btpy_insn_or_gap_new): Drop const.
1674 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1676 * python/py-record.c: Include "gdbthread.h".
1677 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1678 a ptid_t. All callers adjusted.
1679 (gdbpy_current_recording): Use inferior_thread.
1680 * python/py-record.h (recpy_record_object) <ptid>: Delete
1681 field, replaced with ...
1682 <thread>: ... this new field. All users adjusted.
1683 (recpy_element_object) <ptid>: Delete
1684 field, replaced with ...
1685 <thread>: ... this new field. All users adjusted.
1686 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1687 a ptid_t. All callers adjusted.
1688 * python/py-threadevent.c: Include "gdbthread.h".
1689 (get_event_thread): Use thread_to_thread_object.
1690 * python/python-internal.h (struct inferior_object): Forward
1692 (find_thread_object, find_inferior_object): Delete declarations.
1693 (thread_to_thread_object, inferior_to_inferior_object): New
1695 * record-btrace.c: Include "inferior.h".
1696 (require_btrace_thread): Use inferior_thread.
1697 (record_btrace_frame_sniffer)
1698 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1699 (get_thread_current_frame): Use scoped_restore_current_thread and
1701 (get_thread_current_frame): Use thread pointer directly.
1702 (record_btrace_replay_at_breakpoint): Use thread's inferior
1704 * record-full.c: Include "inferior.h".
1705 * regcache.c: Include "gdbthread.h".
1706 (get_thread_arch_regcache): Use the inferior's address space
1708 (get_thread_regcache, registers_changed_thread): New.
1709 * regcache.h (get_thread_regcache(thread_info *thread)): New
1711 (registers_changed_thread): New.
1712 (remote_target) <remote_detach_1>: Swap order of parameters.
1713 (remote_add_thread): <remote_add_thread>: Return the new thread.
1714 (get_remote_thread_info(ptid_t)): New overload.
1715 (remote_target::remote_notice_new_inferior): Use thread pointers
1717 (remote_target::process_initial_stop_replies): Use
1718 thread_info::set_running.
1719 (remote_target::remote_detach_1, remote_target::detach)
1720 (extended_remote_target::detach): Adjust.
1721 * stack.c (frame_show_address): Use inferior_thread.
1722 * target-debug.h (target_debug_print_thread_info_pp): New.
1723 * target-delegates.c: Regenerate.
1724 * target.c (default_thread_address_space): Delete.
1725 (memory_xfer_partial_1): Use current_inferior.
1726 (target_detach): Use current_inferior.
1727 (target_thread_address_space): Delete.
1728 (generic_mourn_inferior): Use current_inferior.
1729 * target.h (struct target_ops) <thread_address_space>: Delete.
1730 (target_thread_address_space): Delete.
1731 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1733 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1734 thread pointer instead of a ptid_t. Adjust all callers.
1735 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1736 (first_thread_of_process): Delete, replaced by ...
1737 (first_thread_of_inferior): ... this new function. All callers
1739 (any_thread_of_process): Rename to ...
1740 (any_thread_of_inferior): ... this, and take an inferior pointer.
1741 (any_live_thread_of_process): Rename to ...
1742 (any_live_thread_of_inferior): ... this, and take an inferior
1744 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1745 (value_in_thread_stack_temporaries)
1746 (get_last_thread_stack_temporary): Take a thread pointer instead
1747 of a ptid_t. Adjust all callers.
1748 (thread_info::set_running): New.
1749 (validate_registers_access): Use inferior_thread.
1750 (can_access_registers_ptid): Rename to ...
1751 (can_access_registers_thread): ... this, and take a thread
1753 (print_thread_info_1): Adjust to compare thread pointers instead
1755 (switch_to_no_thread, switch_to_thread): Make extern.
1756 (scoped_restore_current_thread::~scoped_restore_current_thread):
1757 Use m_thread pointer directly.
1758 (scoped_restore_current_thread::scoped_restore_current_thread):
1759 Use inferior_thread.
1760 (thread_command): Use thread pointer directly.
1761 (thread_num_make_value_helper): Use inferior_thread.
1762 * top.c (execute_command): Use inferior_thread.
1763 * tui/tui-interp.c: Include "inferior.h".
1764 * varobj.c (varobj_create): Use inferior_thread.
1765 (value_of_root_1): Use find_thread_global_id instead of
1766 global_thread_id_to_ptid.
1768 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1770 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1772 (regcache::write_part): Likewise.
1773 (readable_regcache::cooked_read_part): Update comment.
1774 (readable_regcache::cooked_write_part): Likewise.
1775 * regcache.h: (readable_regcache::read_part): Likewise.
1776 (regcache::write_part): Likewise.
1778 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1779 Dirk Schubert <dirk.schubert@arm.com>
1781 * aarch64-linux-nat.c (post_attach): New.
1782 (aarch64_linux_nat_target::post_attach): Override post_attach to
1783 record the number of hardware debug registers.
1785 2018-06-20 Tom Tromey <tom@tromey.com>
1787 * python/py-param.c (add_setshow_generic): Make parameters const.
1788 (parmpy_init): Update.
1790 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1792 * regcache.h (regcache_cooked_read_ftype): Rename to...
1793 (register_read_ftype): ...this, change type to function_view.
1794 (class reg_buffer) <save>: Remove src parameter.
1795 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1796 parameter non-const in first overload. Remove src parameter in
1798 * regcache.c (do_cooked_read): Remove.
1799 (readonly_detached_regcache::readonly_detached_regcache): Make
1800 parameter non-const, adjust call to other constructor.
1801 (reg_buffer::save): Remove src parameter.
1802 * frame.c (do_frame_register_read): Remove.
1803 (frame_save_as_regcache): Use lambda function.
1804 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1805 parameter to ppu2spu_data *.
1806 (ppu2spu_sniffer): Use lambda function.
1808 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1810 * record-full.c (record_full_target::insert_breakpoint): Remove
1811 "struct" keyword, add const.
1813 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1815 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1816 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1817 * configure.ac: Remove AC_PREREQ, add missing quoting.
1818 * gnulib/configure.ac: Modernize usage of
1819 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1820 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1821 (AUTOMAKE_VERSION): Bump to 1.15.1.
1822 * configure: Re-generate.
1823 * config.in: Re-generate.
1824 * aclocal.m4: Re-generate.
1825 * gnulib/aclocal.m4: Re-generate.
1826 * gnulib/config.in: Re-generate.
1827 * gnulib/configure: Re-generate.
1828 * gnulib/import/Makefile.in: Re-generate.
1830 2018-06-19 Pedro Alves <palves@redhat.com>
1832 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1833 (lookup_minimal_symbol_by_pc_section): ... here with
1834 gdb_assert_not_reached added.
1836 2018-06-19 Pedro Alves <palves@redhat.com>
1838 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1839 parameter with a block parameter. Compare location's block symbol
1840 with the frame's block instead of addresses.
1841 (skip_inline_frames): Pass the current block instead of the
1842 frame's address. Break out as soon as we determine the frame
1843 should not be skipped.
1845 2018-06-18 Tom Tromey <tom@tromey.com>
1847 * solib-aix.c (solib_aix_get_section_offsets): Return
1849 (solib_aix_solib_create_inferior_hook): Update.
1851 2018-06-18 Tom Tromey <tom@tromey.com>
1853 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1855 2018-06-18 Tom Tromey <tom@tromey.com>
1857 * solib-frv.c (frv_relocate_main_executable): Use
1859 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1862 2018-06-18 Tom Tromey <tom@tromey.com>
1864 * objfiles.h (inhibit_section_map_updates): Update.
1865 (resume_section_map_updates, resume_section_map_updates_cleanup):
1867 * solib-svr4.c (svr4_handle_solib_event): Update.
1868 * objfiles.c (inhibit_section_map_updates): Return
1869 scoped_restore_tmpl<int>.
1870 (resume_section_map_updates, resume_section_map_updates_cleanup):
1873 2018-06-18 Tom Tromey <tom@tromey.com>
1875 * valprint.h (read_string): Update.
1876 * valprint.c (read_string): Change type of "buffer".
1877 (val_print_string): Update.
1878 * python/py-value.c (valpy_string): Update.
1879 * language.h (struct language_defn) <la_get_string>: Change
1881 (default_get_string, c_get_string): Update.
1882 * language.c (default_get_string): Change type of "buffer".
1883 * guile/scm-value.c (gdbscm_value_to_string): Update.
1884 * c-lang.c (c_get_string): Change type of "buffer".
1886 2018-06-18 Tom Tromey <tom@tromey.com>
1888 * ser-mingw.c (struct pipe_state_destroyer): New.
1889 (pipe_state_up): New typedef.
1890 (cleanup_pipe_state): Remove.
1891 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1893 2018-06-18 Tom Tromey <tom@tromey.com>
1895 * rust-lang.h (rust_yyerror): Don't declare.
1896 * rust-lang.c (rust_language_defn): Update.
1897 * rust-exp.y (yyerror): Now static.
1898 * parse.c (parse_exp_in_context_1): Update.
1899 * p-lang.h (p_yyerror): Don't declare.
1900 * p-lang.c (p_language_defn): Update.
1901 * p-exp.y (yyerror): Now static.
1902 * opencl-lang.c (opencl_language_defn): Update.
1903 * objc-lang.c (objc_language_defn): Update.
1904 * m2-lang.h (m2_yyerror): Don't declare.
1905 * m2-lang.c (m2_language_defn): Update.
1906 * m2-exp.y (yyerror): Now static.
1907 * language.h (struct language_defn) <la_error>: Remove.
1908 * language.c (unk_lang_error): Remove.
1909 (unknown_language_defn, auto_language_defn): Remove.
1910 * go-lang.h (go_yyerror): Don't declare.
1911 * go-lang.c (go_language_defn): Update.
1912 * go-exp.y (yyerror): Now static.
1913 * f-lang.h (f_yyerror): Don't declare.
1914 * f-lang.c (f_language_defn): Update.
1915 * f-exp.y (yyerror): Now static.
1916 * d-lang.h (d_yyerror): Don't declare.
1917 * d-lang.c (d_language_defn): Update.
1918 * d-exp.y (yyerror): Now static.
1919 * c-lang.h (c_yyerror): Don't declare.
1920 * c-lang.c (c_language_defn, cplus_language_defn)
1921 (asm_language_defn, minimal_language_defn): Update.
1922 * c-exp.y (yyerror): Now static.
1923 * ada-lang.h (ada_yyerror): Don't declare.
1924 * ada-lang.c (ada_language_defn): Update.
1925 * ada-exp.y (yyerror): Now static.
1927 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1929 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1930 (store_sveregs_to_thread): Likewise.
1931 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1932 (aarch64_linux_store_inferior_registers): Likewise.
1933 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1935 (aarch64_sve_regs_copy_to_regcache): Likewise.
1936 (aarch64_sve_regs_copy_from_regcache): Likewise.
1937 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1939 (aarch64_sve_regs_copy_to_regcache): Likewise.
1940 (aarch64_sve_regs_copy_from_regcache): Likewise.
1941 (sve_context): Structure from Linux headers.
1942 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1943 (SVE_SIG_ZREG_SIZE): Likewise.
1944 (SVE_SIG_PREG_SIZE): Likewise.
1945 (SVE_SIG_FFR_SIZE): Likewise.
1946 (SVE_SIG_REGS_OFFSET): Likewise.
1947 (SVE_SIG_ZREGS_OFFSET): Likewise.
1948 (SVE_SIG_ZREG_OFFSET): Likewise.
1949 (SVE_SIG_ZREGS_SIZE): Likewise.
1950 (SVE_SIG_PREGS_OFFSET): Likewise.
1951 (SVE_SIG_PREG_OFFSET): Likewise.
1952 (SVE_SIG_PREGS_SIZE): Likewise.
1953 (SVE_SIG_FFR_OFFSET): Likewise.
1954 (SVE_SIG_REGS_SIZE): Likewise.
1955 (SVE_SIG_CONTEXT_SIZE): Likewise.
1956 (SVE_PT_REGS_MASK): Likewise.
1957 (SVE_PT_REGS_FPSIMD): Likewise.
1958 (SVE_PT_REGS_SVE): Likewise.
1959 (SVE_PT_VL_INHERIT): Likewise.
1960 (SVE_PT_VL_ONEXEC): Likewise.
1961 (SVE_PT_REGS_OFFSET): Likewise.
1962 (SVE_PT_FPSIMD_OFFSET): Likewise.
1963 (SVE_PT_FPSIMD_SIZE): Likewise.
1964 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1965 (SVE_PT_SVE_PREG_SIZE): Likewise.
1966 (SVE_PT_SVE_FFR_SIZE): Likewise.
1967 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1968 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1969 (__SVE_SIG_TO_PT): Likewise.
1970 (SVE_PT_SVE_OFFSET): Likewise.
1971 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1972 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1973 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1974 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1975 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1976 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1977 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1978 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1979 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1980 (SVE_PT_SVE_SIZE): Likewise.
1981 (SVE_PT_SIZE): Likewise.
1982 (HAS_SVE_STATE): New define.
1984 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1986 * nat/aarch64-sve-linux-sigcontext.h: New file.
1987 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1989 (SVE_VQ_MIN): Likewise.
1990 (SVE_VQ_MAX): Likewise.
1991 (SVE_VL_MIN): Likewise.
1992 (SVE_VL_MAX): Likewise.
1993 (SVE_NUM_ZREGS): Likewise.
1994 (SVE_NUM_PREGS): Likewise.
1995 (sve_vl_valid): Likewise.
1996 (struct user_sve_header): Likewise.
1998 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1999 Richard Bunt <Richard.Bunt@arm.com>
2001 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2002 was requested by GDB.
2004 2018-06-15 Tom de Vries <tdevries@suse.de>
2006 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2008 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2010 * gnulib/update-gnulib.sh: Print expected versions of
2013 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2015 * arch-utils.c (default_type_align): Use type_length_units.
2016 * gdbtypes.c (type_align): Use type_length_units.
2018 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2020 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2021 of 'define' command.
2023 2018-06-14 Tom de Vries <tdevries@suse.de>
2026 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2027 get_no_prettyformat_print_options.
2029 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2031 * sparc-nat.h: Include target.h.
2032 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2033 <fetch_registers>: Remove this argument in function call.
2034 <store_registers>: Remove this argument in function call, remove
2036 <low_forget_process>: Call sparc64_forget_process instead of
2037 sparc_forget_process.
2039 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2041 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2042 (procfs_target::make_corefile_notes): Adjust to new
2043 target_read_alloc return type.
2045 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2046 Stephen Roberts <stephen.roberts@arm.com>
2049 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2050 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2051 Move should_notify_stop local into more inner scope.
2053 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2054 Stephen Roberts <stephen.roberts@arm.com>
2057 * infrun.c (resume_1): Add call to mark_async_event_handler.
2059 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2061 * infrun.c (do_target_wait): Change old version of $pc printed.
2063 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2065 * dwarf2read.c (read_index_from_section): Rename to...
2066 (read_gdb_index_from_section): ... this, update all callers.
2067 (dwarf2_read_index): Rename to...
2068 (dwarf2_read_gdb_index): ... this, update all callers.
2070 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2072 * gdb/hppa-linux-nat.c
2073 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2074 hppa_linux_nat_target::fetch_registers.
2076 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2078 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2079 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2080 (AARCH64_DWARF_SVE_FFR): Likewise.
2081 (AARCH64_DWARF_SVE_P0): Likewise.
2082 (AARCH64_DWARF_SVE_Z0): Likewise.
2084 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2086 * common/common-regcache.h (raw_compare): New function.
2087 * regcache.c (regcache::raw_compare): Likewise.
2088 * regcache.h (regcache::raw_compare): New declaration.
2090 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2092 * common/common-regcache.h (reg_buffer_common): New structure.
2093 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2094 (reg_buffer::raw_supply): Likewise.
2095 (reg_buffer::raw_supply_integer): Likewise.
2096 (reg_buffer::raw_supply_zeroed): Likewise.
2097 (reg_buffer::raw_collect): Likewise.
2098 (reg_buffer::raw_collect_integer): Likewise.
2099 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2100 (reg_buffer::raw_supply): Likewise.
2101 (reg_buffer::raw_supply_integer): Likewise.
2102 (reg_buffer::raw_supply_zeroed): Likewise.
2103 (reg_buffer::raw_collect): Likewise.
2104 (reg_buffer::raw_collect_integer): Likewise.
2106 2018-06-10 Tom Tromey <tom@tromey.com>
2108 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2109 (class remote_state) <stop_reply_queue>: Now std::vector.
2110 (remote_state::~remote_state)
2111 (remote_target::stop_reply_queue_length): Update.
2112 (struct queue_iter_param, remove_child_of_pending_fork)
2113 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2114 (check_pending_event_prevents_wildcard_vcont_callback)
2115 (remove_stop_reply_for_inferior)
2116 (remove_stop_reply_of_remote_state)
2117 (remote_notif_remove_once_on_match)
2118 (stop_reply_match_ptid_and_ws)
2119 (remote_kill_child_of_pending_fork): Remove.
2120 (remote_target::remove_new_fork_children)
2121 (remote_target::check_pending_events_prevent_wildcard_vcont)
2122 (remote_target::discard_pending_stop_replies)
2123 (remote_target::discard_pending_stop_replies_in_queue)
2124 (remote_target::remote_notif_remove_queued_reply)
2125 (remote_target::queued_stop_reply)
2126 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2127 (remote_target::wait, remote_target::kill_new_fork_children)
2128 (remote_target::async): Update.
2130 2018-06-10 Tom Tromey <tom@tromey.com>
2132 * record-full.c (record_full_arch_list_cleanups): Remove.
2133 (record_full_message): Use try/catch.
2134 (record_full_wait_cleanups): Remove.
2135 (record_full_wait_1): Use try/catch.
2136 (record_full_restore): Likewise.
2138 2018-06-10 Tom Tromey <tom@tromey.com>
2140 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2141 declare VEC. Add constructor.
2142 <in_target_beneath>: Now bool.
2143 (record_full_breakpoints): Now a std::vector, static.
2144 (record_full_sync_record_breakpoints)
2145 (record_full_init_record_breakpoints)
2146 (record_full_target::insert_breakpoint)
2147 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2149 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2151 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2152 * serial.c (serial_interface_lookup): Remove struct keyword.
2154 2018-06-10 Tom Tromey <tom@tromey.com>
2156 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2158 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2160 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2162 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2163 "beneath" as a method.
2164 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2165 Use "beneath" as a method.
2167 2018-06-10 Tom Tromey <tom@tromey.com>
2169 * tracefile.c (struct trace_file_writer_deleter): New.
2170 <operator()>: Rename from trace_file_writer_xfree.
2171 (trace_file_writer_up): New typedef.
2172 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2174 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2176 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2177 <m_registers, m_register_status>: Change type to
2179 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2182 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2184 * common/common-regcache.h (enum register_status): Add
2185 underlying type "signed char".
2186 * regcache.h (reg_buffer) <m_register_status>: Change type to
2188 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2189 register_status instead of signed char.
2190 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2191 (reg_buffer::get_register_status): Remove cast.
2192 (readable_regcache::raw_read): Remove cast.
2193 (readable_regcache::cooked_read): Remove cast.
2195 2018-06-09 Tom Tromey <tom@tromey.com>
2197 * source.c (reverse_search_command, forward_search_command): Use
2200 2018-06-09 Tom Tromey <tom@tromey.com>
2202 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2203 (serial_ops_list): Now static, std::vector.
2204 (serial_interface_lookup, serial_add_interface): Update.
2206 2018-06-09 Tom Tromey <tom@tromey.com>
2208 * dwarf2read.c (process_cu_includes): Update.
2209 (process_full_comp_unit): Update.
2210 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2213 2018-06-08 Paul Koning <paul_koning@dell.com>
2217 * python/python.c (do_start_initialization):
2218 Avoid call to internal Python API.
2219 (init__gdb_module): New function.
2221 2018-06-08 Gary Benson <gbenson@redhat.com>
2223 * linux-thread-db.c (valprint.h): New include.
2224 (struct check_thread_db_info): New structure.
2225 (check_thread_db_on_load, tdb_testinfo): New static globals.
2226 (check_thread_db, check_thread_db_callback): New functions.
2227 (try_thread_db_load_1): Run integrity checks if requested.
2228 (maintenance_check_libthread_db): New function.
2229 (_initialize_thread_db): Register "maint check libthread-db"
2230 and "maint set/show check-libthread-db".
2231 * NEWS: Mention the above new commands.
2233 2018-06-08 Tom Tromey <tom@tromey.com>
2235 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2238 2018-06-08 Tom Tromey <tom@tromey.com>
2240 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2242 2018-06-08 Tom Tromey <tom@tromey.com>
2244 * common/btrace-common.h (struct btrace_data): Add constructor,
2245 destructor, move assignment operator.
2246 <empty, clear, fini>: New methods.
2247 <format>: Initialize.
2248 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2249 (btrace_data_empty): Don't declare.
2250 * common/btrace-common.c (btrace_data_init): Remove.
2251 (btrace_data::fini): Rename from btrace_data_fini.
2252 (btrace_data::empty): Rename from btrace_data_empty.
2253 (btrace_data::clear): Rename from btrace_data_clear. Return
2255 * btrace.h (make_cleanup_btrace_data): Don't declare.
2256 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2257 (parse_xml_btrace): Update.
2258 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2259 (maint_btrace_clear_packet_history_cmd): Update.
2261 2018-06-07 Pedro Alves <palves@redhat.com>
2263 * target.h (target_ops) <beneath>: Now a method. All references
2265 (class target_stack): New.
2266 * target.c (g_target_stack): New.
2267 (g_current_top_target): Delete.
2268 (current_top_target): Get the top target out of g_target_stack.
2269 (target_stack::push, target_stack::unpush): New.
2270 (push_target, unpush_target): Reimplement.
2271 (target_is_pushed): Reimplement in terms of g_target_stack.
2272 (target_ops::beneath, target_stack::find_beneath): New.
2274 2018-06-07 Pedro Alves <palves@redhat.com>
2276 * target.h (find_target_beneath): Delete declaration.
2277 * target.c (find_target_beneath): Delete definition.
2278 * aix-thread.c: All callers of find_target_beneath adjusted to
2279 call target_ops::beneath instead.
2280 * bsd-uthread.c: Likewise.
2281 * linux-thread-db.c: Likewise.
2282 * ravenscar-thread.c: Likewise.
2283 * sol-thread.c: Likewise.
2284 * spu-multiarch.c: Likewise.
2286 2018-06-07 Pedro Alves <palves@redhat.com>
2288 * target.h (target_ops) <beneath>: Now a method. All references
2290 (target_ops) <m_beneath>: New.
2291 * target.c (target_ops::beneath): New.
2292 * corelow.c: Adjust all references to target_ops::beneath.
2293 * linux-thread-db.c: Likewise.
2294 * make-target-delegates: Likewise.
2295 * record-btrace.c: Likewise.
2296 * record-full.c: Likewise.
2297 * remote.c: Likewise.
2298 * target.c: Likewise.
2299 * target-delegates.c: Regenerate.
2301 2018-06-07 Pedro Alves <palves@redhat.com>
2303 * target.h (target_stack): Delete.
2304 (current_top_target): Declare function.
2305 * target.c (target_stack): Delete.
2306 (g_current_top_target): New.
2307 (current_top_target): New function.
2308 * auxv.c: Use current_top_target instead of target_stack
2310 * avr-tdep.c: Likewise.
2311 * breakpoint.c: Likewise.
2312 * corefile.c: Likewise.
2313 * elfread.c: Likewise.
2315 * exceptions.c: Likewise.
2316 * frame.c: Likewise.
2317 * gdbarch-selftests.c: Likewise.
2318 * gnu-v3-abi.c: Likewise.
2319 * ia64-tdep.c: Likewise.
2320 * ia64-vms-tdep.c: Likewise.
2321 * infcall.c: Likewise.
2322 * infcmd.c: Likewise.
2323 * infrun.c: Likewise.
2324 * linespec.c: Likewise.
2325 * linux-tdep.c: Likewise.
2326 * minsyms.c: Likewise.
2327 * ppc-linux-nat.c: Likewise.
2328 * ppc-linux-tdep.c: Likewise.
2329 * procfs.c: Likewise.
2330 * regcache.c: Likewise.
2331 * remote.c: Likewise.
2332 * rs6000-tdep.c: Likewise.
2333 * s390-linux-nat.c: Likewise.
2334 * s390-tdep.c: Likewise.
2335 * solib-aix.c: Likewise.
2336 * solib-darwin.c: Likewise.
2337 * solib-dsbt.c: Likewise.
2338 * solib-spu.c: Likewise.
2339 * solib-svr4.c: Likewise.
2340 * solib-target.c: Likewise.
2341 * sparc-tdep.c: Likewise.
2342 * sparc64-tdep.c: Likewise.
2343 * spu-tdep.c: Likewise.
2344 * symfile.c: Likewise.
2345 * symtab.c: Likewise.
2346 * target-descriptions.c: Likewise.
2347 * target-memory.c: Likewise.
2348 * target.c: Likewise.
2349 * target.h: Likewise.
2350 * tracefile-tfile.c: Likewise.
2351 * tracepoint.c: Likewise.
2352 * valops.c: Likewise.
2353 * valprint.c: Likewise.
2354 * value.c: Likewise.
2355 * windows-tdep.c: Likewise.
2356 * mi/mi-main.c: Likewise.
2358 2018-06-07 Tom Tromey <tom@tromey.com>
2360 * valprint.h (build_address_symbolic): Declare.
2361 * printcmd.c (print_address_symbolic): Update.
2362 (build_address_symbolic): Change "name" and "filename" to
2364 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2366 * defs.h (build_address_symbolic): Remove declaration.
2368 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2370 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2371 (aarch64_vnv_type): Add function.
2372 (aarch64_pseudo_register_name): Add V regs for SVE.
2373 (aarch64_pseudo_register_type): Likewise.
2374 (aarch64_pseudo_register_reggroup_p): Likewise.
2375 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2376 (aarch64_pseudo_read_value): Add V regs for SVE.
2377 (aarch64_pseudo_write_2): Use V0 offset for SVE
2378 (aarch64_pseudo_write): Add V regs for SVE.
2379 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2381 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2383 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2384 (sve_vl_from_vq): Likewise.
2386 2018-06-05 Tom Tromey <tom@tromey.com>
2388 * cli/cli-cmds.c (show_version): Update.
2389 * top.c (print_gdb_version): Add "interactive" parameter.
2391 * main.c (captured_main_1): Update.
2392 * top.h (print_gdb_version): Add "interactive" parameter and a
2395 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2397 * common/enum-flags.h: Add trailing semicolon to example in
2400 2018-06-05 Tom Tromey <tom@tromey.com>
2403 * NEWS: Add entry about pager.
2404 * utils.c (pagination_disabled_for_command): New global.
2405 (prompt_for_continue): Allow "c" response to prompt.
2406 (reinitialize_more_filter): Clear
2407 pagination_disabled_for_command.
2408 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2410 2018-06-04 Tom Tromey <tom@tromey.com>
2412 * ada-lang.h (ada_lookup_symbol_list): Update.
2413 * ada-lang.c (resolve_subexp): Update.
2414 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2416 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2417 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2418 results parameter to std::vector.
2419 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2421 * ada-exp.y (block_lookup): Update.
2422 (select_possible_type_sym): Change type of syms. Remove nsyms
2424 (write_var_or_type, write_name_assoc): Update.
2426 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2428 * windows-nat.c (windows_nat_target::xfer_partial): Return
2429 TARGET_XFER_E_IO if we need to delegate to the target beneath
2430 but BENEATH is NULL.
2432 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2434 * Makefile.in (config.status): Add configure.nat as a
2437 2018-06-04 Tom Tromey <tom@tromey.com>
2439 * cp-name-parser.y (cpname_state): Add method declarations.
2440 (HANDLE_QUAL): Update.
2441 (cpname_state::d_grab, cpname_state::fill_comp)
2442 (cpname_state::make_operator, cpname_state::make_dtor)
2443 (cpname_state::make_builtin_type, cpname_state::make_name)
2444 (cpname_state::d_qualify, cpname_state::d_int_type)
2445 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2446 (%union): Move earlier.
2448 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2450 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2452 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2454 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2455 (aarch64_pseudo_write_1): Likewise.
2456 (aarch64_pseudo_read_value): Use helper.
2457 (aarch64_pseudo_write): Likewise.
2459 2018-06-04 Pedro Alves <palves@redhat.com>
2461 * darwin-nat.c (darwin_ops): Delete.
2462 (darwin_attach_pid): Use get_native_target.
2464 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2466 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2467 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2469 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2471 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2472 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2473 (aarch64_gdbarch_init): Check for SVE.
2474 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2476 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2478 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2479 * aarch64-tdep.h (aarch64_read_description): Likewise.
2480 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2481 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2482 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2483 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2484 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2486 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2488 * value.c (value_fetch_lazy_bitfield): New.
2489 (value_fetch_lazy_memory): New.
2490 (value_fetch_lazy_register): New.
2491 (value_fetch_lazy): Factor out to smaller functions.
2493 2018-06-01 Tom Tromey <tom@tromey.com>
2495 * cp-name-parser.y (backslashable, represented): Now const.
2497 2018-06-01 Tom Tromey <tom@tromey.com>
2499 * cp-name-parser.y: Include parser-defs.h.
2500 (parser_fprintf): Remove declaration.
2502 2018-06-01 Tom Tromey <tom@tromey.com>
2504 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2506 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2507 (global_result): Remove globals.
2508 (struct cpname_state): New.
2509 (yyparse): Don't declare.
2510 (yylex, yyerror): Move declarations after %union.
2511 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2512 (make_name): Add state parameter.
2514 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2516 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2518 (yylex): Add lvalp, state parameters.
2519 (yyerror): Add state parameter.
2520 (cp_demangled_name_to_comp): Update.
2522 2018-06-01 Tom Tromey <tom@tromey.com>
2524 * cp-name-parser.y (parser_fprintf): Declare.
2525 (GDB_YY_REMAP_PREFIX): Define.
2526 Include yy-remap.h. Don't redefine yy* identifiers.
2528 2018-06-01 Tom Tromey <tom@tromey.com>
2530 * python/py-type.c (typy_legacy_template_argument): Update.
2531 * cp-support.h (cp_demangled_name_to_comp): Update.
2532 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2533 parameter to be a "std::string *".
2536 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2538 * ada-lex.l: Include "diagnostics.h" instead of
2539 "common/diagnostics.h".
2540 * unittests/environ-selftests.c: Likewise.
2541 * common/diagnostics.h: Moved to ../include.
2543 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2545 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2546 to language_mode_manual while calling breakpoint_re_set_one.
2548 2018-06-01 Tom Tromey <tom@tromey.com>
2550 * valops.c (value_cast_structs, destructor_name_p): Update.
2551 * symtab.c (gdb_mangle_name): Update.
2552 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2554 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2555 (pascal_object_print_value_fields, pascal_object_print_value):
2557 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2558 * linespec.c (find_methods): Update.
2559 * gdbtypes.h (type_name_no_tag): Remove.
2560 (type_name_or_error): Rename from type_name_no_tag_or_error.
2561 * gdbtypes.c (type_name_no_tag): Remove.
2562 (type_name_or_error): Rename from type_name_no_tag_or_error.
2563 (lookup_struct_elt_type, check_typedef): Update.
2564 * expprint.c (print_subexp_standard): Update.
2565 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2566 * d-namespace.c (d_lookup_nested_symbol): Update.
2567 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2568 (cp_print_class_member): Update.
2569 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2570 * completer.c (add_struct_fields): Update.
2571 * c-typeprint.c (cp_type_print_derivation_info)
2572 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2574 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2575 (ada_prefer_type, ada_is_exception_sym): Update.
2577 2018-06-01 Tom Tromey <tom@tromey.com>
2579 * valops.c (enum_constant_from_type, value_namespace_elt)
2580 (value_maybe_namespace_elt): Update.
2581 * valarith.c (find_size_for_pointer_math): Update.
2582 * target-descriptions.c (make_gdb_type): Update.
2583 * symmisc.c (print_symbol): Update.
2584 * stabsread.c (define_symbol, read_type)
2585 (complain_about_struct_wipeout, add_undefined_type)
2586 (cleanup_undefined_types_1): Update.
2587 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2588 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2589 (rust_internal_print_type, rust_composite_type)
2590 (rust_evaluate_funcall, rust_evaluate_subexp)
2591 (rust_inclusive_range_type_p): Update.
2592 * python/py-type.c (typy_get_tag): Update.
2593 * p-typeprint.c (pascal_type_print_base): Update.
2594 * mdebugread.c (parse_symbol, parse_type): Update.
2595 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2597 * guile/scm-type.c (gdbscm_type_tag): Update.
2598 * go-lang.c (sixg_string_p): Update.
2599 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2601 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2602 (TYPE_TAG_NAME): Remove.
2603 * gdbtypes.c (type_name_no_tag): Simplify.
2604 (check_typedef, check_types_equal, recursive_dump_type)
2605 (copy_type_recursive, arch_composite_type): Update.
2606 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2607 in summary mode when needed.
2608 * eval.c (evaluate_funcall): Update.
2609 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2610 (process_structure_scope, read_enumeration_type)
2611 (read_namespace_type, read_module_type, determine_prefix): Update.
2612 * cp-support.c (inspect_type): Update.
2613 * coffread.c (process_coff_symbol, decode_base_type): Update.
2614 * c-varobj.c (c_is_path_expr_parent): Update.
2615 * c-typeprint.c (c_type_print_base_struct_union): Update.
2616 (c_type_print_base_1): Update. Print struct/class/union/enum in
2617 summary when using C language.
2618 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2619 (gen_maybe_namespace_elt): Update.
2620 * ada-lang.c (ada_type_name): Simplify.
2621 (empty_record, ada_template_to_fixed_record_type_1)
2622 (template_to_static_fixed_type)
2623 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2625 2018-06-01 Tom Tromey <tom@tromey.com>
2627 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2629 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2630 (c_print_type): Update.
2631 (c_print_type): New overload.
2632 (c_type_print_varspec_prefix, c_type_print_args)
2633 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2634 (c_type_print_base_struct_union, c_type_print_base_1)
2635 (cp_type_print_method_args): Add "language" parameter.
2636 (c_type_print_base): Update.
2637 * c-lang.h (c_print_type): Add new overload.
2639 2018-06-01 Tom Tromey <tom@tromey.com>
2641 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2642 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2644 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2646 * aarch64-tdep.c (aarch64_sve_register_names): New const
2648 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2649 (AARCH64_SVE_Z_REGS_NUM): New define.
2650 (AARCH64_SVE_P_REGS_NUM): Likewise.
2651 (AARCH64_SVE_NUM_REGS): Likewise.
2653 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2655 * nat/linux-ptrace.h [__alpha__]
2656 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2659 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2661 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2662 the endianness selected.
2663 * NEWS: Document `set endian auto' mode operation update.
2665 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2667 * Makefile.in: Add new header.
2668 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2669 (sve_vl_from_vg): Likewise.
2670 (sve_vq_from_vl): Likewise.
2671 (sve_vl_from_vq): Likewise.
2672 (sve_vq_from_vg): Likewise.
2673 (sve_vg_from_vq): Likewise.
2674 * configure.nat: Add new c file.
2675 * nat/aarch64-sve-linux-ptrace.c: New file.
2676 * nat/aarch64-sve-linux-ptrace.h: New file.
2678 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2680 * aarch64-linux-nat.c (aarch64_linux_read_description):
2682 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2684 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2685 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2686 (aarch64_gdbarch_init): Add parmeter zero.
2687 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2688 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2689 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2691 * doc/gdb.texinfo: Describe SVE feature
2692 * features/aarch64-sve.c: New file.
2694 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2697 * gdbarch.sh (significant_addr_bit): Default to zero when
2698 not set by target architecture.
2699 * gdbarch.c: Re-generated.
2700 * utils.c (address_significant): Update.
2702 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2704 * stack.c (func_command): Remove trailing newline in call to error.
2706 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2708 * regcache.h (regcache_raw_collect): Remove, update callers to
2709 use regcache::raw_collect.
2710 * regcache.c (regcache_raw_collect): Remove.
2712 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2714 * regcache.h (regcache_raw_supply): Remove, update callers to
2715 use detached_regcache::raw_supply.
2716 * regcache.c (regcache_raw_supply): Remove.
2718 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2720 * regcache.h (regcache_cooked_write_part): Remove, update
2721 callers to use regcache::cooked_write_part.
2722 * regcache.c (regcache_cooked_write_part): Remove.
2724 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2726 * regcache.h (regcache_cooked_read_part): Remove, update callers
2727 to use readable_regcache::cooked_read_part.
2728 * regcache.c (regcache_cooked_read_part): Remove.
2730 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2732 * regcache.h (regcache_cooked_read_value): Remove, update
2733 callers to use readable_regcache::cooked_read_value.
2734 * regcache.c (regcache_cooked_read_value): Remove.
2736 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2738 * regcache.h (regcache_cooked_write): Remove, update callers to
2739 use regcache::cooked_write.
2740 * regcache.c (regcache_cooked_write): Remove.
2742 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2744 * regcache.h (regcache_invalidate): Remove, update callers to
2745 use detached_regcache::invalidate instead.
2746 * regcache.c (regcache_invalidate): Remove.
2748 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2750 * regcache.h (regcache_raw_write_part): Remove, update callers
2751 to use regcache::raw_write_part instead.
2752 * regcache.c (regcache_raw_write_part): Remove.
2754 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2756 * regcache.h (regcache_raw_read_part): Remove, update callers to
2757 use readable_regcache::raw_read_part instead.
2758 * regcache.c (regcache_raw_read_part): Remove.
2760 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2762 * regcache.h (regcache_cooked_read): Remove, update callers to
2763 use readable_regcache::cooked_read instead.
2764 * regcache.c (regcache_cooked_read): Remove.
2766 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2768 * regcache.h (regcache_raw_write): Remove, update callers to use
2769 regcache::raw_write instead.
2770 * regcache.c (regcache_raw_write): Remove.
2772 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2774 * regcache.h (regcache_raw_read): Remove, update callers to use
2775 readable_regcache::raw_read instead.
2776 * regcache.c (regcache_raw_read): Remove.
2778 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2780 * regcache.h (regcache_raw_update): Remove, update callers to
2781 use readable_regcache::raw_update instead.
2782 * regcache.c (regcache_raw_update): Remove.
2784 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2786 * regcache.h (regcache_register_status): Remove, update callers
2787 to use reg_buffer::get_register_status directly instead.
2788 * regcache.c (regcache_register_status): Remove.
2790 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2792 * regcache.h (regcache_get_ptid): Remove, update all callers to
2793 call regcache::ptid instead.
2794 * regcache.c (regcache_get_ptid): Remove.
2796 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2798 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2800 2018-05-30 Pedro Alves <palves@redhat.com>
2802 * common/common-exceptions.h (exception_rethrow): Use
2805 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2807 * breakpoint.c (print_solib_event, check_status_catch_solib):
2808 Remove struct keyword in range-based for loops.
2809 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2810 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2812 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2814 * symfile.c (addr_info_make_relative): Likewise.
2815 * thread.c (value_in_thread_stack_temporaries): Likewise.
2817 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2820 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2821 aggregate type to get its real type before accessing it.
2823 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2825 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2826 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2827 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2828 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2829 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2830 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2831 * printcmd.c (info_address_command): Likewise.
2833 2018-05-29 Tom Tromey <tom@tromey.com>
2835 * windows-nat.c (handle_exception): Update fall-through comment.
2837 2018-05-29 Tom Tromey <tom@tromey.com>
2839 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2840 (struct program_space) <added_solibs>: Now a std::vector.
2841 * breakpoint.c (print_solib_event): Update.
2842 (check_status_catch_solib): Update.
2843 * progspace.c (clear_program_space_solib_cache): Update.
2844 * solib.c (update_solib_list): Update.
2846 2018-05-29 Tom Tromey <tom@tromey.com>
2848 * python/py-type.c (typy_richcompare): Update.
2849 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2850 * gdbtypes.h (types_deeply_equal): Return bool.
2851 (types_equal): Likewise.
2852 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2854 (check_types_equal): Change worklist to std::vector. Return
2856 (struct type_equality_entry): Add constructor.
2857 (compare_maybe_null_strings): Return bool.
2858 (check_types_worklist): Return bool. Change worklist to
2860 (types_deeply_equal): Use std::vector.
2861 (types_equal): Return bool.
2862 (compare_maybe_null_strings): Simplify.
2864 2018-05-29 Tom Tromey <tom@tromey.com>
2866 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2868 2018-05-29 Tom Tromey <tom@tromey.com>
2870 * objc-lang.h: Don't include cp-support.h.
2871 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2874 2018-05-27 Tom Tromey <tom@tromey.com>
2876 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2878 2018-05-25 Tom Tromey <tom@tromey.com>
2880 * value.c (value::location): Initialize.
2882 2018-05-25 Tom Tromey <tom@tromey.com>
2884 * dbxread.c (init_bincl_list): Remove.
2885 (bincl_list): Now a std::vector.
2886 (bincls_allocated, next_bincl): Remove.
2887 (free_bincl_list, do_free_bincl_list_cleanup)
2888 (make_cleanup_free_bincl_list): Remove.
2889 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2891 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2892 (struct header_file_location): Add constructor.
2893 (add_bincl_to_list): Remove.
2895 2018-05-25 Tom Tromey <tom@tromey.com>
2897 * tui/tui.c (tui_enable): Update.
2898 * mi/mi-interp.c (mi_interp::init): Update.
2899 * interps.h (class interp) <name>: New method.
2900 <m_name>: Rename from name.
2901 (~scoped_restore_interp): Update.
2902 * interps.c (interp::interp): Update.
2903 (interp_add, interp_set, interp_lookup_existing)
2904 (current_interp_named_p): Update.
2906 2018-05-25 Tom Tromey <tom@tromey.com>
2908 * interps.c (interp_name): Remove.
2909 * mi/mi-interp.c (mi_interp::init): Update.
2910 * interps.h (interp_name): Remove.
2911 (~scoped_restore_interp): Update.
2912 * tui/tui.c (tui_enable): Update.
2914 2018-05-25 Tom Tromey <tom@tromey.com>
2916 * utils.c (fputs_maybe_filtered): Update.
2917 * linespec.c (decode_line_full): Update.
2918 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2919 (mi_print_breakpoint_for_event, mi_solib_loaded)
2920 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2921 (mi_user_selected_context_changed): Update.
2922 * mi/mi-main.c (mi_execute_command): Update.
2923 * cli/cli-script.c (execute_control_command): Update.
2924 * python/python.c (execute_gdb_command): Update.
2925 * solib.c (info_sharedlibrary_command): Update.
2926 * interps.c (interp_ui_out): Remove.
2927 * interps.h (interp_ui_out): Remove.
2929 2018-05-25 Tom Tromey <tom@tromey.com>
2931 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2932 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2933 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2935 2018-05-25 Tom Tromey <tom@tromey.com>
2937 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2938 * interps.c (interp_exec): Use scoped_restore.
2940 2018-05-25 Tom Tromey <tom@tromey.com>
2942 * remote.c (remote_target::remote_file_get): Use
2944 (remote_target::remote_file_put): Likewise.
2946 2018-05-25 Tom Tromey <tom@tromey.com>
2948 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2950 (get_pe_section_index, add_pe_exported_sym): Update.
2951 (read_pe_exported_syms): Use gdb::def_vector.
2953 2018-05-25 Tom Tromey <tom@tromey.com>
2955 * frame.c (remove_prev_frame): Remove.
2956 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2958 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2960 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2962 * mips-linux-nat.c (supply_fpregset): Always call
2963 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2964 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2965 `mips_fill_fpregset'.
2966 * mips-linux-tdep.c (mips_supply_fpregset)
2967 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2968 (mips_fill_fpregset_wrapper): Remove functions.
2969 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2970 (mips_linux_fpregset): Remove variable.
2971 (mips_linux_iterate_over_regset_sections): Use
2972 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2973 (mips_linux_o32_sigframe_init): Remove comment.
2975 2018-05-25 Pedro Alves <palves@redhat.com>
2977 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2978 (struct readahead_cache, struct packet_reg, struct
2979 remote_arch_state, class remote_state): Move higher up in the
2981 (remote_target::m_remote_state): Now an object instead of a pointer.
2982 (remote_target::get_remote_state): Adjust.
2984 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2986 * stack.c (select_and_print_frame): Delete.
2987 (struct function_bounds): Move struct within function.
2988 (func_command): Most content moved into new function
2989 find_frame_for_function, use new function, print result, add
2991 (find_frame_for_function): New function, now returns a result.
2993 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2995 * stack.c (iterate_over_block_arg_vars): Fix comment.
2996 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2998 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3002 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3004 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3006 * frame.h (class scoped_restore_selected_frame): New class.
3007 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3008 of any exception, use scoped_restore_selected_frame to restore the
3011 2018-05-24 Pedro Alves <palves@redhat.com>
3013 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3016 2018-05-23 Tom Tromey <tom@tromey.com>
3018 * complaints.c (struct complaints): Remove.
3019 (symfile_complaint_book): Remove.
3020 (series): New global.
3021 (complaint_internal): Update.
3022 (clear_complaints): Update.
3024 2018-05-23 Tom Tromey <tom@tromey.com>
3026 * complaints.c (counters): New global.
3027 (struct complain): Remove.
3028 (struct complaints) <root>: Remove.
3029 (complaint_sentinel): Remove.
3030 (symfile_complaint_book): Update.
3031 (find_complaint) Remove.
3032 (complaint_internal, clear_complaints): Update.
3034 2018-05-23 Tom Tromey <tom@tromey.com>
3036 * complaints.c (struct complain) <file, line>: Remove.
3037 (find_complaint): Remove file, line parameters.
3038 (complaint_internal): Update.
3040 2018-05-23 Tom Tromey <tom@tromey.com>
3042 * complaints.c (vcomplaint): Remove.
3043 (complaint_internal) Merge in contents of vcomplaint.
3045 2018-05-23 Tom Tromey <tom@tromey.com>
3047 * complaints.c (struct complaints) <explanation>: Remove.
3048 (symfile_explanations): Remove.
3049 (symfile_complaint_book): Update.
3050 (vcomplaint): Update.
3051 (struct explanation): Remove.
3053 2018-05-23 Tom Tromey <tom@tromey.com>
3055 * complaints.c (symfile_complaints): Remove.
3056 (complaint_internal): Remove "complaints" parameter.
3057 (clear_complaints, vcomplaint): Remove "c" parameter.
3058 (get_complaints): Remove.
3059 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3060 (dwarf2_debug_line_missing_file_complaint)
3061 (dwarf2_debug_line_missing_end_sequence_complaint)
3062 (dwarf2_complex_location_expr_complaint)
3063 (dwarf2_const_value_length_mismatch_complaint)
3064 (dwarf2_section_buffer_overflow_complaint)
3065 (dwarf2_macro_malformed_definition_complaint)
3066 (dwarf2_invalid_attrib_class_complaint)
3067 (create_addrmap_from_index, dw2_symtab_iter_next)
3068 (dw2_expand_marked_cus)
3069 (dw2_debug_names_iterator::find_vec_in_debug_names)
3070 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3071 (create_debug_type_hash_table, init_cutu_and_read_dies)
3072 (partial_die_parent_scope, add_partial_enumeration)
3073 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3074 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3075 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3076 (create_cus_hash_table, create_dwp_hash_table)
3077 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3078 (dwarf2_rnglists_process, dwarf2_ranges_process)
3079 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3080 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3081 (handle_struct_member_die, process_structure_scope)
3082 (read_array_type, read_common_block, read_module_type)
3083 (read_tag_pointer_type, read_typedef, read_base_type)
3084 (read_subrange_type, load_partial_dies, partial_die_info::read)
3085 (partial_die_info::read, partial_die_info::read)
3086 (partial_die_info::read, read_checked_initial_length_and_offset)
3087 (dwarf2_string_attr, read_formatted_entries)
3088 (dwarf_decode_line_header)
3089 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3090 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3091 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3092 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3093 (get_signatured_type, get_DW_AT_signature_type)
3094 (decode_locdesc, file_file_name, consume_improper_spaces)
3095 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3096 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3097 (dwarf2_symbol_mark_computed, set_die_type)
3098 (read_attribute_value): Update.
3099 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3101 * dbxread.c (unknown_symtype_complaint)
3102 (lbrac_mismatch_complaint, repeated_header_complaint)
3103 (set_namestring, function_outside_compilation_unit_complaint)
3104 (read_dbx_symtab, process_one_symbol): Update.
3105 * gdbtypes.c (stub_noname_complaint): Update.
3106 * windows-nat.c (handle_unload_dll): Update.
3107 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3108 (decode_base_type): Update.
3109 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3110 (eb_complaint, record_include_begin, record_include_end)
3111 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3112 (process_xcoff_symbol, read_symbol)
3113 (function_outside_compilation_unit_complaint)
3114 (scan_xcoff_symtab): Update.
3115 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3116 * buildsym.c (finish_block_internal, make_blockvector)
3117 (end_symtab_get_static_block, augment_type_symtab): Update.
3118 * dtrace-probe.c (dtrace_process_dof)
3119 (dtrace_static_probe_ops::get_probes): Update.
3120 * complaints.h (struct complaint): Don't declare.
3121 (symfile_complaints): Remove.
3122 (complaint_internal): Remove "complaints" parameter.
3123 (complaint): Likewise.
3124 (clear_complaints): Likewise.
3125 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3126 (reread_symbols): Update.
3127 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3128 (dwarf2_frame_cache, decode_frame_entry): Update.
3129 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3130 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3131 (info_selectors_command): Update.
3132 * macrotab.c (macro_include, check_for_redefinition)
3133 (macro_undef): Update.
3134 * objfiles.c (filter_overlapping_sections): Update.
3135 * stabsread.c (invalid_cpp_abbrev_complaint)
3136 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3137 (define_symbol, error_type, read_type, rs6000_builtin_type)
3138 (stabs_method_name_from_physname, read_member_functions)
3139 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3140 (attach_fields_to_type, complain_about_struct_wipeout)
3141 (read_range_type, read_args, common_block_start)
3142 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3144 * mdebugread.c (index_complaint, unknown_ext_complaint)
3145 (basic_type_complaint, bad_tag_guess_complaint)
3146 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3147 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3148 (parse_procedure, parse_lines)
3149 (function_outside_compilation_unit_complaint)
3150 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3151 (bad_tag_guess_complaint, reg_value_complaint): Update.
3152 * cp-support.c (demangled_name_complaint): Update.
3153 * macroscope.c (sal_macro_scope): Update.
3154 * dwarf-index-write.c (class debug_names): Update.
3156 2018-05-23 Tom Tromey <tom@tromey.com>
3158 * complaints.c (clear_complaints): Remove "noisy" parameter.
3159 * complaints.h (clear_complaints): Update.
3160 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3161 (reread_symbols): Update.
3163 2018-05-23 Tom Tromey <tom@tromey.com>
3165 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3167 (vcomplaint, clear_complaints): Update.
3168 (symfile_explanations): Remove some messages.
3170 2018-05-23 Tom Tromey <tom@tromey.com>
3172 * complaints.c (internal_complaint): Remove.
3173 * complaints.h (internal_complaint): Remove.
3175 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3177 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3179 2018-05-22 Pedro Alves <palves@redhat.com>
3181 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3182 (remote_fileio_badfd, remote_fileio_return_errno)
3183 (remote_fileio_return_success, remote_fileio_func_open)
3184 (remote_fileio_func_open, remote_fileio_func_close)
3185 (remote_fileio_func_read, remote_fileio_func_write)
3186 (remote_fileio_func_lseek, remote_fileio_func_rename)
3187 (remote_fileio_func_unlink, remote_fileio_func_stat)
3188 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3189 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3190 remote_target parameter.
3191 (remote_fio_func_map) <func>: Add remote_target parameter.
3192 (do_remote_fileio_request, remote_fileio_request):
3193 * remote-fileio.h (remote_fileio_request):
3194 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3195 remote_target parameter.
3196 (remote_notif_process, handle_notification): Adjust to pass down
3198 (remote_notif_state_allocate): Add remote_target parameter. Save
3200 * remote-notif.h (struct remote_target): Forward declare.
3201 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3202 remote_target parameter.
3203 (struct remote_notif_state) <remote>: New field.
3204 (remote_notif_ack, remote_notif_parse): Add remote_target
3206 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3207 remote_target parameter.
3208 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3209 (threads_listing_context, rmt_thread_action, protocol_feature)
3210 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3211 (packet_result, struct threads_listing_context, remote_state):
3212 Move definitions and declarations higher up.
3213 (remote_target) <~remote_target>: Declare.
3214 (remote_download_command_source, remote_file_put, remote_file_get)
3215 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3216 (remote_hostio_pread_vFile, remote_hostio_send_command)
3217 (remote_hostio_set_filesystem, remote_hostio_open)
3218 (remote_hostio_close, remote_hostio_unlink, remote_state)
3219 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3220 (get_memory_write_packet_size, get_memory_read_packet_size)
3221 (append_pending_thread_resumptions, remote_detach_1)
3222 (append_resumption, remote_resume_with_vcont)
3223 (add_current_inferior_and_thread, wait_ns, wait_as)
3224 (process_stop_reply, remote_notice_new_inferior)
3225 (process_initial_stop_replies, remote_add_thread)
3226 (btrace_sync_conf, remote_btrace_maybe_reopen)
3227 (remove_new_fork_children, kill_new_fork_children)
3228 (discard_pending_stop_replies, stop_reply_queue_length)
3229 (check_pending_events_prevent_wildcard_vcont)
3230 (discard_pending_stop_replies_in_queue, stop_reply)
3231 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3232 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3233 (remote_interrupt_as, remote_interrupt_ns)
3234 (remote_get_noisy_reply, remote_query_attached)
3235 (remote_add_inferior, remote_current_thread, get_current_thread)
3236 (set_thread, set_general_thread, set_continue_thread)
3237 (set_general_process, write_ptid)
3238 (remote_unpack_thread_info_response, remote_get_threadinfo)
3239 (parse_threadlist_response, remote_get_threadlist)
3240 (remote_threadlist_iterator, remote_get_threads_with_ql)
3241 (remote_get_threads_with_qxfer)
3242 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3243 (get_offsets, remote_check_symbols, remote_supported_packet)
3244 (remote_query_supported, remote_packet_size)
3245 (remote_serial_quit_handler, remote_detach_pid)
3246 (remote_vcont_probe, remote_resume_with_hc)
3247 (send_interrupt_sequence, interrupt_query)
3248 (remote_notif_get_pending_events, fetch_register_using_p)
3249 (send_g_packet, process_g_packet, fetch_registers_using_g)
3250 (store_register_using_P, store_registers_using_G)
3251 (set_remote_traceframe, check_binary_download)
3252 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3253 (remote_xfer_live_readonly_partial, remote_read_bytes)
3254 (remote_send_printf, remote_flash_write, readchar)
3255 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3256 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3257 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3258 (extended_remote_disable_randomization, extended_remote_run)
3259 (send_environment_packet, extended_remote_environment_support)
3260 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3261 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3262 (packet_command): Now methods of ...
3263 (remote_target): ... this class.
3264 (m_remote_state) <remote_target>: New field.
3265 (struct remote_state) <stop_reply_queue,
3266 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3268 (remote_state::remote_state): Allocate stop_reply_queue.
3269 (remote_state): Delete global.
3270 (get_remote_state_raw): Delete.
3271 (remote_target::get_remote_state): Allocate m_remote_state on
3273 (get_current_remote_target): New.
3274 (remote_ops, extended_remote_ops): Delete.
3275 (wait_forever_enabled_p, remote_async_inferior_event_token):
3276 Delete, moved to struct remote_state.
3277 (remote_target::close): Delete self. Destruction bits split to
3279 (remote_target::~remote_target): ... this.
3280 (show_memory_packet_size): Adjust to use
3281 get_current_remote_target.
3282 (struct protocol_feature) <func>: Add remote_target parameter.
3283 All callers adjusted.
3284 (curr_quit_handler_target): New.
3285 (remote_serial_quit_handler): Reimplement.
3286 (remote_target::open_1): Adjust to use get_current_remote_target.
3287 Heap-allocate remote_target/extended_remote_target instances.
3288 (vcont_builder::vcont_builder): Add remote_target parameter, and
3289 save it in m_remote. All callers adjusted.
3290 (vcont_builder::m_remote): New field.
3291 (vcont_builder::restart, vcont_builder::flush)
3292 (vcont_builder::push_action): Use it.
3293 (remote_target::commit_resume): Use it.
3294 (struct queue_iter_param) <remote>: New field.
3295 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3296 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3297 (check_pending_event_prevents_wildcard_vcont_callback)
3298 (remote_target::check_pending_events_prevent_wildcard_vcont)
3299 (remote_target::discard_pending_stop_replies)
3300 (remote_target::discard_pending_stop_replies_in_queue)
3301 (remote_target::remote_notif_remove_queued_reply): Fill in
3303 (remote_notif_get_pending_events): New.
3304 (remote_target::readchar, remote_target::remote_serial_write):
3305 Save/restore curr_quit_handler_target.
3307 (kill_new_fork_children): Fill in 'remote' field.
3308 (packet_command): Use get_current_remote_target, defer to
3309 remote_target method of same name.
3310 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3311 parameter, and save it in m_remote. All callers adjusted.
3312 (scoped_remote_fd::release): Use m_remote.
3313 (scoped_remote_fd::m_remote): New field.
3314 (remote_file_put, remote_file_get, remote_file_delete): Use
3315 get_current_remote_target, defer to remote_target method of same
3317 (remote_btrace_reset): Add remote_state paremeter. Update all
3319 (remote_async_inferior_event_handler). Pass down 'data'.
3320 (remote_new_objfile): Use get_current_remote_target.
3321 (remote_target::vcont_r_supported): New.
3322 (set_range_stepping): Use get_current_remote_target and
3323 remote_target::vcont_r_supported.
3324 (_initialize_remote): Don't allocate 'remote_state' and
3325 'stop_reply_queue' globals.
3326 * remote.h (struct remote_target): Forward declare.
3327 (getpkt, putpkt, remote_notif_get_pending_events): Add
3328 'remote_target' parameter.
3330 2018-05-22 Pedro Alves <palves@redhat.com>
3332 * remote.c (vcont_builder): Now a class. Make all data members
3334 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3336 (vcont_builder_restart): Rename to ...
3337 (vcont_builder::restart): ... this.
3338 (vcont_builder_flush): Rename to ...
3339 (vcont_builder::flush): ... this.
3340 (vcont_builder_push_action): Rename to ...
3341 (vcont_builder::push_action): ... this.
3342 (remote_target::commit_resume): Adjust.
3344 2018-05-22 Pedro Alves <palves@redhat.com>
3346 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3347 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3348 (get_fixed_memory_packet_size): New.
3349 (get_memory_packet_size): Use it.
3350 (set_memory_packet_size): Don't override the config size with
3351 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3352 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3353 Don't refer to get_memory_packet_size if not connected to a remote
3354 target. Show "(default)" if configured size is 0.
3356 2018-05-22 Pedro Alves <palves@redhat.com>
3358 * remote.c (remote_target::mourn_inferior): Move
3359 discard_pending_stop_replies call here from ...
3360 (_initialize_remote): ... here.
3362 2018-05-22 Pedro Alves <palves@redhat.com>
3364 * remote.c (compare_section_command): Remove set_general_process
3367 2018-05-22 Pedro Alves <palves@redhat.com>
3369 * remote.c (struct packet_reg, struct remote_arch_state):
3370 Move higher up in the file.
3371 (remote_state) <m_arch_states>: Store remote_arch_state values
3372 instead of remote_arch_state pointers.
3373 (remote_state::get_remote_arch_state): Adjust.
3375 2018-05-22 Pedro Alves <palves@redhat.com>
3377 * remote.c: Include <unordered_map>.
3378 (remote_state): Now a class.
3379 (remote_state) <get_remote_arch_state>: Declare method.
3380 <get_remote_arch_state>: New field.
3381 (remote_arch_state) <remote_arch_state>: Declare ctor.
3382 <regs>: Now a unique_ptr.
3383 (remote_gdbarch_data_handle): Delete.
3384 (get_remote_arch_state): Delete.
3385 (remote_state::get_remote_arch_state): New.
3386 (get_remote_state): Adjust to call remote_state's
3387 get_remote_arch_state method.
3388 (init_remote_state): Delete, bits factored out to ...
3389 (remote_arch_state::remote_arch_state): ... this new method.
3390 (get_remote_packet_size, get_memory_packet_size)
3391 (process_g_packet, remote_target::fetch_registers)
3392 (remote_target::prepare_to_store, store_registers_using_G)
3393 (remote_target::store_registers, remote_target::get_trace_status):
3394 Adjust to call remote_state's method.
3395 (_initialize_remote): Remove reference to
3396 remote_gdbarch_data_handle.
3398 2018-05-22 Pedro Alves <palves@redhat.com>
3400 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3401 pread>: New method declarations.
3402 (remote_target::open_1): Adjust.
3403 (readahead_cache_invalidate): Rename to ...
3404 (readahead_cache::invalidate): ... this, and adjust to be a class
3406 (readahead_cache_invalidate_fd): Rename to ...
3407 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3409 (remote_hostio_pwrite): Adjust.
3410 (remote_hostio_pread_from_cache): Rename to ...
3411 (readahead_cache::pread): ... this, and adjust to be a class
3413 (remote_hostio_close): Adjust.
3415 2018-05-22 Pedro Alves <palves@redhat.com>
3417 * remote.c (remote_hostio_close_cleanup): Delete.
3418 (class scoped_remote_fd): New.
3419 (remote_file_put, remote_file_get): Use it.
3421 2018-05-22 Pedro Alves <palves@redhat.com>
3423 (struct vCont_action_support): Use bool and initialize all fields.
3424 (struct readahead_cache): Initialize all fields.
3425 (remote_state): Use bool and initialize all fields.
3426 (remote_state::remote_state, remote_state::~remote_state): New.
3427 (new_remote_state): Delete.
3428 (_initialize_remote): Use new to allocate remote_state.
3430 2018-05-22 Pedro Alves <palves@redhat.com>
3434 * c-exp.y: Include "c-support.h".
3435 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3436 of tolower. Use c_ident_is_alpha to scan names.
3437 * c-lang.c: Include "c-support.h".
3438 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3439 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3440 * c-support.h: New file, with bits factored out from ...
3441 * cp-name-parser.y: ... this file.
3442 Include "c-support.h".
3443 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3444 c-support.h and renamed.
3445 (symbol_end, yylex): Adjust.
3447 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3449 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3450 parameter type to CORE_ADDR.
3451 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3452 parameter type in declaration to CORE_ADDR.
3453 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3454 target_auxv_search to get AT_HWCAP and use the result to get the
3456 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3457 to CORE_ADDR. Remove the cast of the return value to unsigned
3458 long. Fix error predicate of target_auxv_search.
3459 (ppc_linux_nat_target::read_description): Change the type of the
3460 hwcap variable to CORE_ADDR.
3462 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3464 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3465 if the size of fpscr is larger than 32 bits.
3467 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3469 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3470 (ppc32_linux_vsxregmap): New global.
3471 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3472 regcache_supply_regset, and regcache_collect_regset.
3473 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3474 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3475 (fetch_vsx_register, store_vsx_register): Remove.
3476 (fetch_vsx_registers): Add regno parameter. Get regset using
3477 ppc_linux_vsxregset. Use regset to supply registers.
3478 (store_vsx_registers): Add regno parameter. Get regset using
3479 ppc_linux_vsxregset. Use regset to collect registers.
3480 (fetch_register): Call fetch_vsx_registers instead of
3482 (store_register): Call store_vsx_registers instead of
3484 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3485 new regno parameter.
3486 (store_ppc_registers): Call store_vsx_registers with -1 for the
3487 new regno parameter.
3488 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3489 (ppc_collect_vsxregset): Remove.
3491 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3493 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3495 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3496 for vector register offset fields.
3497 (ppc64_fbsd_reg_offsets): Likewise.
3498 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3499 to vector register offset fields.
3500 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3501 to vector register offset fields.
3502 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3503 vector register offset fields.
3504 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3505 initializers for vector register offset fields.
3506 (rs6000_aix64_reg_offsets): Likewise.
3507 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3508 (ppc_supply_vrregset): Remove.
3509 (ppc_collect_vrregset): Remove.
3510 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3511 (ppc_linux_vrregset) : New function.
3512 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3513 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3514 (ppc32_linux_vrregset): Remove.
3515 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3516 and use result instead of ppc32_linux_vrregset.
3517 (ppc32_linux_reg_offsets): Remove initializers for vector register
3519 (ppc64_linux_reg_offsets): Likewise.
3520 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3521 * ppc-linux-nat.c: Include regset.h.
3522 (gdb_vrregset_t): Adjust comment to account for little-endian
3524 (supply_vrregset, fill_vrregset): Remove.
3525 (fetch_altivec_register, store_altivec_register): Remove.
3526 (fetch_altivec_registers): Add regno parameter. Get regset using
3527 ppc_linux_vrregset. Use regset to supply registers.
3528 (store_altivec_registers): Add regno parameter. Get regset using
3529 ppc_linux_vrregset. Use regset to collect registers.
3530 (fetch_register): Call fetch_altivec_registers instead of
3531 fetch_altivec_register.
3532 (store_register): Call store_altivec_registers instead of
3533 store_altivec_register.
3534 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3535 the new regno parameter.
3536 (store_ppc_registers): Call store_altivec_registers with -1 for
3537 the new regno parameter.
3539 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3541 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3542 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3543 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3544 (gdb_vrregset_t): Change array type size to
3545 PPC_LINUX_SIZEOF_VRREGSET.
3546 (gdb_vsxregset_t): Change array type size to
3547 PPC_LINUX_SIZEOF_VSXREGSET.
3548 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3549 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3550 PPC_LINUX_SIZEOF_VSXREGSET.
3552 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3554 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3555 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3557 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3558 ppc_linux_target_wordsize with tid.
3559 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3561 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3562 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3563 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3564 tid parameter. Remove static specifier.
3565 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3566 (ppc_linux_target_wordsize): New declaration.
3568 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3570 * arch/ppc-linux-common.c: New file.
3571 * arch/ppc-linux-common.h: New file.
3572 * arch/ppc-linux-tdesc.h: New file.
3573 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3574 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3575 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3576 arch/ppc-linux-tdesc.h.
3577 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3578 arch/ppc-linux-tdesc.h.
3579 (ppc_linux_nat_target::read_description): Remove target
3580 description matching code. Fill a ppc_linux_features struct and
3581 call ppc_linux_match_description with it. Move comment about ISA
3582 2.05 to ppc-linux-common.c.
3583 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3584 arch/ppc-linux-tdesc.h.
3585 (ppc_linux_core_read_description): Remove target description
3586 matching code. Fill a ppc_linux_features struct and call
3587 ppc_linux_match_description with it.
3588 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3589 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3590 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3591 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3592 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3593 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3594 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3595 (tdesc_powerpc_e500l): Remove.
3597 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3599 * ada-lang.c (catch_assert_command): Pass empty string instead
3600 of NULL for excep_string argument.
3602 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3604 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3605 the width of the requested register exceeds the width of the
3608 2018-05-21 Tom Tromey <tom@tromey.com>
3610 * printcmd.c (output_command): Remove.
3611 (output_command_const): Rename to output_command.
3612 * valprint.h (output_command): Rename from output_command_const.
3613 * tracepoint.c (trace_dump_actions): Call output_command.
3615 2018-05-21 Tom Tromey <tom@tromey.com>
3617 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3618 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3619 * ada-lang.h (create_ada_exception_catchpoint): Update.
3620 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3622 (create_excep_cond_exprs, ~ada_catchpoint)
3623 (should_stop_exception, print_one_exception)
3624 (print_mention_exception, print_recreate_exception): Update.
3625 (ada_get_next_arg): Remove.
3626 (catch_ada_exception_command_split): Use std::string. Change type
3627 of "excep_string", "cond_string".
3628 (catch_ada_exception_command): Update.
3629 (create_ada_exception_catchpoint): Change type of excep_string.
3630 (ada_exception_sal): Remove excep_string parameter.
3631 (~ada_catchpoint): Remove.
3633 2018-05-21 Tom Tromey <tom@tromey.com>
3635 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3638 2018-05-21 Tom Tromey <tom@tromey.com>
3640 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3641 Return unique_xmalloc_ptr.
3642 (print_it_exception): Update.
3644 2018-05-21 Tom Tromey <tom@tromey.com>
3646 * tracepoint.c (trace_dump_actions): Use std::string.
3648 2018-05-21 Tom Tromey <tom@tromey.com>
3650 * symfile.c (reread_symbols): Use std::string for original_name.
3652 2018-05-21 Tom Tromey <tom@tromey.com>
3654 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3655 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3658 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3660 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3662 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3663 * objfiles.c (get_objfile_bfd_data): Allocate
3664 objfile_per_bfd_storage with obstack_new when allocating on
3667 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3669 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3671 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3672 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3673 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3674 (add_pending): Likewise.
3675 (parse_symbol): Likewise.
3676 (parse_partial_symbols): Likewise.
3677 (psymtab_to_symtab_1): Likewise.
3678 (new_psymtab): Likewise.
3679 (elfmdebug_build_psymtabs): Likewise.
3680 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3681 * objfiles.c (get_objfile_bfd_data): Likewise.
3682 (objfile_register_static_link): Likewise.
3683 * psymtab.c (allocate_psymtab): Likewise.
3684 * stabsread.c (read_member_functions): Likewise.
3685 * xcoffread.c (xcoff_end_psymtab): Likewise.
3687 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3689 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3690 compiler supports std::is_trivially_constructible.
3691 * common/poison.h: Include obstack.h.
3692 (IsMallocable): Define to is_trivially_constructible if the
3693 compiler supports it, define to true_type otherwise.
3697 (XOBNEWVEC): Redefine.
3698 * gdb_obstack.h (obstack_zalloc): New.
3699 (OBSTACK_ZALLOC): Redefine.
3700 (obstack_calloc): New.
3701 (OBSTACK_CALLOC): Redefine.
3703 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3704 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3706 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3707 obstack_calloc/obstack_zalloc.
3708 (gdbarch_obstack_zalloc): Remove.
3709 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3711 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3713 * stack.c (backtrace_command_1): Remove useless variable int i.
3715 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3717 * stack.c (print_frame_info): Fix comment.
3719 2018-05-18 Tom Tromey <tom@tromey.com>
3721 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3722 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3723 (~dwarf2_per_objfile): Update
3724 (dwarf2_get_dwz_file): Use new.
3725 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3728 2018-05-18 Tom Tromey <tom@tromey.com>
3730 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3732 * dwarf2read.c (struct dwp_file): Add constructor and
3734 (open_and_init_dwp_file): Return a unique_ptr.
3735 (dwarf2_per_objfile, create_dwp_hash_table)
3736 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3737 (lookup_dwo_unit_in_dwp): Update.
3738 (open_and_init_dwp_file, get_dwp_file): Update.
3740 2018-05-18 Tom Tromey <tom@tromey.com>
3742 * dwarf2read.c (dwarf2_per_objfile): Update.
3743 (struct mapped_index): Add initializers.
3744 (dwarf2_read_index): Use new.
3745 (dw2_symtab_iter_init): Update.
3746 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3749 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3751 * dwarf2read.c (mapped_index) <total_size>: Remove.
3753 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3755 * unittests/format_pieces-selftests.c (test_format_specifier):
3758 2018-05-18 Tom Tromey <tom@tromey.com>
3760 * c-typeprint.c (maybe_print_hole): New function.
3761 (c_print_type_struct_field_offset): Update.
3762 (c_type_print_base_struct_union): Call maybe_print_hole.
3764 2018-05-17 Keith Seitz <keiths@redhat.com>
3766 * breakpoint.c (build_bpstat_chain): New function, moved from
3768 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3769 If no stop chain is passed, call build_bpstat_chain to build it.
3770 * breakpoint.h (build_bpstat_chain): Declare.
3771 (bpstat_stop_status): Move documentation here from breakpoint.c.
3772 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3773 build the stop chain and pass it to skip_inline_frames.
3774 Pass this stop chain to bpstat_stop_status.
3775 * inline-frame.c: Include breakpoint.h.
3776 (stopped_by_user_bp_inline_frame): New function.
3777 (skip_inline_frames): Add parameter `stop_chain'.
3778 Move documention to inline-frame.h.
3779 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3780 whether the frame should be elided.
3781 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3782 Add moved documentation and update for new parameter.
3784 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3787 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3788 unittests/format_pieces-selftests.c.
3789 * common/format.h (format_piece) <operator==>: New.
3790 (format_pieces) <operator[]>: Remove.
3791 * common/format.c (format_pieces::format_pieces): Handle \e.
3792 * unittests/format_pieces-selftests.c: New.
3794 2018-05-17 Tom Tromey <tom@tromey.com>
3797 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3798 (dw2_instantiate_symtab): Add skip_partial parameter.
3799 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3800 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3801 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3802 (dw2_expand_symtabs_matching_one)
3803 (dw2_find_pc_sect_compunit_symtab)
3804 (dw2_debug_names_lookup_symbol)
3805 (dw2_debug_names_expand_symtabs_for_function): Update.
3806 (init_cutu_and_read_dies): Add skip_partial parameter.
3807 (process_psymtab_comp_unit, build_type_psymtabs_1)
3808 (process_skeletonless_type_unit, load_partial_comp_unit)
3809 (psymtab_to_symtab_1): Update.
3810 (load_full_comp_unit): Add skip_partial parameter.
3811 (process_imported_unit_die, dwarf2_read_addr_index)
3812 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3813 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3814 (read_signatured_type): Update.
3816 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3818 * value.c (release_value): Remove unused variable.
3819 (record_latest_value): Likewise.
3820 (access_value_history): Likewise.
3821 (preserve_values): Likewise.
3823 2018-05-17 Tom Tromey <tom@tromey.com>
3825 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3828 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3831 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3832 Also handle registers whose width is not a multiple of
3834 (linux_nat_trad_target::store_register): Likewise.
3836 2018-05-16 Tom Tromey <tom@tromey.com>
3838 * gdbcore.h (core_bfd): Redefine.
3839 * corelow.c (core_target::close): Update.
3840 (core_target_open): Update.
3841 * progspace.h (struct program_space) <cbfd>: Now a
3844 2018-05-16 Tom Tromey <tom@tromey.com>
3847 * symfile-add-flags.h (enum symfile_add_flags)
3848 <SYMFILE_NOT_FILENAME>: New constant.
3849 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3850 objfile name from BFD.
3851 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3852 * minidebug.c (find_separate_debug_file_in_section): Put
3853 ".gnu_debugdata" into BFD's file name.
3855 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3857 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3860 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3863 * aarch64-tdep.c (aarch64_analyze_prologue,
3864 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3865 Indicate not interested in errors.
3867 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3869 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3870 Supply the MIPS_ZERO_REGNUM register.
3872 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3874 * mips-tdep.c (mask_address_var): Make variable static.
3876 2018-05-14 Tom Tromey <tom@tromey.com>
3878 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3880 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3882 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3883 FXSAVE_ADDR for the mxcsr register.
3885 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3887 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3889 2018-05-11 Pedro Alves <palves@redhat.com>
3891 * corelow.c (core_target) <core_target>: No longer inline.
3892 Initialize m_core_gdbarch, m_core_vec and build the section table
3894 <~core_target>: New.
3895 <core_gdbarch, get_core_register_section>: New methods.
3896 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3897 factored out from ...
3898 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3900 (sniff_core_bfd): Add gdbarch parameter.
3901 (core_close): Delete, merged into ...
3902 (core_target::close): ... here. Delete self.
3903 (core_close_cleanup): Delete.
3904 (core_target_open): Allocate a core_target on the heap. Use a
3905 unique_ptr instead of a cleanup. Bits moved into the core_target
3906 ctor. Adjust to use core_target methods instead of globals.
3907 (get_core_register_section): Rename to ...
3908 (core_target::get_core_register_section): ... this and adjust.
3909 (struct get_core_registers_cb_data): New.
3910 (get_core_registers_cb): Use it. Use bool.
3911 (core_target::fetch_registers, core_target::files_info)
3912 (core_target::xfer_partial, core_target::read_description)
3913 (core_target::pid_to, core_target::thread_name): Adjust to
3914 reference class fields instead of globals.
3915 * target.h (struct target_ops_deleter, target_ops_up): New.
3917 2018-05-11 Pedro Alves <palves@redhat.com>
3919 * corefile.c (core_file_command): Move to corelow.c.
3920 * corelow.c (the_core_target): Delete.
3921 (core_file_command): Moved from corefile.c. Check exec_bfd
3922 instead of the_core_target. Use target_detach instead of calling
3923 into the_core_target directly.
3924 (maybe_say_no_core_file_now): New.
3925 (core_target::detach): Use it.
3926 (_initialize_corelow): Remove references to the_core_target.
3927 * gdbcore.h (the_core_target): Delete.
3929 2018-05-11 Tom Tromey <tromey@redhat.com>
3930 Pedro Alves <palves@redhat.com>
3932 * corefile.c (core_bfd): Remove.
3933 * gdbcore.h (core_bfd): Now a macro.
3934 * progspace.h (struct program_space) <cbfd>: New field.
3936 2018-05-11 Tom Tromey <tom@tromey.com>
3938 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3941 2018-05-10 Tom Tromey <tom@tromey.com>
3943 * configure: Rebuild.
3944 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3946 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3949 * regformats/regdat.sh: Adjust script, following the addition
3950 of the new expedite_regs parameter to init_target_desc.
3952 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3955 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3956 set_gdbarch_significant_addr_bit.
3957 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3958 set_gdbarch_significant_addr_bit.
3959 * utils.c (address_significant): Update to sign extend addr.
3961 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3963 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3964 (xtensa_linux_init_abi): Limit tdep->num_regs by
3965 tdep->num_nopriv_regs.
3966 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3967 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3970 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3972 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3974 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3976 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3977 (I387_MXCSR_INIT_VAL): New constant.
3978 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3979 buffer if it was supplied by the inferior.
3980 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3981 (i387_xsave_get_clear_bv): New function.
3982 (i387_supply_xsave): Only read x87 control registers from the
3983 xsave buffer if the feature is enabled, and the state will have
3984 been written, otherwise, provide a suitable default.
3985 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3986 including x87 control registers. Update control registers if they
3987 have changed from the default value, and mark features as enabled
3989 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3991 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3993 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3995 2018-05-07 Tom Tromey <tom@tromey.com>
3997 * configure: Rebuild.
3998 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4000 2018-05-07 Tom Tromey <tom@tromey.com>
4003 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4004 bit. Use correct value for VDIV.
4006 2018-05-04 Tom Tromey <tom@tromey.com>
4008 * configure: Rebuild.
4009 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4011 2018-05-04 Tom Tromey <tom@tromey.com>
4013 * linux-record.c (record_linux_system_call) <case
4014 RECORD_SYS_RECVFROM>: Add "break".
4016 2018-05-04 Tom Tromey <tom@tromey.com>
4018 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4019 Add missing "break".
4020 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4021 Add missing "break".
4023 2018-05-04 Tom Tromey <tom@tromey.com>
4025 * rs6000-tdep.c (ppc_process_record_op4)
4026 (ppc_process_record_op63): Add fall-through comment.
4028 2018-05-04 Tom Tromey <tom@tromey.com>
4030 * i386-tdep.c (i386_process_record): Add fall-through comment.
4032 2018-05-04 Tom Tromey <tom@tromey.com>
4034 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4037 2018-05-04 Tom Tromey <tom@tromey.com>
4039 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4040 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4041 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4043 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4045 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4048 2018-05-04 Tom Tromey <tom@tromey.com>
4050 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4052 2018-05-04 Tom Tromey <tom@tromey.com>
4054 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4055 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4056 * symfile.c (section_is_mapped): Fix fall-through comment.
4057 * stabsread.c (define_symbol, read_member_functions): Fix
4058 fall-through comment.
4059 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4061 * remote.c (remote_wait_as): Fix fall-through comment.
4062 * p-exp.y (yylex): Fix fall-through comment.
4063 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4065 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4066 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4067 * jv-exp.y (yylex): Fix fall-through comment.
4068 * go-exp.y (lex_one_token): Fix fall-through comment.
4069 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4070 fall-through comment.
4071 * f-exp.y (yylex): Fix fall-through comment.
4072 * dwarf2read.c (process_die): Fix fall-through comments.
4073 * dbxread.c (process_one_symbol): Fix fall-through comment.
4074 * d-exp.y (lex_one_token): Fix fall-through comment.
4075 * cp-name-parser.y (yylex): Fix fall-through comment.
4076 * coffread.c (coff_symtab_read): Fix fall-through comment.
4077 * c-exp.y (lex_one_token): Fix fall-through comment.
4078 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4080 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4083 2018-05-04 Tom Tromey <tom@tromey.com>
4086 * NEWS: Mention gdb.execute change.
4087 * gdbcmd.h (execute_control_command): Don't declare.
4088 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4089 execute_control_commands, execute_control_commands_to_string.
4090 * cli/cli-script.h (execute_control_commands)
4091 (execute_control_commands_to_string): Declare.
4092 (execute_control_command): Add from_tty parameter.
4093 * cli/cli-script.c (execute_control_commands)
4094 (execute_control_commands_to_string): New functions.
4095 (execute_user_command): Use execute_control_commands.
4096 (execute_control_command_1): Add "from_tty" parameter. Update.
4097 (execute_control_command): Likewise.
4099 2018-05-04 Tom Tromey <tom@tromey.com>
4102 * NEWS: Mention that breakpoint commands are writable.
4103 * python/py-breakpoint.c (bppy_set_commands): New function.
4104 (breakpoint_object_getset) <"commands">: Use it.
4106 2018-05-04 Tom Tromey <tom@tromey.com>
4108 * tracepoint.c (actions_command): Update.
4109 * mi/mi-cmd-break.c (mi_command_line_array)
4110 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4111 (mi_read_next_line): Remove.
4112 (mi_cmd_break_commands): Update.
4113 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4115 * cli/cli-script.c (get_command_line): Update.
4116 (process_next_line): Use function_view. Constify.
4117 (recurse_read_control_structure, read_command_lines)
4118 (read_command_lines_1): Change argument types to function_view.
4119 (do_define_command, document_command): Update.
4120 * breakpoint.h (check_tracepoint_command): Don't declare.
4121 * breakpoint.c (check_tracepoint_command): Remove.
4122 (commands_command_1, create_tracepoint_from_upload): Update.
4124 2018-05-04 Tom Tromey <tom@tromey.com>
4127 * cli/cli-script.h (enum command_control_type) <define_control>:
4129 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4130 (build_command_line, execute_control_command_1)
4131 (process_next_line): Likewise.
4132 (do_define_command): New function, extracted from define_command.
4133 (define_command): Use it.
4135 2018-05-04 Tom Tromey <tom@tromey.com>
4137 * tracepoint.c (actions_command): Update.
4138 * cli/cli-script.h (read_command_lines): Update.
4139 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4140 (MAX_TMPBUF): Remove define.
4141 (define_command): Use string_printf.
4142 (document_command): Likewise.
4143 * breakpoint.c (commands_command_1): Update.
4145 2018-05-04 Tom Tromey <tom@tromey.com>
4147 * top.c (execute_command): Update.
4148 * cli/cli-script.h (print_command_lines): Now varargs.
4149 * cli/cli-script.c (print_command_lines): Now varargs.
4150 (execute_control_command_1) <case while_control, case if_control>:
4153 2018-05-04 Tom Tromey <tom@tromey.com>
4155 * tracepoint.c (all_tracepoint_actions): Rename from
4156 all_tracepoint_actions_and_cleanup. Change return type.
4157 (actions_command, encode_actions_1, encode_actions)
4158 (trace_dump_actions, tdump_command): Update.
4159 * remote.c (remote_download_command_source): Update.
4160 * python/python.c (gdbpy_eval_from_control_command)
4161 (python_command, python_interactive_command): Update.
4162 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4163 * guile/guile.c (guile_command)
4164 (gdbscm_eval_from_control_command, guile_command): Update.
4165 * compile/compile.c (compile_code_command)
4166 (compile_print_command, compile_to_object): Update.
4167 * cli/cli-script.h (struct command_lines_deleter): New.
4168 (counted_command_line): New typedef.
4169 (struct command_line): Add constructor, destructor.
4170 <body_list>: Remove.
4171 <body_list_0, body_list_1>: New members.
4172 (command_line_up): Remove typedef.
4173 (read_command_lines, read_command_lines_1, get_command_line):
4175 (copy_command_lines): Don't declare.
4176 * cli/cli-script.c (build_command_line): Use "new".
4177 (get_command_line): Return counted_command_line.
4178 (print_command_lines, execute_user_command)
4179 (execute_control_command_1, while_command, if_command): Update.
4180 (realloc_body_list): Remove.
4181 (process_next_line, recurse_read_control_structure): Update.
4182 (read_command_lines, read_command_lines_1): Return counted_command_line.
4183 (free_command_lines): Use "delete".
4184 (copy_command_lines): Remove.
4185 (define_command, document_command, show_user_1): Update.
4186 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4187 a counted_command_line.
4188 * breakpoint.h (counted_command_line): Remove typedef.
4189 (breakpoint_set_commands): Update.
4190 * breakpoint.c (check_no_tracepoint_commands)
4191 (validate_commands_for_breakpoint): Update.
4192 (breakpoint_set_commands): Change commands to be a
4193 counted_command_line.
4194 (commands_command_1, update_dprintf_command_list)
4195 (create_tracepoint_from_upload): Update.
4197 2018-05-04 Tom Tromey <tom@tromey.com>
4199 * cli/cli-decode.h (cmd_list_element): New constructor.
4200 (~cmd_list_element): New destructor.
4201 (struct cmd_list_element): Add initializers.
4202 * cli/cli-decode.c (do_add_cmd): Use "new".
4203 (delete_cmd): Use "delete".
4205 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4206 Pedro Alves <palves@redhat.com>
4208 PR breakpoints/19806 and support for PR external/20207.
4209 * NEWS: Mention Aarch64 watchpoint improvements.
4210 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4211 watchpoints and PR external/20207 watchpoints.
4212 * nat/aarch64-linux-hw-point.c
4213 (kernel_supports_any_contiguous_range): New.
4214 (aarch64_watchpoint_offset): New.
4215 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4216 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4217 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4218 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4219 next_addr_orig_p. Support PR external/20207 watchpoints.
4220 (aarch64_downgrade_regs): New.
4221 (aarch64_dr_state_insert_one_point): New parameters offset and
4223 (aarch64_dr_state_remove_one_point): Likewise.
4224 (aarch64_handle_breakpoint): Update caller.
4225 (aarch64_handle_aligned_watchpoint): Likewise.
4226 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4228 (aarch64_linux_set_debug_regs): Remove const from state. Call
4229 aarch64_downgrade_regs.
4230 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4231 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4232 (DR_CONTROL_MASK): ... this.
4233 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4234 (unsigned int aarch64_watchpoint_offset): New prototype.
4235 (aarch64_linux_set_debug_regs): Remove const from state.
4236 * utils.c (align_up, align_down): Move to ...
4237 * common/common-utils.c (align_up, align_down): ... here.
4238 * utils.h (align_up, align_down): Move to ...
4239 * common/common-utils.h (align_up, align_down): ... here.
4241 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4243 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4244 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4245 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4246 Re-implement to match the ABI as summarized in GCC's
4247 gcc/config/sparc/sparc.c. All callers updated.
4248 (sparc32_store_arguments): Remove assertion.
4250 2018-05-04 Tom Tromey <tom@tromey.com>
4252 * printcmd.c: Don't include tui.h.
4253 (decode_format): Use skip_spaces.
4255 2018-05-04 Tom Tromey <tom@tromey.com>
4258 * printcmd.c (last_count): New global.
4259 (x_command): Use saved count when repeating.
4261 2018-05-04 Tom Tromey <tom@tromey.com>
4263 * nto-procfs.c (do_closedir_cleanup): Remove.
4264 (procfs_pidlist): Use gdb_dir_up.
4265 * procfs.c (do_closedir_cleanup): Remove.
4266 (proc_update_threads): Use gdb_dir_up.
4267 * common/filestuff.h (struct gdb_dir_deleter): New.
4268 (gdb_dir_up): New typedef.
4270 2018-05-04 Tom Tromey <tom@tromey.com>
4272 * ada-lang.c (print_mention_exception): Use std::string.
4274 2018-05-04 Tom Tromey <tom@tromey.com>
4276 * ada-lang.c (create_excep_cond_exprs): Update.
4277 (ada_exception_catchpoint_cond_string): Use std::string.
4279 2018-05-04 Tom Tromey <tom@tromey.com>
4281 * ada-lang.c (xget_renaming_scope): Return std::string.
4282 (old_renaming_is_invisible): Update.
4284 2018-05-04 Tom Tromey <tom@tromey.com>
4286 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4287 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4289 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4291 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4293 2018-05-04 Tom Tromey <tom@tromey.com>
4295 * remote.c (remote_query_supported_append): Change type.
4296 (remote_check_symbols): Update.
4298 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4301 * configure.ac: Prepend libpython.
4302 * python/python-config.py: Likewise.
4303 * configure: Regenerate.
4305 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4307 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4309 2018-05-03 Pedro Alves <palves@redhat.com>
4312 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4313 override. Write 'true' instead of '1'.
4314 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4317 2018-05-02 Pedro Alves <palves@redhat.com>
4319 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4320 add_inf_child_target.
4321 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4322 add_inf_child_target.
4323 * aix-thread.c (aix_thread_target_info): New.
4324 (aix_thread_target) <shortname, longname, doc>: Delete.
4326 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4327 add_inf_child_target.
4328 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4329 add_inf_child_target.
4330 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4331 add_inf_child_target.
4332 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4333 add_inf_child_target.
4334 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4335 add_inf_child_target.
4336 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4337 add_inf_child_target.
4338 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4339 add_inf_child_target.
4340 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4341 add_inf_child_target.
4342 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4343 add_inf_child_target.
4344 * bfd-target.c (target_bfd_target_info): New.
4345 (target_bfd) <shortname, longname, doc>: Delete.
4347 * bsd-kvm.c (bsd_kvm_target_info): New.
4348 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4350 (bsd_kvm_target::open): Rename to ...
4351 (bsd_kvm_target_open): ... this. Adjust.
4352 * bsd-uthread.c (bsd_uthread_target_info): New.
4353 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4355 * corefile.c (core_file_command): Adjust.
4356 * corelow.c (core_target_info): New.
4357 (core_target) <shortname, longname, doc>: Delete.
4359 (core_target::open): Rename to ...
4360 (core_target_open): ... this. Adjust.
4361 * ctf.c (ctf_target_info): New.
4362 (ctf_target) <shortname, longname, doc>: Delete.
4364 (ctf_target::open): Rename to ...
4365 (ctf_target_open): ... this.
4366 (_initialize_ctf): Adjust.
4367 * exec.c (exec_target_info): New.
4368 (exec_target) <shortname, longname, doc>: Delete.
4370 (exec_target::open): Rename to ...
4371 (exec_target_open): ... this.
4372 * gdbcore.h (core_target_open): Declare.
4373 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4374 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4375 add_inf_child_target.
4376 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4377 add_inf_child_target.
4378 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4379 add_inf_child_target.
4380 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4381 add_inf_child_target.
4382 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4383 add_inf_child_target.
4384 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4385 add_inf_child_target.
4386 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4387 add_inf_child_target.
4388 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4389 add_inf_child_target.
4390 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4391 add_inf_child_target.
4392 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4393 add_inf_child_target.
4394 * inf-child.c (inf_child_target_info): New.
4395 (inf_child_target::info): New.
4396 (inf_child_open_target): Remove 'target' parameter. Use
4397 get_native_target instead.
4398 (inf_child_target::open): Delete.
4399 (add_inf_child_target): New.
4400 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4403 (add_inf_child_target): Declare.
4404 (inf_child_open_target): Declare.
4405 * linux-thread-db.c (thread_db_target_info): New.
4406 (thread_db_target) <shortname, longname, doc>: Delete.
4408 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4409 add_inf_child_target.
4410 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4411 add_inf_child_target.
4412 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4413 add_inf_child_target.
4414 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4415 add_inf_child_target.
4416 * make-target-delegates (print_class): Adjust.
4417 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4418 add_inf_child_target.
4419 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4420 add_inf_child_target.
4421 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4422 add_inf_child_target.
4423 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4424 add_inf_child_target.
4425 * nto-procfs.c (nto_native_target_info): New.
4426 (nto_procfs_target_native) <shortname, longname, doc>:
4429 (nto_procfs_target_info): New.
4430 (nto_procfs_target_procfs) <shortname, longname, doc>:
4433 (init_procfs_targets): Adjust.
4434 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4435 add_inf_child_target.
4436 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4437 add_inf_child_target.
4438 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4439 add_inf_child_target.
4440 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4441 add_inf_child_target.
4442 * ravenscar-thread.c (ravenscar_target_info): New.
4443 (ravenscar_thread_target) <shortname, longname, doc>:
4446 * record-btrace.c (record_btrace_target_info):
4447 (record_btrace_target) <shortname, longname, doc>: Delete.
4449 (record_btrace_target::open): Rename to ...
4450 (record_btrace_target_open): ... this. Adjust.
4451 * record-full.c (record_longname, record_doc): New.
4452 (record_full_base_target) <shortname, longname, doc>: Delete.
4454 (record_full_target_info): New.
4455 (record_full_target): <shortname>: Delete.
4457 (record_full_core_open_1, record_full_open_1): Update comments.
4458 (record_full_base_target::open): Rename to ...
4459 (record_full_open): ... this.
4460 (cmd_record_full_restore): Update.
4461 (_initialize_record_full): Update.
4462 * remote-sim.c (remote_sim_target_info): New.
4463 (gdbsim_target) <shortname, longname, doc>: Delete.
4465 (gdbsim_target::open): Rename to ...
4466 (gdbsim_target_open): ... this.
4467 (_initialize_remote_sim): Adjust.
4468 * remote.c (remote_doc): New.
4469 (remote_target_info): New.
4470 (remote_target) <shortname, longname, doc>: Delete.
4472 (extended_remote_target_info): New.
4473 (extended_remote_target) <shortname, longname, doc>: Delete.
4475 (remote_target::open_1): Make static. Adjust.
4476 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4477 * s390-linux-nat.c (_initialize_s390_nat): Use
4478 add_inf_child_target.
4479 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4480 add_inf_child_target.
4481 * sol-thread.c (thread_db_target_info): New.
4482 (sol_thread_target) <shortname, longname, doc>: Delete.
4484 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4485 add_inf_child_target.
4486 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4487 add_inf_child_target.
4488 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4489 add_inf_child_target.
4490 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4491 add_inf_child_target.
4492 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4493 add_inf_child_target.
4494 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4495 add_inf_child_target.
4496 * spu-linux-nat.c (_initialize_spu_nat): Use
4497 add_inf_child_target.
4498 * spu-multiarch.c (spu_multiarch_target_info): New.
4499 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4501 * target-delegates.c: Regenerate.
4502 * target.c: Include <unordered_map>.
4503 (target_ops_p): Delete.
4504 (DEF_VEC_P(target_ops_p)): Delete.
4505 (target_factories): New.
4506 (test_target_info): New.
4507 (test_target_ops::info): New.
4508 (open_target): Adjust to use target_factories.
4509 (add_target_with_completer): Rename to ...
4510 (add_target): ... this. Change prototype. Register target_info
4511 and open callback in target_factories. Register target_info in
4512 command context instead of target_ops.
4513 (add_target): Delete old implementation.
4514 (add_deprecated_target_alias): Change prototype. Adjust.
4515 (the_native_target): New.
4516 (set_native_target, get_native_target): New.
4517 (find_default_run_target): Use the_native_target.
4518 (find_attach_target, find_run_target): Simplify.
4519 (target_ops::open): Delete.
4520 (dummy_target_info): New.
4521 (dummy_target::shortname, dummy_target::longname)
4522 (dummy_target::doc): Delete.
4523 (dummy_target::info): New.
4524 (debug_target::shortname, debug_target::longname)
4525 (debug_target::doc): Delete.
4526 (debug_target::info): New.
4527 * target.h (struct target_info): New.
4528 (target_ops::~target_ops): Add comment.
4529 (target_ops::info): New.
4530 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4531 longer virtual. Implement in terms of target_info.
4532 (set_native_target, get_native_target): Declare.
4533 (target_open_ftype): New.
4534 (add_target, add_target_with_completer)
4535 (add_deprecated_target_alias): Change prototype.
4536 (test_target) <shortname, longname, doc>: Delete.
4538 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4539 add_inf_child_target.
4540 * tracefile-tfile.c (tfile_target_info): New.
4541 (tfile_target) <shortname, longname, doc>: Delete.
4543 (tfile_target::open): Rename to ...
4544 (tfile_target_open): ... this.
4545 (_initialize_tracefile_tfile): Adjust.
4546 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4547 add_inf_child_target.
4548 * windows-nat.c (_initialize_windows_nat): Use
4549 add_inf_child_target.
4550 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4551 add_inf_child_target.
4553 2018-05-02 Pedro Alves <palves@redhat.com>
4555 * linux-nat.h (linux_nat_target) <low_new_thread,
4556 low_delete_thread, low_new_fork, low_forget_process,
4557 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4558 New virtual methods.
4559 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4560 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4561 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4562 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4563 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4565 * linux-fork.c (delete_fork): Adjust to call low method.
4566 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4567 (linux_nat_new_fork, linux_nat_forget_process_hook)
4568 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4569 (linux_nat_status_is_event):
4570 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4571 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4573 (sigtrap_is_event): Rename to ...
4574 (linux_nat_target::low_status_is_event): ... this.
4575 (linux_nat_set_status_is_event): Delete.
4576 (save_stop_reason, linux_nat_wait_1)
4577 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4579 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4580 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4581 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4582 (linux_nat_set_prepare_to_resume): Delete.
4583 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4584 low virtual methods.
4585 * amd64-linux-nat.c: Likewise.
4586 * arm-linux-nat.c: Likewise.
4587 * i386-linux-nat.c: Likewise.
4588 * ia64-linux-nat.c: Likewise.
4589 * mips-linux-nat.c: Likewise.
4590 * ppc-linux-nat.c: Likewise.
4591 * s390-linux-nat.c: Likewise.
4592 * sparc64-linux-nat.c: Likewise.
4593 * x86-linux-nat.c: Likewise.
4594 * x86-linux-nat.h: Include "nat/x86-linux.h".
4595 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4596 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4599 2018-05-02 Pedro Alves <palves@redhat.com>
4601 * target.h (target_ops)
4602 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4603 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4604 stopped_by_watchpoint, have_continuable_watchpoint,
4605 stopped_data_address, watchpoint_addr_within_range,
4606 can_accel_watchpoint_condition, can_run, thread_alive,
4607 has_all_memory, has_memory, has_stack, has_registers,
4608 has_execution, can_async_p, is_async_p, supports_non_stop,
4609 always_non_stop_p, can_execute_reverse, supports_multi_process,
4610 supports_enable_disable_tracepoint,
4611 supports_disable_randomization, supports_string_tracing,
4612 supports_evaluation_of_breakpoint_conditions,
4613 can_run_breakpoint_commands, filesystem_is_local,
4614 can_download_tracepoint, get_trace_state_variable_value,
4615 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4616 record_is_replaying, record_will_replay,
4617 augmented_libraries_svr4_read>: Adjust to return bool.
4618 * aarch64-linux-nat.c: All implementations adjusted.
4619 * aix-thread.c: All implementations adjusted.
4620 * arm-linux-nat.c: All implementations adjusted.
4621 * breakpoint.c: All implementations adjusted.
4622 * bsd-kvm.c: All implementations adjusted.
4623 * bsd-uthread.c: All implementations adjusted.
4624 * corelow.c: All implementations adjusted.
4625 * ctf.c: All implementations adjusted.
4626 * darwin-nat.c: All implementations adjusted.
4627 * darwin-nat.h: All implementations adjusted.
4628 * exec.c: All implementations adjusted.
4629 * fbsd-nat.c: All implementations adjusted.
4630 * fbsd-nat.h: All implementations adjusted.
4631 * gnu-nat.c: All implementations adjusted.
4632 * gnu-nat.h: All implementations adjusted.
4633 * go32-nat.c: All implementations adjusted.
4634 * ia64-linux-nat.c: All implementations adjusted.
4635 * inf-child.c: All implementations adjusted.
4636 * inf-child.h: All implementations adjusted.
4637 * inf-ptrace.c: All implementations adjusted.
4638 * inf-ptrace.h: All implementations adjusted.
4639 * linux-nat.c: All implementations adjusted.
4640 * linux-nat.h: All implementations adjusted.
4641 * mips-linux-nat.c: All implementations adjusted.
4642 * nto-procfs.c: All implementations adjusted.
4643 * ppc-linux-nat.c: All implementations adjusted.
4644 * procfs.c: All implementations adjusted.
4645 * ravenscar-thread.c: All implementations adjusted.
4646 * record-btrace.c: All implementations adjusted.
4647 * record-full.c: All implementations adjusted.
4648 * remote-sim.c: All implementations adjusted.
4649 * remote.c: All implementations adjusted.
4650 * s390-linux-nat.c: All implementations adjusted.
4651 * sol-thread.c: All implementations adjusted.
4652 * spu-multiarch.c: All implementations adjusted.
4653 * target-delegates.c: All implementations adjusted.
4654 * target.c: All implementations adjusted.
4655 * target.h: All implementations adjusted.
4656 * tracefile-tfile.c: All implementations adjusted.
4657 * tracefile.c: All implementations adjusted.
4658 * tracefile.h: All implementations adjusted.
4659 * windows-nat.c: All implementations adjusted.
4660 * x86-linux-nat.h: All implementations adjusted.
4661 * x86-nat.h: All implementations adjusted.
4663 2018-05-02 Pedro Alves <palves@redhat.com>
4665 * make-target-delegates (scan_target_h): Don't trim lines here.
4666 Replace sequences of tabs and/or whitespace with a single
4668 (top level, parsing methods): Trim each line before processing it
4671 2018-05-02 Pedro Alves <palves@redhat.com>
4672 John Baldwin <jhb@freebsd.org>
4674 * target.h (enum strata) <debug_stratum>: New.
4675 (struct target_ops) <all delegation methods>: Replace by C++
4676 virtual methods, and drop "to_" prefix. All references updated
4678 <to_shortname, to_longname, to_doc, to_data,
4679 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4680 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4681 virtual methods. All references updated throughout.
4682 <can_attach, supports_terminal_ours, can_create_inferior,
4683 get_thread_control_capabilities, attach_no_wait>: New
4685 <insert_breakpoint, remove_breakpoint>: Now
4686 TARGET_DEFAULT_NORETURN methods.
4687 <info_proc>: Now returns bool.
4689 (OPS_MAGIC): Delete.
4690 (current_target): Delete. All references replaced by references
4692 (target_stack): ... this. New.
4693 (target_shortname, target_longname): Adjust.
4694 (target_can_run): Now a function declaration.
4695 (default_child_has_all_memory, default_child_has_memory)
4696 (default_child_has_stack, default_child_has_registers)
4697 (default_child_has_execution): Remove target_ops parameter.
4698 (complete_target_initialization): Delete.
4699 (memory_breakpoint_target): New template class.
4700 (test_target_ops): Refactor as a C++ class with virtual methods.
4701 * make-target-delegates (NAME_PART): Tighten.
4702 (POINTER_PART, CP_SYMBOL): New.
4703 (SIMPLE_RETURN_PART): Reimplement.
4704 (VEC_RETURN_PART): Expect less.
4705 (RETURN_PART, VIRTUAL_PART): New.
4706 (METHOD): Adjust to C++ virtual methods.
4707 (scan_target_h): Remove reference to C99.
4708 (dname): Output "target_ops::" prefix.
4709 (write_function_header): Adjust to output a C++ class method.
4710 (write_declaration): New.
4711 (write_delegator): Adjust to output a C++ class method.
4712 (tdname): Output "dummy_target::" prefix.
4713 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4715 (tdefault_names, debug_names): Delete.
4716 (return_types, tdefaults, styles, argtypes_array): New.
4717 (top level): All methods are delegators.
4719 (top level): Print dummy_target and debug_target classes.
4720 * target-delegates.c: Regenerate.
4721 * target-debug.h (target_debug_print_enum_info_proc_what)
4722 (target_debug_print_thread_control_capabilities)
4723 (target_debug_print_thread_info_p): New.
4724 * target.c (dummy_target): Delete.
4725 (the_dummy_target, the_debug_target): New.
4726 (target_stack): Now extern.
4727 (set_targetdebug): Push/unpush debug target.
4728 (default_child_has_all_memory, default_child_has_memory)
4729 (default_child_has_stack, default_child_has_registers)
4730 (default_child_has_execution): Remove target_ops parameter.
4731 (complete_target_initialization): Delete.
4732 (add_target_with_completer): No longer call
4733 complete_target_initialization.
4734 (target_supports_terminal_ours): Use regular delegation.
4735 (update_current_target): Delete.
4736 (push_target): No longer check magic number. Don't call
4737 update_current_target.
4738 (unpush_target): Don't call update_current_target.
4739 (target_is_pushed): No longer check magic number.
4740 (target_require_runnable): Skip for all stratums over
4742 (target_ops::info_proc): New.
4743 (target_info_proc): Use find_target_at and
4744 find_default_run_target.
4745 (target_supports_disable_randomization): Use regular delegation.
4746 (target_get_osdata): Use find_target_at.
4747 (target_ops::open, target_ops::close, target_ops::can_attach)
4748 (target_ops::attach, target_ops::can_create_inferior)
4749 (target_ops::create_inferior, target_ops::can_run)
4750 (target_can_run): New.
4751 (default_fileio_target): Use regular delegation.
4752 (target_ops::fileio_open, target_ops::fileio_pwrite)
4753 (target_ops::fileio_pread, target_ops::fileio_fstat)
4754 (target_ops::fileio_close, target_ops::fileio_unlink)
4755 (target_ops::fileio_readlink): New.
4756 (target_fileio_open_1, target_fileio_unlink)
4757 (target_fileio_readlink): Always call the target method. Handle
4759 (return_zero, return_zero_has_execution): Delete.
4760 (init_dummy_target): Delete.
4761 (dummy_target::dummy_target, dummy_target::shortname)
4762 (dummy_target::longname, dummy_target::doc)
4763 (debug_target::debug_target, debug_target::shortname)
4764 (debug_target::longname, debug_target::doc): New.
4765 (target_supports_delete_record): Use regular delegation.
4766 (setup_target_debug): Delete.
4767 (maintenance_print_target_stack): Skip debug_stratum.
4768 (initialize_targets): Instantiate the_dummy_target and
4770 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4772 (target_auxv_search, fprint_target_auxv): Adjust.
4773 (info_auxv_command): Adjust to use target_stack.
4774 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4775 * exceptions.c (print_flush): Handle a NULL target_stack.
4776 * regcache.c (target_ops_no_register): Refactor as class with
4779 * exec.c (exec_target): New class.
4780 (exec_ops): Now an exec_target.
4781 (exec_open, exec_close_1, exec_get_section_table)
4782 (exec_xfer_partial, exec_files_info, exec_has_memory)
4783 (exec_make_note_section): Refactor as exec_target methods.
4784 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4786 (exec_target::find_memory_regions): New.
4787 (_initialize_exec): Don't call init_exec_ops.
4788 * gdbcore.h (exec_file_clear): Delete.
4790 * corefile.c (core_target): Delete.
4791 (core_file_command): Adjust.
4792 * corelow.c (core_target): New class.
4793 (the_core_target): New.
4794 (core_close): Remove target_ops parameter.
4795 (core_close_cleanup): Adjust.
4796 (core_target::close): New.
4797 (core_open, core_detach, get_core_registers, core_files_info)
4798 (core_xfer_partial, core_thread_alive, core_read_description)
4799 (core_pid_to_str, core_thread_name, core_has_memory)
4800 (core_has_stack, core_has_registers, core_info_proc): Rework as
4801 core_target methods.
4802 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4803 (_initialize_corelow): Initialize the_core_target.
4804 * gdbcore.h (core_target): Delete.
4805 (the_core_target): New.
4807 * ctf.c: (ctf_target): New class.
4808 (ctf_ops): Now a ctf_target.
4809 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4810 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4811 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4813 (init_ctf_ops): Delete.
4814 (_initialize_ctf): Don't call it.
4815 * tracefile-tfile.c (tfile_target): New class.
4816 (tfile_ops): Now a tfile_target.
4817 (tfile_open, tfile_close, tfile_files_info)
4818 (tfile_get_tracepoint_status, tfile_trace_find)
4819 (tfile_fetch_registers, tfile_xfer_partial)
4820 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4821 Refactor as tfile_target methods.
4822 (tfile_xfer_partial_features): Remove target_ops parameter.
4823 (init_tfile_ops): Delete.
4824 (_initialize_tracefile_tfile): Don't call it.
4825 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4826 (tracefile_has_stack, tracefile_has_registers)
4827 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4828 tracefile_target methods.
4829 (init_tracefile_ops): Delete.
4830 (tracefile_target::tracefile_target): New.
4831 * tracefile.h: Include "target.h".
4832 (tracefile_target): New class.
4833 (init_tracefile_ops): Delete.
4835 * spu-multiarch.c (spu_multiarch_target): New class.
4836 (spu_ops): Now a spu_multiarch_target.
4837 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4838 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4839 (spu_search_memory, spu_mourn_inferior): Refactor as
4840 spu_multiarch_target methods.
4841 (init_spu_ops): Delete.
4842 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4843 complete_target_initialization.
4845 * ravenscar-thread.c (ravenscar_thread_target): New class.
4846 (ravenscar_ops): Now a ravenscar_thread_target.
4847 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4848 (ravenscar_thread_alive, ravenscar_pid_to_str)
4849 (ravenscar_fetch_registers, ravenscar_store_registers)
4850 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4851 (ravenscar_stopped_by_hw_breakpoint)
4852 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4853 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4854 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4856 (init_ravenscar_thread_ops): Delete.
4857 (_initialize_ravenscar): Remove references to
4858 init_ravenscar_thread_ops and complete_target_initialization.
4860 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4861 (bsd_uthread_target): New class.
4862 (bsd_uthread_ops): Now a bsd_uthread_target.
4863 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4864 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4865 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4866 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4867 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4868 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4869 (bsd_uthread_target): Delete function.
4870 (_initialize_bsd_uthread): Remove reference to
4871 complete_target_initialization.
4873 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4874 (target_bfd): ... this new class.
4875 (target_bfd_xfer_partial, target_bfd_get_section_table)
4876 (target_bfd_close): Refactor as target_bfd methods.
4877 (target_bfd::~target_bfd): New.
4878 (target_bfd_reopen): Adjust.
4879 (target_bfd::close): New.
4881 * record-btrace.c (record_btrace_target): New class.
4882 (record_btrace_ops): Now a record_btrace_target.
4883 (record_btrace_open, record_btrace_stop_recording)
4884 (record_btrace_disconnect, record_btrace_close)
4885 (record_btrace_async, record_btrace_info)
4886 (record_btrace_insn_history, record_btrace_insn_history_range)
4887 (record_btrace_insn_history_from, record_btrace_call_history)
4888 (record_btrace_call_history_range)
4889 (record_btrace_call_history_from, record_btrace_record_method)
4890 (record_btrace_is_replaying, record_btrace_will_replay)
4891 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4892 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4893 (record_btrace_store_registers, record_btrace_prepare_to_store)
4894 (record_btrace_to_get_unwinder)
4895 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4896 (record_btrace_commit_resume, record_btrace_wait)
4897 (record_btrace_stop, record_btrace_can_execute_reverse)
4898 (record_btrace_stopped_by_sw_breakpoint)
4899 (record_btrace_supports_stopped_by_sw_breakpoint)
4900 (record_btrace_stopped_by_hw_breakpoint)
4901 (record_btrace_supports_stopped_by_hw_breakpoint)
4902 (record_btrace_update_thread_list, record_btrace_thread_alive)
4903 (record_btrace_goto_begin, record_btrace_goto_end)
4904 (record_btrace_goto, record_btrace_stop_replaying_all)
4905 (record_btrace_execution_direction)
4906 (record_btrace_prepare_to_generate_core)
4907 (record_btrace_done_generating_core): Refactor as
4908 record_btrace_target methods.
4909 (init_record_btrace_ops): Delete.
4910 (_initialize_record_btrace): Remove reference to
4911 init_record_btrace_ops.
4912 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4913 the execution_direction global.
4914 (record_full_base_target, record_full_target)
4915 (record_full_core_target): New classes.
4916 (record_full_ops): Now a record_full_target.
4917 (record_full_core_ops): Now a record_full_core_target.
4918 (record_full_target::detach, record_full_target::disconnect)
4919 (record_full_core_target::disconnect)
4920 (record_full_target::mourn_inferior, record_full_target::kill):
4922 (record_full_open, record_full_close, record_full_async): Refactor
4923 as methods of the record_full_base_target class.
4924 (record_full_resume, record_full_commit_resume): Refactor
4925 as methods of the record_full_target class.
4926 (record_full_wait, record_full_stopped_by_watchpoint)
4927 (record_full_stopped_data_address)
4928 (record_full_stopped_by_sw_breakpoint)
4929 (record_full_supports_stopped_by_sw_breakpoint)
4930 (record_full_stopped_by_hw_breakpoint)
4931 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4932 methods of the record_full_base_target class.
4933 (record_full_store_registers, record_full_xfer_partial)
4934 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4935 Refactor as methods of the record_full_target class.
4936 (record_full_can_execute_reverse, record_full_get_bookmark)
4937 (record_full_goto_bookmark, record_full_execution_direction)
4938 (record_full_record_method, record_full_info, record_full_delete)
4939 (record_full_is_replaying, record_full_will_replay)
4940 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4941 (record_full_stop_replaying): Refactor as methods of the
4942 record_full_base_target class.
4943 (record_full_core_resume, record_full_core_kill)
4944 (record_full_core_fetch_registers)
4945 (record_full_core_prepare_to_store)
4946 (record_full_core_store_registers, record_full_core_xfer_partial)
4947 (record_full_core_insert_breakpoint)
4948 (record_full_core_remove_breakpoint)
4949 (record_full_core_has_execution): Refactor
4950 as methods of the record_full_core_target class.
4951 (record_full_base_target::supports_delete_record): New.
4952 (init_record_full_ops): Delete.
4953 (init_record_full_core_ops): Delete.
4954 (record_full_save): Refactor as method of the
4955 record_full_base_target class.
4956 (_initialize_record_full): Remove references to
4957 init_record_full_ops and init_record_full_core_ops.
4959 * remote.c (remote_target, extended_remote_target): New classes.
4960 (remote_ops): Now a remote_target.
4961 (extended_remote_ops): Now an extended_remote_target.
4962 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4963 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4964 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4965 (remote_pass_signals, remote_set_syscall_catchpoint)
4966 (remote_program_signals, )
4967 (remote_thread_always_alive): Remove target_ops parameter.
4968 (remote_thread_alive, remote_thread_name)
4969 (remote_update_thread_list, remote_threads_extra_info)
4970 (remote_static_tracepoint_marker_at)
4971 (remote_static_tracepoint_markers_by_strid)
4972 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4973 (remote_open): Refactor as methods of remote_target.
4974 (extended_remote_open, extended_remote_detach)
4975 (extended_remote_attach, extended_remote_post_attach):
4976 (extended_remote_supports_disable_randomization)
4977 (extended_remote_create_inferior): : Refactor as method of
4978 extended_remote_target.
4979 (remote_set_permissions, remote_open_1, remote_detach)
4980 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4981 (remote_resume, remote_commit_resume, remote_stop)
4982 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4983 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4984 (remote_prepare_to_store, remote_store_registers)
4985 (remote_flash_erase, remote_flash_done, remote_files_info)
4986 (remote_kill, remote_mourn, remote_insert_breakpoint)
4987 (remote_remove_breakpoint, remote_insert_watchpoint)
4988 (remote_watchpoint_addr_within_range)
4989 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4990 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4991 (remote_supports_stopped_by_sw_breakpoint)
4992 (remote_stopped_by_hw_breakpoint)
4993 (remote_supports_stopped_by_hw_breakpoint)
4994 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4995 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4996 (remote_verify_memory): Refactor as methods of remote_target.
4997 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4999 (remote_xfer_partial, remote_get_memory_xfer_limit)
5000 (remote_search_memory, remote_rcmd, remote_memory_map)
5001 (remote_pid_to_str, remote_get_thread_local_address)
5002 (remote_get_tib_address, remote_read_description): Refactor as
5003 methods of remote_target.
5004 (remote_target::fileio_open, remote_target::fileio_pwrite)
5005 (remote_target::fileio_pread, remote_target::fileio_close): New.
5006 (remote_hostio_readlink, remote_hostio_fstat)
5007 (remote_filesystem_is_local, remote_can_execute_reverse)
5008 (remote_supports_non_stop, remote_supports_disable_randomization)
5009 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5010 (remote_supports_enable_disable_tracepoint)
5011 (remote_supports_string_tracing)
5012 (remote_can_run_breakpoint_commands, remote_trace_init)
5013 (remote_download_tracepoint, remote_can_download_tracepoint)
5014 (remote_download_trace_state_variable, remote_enable_tracepoint)
5015 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5016 (remote_trace_start, remote_get_trace_status)
5017 (remote_get_tracepoint_status, remote_trace_stop)
5018 (remote_trace_find, remote_get_trace_state_variable_value)
5019 (remote_save_trace_data, remote_get_raw_trace_data)
5020 (remote_set_disconnected_tracing, remote_core_of_thread)
5021 (remote_set_circular_trace_buffer, remote_traceframe_info)
5022 (remote_get_min_fast_tracepoint_insn_len)
5023 (remote_set_trace_buffer_size, remote_set_trace_notes)
5024 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5025 (remote_disable_btrace, remote_teardown_btrace)
5026 (remote_read_btrace, remote_btrace_conf)
5027 (remote_augmented_libraries_svr4_read, remote_load)
5028 (remote_pid_to_exec_file, remote_can_do_single_step)
5029 (remote_execution_direction, remote_thread_handle_to_thread_info):
5030 Refactor as methods of remote_target.
5031 (init_remote_ops, init_extended_remote_ops): Delete.
5032 (remote_can_async_p, remote_is_async_p, remote_async)
5033 (remote_thread_events, remote_upload_tracepoints)
5034 (remote_upload_trace_state_variables): Refactor as methods of
5036 (_initialize_remote): Remove references to init_remote_ops and
5037 init_extended_remote_ops.
5039 * remote-sim.c (gdbsim_target): New class.
5040 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5041 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5042 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5043 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5044 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5045 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5046 Refactor as methods of gdbsim_target.
5047 (gdbsim_ops): Now a gdbsim_target.
5048 (init_gdbsim_ops): Delete.
5049 (gdbsim_cntrl_c): Adjust.
5050 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5052 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5053 (the_amd64_linux_nat_target): New.
5054 (amd64_linux_fetch_inferior_registers)
5055 (amd64_linux_store_inferior_registers): Refactor as methods of
5056 amd64_linux_nat_target.
5057 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5058 * i386-linux-nat.c: Don't include "linux-nat.h".
5059 (i386_linux_nat_target): New class.
5060 (the_i386_linux_nat_target): New.
5061 (i386_linux_fetch_inferior_registers)
5062 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5063 as methods of i386_linux_nat_target.
5064 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5065 * inf-child.c (inf_child_ops): Delete.
5066 (inf_child_fetch_inferior_registers)
5067 (inf_child_store_inferior_registers): Delete.
5068 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5069 methods of inf_child_target.
5070 (inf_child_target::supports_terminal_ours)
5071 (inf_child_target::terminal_init)
5072 (inf_child_target::terminal_inferior)
5073 (inf_child_target::terminal_ours_for_output)
5074 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5075 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5077 (inf_child_open, inf_child_disconnect, inf_child_close)
5078 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5079 (inf_child_post_startup_inferior, inf_child_can_run)
5080 (inf_child_pid_to_exec_file): Refactor as methods of
5082 (inf_child_follow_fork): Delete.
5083 (inf_child_target::can_create_inferior)
5084 (inf_child_target::can_attach): New.
5085 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5086 (inf_child_target::has_stack, inf_child_target::has_registers)
5087 (inf_child_target::has_execution): New.
5088 (inf_child_fileio_open, inf_child_fileio_pwrite)
5089 (inf_child_fileio_pread, inf_child_fileio_fstat)
5090 (inf_child_fileio_close, inf_child_fileio_unlink)
5091 (inf_child_fileio_readlink, inf_child_use_agent)
5092 (inf_child_can_use_agent): Refactor as methods of
5094 (return_zero, inf_child_target): Delete.
5095 (inf_child_target::inf_child_target): New.
5096 * inf-child.h: Include "target.h".
5097 (inf_child_target): Delete function prototype.
5098 (inf_child_target): New class.
5099 (inf_child_open_target, inf_child_mourn_inferior)
5100 (inf_child_maybe_unpush_target): Delete.
5101 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5102 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5103 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5104 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5105 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5106 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5107 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5108 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5109 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5110 methods of inf_ptrace_target.
5111 (inf_ptrace_target): Delete function.
5112 * inf-ptrace.h: Include "inf-child.h".
5113 (inf_ptrace_target): Delete function declaration.
5114 (inf_ptrace_target): New class.
5115 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5116 * linux-nat.c (linux_target): New.
5117 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5118 (linux_nat_target::~linux_nat_target): New.
5119 (linux_child_post_attach, linux_child_post_startup_inferior)
5120 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5121 (linux_child_remove_fork_catchpoint)
5122 (linux_child_insert_vfork_catchpoint)
5123 (linux_child_remove_vfork_catchpoint)
5124 (linux_child_insert_exec_catchpoint)
5125 (linux_child_remove_exec_catchpoint)
5126 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5127 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5128 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5129 (linux_nat_stopped_data_address)
5130 (linux_nat_stopped_by_sw_breakpoint)
5131 (linux_nat_supports_stopped_by_sw_breakpoint)
5132 (linux_nat_stopped_by_hw_breakpoint)
5133 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5134 (linux_nat_kill, linux_nat_mourn_inferior)
5135 (linux_nat_xfer_partial, linux_nat_thread_alive)
5136 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5137 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5138 (linux_child_static_tracepoint_markers_by_strid)
5139 (linux_nat_is_async_p, linux_nat_can_async_p)
5140 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5141 (linux_nat_supports_multi_process)
5142 (linux_nat_supports_disable_randomization, linux_nat_async)
5143 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5144 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5145 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5146 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5147 methods of linux_nat_target.
5148 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5149 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5151 (check_stopped_by_watchpoint): Adjust.
5152 (linux_xfer_partial): Delete.
5153 (linux_target_install_ops, linux_target, linux_nat_add_target):
5155 (linux_nat_target::linux_nat_target): New.
5156 * linux-nat.h: Include "inf-ptrace.h".
5157 (linux_nat_target): New.
5158 (linux_target, linux_target_install_ops, linux_nat_add_target):
5159 Delete function declarations.
5160 (linux_target): Declare global.
5161 * linux-thread-db.c (thread_db_target): New.
5162 (thread_db_target::thread_db_target): New.
5163 (thread_db_ops): Delete.
5164 (the_thread_db_target): New.
5165 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5166 (thread_db_update_thread_list, thread_db_pid_to_str)
5167 (thread_db_extra_thread_info)
5168 (thread_db_thread_handle_to_thread_info)
5169 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5170 (thread_db_resume): Refactor as methods of thread_db_target.
5171 (init_thread_db_ops): Delete.
5172 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5173 * x86-linux-nat.c: Don't include "linux-nat.h".
5174 (super_post_startup_inferior): Delete.
5175 (x86_linux_nat_target::~x86_linux_nat_target): New.
5176 (x86_linux_child_post_startup_inferior)
5177 (x86_linux_read_description, x86_linux_enable_btrace)
5178 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5179 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5180 methods of x86_linux_nat_target.
5181 (x86_linux_create_target): Delete. Bits folded ...
5182 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5184 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5185 (x86_linux_nat_target): New class.
5186 (x86_linux_create_target): Delete.
5187 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5188 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5189 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5190 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5191 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5192 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5194 (x86_use_watchpoints): Delete.
5195 * x86-nat.h: Include "breakpoint.h" and "target.h".
5196 (x86_use_watchpoints): Delete.
5197 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5198 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5199 (x86_insert_watchpoint, x86_remove_watchpoint)
5200 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5201 (x86_stopped_by_hw_breakpoint): New declarations.
5202 (x86_nat_target): New template class.
5204 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5205 (the_ppc_linux_nat_target): New.
5206 (ppc_linux_fetch_inferior_registers)
5207 (ppc_linux_can_use_hw_breakpoint)
5208 (ppc_linux_region_ok_for_hw_watchpoint)
5209 (ppc_linux_ranged_break_num_registers)
5210 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5211 (ppc_linux_insert_mask_watchpoint)
5212 (ppc_linux_remove_mask_watchpoint)
5213 (ppc_linux_can_accel_watchpoint_condition)
5214 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5215 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5216 (ppc_linux_watchpoint_addr_within_range)
5217 (ppc_linux_masked_watch_num_registers)
5218 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5219 (ppc_linux_read_description): Refactor as methods of
5220 ppc_linux_nat_target.
5221 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5223 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5224 (procfs_target): New class.
5225 (the_procfs_target): New.
5226 (procfs_target): Delete function.
5227 (procfs_auxv_parse, procfs_attach, procfs_detach)
5228 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5229 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5230 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5231 (procfs_create_inferior, procfs_update_thread_list)
5232 (procfs_thread_alive, procfs_pid_to_str)
5233 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5234 (procfs_stopped_data_address, procfs_insert_watchpoint)
5235 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5236 (proc_find_memory_regions, procfs_info_proc)
5237 (procfs_make_note_section): Refactor as methods of procfs_target.
5238 (_initialize_procfs): Adjust.
5239 * sol-thread.c (sol_thread_target): New class.
5240 (sol_thread_ops): Now a sol_thread_target.
5241 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5242 (sol_thread_fetch_registers, sol_thread_store_registers)
5243 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5244 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5245 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5246 (init_sol_thread_ops): Delete.
5247 (_initialize_sol_thread): Adjust. Remove references to
5248 init_sol_thread_ops and complete_target_initialization.
5250 * windows-nat.c (windows_nat_target): New class.
5251 (windows_fetch_inferior_registers)
5252 (windows_store_inferior_registers, windows_resume, windows_wait)
5253 (windows_attach, windows_detach, windows_pid_to_exec_file)
5254 (windows_files_info, windows_create_inferior)
5255 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5256 (windows_close, windows_pid_to_str, windows_xfer_partial)
5257 (windows_get_tib_address, windows_get_ada_task_ptid)
5258 (windows_thread_name, windows_thread_alive): Refactor as
5259 windows_nat_target methods.
5260 (do_initial_windows_stuff): Adjust.
5261 (windows_target): Delete function.
5262 (_initialize_windows_nat): Adjust.
5264 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5265 (darwin_mourn_inferior, darwin_kill_inferior)
5266 (darwin_create_inferior, darwin_attach, darwin_detach)
5267 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5268 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5269 (darwin_supports_multi_process): Refactor as darwin_nat_target
5271 (darwin_resume_to, darwin_files_info): Delete.
5272 (_initialize_darwin_inferior): Rename to ...
5273 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5274 * darwin-nat.h: Include "inf-child.h".
5275 (darwin_nat_target): New class.
5276 (darwin_complete_target): Delete.
5277 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5278 (darwin_target): New.
5279 (i386_darwin_fetch_inferior_registers)
5280 (i386_darwin_store_inferior_registers): Refactor as methods of
5282 (darwin_complete_target): Delete, with ...
5283 (_initialize_i386_darwin_nat): ... bits factored out here.
5285 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5286 (the_alpha_linux_nat_target): New.
5287 (alpha_linux_register_u_offset): Refactor as
5288 alpha_linux_nat_target method.
5289 (_initialize_alpha_linux_nat): Adjust.
5290 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5291 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5292 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5293 methods of linux_nat_trad_target.
5294 (linux_trad_target): Delete.
5295 * linux-nat-trad.h (linux_trad_target): Delete function.
5296 (linux_nat_trad_target): New class.
5297 * mips-linux-nat.c (mips_linux_nat_target): New class.
5298 (super_fetch_registers, super_store_registers, super_close):
5300 (the_mips_linux_nat_target): New.
5301 (mips64_linux_regsets_fetch_registers)
5302 (mips64_linux_regsets_store_registers)
5303 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5304 (mips_linux_register_u_offset, mips_linux_read_description)
5305 (mips_linux_can_use_hw_breakpoint)
5306 (mips_linux_stopped_by_watchpoint)
5307 (mips_linux_stopped_data_address)
5308 (mips_linux_region_ok_for_hw_watchpoint)
5309 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5310 (mips_linux_close): Refactor as methods of mips_linux_nat.
5311 (_initialize_mips_linux_nat): Adjust to C++ification.
5313 * aix-thread.c (aix_thread_target): New class.
5314 (aix_thread_ops): Now an aix_thread_target.
5315 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5316 (aix_thread_fetch_registers, aix_thread_store_registers)
5317 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5318 (aix_thread_thread_alive, aix_thread_pid_to_str)
5319 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5320 Refactor as methods of aix_thread_target.
5321 (init_aix_thread_ops): Delete.
5322 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5323 and complete_target_initialization.
5324 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5325 (rs6000_nat_target): New class.
5326 (the_rs6000_nat_target): New.
5327 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5328 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5329 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5330 (super_create_inferior): Delete.
5331 (_initialize_rs6000_nat): Adjust to C++ification.
5333 * arm-linux-nat.c (arm_linux_nat_target): New class.
5334 (the_arm_linux_nat_target): New.
5335 (arm_linux_fetch_inferior_registers)
5336 (arm_linux_store_inferior_registers, arm_linux_read_description)
5337 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5338 (arm_linux_remove_hw_breakpoint)
5339 (arm_linux_region_ok_for_hw_watchpoint)
5340 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5341 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5342 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5343 arm_linux_nat_target.
5344 (_initialize_arm_linux_nat): Adjust to C++ification.
5346 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5347 (the_aarch64_linux_nat_target): New.
5348 (aarch64_linux_fetch_inferior_registers)
5349 (aarch64_linux_store_inferior_registers)
5350 (aarch64_linux_child_post_startup_inferior)
5351 (aarch64_linux_read_description)
5352 (aarch64_linux_can_use_hw_breakpoint)
5353 (aarch64_linux_insert_hw_breakpoint)
5354 (aarch64_linux_remove_hw_breakpoint)
5355 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5356 (aarch64_linux_region_ok_for_hw_watchpoint)
5357 (aarch64_linux_stopped_data_address)
5358 (aarch64_linux_stopped_by_watchpoint)
5359 (aarch64_linux_watchpoint_addr_within_range)
5360 (aarch64_linux_can_do_single_step): Refactor as methods of
5361 aarch64_linux_nat_target.
5362 (super_post_startup_inferior): Delete.
5363 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5365 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5366 (the_hppa_linux_nat_target): New.
5367 (hppa_linux_fetch_inferior_registers)
5368 (hppa_linux_store_inferior_registers): Refactor as methods of
5369 hppa_linux_nat_target.
5370 (_initialize_hppa_linux_nat): Adjust to C++ification.
5372 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5373 (the_ia64_linux_nat_target): New.
5374 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5375 (ia64_linux_stopped_data_address)
5376 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5377 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5378 ia64_linux_nat_target methods.
5379 (super_xfer_partial): Delete.
5380 (_initialize_ia64_linux_nat): Adjust to C++ification.
5382 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5383 (the_m32r_linux_nat_target): New.
5384 (m32r_linux_fetch_inferior_registers)
5385 (m32r_linux_store_inferior_registers): Refactor as
5386 m32r_linux_nat_target methods.
5387 (_initialize_m32r_linux_nat): Adjust to C++ification.
5389 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5390 (the_m68k_linux_nat_target): New.
5391 (m68k_linux_fetch_inferior_registers)
5392 (m68k_linux_store_inferior_registers): Refactor as
5393 m68k_linux_nat_target methods.
5394 (_initialize_m68k_linux_nat): Adjust to C++ification.
5396 * s390-linux-nat.c (s390_linux_nat_target): New class.
5397 (the_s390_linux_nat_target): New.
5398 (s390_linux_fetch_inferior_registers)
5399 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5400 (s390_insert_watchpoint, s390_remove_watchpoint)
5401 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5402 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5403 (s390_auxv_parse, s390_read_description): Refactor as methods of
5404 s390_linux_nat_target.
5405 (_initialize_s390_nat): Adjust to C++ification.
5407 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5408 (the_sparc_linux_nat_target): New.
5409 (_initialize_sparc_linux_nat): Adjust to C++ification.
5410 * sparc-nat.c (sparc_fetch_inferior_registers)
5411 (sparc_store_inferior_registers): Remove target_ops parameter.
5412 * sparc-nat.h (sparc_fetch_inferior_registers)
5413 (sparc_store_inferior_registers): Remove target_ops parameter.
5414 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5415 (the_sparc64_linux_nat_target): New.
5416 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5418 * spu-linux-nat.c (spu_linux_nat_target): New class.
5419 (the_spu_linux_nat_target): New.
5420 (spu_child_post_startup_inferior, spu_child_post_attach)
5421 (spu_child_wait, spu_fetch_inferior_registers)
5422 (spu_store_inferior_registers, spu_xfer_partial)
5423 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5425 (_initialize_spu_nat): Adjust to C++ification.
5427 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5428 (the_tilegx_linux_nat_target): New.
5429 (fetch_inferior_registers, store_inferior_registers):
5430 Refactor as methods.
5431 (_initialize_tile_linux_nat): Adjust to C++ification.
5433 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5434 (the_xtensa_linux_nat_target): New.
5435 (xtensa_linux_fetch_inferior_registers)
5436 (xtensa_linux_store_inferior_registers): Refactor as
5437 xtensa_linux_nat_target methods.
5438 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5440 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5441 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5442 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5443 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5444 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5445 (fbsd_stopped_by_sw_breakpoint)
5446 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5447 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5448 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5449 (fbsd_post_startup_inferior, fbsd_post_attach)
5450 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5451 (fbsd_set_syscall_catchpoint)
5452 (super_xfer_partial, super_resume, super_wait)
5453 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5454 (fbsd_handle_debug_trap): Remove target_ops parameter.
5455 (fbsd_nat_add_target): Delete.
5456 * fbsd-nat.h: Include "inf-ptrace.h".
5457 (fbsd_nat_add_target): Delete.
5458 (USE_SIGTRAP_SIGINFO): Define.
5459 (fbsd_nat_target): New class.
5461 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5462 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5463 (amd64bsd_target): Delete.
5464 * amd64-bsd-nat.h: New file.
5465 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5467 (amd64_fbsd_nat_target): New class.
5468 (the_amd64_fbsd_nat_target): New.
5469 (amd64fbsd_read_description): Refactor as method of
5470 amd64_fbsd_nat_target.
5471 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5472 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5473 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5474 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5475 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5476 (i386bsd_target): Delete.
5477 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5478 (i386bsd_fetch_inferior_registers)
5479 (i386bsd_store_inferior_registers): Declare.
5480 (i386_bsd_nat_target): New class.
5481 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5482 (the_i386_fbsd_nat_target): New.
5483 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5484 i386_fbsd_nat_target methods.
5485 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5486 (_initialize_i386fbsd_nat): Adjust to C++ification.
5487 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5488 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5489 (_initialize_x86_bsd_nat): Adjust to C++ification.
5490 * x86-bsd-nat.h: Include "x86-nat.h".
5491 (x86bsd_target): Delete declaration.
5492 (x86bsd_nat_target): New class.
5494 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5495 (the_aarch64_fbsd_nat_target): New.
5496 (aarch64_fbsd_fetch_inferior_registers)
5497 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5498 aarch64_fbsd_nat_target.
5499 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5500 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5501 (the_alpha_bsd_nat_target): New.
5502 (alphabsd_fetch_inferior_registers)
5503 (alphabsd_store_inferior_registers): Refactor as
5504 alpha_bsd_nat_target methods.
5505 (_initialize_alphabsd_nat): Refactor as methods of
5506 alpha_bsd_nat_target.
5507 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5508 (the_amd64_nbsd_nat_target): New.
5509 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5510 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5511 (the_amd64_obsd_nat_target): New.
5512 (_initialize_amd64obsd_nat): Adjust to C++ification.
5513 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5514 (the_arm_fbsd_nat_target): New.
5515 (arm_fbsd_fetch_inferior_registers)
5516 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5517 (_initialize_arm_fbsd_nat): Refactor as methods of
5518 arm_fbsd_nat_target.
5519 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5520 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5521 (the_arm_netbsd_nat_target): New.
5522 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5523 arm_netbsd_nat_target.
5524 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5525 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5526 (the_hppa_nbsd_nat_target): New.
5527 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5528 hppa_nbsd_nat_target methods.
5529 (_initialize_hppanbsd_nat): Adjust to C++ification.
5530 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5531 (the_hppa_obsd_nat_target): New.
5532 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5533 methods of hppa_obsd_nat_target.
5534 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5536 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5537 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5539 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5540 (_initialize_i386obsd_nat): Use add_target.
5541 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5542 (the_m68k_bsd_nat_target): New.
5543 (m68kbsd_fetch_inferior_registers)
5544 (m68kbsd_store_inferior_registers): Refactor as methods of
5545 m68k_bsd_nat_target.
5546 (_initialize_m68kbsd_nat): Adjust to C++ification.
5547 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5548 (the_mips_fbsd_nat_target): New.
5549 (mips_fbsd_fetch_inferior_registers)
5550 (mips_fbsd_store_inferior_registers): Refactor as methods of
5551 mips_fbsd_nat_target.
5552 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5554 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5555 (the_mips_nbsd_nat_target): New.
5556 (mipsnbsd_fetch_inferior_registers)
5557 (mipsnbsd_store_inferior_registers): Refactor as methods of
5558 mips_nbsd_nat_target.
5559 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5560 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5561 (the_mips64_obsd_nat_target): New.
5562 (mips64obsd_fetch_inferior_registers)
5563 (mips64obsd_store_inferior_registers): Refactor as methods of
5564 mips64_obsd_nat_target.
5565 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5567 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5569 * nbsd-nat.h: Include "inf-ptrace.h".
5570 (nbsd_nat_target): New class.
5571 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5572 (obsd_wait): Refactor as methods of obsd_nat_target.
5573 (obsd_add_target): Delete.
5574 * obsd-nat.h: Include "inf-ptrace.h".
5575 (obsd_nat_target): New class.
5576 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5577 (the_ppc_fbsd_nat_target): New.
5578 (ppcfbsd_fetch_inferior_registers)
5579 (ppcfbsd_store_inferior_registers): Refactor as methods of
5580 ppc_fbsd_nat_target.
5581 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5583 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5584 (the_ppc_nbsd_nat_target): New.
5585 (ppcnbsd_fetch_inferior_registers)
5586 (ppcnbsd_store_inferior_registers): Refactor as methods of
5587 ppc_nbsd_nat_target.
5588 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5589 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5590 (the_ppc_obsd_nat_target): New.
5591 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5592 methods of ppc_obsd_nat_target.
5593 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5595 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5596 (the_sh_nbsd_nat_target): New.
5597 (shnbsd_fetch_inferior_registers)
5598 (shnbsd_store_inferior_registers): Refactor as methods of
5600 (_initialize_shnbsd_nat): Adjust to C++ification.
5601 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5602 (inf_ptrace_xfer_partial): Delete.
5603 (sparc_xfer_partial, sparc_target): Delete.
5604 * sparc-nat.h (sparc_fetch_inferior_registers)
5605 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5606 (sparc_target): Delete function declaration.
5607 (sparc_target): New template class.
5608 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5609 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5610 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5611 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5613 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5614 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5615 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5616 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5618 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5619 (the_vax_bsd_nat_target): New.
5620 (vaxbsd_fetch_inferior_registers)
5621 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5623 (_initialize_vaxbsd_nat): Adjust to C++ification.
5625 * bsd-kvm.c (bsd_kvm_target): New class.
5626 (bsd_kvm_ops): Now a bsd_kvm_target.
5627 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5628 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5629 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5631 (bsd_kvm_return_one): Delete.
5632 (bsd_kvm_add_target): Adjust to C++ification.
5634 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5635 (nto_procfs_target_procfs): New classes.
5636 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5637 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5638 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5639 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5640 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5641 (procfs_remove_hw_breakpoint, procfs_resume)
5642 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5643 (procfs_kill_inferior, procfs_store_registers)
5644 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5645 as methods of nto_procfs_target.
5646 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5647 (nto_native_ops): Delete.
5648 (procfs_open, procfs_native_open): Delete.
5649 (nto_native_ops): Now an nto_procfs_target_native.
5650 (init_procfs_targets): Adjust to C++ification.
5651 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5652 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5653 Refactor as methods of nto_procfs_target.
5655 * go32-nat.c (go32_nat_target): New class.
5656 (the_go32_nat_target): New.
5657 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5658 (go32_store_registers, go32_xfer_partial, go32_files_info)
5659 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5660 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5661 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5662 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5663 (go32_target): Delete.
5664 (_initialize_go32_nat): Adjust to C++ification.
5666 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5667 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5668 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5669 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5671 (gnu_target): Delete.
5672 * gnu-nat.h (gnu_target): Delete.
5673 (gnu_nat_target): New class.
5674 * i386-gnu-nat.c (gnu_base_target): New.
5675 (i386_gnu_nat_target): New class.
5676 (the_i386_gnu_nat_target): New.
5677 (_initialize_i386gnu_nat): Adjust to C++ification.
5679 2018-05-02 Pedro Alves <palves@redhat.com>
5681 * bfd-target.c (target_bfd_xclose): Rename to ...
5682 (target_bfd_close): ... this.
5683 (target_bfd_reopen): Adjust.
5684 * target.c (target_close): Remove references to to_xclose.
5685 * target.h (target_ops::to_xclose): Delete.
5686 (target_ops::to_close): Update comments.
5688 2018-05-02 Pedro Alves <palves@redhat.com>
5690 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5692 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5693 * inf-ptrace.c (inf_ptrace_register_u_offset)
5694 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5695 (inf_ptrace_store_register, inf_ptrace_store_registers)
5696 (inf_ptrace_trad_target): Move to ...
5697 * linux-nat-trad.c: ... this new file.
5698 * linux-nat-trad.h: New file.
5699 * linux-nat.c (linux_target_install_ops): Make extern.
5700 (linux_trad_target): Delete.
5701 * linux-nat.h (linux_trad_target): Delete declaration.
5702 (linux_target_install_ops): Declare.
5703 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5706 2018-05-02 Pedro Alves <palves@redhat.com>
5708 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5709 procfs_target/add_target here.
5710 * procfs.c (procfs_target): Make static.
5711 (_initialize_procfs): Call add_target here.
5712 * procfs.h (struct target_ops): Remove forward declaration.
5713 (procfs_target): Remove declaration.
5714 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5716 2018-05-02 Pedro Alves <palves@redhat.com>
5718 * procfs.c (procfs_stopped_by_watchpoint)
5719 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5720 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5722 (procfs_use_watchpoints): Delete, move contents...
5723 (procfs_target): ... here.
5724 * procfs.h (procfs_use_watchpoints): Delete declaration.
5725 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5726 procfs_use_watchpoints.
5727 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5728 procfs_use_watchpoints.
5730 2018-05-02 Tom Tromey <tom@tromey.com>
5733 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5734 and var_zuinteger_unlimited.
5735 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5736 and PARAM_ZUINTEGER_UNLIMITED.
5737 (set_parameter_value): Handle var_zuinteger and
5738 var_zuinteger_unlimited.
5739 (add_setshow_generic): Likewise.
5740 (parmpy_init): Likewise.
5742 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5745 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5746 pointer is not null before dereferencing it.
5748 2018-04-30 Tom Tromey <tom@tromey.com>
5750 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5753 2018-04-30 Tom Tromey <tom@tromey.com>
5755 * breakpoint.c (mention): Remove use of is_mi_like_p.
5756 (print_mention_ranged_breakpoint): Likewise.
5757 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5760 2018-04-30 Tom Tromey <tom@tromey.com>
5762 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5764 2018-04-30 Tom Tromey <tom@tromey.com>
5766 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5767 (info_spu_event_command): Remove some uses of is_mi_like_p.
5769 2018-04-30 Tom Tromey <tom@tromey.com>
5771 * python/py-framefilter.c (py_print_single_arg)
5772 (enumerate_locals, py_print_args, py_print_frame): Remove some
5773 uses of is_mi_like_p.
5775 2018-04-30 Tom Tromey <tom@tromey.com>
5778 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5779 * ui-out.h (ui_out::is_mi_like_p): Now const.
5780 (ui_out::do_is_mi_like_p): Now const.
5781 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5783 2018-04-30 Tom Tromey <tom@tromey.com>
5785 * varobj.c (varobj_set_visualizer): Use new_reference.
5786 * python/python.c (gdbpy_decode_line): Use new_reference.
5787 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5790 2018-04-30 Tom Tromey <tom@tromey.com>
5792 * varobj.c (install_new_value): Use new_reference.
5793 * value.h (value_incref): Return void. Swap intro comment with
5795 * value.c (set_value_parent): Use new_reference.
5796 (value_incref): Return void. Update intro comment.
5797 (release_value): Use new_reference.
5798 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5800 2018-04-30 Tom Tromey <tom@tromey.com>
5802 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5803 * gdb_bfd.h (new_bfd_ref): Remove.
5804 (gdb_bfd_open): Update comment.
5805 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5806 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5807 (gdb_bfd_fdopenr): Use new_reference.
5808 * exec.c (exec_file_attach): Use new_reference.
5810 2018-04-30 Tom Tromey <tom@tromey.com>
5812 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5815 2018-04-30 Tom Tromey <tom@tromey.com>
5817 * jit.c (jit_read_code_entry): Use type_align.
5818 * i386-tdep.c (i386_gdbarch_init): Don't call
5819 set_gdbarch_long_long_align_bit.
5820 * gdbarch.sh: Remove long_long_align_bit.
5821 * gdbarch.c, gdbarch.h: Rebuild.
5822 * arc-tdep.c (arc_type_align): New function.
5823 (arc_gdbarch_init): Use arc_type_align. Don't call
5824 set_gdbarch_long_long_align_bit.
5826 2018-04-30 Tom Tromey <tom@tromey.com>
5828 * rust-lang.c (rust_type_alignment): Remove.
5829 (rust_composite_type): Use type_align.
5831 2018-04-30 Tom Tromey <tom@tromey.com>
5833 * NEWS: Mention Type.align.
5834 * python/py-type.c (typy_get_alignof): New function.
5835 (type_object_getset): Add "alignof".
5837 2018-04-30 Tom Tromey <tom@tromey.com>
5841 * std-operator.def (UNOP_ALIGNOF): New operator.
5842 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5844 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5845 * c-lang.c (c_op_print_tab): Add alignof.
5846 * c-exp.y (ALIGNOF): New token.
5847 (exp): Add "ALIGNOF" production.
5848 (ident_tokens): Add _Alignof and alignof.
5850 2018-04-30 Tom Tromey <tom@tromey.com>
5852 * i386-tdep.c (i386_type_align): New function.
5853 (i386_gdbarch_init): Update.
5854 * gdbarch.sh (type_align): New method.
5855 * gdbarch.c, gdbarch.h: Rebuild.
5856 * arch-utils.h (default_type_align): Declare.
5857 * arch-utils.c (default_type_align): New function.
5858 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5859 (struct type) <align_log2>: New field.
5860 <instance_flags>: Now a bitfield.
5861 (TYPE_RAW_ALIGN): New macro.
5862 (type_align, type_raw_align, set_type_align): Declare.
5863 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5865 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5866 (get_alignment, maybe_set_alignment): New functions.
5867 (read_structure_type, read_enumeration_type, read_array_type)
5868 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5869 (read_subrange_type, read_base_type): Set type alignment.
5871 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5873 * dwarf2read.c (read_index_from_section): Use bool.
5875 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5878 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5881 2018-04-29 John Reiser <jreiser@BitWagon.com>
5884 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5885 last step, and do it atomically.
5887 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5889 * compile/compile-c-types.c (convert_int, convert_float):
5892 2018-04-27 Tom Tromey <tom@tromey.com>
5895 * rust-lang.c (rust_inclusive_range_type_p): New function.
5896 (rust_range): Handle inclusive ranges.
5897 (rust_compute_range): Likewise.
5898 * rust-exp.y (struct rust_op) <inclusive>: New field.
5899 (DOTDOTEQ): New constant.
5900 (range_expr): Add "..=" productions.
5901 (operator_tokens): Add "..=" token.
5902 (ast_range): Add "inclusive" parameter.
5903 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5905 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5907 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5908 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5910 * expprint.c (print_subexp_standard): Handle new bounds values.
5911 (dump_subexp_body_standard): Likewise.
5913 2018-04-27 Tom Tromey <tom@tromey.com>
5915 * configure: Rebuild.
5916 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5917 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5919 (class symbol_needs_eval_context): Likewise.
5920 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5921 (mock_mapped_index::symbol_name_at): Use "override". Remove
5923 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5925 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5926 * aarch64-tdep.c (instruction_reader::read): Use "override".
5927 (instruction_reader_test::read): Likewise.
5928 * arm-tdep.c (instruction_reader::read): Use "override".
5929 (instruction_reader_thumb::read): Likewise.
5931 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5934 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5935 instead of remote_send.
5936 (remote_send): Remove.
5938 2018-04-26 Pedro Alves <palves@redhat.com>
5940 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5941 find_function_start_sal instead of find_pc_line.
5943 2018-04-26 Pedro Alves <palves@redhat.com>
5945 * breakpoint.c (set_breakpoint_location_function): Handle
5947 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5948 * elfread.c (elf_symtab_read): Give data symbols with
5949 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5950 (elf_rel_plt_read): Update comment.
5951 * linespec.c (convert_linespec_to_sals): Handle
5953 (minsym_found): Handle mst_data_gnu_ifunc.
5954 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5955 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5956 * parse.c (find_minsym_type_and_address): Handle
5958 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5959 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5960 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5962 <mst_data_gnu_ifunc>: New enumerator.
5964 2018-04-26 Pedro Alves <palves@redhat.com>
5966 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5967 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5968 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5970 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5971 (lookup_minimal_symbol_by_pc): Adjust.
5972 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5973 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5974 * minsyms.h (lookup_msym_prefer): New enum.
5975 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5976 parameter by a lookup_msym_prefer parameter.
5978 2018-04-26 Pedro Alves <palves@redhat.com>
5980 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5981 ends in "@plt" instead of looking at the symbol's section.
5983 2018-04-26 Pedro Alves <palves@redhat.com>
5985 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5987 (find_pc_partial_function_gnu_ifunc): Rename to ...
5988 (find_pc_partial_function): ... this, and remove references to
5990 (find_pc_partial_function): Delete old implementation.
5991 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5993 2018-04-26 Pedro Alves <palves@redhat.com>
5995 * linespec.c (struct bound_minimal_symbol_search_key): New.
5996 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5997 skip first line if we found a GNU ifunc minimal symbol by name.
5998 (compare_msymbols): Change parameters to work with a destructured
6000 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6003 2018-04-26 Pedro Alves <palves@redhat.com>
6005 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6006 ifunc targets here. Instead, if we have an ifunc minsym, use its
6008 (add_location_to_breakpoint): Store the minsym and the objfile in
6009 the breakpoint location.
6010 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6011 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6012 Record the minsym in the sal.
6013 * symtab.h (symtab_and_line) <msymbol>: New field.
6015 2018-04-26 Pedro Alves <palves@redhat.com>
6017 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6018 unless we actually resolved the ifunc.
6020 2018-04-26 Pedro Alves <palves@redhat.com>
6022 * c-exp.y (variable production): Prefer ifunc minsyms over
6023 regular function symbols.
6024 * symtab.c (find_gnu_ifunc): New function.
6025 * minsyms.h (lookup_msym_prefer): New enum.
6026 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6027 parameter by a lookup_msym_prefer parameter.
6028 * symtab.h (find_gnu_ifunc): New declaration.
6030 2018-04-26 Pedro Alves <palves@redhat.com>
6032 * blockframe.c (find_gnu_ifunc_target_type): New function.
6033 (find_function_type): New.
6034 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6035 return a value with a memory address.
6036 (eval_call): For calls to GNU ifunc functions, try to find the
6037 type of the target function from the type that the resolver
6039 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6041 * infcall.c (find_function_return_type): Delete.
6042 (find_function_addr): Add 'function_type' parameter. For calls to
6043 GNU ifunc functions, try to find the type of the target function
6044 from the type that the resolver returns, and return it via
6046 (call_function_by_hand_dummy): Adjust to use the function type
6047 returned by find_function_addr.
6048 (find_function_addr): Add 'function_type' parameter and move
6050 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6053 2018-04-26 Pedro Alves <palves@redhat.com>
6055 * c-exp.y (variable production): Skip finding an alias for ifunc
6058 2018-04-26 Pedro Alves <palves@redhat.com>
6060 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6062 2018-04-25 Pedro Alves <palves@redhat.com>
6064 * infcmd.c (kill_command): Print the pid as string, not the whole
6065 thread's ptid. Add comment. s/has been killed/killed/ in output
6067 * remote.c (remote_detach_1): Print the pid as string, not the
6068 whole thread's ptid.
6070 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6071 Sergio Durigan Junior <sergiodj@redhat.com>
6072 Pedro Alves <palves@redhat.com>
6074 * infcmd.c (kill_command): Print message when inferior has
6076 * inferior.c (print_inferior_events): Remove 'static'. Set as
6078 (add_inferior): Improve message printed when
6079 'print_inferior_events' is on.
6080 (exit_inferior): Remove message printed when
6081 'print_inferior_events' is on.
6082 (detach_inferior): Improve message printed when
6083 'print_inferior_events' is on.
6084 (initialize_inferiors): Use 'add_inferior_silent' to set
6085 'current_inferior_'.
6086 * inferior.h (print_inferior_events): Declare here as
6088 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6089 '[Detaching...]' messages when 'print_inferior_events' is on.
6090 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6091 as prefix/suffix for messages. Remove periods. Fix erroneous
6092 'Detaching after fork from child...', replace it by '... from
6094 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6095 prefix/suffix when printing 'Detaching...' messages. Print
6096 them when 'print_inferior_events' is on.
6097 * remote.c (remote_detach_1): Print message when detaching
6098 from inferior and '!is_fork_parent'.
6100 2018-04-24 Tom Tromey <tom@tromey.com>
6102 * cli-out.h: Reindent.
6104 2018-04-24 Tom Tromey <tom@tromey.com>
6106 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6107 (cli_ui_out::do_field_string): Use fputs_filtered.
6108 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6110 2018-04-23 Tom Tromey <tom@tromey.com>
6112 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6113 gdb::unique_xmalloc_ptr.
6115 2018-04-23 Tom Tromey <tom@tromey.com>
6117 * configure: Rebuild.
6119 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6122 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6123 prepare_for_testing. Set normal_bp to r_debug_state if target
6126 2018-04-21 Pedro Alves <palves@redhat.com>
6127 Rajendra SY <rajendra.sy@gmail.com>
6129 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6130 * remote.c (extended_remote_attach): In all-stop mode, mark the
6131 thread as executing.
6133 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6135 * thread.c (thread_apply_all_command): Fix comment.
6136 (thread_command): Fix comment.
6138 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6140 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6142 * features/aarch64-core.c (create_feature_aarch64_core):
6144 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6146 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6148 * features/i386/32bit-avx512.c
6149 (create_feature_i386_32bit_avx512): Likewise.
6150 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6152 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6154 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6156 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6158 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6160 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6162 * features/i386/64bit-avx512.c
6163 (create_feature_i386_64bit_avx512): Likewise.
6164 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6166 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6168 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6170 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6172 * features/i386/64bit-segments.c
6173 (create_feature_i386_64bit_segments): Likewise.
6174 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6176 * features/i386/x32-core.c
6177 (create_feature_i386_x32_core): Likewise.
6178 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6179 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6180 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6181 * target-descriptions.c: In generated code, don't pass xml
6184 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6186 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6187 (print_xml_feature::visit_post): Likewise.
6188 (print_xml_feature::visit): Likewise.
6189 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6190 (print_xml_feature): Add new class.
6191 * regformats/regdat.sh: Null xmltarget on feature targets.
6192 * target-descriptions.c (struct target_desc): Add xmltarget.
6193 (maintenance_check_tdesc_xml_convert): Add unittest function.
6194 (tdesc_get_features_xml): Add function to get xml.
6195 (maintenance_check_xml_descriptions): Test xml generation.
6196 * xml-tdesc.c (string_read_description_xml): Add function.
6197 * xml-tdesc.h (string_read_description_xml): Add declaration.
6199 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6201 * features/Makefile: Add feature marker to targets with new style
6202 target descriptions.
6203 * regformats/aarch64.dat: Regenerate.
6204 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6205 * regformats/i386/amd64-avx-linux.dat: Likewise.
6206 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6207 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6208 * regformats/i386/amd64-linux.dat: Likewise.
6209 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6210 * regformats/i386/amd64.dat: Likewise.
6211 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6212 * regformats/i386/i386-avx-linux.dat: Likewise.
6213 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6214 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6215 * regformats/i386/i386-linux.dat: Likewise.
6216 * regformats/i386/i386-mmx-linux.dat: Likewise.
6217 * regformats/i386/i386-mpx-linux.dat: Likewise.
6218 * regformats/i386/i386.dat: Likewise.
6219 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6220 * regformats/i386/x32-avx-linux.dat: Likewise.
6221 * regformats/i386/x32-linux.dat: Likewise.
6222 * regformats/tic6x-c62x-linux.dat: Likewise.
6223 * regformats/tic6x-c64x-linux.dat: Likewise.
6224 * regformats/tic6x-c64xp-linux.dat: Likewise.
6225 * regformats/regdat.sh: Parse feature marker.
6227 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6229 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6230 (tdesc_osabi_name): Likewise.
6231 * target-descriptions.c (tdesc_architecture_name): Add new
6233 (tdesc_osabi_name): Likewise.
6235 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6237 * common/tdesc.c (tdesc_predefined_type): Move to here.
6238 (tdesc_named_type): Likewise.
6239 (tdesc_create_vector): Likewise.
6240 (tdesc_create_struct): Likewise.
6241 (tdesc_set_struct_size): Likewise.
6242 (tdesc_create_union): Likewise.
6243 (tdesc_create_flags): Likewise.
6244 (tdesc_create_enum): Likewise.
6245 (tdesc_add_field): Likewise.
6246 (tdesc_add_typed_bitfield): Likewise.
6247 (tdesc_add_bitfield): Likewise.
6248 (tdesc_add_flag): Likewise.
6249 (tdesc_add_enum_value): Likewise.
6250 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6251 (struct tdesc_type_vector): Likewise.
6252 (struct tdesc_type_field): Likewise.
6253 (struct tdesc_type_with_fields): Likewise.
6254 (tdesc_create_enum): Add declaration.
6255 (tdesc_add_typed_bitfield): Likewise.
6256 (tdesc_add_enum_value): Likewise.
6257 * target-descriptions.c (tdesc_type_field): Move from here.
6258 (tdesc_type_builtin): Likewise.
6259 (tdesc_type_vector): Likewise.
6260 (tdesc_type_with_fields): Likewise.
6261 (tdesc_predefined_types): Likewise.
6262 (tdesc_named_type): Likewise.
6263 (tdesc_create_vector): Likewise.
6264 (tdesc_create_struct): Likewise.
6265 (tdesc_set_struct_size): Likewise.
6266 (tdesc_create_union): Likewise.
6267 (tdesc_create_flags): Likewise.
6268 (tdesc_create_enum): Likewise.
6269 (tdesc_add_field): Likewise.
6270 (tdesc_add_typed_bitfield): Likewise.
6271 (tdesc_add_bitfield): Likewise.
6272 (tdesc_add_flag): Likewise.
6273 (tdesc_add_enum_value): Likewise.
6274 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6275 (tdesc_add_typed_bitfield): Likewise.
6276 (tdesc_add_enum_value): Likewise.
6278 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6280 * common/tdesc.c (tdesc_feature::accept): Move to here.
6281 (tdesc_feature::operator==): Likewise.
6282 (tdesc_create_reg): Likewise.
6283 * common/tdesc.h (tdesc_type_kind): Likewise.
6284 (struct tdesc_type): Likewise.
6285 (struct tdesc_feature): Likewise.
6286 * regformats/regdat.sh: Create a feature.
6287 * target-descriptions.c (tdesc_type_kind): Move from here.
6288 (tdesc_type): Likewise.
6289 (tdesc_type_up): Likewise.
6290 (tdesc_feature): Likewise.
6291 (tdesc_create_reg): Likewise.
6293 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6295 * Makefile.in: Add arch/tdesc.c
6296 * common/tdesc.c: New file.
6297 * common/tdesc.h (tdesc_element_visitor): Move to here.
6298 (tdesc_element): Likewise.
6299 (tdesc_reg): Likewise.
6300 (tdesc_reg_up): Likewise.
6301 * regformats/regdef.h (reg): Add offset to constructors.
6302 * target-descriptions.c (tdesc_element_visitor): Move from here.
6303 (tdesc_element): Likewise.
6304 (tdesc_reg): Likewise.
6305 (tdesc_reg_up): Likewise.
6307 2018-04-17 Tom Tromey <tom@tromey.com>
6309 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6312 2018-04-17 Tom Tromey <tom@tromey.com>
6314 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6316 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6318 * symtab.c (print_symbol_info): Skip printing filename and line
6319 number when `last' is NULL.
6320 (symtab_symbol_info): Use empty string instead of NULL for first
6321 invocation of print_symbol_info.
6322 (rbreak_command): Pass NULL to `last' parameter of
6325 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6327 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6330 2018-04-16 Pedro Alves <palves@redhat.com>
6332 * MAINTAINERS (sh): Remove.
6333 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6334 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6335 (ALLDEPFILES): Remove sh64-tdep.c.
6336 * NEWS: Mentions that support for SH-5/SH64 is removed.
6337 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6338 (sh*-*-openbsd*): Ditto.
6339 (sh64-*-elf*): Remove.
6341 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6342 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6343 * sh-tdep.c: No longer include "sh64-tdep.h".
6344 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6345 * sh64-tdep.c, sh64-tdep.h: Remove files.
6347 2018-04-16 Pedro Alves <palves@redhat.com>
6349 * MAINTAINERS: Remove m88k.
6350 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6351 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6352 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6353 * NEWS: Mention that support for m88k was removed.
6354 * configure.host (m88*-*-*): Remove support.
6355 * configure.nat (m88k-*-*): Remove support.
6356 * configure.tgt (m88*-*-openbsd*): Remove.
6357 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6359 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6361 * configure.tgt (x86_tobjs): New variable.
6362 (amd64_tobjs, i386_tobjs): Use it.
6364 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6366 * symtab.c (print_symbol_info): Precede the symbol definition by
6367 the line number when available.
6368 * NEWS: Advertise this enhancement.
6370 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6372 * NEWS (New options): announce set/show record btrace cpu.
6373 * btrace.c: Include record-btrace.h.
6374 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6375 the vendor is unknown.
6376 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6377 Maybe overwrite the btrace configuration's cpu.
6378 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6379 (btrace_fetch): Add cpu parameter. Update callers.
6380 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6381 Maybe overwrite the btrace configuration's cpu. Skip enabling
6382 errata workarounds if the vendor is unknown.
6383 * python/py-record-btrace.c: Include record-btrace.h.
6384 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6385 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6386 * record-btrace.c (record_btrace_cpu_state_kind): New.
6387 (record_btrace_cpu): New.
6388 (set_record_btrace_cpu_cmdlist): New.
6389 (record_btrace_get_cpu): New.
6390 (require_btrace_thread, record_btrace_info)
6391 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6392 (cmd_set_record_btrace_cpu_none): New.
6393 (cmd_set_record_btrace_cpu_auto): New.
6394 (cmd_set_record_btrace_cpu): New.
6395 (cmd_show_record_btrace_cpu): New.
6396 (_initialize_record_btrace): Initialize set/show record btrace cpu
6398 * record-btrace.h (record_btrace_get_cpu): New.
6400 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6402 * record.c (set_record_command): Fix typo in message.
6404 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6406 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6408 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6410 * infrun.c (process_event_stop_test): Call
6411 gdbarch_in_indirect_branch_thunk.
6412 * gdbarch.sh (in_indirect_branch_thunk): New.
6413 * gdbarch.c: Regenerated.
6414 * gdbarch.h: Regenerated.
6417 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6418 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6419 (ALLDEPFILES): Add x86-tdep.c.
6420 * arch-utils.h (default_in_indirect_branch_thunk): New.
6421 * arch-utils.c (default_in_indirect_branch_thunk): New.
6422 * i386-tdep: Include x86-tdep.h.
6423 (i386_in_indirect_branch_thunk): New.
6424 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6426 * amd64-tdep: Include x86-tdep.h.
6427 (amd64_in_indirect_branch_thunk): New.
6428 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6430 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6433 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6434 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6435 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6438 2018-04-12 Tom Tromey <tom@tromey.com>
6440 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6441 (rust_evaluate_subexp): Likewise.
6443 2018-04-12 Pedro Alves <palves@redhat.com>
6445 * procfs.c (procfs_detach): Make forward declaration's prototype
6446 match definition's protototype.
6447 (proc_get_LDT_entry): Remove stale do_cleanups call.
6449 2018-04-12 Pedro Alves <palves@redhat.com>
6451 * target.h (target_ops::to_has_exited): Delete.
6452 (target_has_exited): Delete.
6453 * target-delegates.c: Regenerate.
6455 2018-04-11 Pedro Alves <palves@redhat.com>
6457 * target.c (fileio_fh_t::t): Add comment.
6458 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6459 (target_fileio_close): Handle a NULL target.
6460 (invalidate_fileio_fh): New.
6461 (target_close): Call it.
6462 * remote.c (remote_hostio_send_command): No longer check whether
6463 remote_desc is open.
6465 2018-04-11 Pedro Alves <palves@redhat.com>
6467 * target.c (fileio_fh_t): Make it a named struct instead of a
6469 (fileio_fh_t::is_closed): New method.
6470 (DEF_VEC_O (fileio_fh_t)): Remove.
6471 (fileio_fhandles): Now a std::vector.
6472 (is_closed_fileio_fh): Delete.
6473 (acquire_fileio_fd): Adjust. Rename parameters.
6474 (release_fileio_fd): Adjust.
6475 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6476 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6477 (target_fileio_close): Adjust.
6479 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6481 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6484 2018-04-10 Pedro Alves <palves@redhat.com>
6486 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6487 (scoped_finish_thread_state): New class.
6488 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6490 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6491 (fetch_inferior_event, normal_stop): Likewise.
6492 * thread.c (finish_thread_state_cleanup): Delete.
6494 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6495 Pedro Alves <palves@redhat.com>
6497 * value.c: Include "selftest.h" and "common/array-view.h".
6498 (struct range) <operator ==>: New.
6499 (test_ranges_contain): New.
6500 (check_ranges_vector): New.
6501 (test_insert_into_bit_range_vector): New.
6502 (_initialize_values): Register selftests.
6503 * common/array-view.h (operator==, operator!=): New.
6505 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6507 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6509 * inline-frame.c: Include <algorithm>.
6510 (struct inline_state): Add constructor.
6511 (inline_state_s): Remove.
6512 (DEF_VEC_O(inline_state_s)): Remove.
6513 (inline_states): Change type to std::vector.
6514 (find_inline_frame_state): Adjust to std::vector.
6515 (allocate_inline_frame_state): Remove.
6516 (clear_inline_frame_state): Adjust to std::vector.
6517 (skip_inline_frames): Adjust to std::vector.
6519 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6521 * tracepoint.h (struct trace_state_variable): Add constructor.
6522 <name>: Change type to std::string.
6523 * tracepoint.c (tsv_s): Remove.
6524 (DEF_VEC_O(tsv_s)): Remove.
6525 (tvariables): Change to std::vector.
6526 (create_trace_state_variable): Adjust to std::vector.
6527 (find_trace_state_variable): Likewise.
6528 (find_trace_state_variable_by_number): Likewise.
6529 (delete_trace_state_variable): Likewise.
6530 (trace_variable_command): Adjust to std::string.
6531 (delete_trace_variable_command): Likewise.
6532 (tvariables_info_1): Adjust to std::vector.
6533 (save_trace_state_variables): Likewise.
6534 (start_tracing): Likewise.
6535 (merge_uploaded_trace_state_variables): Adjust to std::vector
6537 * target.h (struct target_ops)
6538 <to_download_trace_state_variable>: Pass reference to
6539 trace_state_variable.
6540 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6541 * target-delegates.c: Re-generate.
6542 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6543 (mi_tsv_deleted): Likewise.
6544 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6545 * remote.c (remote_download_trace_state_variable): Change
6546 pointer to reference and adjust.
6547 * make-target-delegates (parse_argtypes): Handle references.
6548 (write_function_header): Likewise.
6549 (munge_type): Likewise.
6551 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6553 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6554 string_view-selftests.c.
6555 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6557 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6558 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6559 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6560 * unittests/basic_string_view/element_access/char/1.cc:
6562 * unittests/basic_string_view/element_access/char/empty.cc:
6564 * unittests/basic_string_view/element_access/char/front_back.cc:
6566 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6567 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6569 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6571 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6573 * unittests/basic_string_view/operations/compare/char/1.cc:
6575 * unittests/basic_string_view/operations/compare/char/13650.cc:
6577 * unittests/basic_string_view/operations/copy/char/1.cc:
6579 * unittests/basic_string_view/operations/data/char/1.cc:
6581 * unittests/basic_string_view/operations/find/char/1.cc:
6583 * unittests/basic_string_view/operations/find/char/2.cc:
6585 * unittests/basic_string_view/operations/find/char/3.cc:
6587 * unittests/basic_string_view/operations/find/char/4.cc:
6589 * unittests/basic_string_view/operations/rfind/char/1.cc:
6591 * unittests/basic_string_view/operations/rfind/char/2.cc:
6593 * unittests/basic_string_view/operations/rfind/char/3.cc:
6595 * unittests/basic_string_view/operations/substr/char/1.cc:
6597 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6598 * unittests/string_view-selftests.c: New file.
6600 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6602 * unittests/basic_string_view/capacity/1.cc: New file.
6603 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6604 * unittests/basic_string_view/cons/char/1.cc: New file.
6605 * unittests/basic_string_view/cons/char/2.cc: New file.
6606 * unittests/basic_string_view/cons/char/3.cc: New file.
6607 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6608 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6609 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6610 * unittests/basic_string_view/element_access/char/1.cc: New file.
6611 * unittests/basic_string_view/element_access/char/2.cc: New file.
6612 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6613 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6614 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6615 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6616 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6617 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6618 * unittests/basic_string_view/include.cc: New file.
6619 * unittests/basic_string_view/inserters/char/1.cc: New file.
6620 * unittests/basic_string_view/inserters/char/2.cc: New file.
6621 * unittests/basic_string_view/inserters/char/3.cc: New file.
6622 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6623 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6624 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6625 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6626 * unittests/basic_string_view/literals/types.cc: New file.
6627 * unittests/basic_string_view/literals/values.cc: New file.
6628 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6629 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6630 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6631 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6632 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6633 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6634 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6635 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6636 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6637 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6638 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6639 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6640 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6641 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6642 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6643 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6644 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6645 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6646 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6647 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6648 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6649 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6650 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6651 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6652 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6653 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6654 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6655 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6656 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6657 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6658 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6659 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6660 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6661 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6662 * unittests/basic_string_view/operators/char/2.cc: New file.
6663 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6664 * unittests/basic_string_view/range_access/char/1.cc: New file.
6665 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6666 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6667 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6668 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6669 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6670 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6671 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6672 * unittests/basic_string_view/typedefs.cc: New file.
6673 * unittests/basic_string_view/types/1.cc: New file.
6675 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6677 * common/gdb_string_view.h: Remove libstdc++ implementation
6678 details, adjust to gdb reality.
6679 * common/gdb_string_view.tcc: Likewise.
6680 * cli/cli-script.c (struct string_view): Remove.
6681 (user_args) <m_args>: Change element type to gdb::string_view.
6682 (user_args::insert_args): Adjust.
6684 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6686 * common/gdb_string_view.h: New file.
6687 * common/gdb_string_view.tcc: New file.
6689 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6691 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6692 * configure: Re-generate.
6694 2018-04-09 Pedro Alves <palves@redhat.com>
6696 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6697 (set_target_gdbarch): Call
6698 gdb::observers::architecture_changed.notify instead of
6699 observer_notify_architecture_changed.
6701 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6703 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6704 (do_restore_current_traceframe_cleanup): Remove.
6705 (restore_current_traceframe_cleanup_dtor): Remove.
6706 (make_cleanup_restore_current_traceframe): Remove.
6707 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6709 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6710 * infrun.c (fetch_inferior_event): Use
6711 scoped_restore_current_traceframe.
6713 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6715 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6717 <n_allocated_type_units>: Remove.
6718 <all_type_units>: Change to std::vector.
6719 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6720 to std::vector change.
6721 (dwarf2_per_objfile::get_cutu): Likewise.
6722 (dwarf2_per_objfile::get_tu): Likewise.
6723 (create_signatured_type_table_from_index): Likewise.
6724 (create_signatured_type_table_from_debug_names): Likewise.
6725 (dw2_symtab_iter_next): Likewise.
6726 (dw2_print_stats): Likewise.
6727 (dw2_expand_all_symtabs): Likewise.
6728 (dw2_expand_marked_cus): Likewise.
6729 (dw2_debug_names_iterator::next): Likewise.
6730 (dwarf2_initialize_objfile): Likewise.
6731 (add_signatured_type_cu_to_table): Likewise.
6732 (create_all_type_units): Likewise.
6733 (add_type_unit): Likewise.
6734 (struct tu_abbrev_offset): Add constructor.
6735 (build_type_psymtabs_1): Adjust to std::vector change.
6736 (print_tu_stats): Likewise.
6737 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6738 (write_debug_names): Likewise.
6740 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6742 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6743 Make an std::vector.
6744 <n_comp_units>: Remove.
6745 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6746 to std::vector change.
6747 (dwarf2_per_objfile::get_cutu): Likewise.
6748 (dwarf2_per_objfile::get_cu): Likewise.
6749 (create_cus_from_index): Likewise.
6750 (create_addrmap_from_index): Likewise.
6751 (create_addrmap_from_aranges): Likewise.
6752 (dwarf2_read_index): Likewise.
6753 (dw2_find_last_source_symtab): Likewise.
6754 (dw2_map_symtabs_matching_filename): Likewise.
6755 (dw2_symtab_iter_next): Likewise.
6756 (dw2_print_stats): Likewise.
6757 (dw2_expand_all_symtabs): Likewise.
6758 (dw2_expand_symtabs_with_fullname): Likewise.
6759 (dw2_expand_marked_cus): Likewise.
6760 (dw2_map_symbol_filenames): Likewise.
6761 (create_cus_from_debug_names): Likewise.
6762 (dwarf2_read_debug_names): Likewise.
6763 (dw2_debug_names_iterator::next): Likewise.
6764 (dwarf2_initialize_objfile): Likewise.
6765 (set_partial_user): Likewise.
6766 (dwarf2_build_psymtabs_hard): Likewise.
6767 (read_comp_units_from_section): Remove arguments, adjust to
6769 (create_all_comp_units): Adjust to std::vector and
6770 read_comp_units_from_section changes.
6771 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6773 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6774 (psyms_seen_size): Likewise.
6775 (write_gdbindex): Likewise.
6776 (write_debug_names): Likewise.
6778 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6780 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6781 with dwarf2_per_objfile.
6782 (create_cus_from_index): Likewise.
6783 (create_signatured_type_table_from_index): Likewise.
6784 (dwarf2_read_index): Likewise.
6785 (dwarf2_initialize_objfile): Likewise.
6786 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6787 per_cu rather than get_dwarf2_per_objfile.
6789 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6791 * dwarf2read.h (struct signatured_type): Forward declare.
6792 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6794 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6795 (dw2_get_cutu): ...this.
6796 (dwarf2_per_objfile::get_cu): Rename from...
6797 (dw2_get_cu): ...this.
6798 (dwarf2_per_objfile::get_tu): New.
6799 (create_addrmap_from_index): Adjust.
6800 (create_addrmap_from_aranges): Adjust.
6801 (dw2_find_last_source_symtab): Adjust.
6802 (dw2_map_symtabs_matching_filename): Adjust.
6803 (dw2_symtab_iter_next): Adjust.
6804 (dw2_print_stats): Adjust.
6805 (dw2_expand_all_symtabs): Adjust.
6806 (dw2_expand_symtabs_with_fullname): Adjust.
6807 (dw2_expand_marked_cus): Adjust.
6808 (dw_expand_symtabs_matching_file_matcher): Adjust.
6809 (dw2_map_symbol_filenames): Adjust.
6810 (dw2_debug_names_iterator::next): Adjust.
6811 (dwarf2_initialize_objfile): Adjust.
6812 (set_partial_user): Adjust.
6813 (dwarf2_build_psymtabs_hard): Adjust.
6815 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6817 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6818 Remove unused variables.
6819 (dw2_map_symtabs_matching_filename): Likewise.
6820 (dwarf2_record_block_ranges): Likewise.
6821 (dwarf2_read_addr_index): Likewise.
6822 (follow_die_offset): Likewise.
6824 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6826 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6827 to symbol_file_add_main.
6829 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6832 * mi/mi-console.c (do_fputc_async_safe): New.
6833 (mi_console_file::write_async_safe): New.
6834 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6835 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6837 * ui-file.c (ui_file::putstrn): Adjust call to
6838 fputstrn_unfiltered.
6839 * utils.c (printchar): Replace do_fputs and do_fprintf
6840 parameters by do_fputc.
6841 (fputstr_filtered): Adjust call to printchar.
6842 (fputstr_unfiltered): Likewise.
6843 (fputstrn_filtered): Likewise.
6844 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6846 * utils.h (do_fputc_ftype): New typedef.
6847 (fputstrn_unfiltered): Add do_fputc parameter.
6849 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6851 * regformats/i386/i386-avx.dat: Remove.
6853 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6856 * amd64-tdep.c (amd64_none_init_abi): New function.
6857 (amd64_x32_none_init_abi): New function.
6858 (_initialize_amd64_tdep): Register handlers for x86-64 and
6859 x64_32 with GDB_OSABI_NONE.
6860 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6861 GDB_OSABI_NONE osabi.
6863 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6866 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6868 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6869 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6871 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6873 * common/byte-vector.h (char_vector): New type.
6874 * target.h (target_read_alloc): Return
6875 gdb::optional<byte_vector>.
6876 (target_read_stralloc): Return gdb::optional<char_vector>.
6877 (target_get_osdata): Return gdb::optional<char_vector>.
6878 * target.c (target_read_alloc_1): Templatize. Replacement
6879 manual memory management with vector.
6880 (target_read_alloc): Change return type, adjust.
6881 (target_read_stralloc): Change return type, adjust.
6882 (target_get_osdata): Change return type, adjust.
6883 * auxv.c (struct auxv_info) <length>: Remove.
6884 <data>: Change type to gdb::optional<byte_vector>.
6885 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6886 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6887 (target_auxv_search): Adjust.
6888 (fprint_target_auxv): Adjust.
6889 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6890 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6891 (linux_make_corefile_notes): Adjust.
6892 * osdata.c (get_osdata): Adjust.
6893 * remote.c (remote_get_threads_with_qxfer): Adjust.
6894 (remote_memory_map): Adjust.
6895 (remote_traceframe_info): Adjust.
6896 (btrace_read_config): Adjust.
6897 (remote_read_btrace): Adjust.
6898 (remote_pid_to_exec_file): Adjust.
6899 * solib-aix.c (solib_aix_get_library_list): Adjust.
6900 * solib-dsbt.c (decode_loadmap): Don't free buf.
6901 (dsbt_get_initial_loadmaps): Adjust.
6902 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6903 * solib-target.c (solib_target_current_sos): Adjust.
6904 * tracepoint.c (sdata_make_value): Adjust.
6905 * xml-support.c (xinclude_start_include): Adjust.
6906 (xml_fetch_content_from_file): Adjust.
6907 * xml-support.h (xml_fetch_another): Change return type.
6908 (xml_fetch_content_from_file): Change return type.
6909 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6910 * xml-tdesc.c (file_read_description_xml): Adjust.
6911 (fetch_available_features_from_target): Change return type.
6912 (target_fetch_description_xml): Adjust.
6913 (target_read_description_xml): Adjust.
6915 2018-04-06 Tom Tromey <tom@tromey.com>
6917 * value.c (~value): Update.
6918 (struct value) <contents>: Now unique_xmalloc_ptr.
6919 (value_contents_bits_eq, allocate_value_contents)
6920 (value_contents_raw, value_contents_all_raw)
6921 (value_contents_for_printing, value_contents_for_printing_const)
6922 (set_value_enclosing_type): Update.
6924 2018-04-06 Tom Tromey <tom@tromey.com>
6926 * value.c (range_s): Remove typedef, VEC.
6927 (struct range): Add operator<.
6928 (range_lessthan): Remove.
6929 (ranges_contain): Change type.
6931 (struct value) <unavailable, optimized_out>: Now std::vector.
6932 (value_entirely_available)
6933 (value_entirely_covered_by_range_vector)
6934 (value_entirely_unavailable, value_entirely_optimized_out):
6936 (insert_into_bit_range_vector): Change argument type.
6937 (find_first_range_overlap): Likewise.
6938 (struct ranges_and_idx, value_contents_bits_eq)
6939 (require_not_optimized_out, require_available): Update.
6940 (ranges_copy_adjusted): Change argument types.
6941 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6943 2018-04-06 Tom Tromey <tom@tromey.com>
6945 * value.c (~value): Update.
6946 (struct value) <parent>: Now a value_ref_ptr.
6947 (value_parent, set_value_parent, value_address, value_copy):
6950 2018-04-06 Tom Tromey <tom@tromey.com>
6952 * value.c (struct value): Add constructor, destructor, and member
6954 (allocate_value_lazy, value_decref): Update.
6956 2018-04-06 Tom Tromey <tom@tromey.com>
6958 * value.c (struct value) <released, next>: Remove.
6959 (all_values): Now a std::vector.
6960 (allocate_value_lazy): Update.
6961 (value_next): Remove.
6962 (value_mark, value_free_to_mark, release_value)
6963 (value_release_to_mark): Update.
6965 2018-04-06 Tom Tromey <tom@tromey.com>
6967 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6968 (free_value_chain): Remove.
6969 * value.c (free_value_chain): Remove.
6970 (value_release_to_mark): Return a std::vector.
6971 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6973 (check_condition): Update.
6974 * eval.c (fetch_subexp_value): Change "val_chain" to a
6976 * breakpoint.c (update_watchpoint): Update.
6977 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6979 2018-04-06 Tom Tromey <tom@tromey.com>
6981 * value.h (free_all_values): Remove.
6982 * value.c (free_all_values): Remove.
6984 2018-04-06 Tom Tromey <tom@tromey.com>
6986 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6987 (value_history_chain, value_history_count): Remove.
6988 (value_history): New global.
6989 (record_latest_value, access_value_history, show_values)
6990 (preserve_values): Update.
6992 2018-04-06 Tom Tromey <tom@tromey.com>
6994 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6995 * varobj.c (varobj_set_display_format, varobj_set_value)
6996 (install_default_visualizer, construct_visualizer)
6997 (install_new_value, ~varobj, varobj_get_value_type)
6998 (my_value_of_variable, varobj_editable_p): Update.
6999 * c-varobj.c (c_describe_child, c_value_of_variable)
7000 (cplus_number_of_children, cplus_describe_child): Update.
7001 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7002 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7003 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7005 2018-04-06 Tom Tromey <tom@tromey.com>
7007 * printcmd.c (last_examine_address): Change type to
7009 (do_examine, x_command): Update.
7011 2018-04-06 Tom Tromey <tom@tromey.com>
7013 * value.c (release_value): Update.
7014 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7015 (struct bpstats) <val>: Now a value_ref_ptr.
7016 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7017 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7018 (~watchpoint, print_it_watchpoint, watch_command_1)
7019 (invalidate_bp_value_on_memory_change): Update.
7021 2018-04-06 Tom Tromey <tom@tromey.com>
7023 * varobj.c (varobj_clear_saved_item)
7024 (update_dynamic_varobj_children, install_new_value, ~varobj):
7026 * value.h (value_incref): Move declaration earlier.
7027 (value_decref): Rename from value_free.
7028 (struct value_ref_policy): New.
7029 (value_ref_ptr): New typedef.
7030 (struct value_deleter): Remove.
7031 (gdb_value_up): Remove typedef.
7032 (release_value): Change return type.
7033 (release_value_or_incref): Remove.
7034 * value.c (set_value_parent): Update.
7035 (value_incref): Change return type.
7036 (value_decref): Rename from value_free.
7037 (value_free_to_mark, free_all_values, free_value_chain): Update.
7038 (release_value): Return value_ref_ptr.
7039 (release_value_or_incref): Remove.
7040 (record_latest_value, set_internalvar, clear_internalvar):
7042 * stack.c (info_frame_command): Don't call value_free.
7043 * python/py-value.c (valpy_dealloc, valpy_new)
7044 (value_to_value_object): Update.
7045 * printcmd.c (do_examine): Update.
7046 * opencl-lang.c (lval_func_free_closure): Update.
7047 * mi/mi-main.c (register_changed_p): Don't call value_free.
7048 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7049 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7050 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7052 * guile/scm-value.c (vlscm_free_value_smob)
7053 (vlscm_scm_from_value): Update.
7054 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7055 (frame_unwind_register_unsigned, get_frame_register_bytes)
7056 (put_frame_register_bytes): Don't call value_free.
7057 * findvar.c (address_from_register): Don't call value_free.
7058 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7059 * dwarf2loc.c (entry_data_value_free_closure)
7060 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7061 (dwarf2_evaluate_loc_desc_full): Update.
7062 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7063 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7064 (~watchpoint, watch_command_1)
7065 (invalidate_bp_value_on_memory_change): Update.
7066 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7068 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7071 * warning.m4: Add -Wno-error=deprecated-register.
7072 * configure: Re-generate.
7074 2018-04-05 Tom Tromey <tom@tromey.com>
7076 * linespec.h: Remove include of "vec.h".
7078 2018-04-05 Tom Tromey <tom@tromey.com>
7080 * linespec.c (typep): Remove typedef.
7081 (find_methods, find_superclass_methods): Take a std::vector.
7082 (find_method): Use std::vector.
7084 2018-04-05 Tom Tromey <tom@tromey.com>
7086 * utils.c (compare_strings): Remove.
7087 * utils.h (compare_strings): Remove.
7088 * objc-lang.h (find_imps): Update.
7089 * objc-lang.c (find_methods): Take a std::vector.
7090 (uniquify_strings, find_imps): Likewise.
7091 * linespec.c (find_methods): Take a std::vector.
7092 (decode_objc): Use std::vector.
7093 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7095 (find_method, find_function_symbols): Use std::vector.
7097 2018-04-05 Tom Tromey <tom@tromey.com>
7099 * completer.c (completion_tracker::completion_tracker): Remove
7101 (completion_tracker::discard_completions): Likewise.
7102 * breakpoint.c (ambiguous_names_p): Remove cast.
7103 * ada-lang.c (_initialize_ada_language): Remove cast.
7104 * utils.h (streq): Update.
7105 (streq_hash): Add new declaration.
7106 * utils.c (streq): Return bool.
7107 (streq_hash): New function.
7109 2018-04-05 Tom Tromey <tom@tromey.com>
7111 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7112 Remove a string copy.
7114 2018-04-05 Tom Tromey <tom@tromey.com>
7116 * linespec.c (filter_results): Use std::vector.
7117 (decode_line_2, decode_line_full): Update.
7119 2018-04-05 Tom Tromey <tom@tromey.com>
7121 * linespec.c (canonical_to_fullform): Return std::string.
7122 (filter_results): Update.
7123 (struct decode_line_2_item): Add constructor.
7124 <fullform, displayform>: Now std::string.
7125 (decode_line_2_compare_items): Now a std::sort comparator.
7126 (decode_line_2): Update.
7128 2018-04-05 Tom Tromey <tom@tromey.com>
7130 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7131 (unexpected_linespec_error): Update.
7132 (linespec_parse_basic, parse_linespec): Update.
7134 2018-04-05 Tom Tromey <tom@tromey.com>
7136 * linespec.c (linespec_parse_basic): Reindent.
7138 2018-04-05 Tom Tromey <tom@tromey.com>
7140 * minsyms.h (iterate_over_minimal_symbols): Update.
7141 * minsyms.c (iterate_over_minimal_symbols): Take a
7143 * linespec.c (struct collect_minsyms): Remove.
7144 (compare_msyms): Now a std::sort comparator.
7145 (add_minsym): Add parameters.
7146 (search_minsyms_for_name): Update. Use std::vector.
7148 2018-04-03 Tom Tromey <tom@tromey.com>
7150 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7153 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7155 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7157 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7160 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7161 printing static type.
7163 2018-04-01 Tom Tromey <tom@tromey.com>
7165 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7166 (rs6000_xfer_shared_libraries): Update.
7168 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7170 * common/gdb_vecs.h (char_ptr): Remove.
7171 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7173 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7175 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7177 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7179 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7181 * tracepoint.h (struct uploaded_tp): Initialize fields.
7182 <actions, step_actions, cmd_strings>: Change type to
7183 std::vector<char *>.
7184 * tracepoint.c (get_uploaded_tp): Allocate with new.
7185 (free_uploaded_tps): Free with delete.
7186 (parse_tracepoint_definition): Adjust to std::vector change.
7187 * breakpoint.c (read_uploaded_action): Likewise.
7188 (create_tracepoint_from_upload): Likewise.
7189 * ctf.c (ctf_write_uploaded_tp): Likewise.
7190 (SET_ARRAY_FIELD): Likewise.
7191 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7193 2018-03-30 Tom Tromey <tom@tromey.com>
7195 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7197 (svr4_keep_data_in_core): Update.
7198 (svr4_read_so_list): Update.
7200 2018-03-30 Tom Tromey <tom@tromey.com>
7202 * windows-nat.c (handle_output_debug_string, handle_exception):
7204 * target.h (target_read_string): Update.
7205 * target.c (target_read_string): Change "string" to
7207 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7209 * solib-frv.c (frv_current_sos): Update.
7210 * solib-dsbt.c (dsbt_current_sos): Update.
7211 * solib-darwin.c (darwin_current_sos): Update.
7212 * linux-thread-db.c (inferior_has_bug): Update.
7213 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7214 Update. Remove alloca.
7215 * ada-lang.c (ada_main_name): Update.
7217 2018-03-30 Tom Tromey <tom@tromey.com>
7219 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7220 (struct dwo_file_deleter): New.
7221 (dwo_file_up): New typedef.
7222 (open_and_init_dwo_file): Use dwo_file_up.
7223 (free_dwo_file_cleanup): Remove.
7225 2018-03-30 Tom Tromey <tom@tromey.com>
7227 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7228 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7230 2018-03-30 Tom Tromey <tom@tromey.com>
7232 * dwarf2read.c (class free_cached_comp_units): New class.
7233 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7234 (free_cached_comp_units): Remove function.
7236 2018-03-30 Tom Tromey <tom@tromey.com>
7238 * utils.h (make_cleanup_unpush_target): Remove.
7239 * inf-ptrace.c (struct target_unpusher): New.
7240 (target_unpush_up) New typedef.
7241 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7243 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7245 2018-03-27 Tom Tromey <tom@tromey.com>
7247 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7249 2018-03-27 Pedro Alves <palves@redhat.com>
7250 Tom Tromey <tom@tromey.com>
7252 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7253 destructor. Now a class.
7254 (gdb_readline_wrapper_cleanup): Remove function.
7255 (gdb_readline_wrapper): Remove cleanups.
7257 2018-03-27 Tom Tromey <tom@tromey.com>
7259 * typeprint.h (struct type_print_options) <local_typedefs,
7260 global_typedefs>: Remove "struct" keyword.
7261 (class typedef_hash_table): New class.
7262 (recursively_update_typedef_hash, add_template_parameters)
7263 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7264 (find_typedef_in_hash): Don't declare.
7265 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7266 (typedef_hash_table::recursively_update): Rename from
7267 recursively_update_typedef_hash. Now a member.
7268 (typedef_hash_table::add_template_parameters): Rename from
7269 add_template_parameters. Now a member.
7270 (typedef_hash_table::typedef_hash_table): Now a constructor;
7271 rename from create_typedef_hash.
7272 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7273 rename from free_typedef_hash.
7274 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7275 (do_free_global_table): Remove.
7276 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7277 from copy_type_recursive.
7278 (create_global_typedef_table): Remove.
7279 (typedef_hash_table::find_global_typedef): Now a member of
7281 (typedef_hash_table::find_typedef): Rename from
7282 find_typedef_in_hash; now a member.
7283 (whatis_exp): Update.
7284 * extension.h (struct ext_lang_type_printers): Add constructor and
7286 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7288 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7289 Now a constructor; rename from start_ext_lang_type_printers.
7290 (ext_lang_type_printers): Now a destructor; rename from
7291 free_ext_lang_type_printers.
7292 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7294 (c_type_print_base_struct_union): Update. Remove cleanups.
7296 2018-03-27 Tom Tromey <tom@tromey.com>
7298 * dwarf-index-write.c: Include <cmath>.
7300 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7302 * NEWS: Add entry describing new "set|show varsize-limit" command.
7303 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7305 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7308 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7310 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7312 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7313 * dwarf-index-common.c: New file.
7314 * dwarf-index-common.h: New file.
7315 * dwarf-index-write.c: New file.
7316 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7317 (struct dwarf2_section_info): Move from here.
7318 (dwarf2_section_info_def): Likewise.
7319 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7320 (offset_type): Likewise.
7321 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7322 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7323 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7324 (byte_swap): Likewise.
7325 (MAYBE_SWAP): Likewise.
7326 (dwarf2_per_cu_ptr): Likewise.
7327 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7328 (struct tu_stats): Likewise.
7329 (struct dwarf2_per_objfile): Likewise.
7330 (struct dwarf2_per_cu_data): Likewise.
7331 (struct signatured_type): Likewise.
7332 (sig_type_ptr): Likewise.
7333 (DEF_VEC_P (sig_type_ptr)): Likewise.
7334 (INDEX4_SUFFIX): Likewise.
7335 (INDEX5_SUFFIX): Likewise.
7336 (DEBUG_STR_SUFFIX): Likewise.
7337 (dwarf2_read_section): Make non-static.
7338 (mapped_index_string_hash): Move from here.
7339 (dwarf5_djb_hash): Likewise.
7340 (file_write): Likewise.
7341 (class data_buf): Likewise.
7342 (struct symtab_index_entry): Likewise.
7343 (struct mapped_symtab): Likewise.
7344 (find_slot): Likewise.
7345 (hash_expand): Likewise.
7346 (add_index_entry): Likewise.
7347 (uniquify_cu_indices): Likewise.
7348 (class c_str_view): Likewise.
7349 (class c_str_view_hasher): Likewise.
7350 (class vector_hasher): Likewise.
7351 (write_hash_table): Likewise.
7352 (psym_index_map): Likewise.
7353 (struct addrmap_index_data): Likewise.
7354 (add_address_entry): Likewise.
7355 (add_address_entry_worker): Likewise.
7356 (write_address_map): Likewise.
7357 (symbol_kind): Likewise.
7358 (write_psymbols): Likewise.
7359 (struct signatured_type_index_data): Likewise.
7360 (write_one_signatured_type): Likewise.
7361 (recursively_count_psymbols): Likewise.
7362 (recursively_write_psymbols): Likewise.
7363 (class debug_names): Likewise.
7364 (check_dwarf64_offsets): Likewise.
7365 (psyms_seen_size): Likewise.
7366 (write_gdbindex): Likewise.
7367 (write_debug_names): Likewise.
7368 (assert_file_size): Likewise.
7369 (write_psymtabs_to_index): Likewise.
7370 (save_gdb_index_command): Likewise.
7371 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7373 * dwarf2read.h: New file.
7375 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7378 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7379 symbol name if the CU's language stores symbol names in linkage
7381 * language.h (struct language_defn)
7382 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7383 all instances of this struct.
7385 2018-03-26 Tom Tromey <tom@tromey.com>
7387 * stack.c (backtrace_command_1): Remove verbose code.
7389 2018-03-26 Tom Tromey <tom@tromey.com>
7391 * python/py-framefilter.c (py_print_type): Don't catch
7392 exceptions. Return void.
7393 (py_print_value): Likewise.
7394 (py_print_single_arg): Likewise.
7395 (enumerate_args): Don't catch exceptions.
7396 (py_print_args): Likewise.
7397 (py_print_frame): Likewise.
7398 (gdbpy_apply_frame_filter): Catch exceptions here.
7400 2018-03-26 Tom Tromey <tom@tromey.com>
7402 * stack.c (_initialize_stack): Remove trailing newlines from help
7403 text. Add "Usage" line to "backtrace" help.
7405 2018-03-26 Tom Tromey <tom@tromey.com>
7408 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7410 2018-03-26 Tom Tromey <tom@tromey.com>
7412 * python/py-framefilter.c (py_print_single_arg): Return
7413 EXT_LANG_BT_ERROR from catch.
7415 2018-03-26 Tom Tromey <tom@tromey.com>
7418 * stack.c (backtrace_command_1): Move some code into no-filters
7421 2018-03-26 Tom Tromey <tom@tromey.com>
7423 * python/py-framefilter.c (throw_quit_or_print_exception): New
7425 (gdbpy_apply_frame_filter): Use it.
7427 2018-03-26 Tom Tromey <tom@tromey.com>
7430 * python/py-framefilter.c (py_print_type, py_print_value)
7431 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7434 2018-03-26 Tom Tromey <tom@tromey.com>
7436 * python/py-framefilter.c (enumerate_args): Use
7437 gdb::unique_xmalloc_ptr.
7439 2018-03-26 Tom Tromey <tom@tromey.com>
7441 * python/py-framefilter.c (py_print_frame): Return
7443 (gdbpy_apply_frame_filter): Update comment.
7444 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7446 <EXT_LANG_BT_NO_FILTERS>: Change value.
7448 2018-03-26 Tom Tromey <tom@tromey.com>
7451 * stack.c (backtrace_command): Parse "hide" argument.
7452 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7453 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7456 2018-03-26 Tom Tromey <tom@tromey.com>
7458 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7460 (backtrace_command): Remove "fulltrace", add "flags".
7462 2018-03-26 Tom Tromey <tom@tromey.com>
7464 * stack.c (backtrace_command): Rewrite command line parsing.
7466 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7468 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7470 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7472 * filename-seen-cache.h: Add include guard.
7474 2018-03-26 Keith Seitz <keiths@redhat.com>
7476 * symfile.c (place_section): Remove "struct" from section_addr_info
7478 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7479 "struct" keyword from section_addr_info.
7481 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7483 * regformats/regdef.h (reg): Add constructors.
7485 2018-03-25 Pedro Alves <palves@redhat.com>
7487 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7488 if then/else bodies in var_func_name extraction.
7490 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7492 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7493 lookup_minimal_symbol() to find symbol entry.
7494 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7496 2018-03-23 Keith Seitz <keiths@redhat.com>
7499 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7500 nested type definitions for C++, too.
7502 2018-03-23 Tom Tromey <tom@tromey.com>
7504 * machoread.c (struct oso_el): Add a constructor. Don't define as
7506 (macho_register_oso): Remove.
7507 (macho_symtab_read): Take a std::vector.
7508 (oso_el_compare_name): Now a std::sort comparator.
7509 (macho_symfile_read_all_oso): Take a std::vector.
7510 (macho_symfile_read): Use std::vector. Remove cleanups.
7512 2018-03-22 Tom Tromey <tom@tromey.com>
7514 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7515 (record_full_goto_bookmark): Use std::string.
7517 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7520 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7523 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7525 * rs6000-tdep.c (store_insn_p): New function.
7526 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7527 and cr_reg to their unshifted values. Use store_insn_p to
7528 match LR saves using either R1 or fdata->alloca_reg. Use
7529 store_insn_p to match CR saves. Set alloca_reg_offset
7530 when alloca_reg and framep are set. Remove lr_reg shift
7531 when assigning to fdata->lr_register.
7533 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7535 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7536 command line args instead of emitting a warning.
7538 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7540 * tracepoint.h (struct static_tracepoint_marker): Initialize
7541 fields, define default constructor, move constructor and move
7542 assignment, disable the rest.
7543 <str_id, extra>: Make std::string.
7544 (release_static_tracepoint_marker): Remove.
7545 (free_current_marker): Remove.
7546 * tracepoint.c (free_current_marker): Remove.
7547 (parse_static_tracepoint_marker_definition): Adjust to
7548 std::string, use new hex2str overload.
7549 (release_static_tracepoint_marker): Remove.
7550 (print_one_static_tracepoint_marker): Get marker by reference
7551 and adjust to std::string.
7552 (info_static_tracepoint_markers_command): Adjust to std::vector
7554 * target.h (static_tracepoint_marker_p): Remove typedef.
7555 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7556 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7558 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7560 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7561 (target_debug_print_std_vector_static_tracepoint_marker): New.
7562 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7564 (target_debug_print_static_tracepoint_marker_p): ... this.
7565 * target-delegates.c: Re-generate.
7566 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7568 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7569 (decode_static_tracepoint_spec): Adjust to std::vector.
7570 (tracepoint_print_one_detail): Adjust to std::string.
7571 (strace_marker_decode_location): Adjust to std::string.
7572 (update_static_tracepoint): Adjust to std::string, remove call
7573 to release_static_tracepoint_marker.
7574 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7575 Adjust to std::vector.
7576 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7577 (remote_static_tracepoint_markers_by_strid): Adjust to
7579 * common/rsp-low.h (hex2str): New overload with explicit count
7581 * common/rsp-low.c (hex2str): New overload with explicit count
7583 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7584 (_initialize_rsp_low_selftests): Add test_hex2str test.
7585 * unittests/tracepoint-selftests.c
7586 (test_parse_static_tracepoint_marker_definition): Adjust to
7589 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7591 * tracepoint.c (parse_static_tracepoint_marker_definition):
7592 Consider case where the definition is followed by more
7594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7595 tracepoint-selftests.c.
7596 * unittests/tracepoint-selftests.c: New.
7598 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7600 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7603 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7605 * symtab.c (find_pc_sect_line): fixed indentation.
7607 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7609 * symtab.c (find_pc_sect_line): now uses binary search.
7611 2018-03-19 Tom Tromey <tom@tromey.com>
7613 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7616 2018-03-19 Pedro Alves <palves@redhat.com>
7617 Tom Tromey <tom@tromey.com>
7619 * unittests/observable-selftests.c: New file.
7620 * common/observable.h: New file.
7621 * observable.h: New file.
7622 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7623 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7624 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7625 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7626 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7627 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7628 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7629 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7630 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7631 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7632 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7633 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7634 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7635 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7636 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7637 tui/tui-interp.c, valops.c: Update all users.
7638 * tui/tui-hooks.c (tui_bp_created_observer)
7639 (tui_bp_deleted_observer, tui_bp_modified_observer)
7640 (tui_inferior_exit_observer, tui_before_prompt_observer)
7641 (tui_normal_stop_observer, tui_register_changed_observer):
7643 (tui_observers_token): New global.
7644 (attach_or_detach, tui_attach_detach_observers): New functions.
7645 (tui_install_hooks, tui_remove_hooks): Use
7646 tui_attach_detach_observers.
7647 * record-btrace.c (record_btrace_thread_observer): Remove.
7648 (record_btrace_thread_observer_token): New global.
7649 * observer.sh: Remove.
7650 * observer.c: Rename to observable.c.
7651 * observable.c (namespace gdb_observers): Define new objects.
7652 (observer_debug): Move into gdb_observers namespace.
7653 (struct observer, struct observer_list, xalloc_observer_list_node)
7654 (xfree_observer_list_node, generic_observer_attach)
7655 (generic_observer_detach, generic_observer_notify): Remove.
7656 (_initialize_observer): Update.
7657 Don't include observer.inc.
7658 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7659 (clean mostlyclean): Likewise.
7660 (observer.h, observer.inc): Remove targets.
7661 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7662 (COMMON_SFILES): Use observable.c, not observer.c.
7663 * .gitignore: Remove observer.h.
7665 2018-03-18 Tom Tromey <tom@tromey.com>
7667 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7669 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7671 2018-03-17 Tom Tromey <tom@tromey.com>
7673 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7675 2018-03-17 Tom Tromey <tom@tromey.com>
7677 * target.c (class scoped_target_fd): New.
7678 (target_fileio_close_cleanup): Remove.
7679 (target_fileio_read_alloc_1): Use scoped_target_fd.
7681 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7683 * silent-rules.mk: New.
7684 * Makefile.in: Include silent-rules.mk
7685 (srcdir, VPATH, top_srcdir): Move up.
7686 (COMPILE): Add ECHO_CXX.
7687 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7688 (init.c): Add ECHO_INIT_C.
7689 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7690 (version.c): Add ECHO_GEN.
7691 (printcmd.o): Add ECHO_CXX.
7692 (target-float.o): Add ECHO_CXX.
7693 (ada-exp.o): Add ECHO_CXX.
7694 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7695 (insight$(EXEEXT)): Add ECHO_CXXLD.
7696 * gnulib/configure.ac: Add AM_SILENT_RULES.
7697 * gnulib/aclocal.m4: Re-generate.
7698 * gnulib/configure: Re-generate.
7699 * gnulib/import/Makefile.in: Re-generate.
7701 2018-03-16 Tom Tromey <tom@tromey.com>
7703 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7704 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7705 * utils.c (do_free_section_addr_info)
7706 (make_cleanup_free_section_addr_info): Remove.
7707 * symfile.h (struct other_sections): Add constructor.
7708 (struct section_addr_info): Remove.
7709 (section_addr_info): New typedef.
7710 (struct sym_fns) <sym_offsets>: Change type of parameter.
7711 (build_section_addr_info_from_objfile)
7712 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7713 (default_symfile_offsets, symbol_file_add)
7714 (symbol_file_add_from_bfd)
7715 (build_section_addr_info_from_section_table): Update.
7716 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7717 * symfile.c (alloc_section_addr_info): Remove.
7718 (build_section_addr_info_from_section_table): Change return type.
7720 (build_section_addr_info_from_bfd)
7721 (build_section_addr_info_from_objfile): Likewise.
7722 (free_section_addr_info): Remove.
7723 (relative_addr_info_to_section_offsets): Change type of "addrs".
7724 (addrs_section_compar): Now a std::sort comparator.
7725 (addrs_section_sort): Change return type.
7726 (addr_info_make_relative): Change type of "addrs". Update.
7727 (default_symfile_offsets, syms_from_objfile_1)
7728 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7729 (symbol_file_add_separate): Update.
7730 (symbol_file_add): Change type of "addrs". Update.
7731 (add_symbol_file_command): Update. Remove cleanups.
7732 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7734 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7735 * solib.c (solib_read_symbols): Update.
7736 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7737 * machoread.c (macho_symfile_offsets): Update.
7738 * jit.c (jit_bfd_try_read_symtab): Update.
7740 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7742 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7743 unittests/utils-selftests.c.
7744 * unittests/utils-selftests.c: New file.
7746 2018-03-14 Tom Tromey <tom@tromey.com>
7749 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7752 2018-03-14 Tom Tromey <tom@tromey.com>
7755 * printcmd.c (printf_pointer): Allow "-" in format.
7757 2018-03-14 Tom Tromey <tom@tromey.com>
7759 * printcmd.c (_initialize_printcmd): Add usage to printf.
7761 2018-03-14 Yao Qi <qiyao@sourceware.org>
7763 * MAINTAINERS: Update my email address.
7765 2018-03-13 Tom Tromey <tom@tromey.com>
7767 * machoread.c (macho_check_dsym): Change filenamep to a
7769 (macho_symfile_read): Update.
7770 * symfile.c (load_command): Use std::string.
7772 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7774 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7775 to error message string.
7776 (riscv_register_name): Use xsnprintf instead of sprintf.
7777 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7779 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7781 (riscv_push_dummy_call): Likewise.
7783 2018-03-12 Tom Tromey <tom@tromey.com>
7785 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7786 Use gdb::byte_vector.
7787 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7789 2018-03-12 Yao Qi <yao.qi@linaro.org>
7791 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7792 parameter type to readable_regcache.
7793 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7796 2018-03-11 Tom Tromey <tom@tromey.com>
7798 * dwarf2read.c (struct nextfield): Add initializers.
7799 (struct nextfnfield): Remove.
7800 (struct fnfieldlist): Add initializers. Remove "length" and
7801 "head", use std::vector.
7802 (struct decl_field_list): Remove.
7803 (struct field_info): Add initializers.
7804 <fields, baseclasses>: Now std::vector.
7805 <nbaseclasses, nfnfields, typedef_field_list_count,
7806 nested_types_list_count>: Remove.
7807 (dwarf2_add_field, dwarf2_add_type_defn)
7808 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7809 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7810 (process_structure_scope): Update.
7812 2018-03-11 Tom Tromey <tom@tromey.com>
7814 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7815 for use by std::sort.
7816 (build_type_psymtabs_1): Use std::vector.
7818 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7820 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7821 and LIBMPFR in the printed configuration.
7823 2018-03-08 Tom Tromey <tom@tromey.com>
7825 * source.c (get_filename_and_charpos): Use scoped_fd.
7826 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7827 (procfs_pidlist): Likewise.
7828 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7829 (iterate_over_mappings): Likewise.
7831 2018-03-08 Tom Tromey <tom@tromey.com>
7833 * infcall.c (struct call_return_meta_info)
7834 <stack_temporaries_enabled>: Remove.
7835 (get_call_return_value, call_function_by_hand_dummy): Update.
7836 * thread.c (disable_thread_stack_temporaries): Remove.
7837 (enable_thread_stack_temporaries): Remove.
7838 (thread_stack_temporaries_enabled_p): Return bool.
7839 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7840 (get_last_thread_stack_temporary): Update.
7841 * eval.c (evaluate_subexp): Update.
7842 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7843 class, not a function.
7844 (value_ptr, value_vec): Remove typedefs.
7845 (class thread_info) <stack_temporaries_enabled>: Now bool.
7846 <stack_temporaries>: Now a std::vector.
7847 (thread_stack_temporaries_enabled_p)
7848 (value_in_thread_stack_temporaries): Return bool.
7850 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7852 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7853 (getpkt_or_notif_sane_1): Likewise.
7855 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7857 * build-id.c (build_id_to_debug_bfd): Use std::string.
7859 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7861 * build-id.c (find_separate_debug_file_by_buildid): Return
7863 * build-id.h (find_separate_debug_file_by_buildid): Return
7865 * coffread.c (coff_symfile_read): Adjust to std::string.
7866 * elfread.c (elf_symfile_read): Adjust to std::string.
7867 * symfile.c (separate_debug_file_exists): Change parameter to
7869 (find_separate_debug_file): Return std::string.
7870 (find_separate_debug_file_by_debuglink): Return std::string.
7871 * symfile.h (find_separate_debug_file_by_debuglink): Return
7874 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7876 * common/xml-utils.c (xml_escape_text): Move code to...
7877 (xml_escape_text_append): ... this new function.
7878 * common/xml-utils.h (xml_escape_text_append): New declaration.
7879 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7881 (_initialize_xml_utils): register test_xml_escape_text_append as
7884 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7886 * defs.h: Remove MAX_REGISTER_SIZE.
7887 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7889 * python/py-unwind.c (pyuw_sniffer): Likewise.
7891 2018-03-07 Tom Tromey <tom@tromey.com>
7893 * linux-tdep.c (linux_info_proc): Update.
7894 * target.h (struct target_ops) <to_fileio_readlink>: Return
7896 (target_fileio_readlink): Return optional<string>.
7897 * remote.c (remote_hostio_readlink): Return optional<string>.
7898 * inf-child.c (inf_child_fileio_readlink): Return
7900 * target.c (target_fileio_readlink): Return optional<string>.
7902 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7904 * regcache.c (cooked_read_test): Add riscv to the list of
7905 architectures that have a save_reggroup.
7907 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7909 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7910 value is not a dynamic class object.
7912 2018-03-06 Tom Tromey <tom@tromey.com>
7914 * rust-exp.y: Formatting fixes.
7916 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7918 * riscv-tdep.c (riscv_register_name): Remove target description
7920 (riscv_gdbarch_init): Remove target description check.
7922 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7924 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7926 * riscv-tdep.h: Likewise.
7928 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7930 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7931 (riscv_pseudo_register_write): Delete.
7932 (riscv_gdbarch_init): Remove all use of pseudo registers.
7934 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7936 * record-btrace.c (btrace_print_lines): Replace cleanup
7937 parameter with RAII equivalents.
7938 (btrace_insn_history): Replace cleanup with RAII equivalents.
7939 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7940 make_cleanup_ui_out_tuple_begin_end): Remove.
7941 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7942 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7943 make_cleanup_ui_out_list_begin_end): Remove.
7945 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7947 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7948 parameter types to std::vector. Use bool.
7949 (record_btrace_wait): Replace VEC(tp_t) with
7950 std::vector<thread_info *>.
7951 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7953 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7955 * record-btrace.c (record_btrace_disable_callback): Remove.
7956 (struct scoped_btrace_disable): New.
7957 (record_btrace_open): Use scoped_btrace_disable.
7959 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7961 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7962 reading values from registers.
7964 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7966 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7969 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7971 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7972 change parameter type. Use GDB's print functions, and use
7973 core_addr_to_string where appropriate.
7974 (riscv_push_dummy_call): Use core_addr_to_string where
7975 appropriate, update call to riscv_print_arg_location, and reindent
7977 (riscv_return_value): Update call to riscv_print_arg_location.
7979 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7980 Tim Newsome <tim@sifive.com>
7981 Albert Ou <a0u@eecs.berkeley.edu>
7982 Darius Rad <darius@bluespec.com>
7984 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7985 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7986 (ALLDEPFILES): Add riscv-tdep.c
7987 * configure.tgt: Add riscv support.
7988 * riscv-tdep.c: New file.
7989 * riscv-tdep.h: New file.
7990 * NEWS: Mention new target.
7991 * MAINTAINERS: Add entry for riscv.
7993 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7995 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7996 fields within aggregates.
7998 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8000 * record-btrace.c (btrace_print_lines): Change type of flags to
8001 gdb_disassembly_flags.
8003 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8005 * fbsd-nat.c: Include "inf-ptrace.h".
8006 (USE_SIGTRAP_SIGINFO): Conditionally define.
8007 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8008 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8009 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8011 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8013 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8015 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8016 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8017 "supports_stopped_by_hw_breakpoint" target methods.
8019 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8021 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8022 * fbsd-nat.c (debug_fbsd_nat): New variable.
8023 (show_fbsd_nat_debug): New function.
8024 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8025 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8027 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8029 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8030 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8032 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8033 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8036 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8038 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8039 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8041 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8043 * charset.c (struct charset_vector): New.
8044 (charsets): Change type to charset_vector.
8045 (find_charset_names): Adjust.
8047 (_initialize_charset): Adjust.
8049 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8051 * progspace.h (struct program_space) <deleted_solibs>: Change
8052 type to std::vector<std::string>.
8053 * progspace.c (clear_program_space_solib_cache): Adjust.
8054 * breakpoint.c (print_solib_event): Adjust.
8055 (check_status_catch_solib): Adjust.
8056 * solib.c (update_solib_list): Adjust.
8057 * ui-out.h (class ui_out) <field_string>: New overload.
8058 * ui-out.c (ui_out::field_string): New overload.
8060 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8062 * progspace.h (struct program_space): Add constructor and
8063 destructor, initialize fields.
8064 (add_program_space): Remove.
8065 * progspace.c (add_program_space): Rename to...
8066 (program_space::program_space): ... this.
8067 (release_program_space): Rename to...
8068 (program_space::~program_space): ... this.
8069 (delete_program_space): Use delete to delete program_space.
8070 (initialize_progspace): Use new to allocate program_space.
8071 * inferior.c (add_inferior_with_spaces): Likewise.
8072 (clone_inferior_command): Likewise.
8073 * infrun.c (follow_fork_inferior): Likewise.
8074 (handle_vfork_child_exec_or_exit): Likewise.
8076 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8078 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8079 (delim_string_to_char_ptr_vec): Return std::vector of
8080 gdb::unique_xmalloc_ptr.
8081 (dirnames_to_char_ptr_vec_append): Take std::vector of
8082 gdb::unique_xmalloc_ptr.
8083 (dirnames_to_char_ptr_vec): Return std::vector of
8084 gdb::unique_xmalloc_ptr.
8085 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8086 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8087 (delim_string_to_char_ptr_vec): Return an std::vector of
8088 gdb::unique_xmalloc_ptr, adjust the code.
8089 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8090 gdb::unique_xmalloc_ptr, adjust the code.
8091 (dirnames_to_char_ptr_vec): Return an std::vector of
8092 gdb::unique_xmalloc_ptr, adjust the code.
8093 * auto-load.c (auto_load_safe_path_vec): Change type to
8094 std::vector of gdb::unique_xmalloc_ptr.
8095 (auto_load_expand_dir_vars): Return an std::vector of
8096 gdb::unique_xmalloc_ptr, adjust the code.
8097 (auto_load_safe_path_vec_update): Adjust.
8098 (filename_is_in_auto_load_safe_path_vec): Adjust.
8099 (auto_load_objfile_script_1): Adjust.
8100 * build-id.c (build_id_to_debug_bfd): Adjust.
8101 * linux-thread-db.c (thread_db_load_search): Adjust.
8102 * source.c (add_path): Adjust.
8104 * symfile.c (find_separate_debug_file): Adjust.
8105 * utils.c (do_free_char_ptr_vec): Remove.
8106 (make_cleanup_free_char_ptr_vec): Remove.
8108 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8111 * common/pathstuff.c: Conditionally include "<windows.h>".
8113 2018-03-01 Georg Sauthoff <mail@georg.so>
8116 * gcore.in: Quote variables and switch interpreter to bash.
8118 2018-03-01 Tom Tromey <tom@tromey.com>
8120 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8121 assertion. Add assertion for discriminant_index.
8122 (quirk_rust_enum): Use correct base type name in univariant case.
8124 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8126 * record.c (get_call_history_modifiers): Return a
8128 (cmd_record_call_history): Adjust.
8129 * record-btrace.c (record_btrace_call_history): Adjust.
8130 (record_btrace_call_history_range): Adjust.
8131 (record_btrace_call_history_from): Adjust.
8132 * target-debug.h (target_debug_print_record_print_flags): New.
8133 * target-delegates.c: Re-generate.
8134 * target.c (target_call_history): Change flags type.
8135 (target_call_history_from): Likewise.
8136 (target_call_history_range): Likewise.
8137 * target.h (struct target_ops) <target_call_history>: Likewise.
8138 (target_call_history_from): Likewise.
8139 (target_call_history_range): Likewise.
8141 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8142 Simon Marchi <simon.marchi@polymtl.ca>
8144 * common/common-utils.c: Include "sys/stat.h".
8145 (is_regular_file): Move here from "source.c"; change return
8147 * common/common-utils.h (is_regular_file): New prototype.
8148 * common/pathstuff.c (contains_dir_separator): New function.
8149 * common/pathstuff.h (contains_dir_separator): New prototype.
8150 * source.c: Don't include "sys/stat.h".
8151 (is_regular_file): Move to "common/common-utils.c".
8153 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8155 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8156 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8157 * auto-load.c: Include "common/pathstuff.h".
8158 * common/common-def.h (current_directory): Move here.
8159 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8161 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8163 * common/pathstuff.c: New file.
8164 * common/pathstuff.h: New file.
8165 * compile/compile.c: Include "common/pathstuff.h".
8166 * defs.h (current_directory): Move to "common/common-defs.h".
8167 * dwarf2read.c: Include "common/pathstuff.h".
8169 * guile/scm-safe-call.c: Likewise.
8170 * linux-thread-db.c: Likewise.
8172 * nto-tdep.c: Likewise.
8173 * objfiles.c: Likewise.
8174 * source.c: Likewise.
8175 * symtab.c: Likewise.
8176 * utils.c: Include "common/pathstuff.h".
8177 (gdb_realpath): Move to "common/pathstuff.c".
8178 (gdb_realpath_keepfile): Likewise.
8179 (gdb_abspath): Likewise.
8180 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8181 (gdb_realpath_keepfile): Likewise.
8182 (gdb_abspath): Likewise.
8184 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8186 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8187 wildcard process pid for super_resume for kernels with a
8190 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8192 * compile/compile.c (get_args): Add additional comments
8193 explaining function.
8195 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8196 Tom Tromey <tom@tromey.com>
8198 * target.h (memory_write_request_s): Remove typedef. Don't define
8200 (target_write_memory_blocks): Change argument to std::vector.
8201 (struct memory_write_request): Add constructor.
8202 * target-memory.c (compare_block_starting_address): Return bool.
8203 Change argument types.
8204 (claim_memory): Change arguments to use std::vector.
8205 (split_regular_and_flash_blocks, blocks_to_erase)
8206 (compute_garbled_blocks): Likewise.
8207 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8208 (target_write_memory_blocks): Change argument to std::vector.
8209 * symfile.c (struct load_section_data): Add constructor and
8210 destructor. Use std::vector for "requests".
8211 (struct load_progress_data): Add initializers.
8212 (load_section_callback): Update. Use "new".
8213 (clear_memory_write_data): Remove.
8214 (generic_load): Update.
8216 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8218 * arch/aarch64.h: Use common/tdesc.h.
8220 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8222 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8223 architecture with a 64-bit ABI.
8225 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8227 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8228 ahead of target description loading.
8230 2018-02-26 Tom Tromey <tom@tromey.com>
8232 * stack.c (backtrace_command_1): Update.
8233 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8235 * python/py-framefilter.c (py_print_frame)
8236 (gdbpy_apply_frame_filter): Change type of "flags".
8237 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8239 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8240 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8241 * extension.h (enum frame_filter_flag): Rename from
8243 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8244 (apply_ext_lang_frame_filter): Change type of "flags".
8245 * extension.c (apply_ext_lang_frame_filter): Change type of
8247 * extension-priv.h (struct extension_language_ops)
8248 <apply_frame_filter>: Change type of "flags".
8250 2018-02-26 Tom Tromey <tom@tromey.com>
8253 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8254 off-by-one in py_end computation.
8255 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8257 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8260 2018-02-26 Tom Tromey <tom@tromey.com>
8262 * dwarf2read.c (struct variant_field): New.
8263 (struct nextfield) <variant>: New field.
8264 (dwarf2_add_field): Handle DW_TAG_variant_part.
8265 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8266 discriminated union.
8267 (read_structure_type): Handle DW_TAG_variant_part.
8268 (handle_struct_member_die): New function, extracted from
8269 process_structure_scope. Handle DW_TAG_variant.
8270 (process_structure_scope): Handle discriminated unions. Call
8271 handle_struct_member_die.
8273 2018-02-26 Tom Tromey <tom@tromey.com>
8275 * rust-lang.h (rust_last_path_segment): Declare.
8276 * rust-lang.c (rust_last_path_segment): Now public. Change
8278 (struct disr_info): Remove.
8279 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8280 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8281 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8282 (rust_enum_p, rust_enum_variant): New function.
8283 (rust_underscore_fields): Remove "offset" parameter.
8284 (rust_print_enum): New function.
8285 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8286 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8287 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8289 (rust_internal_print_type): New function, from rust_print_type.
8291 (rust_print_type): Call rust_internal_print_type.
8292 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8293 Update enum handling.
8294 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8295 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8296 (rust_union_quirks): New functions.
8297 (process_full_comp_unit, process_full_type_unit): Call
8299 (process_structure_scope): Update rust_unions if necessary.
8301 2018-02-26 Tom Tromey <tom@tromey.com>
8303 * value.h (value_union_variant): Declare.
8304 * valops.c (value_union_variant): New function.
8305 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8306 (struct discriminant_info): New.
8307 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8309 (struct main_type) <flag_discriminated_union>: New field.
8311 2018-02-26 Tom Tromey <tom@tromey.com>
8313 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8314 unittests/unpack-selftests.c.
8315 * unittests/unpack-selftests.c: New file.
8316 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8318 2018-02-26 Yao Qi <yao.qi@linaro.org>
8320 * dwarf2read.c (struct partial_die_info) <read>: New method.
8321 (read_partial_die): Remove the declaration.
8322 (load_partial_dies): Update.
8323 (partial_die_info::partial_die_info):
8324 (read_partial_die): Change it to partial_die_info::read.
8326 2018-02-26 Yao Qi <yao.qi@linaro.org>
8328 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8329 (fixup_partial_die): Remove declaration.
8330 (scan_partial_symbols): Update.
8331 (partial_die_parent_scope): Likewise.
8332 (partial_die_full_name): Likewise.
8333 (fixup_partial_die): Change it to partial_die_info::fixup.
8335 2018-02-26 Yao Qi <yao.qi@linaro.org>
8337 * dwarf2read.c (read_partial_die): Update the declaration.
8338 (load_partial_dies): Caller update.
8339 (read_partial_die): Remove one argument abbrev_len.
8341 2018-02-26 Yao Qi <yao.qi@linaro.org>
8343 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8344 assignment operator.
8345 (load_partial_dies): Use ctor and copy ctor.
8346 (read_partial_die): Update.
8347 (dwarf2_cu::find_partial_die): Use ctor.
8349 2018-02-26 Yao Qi <yao.qi@linaro.org>
8351 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8352 (find_partial_die_in_comp_unit): Change it to
8353 dwarf2_cu::find_partial_die.
8354 (find_partial_die): Update.
8356 2018-02-26 Yao Qi <yao.qi@linaro.org>
8358 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8361 2018-02-26 Yao Qi <yao.qi@linaro.org>
8363 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8365 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8367 * arch/amd64.h: Use common/tdesc.h.
8368 * arch/i386.c: Likewise.
8369 * arch/i386.h: Likewise.
8370 * arch/tic6x.c: Likewise.
8371 * arch/tdesc.h: Move file from here...
8372 * common/tdesc.h: ...to here.
8373 * features/aarch64-core.c: Regenerate.
8374 * features/aarch64-fpu.c: Regenerate.
8375 * features/i386/32bit-avx.c: Regenerate.
8376 * features/i386/32bit-avx512.c: Regenerate.
8377 * features/i386/32bit-core.c: Regenerate.
8378 * features/i386/32bit-linux.c: Regenerate.
8379 * features/i386/32bit-mpx.c: Regenerate.
8380 * features/i386/32bit-pkeys.c: Regenerate.
8381 * features/i386/32bit-sse.c: Regenerate.
8382 * features/i386/64bit-avx.c: Regenerate.
8383 * features/i386/64bit-avx512.c: Regenerate.
8384 * features/i386/64bit-core.c: Regenerate.
8385 * features/i386/64bit-linux.c: Regenerate.
8386 * features/i386/64bit-mpx.c: Regenerate.
8387 * features/i386/64bit-pkeys.c: Regenerate.
8388 * features/i386/64bit-segments.c: Regenerate.
8389 * features/i386/64bit-sse.c: Regenerate.
8390 * features/i386/x32-core.c: Regenerate.
8391 * features/tic6x-c6xp.c: Regenerate.
8392 * features/tic6x-core.c: Regenerate.
8393 * features/tic6x-gp.c: Regenerate.
8394 * target-descriptions.c: Use common/tdesc.h.
8395 * target-descriptions.h: Likewise.
8397 2018-02-24 Tom Tromey <tom@tromey.com>
8399 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8400 (try_thread_db_load_from_dir, thread_db_load_search): Use
8402 (info_auto_load_libthread_db_compare): Return bool. Change
8404 (info_auto_load_libthread_db): Use std::vector, std::string.
8407 2018-02-24 Tom Tromey <tom@tromey.com>
8409 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8411 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8413 * gdbarch.c: Rebuild.
8414 * gdbarch.h: Rebuild.
8415 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8416 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8417 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8420 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8422 * gdbtypes.h (sect_offset): Change type to uint64_t.
8423 (sect_offset_str): New function.
8424 * dwarf2read.c (create_addrmap_from_aranges): Use
8426 (error_check_comp_unit_head): Likewise.
8427 (create_debug_type_hash_table): Likewise.
8428 (read_cutu_die_from_dwo): Likewise.
8429 (init_cutu_and_read_dies): Likewise.
8430 (init_cutu_and_read_dies_no_follow): Likewise.
8431 (process_psymtab_comp_unit_reader): Likewise.
8432 (partial_die_parent_scope): Likewise.
8433 (peek_die_abbrev): Likewise.
8434 (process_queue): Likewise.
8435 (dwarf2_physname): Likewise.
8436 (read_namespace_alias): Likewise.
8437 (read_import_statement): Likewise.
8438 (create_dwo_cu_reader): Likewise.
8439 (create_cus_hash_table): Likewise.
8440 (lookup_dwo_cutu): Likewise.
8441 (inherit_abstract_dies): Likewise.
8442 (read_func_scope): Likewise.
8443 (read_call_site_scope): Likewise.
8444 (dwarf2_add_member_fn): Likewise.
8445 (read_common_block): Likewise.
8446 (read_module_type): Likewise.
8447 (read_typedef): Likewise.
8448 (read_subrange_type): Likewise.
8449 (load_partial_dies): Likewise.
8450 (read_partial_die): Likewise.
8451 (find_partial_die): Likewise.
8452 (read_str_index): Likewise.
8453 (dwarf2_string_attr): Likewise.
8454 (build_error_marker_type): Likewise.
8455 (lookup_die_type): Likewise.
8456 (dump_die_shallow): Likewise.
8457 (follow_die_ref): Likewise.
8458 (dwarf2_fetch_die_loc_sect_off): Likewise.
8459 (dwarf2_fetch_constant_bytes): Likewise.
8460 (follow_die_sig): Likewise.
8461 (get_signatured_type): Likewise.
8462 (get_DW_AT_signature_type): Likewise.
8463 (dwarf2_find_containing_comp_unit): Likewise.
8464 (set_die_type): Likewise.
8466 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8468 * arch/aarch64.c: Include "common-defs.h".
8469 * arch/amd64.c: Likewise.
8470 * arch/i386.c: Likewise.
8472 2018-02-21 Tom Tromey <tom@tromey.com>
8474 * value.h: (extract_field_op): Update.
8475 * eval.c (extract_field_op): Return a const char *.
8476 * expression.h (parse_expression_for_completion): Update.
8477 * completer.c (complete_expression): Update.
8478 (add_struct_fields): Make fieldname const.
8479 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8480 (mark_completion_tag, parse_exp_in_context_1): Update.
8481 (parse_expression_for_completion): Change "name" to
8482 unique_xmalloc_ptr*.
8484 2018-02-21 Tom Tromey <tom@tromey.com>
8486 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8488 2018-02-21 Yao Qi <yao.qi@linaro.org>
8490 * avr-tdep.c (avr_read_pc): Change parameter type to
8492 * gdbarch.sh (read_pc): Likewise.
8493 * gdbarch.c: Re-generated.
8494 * gdbarch.h: Re-generated.
8495 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8497 * ia64-tdep.c (ia64_read_pc): Likewise.
8498 * mips-tdep.c (mips_read_pc): Likewise.
8499 * spu-tdep.c (spu_read_pc): Likewise.
8501 2018-02-21 Yao Qi <yao.qi@linaro.org>
8503 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8504 * regcache-dump.c: New file.
8505 * regcache.c: Move register_dump to regcache-dump.c.
8506 (maintenance_print_registers): Likewise.
8507 (maintenance_print_raw_registers): Likewise.
8508 (maintenance_print_cooked_registers): Likewise.
8509 (maintenance_print_register_groups): Likewise.
8510 (maintenance_print_remote_registers): Likewise.
8511 (_initialize_regcache): Likewise.
8512 * regcache.h (register_dump): Moved from regcache.c.
8514 2018-02-21 Yao Qi <yao.qi@linaro.org>
8516 * regcache.c (regcache::regcache): Update.
8517 (regcache::invalidate): Move it to detached_regcache::invalidate.
8518 (get_thread_arch_aspace_regcache): Update.
8519 (regcache::raw_update): Update.
8520 (regcache::cooked_read): Remove some code.
8521 (regcache::cooked_read_value): Likewise.
8522 (regcache::raw_write): Remove assert on m_readonly_p.
8523 (regcache::raw_supply_integer): Move it to
8524 detached_regcache::raw_supply_integer.
8525 (regcache::raw_supply_zeroed): Likewise.
8526 * regcache.h (detached_regcache) <raw_supply_integer>: New
8528 <raw_supply_zeroed, invalidate>: Likewise.
8529 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8530 <invalidate>: Likewise.
8531 <m_readonly_p>: Removed.
8533 2018-02-21 Yao Qi <yao.qi@linaro.org>
8535 * infcmd.c (get_return_value): Let stop_regs point to
8536 get_current_regcache.
8537 * regcache.c (regcache::regcache): Remove.
8538 (register_dump_reg_buffer): New class.
8539 (regcache_print): Adjust.
8540 * regcache.h (regcache): Remove constructors.
8542 2018-02-21 Yao Qi <yao.qi@linaro.org>
8544 * regcache.c (class register_dump): New class.
8545 (register_dump_regcache, register_dump_none): New class.
8546 (register_dump_remote, register_dump_groups): New class.
8547 (regcache_print): Update.
8548 * regcache.h (regcache_dump_what): Move it to regcache.c.
8549 (regcache) <dump>: Remove.
8551 2018-02-21 Yao Qi <yao.qi@linaro.org>
8553 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8555 (jit_unwind_reg_set_impl): Call raw_supply.
8556 (jit_frame_sniffer): Use reg_buffer_rw.
8557 * record-full.c (record_full_core_regbuf): Change its type.
8558 (record_full_core_open_1): Use reg_buffer_rw.
8559 (record_full_close): Likewise.
8560 (record_full_core_fetch_registers): Use regcache->raw_supply.
8561 (record_full_core_store_registers): Likewise.
8562 * regcache.c (regcache::get_register_status): Move it to
8564 (regcache_raw_set_cached_value): Remove.
8565 (regcache::raw_set_cached_value): Remove.
8566 (regcache::raw_write): Call raw_supply.
8567 (regcache::raw_supply): Move it to reg_buffer_rw.
8568 * regcache.h (regcache_raw_set_cached_value): Remove.
8569 (reg_buffer_rw): New class.
8571 2018-02-21 Yao Qi <yao.qi@linaro.org>
8573 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8574 readonly_detached_regcache.
8575 (dummy_frame_prev_register): Use regcache->cooked_read.
8576 * frame.c (frame_save_as_regcache): Change return type.
8577 (frame_pop): Update.
8578 * frame.h (frame_save_as_regcache): Update declaration.
8579 * inferior.h (get_infcall_suspend_state_regcache): Update
8581 * infrun.c (infcall_suspend_state) <registers>: use
8582 readonly_detached_regcache.
8583 (save_infcall_suspend_state): Don't use regcache_dup.
8584 (get_infcall_suspend_state_regcache): Change return type.
8585 * linux-fork.c (struct fork_info) <savedregs>: Change to
8586 readonly_detached_regcache.
8588 (fork_save_infrun_state): Don't use regcache_dup.
8589 (info_checkpoints_command): Adjust.
8590 * mi/mi-main.c (register_changed_p): Update declaration.
8591 (mi_cmd_data_list_changed_registers): Use
8592 readonly_detached_regcache.
8593 (register_changed_p): Change parameter type to
8594 readonly_detached_regcache.
8595 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8596 readonly_detached_regcache.
8597 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8598 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8600 (regcache::save): Move it to reg_buffer.
8601 (regcache::restore): Change parameter type.
8602 (regcache_dup): Remove.
8603 * regcache.h (reg_buffer) <save>: New method.
8604 (readonly_detached_regcache): New class.
8605 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8606 readonly_detached_regcache.
8607 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8609 2018-02-21 Yao Qi <yao.qi@linaro.org>
8611 * frame.c (frame_save_as_regcache): Use regcache method save.
8612 (frame_pop): Use regcache method restore.
8613 * infrun.c (restore_infcall_suspend_state): Likewise.
8614 * linux-fork.c (fork_load_infrun_state): Likewise.
8615 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8617 * regcache.c (regcache_save): Remove.
8618 (regcache::restore): More asserts.
8619 (regcache_cpy): Remove.
8620 * regcache.h (regcache_save): Remove the declaration.
8621 (regcache::restore): Move from private to public.
8622 Remove the friend declaration of regcache_cpy.
8623 (regcache_cpy): Remove declaration.
8625 2018-02-21 Yao Qi <yao.qi@linaro.org>
8627 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8628 parameter type to 'readable_regcache *'.
8629 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8630 * arm-tdep.c (arm_neon_quad_read): Likewise.
8631 (arm_pseudo_read): Likewise.
8632 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8633 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8634 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8635 * gdbarch.c: Re-generated.
8636 * gdbarch.h: Re-generated.
8637 * gdbarch.sh (pseudo_register_read): Change parameter type to
8638 'readable_regcache *'.
8639 (pseudo_register_read_value): Likewise.
8640 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8641 (h8300_pseudo_register_read): Likewise.
8642 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8643 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8644 (i386_pseudo_register_read_into_value): Likewise.
8645 (i386_pseudo_register_read_value): Likewise.
8646 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8648 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8649 * m32c-tdep.c (m32c_raw_read): Likewise.
8650 (m32c_read_flg): Likewise.
8651 (m32c_banked_register): Likewise.
8652 (m32c_banked_read): Likewise.
8653 (m32c_sb_read): Likewise.
8654 (m32c_part_read): Likewise.
8655 (m32c_cat_read): Likewise.
8656 (m32c_r3r2r1r0_read): Likewise.
8657 (m32c_pseudo_register_read): Likewise.
8658 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8659 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8660 (mep_pseudo_cr64_read): Likewise.
8661 (mep_pseudo_register_read): Likewise.
8662 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8663 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8664 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8665 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8666 (regcache::cooked_read): Likewise.
8667 (regcache::cooked_read_value): Likewise.
8668 (regcache_cooked_read_signed):
8669 (regcache::cooked_read): Likewise.
8670 * regcache.h (readable_regcache): New class.
8671 (regcache): Inherit readable_regcache. Move some methods to
8673 * rl78-tdep.c (rl78_pseudo_register_read): Change
8674 parameter type to 'readable_regcache *'.
8675 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8676 (e500_pseudo_register_read): Change parameter type to
8677 'readable_regcache *'.
8678 (dfp_pseudo_register_read): Likewise.
8679 (vsx_pseudo_register_read): Likewise.
8680 (efpr_pseudo_register_read): Likewise.
8681 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8682 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8683 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8684 (sh64_pseudo_register_read): Likewise.
8685 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8686 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8687 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8688 (spu_pseudo_register_read): Likewise.
8689 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8690 (xtensa_pseudo_register_read): Likewise.
8692 2018-02-21 Yao Qi <yao.qi@linaro.org>
8694 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8695 (regcache::arch): Move it to reg_buffer::arch.
8696 (regcache::register_buffer): Likewise.
8697 (regcache::assert_regnum): Likewise.
8698 (regcache::num_raw_registers): Likewise.
8699 * regcache.h (reg_buffer): New class.
8700 (regcache): Inherit reg_buffer.
8702 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8704 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8705 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8707 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8709 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8711 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8713 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8714 (SFILES): Remove common/*.c files.
8715 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8716 * common/common.host: Add common reference.
8717 * configure.ac: Likewise.
8718 * configure: Regenerate.
8720 2018-02-16 Yao Qi <yao.qi@linaro.org>
8722 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8723 (block_initialize_namespace): Use new.
8724 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8725 (dwarf2_free_objfile): Use delete.
8726 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8727 (copy_type_recursive): Use new.
8728 * gdb_obstack.h (allocate_on_obstack): New.
8730 2018-02-15 Yao Qi <yao.qi@linaro.org>
8733 * inferior.c (exit_inferior_1): Reset inf->control.
8735 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8737 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8740 2018-02-14 Pedro Alves <palves@redhat.com>
8742 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8743 frame_cleanup_after_sniffer on exception.
8745 2018-02-14 Tom Tromey <tom@tromey.com>
8747 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8749 (solib_bfd_open): Make pathname const.
8750 * solib.c (solib_bfd_open): Make pathname const.
8751 * solib-spu.c (spu_bfd_fopen): Make name const.
8752 (spu_bfd_open): Make pathname const.
8753 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8754 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8756 2018-02-14 Tom Tromey <tom@tromey.com>
8758 * symfile.c (symfile_bfd_open): Update.
8759 * source.h (openp, source_full_path_of, find_and_open_source):
8760 Change argument type to unique_xmalloc_ptr.
8761 * source.c (openp): Take a unique_xmalloc_ptr.
8762 (source_full_path_of, find_and_open_source): Likewise.
8763 (open_source_file, symtab_to_fullname): Update.
8764 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8766 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8767 (exec_file_find): Update.
8768 * psymtab.c (psymtab_to_fullname): Update.
8769 * nto-tdep.h (nto_find_and_open_solib): Update.
8770 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8772 * exec.c (exec_file_attach): Update.
8773 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8774 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8776 2018-02-14 Tom Tromey <tom@tromey.com>
8778 * solib.c: Include source.h.
8779 * nto-tdep.c: Include source.h.
8780 * mi/mi-cmd-env.c: Include source.h.
8781 * infcmd.c: Include source.h.
8782 * exec.c: Include source.h.
8783 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8784 (add_path, directory_switch, source_path, init_source_path): Move
8786 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8787 (add_path, directory_switch, source_path, init_source_path):
8790 2018-02-14 Tom Tromey <tom@tromey.com>
8792 * solist.h (exec_file_find, solib_find): Return
8794 (solib_bfd_fopen): Take a const char *.
8795 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8796 (exec_file_find, solib_find): Likewise.
8797 (solib_bfd_fopen): Do not take ownership of "pathname".
8798 (solib_bfd_open): Use unique_xmalloc_ptr.
8799 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8800 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8801 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8802 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8804 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8806 * ada-lang.c (name_match_type_from_name): Remove reference to
8807 ada_name_for_lookup in function's documentation.
8808 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8810 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8812 * defs.h (enum openp_flags): New enum.
8813 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8814 Move to enum openp_flags.
8815 (openp_flags): New enum flags.
8816 (openp): Change parameter type to openp_flags.
8817 * source.c (openp): Change parameter type to openp_flags.
8818 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8819 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8821 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8823 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8826 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8828 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8830 (class dwarf2_queue_guard): ...the destructor of this new class.
8831 (dw2_do_instantiate_symtab): Create instance of the new class
8832 dwarf2_queue_guard, remove cleanup.
8834 2018-02-09 Tom Tromey <tom@tromey.com>
8836 * source.c (find_source_lines): Don't reference past the end of
8839 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8841 * remote.c (remote_btrace_maybe_reopen): Change error message.
8842 * btrace.c (btrace_enable): Likewise.
8843 (parse_xml_btrace): Likewise.
8844 (parse_xml_btrace_conf): Likewise.
8846 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8848 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8849 (linux_enable_pt, linux_enable_bts): Call
8850 diagnose_perf_event_open_fail.
8852 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8854 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8855 Remove parameter and change return type. Update callers. Move it.
8856 (linux_enable_bts, linux_enable_pt): Improve error message.
8857 (linux_enable_pt): Remove zero buffer size check.
8858 (linux_enable_btrace): Improve error messages. Remove NULL return
8861 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8863 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8864 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8865 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8866 (linux_supports_pt, linux_supports_btrace): Remove.
8867 (linux_enable_bts): Call cpu_supports_bts.
8868 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8869 * remote.c (remote_supports_btrace): Remove.
8870 (init_remote_ops): Remove remote_supports_btrace.
8871 * target-delegates.c: Regenerated.
8872 * target.c (target_supports_btrace): Remove.
8873 * target.h (target_ops) <to_supports_btrace>: Remove
8874 (target_supports_btrace): Remove.
8875 * x86-linux-nat.c (x86_linux_create_target): Remove
8876 linux_supports_btrace.
8878 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8880 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8882 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8883 exception and use message in own exception.
8885 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8887 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8888 (perf_event_pt_event_type): Use gdb_file_up.
8889 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8890 scoped_fd, and scoped_mmap.
8892 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8894 * common/scoped_mmap.h: New.
8895 * unittests/scoped_mmap-selftest.c: New.
8896 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8897 unittests/scoped_mmap-selftest.c.
8899 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8901 * common/scoped_fd.h: New.
8902 * unittests/scoped_fd-selftest.c: New.
8903 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8904 unittests/scoped_fd-selftest.c.
8906 2018-02-09 Tom Tromey <tom@tromey.com>
8908 * auto-load.c (auto_load_section_scripts): Use
8909 gdb::unique_xmalloc_ptr.
8911 2018-02-09 Tom Tromey <tom@tromey.com>
8913 * auto-load.c (execute_script_contents): Use std::string.
8915 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8917 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8918 Python function, rather than a new command.
8920 2018-02-08 Tom Tromey <tom@tromey.com>
8922 * solib.c (solib_find_1): Use std::string.
8923 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8925 2018-02-08 Tom Tromey <tom@tromey.com>
8927 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8929 2018-02-08 Tom Tromey <tom@tromey.com>
8931 * source.c (find_source_lines): Use gdb::def_vector.
8933 2018-02-08 Tom Tromey <tom@tromey.com>
8935 * macrocmd.c (struct temporary_macro_definition): New.
8936 (macro_define_command): Use temporary_macro_definition. Remove
8938 (free_macro_definition_ptr): Remove.
8940 2018-02-08 Tom Tromey <tom@tromey.com>
8942 * macroexp.c (maybe_expand): Use std::string.
8944 2018-02-08 Tom Tromey <tom@tromey.com>
8946 * macroexp.c (struct macro_buffer): Add initializers for some
8948 (init_buffer, init_shared_buffer, free_buffer)
8949 (free_buffer_return_text): Remove.
8950 (macro_buffer): New constructors.
8951 (~macro_buffer): New destructor.
8952 (macro_buffer::set_shared): New method.
8953 (macro_buffer::resize_buffer, macro_buffer::appendc)
8954 (macro_buffer::appendmem): Now methods, not free functions.
8955 (set_token, append_tokens_without_splicing, stringify)
8956 (macro_stringify): Update.
8957 (gather_arguments): Change return type. Remove argc_p argument,
8958 add args_ptr argument. Use std::vector.
8959 (substitute_args): Remove argc argument. Accept std::vector.
8960 (expand): Update. Use std::vector.
8961 (scan, macro_expand, macro_expand_next): Update.
8963 2018-02-08 Tom Tromey <tom@tromey.com>
8965 * symtab.c (default_collect_symbol_completion_matches_break_on):
8966 Use unique_xmalloc_ptr.
8967 * macroscope.h: (sal_macro_scope, user_macro_scope)
8968 (default_macro_scope): Return unique_xmalloc_ptr.
8969 * macroscope.c (sal_macro_scope, user_macro_scope)
8970 (default_macro_scope): Return unique_xmalloc_ptr.
8971 * macroexp.h (macro_expand, macro_expand_once): Return
8973 * macroexp.c (macro_expand, macro_expand_once): Return
8975 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8976 (info_macro_command, info_macros_command): Use
8978 * compile/compile-c-support.c (write_macro_definitions): Use
8980 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8982 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8984 * value.c (value_static_field): Assign field type instead of
8985 containing type when returning an optimized out value.
8987 2018-02-06 Yao Qi <yao.qi@linaro.org>
8989 * ft32-tdep.c (ft32_read_pc): Remove.
8990 (ft32_write_pc): Remove.
8991 (ft32_gdbarch_init): Update.
8992 * m32r-tdep.c (m32r_read_pc): Remove.
8993 (m32r_gdbarch_init): Update.
8994 * mep-tdep.c (mep_read_pc): Remove.
8995 (mep_gdbarch_init): Update.
8996 * microblaze-tdep.c (microblaze_write_pc): Remove.
8997 (microblaze_gdbarch_init): Update.
8998 * mn10300-tdep.c (mn10300_read_pc): Remove.
8999 (mn10300_write_pc): Remove.
9000 (mn10300_gdbarch_init): Update.
9001 * moxie-tdep.c (moxie_read_pc): Remove.
9002 (moxie_write_pc): Remove.
9003 (moxie_gdbarch_init): Update.
9005 2018-02-06 Yao Qi <yao.qi@linaro.org>
9007 * expprint.c (print_subexp_standard): Handle
9008 OP_F77_UNDETERMINED_ARGLIST.
9009 (dump_subexp_body_standard): Likewise.
9011 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9013 * target-descriptions.c (tdesc_element_visitor) Add empty
9015 (tdesc_type): Move make_gdb_type from here.
9016 (tdesc_type_builtin): Likewise.
9017 (tdesc_type_vector): Likewise.
9018 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9019 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9020 (make_gdb_type_union): Likewise.
9021 (make_gdb_type_flags): Likewise.
9022 (make_gdb_type_enum): Likewise.
9023 (make_gdb_type): New function.
9024 (tdesc_register_type): Use static make_gdb_type.
9026 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9028 * infcmd.c (default_print_one_register_info): Align natural-format
9029 column values consistently one under another.
9030 (pad_to_column): New function.
9032 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9034 * dwarf2read.c (dwarf2_physname): Move commment.
9036 2018-02-01 Leszek Swirski <leszeks@google.com>
9038 * varobj.c (varobj_formatted_print_options): Allow recursive
9039 pretty printing if pretty printing is enabled.
9041 2018-02-01 Leszek Swirski <leszeks@google.com>
9043 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9044 names after a structop as a filename.
9046 2018-02-01 Yao Qi <yao.qi@linaro.org>
9048 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9049 (arm_record_coproc_data_proc): Likewise.
9051 2018-02-01 Yao Qi <yao.qi@linaro.org>
9053 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9055 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9057 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9058 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9060 2018-01-31 Pedro Alves <palves@redhat.com>
9062 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9063 * inflow.c (child_terminal_save_inferior): Wrap reference to
9064 tcgetpgrp in HAVE_TERMIOS_H.
9065 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9067 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9068 always iterate over all inferiors.
9069 (gdbsim_cntrl_c): Adjust.
9070 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9072 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9074 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9075 index type is objfile-owned if the element type is as well.
9077 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9081 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9083 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9084 "features/s390x-linux64.c".
9085 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9086 s390_linux32 and s390x_linux64.
9087 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9089 * s390-tdep.c: Include "features/s390-linux32.c" and
9090 "features/s390x-linux64.c".
9091 (s390_tdesc_valid): Add check for tdesc_has_registers.
9092 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9093 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9094 tdesc_s390x_linux64.
9095 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9096 tdesc_s390x_linux64 to...
9097 * s390-tdep.h: ...here.
9099 2018-01-30 Pedro Alves <palves@redhat.com>
9102 * config.in, configure: Regenerate.
9103 * configure.ac: Check for getpgid.
9104 * go32-nat.c (go32_pass_ctrlc): New.
9105 (go32_target): Install it.
9106 * inf-child.c (inf_child_target): Install
9107 child_terminal_save_inferior, child_pass_ctrlc and
9109 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9110 (inf_ptrace_target): No longer install it.
9111 * infcmd.c (interrupt_target_1): Adjust.
9112 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9113 (child_interrupt): Declare.
9114 (inferior::terminal_state): New.
9115 * inflow.c (struct terminal_info): Update comments.
9116 (inferior_process_group): Delete.
9117 (terminal_is_ours): Delete.
9118 (gdb_tty_state): New.
9119 (child_terminal_init): Adjust.
9120 (is_gdb_terminal, sharing_input_terminal_1)
9121 (sharing_input_terminal): New functions.
9122 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9123 Set the process's actual process group in the foreground if
9124 possible. Handle is_ours_for_output/is_ours distinction. Don't
9125 mark terminal as the inferior's if not sharing GDB's terminal.
9126 Don't check attach_flag.
9127 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9128 pass down a target_terminal_state.
9129 (child_terminal_save_inferior): New, factored out from ...
9130 (child_terminal_ours_1): ... this. Handle
9131 target_terminal_state::is_ours_for_output.
9132 (child_interrupt, child_pass_ctrlc): New.
9133 (inflow_inferior_exit): Clear the inferior's terminal_state.
9134 (copy_terminal_info): Copy the inferior's terminal state.
9135 (_initialize_inflow): Remove reference to terminal_is_ours.
9136 * inflow.h (inferior_process_group): Delete.
9137 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9138 * procfs.c (procfs_target): Don't install procfs_interrupt.
9139 (procfs_interrupt): Delete.
9140 * remote.c (remote_serial_quit_handler): Adjust.
9141 (remote_interrupt): Remove ptid parameter. Adjust.
9142 * target-delegates.c: Regenerate.
9143 * target.c: Include "terminal.h".
9144 (target_terminal::terminal_state): Rename to ...
9145 (target_terminal::m_terminal_state): ... this.
9146 (target_terminal::init): Adjust.
9147 (target_terminal::inferior): Adjust to per-inferior
9149 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9150 (target_terminal::ours, target_terminal::ours_for_output): Use
9151 target_terminal_is_ours_kind.
9152 (target_interrupt): Remove ptid parameter. Adjust.
9153 (default_target_pass_ctrlc): Adjust.
9154 * target.h (target_ops::to_terminal_save_inferior): New field.
9155 (target_ops::to_interrupt): Remove ptid_t parameter.
9156 (target_interrupt): Remove ptid_t parameter. Update comment.
9157 (target_pass_ctrlc): Update comment.
9158 * target/target.h (target_terminal_state): New scoped enum,
9160 (target_terminal::terminal_state): ... here.
9161 (target_terminal::inferior): Update comments.
9162 (target_terminal::restore_inferior): New.
9163 (target_terminal::is_inferior, target_terminal::is_ours)
9164 (target_terminal::is_ours_for_output): Adjust.
9165 (target_terminal::scoped_restore_terminal_state): Adjust to
9166 rename, and call restore_inferior() instead of inferior().
9167 (target_terminal::scoped_restore_terminal_state::m_state): Change
9169 (target_terminal::terminal_state): Rename to ...
9170 (target_terminal::m_terminal_state): ... this and change type.
9172 2018-01-30 Pedro Alves <palves@redhat.com>
9174 * linux-nat.c (wait_for_signal): New function.
9175 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9177 (async_terminal_is_ours)
9178 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9179 (linux_nat_add_target): Don't override
9180 to_terminal_inferior/to_terminal_ours.
9182 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9184 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9186 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9188 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9189 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9190 dwarf2_per_objfile_free here.
9191 (dwarf2_per_objfile_free): Remove.
9192 (_initialize_dwarf2_read): Don't register
9193 dwarf2_per_objfile_free as a registry cleanup.
9195 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9197 Avoid compilation errors in MinGW native builds
9199 The error is triggered by including python-internal.h, and the
9202 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9203 from build-gnulib/import/math.h:27,
9204 from d:/usr/Python26/include/pyport.h:235,
9205 from d:/usr/Python26/include/Python.h:58,
9206 from python/python-internal.h:94,
9207 from python/py-arch.c:24:
9208 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9212 This happens because Python headers define 'hypot' to expand t
9213 '_hypot' in the Windows builds.
9214 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9215 'hypoth'. This avoids a compilation error.
9217 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9219 * MAINTAINERS (Write After Approval): Fix ordering.
9221 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9223 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9225 2018-01-26 Alan Modra <amodra@gmail.com>
9227 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9228 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9229 Remove nop. Make const. Comment.
9230 (powerpc32_plt_stub_so_2): New.
9231 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9232 Correct count. Update uses.
9233 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9234 Move common code reading PLT entry word. Correct
9235 powerpc32_plt_stub PLT address calculation.
9236 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9237 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9238 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9239 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9240 (ppc64_standard_linkage8): Likewise.
9241 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9242 Correct insns description.
9243 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9245 2018-01-24 Pedro Alves <palves@redhat.com>
9247 GCC PR libstdc++/83906
9248 * gdbtypes.c (operator==(const dynamic_prop &,
9249 const dynamic_prop &)): New.
9250 (operator==(const range_bounds &, const range_bounds &)): New.
9251 (check_types_equal): Use them instead of memcmp.
9252 * gdbtypes.h (operator==(const dynamic_prop &,
9253 const dynamic_prop &)): Declare.
9254 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9255 (operator==(const range_bounds &, const range_bounds &)): Declare.
9256 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9258 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9260 * s390-linux-tdep.c (s390_record_address_mask)
9261 (s390_record_calc_disp_common, s390_record_calc_disp)
9262 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9263 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9264 (s390_process_record): Move to s390-tdep.c.
9265 (s390_linux_init_abi_any): Adjust.
9266 * s390-tdep.c (s390_record_address_mask)
9267 (s390_record_calc_disp_common, s390_record_calc_disp)
9268 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9269 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9270 (s390_process_record): Moved from s390-linux-tdep.c
9271 (s390_gdbarch_init): Adjust.
9273 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9275 * s390-linux-nat.c (s390-tdep.h): New include.
9276 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9277 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9278 (ALLDEPFILES): Add s390-tdep.c.
9279 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9280 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9281 * s390-tdep.h: ...this. New file.
9282 * s390-linux-tdep.c (s390-tdep.h): New include.
9283 (_initialize_s390_tdep): Rename to...
9284 (_initialize_s390_linux_tdep): ...this and adjust.
9285 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9286 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9288 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9289 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9290 (s390_is_partial_instruction, s390_software_single_step)
9291 (is_non_branch_ril, s390_displaced_step_copy_insn)
9292 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9293 (s390_prologue_data, s390_addr, s390_store, s390_load)
9294 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9295 (s390_register_call_saved, s390_guess_tracepoint_registers)
9296 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9297 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9298 (s390_pseudo_register_name, s390_pseudo_register_type)
9299 (s390_pseudo_register_read, s390_pseudo_register_write)
9300 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9301 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9302 (s390_addr_bits_remove, s390_address_class_type_flags)
9303 (s390_address_class_type_flags_to_name)
9304 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9305 (s390_function_arg_float, s390_function_arg_vector)
9306 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9307 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9308 (s390_frame_align, s390_register_return_value, s390_return_value)
9309 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9310 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9311 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9312 (s390_trad_frame_prev_register, s390_unwind_cache)
9313 (s390_prologue_frame_unwind_cache)
9314 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9315 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9316 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9317 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9318 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9319 (s390_frame_base_address, s390_local_base_address)
9320 (s390_frame_base, s390_gcc_target_options)
9321 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9322 (s390_validate_reg_range, s390_tdesc_valid)
9323 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9324 * s390-tdep.c: ...this. New file.
9326 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9328 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9329 (s390_process_record, s390_gdbarch_tdep_alloc)
9330 (s390_linux_init_abi_any): Use/set new hook.
9332 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9334 * s390-linux-tdep.c (osabi.h): New include.
9335 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9336 (s390_linux_init_abi_any): New functions.
9337 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9339 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9341 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9342 tdesc_has_registers check
9344 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9346 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9347 (s390_validate_reg_range): New macro.
9348 (s390_gdbarch_init): Adjust.
9350 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9352 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9353 (s390_gdbarch_tdep_alloc): Adjust.
9354 (s390_gdbarch_init): Adjust.
9356 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9358 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9359 <have_tdb>: Change type to bool.
9360 (s390_gdbarch_tdep_alloc): Adjust.
9361 (s390_gdbarch_init): Adjust.
9363 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9365 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9366 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9367 (s390_gdbarch_tdep_alloc): New function.
9368 (s390_gdbarch_init): Allocate tdep at start and use its fields
9369 instead of separate variables.
9371 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9373 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9374 when looking for cached gdbarch and add comment for remaining.
9376 2018-01-22 Pedro Alves <palves@redhat.com>
9377 Sergio Durigan Junior <sergiodj@redhat.com>
9379 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9382 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9384 * MAINTAINERS: Update my company e-mail address.
9386 2018-01-22 Yao Qi <yao.qi@linaro.org>
9388 * regcache.c (cooked_write_test): New function.
9389 (_initialize_regcache): Register the test.
9391 2018-01-22 Yao Qi <yao.qi@linaro.org>
9393 * ia64-tdep.c (ia64_pseudo_register_read): Call
9394 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9395 * m32c-tdep.c (m32c_cat_read): Likewise.
9396 (m32c_r3r2r1r0_read): Likewise.
9397 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9398 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9400 2018-01-22 Yao Qi <yao.qi@linaro.org>
9402 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9403 method raw_read instead of regcache_raw_read.
9404 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9405 * arm-tdep.c (arm_neon_quad_read): Likewise.
9406 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9407 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9408 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9409 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9410 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9411 (i386_pseudo_register_read_into_value): Likewise.
9412 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9413 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9414 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9415 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9416 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9417 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9418 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9419 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9420 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9422 2018-01-22 Yao Qi <yao.qi@linaro.org>
9424 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9425 * configure.tgt: Remove target mt.
9426 * mt-tdep.c: Remove.
9427 * regcache.c (cooked_read_test): Remove the check for mt.
9429 2018-01-22 Yao Qi <yao.qi@linaro.org>
9431 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9432 instead of gdbarch_pseudo_register_read_value.
9434 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9436 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9439 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9441 * linespec.c (create_sals_line_offset): Remove code that preserved
9442 the symtab_and_line's line number.
9444 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9446 * varobj.c (varobj_create): Don't set valid_block when creating a
9449 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9451 * varobj.c (varobj_create): Remove out of date comment.
9453 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9456 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9457 updating innermost block.
9458 * parse.c (innermost_block_tracker::update): Take extra type
9459 parameter, and check types match before updating innermost block.
9460 (write_dollar_variable): Update innermost block for registers.
9461 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9462 (innermost_block_tracker::innermost_block_tracker): Initialise
9464 (innermost_block_tracker::reset): Take type parameter.
9465 (innermost_block_tracker::update): Take type parameter, and pass
9466 type through as needed.
9467 (innermost_block_tracker::m_types): New member.
9468 * varobj.c (varobj_create): Pass type when reseting innermost
9471 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9473 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9474 * ada-lang.c (resolve_subexp): Likewise.
9475 * breakpoint.c (set_breakpoint_condition) Likewise.
9476 (watch_command_1) Likewise.
9477 * c-exp.y (variable): Likewise.
9478 * d-exp.y (PrimaryExpression): Likewise.
9479 * f-exp.y (variable): Likewise.
9480 * go-exp.y (variable): Likewise.
9481 * m2-exp.y (variable): Likewise.
9482 * objfiles.c (objfile::~objfile): Likewise.
9483 * p-exp.y (variable): Likewise.
9484 * parse.c (innermost_block): Change type.
9485 * parser-defs.h (class innermost_block_tracker): New.
9486 (innermost_block): Change to innermost_block_tracker.
9487 * printcmd.c (display_command): Switch to innermost_block API.
9488 (do_one_display): Likewise.
9489 * rust-exp.y (do_one_display): Likewise.
9490 * symfile.c (clear_symtab_users): Likewise.
9491 * varobj.c (varobj_create): Switch to innermost_block API, replace
9492 use of innermost_block with block stored on varobj object.
9494 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9496 * expression.h (innermost_block): Remove declaration.
9497 * varobj.c: Add 'parser-defs.h' include.
9499 2018-01-19 Tom Tromey <tom@tromey.com>
9501 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9502 symbols in the static and global blocks.
9504 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9506 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9507 gdb_ptrace.h, and move including gdb_wait.h ...
9508 * nat/linux-ptrace.h: ... to here.
9510 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9512 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9513 inf_ptrace_detach_success.
9514 (inf_ptrace_detach_success): Add inferior parameter, use it
9515 instead of inferior_ptid, pass it to detach_inferior.
9516 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9518 * inferior.c (detach_inferior): Add overload that takes an
9520 * inferior.h (detach_inferior): Likewise.
9521 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9522 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9523 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9525 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9527 * target.h (struct target_ops) <to_detach>: Add inferior
9529 (target_detach): Likewise.
9530 * target.c (dispose_inferior): Pass inferior down.
9531 (target_detach): Pass inferior down. Assert that it is equal to
9532 the current inferior.
9533 * aix-thread.c (aix_thread_detach): Pass inferior down.
9534 * corefile.c (core_file_command): Pass current_inferior() down.
9535 * corelow.c (core_detach): Add inferior parameter.
9536 * darwin-nat.c (darwin_detach): Likewise.
9537 * gnu-nat.c (gnu_detach): Likewise.
9538 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9539 * infcmd.c (detach_command): Pass current_inferior() down to
9541 * infrun.c (follow_fork_inferior): Pass parent_inf to
9543 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9545 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9546 * linux-thread-db.c (thread_db_detach): Likewise.
9547 * nto-procfs.c (procfs_detach): Likewise.
9548 * procfs.c (procfs_detach): Likewise.
9549 * record.c (record_detach): Likewise.
9550 * record.h (struct inferior): Forward-declare.
9551 (record_detach): Add inferior parameter.
9552 * remote-sim.c (gdbsim_detach): Likewise.
9553 * remote.c (remote_detach_1): Likewise.
9554 (remote_detach): Likewise.
9555 (extended_remote_detach): Likewise.
9556 * sol-thread.c (sol_thread_detach): Likewise.
9557 * target-debug.h (target_debug_print_inferior_p): New macro.
9558 * target-delegates.c: Re-generate.
9559 * top.c (kill_or_detach): Pass inferior down to target_detach.
9560 * windows-nat.c (windows_detach): Add inferior parameter.
9562 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9564 * target.h (struct target_ops) <to_detach>: Remove args
9566 (target_detach): Likewise.
9567 * target.c (dispose_inferior): Adjust.
9568 (target_detach): Remove args parameter, adjust.
9569 * aix-thread.c (aix_thread_detach): Adjust.
9570 * corefile.c (core_file_command): Adjust.
9571 * corelow.c (core_detach): Adjust.
9572 * darwin-nat.c (darwin_detach): Adjust.
9573 * gnu-nat.c (gnu_detach): Adjust.
9574 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9575 * infcmd.c (detach_command): Adjust
9576 * infrun.c (follow_fork_inferior): Adjust.
9577 (handle_vfork_child_exec_or_exit): Adjust.
9578 * linux-fork.c (linux_fork_detach): Remove args parameter.
9579 * linux-fork.h (linux_fork_detach): Likewise.
9580 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9581 * linux-thread-db.c (thread_db_detach): Likewise.
9582 * nto-procfs.c (procfs_detach): Likewise.
9583 * procfs.c (procfs_detach): Likewise.
9584 (do_detach): Remove signo parameter.
9585 * record.c (record_detach): Remove args parameter.
9586 * record.h (record_detach): Likewise.
9587 * remote-sim.c (gdbsim_detach): Likewise.
9588 * remote.c (remote_detach_1): Likewise.
9589 (remote_detach): Likewise.
9590 (extended_remote_detach): Likewise.
9591 * sol-thread.c (sol_thread_detach): Likewise.
9592 * target-delegates.c: Re-generate.
9593 * top.c (struct qt_args) <args>: Remove field.
9594 (kill_or_detach): Don't pass args.
9595 (quit_force): Don't set args.
9596 * windows-nat.c (windows_detach): Remove args parameter.
9598 2018-01-19 Yao Qi <yao.qi@linaro.org>
9600 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9601 (arm_linux_init_abi): Install it.
9603 2018-01-19 Yao Qi <yao.qi@linaro.org>
9605 * osabi.c (gdb_osabi_names): Extend the regexp for
9606 arm-linux-gnueabihf.
9608 2018-01-18 Yao Qi <yao.qi@linaro.org>
9610 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9612 (abbrev_table::add_abbrev): Update.
9613 (abbrev_table::lookup_abbrev): Update.
9615 2018-01-18 Yao Qi <yao.qi@linaro.org>
9617 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9619 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9621 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9624 2018-01-17 Tom Tromey <tom@tromey.com>
9626 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9628 2018-01-17 Tom Tromey <tom@tromey.com>
9630 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9631 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9632 (create_array_type_with_stride): Update.
9633 * dwarf2read.c (set_die_type): Update.
9635 2018-01-17 Tom Tromey <tom@tromey.com>
9637 * dwarf2read.c (delayed_method_info): Remove typedef.
9638 (dwarf2_cu::method_info): Now a std::vector.
9639 (add_to_method_list): Update.
9640 (free_delayed_list): Remove.
9641 (compute_delayed_physnames): Update.
9642 (process_full_comp_unit, process_full_type_unit): Clear the method
9643 list. Remove cleanups.
9644 (psymtab_include_file_name): Add name_holder parameter. Use
9646 (dwarf_decode_lines): Update.
9648 2018-01-17 Tom Tromey <tom@tromey.com>
9649 Simon Marchi <simon.marchi@ericsson.com>
9651 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9652 (dwarf2_per_objfile::free_cached_comp_units)
9653 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9654 (init_cutu_and_read_dies_no_follow): Update.
9655 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9656 (dwarf2_cu::~dwarf2_cu): New.
9657 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9658 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9660 2018-01-17 Tom Tromey <tom@tromey.com>
9661 Simon Marchi <simon.marchi@ericsson.com>
9663 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9664 (struct die_reader_specs) <abbrev_table>: New member.
9665 (struct abbrev_table): Add constructor.
9666 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9667 <abbrev_obstack>: Now an auto_obstack.
9668 (abbrev_table_up): New typedef.
9669 (init_cu_die_reader): Add abbrev_table parameter.
9670 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9671 Add result_dwo_abbrev_table.
9672 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9673 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9675 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9677 (skip_children): Update.
9678 (abbrev_table::alloc_abbrev): Rename from
9679 abbrev_table_alloc_abbrev.
9680 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9681 (abbrev_table::lookup_abbrev): Rename from
9682 abbrev_table_lookup_abbrev.
9683 (abbrev_table_read_table): Return abbrev_table_up.
9684 (abbrev_table_free, abbrev_table_free_cleanup)
9685 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9686 (load_partial_dies): Update.
9688 2018-01-17 Tom Tromey <tom@tromey.com>
9690 * dwarf2read.c (dwarf2_compute_name): Update comment.
9691 (read_func_scope, read_variable): Update.
9692 (new_symbol): Remove.
9693 (new_symbol_full): Rename to new_symbol.
9695 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9698 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9699 a warning instead of throwing an error, set section size to 0 and return
9701 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9703 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9705 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9707 (linux_ptrace_attach_fail_reason_string): Likewise.
9708 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9710 (linux_ptrace_attach_fail_reason_string): Likewise.
9711 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9713 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9715 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9717 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9720 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9721 checking for fs_base/gs_base fields in struct user_regs_struct.
9722 * configure: Regenerate.
9724 2018-01-17 Yao Qi <yao.qi@linaro.org>
9726 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9728 (aarch64_linux_init_abi): Install it to gdbarch hook
9731 2018-01-15 Pedro Alves <palves@redhat.com>
9733 * common/signals-state-save-restore.c
9734 (save_original_signals_state): Fix typos.
9736 2017-01-12 Tom Tromey <tom@tromey.com>
9737 Sergio Durigan Junior <sergiodj@redhat.com>
9739 * Makefile.in (install-only): Install gdb-add-index.
9741 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9743 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9745 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9747 * infrun.c (keep_going_pass_signal): Clear step-over info when
9748 insert_breakpoints fails.
9750 2018-01-11 Pedro Alves <palves@redhat.com>
9753 * infrun.c (resume): Rename to ...
9754 (resume_1): ... this.
9755 (resume): Reimplement as wrapper around resume_1.
9757 2018-01-11 Pedro Alves <palves@redhat.com>
9760 * remote.c (remote_parse_stop_reply): Default to the last-set
9761 general thread instead of to 'magic_null_ptid'.
9763 2018-01-10 Pedro Alves <palves@redhat.com>
9765 * language.h (language_get_symbol_name_matcher): Rename ...
9766 (get_symbol_name_matcher): ... this.
9767 * language.c (language_get_symbol_name_matcher): Ditto.
9768 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9771 2018-01-10 Pedro Alves <palves@redhat.com>
9775 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9776 Adjust to use language_get_symbol_name_matcher instead of
9777 language_defn::la_get_symbol_name_matcher.
9778 * language.c (language_get_symbol_name_matcher): If in Ada mode
9779 and the lookup name is a verbatim match, return Ada's matcher.
9780 * language.h (language_get_symbol_name_matcher): Adjust comment.
9781 (ada_lookup_name_info::verbatim_p):: New method.
9783 2018-01-10 Pedro Alves <palves@redhat.com>
9786 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9787 minsym's language is language_auto or language_cplus, pass down
9788 language_ada instead.
9789 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9791 2018-01-10 Pedro Alves <palves@redhat.com>
9794 * minsyms.c (linkage_name_str): New function.
9795 (iterate_over_minimal_symbols): Use it.
9797 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9799 * NEWS: Document that 'info proc' now works on FreeBSD.
9801 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9803 * configure.ac: Check for kinfo_getfile in libutil.
9804 * configure: Regenerate.
9805 * config.in: Regenerate.
9806 * fbsd-nat.c: Include "fbsd-tdep.h".
9807 (fbsd_fetch_cmdline): New.
9808 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9809 rather than calling error.
9810 (fbsd_info_proc): New.
9811 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9812 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9813 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9815 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9817 * fbsd-nat.c (struct free_deleter): Remove.
9818 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9820 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9822 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9823 NULL for an empty pathname.
9825 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9827 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9828 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9829 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9830 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9831 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9832 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9833 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9834 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9835 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9836 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9837 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9838 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9839 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9840 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9841 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9843 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9845 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9846 (gnu_xfer_auxv): New function.
9847 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9850 2018-01-08 Yao Qi <yao.qi@linaro.org>
9851 Simon Marchi <simon.marchi@ericsson.com>
9853 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9855 (COMMON_OBS): Remove selftest.o.
9856 * configure.ac: Append selftest-arch.c and common/selftest.c to
9857 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9858 * configure: Re-generated.
9859 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9861 (maintenance_info_selftests): Likewise.
9863 2018-01-08 Xavier Roirand <roirand@adacore.com>
9865 * ada-valprint.c (val_print_packed_array_elements): Use
9866 proper number of elements when printing an array indexed
9867 by an enumeration type.
9869 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9871 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9872 (dw2_get_file_names_reader): Adjust.
9873 (lookup_dwo_signatured_type): Adjust.
9874 (lookup_dwp_signatured_type): Adjust.
9875 (lookup_signatured_type): Adjust.
9876 (create_type_unit_group): Adjust.
9877 (get_type_unit_group): Adjust.
9878 (process_psymtab_comp_unit_reader): Adjust.
9879 (build_type_psymtabs_reader): Adjust.
9880 (scan_partial_symbols): Adjust.
9881 (add_partial_symbol): Adjust.
9882 (add_partial_subprogram): Adjust.
9883 (peek_die_abbrev): Adjust.
9884 (fixup_go_packaging): Adjust.
9885 (process_imported_unit_die): Adjust.
9886 (dwarf2_compute_name): Adjust.
9887 (dwarf2_physname): Adjust.
9888 (read_import_statement): Adjust.
9889 (handle_DW_AT_stmt_list): Adjust.
9890 (read_file_scope): Adjust.
9891 (read_func_scope): Adjust.
9892 (read_lexical_block_scope): Adjust.
9893 (read_call_site_scope): Adjust.
9894 (read_variable): Adjust.
9895 (dwarf2_rnglists_process): Adjust.
9896 (dwarf2_ranges_process): Adjust.
9897 (dwarf2_ranges_read): Adjust.
9898 (dwarf2_get_pc_bounds): Adjust.
9899 (dwarf2_record_block_ranges): Adjust.
9900 (dwarf2_add_field): Adjust.
9901 (dwarf2_add_member_fn): Adjust.
9902 (read_structure_type): Adjust.
9903 (process_structure_scope): Adjust.
9904 (read_enumeration_type): Adjust.
9905 (read_array_type): Adjust.
9906 (mark_common_block_symbol_computed): Adjust.
9907 (read_common_block): Adjust.
9908 (read_namespace_type): Adjust.
9909 (read_namespace): Adjust.
9910 (read_module_type): Adjust.
9911 (read_tag_pointer_type): Adjust.
9912 (read_tag_ptr_to_member_type): Adjust.
9913 (read_tag_string_type): Adjust.
9914 (read_subroutine_type): Adjust.
9915 (read_typedef): Adjust.
9916 (read_base_type): Adjust.
9917 (attr_to_dynamic_prop): Adjust.
9918 (read_subrange_type): Adjust.
9919 (read_unspecified_type): Adjust.
9920 (dwarf2_read_abbrevs): Adjust.
9921 (load_partial_dies): Adjust.
9922 (read_partial_die): Adjust.
9923 (find_partial_die): Adjust.
9924 (guess_partial_die_structure_name): Adjust.
9925 (fixup_partial_die): Adjust.
9926 (read_attribute_value): Adjust.
9927 (read_addr_index): Adjust.
9928 (read_addr_index_from_leb128): Adjust.
9929 (read_str_index): Adjust.
9930 (dwarf2_string_attr): Adjust.
9931 (get_debug_line_section): Adjust.
9932 (dwarf_decode_line_header): Adjust.
9933 (lnp_state_machine::check_line_address): Adjust.
9934 (dwarf_decode_lines_1): Adjust.
9935 (dwarf_decode_lines): Adjust.
9936 (dwarf2_start_symtab): Adjust.
9937 (var_decode_location): Adjust.
9938 (new_symbol_full): Adjust.
9939 (dwarf2_const_value_data): Adjust.
9940 (dwarf2_const_value_attr): Adjust.
9941 (dwarf2_const_value): Adjust.
9943 (die_containing_type): Adjust.
9944 (build_error_marker_type): Adjust.
9945 (lookup_die_type): Adjust.
9946 (guess_full_die_structure_name): Adjust.
9947 (anonymous_struct_prefix): Adjust.
9948 (determine_prefix): Adjust.
9949 (dwarf2_name): Adjust.
9950 (follow_die_ref_or_sig): Adjust.
9951 (follow_die_offset): Adjust.
9952 (follow_die_ref): Adjust.
9953 (follow_die_sig_1): Adjust.
9954 (follow_die_sig): Adjust.
9955 (get_signatured_type): Adjust.
9956 (get_DW_AT_signature_type): Adjust.
9957 (decode_locdesc): Adjust.
9958 (dwarf_decode_macros): Adjust.
9959 (cu_debug_loc_section): Adjust.
9960 (fill_in_loclist_baton): Adjust.
9961 (dwarf2_symbol_mark_computed): Adjust.
9962 (init_one_comp_unit): Don't assign
9963 dwarf2_cu::dwarf2_per_objfile.
9964 (set_die_type): Adjust.
9966 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9968 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9969 <dwarf2_per_objfile>: New field.
9970 (dwarf2_per_objfile): Remove global.
9971 (get_dwarf2_per_objfile): New function.
9972 (set_dwarf2_per_objfile): New function.
9973 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9975 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9976 (read_abbrev_offset): Likewise.
9977 (read_indirect_string): Likewise.
9978 (read_indirect_line_string): Likewise.
9979 (read_indirect_string_at_offset): Likewise.
9980 (read_indirect_string_from_dwz): Likewise.
9981 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9983 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9984 (create_all_comp_units): Change objfile parameter to
9986 (create_all_type_units): Likewise.
9987 (process_queue): Add dwarf2_per_objfile parameter.
9988 (read_and_check_comp_unit_head): Likewise.
9989 (lookup_dwo_unit_in_dwp): Likewise.
9990 (get_dwp_file): Likewise.
9991 (process_cu_includes): Likewise.
9992 (struct free_dwo_file_cleanup_data): New struct.
9993 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9994 set_dwarf2_per_objfile.
9995 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9996 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9997 context, adjust calls.
9998 (dw2_instantiate_symtab): Likewise.
9999 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10000 (dw2_get_cu): Likewise.
10001 (create_cu_from_index_list): Change objfile parameter to
10002 dwarf2_per_objfile.
10003 (create_cus_from_index_list): Get dwarf2_per_objfile from
10004 context, adjust calls.
10005 (create_cus_from_index): Likewise.
10006 (create_signatured_type_table_from_index): Change objfile
10007 parameter to dwarf2_per_objfile.
10008 (create_signatured_type_table_from_debug_names): Change objfile
10009 parameter to dwarf2_per_objfile.
10010 (create_addrmap_from_index): Likewise.
10011 (create_addrmap_from_aranges): Likewise.
10012 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10013 (dw2_setup): Remove.
10014 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10016 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10017 get_dwarf2_per_objfile.
10018 (dw2_forget_cached_source_info): Likewise.
10019 (dw2_map_symtabs_matching_filename): Likewise.
10020 (struct dw2_symtab_iterator) <index>: Remove.
10021 <dwarf2_per_objfile>: New field.
10022 (dw2_symtab_iter_init): Replace index parameter with
10023 dwarf2_per_objfile.
10024 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10025 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10026 (dw2_print_stats): Likewise.
10027 (dw2_dump): Likewise.
10028 (dw2_expand_symtabs_for_function): Likewise.
10029 (dw2_expand_all_symtabs): Likewise.
10030 (dw2_expand_symtabs_with_fullname): Likewise.
10031 (dw2_expand_marked_cus): Replace index and objfile parameters
10032 with dwarf2_per_objfile.
10033 (dw_expand_symtabs_matching_file_matcher): Add
10034 dwarf2_per_objfile parameter and adjust calls.
10035 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10037 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10038 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10040 (create_cus_from_debug_names_list): Replace objfile parameter
10041 with dwarf2_per_objfile and adjust calls.
10042 (create_cus_from_debug_names): Likewise.
10043 (dwarf2_read_debug_names): Likewise.
10044 (mapped_debug_names::namei_to_name): Adjust call.
10045 (dw2_debug_names_iterator::next): Likewise.
10046 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10047 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10048 (dw2_debug_names_dump): Likewise.
10049 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10050 (dw2_debug_names_expand_symtabs_matching): Likewise.
10051 (dwarf2_initialize_objfile): Likewise.
10052 (dwarf2_build_psymtabs): Likewise.
10053 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10055 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10056 (read_and_check_comp_unit_head): Likewise.
10057 (read_abbrev_offset): Likewise.
10058 (create_debug_type_hash_table): Likewise.
10059 (create_debug_types_hash_table): Likewise.
10060 (create_all_type_units): Replace objfile parameter with
10061 dwarf2_per_objfile.
10062 (add_type_unit): Add dwarf2_per_objfile parameter.
10063 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10064 with dwarf2_per_objfile.
10065 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10066 (lookup_dwp_signatured_type): Likewise.
10067 (lookup_signatured_type): Likewise.
10068 (read_cutu_die_from_dwo): Likewise.
10069 (init_tu_and_read_dwo_dies): Likewise.
10070 (init_cutu_and_read_dies): Likewise.
10071 (init_cutu_and_read_dies_no_follow): Likewise.
10072 (allocate_type_unit_groups_table): Add objfile parameter.
10073 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10074 (get_type_unit_group): Likewise.
10075 (process_psymtab_comp_unit): Update call.
10076 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10077 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10078 (print_tu_stats): Likewise.
10079 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10080 in void* parameter.
10081 (build_type_psymtabs): Change objfile parameter to
10082 dwarf2_per_objfile.
10083 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10084 passed in void* parameter.
10085 (process_skeletonless_type_units): Change objfile parameter to
10086 dwarf2_per_objfile.
10087 (set_partial_user): Likewise.
10088 (dwarf2_build_psymtabs_hard): Likewise.
10089 (read_comp_units_from_section): Likewise.
10090 (create_all_comp_units): Likewise.
10091 (scan_partial_symbols): Update calls.
10092 (add_partial_symbol): Likewise.
10093 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10094 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10095 (process_queue): Add dwarf2_per_objfile parameter.
10096 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10097 (compute_compunit_symtab_includes): Likewise.
10098 (process_cu_includes): Add dwarf2_per_objfile parameter.
10099 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10100 (process_full_type_unit): Likewise.
10101 (process_imported_unit_die): Update call.
10102 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10103 (read_file_scope): Likewise.
10104 (allocate_dwo_file_hash_table): Add objfile parameter.
10105 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10106 (create_cus_hash_table): Likewise.
10107 (create_dwp_hash_table): Likewise.
10108 (create_dwo_unit_in_dwp_v1): Likewise.
10109 (create_dwp_v2_section): Likewise.
10110 (create_dwo_unit_in_dwp_v2): Likewise.
10111 (lookup_dwo_unit_in_dwp): Likewise.
10112 (try_open_dwop_file): Likewise.
10113 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10114 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10115 cleanup to include a reference to dwarf2_per_objfile.
10116 (open_dwp_file): Add dwarf2_per_objfile parameter.
10117 (open_and_init_dwp_file): Likewise.
10118 (get_dwp_file): Likewise.
10119 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10120 (queue_and_load_all_dwo_tus): Update call.
10121 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10123 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10124 (dwarf2_ranges_process): Likewise.
10125 (dwarf2_get_pc_bounds): Likewise.
10126 (mark_common_block_symbol_computed): Likewise.
10127 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10128 (dwarf2_read_abbrevs): Update call.
10129 (read_partial_die): Use dwarf2_per_objfile from cu.
10130 (find_partial_die): Likewise.
10131 (fixup_partial_die): Likewise.
10132 (read_attribute_value): Likewise.
10133 (read_indirect_string_at_offset_from): Add objfile parameter.
10134 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10136 (read_indirect_string_from_dwz): Add objfile parameter.
10137 (read_indirect_string): Add objfile parameter.
10138 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10139 (read_addr_index): Use dwarf2_per_objfile from cu.
10140 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10142 (read_str_index): Use dwarf2_per_objfile from cu.
10143 (get_debug_line_section): Likewise.
10144 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10145 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10146 (new_symbol_full): Use dwarf2_per_objfile from cu.
10147 (build_error_marker_type): Likewise.
10148 (lookup_die_type): Likewise.
10149 (determine_prefix): Likewise.
10150 (follow_die_offset): Likewise.
10151 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10152 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10153 (dwarf2_fetch_die_type_sect_off): Likewise.
10154 (dwarf2_get_die_type): Likewise.
10155 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10156 (get_signatured_type): Likewise.
10157 (get_DW_AT_signature_type): Likewise.
10158 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10159 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10160 (cu_debug_loc_section): Likewise.
10161 (fill_in_loclist_baton): Likewise.
10162 (dwarf2_symbol_mark_computed): Likewise.
10163 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10164 dwarf2_per_objfile.
10165 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10167 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10168 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10169 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10170 (set_die_type): Use dwarf2_free_objfile from cu.
10171 (get_die_type_at_offset): Likewise.
10172 (dwarf2_per_objfile_free): Don't assign global variable.
10173 (debug_names) <constructor>: Add dwarf2_per_objfile
10174 parameter, update m_debugstrlookup construction.
10175 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10177 <m_dwarf2_per_objfile>: New field.
10178 <lookup>: Use m_dwarf2_per_objfile.
10179 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10180 (psyms_seen_size): Likewise.
10181 (write_gdbindex): Replace objfile parameter with
10182 dwarf2_per_objfile.
10183 (write_debug_names): Likewise.
10184 (write_psymtabs_to_index): Likewise.
10185 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10188 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10190 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10191 <dwarf2_per_objfile>: New field.
10192 (struct dwarf2_per_cu_data) <objfile>: Remove.
10193 <dwarf2_per_objfile>: New field.
10194 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10196 (create_signatured_type_table_from_index): Likewise.
10197 (create_debug_type_hash_table): Likewise.
10198 (fill_in_sig_entry_from_dwo_entry): Likewise.
10199 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10200 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10202 (create_partial_symtab): Access objfile through
10203 dwarf2_per_objfile.
10204 (process_psymtab_comp_unit_reader): Likewise.
10205 (read_comp_units_from_section): Likewise.
10206 (scan_partial_symbols): Likewise.
10207 (add_partial_symbol): Likewise.
10208 (add_partial_subprogram): Likewise.
10209 (peek_die_abbrev): Likewise.
10210 (fixup_go_packaging): Likewise.
10211 (process_full_comp_unit): Likewise.
10212 (process_full_type_unit): Likewise.
10213 (process_imported_unit_die): Likewise.
10214 (dwarf2_compute_name): Likewise.
10215 (dwarf2_physname): Likewise.
10216 (read_import_statement): Likewise.
10217 (create_cus_hash_table): Assign dwarf2_physname instead of
10219 (read_func_scope): Access objfile through dwarf2_per_objfile.
10220 (read_lexical_block_scope): Likewise.
10221 (read_call_site_scope): Likewise.
10222 (read_variable): Likewise.
10223 (dwarf2_rnglists_process): Likewise.
10224 (dwarf2_ranges_process): Likewise.
10225 (dwarf2_ranges_read): Likewise.
10226 (dwarf2_record_block_ranges): Likewise.
10227 (dwarf2_add_field): Likewise.
10228 (dwarf2_add_member_fn): Likewise.
10229 (read_structure_type): Likewise.
10230 (process_structure_scope): Likewise.
10231 (read_enumeration_type): Likewise.
10232 (read_array_type): Likewise.
10233 (read_common_block): Likewise.
10234 (read_namespace_type): Likewise.
10235 (read_namespace): Likewise.
10236 (read_module_type): Likewise.
10237 (read_tag_pointer_type): Likewise.
10238 (read_tag_ptr_to_member_type): Likewise.
10239 (read_tag_string_type): Likewise.
10240 (read_subroutine_type): Likewise.
10241 (read_typedef): Likewise.
10242 (read_base_type): Likewise.
10243 (attr_to_dynamic_prop): Likewise.
10244 (read_subrange_type): Likewise.
10245 (read_unspecified_type): Likewise.
10246 (load_partial_dies): Likewise.
10247 (read_partial_die): Likewise.
10248 (find_partial_die): Likewise.
10249 (guess_partial_die_structure_name): Likewise.
10250 (fixup_partial_die): Likewise.
10251 (read_attribute_value): Likewise.
10252 (read_addr_index_from_leb128): Likewise.
10253 (dwarf2_read_addr_index): Likewise.
10254 (dwarf2_string_attr): Likewise.
10255 (lnp_state_machine::check_line_address): Likewise.
10256 (dwarf_decode_lines_1): Likewise.
10257 (dwarf_decode_lines): Likewise.
10258 (dwarf2_start_symtab): Likewise.
10259 (var_decode_location): Likewise.
10260 (new_symbol_full): Likewise.
10261 (dwarf2_const_value_data): Likewise.
10262 (dwarf2_const_value_attr): Likewise.
10263 (dwarf2_const_value): Likewise.
10264 (die_type): Likewise.
10265 (die_containing_type): Likewise.
10266 (lookup_die_type): Likewise.
10267 (guess_full_die_structure_name): Likewise.
10268 (anonymous_struct_prefix): Likewise.
10269 (dwarf2_name): Likewise.
10270 (follow_die_ref_or_sig): Likewise.
10271 (follow_die_offset): Likewise.
10272 (follow_die_ref): Likewise.
10273 (dwarf2_fetch_die_loc_sect_off): Likewise.
10274 (dwarf2_fetch_constant_bytes): Likewise.
10275 (dwarf2_fetch_die_type_sect_off): Likewise.
10276 (dwarf2_get_die_type): Likewise.
10277 (follow_die_sig): Likewise.
10278 (decode_locdesc): Likewise.
10279 (dwarf2_per_cu_objfile): Likewise.
10280 (dwarf2_per_cu_text_offset): Likewise.
10281 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10283 (set_die_type): Access objfile through
10284 dwarf2_per_objfile.
10286 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10288 * valprint.c (converted_character_d): Remove typedef.
10289 (DEF_VEC_O (converted_character_d)): Remove.
10290 (count_next_character): Use std::vector.
10291 (print_converted_chars_to_obstack): Likewise.
10292 (generic_printstr): Likewise.
10294 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10296 * xml-support.h (struct gdb_xml_value): Add constructor.
10297 <value>: Change type to unique_xmalloc_ptr.
10298 (gdb_xml_value_s): Remove typedef.
10299 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10300 (gdb_xml_element_start_handler): Change parameter type to
10302 (xml_find_attribute): Likewise.
10303 * xml-support.c (xml_find_attribute): Change parameter type to
10304 std::vector and adjust.
10305 (gdb_xml_values_cleanup): Remove.
10306 (gdb_xml_parser::start_element): Adjust to std::vector.
10307 (xinclude_start_include): Change paraeter type to std::vector
10309 * btrace.c (check_xml_btrace_version): Likewise.
10310 (parse_xml_btrace_block): Likewise.
10311 (parse_xml_btrace_pt_config_cpu): Likewise.
10312 (parse_xml_btrace_pt): Likewise.
10313 (parse_xml_btrace_conf_bts): Likewise.
10314 (parse_xml_btrace_conf_pt): Likewise.
10315 * memory-map.c (memory_map_start_memory): Likewise.
10316 (memory_map_start_property): Likewise.
10317 * osdata.c (osdata_start_osdata): Likewise.
10318 (osdata_start_item): Likewise.
10319 (osdata_start_column): Likewise.
10320 * remote.c (start_thread): Likewise.
10321 * solib-aix.c (library_list_start_library): Likewise.
10322 (library_list_start_list): Likewise.
10323 * solib-svr4.c (library_list_start_library): Likewise.
10324 (svr4_library_list_start_list): Likewise.
10325 * solib-target.c (library_list_start_segment): Likewise.
10326 (library_list_start_section): Likewise.
10327 (library_list_start_library): Likewise.
10328 (library_list_start_list): Likewise.
10329 * tracepoint.c (traceframe_info_start_memory): Likewise.
10330 (traceframe_info_start_tvar): Likewise.
10331 * xml-syscall.c (syscall_start_syscall): Likewise.
10332 * xml-tdesc.c (tdesc_start_target): Likewise.
10333 (tdesc_start_feature): Likewise.
10334 (tdesc_start_reg): Likewise.
10335 (tdesc_start_union): Likewise.
10336 (tdesc_start_struct): Likewise.
10337 (tdesc_start_flags): Likewise.
10338 (tdesc_start_enum): Likewise.
10339 (tdesc_start_field): Likewise.
10340 (tdesc_start_enum_value): Likewise.
10341 (tdesc_start_vector): Likewise.
10343 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10345 * extension.h (struct xmethod_worker) <clone>: Remove.
10346 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10348 (python_xmethod_worker::clone): Remove.
10349 * valops.c (find_overload_match): Use std::move instead of
10352 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10354 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10355 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10356 <free_xmethod_worker_data>: Remove.
10357 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10358 <get_xmethod_arg_types>: Remove.
10359 <get_xmethod_result_type>: Remove.
10360 <invoke_xmethod>: Remove.
10361 * extension.c (new_xmethod_worker): Remove.
10362 (clone_xmethod_worker): Remove.
10363 (get_matching_xmethod_workers): Return void, pass std::vector by
10365 (get_xmethod_arg_types): Rename to...
10366 (xmethod_worker::get_arg_types): ... this, and adjust.
10367 (get_xmethod_result_type): Rename to...
10368 (xmethod_worker::get_result_type): ... this, and adjust.
10369 (invoke_xmethod): Remove.
10370 (free_xmethod_worker): Remove.
10371 (free_xmethod_worker_vec): Remove.
10372 * extension.h (enum ext_lang_rc): Move here from
10374 (struct xmethod_worker): Add constructor and destructor.
10377 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10378 virtual pure methods.
10379 <get_arg_types, get_result_type>: New methods.
10380 (xmethod_worker_ptr): Remove typedef.
10381 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10382 (xmethod_worker_vec): Remove typedef.
10383 (xmethod_worker_up): New typedef.
10384 (invoke_xmethod): Remove.
10385 (clone_xmethod_worker): Remove.
10386 (free_xmethod_worker): Remove.
10387 (free_xmethod_worker_vec): Remove.
10388 (get_xmethod_arg_types): Remove.
10389 (get_xmethod_result_type): Remove.
10390 * valops.c (find_method_list): Use std::vector, don't use
10391 intermediate vector.
10392 (value_find_oload_method_list): Use std::vector.
10393 (find_overload_match): Use std::vector.
10394 (find_oload_champ): Use std::vector.
10395 * value.c (value_free): Use operator delete.
10396 (value_of_xmethod): Rename to...
10397 (value_from_xmethod): ... this. Don't assign
10398 xmethod_worker::value, take rvalue-reference.
10399 (result_type_of_xmethod): Adjust.
10400 (call_xmethod): Adjust.
10401 * value.h: Include extension.h.
10402 (struct xmethod_worker): Don't forward-declare.
10403 (value_of_xmethod): Rename to...
10404 (value_from_xmethod): ... this, take rvalue-reference.
10405 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10406 (struct python_xmethod_worker): ... this, add constructor and
10408 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10409 (gdbpy_free_xmethod_worker_data): Rename to...
10410 (python_xmethod_worker::~python_xmethod_worker): ... this and
10412 (gdbpy_clone_xmethod_worker_data): Rename to...
10413 (python_xmethod_worker::clone): ... this and adjust.
10414 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10416 (gdbpy_get_xmethod_arg_types): Rename to...
10417 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10418 (gdbpy_get_xmethod_result_type): Rename to...
10419 (python_xmethod_worker::do_get_result_type): ... this and
10421 (gdbpy_invoke_xmethod): Rename to...
10422 (python_xmethod_worker::invoke): ... this and adjust.
10423 (new_python_xmethod_worker): Rename to...
10424 (python_xmethod_worker::python_xmethod_worker): ... this and
10426 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10428 (gdbpy_free_xmethod_worker_data): Remove.
10429 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10430 (gdbpy_get_xmethod_arg_types): Remove.
10431 (gdbpy_get_xmethod_result_type): Remove.
10432 (gdbpy_invoke_xmethod): Remove.
10433 * python/python.c (python_extension_ops): Remove obsolete
10436 2018-01-05 Pedro Alves <palves@redhat.com>
10439 * common/signals-state-save-restore.c
10440 (save_original_signals_state): New parameter 'quiet'. Warn if we
10441 find a custom handler preinstalled, instead of internal erroring.
10442 But only warn if !quiet.
10443 * common/signals-state-save-restore.h
10444 (save_original_signals_state): New parameter 'quiet'.
10445 * main.c (captured_main_1): Move save_original_signals_state call
10446 after option handling, and pass QUIET.
10448 2018-01-05 Pedro Alves <palves@redhat.com>
10450 * spu-tdep.c (spu_catch_start): Pass
10451 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10453 2018-01-05 Pedro Alves <palves@redhat.com>
10456 * ada-lang.c (literal_symbol_name_matcher): New function.
10457 (ada_get_symbol_name_matcher): Use it for
10458 symbol_name_match_type::SEARCH_NAME.
10459 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10460 it down instead of assuming symbol_name_match_type::FULL.
10461 * block.h (block_lookup_symbol): New parameter 'match_type'.
10462 * c-valprint.c (print_unpacked_pointer): Use
10463 lookup_symbol_search_name instead of lookup_symbol.
10464 * compile/compile-object-load.c (get_out_value_type): Pass down
10465 symbol_name_match_type::SEARCH_NAME.
10466 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10467 symbol_name_match_type::FULL.
10468 * cp-support.c (cp_get_symbol_name_matcher): Handle
10469 symbol_name_match_type::SEARCH_NAME.
10470 * infrun.c (insert_exception_resume_breakpoint): Use
10471 lookup_symbol_search_name.
10472 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10473 * psymtab.c (maintenance_check_psymtabs): Use
10474 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10475 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10476 SYMBOL_SEARCH_NAME.
10477 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10478 if symbol_name_match_type::SEARCH_NAME.
10479 (lookup_symbol_in_language): Pass down
10480 symbol_name_match_type::FULL.
10481 (lookup_symbol_search_name): New.
10482 (lookup_language_this): Pass down
10483 symbol_name_match_type::SEARCH_NAME.
10484 (lookup_symbol_aux, lookup_local_symbol): New parameter
10485 'match_type'. Pass it down.
10486 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10487 (lookup_symbol_search_name): New declaration.
10488 (lookup_symbol_in_block): New 'match_type' parameter.
10490 2018-01-05 Pedro Alves <palves@redhat.com>
10493 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10495 (ada_lookup_symbol): Reimplement in terms of
10496 ada_lookup_symbol_list, bits factored out from
10497 ada_lookup_encoded_symbol.
10499 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10501 * ada-exp.y (write_object_renaming): When subscripting an array
10502 using a symbol as the index, pass the block in call to
10503 ada_lookup_encoded_symbol when looking that symbol up.
10505 2018-01-05 Jerome Guitton <guitton@adacore.com>
10507 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10510 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10512 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10513 the case where VALUE_LVAL (val0) is not lval_memory.
10515 2018-01-05 Xavier Roirand <roirand@adacore.com>
10517 * ada-valprint.c (print_optional_low_bound): Handle
10518 character-indexed array printing like boolean-indexed array
10521 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10523 * NEWS: Create a new section for the next release branch.
10524 Rename the section of the current branch, now that it has
10527 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10529 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10530 * version.in: Bump version to 8.1.50.DATE-git.
10532 2018-01-03 Xavier Roirand <roirand@adacore.com>
10534 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10536 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10538 (default_exception_support_info) <catch_handlers_sym>: Add field.
10539 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10540 (ada_exception_name_addr_1): Add "catch handlers" handling.
10541 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10542 Update all callers.
10543 (create_excep_cond_exprs) <ex>: Add parameter.
10544 (re_set_exception): Update create_excep_cond_exprs call.
10545 (print_it_exception, print_one_exception, print_mention_exception)
10546 (print_recreate_exception): Add "catch handler" handling.
10547 (allocate_location_catch_handlers, re_set_catch_handlers)
10548 (check_status_catch_handlers, print_it_catch_handlers)
10549 (print_one_catch_handlers, print_mention_catch_handlers)
10550 (print_recreate_catch_handlers): New function.
10551 (catch_handlers_breakpoint_ops): New variable.
10552 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10553 Add parameter. Add "catch handler" handling.
10554 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10555 Add "catch handler" handling.
10556 (ada_exception_catchpoint_cond_string): Add "catch handler"
10558 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10560 (catch_ada_handlers_command): New function.
10561 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10562 operations structure.
10563 (_initialize_ada_language): Add "catch handlers" command entry.
10564 * NEWS: Document "catch handlers" feature.
10566 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10568 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10569 account when creating the array type of the slice.
10570 (ada_value_slice): Likewise.
10572 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10574 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10576 (create_array_type_with_stride): Add byte_stride_prop parameter.
10577 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10578 New parameter. Update all callers in this file.
10579 (array_type_has_dynamic_stride): New function.
10580 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10581 of arrays with dynamic byte strides.
10582 * dwarf2read.c (read_array_type): Add support for dynamic
10583 DW_AT_byte_stride attributes.
10585 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10587 * dwarf2read.c (read_unspecified_type): Treat
10588 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10590 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10592 Update copyright year range in all GDB files.
10594 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10596 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10597 and gdb/testsuite/gdb.base/step-line.c.
10599 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10601 * copyright.py (main): Dump the contents of
10602 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10603 even if BY_HAND is empty.
10605 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10607 * top.c (print_gdb_version): Update Copyright year in version
10610 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10612 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10614 For older changes see ChangeLog-2017.
10620 version-control: never