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