1 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6 2018-07-20 Maciej W. Rozycki <macro@mips.com>
8 * mips-linux-nat.c (mips_linux_nat_target::read_description):
9 Call `get_ptrace_pid' rather than extracting the ptrace PID by
12 2018-07-20 Keith Seitz <keiths@redhat.com>
14 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
15 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
16 m_compunit_symtab, m_language>: Add "m_" prefix.
18 * buildsym.c: Update all uses.
20 2018-07-20 Tom Tromey <tom@tromey.com>
22 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
23 * buildsym.h (record_line_ftype): Remove typedef.
25 2018-07-20 Tom Tromey <tom@tromey.com>
27 * buildsym-legacy.h (augment_type_symtab): Don't declare.
28 (end_expandable_symtab): Likewise.
29 (end_symtab_get_static_block): Likewise.
30 (end_symtab_from_static_block): Likewise.
31 * buildsym-legacy.c (augment_type_symtab): Remove.
32 (end_expandable_symtab): Remove.
33 (end_symtab_get_static_block): Remove.
34 (end_symtab_from_static_block): Remove.
36 2018-07-20 Tom Tromey <tom@tromey.com>
38 * dwarf2read.c: Include buildsym.h.
39 (struct dwarf2_cu) <builder>: New method.
40 (fixup_go_packaging): Update.
41 (process_full_comp_unit, process_full_type_unit): Update. Don't
42 use scoped_free_pendings.
43 (using_directives): Add "cu" parameter, remove "language".
44 (read_import_statement, setup_type_unit_groups, )
45 (read_func_scope, read_lexical_block_scope)
46 (dwarf2_record_block_ranges, read_namespace): Update.
47 (lnp_state_machine::lnp_state_machine): Add cu parameter.
48 (lnp_state_machine::handle_end_sequence): Update.
49 (class lnp_state_machine) <m_cu>: New member.
50 <m_record_line_callback>: Remove.
51 <m_currently_recording_lines>: New member.
52 (lnp_state_machine::handle_set_file): Update.
53 (noop_record_line): Remove.
54 (dwarf_record_line_p): Add cu parameter.
55 (dwarf_record_line_1, dwarf_finish_line): Likewise.
56 (lnp_state_machine::record_line)
57 (lnp_state_machine::lnp_state_machine)
58 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
59 (dwarf_decode_lines): Update.
60 (dwarf2_start_subfile): Add cu parameter.
61 (dwarf2_start_symtab, new_symbol): Update.
62 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
63 Remove dwarf2_per_objfile parameter.
64 (dwarf_decode_macros): Update.
66 2018-07-20 Tom Tromey <tom@tromey.com>
68 * stabsread.c (define_symbol): Update.
69 * buildsym-legacy.h (get_buildsym_compunit): Declare.
70 * dwarf2read.c (new_symbol): Update.
71 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
72 * cp-namespace.c: Include buildsym.h.
73 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
74 * buildsym-legacy.c (get_buildsym_compunit): New function.
76 2018-07-20 Tom Tromey <tom@tromey.com>
78 * xcoffread.c: Include buildsym-legacy.h.
79 * windows-nat.c: Include buildsym-legacy.h.
80 * stabsread.c: Include buildsym-legacy.h.
81 * mdebugread.c: Include buildsym-legacy.h.
82 * buildsym-legacy.h: New file.
83 * buildsym-legacy.c: New file, from buildsym.c.
84 * go32-nat.c: Include buildsym-legacy.h.
85 * dwarf2read.c: Include buildsym-legacy.h.
86 * dbxread.c: Include buildsym-legacy.h.
87 * cp-namespace.c: Include buildsym-legacy.h.
88 * coffread.c: Include buildsym-legacy.h.
89 * buildsym.h: Move some contents to buildsym-legacy.h.
90 * buildsym.c: Include buildsym-legacy.h. Move many functions to
92 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
94 2018-07-20 Tom Tromey <tom@tromey.com>
96 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
97 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
98 (buildsym_compunit::buildsym_compunit)
99 (buildsym_compunit::~buildsym_compunit)
100 (buildsym_compunit::get_macro_table): Define.
102 2018-07-20 Tom Tromey <tom@tromey.com>
104 * buildsym.c (reset_symtab_globals): Remove.
105 (buildsym_compunit::end_symtab_from_static_block): Update.
106 (buildsym_compunit::augment_type_symtab): Update.
107 (end_symtab_from_static_block): Call free_buildsym_compunit.
108 (augment_type_symtab, end_symtab, end_expandable_symtab):
111 2018-07-20 Tom Tromey <tom@tromey.com>
113 * arch-utils.c: Do not include buildsym.h.
114 * mipsread.c: Do not include buildsym.h.
115 * machoread.c: Do not include buildsym.h.
116 * elfread.c: Do not include buildsym.h.
118 2018-07-20 Tom Tromey <tom@tromey.com>
120 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
122 (buildsym_compunit): Add new constructor.
123 (struct buildsym_compunit) <get_last_source_file, finish_block,
124 record_block_range, start_subfile, patch_subfile_names,
125 push_subfile, pop_subfile, record_line, get_compunit_symtab,
126 set_last_source_start_addr, get_last_source_start_addr,
127 get_local_using_directives, set_local_using_directives,
128 get_global_using_directives, outermost_context_p,
129 get_current_context_stack, get_context_stack_depth,
130 get_current_subfile, get_local_symbols, get_file_symbols,
131 get_global_symbols, record_debugformat, record_producer,
132 push_context, pop_context, end_symtab_get_static_block,
133 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
135 <record_pending_block, finish_block_internal, make_blockvector,
136 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
140 2018-05-22 Tom Tromey <tom@tromey.com>
142 * buildsym.c (record_pending_block): Move earlier. Remove objfile
144 (finish_block_internal): Update.
146 2018-07-20 Tom Tromey <tom@tromey.com>
148 * buildsym.c (record_pending_block): Move earlier. Remove objfile
150 (finish_block_internal): Update.
152 2018-07-20 Tom Tromey <tom@tromey.com>
154 * buildsym.h (EXTERN): Don't define or undef.
155 * buildsym.c (EXTERN): Don't define.
157 2018-07-20 Tom Tromey <tom@tromey.com>
159 * buildsym.c: Remove TODO comment.
161 2018-07-20 Tom Tromey <tom@tromey.com>
163 * coffread.c (coff_symtab_read): Update.
164 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
165 (xcoff_new_init): Update.
166 * mipsread.c (mipscoff_new_init): Update.
167 * mdebugread.c (mdebug_build_psymtabs): Update.
168 * elfread.c (elf_new_init): Update.
169 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
171 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
172 (coffstab_build_psymtabs, elfstab_build_psymtabs)
173 (stabsect_build_psymtabs): Update.
174 * buildsym.h (buildsym_init): Don't declare.
175 * buildsym.c: Update comment.
176 (prepare_for_building): Remove.
177 (start_symtab, restart_symtab): Update.
178 (reset_symtab_globals): Update comment.
179 (buildsym_init): Remove.
181 2018-07-20 Tom Tromey <tom@tromey.com>
183 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
184 * stabsread.c (patch_block_stabs, define_symbol, read_type)
185 (read_enum_type, common_block_start, common_block_end)
186 (cleanup_undefined_types_1, finish_global_stabs): Update.
187 * mdebugread.c (psymtab_to_symtab_1): Update.
188 * dwarf2read.c (fixup_go_packaging, read_func_scope)
189 (read_lexical_block_scope, new_symbol): Update.
190 * dbxread.c (process_one_symbol): Update.
191 * coffread.c (coff_symtab_read, process_coff_symbol)
192 (coff_read_enum_type): Update.
193 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
195 (get_local_symbols, get_file_symbols, get_global_symbols): New
197 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
199 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
200 (~scoped_free_pendings): Update.
201 (finish_block, prepare_for_building, reset_symtab_globals)
202 (end_symtab_get_static_block, end_symtab_with_blockvector)
203 (augment_type_symtab, push_context): Update.
204 (get_local_symbols, get_file_symbols, get_global_symbols): New
206 (buildsym_init): Update.
208 2018-07-20 Tom Tromey <tom@tromey.com>
210 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
211 (process_full_type_unit): Likewise.
212 (dwarf2_start_symtab): Set list_in_scope.
214 2018-07-20 Tom Tromey <tom@tromey.com>
216 * dwarf2read.c (process_psymtab_comp_unit_reader)
217 (build_type_psymtabs_reader): Do not set list_in_scope.
219 2018-07-20 Tom Tromey <tom@tromey.com>
221 * buildsym.c (free_pendings): Remove.
222 (add_symbol_to_list, scoped_free_pendings)
223 (finish_block_internal, buildsym_init): Update.
225 2018-07-20 Tom Tromey <tom@tromey.com>
227 * xcoffread.c (read_xcoff_symtab): Update.
228 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
230 * dbxread.c (process_one_symbol): Update.
231 * coffread.c (coff_symtab_read): Update.
232 * buildsym.h (finish_block): Update.
233 * buildsym.c (finish_block): Remove "listhead" argument.
234 (end_symtab_get_static_block): Update.
236 2018-07-20 Tom Tromey <tom@tromey.com>
238 * buildsym.h (class scoped_free_pendings): Remove constructor.
239 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
241 <m_pending_block_obstack, m_pending_blocks>: New members.
242 (pending_block_obstack, pending_blocks): Remove.
243 (scoped_free_pendings::scoped_free_pendings): Default.
244 (~scoped_free_pendings): Update.
245 (free_pending_blocks): Remove.
246 (finish_block_internal, record_pending_block, make_blockvector)
247 (end_symtab_get_static_block, augment_type_symtab, push_context)
248 (buildsym_init): Update.
250 2018-07-20 Tom Tromey <tom@tromey.com>
252 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
253 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
255 (pending_addrmap, pending_addrmap_obstack)
256 (pending_addrmap_interesting): Remove.
257 (scoped_free_pendings, record_block_range, make_blockvector)
258 (prepare_for_building, reset_symtab_globals, buildsym_init):
261 2018-07-20 Tom Tromey <tom@tromey.com>
263 * xcoffread.c (process_linenos): Update.
264 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
265 * mdebugread.c (psymtab_to_symtab_1): Update.
266 * dwarf2read.c (setup_type_unit_groups)
267 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
268 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
269 * dbxread.c (process_one_symbol): Update.
270 * coffread.c (coff_symtab_read, enter_linenos)
271 (process_coff_symbol): Update.
272 * buildsym.h (current_subfile): Don't declare.
273 (get_current_subfile): Declare.
274 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
276 (start_subfile, free_buildsym_compunit, push_subfile)
277 (prepare_for_building, start_symtab): Update.
278 (get_current_subfile): New function.
280 2018-07-20 Tom Tromey <tom@tromey.com>
282 * coffread.c (coff_symtab_read): Update.
283 * xcoffread.c (read_xcoff_symtab): Update.
284 * dwarf2read.c (new_symbol): Update.
285 (read_func_scope, read_lexical_block_scope): Update.
286 * dbxread.c (process_one_symbol): Update.
287 * buildsym.h (context_stack, context_stack_depth): Don't declare.
288 (outermost_context_p): Remove macro.
289 (outermost_context_p, get_current_context_stack)
290 (get_context_stack_depth): Declare.
291 (pop_context): Return struct context_stack.
292 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
294 (context_stack_size): Remove.
295 (INITIAL_CONTEXT_STACK_SIZE): Remove.
296 (prepare_for_building, end_symtab_get_static_block)
297 (augment_type_symtab, push_context): Update.
298 (pop_context): Return struct context_stack.
299 (outermost_context_p, get_current_context_stack)
300 (get_context_stack_depth): New functions.
301 (buildsym_init): Update.
303 2018-07-20 Tom Tromey <tom@tromey.com>
305 * rust-exp.y: Now a pure parser. Update all rules.
306 (%union): Move earlier.
307 (current_parser, work_obstack): Remove globals.
308 (rust_parser, ~rust_parser): Update.
309 (class rust_parser) <copy_name, concat3, crate_name, super_name,
310 lex_character, lex_number, lex_string, lex_identifier,
311 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
312 convert_name, convert_params_to_expression,
313 convert_ast_to_expression, ast_basic_type, ast_operation,
314 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
315 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
316 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
317 ast_array_type, ast_slice_type, ast_reference_type,
318 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
319 (rust_parse): Update.
320 (rustyyerror, rustyylex): Add parser parameter.
321 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
322 (rust_lex_stringish_test, rust_lex_test_sequence)
323 (rust_lex_test_trailing_dot, rust_lex_test_completion)
324 (rust_lex_test_push_back, rust_lex_tests): Update.
326 2018-07-19 Pedro Alves <palves@redhat.com>
328 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
329 gdb::unique_xmalloc_ptr.
330 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
331 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
332 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
334 * guile/scm-pretty-print.c (ppscm_print_children): Use
335 gdb::unique_xmalloc_ptr instead of cleanups.
336 (gdbscm_apply_val_pretty_printer): Remove cleanups.
337 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
338 gdb::unique_xmalloc_ptr.
339 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
340 Adjust to use gdb::unique_xmalloc_ptr.
341 * guile/scm-utils.c (extract_arg): Adjust.
342 * guile/scm-value.c (gdbscm_value_field): Adjust to use
343 gdb::unique_xmalloc_ptr instead of a cleanup.
345 2018-07-19 Tom Tromey <tom@tromey.com>
347 * utils.c (do_value_free_to_mark)
348 (make_cleanup_value_free_to_mark): Remove.
349 * utils.h (make_cleanup_value_free_to_mark): Remove.
351 2018-07-19 Pedro Alves <palves@redhat.com>
353 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
354 forwarding reference.
356 2018-07-18 Pedro Alves <palves@redhat.com>
358 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
359 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
362 2018-07-18 Pedro Alves <palves@redhat.com>
364 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
366 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
368 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
369 directly instead of a cleanup.
370 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
371 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
372 (vlscm_binop_gdbthrow): New, factored out from ...
373 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
374 (vlscm_rich_compare): Use gdbscm_wrap.
375 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
376 instead of a cleanup.
377 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
379 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
380 Use xfree directly instead of a cleanup.
381 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
382 Adjust to use gdbscm_wrap and scoped_value_mark.
383 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
384 (gdbscm_value_address, gdbscm_value_dereference)
385 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
387 (gdbscm_value_dynamic_type): Use scoped_value_mark.
388 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
390 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
391 gdbscm_wrap and scoped_value_mark.
392 (gdbscm_value_to_string): Use xfree directly instead of a
393 cleanup. Move 'buffer' unique_ptr to TRY scope.
394 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
395 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
397 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
398 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
400 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
403 2018-07-18 Tom de Vries <tdevries@suse.de>
405 * findvar.c (default_read_var_value): Also resolve dynamic type for
406 LOC_OPTIMIZED_OUT vars.
408 2018-07-18 Maciej W. Rozycki <macro@mips.com>
410 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
413 2018-07-17 Tom Tromey <tom@tromey.com>
415 * guile/scm-param.c (pascm_set_func, pascm_show_func)
416 (compute_enum_list, pascm_set_param_value_x)
417 (gdbscm_parameter_value): Update.
418 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
419 (gdbscm_scm_to_host_string): Update.
420 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
422 * guile/scm-cmd.c (cmdscm_add_completion): Update.
423 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
424 * guile/scm-string.c (gdbscm_scm_to_string): Return
426 (gdbscm_scm_to_host_string): Likewise.
428 2018-07-17 Tom Tromey <tom@tromey.com>
430 * guile/guile.c (gdbscm_eval_from_control_command): Update.
431 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
432 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
433 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
436 2018-07-17 Tom Tromey <tom@tromey.com>
438 * guile/scm-param.c (pascm_signal_setshow_error): Update.
439 * guile/guile-internal.h (gdbscm_exception_message_to_string):
441 * guile/scm-cmd.c (cmdscm_function): Update.
442 * guile/scm-pretty-print.c
443 (ppscm_print_exception_unless_memory_error): Update.
444 * guile/scm-exception.c (gdbscm_exception_message_to_string):
445 Return unique_xmalloc_ptr.
447 2018-07-17 Tom Tromey <tom@tromey.com>
449 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
452 2018-07-17 Jim Wilson <jimw@sifive.com>
454 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
455 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
456 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
457 unecessary braces after EF_RISCV_RVC test. Delete call to
458 set_gdbarch_decr_pc_after_break.
460 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
461 RISCV_LAST_FP_REGNUM + 1.
462 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
464 2018-07-17 Tom Tromey <tom@tromey.com>
466 * configure.ac: Remove --disable-gdbcli.
467 * configure: Rebuild.
468 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
469 (SUBDIR_CLI_CFLAGS): Remove.
470 (SFILES): Use SUBDIR_CLI_SRCS.
471 (COMMON_OBS): Use SUBDIR_CLI_OBS.
473 2018-07-17 Tom Tromey <tom@tromey.com>
476 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
478 2018-07-16 Jim Wilson <jimw@sifive.com>
480 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
482 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
484 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
486 (libunwind_frame_sniffer): Likewise.
487 (libunwind_frame_prev_register): Likewise.
488 (libunwind_sigtramp_frame_sniffer): Likewise.
489 * ia64-tdep.c (ia64_access_reg): Likewise.
490 (ia64_access_rse_reg): Likewise.
491 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
492 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
494 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
496 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
498 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
500 * remote-sim.c (gdbsim_target::close,
501 gdbsim_target::mourn_inferior): Remove unused variables.
503 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
505 * ia64-tdep.c (ktab_buf): New global.
506 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
507 (get_kernel_table): Adjust.
509 2018-07-16 Tom Tromey <tom@tromey.com>
511 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
512 * dwarf2read.c (using_directives, new_symbol): Use
514 * dbxread.c (process_one_symbol): Use outermost_context_p.
515 * coffread.c (coff_symtab_read): Use outermost_context_p.
517 2018-07-16 Tom Tromey <tom@tromey.com>
519 * dwarf2read.c (using_directives, read_func_scope)
520 (read_lexical_block_scope): Update.
521 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
522 * buildsym.h (local_using_directives, global_using_directives):
524 (get_local_using_directives, set_local_using_directives)
525 (get_global_using_directives): Declare.
526 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
527 m_global_using_directives>: New members.
528 (finish_block_internal, prepare_for_building)
529 (reset_symtab_globals, end_symtab_get_static_block)
530 (push_context): Update.
531 (get_local_using_directives, set_local_using_directives)
532 (get_global_using_directives): New functions.
533 (buildsym_init): Update.
535 2018-07-16 Tom Tromey <tom@tromey.com>
537 * xcoffread.c (xcoff_initial_scan): Don't call
539 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
540 * buildsym.h (class scoped_free_pendings): Add constructor.
541 (free_pending_blocks): Don't declare.
542 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
543 (free_pending_blocks): Now static.
545 2018-07-16 Tom Tromey <tom@tromey.com>
547 * buildsym.h (push_subfile, pop_subfile): Update declarations.
548 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
550 (struct subfile_stack): Remove.
551 (subfile_stack): Remove.
552 (push_subfile, pop_subfile, buildsym_init): Update.
554 2018-07-16 Tom Tromey <tom@tromey.com>
556 * buildsym.c (push_subfile): Use gdb_assert.
557 (pop_subfile): Use gdb_assert.
559 2018-07-16 Tom Tromey <tom@tromey.com>
561 * buildsym.h (merge_symbol_lists): Remove.
562 * buildsym.c (merge_symbol_lists): Remove.
564 2018-07-16 Tom Tromey <tom@tromey.com>
566 * stabsread.c (scan_file_globals): Update comment.
567 * stabsread.h (scan_file_globals): Move from buildsym.h.
568 * buildsym.h (scan_file_globals): Move to stabsread.h.
570 2018-07-16 Tom Tromey <tom@tromey.com>
572 * xcoffread.c (xcoff_new_init): Update.
573 * mipsread.c (mipscoff_new_init): Update.
574 * mdebugread.c (mdebug_build_psymtabs): Update.
575 * elfread.c (elf_new_init): Update.
576 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
577 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
578 * buildsym.h (buildsym_new_init): Don't declare.
579 * buildsym.c (buildsym_new_init): Remove.
581 2018-07-16 Tom Tromey <tom@tromey.com>
583 * stabsread.h (within_function): Move from buildsym.h.
584 * stabsread.c (start_stabs): Clear within_function.
585 * coffread.c (coff_start_symtab): Clear within_function.
586 * buildsym.h (within_function): Move to stabsread.h.
587 * buildsym.c (prepare_for_building): Update.
589 2018-07-16 Tom Tromey <tom@tromey.com>
591 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
592 * dwarf2read.c (dwarf2_start_symtab): Don't set
593 processing_gcc_compilation.
594 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
596 2018-07-16 Tom Tromey <tom@tromey.com>
598 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
599 (next_symbol_text_func): Move from buildsym.h.
600 * stabsread.c (hashname): Move from buildsym.c.
601 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
602 (next_symbol_text_func, hashname): Move to stabsread.h.
603 * buildsym.c: Don't include bcache.h
604 (hashname): Move to stasbread.c.
606 2018-07-16 Tom Tromey <tom@tromey.com>
608 * buildsym.h (context_stack_size): Don't declare.
609 * buildsym.c (context_stack_size): New global.
611 2018-07-16 Tom Tromey <tom@tromey.com>
613 * dbxread.c (processing_acc_compilation): New global.
614 * buildsym.h (processing_acc_compilation): Don't declare.
616 2018-07-16 Tom Tromey <tom@tromey.com>
618 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
619 * dbxread.c (read_ofile_symtab): Update.
620 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
621 * buildsym.h (last_source_start_addr): Remove.
622 (set_last_source_start_addr, get_last_source_start_addr):
624 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
626 (struct buildsym_compunit) <m_last_source_start_addr>: New
628 (prepare_for_building): Remove start_addr parameter.
629 (start_symtab, restart_symtab, end_symtab_get_static_block)
630 (end_symtab_with_blockvector): Update.
631 (set_last_source_start_addr, get_last_source_start_addr): New
634 2018-07-16 Tom Tromey <tom@tromey.com>
636 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
638 (have_line_numbers): Remove.
639 (record_line, prepare_for_building, end_symtab_get_static_block)
640 (augment_type_symtab): Update.
642 2018-07-16 Tom Tromey <tom@tromey.com>
644 * buildsym.c (~buildsym_compunit): Free the macro table.
645 (struct buildsym_compunit) <get_macro_table, release_macros>: New
647 <m_pending_macros>: New member.
648 (pending_macros): Remove.
649 (~scoped_free_pendings, get_macro_table, prepare_for_building)
650 (reset_symtab_globals, end_symtab_get_static_block)
651 (end_symtab_with_blockvector, augment_type_symtab)
652 (buildsym_init): Update.
654 2018-07-16 Tom Tromey <tom@tromey.com>
656 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
658 (buildsym_compunit::set_last_source_file): New method.
659 <m_last_source_file>: New member.
660 (prepare_for_building): Remove "name" parameter.
661 (start_symtab, restart_symtab, reset_symtab_globals): Update.
662 (last_source_file): Remove.
663 (set_last_source_file, get_last_source_file): Update.
665 2018-07-16 Tom Tromey <tom@tromey.com>
667 * buildsym.c (prepare_for_building): Add assert.
669 2018-07-16 Tom Tromey <tom@tromey.com>
671 * buildsym.c (~buildsym_compunit): Update.
672 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
673 (start_subfile, patch_subfile_names)
674 (end_symtab_with_blockvector): Update.
676 2018-07-16 Tom Tromey <tom@tromey.com>
678 * buildsym.c (struct buildsym_compunit): Add constructor,
679 destructor, initializers.
680 (start_buildsym_compunit): Remove.
681 (free_buildsym_compunit): Use "delete".
682 (start_symtab, restart_symtab): Use "new".
684 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
686 * symfile.c (set_objfile_default_section_offset): Remove struct
689 2018-07-14 Stafford Horne <shorne@gmail.com>
691 * (Responsible Maintainers): Add myself as or1k maintainer.
693 2018-07-13 Tom Tromey <tom@tromey.com>
695 * symfile.c (set_objfile_default_section_offset): Use extra braces
698 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
700 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
703 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
705 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
706 unittests/cli-utils-selftests.c
707 * unittests/cli-utils-selftests.c: New file.
709 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
711 * NEWS: Mention new commands. Mention change to 'thread apply'.
713 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
715 * thread.c (thr_try_catch_cmd): New function.
716 (thread_apply_all_command): Handle qcs flags.
717 (thread_apply_command): Handle qcs flags.
718 (taas_command): New function.
719 (tfaas_command): New function.
720 (_initialize_thread): Update to setup the new commands 'taas
721 and 'tfaas'. Change doc string for 'thread apply'.
723 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
725 * stack.c: (trailing_outermost_frame): New function, mostly
726 extracted from backtrace_command_1.
727 (leading_innermost_frame): New function.
728 (backtrace_command_1): Update to call trailing_outermost_frame.
729 (frame_apply_command_count): New function.
730 (frame_apply_level_command): New function.
731 (frame_apply_all_command): New function.
732 (frame_apply_command): New function.
733 (faas_command): New function.
734 (frame_cmd_list): New variable.
735 (_initialize_stack): Update to setup the new commands 'frame apply'
738 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
740 * cli-utils.c (number_or_range_parser::get_number): Only handle
741 numbers or convenience var as numbers.
742 (parse_flags): New function.
743 (parse_flags_qcs): New function.
744 (number_or_range_parser::finished): Ensure parsing end is detected
745 before end of string.
746 * cli-utils.h (parse_flags): New function.
747 (parse_flags_qcs): New function.
748 (number_or_range_parser): Remove m_finished bool.
749 (number_or_range_parser::skip_range): Set m_in_range to false.
751 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
753 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
756 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
757 Jan Kratochvil <jan.kratochvil@redhat.com>
758 Paul Fertser <fercerpav@gmail.com>
759 Tsutomu Seki <sekiriki@gmail.com>
760 Pedro Alves <palves@redhat.com>
762 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
763 'unittests/parse-connection-spec-selftests.c'.
764 (COMMON_SFILES): Add 'common/netstuff.c'.
765 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
766 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
767 * common/netstuff.c: New file.
768 * common/netstuff.h: New file.
769 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
770 (wait_for_connect): Update comment. New parameter
771 'gdb::optional<int> sock' instead of 'struct serial *scb'.
772 Use 'sock' directly instead of 'scb->fd'.
773 (try_connect): New function, with code from 'net_open'.
774 (net_open): Rewrite main loop to deal with multiple
775 sockets/addresses. Handle IPv6-style hostnames; implement
776 support for IPv6 connections.
777 * unittests/parse-connection-spec-selftests.c: New file.
779 2018-07-11 Pedro Alves <palves@redhat.com>
782 * remote.c (remote_target::remote_detach_pid): Call
785 2018-07-11 Pedro Alves <palves@redhat.com>
787 * h8300-tdep.c (h8300_gdbarch_init): Remove
788 set_gdbarch_ecoff_reg_to_regnum calls.
790 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
793 * c-typeprint.c (c_type_print_base_struct_union): Don't print
794 offsets/sizes for static members of a class/struct.
796 2018-07-11 Alan Hayward <alan.hayward@arm.com>
798 * target-descriptions.c (tdesc_register_bitsize): Rename.
799 * target-descriptions.h (tdesc_register_bitsize): Likewise.
800 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
801 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
803 2018-07-10 Tom Tromey <tom@tromey.com>
805 * breakpoint.c (moribund_locations): Now static and a
807 (breakpoint_init_inferior, moribund_breakpoint_here_p)
808 (build_bpstat_chain, update_global_location_list)
809 (breakpoint_retire_moribund): Update.
810 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
813 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
815 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
816 (riscv_register_reggroup_p): Use new function, remove unneeded
818 (riscv_push_dummy_call): Extend assert to compare against xlen or
819 flen based on register type.
821 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
823 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
825 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
827 * remote.c (show_hardware_watchpoint_limit): New function.
828 (show_hardware_watchpoint_length_limit): New function.
829 (show_hardware_breakpoint_limit): New function.
830 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
831 where appropriate, update help text.
833 2018-07-09 Tom Tromey <tom@tromey.com>
835 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
836 (CLIBS): Don't mention NAT_CLIBS.
838 2018-07-09 Tom Tromey <tom@tromey.com>
840 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
841 (LIBGDB_OBS, clean mostlyclean): Update.
842 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
844 2018-07-09 Tom Tromey <tom@tromey.com>
846 * Makefile.in (%.c: %.y): Use ECHO_YACC.
847 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
848 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
850 2018-07-09 Tom Tromey <tom@tromey.com>
852 * Makefile.in (ALLDEPFILES): Remove exec.c.
853 (COMMON_OBS): Remove exec.o.
854 (COMMON_SFILES): Add exec.c.
856 2018-07-09 Tom Tromey <tom@tromey.com>
858 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
860 2018-07-09 Tom Tromey <tom@tromey.com>
862 * Makefile.in (clean mostlyclean): Remove stamp-version.
863 (version.c): Depend on stamp-version.
864 (stamp-version): New rule, from version.c rule.
866 2018-07-09 Tom Tromey <tom@tromey.com>
868 * Makefile.in (init.c): Depend on stamp-init.
869 (stamp-init): New rule, from init.c rule.
870 (clean mostlyclean): Remove stamp-init.
872 2018-07-09 Tom Tromey <tom@tromey.com>
874 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
875 SUBDIR_GCC_COMPILE_SRCS.
877 2018-07-09 Tom Tromey <tom@tromey.com>
879 * Makefile.in (init.c): Remove some unused sed rules.
881 2018-07-09 Tom Tromey <tom@tromey.com>
883 * Makefile.in (TSOBS): Remove.
884 (INIT_FILES): Update.
885 (LIBGDB_OBS): Update.
886 (COMMON_SFILES): Add inflow.c.
887 (SFILES): Remove inflow.c.
889 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
891 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
893 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
895 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
896 get_saveloc_name, is_signal_frame_name, step_name,
897 init_remote_name, create_addr_space_name,
898 destroy_addr_space_name, search_unwind_table_name,
899 find_dyn_list_name): Constify.
901 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
903 * darwin-nat.c (darwin_pthread_kill): New function.
904 (darwin_resume_thread): Use darwin_pthread_kill.
906 2018-07-05 Tom de Vries <tdevries@suse.de>
908 * macroexp.c (macro_buffer) <operator=>: New member function.
910 2018-07-04 Tom Tromey <tom@tromey.com>
912 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
914 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
916 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
917 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
921 2018-07-04 Joel Brobecker <brobecker@adacore.com>
923 * NEWS: Create a new section for the next release branch.
924 Rename the section of the current branch, now that it has
927 2018-07-04 Joel Brobecker <brobecker@adacore.com>
929 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
930 * version.in: Bump version to 8.2.50.DATE-git.
932 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
933 Pedro Alves <palves@redhat.com>
935 * linux-nat.c (linux_init_ptrace): Rename to ...
936 (linux_init_ptrace_procfs): ... this. Call
937 linux_proc_init_warnings.
938 (linux_nat_target::post_attach)
939 (linux_nat_target::post_startup_inferior): Adjust.
940 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
941 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
943 2018-07-04 Tom de Vries <tdevries@suse.de>
945 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
947 (read_comp_unit_head): ... here.
949 2018-07-03 Tom Tromey <tom@tromey.com>
951 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
952 (stop_tracing, tstatus_command)
953 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
954 (print_one_static_tracepoint_marker): Update.
955 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
957 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
959 (all_tracepoints, static_tracepoints_here): Return std::vector.
961 2018-07-03 Tom Tromey <tom@tromey.com>
963 * common/ptid.c (ptid_equal): Remove.
964 * common/ptid.h (ptid_equal): Don't declare.
965 * ada-tasks.c: Update.
966 * breakpoint.c: Update.
967 * common/agent.c: Update.
969 * darwin-nat-info.c: Update.
970 * darwin-nat.c: Update.
972 * dtrace-probe.c: Update.
973 * dummy-frame.c: Update.
974 * fbsd-nat.c: Update.
976 * gdbthread.h: Update.
978 * go32-nat.c: Update.
979 * inf-loop.c: Update.
980 * inf-ptrace.c: Update.
985 * linux-fork.c: Update.
986 * linux-nat.c: Update.
987 * linux-thread-db.c: Update.
988 * mi/mi-cmd-var.c: Update.
989 * mi/mi-interp.c: Update.
990 * mi/mi-main.c: Update.
991 * nto-procfs.c: Update.
992 * ppc-linux-tdep.c: Update.
994 * python/py-inferior.c: Update.
995 * python/py-record-btrace.c: Update.
996 * python/py-record.c: Update.
997 * ravenscar-thread.c: Update.
998 * regcache.c: Update.
999 * remote-sim.c: Update.
1001 * sol-thread.c: Update.
1004 * tui/tui-stack.c: Update.
1006 * windows-nat.c: Update.
1007 * windows-tdep.c: Update.
1009 2018-07-03 Tom Tromey <tom@tromey.com>
1011 * common/ptid.c (ptid_match): Remove.
1012 * common/ptid.h (ptid_match): Don't declare.
1013 * fbsd-nat.c: Update.
1016 * linux-nat.c: Update.
1017 * record-btrace.c: Update.
1018 * regcache.c: Update.
1021 2018-07-03 Tom Tromey <tom@tromey.com>
1023 * common/ptid.c (ptid_tid_p): Remove.
1024 * common/ptid.h (ptid_tid_p): Don't declare.
1025 * sol-thread.c: Update.
1027 2018-07-03 Tom Tromey <tom@tromey.com>
1029 * common/ptid.c (ptid_lwp_p): Remove.
1030 * common/ptid.h (ptid_lwp_p): Don't declare.
1031 * fbsd-nat.c: Update.
1032 * linux-nat.c: Update.
1033 * nat/linux-procfs.c: Update.
1034 * nat/x86-linux-dregs.c: Update.
1035 * sol-thread.c: Update.
1037 2018-07-03 Tom Tromey <tom@tromey.com>
1039 * common/ptid.c (ptid_is_pid): Remove.
1040 * common/ptid.h (ptid_is_pid): Don't declare.
1042 * linux-nat.c: Update.
1043 * mi/mi-interp.c: Update.
1047 2018-07-03 Tom Tromey <tom@tromey.com>
1049 * common/ptid.c (ptid_get_tid): Remove.
1050 * common/ptid.h (ptid_get_tid): Don't declare.
1051 * ada-tasks.c: Update.
1052 * aix-thread.c: Update.
1053 * bsd-uthread.c: Update.
1054 * darwin-nat.c: Update.
1055 * fbsd-nat.c: Update.
1056 * i386-darwin-nat.c: Update.
1058 * linux-tdep.c: Update.
1059 * nto-procfs.c: Update.
1060 * ppc-ravenscar-thread.c: Update.
1061 * python/py-infthread.c: Update.
1062 * ravenscar-thread.c: Update.
1063 * sol-thread.c: Update.
1064 * sparc-ravenscar-thread.c: Update.
1065 * windows-nat.c: Update.
1067 2018-07-03 Tom Tromey <tom@tromey.com>
1069 * common/ptid.c (ptid_get_lwp): Remove.
1070 * common/ptid.h (ptid_get_lwp): Don't declare.
1071 * aarch64-linux-nat.c: Update.
1072 * ada-tasks.c: Update.
1073 * aix-thread.c: Update.
1074 * amd64-linux-nat.c: Update.
1075 * arm-linux-nat.c: Update.
1076 * corelow.c: Update.
1077 * fbsd-nat.c: Update.
1078 * fbsd-tdep.c: Update.
1079 * gnu-nat.c: Update.
1080 * i386-cygwin-tdep.c: Update.
1081 * i386-gnu-nat.c: Update.
1082 * i386-linux-nat.c: Update.
1083 * ia64-linux-nat.c: Update.
1084 * inf-ptrace.c: Update.
1086 * linux-fork.c: Update.
1087 * linux-nat.c: Update.
1088 * linux-tdep.c: Update.
1089 * linux-thread-db.c: Update.
1090 * mips-linux-nat.c: Update.
1091 * nat/aarch64-linux-hw-point.c: Update.
1092 * nat/aarch64-linux.c: Update.
1093 * nat/linux-btrace.c: Update.
1094 * nat/linux-osdata.c: Update.
1095 * nat/linux-procfs.c: Update.
1096 * nat/x86-linux-dregs.c: Update.
1097 * obsd-nat.c: Update.
1098 * ppc-fbsd-nat.c: Update.
1099 * ppc-linux-nat.c: Update.
1101 * python/py-infthread.c: Update.
1102 * ravenscar-thread.c: Update.
1104 * s390-linux-nat.c: Update.
1105 * sol-thread.c: Update.
1106 * sol2-tdep.c: Update.
1107 * spu-linux-nat.c: Update.
1108 * x86-linux-nat.c: Update.
1109 * xtensa-linux-nat.c: Update.
1111 2018-07-03 Tom Tromey <tom@tromey.com>
1113 * common/ptid.c (ptid_get_pid): Remove.
1114 * common/ptid.h (ptid_get_pid): Don't declare.
1115 * aarch64-linux-nat.c: Update.
1116 * ada-lang.c: Update.
1117 * aix-thread.c: Update.
1118 * alpha-bsd-nat.c: Update.
1119 * amd64-fbsd-nat.c: Update.
1120 * amd64-linux-nat.c: Update.
1121 * arm-linux-nat.c: Update.
1122 * arm-nbsd-nat.c: Update.
1124 * break-catch-syscall.c: Update.
1125 * breakpoint.c: Update.
1126 * bsd-uthread.c: Update.
1127 * corelow.c: Update.
1129 * darwin-nat.c: Update.
1130 * fbsd-nat.c: Update.
1131 * fbsd-tdep.c: Update.
1133 * gnu-nat.c: Update.
1134 * hppa-nbsd-nat.c: Update.
1135 * hppa-obsd-nat.c: Update.
1136 * i386-fbsd-nat.c: Update.
1137 * ia64-linux-nat.c: Update.
1138 * inf-ptrace.c: Update.
1140 * inferior.c: Update.
1141 * inferior.h: Update.
1144 * linux-fork.c: Update.
1145 * linux-nat.c: Update.
1146 * linux-tdep.c: Update.
1147 * linux-thread-db.c: Update.
1148 * m68k-bsd-nat.c: Update.
1149 * mi/mi-interp.c: Update.
1150 * mi/mi-main.c: Update.
1151 * mips-linux-nat.c: Update.
1152 * mips-nbsd-nat.c: Update.
1153 * mips64-obsd-nat.c: Update.
1154 * nat/aarch64-linux-hw-point.c: Update.
1155 * nat/aarch64-linux.c: Update.
1156 * nat/linux-btrace.c: Update.
1157 * nat/linux-osdata.c: Update.
1158 * nat/linux-procfs.c: Update.
1159 * nat/x86-linux-dregs.c: Update.
1160 * nto-procfs.c: Update.
1161 * obsd-nat.c: Update.
1162 * ppc-linux-nat.c: Update.
1163 * ppc-nbsd-nat.c: Update.
1164 * ppc-obsd-nat.c: Update.
1165 * proc-service.c: Update.
1167 * python/py-inferior.c: Update.
1168 * python/py-infthread.c: Update.
1169 * ravenscar-thread.c: Update.
1171 * remote-sim.c: Update.
1173 * rs6000-nat.c: Update.
1174 * s390-linux-nat.c: Update.
1175 * sh-nbsd-nat.c: Update.
1176 * sol-thread.c: Update.
1177 * sparc-nat.c: Update.
1178 * sparc64-tdep.c: Update.
1179 * spu-linux-nat.c: Update.
1180 * spu-tdep.c: Update.
1181 * target-debug.h: Update.
1184 * tid-parse.c: Update.
1185 * tracefile-tfile.c: Update.
1186 * vax-bsd-nat.c: Update.
1187 * windows-nat.c: Update.
1188 * x86-linux-nat.c: Update.
1189 * x86-nat.c: Update.
1191 2018-07-03 Tom Tromey <tom@tromey.com>
1193 * common/ptid.c (pid_to_ptid): Remove.
1194 * common/ptid.h (pid_to_ptid): Don't declare.
1195 * aix-thread.c: Update.
1196 * arm-linux-nat.c: Update.
1197 * common/ptid.c: Update.
1198 * common/ptid.h: Update.
1199 * corelow.c: Update.
1201 * darwin-nat.c: Update.
1202 * fbsd-nat.c: Update.
1203 * fork-child.c: Update.
1204 * gnu-nat.c: Update.
1205 * go32-nat.c: Update.
1206 * inf-ptrace.c: Update.
1208 * inferior.c: Update.
1210 * linux-fork.c: Update.
1211 * linux-nat.c: Update.
1212 * nat/aarch64-linux-hw-point.c: Update.
1213 * nat/fork-inferior.c: Update.
1214 * nat/x86-linux-dregs.c: Update.
1215 * nto-procfs.c: Update.
1216 * obsd-nat.c: Update.
1218 * progspace.c: Update.
1220 * rs6000-nat.c: Update.
1221 * s390-linux-nat.c: Update.
1222 * sol-thread.c: Update.
1223 * spu-linux-nat.c: Update.
1226 * tracefile-tfile.c: Update.
1227 * windows-nat.c: Update.
1229 2018-07-03 Tom Tromey <tom@tromey.com>
1231 * common/ptid.h (ptid_build): Don't declare.
1232 * common/ptid.c (ptid_build): Remove.
1233 * aix-thread.c: Update.
1234 * bsd-kvm.c: Update.
1235 * bsd-uthread.c: Update.
1236 * common/agent.c: Update.
1237 * common/ptid.c: Update.
1238 * common/ptid.h: Update.
1239 * corelow.c: Update.
1240 * darwin-nat.c: Update.
1241 * fbsd-nat.c: Update.
1242 * gnu-nat.c: Update.
1243 * linux-fork.c: Update.
1244 * linux-nat.c: Update.
1245 * linux-thread-db.c: Update.
1246 * nat/linux-osdata.c: Update.
1247 * nat/linux-procfs.c: Update.
1248 * nto-procfs.c: Update.
1249 * obsd-nat.c: Update.
1250 * proc-service.c: Update.
1252 * ravenscar-thread.c: Update.
1253 * remote-sim.c: Update.
1255 * sol-thread.c: Update.
1257 * windows-nat.c: Update.
1259 2018-07-03 Tom Tromey <tom@tromey.com>
1261 * infrun.c (follow_exec): Use exit_inferior_silent.
1262 * inferior.c (exit_inferior_num_silent): Remove.
1263 * inferior.h (exit_inferior_num_silent): Don't declare.
1265 2018-07-03 Tom Tromey <tom@tromey.com>
1268 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1269 inferior_ptid on error.
1271 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1272 Simon Marchi <simon.marchi@polymtl.ca>
1275 * disasm.h (gdb_disassembler): Add
1276 `m_disassembler_options_holder'. member
1277 * disasm.c (get_all_disassembler_options): New function.
1278 (gdb_disassembler::gdb_disassembler): Use it.
1279 (gdb_buffered_insn_length_init_dis): Likewise.
1280 (gdb_buffered_insn_length): Adjust accordingly.
1281 (set_disassembler_options): Handle options with arguments.
1282 (show_disassembler_options_sfunc): Likewise. Add a leading new
1283 line if showing options with descriptions.
1284 (disassembler_options_completer): Adapt to using the
1285 `disasm_options_and_args_t' structure.
1286 * mips-tdep.c (mips_disassembler_options): New variable.
1287 (mips_disassembler_options_o32): Likewise.
1288 (mips_disassembler_options_n32): Likewise.
1289 (mips_disassembler_options_n64): Likewise.
1290 (gdb_print_insn_mips): Don't set `disassembler_options'.
1291 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1293 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1294 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1295 `gdbarch_disassembler_options_implicit' and
1296 `gdbarch_valid_disassembler_options'.
1297 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1298 `disasm_options_and_args_t' structure.
1299 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1301 (valid_disassembler_options): Switch from `disasm_options_t' to
1302 the `disasm_options_and_args_t' structure.
1303 * NEWS: Document `set disassembler-options' support for the MIPS
1305 * gdbarch.h: Regenerate.
1306 * gdbarch.c: Regenerate.
1308 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1310 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1312 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1314 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1315 parameter in call to amd64_target_description.
1316 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1317 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1318 (amd64fbsd_init_abi): Likewise.
1319 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1320 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1321 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1322 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1324 2018-06-29 Pedro Alves <palves@redhat.com>
1326 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1327 "segments" parameter.
1328 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1329 (_initialize_amd64_tdep): Update call to
1330 amd64_create_target_description.
1331 (amd64_target_description): Add "segments" parameter. Adjust
1332 the implementation to use it.
1333 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1334 call to amd64_create_target_description.
1335 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1336 * gdb/arch/amd64.h (amd64_create_target_description): Add
1337 "segments" register.
1338 * gdb/arch/amd64.c (amd64_create_target_description): Add
1339 "segments" parameter. Call create_feature_i386_64bit_segments
1340 only if SEGMENTS is true.
1341 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1342 call to amd64_create_target_description.
1344 2018-06-29 Pedro Alves <palves@redhat.com>
1346 * thread.c (thread_target_id_str): New, factored out from ...
1347 (print_thread_info_1): ... here. Use it to compute the max
1348 "Target Id" column width.
1350 2018-06-29 Pedro Alves <palves@redhat.com>
1352 * remote.c (remote_target::extra_thread_info): Delete
1353 'display_buf' and 'n' locals. from the cache, regardless of
1354 packet mechanims is in use. Use cache for qThreadExtra and qP
1357 2018-06-29 Pedro Alves <palves@redhat.com>
1359 * blockframe.c (find_pc_sect_containing_function): New function.
1360 * breakpoint.c (print_breakpoint_location): Don't call
1361 find_pc_sect_function.
1362 * linespec.c (create_sals_line_offset): Record the location's
1364 * linespec.c (convert_address_location_to_sals): Fill in sal's
1365 symbol with find_pc_sect_containing_function.
1366 * symtab.c (find_function_start_sal): Rename to ...
1367 (find_function_start_sal_1): ... this.
1368 (find_function_start_sal): Reimplement as wrapper around
1369 find_function_start_sal_1, and use
1370 find_pc_sect_containing_function to fill in the sal's symbol.
1371 (find_function_start_sal(symbol*, bool)): Adjust.
1372 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1374 (find_pc_sect_containing_function): Declare.
1376 2018-06-29 Pedro Alves <palves@redhat.com>
1378 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1379 true if the the location has no symbol.
1381 2018-06-28 Tom Tromey <tom@tromey.com>
1383 * NEWS: Mention --enable-codesign.
1384 * silent-rules.mk (ECHO_SIGN): New variable.
1385 * configure.ac: Add --enable-codesign.
1386 * configure: Rebuild.
1387 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1388 (gdb$(EXEEXT)): Optionally invoke codesign.
1390 2018-06-28 Pedro Alves <palves@redhat.com>
1392 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1394 (switch_to_thread_no_regs): Adjust comment.
1395 * infcmd.c (stop_pc): Delete.
1396 (post_create_inferior, info_program_command): Replace references
1397 to stop_pc with references to thread_info->suspend.stop_pc.
1398 * inferior.h (stop_pc): Delete declaration.
1399 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1400 (handle_inferior_event_1, handle_signal_stop)
1401 (process_event_stop_test, keep_going_stepped_thread)
1402 (handle_step_into_function, handle_step_into_function_backward)
1403 (print_stop_location): Replace references to stop_pc with
1404 references to thread_info->suspend.stop_pc.
1405 (struct infcall_suspend_state) <stop_pc>: Delete field.
1406 (save_infcall_suspend_state, restore_infcall_suspend_state):
1407 Remove references to inf_stat->stop_pc.
1408 * linux-fork.c (fork_load_infrun_state): Likewise.
1409 * record-btrace.c (record_btrace_set_replay): Likewise.
1410 * record-full.c (record_full_goto_entry): Likewise.
1411 * remote.c (print_one_stopped_thread): Likewise.
1412 * target.c (target_resume): Extend comment.
1413 * thread.c (set_executing_thread): New.
1414 (set_executing): Use it.
1415 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1416 Remove references to stop_pc.
1418 2018-06-28 Pedro Alves <palves@redhat.com>
1420 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1421 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1423 2018-06-28 Tom Tromey <tom@tromey.com>
1425 * coffread.c (coff_symfile_finish): Update.
1426 * xcoffread.c (xcoff_symfile_finish): Update.
1427 * elfread.c (elf_symfile_finish): Update.
1428 * symfile.h (dwarf2_free_objfile): Don't declare.
1429 * dwarf2read.c (_initialize_dwarf2_read): Use
1430 register_objfile_data_with_cleanup.
1431 (dwarf2_free_objfile): Now static. Change signature.
1433 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1435 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1436 option "-o" to add-symbol-file-load to add an offset to each
1437 section's load address.
1438 * symfile.c (set_objfile_default_section_offset): New function.
1440 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1442 * symfile.c (add_symbol_file_command): Make sure that sections
1443 with the same name are sorted in the same order.
1445 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1447 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1448 require the second argument. If omitted, load sections at the
1449 addresses specified in the file.
1451 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1453 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1454 (_initialize_symfile): Add option "-o" to symbol-file to add an
1455 offset to each section of the symbol file.
1457 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1459 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1461 2018-06-27 Tom Tromey <tom@tromey.com>
1463 * stack.c (_initialize_stack): Update "func" help text.
1465 2018-06-27 Tom Tromey <tom@tromey.com>
1467 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1469 (unwind_infopy_str, pyuw_create_unwind_info)
1470 (unwind_infopy_add_saved_register, pyuw_sniffer)
1471 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1473 (struct saved_reg): Add constructor.
1474 <value>: Now a gdbpy_ref<>.
1476 2018-06-27 Tom Tromey <tom@tromey.com>
1478 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1480 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1482 * gdb-gdb.py.in: Format using autopep8.
1484 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1486 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1487 (type_lookup_function): Recognize CORE_ADDR values.
1489 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1491 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1494 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1496 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1499 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1501 * gdb-gdb.py: Move to...
1502 * gdb-gdb.py.in: ... here.
1503 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1504 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1506 (distclean): Remove gdb-gdb.py when cleaning.
1507 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1508 * configure: Re-generate.
1510 2018-06-27 Pedro Alves <palves@redhat.com>
1512 * proc-service.c (get_ps_regcache): New.
1513 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1514 (ps_lsetfpregs): Use it.
1516 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1519 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1520 (dwarf_decode_lines_1): Adjust.
1522 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1524 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1526 <info_proc>: Likewise.
1528 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1530 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1531 to windows_fetch_one_register, and only handle the case of
1532 fetching one register. Move the code that reloads the context
1533 and iterates over all registers if R is negative to...
1534 (windows_nat_target::fetch_registers): ... here.
1535 (do_windows_store_inferior_registers): Rename to
1536 windows_store_one_register, and only handle the case of storing
1537 one register. Move the code that handles the case where r is
1539 (windows_nat_target::store_registers) ... here.
1541 2018-06-26 Tom Tromey <tom@tromey.com>
1544 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1545 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1547 (rust_internal_print_type): Add podata parameter.
1548 (rust_print_type): Update.
1550 2018-06-26 Tom Tromey <tom@tromey.com>
1552 * typeprint.h (struct print_offset_data) <update, finish,
1553 maybe_print_hole>: New methods.
1554 <indentation>: New constant.
1555 * typeprint.c (print_offset_data::indentation): Define.
1556 (print_offset_data::maybe_print_hole, print_offset_data::update)
1557 (print_offset_data::finish): Move from c-typeprint.c and rename.
1558 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1559 (print_spaces_filtered_with_print_options): Update.
1560 (c_print_type_union_field_offset, maybe_print_hole)
1561 (c_print_type_struct_field_offset): Move to typeprint.c and
1563 (c_type_print_base_struct_union): Update.
1565 2018-06-25 Pedro Alves <palves@redhat.com>
1567 * gdbthread.h (thread_info_ref, delete_thread)
1568 (delete_thread_silent, first_thread_of_inferior)
1569 (any_thread_of_inferior, switch_to_thread)
1570 (enable_thread_stack_temporaries)
1571 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1572 (get_last_thread_stack_temporary)
1573 (value_in_thread_stack_temporaries, can_access_registers_thread):
1574 Spell out "struct thread_info" instead of just "thread_info".
1575 * inferior.h (notice_new_inferior): Likewise.
1577 2018-06-25 Pedro Alves <palves@redhat.com>
1579 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1580 pass thread_info pointer to delete_thread.
1581 (windows_nat_target::detach): Pass inferior pointer to
1583 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1585 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1586 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1587 and pass a thread_info pointer to delete_thread.
1588 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1589 pass thread_info pointer to delete_thread.
1590 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1591 delete_thread_silent call.
1592 * procfs.c (procfs_target::detach): Pass inferior pointer to
1594 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1595 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1596 delete_thread_silent call.
1597 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1598 pass thread_info pointer to delete_thread.
1599 (windows_nat_target::detach): Pass inferior pointer to
1602 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1604 * regcache.c (readable_regcache::read_part): Fix asserts.
1605 (reg_buffer::raw_collect_part): New function.
1606 (regcache::write_part): Fix asserts.
1607 (reg_buffer::raw_supply_part): New function.
1608 (regcache::transfer_regset_register): New helper function.
1609 (regcache::transfer_regset): Call new functions.
1610 (regcache_supply_regset): Use gdb_byte*.
1611 (regcache::supply_regset): Likewise.
1612 (regcache_collect_regset): Likewise.
1613 (regcache::collect_regset): Likewise.
1614 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1615 (reg_buffer::raw_supply_part): Likewise.
1616 (regcache::transfer_regset_register): Likewise.
1617 (regcache::transfer_regset): Use gdb_byte*.
1619 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1621 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1623 2018-06-21 Pedro Alves <palves@redhat.com>
1625 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1626 instead of a ptid_t. All callers adjusted.
1627 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1629 (print_ada_task_info, display_current_task_id, task_command_1):
1631 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1633 (breakpoint_kind): Adjust.
1634 (remove_breakpoints_pid): Rename to ...
1635 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1636 pointer. All callers adjusted.
1637 (bpstat_clear_actions): Use inferior_thread.
1638 (get_bpstat_thread): New.
1639 (bpstat_do_actions): Use it.
1640 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1641 to take a thread_info pointer. All callers adjusted.
1642 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1643 (breakpoint_re_set_thread): Use inferior_thread.
1644 * breakpoint.h (struct inferior): Forward declare.
1645 (bpstat_stop_status): Update.
1646 (remove_breakpoints_pid): Delete.
1647 (remove_breakpoints_inf): New.
1648 * bsd-uthread.c (bsd_uthread_target::wait)
1649 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1650 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1651 (maint_btrace_packet_history_cmd)
1652 (maint_btrace_clear_packet_history_cmd): Adjust.
1653 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1655 * cli/cli-interp.c: Include "inferior.h".
1656 * common/refcounted-object.h (struct
1657 refcounted_object_ref_policy): New.
1658 * compile/compile-object-load.c: Include gdbthread.h.
1659 (store_regs): Use inferior_thread.
1660 * corelow.c (core_target::close): Use current_inferior.
1661 (core_target_open): Adjust to use first_thread_of_inferior and use
1662 the current inferior.
1663 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1664 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1665 <thread>: ... this new field. All references adjusted.
1666 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1667 Take a thread_info pointer instead of a ptid_t.
1668 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1669 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1670 thread_info pointer instead of a ptid_t.
1671 * elfread.c: Include "inferior.h".
1672 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1673 Use inferior_thread.
1674 * eval.c (evaluate_subexp): Likewise.
1675 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1677 * gdb_proc_service.h (struct thread_info): Forward declare.
1678 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1679 <thread>: ... this new field. All references adjusted.
1680 * gdbarch.h, gdbarch.c: Regenerate.
1681 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1682 'thread' parameter. All implementations and callers adjusted.
1683 * gdbthread.h (thread_info) <set_running>: New method.
1684 (delete_thread, delete_thread_silent): Take a thread_info pointer
1686 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1687 (first_thread_of_process): Delete, replaced by ...
1688 (first_thread_of_inferior): ... this new function. All callers
1690 (any_live_thread_of_process): Delete, replaced by ...
1691 (any_live_thread_of_inferior): ... this new function. All callers
1693 (switch_to_thread, switch_to_no_thread): Declare.
1694 (is_executing): Delete.
1695 (enable_thread_stack_temporaries): Update comment.
1696 <enable_thread_stack_temporaries>: Take a thread_info pointer
1697 instead of a ptid_t. Incref the thread.
1698 <~enable_thread_stack_temporaries>: Decref the thread.
1701 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1702 (get_last_thread_stack_temporary)
1703 (value_in_thread_stack_temporaries, can_access_registers_thread):
1704 Take a thread_info pointer instead of a ptid_t. All callers
1706 * infcall.c (get_call_return_value): Use inferior_thread.
1707 (run_inferior_call): Work with thread pointers instead of ptid_t.
1708 (call_function_by_hand_dummy): Work with thread pointers instead
1709 of ptid_t. Use thread_info_ref.
1710 * infcmd.c (proceed_thread_callback): Access thread's state
1712 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1713 access thread's state directly.
1714 (continue_command): Use inferior_thread.
1715 (info_program_command): Use find_thread_ptid and access thread
1717 (proceed_after_attach_callback): Use thread state directly.
1718 (notice_new_inferior): Take a thread_info pointer instead of a
1719 ptid_t. All callers adjusted.
1720 (exit_inferior): Take an inferior pointer instead of a pid. All
1722 (exit_inferior_silent): New.
1723 (detach_inferior): Delete.
1724 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1725 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1726 (detach_inferior_command, kill_inferior_command): Use
1727 find_inferior_id instead of valid_gdb_inferior_id and
1728 gdb_inferior_id_to_pid.
1729 (inferior_command): Use inferior and thread pointers.
1730 * inferior.h (struct thread_info): Forward declare.
1731 (notice_new_inferior): Take a thread_info pointer instead of a
1732 ptid_t. All callers adjusted.
1733 (detach_inferior): Delete declaration.
1734 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1735 instead of a pid. All callers adjusted.
1736 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1737 (valid_gdb_inferior_id): Delete.
1738 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1739 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1740 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1742 <inf>: ... this new field.
1743 <step_ptid>: Delete, replaced by ...
1744 <step_thread>: ... this new field.
1745 (get_displaced_stepping_state): Take an inferior pointer instead
1746 of a pid. All callers adjusted.
1747 (displaced_step_in_progress_any_inferior): Adjust.
1748 (displaced_step_in_progress_thread): Take a thread pointer instead
1749 of a ptid_t. All callers adjusted.
1750 (displaced_step_in_progress, add_displaced_stepping_state): Take
1751 an inferior pointer instead of a pid. All callers adjusted.
1752 (get_displaced_step_closure_by_addr): Adjust.
1753 (remove_displaced_stepping_state): Take an inferior pointer
1754 instead of a pid. All callers adjusted.
1755 (displaced_step_prepare_throw, displaced_step_prepare)
1756 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1757 All callers adjusted.
1758 (start_step_over): Adjust.
1759 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1760 displaced step queue.
1761 (do_target_resume): Adjust.
1762 (fetch_inferior_event): Use inferior_thread.
1763 (context_switch, get_inferior_stop_soon): Take an
1764 execution_control_state pointer instead of a ptid_t. All callers
1766 (switch_to_thread_cleanup): Delete.
1767 (stop_all_threads): Use scoped_restore_current_thread.
1768 * inline-frame.c: Include "gdbthread.h".
1769 (inline_state) <inline_state>: Take a thread pointer instead of a
1770 ptid_t. All callers adjusted.
1771 <ptid>: Delete, replaced by ...
1772 <thread>: ... this new field.
1773 (find_inline_frame_state): Take a thread pointer instead of a
1774 ptid_t. All callers adjusted.
1775 (skip_inline_frames, step_into_inline_frame)
1776 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1777 pointer instead of a ptid_t. All callers adjusted.
1778 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1779 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1780 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1782 * linux-nat.c (get_detach_signal): Likewise.
1783 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1784 (thread_db_notice_clone): Adjust.
1785 (thread_db_find_new_threads_silently)
1786 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1787 a thread pointer instead of a ptid_t. All callers adjusted.
1788 * mi/mi-cmd-var.c: Include "inferior.h".
1789 (mi_cmd_var_update_iter): Update to use thread pointers.
1790 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1792 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1794 (mi_output_running): ... this new function.
1795 (mi_on_resume_1): Adjust to use it.
1796 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1797 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1799 (interrupt_thread_callback): : Adjust to use thread and inferior
1801 * proc-service.c: Include "gdbthread.h".
1802 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1803 * progspace-and-thread.c: Include "inferior.h".
1804 * progspace.c: Include "inferior.h".
1805 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1806 hold a reference to an inferior_object.
1807 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1809 * python/py-inferior.c (struct inferior_object): Give the type a
1810 tag name instead of a typedef.
1811 (python_on_normal_stop): No need to check if the current thread is
1813 (inferior_to_inferior_object): Change return type to
1814 inferior_object. All callers adjusted.
1815 (find_thread_object): Delete, bits factored out to ...
1816 (thread_to_thread_object): ... this new function.
1817 * python/py-infthread.c (create_thread_object): Use
1818 inferior_to_inferior_object.
1819 (thpy_is_stopped): Use thread pointer directly.
1820 (gdbpy_selected_thread): Use inferior_thread.
1821 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1822 field, replaced with ...
1823 <thread>: ... this new field. All users adjusted.
1824 (btpy_insn_or_gap_new): Drop const.
1825 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1827 * python/py-record.c: Include "gdbthread.h".
1828 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1829 a ptid_t. All callers adjusted.
1830 (gdbpy_current_recording): Use inferior_thread.
1831 * python/py-record.h (recpy_record_object) <ptid>: Delete
1832 field, replaced with ...
1833 <thread>: ... this new field. All users adjusted.
1834 (recpy_element_object) <ptid>: Delete
1835 field, replaced with ...
1836 <thread>: ... this new field. All users adjusted.
1837 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1838 a ptid_t. All callers adjusted.
1839 * python/py-threadevent.c: Include "gdbthread.h".
1840 (get_event_thread): Use thread_to_thread_object.
1841 * python/python-internal.h (struct inferior_object): Forward
1843 (find_thread_object, find_inferior_object): Delete declarations.
1844 (thread_to_thread_object, inferior_to_inferior_object): New
1846 * record-btrace.c: Include "inferior.h".
1847 (require_btrace_thread): Use inferior_thread.
1848 (record_btrace_frame_sniffer)
1849 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1850 (get_thread_current_frame): Use scoped_restore_current_thread and
1852 (get_thread_current_frame): Use thread pointer directly.
1853 (record_btrace_replay_at_breakpoint): Use thread's inferior
1855 * record-full.c: Include "inferior.h".
1856 * regcache.c: Include "gdbthread.h".
1857 (get_thread_arch_regcache): Use the inferior's address space
1859 (get_thread_regcache, registers_changed_thread): New.
1860 * regcache.h (get_thread_regcache(thread_info *thread)): New
1862 (registers_changed_thread): New.
1863 (remote_target) <remote_detach_1>: Swap order of parameters.
1864 (remote_add_thread): <remote_add_thread>: Return the new thread.
1865 (get_remote_thread_info(ptid_t)): New overload.
1866 (remote_target::remote_notice_new_inferior): Use thread pointers
1868 (remote_target::process_initial_stop_replies): Use
1869 thread_info::set_running.
1870 (remote_target::remote_detach_1, remote_target::detach)
1871 (extended_remote_target::detach): Adjust.
1872 * stack.c (frame_show_address): Use inferior_thread.
1873 * target-debug.h (target_debug_print_thread_info_pp): New.
1874 * target-delegates.c: Regenerate.
1875 * target.c (default_thread_address_space): Delete.
1876 (memory_xfer_partial_1): Use current_inferior.
1877 (target_detach): Use current_inferior.
1878 (target_thread_address_space): Delete.
1879 (generic_mourn_inferior): Use current_inferior.
1880 * target.h (struct target_ops) <thread_address_space>: Delete.
1881 (target_thread_address_space): Delete.
1882 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1884 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1885 thread pointer instead of a ptid_t. Adjust all callers.
1886 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1887 (first_thread_of_process): Delete, replaced by ...
1888 (first_thread_of_inferior): ... this new function. All callers
1890 (any_thread_of_process): Rename to ...
1891 (any_thread_of_inferior): ... this, and take an inferior pointer.
1892 (any_live_thread_of_process): Rename to ...
1893 (any_live_thread_of_inferior): ... this, and take an inferior
1895 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1896 (value_in_thread_stack_temporaries)
1897 (get_last_thread_stack_temporary): Take a thread pointer instead
1898 of a ptid_t. Adjust all callers.
1899 (thread_info::set_running): New.
1900 (validate_registers_access): Use inferior_thread.
1901 (can_access_registers_ptid): Rename to ...
1902 (can_access_registers_thread): ... this, and take a thread
1904 (print_thread_info_1): Adjust to compare thread pointers instead
1906 (switch_to_no_thread, switch_to_thread): Make extern.
1907 (scoped_restore_current_thread::~scoped_restore_current_thread):
1908 Use m_thread pointer directly.
1909 (scoped_restore_current_thread::scoped_restore_current_thread):
1910 Use inferior_thread.
1911 (thread_command): Use thread pointer directly.
1912 (thread_num_make_value_helper): Use inferior_thread.
1913 * top.c (execute_command): Use inferior_thread.
1914 * tui/tui-interp.c: Include "inferior.h".
1915 * varobj.c (varobj_create): Use inferior_thread.
1916 (value_of_root_1): Use find_thread_global_id instead of
1917 global_thread_id_to_ptid.
1919 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1921 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1923 (regcache::write_part): Likewise.
1924 (readable_regcache::cooked_read_part): Update comment.
1925 (readable_regcache::cooked_write_part): Likewise.
1926 * regcache.h: (readable_regcache::read_part): Likewise.
1927 (regcache::write_part): Likewise.
1929 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1930 Dirk Schubert <dirk.schubert@arm.com>
1932 * aarch64-linux-nat.c (post_attach): New.
1933 (aarch64_linux_nat_target::post_attach): Override post_attach to
1934 record the number of hardware debug registers.
1936 2018-06-20 Tom Tromey <tom@tromey.com>
1938 * python/py-param.c (add_setshow_generic): Make parameters const.
1939 (parmpy_init): Update.
1941 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1943 * regcache.h (regcache_cooked_read_ftype): Rename to...
1944 (register_read_ftype): ...this, change type to function_view.
1945 (class reg_buffer) <save>: Remove src parameter.
1946 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1947 parameter non-const in first overload. Remove src parameter in
1949 * regcache.c (do_cooked_read): Remove.
1950 (readonly_detached_regcache::readonly_detached_regcache): Make
1951 parameter non-const, adjust call to other constructor.
1952 (reg_buffer::save): Remove src parameter.
1953 * frame.c (do_frame_register_read): Remove.
1954 (frame_save_as_regcache): Use lambda function.
1955 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1956 parameter to ppu2spu_data *.
1957 (ppu2spu_sniffer): Use lambda function.
1959 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1961 * record-full.c (record_full_target::insert_breakpoint): Remove
1962 "struct" keyword, add const.
1964 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1966 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1967 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1968 * configure.ac: Remove AC_PREREQ, add missing quoting.
1969 * gnulib/configure.ac: Modernize usage of
1970 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1971 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1972 (AUTOMAKE_VERSION): Bump to 1.15.1.
1973 * configure: Re-generate.
1974 * config.in: Re-generate.
1975 * aclocal.m4: Re-generate.
1976 * gnulib/aclocal.m4: Re-generate.
1977 * gnulib/config.in: Re-generate.
1978 * gnulib/configure: Re-generate.
1979 * gnulib/import/Makefile.in: Re-generate.
1981 2018-06-19 Pedro Alves <palves@redhat.com>
1983 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1984 (lookup_minimal_symbol_by_pc_section): ... here with
1985 gdb_assert_not_reached added.
1987 2018-06-19 Pedro Alves <palves@redhat.com>
1989 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1990 parameter with a block parameter. Compare location's block symbol
1991 with the frame's block instead of addresses.
1992 (skip_inline_frames): Pass the current block instead of the
1993 frame's address. Break out as soon as we determine the frame
1994 should not be skipped.
1996 2018-06-18 Tom Tromey <tom@tromey.com>
1998 * solib-aix.c (solib_aix_get_section_offsets): Return
2000 (solib_aix_solib_create_inferior_hook): Update.
2002 2018-06-18 Tom Tromey <tom@tromey.com>
2004 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2006 2018-06-18 Tom Tromey <tom@tromey.com>
2008 * solib-frv.c (frv_relocate_main_executable): Use
2010 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2013 2018-06-18 Tom Tromey <tom@tromey.com>
2015 * objfiles.h (inhibit_section_map_updates): Update.
2016 (resume_section_map_updates, resume_section_map_updates_cleanup):
2018 * solib-svr4.c (svr4_handle_solib_event): Update.
2019 * objfiles.c (inhibit_section_map_updates): Return
2020 scoped_restore_tmpl<int>.
2021 (resume_section_map_updates, resume_section_map_updates_cleanup):
2024 2018-06-18 Tom Tromey <tom@tromey.com>
2026 * valprint.h (read_string): Update.
2027 * valprint.c (read_string): Change type of "buffer".
2028 (val_print_string): Update.
2029 * python/py-value.c (valpy_string): Update.
2030 * language.h (struct language_defn) <la_get_string>: Change
2032 (default_get_string, c_get_string): Update.
2033 * language.c (default_get_string): Change type of "buffer".
2034 * guile/scm-value.c (gdbscm_value_to_string): Update.
2035 * c-lang.c (c_get_string): Change type of "buffer".
2037 2018-06-18 Tom Tromey <tom@tromey.com>
2039 * ser-mingw.c (struct pipe_state_destroyer): New.
2040 (pipe_state_up): New typedef.
2041 (cleanup_pipe_state): Remove.
2042 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2044 2018-06-18 Tom Tromey <tom@tromey.com>
2046 * rust-lang.h (rust_yyerror): Don't declare.
2047 * rust-lang.c (rust_language_defn): Update.
2048 * rust-exp.y (yyerror): Now static.
2049 * parse.c (parse_exp_in_context_1): Update.
2050 * p-lang.h (p_yyerror): Don't declare.
2051 * p-lang.c (p_language_defn): Update.
2052 * p-exp.y (yyerror): Now static.
2053 * opencl-lang.c (opencl_language_defn): Update.
2054 * objc-lang.c (objc_language_defn): Update.
2055 * m2-lang.h (m2_yyerror): Don't declare.
2056 * m2-lang.c (m2_language_defn): Update.
2057 * m2-exp.y (yyerror): Now static.
2058 * language.h (struct language_defn) <la_error>: Remove.
2059 * language.c (unk_lang_error): Remove.
2060 (unknown_language_defn, auto_language_defn): Remove.
2061 * go-lang.h (go_yyerror): Don't declare.
2062 * go-lang.c (go_language_defn): Update.
2063 * go-exp.y (yyerror): Now static.
2064 * f-lang.h (f_yyerror): Don't declare.
2065 * f-lang.c (f_language_defn): Update.
2066 * f-exp.y (yyerror): Now static.
2067 * d-lang.h (d_yyerror): Don't declare.
2068 * d-lang.c (d_language_defn): Update.
2069 * d-exp.y (yyerror): Now static.
2070 * c-lang.h (c_yyerror): Don't declare.
2071 * c-lang.c (c_language_defn, cplus_language_defn)
2072 (asm_language_defn, minimal_language_defn): Update.
2073 * c-exp.y (yyerror): Now static.
2074 * ada-lang.h (ada_yyerror): Don't declare.
2075 * ada-lang.c (ada_language_defn): Update.
2076 * ada-exp.y (yyerror): Now static.
2078 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2080 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2081 (store_sveregs_to_thread): Likewise.
2082 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2083 (aarch64_linux_store_inferior_registers): Likewise.
2084 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2086 (aarch64_sve_regs_copy_to_regcache): Likewise.
2087 (aarch64_sve_regs_copy_from_regcache): Likewise.
2088 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2090 (aarch64_sve_regs_copy_to_regcache): Likewise.
2091 (aarch64_sve_regs_copy_from_regcache): Likewise.
2092 (sve_context): Structure from Linux headers.
2093 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2094 (SVE_SIG_ZREG_SIZE): Likewise.
2095 (SVE_SIG_PREG_SIZE): Likewise.
2096 (SVE_SIG_FFR_SIZE): Likewise.
2097 (SVE_SIG_REGS_OFFSET): Likewise.
2098 (SVE_SIG_ZREGS_OFFSET): Likewise.
2099 (SVE_SIG_ZREG_OFFSET): Likewise.
2100 (SVE_SIG_ZREGS_SIZE): Likewise.
2101 (SVE_SIG_PREGS_OFFSET): Likewise.
2102 (SVE_SIG_PREG_OFFSET): Likewise.
2103 (SVE_SIG_PREGS_SIZE): Likewise.
2104 (SVE_SIG_FFR_OFFSET): Likewise.
2105 (SVE_SIG_REGS_SIZE): Likewise.
2106 (SVE_SIG_CONTEXT_SIZE): Likewise.
2107 (SVE_PT_REGS_MASK): Likewise.
2108 (SVE_PT_REGS_FPSIMD): Likewise.
2109 (SVE_PT_REGS_SVE): Likewise.
2110 (SVE_PT_VL_INHERIT): Likewise.
2111 (SVE_PT_VL_ONEXEC): Likewise.
2112 (SVE_PT_REGS_OFFSET): Likewise.
2113 (SVE_PT_FPSIMD_OFFSET): Likewise.
2114 (SVE_PT_FPSIMD_SIZE): Likewise.
2115 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2116 (SVE_PT_SVE_PREG_SIZE): Likewise.
2117 (SVE_PT_SVE_FFR_SIZE): Likewise.
2118 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2119 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2120 (__SVE_SIG_TO_PT): Likewise.
2121 (SVE_PT_SVE_OFFSET): Likewise.
2122 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2123 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2124 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2125 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2126 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2127 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2128 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2129 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2130 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2131 (SVE_PT_SVE_SIZE): Likewise.
2132 (SVE_PT_SIZE): Likewise.
2133 (HAS_SVE_STATE): New define.
2135 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2137 * nat/aarch64-sve-linux-sigcontext.h: New file.
2138 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2140 (SVE_VQ_MIN): Likewise.
2141 (SVE_VQ_MAX): Likewise.
2142 (SVE_VL_MIN): Likewise.
2143 (SVE_VL_MAX): Likewise.
2144 (SVE_NUM_ZREGS): Likewise.
2145 (SVE_NUM_PREGS): Likewise.
2146 (sve_vl_valid): Likewise.
2147 (struct user_sve_header): Likewise.
2149 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2150 Richard Bunt <Richard.Bunt@arm.com>
2152 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2153 was requested by GDB.
2155 2018-06-15 Tom de Vries <tdevries@suse.de>
2157 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2159 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2161 * gnulib/update-gnulib.sh: Print expected versions of
2164 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2166 * arch-utils.c (default_type_align): Use type_length_units.
2167 * gdbtypes.c (type_align): Use type_length_units.
2169 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2171 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2172 of 'define' command.
2174 2018-06-14 Tom de Vries <tdevries@suse.de>
2177 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2178 get_no_prettyformat_print_options.
2180 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2182 * sparc-nat.h: Include target.h.
2183 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2184 <fetch_registers>: Remove this argument in function call.
2185 <store_registers>: Remove this argument in function call, remove
2187 <low_forget_process>: Call sparc64_forget_process instead of
2188 sparc_forget_process.
2190 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2192 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2193 (procfs_target::make_corefile_notes): Adjust to new
2194 target_read_alloc return type.
2196 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2197 Stephen Roberts <stephen.roberts@arm.com>
2200 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2201 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2202 Move should_notify_stop local into more inner scope.
2204 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2205 Stephen Roberts <stephen.roberts@arm.com>
2208 * infrun.c (resume_1): Add call to mark_async_event_handler.
2210 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2212 * infrun.c (do_target_wait): Change old version of $pc printed.
2214 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2216 * dwarf2read.c (read_index_from_section): Rename to...
2217 (read_gdb_index_from_section): ... this, update all callers.
2218 (dwarf2_read_index): Rename to...
2219 (dwarf2_read_gdb_index): ... this, update all callers.
2221 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2223 * gdb/hppa-linux-nat.c
2224 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2225 hppa_linux_nat_target::fetch_registers.
2227 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2229 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2230 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2231 (AARCH64_DWARF_SVE_FFR): Likewise.
2232 (AARCH64_DWARF_SVE_P0): Likewise.
2233 (AARCH64_DWARF_SVE_Z0): Likewise.
2235 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2237 * common/common-regcache.h (raw_compare): New function.
2238 * regcache.c (regcache::raw_compare): Likewise.
2239 * regcache.h (regcache::raw_compare): New declaration.
2241 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2243 * common/common-regcache.h (reg_buffer_common): New structure.
2244 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2245 (reg_buffer::raw_supply): Likewise.
2246 (reg_buffer::raw_supply_integer): Likewise.
2247 (reg_buffer::raw_supply_zeroed): Likewise.
2248 (reg_buffer::raw_collect): Likewise.
2249 (reg_buffer::raw_collect_integer): Likewise.
2250 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2251 (reg_buffer::raw_supply): Likewise.
2252 (reg_buffer::raw_supply_integer): Likewise.
2253 (reg_buffer::raw_supply_zeroed): Likewise.
2254 (reg_buffer::raw_collect): Likewise.
2255 (reg_buffer::raw_collect_integer): Likewise.
2257 2018-06-10 Tom Tromey <tom@tromey.com>
2259 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2260 (class remote_state) <stop_reply_queue>: Now std::vector.
2261 (remote_state::~remote_state)
2262 (remote_target::stop_reply_queue_length): Update.
2263 (struct queue_iter_param, remove_child_of_pending_fork)
2264 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2265 (check_pending_event_prevents_wildcard_vcont_callback)
2266 (remove_stop_reply_for_inferior)
2267 (remove_stop_reply_of_remote_state)
2268 (remote_notif_remove_once_on_match)
2269 (stop_reply_match_ptid_and_ws)
2270 (remote_kill_child_of_pending_fork): Remove.
2271 (remote_target::remove_new_fork_children)
2272 (remote_target::check_pending_events_prevent_wildcard_vcont)
2273 (remote_target::discard_pending_stop_replies)
2274 (remote_target::discard_pending_stop_replies_in_queue)
2275 (remote_target::remote_notif_remove_queued_reply)
2276 (remote_target::queued_stop_reply)
2277 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2278 (remote_target::wait, remote_target::kill_new_fork_children)
2279 (remote_target::async): Update.
2281 2018-06-10 Tom Tromey <tom@tromey.com>
2283 * record-full.c (record_full_arch_list_cleanups): Remove.
2284 (record_full_message): Use try/catch.
2285 (record_full_wait_cleanups): Remove.
2286 (record_full_wait_1): Use try/catch.
2287 (record_full_restore): Likewise.
2289 2018-06-10 Tom Tromey <tom@tromey.com>
2291 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2292 declare VEC. Add constructor.
2293 <in_target_beneath>: Now bool.
2294 (record_full_breakpoints): Now a std::vector, static.
2295 (record_full_sync_record_breakpoints)
2296 (record_full_init_record_breakpoints)
2297 (record_full_target::insert_breakpoint)
2298 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2300 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2302 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2303 * serial.c (serial_interface_lookup): Remove struct keyword.
2305 2018-06-10 Tom Tromey <tom@tromey.com>
2307 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2309 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2311 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2313 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2314 "beneath" as a method.
2315 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2316 Use "beneath" as a method.
2318 2018-06-10 Tom Tromey <tom@tromey.com>
2320 * tracefile.c (struct trace_file_writer_deleter): New.
2321 <operator()>: Rename from trace_file_writer_xfree.
2322 (trace_file_writer_up): New typedef.
2323 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2325 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2327 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2328 <m_registers, m_register_status>: Change type to
2330 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2333 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2335 * common/common-regcache.h (enum register_status): Add
2336 underlying type "signed char".
2337 * regcache.h (reg_buffer) <m_register_status>: Change type to
2339 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2340 register_status instead of signed char.
2341 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2342 (reg_buffer::get_register_status): Remove cast.
2343 (readable_regcache::raw_read): Remove cast.
2344 (readable_regcache::cooked_read): Remove cast.
2346 2018-06-09 Tom Tromey <tom@tromey.com>
2348 * source.c (reverse_search_command, forward_search_command): Use
2351 2018-06-09 Tom Tromey <tom@tromey.com>
2353 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2354 (serial_ops_list): Now static, std::vector.
2355 (serial_interface_lookup, serial_add_interface): Update.
2357 2018-06-09 Tom Tromey <tom@tromey.com>
2359 * dwarf2read.c (process_cu_includes): Update.
2360 (process_full_comp_unit): Update.
2361 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2364 2018-06-08 Paul Koning <paul_koning@dell.com>
2368 * python/python.c (do_start_initialization):
2369 Avoid call to internal Python API.
2370 (init__gdb_module): New function.
2372 2018-06-08 Gary Benson <gbenson@redhat.com>
2374 * linux-thread-db.c (valprint.h): New include.
2375 (struct check_thread_db_info): New structure.
2376 (check_thread_db_on_load, tdb_testinfo): New static globals.
2377 (check_thread_db, check_thread_db_callback): New functions.
2378 (try_thread_db_load_1): Run integrity checks if requested.
2379 (maintenance_check_libthread_db): New function.
2380 (_initialize_thread_db): Register "maint check libthread-db"
2381 and "maint set/show check-libthread-db".
2382 * NEWS: Mention the above new commands.
2384 2018-06-08 Tom Tromey <tom@tromey.com>
2386 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2389 2018-06-08 Tom Tromey <tom@tromey.com>
2391 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2393 2018-06-08 Tom Tromey <tom@tromey.com>
2395 * common/btrace-common.h (struct btrace_data): Add constructor,
2396 destructor, move assignment operator.
2397 <empty, clear, fini>: New methods.
2398 <format>: Initialize.
2399 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2400 (btrace_data_empty): Don't declare.
2401 * common/btrace-common.c (btrace_data_init): Remove.
2402 (btrace_data::fini): Rename from btrace_data_fini.
2403 (btrace_data::empty): Rename from btrace_data_empty.
2404 (btrace_data::clear): Rename from btrace_data_clear. Return
2406 * btrace.h (make_cleanup_btrace_data): Don't declare.
2407 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2408 (parse_xml_btrace): Update.
2409 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2410 (maint_btrace_clear_packet_history_cmd): Update.
2412 2018-06-07 Pedro Alves <palves@redhat.com>
2414 * target.h (target_ops) <beneath>: Now a method. All references
2416 (class target_stack): New.
2417 * target.c (g_target_stack): New.
2418 (g_current_top_target): Delete.
2419 (current_top_target): Get the top target out of g_target_stack.
2420 (target_stack::push, target_stack::unpush): New.
2421 (push_target, unpush_target): Reimplement.
2422 (target_is_pushed): Reimplement in terms of g_target_stack.
2423 (target_ops::beneath, target_stack::find_beneath): New.
2425 2018-06-07 Pedro Alves <palves@redhat.com>
2427 * target.h (find_target_beneath): Delete declaration.
2428 * target.c (find_target_beneath): Delete definition.
2429 * aix-thread.c: All callers of find_target_beneath adjusted to
2430 call target_ops::beneath instead.
2431 * bsd-uthread.c: Likewise.
2432 * linux-thread-db.c: Likewise.
2433 * ravenscar-thread.c: Likewise.
2434 * sol-thread.c: Likewise.
2435 * spu-multiarch.c: Likewise.
2437 2018-06-07 Pedro Alves <palves@redhat.com>
2439 * target.h (target_ops) <beneath>: Now a method. All references
2441 (target_ops) <m_beneath>: New.
2442 * target.c (target_ops::beneath): New.
2443 * corelow.c: Adjust all references to target_ops::beneath.
2444 * linux-thread-db.c: Likewise.
2445 * make-target-delegates: Likewise.
2446 * record-btrace.c: Likewise.
2447 * record-full.c: Likewise.
2448 * remote.c: Likewise.
2449 * target.c: Likewise.
2450 * target-delegates.c: Regenerate.
2452 2018-06-07 Pedro Alves <palves@redhat.com>
2454 * target.h (target_stack): Delete.
2455 (current_top_target): Declare function.
2456 * target.c (target_stack): Delete.
2457 (g_current_top_target): New.
2458 (current_top_target): New function.
2459 * auxv.c: Use current_top_target instead of target_stack
2461 * avr-tdep.c: Likewise.
2462 * breakpoint.c: Likewise.
2463 * corefile.c: Likewise.
2464 * elfread.c: Likewise.
2466 * exceptions.c: Likewise.
2467 * frame.c: Likewise.
2468 * gdbarch-selftests.c: Likewise.
2469 * gnu-v3-abi.c: Likewise.
2470 * ia64-tdep.c: Likewise.
2471 * ia64-vms-tdep.c: Likewise.
2472 * infcall.c: Likewise.
2473 * infcmd.c: Likewise.
2474 * infrun.c: Likewise.
2475 * linespec.c: Likewise.
2476 * linux-tdep.c: Likewise.
2477 * minsyms.c: Likewise.
2478 * ppc-linux-nat.c: Likewise.
2479 * ppc-linux-tdep.c: Likewise.
2480 * procfs.c: Likewise.
2481 * regcache.c: Likewise.
2482 * remote.c: Likewise.
2483 * rs6000-tdep.c: Likewise.
2484 * s390-linux-nat.c: Likewise.
2485 * s390-tdep.c: Likewise.
2486 * solib-aix.c: Likewise.
2487 * solib-darwin.c: Likewise.
2488 * solib-dsbt.c: Likewise.
2489 * solib-spu.c: Likewise.
2490 * solib-svr4.c: Likewise.
2491 * solib-target.c: Likewise.
2492 * sparc-tdep.c: Likewise.
2493 * sparc64-tdep.c: Likewise.
2494 * spu-tdep.c: Likewise.
2495 * symfile.c: Likewise.
2496 * symtab.c: Likewise.
2497 * target-descriptions.c: Likewise.
2498 * target-memory.c: Likewise.
2499 * target.c: Likewise.
2500 * target.h: Likewise.
2501 * tracefile-tfile.c: Likewise.
2502 * tracepoint.c: Likewise.
2503 * valops.c: Likewise.
2504 * valprint.c: Likewise.
2505 * value.c: Likewise.
2506 * windows-tdep.c: Likewise.
2507 * mi/mi-main.c: Likewise.
2509 2018-06-07 Tom Tromey <tom@tromey.com>
2511 * valprint.h (build_address_symbolic): Declare.
2512 * printcmd.c (print_address_symbolic): Update.
2513 (build_address_symbolic): Change "name" and "filename" to
2515 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2517 * defs.h (build_address_symbolic): Remove declaration.
2519 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2521 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2522 (aarch64_vnv_type): Add function.
2523 (aarch64_pseudo_register_name): Add V regs for SVE.
2524 (aarch64_pseudo_register_type): Likewise.
2525 (aarch64_pseudo_register_reggroup_p): Likewise.
2526 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2527 (aarch64_pseudo_read_value): Add V regs for SVE.
2528 (aarch64_pseudo_write_2): Use V0 offset for SVE
2529 (aarch64_pseudo_write): Add V regs for SVE.
2530 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2532 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2534 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2535 (sve_vl_from_vq): Likewise.
2537 2018-06-05 Tom Tromey <tom@tromey.com>
2539 * cli/cli-cmds.c (show_version): Update.
2540 * top.c (print_gdb_version): Add "interactive" parameter.
2542 * main.c (captured_main_1): Update.
2543 * top.h (print_gdb_version): Add "interactive" parameter and a
2546 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2548 * common/enum-flags.h: Add trailing semicolon to example in
2551 2018-06-05 Tom Tromey <tom@tromey.com>
2554 * NEWS: Add entry about pager.
2555 * utils.c (pagination_disabled_for_command): New global.
2556 (prompt_for_continue): Allow "c" response to prompt.
2557 (reinitialize_more_filter): Clear
2558 pagination_disabled_for_command.
2559 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2561 2018-06-04 Tom Tromey <tom@tromey.com>
2563 * ada-lang.h (ada_lookup_symbol_list): Update.
2564 * ada-lang.c (resolve_subexp): Update.
2565 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2567 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2568 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2569 results parameter to std::vector.
2570 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2572 * ada-exp.y (block_lookup): Update.
2573 (select_possible_type_sym): Change type of syms. Remove nsyms
2575 (write_var_or_type, write_name_assoc): Update.
2577 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2579 * windows-nat.c (windows_nat_target::xfer_partial): Return
2580 TARGET_XFER_E_IO if we need to delegate to the target beneath
2581 but BENEATH is NULL.
2583 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2585 * Makefile.in (config.status): Add configure.nat as a
2588 2018-06-04 Tom Tromey <tom@tromey.com>
2590 * cp-name-parser.y (cpname_state): Add method declarations.
2591 (HANDLE_QUAL): Update.
2592 (cpname_state::d_grab, cpname_state::fill_comp)
2593 (cpname_state::make_operator, cpname_state::make_dtor)
2594 (cpname_state::make_builtin_type, cpname_state::make_name)
2595 (cpname_state::d_qualify, cpname_state::d_int_type)
2596 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2597 (%union): Move earlier.
2599 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2601 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2603 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2605 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2606 (aarch64_pseudo_write_1): Likewise.
2607 (aarch64_pseudo_read_value): Use helper.
2608 (aarch64_pseudo_write): Likewise.
2610 2018-06-04 Pedro Alves <palves@redhat.com>
2612 * darwin-nat.c (darwin_ops): Delete.
2613 (darwin_attach_pid): Use get_native_target.
2615 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2617 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2618 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2620 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2622 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2623 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2624 (aarch64_gdbarch_init): Check for SVE.
2625 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2627 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2629 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2630 * aarch64-tdep.h (aarch64_read_description): Likewise.
2631 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2632 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2633 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2634 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2635 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2637 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2639 * value.c (value_fetch_lazy_bitfield): New.
2640 (value_fetch_lazy_memory): New.
2641 (value_fetch_lazy_register): New.
2642 (value_fetch_lazy): Factor out to smaller functions.
2644 2018-06-01 Tom Tromey <tom@tromey.com>
2646 * cp-name-parser.y (backslashable, represented): Now const.
2648 2018-06-01 Tom Tromey <tom@tromey.com>
2650 * cp-name-parser.y: Include parser-defs.h.
2651 (parser_fprintf): Remove declaration.
2653 2018-06-01 Tom Tromey <tom@tromey.com>
2655 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2657 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2658 (global_result): Remove globals.
2659 (struct cpname_state): New.
2660 (yyparse): Don't declare.
2661 (yylex, yyerror): Move declarations after %union.
2662 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2663 (make_name): Add state parameter.
2665 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2667 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2669 (yylex): Add lvalp, state parameters.
2670 (yyerror): Add state parameter.
2671 (cp_demangled_name_to_comp): Update.
2673 2018-06-01 Tom Tromey <tom@tromey.com>
2675 * cp-name-parser.y (parser_fprintf): Declare.
2676 (GDB_YY_REMAP_PREFIX): Define.
2677 Include yy-remap.h. Don't redefine yy* identifiers.
2679 2018-06-01 Tom Tromey <tom@tromey.com>
2681 * python/py-type.c (typy_legacy_template_argument): Update.
2682 * cp-support.h (cp_demangled_name_to_comp): Update.
2683 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2684 parameter to be a "std::string *".
2687 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2689 * ada-lex.l: Include "diagnostics.h" instead of
2690 "common/diagnostics.h".
2691 * unittests/environ-selftests.c: Likewise.
2692 * common/diagnostics.h: Moved to ../include.
2694 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2696 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2697 to language_mode_manual while calling breakpoint_re_set_one.
2699 2018-06-01 Tom Tromey <tom@tromey.com>
2701 * valops.c (value_cast_structs, destructor_name_p): Update.
2702 * symtab.c (gdb_mangle_name): Update.
2703 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2705 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2706 (pascal_object_print_value_fields, pascal_object_print_value):
2708 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2709 * linespec.c (find_methods): Update.
2710 * gdbtypes.h (type_name_no_tag): Remove.
2711 (type_name_or_error): Rename from type_name_no_tag_or_error.
2712 * gdbtypes.c (type_name_no_tag): Remove.
2713 (type_name_or_error): Rename from type_name_no_tag_or_error.
2714 (lookup_struct_elt_type, check_typedef): Update.
2715 * expprint.c (print_subexp_standard): Update.
2716 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2717 * d-namespace.c (d_lookup_nested_symbol): Update.
2718 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2719 (cp_print_class_member): Update.
2720 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2721 * completer.c (add_struct_fields): Update.
2722 * c-typeprint.c (cp_type_print_derivation_info)
2723 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2725 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2726 (ada_prefer_type, ada_is_exception_sym): Update.
2728 2018-06-01 Tom Tromey <tom@tromey.com>
2730 * valops.c (enum_constant_from_type, value_namespace_elt)
2731 (value_maybe_namespace_elt): Update.
2732 * valarith.c (find_size_for_pointer_math): Update.
2733 * target-descriptions.c (make_gdb_type): Update.
2734 * symmisc.c (print_symbol): Update.
2735 * stabsread.c (define_symbol, read_type)
2736 (complain_about_struct_wipeout, add_undefined_type)
2737 (cleanup_undefined_types_1): Update.
2738 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2739 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2740 (rust_internal_print_type, rust_composite_type)
2741 (rust_evaluate_funcall, rust_evaluate_subexp)
2742 (rust_inclusive_range_type_p): Update.
2743 * python/py-type.c (typy_get_tag): Update.
2744 * p-typeprint.c (pascal_type_print_base): Update.
2745 * mdebugread.c (parse_symbol, parse_type): Update.
2746 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2748 * guile/scm-type.c (gdbscm_type_tag): Update.
2749 * go-lang.c (sixg_string_p): Update.
2750 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2752 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2753 (TYPE_TAG_NAME): Remove.
2754 * gdbtypes.c (type_name_no_tag): Simplify.
2755 (check_typedef, check_types_equal, recursive_dump_type)
2756 (copy_type_recursive, arch_composite_type): Update.
2757 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2758 in summary mode when needed.
2759 * eval.c (evaluate_funcall): Update.
2760 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2761 (process_structure_scope, read_enumeration_type)
2762 (read_namespace_type, read_module_type, determine_prefix): Update.
2763 * cp-support.c (inspect_type): Update.
2764 * coffread.c (process_coff_symbol, decode_base_type): Update.
2765 * c-varobj.c (c_is_path_expr_parent): Update.
2766 * c-typeprint.c (c_type_print_base_struct_union): Update.
2767 (c_type_print_base_1): Update. Print struct/class/union/enum in
2768 summary when using C language.
2769 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2770 (gen_maybe_namespace_elt): Update.
2771 * ada-lang.c (ada_type_name): Simplify.
2772 (empty_record, ada_template_to_fixed_record_type_1)
2773 (template_to_static_fixed_type)
2774 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2776 2018-06-01 Tom Tromey <tom@tromey.com>
2778 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2780 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2781 (c_print_type): Update.
2782 (c_print_type): New overload.
2783 (c_type_print_varspec_prefix, c_type_print_args)
2784 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2785 (c_type_print_base_struct_union, c_type_print_base_1)
2786 (cp_type_print_method_args): Add "language" parameter.
2787 (c_type_print_base): Update.
2788 * c-lang.h (c_print_type): Add new overload.
2790 2018-06-01 Tom Tromey <tom@tromey.com>
2792 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2793 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2795 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2797 * aarch64-tdep.c (aarch64_sve_register_names): New const
2799 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2800 (AARCH64_SVE_Z_REGS_NUM): New define.
2801 (AARCH64_SVE_P_REGS_NUM): Likewise.
2802 (AARCH64_SVE_NUM_REGS): Likewise.
2804 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2806 * nat/linux-ptrace.h [__alpha__]
2807 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2810 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2812 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2813 the endianness selected.
2814 * NEWS: Document `set endian auto' mode operation update.
2816 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2818 * Makefile.in: Add new header.
2819 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2820 (sve_vl_from_vg): Likewise.
2821 (sve_vq_from_vl): Likewise.
2822 (sve_vl_from_vq): Likewise.
2823 (sve_vq_from_vg): Likewise.
2824 (sve_vg_from_vq): Likewise.
2825 * configure.nat: Add new c file.
2826 * nat/aarch64-sve-linux-ptrace.c: New file.
2827 * nat/aarch64-sve-linux-ptrace.h: New file.
2829 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2831 * aarch64-linux-nat.c (aarch64_linux_read_description):
2833 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2835 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2836 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2837 (aarch64_gdbarch_init): Add parmeter zero.
2838 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2839 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2840 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2842 * doc/gdb.texinfo: Describe SVE feature
2843 * features/aarch64-sve.c: New file.
2845 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2848 * gdbarch.sh (significant_addr_bit): Default to zero when
2849 not set by target architecture.
2850 * gdbarch.c: Re-generated.
2851 * utils.c (address_significant): Update.
2853 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2855 * stack.c (func_command): Remove trailing newline in call to error.
2857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2859 * regcache.h (regcache_raw_collect): Remove, update callers to
2860 use regcache::raw_collect.
2861 * regcache.c (regcache_raw_collect): Remove.
2863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2865 * regcache.h (regcache_raw_supply): Remove, update callers to
2866 use detached_regcache::raw_supply.
2867 * regcache.c (regcache_raw_supply): Remove.
2869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2871 * regcache.h (regcache_cooked_write_part): Remove, update
2872 callers to use regcache::cooked_write_part.
2873 * regcache.c (regcache_cooked_write_part): Remove.
2875 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2877 * regcache.h (regcache_cooked_read_part): Remove, update callers
2878 to use readable_regcache::cooked_read_part.
2879 * regcache.c (regcache_cooked_read_part): Remove.
2881 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2883 * regcache.h (regcache_cooked_read_value): Remove, update
2884 callers to use readable_regcache::cooked_read_value.
2885 * regcache.c (regcache_cooked_read_value): Remove.
2887 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2889 * regcache.h (regcache_cooked_write): Remove, update callers to
2890 use regcache::cooked_write.
2891 * regcache.c (regcache_cooked_write): Remove.
2893 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2895 * regcache.h (regcache_invalidate): Remove, update callers to
2896 use detached_regcache::invalidate instead.
2897 * regcache.c (regcache_invalidate): Remove.
2899 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2901 * regcache.h (regcache_raw_write_part): Remove, update callers
2902 to use regcache::raw_write_part instead.
2903 * regcache.c (regcache_raw_write_part): Remove.
2905 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2907 * regcache.h (regcache_raw_read_part): Remove, update callers to
2908 use readable_regcache::raw_read_part instead.
2909 * regcache.c (regcache_raw_read_part): Remove.
2911 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2913 * regcache.h (regcache_cooked_read): Remove, update callers to
2914 use readable_regcache::cooked_read instead.
2915 * regcache.c (regcache_cooked_read): Remove.
2917 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2919 * regcache.h (regcache_raw_write): Remove, update callers to use
2920 regcache::raw_write instead.
2921 * regcache.c (regcache_raw_write): Remove.
2923 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2925 * regcache.h (regcache_raw_read): Remove, update callers to use
2926 readable_regcache::raw_read instead.
2927 * regcache.c (regcache_raw_read): Remove.
2929 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2931 * regcache.h (regcache_raw_update): Remove, update callers to
2932 use readable_regcache::raw_update instead.
2933 * regcache.c (regcache_raw_update): Remove.
2935 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2937 * regcache.h (regcache_register_status): Remove, update callers
2938 to use reg_buffer::get_register_status directly instead.
2939 * regcache.c (regcache_register_status): Remove.
2941 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2943 * regcache.h (regcache_get_ptid): Remove, update all callers to
2944 call regcache::ptid instead.
2945 * regcache.c (regcache_get_ptid): Remove.
2947 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2949 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2951 2018-05-30 Pedro Alves <palves@redhat.com>
2953 * common/common-exceptions.h (exception_rethrow): Use
2956 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2958 * breakpoint.c (print_solib_event, check_status_catch_solib):
2959 Remove struct keyword in range-based for loops.
2960 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2961 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2963 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2965 * symfile.c (addr_info_make_relative): Likewise.
2966 * thread.c (value_in_thread_stack_temporaries): Likewise.
2968 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2971 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2972 aggregate type to get its real type before accessing it.
2974 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2976 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2977 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2978 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2979 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2980 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2981 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2982 * printcmd.c (info_address_command): Likewise.
2984 2018-05-29 Tom Tromey <tom@tromey.com>
2986 * windows-nat.c (handle_exception): Update fall-through comment.
2988 2018-05-29 Tom Tromey <tom@tromey.com>
2990 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2991 (struct program_space) <added_solibs>: Now a std::vector.
2992 * breakpoint.c (print_solib_event): Update.
2993 (check_status_catch_solib): Update.
2994 * progspace.c (clear_program_space_solib_cache): Update.
2995 * solib.c (update_solib_list): Update.
2997 2018-05-29 Tom Tromey <tom@tromey.com>
2999 * python/py-type.c (typy_richcompare): Update.
3000 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3001 * gdbtypes.h (types_deeply_equal): Return bool.
3002 (types_equal): Likewise.
3003 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3005 (check_types_equal): Change worklist to std::vector. Return
3007 (struct type_equality_entry): Add constructor.
3008 (compare_maybe_null_strings): Return bool.
3009 (check_types_worklist): Return bool. Change worklist to
3011 (types_deeply_equal): Use std::vector.
3012 (types_equal): Return bool.
3013 (compare_maybe_null_strings): Simplify.
3015 2018-05-29 Tom Tromey <tom@tromey.com>
3017 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3019 2018-05-29 Tom Tromey <tom@tromey.com>
3021 * objc-lang.h: Don't include cp-support.h.
3022 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3025 2018-05-27 Tom Tromey <tom@tromey.com>
3027 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3029 2018-05-25 Tom Tromey <tom@tromey.com>
3031 * value.c (value::location): Initialize.
3033 2018-05-25 Tom Tromey <tom@tromey.com>
3035 * dbxread.c (init_bincl_list): Remove.
3036 (bincl_list): Now a std::vector.
3037 (bincls_allocated, next_bincl): Remove.
3038 (free_bincl_list, do_free_bincl_list_cleanup)
3039 (make_cleanup_free_bincl_list): Remove.
3040 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3042 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3043 (struct header_file_location): Add constructor.
3044 (add_bincl_to_list): Remove.
3046 2018-05-25 Tom Tromey <tom@tromey.com>
3048 * tui/tui.c (tui_enable): Update.
3049 * mi/mi-interp.c (mi_interp::init): Update.
3050 * interps.h (class interp) <name>: New method.
3051 <m_name>: Rename from name.
3052 (~scoped_restore_interp): Update.
3053 * interps.c (interp::interp): Update.
3054 (interp_add, interp_set, interp_lookup_existing)
3055 (current_interp_named_p): Update.
3057 2018-05-25 Tom Tromey <tom@tromey.com>
3059 * interps.c (interp_name): Remove.
3060 * mi/mi-interp.c (mi_interp::init): Update.
3061 * interps.h (interp_name): Remove.
3062 (~scoped_restore_interp): Update.
3063 * tui/tui.c (tui_enable): Update.
3065 2018-05-25 Tom Tromey <tom@tromey.com>
3067 * utils.c (fputs_maybe_filtered): Update.
3068 * linespec.c (decode_line_full): Update.
3069 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3070 (mi_print_breakpoint_for_event, mi_solib_loaded)
3071 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3072 (mi_user_selected_context_changed): Update.
3073 * mi/mi-main.c (mi_execute_command): Update.
3074 * cli/cli-script.c (execute_control_command): Update.
3075 * python/python.c (execute_gdb_command): Update.
3076 * solib.c (info_sharedlibrary_command): Update.
3077 * interps.c (interp_ui_out): Remove.
3078 * interps.h (interp_ui_out): Remove.
3080 2018-05-25 Tom Tromey <tom@tromey.com>
3082 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3083 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3084 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3086 2018-05-25 Tom Tromey <tom@tromey.com>
3088 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3089 * interps.c (interp_exec): Use scoped_restore.
3091 2018-05-25 Tom Tromey <tom@tromey.com>
3093 * remote.c (remote_target::remote_file_get): Use
3095 (remote_target::remote_file_put): Likewise.
3097 2018-05-25 Tom Tromey <tom@tromey.com>
3099 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3101 (get_pe_section_index, add_pe_exported_sym): Update.
3102 (read_pe_exported_syms): Use gdb::def_vector.
3104 2018-05-25 Tom Tromey <tom@tromey.com>
3106 * frame.c (remove_prev_frame): Remove.
3107 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3109 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3111 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3113 * mips-linux-nat.c (supply_fpregset): Always call
3114 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3115 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3116 `mips_fill_fpregset'.
3117 * mips-linux-tdep.c (mips_supply_fpregset)
3118 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3119 (mips_fill_fpregset_wrapper): Remove functions.
3120 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3121 (mips_linux_fpregset): Remove variable.
3122 (mips_linux_iterate_over_regset_sections): Use
3123 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3124 (mips_linux_o32_sigframe_init): Remove comment.
3126 2018-05-25 Pedro Alves <palves@redhat.com>
3128 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3129 (struct readahead_cache, struct packet_reg, struct
3130 remote_arch_state, class remote_state): Move higher up in the
3132 (remote_target::m_remote_state): Now an object instead of a pointer.
3133 (remote_target::get_remote_state): Adjust.
3135 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3137 * stack.c (select_and_print_frame): Delete.
3138 (struct function_bounds): Move struct within function.
3139 (func_command): Most content moved into new function
3140 find_frame_for_function, use new function, print result, add
3142 (find_frame_for_function): New function, now returns a result.
3144 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3146 * stack.c (iterate_over_block_arg_vars): Fix comment.
3147 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3149 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3153 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3155 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3157 * frame.h (class scoped_restore_selected_frame): New class.
3158 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3159 of any exception, use scoped_restore_selected_frame to restore the
3162 2018-05-24 Pedro Alves <palves@redhat.com>
3164 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3167 2018-05-23 Tom Tromey <tom@tromey.com>
3169 * complaints.c (struct complaints): Remove.
3170 (symfile_complaint_book): Remove.
3171 (series): New global.
3172 (complaint_internal): Update.
3173 (clear_complaints): Update.
3175 2018-05-23 Tom Tromey <tom@tromey.com>
3177 * complaints.c (counters): New global.
3178 (struct complain): Remove.
3179 (struct complaints) <root>: Remove.
3180 (complaint_sentinel): Remove.
3181 (symfile_complaint_book): Update.
3182 (find_complaint) Remove.
3183 (complaint_internal, clear_complaints): Update.
3185 2018-05-23 Tom Tromey <tom@tromey.com>
3187 * complaints.c (struct complain) <file, line>: Remove.
3188 (find_complaint): Remove file, line parameters.
3189 (complaint_internal): Update.
3191 2018-05-23 Tom Tromey <tom@tromey.com>
3193 * complaints.c (vcomplaint): Remove.
3194 (complaint_internal) Merge in contents of vcomplaint.
3196 2018-05-23 Tom Tromey <tom@tromey.com>
3198 * complaints.c (struct complaints) <explanation>: Remove.
3199 (symfile_explanations): Remove.
3200 (symfile_complaint_book): Update.
3201 (vcomplaint): Update.
3202 (struct explanation): Remove.
3204 2018-05-23 Tom Tromey <tom@tromey.com>
3206 * complaints.c (symfile_complaints): Remove.
3207 (complaint_internal): Remove "complaints" parameter.
3208 (clear_complaints, vcomplaint): Remove "c" parameter.
3209 (get_complaints): Remove.
3210 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3211 (dwarf2_debug_line_missing_file_complaint)
3212 (dwarf2_debug_line_missing_end_sequence_complaint)
3213 (dwarf2_complex_location_expr_complaint)
3214 (dwarf2_const_value_length_mismatch_complaint)
3215 (dwarf2_section_buffer_overflow_complaint)
3216 (dwarf2_macro_malformed_definition_complaint)
3217 (dwarf2_invalid_attrib_class_complaint)
3218 (create_addrmap_from_index, dw2_symtab_iter_next)
3219 (dw2_expand_marked_cus)
3220 (dw2_debug_names_iterator::find_vec_in_debug_names)
3221 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3222 (create_debug_type_hash_table, init_cutu_and_read_dies)
3223 (partial_die_parent_scope, add_partial_enumeration)
3224 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3225 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3226 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3227 (create_cus_hash_table, create_dwp_hash_table)
3228 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3229 (dwarf2_rnglists_process, dwarf2_ranges_process)
3230 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3231 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3232 (handle_struct_member_die, process_structure_scope)
3233 (read_array_type, read_common_block, read_module_type)
3234 (read_tag_pointer_type, read_typedef, read_base_type)
3235 (read_subrange_type, load_partial_dies, partial_die_info::read)
3236 (partial_die_info::read, partial_die_info::read)
3237 (partial_die_info::read, read_checked_initial_length_and_offset)
3238 (dwarf2_string_attr, read_formatted_entries)
3239 (dwarf_decode_line_header)
3240 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3241 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3242 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3243 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3244 (get_signatured_type, get_DW_AT_signature_type)
3245 (decode_locdesc, file_file_name, consume_improper_spaces)
3246 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3247 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3248 (dwarf2_symbol_mark_computed, set_die_type)
3249 (read_attribute_value): Update.
3250 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3252 * dbxread.c (unknown_symtype_complaint)
3253 (lbrac_mismatch_complaint, repeated_header_complaint)
3254 (set_namestring, function_outside_compilation_unit_complaint)
3255 (read_dbx_symtab, process_one_symbol): Update.
3256 * gdbtypes.c (stub_noname_complaint): Update.
3257 * windows-nat.c (handle_unload_dll): Update.
3258 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3259 (decode_base_type): Update.
3260 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3261 (eb_complaint, record_include_begin, record_include_end)
3262 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3263 (process_xcoff_symbol, read_symbol)
3264 (function_outside_compilation_unit_complaint)
3265 (scan_xcoff_symtab): Update.
3266 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3267 * buildsym.c (finish_block_internal, make_blockvector)
3268 (end_symtab_get_static_block, augment_type_symtab): Update.
3269 * dtrace-probe.c (dtrace_process_dof)
3270 (dtrace_static_probe_ops::get_probes): Update.
3271 * complaints.h (struct complaint): Don't declare.
3272 (symfile_complaints): Remove.
3273 (complaint_internal): Remove "complaints" parameter.
3274 (complaint): Likewise.
3275 (clear_complaints): Likewise.
3276 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3277 (reread_symbols): Update.
3278 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3279 (dwarf2_frame_cache, decode_frame_entry): Update.
3280 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3281 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3282 (info_selectors_command): Update.
3283 * macrotab.c (macro_include, check_for_redefinition)
3284 (macro_undef): Update.
3285 * objfiles.c (filter_overlapping_sections): Update.
3286 * stabsread.c (invalid_cpp_abbrev_complaint)
3287 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3288 (define_symbol, error_type, read_type, rs6000_builtin_type)
3289 (stabs_method_name_from_physname, read_member_functions)
3290 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3291 (attach_fields_to_type, complain_about_struct_wipeout)
3292 (read_range_type, read_args, common_block_start)
3293 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3295 * mdebugread.c (index_complaint, unknown_ext_complaint)
3296 (basic_type_complaint, bad_tag_guess_complaint)
3297 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3298 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3299 (parse_procedure, parse_lines)
3300 (function_outside_compilation_unit_complaint)
3301 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3302 (bad_tag_guess_complaint, reg_value_complaint): Update.
3303 * cp-support.c (demangled_name_complaint): Update.
3304 * macroscope.c (sal_macro_scope): Update.
3305 * dwarf-index-write.c (class debug_names): Update.
3307 2018-05-23 Tom Tromey <tom@tromey.com>
3309 * complaints.c (clear_complaints): Remove "noisy" parameter.
3310 * complaints.h (clear_complaints): Update.
3311 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3312 (reread_symbols): Update.
3314 2018-05-23 Tom Tromey <tom@tromey.com>
3316 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3318 (vcomplaint, clear_complaints): Update.
3319 (symfile_explanations): Remove some messages.
3321 2018-05-23 Tom Tromey <tom@tromey.com>
3323 * complaints.c (internal_complaint): Remove.
3324 * complaints.h (internal_complaint): Remove.
3326 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3328 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3330 2018-05-22 Pedro Alves <palves@redhat.com>
3332 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3333 (remote_fileio_badfd, remote_fileio_return_errno)
3334 (remote_fileio_return_success, remote_fileio_func_open)
3335 (remote_fileio_func_open, remote_fileio_func_close)
3336 (remote_fileio_func_read, remote_fileio_func_write)
3337 (remote_fileio_func_lseek, remote_fileio_func_rename)
3338 (remote_fileio_func_unlink, remote_fileio_func_stat)
3339 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3340 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3341 remote_target parameter.
3342 (remote_fio_func_map) <func>: Add remote_target parameter.
3343 (do_remote_fileio_request, remote_fileio_request):
3344 * remote-fileio.h (remote_fileio_request):
3345 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3346 remote_target parameter.
3347 (remote_notif_process, handle_notification): Adjust to pass down
3349 (remote_notif_state_allocate): Add remote_target parameter. Save
3351 * remote-notif.h (struct remote_target): Forward declare.
3352 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3353 remote_target parameter.
3354 (struct remote_notif_state) <remote>: New field.
3355 (remote_notif_ack, remote_notif_parse): Add remote_target
3357 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3358 remote_target parameter.
3359 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3360 (threads_listing_context, rmt_thread_action, protocol_feature)
3361 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3362 (packet_result, struct threads_listing_context, remote_state):
3363 Move definitions and declarations higher up.
3364 (remote_target) <~remote_target>: Declare.
3365 (remote_download_command_source, remote_file_put, remote_file_get)
3366 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3367 (remote_hostio_pread_vFile, remote_hostio_send_command)
3368 (remote_hostio_set_filesystem, remote_hostio_open)
3369 (remote_hostio_close, remote_hostio_unlink, remote_state)
3370 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3371 (get_memory_write_packet_size, get_memory_read_packet_size)
3372 (append_pending_thread_resumptions, remote_detach_1)
3373 (append_resumption, remote_resume_with_vcont)
3374 (add_current_inferior_and_thread, wait_ns, wait_as)
3375 (process_stop_reply, remote_notice_new_inferior)
3376 (process_initial_stop_replies, remote_add_thread)
3377 (btrace_sync_conf, remote_btrace_maybe_reopen)
3378 (remove_new_fork_children, kill_new_fork_children)
3379 (discard_pending_stop_replies, stop_reply_queue_length)
3380 (check_pending_events_prevent_wildcard_vcont)
3381 (discard_pending_stop_replies_in_queue, stop_reply)
3382 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3383 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3384 (remote_interrupt_as, remote_interrupt_ns)
3385 (remote_get_noisy_reply, remote_query_attached)
3386 (remote_add_inferior, remote_current_thread, get_current_thread)
3387 (set_thread, set_general_thread, set_continue_thread)
3388 (set_general_process, write_ptid)
3389 (remote_unpack_thread_info_response, remote_get_threadinfo)
3390 (parse_threadlist_response, remote_get_threadlist)
3391 (remote_threadlist_iterator, remote_get_threads_with_ql)
3392 (remote_get_threads_with_qxfer)
3393 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3394 (get_offsets, remote_check_symbols, remote_supported_packet)
3395 (remote_query_supported, remote_packet_size)
3396 (remote_serial_quit_handler, remote_detach_pid)
3397 (remote_vcont_probe, remote_resume_with_hc)
3398 (send_interrupt_sequence, interrupt_query)
3399 (remote_notif_get_pending_events, fetch_register_using_p)
3400 (send_g_packet, process_g_packet, fetch_registers_using_g)
3401 (store_register_using_P, store_registers_using_G)
3402 (set_remote_traceframe, check_binary_download)
3403 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3404 (remote_xfer_live_readonly_partial, remote_read_bytes)
3405 (remote_send_printf, remote_flash_write, readchar)
3406 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3407 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3408 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3409 (extended_remote_disable_randomization, extended_remote_run)
3410 (send_environment_packet, extended_remote_environment_support)
3411 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3412 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3413 (packet_command): Now methods of ...
3414 (remote_target): ... this class.
3415 (m_remote_state) <remote_target>: New field.
3416 (struct remote_state) <stop_reply_queue,
3417 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3419 (remote_state::remote_state): Allocate stop_reply_queue.
3420 (remote_state): Delete global.
3421 (get_remote_state_raw): Delete.
3422 (remote_target::get_remote_state): Allocate m_remote_state on
3424 (get_current_remote_target): New.
3425 (remote_ops, extended_remote_ops): Delete.
3426 (wait_forever_enabled_p, remote_async_inferior_event_token):
3427 Delete, moved to struct remote_state.
3428 (remote_target::close): Delete self. Destruction bits split to
3430 (remote_target::~remote_target): ... this.
3431 (show_memory_packet_size): Adjust to use
3432 get_current_remote_target.
3433 (struct protocol_feature) <func>: Add remote_target parameter.
3434 All callers adjusted.
3435 (curr_quit_handler_target): New.
3436 (remote_serial_quit_handler): Reimplement.
3437 (remote_target::open_1): Adjust to use get_current_remote_target.
3438 Heap-allocate remote_target/extended_remote_target instances.
3439 (vcont_builder::vcont_builder): Add remote_target parameter, and
3440 save it in m_remote. All callers adjusted.
3441 (vcont_builder::m_remote): New field.
3442 (vcont_builder::restart, vcont_builder::flush)
3443 (vcont_builder::push_action): Use it.
3444 (remote_target::commit_resume): Use it.
3445 (struct queue_iter_param) <remote>: New field.
3446 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3447 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3448 (check_pending_event_prevents_wildcard_vcont_callback)
3449 (remote_target::check_pending_events_prevent_wildcard_vcont)
3450 (remote_target::discard_pending_stop_replies)
3451 (remote_target::discard_pending_stop_replies_in_queue)
3452 (remote_target::remote_notif_remove_queued_reply): Fill in
3454 (remote_notif_get_pending_events): New.
3455 (remote_target::readchar, remote_target::remote_serial_write):
3456 Save/restore curr_quit_handler_target.
3458 (kill_new_fork_children): Fill in 'remote' field.
3459 (packet_command): Use get_current_remote_target, defer to
3460 remote_target method of same name.
3461 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3462 parameter, and save it in m_remote. All callers adjusted.
3463 (scoped_remote_fd::release): Use m_remote.
3464 (scoped_remote_fd::m_remote): New field.
3465 (remote_file_put, remote_file_get, remote_file_delete): Use
3466 get_current_remote_target, defer to remote_target method of same
3468 (remote_btrace_reset): Add remote_state paremeter. Update all
3470 (remote_async_inferior_event_handler). Pass down 'data'.
3471 (remote_new_objfile): Use get_current_remote_target.
3472 (remote_target::vcont_r_supported): New.
3473 (set_range_stepping): Use get_current_remote_target and
3474 remote_target::vcont_r_supported.
3475 (_initialize_remote): Don't allocate 'remote_state' and
3476 'stop_reply_queue' globals.
3477 * remote.h (struct remote_target): Forward declare.
3478 (getpkt, putpkt, remote_notif_get_pending_events): Add
3479 'remote_target' parameter.
3481 2018-05-22 Pedro Alves <palves@redhat.com>
3483 * remote.c (vcont_builder): Now a class. Make all data members
3485 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3487 (vcont_builder_restart): Rename to ...
3488 (vcont_builder::restart): ... this.
3489 (vcont_builder_flush): Rename to ...
3490 (vcont_builder::flush): ... this.
3491 (vcont_builder_push_action): Rename to ...
3492 (vcont_builder::push_action): ... this.
3493 (remote_target::commit_resume): Adjust.
3495 2018-05-22 Pedro Alves <palves@redhat.com>
3497 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3498 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3499 (get_fixed_memory_packet_size): New.
3500 (get_memory_packet_size): Use it.
3501 (set_memory_packet_size): Don't override the config size with
3502 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3503 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3504 Don't refer to get_memory_packet_size if not connected to a remote
3505 target. Show "(default)" if configured size is 0.
3507 2018-05-22 Pedro Alves <palves@redhat.com>
3509 * remote.c (remote_target::mourn_inferior): Move
3510 discard_pending_stop_replies call here from ...
3511 (_initialize_remote): ... here.
3513 2018-05-22 Pedro Alves <palves@redhat.com>
3515 * remote.c (compare_section_command): Remove set_general_process
3518 2018-05-22 Pedro Alves <palves@redhat.com>
3520 * remote.c (struct packet_reg, struct remote_arch_state):
3521 Move higher up in the file.
3522 (remote_state) <m_arch_states>: Store remote_arch_state values
3523 instead of remote_arch_state pointers.
3524 (remote_state::get_remote_arch_state): Adjust.
3526 2018-05-22 Pedro Alves <palves@redhat.com>
3528 * remote.c: Include <unordered_map>.
3529 (remote_state): Now a class.
3530 (remote_state) <get_remote_arch_state>: Declare method.
3531 <get_remote_arch_state>: New field.
3532 (remote_arch_state) <remote_arch_state>: Declare ctor.
3533 <regs>: Now a unique_ptr.
3534 (remote_gdbarch_data_handle): Delete.
3535 (get_remote_arch_state): Delete.
3536 (remote_state::get_remote_arch_state): New.
3537 (get_remote_state): Adjust to call remote_state's
3538 get_remote_arch_state method.
3539 (init_remote_state): Delete, bits factored out to ...
3540 (remote_arch_state::remote_arch_state): ... this new method.
3541 (get_remote_packet_size, get_memory_packet_size)
3542 (process_g_packet, remote_target::fetch_registers)
3543 (remote_target::prepare_to_store, store_registers_using_G)
3544 (remote_target::store_registers, remote_target::get_trace_status):
3545 Adjust to call remote_state's method.
3546 (_initialize_remote): Remove reference to
3547 remote_gdbarch_data_handle.
3549 2018-05-22 Pedro Alves <palves@redhat.com>
3551 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3552 pread>: New method declarations.
3553 (remote_target::open_1): Adjust.
3554 (readahead_cache_invalidate): Rename to ...
3555 (readahead_cache::invalidate): ... this, and adjust to be a class
3557 (readahead_cache_invalidate_fd): Rename to ...
3558 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3560 (remote_hostio_pwrite): Adjust.
3561 (remote_hostio_pread_from_cache): Rename to ...
3562 (readahead_cache::pread): ... this, and adjust to be a class
3564 (remote_hostio_close): Adjust.
3566 2018-05-22 Pedro Alves <palves@redhat.com>
3568 * remote.c (remote_hostio_close_cleanup): Delete.
3569 (class scoped_remote_fd): New.
3570 (remote_file_put, remote_file_get): Use it.
3572 2018-05-22 Pedro Alves <palves@redhat.com>
3574 (struct vCont_action_support): Use bool and initialize all fields.
3575 (struct readahead_cache): Initialize all fields.
3576 (remote_state): Use bool and initialize all fields.
3577 (remote_state::remote_state, remote_state::~remote_state): New.
3578 (new_remote_state): Delete.
3579 (_initialize_remote): Use new to allocate remote_state.
3581 2018-05-22 Pedro Alves <palves@redhat.com>
3585 * c-exp.y: Include "c-support.h".
3586 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3587 of tolower. Use c_ident_is_alpha to scan names.
3588 * c-lang.c: Include "c-support.h".
3589 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3590 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3591 * c-support.h: New file, with bits factored out from ...
3592 * cp-name-parser.y: ... this file.
3593 Include "c-support.h".
3594 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3595 c-support.h and renamed.
3596 (symbol_end, yylex): Adjust.
3598 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3600 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3601 parameter type to CORE_ADDR.
3602 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3603 parameter type in declaration to CORE_ADDR.
3604 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3605 target_auxv_search to get AT_HWCAP and use the result to get the
3607 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3608 to CORE_ADDR. Remove the cast of the return value to unsigned
3609 long. Fix error predicate of target_auxv_search.
3610 (ppc_linux_nat_target::read_description): Change the type of the
3611 hwcap variable to CORE_ADDR.
3613 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3615 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3616 if the size of fpscr is larger than 32 bits.
3618 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3620 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3621 (ppc32_linux_vsxregmap): New global.
3622 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3623 regcache_supply_regset, and regcache_collect_regset.
3624 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3625 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3626 (fetch_vsx_register, store_vsx_register): Remove.
3627 (fetch_vsx_registers): Add regno parameter. Get regset using
3628 ppc_linux_vsxregset. Use regset to supply registers.
3629 (store_vsx_registers): Add regno parameter. Get regset using
3630 ppc_linux_vsxregset. Use regset to collect registers.
3631 (fetch_register): Call fetch_vsx_registers instead of
3633 (store_register): Call store_vsx_registers instead of
3635 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3636 new regno parameter.
3637 (store_ppc_registers): Call store_vsx_registers with -1 for the
3638 new regno parameter.
3639 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3640 (ppc_collect_vsxregset): Remove.
3642 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3644 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3646 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3647 for vector register offset fields.
3648 (ppc64_fbsd_reg_offsets): Likewise.
3649 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3650 to vector register offset fields.
3651 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3652 to vector register offset fields.
3653 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3654 vector register offset fields.
3655 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3656 initializers for vector register offset fields.
3657 (rs6000_aix64_reg_offsets): Likewise.
3658 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3659 (ppc_supply_vrregset): Remove.
3660 (ppc_collect_vrregset): Remove.
3661 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3662 (ppc_linux_vrregset) : New function.
3663 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3664 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3665 (ppc32_linux_vrregset): Remove.
3666 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3667 and use result instead of ppc32_linux_vrregset.
3668 (ppc32_linux_reg_offsets): Remove initializers for vector register
3670 (ppc64_linux_reg_offsets): Likewise.
3671 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3672 * ppc-linux-nat.c: Include regset.h.
3673 (gdb_vrregset_t): Adjust comment to account for little-endian
3675 (supply_vrregset, fill_vrregset): Remove.
3676 (fetch_altivec_register, store_altivec_register): Remove.
3677 (fetch_altivec_registers): Add regno parameter. Get regset using
3678 ppc_linux_vrregset. Use regset to supply registers.
3679 (store_altivec_registers): Add regno parameter. Get regset using
3680 ppc_linux_vrregset. Use regset to collect registers.
3681 (fetch_register): Call fetch_altivec_registers instead of
3682 fetch_altivec_register.
3683 (store_register): Call store_altivec_registers instead of
3684 store_altivec_register.
3685 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3686 the new regno parameter.
3687 (store_ppc_registers): Call store_altivec_registers with -1 for
3688 the new regno parameter.
3690 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3692 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3693 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3694 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3695 (gdb_vrregset_t): Change array type size to
3696 PPC_LINUX_SIZEOF_VRREGSET.
3697 (gdb_vsxregset_t): Change array type size to
3698 PPC_LINUX_SIZEOF_VSXREGSET.
3699 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3700 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3701 PPC_LINUX_SIZEOF_VSXREGSET.
3703 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3705 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3706 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3708 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3709 ppc_linux_target_wordsize with tid.
3710 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3712 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3713 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3714 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3715 tid parameter. Remove static specifier.
3716 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3717 (ppc_linux_target_wordsize): New declaration.
3719 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3721 * arch/ppc-linux-common.c: New file.
3722 * arch/ppc-linux-common.h: New file.
3723 * arch/ppc-linux-tdesc.h: New file.
3724 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3725 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3726 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3727 arch/ppc-linux-tdesc.h.
3728 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3729 arch/ppc-linux-tdesc.h.
3730 (ppc_linux_nat_target::read_description): Remove target
3731 description matching code. Fill a ppc_linux_features struct and
3732 call ppc_linux_match_description with it. Move comment about ISA
3733 2.05 to ppc-linux-common.c.
3734 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3735 arch/ppc-linux-tdesc.h.
3736 (ppc_linux_core_read_description): Remove target description
3737 matching code. Fill a ppc_linux_features struct and call
3738 ppc_linux_match_description with it.
3739 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3740 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3741 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3742 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3743 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3744 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3745 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3746 (tdesc_powerpc_e500l): Remove.
3748 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3750 * ada-lang.c (catch_assert_command): Pass empty string instead
3751 of NULL for excep_string argument.
3753 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3755 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3756 the width of the requested register exceeds the width of the
3759 2018-05-21 Tom Tromey <tom@tromey.com>
3761 * printcmd.c (output_command): Remove.
3762 (output_command_const): Rename to output_command.
3763 * valprint.h (output_command): Rename from output_command_const.
3764 * tracepoint.c (trace_dump_actions): Call output_command.
3766 2018-05-21 Tom Tromey <tom@tromey.com>
3768 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3769 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3770 * ada-lang.h (create_ada_exception_catchpoint): Update.
3771 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3773 (create_excep_cond_exprs, ~ada_catchpoint)
3774 (should_stop_exception, print_one_exception)
3775 (print_mention_exception, print_recreate_exception): Update.
3776 (ada_get_next_arg): Remove.
3777 (catch_ada_exception_command_split): Use std::string. Change type
3778 of "excep_string", "cond_string".
3779 (catch_ada_exception_command): Update.
3780 (create_ada_exception_catchpoint): Change type of excep_string.
3781 (ada_exception_sal): Remove excep_string parameter.
3782 (~ada_catchpoint): Remove.
3784 2018-05-21 Tom Tromey <tom@tromey.com>
3786 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3789 2018-05-21 Tom Tromey <tom@tromey.com>
3791 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3792 Return unique_xmalloc_ptr.
3793 (print_it_exception): Update.
3795 2018-05-21 Tom Tromey <tom@tromey.com>
3797 * tracepoint.c (trace_dump_actions): Use std::string.
3799 2018-05-21 Tom Tromey <tom@tromey.com>
3801 * symfile.c (reread_symbols): Use std::string for original_name.
3803 2018-05-21 Tom Tromey <tom@tromey.com>
3805 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3806 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3809 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3811 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3813 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3814 * objfiles.c (get_objfile_bfd_data): Allocate
3815 objfile_per_bfd_storage with obstack_new when allocating on
3818 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3820 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3822 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3823 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3824 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3825 (add_pending): Likewise.
3826 (parse_symbol): Likewise.
3827 (parse_partial_symbols): Likewise.
3828 (psymtab_to_symtab_1): Likewise.
3829 (new_psymtab): Likewise.
3830 (elfmdebug_build_psymtabs): Likewise.
3831 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3832 * objfiles.c (get_objfile_bfd_data): Likewise.
3833 (objfile_register_static_link): Likewise.
3834 * psymtab.c (allocate_psymtab): Likewise.
3835 * stabsread.c (read_member_functions): Likewise.
3836 * xcoffread.c (xcoff_end_psymtab): Likewise.
3838 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3840 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3841 compiler supports std::is_trivially_constructible.
3842 * common/poison.h: Include obstack.h.
3843 (IsMallocable): Define to is_trivially_constructible if the
3844 compiler supports it, define to true_type otherwise.
3848 (XOBNEWVEC): Redefine.
3849 * gdb_obstack.h (obstack_zalloc): New.
3850 (OBSTACK_ZALLOC): Redefine.
3851 (obstack_calloc): New.
3852 (OBSTACK_CALLOC): Redefine.
3854 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3855 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3857 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3858 obstack_calloc/obstack_zalloc.
3859 (gdbarch_obstack_zalloc): Remove.
3860 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3862 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3864 * stack.c (backtrace_command_1): Remove useless variable int i.
3866 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3868 * stack.c (print_frame_info): Fix comment.
3870 2018-05-18 Tom Tromey <tom@tromey.com>
3872 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3873 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3874 (~dwarf2_per_objfile): Update
3875 (dwarf2_get_dwz_file): Use new.
3876 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3879 2018-05-18 Tom Tromey <tom@tromey.com>
3881 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3883 * dwarf2read.c (struct dwp_file): Add constructor and
3885 (open_and_init_dwp_file): Return a unique_ptr.
3886 (dwarf2_per_objfile, create_dwp_hash_table)
3887 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3888 (lookup_dwo_unit_in_dwp): Update.
3889 (open_and_init_dwp_file, get_dwp_file): Update.
3891 2018-05-18 Tom Tromey <tom@tromey.com>
3893 * dwarf2read.c (dwarf2_per_objfile): Update.
3894 (struct mapped_index): Add initializers.
3895 (dwarf2_read_index): Use new.
3896 (dw2_symtab_iter_init): Update.
3897 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3900 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3902 * dwarf2read.c (mapped_index) <total_size>: Remove.
3904 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3906 * unittests/format_pieces-selftests.c (test_format_specifier):
3909 2018-05-18 Tom Tromey <tom@tromey.com>
3911 * c-typeprint.c (maybe_print_hole): New function.
3912 (c_print_type_struct_field_offset): Update.
3913 (c_type_print_base_struct_union): Call maybe_print_hole.
3915 2018-05-17 Keith Seitz <keiths@redhat.com>
3917 * breakpoint.c (build_bpstat_chain): New function, moved from
3919 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3920 If no stop chain is passed, call build_bpstat_chain to build it.
3921 * breakpoint.h (build_bpstat_chain): Declare.
3922 (bpstat_stop_status): Move documentation here from breakpoint.c.
3923 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3924 build the stop chain and pass it to skip_inline_frames.
3925 Pass this stop chain to bpstat_stop_status.
3926 * inline-frame.c: Include breakpoint.h.
3927 (stopped_by_user_bp_inline_frame): New function.
3928 (skip_inline_frames): Add parameter `stop_chain'.
3929 Move documention to inline-frame.h.
3930 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3931 whether the frame should be elided.
3932 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3933 Add moved documentation and update for new parameter.
3935 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3938 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3939 unittests/format_pieces-selftests.c.
3940 * common/format.h (format_piece) <operator==>: New.
3941 (format_pieces) <operator[]>: Remove.
3942 * common/format.c (format_pieces::format_pieces): Handle \e.
3943 * unittests/format_pieces-selftests.c: New.
3945 2018-05-17 Tom Tromey <tom@tromey.com>
3948 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3949 (dw2_instantiate_symtab): Add skip_partial parameter.
3950 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3951 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3952 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3953 (dw2_expand_symtabs_matching_one)
3954 (dw2_find_pc_sect_compunit_symtab)
3955 (dw2_debug_names_lookup_symbol)
3956 (dw2_debug_names_expand_symtabs_for_function): Update.
3957 (init_cutu_and_read_dies): Add skip_partial parameter.
3958 (process_psymtab_comp_unit, build_type_psymtabs_1)
3959 (process_skeletonless_type_unit, load_partial_comp_unit)
3960 (psymtab_to_symtab_1): Update.
3961 (load_full_comp_unit): Add skip_partial parameter.
3962 (process_imported_unit_die, dwarf2_read_addr_index)
3963 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3964 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3965 (read_signatured_type): Update.
3967 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3969 * value.c (release_value): Remove unused variable.
3970 (record_latest_value): Likewise.
3971 (access_value_history): Likewise.
3972 (preserve_values): Likewise.
3974 2018-05-17 Tom Tromey <tom@tromey.com>
3976 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3979 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3982 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3983 Also handle registers whose width is not a multiple of
3985 (linux_nat_trad_target::store_register): Likewise.
3987 2018-05-16 Tom Tromey <tom@tromey.com>
3989 * gdbcore.h (core_bfd): Redefine.
3990 * corelow.c (core_target::close): Update.
3991 (core_target_open): Update.
3992 * progspace.h (struct program_space) <cbfd>: Now a
3995 2018-05-16 Tom Tromey <tom@tromey.com>
3998 * symfile-add-flags.h (enum symfile_add_flags)
3999 <SYMFILE_NOT_FILENAME>: New constant.
4000 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4001 objfile name from BFD.
4002 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4003 * minidebug.c (find_separate_debug_file_in_section): Put
4004 ".gnu_debugdata" into BFD's file name.
4006 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4008 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4011 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4014 * aarch64-tdep.c (aarch64_analyze_prologue,
4015 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4016 Indicate not interested in errors.
4018 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4020 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4021 Supply the MIPS_ZERO_REGNUM register.
4023 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4025 * mips-tdep.c (mask_address_var): Make variable static.
4027 2018-05-14 Tom Tromey <tom@tromey.com>
4029 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4031 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4033 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4034 FXSAVE_ADDR for the mxcsr register.
4036 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4038 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4040 2018-05-11 Pedro Alves <palves@redhat.com>
4042 * corelow.c (core_target) <core_target>: No longer inline.
4043 Initialize m_core_gdbarch, m_core_vec and build the section table
4045 <~core_target>: New.
4046 <core_gdbarch, get_core_register_section>: New methods.
4047 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4048 factored out from ...
4049 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4051 (sniff_core_bfd): Add gdbarch parameter.
4052 (core_close): Delete, merged into ...
4053 (core_target::close): ... here. Delete self.
4054 (core_close_cleanup): Delete.
4055 (core_target_open): Allocate a core_target on the heap. Use a
4056 unique_ptr instead of a cleanup. Bits moved into the core_target
4057 ctor. Adjust to use core_target methods instead of globals.
4058 (get_core_register_section): Rename to ...
4059 (core_target::get_core_register_section): ... this and adjust.
4060 (struct get_core_registers_cb_data): New.
4061 (get_core_registers_cb): Use it. Use bool.
4062 (core_target::fetch_registers, core_target::files_info)
4063 (core_target::xfer_partial, core_target::read_description)
4064 (core_target::pid_to, core_target::thread_name): Adjust to
4065 reference class fields instead of globals.
4066 * target.h (struct target_ops_deleter, target_ops_up): New.
4068 2018-05-11 Pedro Alves <palves@redhat.com>
4070 * corefile.c (core_file_command): Move to corelow.c.
4071 * corelow.c (the_core_target): Delete.
4072 (core_file_command): Moved from corefile.c. Check exec_bfd
4073 instead of the_core_target. Use target_detach instead of calling
4074 into the_core_target directly.
4075 (maybe_say_no_core_file_now): New.
4076 (core_target::detach): Use it.
4077 (_initialize_corelow): Remove references to the_core_target.
4078 * gdbcore.h (the_core_target): Delete.
4080 2018-05-11 Tom Tromey <tromey@redhat.com>
4081 Pedro Alves <palves@redhat.com>
4083 * corefile.c (core_bfd): Remove.
4084 * gdbcore.h (core_bfd): Now a macro.
4085 * progspace.h (struct program_space) <cbfd>: New field.
4087 2018-05-11 Tom Tromey <tom@tromey.com>
4089 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4092 2018-05-10 Tom Tromey <tom@tromey.com>
4094 * configure: Rebuild.
4095 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4097 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4100 * regformats/regdat.sh: Adjust script, following the addition
4101 of the new expedite_regs parameter to init_target_desc.
4103 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4106 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4107 set_gdbarch_significant_addr_bit.
4108 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4109 set_gdbarch_significant_addr_bit.
4110 * utils.c (address_significant): Update to sign extend addr.
4112 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4114 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4115 (xtensa_linux_init_abi): Limit tdep->num_regs by
4116 tdep->num_nopriv_regs.
4117 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4118 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4121 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4123 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4125 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4127 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4128 (I387_MXCSR_INIT_VAL): New constant.
4129 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4130 buffer if it was supplied by the inferior.
4131 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4132 (i387_xsave_get_clear_bv): New function.
4133 (i387_supply_xsave): Only read x87 control registers from the
4134 xsave buffer if the feature is enabled, and the state will have
4135 been written, otherwise, provide a suitable default.
4136 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4137 including x87 control registers. Update control registers if they
4138 have changed from the default value, and mark features as enabled
4140 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4142 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4144 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4146 2018-05-07 Tom Tromey <tom@tromey.com>
4148 * configure: Rebuild.
4149 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4151 2018-05-07 Tom Tromey <tom@tromey.com>
4154 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4155 bit. Use correct value for VDIV.
4157 2018-05-04 Tom Tromey <tom@tromey.com>
4159 * configure: Rebuild.
4160 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4162 2018-05-04 Tom Tromey <tom@tromey.com>
4164 * linux-record.c (record_linux_system_call) <case
4165 RECORD_SYS_RECVFROM>: Add "break".
4167 2018-05-04 Tom Tromey <tom@tromey.com>
4169 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4170 Add missing "break".
4171 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4172 Add missing "break".
4174 2018-05-04 Tom Tromey <tom@tromey.com>
4176 * rs6000-tdep.c (ppc_process_record_op4)
4177 (ppc_process_record_op63): Add fall-through comment.
4179 2018-05-04 Tom Tromey <tom@tromey.com>
4181 * i386-tdep.c (i386_process_record): Add fall-through comment.
4183 2018-05-04 Tom Tromey <tom@tromey.com>
4185 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4188 2018-05-04 Tom Tromey <tom@tromey.com>
4190 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4191 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4192 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4194 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4196 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4199 2018-05-04 Tom Tromey <tom@tromey.com>
4201 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4203 2018-05-04 Tom Tromey <tom@tromey.com>
4205 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4206 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4207 * symfile.c (section_is_mapped): Fix fall-through comment.
4208 * stabsread.c (define_symbol, read_member_functions): Fix
4209 fall-through comment.
4210 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4212 * remote.c (remote_wait_as): Fix fall-through comment.
4213 * p-exp.y (yylex): Fix fall-through comment.
4214 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4216 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4217 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4218 * jv-exp.y (yylex): Fix fall-through comment.
4219 * go-exp.y (lex_one_token): Fix fall-through comment.
4220 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4221 fall-through comment.
4222 * f-exp.y (yylex): Fix fall-through comment.
4223 * dwarf2read.c (process_die): Fix fall-through comments.
4224 * dbxread.c (process_one_symbol): Fix fall-through comment.
4225 * d-exp.y (lex_one_token): Fix fall-through comment.
4226 * cp-name-parser.y (yylex): Fix fall-through comment.
4227 * coffread.c (coff_symtab_read): Fix fall-through comment.
4228 * c-exp.y (lex_one_token): Fix fall-through comment.
4229 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4231 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4234 2018-05-04 Tom Tromey <tom@tromey.com>
4237 * NEWS: Mention gdb.execute change.
4238 * gdbcmd.h (execute_control_command): Don't declare.
4239 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4240 execute_control_commands, execute_control_commands_to_string.
4241 * cli/cli-script.h (execute_control_commands)
4242 (execute_control_commands_to_string): Declare.
4243 (execute_control_command): Add from_tty parameter.
4244 * cli/cli-script.c (execute_control_commands)
4245 (execute_control_commands_to_string): New functions.
4246 (execute_user_command): Use execute_control_commands.
4247 (execute_control_command_1): Add "from_tty" parameter. Update.
4248 (execute_control_command): Likewise.
4250 2018-05-04 Tom Tromey <tom@tromey.com>
4253 * NEWS: Mention that breakpoint commands are writable.
4254 * python/py-breakpoint.c (bppy_set_commands): New function.
4255 (breakpoint_object_getset) <"commands">: Use it.
4257 2018-05-04 Tom Tromey <tom@tromey.com>
4259 * tracepoint.c (actions_command): Update.
4260 * mi/mi-cmd-break.c (mi_command_line_array)
4261 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4262 (mi_read_next_line): Remove.
4263 (mi_cmd_break_commands): Update.
4264 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4266 * cli/cli-script.c (get_command_line): Update.
4267 (process_next_line): Use function_view. Constify.
4268 (recurse_read_control_structure, read_command_lines)
4269 (read_command_lines_1): Change argument types to function_view.
4270 (do_define_command, document_command): Update.
4271 * breakpoint.h (check_tracepoint_command): Don't declare.
4272 * breakpoint.c (check_tracepoint_command): Remove.
4273 (commands_command_1, create_tracepoint_from_upload): Update.
4275 2018-05-04 Tom Tromey <tom@tromey.com>
4278 * cli/cli-script.h (enum command_control_type) <define_control>:
4280 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4281 (build_command_line, execute_control_command_1)
4282 (process_next_line): Likewise.
4283 (do_define_command): New function, extracted from define_command.
4284 (define_command): Use it.
4286 2018-05-04 Tom Tromey <tom@tromey.com>
4288 * tracepoint.c (actions_command): Update.
4289 * cli/cli-script.h (read_command_lines): Update.
4290 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4291 (MAX_TMPBUF): Remove define.
4292 (define_command): Use string_printf.
4293 (document_command): Likewise.
4294 * breakpoint.c (commands_command_1): Update.
4296 2018-05-04 Tom Tromey <tom@tromey.com>
4298 * top.c (execute_command): Update.
4299 * cli/cli-script.h (print_command_lines): Now varargs.
4300 * cli/cli-script.c (print_command_lines): Now varargs.
4301 (execute_control_command_1) <case while_control, case if_control>:
4304 2018-05-04 Tom Tromey <tom@tromey.com>
4306 * tracepoint.c (all_tracepoint_actions): Rename from
4307 all_tracepoint_actions_and_cleanup. Change return type.
4308 (actions_command, encode_actions_1, encode_actions)
4309 (trace_dump_actions, tdump_command): Update.
4310 * remote.c (remote_download_command_source): Update.
4311 * python/python.c (gdbpy_eval_from_control_command)
4312 (python_command, python_interactive_command): Update.
4313 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4314 * guile/guile.c (guile_command)
4315 (gdbscm_eval_from_control_command, guile_command): Update.
4316 * compile/compile.c (compile_code_command)
4317 (compile_print_command, compile_to_object): Update.
4318 * cli/cli-script.h (struct command_lines_deleter): New.
4319 (counted_command_line): New typedef.
4320 (struct command_line): Add constructor, destructor.
4321 <body_list>: Remove.
4322 <body_list_0, body_list_1>: New members.
4323 (command_line_up): Remove typedef.
4324 (read_command_lines, read_command_lines_1, get_command_line):
4326 (copy_command_lines): Don't declare.
4327 * cli/cli-script.c (build_command_line): Use "new".
4328 (get_command_line): Return counted_command_line.
4329 (print_command_lines, execute_user_command)
4330 (execute_control_command_1, while_command, if_command): Update.
4331 (realloc_body_list): Remove.
4332 (process_next_line, recurse_read_control_structure): Update.
4333 (read_command_lines, read_command_lines_1): Return counted_command_line.
4334 (free_command_lines): Use "delete".
4335 (copy_command_lines): Remove.
4336 (define_command, document_command, show_user_1): Update.
4337 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4338 a counted_command_line.
4339 * breakpoint.h (counted_command_line): Remove typedef.
4340 (breakpoint_set_commands): Update.
4341 * breakpoint.c (check_no_tracepoint_commands)
4342 (validate_commands_for_breakpoint): Update.
4343 (breakpoint_set_commands): Change commands to be a
4344 counted_command_line.
4345 (commands_command_1, update_dprintf_command_list)
4346 (create_tracepoint_from_upload): Update.
4348 2018-05-04 Tom Tromey <tom@tromey.com>
4350 * cli/cli-decode.h (cmd_list_element): New constructor.
4351 (~cmd_list_element): New destructor.
4352 (struct cmd_list_element): Add initializers.
4353 * cli/cli-decode.c (do_add_cmd): Use "new".
4354 (delete_cmd): Use "delete".
4356 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4357 Pedro Alves <palves@redhat.com>
4359 PR breakpoints/19806 and support for PR external/20207.
4360 * NEWS: Mention Aarch64 watchpoint improvements.
4361 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4362 watchpoints and PR external/20207 watchpoints.
4363 * nat/aarch64-linux-hw-point.c
4364 (kernel_supports_any_contiguous_range): New.
4365 (aarch64_watchpoint_offset): New.
4366 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4367 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4368 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4369 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4370 next_addr_orig_p. Support PR external/20207 watchpoints.
4371 (aarch64_downgrade_regs): New.
4372 (aarch64_dr_state_insert_one_point): New parameters offset and
4374 (aarch64_dr_state_remove_one_point): Likewise.
4375 (aarch64_handle_breakpoint): Update caller.
4376 (aarch64_handle_aligned_watchpoint): Likewise.
4377 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4379 (aarch64_linux_set_debug_regs): Remove const from state. Call
4380 aarch64_downgrade_regs.
4381 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4382 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4383 (DR_CONTROL_MASK): ... this.
4384 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4385 (unsigned int aarch64_watchpoint_offset): New prototype.
4386 (aarch64_linux_set_debug_regs): Remove const from state.
4387 * utils.c (align_up, align_down): Move to ...
4388 * common/common-utils.c (align_up, align_down): ... here.
4389 * utils.h (align_up, align_down): Move to ...
4390 * common/common-utils.h (align_up, align_down): ... here.
4392 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4394 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4395 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4396 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4397 Re-implement to match the ABI as summarized in GCC's
4398 gcc/config/sparc/sparc.c. All callers updated.
4399 (sparc32_store_arguments): Remove assertion.
4401 2018-05-04 Tom Tromey <tom@tromey.com>
4403 * printcmd.c: Don't include tui.h.
4404 (decode_format): Use skip_spaces.
4406 2018-05-04 Tom Tromey <tom@tromey.com>
4409 * printcmd.c (last_count): New global.
4410 (x_command): Use saved count when repeating.
4412 2018-05-04 Tom Tromey <tom@tromey.com>
4414 * nto-procfs.c (do_closedir_cleanup): Remove.
4415 (procfs_pidlist): Use gdb_dir_up.
4416 * procfs.c (do_closedir_cleanup): Remove.
4417 (proc_update_threads): Use gdb_dir_up.
4418 * common/filestuff.h (struct gdb_dir_deleter): New.
4419 (gdb_dir_up): New typedef.
4421 2018-05-04 Tom Tromey <tom@tromey.com>
4423 * ada-lang.c (print_mention_exception): Use std::string.
4425 2018-05-04 Tom Tromey <tom@tromey.com>
4427 * ada-lang.c (create_excep_cond_exprs): Update.
4428 (ada_exception_catchpoint_cond_string): Use std::string.
4430 2018-05-04 Tom Tromey <tom@tromey.com>
4432 * ada-lang.c (xget_renaming_scope): Return std::string.
4433 (old_renaming_is_invisible): Update.
4435 2018-05-04 Tom Tromey <tom@tromey.com>
4437 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4438 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4440 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4442 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4444 2018-05-04 Tom Tromey <tom@tromey.com>
4446 * remote.c (remote_query_supported_append): Change type.
4447 (remote_check_symbols): Update.
4449 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4452 * configure.ac: Prepend libpython.
4453 * python/python-config.py: Likewise.
4454 * configure: Regenerate.
4456 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4458 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4460 2018-05-03 Pedro Alves <palves@redhat.com>
4463 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4464 override. Write 'true' instead of '1'.
4465 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4468 2018-05-02 Pedro Alves <palves@redhat.com>
4470 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4471 add_inf_child_target.
4472 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4473 add_inf_child_target.
4474 * aix-thread.c (aix_thread_target_info): New.
4475 (aix_thread_target) <shortname, longname, doc>: Delete.
4477 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4478 add_inf_child_target.
4479 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4480 add_inf_child_target.
4481 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4482 add_inf_child_target.
4483 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4484 add_inf_child_target.
4485 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4486 add_inf_child_target.
4487 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4488 add_inf_child_target.
4489 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4490 add_inf_child_target.
4491 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4492 add_inf_child_target.
4493 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4494 add_inf_child_target.
4495 * bfd-target.c (target_bfd_target_info): New.
4496 (target_bfd) <shortname, longname, doc>: Delete.
4498 * bsd-kvm.c (bsd_kvm_target_info): New.
4499 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4501 (bsd_kvm_target::open): Rename to ...
4502 (bsd_kvm_target_open): ... this. Adjust.
4503 * bsd-uthread.c (bsd_uthread_target_info): New.
4504 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4506 * corefile.c (core_file_command): Adjust.
4507 * corelow.c (core_target_info): New.
4508 (core_target) <shortname, longname, doc>: Delete.
4510 (core_target::open): Rename to ...
4511 (core_target_open): ... this. Adjust.
4512 * ctf.c (ctf_target_info): New.
4513 (ctf_target) <shortname, longname, doc>: Delete.
4515 (ctf_target::open): Rename to ...
4516 (ctf_target_open): ... this.
4517 (_initialize_ctf): Adjust.
4518 * exec.c (exec_target_info): New.
4519 (exec_target) <shortname, longname, doc>: Delete.
4521 (exec_target::open): Rename to ...
4522 (exec_target_open): ... this.
4523 * gdbcore.h (core_target_open): Declare.
4524 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4525 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4526 add_inf_child_target.
4527 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4528 add_inf_child_target.
4529 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4530 add_inf_child_target.
4531 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4532 add_inf_child_target.
4533 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4534 add_inf_child_target.
4535 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4536 add_inf_child_target.
4537 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4538 add_inf_child_target.
4539 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4540 add_inf_child_target.
4541 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4542 add_inf_child_target.
4543 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4544 add_inf_child_target.
4545 * inf-child.c (inf_child_target_info): New.
4546 (inf_child_target::info): New.
4547 (inf_child_open_target): Remove 'target' parameter. Use
4548 get_native_target instead.
4549 (inf_child_target::open): Delete.
4550 (add_inf_child_target): New.
4551 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4554 (add_inf_child_target): Declare.
4555 (inf_child_open_target): Declare.
4556 * linux-thread-db.c (thread_db_target_info): New.
4557 (thread_db_target) <shortname, longname, doc>: Delete.
4559 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4560 add_inf_child_target.
4561 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4562 add_inf_child_target.
4563 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4564 add_inf_child_target.
4565 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4566 add_inf_child_target.
4567 * make-target-delegates (print_class): Adjust.
4568 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4569 add_inf_child_target.
4570 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4571 add_inf_child_target.
4572 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4573 add_inf_child_target.
4574 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4575 add_inf_child_target.
4576 * nto-procfs.c (nto_native_target_info): New.
4577 (nto_procfs_target_native) <shortname, longname, doc>:
4580 (nto_procfs_target_info): New.
4581 (nto_procfs_target_procfs) <shortname, longname, doc>:
4584 (init_procfs_targets): Adjust.
4585 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4586 add_inf_child_target.
4587 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4588 add_inf_child_target.
4589 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4590 add_inf_child_target.
4591 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4592 add_inf_child_target.
4593 * ravenscar-thread.c (ravenscar_target_info): New.
4594 (ravenscar_thread_target) <shortname, longname, doc>:
4597 * record-btrace.c (record_btrace_target_info):
4598 (record_btrace_target) <shortname, longname, doc>: Delete.
4600 (record_btrace_target::open): Rename to ...
4601 (record_btrace_target_open): ... this. Adjust.
4602 * record-full.c (record_longname, record_doc): New.
4603 (record_full_base_target) <shortname, longname, doc>: Delete.
4605 (record_full_target_info): New.
4606 (record_full_target): <shortname>: Delete.
4608 (record_full_core_open_1, record_full_open_1): Update comments.
4609 (record_full_base_target::open): Rename to ...
4610 (record_full_open): ... this.
4611 (cmd_record_full_restore): Update.
4612 (_initialize_record_full): Update.
4613 * remote-sim.c (remote_sim_target_info): New.
4614 (gdbsim_target) <shortname, longname, doc>: Delete.
4616 (gdbsim_target::open): Rename to ...
4617 (gdbsim_target_open): ... this.
4618 (_initialize_remote_sim): Adjust.
4619 * remote.c (remote_doc): New.
4620 (remote_target_info): New.
4621 (remote_target) <shortname, longname, doc>: Delete.
4623 (extended_remote_target_info): New.
4624 (extended_remote_target) <shortname, longname, doc>: Delete.
4626 (remote_target::open_1): Make static. Adjust.
4627 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4628 * s390-linux-nat.c (_initialize_s390_nat): Use
4629 add_inf_child_target.
4630 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4631 add_inf_child_target.
4632 * sol-thread.c (thread_db_target_info): New.
4633 (sol_thread_target) <shortname, longname, doc>: Delete.
4635 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4636 add_inf_child_target.
4637 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4638 add_inf_child_target.
4639 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4640 add_inf_child_target.
4641 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4642 add_inf_child_target.
4643 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4644 add_inf_child_target.
4645 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4646 add_inf_child_target.
4647 * spu-linux-nat.c (_initialize_spu_nat): Use
4648 add_inf_child_target.
4649 * spu-multiarch.c (spu_multiarch_target_info): New.
4650 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4652 * target-delegates.c: Regenerate.
4653 * target.c: Include <unordered_map>.
4654 (target_ops_p): Delete.
4655 (DEF_VEC_P(target_ops_p)): Delete.
4656 (target_factories): New.
4657 (test_target_info): New.
4658 (test_target_ops::info): New.
4659 (open_target): Adjust to use target_factories.
4660 (add_target_with_completer): Rename to ...
4661 (add_target): ... this. Change prototype. Register target_info
4662 and open callback in target_factories. Register target_info in
4663 command context instead of target_ops.
4664 (add_target): Delete old implementation.
4665 (add_deprecated_target_alias): Change prototype. Adjust.
4666 (the_native_target): New.
4667 (set_native_target, get_native_target): New.
4668 (find_default_run_target): Use the_native_target.
4669 (find_attach_target, find_run_target): Simplify.
4670 (target_ops::open): Delete.
4671 (dummy_target_info): New.
4672 (dummy_target::shortname, dummy_target::longname)
4673 (dummy_target::doc): Delete.
4674 (dummy_target::info): New.
4675 (debug_target::shortname, debug_target::longname)
4676 (debug_target::doc): Delete.
4677 (debug_target::info): New.
4678 * target.h (struct target_info): New.
4679 (target_ops::~target_ops): Add comment.
4680 (target_ops::info): New.
4681 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4682 longer virtual. Implement in terms of target_info.
4683 (set_native_target, get_native_target): Declare.
4684 (target_open_ftype): New.
4685 (add_target, add_target_with_completer)
4686 (add_deprecated_target_alias): Change prototype.
4687 (test_target) <shortname, longname, doc>: Delete.
4689 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4690 add_inf_child_target.
4691 * tracefile-tfile.c (tfile_target_info): New.
4692 (tfile_target) <shortname, longname, doc>: Delete.
4694 (tfile_target::open): Rename to ...
4695 (tfile_target_open): ... this.
4696 (_initialize_tracefile_tfile): Adjust.
4697 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4698 add_inf_child_target.
4699 * windows-nat.c (_initialize_windows_nat): Use
4700 add_inf_child_target.
4701 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4702 add_inf_child_target.
4704 2018-05-02 Pedro Alves <palves@redhat.com>
4706 * linux-nat.h (linux_nat_target) <low_new_thread,
4707 low_delete_thread, low_new_fork, low_forget_process,
4708 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4709 New virtual methods.
4710 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4711 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4712 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4713 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4714 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4716 * linux-fork.c (delete_fork): Adjust to call low method.
4717 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4718 (linux_nat_new_fork, linux_nat_forget_process_hook)
4719 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4720 (linux_nat_status_is_event):
4721 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4722 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4724 (sigtrap_is_event): Rename to ...
4725 (linux_nat_target::low_status_is_event): ... this.
4726 (linux_nat_set_status_is_event): Delete.
4727 (save_stop_reason, linux_nat_wait_1)
4728 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4730 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4731 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4732 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4733 (linux_nat_set_prepare_to_resume): Delete.
4734 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4735 low virtual methods.
4736 * amd64-linux-nat.c: Likewise.
4737 * arm-linux-nat.c: Likewise.
4738 * i386-linux-nat.c: Likewise.
4739 * ia64-linux-nat.c: Likewise.
4740 * mips-linux-nat.c: Likewise.
4741 * ppc-linux-nat.c: Likewise.
4742 * s390-linux-nat.c: Likewise.
4743 * sparc64-linux-nat.c: Likewise.
4744 * x86-linux-nat.c: Likewise.
4745 * x86-linux-nat.h: Include "nat/x86-linux.h".
4746 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4747 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4750 2018-05-02 Pedro Alves <palves@redhat.com>
4752 * target.h (target_ops)
4753 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4754 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4755 stopped_by_watchpoint, have_continuable_watchpoint,
4756 stopped_data_address, watchpoint_addr_within_range,
4757 can_accel_watchpoint_condition, can_run, thread_alive,
4758 has_all_memory, has_memory, has_stack, has_registers,
4759 has_execution, can_async_p, is_async_p, supports_non_stop,
4760 always_non_stop_p, can_execute_reverse, supports_multi_process,
4761 supports_enable_disable_tracepoint,
4762 supports_disable_randomization, supports_string_tracing,
4763 supports_evaluation_of_breakpoint_conditions,
4764 can_run_breakpoint_commands, filesystem_is_local,
4765 can_download_tracepoint, get_trace_state_variable_value,
4766 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4767 record_is_replaying, record_will_replay,
4768 augmented_libraries_svr4_read>: Adjust to return bool.
4769 * aarch64-linux-nat.c: All implementations adjusted.
4770 * aix-thread.c: All implementations adjusted.
4771 * arm-linux-nat.c: All implementations adjusted.
4772 * breakpoint.c: All implementations adjusted.
4773 * bsd-kvm.c: All implementations adjusted.
4774 * bsd-uthread.c: All implementations adjusted.
4775 * corelow.c: All implementations adjusted.
4776 * ctf.c: All implementations adjusted.
4777 * darwin-nat.c: All implementations adjusted.
4778 * darwin-nat.h: All implementations adjusted.
4779 * exec.c: All implementations adjusted.
4780 * fbsd-nat.c: All implementations adjusted.
4781 * fbsd-nat.h: All implementations adjusted.
4782 * gnu-nat.c: All implementations adjusted.
4783 * gnu-nat.h: All implementations adjusted.
4784 * go32-nat.c: All implementations adjusted.
4785 * ia64-linux-nat.c: All implementations adjusted.
4786 * inf-child.c: All implementations adjusted.
4787 * inf-child.h: All implementations adjusted.
4788 * inf-ptrace.c: All implementations adjusted.
4789 * inf-ptrace.h: All implementations adjusted.
4790 * linux-nat.c: All implementations adjusted.
4791 * linux-nat.h: All implementations adjusted.
4792 * mips-linux-nat.c: All implementations adjusted.
4793 * nto-procfs.c: All implementations adjusted.
4794 * ppc-linux-nat.c: All implementations adjusted.
4795 * procfs.c: All implementations adjusted.
4796 * ravenscar-thread.c: All implementations adjusted.
4797 * record-btrace.c: All implementations adjusted.
4798 * record-full.c: All implementations adjusted.
4799 * remote-sim.c: All implementations adjusted.
4800 * remote.c: All implementations adjusted.
4801 * s390-linux-nat.c: All implementations adjusted.
4802 * sol-thread.c: All implementations adjusted.
4803 * spu-multiarch.c: All implementations adjusted.
4804 * target-delegates.c: All implementations adjusted.
4805 * target.c: All implementations adjusted.
4806 * target.h: All implementations adjusted.
4807 * tracefile-tfile.c: All implementations adjusted.
4808 * tracefile.c: All implementations adjusted.
4809 * tracefile.h: All implementations adjusted.
4810 * windows-nat.c: All implementations adjusted.
4811 * x86-linux-nat.h: All implementations adjusted.
4812 * x86-nat.h: All implementations adjusted.
4814 2018-05-02 Pedro Alves <palves@redhat.com>
4816 * make-target-delegates (scan_target_h): Don't trim lines here.
4817 Replace sequences of tabs and/or whitespace with a single
4819 (top level, parsing methods): Trim each line before processing it
4822 2018-05-02 Pedro Alves <palves@redhat.com>
4823 John Baldwin <jhb@freebsd.org>
4825 * target.h (enum strata) <debug_stratum>: New.
4826 (struct target_ops) <all delegation methods>: Replace by C++
4827 virtual methods, and drop "to_" prefix. All references updated
4829 <to_shortname, to_longname, to_doc, to_data,
4830 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4831 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4832 virtual methods. All references updated throughout.
4833 <can_attach, supports_terminal_ours, can_create_inferior,
4834 get_thread_control_capabilities, attach_no_wait>: New
4836 <insert_breakpoint, remove_breakpoint>: Now
4837 TARGET_DEFAULT_NORETURN methods.
4838 <info_proc>: Now returns bool.
4840 (OPS_MAGIC): Delete.
4841 (current_target): Delete. All references replaced by references
4843 (target_stack): ... this. New.
4844 (target_shortname, target_longname): Adjust.
4845 (target_can_run): Now a function declaration.
4846 (default_child_has_all_memory, default_child_has_memory)
4847 (default_child_has_stack, default_child_has_registers)
4848 (default_child_has_execution): Remove target_ops parameter.
4849 (complete_target_initialization): Delete.
4850 (memory_breakpoint_target): New template class.
4851 (test_target_ops): Refactor as a C++ class with virtual methods.
4852 * make-target-delegates (NAME_PART): Tighten.
4853 (POINTER_PART, CP_SYMBOL): New.
4854 (SIMPLE_RETURN_PART): Reimplement.
4855 (VEC_RETURN_PART): Expect less.
4856 (RETURN_PART, VIRTUAL_PART): New.
4857 (METHOD): Adjust to C++ virtual methods.
4858 (scan_target_h): Remove reference to C99.
4859 (dname): Output "target_ops::" prefix.
4860 (write_function_header): Adjust to output a C++ class method.
4861 (write_declaration): New.
4862 (write_delegator): Adjust to output a C++ class method.
4863 (tdname): Output "dummy_target::" prefix.
4864 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4866 (tdefault_names, debug_names): Delete.
4867 (return_types, tdefaults, styles, argtypes_array): New.
4868 (top level): All methods are delegators.
4870 (top level): Print dummy_target and debug_target classes.
4871 * target-delegates.c: Regenerate.
4872 * target-debug.h (target_debug_print_enum_info_proc_what)
4873 (target_debug_print_thread_control_capabilities)
4874 (target_debug_print_thread_info_p): New.
4875 * target.c (dummy_target): Delete.
4876 (the_dummy_target, the_debug_target): New.
4877 (target_stack): Now extern.
4878 (set_targetdebug): Push/unpush debug target.
4879 (default_child_has_all_memory, default_child_has_memory)
4880 (default_child_has_stack, default_child_has_registers)
4881 (default_child_has_execution): Remove target_ops parameter.
4882 (complete_target_initialization): Delete.
4883 (add_target_with_completer): No longer call
4884 complete_target_initialization.
4885 (target_supports_terminal_ours): Use regular delegation.
4886 (update_current_target): Delete.
4887 (push_target): No longer check magic number. Don't call
4888 update_current_target.
4889 (unpush_target): Don't call update_current_target.
4890 (target_is_pushed): No longer check magic number.
4891 (target_require_runnable): Skip for all stratums over
4893 (target_ops::info_proc): New.
4894 (target_info_proc): Use find_target_at and
4895 find_default_run_target.
4896 (target_supports_disable_randomization): Use regular delegation.
4897 (target_get_osdata): Use find_target_at.
4898 (target_ops::open, target_ops::close, target_ops::can_attach)
4899 (target_ops::attach, target_ops::can_create_inferior)
4900 (target_ops::create_inferior, target_ops::can_run)
4901 (target_can_run): New.
4902 (default_fileio_target): Use regular delegation.
4903 (target_ops::fileio_open, target_ops::fileio_pwrite)
4904 (target_ops::fileio_pread, target_ops::fileio_fstat)
4905 (target_ops::fileio_close, target_ops::fileio_unlink)
4906 (target_ops::fileio_readlink): New.
4907 (target_fileio_open_1, target_fileio_unlink)
4908 (target_fileio_readlink): Always call the target method. Handle
4910 (return_zero, return_zero_has_execution): Delete.
4911 (init_dummy_target): Delete.
4912 (dummy_target::dummy_target, dummy_target::shortname)
4913 (dummy_target::longname, dummy_target::doc)
4914 (debug_target::debug_target, debug_target::shortname)
4915 (debug_target::longname, debug_target::doc): New.
4916 (target_supports_delete_record): Use regular delegation.
4917 (setup_target_debug): Delete.
4918 (maintenance_print_target_stack): Skip debug_stratum.
4919 (initialize_targets): Instantiate the_dummy_target and
4921 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4923 (target_auxv_search, fprint_target_auxv): Adjust.
4924 (info_auxv_command): Adjust to use target_stack.
4925 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4926 * exceptions.c (print_flush): Handle a NULL target_stack.
4927 * regcache.c (target_ops_no_register): Refactor as class with
4930 * exec.c (exec_target): New class.
4931 (exec_ops): Now an exec_target.
4932 (exec_open, exec_close_1, exec_get_section_table)
4933 (exec_xfer_partial, exec_files_info, exec_has_memory)
4934 (exec_make_note_section): Refactor as exec_target methods.
4935 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4937 (exec_target::find_memory_regions): New.
4938 (_initialize_exec): Don't call init_exec_ops.
4939 * gdbcore.h (exec_file_clear): Delete.
4941 * corefile.c (core_target): Delete.
4942 (core_file_command): Adjust.
4943 * corelow.c (core_target): New class.
4944 (the_core_target): New.
4945 (core_close): Remove target_ops parameter.
4946 (core_close_cleanup): Adjust.
4947 (core_target::close): New.
4948 (core_open, core_detach, get_core_registers, core_files_info)
4949 (core_xfer_partial, core_thread_alive, core_read_description)
4950 (core_pid_to_str, core_thread_name, core_has_memory)
4951 (core_has_stack, core_has_registers, core_info_proc): Rework as
4952 core_target methods.
4953 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4954 (_initialize_corelow): Initialize the_core_target.
4955 * gdbcore.h (core_target): Delete.
4956 (the_core_target): New.
4958 * ctf.c: (ctf_target): New class.
4959 (ctf_ops): Now a ctf_target.
4960 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4961 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4962 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4964 (init_ctf_ops): Delete.
4965 (_initialize_ctf): Don't call it.
4966 * tracefile-tfile.c (tfile_target): New class.
4967 (tfile_ops): Now a tfile_target.
4968 (tfile_open, tfile_close, tfile_files_info)
4969 (tfile_get_tracepoint_status, tfile_trace_find)
4970 (tfile_fetch_registers, tfile_xfer_partial)
4971 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4972 Refactor as tfile_target methods.
4973 (tfile_xfer_partial_features): Remove target_ops parameter.
4974 (init_tfile_ops): Delete.
4975 (_initialize_tracefile_tfile): Don't call it.
4976 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4977 (tracefile_has_stack, tracefile_has_registers)
4978 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4979 tracefile_target methods.
4980 (init_tracefile_ops): Delete.
4981 (tracefile_target::tracefile_target): New.
4982 * tracefile.h: Include "target.h".
4983 (tracefile_target): New class.
4984 (init_tracefile_ops): Delete.
4986 * spu-multiarch.c (spu_multiarch_target): New class.
4987 (spu_ops): Now a spu_multiarch_target.
4988 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4989 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4990 (spu_search_memory, spu_mourn_inferior): Refactor as
4991 spu_multiarch_target methods.
4992 (init_spu_ops): Delete.
4993 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4994 complete_target_initialization.
4996 * ravenscar-thread.c (ravenscar_thread_target): New class.
4997 (ravenscar_ops): Now a ravenscar_thread_target.
4998 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4999 (ravenscar_thread_alive, ravenscar_pid_to_str)
5000 (ravenscar_fetch_registers, ravenscar_store_registers)
5001 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5002 (ravenscar_stopped_by_hw_breakpoint)
5003 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5004 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5005 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5007 (init_ravenscar_thread_ops): Delete.
5008 (_initialize_ravenscar): Remove references to
5009 init_ravenscar_thread_ops and complete_target_initialization.
5011 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5012 (bsd_uthread_target): New class.
5013 (bsd_uthread_ops): Now a bsd_uthread_target.
5014 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5015 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5016 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5017 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5018 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5019 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5020 (bsd_uthread_target): Delete function.
5021 (_initialize_bsd_uthread): Remove reference to
5022 complete_target_initialization.
5024 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5025 (target_bfd): ... this new class.
5026 (target_bfd_xfer_partial, target_bfd_get_section_table)
5027 (target_bfd_close): Refactor as target_bfd methods.
5028 (target_bfd::~target_bfd): New.
5029 (target_bfd_reopen): Adjust.
5030 (target_bfd::close): New.
5032 * record-btrace.c (record_btrace_target): New class.
5033 (record_btrace_ops): Now a record_btrace_target.
5034 (record_btrace_open, record_btrace_stop_recording)
5035 (record_btrace_disconnect, record_btrace_close)
5036 (record_btrace_async, record_btrace_info)
5037 (record_btrace_insn_history, record_btrace_insn_history_range)
5038 (record_btrace_insn_history_from, record_btrace_call_history)
5039 (record_btrace_call_history_range)
5040 (record_btrace_call_history_from, record_btrace_record_method)
5041 (record_btrace_is_replaying, record_btrace_will_replay)
5042 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5043 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5044 (record_btrace_store_registers, record_btrace_prepare_to_store)
5045 (record_btrace_to_get_unwinder)
5046 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5047 (record_btrace_commit_resume, record_btrace_wait)
5048 (record_btrace_stop, record_btrace_can_execute_reverse)
5049 (record_btrace_stopped_by_sw_breakpoint)
5050 (record_btrace_supports_stopped_by_sw_breakpoint)
5051 (record_btrace_stopped_by_hw_breakpoint)
5052 (record_btrace_supports_stopped_by_hw_breakpoint)
5053 (record_btrace_update_thread_list, record_btrace_thread_alive)
5054 (record_btrace_goto_begin, record_btrace_goto_end)
5055 (record_btrace_goto, record_btrace_stop_replaying_all)
5056 (record_btrace_execution_direction)
5057 (record_btrace_prepare_to_generate_core)
5058 (record_btrace_done_generating_core): Refactor as
5059 record_btrace_target methods.
5060 (init_record_btrace_ops): Delete.
5061 (_initialize_record_btrace): Remove reference to
5062 init_record_btrace_ops.
5063 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5064 the execution_direction global.
5065 (record_full_base_target, record_full_target)
5066 (record_full_core_target): New classes.
5067 (record_full_ops): Now a record_full_target.
5068 (record_full_core_ops): Now a record_full_core_target.
5069 (record_full_target::detach, record_full_target::disconnect)
5070 (record_full_core_target::disconnect)
5071 (record_full_target::mourn_inferior, record_full_target::kill):
5073 (record_full_open, record_full_close, record_full_async): Refactor
5074 as methods of the record_full_base_target class.
5075 (record_full_resume, record_full_commit_resume): Refactor
5076 as methods of the record_full_target class.
5077 (record_full_wait, record_full_stopped_by_watchpoint)
5078 (record_full_stopped_data_address)
5079 (record_full_stopped_by_sw_breakpoint)
5080 (record_full_supports_stopped_by_sw_breakpoint)
5081 (record_full_stopped_by_hw_breakpoint)
5082 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5083 methods of the record_full_base_target class.
5084 (record_full_store_registers, record_full_xfer_partial)
5085 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5086 Refactor as methods of the record_full_target class.
5087 (record_full_can_execute_reverse, record_full_get_bookmark)
5088 (record_full_goto_bookmark, record_full_execution_direction)
5089 (record_full_record_method, record_full_info, record_full_delete)
5090 (record_full_is_replaying, record_full_will_replay)
5091 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5092 (record_full_stop_replaying): Refactor as methods of the
5093 record_full_base_target class.
5094 (record_full_core_resume, record_full_core_kill)
5095 (record_full_core_fetch_registers)
5096 (record_full_core_prepare_to_store)
5097 (record_full_core_store_registers, record_full_core_xfer_partial)
5098 (record_full_core_insert_breakpoint)
5099 (record_full_core_remove_breakpoint)
5100 (record_full_core_has_execution): Refactor
5101 as methods of the record_full_core_target class.
5102 (record_full_base_target::supports_delete_record): New.
5103 (init_record_full_ops): Delete.
5104 (init_record_full_core_ops): Delete.
5105 (record_full_save): Refactor as method of the
5106 record_full_base_target class.
5107 (_initialize_record_full): Remove references to
5108 init_record_full_ops and init_record_full_core_ops.
5110 * remote.c (remote_target, extended_remote_target): New classes.
5111 (remote_ops): Now a remote_target.
5112 (extended_remote_ops): Now an extended_remote_target.
5113 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5114 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5115 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5116 (remote_pass_signals, remote_set_syscall_catchpoint)
5117 (remote_program_signals, )
5118 (remote_thread_always_alive): Remove target_ops parameter.
5119 (remote_thread_alive, remote_thread_name)
5120 (remote_update_thread_list, remote_threads_extra_info)
5121 (remote_static_tracepoint_marker_at)
5122 (remote_static_tracepoint_markers_by_strid)
5123 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5124 (remote_open): Refactor as methods of remote_target.
5125 (extended_remote_open, extended_remote_detach)
5126 (extended_remote_attach, extended_remote_post_attach):
5127 (extended_remote_supports_disable_randomization)
5128 (extended_remote_create_inferior): : Refactor as method of
5129 extended_remote_target.
5130 (remote_set_permissions, remote_open_1, remote_detach)
5131 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5132 (remote_resume, remote_commit_resume, remote_stop)
5133 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5134 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5135 (remote_prepare_to_store, remote_store_registers)
5136 (remote_flash_erase, remote_flash_done, remote_files_info)
5137 (remote_kill, remote_mourn, remote_insert_breakpoint)
5138 (remote_remove_breakpoint, remote_insert_watchpoint)
5139 (remote_watchpoint_addr_within_range)
5140 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5141 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5142 (remote_supports_stopped_by_sw_breakpoint)
5143 (remote_stopped_by_hw_breakpoint)
5144 (remote_supports_stopped_by_hw_breakpoint)
5145 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5146 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5147 (remote_verify_memory): Refactor as methods of remote_target.
5148 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5150 (remote_xfer_partial, remote_get_memory_xfer_limit)
5151 (remote_search_memory, remote_rcmd, remote_memory_map)
5152 (remote_pid_to_str, remote_get_thread_local_address)
5153 (remote_get_tib_address, remote_read_description): Refactor as
5154 methods of remote_target.
5155 (remote_target::fileio_open, remote_target::fileio_pwrite)
5156 (remote_target::fileio_pread, remote_target::fileio_close): New.
5157 (remote_hostio_readlink, remote_hostio_fstat)
5158 (remote_filesystem_is_local, remote_can_execute_reverse)
5159 (remote_supports_non_stop, remote_supports_disable_randomization)
5160 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5161 (remote_supports_enable_disable_tracepoint)
5162 (remote_supports_string_tracing)
5163 (remote_can_run_breakpoint_commands, remote_trace_init)
5164 (remote_download_tracepoint, remote_can_download_tracepoint)
5165 (remote_download_trace_state_variable, remote_enable_tracepoint)
5166 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5167 (remote_trace_start, remote_get_trace_status)
5168 (remote_get_tracepoint_status, remote_trace_stop)
5169 (remote_trace_find, remote_get_trace_state_variable_value)
5170 (remote_save_trace_data, remote_get_raw_trace_data)
5171 (remote_set_disconnected_tracing, remote_core_of_thread)
5172 (remote_set_circular_trace_buffer, remote_traceframe_info)
5173 (remote_get_min_fast_tracepoint_insn_len)
5174 (remote_set_trace_buffer_size, remote_set_trace_notes)
5175 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5176 (remote_disable_btrace, remote_teardown_btrace)
5177 (remote_read_btrace, remote_btrace_conf)
5178 (remote_augmented_libraries_svr4_read, remote_load)
5179 (remote_pid_to_exec_file, remote_can_do_single_step)
5180 (remote_execution_direction, remote_thread_handle_to_thread_info):
5181 Refactor as methods of remote_target.
5182 (init_remote_ops, init_extended_remote_ops): Delete.
5183 (remote_can_async_p, remote_is_async_p, remote_async)
5184 (remote_thread_events, remote_upload_tracepoints)
5185 (remote_upload_trace_state_variables): Refactor as methods of
5187 (_initialize_remote): Remove references to init_remote_ops and
5188 init_extended_remote_ops.
5190 * remote-sim.c (gdbsim_target): New class.
5191 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5192 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5193 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5194 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5195 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5196 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5197 Refactor as methods of gdbsim_target.
5198 (gdbsim_ops): Now a gdbsim_target.
5199 (init_gdbsim_ops): Delete.
5200 (gdbsim_cntrl_c): Adjust.
5201 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5203 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5204 (the_amd64_linux_nat_target): New.
5205 (amd64_linux_fetch_inferior_registers)
5206 (amd64_linux_store_inferior_registers): Refactor as methods of
5207 amd64_linux_nat_target.
5208 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5209 * i386-linux-nat.c: Don't include "linux-nat.h".
5210 (i386_linux_nat_target): New class.
5211 (the_i386_linux_nat_target): New.
5212 (i386_linux_fetch_inferior_registers)
5213 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5214 as methods of i386_linux_nat_target.
5215 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5216 * inf-child.c (inf_child_ops): Delete.
5217 (inf_child_fetch_inferior_registers)
5218 (inf_child_store_inferior_registers): Delete.
5219 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5220 methods of inf_child_target.
5221 (inf_child_target::supports_terminal_ours)
5222 (inf_child_target::terminal_init)
5223 (inf_child_target::terminal_inferior)
5224 (inf_child_target::terminal_ours_for_output)
5225 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5226 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5228 (inf_child_open, inf_child_disconnect, inf_child_close)
5229 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5230 (inf_child_post_startup_inferior, inf_child_can_run)
5231 (inf_child_pid_to_exec_file): Refactor as methods of
5233 (inf_child_follow_fork): Delete.
5234 (inf_child_target::can_create_inferior)
5235 (inf_child_target::can_attach): New.
5236 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5237 (inf_child_target::has_stack, inf_child_target::has_registers)
5238 (inf_child_target::has_execution): New.
5239 (inf_child_fileio_open, inf_child_fileio_pwrite)
5240 (inf_child_fileio_pread, inf_child_fileio_fstat)
5241 (inf_child_fileio_close, inf_child_fileio_unlink)
5242 (inf_child_fileio_readlink, inf_child_use_agent)
5243 (inf_child_can_use_agent): Refactor as methods of
5245 (return_zero, inf_child_target): Delete.
5246 (inf_child_target::inf_child_target): New.
5247 * inf-child.h: Include "target.h".
5248 (inf_child_target): Delete function prototype.
5249 (inf_child_target): New class.
5250 (inf_child_open_target, inf_child_mourn_inferior)
5251 (inf_child_maybe_unpush_target): Delete.
5252 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5253 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5254 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5255 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5256 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5257 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5258 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5259 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5260 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5261 methods of inf_ptrace_target.
5262 (inf_ptrace_target): Delete function.
5263 * inf-ptrace.h: Include "inf-child.h".
5264 (inf_ptrace_target): Delete function declaration.
5265 (inf_ptrace_target): New class.
5266 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5267 * linux-nat.c (linux_target): New.
5268 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5269 (linux_nat_target::~linux_nat_target): New.
5270 (linux_child_post_attach, linux_child_post_startup_inferior)
5271 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5272 (linux_child_remove_fork_catchpoint)
5273 (linux_child_insert_vfork_catchpoint)
5274 (linux_child_remove_vfork_catchpoint)
5275 (linux_child_insert_exec_catchpoint)
5276 (linux_child_remove_exec_catchpoint)
5277 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5278 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5279 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5280 (linux_nat_stopped_data_address)
5281 (linux_nat_stopped_by_sw_breakpoint)
5282 (linux_nat_supports_stopped_by_sw_breakpoint)
5283 (linux_nat_stopped_by_hw_breakpoint)
5284 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5285 (linux_nat_kill, linux_nat_mourn_inferior)
5286 (linux_nat_xfer_partial, linux_nat_thread_alive)
5287 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5288 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5289 (linux_child_static_tracepoint_markers_by_strid)
5290 (linux_nat_is_async_p, linux_nat_can_async_p)
5291 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5292 (linux_nat_supports_multi_process)
5293 (linux_nat_supports_disable_randomization, linux_nat_async)
5294 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5295 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5296 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5297 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5298 methods of linux_nat_target.
5299 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5300 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5302 (check_stopped_by_watchpoint): Adjust.
5303 (linux_xfer_partial): Delete.
5304 (linux_target_install_ops, linux_target, linux_nat_add_target):
5306 (linux_nat_target::linux_nat_target): New.
5307 * linux-nat.h: Include "inf-ptrace.h".
5308 (linux_nat_target): New.
5309 (linux_target, linux_target_install_ops, linux_nat_add_target):
5310 Delete function declarations.
5311 (linux_target): Declare global.
5312 * linux-thread-db.c (thread_db_target): New.
5313 (thread_db_target::thread_db_target): New.
5314 (thread_db_ops): Delete.
5315 (the_thread_db_target): New.
5316 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5317 (thread_db_update_thread_list, thread_db_pid_to_str)
5318 (thread_db_extra_thread_info)
5319 (thread_db_thread_handle_to_thread_info)
5320 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5321 (thread_db_resume): Refactor as methods of thread_db_target.
5322 (init_thread_db_ops): Delete.
5323 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5324 * x86-linux-nat.c: Don't include "linux-nat.h".
5325 (super_post_startup_inferior): Delete.
5326 (x86_linux_nat_target::~x86_linux_nat_target): New.
5327 (x86_linux_child_post_startup_inferior)
5328 (x86_linux_read_description, x86_linux_enable_btrace)
5329 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5330 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5331 methods of x86_linux_nat_target.
5332 (x86_linux_create_target): Delete. Bits folded ...
5333 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5335 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5336 (x86_linux_nat_target): New class.
5337 (x86_linux_create_target): Delete.
5338 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5339 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5340 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5341 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5342 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5343 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5345 (x86_use_watchpoints): Delete.
5346 * x86-nat.h: Include "breakpoint.h" and "target.h".
5347 (x86_use_watchpoints): Delete.
5348 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5349 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5350 (x86_insert_watchpoint, x86_remove_watchpoint)
5351 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5352 (x86_stopped_by_hw_breakpoint): New declarations.
5353 (x86_nat_target): New template class.
5355 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5356 (the_ppc_linux_nat_target): New.
5357 (ppc_linux_fetch_inferior_registers)
5358 (ppc_linux_can_use_hw_breakpoint)
5359 (ppc_linux_region_ok_for_hw_watchpoint)
5360 (ppc_linux_ranged_break_num_registers)
5361 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5362 (ppc_linux_insert_mask_watchpoint)
5363 (ppc_linux_remove_mask_watchpoint)
5364 (ppc_linux_can_accel_watchpoint_condition)
5365 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5366 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5367 (ppc_linux_watchpoint_addr_within_range)
5368 (ppc_linux_masked_watch_num_registers)
5369 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5370 (ppc_linux_read_description): Refactor as methods of
5371 ppc_linux_nat_target.
5372 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5374 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5375 (procfs_target): New class.
5376 (the_procfs_target): New.
5377 (procfs_target): Delete function.
5378 (procfs_auxv_parse, procfs_attach, procfs_detach)
5379 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5380 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5381 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5382 (procfs_create_inferior, procfs_update_thread_list)
5383 (procfs_thread_alive, procfs_pid_to_str)
5384 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5385 (procfs_stopped_data_address, procfs_insert_watchpoint)
5386 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5387 (proc_find_memory_regions, procfs_info_proc)
5388 (procfs_make_note_section): Refactor as methods of procfs_target.
5389 (_initialize_procfs): Adjust.
5390 * sol-thread.c (sol_thread_target): New class.
5391 (sol_thread_ops): Now a sol_thread_target.
5392 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5393 (sol_thread_fetch_registers, sol_thread_store_registers)
5394 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5395 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5396 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5397 (init_sol_thread_ops): Delete.
5398 (_initialize_sol_thread): Adjust. Remove references to
5399 init_sol_thread_ops and complete_target_initialization.
5401 * windows-nat.c (windows_nat_target): New class.
5402 (windows_fetch_inferior_registers)
5403 (windows_store_inferior_registers, windows_resume, windows_wait)
5404 (windows_attach, windows_detach, windows_pid_to_exec_file)
5405 (windows_files_info, windows_create_inferior)
5406 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5407 (windows_close, windows_pid_to_str, windows_xfer_partial)
5408 (windows_get_tib_address, windows_get_ada_task_ptid)
5409 (windows_thread_name, windows_thread_alive): Refactor as
5410 windows_nat_target methods.
5411 (do_initial_windows_stuff): Adjust.
5412 (windows_target): Delete function.
5413 (_initialize_windows_nat): Adjust.
5415 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5416 (darwin_mourn_inferior, darwin_kill_inferior)
5417 (darwin_create_inferior, darwin_attach, darwin_detach)
5418 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5419 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5420 (darwin_supports_multi_process): Refactor as darwin_nat_target
5422 (darwin_resume_to, darwin_files_info): Delete.
5423 (_initialize_darwin_inferior): Rename to ...
5424 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5425 * darwin-nat.h: Include "inf-child.h".
5426 (darwin_nat_target): New class.
5427 (darwin_complete_target): Delete.
5428 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5429 (darwin_target): New.
5430 (i386_darwin_fetch_inferior_registers)
5431 (i386_darwin_store_inferior_registers): Refactor as methods of
5433 (darwin_complete_target): Delete, with ...
5434 (_initialize_i386_darwin_nat): ... bits factored out here.
5436 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5437 (the_alpha_linux_nat_target): New.
5438 (alpha_linux_register_u_offset): Refactor as
5439 alpha_linux_nat_target method.
5440 (_initialize_alpha_linux_nat): Adjust.
5441 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5442 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5443 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5444 methods of linux_nat_trad_target.
5445 (linux_trad_target): Delete.
5446 * linux-nat-trad.h (linux_trad_target): Delete function.
5447 (linux_nat_trad_target): New class.
5448 * mips-linux-nat.c (mips_linux_nat_target): New class.
5449 (super_fetch_registers, super_store_registers, super_close):
5451 (the_mips_linux_nat_target): New.
5452 (mips64_linux_regsets_fetch_registers)
5453 (mips64_linux_regsets_store_registers)
5454 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5455 (mips_linux_register_u_offset, mips_linux_read_description)
5456 (mips_linux_can_use_hw_breakpoint)
5457 (mips_linux_stopped_by_watchpoint)
5458 (mips_linux_stopped_data_address)
5459 (mips_linux_region_ok_for_hw_watchpoint)
5460 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5461 (mips_linux_close): Refactor as methods of mips_linux_nat.
5462 (_initialize_mips_linux_nat): Adjust to C++ification.
5464 * aix-thread.c (aix_thread_target): New class.
5465 (aix_thread_ops): Now an aix_thread_target.
5466 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5467 (aix_thread_fetch_registers, aix_thread_store_registers)
5468 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5469 (aix_thread_thread_alive, aix_thread_pid_to_str)
5470 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5471 Refactor as methods of aix_thread_target.
5472 (init_aix_thread_ops): Delete.
5473 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5474 and complete_target_initialization.
5475 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5476 (rs6000_nat_target): New class.
5477 (the_rs6000_nat_target): New.
5478 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5479 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5480 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5481 (super_create_inferior): Delete.
5482 (_initialize_rs6000_nat): Adjust to C++ification.
5484 * arm-linux-nat.c (arm_linux_nat_target): New class.
5485 (the_arm_linux_nat_target): New.
5486 (arm_linux_fetch_inferior_registers)
5487 (arm_linux_store_inferior_registers, arm_linux_read_description)
5488 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5489 (arm_linux_remove_hw_breakpoint)
5490 (arm_linux_region_ok_for_hw_watchpoint)
5491 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5492 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5493 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5494 arm_linux_nat_target.
5495 (_initialize_arm_linux_nat): Adjust to C++ification.
5497 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5498 (the_aarch64_linux_nat_target): New.
5499 (aarch64_linux_fetch_inferior_registers)
5500 (aarch64_linux_store_inferior_registers)
5501 (aarch64_linux_child_post_startup_inferior)
5502 (aarch64_linux_read_description)
5503 (aarch64_linux_can_use_hw_breakpoint)
5504 (aarch64_linux_insert_hw_breakpoint)
5505 (aarch64_linux_remove_hw_breakpoint)
5506 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5507 (aarch64_linux_region_ok_for_hw_watchpoint)
5508 (aarch64_linux_stopped_data_address)
5509 (aarch64_linux_stopped_by_watchpoint)
5510 (aarch64_linux_watchpoint_addr_within_range)
5511 (aarch64_linux_can_do_single_step): Refactor as methods of
5512 aarch64_linux_nat_target.
5513 (super_post_startup_inferior): Delete.
5514 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5516 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5517 (the_hppa_linux_nat_target): New.
5518 (hppa_linux_fetch_inferior_registers)
5519 (hppa_linux_store_inferior_registers): Refactor as methods of
5520 hppa_linux_nat_target.
5521 (_initialize_hppa_linux_nat): Adjust to C++ification.
5523 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5524 (the_ia64_linux_nat_target): New.
5525 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5526 (ia64_linux_stopped_data_address)
5527 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5528 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5529 ia64_linux_nat_target methods.
5530 (super_xfer_partial): Delete.
5531 (_initialize_ia64_linux_nat): Adjust to C++ification.
5533 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5534 (the_m32r_linux_nat_target): New.
5535 (m32r_linux_fetch_inferior_registers)
5536 (m32r_linux_store_inferior_registers): Refactor as
5537 m32r_linux_nat_target methods.
5538 (_initialize_m32r_linux_nat): Adjust to C++ification.
5540 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5541 (the_m68k_linux_nat_target): New.
5542 (m68k_linux_fetch_inferior_registers)
5543 (m68k_linux_store_inferior_registers): Refactor as
5544 m68k_linux_nat_target methods.
5545 (_initialize_m68k_linux_nat): Adjust to C++ification.
5547 * s390-linux-nat.c (s390_linux_nat_target): New class.
5548 (the_s390_linux_nat_target): New.
5549 (s390_linux_fetch_inferior_registers)
5550 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5551 (s390_insert_watchpoint, s390_remove_watchpoint)
5552 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5553 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5554 (s390_auxv_parse, s390_read_description): Refactor as methods of
5555 s390_linux_nat_target.
5556 (_initialize_s390_nat): Adjust to C++ification.
5558 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5559 (the_sparc_linux_nat_target): New.
5560 (_initialize_sparc_linux_nat): Adjust to C++ification.
5561 * sparc-nat.c (sparc_fetch_inferior_registers)
5562 (sparc_store_inferior_registers): Remove target_ops parameter.
5563 * sparc-nat.h (sparc_fetch_inferior_registers)
5564 (sparc_store_inferior_registers): Remove target_ops parameter.
5565 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5566 (the_sparc64_linux_nat_target): New.
5567 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5569 * spu-linux-nat.c (spu_linux_nat_target): New class.
5570 (the_spu_linux_nat_target): New.
5571 (spu_child_post_startup_inferior, spu_child_post_attach)
5572 (spu_child_wait, spu_fetch_inferior_registers)
5573 (spu_store_inferior_registers, spu_xfer_partial)
5574 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5576 (_initialize_spu_nat): Adjust to C++ification.
5578 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5579 (the_tilegx_linux_nat_target): New.
5580 (fetch_inferior_registers, store_inferior_registers):
5581 Refactor as methods.
5582 (_initialize_tile_linux_nat): Adjust to C++ification.
5584 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5585 (the_xtensa_linux_nat_target): New.
5586 (xtensa_linux_fetch_inferior_registers)
5587 (xtensa_linux_store_inferior_registers): Refactor as
5588 xtensa_linux_nat_target methods.
5589 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5591 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5592 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5593 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5594 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5595 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5596 (fbsd_stopped_by_sw_breakpoint)
5597 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5598 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5599 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5600 (fbsd_post_startup_inferior, fbsd_post_attach)
5601 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5602 (fbsd_set_syscall_catchpoint)
5603 (super_xfer_partial, super_resume, super_wait)
5604 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5605 (fbsd_handle_debug_trap): Remove target_ops parameter.
5606 (fbsd_nat_add_target): Delete.
5607 * fbsd-nat.h: Include "inf-ptrace.h".
5608 (fbsd_nat_add_target): Delete.
5609 (USE_SIGTRAP_SIGINFO): Define.
5610 (fbsd_nat_target): New class.
5612 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5613 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5614 (amd64bsd_target): Delete.
5615 * amd64-bsd-nat.h: New file.
5616 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5618 (amd64_fbsd_nat_target): New class.
5619 (the_amd64_fbsd_nat_target): New.
5620 (amd64fbsd_read_description): Refactor as method of
5621 amd64_fbsd_nat_target.
5622 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5623 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5624 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5625 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5626 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5627 (i386bsd_target): Delete.
5628 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5629 (i386bsd_fetch_inferior_registers)
5630 (i386bsd_store_inferior_registers): Declare.
5631 (i386_bsd_nat_target): New class.
5632 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5633 (the_i386_fbsd_nat_target): New.
5634 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5635 i386_fbsd_nat_target methods.
5636 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5637 (_initialize_i386fbsd_nat): Adjust to C++ification.
5638 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5639 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5640 (_initialize_x86_bsd_nat): Adjust to C++ification.
5641 * x86-bsd-nat.h: Include "x86-nat.h".
5642 (x86bsd_target): Delete declaration.
5643 (x86bsd_nat_target): New class.
5645 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5646 (the_aarch64_fbsd_nat_target): New.
5647 (aarch64_fbsd_fetch_inferior_registers)
5648 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5649 aarch64_fbsd_nat_target.
5650 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5651 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5652 (the_alpha_bsd_nat_target): New.
5653 (alphabsd_fetch_inferior_registers)
5654 (alphabsd_store_inferior_registers): Refactor as
5655 alpha_bsd_nat_target methods.
5656 (_initialize_alphabsd_nat): Refactor as methods of
5657 alpha_bsd_nat_target.
5658 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5659 (the_amd64_nbsd_nat_target): New.
5660 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5661 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5662 (the_amd64_obsd_nat_target): New.
5663 (_initialize_amd64obsd_nat): Adjust to C++ification.
5664 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5665 (the_arm_fbsd_nat_target): New.
5666 (arm_fbsd_fetch_inferior_registers)
5667 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5668 (_initialize_arm_fbsd_nat): Refactor as methods of
5669 arm_fbsd_nat_target.
5670 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5671 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5672 (the_arm_netbsd_nat_target): New.
5673 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5674 arm_netbsd_nat_target.
5675 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5676 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5677 (the_hppa_nbsd_nat_target): New.
5678 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5679 hppa_nbsd_nat_target methods.
5680 (_initialize_hppanbsd_nat): Adjust to C++ification.
5681 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5682 (the_hppa_obsd_nat_target): New.
5683 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5684 methods of hppa_obsd_nat_target.
5685 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5687 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5688 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5690 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5691 (_initialize_i386obsd_nat): Use add_target.
5692 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5693 (the_m68k_bsd_nat_target): New.
5694 (m68kbsd_fetch_inferior_registers)
5695 (m68kbsd_store_inferior_registers): Refactor as methods of
5696 m68k_bsd_nat_target.
5697 (_initialize_m68kbsd_nat): Adjust to C++ification.
5698 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5699 (the_mips_fbsd_nat_target): New.
5700 (mips_fbsd_fetch_inferior_registers)
5701 (mips_fbsd_store_inferior_registers): Refactor as methods of
5702 mips_fbsd_nat_target.
5703 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5705 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5706 (the_mips_nbsd_nat_target): New.
5707 (mipsnbsd_fetch_inferior_registers)
5708 (mipsnbsd_store_inferior_registers): Refactor as methods of
5709 mips_nbsd_nat_target.
5710 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5711 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5712 (the_mips64_obsd_nat_target): New.
5713 (mips64obsd_fetch_inferior_registers)
5714 (mips64obsd_store_inferior_registers): Refactor as methods of
5715 mips64_obsd_nat_target.
5716 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5718 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5720 * nbsd-nat.h: Include "inf-ptrace.h".
5721 (nbsd_nat_target): New class.
5722 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5723 (obsd_wait): Refactor as methods of obsd_nat_target.
5724 (obsd_add_target): Delete.
5725 * obsd-nat.h: Include "inf-ptrace.h".
5726 (obsd_nat_target): New class.
5727 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5728 (the_ppc_fbsd_nat_target): New.
5729 (ppcfbsd_fetch_inferior_registers)
5730 (ppcfbsd_store_inferior_registers): Refactor as methods of
5731 ppc_fbsd_nat_target.
5732 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5734 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5735 (the_ppc_nbsd_nat_target): New.
5736 (ppcnbsd_fetch_inferior_registers)
5737 (ppcnbsd_store_inferior_registers): Refactor as methods of
5738 ppc_nbsd_nat_target.
5739 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5740 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5741 (the_ppc_obsd_nat_target): New.
5742 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5743 methods of ppc_obsd_nat_target.
5744 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5746 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5747 (the_sh_nbsd_nat_target): New.
5748 (shnbsd_fetch_inferior_registers)
5749 (shnbsd_store_inferior_registers): Refactor as methods of
5751 (_initialize_shnbsd_nat): Adjust to C++ification.
5752 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5753 (inf_ptrace_xfer_partial): Delete.
5754 (sparc_xfer_partial, sparc_target): Delete.
5755 * sparc-nat.h (sparc_fetch_inferior_registers)
5756 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5757 (sparc_target): Delete function declaration.
5758 (sparc_target): New template class.
5759 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5760 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5761 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5762 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5764 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5765 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5766 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5767 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5769 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5770 (the_vax_bsd_nat_target): New.
5771 (vaxbsd_fetch_inferior_registers)
5772 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5774 (_initialize_vaxbsd_nat): Adjust to C++ification.
5776 * bsd-kvm.c (bsd_kvm_target): New class.
5777 (bsd_kvm_ops): Now a bsd_kvm_target.
5778 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5779 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5780 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5782 (bsd_kvm_return_one): Delete.
5783 (bsd_kvm_add_target): Adjust to C++ification.
5785 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5786 (nto_procfs_target_procfs): New classes.
5787 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5788 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5789 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5790 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5791 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5792 (procfs_remove_hw_breakpoint, procfs_resume)
5793 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5794 (procfs_kill_inferior, procfs_store_registers)
5795 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5796 as methods of nto_procfs_target.
5797 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5798 (nto_native_ops): Delete.
5799 (procfs_open, procfs_native_open): Delete.
5800 (nto_native_ops): Now an nto_procfs_target_native.
5801 (init_procfs_targets): Adjust to C++ification.
5802 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5803 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5804 Refactor as methods of nto_procfs_target.
5806 * go32-nat.c (go32_nat_target): New class.
5807 (the_go32_nat_target): New.
5808 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5809 (go32_store_registers, go32_xfer_partial, go32_files_info)
5810 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5811 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5812 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5813 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5814 (go32_target): Delete.
5815 (_initialize_go32_nat): Adjust to C++ification.
5817 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5818 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5819 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5820 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5822 (gnu_target): Delete.
5823 * gnu-nat.h (gnu_target): Delete.
5824 (gnu_nat_target): New class.
5825 * i386-gnu-nat.c (gnu_base_target): New.
5826 (i386_gnu_nat_target): New class.
5827 (the_i386_gnu_nat_target): New.
5828 (_initialize_i386gnu_nat): Adjust to C++ification.
5830 2018-05-02 Pedro Alves <palves@redhat.com>
5832 * bfd-target.c (target_bfd_xclose): Rename to ...
5833 (target_bfd_close): ... this.
5834 (target_bfd_reopen): Adjust.
5835 * target.c (target_close): Remove references to to_xclose.
5836 * target.h (target_ops::to_xclose): Delete.
5837 (target_ops::to_close): Update comments.
5839 2018-05-02 Pedro Alves <palves@redhat.com>
5841 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5843 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5844 * inf-ptrace.c (inf_ptrace_register_u_offset)
5845 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5846 (inf_ptrace_store_register, inf_ptrace_store_registers)
5847 (inf_ptrace_trad_target): Move to ...
5848 * linux-nat-trad.c: ... this new file.
5849 * linux-nat-trad.h: New file.
5850 * linux-nat.c (linux_target_install_ops): Make extern.
5851 (linux_trad_target): Delete.
5852 * linux-nat.h (linux_trad_target): Delete declaration.
5853 (linux_target_install_ops): Declare.
5854 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5857 2018-05-02 Pedro Alves <palves@redhat.com>
5859 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5860 procfs_target/add_target here.
5861 * procfs.c (procfs_target): Make static.
5862 (_initialize_procfs): Call add_target here.
5863 * procfs.h (struct target_ops): Remove forward declaration.
5864 (procfs_target): Remove declaration.
5865 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5867 2018-05-02 Pedro Alves <palves@redhat.com>
5869 * procfs.c (procfs_stopped_by_watchpoint)
5870 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5871 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5873 (procfs_use_watchpoints): Delete, move contents...
5874 (procfs_target): ... here.
5875 * procfs.h (procfs_use_watchpoints): Delete declaration.
5876 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5877 procfs_use_watchpoints.
5878 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5879 procfs_use_watchpoints.
5881 2018-05-02 Tom Tromey <tom@tromey.com>
5884 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5885 and var_zuinteger_unlimited.
5886 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5887 and PARAM_ZUINTEGER_UNLIMITED.
5888 (set_parameter_value): Handle var_zuinteger and
5889 var_zuinteger_unlimited.
5890 (add_setshow_generic): Likewise.
5891 (parmpy_init): Likewise.
5893 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5896 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5897 pointer is not null before dereferencing it.
5899 2018-04-30 Tom Tromey <tom@tromey.com>
5901 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5904 2018-04-30 Tom Tromey <tom@tromey.com>
5906 * breakpoint.c (mention): Remove use of is_mi_like_p.
5907 (print_mention_ranged_breakpoint): Likewise.
5908 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5911 2018-04-30 Tom Tromey <tom@tromey.com>
5913 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5915 2018-04-30 Tom Tromey <tom@tromey.com>
5917 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5918 (info_spu_event_command): Remove some uses of is_mi_like_p.
5920 2018-04-30 Tom Tromey <tom@tromey.com>
5922 * python/py-framefilter.c (py_print_single_arg)
5923 (enumerate_locals, py_print_args, py_print_frame): Remove some
5924 uses of is_mi_like_p.
5926 2018-04-30 Tom Tromey <tom@tromey.com>
5929 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5930 * ui-out.h (ui_out::is_mi_like_p): Now const.
5931 (ui_out::do_is_mi_like_p): Now const.
5932 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5934 2018-04-30 Tom Tromey <tom@tromey.com>
5936 * varobj.c (varobj_set_visualizer): Use new_reference.
5937 * python/python.c (gdbpy_decode_line): Use new_reference.
5938 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5941 2018-04-30 Tom Tromey <tom@tromey.com>
5943 * varobj.c (install_new_value): Use new_reference.
5944 * value.h (value_incref): Return void. Swap intro comment with
5946 * value.c (set_value_parent): Use new_reference.
5947 (value_incref): Return void. Update intro comment.
5948 (release_value): Use new_reference.
5949 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5951 2018-04-30 Tom Tromey <tom@tromey.com>
5953 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5954 * gdb_bfd.h (new_bfd_ref): Remove.
5955 (gdb_bfd_open): Update comment.
5956 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5957 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5958 (gdb_bfd_fdopenr): Use new_reference.
5959 * exec.c (exec_file_attach): Use new_reference.
5961 2018-04-30 Tom Tromey <tom@tromey.com>
5963 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5966 2018-04-30 Tom Tromey <tom@tromey.com>
5968 * jit.c (jit_read_code_entry): Use type_align.
5969 * i386-tdep.c (i386_gdbarch_init): Don't call
5970 set_gdbarch_long_long_align_bit.
5971 * gdbarch.sh: Remove long_long_align_bit.
5972 * gdbarch.c, gdbarch.h: Rebuild.
5973 * arc-tdep.c (arc_type_align): New function.
5974 (arc_gdbarch_init): Use arc_type_align. Don't call
5975 set_gdbarch_long_long_align_bit.
5977 2018-04-30 Tom Tromey <tom@tromey.com>
5979 * rust-lang.c (rust_type_alignment): Remove.
5980 (rust_composite_type): Use type_align.
5982 2018-04-30 Tom Tromey <tom@tromey.com>
5984 * NEWS: Mention Type.align.
5985 * python/py-type.c (typy_get_alignof): New function.
5986 (type_object_getset): Add "alignof".
5988 2018-04-30 Tom Tromey <tom@tromey.com>
5992 * std-operator.def (UNOP_ALIGNOF): New operator.
5993 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5995 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5996 * c-lang.c (c_op_print_tab): Add alignof.
5997 * c-exp.y (ALIGNOF): New token.
5998 (exp): Add "ALIGNOF" production.
5999 (ident_tokens): Add _Alignof and alignof.
6001 2018-04-30 Tom Tromey <tom@tromey.com>
6003 * i386-tdep.c (i386_type_align): New function.
6004 (i386_gdbarch_init): Update.
6005 * gdbarch.sh (type_align): New method.
6006 * gdbarch.c, gdbarch.h: Rebuild.
6007 * arch-utils.h (default_type_align): Declare.
6008 * arch-utils.c (default_type_align): New function.
6009 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6010 (struct type) <align_log2>: New field.
6011 <instance_flags>: Now a bitfield.
6012 (TYPE_RAW_ALIGN): New macro.
6013 (type_align, type_raw_align, set_type_align): Declare.
6014 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6016 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6017 (get_alignment, maybe_set_alignment): New functions.
6018 (read_structure_type, read_enumeration_type, read_array_type)
6019 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6020 (read_subrange_type, read_base_type): Set type alignment.
6022 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6024 * dwarf2read.c (read_index_from_section): Use bool.
6026 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6029 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6032 2018-04-29 John Reiser <jreiser@BitWagon.com>
6035 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6036 last step, and do it atomically.
6038 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6040 * compile/compile-c-types.c (convert_int, convert_float):
6043 2018-04-27 Tom Tromey <tom@tromey.com>
6046 * rust-lang.c (rust_inclusive_range_type_p): New function.
6047 (rust_range): Handle inclusive ranges.
6048 (rust_compute_range): Likewise.
6049 * rust-exp.y (struct rust_op) <inclusive>: New field.
6050 (DOTDOTEQ): New constant.
6051 (range_expr): Add "..=" productions.
6052 (operator_tokens): Add "..=" token.
6053 (ast_range): Add "inclusive" parameter.
6054 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6056 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6058 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6059 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6061 * expprint.c (print_subexp_standard): Handle new bounds values.
6062 (dump_subexp_body_standard): Likewise.
6064 2018-04-27 Tom Tromey <tom@tromey.com>
6066 * configure: Rebuild.
6067 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6068 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6070 (class symbol_needs_eval_context): Likewise.
6071 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6072 (mock_mapped_index::symbol_name_at): Use "override". Remove
6074 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6076 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6077 * aarch64-tdep.c (instruction_reader::read): Use "override".
6078 (instruction_reader_test::read): Likewise.
6079 * arm-tdep.c (instruction_reader::read): Use "override".
6080 (instruction_reader_thumb::read): Likewise.
6082 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6085 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6086 instead of remote_send.
6087 (remote_send): Remove.
6089 2018-04-26 Pedro Alves <palves@redhat.com>
6091 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6092 find_function_start_sal instead of find_pc_line.
6094 2018-04-26 Pedro Alves <palves@redhat.com>
6096 * breakpoint.c (set_breakpoint_location_function): Handle
6098 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6099 * elfread.c (elf_symtab_read): Give data symbols with
6100 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6101 (elf_rel_plt_read): Update comment.
6102 * linespec.c (convert_linespec_to_sals): Handle
6104 (minsym_found): Handle mst_data_gnu_ifunc.
6105 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6106 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6107 * parse.c (find_minsym_type_and_address): Handle
6109 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6110 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6111 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6113 <mst_data_gnu_ifunc>: New enumerator.
6115 2018-04-26 Pedro Alves <palves@redhat.com>
6117 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6118 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6119 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6121 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6122 (lookup_minimal_symbol_by_pc): Adjust.
6123 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6124 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6125 * minsyms.h (lookup_msym_prefer): New enum.
6126 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6127 parameter by a lookup_msym_prefer parameter.
6129 2018-04-26 Pedro Alves <palves@redhat.com>
6131 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6132 ends in "@plt" instead of looking at the symbol's section.
6134 2018-04-26 Pedro Alves <palves@redhat.com>
6136 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6138 (find_pc_partial_function_gnu_ifunc): Rename to ...
6139 (find_pc_partial_function): ... this, and remove references to
6141 (find_pc_partial_function): Delete old implementation.
6142 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6144 2018-04-26 Pedro Alves <palves@redhat.com>
6146 * linespec.c (struct bound_minimal_symbol_search_key): New.
6147 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6148 skip first line if we found a GNU ifunc minimal symbol by name.
6149 (compare_msymbols): Change parameters to work with a destructured
6151 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6154 2018-04-26 Pedro Alves <palves@redhat.com>
6156 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6157 ifunc targets here. Instead, if we have an ifunc minsym, use its
6159 (add_location_to_breakpoint): Store the minsym and the objfile in
6160 the breakpoint location.
6161 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6162 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6163 Record the minsym in the sal.
6164 * symtab.h (symtab_and_line) <msymbol>: New field.
6166 2018-04-26 Pedro Alves <palves@redhat.com>
6168 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6169 unless we actually resolved the ifunc.
6171 2018-04-26 Pedro Alves <palves@redhat.com>
6173 * c-exp.y (variable production): Prefer ifunc minsyms over
6174 regular function symbols.
6175 * symtab.c (find_gnu_ifunc): New function.
6176 * minsyms.h (lookup_msym_prefer): New enum.
6177 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6178 parameter by a lookup_msym_prefer parameter.
6179 * symtab.h (find_gnu_ifunc): New declaration.
6181 2018-04-26 Pedro Alves <palves@redhat.com>
6183 * blockframe.c (find_gnu_ifunc_target_type): New function.
6184 (find_function_type): New.
6185 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6186 return a value with a memory address.
6187 (eval_call): For calls to GNU ifunc functions, try to find the
6188 type of the target function from the type that the resolver
6190 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6192 * infcall.c (find_function_return_type): Delete.
6193 (find_function_addr): Add 'function_type' parameter. For calls to
6194 GNU ifunc functions, try to find the type of the target function
6195 from the type that the resolver returns, and return it via
6197 (call_function_by_hand_dummy): Adjust to use the function type
6198 returned by find_function_addr.
6199 (find_function_addr): Add 'function_type' parameter and move
6201 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6204 2018-04-26 Pedro Alves <palves@redhat.com>
6206 * c-exp.y (variable production): Skip finding an alias for ifunc
6209 2018-04-26 Pedro Alves <palves@redhat.com>
6211 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6213 2018-04-25 Pedro Alves <palves@redhat.com>
6215 * infcmd.c (kill_command): Print the pid as string, not the whole
6216 thread's ptid. Add comment. s/has been killed/killed/ in output
6218 * remote.c (remote_detach_1): Print the pid as string, not the
6219 whole thread's ptid.
6221 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6222 Sergio Durigan Junior <sergiodj@redhat.com>
6223 Pedro Alves <palves@redhat.com>
6225 * infcmd.c (kill_command): Print message when inferior has
6227 * inferior.c (print_inferior_events): Remove 'static'. Set as
6229 (add_inferior): Improve message printed when
6230 'print_inferior_events' is on.
6231 (exit_inferior): Remove message printed when
6232 'print_inferior_events' is on.
6233 (detach_inferior): Improve message printed when
6234 'print_inferior_events' is on.
6235 (initialize_inferiors): Use 'add_inferior_silent' to set
6236 'current_inferior_'.
6237 * inferior.h (print_inferior_events): Declare here as
6239 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6240 '[Detaching...]' messages when 'print_inferior_events' is on.
6241 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6242 as prefix/suffix for messages. Remove periods. Fix erroneous
6243 'Detaching after fork from child...', replace it by '... from
6245 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6246 prefix/suffix when printing 'Detaching...' messages. Print
6247 them when 'print_inferior_events' is on.
6248 * remote.c (remote_detach_1): Print message when detaching
6249 from inferior and '!is_fork_parent'.
6251 2018-04-24 Tom Tromey <tom@tromey.com>
6253 * cli-out.h: Reindent.
6255 2018-04-24 Tom Tromey <tom@tromey.com>
6257 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6258 (cli_ui_out::do_field_string): Use fputs_filtered.
6259 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6261 2018-04-23 Tom Tromey <tom@tromey.com>
6263 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6264 gdb::unique_xmalloc_ptr.
6266 2018-04-23 Tom Tromey <tom@tromey.com>
6268 * configure: Rebuild.
6270 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6273 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6274 prepare_for_testing. Set normal_bp to r_debug_state if target
6277 2018-04-21 Pedro Alves <palves@redhat.com>
6278 Rajendra SY <rajendra.sy@gmail.com>
6280 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6281 * remote.c (extended_remote_attach): In all-stop mode, mark the
6282 thread as executing.
6284 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6286 * thread.c (thread_apply_all_command): Fix comment.
6287 (thread_command): Fix comment.
6289 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6291 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6293 * features/aarch64-core.c (create_feature_aarch64_core):
6295 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6297 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6299 * features/i386/32bit-avx512.c
6300 (create_feature_i386_32bit_avx512): Likewise.
6301 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6303 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6305 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6307 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6309 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6311 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6313 * features/i386/64bit-avx512.c
6314 (create_feature_i386_64bit_avx512): Likewise.
6315 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6317 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6319 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6321 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6323 * features/i386/64bit-segments.c
6324 (create_feature_i386_64bit_segments): Likewise.
6325 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6327 * features/i386/x32-core.c
6328 (create_feature_i386_x32_core): Likewise.
6329 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6330 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6331 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6332 * target-descriptions.c: In generated code, don't pass xml
6335 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6337 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6338 (print_xml_feature::visit_post): Likewise.
6339 (print_xml_feature::visit): Likewise.
6340 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6341 (print_xml_feature): Add new class.
6342 * regformats/regdat.sh: Null xmltarget on feature targets.
6343 * target-descriptions.c (struct target_desc): Add xmltarget.
6344 (maintenance_check_tdesc_xml_convert): Add unittest function.
6345 (tdesc_get_features_xml): Add function to get xml.
6346 (maintenance_check_xml_descriptions): Test xml generation.
6347 * xml-tdesc.c (string_read_description_xml): Add function.
6348 * xml-tdesc.h (string_read_description_xml): Add declaration.
6350 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6352 * features/Makefile: Add feature marker to targets with new style
6353 target descriptions.
6354 * regformats/aarch64.dat: Regenerate.
6355 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6356 * regformats/i386/amd64-avx-linux.dat: Likewise.
6357 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6358 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6359 * regformats/i386/amd64-linux.dat: Likewise.
6360 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6361 * regformats/i386/amd64.dat: Likewise.
6362 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6363 * regformats/i386/i386-avx-linux.dat: Likewise.
6364 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6365 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6366 * regformats/i386/i386-linux.dat: Likewise.
6367 * regformats/i386/i386-mmx-linux.dat: Likewise.
6368 * regformats/i386/i386-mpx-linux.dat: Likewise.
6369 * regformats/i386/i386.dat: Likewise.
6370 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6371 * regformats/i386/x32-avx-linux.dat: Likewise.
6372 * regformats/i386/x32-linux.dat: Likewise.
6373 * regformats/tic6x-c62x-linux.dat: Likewise.
6374 * regformats/tic6x-c64x-linux.dat: Likewise.
6375 * regformats/tic6x-c64xp-linux.dat: Likewise.
6376 * regformats/regdat.sh: Parse feature marker.
6378 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6380 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6381 (tdesc_osabi_name): Likewise.
6382 * target-descriptions.c (tdesc_architecture_name): Add new
6384 (tdesc_osabi_name): Likewise.
6386 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6388 * common/tdesc.c (tdesc_predefined_type): Move to here.
6389 (tdesc_named_type): Likewise.
6390 (tdesc_create_vector): Likewise.
6391 (tdesc_create_struct): Likewise.
6392 (tdesc_set_struct_size): Likewise.
6393 (tdesc_create_union): Likewise.
6394 (tdesc_create_flags): Likewise.
6395 (tdesc_create_enum): Likewise.
6396 (tdesc_add_field): Likewise.
6397 (tdesc_add_typed_bitfield): Likewise.
6398 (tdesc_add_bitfield): Likewise.
6399 (tdesc_add_flag): Likewise.
6400 (tdesc_add_enum_value): Likewise.
6401 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6402 (struct tdesc_type_vector): Likewise.
6403 (struct tdesc_type_field): Likewise.
6404 (struct tdesc_type_with_fields): Likewise.
6405 (tdesc_create_enum): Add declaration.
6406 (tdesc_add_typed_bitfield): Likewise.
6407 (tdesc_add_enum_value): Likewise.
6408 * target-descriptions.c (tdesc_type_field): Move from here.
6409 (tdesc_type_builtin): Likewise.
6410 (tdesc_type_vector): Likewise.
6411 (tdesc_type_with_fields): Likewise.
6412 (tdesc_predefined_types): Likewise.
6413 (tdesc_named_type): Likewise.
6414 (tdesc_create_vector): Likewise.
6415 (tdesc_create_struct): Likewise.
6416 (tdesc_set_struct_size): Likewise.
6417 (tdesc_create_union): Likewise.
6418 (tdesc_create_flags): Likewise.
6419 (tdesc_create_enum): Likewise.
6420 (tdesc_add_field): Likewise.
6421 (tdesc_add_typed_bitfield): Likewise.
6422 (tdesc_add_bitfield): Likewise.
6423 (tdesc_add_flag): Likewise.
6424 (tdesc_add_enum_value): Likewise.
6425 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6426 (tdesc_add_typed_bitfield): Likewise.
6427 (tdesc_add_enum_value): Likewise.
6429 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6431 * common/tdesc.c (tdesc_feature::accept): Move to here.
6432 (tdesc_feature::operator==): Likewise.
6433 (tdesc_create_reg): Likewise.
6434 * common/tdesc.h (tdesc_type_kind): Likewise.
6435 (struct tdesc_type): Likewise.
6436 (struct tdesc_feature): Likewise.
6437 * regformats/regdat.sh: Create a feature.
6438 * target-descriptions.c (tdesc_type_kind): Move from here.
6439 (tdesc_type): Likewise.
6440 (tdesc_type_up): Likewise.
6441 (tdesc_feature): Likewise.
6442 (tdesc_create_reg): Likewise.
6444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6446 * Makefile.in: Add arch/tdesc.c
6447 * common/tdesc.c: New file.
6448 * common/tdesc.h (tdesc_element_visitor): Move to here.
6449 (tdesc_element): Likewise.
6450 (tdesc_reg): Likewise.
6451 (tdesc_reg_up): Likewise.
6452 * regformats/regdef.h (reg): Add offset to constructors.
6453 * target-descriptions.c (tdesc_element_visitor): Move from here.
6454 (tdesc_element): Likewise.
6455 (tdesc_reg): Likewise.
6456 (tdesc_reg_up): Likewise.
6458 2018-04-17 Tom Tromey <tom@tromey.com>
6460 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6463 2018-04-17 Tom Tromey <tom@tromey.com>
6465 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6467 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6469 * symtab.c (print_symbol_info): Skip printing filename and line
6470 number when `last' is NULL.
6471 (symtab_symbol_info): Use empty string instead of NULL for first
6472 invocation of print_symbol_info.
6473 (rbreak_command): Pass NULL to `last' parameter of
6476 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6478 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6481 2018-04-16 Pedro Alves <palves@redhat.com>
6483 * MAINTAINERS (sh): Remove.
6484 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6485 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6486 (ALLDEPFILES): Remove sh64-tdep.c.
6487 * NEWS: Mentions that support for SH-5/SH64 is removed.
6488 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6489 (sh*-*-openbsd*): Ditto.
6490 (sh64-*-elf*): Remove.
6492 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6493 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6494 * sh-tdep.c: No longer include "sh64-tdep.h".
6495 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6496 * sh64-tdep.c, sh64-tdep.h: Remove files.
6498 2018-04-16 Pedro Alves <palves@redhat.com>
6500 * MAINTAINERS: Remove m88k.
6501 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6502 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6503 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6504 * NEWS: Mention that support for m88k was removed.
6505 * configure.host (m88*-*-*): Remove support.
6506 * configure.nat (m88k-*-*): Remove support.
6507 * configure.tgt (m88*-*-openbsd*): Remove.
6508 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6510 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6512 * configure.tgt (x86_tobjs): New variable.
6513 (amd64_tobjs, i386_tobjs): Use it.
6515 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6517 * symtab.c (print_symbol_info): Precede the symbol definition by
6518 the line number when available.
6519 * NEWS: Advertise this enhancement.
6521 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6523 * NEWS (New options): announce set/show record btrace cpu.
6524 * btrace.c: Include record-btrace.h.
6525 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6526 the vendor is unknown.
6527 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6528 Maybe overwrite the btrace configuration's cpu.
6529 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6530 (btrace_fetch): Add cpu parameter. Update callers.
6531 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6532 Maybe overwrite the btrace configuration's cpu. Skip enabling
6533 errata workarounds if the vendor is unknown.
6534 * python/py-record-btrace.c: Include record-btrace.h.
6535 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6536 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6537 * record-btrace.c (record_btrace_cpu_state_kind): New.
6538 (record_btrace_cpu): New.
6539 (set_record_btrace_cpu_cmdlist): New.
6540 (record_btrace_get_cpu): New.
6541 (require_btrace_thread, record_btrace_info)
6542 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6543 (cmd_set_record_btrace_cpu_none): New.
6544 (cmd_set_record_btrace_cpu_auto): New.
6545 (cmd_set_record_btrace_cpu): New.
6546 (cmd_show_record_btrace_cpu): New.
6547 (_initialize_record_btrace): Initialize set/show record btrace cpu
6549 * record-btrace.h (record_btrace_get_cpu): New.
6551 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6553 * record.c (set_record_command): Fix typo in message.
6555 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6557 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6559 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6561 * infrun.c (process_event_stop_test): Call
6562 gdbarch_in_indirect_branch_thunk.
6563 * gdbarch.sh (in_indirect_branch_thunk): New.
6564 * gdbarch.c: Regenerated.
6565 * gdbarch.h: Regenerated.
6568 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6569 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6570 (ALLDEPFILES): Add x86-tdep.c.
6571 * arch-utils.h (default_in_indirect_branch_thunk): New.
6572 * arch-utils.c (default_in_indirect_branch_thunk): New.
6573 * i386-tdep: Include x86-tdep.h.
6574 (i386_in_indirect_branch_thunk): New.
6575 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6577 * amd64-tdep: Include x86-tdep.h.
6578 (amd64_in_indirect_branch_thunk): New.
6579 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6581 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6584 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6585 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6586 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6589 2018-04-12 Tom Tromey <tom@tromey.com>
6591 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6592 (rust_evaluate_subexp): Likewise.
6594 2018-04-12 Pedro Alves <palves@redhat.com>
6596 * procfs.c (procfs_detach): Make forward declaration's prototype
6597 match definition's protototype.
6598 (proc_get_LDT_entry): Remove stale do_cleanups call.
6600 2018-04-12 Pedro Alves <palves@redhat.com>
6602 * target.h (target_ops::to_has_exited): Delete.
6603 (target_has_exited): Delete.
6604 * target-delegates.c: Regenerate.
6606 2018-04-11 Pedro Alves <palves@redhat.com>
6608 * target.c (fileio_fh_t::t): Add comment.
6609 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6610 (target_fileio_close): Handle a NULL target.
6611 (invalidate_fileio_fh): New.
6612 (target_close): Call it.
6613 * remote.c (remote_hostio_send_command): No longer check whether
6614 remote_desc is open.
6616 2018-04-11 Pedro Alves <palves@redhat.com>
6618 * target.c (fileio_fh_t): Make it a named struct instead of a
6620 (fileio_fh_t::is_closed): New method.
6621 (DEF_VEC_O (fileio_fh_t)): Remove.
6622 (fileio_fhandles): Now a std::vector.
6623 (is_closed_fileio_fh): Delete.
6624 (acquire_fileio_fd): Adjust. Rename parameters.
6625 (release_fileio_fd): Adjust.
6626 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6627 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6628 (target_fileio_close): Adjust.
6630 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6632 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6635 2018-04-10 Pedro Alves <palves@redhat.com>
6637 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6638 (scoped_finish_thread_state): New class.
6639 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6641 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6642 (fetch_inferior_event, normal_stop): Likewise.
6643 * thread.c (finish_thread_state_cleanup): Delete.
6645 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6646 Pedro Alves <palves@redhat.com>
6648 * value.c: Include "selftest.h" and "common/array-view.h".
6649 (struct range) <operator ==>: New.
6650 (test_ranges_contain): New.
6651 (check_ranges_vector): New.
6652 (test_insert_into_bit_range_vector): New.
6653 (_initialize_values): Register selftests.
6654 * common/array-view.h (operator==, operator!=): New.
6656 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6658 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6660 * inline-frame.c: Include <algorithm>.
6661 (struct inline_state): Add constructor.
6662 (inline_state_s): Remove.
6663 (DEF_VEC_O(inline_state_s)): Remove.
6664 (inline_states): Change type to std::vector.
6665 (find_inline_frame_state): Adjust to std::vector.
6666 (allocate_inline_frame_state): Remove.
6667 (clear_inline_frame_state): Adjust to std::vector.
6668 (skip_inline_frames): Adjust to std::vector.
6670 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6672 * tracepoint.h (struct trace_state_variable): Add constructor.
6673 <name>: Change type to std::string.
6674 * tracepoint.c (tsv_s): Remove.
6675 (DEF_VEC_O(tsv_s)): Remove.
6676 (tvariables): Change to std::vector.
6677 (create_trace_state_variable): Adjust to std::vector.
6678 (find_trace_state_variable): Likewise.
6679 (find_trace_state_variable_by_number): Likewise.
6680 (delete_trace_state_variable): Likewise.
6681 (trace_variable_command): Adjust to std::string.
6682 (delete_trace_variable_command): Likewise.
6683 (tvariables_info_1): Adjust to std::vector.
6684 (save_trace_state_variables): Likewise.
6685 (start_tracing): Likewise.
6686 (merge_uploaded_trace_state_variables): Adjust to std::vector
6688 * target.h (struct target_ops)
6689 <to_download_trace_state_variable>: Pass reference to
6690 trace_state_variable.
6691 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6692 * target-delegates.c: Re-generate.
6693 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6694 (mi_tsv_deleted): Likewise.
6695 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6696 * remote.c (remote_download_trace_state_variable): Change
6697 pointer to reference and adjust.
6698 * make-target-delegates (parse_argtypes): Handle references.
6699 (write_function_header): Likewise.
6700 (munge_type): Likewise.
6702 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6704 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6705 string_view-selftests.c.
6706 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6708 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6709 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6710 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6711 * unittests/basic_string_view/element_access/char/1.cc:
6713 * unittests/basic_string_view/element_access/char/empty.cc:
6715 * unittests/basic_string_view/element_access/char/front_back.cc:
6717 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6718 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6720 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6722 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6724 * unittests/basic_string_view/operations/compare/char/1.cc:
6726 * unittests/basic_string_view/operations/compare/char/13650.cc:
6728 * unittests/basic_string_view/operations/copy/char/1.cc:
6730 * unittests/basic_string_view/operations/data/char/1.cc:
6732 * unittests/basic_string_view/operations/find/char/1.cc:
6734 * unittests/basic_string_view/operations/find/char/2.cc:
6736 * unittests/basic_string_view/operations/find/char/3.cc:
6738 * unittests/basic_string_view/operations/find/char/4.cc:
6740 * unittests/basic_string_view/operations/rfind/char/1.cc:
6742 * unittests/basic_string_view/operations/rfind/char/2.cc:
6744 * unittests/basic_string_view/operations/rfind/char/3.cc:
6746 * unittests/basic_string_view/operations/substr/char/1.cc:
6748 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6749 * unittests/string_view-selftests.c: New file.
6751 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6753 * unittests/basic_string_view/capacity/1.cc: New file.
6754 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6755 * unittests/basic_string_view/cons/char/1.cc: New file.
6756 * unittests/basic_string_view/cons/char/2.cc: New file.
6757 * unittests/basic_string_view/cons/char/3.cc: New file.
6758 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6759 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6760 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6761 * unittests/basic_string_view/element_access/char/1.cc: New file.
6762 * unittests/basic_string_view/element_access/char/2.cc: New file.
6763 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6764 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6765 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6766 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6767 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6768 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6769 * unittests/basic_string_view/include.cc: New file.
6770 * unittests/basic_string_view/inserters/char/1.cc: New file.
6771 * unittests/basic_string_view/inserters/char/2.cc: New file.
6772 * unittests/basic_string_view/inserters/char/3.cc: New file.
6773 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6774 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6775 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6776 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6777 * unittests/basic_string_view/literals/types.cc: New file.
6778 * unittests/basic_string_view/literals/values.cc: New file.
6779 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6780 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6781 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6782 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6783 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6784 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6785 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6786 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6787 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6788 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6789 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6790 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6791 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6792 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6793 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6794 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6795 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6796 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6797 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6798 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6799 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6800 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6801 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6802 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6803 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6804 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6805 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6806 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6807 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6808 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6809 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6810 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6811 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6812 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6813 * unittests/basic_string_view/operators/char/2.cc: New file.
6814 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6815 * unittests/basic_string_view/range_access/char/1.cc: New file.
6816 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6817 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6818 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6819 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6820 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6821 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6822 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6823 * unittests/basic_string_view/typedefs.cc: New file.
6824 * unittests/basic_string_view/types/1.cc: New file.
6826 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6828 * common/gdb_string_view.h: Remove libstdc++ implementation
6829 details, adjust to gdb reality.
6830 * common/gdb_string_view.tcc: Likewise.
6831 * cli/cli-script.c (struct string_view): Remove.
6832 (user_args) <m_args>: Change element type to gdb::string_view.
6833 (user_args::insert_args): Adjust.
6835 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6837 * common/gdb_string_view.h: New file.
6838 * common/gdb_string_view.tcc: New file.
6840 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6842 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6843 * configure: Re-generate.
6845 2018-04-09 Pedro Alves <palves@redhat.com>
6847 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6848 (set_target_gdbarch): Call
6849 gdb::observers::architecture_changed.notify instead of
6850 observer_notify_architecture_changed.
6852 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6854 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6855 (do_restore_current_traceframe_cleanup): Remove.
6856 (restore_current_traceframe_cleanup_dtor): Remove.
6857 (make_cleanup_restore_current_traceframe): Remove.
6858 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6860 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6861 * infrun.c (fetch_inferior_event): Use
6862 scoped_restore_current_traceframe.
6864 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6866 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6868 <n_allocated_type_units>: Remove.
6869 <all_type_units>: Change to std::vector.
6870 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6871 to std::vector change.
6872 (dwarf2_per_objfile::get_cutu): Likewise.
6873 (dwarf2_per_objfile::get_tu): Likewise.
6874 (create_signatured_type_table_from_index): Likewise.
6875 (create_signatured_type_table_from_debug_names): Likewise.
6876 (dw2_symtab_iter_next): Likewise.
6877 (dw2_print_stats): Likewise.
6878 (dw2_expand_all_symtabs): Likewise.
6879 (dw2_expand_marked_cus): Likewise.
6880 (dw2_debug_names_iterator::next): Likewise.
6881 (dwarf2_initialize_objfile): Likewise.
6882 (add_signatured_type_cu_to_table): Likewise.
6883 (create_all_type_units): Likewise.
6884 (add_type_unit): Likewise.
6885 (struct tu_abbrev_offset): Add constructor.
6886 (build_type_psymtabs_1): Adjust to std::vector change.
6887 (print_tu_stats): Likewise.
6888 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6889 (write_debug_names): Likewise.
6891 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6893 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6894 Make an std::vector.
6895 <n_comp_units>: Remove.
6896 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6897 to std::vector change.
6898 (dwarf2_per_objfile::get_cutu): Likewise.
6899 (dwarf2_per_objfile::get_cu): Likewise.
6900 (create_cus_from_index): Likewise.
6901 (create_addrmap_from_index): Likewise.
6902 (create_addrmap_from_aranges): Likewise.
6903 (dwarf2_read_index): Likewise.
6904 (dw2_find_last_source_symtab): Likewise.
6905 (dw2_map_symtabs_matching_filename): Likewise.
6906 (dw2_symtab_iter_next): Likewise.
6907 (dw2_print_stats): Likewise.
6908 (dw2_expand_all_symtabs): Likewise.
6909 (dw2_expand_symtabs_with_fullname): Likewise.
6910 (dw2_expand_marked_cus): Likewise.
6911 (dw2_map_symbol_filenames): Likewise.
6912 (create_cus_from_debug_names): Likewise.
6913 (dwarf2_read_debug_names): Likewise.
6914 (dw2_debug_names_iterator::next): Likewise.
6915 (dwarf2_initialize_objfile): Likewise.
6916 (set_partial_user): Likewise.
6917 (dwarf2_build_psymtabs_hard): Likewise.
6918 (read_comp_units_from_section): Remove arguments, adjust to
6920 (create_all_comp_units): Adjust to std::vector and
6921 read_comp_units_from_section changes.
6922 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6924 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6925 (psyms_seen_size): Likewise.
6926 (write_gdbindex): Likewise.
6927 (write_debug_names): Likewise.
6929 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6931 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6932 with dwarf2_per_objfile.
6933 (create_cus_from_index): Likewise.
6934 (create_signatured_type_table_from_index): Likewise.
6935 (dwarf2_read_index): Likewise.
6936 (dwarf2_initialize_objfile): Likewise.
6937 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6938 per_cu rather than get_dwarf2_per_objfile.
6940 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6942 * dwarf2read.h (struct signatured_type): Forward declare.
6943 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6945 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6946 (dw2_get_cutu): ...this.
6947 (dwarf2_per_objfile::get_cu): Rename from...
6948 (dw2_get_cu): ...this.
6949 (dwarf2_per_objfile::get_tu): New.
6950 (create_addrmap_from_index): Adjust.
6951 (create_addrmap_from_aranges): Adjust.
6952 (dw2_find_last_source_symtab): Adjust.
6953 (dw2_map_symtabs_matching_filename): Adjust.
6954 (dw2_symtab_iter_next): Adjust.
6955 (dw2_print_stats): Adjust.
6956 (dw2_expand_all_symtabs): Adjust.
6957 (dw2_expand_symtabs_with_fullname): Adjust.
6958 (dw2_expand_marked_cus): Adjust.
6959 (dw_expand_symtabs_matching_file_matcher): Adjust.
6960 (dw2_map_symbol_filenames): Adjust.
6961 (dw2_debug_names_iterator::next): Adjust.
6962 (dwarf2_initialize_objfile): Adjust.
6963 (set_partial_user): Adjust.
6964 (dwarf2_build_psymtabs_hard): Adjust.
6966 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6968 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6969 Remove unused variables.
6970 (dw2_map_symtabs_matching_filename): Likewise.
6971 (dwarf2_record_block_ranges): Likewise.
6972 (dwarf2_read_addr_index): Likewise.
6973 (follow_die_offset): Likewise.
6975 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6977 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6978 to symbol_file_add_main.
6980 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6983 * mi/mi-console.c (do_fputc_async_safe): New.
6984 (mi_console_file::write_async_safe): New.
6985 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6986 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6988 * ui-file.c (ui_file::putstrn): Adjust call to
6989 fputstrn_unfiltered.
6990 * utils.c (printchar): Replace do_fputs and do_fprintf
6991 parameters by do_fputc.
6992 (fputstr_filtered): Adjust call to printchar.
6993 (fputstr_unfiltered): Likewise.
6994 (fputstrn_filtered): Likewise.
6995 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6997 * utils.h (do_fputc_ftype): New typedef.
6998 (fputstrn_unfiltered): Add do_fputc parameter.
7000 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7002 * regformats/i386/i386-avx.dat: Remove.
7004 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7007 * amd64-tdep.c (amd64_none_init_abi): New function.
7008 (amd64_x32_none_init_abi): New function.
7009 (_initialize_amd64_tdep): Register handlers for x86-64 and
7010 x64_32 with GDB_OSABI_NONE.
7011 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7012 GDB_OSABI_NONE osabi.
7014 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7017 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7019 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7020 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7022 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7024 * common/byte-vector.h (char_vector): New type.
7025 * target.h (target_read_alloc): Return
7026 gdb::optional<byte_vector>.
7027 (target_read_stralloc): Return gdb::optional<char_vector>.
7028 (target_get_osdata): Return gdb::optional<char_vector>.
7029 * target.c (target_read_alloc_1): Templatize. Replacement
7030 manual memory management with vector.
7031 (target_read_alloc): Change return type, adjust.
7032 (target_read_stralloc): Change return type, adjust.
7033 (target_get_osdata): Change return type, adjust.
7034 * auxv.c (struct auxv_info) <length>: Remove.
7035 <data>: Change type to gdb::optional<byte_vector>.
7036 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7037 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7038 (target_auxv_search): Adjust.
7039 (fprint_target_auxv): Adjust.
7040 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7041 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7042 (linux_make_corefile_notes): Adjust.
7043 * osdata.c (get_osdata): Adjust.
7044 * remote.c (remote_get_threads_with_qxfer): Adjust.
7045 (remote_memory_map): Adjust.
7046 (remote_traceframe_info): Adjust.
7047 (btrace_read_config): Adjust.
7048 (remote_read_btrace): Adjust.
7049 (remote_pid_to_exec_file): Adjust.
7050 * solib-aix.c (solib_aix_get_library_list): Adjust.
7051 * solib-dsbt.c (decode_loadmap): Don't free buf.
7052 (dsbt_get_initial_loadmaps): Adjust.
7053 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7054 * solib-target.c (solib_target_current_sos): Adjust.
7055 * tracepoint.c (sdata_make_value): Adjust.
7056 * xml-support.c (xinclude_start_include): Adjust.
7057 (xml_fetch_content_from_file): Adjust.
7058 * xml-support.h (xml_fetch_another): Change return type.
7059 (xml_fetch_content_from_file): Change return type.
7060 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7061 * xml-tdesc.c (file_read_description_xml): Adjust.
7062 (fetch_available_features_from_target): Change return type.
7063 (target_fetch_description_xml): Adjust.
7064 (target_read_description_xml): Adjust.
7066 2018-04-06 Tom Tromey <tom@tromey.com>
7068 * value.c (~value): Update.
7069 (struct value) <contents>: Now unique_xmalloc_ptr.
7070 (value_contents_bits_eq, allocate_value_contents)
7071 (value_contents_raw, value_contents_all_raw)
7072 (value_contents_for_printing, value_contents_for_printing_const)
7073 (set_value_enclosing_type): Update.
7075 2018-04-06 Tom Tromey <tom@tromey.com>
7077 * value.c (range_s): Remove typedef, VEC.
7078 (struct range): Add operator<.
7079 (range_lessthan): Remove.
7080 (ranges_contain): Change type.
7082 (struct value) <unavailable, optimized_out>: Now std::vector.
7083 (value_entirely_available)
7084 (value_entirely_covered_by_range_vector)
7085 (value_entirely_unavailable, value_entirely_optimized_out):
7087 (insert_into_bit_range_vector): Change argument type.
7088 (find_first_range_overlap): Likewise.
7089 (struct ranges_and_idx, value_contents_bits_eq)
7090 (require_not_optimized_out, require_available): Update.
7091 (ranges_copy_adjusted): Change argument types.
7092 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7094 2018-04-06 Tom Tromey <tom@tromey.com>
7096 * value.c (~value): Update.
7097 (struct value) <parent>: Now a value_ref_ptr.
7098 (value_parent, set_value_parent, value_address, value_copy):
7101 2018-04-06 Tom Tromey <tom@tromey.com>
7103 * value.c (struct value): Add constructor, destructor, and member
7105 (allocate_value_lazy, value_decref): Update.
7107 2018-04-06 Tom Tromey <tom@tromey.com>
7109 * value.c (struct value) <released, next>: Remove.
7110 (all_values): Now a std::vector.
7111 (allocate_value_lazy): Update.
7112 (value_next): Remove.
7113 (value_mark, value_free_to_mark, release_value)
7114 (value_release_to_mark): Update.
7116 2018-04-06 Tom Tromey <tom@tromey.com>
7118 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7119 (free_value_chain): Remove.
7120 * value.c (free_value_chain): Remove.
7121 (value_release_to_mark): Return a std::vector.
7122 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7124 (check_condition): Update.
7125 * eval.c (fetch_subexp_value): Change "val_chain" to a
7127 * breakpoint.c (update_watchpoint): Update.
7128 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7130 2018-04-06 Tom Tromey <tom@tromey.com>
7132 * value.h (free_all_values): Remove.
7133 * value.c (free_all_values): Remove.
7135 2018-04-06 Tom Tromey <tom@tromey.com>
7137 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7138 (value_history_chain, value_history_count): Remove.
7139 (value_history): New global.
7140 (record_latest_value, access_value_history, show_values)
7141 (preserve_values): Update.
7143 2018-04-06 Tom Tromey <tom@tromey.com>
7145 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7146 * varobj.c (varobj_set_display_format, varobj_set_value)
7147 (install_default_visualizer, construct_visualizer)
7148 (install_new_value, ~varobj, varobj_get_value_type)
7149 (my_value_of_variable, varobj_editable_p): Update.
7150 * c-varobj.c (c_describe_child, c_value_of_variable)
7151 (cplus_number_of_children, cplus_describe_child): Update.
7152 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7153 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7154 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7156 2018-04-06 Tom Tromey <tom@tromey.com>
7158 * printcmd.c (last_examine_address): Change type to
7160 (do_examine, x_command): Update.
7162 2018-04-06 Tom Tromey <tom@tromey.com>
7164 * value.c (release_value): Update.
7165 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7166 (struct bpstats) <val>: Now a value_ref_ptr.
7167 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7168 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7169 (~watchpoint, print_it_watchpoint, watch_command_1)
7170 (invalidate_bp_value_on_memory_change): Update.
7172 2018-04-06 Tom Tromey <tom@tromey.com>
7174 * varobj.c (varobj_clear_saved_item)
7175 (update_dynamic_varobj_children, install_new_value, ~varobj):
7177 * value.h (value_incref): Move declaration earlier.
7178 (value_decref): Rename from value_free.
7179 (struct value_ref_policy): New.
7180 (value_ref_ptr): New typedef.
7181 (struct value_deleter): Remove.
7182 (gdb_value_up): Remove typedef.
7183 (release_value): Change return type.
7184 (release_value_or_incref): Remove.
7185 * value.c (set_value_parent): Update.
7186 (value_incref): Change return type.
7187 (value_decref): Rename from value_free.
7188 (value_free_to_mark, free_all_values, free_value_chain): Update.
7189 (release_value): Return value_ref_ptr.
7190 (release_value_or_incref): Remove.
7191 (record_latest_value, set_internalvar, clear_internalvar):
7193 * stack.c (info_frame_command): Don't call value_free.
7194 * python/py-value.c (valpy_dealloc, valpy_new)
7195 (value_to_value_object): Update.
7196 * printcmd.c (do_examine): Update.
7197 * opencl-lang.c (lval_func_free_closure): Update.
7198 * mi/mi-main.c (register_changed_p): Don't call value_free.
7199 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7200 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7201 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7203 * guile/scm-value.c (vlscm_free_value_smob)
7204 (vlscm_scm_from_value): Update.
7205 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7206 (frame_unwind_register_unsigned, get_frame_register_bytes)
7207 (put_frame_register_bytes): Don't call value_free.
7208 * findvar.c (address_from_register): Don't call value_free.
7209 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7210 * dwarf2loc.c (entry_data_value_free_closure)
7211 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7212 (dwarf2_evaluate_loc_desc_full): Update.
7213 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7214 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7215 (~watchpoint, watch_command_1)
7216 (invalidate_bp_value_on_memory_change): Update.
7217 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7219 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7222 * warning.m4: Add -Wno-error=deprecated-register.
7223 * configure: Re-generate.
7225 2018-04-05 Tom Tromey <tom@tromey.com>
7227 * linespec.h: Remove include of "vec.h".
7229 2018-04-05 Tom Tromey <tom@tromey.com>
7231 * linespec.c (typep): Remove typedef.
7232 (find_methods, find_superclass_methods): Take a std::vector.
7233 (find_method): Use std::vector.
7235 2018-04-05 Tom Tromey <tom@tromey.com>
7237 * utils.c (compare_strings): Remove.
7238 * utils.h (compare_strings): Remove.
7239 * objc-lang.h (find_imps): Update.
7240 * objc-lang.c (find_methods): Take a std::vector.
7241 (uniquify_strings, find_imps): Likewise.
7242 * linespec.c (find_methods): Take a std::vector.
7243 (decode_objc): Use std::vector.
7244 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7246 (find_method, find_function_symbols): Use std::vector.
7248 2018-04-05 Tom Tromey <tom@tromey.com>
7250 * completer.c (completion_tracker::completion_tracker): Remove
7252 (completion_tracker::discard_completions): Likewise.
7253 * breakpoint.c (ambiguous_names_p): Remove cast.
7254 * ada-lang.c (_initialize_ada_language): Remove cast.
7255 * utils.h (streq): Update.
7256 (streq_hash): Add new declaration.
7257 * utils.c (streq): Return bool.
7258 (streq_hash): New function.
7260 2018-04-05 Tom Tromey <tom@tromey.com>
7262 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7263 Remove a string copy.
7265 2018-04-05 Tom Tromey <tom@tromey.com>
7267 * linespec.c (filter_results): Use std::vector.
7268 (decode_line_2, decode_line_full): Update.
7270 2018-04-05 Tom Tromey <tom@tromey.com>
7272 * linespec.c (canonical_to_fullform): Return std::string.
7273 (filter_results): Update.
7274 (struct decode_line_2_item): Add constructor.
7275 <fullform, displayform>: Now std::string.
7276 (decode_line_2_compare_items): Now a std::sort comparator.
7277 (decode_line_2): Update.
7279 2018-04-05 Tom Tromey <tom@tromey.com>
7281 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7282 (unexpected_linespec_error): Update.
7283 (linespec_parse_basic, parse_linespec): Update.
7285 2018-04-05 Tom Tromey <tom@tromey.com>
7287 * linespec.c (linespec_parse_basic): Reindent.
7289 2018-04-05 Tom Tromey <tom@tromey.com>
7291 * minsyms.h (iterate_over_minimal_symbols): Update.
7292 * minsyms.c (iterate_over_minimal_symbols): Take a
7294 * linespec.c (struct collect_minsyms): Remove.
7295 (compare_msyms): Now a std::sort comparator.
7296 (add_minsym): Add parameters.
7297 (search_minsyms_for_name): Update. Use std::vector.
7299 2018-04-03 Tom Tromey <tom@tromey.com>
7301 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7304 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7306 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7308 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7311 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7312 printing static type.
7314 2018-04-01 Tom Tromey <tom@tromey.com>
7316 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7317 (rs6000_xfer_shared_libraries): Update.
7319 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7321 * common/gdb_vecs.h (char_ptr): Remove.
7322 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7324 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7326 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7328 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7330 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7332 * tracepoint.h (struct uploaded_tp): Initialize fields.
7333 <actions, step_actions, cmd_strings>: Change type to
7334 std::vector<char *>.
7335 * tracepoint.c (get_uploaded_tp): Allocate with new.
7336 (free_uploaded_tps): Free with delete.
7337 (parse_tracepoint_definition): Adjust to std::vector change.
7338 * breakpoint.c (read_uploaded_action): Likewise.
7339 (create_tracepoint_from_upload): Likewise.
7340 * ctf.c (ctf_write_uploaded_tp): Likewise.
7341 (SET_ARRAY_FIELD): Likewise.
7342 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7344 2018-03-30 Tom Tromey <tom@tromey.com>
7346 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7348 (svr4_keep_data_in_core): Update.
7349 (svr4_read_so_list): Update.
7351 2018-03-30 Tom Tromey <tom@tromey.com>
7353 * windows-nat.c (handle_output_debug_string, handle_exception):
7355 * target.h (target_read_string): Update.
7356 * target.c (target_read_string): Change "string" to
7358 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7360 * solib-frv.c (frv_current_sos): Update.
7361 * solib-dsbt.c (dsbt_current_sos): Update.
7362 * solib-darwin.c (darwin_current_sos): Update.
7363 * linux-thread-db.c (inferior_has_bug): Update.
7364 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7365 Update. Remove alloca.
7366 * ada-lang.c (ada_main_name): Update.
7368 2018-03-30 Tom Tromey <tom@tromey.com>
7370 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7371 (struct dwo_file_deleter): New.
7372 (dwo_file_up): New typedef.
7373 (open_and_init_dwo_file): Use dwo_file_up.
7374 (free_dwo_file_cleanup): Remove.
7376 2018-03-30 Tom Tromey <tom@tromey.com>
7378 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7379 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7381 2018-03-30 Tom Tromey <tom@tromey.com>
7383 * dwarf2read.c (class free_cached_comp_units): New class.
7384 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7385 (free_cached_comp_units): Remove function.
7387 2018-03-30 Tom Tromey <tom@tromey.com>
7389 * utils.h (make_cleanup_unpush_target): Remove.
7390 * inf-ptrace.c (struct target_unpusher): New.
7391 (target_unpush_up) New typedef.
7392 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7394 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7396 2018-03-27 Tom Tromey <tom@tromey.com>
7398 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7400 2018-03-27 Pedro Alves <palves@redhat.com>
7401 Tom Tromey <tom@tromey.com>
7403 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7404 destructor. Now a class.
7405 (gdb_readline_wrapper_cleanup): Remove function.
7406 (gdb_readline_wrapper): Remove cleanups.
7408 2018-03-27 Tom Tromey <tom@tromey.com>
7410 * typeprint.h (struct type_print_options) <local_typedefs,
7411 global_typedefs>: Remove "struct" keyword.
7412 (class typedef_hash_table): New class.
7413 (recursively_update_typedef_hash, add_template_parameters)
7414 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7415 (find_typedef_in_hash): Don't declare.
7416 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7417 (typedef_hash_table::recursively_update): Rename from
7418 recursively_update_typedef_hash. Now a member.
7419 (typedef_hash_table::add_template_parameters): Rename from
7420 add_template_parameters. Now a member.
7421 (typedef_hash_table::typedef_hash_table): Now a constructor;
7422 rename from create_typedef_hash.
7423 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7424 rename from free_typedef_hash.
7425 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7426 (do_free_global_table): Remove.
7427 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7428 from copy_type_recursive.
7429 (create_global_typedef_table): Remove.
7430 (typedef_hash_table::find_global_typedef): Now a member of
7432 (typedef_hash_table::find_typedef): Rename from
7433 find_typedef_in_hash; now a member.
7434 (whatis_exp): Update.
7435 * extension.h (struct ext_lang_type_printers): Add constructor and
7437 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7439 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7440 Now a constructor; rename from start_ext_lang_type_printers.
7441 (ext_lang_type_printers): Now a destructor; rename from
7442 free_ext_lang_type_printers.
7443 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7445 (c_type_print_base_struct_union): Update. Remove cleanups.
7447 2018-03-27 Tom Tromey <tom@tromey.com>
7449 * dwarf-index-write.c: Include <cmath>.
7451 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7453 * NEWS: Add entry describing new "set|show varsize-limit" command.
7454 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7456 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7459 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7461 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7463 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7464 * dwarf-index-common.c: New file.
7465 * dwarf-index-common.h: New file.
7466 * dwarf-index-write.c: New file.
7467 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7468 (struct dwarf2_section_info): Move from here.
7469 (dwarf2_section_info_def): Likewise.
7470 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7471 (offset_type): Likewise.
7472 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7473 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7474 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7475 (byte_swap): Likewise.
7476 (MAYBE_SWAP): Likewise.
7477 (dwarf2_per_cu_ptr): Likewise.
7478 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7479 (struct tu_stats): Likewise.
7480 (struct dwarf2_per_objfile): Likewise.
7481 (struct dwarf2_per_cu_data): Likewise.
7482 (struct signatured_type): Likewise.
7483 (sig_type_ptr): Likewise.
7484 (DEF_VEC_P (sig_type_ptr)): Likewise.
7485 (INDEX4_SUFFIX): Likewise.
7486 (INDEX5_SUFFIX): Likewise.
7487 (DEBUG_STR_SUFFIX): Likewise.
7488 (dwarf2_read_section): Make non-static.
7489 (mapped_index_string_hash): Move from here.
7490 (dwarf5_djb_hash): Likewise.
7491 (file_write): Likewise.
7492 (class data_buf): Likewise.
7493 (struct symtab_index_entry): Likewise.
7494 (struct mapped_symtab): Likewise.
7495 (find_slot): Likewise.
7496 (hash_expand): Likewise.
7497 (add_index_entry): Likewise.
7498 (uniquify_cu_indices): Likewise.
7499 (class c_str_view): Likewise.
7500 (class c_str_view_hasher): Likewise.
7501 (class vector_hasher): Likewise.
7502 (write_hash_table): Likewise.
7503 (psym_index_map): Likewise.
7504 (struct addrmap_index_data): Likewise.
7505 (add_address_entry): Likewise.
7506 (add_address_entry_worker): Likewise.
7507 (write_address_map): Likewise.
7508 (symbol_kind): Likewise.
7509 (write_psymbols): Likewise.
7510 (struct signatured_type_index_data): Likewise.
7511 (write_one_signatured_type): Likewise.
7512 (recursively_count_psymbols): Likewise.
7513 (recursively_write_psymbols): Likewise.
7514 (class debug_names): Likewise.
7515 (check_dwarf64_offsets): Likewise.
7516 (psyms_seen_size): Likewise.
7517 (write_gdbindex): Likewise.
7518 (write_debug_names): Likewise.
7519 (assert_file_size): Likewise.
7520 (write_psymtabs_to_index): Likewise.
7521 (save_gdb_index_command): Likewise.
7522 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7524 * dwarf2read.h: New file.
7526 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7529 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7530 symbol name if the CU's language stores symbol names in linkage
7532 * language.h (struct language_defn)
7533 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7534 all instances of this struct.
7536 2018-03-26 Tom Tromey <tom@tromey.com>
7538 * stack.c (backtrace_command_1): Remove verbose code.
7540 2018-03-26 Tom Tromey <tom@tromey.com>
7542 * python/py-framefilter.c (py_print_type): Don't catch
7543 exceptions. Return void.
7544 (py_print_value): Likewise.
7545 (py_print_single_arg): Likewise.
7546 (enumerate_args): Don't catch exceptions.
7547 (py_print_args): Likewise.
7548 (py_print_frame): Likewise.
7549 (gdbpy_apply_frame_filter): Catch exceptions here.
7551 2018-03-26 Tom Tromey <tom@tromey.com>
7553 * stack.c (_initialize_stack): Remove trailing newlines from help
7554 text. Add "Usage" line to "backtrace" help.
7556 2018-03-26 Tom Tromey <tom@tromey.com>
7559 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7561 2018-03-26 Tom Tromey <tom@tromey.com>
7563 * python/py-framefilter.c (py_print_single_arg): Return
7564 EXT_LANG_BT_ERROR from catch.
7566 2018-03-26 Tom Tromey <tom@tromey.com>
7569 * stack.c (backtrace_command_1): Move some code into no-filters
7572 2018-03-26 Tom Tromey <tom@tromey.com>
7574 * python/py-framefilter.c (throw_quit_or_print_exception): New
7576 (gdbpy_apply_frame_filter): Use it.
7578 2018-03-26 Tom Tromey <tom@tromey.com>
7581 * python/py-framefilter.c (py_print_type, py_print_value)
7582 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7585 2018-03-26 Tom Tromey <tom@tromey.com>
7587 * python/py-framefilter.c (enumerate_args): Use
7588 gdb::unique_xmalloc_ptr.
7590 2018-03-26 Tom Tromey <tom@tromey.com>
7592 * python/py-framefilter.c (py_print_frame): Return
7594 (gdbpy_apply_frame_filter): Update comment.
7595 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7597 <EXT_LANG_BT_NO_FILTERS>: Change value.
7599 2018-03-26 Tom Tromey <tom@tromey.com>
7602 * stack.c (backtrace_command): Parse "hide" argument.
7603 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7604 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7607 2018-03-26 Tom Tromey <tom@tromey.com>
7609 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7611 (backtrace_command): Remove "fulltrace", add "flags".
7613 2018-03-26 Tom Tromey <tom@tromey.com>
7615 * stack.c (backtrace_command): Rewrite command line parsing.
7617 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7619 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7621 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7623 * filename-seen-cache.h: Add include guard.
7625 2018-03-26 Keith Seitz <keiths@redhat.com>
7627 * symfile.c (place_section): Remove "struct" from section_addr_info
7629 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7630 "struct" keyword from section_addr_info.
7632 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7634 * regformats/regdef.h (reg): Add constructors.
7636 2018-03-25 Pedro Alves <palves@redhat.com>
7638 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7639 if then/else bodies in var_func_name extraction.
7641 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7643 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7644 lookup_minimal_symbol() to find symbol entry.
7645 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7647 2018-03-23 Keith Seitz <keiths@redhat.com>
7650 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7651 nested type definitions for C++, too.
7653 2018-03-23 Tom Tromey <tom@tromey.com>
7655 * machoread.c (struct oso_el): Add a constructor. Don't define as
7657 (macho_register_oso): Remove.
7658 (macho_symtab_read): Take a std::vector.
7659 (oso_el_compare_name): Now a std::sort comparator.
7660 (macho_symfile_read_all_oso): Take a std::vector.
7661 (macho_symfile_read): Use std::vector. Remove cleanups.
7663 2018-03-22 Tom Tromey <tom@tromey.com>
7665 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7666 (record_full_goto_bookmark): Use std::string.
7668 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7671 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7674 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7676 * rs6000-tdep.c (store_insn_p): New function.
7677 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7678 and cr_reg to their unshifted values. Use store_insn_p to
7679 match LR saves using either R1 or fdata->alloca_reg. Use
7680 store_insn_p to match CR saves. Set alloca_reg_offset
7681 when alloca_reg and framep are set. Remove lr_reg shift
7682 when assigning to fdata->lr_register.
7684 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7686 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7687 command line args instead of emitting a warning.
7689 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7691 * tracepoint.h (struct static_tracepoint_marker): Initialize
7692 fields, define default constructor, move constructor and move
7693 assignment, disable the rest.
7694 <str_id, extra>: Make std::string.
7695 (release_static_tracepoint_marker): Remove.
7696 (free_current_marker): Remove.
7697 * tracepoint.c (free_current_marker): Remove.
7698 (parse_static_tracepoint_marker_definition): Adjust to
7699 std::string, use new hex2str overload.
7700 (release_static_tracepoint_marker): Remove.
7701 (print_one_static_tracepoint_marker): Get marker by reference
7702 and adjust to std::string.
7703 (info_static_tracepoint_markers_command): Adjust to std::vector
7705 * target.h (static_tracepoint_marker_p): Remove typedef.
7706 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7707 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7709 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7711 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7712 (target_debug_print_std_vector_static_tracepoint_marker): New.
7713 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7715 (target_debug_print_static_tracepoint_marker_p): ... this.
7716 * target-delegates.c: Re-generate.
7717 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7719 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7720 (decode_static_tracepoint_spec): Adjust to std::vector.
7721 (tracepoint_print_one_detail): Adjust to std::string.
7722 (strace_marker_decode_location): Adjust to std::string.
7723 (update_static_tracepoint): Adjust to std::string, remove call
7724 to release_static_tracepoint_marker.
7725 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7726 Adjust to std::vector.
7727 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7728 (remote_static_tracepoint_markers_by_strid): Adjust to
7730 * common/rsp-low.h (hex2str): New overload with explicit count
7732 * common/rsp-low.c (hex2str): New overload with explicit count
7734 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7735 (_initialize_rsp_low_selftests): Add test_hex2str test.
7736 * unittests/tracepoint-selftests.c
7737 (test_parse_static_tracepoint_marker_definition): Adjust to
7740 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7742 * tracepoint.c (parse_static_tracepoint_marker_definition):
7743 Consider case where the definition is followed by more
7745 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7746 tracepoint-selftests.c.
7747 * unittests/tracepoint-selftests.c: New.
7749 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7751 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7754 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7756 * symtab.c (find_pc_sect_line): fixed indentation.
7758 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7760 * symtab.c (find_pc_sect_line): now uses binary search.
7762 2018-03-19 Tom Tromey <tom@tromey.com>
7764 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7767 2018-03-19 Pedro Alves <palves@redhat.com>
7768 Tom Tromey <tom@tromey.com>
7770 * unittests/observable-selftests.c: New file.
7771 * common/observable.h: New file.
7772 * observable.h: New file.
7773 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7774 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7775 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7776 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7777 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7778 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7779 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7780 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7781 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7782 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7783 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7784 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7785 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7786 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7787 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7788 tui/tui-interp.c, valops.c: Update all users.
7789 * tui/tui-hooks.c (tui_bp_created_observer)
7790 (tui_bp_deleted_observer, tui_bp_modified_observer)
7791 (tui_inferior_exit_observer, tui_before_prompt_observer)
7792 (tui_normal_stop_observer, tui_register_changed_observer):
7794 (tui_observers_token): New global.
7795 (attach_or_detach, tui_attach_detach_observers): New functions.
7796 (tui_install_hooks, tui_remove_hooks): Use
7797 tui_attach_detach_observers.
7798 * record-btrace.c (record_btrace_thread_observer): Remove.
7799 (record_btrace_thread_observer_token): New global.
7800 * observer.sh: Remove.
7801 * observer.c: Rename to observable.c.
7802 * observable.c (namespace gdb_observers): Define new objects.
7803 (observer_debug): Move into gdb_observers namespace.
7804 (struct observer, struct observer_list, xalloc_observer_list_node)
7805 (xfree_observer_list_node, generic_observer_attach)
7806 (generic_observer_detach, generic_observer_notify): Remove.
7807 (_initialize_observer): Update.
7808 Don't include observer.inc.
7809 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7810 (clean mostlyclean): Likewise.
7811 (observer.h, observer.inc): Remove targets.
7812 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7813 (COMMON_SFILES): Use observable.c, not observer.c.
7814 * .gitignore: Remove observer.h.
7816 2018-03-18 Tom Tromey <tom@tromey.com>
7818 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7820 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7822 2018-03-17 Tom Tromey <tom@tromey.com>
7824 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7826 2018-03-17 Tom Tromey <tom@tromey.com>
7828 * target.c (class scoped_target_fd): New.
7829 (target_fileio_close_cleanup): Remove.
7830 (target_fileio_read_alloc_1): Use scoped_target_fd.
7832 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7834 * silent-rules.mk: New.
7835 * Makefile.in: Include silent-rules.mk
7836 (srcdir, VPATH, top_srcdir): Move up.
7837 (COMPILE): Add ECHO_CXX.
7838 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7839 (init.c): Add ECHO_INIT_C.
7840 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7841 (version.c): Add ECHO_GEN.
7842 (printcmd.o): Add ECHO_CXX.
7843 (target-float.o): Add ECHO_CXX.
7844 (ada-exp.o): Add ECHO_CXX.
7845 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7846 (insight$(EXEEXT)): Add ECHO_CXXLD.
7847 * gnulib/configure.ac: Add AM_SILENT_RULES.
7848 * gnulib/aclocal.m4: Re-generate.
7849 * gnulib/configure: Re-generate.
7850 * gnulib/import/Makefile.in: Re-generate.
7852 2018-03-16 Tom Tromey <tom@tromey.com>
7854 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7855 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7856 * utils.c (do_free_section_addr_info)
7857 (make_cleanup_free_section_addr_info): Remove.
7858 * symfile.h (struct other_sections): Add constructor.
7859 (struct section_addr_info): Remove.
7860 (section_addr_info): New typedef.
7861 (struct sym_fns) <sym_offsets>: Change type of parameter.
7862 (build_section_addr_info_from_objfile)
7863 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7864 (default_symfile_offsets, symbol_file_add)
7865 (symbol_file_add_from_bfd)
7866 (build_section_addr_info_from_section_table): Update.
7867 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7868 * symfile.c (alloc_section_addr_info): Remove.
7869 (build_section_addr_info_from_section_table): Change return type.
7871 (build_section_addr_info_from_bfd)
7872 (build_section_addr_info_from_objfile): Likewise.
7873 (free_section_addr_info): Remove.
7874 (relative_addr_info_to_section_offsets): Change type of "addrs".
7875 (addrs_section_compar): Now a std::sort comparator.
7876 (addrs_section_sort): Change return type.
7877 (addr_info_make_relative): Change type of "addrs". Update.
7878 (default_symfile_offsets, syms_from_objfile_1)
7879 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7880 (symbol_file_add_separate): Update.
7881 (symbol_file_add): Change type of "addrs". Update.
7882 (add_symbol_file_command): Update. Remove cleanups.
7883 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7885 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7886 * solib.c (solib_read_symbols): Update.
7887 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7888 * machoread.c (macho_symfile_offsets): Update.
7889 * jit.c (jit_bfd_try_read_symtab): Update.
7891 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7893 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7894 unittests/utils-selftests.c.
7895 * unittests/utils-selftests.c: New file.
7897 2018-03-14 Tom Tromey <tom@tromey.com>
7900 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7903 2018-03-14 Tom Tromey <tom@tromey.com>
7906 * printcmd.c (printf_pointer): Allow "-" in format.
7908 2018-03-14 Tom Tromey <tom@tromey.com>
7910 * printcmd.c (_initialize_printcmd): Add usage to printf.
7912 2018-03-14 Yao Qi <qiyao@sourceware.org>
7914 * MAINTAINERS: Update my email address.
7916 2018-03-13 Tom Tromey <tom@tromey.com>
7918 * machoread.c (macho_check_dsym): Change filenamep to a
7920 (macho_symfile_read): Update.
7921 * symfile.c (load_command): Use std::string.
7923 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7925 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7926 to error message string.
7927 (riscv_register_name): Use xsnprintf instead of sprintf.
7928 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7930 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7932 (riscv_push_dummy_call): Likewise.
7934 2018-03-12 Tom Tromey <tom@tromey.com>
7936 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7937 Use gdb::byte_vector.
7938 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7940 2018-03-12 Yao Qi <yao.qi@linaro.org>
7942 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7943 parameter type to readable_regcache.
7944 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7947 2018-03-11 Tom Tromey <tom@tromey.com>
7949 * dwarf2read.c (struct nextfield): Add initializers.
7950 (struct nextfnfield): Remove.
7951 (struct fnfieldlist): Add initializers. Remove "length" and
7952 "head", use std::vector.
7953 (struct decl_field_list): Remove.
7954 (struct field_info): Add initializers.
7955 <fields, baseclasses>: Now std::vector.
7956 <nbaseclasses, nfnfields, typedef_field_list_count,
7957 nested_types_list_count>: Remove.
7958 (dwarf2_add_field, dwarf2_add_type_defn)
7959 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7960 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7961 (process_structure_scope): Update.
7963 2018-03-11 Tom Tromey <tom@tromey.com>
7965 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7966 for use by std::sort.
7967 (build_type_psymtabs_1): Use std::vector.
7969 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7971 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7972 and LIBMPFR in the printed configuration.
7974 2018-03-08 Tom Tromey <tom@tromey.com>
7976 * source.c (get_filename_and_charpos): Use scoped_fd.
7977 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7978 (procfs_pidlist): Likewise.
7979 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7980 (iterate_over_mappings): Likewise.
7982 2018-03-08 Tom Tromey <tom@tromey.com>
7984 * infcall.c (struct call_return_meta_info)
7985 <stack_temporaries_enabled>: Remove.
7986 (get_call_return_value, call_function_by_hand_dummy): Update.
7987 * thread.c (disable_thread_stack_temporaries): Remove.
7988 (enable_thread_stack_temporaries): Remove.
7989 (thread_stack_temporaries_enabled_p): Return bool.
7990 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7991 (get_last_thread_stack_temporary): Update.
7992 * eval.c (evaluate_subexp): Update.
7993 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7994 class, not a function.
7995 (value_ptr, value_vec): Remove typedefs.
7996 (class thread_info) <stack_temporaries_enabled>: Now bool.
7997 <stack_temporaries>: Now a std::vector.
7998 (thread_stack_temporaries_enabled_p)
7999 (value_in_thread_stack_temporaries): Return bool.
8001 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8003 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8004 (getpkt_or_notif_sane_1): Likewise.
8006 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8008 * build-id.c (build_id_to_debug_bfd): Use std::string.
8010 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8012 * build-id.c (find_separate_debug_file_by_buildid): Return
8014 * build-id.h (find_separate_debug_file_by_buildid): Return
8016 * coffread.c (coff_symfile_read): Adjust to std::string.
8017 * elfread.c (elf_symfile_read): Adjust to std::string.
8018 * symfile.c (separate_debug_file_exists): Change parameter to
8020 (find_separate_debug_file): Return std::string.
8021 (find_separate_debug_file_by_debuglink): Return std::string.
8022 * symfile.h (find_separate_debug_file_by_debuglink): Return
8025 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8027 * common/xml-utils.c (xml_escape_text): Move code to...
8028 (xml_escape_text_append): ... this new function.
8029 * common/xml-utils.h (xml_escape_text_append): New declaration.
8030 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8032 (_initialize_xml_utils): register test_xml_escape_text_append as
8035 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8037 * defs.h: Remove MAX_REGISTER_SIZE.
8038 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8040 * python/py-unwind.c (pyuw_sniffer): Likewise.
8042 2018-03-07 Tom Tromey <tom@tromey.com>
8044 * linux-tdep.c (linux_info_proc): Update.
8045 * target.h (struct target_ops) <to_fileio_readlink>: Return
8047 (target_fileio_readlink): Return optional<string>.
8048 * remote.c (remote_hostio_readlink): Return optional<string>.
8049 * inf-child.c (inf_child_fileio_readlink): Return
8051 * target.c (target_fileio_readlink): Return optional<string>.
8053 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8055 * regcache.c (cooked_read_test): Add riscv to the list of
8056 architectures that have a save_reggroup.
8058 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8060 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8061 value is not a dynamic class object.
8063 2018-03-06 Tom Tromey <tom@tromey.com>
8065 * rust-exp.y: Formatting fixes.
8067 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8069 * riscv-tdep.c (riscv_register_name): Remove target description
8071 (riscv_gdbarch_init): Remove target description check.
8073 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8075 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8077 * riscv-tdep.h: Likewise.
8079 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8081 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8082 (riscv_pseudo_register_write): Delete.
8083 (riscv_gdbarch_init): Remove all use of pseudo registers.
8085 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8087 * record-btrace.c (btrace_print_lines): Replace cleanup
8088 parameter with RAII equivalents.
8089 (btrace_insn_history): Replace cleanup with RAII equivalents.
8090 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8091 make_cleanup_ui_out_tuple_begin_end): Remove.
8092 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8093 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8094 make_cleanup_ui_out_list_begin_end): Remove.
8096 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8098 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8099 parameter types to std::vector. Use bool.
8100 (record_btrace_wait): Replace VEC(tp_t) with
8101 std::vector<thread_info *>.
8102 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8104 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8106 * record-btrace.c (record_btrace_disable_callback): Remove.
8107 (struct scoped_btrace_disable): New.
8108 (record_btrace_open): Use scoped_btrace_disable.
8110 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8112 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8113 reading values from registers.
8115 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8117 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8120 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8122 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8123 change parameter type. Use GDB's print functions, and use
8124 core_addr_to_string where appropriate.
8125 (riscv_push_dummy_call): Use core_addr_to_string where
8126 appropriate, update call to riscv_print_arg_location, and reindent
8128 (riscv_return_value): Update call to riscv_print_arg_location.
8130 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8131 Tim Newsome <tim@sifive.com>
8132 Albert Ou <a0u@eecs.berkeley.edu>
8133 Darius Rad <darius@bluespec.com>
8135 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8136 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8137 (ALLDEPFILES): Add riscv-tdep.c
8138 * configure.tgt: Add riscv support.
8139 * riscv-tdep.c: New file.
8140 * riscv-tdep.h: New file.
8141 * NEWS: Mention new target.
8142 * MAINTAINERS: Add entry for riscv.
8144 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8146 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8147 fields within aggregates.
8149 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8151 * record-btrace.c (btrace_print_lines): Change type of flags to
8152 gdb_disassembly_flags.
8154 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8156 * fbsd-nat.c: Include "inf-ptrace.h".
8157 (USE_SIGTRAP_SIGINFO): Conditionally define.
8158 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8159 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8160 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8162 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8164 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8166 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8167 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8168 "supports_stopped_by_hw_breakpoint" target methods.
8170 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8172 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8173 * fbsd-nat.c (debug_fbsd_nat): New variable.
8174 (show_fbsd_nat_debug): New function.
8175 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8176 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8178 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8180 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8181 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8183 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8184 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8187 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8189 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8190 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8192 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8194 * charset.c (struct charset_vector): New.
8195 (charsets): Change type to charset_vector.
8196 (find_charset_names): Adjust.
8198 (_initialize_charset): Adjust.
8200 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8202 * progspace.h (struct program_space) <deleted_solibs>: Change
8203 type to std::vector<std::string>.
8204 * progspace.c (clear_program_space_solib_cache): Adjust.
8205 * breakpoint.c (print_solib_event): Adjust.
8206 (check_status_catch_solib): Adjust.
8207 * solib.c (update_solib_list): Adjust.
8208 * ui-out.h (class ui_out) <field_string>: New overload.
8209 * ui-out.c (ui_out::field_string): New overload.
8211 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8213 * progspace.h (struct program_space): Add constructor and
8214 destructor, initialize fields.
8215 (add_program_space): Remove.
8216 * progspace.c (add_program_space): Rename to...
8217 (program_space::program_space): ... this.
8218 (release_program_space): Rename to...
8219 (program_space::~program_space): ... this.
8220 (delete_program_space): Use delete to delete program_space.
8221 (initialize_progspace): Use new to allocate program_space.
8222 * inferior.c (add_inferior_with_spaces): Likewise.
8223 (clone_inferior_command): Likewise.
8224 * infrun.c (follow_fork_inferior): Likewise.
8225 (handle_vfork_child_exec_or_exit): Likewise.
8227 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8229 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8230 (delim_string_to_char_ptr_vec): Return std::vector of
8231 gdb::unique_xmalloc_ptr.
8232 (dirnames_to_char_ptr_vec_append): Take std::vector of
8233 gdb::unique_xmalloc_ptr.
8234 (dirnames_to_char_ptr_vec): Return std::vector of
8235 gdb::unique_xmalloc_ptr.
8236 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8237 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8238 (delim_string_to_char_ptr_vec): Return an std::vector of
8239 gdb::unique_xmalloc_ptr, adjust the code.
8240 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8241 gdb::unique_xmalloc_ptr, adjust the code.
8242 (dirnames_to_char_ptr_vec): Return an std::vector of
8243 gdb::unique_xmalloc_ptr, adjust the code.
8244 * auto-load.c (auto_load_safe_path_vec): Change type to
8245 std::vector of gdb::unique_xmalloc_ptr.
8246 (auto_load_expand_dir_vars): Return an std::vector of
8247 gdb::unique_xmalloc_ptr, adjust the code.
8248 (auto_load_safe_path_vec_update): Adjust.
8249 (filename_is_in_auto_load_safe_path_vec): Adjust.
8250 (auto_load_objfile_script_1): Adjust.
8251 * build-id.c (build_id_to_debug_bfd): Adjust.
8252 * linux-thread-db.c (thread_db_load_search): Adjust.
8253 * source.c (add_path): Adjust.
8255 * symfile.c (find_separate_debug_file): Adjust.
8256 * utils.c (do_free_char_ptr_vec): Remove.
8257 (make_cleanup_free_char_ptr_vec): Remove.
8259 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8262 * common/pathstuff.c: Conditionally include "<windows.h>".
8264 2018-03-01 Georg Sauthoff <mail@georg.so>
8267 * gcore.in: Quote variables and switch interpreter to bash.
8269 2018-03-01 Tom Tromey <tom@tromey.com>
8271 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8272 assertion. Add assertion for discriminant_index.
8273 (quirk_rust_enum): Use correct base type name in univariant case.
8275 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8277 * record.c (get_call_history_modifiers): Return a
8279 (cmd_record_call_history): Adjust.
8280 * record-btrace.c (record_btrace_call_history): Adjust.
8281 (record_btrace_call_history_range): Adjust.
8282 (record_btrace_call_history_from): Adjust.
8283 * target-debug.h (target_debug_print_record_print_flags): New.
8284 * target-delegates.c: Re-generate.
8285 * target.c (target_call_history): Change flags type.
8286 (target_call_history_from): Likewise.
8287 (target_call_history_range): Likewise.
8288 * target.h (struct target_ops) <target_call_history>: Likewise.
8289 (target_call_history_from): Likewise.
8290 (target_call_history_range): Likewise.
8292 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8293 Simon Marchi <simon.marchi@polymtl.ca>
8295 * common/common-utils.c: Include "sys/stat.h".
8296 (is_regular_file): Move here from "source.c"; change return
8298 * common/common-utils.h (is_regular_file): New prototype.
8299 * common/pathstuff.c (contains_dir_separator): New function.
8300 * common/pathstuff.h (contains_dir_separator): New prototype.
8301 * source.c: Don't include "sys/stat.h".
8302 (is_regular_file): Move to "common/common-utils.c".
8304 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8306 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8307 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8308 * auto-load.c: Include "common/pathstuff.h".
8309 * common/common-def.h (current_directory): Move here.
8310 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8312 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8314 * common/pathstuff.c: New file.
8315 * common/pathstuff.h: New file.
8316 * compile/compile.c: Include "common/pathstuff.h".
8317 * defs.h (current_directory): Move to "common/common-defs.h".
8318 * dwarf2read.c: Include "common/pathstuff.h".
8320 * guile/scm-safe-call.c: Likewise.
8321 * linux-thread-db.c: Likewise.
8323 * nto-tdep.c: Likewise.
8324 * objfiles.c: Likewise.
8325 * source.c: Likewise.
8326 * symtab.c: Likewise.
8327 * utils.c: Include "common/pathstuff.h".
8328 (gdb_realpath): Move to "common/pathstuff.c".
8329 (gdb_realpath_keepfile): Likewise.
8330 (gdb_abspath): Likewise.
8331 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8332 (gdb_realpath_keepfile): Likewise.
8333 (gdb_abspath): Likewise.
8335 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8337 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8338 wildcard process pid for super_resume for kernels with a
8341 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8343 * compile/compile.c (get_args): Add additional comments
8344 explaining function.
8346 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8347 Tom Tromey <tom@tromey.com>
8349 * target.h (memory_write_request_s): Remove typedef. Don't define
8351 (target_write_memory_blocks): Change argument to std::vector.
8352 (struct memory_write_request): Add constructor.
8353 * target-memory.c (compare_block_starting_address): Return bool.
8354 Change argument types.
8355 (claim_memory): Change arguments to use std::vector.
8356 (split_regular_and_flash_blocks, blocks_to_erase)
8357 (compute_garbled_blocks): Likewise.
8358 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8359 (target_write_memory_blocks): Change argument to std::vector.
8360 * symfile.c (struct load_section_data): Add constructor and
8361 destructor. Use std::vector for "requests".
8362 (struct load_progress_data): Add initializers.
8363 (load_section_callback): Update. Use "new".
8364 (clear_memory_write_data): Remove.
8365 (generic_load): Update.
8367 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8369 * arch/aarch64.h: Use common/tdesc.h.
8371 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8373 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8374 architecture with a 64-bit ABI.
8376 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8378 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8379 ahead of target description loading.
8381 2018-02-26 Tom Tromey <tom@tromey.com>
8383 * stack.c (backtrace_command_1): Update.
8384 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8386 * python/py-framefilter.c (py_print_frame)
8387 (gdbpy_apply_frame_filter): Change type of "flags".
8388 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8390 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8391 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8392 * extension.h (enum frame_filter_flag): Rename from
8394 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8395 (apply_ext_lang_frame_filter): Change type of "flags".
8396 * extension.c (apply_ext_lang_frame_filter): Change type of
8398 * extension-priv.h (struct extension_language_ops)
8399 <apply_frame_filter>: Change type of "flags".
8401 2018-02-26 Tom Tromey <tom@tromey.com>
8404 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8405 off-by-one in py_end computation.
8406 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8408 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8411 2018-02-26 Tom Tromey <tom@tromey.com>
8413 * dwarf2read.c (struct variant_field): New.
8414 (struct nextfield) <variant>: New field.
8415 (dwarf2_add_field): Handle DW_TAG_variant_part.
8416 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8417 discriminated union.
8418 (read_structure_type): Handle DW_TAG_variant_part.
8419 (handle_struct_member_die): New function, extracted from
8420 process_structure_scope. Handle DW_TAG_variant.
8421 (process_structure_scope): Handle discriminated unions. Call
8422 handle_struct_member_die.
8424 2018-02-26 Tom Tromey <tom@tromey.com>
8426 * rust-lang.h (rust_last_path_segment): Declare.
8427 * rust-lang.c (rust_last_path_segment): Now public. Change
8429 (struct disr_info): Remove.
8430 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8431 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8432 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8433 (rust_enum_p, rust_enum_variant): New function.
8434 (rust_underscore_fields): Remove "offset" parameter.
8435 (rust_print_enum): New function.
8436 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8437 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8438 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8440 (rust_internal_print_type): New function, from rust_print_type.
8442 (rust_print_type): Call rust_internal_print_type.
8443 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8444 Update enum handling.
8445 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8446 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8447 (rust_union_quirks): New functions.
8448 (process_full_comp_unit, process_full_type_unit): Call
8450 (process_structure_scope): Update rust_unions if necessary.
8452 2018-02-26 Tom Tromey <tom@tromey.com>
8454 * value.h (value_union_variant): Declare.
8455 * valops.c (value_union_variant): New function.
8456 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8457 (struct discriminant_info): New.
8458 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8460 (struct main_type) <flag_discriminated_union>: New field.
8462 2018-02-26 Tom Tromey <tom@tromey.com>
8464 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8465 unittests/unpack-selftests.c.
8466 * unittests/unpack-selftests.c: New file.
8467 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8469 2018-02-26 Yao Qi <yao.qi@linaro.org>
8471 * dwarf2read.c (struct partial_die_info) <read>: New method.
8472 (read_partial_die): Remove the declaration.
8473 (load_partial_dies): Update.
8474 (partial_die_info::partial_die_info):
8475 (read_partial_die): Change it to partial_die_info::read.
8477 2018-02-26 Yao Qi <yao.qi@linaro.org>
8479 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8480 (fixup_partial_die): Remove declaration.
8481 (scan_partial_symbols): Update.
8482 (partial_die_parent_scope): Likewise.
8483 (partial_die_full_name): Likewise.
8484 (fixup_partial_die): Change it to partial_die_info::fixup.
8486 2018-02-26 Yao Qi <yao.qi@linaro.org>
8488 * dwarf2read.c (read_partial_die): Update the declaration.
8489 (load_partial_dies): Caller update.
8490 (read_partial_die): Remove one argument abbrev_len.
8492 2018-02-26 Yao Qi <yao.qi@linaro.org>
8494 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8495 assignment operator.
8496 (load_partial_dies): Use ctor and copy ctor.
8497 (read_partial_die): Update.
8498 (dwarf2_cu::find_partial_die): Use ctor.
8500 2018-02-26 Yao Qi <yao.qi@linaro.org>
8502 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8503 (find_partial_die_in_comp_unit): Change it to
8504 dwarf2_cu::find_partial_die.
8505 (find_partial_die): Update.
8507 2018-02-26 Yao Qi <yao.qi@linaro.org>
8509 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8512 2018-02-26 Yao Qi <yao.qi@linaro.org>
8514 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8516 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8518 * arch/amd64.h: Use common/tdesc.h.
8519 * arch/i386.c: Likewise.
8520 * arch/i386.h: Likewise.
8521 * arch/tic6x.c: Likewise.
8522 * arch/tdesc.h: Move file from here...
8523 * common/tdesc.h: ...to here.
8524 * features/aarch64-core.c: Regenerate.
8525 * features/aarch64-fpu.c: Regenerate.
8526 * features/i386/32bit-avx.c: Regenerate.
8527 * features/i386/32bit-avx512.c: Regenerate.
8528 * features/i386/32bit-core.c: Regenerate.
8529 * features/i386/32bit-linux.c: Regenerate.
8530 * features/i386/32bit-mpx.c: Regenerate.
8531 * features/i386/32bit-pkeys.c: Regenerate.
8532 * features/i386/32bit-sse.c: Regenerate.
8533 * features/i386/64bit-avx.c: Regenerate.
8534 * features/i386/64bit-avx512.c: Regenerate.
8535 * features/i386/64bit-core.c: Regenerate.
8536 * features/i386/64bit-linux.c: Regenerate.
8537 * features/i386/64bit-mpx.c: Regenerate.
8538 * features/i386/64bit-pkeys.c: Regenerate.
8539 * features/i386/64bit-segments.c: Regenerate.
8540 * features/i386/64bit-sse.c: Regenerate.
8541 * features/i386/x32-core.c: Regenerate.
8542 * features/tic6x-c6xp.c: Regenerate.
8543 * features/tic6x-core.c: Regenerate.
8544 * features/tic6x-gp.c: Regenerate.
8545 * target-descriptions.c: Use common/tdesc.h.
8546 * target-descriptions.h: Likewise.
8548 2018-02-24 Tom Tromey <tom@tromey.com>
8550 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8551 (try_thread_db_load_from_dir, thread_db_load_search): Use
8553 (info_auto_load_libthread_db_compare): Return bool. Change
8555 (info_auto_load_libthread_db): Use std::vector, std::string.
8558 2018-02-24 Tom Tromey <tom@tromey.com>
8560 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8562 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8564 * gdbarch.c: Rebuild.
8565 * gdbarch.h: Rebuild.
8566 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8567 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8568 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8571 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8573 * gdbtypes.h (sect_offset): Change type to uint64_t.
8574 (sect_offset_str): New function.
8575 * dwarf2read.c (create_addrmap_from_aranges): Use
8577 (error_check_comp_unit_head): Likewise.
8578 (create_debug_type_hash_table): Likewise.
8579 (read_cutu_die_from_dwo): Likewise.
8580 (init_cutu_and_read_dies): Likewise.
8581 (init_cutu_and_read_dies_no_follow): Likewise.
8582 (process_psymtab_comp_unit_reader): Likewise.
8583 (partial_die_parent_scope): Likewise.
8584 (peek_die_abbrev): Likewise.
8585 (process_queue): Likewise.
8586 (dwarf2_physname): Likewise.
8587 (read_namespace_alias): Likewise.
8588 (read_import_statement): Likewise.
8589 (create_dwo_cu_reader): Likewise.
8590 (create_cus_hash_table): Likewise.
8591 (lookup_dwo_cutu): Likewise.
8592 (inherit_abstract_dies): Likewise.
8593 (read_func_scope): Likewise.
8594 (read_call_site_scope): Likewise.
8595 (dwarf2_add_member_fn): Likewise.
8596 (read_common_block): Likewise.
8597 (read_module_type): Likewise.
8598 (read_typedef): Likewise.
8599 (read_subrange_type): Likewise.
8600 (load_partial_dies): Likewise.
8601 (read_partial_die): Likewise.
8602 (find_partial_die): Likewise.
8603 (read_str_index): Likewise.
8604 (dwarf2_string_attr): Likewise.
8605 (build_error_marker_type): Likewise.
8606 (lookup_die_type): Likewise.
8607 (dump_die_shallow): Likewise.
8608 (follow_die_ref): Likewise.
8609 (dwarf2_fetch_die_loc_sect_off): Likewise.
8610 (dwarf2_fetch_constant_bytes): Likewise.
8611 (follow_die_sig): Likewise.
8612 (get_signatured_type): Likewise.
8613 (get_DW_AT_signature_type): Likewise.
8614 (dwarf2_find_containing_comp_unit): Likewise.
8615 (set_die_type): Likewise.
8617 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8619 * arch/aarch64.c: Include "common-defs.h".
8620 * arch/amd64.c: Likewise.
8621 * arch/i386.c: Likewise.
8623 2018-02-21 Tom Tromey <tom@tromey.com>
8625 * value.h: (extract_field_op): Update.
8626 * eval.c (extract_field_op): Return a const char *.
8627 * expression.h (parse_expression_for_completion): Update.
8628 * completer.c (complete_expression): Update.
8629 (add_struct_fields): Make fieldname const.
8630 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8631 (mark_completion_tag, parse_exp_in_context_1): Update.
8632 (parse_expression_for_completion): Change "name" to
8633 unique_xmalloc_ptr*.
8635 2018-02-21 Tom Tromey <tom@tromey.com>
8637 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8639 2018-02-21 Yao Qi <yao.qi@linaro.org>
8641 * avr-tdep.c (avr_read_pc): Change parameter type to
8643 * gdbarch.sh (read_pc): Likewise.
8644 * gdbarch.c: Re-generated.
8645 * gdbarch.h: Re-generated.
8646 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8648 * ia64-tdep.c (ia64_read_pc): Likewise.
8649 * mips-tdep.c (mips_read_pc): Likewise.
8650 * spu-tdep.c (spu_read_pc): Likewise.
8652 2018-02-21 Yao Qi <yao.qi@linaro.org>
8654 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8655 * regcache-dump.c: New file.
8656 * regcache.c: Move register_dump to regcache-dump.c.
8657 (maintenance_print_registers): Likewise.
8658 (maintenance_print_raw_registers): Likewise.
8659 (maintenance_print_cooked_registers): Likewise.
8660 (maintenance_print_register_groups): Likewise.
8661 (maintenance_print_remote_registers): Likewise.
8662 (_initialize_regcache): Likewise.
8663 * regcache.h (register_dump): Moved from regcache.c.
8665 2018-02-21 Yao Qi <yao.qi@linaro.org>
8667 * regcache.c (regcache::regcache): Update.
8668 (regcache::invalidate): Move it to detached_regcache::invalidate.
8669 (get_thread_arch_aspace_regcache): Update.
8670 (regcache::raw_update): Update.
8671 (regcache::cooked_read): Remove some code.
8672 (regcache::cooked_read_value): Likewise.
8673 (regcache::raw_write): Remove assert on m_readonly_p.
8674 (regcache::raw_supply_integer): Move it to
8675 detached_regcache::raw_supply_integer.
8676 (regcache::raw_supply_zeroed): Likewise.
8677 * regcache.h (detached_regcache) <raw_supply_integer>: New
8679 <raw_supply_zeroed, invalidate>: Likewise.
8680 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8681 <invalidate>: Likewise.
8682 <m_readonly_p>: Removed.
8684 2018-02-21 Yao Qi <yao.qi@linaro.org>
8686 * infcmd.c (get_return_value): Let stop_regs point to
8687 get_current_regcache.
8688 * regcache.c (regcache::regcache): Remove.
8689 (register_dump_reg_buffer): New class.
8690 (regcache_print): Adjust.
8691 * regcache.h (regcache): Remove constructors.
8693 2018-02-21 Yao Qi <yao.qi@linaro.org>
8695 * regcache.c (class register_dump): New class.
8696 (register_dump_regcache, register_dump_none): New class.
8697 (register_dump_remote, register_dump_groups): New class.
8698 (regcache_print): Update.
8699 * regcache.h (regcache_dump_what): Move it to regcache.c.
8700 (regcache) <dump>: Remove.
8702 2018-02-21 Yao Qi <yao.qi@linaro.org>
8704 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8706 (jit_unwind_reg_set_impl): Call raw_supply.
8707 (jit_frame_sniffer): Use reg_buffer_rw.
8708 * record-full.c (record_full_core_regbuf): Change its type.
8709 (record_full_core_open_1): Use reg_buffer_rw.
8710 (record_full_close): Likewise.
8711 (record_full_core_fetch_registers): Use regcache->raw_supply.
8712 (record_full_core_store_registers): Likewise.
8713 * regcache.c (regcache::get_register_status): Move it to
8715 (regcache_raw_set_cached_value): Remove.
8716 (regcache::raw_set_cached_value): Remove.
8717 (regcache::raw_write): Call raw_supply.
8718 (regcache::raw_supply): Move it to reg_buffer_rw.
8719 * regcache.h (regcache_raw_set_cached_value): Remove.
8720 (reg_buffer_rw): New class.
8722 2018-02-21 Yao Qi <yao.qi@linaro.org>
8724 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8725 readonly_detached_regcache.
8726 (dummy_frame_prev_register): Use regcache->cooked_read.
8727 * frame.c (frame_save_as_regcache): Change return type.
8728 (frame_pop): Update.
8729 * frame.h (frame_save_as_regcache): Update declaration.
8730 * inferior.h (get_infcall_suspend_state_regcache): Update
8732 * infrun.c (infcall_suspend_state) <registers>: use
8733 readonly_detached_regcache.
8734 (save_infcall_suspend_state): Don't use regcache_dup.
8735 (get_infcall_suspend_state_regcache): Change return type.
8736 * linux-fork.c (struct fork_info) <savedregs>: Change to
8737 readonly_detached_regcache.
8739 (fork_save_infrun_state): Don't use regcache_dup.
8740 (info_checkpoints_command): Adjust.
8741 * mi/mi-main.c (register_changed_p): Update declaration.
8742 (mi_cmd_data_list_changed_registers): Use
8743 readonly_detached_regcache.
8744 (register_changed_p): Change parameter type to
8745 readonly_detached_regcache.
8746 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8747 readonly_detached_regcache.
8748 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8749 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8751 (regcache::save): Move it to reg_buffer.
8752 (regcache::restore): Change parameter type.
8753 (regcache_dup): Remove.
8754 * regcache.h (reg_buffer) <save>: New method.
8755 (readonly_detached_regcache): New class.
8756 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8757 readonly_detached_regcache.
8758 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8760 2018-02-21 Yao Qi <yao.qi@linaro.org>
8762 * frame.c (frame_save_as_regcache): Use regcache method save.
8763 (frame_pop): Use regcache method restore.
8764 * infrun.c (restore_infcall_suspend_state): Likewise.
8765 * linux-fork.c (fork_load_infrun_state): Likewise.
8766 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8768 * regcache.c (regcache_save): Remove.
8769 (regcache::restore): More asserts.
8770 (regcache_cpy): Remove.
8771 * regcache.h (regcache_save): Remove the declaration.
8772 (regcache::restore): Move from private to public.
8773 Remove the friend declaration of regcache_cpy.
8774 (regcache_cpy): Remove declaration.
8776 2018-02-21 Yao Qi <yao.qi@linaro.org>
8778 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8779 parameter type to 'readable_regcache *'.
8780 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8781 * arm-tdep.c (arm_neon_quad_read): Likewise.
8782 (arm_pseudo_read): Likewise.
8783 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8784 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8785 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8786 * gdbarch.c: Re-generated.
8787 * gdbarch.h: Re-generated.
8788 * gdbarch.sh (pseudo_register_read): Change parameter type to
8789 'readable_regcache *'.
8790 (pseudo_register_read_value): Likewise.
8791 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8792 (h8300_pseudo_register_read): Likewise.
8793 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8794 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8795 (i386_pseudo_register_read_into_value): Likewise.
8796 (i386_pseudo_register_read_value): Likewise.
8797 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8799 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8800 * m32c-tdep.c (m32c_raw_read): Likewise.
8801 (m32c_read_flg): Likewise.
8802 (m32c_banked_register): Likewise.
8803 (m32c_banked_read): Likewise.
8804 (m32c_sb_read): Likewise.
8805 (m32c_part_read): Likewise.
8806 (m32c_cat_read): Likewise.
8807 (m32c_r3r2r1r0_read): Likewise.
8808 (m32c_pseudo_register_read): Likewise.
8809 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8810 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8811 (mep_pseudo_cr64_read): Likewise.
8812 (mep_pseudo_register_read): Likewise.
8813 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8814 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8815 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8816 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8817 (regcache::cooked_read): Likewise.
8818 (regcache::cooked_read_value): Likewise.
8819 (regcache_cooked_read_signed):
8820 (regcache::cooked_read): Likewise.
8821 * regcache.h (readable_regcache): New class.
8822 (regcache): Inherit readable_regcache. Move some methods to
8824 * rl78-tdep.c (rl78_pseudo_register_read): Change
8825 parameter type to 'readable_regcache *'.
8826 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8827 (e500_pseudo_register_read): Change parameter type to
8828 'readable_regcache *'.
8829 (dfp_pseudo_register_read): Likewise.
8830 (vsx_pseudo_register_read): Likewise.
8831 (efpr_pseudo_register_read): Likewise.
8832 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8833 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8834 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8835 (sh64_pseudo_register_read): Likewise.
8836 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8837 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8838 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8839 (spu_pseudo_register_read): Likewise.
8840 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8841 (xtensa_pseudo_register_read): Likewise.
8843 2018-02-21 Yao Qi <yao.qi@linaro.org>
8845 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8846 (regcache::arch): Move it to reg_buffer::arch.
8847 (regcache::register_buffer): Likewise.
8848 (regcache::assert_regnum): Likewise.
8849 (regcache::num_raw_registers): Likewise.
8850 * regcache.h (reg_buffer): New class.
8851 (regcache): Inherit reg_buffer.
8853 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8855 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8856 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8858 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8860 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8862 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8864 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8865 (SFILES): Remove common/*.c files.
8866 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8867 * common/common.host: Add common reference.
8868 * configure.ac: Likewise.
8869 * configure: Regenerate.
8871 2018-02-16 Yao Qi <yao.qi@linaro.org>
8873 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8874 (block_initialize_namespace): Use new.
8875 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8876 (dwarf2_free_objfile): Use delete.
8877 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8878 (copy_type_recursive): Use new.
8879 * gdb_obstack.h (allocate_on_obstack): New.
8881 2018-02-15 Yao Qi <yao.qi@linaro.org>
8884 * inferior.c (exit_inferior_1): Reset inf->control.
8886 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8888 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8891 2018-02-14 Pedro Alves <palves@redhat.com>
8893 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8894 frame_cleanup_after_sniffer on exception.
8896 2018-02-14 Tom Tromey <tom@tromey.com>
8898 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8900 (solib_bfd_open): Make pathname const.
8901 * solib.c (solib_bfd_open): Make pathname const.
8902 * solib-spu.c (spu_bfd_fopen): Make name const.
8903 (spu_bfd_open): Make pathname const.
8904 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8905 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8907 2018-02-14 Tom Tromey <tom@tromey.com>
8909 * symfile.c (symfile_bfd_open): Update.
8910 * source.h (openp, source_full_path_of, find_and_open_source):
8911 Change argument type to unique_xmalloc_ptr.
8912 * source.c (openp): Take a unique_xmalloc_ptr.
8913 (source_full_path_of, find_and_open_source): Likewise.
8914 (open_source_file, symtab_to_fullname): Update.
8915 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8917 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8918 (exec_file_find): Update.
8919 * psymtab.c (psymtab_to_fullname): Update.
8920 * nto-tdep.h (nto_find_and_open_solib): Update.
8921 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8923 * exec.c (exec_file_attach): Update.
8924 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8925 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8927 2018-02-14 Tom Tromey <tom@tromey.com>
8929 * solib.c: Include source.h.
8930 * nto-tdep.c: Include source.h.
8931 * mi/mi-cmd-env.c: Include source.h.
8932 * infcmd.c: Include source.h.
8933 * exec.c: Include source.h.
8934 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8935 (add_path, directory_switch, source_path, init_source_path): Move
8937 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8938 (add_path, directory_switch, source_path, init_source_path):
8941 2018-02-14 Tom Tromey <tom@tromey.com>
8943 * solist.h (exec_file_find, solib_find): Return
8945 (solib_bfd_fopen): Take a const char *.
8946 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8947 (exec_file_find, solib_find): Likewise.
8948 (solib_bfd_fopen): Do not take ownership of "pathname".
8949 (solib_bfd_open): Use unique_xmalloc_ptr.
8950 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8951 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8952 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8953 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8955 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8957 * ada-lang.c (name_match_type_from_name): Remove reference to
8958 ada_name_for_lookup in function's documentation.
8959 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8961 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8963 * defs.h (enum openp_flags): New enum.
8964 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8965 Move to enum openp_flags.
8966 (openp_flags): New enum flags.
8967 (openp): Change parameter type to openp_flags.
8968 * source.c (openp): Change parameter type to openp_flags.
8969 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8970 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8972 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8974 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8977 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8979 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8981 (class dwarf2_queue_guard): ...the destructor of this new class.
8982 (dw2_do_instantiate_symtab): Create instance of the new class
8983 dwarf2_queue_guard, remove cleanup.
8985 2018-02-09 Tom Tromey <tom@tromey.com>
8987 * source.c (find_source_lines): Don't reference past the end of
8990 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8992 * remote.c (remote_btrace_maybe_reopen): Change error message.
8993 * btrace.c (btrace_enable): Likewise.
8994 (parse_xml_btrace): Likewise.
8995 (parse_xml_btrace_conf): Likewise.
8997 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8999 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9000 (linux_enable_pt, linux_enable_bts): Call
9001 diagnose_perf_event_open_fail.
9003 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9005 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9006 Remove parameter and change return type. Update callers. Move it.
9007 (linux_enable_bts, linux_enable_pt): Improve error message.
9008 (linux_enable_pt): Remove zero buffer size check.
9009 (linux_enable_btrace): Improve error messages. Remove NULL return
9012 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9014 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9015 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9016 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9017 (linux_supports_pt, linux_supports_btrace): Remove.
9018 (linux_enable_bts): Call cpu_supports_bts.
9019 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9020 * remote.c (remote_supports_btrace): Remove.
9021 (init_remote_ops): Remove remote_supports_btrace.
9022 * target-delegates.c: Regenerated.
9023 * target.c (target_supports_btrace): Remove.
9024 * target.h (target_ops) <to_supports_btrace>: Remove
9025 (target_supports_btrace): Remove.
9026 * x86-linux-nat.c (x86_linux_create_target): Remove
9027 linux_supports_btrace.
9029 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9031 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9033 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9034 exception and use message in own exception.
9036 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9038 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9039 (perf_event_pt_event_type): Use gdb_file_up.
9040 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9041 scoped_fd, and scoped_mmap.
9043 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9045 * common/scoped_mmap.h: New.
9046 * unittests/scoped_mmap-selftest.c: New.
9047 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9048 unittests/scoped_mmap-selftest.c.
9050 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9052 * common/scoped_fd.h: New.
9053 * unittests/scoped_fd-selftest.c: New.
9054 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9055 unittests/scoped_fd-selftest.c.
9057 2018-02-09 Tom Tromey <tom@tromey.com>
9059 * auto-load.c (auto_load_section_scripts): Use
9060 gdb::unique_xmalloc_ptr.
9062 2018-02-09 Tom Tromey <tom@tromey.com>
9064 * auto-load.c (execute_script_contents): Use std::string.
9066 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9068 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9069 Python function, rather than a new command.
9071 2018-02-08 Tom Tromey <tom@tromey.com>
9073 * solib.c (solib_find_1): Use std::string.
9074 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9076 2018-02-08 Tom Tromey <tom@tromey.com>
9078 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9080 2018-02-08 Tom Tromey <tom@tromey.com>
9082 * source.c (find_source_lines): Use gdb::def_vector.
9084 2018-02-08 Tom Tromey <tom@tromey.com>
9086 * macrocmd.c (struct temporary_macro_definition): New.
9087 (macro_define_command): Use temporary_macro_definition. Remove
9089 (free_macro_definition_ptr): Remove.
9091 2018-02-08 Tom Tromey <tom@tromey.com>
9093 * macroexp.c (maybe_expand): Use std::string.
9095 2018-02-08 Tom Tromey <tom@tromey.com>
9097 * macroexp.c (struct macro_buffer): Add initializers for some
9099 (init_buffer, init_shared_buffer, free_buffer)
9100 (free_buffer_return_text): Remove.
9101 (macro_buffer): New constructors.
9102 (~macro_buffer): New destructor.
9103 (macro_buffer::set_shared): New method.
9104 (macro_buffer::resize_buffer, macro_buffer::appendc)
9105 (macro_buffer::appendmem): Now methods, not free functions.
9106 (set_token, append_tokens_without_splicing, stringify)
9107 (macro_stringify): Update.
9108 (gather_arguments): Change return type. Remove argc_p argument,
9109 add args_ptr argument. Use std::vector.
9110 (substitute_args): Remove argc argument. Accept std::vector.
9111 (expand): Update. Use std::vector.
9112 (scan, macro_expand, macro_expand_next): Update.
9114 2018-02-08 Tom Tromey <tom@tromey.com>
9116 * symtab.c (default_collect_symbol_completion_matches_break_on):
9117 Use unique_xmalloc_ptr.
9118 * macroscope.h: (sal_macro_scope, user_macro_scope)
9119 (default_macro_scope): Return unique_xmalloc_ptr.
9120 * macroscope.c (sal_macro_scope, user_macro_scope)
9121 (default_macro_scope): Return unique_xmalloc_ptr.
9122 * macroexp.h (macro_expand, macro_expand_once): Return
9124 * macroexp.c (macro_expand, macro_expand_once): Return
9126 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9127 (info_macro_command, info_macros_command): Use
9129 * compile/compile-c-support.c (write_macro_definitions): Use
9131 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9133 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9135 * value.c (value_static_field): Assign field type instead of
9136 containing type when returning an optimized out value.
9138 2018-02-06 Yao Qi <yao.qi@linaro.org>
9140 * ft32-tdep.c (ft32_read_pc): Remove.
9141 (ft32_write_pc): Remove.
9142 (ft32_gdbarch_init): Update.
9143 * m32r-tdep.c (m32r_read_pc): Remove.
9144 (m32r_gdbarch_init): Update.
9145 * mep-tdep.c (mep_read_pc): Remove.
9146 (mep_gdbarch_init): Update.
9147 * microblaze-tdep.c (microblaze_write_pc): Remove.
9148 (microblaze_gdbarch_init): Update.
9149 * mn10300-tdep.c (mn10300_read_pc): Remove.
9150 (mn10300_write_pc): Remove.
9151 (mn10300_gdbarch_init): Update.
9152 * moxie-tdep.c (moxie_read_pc): Remove.
9153 (moxie_write_pc): Remove.
9154 (moxie_gdbarch_init): Update.
9156 2018-02-06 Yao Qi <yao.qi@linaro.org>
9158 * expprint.c (print_subexp_standard): Handle
9159 OP_F77_UNDETERMINED_ARGLIST.
9160 (dump_subexp_body_standard): Likewise.
9162 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9164 * target-descriptions.c (tdesc_element_visitor) Add empty
9166 (tdesc_type): Move make_gdb_type from here.
9167 (tdesc_type_builtin): Likewise.
9168 (tdesc_type_vector): Likewise.
9169 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9170 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9171 (make_gdb_type_union): Likewise.
9172 (make_gdb_type_flags): Likewise.
9173 (make_gdb_type_enum): Likewise.
9174 (make_gdb_type): New function.
9175 (tdesc_register_type): Use static make_gdb_type.
9177 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9179 * infcmd.c (default_print_one_register_info): Align natural-format
9180 column values consistently one under another.
9181 (pad_to_column): New function.
9183 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9185 * dwarf2read.c (dwarf2_physname): Move commment.
9187 2018-02-01 Leszek Swirski <leszeks@google.com>
9189 * varobj.c (varobj_formatted_print_options): Allow recursive
9190 pretty printing if pretty printing is enabled.
9192 2018-02-01 Leszek Swirski <leszeks@google.com>
9194 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9195 names after a structop as a filename.
9197 2018-02-01 Yao Qi <yao.qi@linaro.org>
9199 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9200 (arm_record_coproc_data_proc): Likewise.
9202 2018-02-01 Yao Qi <yao.qi@linaro.org>
9204 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9206 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9208 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9209 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9211 2018-01-31 Pedro Alves <palves@redhat.com>
9213 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9214 * inflow.c (child_terminal_save_inferior): Wrap reference to
9215 tcgetpgrp in HAVE_TERMIOS_H.
9216 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9218 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9219 always iterate over all inferiors.
9220 (gdbsim_cntrl_c): Adjust.
9221 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9223 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9225 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9226 index type is objfile-owned if the element type is as well.
9228 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9232 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9234 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9235 "features/s390x-linux64.c".
9236 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9237 s390_linux32 and s390x_linux64.
9238 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9240 * s390-tdep.c: Include "features/s390-linux32.c" and
9241 "features/s390x-linux64.c".
9242 (s390_tdesc_valid): Add check for tdesc_has_registers.
9243 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9244 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9245 tdesc_s390x_linux64.
9246 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9247 tdesc_s390x_linux64 to...
9248 * s390-tdep.h: ...here.
9250 2018-01-30 Pedro Alves <palves@redhat.com>
9253 * config.in, configure: Regenerate.
9254 * configure.ac: Check for getpgid.
9255 * go32-nat.c (go32_pass_ctrlc): New.
9256 (go32_target): Install it.
9257 * inf-child.c (inf_child_target): Install
9258 child_terminal_save_inferior, child_pass_ctrlc and
9260 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9261 (inf_ptrace_target): No longer install it.
9262 * infcmd.c (interrupt_target_1): Adjust.
9263 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9264 (child_interrupt): Declare.
9265 (inferior::terminal_state): New.
9266 * inflow.c (struct terminal_info): Update comments.
9267 (inferior_process_group): Delete.
9268 (terminal_is_ours): Delete.
9269 (gdb_tty_state): New.
9270 (child_terminal_init): Adjust.
9271 (is_gdb_terminal, sharing_input_terminal_1)
9272 (sharing_input_terminal): New functions.
9273 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9274 Set the process's actual process group in the foreground if
9275 possible. Handle is_ours_for_output/is_ours distinction. Don't
9276 mark terminal as the inferior's if not sharing GDB's terminal.
9277 Don't check attach_flag.
9278 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9279 pass down a target_terminal_state.
9280 (child_terminal_save_inferior): New, factored out from ...
9281 (child_terminal_ours_1): ... this. Handle
9282 target_terminal_state::is_ours_for_output.
9283 (child_interrupt, child_pass_ctrlc): New.
9284 (inflow_inferior_exit): Clear the inferior's terminal_state.
9285 (copy_terminal_info): Copy the inferior's terminal state.
9286 (_initialize_inflow): Remove reference to terminal_is_ours.
9287 * inflow.h (inferior_process_group): Delete.
9288 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9289 * procfs.c (procfs_target): Don't install procfs_interrupt.
9290 (procfs_interrupt): Delete.
9291 * remote.c (remote_serial_quit_handler): Adjust.
9292 (remote_interrupt): Remove ptid parameter. Adjust.
9293 * target-delegates.c: Regenerate.
9294 * target.c: Include "terminal.h".
9295 (target_terminal::terminal_state): Rename to ...
9296 (target_terminal::m_terminal_state): ... this.
9297 (target_terminal::init): Adjust.
9298 (target_terminal::inferior): Adjust to per-inferior
9300 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9301 (target_terminal::ours, target_terminal::ours_for_output): Use
9302 target_terminal_is_ours_kind.
9303 (target_interrupt): Remove ptid parameter. Adjust.
9304 (default_target_pass_ctrlc): Adjust.
9305 * target.h (target_ops::to_terminal_save_inferior): New field.
9306 (target_ops::to_interrupt): Remove ptid_t parameter.
9307 (target_interrupt): Remove ptid_t parameter. Update comment.
9308 (target_pass_ctrlc): Update comment.
9309 * target/target.h (target_terminal_state): New scoped enum,
9311 (target_terminal::terminal_state): ... here.
9312 (target_terminal::inferior): Update comments.
9313 (target_terminal::restore_inferior): New.
9314 (target_terminal::is_inferior, target_terminal::is_ours)
9315 (target_terminal::is_ours_for_output): Adjust.
9316 (target_terminal::scoped_restore_terminal_state): Adjust to
9317 rename, and call restore_inferior() instead of inferior().
9318 (target_terminal::scoped_restore_terminal_state::m_state): Change
9320 (target_terminal::terminal_state): Rename to ...
9321 (target_terminal::m_terminal_state): ... this and change type.
9323 2018-01-30 Pedro Alves <palves@redhat.com>
9325 * linux-nat.c (wait_for_signal): New function.
9326 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9328 (async_terminal_is_ours)
9329 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9330 (linux_nat_add_target): Don't override
9331 to_terminal_inferior/to_terminal_ours.
9333 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9335 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9337 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9339 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9340 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9341 dwarf2_per_objfile_free here.
9342 (dwarf2_per_objfile_free): Remove.
9343 (_initialize_dwarf2_read): Don't register
9344 dwarf2_per_objfile_free as a registry cleanup.
9346 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9348 Avoid compilation errors in MinGW native builds
9350 The error is triggered by including python-internal.h, and the
9353 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9354 from build-gnulib/import/math.h:27,
9355 from d:/usr/Python26/include/pyport.h:235,
9356 from d:/usr/Python26/include/Python.h:58,
9357 from python/python-internal.h:94,
9358 from python/py-arch.c:24:
9359 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9363 This happens because Python headers define 'hypot' to expand t
9364 '_hypot' in the Windows builds.
9365 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9366 'hypoth'. This avoids a compilation error.
9368 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9370 * MAINTAINERS (Write After Approval): Fix ordering.
9372 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9374 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9376 2018-01-26 Alan Modra <amodra@gmail.com>
9378 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9379 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9380 Remove nop. Make const. Comment.
9381 (powerpc32_plt_stub_so_2): New.
9382 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9383 Correct count. Update uses.
9384 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9385 Move common code reading PLT entry word. Correct
9386 powerpc32_plt_stub PLT address calculation.
9387 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9388 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9389 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9390 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9391 (ppc64_standard_linkage8): Likewise.
9392 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9393 Correct insns description.
9394 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9396 2018-01-24 Pedro Alves <palves@redhat.com>
9398 GCC PR libstdc++/83906
9399 * gdbtypes.c (operator==(const dynamic_prop &,
9400 const dynamic_prop &)): New.
9401 (operator==(const range_bounds &, const range_bounds &)): New.
9402 (check_types_equal): Use them instead of memcmp.
9403 * gdbtypes.h (operator==(const dynamic_prop &,
9404 const dynamic_prop &)): Declare.
9405 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9406 (operator==(const range_bounds &, const range_bounds &)): Declare.
9407 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9409 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9411 * s390-linux-tdep.c (s390_record_address_mask)
9412 (s390_record_calc_disp_common, s390_record_calc_disp)
9413 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9414 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9415 (s390_process_record): Move to s390-tdep.c.
9416 (s390_linux_init_abi_any): Adjust.
9417 * s390-tdep.c (s390_record_address_mask)
9418 (s390_record_calc_disp_common, s390_record_calc_disp)
9419 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9420 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9421 (s390_process_record): Moved from s390-linux-tdep.c
9422 (s390_gdbarch_init): Adjust.
9424 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9426 * s390-linux-nat.c (s390-tdep.h): New include.
9427 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9428 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9429 (ALLDEPFILES): Add s390-tdep.c.
9430 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9431 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9432 * s390-tdep.h: ...this. New file.
9433 * s390-linux-tdep.c (s390-tdep.h): New include.
9434 (_initialize_s390_tdep): Rename to...
9435 (_initialize_s390_linux_tdep): ...this and adjust.
9436 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9437 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9439 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9440 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9441 (s390_is_partial_instruction, s390_software_single_step)
9442 (is_non_branch_ril, s390_displaced_step_copy_insn)
9443 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9444 (s390_prologue_data, s390_addr, s390_store, s390_load)
9445 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9446 (s390_register_call_saved, s390_guess_tracepoint_registers)
9447 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9448 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9449 (s390_pseudo_register_name, s390_pseudo_register_type)
9450 (s390_pseudo_register_read, s390_pseudo_register_write)
9451 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9452 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9453 (s390_addr_bits_remove, s390_address_class_type_flags)
9454 (s390_address_class_type_flags_to_name)
9455 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9456 (s390_function_arg_float, s390_function_arg_vector)
9457 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9458 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9459 (s390_frame_align, s390_register_return_value, s390_return_value)
9460 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9461 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9462 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9463 (s390_trad_frame_prev_register, s390_unwind_cache)
9464 (s390_prologue_frame_unwind_cache)
9465 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9466 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9467 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9468 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9469 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9470 (s390_frame_base_address, s390_local_base_address)
9471 (s390_frame_base, s390_gcc_target_options)
9472 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9473 (s390_validate_reg_range, s390_tdesc_valid)
9474 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9475 * s390-tdep.c: ...this. New file.
9477 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9479 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9480 (s390_process_record, s390_gdbarch_tdep_alloc)
9481 (s390_linux_init_abi_any): Use/set new hook.
9483 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9485 * s390-linux-tdep.c (osabi.h): New include.
9486 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9487 (s390_linux_init_abi_any): New functions.
9488 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9490 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9492 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9493 tdesc_has_registers check
9495 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9497 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9498 (s390_validate_reg_range): New macro.
9499 (s390_gdbarch_init): Adjust.
9501 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9503 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9504 (s390_gdbarch_tdep_alloc): Adjust.
9505 (s390_gdbarch_init): Adjust.
9507 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9509 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9510 <have_tdb>: Change type to bool.
9511 (s390_gdbarch_tdep_alloc): Adjust.
9512 (s390_gdbarch_init): Adjust.
9514 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9516 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9517 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9518 (s390_gdbarch_tdep_alloc): New function.
9519 (s390_gdbarch_init): Allocate tdep at start and use its fields
9520 instead of separate variables.
9522 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9524 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9525 when looking for cached gdbarch and add comment for remaining.
9527 2018-01-22 Pedro Alves <palves@redhat.com>
9528 Sergio Durigan Junior <sergiodj@redhat.com>
9530 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9533 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9535 * MAINTAINERS: Update my company e-mail address.
9537 2018-01-22 Yao Qi <yao.qi@linaro.org>
9539 * regcache.c (cooked_write_test): New function.
9540 (_initialize_regcache): Register the test.
9542 2018-01-22 Yao Qi <yao.qi@linaro.org>
9544 * ia64-tdep.c (ia64_pseudo_register_read): Call
9545 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9546 * m32c-tdep.c (m32c_cat_read): Likewise.
9547 (m32c_r3r2r1r0_read): Likewise.
9548 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9549 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9551 2018-01-22 Yao Qi <yao.qi@linaro.org>
9553 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9554 method raw_read instead of regcache_raw_read.
9555 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9556 * arm-tdep.c (arm_neon_quad_read): Likewise.
9557 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9558 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9559 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9560 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9561 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9562 (i386_pseudo_register_read_into_value): Likewise.
9563 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9564 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9565 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9566 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9567 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9568 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9569 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9570 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9571 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9573 2018-01-22 Yao Qi <yao.qi@linaro.org>
9575 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9576 * configure.tgt: Remove target mt.
9577 * mt-tdep.c: Remove.
9578 * regcache.c (cooked_read_test): Remove the check for mt.
9580 2018-01-22 Yao Qi <yao.qi@linaro.org>
9582 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9583 instead of gdbarch_pseudo_register_read_value.
9585 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9587 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9590 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9592 * linespec.c (create_sals_line_offset): Remove code that preserved
9593 the symtab_and_line's line number.
9595 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9597 * varobj.c (varobj_create): Don't set valid_block when creating a
9600 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9602 * varobj.c (varobj_create): Remove out of date comment.
9604 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9607 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9608 updating innermost block.
9609 * parse.c (innermost_block_tracker::update): Take extra type
9610 parameter, and check types match before updating innermost block.
9611 (write_dollar_variable): Update innermost block for registers.
9612 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9613 (innermost_block_tracker::innermost_block_tracker): Initialise
9615 (innermost_block_tracker::reset): Take type parameter.
9616 (innermost_block_tracker::update): Take type parameter, and pass
9617 type through as needed.
9618 (innermost_block_tracker::m_types): New member.
9619 * varobj.c (varobj_create): Pass type when reseting innermost
9622 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9624 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9625 * ada-lang.c (resolve_subexp): Likewise.
9626 * breakpoint.c (set_breakpoint_condition) Likewise.
9627 (watch_command_1) Likewise.
9628 * c-exp.y (variable): Likewise.
9629 * d-exp.y (PrimaryExpression): Likewise.
9630 * f-exp.y (variable): Likewise.
9631 * go-exp.y (variable): Likewise.
9632 * m2-exp.y (variable): Likewise.
9633 * objfiles.c (objfile::~objfile): Likewise.
9634 * p-exp.y (variable): Likewise.
9635 * parse.c (innermost_block): Change type.
9636 * parser-defs.h (class innermost_block_tracker): New.
9637 (innermost_block): Change to innermost_block_tracker.
9638 * printcmd.c (display_command): Switch to innermost_block API.
9639 (do_one_display): Likewise.
9640 * rust-exp.y (do_one_display): Likewise.
9641 * symfile.c (clear_symtab_users): Likewise.
9642 * varobj.c (varobj_create): Switch to innermost_block API, replace
9643 use of innermost_block with block stored on varobj object.
9645 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9647 * expression.h (innermost_block): Remove declaration.
9648 * varobj.c: Add 'parser-defs.h' include.
9650 2018-01-19 Tom Tromey <tom@tromey.com>
9652 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9653 symbols in the static and global blocks.
9655 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9657 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9658 gdb_ptrace.h, and move including gdb_wait.h ...
9659 * nat/linux-ptrace.h: ... to here.
9661 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9663 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9664 inf_ptrace_detach_success.
9665 (inf_ptrace_detach_success): Add inferior parameter, use it
9666 instead of inferior_ptid, pass it to detach_inferior.
9667 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9669 * inferior.c (detach_inferior): Add overload that takes an
9671 * inferior.h (detach_inferior): Likewise.
9672 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9673 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9674 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9676 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9678 * target.h (struct target_ops) <to_detach>: Add inferior
9680 (target_detach): Likewise.
9681 * target.c (dispose_inferior): Pass inferior down.
9682 (target_detach): Pass inferior down. Assert that it is equal to
9683 the current inferior.
9684 * aix-thread.c (aix_thread_detach): Pass inferior down.
9685 * corefile.c (core_file_command): Pass current_inferior() down.
9686 * corelow.c (core_detach): Add inferior parameter.
9687 * darwin-nat.c (darwin_detach): Likewise.
9688 * gnu-nat.c (gnu_detach): Likewise.
9689 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9690 * infcmd.c (detach_command): Pass current_inferior() down to
9692 * infrun.c (follow_fork_inferior): Pass parent_inf to
9694 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9696 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9697 * linux-thread-db.c (thread_db_detach): Likewise.
9698 * nto-procfs.c (procfs_detach): Likewise.
9699 * procfs.c (procfs_detach): Likewise.
9700 * record.c (record_detach): Likewise.
9701 * record.h (struct inferior): Forward-declare.
9702 (record_detach): Add inferior parameter.
9703 * remote-sim.c (gdbsim_detach): Likewise.
9704 * remote.c (remote_detach_1): Likewise.
9705 (remote_detach): Likewise.
9706 (extended_remote_detach): Likewise.
9707 * sol-thread.c (sol_thread_detach): Likewise.
9708 * target-debug.h (target_debug_print_inferior_p): New macro.
9709 * target-delegates.c: Re-generate.
9710 * top.c (kill_or_detach): Pass inferior down to target_detach.
9711 * windows-nat.c (windows_detach): Add inferior parameter.
9713 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9715 * target.h (struct target_ops) <to_detach>: Remove args
9717 (target_detach): Likewise.
9718 * target.c (dispose_inferior): Adjust.
9719 (target_detach): Remove args parameter, adjust.
9720 * aix-thread.c (aix_thread_detach): Adjust.
9721 * corefile.c (core_file_command): Adjust.
9722 * corelow.c (core_detach): Adjust.
9723 * darwin-nat.c (darwin_detach): Adjust.
9724 * gnu-nat.c (gnu_detach): Adjust.
9725 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9726 * infcmd.c (detach_command): Adjust
9727 * infrun.c (follow_fork_inferior): Adjust.
9728 (handle_vfork_child_exec_or_exit): Adjust.
9729 * linux-fork.c (linux_fork_detach): Remove args parameter.
9730 * linux-fork.h (linux_fork_detach): Likewise.
9731 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9732 * linux-thread-db.c (thread_db_detach): Likewise.
9733 * nto-procfs.c (procfs_detach): Likewise.
9734 * procfs.c (procfs_detach): Likewise.
9735 (do_detach): Remove signo parameter.
9736 * record.c (record_detach): Remove args parameter.
9737 * record.h (record_detach): Likewise.
9738 * remote-sim.c (gdbsim_detach): Likewise.
9739 * remote.c (remote_detach_1): Likewise.
9740 (remote_detach): Likewise.
9741 (extended_remote_detach): Likewise.
9742 * sol-thread.c (sol_thread_detach): Likewise.
9743 * target-delegates.c: Re-generate.
9744 * top.c (struct qt_args) <args>: Remove field.
9745 (kill_or_detach): Don't pass args.
9746 (quit_force): Don't set args.
9747 * windows-nat.c (windows_detach): Remove args parameter.
9749 2018-01-19 Yao Qi <yao.qi@linaro.org>
9751 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9752 (arm_linux_init_abi): Install it.
9754 2018-01-19 Yao Qi <yao.qi@linaro.org>
9756 * osabi.c (gdb_osabi_names): Extend the regexp for
9757 arm-linux-gnueabihf.
9759 2018-01-18 Yao Qi <yao.qi@linaro.org>
9761 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9763 (abbrev_table::add_abbrev): Update.
9764 (abbrev_table::lookup_abbrev): Update.
9766 2018-01-18 Yao Qi <yao.qi@linaro.org>
9768 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9770 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9772 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9775 2018-01-17 Tom Tromey <tom@tromey.com>
9777 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9779 2018-01-17 Tom Tromey <tom@tromey.com>
9781 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9782 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9783 (create_array_type_with_stride): Update.
9784 * dwarf2read.c (set_die_type): Update.
9786 2018-01-17 Tom Tromey <tom@tromey.com>
9788 * dwarf2read.c (delayed_method_info): Remove typedef.
9789 (dwarf2_cu::method_info): Now a std::vector.
9790 (add_to_method_list): Update.
9791 (free_delayed_list): Remove.
9792 (compute_delayed_physnames): Update.
9793 (process_full_comp_unit, process_full_type_unit): Clear the method
9794 list. Remove cleanups.
9795 (psymtab_include_file_name): Add name_holder parameter. Use
9797 (dwarf_decode_lines): Update.
9799 2018-01-17 Tom Tromey <tom@tromey.com>
9800 Simon Marchi <simon.marchi@ericsson.com>
9802 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9803 (dwarf2_per_objfile::free_cached_comp_units)
9804 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9805 (init_cutu_and_read_dies_no_follow): Update.
9806 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9807 (dwarf2_cu::~dwarf2_cu): New.
9808 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9809 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9811 2018-01-17 Tom Tromey <tom@tromey.com>
9812 Simon Marchi <simon.marchi@ericsson.com>
9814 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9815 (struct die_reader_specs) <abbrev_table>: New member.
9816 (struct abbrev_table): Add constructor.
9817 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9818 <abbrev_obstack>: Now an auto_obstack.
9819 (abbrev_table_up): New typedef.
9820 (init_cu_die_reader): Add abbrev_table parameter.
9821 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9822 Add result_dwo_abbrev_table.
9823 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9824 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9826 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9828 (skip_children): Update.
9829 (abbrev_table::alloc_abbrev): Rename from
9830 abbrev_table_alloc_abbrev.
9831 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9832 (abbrev_table::lookup_abbrev): Rename from
9833 abbrev_table_lookup_abbrev.
9834 (abbrev_table_read_table): Return abbrev_table_up.
9835 (abbrev_table_free, abbrev_table_free_cleanup)
9836 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9837 (load_partial_dies): Update.
9839 2018-01-17 Tom Tromey <tom@tromey.com>
9841 * dwarf2read.c (dwarf2_compute_name): Update comment.
9842 (read_func_scope, read_variable): Update.
9843 (new_symbol): Remove.
9844 (new_symbol_full): Rename to new_symbol.
9846 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9849 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9850 a warning instead of throwing an error, set section size to 0 and return
9852 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9854 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9856 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9858 (linux_ptrace_attach_fail_reason_string): Likewise.
9859 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9861 (linux_ptrace_attach_fail_reason_string): Likewise.
9862 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9864 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9866 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9868 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9871 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9872 checking for fs_base/gs_base fields in struct user_regs_struct.
9873 * configure: Regenerate.
9875 2018-01-17 Yao Qi <yao.qi@linaro.org>
9877 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9879 (aarch64_linux_init_abi): Install it to gdbarch hook
9882 2018-01-15 Pedro Alves <palves@redhat.com>
9884 * common/signals-state-save-restore.c
9885 (save_original_signals_state): Fix typos.
9887 2017-01-12 Tom Tromey <tom@tromey.com>
9888 Sergio Durigan Junior <sergiodj@redhat.com>
9890 * Makefile.in (install-only): Install gdb-add-index.
9892 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9894 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9896 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9898 * infrun.c (keep_going_pass_signal): Clear step-over info when
9899 insert_breakpoints fails.
9901 2018-01-11 Pedro Alves <palves@redhat.com>
9904 * infrun.c (resume): Rename to ...
9905 (resume_1): ... this.
9906 (resume): Reimplement as wrapper around resume_1.
9908 2018-01-11 Pedro Alves <palves@redhat.com>
9911 * remote.c (remote_parse_stop_reply): Default to the last-set
9912 general thread instead of to 'magic_null_ptid'.
9914 2018-01-10 Pedro Alves <palves@redhat.com>
9916 * language.h (language_get_symbol_name_matcher): Rename ...
9917 (get_symbol_name_matcher): ... this.
9918 * language.c (language_get_symbol_name_matcher): Ditto.
9919 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9922 2018-01-10 Pedro Alves <palves@redhat.com>
9926 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9927 Adjust to use language_get_symbol_name_matcher instead of
9928 language_defn::la_get_symbol_name_matcher.
9929 * language.c (language_get_symbol_name_matcher): If in Ada mode
9930 and the lookup name is a verbatim match, return Ada's matcher.
9931 * language.h (language_get_symbol_name_matcher): Adjust comment.
9932 (ada_lookup_name_info::verbatim_p):: New method.
9934 2018-01-10 Pedro Alves <palves@redhat.com>
9937 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9938 minsym's language is language_auto or language_cplus, pass down
9939 language_ada instead.
9940 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9942 2018-01-10 Pedro Alves <palves@redhat.com>
9945 * minsyms.c (linkage_name_str): New function.
9946 (iterate_over_minimal_symbols): Use it.
9948 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9950 * NEWS: Document that 'info proc' now works on FreeBSD.
9952 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9954 * configure.ac: Check for kinfo_getfile in libutil.
9955 * configure: Regenerate.
9956 * config.in: Regenerate.
9957 * fbsd-nat.c: Include "fbsd-tdep.h".
9958 (fbsd_fetch_cmdline): New.
9959 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9960 rather than calling error.
9961 (fbsd_info_proc): New.
9962 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9963 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9964 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9966 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9968 * fbsd-nat.c (struct free_deleter): Remove.
9969 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9971 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9973 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9974 NULL for an empty pathname.
9976 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9978 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9979 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9980 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9981 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9982 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9983 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9984 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9985 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9986 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9987 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9988 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9989 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9990 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9991 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9992 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9994 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9996 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9997 (gnu_xfer_auxv): New function.
9998 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10001 2018-01-08 Yao Qi <yao.qi@linaro.org>
10002 Simon Marchi <simon.marchi@ericsson.com>
10004 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10006 (COMMON_OBS): Remove selftest.o.
10007 * configure.ac: Append selftest-arch.c and common/selftest.c to
10008 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10009 * configure: Re-generated.
10010 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10012 (maintenance_info_selftests): Likewise.
10014 2018-01-08 Xavier Roirand <roirand@adacore.com>
10016 * ada-valprint.c (val_print_packed_array_elements): Use
10017 proper number of elements when printing an array indexed
10018 by an enumeration type.
10020 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10022 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10023 (dw2_get_file_names_reader): Adjust.
10024 (lookup_dwo_signatured_type): Adjust.
10025 (lookup_dwp_signatured_type): Adjust.
10026 (lookup_signatured_type): Adjust.
10027 (create_type_unit_group): Adjust.
10028 (get_type_unit_group): Adjust.
10029 (process_psymtab_comp_unit_reader): Adjust.
10030 (build_type_psymtabs_reader): Adjust.
10031 (scan_partial_symbols): Adjust.
10032 (add_partial_symbol): Adjust.
10033 (add_partial_subprogram): Adjust.
10034 (peek_die_abbrev): Adjust.
10035 (fixup_go_packaging): Adjust.
10036 (process_imported_unit_die): Adjust.
10037 (dwarf2_compute_name): Adjust.
10038 (dwarf2_physname): Adjust.
10039 (read_import_statement): Adjust.
10040 (handle_DW_AT_stmt_list): Adjust.
10041 (read_file_scope): Adjust.
10042 (read_func_scope): Adjust.
10043 (read_lexical_block_scope): Adjust.
10044 (read_call_site_scope): Adjust.
10045 (read_variable): Adjust.
10046 (dwarf2_rnglists_process): Adjust.
10047 (dwarf2_ranges_process): Adjust.
10048 (dwarf2_ranges_read): Adjust.
10049 (dwarf2_get_pc_bounds): Adjust.
10050 (dwarf2_record_block_ranges): Adjust.
10051 (dwarf2_add_field): Adjust.
10052 (dwarf2_add_member_fn): Adjust.
10053 (read_structure_type): Adjust.
10054 (process_structure_scope): Adjust.
10055 (read_enumeration_type): Adjust.
10056 (read_array_type): Adjust.
10057 (mark_common_block_symbol_computed): Adjust.
10058 (read_common_block): Adjust.
10059 (read_namespace_type): Adjust.
10060 (read_namespace): Adjust.
10061 (read_module_type): Adjust.
10062 (read_tag_pointer_type): Adjust.
10063 (read_tag_ptr_to_member_type): Adjust.
10064 (read_tag_string_type): Adjust.
10065 (read_subroutine_type): Adjust.
10066 (read_typedef): Adjust.
10067 (read_base_type): Adjust.
10068 (attr_to_dynamic_prop): Adjust.
10069 (read_subrange_type): Adjust.
10070 (read_unspecified_type): Adjust.
10071 (dwarf2_read_abbrevs): Adjust.
10072 (load_partial_dies): Adjust.
10073 (read_partial_die): Adjust.
10074 (find_partial_die): Adjust.
10075 (guess_partial_die_structure_name): Adjust.
10076 (fixup_partial_die): Adjust.
10077 (read_attribute_value): Adjust.
10078 (read_addr_index): Adjust.
10079 (read_addr_index_from_leb128): Adjust.
10080 (read_str_index): Adjust.
10081 (dwarf2_string_attr): Adjust.
10082 (get_debug_line_section): Adjust.
10083 (dwarf_decode_line_header): Adjust.
10084 (lnp_state_machine::check_line_address): Adjust.
10085 (dwarf_decode_lines_1): Adjust.
10086 (dwarf_decode_lines): Adjust.
10087 (dwarf2_start_symtab): Adjust.
10088 (var_decode_location): Adjust.
10089 (new_symbol_full): Adjust.
10090 (dwarf2_const_value_data): Adjust.
10091 (dwarf2_const_value_attr): Adjust.
10092 (dwarf2_const_value): Adjust.
10093 (die_type): Adjust.
10094 (die_containing_type): Adjust.
10095 (build_error_marker_type): Adjust.
10096 (lookup_die_type): Adjust.
10097 (guess_full_die_structure_name): Adjust.
10098 (anonymous_struct_prefix): Adjust.
10099 (determine_prefix): Adjust.
10100 (dwarf2_name): Adjust.
10101 (follow_die_ref_or_sig): Adjust.
10102 (follow_die_offset): Adjust.
10103 (follow_die_ref): Adjust.
10104 (follow_die_sig_1): Adjust.
10105 (follow_die_sig): Adjust.
10106 (get_signatured_type): Adjust.
10107 (get_DW_AT_signature_type): Adjust.
10108 (decode_locdesc): Adjust.
10109 (dwarf_decode_macros): Adjust.
10110 (cu_debug_loc_section): Adjust.
10111 (fill_in_loclist_baton): Adjust.
10112 (dwarf2_symbol_mark_computed): Adjust.
10113 (init_one_comp_unit): Don't assign
10114 dwarf2_cu::dwarf2_per_objfile.
10115 (set_die_type): Adjust.
10117 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10119 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10120 <dwarf2_per_objfile>: New field.
10121 (dwarf2_per_objfile): Remove global.
10122 (get_dwarf2_per_objfile): New function.
10123 (set_dwarf2_per_objfile): New function.
10124 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10125 dwarf2_per_objfile.
10126 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10127 (read_abbrev_offset): Likewise.
10128 (read_indirect_string): Likewise.
10129 (read_indirect_line_string): Likewise.
10130 (read_indirect_string_at_offset): Likewise.
10131 (read_indirect_string_from_dwz): Likewise.
10132 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10133 dwarf2_per_objfile.
10134 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10135 (create_all_comp_units): Change objfile parameter to
10136 dwarf2_per_objfile.
10137 (create_all_type_units): Likewise.
10138 (process_queue): Add dwarf2_per_objfile parameter.
10139 (read_and_check_comp_unit_head): Likewise.
10140 (lookup_dwo_unit_in_dwp): Likewise.
10141 (get_dwp_file): Likewise.
10142 (process_cu_includes): Likewise.
10143 (struct free_dwo_file_cleanup_data): New struct.
10144 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10145 set_dwarf2_per_objfile.
10146 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10147 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10148 context, adjust calls.
10149 (dw2_instantiate_symtab): Likewise.
10150 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10151 (dw2_get_cu): Likewise.
10152 (create_cu_from_index_list): Change objfile parameter to
10153 dwarf2_per_objfile.
10154 (create_cus_from_index_list): Get dwarf2_per_objfile from
10155 context, adjust calls.
10156 (create_cus_from_index): Likewise.
10157 (create_signatured_type_table_from_index): Change objfile
10158 parameter to dwarf2_per_objfile.
10159 (create_signatured_type_table_from_debug_names): Change objfile
10160 parameter to dwarf2_per_objfile.
10161 (create_addrmap_from_index): Likewise.
10162 (create_addrmap_from_aranges): Likewise.
10163 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10164 (dw2_setup): Remove.
10165 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10167 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10168 get_dwarf2_per_objfile.
10169 (dw2_forget_cached_source_info): Likewise.
10170 (dw2_map_symtabs_matching_filename): Likewise.
10171 (struct dw2_symtab_iterator) <index>: Remove.
10172 <dwarf2_per_objfile>: New field.
10173 (dw2_symtab_iter_init): Replace index parameter with
10174 dwarf2_per_objfile.
10175 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10176 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10177 (dw2_print_stats): Likewise.
10178 (dw2_dump): Likewise.
10179 (dw2_expand_symtabs_for_function): Likewise.
10180 (dw2_expand_all_symtabs): Likewise.
10181 (dw2_expand_symtabs_with_fullname): Likewise.
10182 (dw2_expand_marked_cus): Replace index and objfile parameters
10183 with dwarf2_per_objfile.
10184 (dw_expand_symtabs_matching_file_matcher): Add
10185 dwarf2_per_objfile parameter and adjust calls.
10186 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10188 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10189 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10191 (create_cus_from_debug_names_list): Replace objfile parameter
10192 with dwarf2_per_objfile and adjust calls.
10193 (create_cus_from_debug_names): Likewise.
10194 (dwarf2_read_debug_names): Likewise.
10195 (mapped_debug_names::namei_to_name): Adjust call.
10196 (dw2_debug_names_iterator::next): Likewise.
10197 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10198 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10199 (dw2_debug_names_dump): Likewise.
10200 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10201 (dw2_debug_names_expand_symtabs_matching): Likewise.
10202 (dwarf2_initialize_objfile): Likewise.
10203 (dwarf2_build_psymtabs): Likewise.
10204 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10206 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10207 (read_and_check_comp_unit_head): Likewise.
10208 (read_abbrev_offset): Likewise.
10209 (create_debug_type_hash_table): Likewise.
10210 (create_debug_types_hash_table): Likewise.
10211 (create_all_type_units): Replace objfile parameter with
10212 dwarf2_per_objfile.
10213 (add_type_unit): Add dwarf2_per_objfile parameter.
10214 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10215 with dwarf2_per_objfile.
10216 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10217 (lookup_dwp_signatured_type): Likewise.
10218 (lookup_signatured_type): Likewise.
10219 (read_cutu_die_from_dwo): Likewise.
10220 (init_tu_and_read_dwo_dies): Likewise.
10221 (init_cutu_and_read_dies): Likewise.
10222 (init_cutu_and_read_dies_no_follow): Likewise.
10223 (allocate_type_unit_groups_table): Add objfile parameter.
10224 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10225 (get_type_unit_group): Likewise.
10226 (process_psymtab_comp_unit): Update call.
10227 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10228 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10229 (print_tu_stats): Likewise.
10230 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10231 in void* parameter.
10232 (build_type_psymtabs): Change objfile parameter to
10233 dwarf2_per_objfile.
10234 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10235 passed in void* parameter.
10236 (process_skeletonless_type_units): Change objfile parameter to
10237 dwarf2_per_objfile.
10238 (set_partial_user): Likewise.
10239 (dwarf2_build_psymtabs_hard): Likewise.
10240 (read_comp_units_from_section): Likewise.
10241 (create_all_comp_units): Likewise.
10242 (scan_partial_symbols): Update calls.
10243 (add_partial_symbol): Likewise.
10244 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10245 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10246 (process_queue): Add dwarf2_per_objfile parameter.
10247 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10248 (compute_compunit_symtab_includes): Likewise.
10249 (process_cu_includes): Add dwarf2_per_objfile parameter.
10250 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10251 (process_full_type_unit): Likewise.
10252 (process_imported_unit_die): Update call.
10253 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10254 (read_file_scope): Likewise.
10255 (allocate_dwo_file_hash_table): Add objfile parameter.
10256 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10257 (create_cus_hash_table): Likewise.
10258 (create_dwp_hash_table): Likewise.
10259 (create_dwo_unit_in_dwp_v1): Likewise.
10260 (create_dwp_v2_section): Likewise.
10261 (create_dwo_unit_in_dwp_v2): Likewise.
10262 (lookup_dwo_unit_in_dwp): Likewise.
10263 (try_open_dwop_file): Likewise.
10264 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10265 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10266 cleanup to include a reference to dwarf2_per_objfile.
10267 (open_dwp_file): Add dwarf2_per_objfile parameter.
10268 (open_and_init_dwp_file): Likewise.
10269 (get_dwp_file): Likewise.
10270 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10271 (queue_and_load_all_dwo_tus): Update call.
10272 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10274 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10275 (dwarf2_ranges_process): Likewise.
10276 (dwarf2_get_pc_bounds): Likewise.
10277 (mark_common_block_symbol_computed): Likewise.
10278 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10279 (dwarf2_read_abbrevs): Update call.
10280 (read_partial_die): Use dwarf2_per_objfile from cu.
10281 (find_partial_die): Likewise.
10282 (fixup_partial_die): Likewise.
10283 (read_attribute_value): Likewise.
10284 (read_indirect_string_at_offset_from): Add objfile parameter.
10285 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10287 (read_indirect_string_from_dwz): Add objfile parameter.
10288 (read_indirect_string): Add objfile parameter.
10289 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10290 (read_addr_index): Use dwarf2_per_objfile from cu.
10291 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10293 (read_str_index): Use dwarf2_per_objfile from cu.
10294 (get_debug_line_section): Likewise.
10295 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10296 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10297 (new_symbol_full): Use dwarf2_per_objfile from cu.
10298 (build_error_marker_type): Likewise.
10299 (lookup_die_type): Likewise.
10300 (determine_prefix): Likewise.
10301 (follow_die_offset): Likewise.
10302 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10303 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10304 (dwarf2_fetch_die_type_sect_off): Likewise.
10305 (dwarf2_get_die_type): Likewise.
10306 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10307 (get_signatured_type): Likewise.
10308 (get_DW_AT_signature_type): Likewise.
10309 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10310 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10311 (cu_debug_loc_section): Likewise.
10312 (fill_in_loclist_baton): Likewise.
10313 (dwarf2_symbol_mark_computed): Likewise.
10314 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10315 dwarf2_per_objfile.
10316 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10318 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10319 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10320 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10321 (set_die_type): Use dwarf2_free_objfile from cu.
10322 (get_die_type_at_offset): Likewise.
10323 (dwarf2_per_objfile_free): Don't assign global variable.
10324 (debug_names) <constructor>: Add dwarf2_per_objfile
10325 parameter, update m_debugstrlookup construction.
10326 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10328 <m_dwarf2_per_objfile>: New field.
10329 <lookup>: Use m_dwarf2_per_objfile.
10330 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10331 (psyms_seen_size): Likewise.
10332 (write_gdbindex): Replace objfile parameter with
10333 dwarf2_per_objfile.
10334 (write_debug_names): Likewise.
10335 (write_psymtabs_to_index): Likewise.
10336 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10339 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10341 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10342 <dwarf2_per_objfile>: New field.
10343 (struct dwarf2_per_cu_data) <objfile>: Remove.
10344 <dwarf2_per_objfile>: New field.
10345 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10347 (create_signatured_type_table_from_index): Likewise.
10348 (create_debug_type_hash_table): Likewise.
10349 (fill_in_sig_entry_from_dwo_entry): Likewise.
10350 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10351 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10353 (create_partial_symtab): Access objfile through
10354 dwarf2_per_objfile.
10355 (process_psymtab_comp_unit_reader): Likewise.
10356 (read_comp_units_from_section): Likewise.
10357 (scan_partial_symbols): Likewise.
10358 (add_partial_symbol): Likewise.
10359 (add_partial_subprogram): Likewise.
10360 (peek_die_abbrev): Likewise.
10361 (fixup_go_packaging): Likewise.
10362 (process_full_comp_unit): Likewise.
10363 (process_full_type_unit): Likewise.
10364 (process_imported_unit_die): Likewise.
10365 (dwarf2_compute_name): Likewise.
10366 (dwarf2_physname): Likewise.
10367 (read_import_statement): Likewise.
10368 (create_cus_hash_table): Assign dwarf2_physname instead of
10370 (read_func_scope): Access objfile through dwarf2_per_objfile.
10371 (read_lexical_block_scope): Likewise.
10372 (read_call_site_scope): Likewise.
10373 (read_variable): Likewise.
10374 (dwarf2_rnglists_process): Likewise.
10375 (dwarf2_ranges_process): Likewise.
10376 (dwarf2_ranges_read): Likewise.
10377 (dwarf2_record_block_ranges): Likewise.
10378 (dwarf2_add_field): Likewise.
10379 (dwarf2_add_member_fn): Likewise.
10380 (read_structure_type): Likewise.
10381 (process_structure_scope): Likewise.
10382 (read_enumeration_type): Likewise.
10383 (read_array_type): Likewise.
10384 (read_common_block): Likewise.
10385 (read_namespace_type): Likewise.
10386 (read_namespace): Likewise.
10387 (read_module_type): Likewise.
10388 (read_tag_pointer_type): Likewise.
10389 (read_tag_ptr_to_member_type): Likewise.
10390 (read_tag_string_type): Likewise.
10391 (read_subroutine_type): Likewise.
10392 (read_typedef): Likewise.
10393 (read_base_type): Likewise.
10394 (attr_to_dynamic_prop): Likewise.
10395 (read_subrange_type): Likewise.
10396 (read_unspecified_type): Likewise.
10397 (load_partial_dies): Likewise.
10398 (read_partial_die): Likewise.
10399 (find_partial_die): Likewise.
10400 (guess_partial_die_structure_name): Likewise.
10401 (fixup_partial_die): Likewise.
10402 (read_attribute_value): Likewise.
10403 (read_addr_index_from_leb128): Likewise.
10404 (dwarf2_read_addr_index): Likewise.
10405 (dwarf2_string_attr): Likewise.
10406 (lnp_state_machine::check_line_address): Likewise.
10407 (dwarf_decode_lines_1): Likewise.
10408 (dwarf_decode_lines): Likewise.
10409 (dwarf2_start_symtab): Likewise.
10410 (var_decode_location): Likewise.
10411 (new_symbol_full): Likewise.
10412 (dwarf2_const_value_data): Likewise.
10413 (dwarf2_const_value_attr): Likewise.
10414 (dwarf2_const_value): Likewise.
10415 (die_type): Likewise.
10416 (die_containing_type): Likewise.
10417 (lookup_die_type): Likewise.
10418 (guess_full_die_structure_name): Likewise.
10419 (anonymous_struct_prefix): Likewise.
10420 (dwarf2_name): Likewise.
10421 (follow_die_ref_or_sig): Likewise.
10422 (follow_die_offset): Likewise.
10423 (follow_die_ref): Likewise.
10424 (dwarf2_fetch_die_loc_sect_off): Likewise.
10425 (dwarf2_fetch_constant_bytes): Likewise.
10426 (dwarf2_fetch_die_type_sect_off): Likewise.
10427 (dwarf2_get_die_type): Likewise.
10428 (follow_die_sig): Likewise.
10429 (decode_locdesc): Likewise.
10430 (dwarf2_per_cu_objfile): Likewise.
10431 (dwarf2_per_cu_text_offset): Likewise.
10432 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10434 (set_die_type): Access objfile through
10435 dwarf2_per_objfile.
10437 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10439 * valprint.c (converted_character_d): Remove typedef.
10440 (DEF_VEC_O (converted_character_d)): Remove.
10441 (count_next_character): Use std::vector.
10442 (print_converted_chars_to_obstack): Likewise.
10443 (generic_printstr): Likewise.
10445 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10447 * xml-support.h (struct gdb_xml_value): Add constructor.
10448 <value>: Change type to unique_xmalloc_ptr.
10449 (gdb_xml_value_s): Remove typedef.
10450 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10451 (gdb_xml_element_start_handler): Change parameter type to
10453 (xml_find_attribute): Likewise.
10454 * xml-support.c (xml_find_attribute): Change parameter type to
10455 std::vector and adjust.
10456 (gdb_xml_values_cleanup): Remove.
10457 (gdb_xml_parser::start_element): Adjust to std::vector.
10458 (xinclude_start_include): Change paraeter type to std::vector
10460 * btrace.c (check_xml_btrace_version): Likewise.
10461 (parse_xml_btrace_block): Likewise.
10462 (parse_xml_btrace_pt_config_cpu): Likewise.
10463 (parse_xml_btrace_pt): Likewise.
10464 (parse_xml_btrace_conf_bts): Likewise.
10465 (parse_xml_btrace_conf_pt): Likewise.
10466 * memory-map.c (memory_map_start_memory): Likewise.
10467 (memory_map_start_property): Likewise.
10468 * osdata.c (osdata_start_osdata): Likewise.
10469 (osdata_start_item): Likewise.
10470 (osdata_start_column): Likewise.
10471 * remote.c (start_thread): Likewise.
10472 * solib-aix.c (library_list_start_library): Likewise.
10473 (library_list_start_list): Likewise.
10474 * solib-svr4.c (library_list_start_library): Likewise.
10475 (svr4_library_list_start_list): Likewise.
10476 * solib-target.c (library_list_start_segment): Likewise.
10477 (library_list_start_section): Likewise.
10478 (library_list_start_library): Likewise.
10479 (library_list_start_list): Likewise.
10480 * tracepoint.c (traceframe_info_start_memory): Likewise.
10481 (traceframe_info_start_tvar): Likewise.
10482 * xml-syscall.c (syscall_start_syscall): Likewise.
10483 * xml-tdesc.c (tdesc_start_target): Likewise.
10484 (tdesc_start_feature): Likewise.
10485 (tdesc_start_reg): Likewise.
10486 (tdesc_start_union): Likewise.
10487 (tdesc_start_struct): Likewise.
10488 (tdesc_start_flags): Likewise.
10489 (tdesc_start_enum): Likewise.
10490 (tdesc_start_field): Likewise.
10491 (tdesc_start_enum_value): Likewise.
10492 (tdesc_start_vector): Likewise.
10494 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10496 * extension.h (struct xmethod_worker) <clone>: Remove.
10497 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10499 (python_xmethod_worker::clone): Remove.
10500 * valops.c (find_overload_match): Use std::move instead of
10503 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10505 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10506 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10507 <free_xmethod_worker_data>: Remove.
10508 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10509 <get_xmethod_arg_types>: Remove.
10510 <get_xmethod_result_type>: Remove.
10511 <invoke_xmethod>: Remove.
10512 * extension.c (new_xmethod_worker): Remove.
10513 (clone_xmethod_worker): Remove.
10514 (get_matching_xmethod_workers): Return void, pass std::vector by
10516 (get_xmethod_arg_types): Rename to...
10517 (xmethod_worker::get_arg_types): ... this, and adjust.
10518 (get_xmethod_result_type): Rename to...
10519 (xmethod_worker::get_result_type): ... this, and adjust.
10520 (invoke_xmethod): Remove.
10521 (free_xmethod_worker): Remove.
10522 (free_xmethod_worker_vec): Remove.
10523 * extension.h (enum ext_lang_rc): Move here from
10525 (struct xmethod_worker): Add constructor and destructor.
10528 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10529 virtual pure methods.
10530 <get_arg_types, get_result_type>: New methods.
10531 (xmethod_worker_ptr): Remove typedef.
10532 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10533 (xmethod_worker_vec): Remove typedef.
10534 (xmethod_worker_up): New typedef.
10535 (invoke_xmethod): Remove.
10536 (clone_xmethod_worker): Remove.
10537 (free_xmethod_worker): Remove.
10538 (free_xmethod_worker_vec): Remove.
10539 (get_xmethod_arg_types): Remove.
10540 (get_xmethod_result_type): Remove.
10541 * valops.c (find_method_list): Use std::vector, don't use
10542 intermediate vector.
10543 (value_find_oload_method_list): Use std::vector.
10544 (find_overload_match): Use std::vector.
10545 (find_oload_champ): Use std::vector.
10546 * value.c (value_free): Use operator delete.
10547 (value_of_xmethod): Rename to...
10548 (value_from_xmethod): ... this. Don't assign
10549 xmethod_worker::value, take rvalue-reference.
10550 (result_type_of_xmethod): Adjust.
10551 (call_xmethod): Adjust.
10552 * value.h: Include extension.h.
10553 (struct xmethod_worker): Don't forward-declare.
10554 (value_of_xmethod): Rename to...
10555 (value_from_xmethod): ... this, take rvalue-reference.
10556 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10557 (struct python_xmethod_worker): ... this, add constructor and
10559 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10560 (gdbpy_free_xmethod_worker_data): Rename to...
10561 (python_xmethod_worker::~python_xmethod_worker): ... this and
10563 (gdbpy_clone_xmethod_worker_data): Rename to...
10564 (python_xmethod_worker::clone): ... this and adjust.
10565 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10567 (gdbpy_get_xmethod_arg_types): Rename to...
10568 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10569 (gdbpy_get_xmethod_result_type): Rename to...
10570 (python_xmethod_worker::do_get_result_type): ... this and
10572 (gdbpy_invoke_xmethod): Rename to...
10573 (python_xmethod_worker::invoke): ... this and adjust.
10574 (new_python_xmethod_worker): Rename to...
10575 (python_xmethod_worker::python_xmethod_worker): ... this and
10577 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10579 (gdbpy_free_xmethod_worker_data): Remove.
10580 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10581 (gdbpy_get_xmethod_arg_types): Remove.
10582 (gdbpy_get_xmethod_result_type): Remove.
10583 (gdbpy_invoke_xmethod): Remove.
10584 * python/python.c (python_extension_ops): Remove obsolete
10587 2018-01-05 Pedro Alves <palves@redhat.com>
10590 * common/signals-state-save-restore.c
10591 (save_original_signals_state): New parameter 'quiet'. Warn if we
10592 find a custom handler preinstalled, instead of internal erroring.
10593 But only warn if !quiet.
10594 * common/signals-state-save-restore.h
10595 (save_original_signals_state): New parameter 'quiet'.
10596 * main.c (captured_main_1): Move save_original_signals_state call
10597 after option handling, and pass QUIET.
10599 2018-01-05 Pedro Alves <palves@redhat.com>
10601 * spu-tdep.c (spu_catch_start): Pass
10602 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10604 2018-01-05 Pedro Alves <palves@redhat.com>
10607 * ada-lang.c (literal_symbol_name_matcher): New function.
10608 (ada_get_symbol_name_matcher): Use it for
10609 symbol_name_match_type::SEARCH_NAME.
10610 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10611 it down instead of assuming symbol_name_match_type::FULL.
10612 * block.h (block_lookup_symbol): New parameter 'match_type'.
10613 * c-valprint.c (print_unpacked_pointer): Use
10614 lookup_symbol_search_name instead of lookup_symbol.
10615 * compile/compile-object-load.c (get_out_value_type): Pass down
10616 symbol_name_match_type::SEARCH_NAME.
10617 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10618 symbol_name_match_type::FULL.
10619 * cp-support.c (cp_get_symbol_name_matcher): Handle
10620 symbol_name_match_type::SEARCH_NAME.
10621 * infrun.c (insert_exception_resume_breakpoint): Use
10622 lookup_symbol_search_name.
10623 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10624 * psymtab.c (maintenance_check_psymtabs): Use
10625 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10626 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10627 SYMBOL_SEARCH_NAME.
10628 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10629 if symbol_name_match_type::SEARCH_NAME.
10630 (lookup_symbol_in_language): Pass down
10631 symbol_name_match_type::FULL.
10632 (lookup_symbol_search_name): New.
10633 (lookup_language_this): Pass down
10634 symbol_name_match_type::SEARCH_NAME.
10635 (lookup_symbol_aux, lookup_local_symbol): New parameter
10636 'match_type'. Pass it down.
10637 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10638 (lookup_symbol_search_name): New declaration.
10639 (lookup_symbol_in_block): New 'match_type' parameter.
10641 2018-01-05 Pedro Alves <palves@redhat.com>
10644 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10646 (ada_lookup_symbol): Reimplement in terms of
10647 ada_lookup_symbol_list, bits factored out from
10648 ada_lookup_encoded_symbol.
10650 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10652 * ada-exp.y (write_object_renaming): When subscripting an array
10653 using a symbol as the index, pass the block in call to
10654 ada_lookup_encoded_symbol when looking that symbol up.
10656 2018-01-05 Jerome Guitton <guitton@adacore.com>
10658 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10661 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10663 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10664 the case where VALUE_LVAL (val0) is not lval_memory.
10666 2018-01-05 Xavier Roirand <roirand@adacore.com>
10668 * ada-valprint.c (print_optional_low_bound): Handle
10669 character-indexed array printing like boolean-indexed array
10672 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10674 * NEWS: Create a new section for the next release branch.
10675 Rename the section of the current branch, now that it has
10678 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10680 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10681 * version.in: Bump version to 8.1.50.DATE-git.
10683 2018-01-03 Xavier Roirand <roirand@adacore.com>
10685 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10687 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10689 (default_exception_support_info) <catch_handlers_sym>: Add field.
10690 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10691 (ada_exception_name_addr_1): Add "catch handlers" handling.
10692 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10693 Update all callers.
10694 (create_excep_cond_exprs) <ex>: Add parameter.
10695 (re_set_exception): Update create_excep_cond_exprs call.
10696 (print_it_exception, print_one_exception, print_mention_exception)
10697 (print_recreate_exception): Add "catch handler" handling.
10698 (allocate_location_catch_handlers, re_set_catch_handlers)
10699 (check_status_catch_handlers, print_it_catch_handlers)
10700 (print_one_catch_handlers, print_mention_catch_handlers)
10701 (print_recreate_catch_handlers): New function.
10702 (catch_handlers_breakpoint_ops): New variable.
10703 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10704 Add parameter. Add "catch handler" handling.
10705 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10706 Add "catch handler" handling.
10707 (ada_exception_catchpoint_cond_string): Add "catch handler"
10709 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10711 (catch_ada_handlers_command): New function.
10712 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10713 operations structure.
10714 (_initialize_ada_language): Add "catch handlers" command entry.
10715 * NEWS: Document "catch handlers" feature.
10717 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10719 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10720 account when creating the array type of the slice.
10721 (ada_value_slice): Likewise.
10723 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10725 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10727 (create_array_type_with_stride): Add byte_stride_prop parameter.
10728 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10729 New parameter. Update all callers in this file.
10730 (array_type_has_dynamic_stride): New function.
10731 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10732 of arrays with dynamic byte strides.
10733 * dwarf2read.c (read_array_type): Add support for dynamic
10734 DW_AT_byte_stride attributes.
10736 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10738 * dwarf2read.c (read_unspecified_type): Treat
10739 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10741 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10743 Update copyright year range in all GDB files.
10745 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10747 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10748 and gdb/testsuite/gdb.base/step-line.c.
10750 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10752 * copyright.py (main): Dump the contents of
10753 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10754 even if BY_HAND is empty.
10756 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10758 * top.c (print_gdb_version): Update Copyright year in version
10761 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10763 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10765 For older changes see ChangeLog-2017.
10771 version-control: never