1 2018-07-20 Tom Tromey <tom@tromey.com>
3 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4 * buildsym.h (record_line_ftype): Remove typedef.
6 2018-07-20 Tom Tromey <tom@tromey.com>
8 * buildsym-legacy.h (augment_type_symtab): Don't declare.
9 (end_expandable_symtab): Likewise.
10 (end_symtab_get_static_block): Likewise.
11 (end_symtab_from_static_block): Likewise.
12 * buildsym-legacy.c (augment_type_symtab): Remove.
13 (end_expandable_symtab): Remove.
14 (end_symtab_get_static_block): Remove.
15 (end_symtab_from_static_block): Remove.
17 2018-07-20 Tom Tromey <tom@tromey.com>
19 * dwarf2read.c: Include buildsym.h.
20 (struct dwarf2_cu) <builder>: New method.
21 (fixup_go_packaging): Update.
22 (process_full_comp_unit, process_full_type_unit): Update. Don't
23 use scoped_free_pendings.
24 (using_directives): Add "cu" parameter, remove "language".
25 (read_import_statement, setup_type_unit_groups, )
26 (read_func_scope, read_lexical_block_scope)
27 (dwarf2_record_block_ranges, read_namespace): Update.
28 (lnp_state_machine::lnp_state_machine): Add cu parameter.
29 (lnp_state_machine::handle_end_sequence): Update.
30 (class lnp_state_machine) <m_cu>: New member.
31 <m_record_line_callback>: Remove.
32 <m_currently_recording_lines>: New member.
33 (lnp_state_machine::handle_set_file): Update.
34 (noop_record_line): Remove.
35 (dwarf_record_line_p): Add cu parameter.
36 (dwarf_record_line_1, dwarf_finish_line): Likewise.
37 (lnp_state_machine::record_line)
38 (lnp_state_machine::lnp_state_machine)
39 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
40 (dwarf_decode_lines): Update.
41 (dwarf2_start_subfile): Add cu parameter.
42 (dwarf2_start_symtab, new_symbol): Update.
43 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
44 Remove dwarf2_per_objfile parameter.
45 (dwarf_decode_macros): Update.
47 2018-07-20 Tom Tromey <tom@tromey.com>
49 * stabsread.c (define_symbol): Update.
50 * buildsym-legacy.h (get_buildsym_compunit): Declare.
51 * dwarf2read.c (new_symbol): Update.
52 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
53 * cp-namespace.c: Include buildsym.h.
54 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
55 * buildsym-legacy.c (get_buildsym_compunit): New function.
57 2018-07-20 Tom Tromey <tom@tromey.com>
59 * xcoffread.c: Include buildsym-legacy.h.
60 * windows-nat.c: Include buildsym-legacy.h.
61 * stabsread.c: Include buildsym-legacy.h.
62 * mdebugread.c: Include buildsym-legacy.h.
63 * buildsym-legacy.h: New file.
64 * buildsym-legacy.c: New file, from buildsym.c.
65 * go32-nat.c: Include buildsym-legacy.h.
66 * dwarf2read.c: Include buildsym-legacy.h.
67 * dbxread.c: Include buildsym-legacy.h.
68 * cp-namespace.c: Include buildsym-legacy.h.
69 * coffread.c: Include buildsym-legacy.h.
70 * buildsym.h: Move some contents to buildsym-legacy.h.
71 * buildsym.c: Include buildsym-legacy.h. Move many functions to
73 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
75 2018-07-20 Tom Tromey <tom@tromey.com>
77 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
78 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
79 (buildsym_compunit::buildsym_compunit)
80 (buildsym_compunit::~buildsym_compunit)
81 (buildsym_compunit::get_macro_table): Define.
83 2018-07-20 Tom Tromey <tom@tromey.com>
85 * buildsym.c (reset_symtab_globals): Remove.
86 (buildsym_compunit::end_symtab_from_static_block): Update.
87 (buildsym_compunit::augment_type_symtab): Update.
88 (end_symtab_from_static_block): Call free_buildsym_compunit.
89 (augment_type_symtab, end_symtab, end_expandable_symtab):
92 2018-07-20 Tom Tromey <tom@tromey.com>
94 * arch-utils.c: Do not include buildsym.h.
95 * mipsread.c: Do not include buildsym.h.
96 * machoread.c: Do not include buildsym.h.
97 * elfread.c: Do not include buildsym.h.
99 2018-07-20 Tom Tromey <tom@tromey.com>
101 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
103 (buildsym_compunit): Add new constructor.
104 (struct buildsym_compunit) <get_last_source_file, finish_block,
105 record_block_range, start_subfile, patch_subfile_names,
106 push_subfile, pop_subfile, record_line, get_compunit_symtab,
107 set_last_source_start_addr, get_last_source_start_addr,
108 get_local_using_directives, set_local_using_directives,
109 get_global_using_directives, outermost_context_p,
110 get_current_context_stack, get_context_stack_depth,
111 get_current_subfile, get_local_symbols, get_file_symbols,
112 get_global_symbols, record_debugformat, record_producer,
113 push_context, pop_context, end_symtab_get_static_block,
114 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
116 <record_pending_block, finish_block_internal, make_blockvector,
117 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
121 2018-05-22 Tom Tromey <tom@tromey.com>
123 * buildsym.c (record_pending_block): Move earlier. Remove objfile
125 (finish_block_internal): Update.
127 2018-07-20 Tom Tromey <tom@tromey.com>
129 * buildsym.c (record_pending_block): Move earlier. Remove objfile
131 (finish_block_internal): Update.
133 2018-07-20 Tom Tromey <tom@tromey.com>
135 * buildsym.h (EXTERN): Don't define or undef.
136 * buildsym.c (EXTERN): Don't define.
138 2018-07-20 Tom Tromey <tom@tromey.com>
140 * buildsym.c: Remove TODO comment.
142 2018-07-20 Tom Tromey <tom@tromey.com>
144 * coffread.c (coff_symtab_read): Update.
145 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
146 (xcoff_new_init): Update.
147 * mipsread.c (mipscoff_new_init): Update.
148 * mdebugread.c (mdebug_build_psymtabs): Update.
149 * elfread.c (elf_new_init): Update.
150 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
152 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
153 (coffstab_build_psymtabs, elfstab_build_psymtabs)
154 (stabsect_build_psymtabs): Update.
155 * buildsym.h (buildsym_init): Don't declare.
156 * buildsym.c: Update comment.
157 (prepare_for_building): Remove.
158 (start_symtab, restart_symtab): Update.
159 (reset_symtab_globals): Update comment.
160 (buildsym_init): Remove.
162 2018-07-20 Tom Tromey <tom@tromey.com>
164 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
165 * stabsread.c (patch_block_stabs, define_symbol, read_type)
166 (read_enum_type, common_block_start, common_block_end)
167 (cleanup_undefined_types_1, finish_global_stabs): Update.
168 * mdebugread.c (psymtab_to_symtab_1): Update.
169 * dwarf2read.c (fixup_go_packaging, read_func_scope)
170 (read_lexical_block_scope, new_symbol): Update.
171 * dbxread.c (process_one_symbol): Update.
172 * coffread.c (coff_symtab_read, process_coff_symbol)
173 (coff_read_enum_type): Update.
174 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
176 (get_local_symbols, get_file_symbols, get_global_symbols): New
178 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
180 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
181 (~scoped_free_pendings): Update.
182 (finish_block, prepare_for_building, reset_symtab_globals)
183 (end_symtab_get_static_block, end_symtab_with_blockvector)
184 (augment_type_symtab, push_context): Update.
185 (get_local_symbols, get_file_symbols, get_global_symbols): New
187 (buildsym_init): Update.
189 2018-07-20 Tom Tromey <tom@tromey.com>
191 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
192 (process_full_type_unit): Likewise.
193 (dwarf2_start_symtab): Set list_in_scope.
195 2018-07-20 Tom Tromey <tom@tromey.com>
197 * dwarf2read.c (process_psymtab_comp_unit_reader)
198 (build_type_psymtabs_reader): Do not set list_in_scope.
200 2018-07-20 Tom Tromey <tom@tromey.com>
202 * buildsym.c (free_pendings): Remove.
203 (add_symbol_to_list, scoped_free_pendings)
204 (finish_block_internal, buildsym_init): Update.
206 2018-07-20 Tom Tromey <tom@tromey.com>
208 * xcoffread.c (read_xcoff_symtab): Update.
209 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
211 * dbxread.c (process_one_symbol): Update.
212 * coffread.c (coff_symtab_read): Update.
213 * buildsym.h (finish_block): Update.
214 * buildsym.c (finish_block): Remove "listhead" argument.
215 (end_symtab_get_static_block): Update.
217 2018-07-20 Tom Tromey <tom@tromey.com>
219 * buildsym.h (class scoped_free_pendings): Remove constructor.
220 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
222 <m_pending_block_obstack, m_pending_blocks>: New members.
223 (pending_block_obstack, pending_blocks): Remove.
224 (scoped_free_pendings::scoped_free_pendings): Default.
225 (~scoped_free_pendings): Update.
226 (free_pending_blocks): Remove.
227 (finish_block_internal, record_pending_block, make_blockvector)
228 (end_symtab_get_static_block, augment_type_symtab, push_context)
229 (buildsym_init): Update.
231 2018-07-20 Tom Tromey <tom@tromey.com>
233 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
234 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
236 (pending_addrmap, pending_addrmap_obstack)
237 (pending_addrmap_interesting): Remove.
238 (scoped_free_pendings, record_block_range, make_blockvector)
239 (prepare_for_building, reset_symtab_globals, buildsym_init):
242 2018-07-20 Tom Tromey <tom@tromey.com>
244 * xcoffread.c (process_linenos): Update.
245 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
246 * mdebugread.c (psymtab_to_symtab_1): Update.
247 * dwarf2read.c (setup_type_unit_groups)
248 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
249 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
250 * dbxread.c (process_one_symbol): Update.
251 * coffread.c (coff_symtab_read, enter_linenos)
252 (process_coff_symbol): Update.
253 * buildsym.h (current_subfile): Don't declare.
254 (get_current_subfile): Declare.
255 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
257 (start_subfile, free_buildsym_compunit, push_subfile)
258 (prepare_for_building, start_symtab): Update.
259 (get_current_subfile): New function.
261 2018-07-20 Tom Tromey <tom@tromey.com>
263 * coffread.c (coff_symtab_read): Update.
264 * xcoffread.c (read_xcoff_symtab): Update.
265 * dwarf2read.c (new_symbol): Update.
266 (read_func_scope, read_lexical_block_scope): Update.
267 * dbxread.c (process_one_symbol): Update.
268 * buildsym.h (context_stack, context_stack_depth): Don't declare.
269 (outermost_context_p): Remove macro.
270 (outermost_context_p, get_current_context_stack)
271 (get_context_stack_depth): Declare.
272 (pop_context): Return struct context_stack.
273 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
275 (context_stack_size): Remove.
276 (INITIAL_CONTEXT_STACK_SIZE): Remove.
277 (prepare_for_building, end_symtab_get_static_block)
278 (augment_type_symtab, push_context): Update.
279 (pop_context): Return struct context_stack.
280 (outermost_context_p, get_current_context_stack)
281 (get_context_stack_depth): New functions.
282 (buildsym_init): Update.
284 2018-07-20 Tom Tromey <tom@tromey.com>
286 * rust-exp.y: Now a pure parser. Update all rules.
287 (%union): Move earlier.
288 (current_parser, work_obstack): Remove globals.
289 (rust_parser, ~rust_parser): Update.
290 (class rust_parser) <copy_name, concat3, crate_name, super_name,
291 lex_character, lex_number, lex_string, lex_identifier,
292 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
293 convert_name, convert_params_to_expression,
294 convert_ast_to_expression, ast_basic_type, ast_operation,
295 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
296 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
297 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
298 ast_array_type, ast_slice_type, ast_reference_type,
299 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
300 (rust_parse): Update.
301 (rustyyerror, rustyylex): Add parser parameter.
302 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
303 (rust_lex_stringish_test, rust_lex_test_sequence)
304 (rust_lex_test_trailing_dot, rust_lex_test_completion)
305 (rust_lex_test_push_back, rust_lex_tests): Update.
307 2018-07-19 Pedro Alves <palves@redhat.com>
309 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
310 gdb::unique_xmalloc_ptr.
311 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
312 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
313 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
315 * guile/scm-pretty-print.c (ppscm_print_children): Use
316 gdb::unique_xmalloc_ptr instead of cleanups.
317 (gdbscm_apply_val_pretty_printer): Remove cleanups.
318 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
319 gdb::unique_xmalloc_ptr.
320 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
321 Adjust to use gdb::unique_xmalloc_ptr.
322 * guile/scm-utils.c (extract_arg): Adjust.
323 * guile/scm-value.c (gdbscm_value_field): Adjust to use
324 gdb::unique_xmalloc_ptr instead of a cleanup.
326 2018-07-19 Tom Tromey <tom@tromey.com>
328 * utils.c (do_value_free_to_mark)
329 (make_cleanup_value_free_to_mark): Remove.
330 * utils.h (make_cleanup_value_free_to_mark): Remove.
332 2018-07-19 Pedro Alves <palves@redhat.com>
334 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
335 forwarding reference.
337 2018-07-18 Pedro Alves <palves@redhat.com>
339 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
340 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
343 2018-07-18 Pedro Alves <palves@redhat.com>
345 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
347 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
349 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
350 directly instead of a cleanup.
351 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
352 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
353 (vlscm_binop_gdbthrow): New, factored out from ...
354 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
355 (vlscm_rich_compare): Use gdbscm_wrap.
356 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
357 instead of a cleanup.
358 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
360 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
361 Use xfree directly instead of a cleanup.
362 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
363 Adjust to use gdbscm_wrap and scoped_value_mark.
364 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
365 (gdbscm_value_address, gdbscm_value_dereference)
366 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
368 (gdbscm_value_dynamic_type): Use scoped_value_mark.
369 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
371 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
372 gdbscm_wrap and scoped_value_mark.
373 (gdbscm_value_to_string): Use xfree directly instead of a
374 cleanup. Move 'buffer' unique_ptr to TRY scope.
375 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
376 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
378 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
379 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
381 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
384 2018-07-18 Tom de Vries <tdevries@suse.de>
386 * findvar.c (default_read_var_value): Also resolve dynamic type for
387 LOC_OPTIMIZED_OUT vars.
389 2018-07-18 Maciej W. Rozycki <macro@mips.com>
391 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
394 2018-07-17 Tom Tromey <tom@tromey.com>
396 * guile/scm-param.c (pascm_set_func, pascm_show_func)
397 (compute_enum_list, pascm_set_param_value_x)
398 (gdbscm_parameter_value): Update.
399 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
400 (gdbscm_scm_to_host_string): Update.
401 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
403 * guile/scm-cmd.c (cmdscm_add_completion): Update.
404 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
405 * guile/scm-string.c (gdbscm_scm_to_string): Return
407 (gdbscm_scm_to_host_string): Likewise.
409 2018-07-17 Tom Tromey <tom@tromey.com>
411 * guile/guile.c (gdbscm_eval_from_control_command): Update.
412 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
413 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
414 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
417 2018-07-17 Tom Tromey <tom@tromey.com>
419 * guile/scm-param.c (pascm_signal_setshow_error): Update.
420 * guile/guile-internal.h (gdbscm_exception_message_to_string):
422 * guile/scm-cmd.c (cmdscm_function): Update.
423 * guile/scm-pretty-print.c
424 (ppscm_print_exception_unless_memory_error): Update.
425 * guile/scm-exception.c (gdbscm_exception_message_to_string):
426 Return unique_xmalloc_ptr.
428 2018-07-17 Tom Tromey <tom@tromey.com>
430 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
433 2018-07-17 Jim Wilson <jimw@sifive.com>
435 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
436 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
437 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
438 unecessary braces after EF_RISCV_RVC test. Delete call to
439 set_gdbarch_decr_pc_after_break.
441 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
442 RISCV_LAST_FP_REGNUM + 1.
443 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
445 2018-07-17 Tom Tromey <tom@tromey.com>
447 * configure.ac: Remove --disable-gdbcli.
448 * configure: Rebuild.
449 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
450 (SUBDIR_CLI_CFLAGS): Remove.
451 (SFILES): Use SUBDIR_CLI_SRCS.
452 (COMMON_OBS): Use SUBDIR_CLI_OBS.
454 2018-07-17 Tom Tromey <tom@tromey.com>
457 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
459 2018-07-16 Jim Wilson <jimw@sifive.com>
461 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
463 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
465 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
467 (libunwind_frame_sniffer): Likewise.
468 (libunwind_frame_prev_register): Likewise.
469 (libunwind_sigtramp_frame_sniffer): Likewise.
470 * ia64-tdep.c (ia64_access_reg): Likewise.
471 (ia64_access_rse_reg): Likewise.
472 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
473 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
475 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
477 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
479 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
481 * remote-sim.c (gdbsim_target::close,
482 gdbsim_target::mourn_inferior): Remove unused variables.
484 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
486 * ia64-tdep.c (ktab_buf): New global.
487 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
488 (get_kernel_table): Adjust.
490 2018-07-16 Tom Tromey <tom@tromey.com>
492 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
493 * dwarf2read.c (using_directives, new_symbol): Use
495 * dbxread.c (process_one_symbol): Use outermost_context_p.
496 * coffread.c (coff_symtab_read): Use outermost_context_p.
498 2018-07-16 Tom Tromey <tom@tromey.com>
500 * dwarf2read.c (using_directives, read_func_scope)
501 (read_lexical_block_scope): Update.
502 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
503 * buildsym.h (local_using_directives, global_using_directives):
505 (get_local_using_directives, set_local_using_directives)
506 (get_global_using_directives): Declare.
507 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
508 m_global_using_directives>: New members.
509 (finish_block_internal, prepare_for_building)
510 (reset_symtab_globals, end_symtab_get_static_block)
511 (push_context): Update.
512 (get_local_using_directives, set_local_using_directives)
513 (get_global_using_directives): New functions.
514 (buildsym_init): Update.
516 2018-07-16 Tom Tromey <tom@tromey.com>
518 * xcoffread.c (xcoff_initial_scan): Don't call
520 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
521 * buildsym.h (class scoped_free_pendings): Add constructor.
522 (free_pending_blocks): Don't declare.
523 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
524 (free_pending_blocks): Now static.
526 2018-07-16 Tom Tromey <tom@tromey.com>
528 * buildsym.h (push_subfile, pop_subfile): Update declarations.
529 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
531 (struct subfile_stack): Remove.
532 (subfile_stack): Remove.
533 (push_subfile, pop_subfile, buildsym_init): Update.
535 2018-07-16 Tom Tromey <tom@tromey.com>
537 * buildsym.c (push_subfile): Use gdb_assert.
538 (pop_subfile): Use gdb_assert.
540 2018-07-16 Tom Tromey <tom@tromey.com>
542 * buildsym.h (merge_symbol_lists): Remove.
543 * buildsym.c (merge_symbol_lists): Remove.
545 2018-07-16 Tom Tromey <tom@tromey.com>
547 * stabsread.c (scan_file_globals): Update comment.
548 * stabsread.h (scan_file_globals): Move from buildsym.h.
549 * buildsym.h (scan_file_globals): Move to stabsread.h.
551 2018-07-16 Tom Tromey <tom@tromey.com>
553 * xcoffread.c (xcoff_new_init): Update.
554 * mipsread.c (mipscoff_new_init): Update.
555 * mdebugread.c (mdebug_build_psymtabs): Update.
556 * elfread.c (elf_new_init): Update.
557 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
558 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
559 * buildsym.h (buildsym_new_init): Don't declare.
560 * buildsym.c (buildsym_new_init): Remove.
562 2018-07-16 Tom Tromey <tom@tromey.com>
564 * stabsread.h (within_function): Move from buildsym.h.
565 * stabsread.c (start_stabs): Clear within_function.
566 * coffread.c (coff_start_symtab): Clear within_function.
567 * buildsym.h (within_function): Move to stabsread.h.
568 * buildsym.c (prepare_for_building): Update.
570 2018-07-16 Tom Tromey <tom@tromey.com>
572 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
573 * dwarf2read.c (dwarf2_start_symtab): Don't set
574 processing_gcc_compilation.
575 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
577 2018-07-16 Tom Tromey <tom@tromey.com>
579 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
580 (next_symbol_text_func): Move from buildsym.h.
581 * stabsread.c (hashname): Move from buildsym.c.
582 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
583 (next_symbol_text_func, hashname): Move to stabsread.h.
584 * buildsym.c: Don't include bcache.h
585 (hashname): Move to stasbread.c.
587 2018-07-16 Tom Tromey <tom@tromey.com>
589 * buildsym.h (context_stack_size): Don't declare.
590 * buildsym.c (context_stack_size): New global.
592 2018-07-16 Tom Tromey <tom@tromey.com>
594 * dbxread.c (processing_acc_compilation): New global.
595 * buildsym.h (processing_acc_compilation): Don't declare.
597 2018-07-16 Tom Tromey <tom@tromey.com>
599 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
600 * dbxread.c (read_ofile_symtab): Update.
601 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
602 * buildsym.h (last_source_start_addr): Remove.
603 (set_last_source_start_addr, get_last_source_start_addr):
605 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
607 (struct buildsym_compunit) <m_last_source_start_addr>: New
609 (prepare_for_building): Remove start_addr parameter.
610 (start_symtab, restart_symtab, end_symtab_get_static_block)
611 (end_symtab_with_blockvector): Update.
612 (set_last_source_start_addr, get_last_source_start_addr): New
615 2018-07-16 Tom Tromey <tom@tromey.com>
617 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
619 (have_line_numbers): Remove.
620 (record_line, prepare_for_building, end_symtab_get_static_block)
621 (augment_type_symtab): Update.
623 2018-07-16 Tom Tromey <tom@tromey.com>
625 * buildsym.c (~buildsym_compunit): Free the macro table.
626 (struct buildsym_compunit) <get_macro_table, release_macros>: New
628 <m_pending_macros>: New member.
629 (pending_macros): Remove.
630 (~scoped_free_pendings, get_macro_table, prepare_for_building)
631 (reset_symtab_globals, end_symtab_get_static_block)
632 (end_symtab_with_blockvector, augment_type_symtab)
633 (buildsym_init): Update.
635 2018-07-16 Tom Tromey <tom@tromey.com>
637 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
639 (buildsym_compunit::set_last_source_file): New method.
640 <m_last_source_file>: New member.
641 (prepare_for_building): Remove "name" parameter.
642 (start_symtab, restart_symtab, reset_symtab_globals): Update.
643 (last_source_file): Remove.
644 (set_last_source_file, get_last_source_file): Update.
646 2018-07-16 Tom Tromey <tom@tromey.com>
648 * buildsym.c (prepare_for_building): Add assert.
650 2018-07-16 Tom Tromey <tom@tromey.com>
652 * buildsym.c (~buildsym_compunit): Update.
653 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
654 (start_subfile, patch_subfile_names)
655 (end_symtab_with_blockvector): Update.
657 2018-07-16 Tom Tromey <tom@tromey.com>
659 * buildsym.c (struct buildsym_compunit): Add constructor,
660 destructor, initializers.
661 (start_buildsym_compunit): Remove.
662 (free_buildsym_compunit): Use "delete".
663 (start_symtab, restart_symtab): Use "new".
665 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
667 * symfile.c (set_objfile_default_section_offset): Remove struct
670 2018-07-14 Stafford Horne <shorne@gmail.com>
672 * (Responsible Maintainers): Add myself as or1k maintainer.
674 2018-07-13 Tom Tromey <tom@tromey.com>
676 * symfile.c (set_objfile_default_section_offset): Use extra braces
679 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
681 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
684 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
686 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
687 unittests/cli-utils-selftests.c
688 * unittests/cli-utils-selftests.c: New file.
690 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
692 * NEWS: Mention new commands. Mention change to 'thread apply'.
694 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
696 * thread.c (thr_try_catch_cmd): New function.
697 (thread_apply_all_command): Handle qcs flags.
698 (thread_apply_command): Handle qcs flags.
699 (taas_command): New function.
700 (tfaas_command): New function.
701 (_initialize_thread): Update to setup the new commands 'taas
702 and 'tfaas'. Change doc string for 'thread apply'.
704 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
706 * stack.c: (trailing_outermost_frame): New function, mostly
707 extracted from backtrace_command_1.
708 (leading_innermost_frame): New function.
709 (backtrace_command_1): Update to call trailing_outermost_frame.
710 (frame_apply_command_count): New function.
711 (frame_apply_level_command): New function.
712 (frame_apply_all_command): New function.
713 (frame_apply_command): New function.
714 (faas_command): New function.
715 (frame_cmd_list): New variable.
716 (_initialize_stack): Update to setup the new commands 'frame apply'
719 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
721 * cli-utils.c (number_or_range_parser::get_number): Only handle
722 numbers or convenience var as numbers.
723 (parse_flags): New function.
724 (parse_flags_qcs): New function.
725 (number_or_range_parser::finished): Ensure parsing end is detected
726 before end of string.
727 * cli-utils.h (parse_flags): New function.
728 (parse_flags_qcs): New function.
729 (number_or_range_parser): Remove m_finished bool.
730 (number_or_range_parser::skip_range): Set m_in_range to false.
732 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
734 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
737 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
738 Jan Kratochvil <jan.kratochvil@redhat.com>
739 Paul Fertser <fercerpav@gmail.com>
740 Tsutomu Seki <sekiriki@gmail.com>
741 Pedro Alves <palves@redhat.com>
743 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
744 'unittests/parse-connection-spec-selftests.c'.
745 (COMMON_SFILES): Add 'common/netstuff.c'.
746 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
747 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
748 * common/netstuff.c: New file.
749 * common/netstuff.h: New file.
750 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
751 (wait_for_connect): Update comment. New parameter
752 'gdb::optional<int> sock' instead of 'struct serial *scb'.
753 Use 'sock' directly instead of 'scb->fd'.
754 (try_connect): New function, with code from 'net_open'.
755 (net_open): Rewrite main loop to deal with multiple
756 sockets/addresses. Handle IPv6-style hostnames; implement
757 support for IPv6 connections.
758 * unittests/parse-connection-spec-selftests.c: New file.
760 2018-07-11 Pedro Alves <palves@redhat.com>
763 * remote.c (remote_target::remote_detach_pid): Call
766 2018-07-11 Pedro Alves <palves@redhat.com>
768 * h8300-tdep.c (h8300_gdbarch_init): Remove
769 set_gdbarch_ecoff_reg_to_regnum calls.
771 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
774 * c-typeprint.c (c_type_print_base_struct_union): Don't print
775 offsets/sizes for static members of a class/struct.
777 2018-07-11 Alan Hayward <alan.hayward@arm.com>
779 * target-descriptions.c (tdesc_register_bitsize): Rename.
780 * target-descriptions.h (tdesc_register_bitsize): Likewise.
781 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
782 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
784 2018-07-10 Tom Tromey <tom@tromey.com>
786 * breakpoint.c (moribund_locations): Now static and a
788 (breakpoint_init_inferior, moribund_breakpoint_here_p)
789 (build_bpstat_chain, update_global_location_list)
790 (breakpoint_retire_moribund): Update.
791 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
794 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
796 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
797 (riscv_register_reggroup_p): Use new function, remove unneeded
799 (riscv_push_dummy_call): Extend assert to compare against xlen or
800 flen based on register type.
802 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
804 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
806 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
808 * remote.c (show_hardware_watchpoint_limit): New function.
809 (show_hardware_watchpoint_length_limit): New function.
810 (show_hardware_breakpoint_limit): New function.
811 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
812 where appropriate, update help text.
814 2018-07-09 Tom Tromey <tom@tromey.com>
816 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
817 (CLIBS): Don't mention NAT_CLIBS.
819 2018-07-09 Tom Tromey <tom@tromey.com>
821 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
822 (LIBGDB_OBS, clean mostlyclean): Update.
823 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
825 2018-07-09 Tom Tromey <tom@tromey.com>
827 * Makefile.in (%.c: %.y): Use ECHO_YACC.
828 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
829 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
831 2018-07-09 Tom Tromey <tom@tromey.com>
833 * Makefile.in (ALLDEPFILES): Remove exec.c.
834 (COMMON_OBS): Remove exec.o.
835 (COMMON_SFILES): Add exec.c.
837 2018-07-09 Tom Tromey <tom@tromey.com>
839 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
841 2018-07-09 Tom Tromey <tom@tromey.com>
843 * Makefile.in (clean mostlyclean): Remove stamp-version.
844 (version.c): Depend on stamp-version.
845 (stamp-version): New rule, from version.c rule.
847 2018-07-09 Tom Tromey <tom@tromey.com>
849 * Makefile.in (init.c): Depend on stamp-init.
850 (stamp-init): New rule, from init.c rule.
851 (clean mostlyclean): Remove stamp-init.
853 2018-07-09 Tom Tromey <tom@tromey.com>
855 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
856 SUBDIR_GCC_COMPILE_SRCS.
858 2018-07-09 Tom Tromey <tom@tromey.com>
860 * Makefile.in (init.c): Remove some unused sed rules.
862 2018-07-09 Tom Tromey <tom@tromey.com>
864 * Makefile.in (TSOBS): Remove.
865 (INIT_FILES): Update.
866 (LIBGDB_OBS): Update.
867 (COMMON_SFILES): Add inflow.c.
868 (SFILES): Remove inflow.c.
870 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
872 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
874 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
876 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
877 get_saveloc_name, is_signal_frame_name, step_name,
878 init_remote_name, create_addr_space_name,
879 destroy_addr_space_name, search_unwind_table_name,
880 find_dyn_list_name): Constify.
882 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
884 * darwin-nat.c (darwin_pthread_kill): New function.
885 (darwin_resume_thread): Use darwin_pthread_kill.
887 2018-07-05 Tom de Vries <tdevries@suse.de>
889 * macroexp.c (macro_buffer) <operator=>: New member function.
891 2018-07-04 Tom Tromey <tom@tromey.com>
893 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
895 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
897 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
898 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
902 2018-07-04 Joel Brobecker <brobecker@adacore.com>
904 * NEWS: Create a new section for the next release branch.
905 Rename the section of the current branch, now that it has
908 2018-07-04 Joel Brobecker <brobecker@adacore.com>
910 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
911 * version.in: Bump version to 8.2.50.DATE-git.
913 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
914 Pedro Alves <palves@redhat.com>
916 * linux-nat.c (linux_init_ptrace): Rename to ...
917 (linux_init_ptrace_procfs): ... this. Call
918 linux_proc_init_warnings.
919 (linux_nat_target::post_attach)
920 (linux_nat_target::post_startup_inferior): Adjust.
921 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
922 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
924 2018-07-04 Tom de Vries <tdevries@suse.de>
926 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
928 (read_comp_unit_head): ... here.
930 2018-07-03 Tom Tromey <tom@tromey.com>
932 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
933 (stop_tracing, tstatus_command)
934 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
935 (print_one_static_tracepoint_marker): Update.
936 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
938 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
940 (all_tracepoints, static_tracepoints_here): Return std::vector.
942 2018-07-03 Tom Tromey <tom@tromey.com>
944 * common/ptid.c (ptid_equal): Remove.
945 * common/ptid.h (ptid_equal): Don't declare.
946 * ada-tasks.c: Update.
947 * breakpoint.c: Update.
948 * common/agent.c: Update.
950 * darwin-nat-info.c: Update.
951 * darwin-nat.c: Update.
953 * dtrace-probe.c: Update.
954 * dummy-frame.c: Update.
955 * fbsd-nat.c: Update.
957 * gdbthread.h: Update.
959 * go32-nat.c: Update.
960 * inf-loop.c: Update.
961 * inf-ptrace.c: Update.
966 * linux-fork.c: Update.
967 * linux-nat.c: Update.
968 * linux-thread-db.c: Update.
969 * mi/mi-cmd-var.c: Update.
970 * mi/mi-interp.c: Update.
971 * mi/mi-main.c: Update.
972 * nto-procfs.c: Update.
973 * ppc-linux-tdep.c: Update.
975 * python/py-inferior.c: Update.
976 * python/py-record-btrace.c: Update.
977 * python/py-record.c: Update.
978 * ravenscar-thread.c: Update.
979 * regcache.c: Update.
980 * remote-sim.c: Update.
982 * sol-thread.c: Update.
985 * tui/tui-stack.c: Update.
987 * windows-nat.c: Update.
988 * windows-tdep.c: Update.
990 2018-07-03 Tom Tromey <tom@tromey.com>
992 * common/ptid.c (ptid_match): Remove.
993 * common/ptid.h (ptid_match): Don't declare.
994 * fbsd-nat.c: Update.
997 * linux-nat.c: Update.
998 * record-btrace.c: Update.
999 * regcache.c: Update.
1002 2018-07-03 Tom Tromey <tom@tromey.com>
1004 * common/ptid.c (ptid_tid_p): Remove.
1005 * common/ptid.h (ptid_tid_p): Don't declare.
1006 * sol-thread.c: Update.
1008 2018-07-03 Tom Tromey <tom@tromey.com>
1010 * common/ptid.c (ptid_lwp_p): Remove.
1011 * common/ptid.h (ptid_lwp_p): Don't declare.
1012 * fbsd-nat.c: Update.
1013 * linux-nat.c: Update.
1014 * nat/linux-procfs.c: Update.
1015 * nat/x86-linux-dregs.c: Update.
1016 * sol-thread.c: Update.
1018 2018-07-03 Tom Tromey <tom@tromey.com>
1020 * common/ptid.c (ptid_is_pid): Remove.
1021 * common/ptid.h (ptid_is_pid): Don't declare.
1023 * linux-nat.c: Update.
1024 * mi/mi-interp.c: Update.
1028 2018-07-03 Tom Tromey <tom@tromey.com>
1030 * common/ptid.c (ptid_get_tid): Remove.
1031 * common/ptid.h (ptid_get_tid): Don't declare.
1032 * ada-tasks.c: Update.
1033 * aix-thread.c: Update.
1034 * bsd-uthread.c: Update.
1035 * darwin-nat.c: Update.
1036 * fbsd-nat.c: Update.
1037 * i386-darwin-nat.c: Update.
1039 * linux-tdep.c: Update.
1040 * nto-procfs.c: Update.
1041 * ppc-ravenscar-thread.c: Update.
1042 * python/py-infthread.c: Update.
1043 * ravenscar-thread.c: Update.
1044 * sol-thread.c: Update.
1045 * sparc-ravenscar-thread.c: Update.
1046 * windows-nat.c: Update.
1048 2018-07-03 Tom Tromey <tom@tromey.com>
1050 * common/ptid.c (ptid_get_lwp): Remove.
1051 * common/ptid.h (ptid_get_lwp): Don't declare.
1052 * aarch64-linux-nat.c: Update.
1053 * ada-tasks.c: Update.
1054 * aix-thread.c: Update.
1055 * amd64-linux-nat.c: Update.
1056 * arm-linux-nat.c: Update.
1057 * corelow.c: Update.
1058 * fbsd-nat.c: Update.
1059 * fbsd-tdep.c: Update.
1060 * gnu-nat.c: Update.
1061 * i386-cygwin-tdep.c: Update.
1062 * i386-gnu-nat.c: Update.
1063 * i386-linux-nat.c: Update.
1064 * ia64-linux-nat.c: Update.
1065 * inf-ptrace.c: Update.
1067 * linux-fork.c: Update.
1068 * linux-nat.c: Update.
1069 * linux-tdep.c: Update.
1070 * linux-thread-db.c: Update.
1071 * mips-linux-nat.c: Update.
1072 * nat/aarch64-linux-hw-point.c: Update.
1073 * nat/aarch64-linux.c: Update.
1074 * nat/linux-btrace.c: Update.
1075 * nat/linux-osdata.c: Update.
1076 * nat/linux-procfs.c: Update.
1077 * nat/x86-linux-dregs.c: Update.
1078 * obsd-nat.c: Update.
1079 * ppc-fbsd-nat.c: Update.
1080 * ppc-linux-nat.c: Update.
1082 * python/py-infthread.c: Update.
1083 * ravenscar-thread.c: Update.
1085 * s390-linux-nat.c: Update.
1086 * sol-thread.c: Update.
1087 * sol2-tdep.c: Update.
1088 * spu-linux-nat.c: Update.
1089 * x86-linux-nat.c: Update.
1090 * xtensa-linux-nat.c: Update.
1092 2018-07-03 Tom Tromey <tom@tromey.com>
1094 * common/ptid.c (ptid_get_pid): Remove.
1095 * common/ptid.h (ptid_get_pid): Don't declare.
1096 * aarch64-linux-nat.c: Update.
1097 * ada-lang.c: Update.
1098 * aix-thread.c: Update.
1099 * alpha-bsd-nat.c: Update.
1100 * amd64-fbsd-nat.c: Update.
1101 * amd64-linux-nat.c: Update.
1102 * arm-linux-nat.c: Update.
1103 * arm-nbsd-nat.c: Update.
1105 * break-catch-syscall.c: Update.
1106 * breakpoint.c: Update.
1107 * bsd-uthread.c: Update.
1108 * corelow.c: Update.
1110 * darwin-nat.c: Update.
1111 * fbsd-nat.c: Update.
1112 * fbsd-tdep.c: Update.
1114 * gnu-nat.c: Update.
1115 * hppa-nbsd-nat.c: Update.
1116 * hppa-obsd-nat.c: Update.
1117 * i386-fbsd-nat.c: Update.
1118 * ia64-linux-nat.c: Update.
1119 * inf-ptrace.c: Update.
1121 * inferior.c: Update.
1122 * inferior.h: Update.
1125 * linux-fork.c: Update.
1126 * linux-nat.c: Update.
1127 * linux-tdep.c: Update.
1128 * linux-thread-db.c: Update.
1129 * m68k-bsd-nat.c: Update.
1130 * mi/mi-interp.c: Update.
1131 * mi/mi-main.c: Update.
1132 * mips-linux-nat.c: Update.
1133 * mips-nbsd-nat.c: Update.
1134 * mips64-obsd-nat.c: Update.
1135 * nat/aarch64-linux-hw-point.c: Update.
1136 * nat/aarch64-linux.c: Update.
1137 * nat/linux-btrace.c: Update.
1138 * nat/linux-osdata.c: Update.
1139 * nat/linux-procfs.c: Update.
1140 * nat/x86-linux-dregs.c: Update.
1141 * nto-procfs.c: Update.
1142 * obsd-nat.c: Update.
1143 * ppc-linux-nat.c: Update.
1144 * ppc-nbsd-nat.c: Update.
1145 * ppc-obsd-nat.c: Update.
1146 * proc-service.c: Update.
1148 * python/py-inferior.c: Update.
1149 * python/py-infthread.c: Update.
1150 * ravenscar-thread.c: Update.
1152 * remote-sim.c: Update.
1154 * rs6000-nat.c: Update.
1155 * s390-linux-nat.c: Update.
1156 * sh-nbsd-nat.c: Update.
1157 * sol-thread.c: Update.
1158 * sparc-nat.c: Update.
1159 * sparc64-tdep.c: Update.
1160 * spu-linux-nat.c: Update.
1161 * spu-tdep.c: Update.
1162 * target-debug.h: Update.
1165 * tid-parse.c: Update.
1166 * tracefile-tfile.c: Update.
1167 * vax-bsd-nat.c: Update.
1168 * windows-nat.c: Update.
1169 * x86-linux-nat.c: Update.
1170 * x86-nat.c: Update.
1172 2018-07-03 Tom Tromey <tom@tromey.com>
1174 * common/ptid.c (pid_to_ptid): Remove.
1175 * common/ptid.h (pid_to_ptid): Don't declare.
1176 * aix-thread.c: Update.
1177 * arm-linux-nat.c: Update.
1178 * common/ptid.c: Update.
1179 * common/ptid.h: Update.
1180 * corelow.c: Update.
1182 * darwin-nat.c: Update.
1183 * fbsd-nat.c: Update.
1184 * fork-child.c: Update.
1185 * gnu-nat.c: Update.
1186 * go32-nat.c: Update.
1187 * inf-ptrace.c: Update.
1189 * inferior.c: Update.
1191 * linux-fork.c: Update.
1192 * linux-nat.c: Update.
1193 * nat/aarch64-linux-hw-point.c: Update.
1194 * nat/fork-inferior.c: Update.
1195 * nat/x86-linux-dregs.c: Update.
1196 * nto-procfs.c: Update.
1197 * obsd-nat.c: Update.
1199 * progspace.c: Update.
1201 * rs6000-nat.c: Update.
1202 * s390-linux-nat.c: Update.
1203 * sol-thread.c: Update.
1204 * spu-linux-nat.c: Update.
1207 * tracefile-tfile.c: Update.
1208 * windows-nat.c: Update.
1210 2018-07-03 Tom Tromey <tom@tromey.com>
1212 * common/ptid.h (ptid_build): Don't declare.
1213 * common/ptid.c (ptid_build): Remove.
1214 * aix-thread.c: Update.
1215 * bsd-kvm.c: Update.
1216 * bsd-uthread.c: Update.
1217 * common/agent.c: Update.
1218 * common/ptid.c: Update.
1219 * common/ptid.h: Update.
1220 * corelow.c: Update.
1221 * darwin-nat.c: Update.
1222 * fbsd-nat.c: Update.
1223 * gnu-nat.c: Update.
1224 * linux-fork.c: Update.
1225 * linux-nat.c: Update.
1226 * linux-thread-db.c: Update.
1227 * nat/linux-osdata.c: Update.
1228 * nat/linux-procfs.c: Update.
1229 * nto-procfs.c: Update.
1230 * obsd-nat.c: Update.
1231 * proc-service.c: Update.
1233 * ravenscar-thread.c: Update.
1234 * remote-sim.c: Update.
1236 * sol-thread.c: Update.
1238 * windows-nat.c: Update.
1240 2018-07-03 Tom Tromey <tom@tromey.com>
1242 * infrun.c (follow_exec): Use exit_inferior_silent.
1243 * inferior.c (exit_inferior_num_silent): Remove.
1244 * inferior.h (exit_inferior_num_silent): Don't declare.
1246 2018-07-03 Tom Tromey <tom@tromey.com>
1249 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1250 inferior_ptid on error.
1252 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1253 Simon Marchi <simon.marchi@polymtl.ca>
1256 * disasm.h (gdb_disassembler): Add
1257 `m_disassembler_options_holder'. member
1258 * disasm.c (get_all_disassembler_options): New function.
1259 (gdb_disassembler::gdb_disassembler): Use it.
1260 (gdb_buffered_insn_length_init_dis): Likewise.
1261 (gdb_buffered_insn_length): Adjust accordingly.
1262 (set_disassembler_options): Handle options with arguments.
1263 (show_disassembler_options_sfunc): Likewise. Add a leading new
1264 line if showing options with descriptions.
1265 (disassembler_options_completer): Adapt to using the
1266 `disasm_options_and_args_t' structure.
1267 * mips-tdep.c (mips_disassembler_options): New variable.
1268 (mips_disassembler_options_o32): Likewise.
1269 (mips_disassembler_options_n32): Likewise.
1270 (mips_disassembler_options_n64): Likewise.
1271 (gdb_print_insn_mips): Don't set `disassembler_options'.
1272 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1274 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1275 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1276 `gdbarch_disassembler_options_implicit' and
1277 `gdbarch_valid_disassembler_options'.
1278 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1279 `disasm_options_and_args_t' structure.
1280 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1282 (valid_disassembler_options): Switch from `disasm_options_t' to
1283 the `disasm_options_and_args_t' structure.
1284 * NEWS: Document `set disassembler-options' support for the MIPS
1286 * gdbarch.h: Regenerate.
1287 * gdbarch.c: Regenerate.
1289 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1291 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1293 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1295 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1296 parameter in call to amd64_target_description.
1297 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1298 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1299 (amd64fbsd_init_abi): Likewise.
1300 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1301 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1302 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1303 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1305 2018-06-29 Pedro Alves <palves@redhat.com>
1307 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1308 "segments" parameter.
1309 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1310 (_initialize_amd64_tdep): Update call to
1311 amd64_create_target_description.
1312 (amd64_target_description): Add "segments" parameter. Adjust
1313 the implementation to use it.
1314 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1315 call to amd64_create_target_description.
1316 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1317 * gdb/arch/amd64.h (amd64_create_target_description): Add
1318 "segments" register.
1319 * gdb/arch/amd64.c (amd64_create_target_description): Add
1320 "segments" parameter. Call create_feature_i386_64bit_segments
1321 only if SEGMENTS is true.
1322 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1323 call to amd64_create_target_description.
1325 2018-06-29 Pedro Alves <palves@redhat.com>
1327 * thread.c (thread_target_id_str): New, factored out from ...
1328 (print_thread_info_1): ... here. Use it to compute the max
1329 "Target Id" column width.
1331 2018-06-29 Pedro Alves <palves@redhat.com>
1333 * remote.c (remote_target::extra_thread_info): Delete
1334 'display_buf' and 'n' locals. from the cache, regardless of
1335 packet mechanims is in use. Use cache for qThreadExtra and qP
1338 2018-06-29 Pedro Alves <palves@redhat.com>
1340 * blockframe.c (find_pc_sect_containing_function): New function.
1341 * breakpoint.c (print_breakpoint_location): Don't call
1342 find_pc_sect_function.
1343 * linespec.c (create_sals_line_offset): Record the location's
1345 * linespec.c (convert_address_location_to_sals): Fill in sal's
1346 symbol with find_pc_sect_containing_function.
1347 * symtab.c (find_function_start_sal): Rename to ...
1348 (find_function_start_sal_1): ... this.
1349 (find_function_start_sal): Reimplement as wrapper around
1350 find_function_start_sal_1, and use
1351 find_pc_sect_containing_function to fill in the sal's symbol.
1352 (find_function_start_sal(symbol*, bool)): Adjust.
1353 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1355 (find_pc_sect_containing_function): Declare.
1357 2018-06-29 Pedro Alves <palves@redhat.com>
1359 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1360 true if the the location has no symbol.
1362 2018-06-28 Tom Tromey <tom@tromey.com>
1364 * NEWS: Mention --enable-codesign.
1365 * silent-rules.mk (ECHO_SIGN): New variable.
1366 * configure.ac: Add --enable-codesign.
1367 * configure: Rebuild.
1368 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1369 (gdb$(EXEEXT)): Optionally invoke codesign.
1371 2018-06-28 Pedro Alves <palves@redhat.com>
1373 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1375 (switch_to_thread_no_regs): Adjust comment.
1376 * infcmd.c (stop_pc): Delete.
1377 (post_create_inferior, info_program_command): Replace references
1378 to stop_pc with references to thread_info->suspend.stop_pc.
1379 * inferior.h (stop_pc): Delete declaration.
1380 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1381 (handle_inferior_event_1, handle_signal_stop)
1382 (process_event_stop_test, keep_going_stepped_thread)
1383 (handle_step_into_function, handle_step_into_function_backward)
1384 (print_stop_location): Replace references to stop_pc with
1385 references to thread_info->suspend.stop_pc.
1386 (struct infcall_suspend_state) <stop_pc>: Delete field.
1387 (save_infcall_suspend_state, restore_infcall_suspend_state):
1388 Remove references to inf_stat->stop_pc.
1389 * linux-fork.c (fork_load_infrun_state): Likewise.
1390 * record-btrace.c (record_btrace_set_replay): Likewise.
1391 * record-full.c (record_full_goto_entry): Likewise.
1392 * remote.c (print_one_stopped_thread): Likewise.
1393 * target.c (target_resume): Extend comment.
1394 * thread.c (set_executing_thread): New.
1395 (set_executing): Use it.
1396 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1397 Remove references to stop_pc.
1399 2018-06-28 Pedro Alves <palves@redhat.com>
1401 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1402 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1404 2018-06-28 Tom Tromey <tom@tromey.com>
1406 * coffread.c (coff_symfile_finish): Update.
1407 * xcoffread.c (xcoff_symfile_finish): Update.
1408 * elfread.c (elf_symfile_finish): Update.
1409 * symfile.h (dwarf2_free_objfile): Don't declare.
1410 * dwarf2read.c (_initialize_dwarf2_read): Use
1411 register_objfile_data_with_cleanup.
1412 (dwarf2_free_objfile): Now static. Change signature.
1414 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1416 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1417 option "-o" to add-symbol-file-load to add an offset to each
1418 section's load address.
1419 * symfile.c (set_objfile_default_section_offset): New function.
1421 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1423 * symfile.c (add_symbol_file_command): Make sure that sections
1424 with the same name are sorted in the same order.
1426 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1428 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1429 require the second argument. If omitted, load sections at the
1430 addresses specified in the file.
1432 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1434 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1435 (_initialize_symfile): Add option "-o" to symbol-file to add an
1436 offset to each section of the symbol file.
1438 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1440 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1442 2018-06-27 Tom Tromey <tom@tromey.com>
1444 * stack.c (_initialize_stack): Update "func" help text.
1446 2018-06-27 Tom Tromey <tom@tromey.com>
1448 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1450 (unwind_infopy_str, pyuw_create_unwind_info)
1451 (unwind_infopy_add_saved_register, pyuw_sniffer)
1452 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1454 (struct saved_reg): Add constructor.
1455 <value>: Now a gdbpy_ref<>.
1457 2018-06-27 Tom Tromey <tom@tromey.com>
1459 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1461 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1463 * gdb-gdb.py.in: Format using autopep8.
1465 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1467 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1468 (type_lookup_function): Recognize CORE_ADDR values.
1470 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1472 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1475 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1477 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1480 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1482 * gdb-gdb.py: Move to...
1483 * gdb-gdb.py.in: ... here.
1484 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1485 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1487 (distclean): Remove gdb-gdb.py when cleaning.
1488 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1489 * configure: Re-generate.
1491 2018-06-27 Pedro Alves <palves@redhat.com>
1493 * proc-service.c (get_ps_regcache): New.
1494 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1495 (ps_lsetfpregs): Use it.
1497 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1500 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1501 (dwarf_decode_lines_1): Adjust.
1503 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1505 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1507 <info_proc>: Likewise.
1509 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1511 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1512 to windows_fetch_one_register, and only handle the case of
1513 fetching one register. Move the code that reloads the context
1514 and iterates over all registers if R is negative to...
1515 (windows_nat_target::fetch_registers): ... here.
1516 (do_windows_store_inferior_registers): Rename to
1517 windows_store_one_register, and only handle the case of storing
1518 one register. Move the code that handles the case where r is
1520 (windows_nat_target::store_registers) ... here.
1522 2018-06-26 Tom Tromey <tom@tromey.com>
1525 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1526 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1528 (rust_internal_print_type): Add podata parameter.
1529 (rust_print_type): Update.
1531 2018-06-26 Tom Tromey <tom@tromey.com>
1533 * typeprint.h (struct print_offset_data) <update, finish,
1534 maybe_print_hole>: New methods.
1535 <indentation>: New constant.
1536 * typeprint.c (print_offset_data::indentation): Define.
1537 (print_offset_data::maybe_print_hole, print_offset_data::update)
1538 (print_offset_data::finish): Move from c-typeprint.c and rename.
1539 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1540 (print_spaces_filtered_with_print_options): Update.
1541 (c_print_type_union_field_offset, maybe_print_hole)
1542 (c_print_type_struct_field_offset): Move to typeprint.c and
1544 (c_type_print_base_struct_union): Update.
1546 2018-06-25 Pedro Alves <palves@redhat.com>
1548 * gdbthread.h (thread_info_ref, delete_thread)
1549 (delete_thread_silent, first_thread_of_inferior)
1550 (any_thread_of_inferior, switch_to_thread)
1551 (enable_thread_stack_temporaries)
1552 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1553 (get_last_thread_stack_temporary)
1554 (value_in_thread_stack_temporaries, can_access_registers_thread):
1555 Spell out "struct thread_info" instead of just "thread_info".
1556 * inferior.h (notice_new_inferior): Likewise.
1558 2018-06-25 Pedro Alves <palves@redhat.com>
1560 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1561 pass thread_info pointer to delete_thread.
1562 (windows_nat_target::detach): Pass inferior pointer to
1564 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1566 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1567 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1568 and pass a thread_info pointer to delete_thread.
1569 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1570 pass thread_info pointer to delete_thread.
1571 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1572 delete_thread_silent call.
1573 * procfs.c (procfs_target::detach): Pass inferior pointer to
1575 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1576 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1577 delete_thread_silent call.
1578 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1579 pass thread_info pointer to delete_thread.
1580 (windows_nat_target::detach): Pass inferior pointer to
1583 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1585 * regcache.c (readable_regcache::read_part): Fix asserts.
1586 (reg_buffer::raw_collect_part): New function.
1587 (regcache::write_part): Fix asserts.
1588 (reg_buffer::raw_supply_part): New function.
1589 (regcache::transfer_regset_register): New helper function.
1590 (regcache::transfer_regset): Call new functions.
1591 (regcache_supply_regset): Use gdb_byte*.
1592 (regcache::supply_regset): Likewise.
1593 (regcache_collect_regset): Likewise.
1594 (regcache::collect_regset): Likewise.
1595 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1596 (reg_buffer::raw_supply_part): Likewise.
1597 (regcache::transfer_regset_register): Likewise.
1598 (regcache::transfer_regset): Use gdb_byte*.
1600 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1602 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1604 2018-06-21 Pedro Alves <palves@redhat.com>
1606 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1607 instead of a ptid_t. All callers adjusted.
1608 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1610 (print_ada_task_info, display_current_task_id, task_command_1):
1612 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1614 (breakpoint_kind): Adjust.
1615 (remove_breakpoints_pid): Rename to ...
1616 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1617 pointer. All callers adjusted.
1618 (bpstat_clear_actions): Use inferior_thread.
1619 (get_bpstat_thread): New.
1620 (bpstat_do_actions): Use it.
1621 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1622 to take a thread_info pointer. All callers adjusted.
1623 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1624 (breakpoint_re_set_thread): Use inferior_thread.
1625 * breakpoint.h (struct inferior): Forward declare.
1626 (bpstat_stop_status): Update.
1627 (remove_breakpoints_pid): Delete.
1628 (remove_breakpoints_inf): New.
1629 * bsd-uthread.c (bsd_uthread_target::wait)
1630 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1631 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1632 (maint_btrace_packet_history_cmd)
1633 (maint_btrace_clear_packet_history_cmd): Adjust.
1634 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1636 * cli/cli-interp.c: Include "inferior.h".
1637 * common/refcounted-object.h (struct
1638 refcounted_object_ref_policy): New.
1639 * compile/compile-object-load.c: Include gdbthread.h.
1640 (store_regs): Use inferior_thread.
1641 * corelow.c (core_target::close): Use current_inferior.
1642 (core_target_open): Adjust to use first_thread_of_inferior and use
1643 the current inferior.
1644 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1645 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1646 <thread>: ... this new field. All references adjusted.
1647 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1648 Take a thread_info pointer instead of a ptid_t.
1649 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1650 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1651 thread_info pointer instead of a ptid_t.
1652 * elfread.c: Include "inferior.h".
1653 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1654 Use inferior_thread.
1655 * eval.c (evaluate_subexp): Likewise.
1656 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1658 * gdb_proc_service.h (struct thread_info): Forward declare.
1659 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1660 <thread>: ... this new field. All references adjusted.
1661 * gdbarch.h, gdbarch.c: Regenerate.
1662 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1663 'thread' parameter. All implementations and callers adjusted.
1664 * gdbthread.h (thread_info) <set_running>: New method.
1665 (delete_thread, delete_thread_silent): Take a thread_info pointer
1667 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1668 (first_thread_of_process): Delete, replaced by ...
1669 (first_thread_of_inferior): ... this new function. All callers
1671 (any_live_thread_of_process): Delete, replaced by ...
1672 (any_live_thread_of_inferior): ... this new function. All callers
1674 (switch_to_thread, switch_to_no_thread): Declare.
1675 (is_executing): Delete.
1676 (enable_thread_stack_temporaries): Update comment.
1677 <enable_thread_stack_temporaries>: Take a thread_info pointer
1678 instead of a ptid_t. Incref the thread.
1679 <~enable_thread_stack_temporaries>: Decref the thread.
1682 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1683 (get_last_thread_stack_temporary)
1684 (value_in_thread_stack_temporaries, can_access_registers_thread):
1685 Take a thread_info pointer instead of a ptid_t. All callers
1687 * infcall.c (get_call_return_value): Use inferior_thread.
1688 (run_inferior_call): Work with thread pointers instead of ptid_t.
1689 (call_function_by_hand_dummy): Work with thread pointers instead
1690 of ptid_t. Use thread_info_ref.
1691 * infcmd.c (proceed_thread_callback): Access thread's state
1693 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1694 access thread's state directly.
1695 (continue_command): Use inferior_thread.
1696 (info_program_command): Use find_thread_ptid and access thread
1698 (proceed_after_attach_callback): Use thread state directly.
1699 (notice_new_inferior): Take a thread_info pointer instead of a
1700 ptid_t. All callers adjusted.
1701 (exit_inferior): Take an inferior pointer instead of a pid. All
1703 (exit_inferior_silent): New.
1704 (detach_inferior): Delete.
1705 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1706 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1707 (detach_inferior_command, kill_inferior_command): Use
1708 find_inferior_id instead of valid_gdb_inferior_id and
1709 gdb_inferior_id_to_pid.
1710 (inferior_command): Use inferior and thread pointers.
1711 * inferior.h (struct thread_info): Forward declare.
1712 (notice_new_inferior): Take a thread_info pointer instead of a
1713 ptid_t. All callers adjusted.
1714 (detach_inferior): Delete declaration.
1715 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1716 instead of a pid. All callers adjusted.
1717 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1718 (valid_gdb_inferior_id): Delete.
1719 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1720 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1721 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1723 <inf>: ... this new field.
1724 <step_ptid>: Delete, replaced by ...
1725 <step_thread>: ... this new field.
1726 (get_displaced_stepping_state): Take an inferior pointer instead
1727 of a pid. All callers adjusted.
1728 (displaced_step_in_progress_any_inferior): Adjust.
1729 (displaced_step_in_progress_thread): Take a thread pointer instead
1730 of a ptid_t. All callers adjusted.
1731 (displaced_step_in_progress, add_displaced_stepping_state): Take
1732 an inferior pointer instead of a pid. All callers adjusted.
1733 (get_displaced_step_closure_by_addr): Adjust.
1734 (remove_displaced_stepping_state): Take an inferior pointer
1735 instead of a pid. All callers adjusted.
1736 (displaced_step_prepare_throw, displaced_step_prepare)
1737 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1738 All callers adjusted.
1739 (start_step_over): Adjust.
1740 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1741 displaced step queue.
1742 (do_target_resume): Adjust.
1743 (fetch_inferior_event): Use inferior_thread.
1744 (context_switch, get_inferior_stop_soon): Take an
1745 execution_control_state pointer instead of a ptid_t. All callers
1747 (switch_to_thread_cleanup): Delete.
1748 (stop_all_threads): Use scoped_restore_current_thread.
1749 * inline-frame.c: Include "gdbthread.h".
1750 (inline_state) <inline_state>: Take a thread pointer instead of a
1751 ptid_t. All callers adjusted.
1752 <ptid>: Delete, replaced by ...
1753 <thread>: ... this new field.
1754 (find_inline_frame_state): Take a thread pointer instead of a
1755 ptid_t. All callers adjusted.
1756 (skip_inline_frames, step_into_inline_frame)
1757 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1758 pointer instead of a ptid_t. All callers adjusted.
1759 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1760 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1761 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1763 * linux-nat.c (get_detach_signal): Likewise.
1764 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1765 (thread_db_notice_clone): Adjust.
1766 (thread_db_find_new_threads_silently)
1767 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1768 a thread pointer instead of a ptid_t. All callers adjusted.
1769 * mi/mi-cmd-var.c: Include "inferior.h".
1770 (mi_cmd_var_update_iter): Update to use thread pointers.
1771 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1773 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1775 (mi_output_running): ... this new function.
1776 (mi_on_resume_1): Adjust to use it.
1777 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1778 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1780 (interrupt_thread_callback): : Adjust to use thread and inferior
1782 * proc-service.c: Include "gdbthread.h".
1783 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1784 * progspace-and-thread.c: Include "inferior.h".
1785 * progspace.c: Include "inferior.h".
1786 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1787 hold a reference to an inferior_object.
1788 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1790 * python/py-inferior.c (struct inferior_object): Give the type a
1791 tag name instead of a typedef.
1792 (python_on_normal_stop): No need to check if the current thread is
1794 (inferior_to_inferior_object): Change return type to
1795 inferior_object. All callers adjusted.
1796 (find_thread_object): Delete, bits factored out to ...
1797 (thread_to_thread_object): ... this new function.
1798 * python/py-infthread.c (create_thread_object): Use
1799 inferior_to_inferior_object.
1800 (thpy_is_stopped): Use thread pointer directly.
1801 (gdbpy_selected_thread): Use inferior_thread.
1802 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1803 field, replaced with ...
1804 <thread>: ... this new field. All users adjusted.
1805 (btpy_insn_or_gap_new): Drop const.
1806 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1808 * python/py-record.c: Include "gdbthread.h".
1809 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1810 a ptid_t. All callers adjusted.
1811 (gdbpy_current_recording): Use inferior_thread.
1812 * python/py-record.h (recpy_record_object) <ptid>: Delete
1813 field, replaced with ...
1814 <thread>: ... this new field. All users adjusted.
1815 (recpy_element_object) <ptid>: Delete
1816 field, replaced with ...
1817 <thread>: ... this new field. All users adjusted.
1818 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1819 a ptid_t. All callers adjusted.
1820 * python/py-threadevent.c: Include "gdbthread.h".
1821 (get_event_thread): Use thread_to_thread_object.
1822 * python/python-internal.h (struct inferior_object): Forward
1824 (find_thread_object, find_inferior_object): Delete declarations.
1825 (thread_to_thread_object, inferior_to_inferior_object): New
1827 * record-btrace.c: Include "inferior.h".
1828 (require_btrace_thread): Use inferior_thread.
1829 (record_btrace_frame_sniffer)
1830 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1831 (get_thread_current_frame): Use scoped_restore_current_thread and
1833 (get_thread_current_frame): Use thread pointer directly.
1834 (record_btrace_replay_at_breakpoint): Use thread's inferior
1836 * record-full.c: Include "inferior.h".
1837 * regcache.c: Include "gdbthread.h".
1838 (get_thread_arch_regcache): Use the inferior's address space
1840 (get_thread_regcache, registers_changed_thread): New.
1841 * regcache.h (get_thread_regcache(thread_info *thread)): New
1843 (registers_changed_thread): New.
1844 (remote_target) <remote_detach_1>: Swap order of parameters.
1845 (remote_add_thread): <remote_add_thread>: Return the new thread.
1846 (get_remote_thread_info(ptid_t)): New overload.
1847 (remote_target::remote_notice_new_inferior): Use thread pointers
1849 (remote_target::process_initial_stop_replies): Use
1850 thread_info::set_running.
1851 (remote_target::remote_detach_1, remote_target::detach)
1852 (extended_remote_target::detach): Adjust.
1853 * stack.c (frame_show_address): Use inferior_thread.
1854 * target-debug.h (target_debug_print_thread_info_pp): New.
1855 * target-delegates.c: Regenerate.
1856 * target.c (default_thread_address_space): Delete.
1857 (memory_xfer_partial_1): Use current_inferior.
1858 (target_detach): Use current_inferior.
1859 (target_thread_address_space): Delete.
1860 (generic_mourn_inferior): Use current_inferior.
1861 * target.h (struct target_ops) <thread_address_space>: Delete.
1862 (target_thread_address_space): Delete.
1863 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1865 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1866 thread pointer instead of a ptid_t. Adjust all callers.
1867 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1868 (first_thread_of_process): Delete, replaced by ...
1869 (first_thread_of_inferior): ... this new function. All callers
1871 (any_thread_of_process): Rename to ...
1872 (any_thread_of_inferior): ... this, and take an inferior pointer.
1873 (any_live_thread_of_process): Rename to ...
1874 (any_live_thread_of_inferior): ... this, and take an inferior
1876 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1877 (value_in_thread_stack_temporaries)
1878 (get_last_thread_stack_temporary): Take a thread pointer instead
1879 of a ptid_t. Adjust all callers.
1880 (thread_info::set_running): New.
1881 (validate_registers_access): Use inferior_thread.
1882 (can_access_registers_ptid): Rename to ...
1883 (can_access_registers_thread): ... this, and take a thread
1885 (print_thread_info_1): Adjust to compare thread pointers instead
1887 (switch_to_no_thread, switch_to_thread): Make extern.
1888 (scoped_restore_current_thread::~scoped_restore_current_thread):
1889 Use m_thread pointer directly.
1890 (scoped_restore_current_thread::scoped_restore_current_thread):
1891 Use inferior_thread.
1892 (thread_command): Use thread pointer directly.
1893 (thread_num_make_value_helper): Use inferior_thread.
1894 * top.c (execute_command): Use inferior_thread.
1895 * tui/tui-interp.c: Include "inferior.h".
1896 * varobj.c (varobj_create): Use inferior_thread.
1897 (value_of_root_1): Use find_thread_global_id instead of
1898 global_thread_id_to_ptid.
1900 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1902 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1904 (regcache::write_part): Likewise.
1905 (readable_regcache::cooked_read_part): Update comment.
1906 (readable_regcache::cooked_write_part): Likewise.
1907 * regcache.h: (readable_regcache::read_part): Likewise.
1908 (regcache::write_part): Likewise.
1910 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1911 Dirk Schubert <dirk.schubert@arm.com>
1913 * aarch64-linux-nat.c (post_attach): New.
1914 (aarch64_linux_nat_target::post_attach): Override post_attach to
1915 record the number of hardware debug registers.
1917 2018-06-20 Tom Tromey <tom@tromey.com>
1919 * python/py-param.c (add_setshow_generic): Make parameters const.
1920 (parmpy_init): Update.
1922 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1924 * regcache.h (regcache_cooked_read_ftype): Rename to...
1925 (register_read_ftype): ...this, change type to function_view.
1926 (class reg_buffer) <save>: Remove src parameter.
1927 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1928 parameter non-const in first overload. Remove src parameter in
1930 * regcache.c (do_cooked_read): Remove.
1931 (readonly_detached_regcache::readonly_detached_regcache): Make
1932 parameter non-const, adjust call to other constructor.
1933 (reg_buffer::save): Remove src parameter.
1934 * frame.c (do_frame_register_read): Remove.
1935 (frame_save_as_regcache): Use lambda function.
1936 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1937 parameter to ppu2spu_data *.
1938 (ppu2spu_sniffer): Use lambda function.
1940 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1942 * record-full.c (record_full_target::insert_breakpoint): Remove
1943 "struct" keyword, add const.
1945 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1947 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1948 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1949 * configure.ac: Remove AC_PREREQ, add missing quoting.
1950 * gnulib/configure.ac: Modernize usage of
1951 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1952 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1953 (AUTOMAKE_VERSION): Bump to 1.15.1.
1954 * configure: Re-generate.
1955 * config.in: Re-generate.
1956 * aclocal.m4: Re-generate.
1957 * gnulib/aclocal.m4: Re-generate.
1958 * gnulib/config.in: Re-generate.
1959 * gnulib/configure: Re-generate.
1960 * gnulib/import/Makefile.in: Re-generate.
1962 2018-06-19 Pedro Alves <palves@redhat.com>
1964 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1965 (lookup_minimal_symbol_by_pc_section): ... here with
1966 gdb_assert_not_reached added.
1968 2018-06-19 Pedro Alves <palves@redhat.com>
1970 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1971 parameter with a block parameter. Compare location's block symbol
1972 with the frame's block instead of addresses.
1973 (skip_inline_frames): Pass the current block instead of the
1974 frame's address. Break out as soon as we determine the frame
1975 should not be skipped.
1977 2018-06-18 Tom Tromey <tom@tromey.com>
1979 * solib-aix.c (solib_aix_get_section_offsets): Return
1981 (solib_aix_solib_create_inferior_hook): Update.
1983 2018-06-18 Tom Tromey <tom@tromey.com>
1985 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1987 2018-06-18 Tom Tromey <tom@tromey.com>
1989 * solib-frv.c (frv_relocate_main_executable): Use
1991 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1994 2018-06-18 Tom Tromey <tom@tromey.com>
1996 * objfiles.h (inhibit_section_map_updates): Update.
1997 (resume_section_map_updates, resume_section_map_updates_cleanup):
1999 * solib-svr4.c (svr4_handle_solib_event): Update.
2000 * objfiles.c (inhibit_section_map_updates): Return
2001 scoped_restore_tmpl<int>.
2002 (resume_section_map_updates, resume_section_map_updates_cleanup):
2005 2018-06-18 Tom Tromey <tom@tromey.com>
2007 * valprint.h (read_string): Update.
2008 * valprint.c (read_string): Change type of "buffer".
2009 (val_print_string): Update.
2010 * python/py-value.c (valpy_string): Update.
2011 * language.h (struct language_defn) <la_get_string>: Change
2013 (default_get_string, c_get_string): Update.
2014 * language.c (default_get_string): Change type of "buffer".
2015 * guile/scm-value.c (gdbscm_value_to_string): Update.
2016 * c-lang.c (c_get_string): Change type of "buffer".
2018 2018-06-18 Tom Tromey <tom@tromey.com>
2020 * ser-mingw.c (struct pipe_state_destroyer): New.
2021 (pipe_state_up): New typedef.
2022 (cleanup_pipe_state): Remove.
2023 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2025 2018-06-18 Tom Tromey <tom@tromey.com>
2027 * rust-lang.h (rust_yyerror): Don't declare.
2028 * rust-lang.c (rust_language_defn): Update.
2029 * rust-exp.y (yyerror): Now static.
2030 * parse.c (parse_exp_in_context_1): Update.
2031 * p-lang.h (p_yyerror): Don't declare.
2032 * p-lang.c (p_language_defn): Update.
2033 * p-exp.y (yyerror): Now static.
2034 * opencl-lang.c (opencl_language_defn): Update.
2035 * objc-lang.c (objc_language_defn): Update.
2036 * m2-lang.h (m2_yyerror): Don't declare.
2037 * m2-lang.c (m2_language_defn): Update.
2038 * m2-exp.y (yyerror): Now static.
2039 * language.h (struct language_defn) <la_error>: Remove.
2040 * language.c (unk_lang_error): Remove.
2041 (unknown_language_defn, auto_language_defn): Remove.
2042 * go-lang.h (go_yyerror): Don't declare.
2043 * go-lang.c (go_language_defn): Update.
2044 * go-exp.y (yyerror): Now static.
2045 * f-lang.h (f_yyerror): Don't declare.
2046 * f-lang.c (f_language_defn): Update.
2047 * f-exp.y (yyerror): Now static.
2048 * d-lang.h (d_yyerror): Don't declare.
2049 * d-lang.c (d_language_defn): Update.
2050 * d-exp.y (yyerror): Now static.
2051 * c-lang.h (c_yyerror): Don't declare.
2052 * c-lang.c (c_language_defn, cplus_language_defn)
2053 (asm_language_defn, minimal_language_defn): Update.
2054 * c-exp.y (yyerror): Now static.
2055 * ada-lang.h (ada_yyerror): Don't declare.
2056 * ada-lang.c (ada_language_defn): Update.
2057 * ada-exp.y (yyerror): Now static.
2059 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2061 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2062 (store_sveregs_to_thread): Likewise.
2063 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2064 (aarch64_linux_store_inferior_registers): Likewise.
2065 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2067 (aarch64_sve_regs_copy_to_regcache): Likewise.
2068 (aarch64_sve_regs_copy_from_regcache): Likewise.
2069 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2071 (aarch64_sve_regs_copy_to_regcache): Likewise.
2072 (aarch64_sve_regs_copy_from_regcache): Likewise.
2073 (sve_context): Structure from Linux headers.
2074 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2075 (SVE_SIG_ZREG_SIZE): Likewise.
2076 (SVE_SIG_PREG_SIZE): Likewise.
2077 (SVE_SIG_FFR_SIZE): Likewise.
2078 (SVE_SIG_REGS_OFFSET): Likewise.
2079 (SVE_SIG_ZREGS_OFFSET): Likewise.
2080 (SVE_SIG_ZREG_OFFSET): Likewise.
2081 (SVE_SIG_ZREGS_SIZE): Likewise.
2082 (SVE_SIG_PREGS_OFFSET): Likewise.
2083 (SVE_SIG_PREG_OFFSET): Likewise.
2084 (SVE_SIG_PREGS_SIZE): Likewise.
2085 (SVE_SIG_FFR_OFFSET): Likewise.
2086 (SVE_SIG_REGS_SIZE): Likewise.
2087 (SVE_SIG_CONTEXT_SIZE): Likewise.
2088 (SVE_PT_REGS_MASK): Likewise.
2089 (SVE_PT_REGS_FPSIMD): Likewise.
2090 (SVE_PT_REGS_SVE): Likewise.
2091 (SVE_PT_VL_INHERIT): Likewise.
2092 (SVE_PT_VL_ONEXEC): Likewise.
2093 (SVE_PT_REGS_OFFSET): Likewise.
2094 (SVE_PT_FPSIMD_OFFSET): Likewise.
2095 (SVE_PT_FPSIMD_SIZE): Likewise.
2096 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2097 (SVE_PT_SVE_PREG_SIZE): Likewise.
2098 (SVE_PT_SVE_FFR_SIZE): Likewise.
2099 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2100 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2101 (__SVE_SIG_TO_PT): Likewise.
2102 (SVE_PT_SVE_OFFSET): Likewise.
2103 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2104 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2105 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2106 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2107 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2108 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2109 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2110 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2111 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2112 (SVE_PT_SVE_SIZE): Likewise.
2113 (SVE_PT_SIZE): Likewise.
2114 (HAS_SVE_STATE): New define.
2116 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2118 * nat/aarch64-sve-linux-sigcontext.h: New file.
2119 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2121 (SVE_VQ_MIN): Likewise.
2122 (SVE_VQ_MAX): Likewise.
2123 (SVE_VL_MIN): Likewise.
2124 (SVE_VL_MAX): Likewise.
2125 (SVE_NUM_ZREGS): Likewise.
2126 (SVE_NUM_PREGS): Likewise.
2127 (sve_vl_valid): Likewise.
2128 (struct user_sve_header): Likewise.
2130 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2131 Richard Bunt <Richard.Bunt@arm.com>
2133 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2134 was requested by GDB.
2136 2018-06-15 Tom de Vries <tdevries@suse.de>
2138 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2140 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2142 * gnulib/update-gnulib.sh: Print expected versions of
2145 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2147 * arch-utils.c (default_type_align): Use type_length_units.
2148 * gdbtypes.c (type_align): Use type_length_units.
2150 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2152 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2153 of 'define' command.
2155 2018-06-14 Tom de Vries <tdevries@suse.de>
2158 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2159 get_no_prettyformat_print_options.
2161 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2163 * sparc-nat.h: Include target.h.
2164 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2165 <fetch_registers>: Remove this argument in function call.
2166 <store_registers>: Remove this argument in function call, remove
2168 <low_forget_process>: Call sparc64_forget_process instead of
2169 sparc_forget_process.
2171 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2173 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2174 (procfs_target::make_corefile_notes): Adjust to new
2175 target_read_alloc return type.
2177 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2178 Stephen Roberts <stephen.roberts@arm.com>
2181 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2182 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2183 Move should_notify_stop local into more inner scope.
2185 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2186 Stephen Roberts <stephen.roberts@arm.com>
2189 * infrun.c (resume_1): Add call to mark_async_event_handler.
2191 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2193 * infrun.c (do_target_wait): Change old version of $pc printed.
2195 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2197 * dwarf2read.c (read_index_from_section): Rename to...
2198 (read_gdb_index_from_section): ... this, update all callers.
2199 (dwarf2_read_index): Rename to...
2200 (dwarf2_read_gdb_index): ... this, update all callers.
2202 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2204 * gdb/hppa-linux-nat.c
2205 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2206 hppa_linux_nat_target::fetch_registers.
2208 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2210 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2211 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2212 (AARCH64_DWARF_SVE_FFR): Likewise.
2213 (AARCH64_DWARF_SVE_P0): Likewise.
2214 (AARCH64_DWARF_SVE_Z0): Likewise.
2216 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2218 * common/common-regcache.h (raw_compare): New function.
2219 * regcache.c (regcache::raw_compare): Likewise.
2220 * regcache.h (regcache::raw_compare): New declaration.
2222 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2224 * common/common-regcache.h (reg_buffer_common): New structure.
2225 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2226 (reg_buffer::raw_supply): Likewise.
2227 (reg_buffer::raw_supply_integer): Likewise.
2228 (reg_buffer::raw_supply_zeroed): Likewise.
2229 (reg_buffer::raw_collect): Likewise.
2230 (reg_buffer::raw_collect_integer): Likewise.
2231 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2232 (reg_buffer::raw_supply): Likewise.
2233 (reg_buffer::raw_supply_integer): Likewise.
2234 (reg_buffer::raw_supply_zeroed): Likewise.
2235 (reg_buffer::raw_collect): Likewise.
2236 (reg_buffer::raw_collect_integer): Likewise.
2238 2018-06-10 Tom Tromey <tom@tromey.com>
2240 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2241 (class remote_state) <stop_reply_queue>: Now std::vector.
2242 (remote_state::~remote_state)
2243 (remote_target::stop_reply_queue_length): Update.
2244 (struct queue_iter_param, remove_child_of_pending_fork)
2245 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2246 (check_pending_event_prevents_wildcard_vcont_callback)
2247 (remove_stop_reply_for_inferior)
2248 (remove_stop_reply_of_remote_state)
2249 (remote_notif_remove_once_on_match)
2250 (stop_reply_match_ptid_and_ws)
2251 (remote_kill_child_of_pending_fork): Remove.
2252 (remote_target::remove_new_fork_children)
2253 (remote_target::check_pending_events_prevent_wildcard_vcont)
2254 (remote_target::discard_pending_stop_replies)
2255 (remote_target::discard_pending_stop_replies_in_queue)
2256 (remote_target::remote_notif_remove_queued_reply)
2257 (remote_target::queued_stop_reply)
2258 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2259 (remote_target::wait, remote_target::kill_new_fork_children)
2260 (remote_target::async): Update.
2262 2018-06-10 Tom Tromey <tom@tromey.com>
2264 * record-full.c (record_full_arch_list_cleanups): Remove.
2265 (record_full_message): Use try/catch.
2266 (record_full_wait_cleanups): Remove.
2267 (record_full_wait_1): Use try/catch.
2268 (record_full_restore): Likewise.
2270 2018-06-10 Tom Tromey <tom@tromey.com>
2272 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2273 declare VEC. Add constructor.
2274 <in_target_beneath>: Now bool.
2275 (record_full_breakpoints): Now a std::vector, static.
2276 (record_full_sync_record_breakpoints)
2277 (record_full_init_record_breakpoints)
2278 (record_full_target::insert_breakpoint)
2279 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2281 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2283 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2284 * serial.c (serial_interface_lookup): Remove struct keyword.
2286 2018-06-10 Tom Tromey <tom@tromey.com>
2288 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2290 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2292 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2294 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2295 "beneath" as a method.
2296 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2297 Use "beneath" as a method.
2299 2018-06-10 Tom Tromey <tom@tromey.com>
2301 * tracefile.c (struct trace_file_writer_deleter): New.
2302 <operator()>: Rename from trace_file_writer_xfree.
2303 (trace_file_writer_up): New typedef.
2304 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2306 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2308 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2309 <m_registers, m_register_status>: Change type to
2311 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2314 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2316 * common/common-regcache.h (enum register_status): Add
2317 underlying type "signed char".
2318 * regcache.h (reg_buffer) <m_register_status>: Change type to
2320 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2321 register_status instead of signed char.
2322 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2323 (reg_buffer::get_register_status): Remove cast.
2324 (readable_regcache::raw_read): Remove cast.
2325 (readable_regcache::cooked_read): Remove cast.
2327 2018-06-09 Tom Tromey <tom@tromey.com>
2329 * source.c (reverse_search_command, forward_search_command): Use
2332 2018-06-09 Tom Tromey <tom@tromey.com>
2334 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2335 (serial_ops_list): Now static, std::vector.
2336 (serial_interface_lookup, serial_add_interface): Update.
2338 2018-06-09 Tom Tromey <tom@tromey.com>
2340 * dwarf2read.c (process_cu_includes): Update.
2341 (process_full_comp_unit): Update.
2342 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2345 2018-06-08 Paul Koning <paul_koning@dell.com>
2349 * python/python.c (do_start_initialization):
2350 Avoid call to internal Python API.
2351 (init__gdb_module): New function.
2353 2018-06-08 Gary Benson <gbenson@redhat.com>
2355 * linux-thread-db.c (valprint.h): New include.
2356 (struct check_thread_db_info): New structure.
2357 (check_thread_db_on_load, tdb_testinfo): New static globals.
2358 (check_thread_db, check_thread_db_callback): New functions.
2359 (try_thread_db_load_1): Run integrity checks if requested.
2360 (maintenance_check_libthread_db): New function.
2361 (_initialize_thread_db): Register "maint check libthread-db"
2362 and "maint set/show check-libthread-db".
2363 * NEWS: Mention the above new commands.
2365 2018-06-08 Tom Tromey <tom@tromey.com>
2367 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2370 2018-06-08 Tom Tromey <tom@tromey.com>
2372 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2374 2018-06-08 Tom Tromey <tom@tromey.com>
2376 * common/btrace-common.h (struct btrace_data): Add constructor,
2377 destructor, move assignment operator.
2378 <empty, clear, fini>: New methods.
2379 <format>: Initialize.
2380 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2381 (btrace_data_empty): Don't declare.
2382 * common/btrace-common.c (btrace_data_init): Remove.
2383 (btrace_data::fini): Rename from btrace_data_fini.
2384 (btrace_data::empty): Rename from btrace_data_empty.
2385 (btrace_data::clear): Rename from btrace_data_clear. Return
2387 * btrace.h (make_cleanup_btrace_data): Don't declare.
2388 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2389 (parse_xml_btrace): Update.
2390 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2391 (maint_btrace_clear_packet_history_cmd): Update.
2393 2018-06-07 Pedro Alves <palves@redhat.com>
2395 * target.h (target_ops) <beneath>: Now a method. All references
2397 (class target_stack): New.
2398 * target.c (g_target_stack): New.
2399 (g_current_top_target): Delete.
2400 (current_top_target): Get the top target out of g_target_stack.
2401 (target_stack::push, target_stack::unpush): New.
2402 (push_target, unpush_target): Reimplement.
2403 (target_is_pushed): Reimplement in terms of g_target_stack.
2404 (target_ops::beneath, target_stack::find_beneath): New.
2406 2018-06-07 Pedro Alves <palves@redhat.com>
2408 * target.h (find_target_beneath): Delete declaration.
2409 * target.c (find_target_beneath): Delete definition.
2410 * aix-thread.c: All callers of find_target_beneath adjusted to
2411 call target_ops::beneath instead.
2412 * bsd-uthread.c: Likewise.
2413 * linux-thread-db.c: Likewise.
2414 * ravenscar-thread.c: Likewise.
2415 * sol-thread.c: Likewise.
2416 * spu-multiarch.c: Likewise.
2418 2018-06-07 Pedro Alves <palves@redhat.com>
2420 * target.h (target_ops) <beneath>: Now a method. All references
2422 (target_ops) <m_beneath>: New.
2423 * target.c (target_ops::beneath): New.
2424 * corelow.c: Adjust all references to target_ops::beneath.
2425 * linux-thread-db.c: Likewise.
2426 * make-target-delegates: Likewise.
2427 * record-btrace.c: Likewise.
2428 * record-full.c: Likewise.
2429 * remote.c: Likewise.
2430 * target.c: Likewise.
2431 * target-delegates.c: Regenerate.
2433 2018-06-07 Pedro Alves <palves@redhat.com>
2435 * target.h (target_stack): Delete.
2436 (current_top_target): Declare function.
2437 * target.c (target_stack): Delete.
2438 (g_current_top_target): New.
2439 (current_top_target): New function.
2440 * auxv.c: Use current_top_target instead of target_stack
2442 * avr-tdep.c: Likewise.
2443 * breakpoint.c: Likewise.
2444 * corefile.c: Likewise.
2445 * elfread.c: Likewise.
2447 * exceptions.c: Likewise.
2448 * frame.c: Likewise.
2449 * gdbarch-selftests.c: Likewise.
2450 * gnu-v3-abi.c: Likewise.
2451 * ia64-tdep.c: Likewise.
2452 * ia64-vms-tdep.c: Likewise.
2453 * infcall.c: Likewise.
2454 * infcmd.c: Likewise.
2455 * infrun.c: Likewise.
2456 * linespec.c: Likewise.
2457 * linux-tdep.c: Likewise.
2458 * minsyms.c: Likewise.
2459 * ppc-linux-nat.c: Likewise.
2460 * ppc-linux-tdep.c: Likewise.
2461 * procfs.c: Likewise.
2462 * regcache.c: Likewise.
2463 * remote.c: Likewise.
2464 * rs6000-tdep.c: Likewise.
2465 * s390-linux-nat.c: Likewise.
2466 * s390-tdep.c: Likewise.
2467 * solib-aix.c: Likewise.
2468 * solib-darwin.c: Likewise.
2469 * solib-dsbt.c: Likewise.
2470 * solib-spu.c: Likewise.
2471 * solib-svr4.c: Likewise.
2472 * solib-target.c: Likewise.
2473 * sparc-tdep.c: Likewise.
2474 * sparc64-tdep.c: Likewise.
2475 * spu-tdep.c: Likewise.
2476 * symfile.c: Likewise.
2477 * symtab.c: Likewise.
2478 * target-descriptions.c: Likewise.
2479 * target-memory.c: Likewise.
2480 * target.c: Likewise.
2481 * target.h: Likewise.
2482 * tracefile-tfile.c: Likewise.
2483 * tracepoint.c: Likewise.
2484 * valops.c: Likewise.
2485 * valprint.c: Likewise.
2486 * value.c: Likewise.
2487 * windows-tdep.c: Likewise.
2488 * mi/mi-main.c: Likewise.
2490 2018-06-07 Tom Tromey <tom@tromey.com>
2492 * valprint.h (build_address_symbolic): Declare.
2493 * printcmd.c (print_address_symbolic): Update.
2494 (build_address_symbolic): Change "name" and "filename" to
2496 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2498 * defs.h (build_address_symbolic): Remove declaration.
2500 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2502 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2503 (aarch64_vnv_type): Add function.
2504 (aarch64_pseudo_register_name): Add V regs for SVE.
2505 (aarch64_pseudo_register_type): Likewise.
2506 (aarch64_pseudo_register_reggroup_p): Likewise.
2507 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2508 (aarch64_pseudo_read_value): Add V regs for SVE.
2509 (aarch64_pseudo_write_2): Use V0 offset for SVE
2510 (aarch64_pseudo_write): Add V regs for SVE.
2511 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2513 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2515 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2516 (sve_vl_from_vq): Likewise.
2518 2018-06-05 Tom Tromey <tom@tromey.com>
2520 * cli/cli-cmds.c (show_version): Update.
2521 * top.c (print_gdb_version): Add "interactive" parameter.
2523 * main.c (captured_main_1): Update.
2524 * top.h (print_gdb_version): Add "interactive" parameter and a
2527 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2529 * common/enum-flags.h: Add trailing semicolon to example in
2532 2018-06-05 Tom Tromey <tom@tromey.com>
2535 * NEWS: Add entry about pager.
2536 * utils.c (pagination_disabled_for_command): New global.
2537 (prompt_for_continue): Allow "c" response to prompt.
2538 (reinitialize_more_filter): Clear
2539 pagination_disabled_for_command.
2540 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2542 2018-06-04 Tom Tromey <tom@tromey.com>
2544 * ada-lang.h (ada_lookup_symbol_list): Update.
2545 * ada-lang.c (resolve_subexp): Update.
2546 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2548 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2549 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2550 results parameter to std::vector.
2551 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2553 * ada-exp.y (block_lookup): Update.
2554 (select_possible_type_sym): Change type of syms. Remove nsyms
2556 (write_var_or_type, write_name_assoc): Update.
2558 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2560 * windows-nat.c (windows_nat_target::xfer_partial): Return
2561 TARGET_XFER_E_IO if we need to delegate to the target beneath
2562 but BENEATH is NULL.
2564 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2566 * Makefile.in (config.status): Add configure.nat as a
2569 2018-06-04 Tom Tromey <tom@tromey.com>
2571 * cp-name-parser.y (cpname_state): Add method declarations.
2572 (HANDLE_QUAL): Update.
2573 (cpname_state::d_grab, cpname_state::fill_comp)
2574 (cpname_state::make_operator, cpname_state::make_dtor)
2575 (cpname_state::make_builtin_type, cpname_state::make_name)
2576 (cpname_state::d_qualify, cpname_state::d_int_type)
2577 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2578 (%union): Move earlier.
2580 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2582 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2584 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2586 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2587 (aarch64_pseudo_write_1): Likewise.
2588 (aarch64_pseudo_read_value): Use helper.
2589 (aarch64_pseudo_write): Likewise.
2591 2018-06-04 Pedro Alves <palves@redhat.com>
2593 * darwin-nat.c (darwin_ops): Delete.
2594 (darwin_attach_pid): Use get_native_target.
2596 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2598 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2599 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2601 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2603 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2604 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2605 (aarch64_gdbarch_init): Check for SVE.
2606 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2608 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2610 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2611 * aarch64-tdep.h (aarch64_read_description): Likewise.
2612 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2613 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2614 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2615 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2616 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2618 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2620 * value.c (value_fetch_lazy_bitfield): New.
2621 (value_fetch_lazy_memory): New.
2622 (value_fetch_lazy_register): New.
2623 (value_fetch_lazy): Factor out to smaller functions.
2625 2018-06-01 Tom Tromey <tom@tromey.com>
2627 * cp-name-parser.y (backslashable, represented): Now const.
2629 2018-06-01 Tom Tromey <tom@tromey.com>
2631 * cp-name-parser.y: Include parser-defs.h.
2632 (parser_fprintf): Remove declaration.
2634 2018-06-01 Tom Tromey <tom@tromey.com>
2636 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2638 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2639 (global_result): Remove globals.
2640 (struct cpname_state): New.
2641 (yyparse): Don't declare.
2642 (yylex, yyerror): Move declarations after %union.
2643 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2644 (make_name): Add state parameter.
2646 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2648 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2650 (yylex): Add lvalp, state parameters.
2651 (yyerror): Add state parameter.
2652 (cp_demangled_name_to_comp): Update.
2654 2018-06-01 Tom Tromey <tom@tromey.com>
2656 * cp-name-parser.y (parser_fprintf): Declare.
2657 (GDB_YY_REMAP_PREFIX): Define.
2658 Include yy-remap.h. Don't redefine yy* identifiers.
2660 2018-06-01 Tom Tromey <tom@tromey.com>
2662 * python/py-type.c (typy_legacy_template_argument): Update.
2663 * cp-support.h (cp_demangled_name_to_comp): Update.
2664 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2665 parameter to be a "std::string *".
2668 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2670 * ada-lex.l: Include "diagnostics.h" instead of
2671 "common/diagnostics.h".
2672 * unittests/environ-selftests.c: Likewise.
2673 * common/diagnostics.h: Moved to ../include.
2675 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2677 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2678 to language_mode_manual while calling breakpoint_re_set_one.
2680 2018-06-01 Tom Tromey <tom@tromey.com>
2682 * valops.c (value_cast_structs, destructor_name_p): Update.
2683 * symtab.c (gdb_mangle_name): Update.
2684 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2686 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2687 (pascal_object_print_value_fields, pascal_object_print_value):
2689 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2690 * linespec.c (find_methods): Update.
2691 * gdbtypes.h (type_name_no_tag): Remove.
2692 (type_name_or_error): Rename from type_name_no_tag_or_error.
2693 * gdbtypes.c (type_name_no_tag): Remove.
2694 (type_name_or_error): Rename from type_name_no_tag_or_error.
2695 (lookup_struct_elt_type, check_typedef): Update.
2696 * expprint.c (print_subexp_standard): Update.
2697 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2698 * d-namespace.c (d_lookup_nested_symbol): Update.
2699 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2700 (cp_print_class_member): Update.
2701 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2702 * completer.c (add_struct_fields): Update.
2703 * c-typeprint.c (cp_type_print_derivation_info)
2704 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2706 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2707 (ada_prefer_type, ada_is_exception_sym): Update.
2709 2018-06-01 Tom Tromey <tom@tromey.com>
2711 * valops.c (enum_constant_from_type, value_namespace_elt)
2712 (value_maybe_namespace_elt): Update.
2713 * valarith.c (find_size_for_pointer_math): Update.
2714 * target-descriptions.c (make_gdb_type): Update.
2715 * symmisc.c (print_symbol): Update.
2716 * stabsread.c (define_symbol, read_type)
2717 (complain_about_struct_wipeout, add_undefined_type)
2718 (cleanup_undefined_types_1): Update.
2719 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2720 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2721 (rust_internal_print_type, rust_composite_type)
2722 (rust_evaluate_funcall, rust_evaluate_subexp)
2723 (rust_inclusive_range_type_p): Update.
2724 * python/py-type.c (typy_get_tag): Update.
2725 * p-typeprint.c (pascal_type_print_base): Update.
2726 * mdebugread.c (parse_symbol, parse_type): Update.
2727 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2729 * guile/scm-type.c (gdbscm_type_tag): Update.
2730 * go-lang.c (sixg_string_p): Update.
2731 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2733 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2734 (TYPE_TAG_NAME): Remove.
2735 * gdbtypes.c (type_name_no_tag): Simplify.
2736 (check_typedef, check_types_equal, recursive_dump_type)
2737 (copy_type_recursive, arch_composite_type): Update.
2738 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2739 in summary mode when needed.
2740 * eval.c (evaluate_funcall): Update.
2741 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2742 (process_structure_scope, read_enumeration_type)
2743 (read_namespace_type, read_module_type, determine_prefix): Update.
2744 * cp-support.c (inspect_type): Update.
2745 * coffread.c (process_coff_symbol, decode_base_type): Update.
2746 * c-varobj.c (c_is_path_expr_parent): Update.
2747 * c-typeprint.c (c_type_print_base_struct_union): Update.
2748 (c_type_print_base_1): Update. Print struct/class/union/enum in
2749 summary when using C language.
2750 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2751 (gen_maybe_namespace_elt): Update.
2752 * ada-lang.c (ada_type_name): Simplify.
2753 (empty_record, ada_template_to_fixed_record_type_1)
2754 (template_to_static_fixed_type)
2755 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2757 2018-06-01 Tom Tromey <tom@tromey.com>
2759 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2761 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2762 (c_print_type): Update.
2763 (c_print_type): New overload.
2764 (c_type_print_varspec_prefix, c_type_print_args)
2765 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2766 (c_type_print_base_struct_union, c_type_print_base_1)
2767 (cp_type_print_method_args): Add "language" parameter.
2768 (c_type_print_base): Update.
2769 * c-lang.h (c_print_type): Add new overload.
2771 2018-06-01 Tom Tromey <tom@tromey.com>
2773 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2774 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2776 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2778 * aarch64-tdep.c (aarch64_sve_register_names): New const
2780 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2781 (AARCH64_SVE_Z_REGS_NUM): New define.
2782 (AARCH64_SVE_P_REGS_NUM): Likewise.
2783 (AARCH64_SVE_NUM_REGS): Likewise.
2785 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2787 * nat/linux-ptrace.h [__alpha__]
2788 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2791 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2793 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2794 the endianness selected.
2795 * NEWS: Document `set endian auto' mode operation update.
2797 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2799 * Makefile.in: Add new header.
2800 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2801 (sve_vl_from_vg): Likewise.
2802 (sve_vq_from_vl): Likewise.
2803 (sve_vl_from_vq): Likewise.
2804 (sve_vq_from_vg): Likewise.
2805 (sve_vg_from_vq): Likewise.
2806 * configure.nat: Add new c file.
2807 * nat/aarch64-sve-linux-ptrace.c: New file.
2808 * nat/aarch64-sve-linux-ptrace.h: New file.
2810 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2812 * aarch64-linux-nat.c (aarch64_linux_read_description):
2814 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2816 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2817 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2818 (aarch64_gdbarch_init): Add parmeter zero.
2819 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2820 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2821 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2823 * doc/gdb.texinfo: Describe SVE feature
2824 * features/aarch64-sve.c: New file.
2826 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2829 * gdbarch.sh (significant_addr_bit): Default to zero when
2830 not set by target architecture.
2831 * gdbarch.c: Re-generated.
2832 * utils.c (address_significant): Update.
2834 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2836 * stack.c (func_command): Remove trailing newline in call to error.
2838 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2840 * regcache.h (regcache_raw_collect): Remove, update callers to
2841 use regcache::raw_collect.
2842 * regcache.c (regcache_raw_collect): Remove.
2844 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2846 * regcache.h (regcache_raw_supply): Remove, update callers to
2847 use detached_regcache::raw_supply.
2848 * regcache.c (regcache_raw_supply): Remove.
2850 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2852 * regcache.h (regcache_cooked_write_part): Remove, update
2853 callers to use regcache::cooked_write_part.
2854 * regcache.c (regcache_cooked_write_part): Remove.
2856 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2858 * regcache.h (regcache_cooked_read_part): Remove, update callers
2859 to use readable_regcache::cooked_read_part.
2860 * regcache.c (regcache_cooked_read_part): Remove.
2862 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2864 * regcache.h (regcache_cooked_read_value): Remove, update
2865 callers to use readable_regcache::cooked_read_value.
2866 * regcache.c (regcache_cooked_read_value): Remove.
2868 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2870 * regcache.h (regcache_cooked_write): Remove, update callers to
2871 use regcache::cooked_write.
2872 * regcache.c (regcache_cooked_write): Remove.
2874 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2876 * regcache.h (regcache_invalidate): Remove, update callers to
2877 use detached_regcache::invalidate instead.
2878 * regcache.c (regcache_invalidate): Remove.
2880 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2882 * regcache.h (regcache_raw_write_part): Remove, update callers
2883 to use regcache::raw_write_part instead.
2884 * regcache.c (regcache_raw_write_part): Remove.
2886 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2888 * regcache.h (regcache_raw_read_part): Remove, update callers to
2889 use readable_regcache::raw_read_part instead.
2890 * regcache.c (regcache_raw_read_part): Remove.
2892 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2894 * regcache.h (regcache_cooked_read): Remove, update callers to
2895 use readable_regcache::cooked_read instead.
2896 * regcache.c (regcache_cooked_read): Remove.
2898 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2900 * regcache.h (regcache_raw_write): Remove, update callers to use
2901 regcache::raw_write instead.
2902 * regcache.c (regcache_raw_write): Remove.
2904 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2906 * regcache.h (regcache_raw_read): Remove, update callers to use
2907 readable_regcache::raw_read instead.
2908 * regcache.c (regcache_raw_read): Remove.
2910 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2912 * regcache.h (regcache_raw_update): Remove, update callers to
2913 use readable_regcache::raw_update instead.
2914 * regcache.c (regcache_raw_update): Remove.
2916 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2918 * regcache.h (regcache_register_status): Remove, update callers
2919 to use reg_buffer::get_register_status directly instead.
2920 * regcache.c (regcache_register_status): Remove.
2922 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2924 * regcache.h (regcache_get_ptid): Remove, update all callers to
2925 call regcache::ptid instead.
2926 * regcache.c (regcache_get_ptid): Remove.
2928 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2930 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2932 2018-05-30 Pedro Alves <palves@redhat.com>
2934 * common/common-exceptions.h (exception_rethrow): Use
2937 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2939 * breakpoint.c (print_solib_event, check_status_catch_solib):
2940 Remove struct keyword in range-based for loops.
2941 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2942 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2944 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2946 * symfile.c (addr_info_make_relative): Likewise.
2947 * thread.c (value_in_thread_stack_temporaries): Likewise.
2949 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2952 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2953 aggregate type to get its real type before accessing it.
2955 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2957 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2958 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2959 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2960 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2961 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2962 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2963 * printcmd.c (info_address_command): Likewise.
2965 2018-05-29 Tom Tromey <tom@tromey.com>
2967 * windows-nat.c (handle_exception): Update fall-through comment.
2969 2018-05-29 Tom Tromey <tom@tromey.com>
2971 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2972 (struct program_space) <added_solibs>: Now a std::vector.
2973 * breakpoint.c (print_solib_event): Update.
2974 (check_status_catch_solib): Update.
2975 * progspace.c (clear_program_space_solib_cache): Update.
2976 * solib.c (update_solib_list): Update.
2978 2018-05-29 Tom Tromey <tom@tromey.com>
2980 * python/py-type.c (typy_richcompare): Update.
2981 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2982 * gdbtypes.h (types_deeply_equal): Return bool.
2983 (types_equal): Likewise.
2984 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2986 (check_types_equal): Change worklist to std::vector. Return
2988 (struct type_equality_entry): Add constructor.
2989 (compare_maybe_null_strings): Return bool.
2990 (check_types_worklist): Return bool. Change worklist to
2992 (types_deeply_equal): Use std::vector.
2993 (types_equal): Return bool.
2994 (compare_maybe_null_strings): Simplify.
2996 2018-05-29 Tom Tromey <tom@tromey.com>
2998 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3000 2018-05-29 Tom Tromey <tom@tromey.com>
3002 * objc-lang.h: Don't include cp-support.h.
3003 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3006 2018-05-27 Tom Tromey <tom@tromey.com>
3008 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3010 2018-05-25 Tom Tromey <tom@tromey.com>
3012 * value.c (value::location): Initialize.
3014 2018-05-25 Tom Tromey <tom@tromey.com>
3016 * dbxread.c (init_bincl_list): Remove.
3017 (bincl_list): Now a std::vector.
3018 (bincls_allocated, next_bincl): Remove.
3019 (free_bincl_list, do_free_bincl_list_cleanup)
3020 (make_cleanup_free_bincl_list): Remove.
3021 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3023 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3024 (struct header_file_location): Add constructor.
3025 (add_bincl_to_list): Remove.
3027 2018-05-25 Tom Tromey <tom@tromey.com>
3029 * tui/tui.c (tui_enable): Update.
3030 * mi/mi-interp.c (mi_interp::init): Update.
3031 * interps.h (class interp) <name>: New method.
3032 <m_name>: Rename from name.
3033 (~scoped_restore_interp): Update.
3034 * interps.c (interp::interp): Update.
3035 (interp_add, interp_set, interp_lookup_existing)
3036 (current_interp_named_p): Update.
3038 2018-05-25 Tom Tromey <tom@tromey.com>
3040 * interps.c (interp_name): Remove.
3041 * mi/mi-interp.c (mi_interp::init): Update.
3042 * interps.h (interp_name): Remove.
3043 (~scoped_restore_interp): Update.
3044 * tui/tui.c (tui_enable): Update.
3046 2018-05-25 Tom Tromey <tom@tromey.com>
3048 * utils.c (fputs_maybe_filtered): Update.
3049 * linespec.c (decode_line_full): Update.
3050 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3051 (mi_print_breakpoint_for_event, mi_solib_loaded)
3052 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3053 (mi_user_selected_context_changed): Update.
3054 * mi/mi-main.c (mi_execute_command): Update.
3055 * cli/cli-script.c (execute_control_command): Update.
3056 * python/python.c (execute_gdb_command): Update.
3057 * solib.c (info_sharedlibrary_command): Update.
3058 * interps.c (interp_ui_out): Remove.
3059 * interps.h (interp_ui_out): Remove.
3061 2018-05-25 Tom Tromey <tom@tromey.com>
3063 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3064 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3065 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3067 2018-05-25 Tom Tromey <tom@tromey.com>
3069 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3070 * interps.c (interp_exec): Use scoped_restore.
3072 2018-05-25 Tom Tromey <tom@tromey.com>
3074 * remote.c (remote_target::remote_file_get): Use
3076 (remote_target::remote_file_put): Likewise.
3078 2018-05-25 Tom Tromey <tom@tromey.com>
3080 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3082 (get_pe_section_index, add_pe_exported_sym): Update.
3083 (read_pe_exported_syms): Use gdb::def_vector.
3085 2018-05-25 Tom Tromey <tom@tromey.com>
3087 * frame.c (remove_prev_frame): Remove.
3088 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3090 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3092 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3094 * mips-linux-nat.c (supply_fpregset): Always call
3095 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3096 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3097 `mips_fill_fpregset'.
3098 * mips-linux-tdep.c (mips_supply_fpregset)
3099 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3100 (mips_fill_fpregset_wrapper): Remove functions.
3101 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3102 (mips_linux_fpregset): Remove variable.
3103 (mips_linux_iterate_over_regset_sections): Use
3104 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3105 (mips_linux_o32_sigframe_init): Remove comment.
3107 2018-05-25 Pedro Alves <palves@redhat.com>
3109 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3110 (struct readahead_cache, struct packet_reg, struct
3111 remote_arch_state, class remote_state): Move higher up in the
3113 (remote_target::m_remote_state): Now an object instead of a pointer.
3114 (remote_target::get_remote_state): Adjust.
3116 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3118 * stack.c (select_and_print_frame): Delete.
3119 (struct function_bounds): Move struct within function.
3120 (func_command): Most content moved into new function
3121 find_frame_for_function, use new function, print result, add
3123 (find_frame_for_function): New function, now returns a result.
3125 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3127 * stack.c (iterate_over_block_arg_vars): Fix comment.
3128 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3130 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3134 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3136 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3138 * frame.h (class scoped_restore_selected_frame): New class.
3139 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3140 of any exception, use scoped_restore_selected_frame to restore the
3143 2018-05-24 Pedro Alves <palves@redhat.com>
3145 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3148 2018-05-23 Tom Tromey <tom@tromey.com>
3150 * complaints.c (struct complaints): Remove.
3151 (symfile_complaint_book): Remove.
3152 (series): New global.
3153 (complaint_internal): Update.
3154 (clear_complaints): Update.
3156 2018-05-23 Tom Tromey <tom@tromey.com>
3158 * complaints.c (counters): New global.
3159 (struct complain): Remove.
3160 (struct complaints) <root>: Remove.
3161 (complaint_sentinel): Remove.
3162 (symfile_complaint_book): Update.
3163 (find_complaint) Remove.
3164 (complaint_internal, clear_complaints): Update.
3166 2018-05-23 Tom Tromey <tom@tromey.com>
3168 * complaints.c (struct complain) <file, line>: Remove.
3169 (find_complaint): Remove file, line parameters.
3170 (complaint_internal): Update.
3172 2018-05-23 Tom Tromey <tom@tromey.com>
3174 * complaints.c (vcomplaint): Remove.
3175 (complaint_internal) Merge in contents of vcomplaint.
3177 2018-05-23 Tom Tromey <tom@tromey.com>
3179 * complaints.c (struct complaints) <explanation>: Remove.
3180 (symfile_explanations): Remove.
3181 (symfile_complaint_book): Update.
3182 (vcomplaint): Update.
3183 (struct explanation): Remove.
3185 2018-05-23 Tom Tromey <tom@tromey.com>
3187 * complaints.c (symfile_complaints): Remove.
3188 (complaint_internal): Remove "complaints" parameter.
3189 (clear_complaints, vcomplaint): Remove "c" parameter.
3190 (get_complaints): Remove.
3191 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3192 (dwarf2_debug_line_missing_file_complaint)
3193 (dwarf2_debug_line_missing_end_sequence_complaint)
3194 (dwarf2_complex_location_expr_complaint)
3195 (dwarf2_const_value_length_mismatch_complaint)
3196 (dwarf2_section_buffer_overflow_complaint)
3197 (dwarf2_macro_malformed_definition_complaint)
3198 (dwarf2_invalid_attrib_class_complaint)
3199 (create_addrmap_from_index, dw2_symtab_iter_next)
3200 (dw2_expand_marked_cus)
3201 (dw2_debug_names_iterator::find_vec_in_debug_names)
3202 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3203 (create_debug_type_hash_table, init_cutu_and_read_dies)
3204 (partial_die_parent_scope, add_partial_enumeration)
3205 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3206 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3207 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3208 (create_cus_hash_table, create_dwp_hash_table)
3209 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3210 (dwarf2_rnglists_process, dwarf2_ranges_process)
3211 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3212 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3213 (handle_struct_member_die, process_structure_scope)
3214 (read_array_type, read_common_block, read_module_type)
3215 (read_tag_pointer_type, read_typedef, read_base_type)
3216 (read_subrange_type, load_partial_dies, partial_die_info::read)
3217 (partial_die_info::read, partial_die_info::read)
3218 (partial_die_info::read, read_checked_initial_length_and_offset)
3219 (dwarf2_string_attr, read_formatted_entries)
3220 (dwarf_decode_line_header)
3221 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3222 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3223 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3224 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3225 (get_signatured_type, get_DW_AT_signature_type)
3226 (decode_locdesc, file_file_name, consume_improper_spaces)
3227 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3228 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3229 (dwarf2_symbol_mark_computed, set_die_type)
3230 (read_attribute_value): Update.
3231 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3233 * dbxread.c (unknown_symtype_complaint)
3234 (lbrac_mismatch_complaint, repeated_header_complaint)
3235 (set_namestring, function_outside_compilation_unit_complaint)
3236 (read_dbx_symtab, process_one_symbol): Update.
3237 * gdbtypes.c (stub_noname_complaint): Update.
3238 * windows-nat.c (handle_unload_dll): Update.
3239 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3240 (decode_base_type): Update.
3241 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3242 (eb_complaint, record_include_begin, record_include_end)
3243 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3244 (process_xcoff_symbol, read_symbol)
3245 (function_outside_compilation_unit_complaint)
3246 (scan_xcoff_symtab): Update.
3247 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3248 * buildsym.c (finish_block_internal, make_blockvector)
3249 (end_symtab_get_static_block, augment_type_symtab): Update.
3250 * dtrace-probe.c (dtrace_process_dof)
3251 (dtrace_static_probe_ops::get_probes): Update.
3252 * complaints.h (struct complaint): Don't declare.
3253 (symfile_complaints): Remove.
3254 (complaint_internal): Remove "complaints" parameter.
3255 (complaint): Likewise.
3256 (clear_complaints): Likewise.
3257 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3258 (reread_symbols): Update.
3259 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3260 (dwarf2_frame_cache, decode_frame_entry): Update.
3261 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3262 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3263 (info_selectors_command): Update.
3264 * macrotab.c (macro_include, check_for_redefinition)
3265 (macro_undef): Update.
3266 * objfiles.c (filter_overlapping_sections): Update.
3267 * stabsread.c (invalid_cpp_abbrev_complaint)
3268 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3269 (define_symbol, error_type, read_type, rs6000_builtin_type)
3270 (stabs_method_name_from_physname, read_member_functions)
3271 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3272 (attach_fields_to_type, complain_about_struct_wipeout)
3273 (read_range_type, read_args, common_block_start)
3274 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3276 * mdebugread.c (index_complaint, unknown_ext_complaint)
3277 (basic_type_complaint, bad_tag_guess_complaint)
3278 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3279 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3280 (parse_procedure, parse_lines)
3281 (function_outside_compilation_unit_complaint)
3282 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3283 (bad_tag_guess_complaint, reg_value_complaint): Update.
3284 * cp-support.c (demangled_name_complaint): Update.
3285 * macroscope.c (sal_macro_scope): Update.
3286 * dwarf-index-write.c (class debug_names): Update.
3288 2018-05-23 Tom Tromey <tom@tromey.com>
3290 * complaints.c (clear_complaints): Remove "noisy" parameter.
3291 * complaints.h (clear_complaints): Update.
3292 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3293 (reread_symbols): Update.
3295 2018-05-23 Tom Tromey <tom@tromey.com>
3297 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3299 (vcomplaint, clear_complaints): Update.
3300 (symfile_explanations): Remove some messages.
3302 2018-05-23 Tom Tromey <tom@tromey.com>
3304 * complaints.c (internal_complaint): Remove.
3305 * complaints.h (internal_complaint): Remove.
3307 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3309 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3311 2018-05-22 Pedro Alves <palves@redhat.com>
3313 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3314 (remote_fileio_badfd, remote_fileio_return_errno)
3315 (remote_fileio_return_success, remote_fileio_func_open)
3316 (remote_fileio_func_open, remote_fileio_func_close)
3317 (remote_fileio_func_read, remote_fileio_func_write)
3318 (remote_fileio_func_lseek, remote_fileio_func_rename)
3319 (remote_fileio_func_unlink, remote_fileio_func_stat)
3320 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3321 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3322 remote_target parameter.
3323 (remote_fio_func_map) <func>: Add remote_target parameter.
3324 (do_remote_fileio_request, remote_fileio_request):
3325 * remote-fileio.h (remote_fileio_request):
3326 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3327 remote_target parameter.
3328 (remote_notif_process, handle_notification): Adjust to pass down
3330 (remote_notif_state_allocate): Add remote_target parameter. Save
3332 * remote-notif.h (struct remote_target): Forward declare.
3333 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3334 remote_target parameter.
3335 (struct remote_notif_state) <remote>: New field.
3336 (remote_notif_ack, remote_notif_parse): Add remote_target
3338 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3339 remote_target parameter.
3340 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3341 (threads_listing_context, rmt_thread_action, protocol_feature)
3342 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3343 (packet_result, struct threads_listing_context, remote_state):
3344 Move definitions and declarations higher up.
3345 (remote_target) <~remote_target>: Declare.
3346 (remote_download_command_source, remote_file_put, remote_file_get)
3347 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3348 (remote_hostio_pread_vFile, remote_hostio_send_command)
3349 (remote_hostio_set_filesystem, remote_hostio_open)
3350 (remote_hostio_close, remote_hostio_unlink, remote_state)
3351 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3352 (get_memory_write_packet_size, get_memory_read_packet_size)
3353 (append_pending_thread_resumptions, remote_detach_1)
3354 (append_resumption, remote_resume_with_vcont)
3355 (add_current_inferior_and_thread, wait_ns, wait_as)
3356 (process_stop_reply, remote_notice_new_inferior)
3357 (process_initial_stop_replies, remote_add_thread)
3358 (btrace_sync_conf, remote_btrace_maybe_reopen)
3359 (remove_new_fork_children, kill_new_fork_children)
3360 (discard_pending_stop_replies, stop_reply_queue_length)
3361 (check_pending_events_prevent_wildcard_vcont)
3362 (discard_pending_stop_replies_in_queue, stop_reply)
3363 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3364 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3365 (remote_interrupt_as, remote_interrupt_ns)
3366 (remote_get_noisy_reply, remote_query_attached)
3367 (remote_add_inferior, remote_current_thread, get_current_thread)
3368 (set_thread, set_general_thread, set_continue_thread)
3369 (set_general_process, write_ptid)
3370 (remote_unpack_thread_info_response, remote_get_threadinfo)
3371 (parse_threadlist_response, remote_get_threadlist)
3372 (remote_threadlist_iterator, remote_get_threads_with_ql)
3373 (remote_get_threads_with_qxfer)
3374 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3375 (get_offsets, remote_check_symbols, remote_supported_packet)
3376 (remote_query_supported, remote_packet_size)
3377 (remote_serial_quit_handler, remote_detach_pid)
3378 (remote_vcont_probe, remote_resume_with_hc)
3379 (send_interrupt_sequence, interrupt_query)
3380 (remote_notif_get_pending_events, fetch_register_using_p)
3381 (send_g_packet, process_g_packet, fetch_registers_using_g)
3382 (store_register_using_P, store_registers_using_G)
3383 (set_remote_traceframe, check_binary_download)
3384 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3385 (remote_xfer_live_readonly_partial, remote_read_bytes)
3386 (remote_send_printf, remote_flash_write, readchar)
3387 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3388 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3389 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3390 (extended_remote_disable_randomization, extended_remote_run)
3391 (send_environment_packet, extended_remote_environment_support)
3392 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3393 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3394 (packet_command): Now methods of ...
3395 (remote_target): ... this class.
3396 (m_remote_state) <remote_target>: New field.
3397 (struct remote_state) <stop_reply_queue,
3398 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3400 (remote_state::remote_state): Allocate stop_reply_queue.
3401 (remote_state): Delete global.
3402 (get_remote_state_raw): Delete.
3403 (remote_target::get_remote_state): Allocate m_remote_state on
3405 (get_current_remote_target): New.
3406 (remote_ops, extended_remote_ops): Delete.
3407 (wait_forever_enabled_p, remote_async_inferior_event_token):
3408 Delete, moved to struct remote_state.
3409 (remote_target::close): Delete self. Destruction bits split to
3411 (remote_target::~remote_target): ... this.
3412 (show_memory_packet_size): Adjust to use
3413 get_current_remote_target.
3414 (struct protocol_feature) <func>: Add remote_target parameter.
3415 All callers adjusted.
3416 (curr_quit_handler_target): New.
3417 (remote_serial_quit_handler): Reimplement.
3418 (remote_target::open_1): Adjust to use get_current_remote_target.
3419 Heap-allocate remote_target/extended_remote_target instances.
3420 (vcont_builder::vcont_builder): Add remote_target parameter, and
3421 save it in m_remote. All callers adjusted.
3422 (vcont_builder::m_remote): New field.
3423 (vcont_builder::restart, vcont_builder::flush)
3424 (vcont_builder::push_action): Use it.
3425 (remote_target::commit_resume): Use it.
3426 (struct queue_iter_param) <remote>: New field.
3427 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3428 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3429 (check_pending_event_prevents_wildcard_vcont_callback)
3430 (remote_target::check_pending_events_prevent_wildcard_vcont)
3431 (remote_target::discard_pending_stop_replies)
3432 (remote_target::discard_pending_stop_replies_in_queue)
3433 (remote_target::remote_notif_remove_queued_reply): Fill in
3435 (remote_notif_get_pending_events): New.
3436 (remote_target::readchar, remote_target::remote_serial_write):
3437 Save/restore curr_quit_handler_target.
3439 (kill_new_fork_children): Fill in 'remote' field.
3440 (packet_command): Use get_current_remote_target, defer to
3441 remote_target method of same name.
3442 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3443 parameter, and save it in m_remote. All callers adjusted.
3444 (scoped_remote_fd::release): Use m_remote.
3445 (scoped_remote_fd::m_remote): New field.
3446 (remote_file_put, remote_file_get, remote_file_delete): Use
3447 get_current_remote_target, defer to remote_target method of same
3449 (remote_btrace_reset): Add remote_state paremeter. Update all
3451 (remote_async_inferior_event_handler). Pass down 'data'.
3452 (remote_new_objfile): Use get_current_remote_target.
3453 (remote_target::vcont_r_supported): New.
3454 (set_range_stepping): Use get_current_remote_target and
3455 remote_target::vcont_r_supported.
3456 (_initialize_remote): Don't allocate 'remote_state' and
3457 'stop_reply_queue' globals.
3458 * remote.h (struct remote_target): Forward declare.
3459 (getpkt, putpkt, remote_notif_get_pending_events): Add
3460 'remote_target' parameter.
3462 2018-05-22 Pedro Alves <palves@redhat.com>
3464 * remote.c (vcont_builder): Now a class. Make all data members
3466 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3468 (vcont_builder_restart): Rename to ...
3469 (vcont_builder::restart): ... this.
3470 (vcont_builder_flush): Rename to ...
3471 (vcont_builder::flush): ... this.
3472 (vcont_builder_push_action): Rename to ...
3473 (vcont_builder::push_action): ... this.
3474 (remote_target::commit_resume): Adjust.
3476 2018-05-22 Pedro Alves <palves@redhat.com>
3478 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3479 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3480 (get_fixed_memory_packet_size): New.
3481 (get_memory_packet_size): Use it.
3482 (set_memory_packet_size): Don't override the config size with
3483 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3484 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3485 Don't refer to get_memory_packet_size if not connected to a remote
3486 target. Show "(default)" if configured size is 0.
3488 2018-05-22 Pedro Alves <palves@redhat.com>
3490 * remote.c (remote_target::mourn_inferior): Move
3491 discard_pending_stop_replies call here from ...
3492 (_initialize_remote): ... here.
3494 2018-05-22 Pedro Alves <palves@redhat.com>
3496 * remote.c (compare_section_command): Remove set_general_process
3499 2018-05-22 Pedro Alves <palves@redhat.com>
3501 * remote.c (struct packet_reg, struct remote_arch_state):
3502 Move higher up in the file.
3503 (remote_state) <m_arch_states>: Store remote_arch_state values
3504 instead of remote_arch_state pointers.
3505 (remote_state::get_remote_arch_state): Adjust.
3507 2018-05-22 Pedro Alves <palves@redhat.com>
3509 * remote.c: Include <unordered_map>.
3510 (remote_state): Now a class.
3511 (remote_state) <get_remote_arch_state>: Declare method.
3512 <get_remote_arch_state>: New field.
3513 (remote_arch_state) <remote_arch_state>: Declare ctor.
3514 <regs>: Now a unique_ptr.
3515 (remote_gdbarch_data_handle): Delete.
3516 (get_remote_arch_state): Delete.
3517 (remote_state::get_remote_arch_state): New.
3518 (get_remote_state): Adjust to call remote_state's
3519 get_remote_arch_state method.
3520 (init_remote_state): Delete, bits factored out to ...
3521 (remote_arch_state::remote_arch_state): ... this new method.
3522 (get_remote_packet_size, get_memory_packet_size)
3523 (process_g_packet, remote_target::fetch_registers)
3524 (remote_target::prepare_to_store, store_registers_using_G)
3525 (remote_target::store_registers, remote_target::get_trace_status):
3526 Adjust to call remote_state's method.
3527 (_initialize_remote): Remove reference to
3528 remote_gdbarch_data_handle.
3530 2018-05-22 Pedro Alves <palves@redhat.com>
3532 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3533 pread>: New method declarations.
3534 (remote_target::open_1): Adjust.
3535 (readahead_cache_invalidate): Rename to ...
3536 (readahead_cache::invalidate): ... this, and adjust to be a class
3538 (readahead_cache_invalidate_fd): Rename to ...
3539 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3541 (remote_hostio_pwrite): Adjust.
3542 (remote_hostio_pread_from_cache): Rename to ...
3543 (readahead_cache::pread): ... this, and adjust to be a class
3545 (remote_hostio_close): Adjust.
3547 2018-05-22 Pedro Alves <palves@redhat.com>
3549 * remote.c (remote_hostio_close_cleanup): Delete.
3550 (class scoped_remote_fd): New.
3551 (remote_file_put, remote_file_get): Use it.
3553 2018-05-22 Pedro Alves <palves@redhat.com>
3555 (struct vCont_action_support): Use bool and initialize all fields.
3556 (struct readahead_cache): Initialize all fields.
3557 (remote_state): Use bool and initialize all fields.
3558 (remote_state::remote_state, remote_state::~remote_state): New.
3559 (new_remote_state): Delete.
3560 (_initialize_remote): Use new to allocate remote_state.
3562 2018-05-22 Pedro Alves <palves@redhat.com>
3566 * c-exp.y: Include "c-support.h".
3567 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3568 of tolower. Use c_ident_is_alpha to scan names.
3569 * c-lang.c: Include "c-support.h".
3570 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3571 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3572 * c-support.h: New file, with bits factored out from ...
3573 * cp-name-parser.y: ... this file.
3574 Include "c-support.h".
3575 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3576 c-support.h and renamed.
3577 (symbol_end, yylex): Adjust.
3579 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3581 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3582 parameter type to CORE_ADDR.
3583 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3584 parameter type in declaration to CORE_ADDR.
3585 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3586 target_auxv_search to get AT_HWCAP and use the result to get the
3588 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3589 to CORE_ADDR. Remove the cast of the return value to unsigned
3590 long. Fix error predicate of target_auxv_search.
3591 (ppc_linux_nat_target::read_description): Change the type of the
3592 hwcap variable to CORE_ADDR.
3594 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3596 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3597 if the size of fpscr is larger than 32 bits.
3599 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3601 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3602 (ppc32_linux_vsxregmap): New global.
3603 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3604 regcache_supply_regset, and regcache_collect_regset.
3605 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3606 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3607 (fetch_vsx_register, store_vsx_register): Remove.
3608 (fetch_vsx_registers): Add regno parameter. Get regset using
3609 ppc_linux_vsxregset. Use regset to supply registers.
3610 (store_vsx_registers): Add regno parameter. Get regset using
3611 ppc_linux_vsxregset. Use regset to collect registers.
3612 (fetch_register): Call fetch_vsx_registers instead of
3614 (store_register): Call store_vsx_registers instead of
3616 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3617 new regno parameter.
3618 (store_ppc_registers): Call store_vsx_registers with -1 for the
3619 new regno parameter.
3620 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3621 (ppc_collect_vsxregset): Remove.
3623 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3625 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3627 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3628 for vector register offset fields.
3629 (ppc64_fbsd_reg_offsets): Likewise.
3630 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3631 to vector register offset fields.
3632 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3633 to vector register offset fields.
3634 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3635 vector register offset fields.
3636 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3637 initializers for vector register offset fields.
3638 (rs6000_aix64_reg_offsets): Likewise.
3639 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3640 (ppc_supply_vrregset): Remove.
3641 (ppc_collect_vrregset): Remove.
3642 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3643 (ppc_linux_vrregset) : New function.
3644 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3645 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3646 (ppc32_linux_vrregset): Remove.
3647 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3648 and use result instead of ppc32_linux_vrregset.
3649 (ppc32_linux_reg_offsets): Remove initializers for vector register
3651 (ppc64_linux_reg_offsets): Likewise.
3652 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3653 * ppc-linux-nat.c: Include regset.h.
3654 (gdb_vrregset_t): Adjust comment to account for little-endian
3656 (supply_vrregset, fill_vrregset): Remove.
3657 (fetch_altivec_register, store_altivec_register): Remove.
3658 (fetch_altivec_registers): Add regno parameter. Get regset using
3659 ppc_linux_vrregset. Use regset to supply registers.
3660 (store_altivec_registers): Add regno parameter. Get regset using
3661 ppc_linux_vrregset. Use regset to collect registers.
3662 (fetch_register): Call fetch_altivec_registers instead of
3663 fetch_altivec_register.
3664 (store_register): Call store_altivec_registers instead of
3665 store_altivec_register.
3666 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3667 the new regno parameter.
3668 (store_ppc_registers): Call store_altivec_registers with -1 for
3669 the new regno parameter.
3671 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3673 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3674 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3675 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3676 (gdb_vrregset_t): Change array type size to
3677 PPC_LINUX_SIZEOF_VRREGSET.
3678 (gdb_vsxregset_t): Change array type size to
3679 PPC_LINUX_SIZEOF_VSXREGSET.
3680 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3681 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3682 PPC_LINUX_SIZEOF_VSXREGSET.
3684 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3686 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3687 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3689 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3690 ppc_linux_target_wordsize with tid.
3691 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3693 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3694 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3695 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3696 tid parameter. Remove static specifier.
3697 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3698 (ppc_linux_target_wordsize): New declaration.
3700 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3702 * arch/ppc-linux-common.c: New file.
3703 * arch/ppc-linux-common.h: New file.
3704 * arch/ppc-linux-tdesc.h: New file.
3705 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3706 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3707 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3708 arch/ppc-linux-tdesc.h.
3709 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3710 arch/ppc-linux-tdesc.h.
3711 (ppc_linux_nat_target::read_description): Remove target
3712 description matching code. Fill a ppc_linux_features struct and
3713 call ppc_linux_match_description with it. Move comment about ISA
3714 2.05 to ppc-linux-common.c.
3715 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3716 arch/ppc-linux-tdesc.h.
3717 (ppc_linux_core_read_description): Remove target description
3718 matching code. Fill a ppc_linux_features struct and call
3719 ppc_linux_match_description with it.
3720 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3721 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3722 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3723 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3724 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3725 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3726 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3727 (tdesc_powerpc_e500l): Remove.
3729 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3731 * ada-lang.c (catch_assert_command): Pass empty string instead
3732 of NULL for excep_string argument.
3734 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3736 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3737 the width of the requested register exceeds the width of the
3740 2018-05-21 Tom Tromey <tom@tromey.com>
3742 * printcmd.c (output_command): Remove.
3743 (output_command_const): Rename to output_command.
3744 * valprint.h (output_command): Rename from output_command_const.
3745 * tracepoint.c (trace_dump_actions): Call output_command.
3747 2018-05-21 Tom Tromey <tom@tromey.com>
3749 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3750 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3751 * ada-lang.h (create_ada_exception_catchpoint): Update.
3752 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3754 (create_excep_cond_exprs, ~ada_catchpoint)
3755 (should_stop_exception, print_one_exception)
3756 (print_mention_exception, print_recreate_exception): Update.
3757 (ada_get_next_arg): Remove.
3758 (catch_ada_exception_command_split): Use std::string. Change type
3759 of "excep_string", "cond_string".
3760 (catch_ada_exception_command): Update.
3761 (create_ada_exception_catchpoint): Change type of excep_string.
3762 (ada_exception_sal): Remove excep_string parameter.
3763 (~ada_catchpoint): Remove.
3765 2018-05-21 Tom Tromey <tom@tromey.com>
3767 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3770 2018-05-21 Tom Tromey <tom@tromey.com>
3772 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3773 Return unique_xmalloc_ptr.
3774 (print_it_exception): Update.
3776 2018-05-21 Tom Tromey <tom@tromey.com>
3778 * tracepoint.c (trace_dump_actions): Use std::string.
3780 2018-05-21 Tom Tromey <tom@tromey.com>
3782 * symfile.c (reread_symbols): Use std::string for original_name.
3784 2018-05-21 Tom Tromey <tom@tromey.com>
3786 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3787 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3790 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3792 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3794 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3795 * objfiles.c (get_objfile_bfd_data): Allocate
3796 objfile_per_bfd_storage with obstack_new when allocating on
3799 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3801 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3803 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3804 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3805 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3806 (add_pending): Likewise.
3807 (parse_symbol): Likewise.
3808 (parse_partial_symbols): Likewise.
3809 (psymtab_to_symtab_1): Likewise.
3810 (new_psymtab): Likewise.
3811 (elfmdebug_build_psymtabs): Likewise.
3812 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3813 * objfiles.c (get_objfile_bfd_data): Likewise.
3814 (objfile_register_static_link): Likewise.
3815 * psymtab.c (allocate_psymtab): Likewise.
3816 * stabsread.c (read_member_functions): Likewise.
3817 * xcoffread.c (xcoff_end_psymtab): Likewise.
3819 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3821 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3822 compiler supports std::is_trivially_constructible.
3823 * common/poison.h: Include obstack.h.
3824 (IsMallocable): Define to is_trivially_constructible if the
3825 compiler supports it, define to true_type otherwise.
3829 (XOBNEWVEC): Redefine.
3830 * gdb_obstack.h (obstack_zalloc): New.
3831 (OBSTACK_ZALLOC): Redefine.
3832 (obstack_calloc): New.
3833 (OBSTACK_CALLOC): Redefine.
3835 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3836 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3838 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3839 obstack_calloc/obstack_zalloc.
3840 (gdbarch_obstack_zalloc): Remove.
3841 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3843 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3845 * stack.c (backtrace_command_1): Remove useless variable int i.
3847 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3849 * stack.c (print_frame_info): Fix comment.
3851 2018-05-18 Tom Tromey <tom@tromey.com>
3853 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3854 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3855 (~dwarf2_per_objfile): Update
3856 (dwarf2_get_dwz_file): Use new.
3857 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3860 2018-05-18 Tom Tromey <tom@tromey.com>
3862 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3864 * dwarf2read.c (struct dwp_file): Add constructor and
3866 (open_and_init_dwp_file): Return a unique_ptr.
3867 (dwarf2_per_objfile, create_dwp_hash_table)
3868 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3869 (lookup_dwo_unit_in_dwp): Update.
3870 (open_and_init_dwp_file, get_dwp_file): Update.
3872 2018-05-18 Tom Tromey <tom@tromey.com>
3874 * dwarf2read.c (dwarf2_per_objfile): Update.
3875 (struct mapped_index): Add initializers.
3876 (dwarf2_read_index): Use new.
3877 (dw2_symtab_iter_init): Update.
3878 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3881 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3883 * dwarf2read.c (mapped_index) <total_size>: Remove.
3885 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3887 * unittests/format_pieces-selftests.c (test_format_specifier):
3890 2018-05-18 Tom Tromey <tom@tromey.com>
3892 * c-typeprint.c (maybe_print_hole): New function.
3893 (c_print_type_struct_field_offset): Update.
3894 (c_type_print_base_struct_union): Call maybe_print_hole.
3896 2018-05-17 Keith Seitz <keiths@redhat.com>
3898 * breakpoint.c (build_bpstat_chain): New function, moved from
3900 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3901 If no stop chain is passed, call build_bpstat_chain to build it.
3902 * breakpoint.h (build_bpstat_chain): Declare.
3903 (bpstat_stop_status): Move documentation here from breakpoint.c.
3904 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3905 build the stop chain and pass it to skip_inline_frames.
3906 Pass this stop chain to bpstat_stop_status.
3907 * inline-frame.c: Include breakpoint.h.
3908 (stopped_by_user_bp_inline_frame): New function.
3909 (skip_inline_frames): Add parameter `stop_chain'.
3910 Move documention to inline-frame.h.
3911 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3912 whether the frame should be elided.
3913 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3914 Add moved documentation and update for new parameter.
3916 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3919 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3920 unittests/format_pieces-selftests.c.
3921 * common/format.h (format_piece) <operator==>: New.
3922 (format_pieces) <operator[]>: Remove.
3923 * common/format.c (format_pieces::format_pieces): Handle \e.
3924 * unittests/format_pieces-selftests.c: New.
3926 2018-05-17 Tom Tromey <tom@tromey.com>
3929 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3930 (dw2_instantiate_symtab): Add skip_partial parameter.
3931 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3932 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3933 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3934 (dw2_expand_symtabs_matching_one)
3935 (dw2_find_pc_sect_compunit_symtab)
3936 (dw2_debug_names_lookup_symbol)
3937 (dw2_debug_names_expand_symtabs_for_function): Update.
3938 (init_cutu_and_read_dies): Add skip_partial parameter.
3939 (process_psymtab_comp_unit, build_type_psymtabs_1)
3940 (process_skeletonless_type_unit, load_partial_comp_unit)
3941 (psymtab_to_symtab_1): Update.
3942 (load_full_comp_unit): Add skip_partial parameter.
3943 (process_imported_unit_die, dwarf2_read_addr_index)
3944 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3945 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3946 (read_signatured_type): Update.
3948 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3950 * value.c (release_value): Remove unused variable.
3951 (record_latest_value): Likewise.
3952 (access_value_history): Likewise.
3953 (preserve_values): Likewise.
3955 2018-05-17 Tom Tromey <tom@tromey.com>
3957 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3960 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3963 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3964 Also handle registers whose width is not a multiple of
3966 (linux_nat_trad_target::store_register): Likewise.
3968 2018-05-16 Tom Tromey <tom@tromey.com>
3970 * gdbcore.h (core_bfd): Redefine.
3971 * corelow.c (core_target::close): Update.
3972 (core_target_open): Update.
3973 * progspace.h (struct program_space) <cbfd>: Now a
3976 2018-05-16 Tom Tromey <tom@tromey.com>
3979 * symfile-add-flags.h (enum symfile_add_flags)
3980 <SYMFILE_NOT_FILENAME>: New constant.
3981 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3982 objfile name from BFD.
3983 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3984 * minidebug.c (find_separate_debug_file_in_section): Put
3985 ".gnu_debugdata" into BFD's file name.
3987 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3989 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3992 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3995 * aarch64-tdep.c (aarch64_analyze_prologue,
3996 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3997 Indicate not interested in errors.
3999 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4001 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4002 Supply the MIPS_ZERO_REGNUM register.
4004 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4006 * mips-tdep.c (mask_address_var): Make variable static.
4008 2018-05-14 Tom Tromey <tom@tromey.com>
4010 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4012 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4014 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4015 FXSAVE_ADDR for the mxcsr register.
4017 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4019 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4021 2018-05-11 Pedro Alves <palves@redhat.com>
4023 * corelow.c (core_target) <core_target>: No longer inline.
4024 Initialize m_core_gdbarch, m_core_vec and build the section table
4026 <~core_target>: New.
4027 <core_gdbarch, get_core_register_section>: New methods.
4028 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4029 factored out from ...
4030 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4032 (sniff_core_bfd): Add gdbarch parameter.
4033 (core_close): Delete, merged into ...
4034 (core_target::close): ... here. Delete self.
4035 (core_close_cleanup): Delete.
4036 (core_target_open): Allocate a core_target on the heap. Use a
4037 unique_ptr instead of a cleanup. Bits moved into the core_target
4038 ctor. Adjust to use core_target methods instead of globals.
4039 (get_core_register_section): Rename to ...
4040 (core_target::get_core_register_section): ... this and adjust.
4041 (struct get_core_registers_cb_data): New.
4042 (get_core_registers_cb): Use it. Use bool.
4043 (core_target::fetch_registers, core_target::files_info)
4044 (core_target::xfer_partial, core_target::read_description)
4045 (core_target::pid_to, core_target::thread_name): Adjust to
4046 reference class fields instead of globals.
4047 * target.h (struct target_ops_deleter, target_ops_up): New.
4049 2018-05-11 Pedro Alves <palves@redhat.com>
4051 * corefile.c (core_file_command): Move to corelow.c.
4052 * corelow.c (the_core_target): Delete.
4053 (core_file_command): Moved from corefile.c. Check exec_bfd
4054 instead of the_core_target. Use target_detach instead of calling
4055 into the_core_target directly.
4056 (maybe_say_no_core_file_now): New.
4057 (core_target::detach): Use it.
4058 (_initialize_corelow): Remove references to the_core_target.
4059 * gdbcore.h (the_core_target): Delete.
4061 2018-05-11 Tom Tromey <tromey@redhat.com>
4062 Pedro Alves <palves@redhat.com>
4064 * corefile.c (core_bfd): Remove.
4065 * gdbcore.h (core_bfd): Now a macro.
4066 * progspace.h (struct program_space) <cbfd>: New field.
4068 2018-05-11 Tom Tromey <tom@tromey.com>
4070 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4073 2018-05-10 Tom Tromey <tom@tromey.com>
4075 * configure: Rebuild.
4076 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4078 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4081 * regformats/regdat.sh: Adjust script, following the addition
4082 of the new expedite_regs parameter to init_target_desc.
4084 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4087 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4088 set_gdbarch_significant_addr_bit.
4089 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4090 set_gdbarch_significant_addr_bit.
4091 * utils.c (address_significant): Update to sign extend addr.
4093 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4095 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4096 (xtensa_linux_init_abi): Limit tdep->num_regs by
4097 tdep->num_nopriv_regs.
4098 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4099 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4102 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4104 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4106 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4108 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4109 (I387_MXCSR_INIT_VAL): New constant.
4110 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4111 buffer if it was supplied by the inferior.
4112 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4113 (i387_xsave_get_clear_bv): New function.
4114 (i387_supply_xsave): Only read x87 control registers from the
4115 xsave buffer if the feature is enabled, and the state will have
4116 been written, otherwise, provide a suitable default.
4117 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4118 including x87 control registers. Update control registers if they
4119 have changed from the default value, and mark features as enabled
4121 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4123 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4125 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4127 2018-05-07 Tom Tromey <tom@tromey.com>
4129 * configure: Rebuild.
4130 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4132 2018-05-07 Tom Tromey <tom@tromey.com>
4135 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4136 bit. Use correct value for VDIV.
4138 2018-05-04 Tom Tromey <tom@tromey.com>
4140 * configure: Rebuild.
4141 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4143 2018-05-04 Tom Tromey <tom@tromey.com>
4145 * linux-record.c (record_linux_system_call) <case
4146 RECORD_SYS_RECVFROM>: Add "break".
4148 2018-05-04 Tom Tromey <tom@tromey.com>
4150 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4151 Add missing "break".
4152 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4153 Add missing "break".
4155 2018-05-04 Tom Tromey <tom@tromey.com>
4157 * rs6000-tdep.c (ppc_process_record_op4)
4158 (ppc_process_record_op63): Add fall-through comment.
4160 2018-05-04 Tom Tromey <tom@tromey.com>
4162 * i386-tdep.c (i386_process_record): Add fall-through comment.
4164 2018-05-04 Tom Tromey <tom@tromey.com>
4166 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4169 2018-05-04 Tom Tromey <tom@tromey.com>
4171 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4172 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4173 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4175 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4177 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4180 2018-05-04 Tom Tromey <tom@tromey.com>
4182 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4184 2018-05-04 Tom Tromey <tom@tromey.com>
4186 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4187 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4188 * symfile.c (section_is_mapped): Fix fall-through comment.
4189 * stabsread.c (define_symbol, read_member_functions): Fix
4190 fall-through comment.
4191 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4193 * remote.c (remote_wait_as): Fix fall-through comment.
4194 * p-exp.y (yylex): Fix fall-through comment.
4195 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4197 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4198 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4199 * jv-exp.y (yylex): Fix fall-through comment.
4200 * go-exp.y (lex_one_token): Fix fall-through comment.
4201 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4202 fall-through comment.
4203 * f-exp.y (yylex): Fix fall-through comment.
4204 * dwarf2read.c (process_die): Fix fall-through comments.
4205 * dbxread.c (process_one_symbol): Fix fall-through comment.
4206 * d-exp.y (lex_one_token): Fix fall-through comment.
4207 * cp-name-parser.y (yylex): Fix fall-through comment.
4208 * coffread.c (coff_symtab_read): Fix fall-through comment.
4209 * c-exp.y (lex_one_token): Fix fall-through comment.
4210 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4212 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4215 2018-05-04 Tom Tromey <tom@tromey.com>
4218 * NEWS: Mention gdb.execute change.
4219 * gdbcmd.h (execute_control_command): Don't declare.
4220 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4221 execute_control_commands, execute_control_commands_to_string.
4222 * cli/cli-script.h (execute_control_commands)
4223 (execute_control_commands_to_string): Declare.
4224 (execute_control_command): Add from_tty parameter.
4225 * cli/cli-script.c (execute_control_commands)
4226 (execute_control_commands_to_string): New functions.
4227 (execute_user_command): Use execute_control_commands.
4228 (execute_control_command_1): Add "from_tty" parameter. Update.
4229 (execute_control_command): Likewise.
4231 2018-05-04 Tom Tromey <tom@tromey.com>
4234 * NEWS: Mention that breakpoint commands are writable.
4235 * python/py-breakpoint.c (bppy_set_commands): New function.
4236 (breakpoint_object_getset) <"commands">: Use it.
4238 2018-05-04 Tom Tromey <tom@tromey.com>
4240 * tracepoint.c (actions_command): Update.
4241 * mi/mi-cmd-break.c (mi_command_line_array)
4242 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4243 (mi_read_next_line): Remove.
4244 (mi_cmd_break_commands): Update.
4245 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4247 * cli/cli-script.c (get_command_line): Update.
4248 (process_next_line): Use function_view. Constify.
4249 (recurse_read_control_structure, read_command_lines)
4250 (read_command_lines_1): Change argument types to function_view.
4251 (do_define_command, document_command): Update.
4252 * breakpoint.h (check_tracepoint_command): Don't declare.
4253 * breakpoint.c (check_tracepoint_command): Remove.
4254 (commands_command_1, create_tracepoint_from_upload): Update.
4256 2018-05-04 Tom Tromey <tom@tromey.com>
4259 * cli/cli-script.h (enum command_control_type) <define_control>:
4261 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4262 (build_command_line, execute_control_command_1)
4263 (process_next_line): Likewise.
4264 (do_define_command): New function, extracted from define_command.
4265 (define_command): Use it.
4267 2018-05-04 Tom Tromey <tom@tromey.com>
4269 * tracepoint.c (actions_command): Update.
4270 * cli/cli-script.h (read_command_lines): Update.
4271 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4272 (MAX_TMPBUF): Remove define.
4273 (define_command): Use string_printf.
4274 (document_command): Likewise.
4275 * breakpoint.c (commands_command_1): Update.
4277 2018-05-04 Tom Tromey <tom@tromey.com>
4279 * top.c (execute_command): Update.
4280 * cli/cli-script.h (print_command_lines): Now varargs.
4281 * cli/cli-script.c (print_command_lines): Now varargs.
4282 (execute_control_command_1) <case while_control, case if_control>:
4285 2018-05-04 Tom Tromey <tom@tromey.com>
4287 * tracepoint.c (all_tracepoint_actions): Rename from
4288 all_tracepoint_actions_and_cleanup. Change return type.
4289 (actions_command, encode_actions_1, encode_actions)
4290 (trace_dump_actions, tdump_command): Update.
4291 * remote.c (remote_download_command_source): Update.
4292 * python/python.c (gdbpy_eval_from_control_command)
4293 (python_command, python_interactive_command): Update.
4294 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4295 * guile/guile.c (guile_command)
4296 (gdbscm_eval_from_control_command, guile_command): Update.
4297 * compile/compile.c (compile_code_command)
4298 (compile_print_command, compile_to_object): Update.
4299 * cli/cli-script.h (struct command_lines_deleter): New.
4300 (counted_command_line): New typedef.
4301 (struct command_line): Add constructor, destructor.
4302 <body_list>: Remove.
4303 <body_list_0, body_list_1>: New members.
4304 (command_line_up): Remove typedef.
4305 (read_command_lines, read_command_lines_1, get_command_line):
4307 (copy_command_lines): Don't declare.
4308 * cli/cli-script.c (build_command_line): Use "new".
4309 (get_command_line): Return counted_command_line.
4310 (print_command_lines, execute_user_command)
4311 (execute_control_command_1, while_command, if_command): Update.
4312 (realloc_body_list): Remove.
4313 (process_next_line, recurse_read_control_structure): Update.
4314 (read_command_lines, read_command_lines_1): Return counted_command_line.
4315 (free_command_lines): Use "delete".
4316 (copy_command_lines): Remove.
4317 (define_command, document_command, show_user_1): Update.
4318 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4319 a counted_command_line.
4320 * breakpoint.h (counted_command_line): Remove typedef.
4321 (breakpoint_set_commands): Update.
4322 * breakpoint.c (check_no_tracepoint_commands)
4323 (validate_commands_for_breakpoint): Update.
4324 (breakpoint_set_commands): Change commands to be a
4325 counted_command_line.
4326 (commands_command_1, update_dprintf_command_list)
4327 (create_tracepoint_from_upload): Update.
4329 2018-05-04 Tom Tromey <tom@tromey.com>
4331 * cli/cli-decode.h (cmd_list_element): New constructor.
4332 (~cmd_list_element): New destructor.
4333 (struct cmd_list_element): Add initializers.
4334 * cli/cli-decode.c (do_add_cmd): Use "new".
4335 (delete_cmd): Use "delete".
4337 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4338 Pedro Alves <palves@redhat.com>
4340 PR breakpoints/19806 and support for PR external/20207.
4341 * NEWS: Mention Aarch64 watchpoint improvements.
4342 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4343 watchpoints and PR external/20207 watchpoints.
4344 * nat/aarch64-linux-hw-point.c
4345 (kernel_supports_any_contiguous_range): New.
4346 (aarch64_watchpoint_offset): New.
4347 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4348 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4349 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4350 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4351 next_addr_orig_p. Support PR external/20207 watchpoints.
4352 (aarch64_downgrade_regs): New.
4353 (aarch64_dr_state_insert_one_point): New parameters offset and
4355 (aarch64_dr_state_remove_one_point): Likewise.
4356 (aarch64_handle_breakpoint): Update caller.
4357 (aarch64_handle_aligned_watchpoint): Likewise.
4358 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4360 (aarch64_linux_set_debug_regs): Remove const from state. Call
4361 aarch64_downgrade_regs.
4362 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4363 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4364 (DR_CONTROL_MASK): ... this.
4365 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4366 (unsigned int aarch64_watchpoint_offset): New prototype.
4367 (aarch64_linux_set_debug_regs): Remove const from state.
4368 * utils.c (align_up, align_down): Move to ...
4369 * common/common-utils.c (align_up, align_down): ... here.
4370 * utils.h (align_up, align_down): Move to ...
4371 * common/common-utils.h (align_up, align_down): ... here.
4373 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4375 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4376 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4377 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4378 Re-implement to match the ABI as summarized in GCC's
4379 gcc/config/sparc/sparc.c. All callers updated.
4380 (sparc32_store_arguments): Remove assertion.
4382 2018-05-04 Tom Tromey <tom@tromey.com>
4384 * printcmd.c: Don't include tui.h.
4385 (decode_format): Use skip_spaces.
4387 2018-05-04 Tom Tromey <tom@tromey.com>
4390 * printcmd.c (last_count): New global.
4391 (x_command): Use saved count when repeating.
4393 2018-05-04 Tom Tromey <tom@tromey.com>
4395 * nto-procfs.c (do_closedir_cleanup): Remove.
4396 (procfs_pidlist): Use gdb_dir_up.
4397 * procfs.c (do_closedir_cleanup): Remove.
4398 (proc_update_threads): Use gdb_dir_up.
4399 * common/filestuff.h (struct gdb_dir_deleter): New.
4400 (gdb_dir_up): New typedef.
4402 2018-05-04 Tom Tromey <tom@tromey.com>
4404 * ada-lang.c (print_mention_exception): Use std::string.
4406 2018-05-04 Tom Tromey <tom@tromey.com>
4408 * ada-lang.c (create_excep_cond_exprs): Update.
4409 (ada_exception_catchpoint_cond_string): Use std::string.
4411 2018-05-04 Tom Tromey <tom@tromey.com>
4413 * ada-lang.c (xget_renaming_scope): Return std::string.
4414 (old_renaming_is_invisible): Update.
4416 2018-05-04 Tom Tromey <tom@tromey.com>
4418 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4419 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4421 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4423 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4425 2018-05-04 Tom Tromey <tom@tromey.com>
4427 * remote.c (remote_query_supported_append): Change type.
4428 (remote_check_symbols): Update.
4430 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4433 * configure.ac: Prepend libpython.
4434 * python/python-config.py: Likewise.
4435 * configure: Regenerate.
4437 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4439 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4441 2018-05-03 Pedro Alves <palves@redhat.com>
4444 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4445 override. Write 'true' instead of '1'.
4446 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4449 2018-05-02 Pedro Alves <palves@redhat.com>
4451 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4452 add_inf_child_target.
4453 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4454 add_inf_child_target.
4455 * aix-thread.c (aix_thread_target_info): New.
4456 (aix_thread_target) <shortname, longname, doc>: Delete.
4458 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4459 add_inf_child_target.
4460 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4461 add_inf_child_target.
4462 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4463 add_inf_child_target.
4464 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4465 add_inf_child_target.
4466 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4467 add_inf_child_target.
4468 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4469 add_inf_child_target.
4470 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4471 add_inf_child_target.
4472 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4473 add_inf_child_target.
4474 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4475 add_inf_child_target.
4476 * bfd-target.c (target_bfd_target_info): New.
4477 (target_bfd) <shortname, longname, doc>: Delete.
4479 * bsd-kvm.c (bsd_kvm_target_info): New.
4480 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4482 (bsd_kvm_target::open): Rename to ...
4483 (bsd_kvm_target_open): ... this. Adjust.
4484 * bsd-uthread.c (bsd_uthread_target_info): New.
4485 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4487 * corefile.c (core_file_command): Adjust.
4488 * corelow.c (core_target_info): New.
4489 (core_target) <shortname, longname, doc>: Delete.
4491 (core_target::open): Rename to ...
4492 (core_target_open): ... this. Adjust.
4493 * ctf.c (ctf_target_info): New.
4494 (ctf_target) <shortname, longname, doc>: Delete.
4496 (ctf_target::open): Rename to ...
4497 (ctf_target_open): ... this.
4498 (_initialize_ctf): Adjust.
4499 * exec.c (exec_target_info): New.
4500 (exec_target) <shortname, longname, doc>: Delete.
4502 (exec_target::open): Rename to ...
4503 (exec_target_open): ... this.
4504 * gdbcore.h (core_target_open): Declare.
4505 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4506 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4507 add_inf_child_target.
4508 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4509 add_inf_child_target.
4510 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4511 add_inf_child_target.
4512 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4513 add_inf_child_target.
4514 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4515 add_inf_child_target.
4516 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4517 add_inf_child_target.
4518 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4519 add_inf_child_target.
4520 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4521 add_inf_child_target.
4522 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4523 add_inf_child_target.
4524 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4525 add_inf_child_target.
4526 * inf-child.c (inf_child_target_info): New.
4527 (inf_child_target::info): New.
4528 (inf_child_open_target): Remove 'target' parameter. Use
4529 get_native_target instead.
4530 (inf_child_target::open): Delete.
4531 (add_inf_child_target): New.
4532 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4535 (add_inf_child_target): Declare.
4536 (inf_child_open_target): Declare.
4537 * linux-thread-db.c (thread_db_target_info): New.
4538 (thread_db_target) <shortname, longname, doc>: Delete.
4540 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4541 add_inf_child_target.
4542 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4543 add_inf_child_target.
4544 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4545 add_inf_child_target.
4546 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4547 add_inf_child_target.
4548 * make-target-delegates (print_class): Adjust.
4549 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4550 add_inf_child_target.
4551 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4552 add_inf_child_target.
4553 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4554 add_inf_child_target.
4555 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4556 add_inf_child_target.
4557 * nto-procfs.c (nto_native_target_info): New.
4558 (nto_procfs_target_native) <shortname, longname, doc>:
4561 (nto_procfs_target_info): New.
4562 (nto_procfs_target_procfs) <shortname, longname, doc>:
4565 (init_procfs_targets): Adjust.
4566 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4567 add_inf_child_target.
4568 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4569 add_inf_child_target.
4570 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4571 add_inf_child_target.
4572 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4573 add_inf_child_target.
4574 * ravenscar-thread.c (ravenscar_target_info): New.
4575 (ravenscar_thread_target) <shortname, longname, doc>:
4578 * record-btrace.c (record_btrace_target_info):
4579 (record_btrace_target) <shortname, longname, doc>: Delete.
4581 (record_btrace_target::open): Rename to ...
4582 (record_btrace_target_open): ... this. Adjust.
4583 * record-full.c (record_longname, record_doc): New.
4584 (record_full_base_target) <shortname, longname, doc>: Delete.
4586 (record_full_target_info): New.
4587 (record_full_target): <shortname>: Delete.
4589 (record_full_core_open_1, record_full_open_1): Update comments.
4590 (record_full_base_target::open): Rename to ...
4591 (record_full_open): ... this.
4592 (cmd_record_full_restore): Update.
4593 (_initialize_record_full): Update.
4594 * remote-sim.c (remote_sim_target_info): New.
4595 (gdbsim_target) <shortname, longname, doc>: Delete.
4597 (gdbsim_target::open): Rename to ...
4598 (gdbsim_target_open): ... this.
4599 (_initialize_remote_sim): Adjust.
4600 * remote.c (remote_doc): New.
4601 (remote_target_info): New.
4602 (remote_target) <shortname, longname, doc>: Delete.
4604 (extended_remote_target_info): New.
4605 (extended_remote_target) <shortname, longname, doc>: Delete.
4607 (remote_target::open_1): Make static. Adjust.
4608 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4609 * s390-linux-nat.c (_initialize_s390_nat): Use
4610 add_inf_child_target.
4611 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4612 add_inf_child_target.
4613 * sol-thread.c (thread_db_target_info): New.
4614 (sol_thread_target) <shortname, longname, doc>: Delete.
4616 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4617 add_inf_child_target.
4618 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4619 add_inf_child_target.
4620 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4621 add_inf_child_target.
4622 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4623 add_inf_child_target.
4624 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4625 add_inf_child_target.
4626 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4627 add_inf_child_target.
4628 * spu-linux-nat.c (_initialize_spu_nat): Use
4629 add_inf_child_target.
4630 * spu-multiarch.c (spu_multiarch_target_info): New.
4631 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4633 * target-delegates.c: Regenerate.
4634 * target.c: Include <unordered_map>.
4635 (target_ops_p): Delete.
4636 (DEF_VEC_P(target_ops_p)): Delete.
4637 (target_factories): New.
4638 (test_target_info): New.
4639 (test_target_ops::info): New.
4640 (open_target): Adjust to use target_factories.
4641 (add_target_with_completer): Rename to ...
4642 (add_target): ... this. Change prototype. Register target_info
4643 and open callback in target_factories. Register target_info in
4644 command context instead of target_ops.
4645 (add_target): Delete old implementation.
4646 (add_deprecated_target_alias): Change prototype. Adjust.
4647 (the_native_target): New.
4648 (set_native_target, get_native_target): New.
4649 (find_default_run_target): Use the_native_target.
4650 (find_attach_target, find_run_target): Simplify.
4651 (target_ops::open): Delete.
4652 (dummy_target_info): New.
4653 (dummy_target::shortname, dummy_target::longname)
4654 (dummy_target::doc): Delete.
4655 (dummy_target::info): New.
4656 (debug_target::shortname, debug_target::longname)
4657 (debug_target::doc): Delete.
4658 (debug_target::info): New.
4659 * target.h (struct target_info): New.
4660 (target_ops::~target_ops): Add comment.
4661 (target_ops::info): New.
4662 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4663 longer virtual. Implement in terms of target_info.
4664 (set_native_target, get_native_target): Declare.
4665 (target_open_ftype): New.
4666 (add_target, add_target_with_completer)
4667 (add_deprecated_target_alias): Change prototype.
4668 (test_target) <shortname, longname, doc>: Delete.
4670 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4671 add_inf_child_target.
4672 * tracefile-tfile.c (tfile_target_info): New.
4673 (tfile_target) <shortname, longname, doc>: Delete.
4675 (tfile_target::open): Rename to ...
4676 (tfile_target_open): ... this.
4677 (_initialize_tracefile_tfile): Adjust.
4678 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4679 add_inf_child_target.
4680 * windows-nat.c (_initialize_windows_nat): Use
4681 add_inf_child_target.
4682 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4683 add_inf_child_target.
4685 2018-05-02 Pedro Alves <palves@redhat.com>
4687 * linux-nat.h (linux_nat_target) <low_new_thread,
4688 low_delete_thread, low_new_fork, low_forget_process,
4689 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4690 New virtual methods.
4691 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4692 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4693 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4694 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4695 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4697 * linux-fork.c (delete_fork): Adjust to call low method.
4698 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4699 (linux_nat_new_fork, linux_nat_forget_process_hook)
4700 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4701 (linux_nat_status_is_event):
4702 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4703 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4705 (sigtrap_is_event): Rename to ...
4706 (linux_nat_target::low_status_is_event): ... this.
4707 (linux_nat_set_status_is_event): Delete.
4708 (save_stop_reason, linux_nat_wait_1)
4709 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4711 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4712 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4713 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4714 (linux_nat_set_prepare_to_resume): Delete.
4715 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4716 low virtual methods.
4717 * amd64-linux-nat.c: Likewise.
4718 * arm-linux-nat.c: Likewise.
4719 * i386-linux-nat.c: Likewise.
4720 * ia64-linux-nat.c: Likewise.
4721 * mips-linux-nat.c: Likewise.
4722 * ppc-linux-nat.c: Likewise.
4723 * s390-linux-nat.c: Likewise.
4724 * sparc64-linux-nat.c: Likewise.
4725 * x86-linux-nat.c: Likewise.
4726 * x86-linux-nat.h: Include "nat/x86-linux.h".
4727 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4728 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4731 2018-05-02 Pedro Alves <palves@redhat.com>
4733 * target.h (target_ops)
4734 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4735 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4736 stopped_by_watchpoint, have_continuable_watchpoint,
4737 stopped_data_address, watchpoint_addr_within_range,
4738 can_accel_watchpoint_condition, can_run, thread_alive,
4739 has_all_memory, has_memory, has_stack, has_registers,
4740 has_execution, can_async_p, is_async_p, supports_non_stop,
4741 always_non_stop_p, can_execute_reverse, supports_multi_process,
4742 supports_enable_disable_tracepoint,
4743 supports_disable_randomization, supports_string_tracing,
4744 supports_evaluation_of_breakpoint_conditions,
4745 can_run_breakpoint_commands, filesystem_is_local,
4746 can_download_tracepoint, get_trace_state_variable_value,
4747 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4748 record_is_replaying, record_will_replay,
4749 augmented_libraries_svr4_read>: Adjust to return bool.
4750 * aarch64-linux-nat.c: All implementations adjusted.
4751 * aix-thread.c: All implementations adjusted.
4752 * arm-linux-nat.c: All implementations adjusted.
4753 * breakpoint.c: All implementations adjusted.
4754 * bsd-kvm.c: All implementations adjusted.
4755 * bsd-uthread.c: All implementations adjusted.
4756 * corelow.c: All implementations adjusted.
4757 * ctf.c: All implementations adjusted.
4758 * darwin-nat.c: All implementations adjusted.
4759 * darwin-nat.h: All implementations adjusted.
4760 * exec.c: All implementations adjusted.
4761 * fbsd-nat.c: All implementations adjusted.
4762 * fbsd-nat.h: All implementations adjusted.
4763 * gnu-nat.c: All implementations adjusted.
4764 * gnu-nat.h: All implementations adjusted.
4765 * go32-nat.c: All implementations adjusted.
4766 * ia64-linux-nat.c: All implementations adjusted.
4767 * inf-child.c: All implementations adjusted.
4768 * inf-child.h: All implementations adjusted.
4769 * inf-ptrace.c: All implementations adjusted.
4770 * inf-ptrace.h: All implementations adjusted.
4771 * linux-nat.c: All implementations adjusted.
4772 * linux-nat.h: All implementations adjusted.
4773 * mips-linux-nat.c: All implementations adjusted.
4774 * nto-procfs.c: All implementations adjusted.
4775 * ppc-linux-nat.c: All implementations adjusted.
4776 * procfs.c: All implementations adjusted.
4777 * ravenscar-thread.c: All implementations adjusted.
4778 * record-btrace.c: All implementations adjusted.
4779 * record-full.c: All implementations adjusted.
4780 * remote-sim.c: All implementations adjusted.
4781 * remote.c: All implementations adjusted.
4782 * s390-linux-nat.c: All implementations adjusted.
4783 * sol-thread.c: All implementations adjusted.
4784 * spu-multiarch.c: All implementations adjusted.
4785 * target-delegates.c: All implementations adjusted.
4786 * target.c: All implementations adjusted.
4787 * target.h: All implementations adjusted.
4788 * tracefile-tfile.c: All implementations adjusted.
4789 * tracefile.c: All implementations adjusted.
4790 * tracefile.h: All implementations adjusted.
4791 * windows-nat.c: All implementations adjusted.
4792 * x86-linux-nat.h: All implementations adjusted.
4793 * x86-nat.h: All implementations adjusted.
4795 2018-05-02 Pedro Alves <palves@redhat.com>
4797 * make-target-delegates (scan_target_h): Don't trim lines here.
4798 Replace sequences of tabs and/or whitespace with a single
4800 (top level, parsing methods): Trim each line before processing it
4803 2018-05-02 Pedro Alves <palves@redhat.com>
4804 John Baldwin <jhb@freebsd.org>
4806 * target.h (enum strata) <debug_stratum>: New.
4807 (struct target_ops) <all delegation methods>: Replace by C++
4808 virtual methods, and drop "to_" prefix. All references updated
4810 <to_shortname, to_longname, to_doc, to_data,
4811 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4812 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4813 virtual methods. All references updated throughout.
4814 <can_attach, supports_terminal_ours, can_create_inferior,
4815 get_thread_control_capabilities, attach_no_wait>: New
4817 <insert_breakpoint, remove_breakpoint>: Now
4818 TARGET_DEFAULT_NORETURN methods.
4819 <info_proc>: Now returns bool.
4821 (OPS_MAGIC): Delete.
4822 (current_target): Delete. All references replaced by references
4824 (target_stack): ... this. New.
4825 (target_shortname, target_longname): Adjust.
4826 (target_can_run): Now a function declaration.
4827 (default_child_has_all_memory, default_child_has_memory)
4828 (default_child_has_stack, default_child_has_registers)
4829 (default_child_has_execution): Remove target_ops parameter.
4830 (complete_target_initialization): Delete.
4831 (memory_breakpoint_target): New template class.
4832 (test_target_ops): Refactor as a C++ class with virtual methods.
4833 * make-target-delegates (NAME_PART): Tighten.
4834 (POINTER_PART, CP_SYMBOL): New.
4835 (SIMPLE_RETURN_PART): Reimplement.
4836 (VEC_RETURN_PART): Expect less.
4837 (RETURN_PART, VIRTUAL_PART): New.
4838 (METHOD): Adjust to C++ virtual methods.
4839 (scan_target_h): Remove reference to C99.
4840 (dname): Output "target_ops::" prefix.
4841 (write_function_header): Adjust to output a C++ class method.
4842 (write_declaration): New.
4843 (write_delegator): Adjust to output a C++ class method.
4844 (tdname): Output "dummy_target::" prefix.
4845 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4847 (tdefault_names, debug_names): Delete.
4848 (return_types, tdefaults, styles, argtypes_array): New.
4849 (top level): All methods are delegators.
4851 (top level): Print dummy_target and debug_target classes.
4852 * target-delegates.c: Regenerate.
4853 * target-debug.h (target_debug_print_enum_info_proc_what)
4854 (target_debug_print_thread_control_capabilities)
4855 (target_debug_print_thread_info_p): New.
4856 * target.c (dummy_target): Delete.
4857 (the_dummy_target, the_debug_target): New.
4858 (target_stack): Now extern.
4859 (set_targetdebug): Push/unpush debug target.
4860 (default_child_has_all_memory, default_child_has_memory)
4861 (default_child_has_stack, default_child_has_registers)
4862 (default_child_has_execution): Remove target_ops parameter.
4863 (complete_target_initialization): Delete.
4864 (add_target_with_completer): No longer call
4865 complete_target_initialization.
4866 (target_supports_terminal_ours): Use regular delegation.
4867 (update_current_target): Delete.
4868 (push_target): No longer check magic number. Don't call
4869 update_current_target.
4870 (unpush_target): Don't call update_current_target.
4871 (target_is_pushed): No longer check magic number.
4872 (target_require_runnable): Skip for all stratums over
4874 (target_ops::info_proc): New.
4875 (target_info_proc): Use find_target_at and
4876 find_default_run_target.
4877 (target_supports_disable_randomization): Use regular delegation.
4878 (target_get_osdata): Use find_target_at.
4879 (target_ops::open, target_ops::close, target_ops::can_attach)
4880 (target_ops::attach, target_ops::can_create_inferior)
4881 (target_ops::create_inferior, target_ops::can_run)
4882 (target_can_run): New.
4883 (default_fileio_target): Use regular delegation.
4884 (target_ops::fileio_open, target_ops::fileio_pwrite)
4885 (target_ops::fileio_pread, target_ops::fileio_fstat)
4886 (target_ops::fileio_close, target_ops::fileio_unlink)
4887 (target_ops::fileio_readlink): New.
4888 (target_fileio_open_1, target_fileio_unlink)
4889 (target_fileio_readlink): Always call the target method. Handle
4891 (return_zero, return_zero_has_execution): Delete.
4892 (init_dummy_target): Delete.
4893 (dummy_target::dummy_target, dummy_target::shortname)
4894 (dummy_target::longname, dummy_target::doc)
4895 (debug_target::debug_target, debug_target::shortname)
4896 (debug_target::longname, debug_target::doc): New.
4897 (target_supports_delete_record): Use regular delegation.
4898 (setup_target_debug): Delete.
4899 (maintenance_print_target_stack): Skip debug_stratum.
4900 (initialize_targets): Instantiate the_dummy_target and
4902 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4904 (target_auxv_search, fprint_target_auxv): Adjust.
4905 (info_auxv_command): Adjust to use target_stack.
4906 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4907 * exceptions.c (print_flush): Handle a NULL target_stack.
4908 * regcache.c (target_ops_no_register): Refactor as class with
4911 * exec.c (exec_target): New class.
4912 (exec_ops): Now an exec_target.
4913 (exec_open, exec_close_1, exec_get_section_table)
4914 (exec_xfer_partial, exec_files_info, exec_has_memory)
4915 (exec_make_note_section): Refactor as exec_target methods.
4916 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4918 (exec_target::find_memory_regions): New.
4919 (_initialize_exec): Don't call init_exec_ops.
4920 * gdbcore.h (exec_file_clear): Delete.
4922 * corefile.c (core_target): Delete.
4923 (core_file_command): Adjust.
4924 * corelow.c (core_target): New class.
4925 (the_core_target): New.
4926 (core_close): Remove target_ops parameter.
4927 (core_close_cleanup): Adjust.
4928 (core_target::close): New.
4929 (core_open, core_detach, get_core_registers, core_files_info)
4930 (core_xfer_partial, core_thread_alive, core_read_description)
4931 (core_pid_to_str, core_thread_name, core_has_memory)
4932 (core_has_stack, core_has_registers, core_info_proc): Rework as
4933 core_target methods.
4934 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4935 (_initialize_corelow): Initialize the_core_target.
4936 * gdbcore.h (core_target): Delete.
4937 (the_core_target): New.
4939 * ctf.c: (ctf_target): New class.
4940 (ctf_ops): Now a ctf_target.
4941 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4942 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4943 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4945 (init_ctf_ops): Delete.
4946 (_initialize_ctf): Don't call it.
4947 * tracefile-tfile.c (tfile_target): New class.
4948 (tfile_ops): Now a tfile_target.
4949 (tfile_open, tfile_close, tfile_files_info)
4950 (tfile_get_tracepoint_status, tfile_trace_find)
4951 (tfile_fetch_registers, tfile_xfer_partial)
4952 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4953 Refactor as tfile_target methods.
4954 (tfile_xfer_partial_features): Remove target_ops parameter.
4955 (init_tfile_ops): Delete.
4956 (_initialize_tracefile_tfile): Don't call it.
4957 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4958 (tracefile_has_stack, tracefile_has_registers)
4959 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4960 tracefile_target methods.
4961 (init_tracefile_ops): Delete.
4962 (tracefile_target::tracefile_target): New.
4963 * tracefile.h: Include "target.h".
4964 (tracefile_target): New class.
4965 (init_tracefile_ops): Delete.
4967 * spu-multiarch.c (spu_multiarch_target): New class.
4968 (spu_ops): Now a spu_multiarch_target.
4969 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4970 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4971 (spu_search_memory, spu_mourn_inferior): Refactor as
4972 spu_multiarch_target methods.
4973 (init_spu_ops): Delete.
4974 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4975 complete_target_initialization.
4977 * ravenscar-thread.c (ravenscar_thread_target): New class.
4978 (ravenscar_ops): Now a ravenscar_thread_target.
4979 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4980 (ravenscar_thread_alive, ravenscar_pid_to_str)
4981 (ravenscar_fetch_registers, ravenscar_store_registers)
4982 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4983 (ravenscar_stopped_by_hw_breakpoint)
4984 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4985 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4986 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4988 (init_ravenscar_thread_ops): Delete.
4989 (_initialize_ravenscar): Remove references to
4990 init_ravenscar_thread_ops and complete_target_initialization.
4992 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4993 (bsd_uthread_target): New class.
4994 (bsd_uthread_ops): Now a bsd_uthread_target.
4995 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4996 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4997 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4998 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4999 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5000 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5001 (bsd_uthread_target): Delete function.
5002 (_initialize_bsd_uthread): Remove reference to
5003 complete_target_initialization.
5005 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5006 (target_bfd): ... this new class.
5007 (target_bfd_xfer_partial, target_bfd_get_section_table)
5008 (target_bfd_close): Refactor as target_bfd methods.
5009 (target_bfd::~target_bfd): New.
5010 (target_bfd_reopen): Adjust.
5011 (target_bfd::close): New.
5013 * record-btrace.c (record_btrace_target): New class.
5014 (record_btrace_ops): Now a record_btrace_target.
5015 (record_btrace_open, record_btrace_stop_recording)
5016 (record_btrace_disconnect, record_btrace_close)
5017 (record_btrace_async, record_btrace_info)
5018 (record_btrace_insn_history, record_btrace_insn_history_range)
5019 (record_btrace_insn_history_from, record_btrace_call_history)
5020 (record_btrace_call_history_range)
5021 (record_btrace_call_history_from, record_btrace_record_method)
5022 (record_btrace_is_replaying, record_btrace_will_replay)
5023 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5024 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5025 (record_btrace_store_registers, record_btrace_prepare_to_store)
5026 (record_btrace_to_get_unwinder)
5027 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5028 (record_btrace_commit_resume, record_btrace_wait)
5029 (record_btrace_stop, record_btrace_can_execute_reverse)
5030 (record_btrace_stopped_by_sw_breakpoint)
5031 (record_btrace_supports_stopped_by_sw_breakpoint)
5032 (record_btrace_stopped_by_hw_breakpoint)
5033 (record_btrace_supports_stopped_by_hw_breakpoint)
5034 (record_btrace_update_thread_list, record_btrace_thread_alive)
5035 (record_btrace_goto_begin, record_btrace_goto_end)
5036 (record_btrace_goto, record_btrace_stop_replaying_all)
5037 (record_btrace_execution_direction)
5038 (record_btrace_prepare_to_generate_core)
5039 (record_btrace_done_generating_core): Refactor as
5040 record_btrace_target methods.
5041 (init_record_btrace_ops): Delete.
5042 (_initialize_record_btrace): Remove reference to
5043 init_record_btrace_ops.
5044 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5045 the execution_direction global.
5046 (record_full_base_target, record_full_target)
5047 (record_full_core_target): New classes.
5048 (record_full_ops): Now a record_full_target.
5049 (record_full_core_ops): Now a record_full_core_target.
5050 (record_full_target::detach, record_full_target::disconnect)
5051 (record_full_core_target::disconnect)
5052 (record_full_target::mourn_inferior, record_full_target::kill):
5054 (record_full_open, record_full_close, record_full_async): Refactor
5055 as methods of the record_full_base_target class.
5056 (record_full_resume, record_full_commit_resume): Refactor
5057 as methods of the record_full_target class.
5058 (record_full_wait, record_full_stopped_by_watchpoint)
5059 (record_full_stopped_data_address)
5060 (record_full_stopped_by_sw_breakpoint)
5061 (record_full_supports_stopped_by_sw_breakpoint)
5062 (record_full_stopped_by_hw_breakpoint)
5063 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5064 methods of the record_full_base_target class.
5065 (record_full_store_registers, record_full_xfer_partial)
5066 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5067 Refactor as methods of the record_full_target class.
5068 (record_full_can_execute_reverse, record_full_get_bookmark)
5069 (record_full_goto_bookmark, record_full_execution_direction)
5070 (record_full_record_method, record_full_info, record_full_delete)
5071 (record_full_is_replaying, record_full_will_replay)
5072 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5073 (record_full_stop_replaying): Refactor as methods of the
5074 record_full_base_target class.
5075 (record_full_core_resume, record_full_core_kill)
5076 (record_full_core_fetch_registers)
5077 (record_full_core_prepare_to_store)
5078 (record_full_core_store_registers, record_full_core_xfer_partial)
5079 (record_full_core_insert_breakpoint)
5080 (record_full_core_remove_breakpoint)
5081 (record_full_core_has_execution): Refactor
5082 as methods of the record_full_core_target class.
5083 (record_full_base_target::supports_delete_record): New.
5084 (init_record_full_ops): Delete.
5085 (init_record_full_core_ops): Delete.
5086 (record_full_save): Refactor as method of the
5087 record_full_base_target class.
5088 (_initialize_record_full): Remove references to
5089 init_record_full_ops and init_record_full_core_ops.
5091 * remote.c (remote_target, extended_remote_target): New classes.
5092 (remote_ops): Now a remote_target.
5093 (extended_remote_ops): Now an extended_remote_target.
5094 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5095 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5096 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5097 (remote_pass_signals, remote_set_syscall_catchpoint)
5098 (remote_program_signals, )
5099 (remote_thread_always_alive): Remove target_ops parameter.
5100 (remote_thread_alive, remote_thread_name)
5101 (remote_update_thread_list, remote_threads_extra_info)
5102 (remote_static_tracepoint_marker_at)
5103 (remote_static_tracepoint_markers_by_strid)
5104 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5105 (remote_open): Refactor as methods of remote_target.
5106 (extended_remote_open, extended_remote_detach)
5107 (extended_remote_attach, extended_remote_post_attach):
5108 (extended_remote_supports_disable_randomization)
5109 (extended_remote_create_inferior): : Refactor as method of
5110 extended_remote_target.
5111 (remote_set_permissions, remote_open_1, remote_detach)
5112 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5113 (remote_resume, remote_commit_resume, remote_stop)
5114 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5115 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5116 (remote_prepare_to_store, remote_store_registers)
5117 (remote_flash_erase, remote_flash_done, remote_files_info)
5118 (remote_kill, remote_mourn, remote_insert_breakpoint)
5119 (remote_remove_breakpoint, remote_insert_watchpoint)
5120 (remote_watchpoint_addr_within_range)
5121 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5122 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5123 (remote_supports_stopped_by_sw_breakpoint)
5124 (remote_stopped_by_hw_breakpoint)
5125 (remote_supports_stopped_by_hw_breakpoint)
5126 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5127 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5128 (remote_verify_memory): Refactor as methods of remote_target.
5129 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5131 (remote_xfer_partial, remote_get_memory_xfer_limit)
5132 (remote_search_memory, remote_rcmd, remote_memory_map)
5133 (remote_pid_to_str, remote_get_thread_local_address)
5134 (remote_get_tib_address, remote_read_description): Refactor as
5135 methods of remote_target.
5136 (remote_target::fileio_open, remote_target::fileio_pwrite)
5137 (remote_target::fileio_pread, remote_target::fileio_close): New.
5138 (remote_hostio_readlink, remote_hostio_fstat)
5139 (remote_filesystem_is_local, remote_can_execute_reverse)
5140 (remote_supports_non_stop, remote_supports_disable_randomization)
5141 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5142 (remote_supports_enable_disable_tracepoint)
5143 (remote_supports_string_tracing)
5144 (remote_can_run_breakpoint_commands, remote_trace_init)
5145 (remote_download_tracepoint, remote_can_download_tracepoint)
5146 (remote_download_trace_state_variable, remote_enable_tracepoint)
5147 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5148 (remote_trace_start, remote_get_trace_status)
5149 (remote_get_tracepoint_status, remote_trace_stop)
5150 (remote_trace_find, remote_get_trace_state_variable_value)
5151 (remote_save_trace_data, remote_get_raw_trace_data)
5152 (remote_set_disconnected_tracing, remote_core_of_thread)
5153 (remote_set_circular_trace_buffer, remote_traceframe_info)
5154 (remote_get_min_fast_tracepoint_insn_len)
5155 (remote_set_trace_buffer_size, remote_set_trace_notes)
5156 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5157 (remote_disable_btrace, remote_teardown_btrace)
5158 (remote_read_btrace, remote_btrace_conf)
5159 (remote_augmented_libraries_svr4_read, remote_load)
5160 (remote_pid_to_exec_file, remote_can_do_single_step)
5161 (remote_execution_direction, remote_thread_handle_to_thread_info):
5162 Refactor as methods of remote_target.
5163 (init_remote_ops, init_extended_remote_ops): Delete.
5164 (remote_can_async_p, remote_is_async_p, remote_async)
5165 (remote_thread_events, remote_upload_tracepoints)
5166 (remote_upload_trace_state_variables): Refactor as methods of
5168 (_initialize_remote): Remove references to init_remote_ops and
5169 init_extended_remote_ops.
5171 * remote-sim.c (gdbsim_target): New class.
5172 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5173 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5174 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5175 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5176 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5177 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5178 Refactor as methods of gdbsim_target.
5179 (gdbsim_ops): Now a gdbsim_target.
5180 (init_gdbsim_ops): Delete.
5181 (gdbsim_cntrl_c): Adjust.
5182 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5184 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5185 (the_amd64_linux_nat_target): New.
5186 (amd64_linux_fetch_inferior_registers)
5187 (amd64_linux_store_inferior_registers): Refactor as methods of
5188 amd64_linux_nat_target.
5189 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5190 * i386-linux-nat.c: Don't include "linux-nat.h".
5191 (i386_linux_nat_target): New class.
5192 (the_i386_linux_nat_target): New.
5193 (i386_linux_fetch_inferior_registers)
5194 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5195 as methods of i386_linux_nat_target.
5196 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5197 * inf-child.c (inf_child_ops): Delete.
5198 (inf_child_fetch_inferior_registers)
5199 (inf_child_store_inferior_registers): Delete.
5200 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5201 methods of inf_child_target.
5202 (inf_child_target::supports_terminal_ours)
5203 (inf_child_target::terminal_init)
5204 (inf_child_target::terminal_inferior)
5205 (inf_child_target::terminal_ours_for_output)
5206 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5207 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5209 (inf_child_open, inf_child_disconnect, inf_child_close)
5210 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5211 (inf_child_post_startup_inferior, inf_child_can_run)
5212 (inf_child_pid_to_exec_file): Refactor as methods of
5214 (inf_child_follow_fork): Delete.
5215 (inf_child_target::can_create_inferior)
5216 (inf_child_target::can_attach): New.
5217 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5218 (inf_child_target::has_stack, inf_child_target::has_registers)
5219 (inf_child_target::has_execution): New.
5220 (inf_child_fileio_open, inf_child_fileio_pwrite)
5221 (inf_child_fileio_pread, inf_child_fileio_fstat)
5222 (inf_child_fileio_close, inf_child_fileio_unlink)
5223 (inf_child_fileio_readlink, inf_child_use_agent)
5224 (inf_child_can_use_agent): Refactor as methods of
5226 (return_zero, inf_child_target): Delete.
5227 (inf_child_target::inf_child_target): New.
5228 * inf-child.h: Include "target.h".
5229 (inf_child_target): Delete function prototype.
5230 (inf_child_target): New class.
5231 (inf_child_open_target, inf_child_mourn_inferior)
5232 (inf_child_maybe_unpush_target): Delete.
5233 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5234 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5235 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5236 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5237 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5238 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5239 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5240 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5241 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5242 methods of inf_ptrace_target.
5243 (inf_ptrace_target): Delete function.
5244 * inf-ptrace.h: Include "inf-child.h".
5245 (inf_ptrace_target): Delete function declaration.
5246 (inf_ptrace_target): New class.
5247 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5248 * linux-nat.c (linux_target): New.
5249 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5250 (linux_nat_target::~linux_nat_target): New.
5251 (linux_child_post_attach, linux_child_post_startup_inferior)
5252 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5253 (linux_child_remove_fork_catchpoint)
5254 (linux_child_insert_vfork_catchpoint)
5255 (linux_child_remove_vfork_catchpoint)
5256 (linux_child_insert_exec_catchpoint)
5257 (linux_child_remove_exec_catchpoint)
5258 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5259 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5260 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5261 (linux_nat_stopped_data_address)
5262 (linux_nat_stopped_by_sw_breakpoint)
5263 (linux_nat_supports_stopped_by_sw_breakpoint)
5264 (linux_nat_stopped_by_hw_breakpoint)
5265 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5266 (linux_nat_kill, linux_nat_mourn_inferior)
5267 (linux_nat_xfer_partial, linux_nat_thread_alive)
5268 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5269 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5270 (linux_child_static_tracepoint_markers_by_strid)
5271 (linux_nat_is_async_p, linux_nat_can_async_p)
5272 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5273 (linux_nat_supports_multi_process)
5274 (linux_nat_supports_disable_randomization, linux_nat_async)
5275 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5276 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5277 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5278 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5279 methods of linux_nat_target.
5280 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5281 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5283 (check_stopped_by_watchpoint): Adjust.
5284 (linux_xfer_partial): Delete.
5285 (linux_target_install_ops, linux_target, linux_nat_add_target):
5287 (linux_nat_target::linux_nat_target): New.
5288 * linux-nat.h: Include "inf-ptrace.h".
5289 (linux_nat_target): New.
5290 (linux_target, linux_target_install_ops, linux_nat_add_target):
5291 Delete function declarations.
5292 (linux_target): Declare global.
5293 * linux-thread-db.c (thread_db_target): New.
5294 (thread_db_target::thread_db_target): New.
5295 (thread_db_ops): Delete.
5296 (the_thread_db_target): New.
5297 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5298 (thread_db_update_thread_list, thread_db_pid_to_str)
5299 (thread_db_extra_thread_info)
5300 (thread_db_thread_handle_to_thread_info)
5301 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5302 (thread_db_resume): Refactor as methods of thread_db_target.
5303 (init_thread_db_ops): Delete.
5304 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5305 * x86-linux-nat.c: Don't include "linux-nat.h".
5306 (super_post_startup_inferior): Delete.
5307 (x86_linux_nat_target::~x86_linux_nat_target): New.
5308 (x86_linux_child_post_startup_inferior)
5309 (x86_linux_read_description, x86_linux_enable_btrace)
5310 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5311 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5312 methods of x86_linux_nat_target.
5313 (x86_linux_create_target): Delete. Bits folded ...
5314 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5316 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5317 (x86_linux_nat_target): New class.
5318 (x86_linux_create_target): Delete.
5319 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5320 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5321 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5322 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5323 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5324 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5326 (x86_use_watchpoints): Delete.
5327 * x86-nat.h: Include "breakpoint.h" and "target.h".
5328 (x86_use_watchpoints): Delete.
5329 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5330 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5331 (x86_insert_watchpoint, x86_remove_watchpoint)
5332 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5333 (x86_stopped_by_hw_breakpoint): New declarations.
5334 (x86_nat_target): New template class.
5336 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5337 (the_ppc_linux_nat_target): New.
5338 (ppc_linux_fetch_inferior_registers)
5339 (ppc_linux_can_use_hw_breakpoint)
5340 (ppc_linux_region_ok_for_hw_watchpoint)
5341 (ppc_linux_ranged_break_num_registers)
5342 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5343 (ppc_linux_insert_mask_watchpoint)
5344 (ppc_linux_remove_mask_watchpoint)
5345 (ppc_linux_can_accel_watchpoint_condition)
5346 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5347 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5348 (ppc_linux_watchpoint_addr_within_range)
5349 (ppc_linux_masked_watch_num_registers)
5350 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5351 (ppc_linux_read_description): Refactor as methods of
5352 ppc_linux_nat_target.
5353 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5355 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5356 (procfs_target): New class.
5357 (the_procfs_target): New.
5358 (procfs_target): Delete function.
5359 (procfs_auxv_parse, procfs_attach, procfs_detach)
5360 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5361 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5362 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5363 (procfs_create_inferior, procfs_update_thread_list)
5364 (procfs_thread_alive, procfs_pid_to_str)
5365 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5366 (procfs_stopped_data_address, procfs_insert_watchpoint)
5367 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5368 (proc_find_memory_regions, procfs_info_proc)
5369 (procfs_make_note_section): Refactor as methods of procfs_target.
5370 (_initialize_procfs): Adjust.
5371 * sol-thread.c (sol_thread_target): New class.
5372 (sol_thread_ops): Now a sol_thread_target.
5373 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5374 (sol_thread_fetch_registers, sol_thread_store_registers)
5375 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5376 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5377 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5378 (init_sol_thread_ops): Delete.
5379 (_initialize_sol_thread): Adjust. Remove references to
5380 init_sol_thread_ops and complete_target_initialization.
5382 * windows-nat.c (windows_nat_target): New class.
5383 (windows_fetch_inferior_registers)
5384 (windows_store_inferior_registers, windows_resume, windows_wait)
5385 (windows_attach, windows_detach, windows_pid_to_exec_file)
5386 (windows_files_info, windows_create_inferior)
5387 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5388 (windows_close, windows_pid_to_str, windows_xfer_partial)
5389 (windows_get_tib_address, windows_get_ada_task_ptid)
5390 (windows_thread_name, windows_thread_alive): Refactor as
5391 windows_nat_target methods.
5392 (do_initial_windows_stuff): Adjust.
5393 (windows_target): Delete function.
5394 (_initialize_windows_nat): Adjust.
5396 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5397 (darwin_mourn_inferior, darwin_kill_inferior)
5398 (darwin_create_inferior, darwin_attach, darwin_detach)
5399 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5400 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5401 (darwin_supports_multi_process): Refactor as darwin_nat_target
5403 (darwin_resume_to, darwin_files_info): Delete.
5404 (_initialize_darwin_inferior): Rename to ...
5405 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5406 * darwin-nat.h: Include "inf-child.h".
5407 (darwin_nat_target): New class.
5408 (darwin_complete_target): Delete.
5409 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5410 (darwin_target): New.
5411 (i386_darwin_fetch_inferior_registers)
5412 (i386_darwin_store_inferior_registers): Refactor as methods of
5414 (darwin_complete_target): Delete, with ...
5415 (_initialize_i386_darwin_nat): ... bits factored out here.
5417 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5418 (the_alpha_linux_nat_target): New.
5419 (alpha_linux_register_u_offset): Refactor as
5420 alpha_linux_nat_target method.
5421 (_initialize_alpha_linux_nat): Adjust.
5422 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5423 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5424 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5425 methods of linux_nat_trad_target.
5426 (linux_trad_target): Delete.
5427 * linux-nat-trad.h (linux_trad_target): Delete function.
5428 (linux_nat_trad_target): New class.
5429 * mips-linux-nat.c (mips_linux_nat_target): New class.
5430 (super_fetch_registers, super_store_registers, super_close):
5432 (the_mips_linux_nat_target): New.
5433 (mips64_linux_regsets_fetch_registers)
5434 (mips64_linux_regsets_store_registers)
5435 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5436 (mips_linux_register_u_offset, mips_linux_read_description)
5437 (mips_linux_can_use_hw_breakpoint)
5438 (mips_linux_stopped_by_watchpoint)
5439 (mips_linux_stopped_data_address)
5440 (mips_linux_region_ok_for_hw_watchpoint)
5441 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5442 (mips_linux_close): Refactor as methods of mips_linux_nat.
5443 (_initialize_mips_linux_nat): Adjust to C++ification.
5445 * aix-thread.c (aix_thread_target): New class.
5446 (aix_thread_ops): Now an aix_thread_target.
5447 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5448 (aix_thread_fetch_registers, aix_thread_store_registers)
5449 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5450 (aix_thread_thread_alive, aix_thread_pid_to_str)
5451 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5452 Refactor as methods of aix_thread_target.
5453 (init_aix_thread_ops): Delete.
5454 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5455 and complete_target_initialization.
5456 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5457 (rs6000_nat_target): New class.
5458 (the_rs6000_nat_target): New.
5459 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5460 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5461 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5462 (super_create_inferior): Delete.
5463 (_initialize_rs6000_nat): Adjust to C++ification.
5465 * arm-linux-nat.c (arm_linux_nat_target): New class.
5466 (the_arm_linux_nat_target): New.
5467 (arm_linux_fetch_inferior_registers)
5468 (arm_linux_store_inferior_registers, arm_linux_read_description)
5469 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5470 (arm_linux_remove_hw_breakpoint)
5471 (arm_linux_region_ok_for_hw_watchpoint)
5472 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5473 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5474 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5475 arm_linux_nat_target.
5476 (_initialize_arm_linux_nat): Adjust to C++ification.
5478 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5479 (the_aarch64_linux_nat_target): New.
5480 (aarch64_linux_fetch_inferior_registers)
5481 (aarch64_linux_store_inferior_registers)
5482 (aarch64_linux_child_post_startup_inferior)
5483 (aarch64_linux_read_description)
5484 (aarch64_linux_can_use_hw_breakpoint)
5485 (aarch64_linux_insert_hw_breakpoint)
5486 (aarch64_linux_remove_hw_breakpoint)
5487 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5488 (aarch64_linux_region_ok_for_hw_watchpoint)
5489 (aarch64_linux_stopped_data_address)
5490 (aarch64_linux_stopped_by_watchpoint)
5491 (aarch64_linux_watchpoint_addr_within_range)
5492 (aarch64_linux_can_do_single_step): Refactor as methods of
5493 aarch64_linux_nat_target.
5494 (super_post_startup_inferior): Delete.
5495 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5497 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5498 (the_hppa_linux_nat_target): New.
5499 (hppa_linux_fetch_inferior_registers)
5500 (hppa_linux_store_inferior_registers): Refactor as methods of
5501 hppa_linux_nat_target.
5502 (_initialize_hppa_linux_nat): Adjust to C++ification.
5504 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5505 (the_ia64_linux_nat_target): New.
5506 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5507 (ia64_linux_stopped_data_address)
5508 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5509 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5510 ia64_linux_nat_target methods.
5511 (super_xfer_partial): Delete.
5512 (_initialize_ia64_linux_nat): Adjust to C++ification.
5514 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5515 (the_m32r_linux_nat_target): New.
5516 (m32r_linux_fetch_inferior_registers)
5517 (m32r_linux_store_inferior_registers): Refactor as
5518 m32r_linux_nat_target methods.
5519 (_initialize_m32r_linux_nat): Adjust to C++ification.
5521 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5522 (the_m68k_linux_nat_target): New.
5523 (m68k_linux_fetch_inferior_registers)
5524 (m68k_linux_store_inferior_registers): Refactor as
5525 m68k_linux_nat_target methods.
5526 (_initialize_m68k_linux_nat): Adjust to C++ification.
5528 * s390-linux-nat.c (s390_linux_nat_target): New class.
5529 (the_s390_linux_nat_target): New.
5530 (s390_linux_fetch_inferior_registers)
5531 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5532 (s390_insert_watchpoint, s390_remove_watchpoint)
5533 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5534 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5535 (s390_auxv_parse, s390_read_description): Refactor as methods of
5536 s390_linux_nat_target.
5537 (_initialize_s390_nat): Adjust to C++ification.
5539 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5540 (the_sparc_linux_nat_target): New.
5541 (_initialize_sparc_linux_nat): Adjust to C++ification.
5542 * sparc-nat.c (sparc_fetch_inferior_registers)
5543 (sparc_store_inferior_registers): Remove target_ops parameter.
5544 * sparc-nat.h (sparc_fetch_inferior_registers)
5545 (sparc_store_inferior_registers): Remove target_ops parameter.
5546 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5547 (the_sparc64_linux_nat_target): New.
5548 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5550 * spu-linux-nat.c (spu_linux_nat_target): New class.
5551 (the_spu_linux_nat_target): New.
5552 (spu_child_post_startup_inferior, spu_child_post_attach)
5553 (spu_child_wait, spu_fetch_inferior_registers)
5554 (spu_store_inferior_registers, spu_xfer_partial)
5555 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5557 (_initialize_spu_nat): Adjust to C++ification.
5559 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5560 (the_tilegx_linux_nat_target): New.
5561 (fetch_inferior_registers, store_inferior_registers):
5562 Refactor as methods.
5563 (_initialize_tile_linux_nat): Adjust to C++ification.
5565 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5566 (the_xtensa_linux_nat_target): New.
5567 (xtensa_linux_fetch_inferior_registers)
5568 (xtensa_linux_store_inferior_registers): Refactor as
5569 xtensa_linux_nat_target methods.
5570 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5572 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5573 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5574 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5575 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5576 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5577 (fbsd_stopped_by_sw_breakpoint)
5578 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5579 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5580 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5581 (fbsd_post_startup_inferior, fbsd_post_attach)
5582 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5583 (fbsd_set_syscall_catchpoint)
5584 (super_xfer_partial, super_resume, super_wait)
5585 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5586 (fbsd_handle_debug_trap): Remove target_ops parameter.
5587 (fbsd_nat_add_target): Delete.
5588 * fbsd-nat.h: Include "inf-ptrace.h".
5589 (fbsd_nat_add_target): Delete.
5590 (USE_SIGTRAP_SIGINFO): Define.
5591 (fbsd_nat_target): New class.
5593 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5594 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5595 (amd64bsd_target): Delete.
5596 * amd64-bsd-nat.h: New file.
5597 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5599 (amd64_fbsd_nat_target): New class.
5600 (the_amd64_fbsd_nat_target): New.
5601 (amd64fbsd_read_description): Refactor as method of
5602 amd64_fbsd_nat_target.
5603 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5604 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5605 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5606 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5607 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5608 (i386bsd_target): Delete.
5609 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5610 (i386bsd_fetch_inferior_registers)
5611 (i386bsd_store_inferior_registers): Declare.
5612 (i386_bsd_nat_target): New class.
5613 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5614 (the_i386_fbsd_nat_target): New.
5615 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5616 i386_fbsd_nat_target methods.
5617 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5618 (_initialize_i386fbsd_nat): Adjust to C++ification.
5619 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5620 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5621 (_initialize_x86_bsd_nat): Adjust to C++ification.
5622 * x86-bsd-nat.h: Include "x86-nat.h".
5623 (x86bsd_target): Delete declaration.
5624 (x86bsd_nat_target): New class.
5626 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5627 (the_aarch64_fbsd_nat_target): New.
5628 (aarch64_fbsd_fetch_inferior_registers)
5629 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5630 aarch64_fbsd_nat_target.
5631 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5632 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5633 (the_alpha_bsd_nat_target): New.
5634 (alphabsd_fetch_inferior_registers)
5635 (alphabsd_store_inferior_registers): Refactor as
5636 alpha_bsd_nat_target methods.
5637 (_initialize_alphabsd_nat): Refactor as methods of
5638 alpha_bsd_nat_target.
5639 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5640 (the_amd64_nbsd_nat_target): New.
5641 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5642 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5643 (the_amd64_obsd_nat_target): New.
5644 (_initialize_amd64obsd_nat): Adjust to C++ification.
5645 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5646 (the_arm_fbsd_nat_target): New.
5647 (arm_fbsd_fetch_inferior_registers)
5648 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5649 (_initialize_arm_fbsd_nat): Refactor as methods of
5650 arm_fbsd_nat_target.
5651 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5652 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5653 (the_arm_netbsd_nat_target): New.
5654 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5655 arm_netbsd_nat_target.
5656 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5657 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5658 (the_hppa_nbsd_nat_target): New.
5659 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5660 hppa_nbsd_nat_target methods.
5661 (_initialize_hppanbsd_nat): Adjust to C++ification.
5662 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5663 (the_hppa_obsd_nat_target): New.
5664 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5665 methods of hppa_obsd_nat_target.
5666 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5668 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5669 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5671 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5672 (_initialize_i386obsd_nat): Use add_target.
5673 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5674 (the_m68k_bsd_nat_target): New.
5675 (m68kbsd_fetch_inferior_registers)
5676 (m68kbsd_store_inferior_registers): Refactor as methods of
5677 m68k_bsd_nat_target.
5678 (_initialize_m68kbsd_nat): Adjust to C++ification.
5679 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5680 (the_mips_fbsd_nat_target): New.
5681 (mips_fbsd_fetch_inferior_registers)
5682 (mips_fbsd_store_inferior_registers): Refactor as methods of
5683 mips_fbsd_nat_target.
5684 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5686 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5687 (the_mips_nbsd_nat_target): New.
5688 (mipsnbsd_fetch_inferior_registers)
5689 (mipsnbsd_store_inferior_registers): Refactor as methods of
5690 mips_nbsd_nat_target.
5691 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5692 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5693 (the_mips64_obsd_nat_target): New.
5694 (mips64obsd_fetch_inferior_registers)
5695 (mips64obsd_store_inferior_registers): Refactor as methods of
5696 mips64_obsd_nat_target.
5697 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5699 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5701 * nbsd-nat.h: Include "inf-ptrace.h".
5702 (nbsd_nat_target): New class.
5703 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5704 (obsd_wait): Refactor as methods of obsd_nat_target.
5705 (obsd_add_target): Delete.
5706 * obsd-nat.h: Include "inf-ptrace.h".
5707 (obsd_nat_target): New class.
5708 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5709 (the_ppc_fbsd_nat_target): New.
5710 (ppcfbsd_fetch_inferior_registers)
5711 (ppcfbsd_store_inferior_registers): Refactor as methods of
5712 ppc_fbsd_nat_target.
5713 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5715 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5716 (the_ppc_nbsd_nat_target): New.
5717 (ppcnbsd_fetch_inferior_registers)
5718 (ppcnbsd_store_inferior_registers): Refactor as methods of
5719 ppc_nbsd_nat_target.
5720 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5721 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5722 (the_ppc_obsd_nat_target): New.
5723 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5724 methods of ppc_obsd_nat_target.
5725 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5727 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5728 (the_sh_nbsd_nat_target): New.
5729 (shnbsd_fetch_inferior_registers)
5730 (shnbsd_store_inferior_registers): Refactor as methods of
5732 (_initialize_shnbsd_nat): Adjust to C++ification.
5733 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5734 (inf_ptrace_xfer_partial): Delete.
5735 (sparc_xfer_partial, sparc_target): Delete.
5736 * sparc-nat.h (sparc_fetch_inferior_registers)
5737 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5738 (sparc_target): Delete function declaration.
5739 (sparc_target): New template class.
5740 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5741 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5742 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5743 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5745 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5746 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5747 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5748 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5750 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5751 (the_vax_bsd_nat_target): New.
5752 (vaxbsd_fetch_inferior_registers)
5753 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5755 (_initialize_vaxbsd_nat): Adjust to C++ification.
5757 * bsd-kvm.c (bsd_kvm_target): New class.
5758 (bsd_kvm_ops): Now a bsd_kvm_target.
5759 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5760 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5761 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5763 (bsd_kvm_return_one): Delete.
5764 (bsd_kvm_add_target): Adjust to C++ification.
5766 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5767 (nto_procfs_target_procfs): New classes.
5768 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5769 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5770 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5771 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5772 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5773 (procfs_remove_hw_breakpoint, procfs_resume)
5774 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5775 (procfs_kill_inferior, procfs_store_registers)
5776 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5777 as methods of nto_procfs_target.
5778 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5779 (nto_native_ops): Delete.
5780 (procfs_open, procfs_native_open): Delete.
5781 (nto_native_ops): Now an nto_procfs_target_native.
5782 (init_procfs_targets): Adjust to C++ification.
5783 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5784 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5785 Refactor as methods of nto_procfs_target.
5787 * go32-nat.c (go32_nat_target): New class.
5788 (the_go32_nat_target): New.
5789 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5790 (go32_store_registers, go32_xfer_partial, go32_files_info)
5791 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5792 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5793 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5794 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5795 (go32_target): Delete.
5796 (_initialize_go32_nat): Adjust to C++ification.
5798 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5799 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5800 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5801 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5803 (gnu_target): Delete.
5804 * gnu-nat.h (gnu_target): Delete.
5805 (gnu_nat_target): New class.
5806 * i386-gnu-nat.c (gnu_base_target): New.
5807 (i386_gnu_nat_target): New class.
5808 (the_i386_gnu_nat_target): New.
5809 (_initialize_i386gnu_nat): Adjust to C++ification.
5811 2018-05-02 Pedro Alves <palves@redhat.com>
5813 * bfd-target.c (target_bfd_xclose): Rename to ...
5814 (target_bfd_close): ... this.
5815 (target_bfd_reopen): Adjust.
5816 * target.c (target_close): Remove references to to_xclose.
5817 * target.h (target_ops::to_xclose): Delete.
5818 (target_ops::to_close): Update comments.
5820 2018-05-02 Pedro Alves <palves@redhat.com>
5822 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5824 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5825 * inf-ptrace.c (inf_ptrace_register_u_offset)
5826 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5827 (inf_ptrace_store_register, inf_ptrace_store_registers)
5828 (inf_ptrace_trad_target): Move to ...
5829 * linux-nat-trad.c: ... this new file.
5830 * linux-nat-trad.h: New file.
5831 * linux-nat.c (linux_target_install_ops): Make extern.
5832 (linux_trad_target): Delete.
5833 * linux-nat.h (linux_trad_target): Delete declaration.
5834 (linux_target_install_ops): Declare.
5835 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5838 2018-05-02 Pedro Alves <palves@redhat.com>
5840 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5841 procfs_target/add_target here.
5842 * procfs.c (procfs_target): Make static.
5843 (_initialize_procfs): Call add_target here.
5844 * procfs.h (struct target_ops): Remove forward declaration.
5845 (procfs_target): Remove declaration.
5846 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5848 2018-05-02 Pedro Alves <palves@redhat.com>
5850 * procfs.c (procfs_stopped_by_watchpoint)
5851 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5852 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5854 (procfs_use_watchpoints): Delete, move contents...
5855 (procfs_target): ... here.
5856 * procfs.h (procfs_use_watchpoints): Delete declaration.
5857 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5858 procfs_use_watchpoints.
5859 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5860 procfs_use_watchpoints.
5862 2018-05-02 Tom Tromey <tom@tromey.com>
5865 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5866 and var_zuinteger_unlimited.
5867 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5868 and PARAM_ZUINTEGER_UNLIMITED.
5869 (set_parameter_value): Handle var_zuinteger and
5870 var_zuinteger_unlimited.
5871 (add_setshow_generic): Likewise.
5872 (parmpy_init): Likewise.
5874 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5877 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5878 pointer is not null before dereferencing it.
5880 2018-04-30 Tom Tromey <tom@tromey.com>
5882 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5885 2018-04-30 Tom Tromey <tom@tromey.com>
5887 * breakpoint.c (mention): Remove use of is_mi_like_p.
5888 (print_mention_ranged_breakpoint): Likewise.
5889 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5892 2018-04-30 Tom Tromey <tom@tromey.com>
5894 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5896 2018-04-30 Tom Tromey <tom@tromey.com>
5898 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5899 (info_spu_event_command): Remove some uses of is_mi_like_p.
5901 2018-04-30 Tom Tromey <tom@tromey.com>
5903 * python/py-framefilter.c (py_print_single_arg)
5904 (enumerate_locals, py_print_args, py_print_frame): Remove some
5905 uses of is_mi_like_p.
5907 2018-04-30 Tom Tromey <tom@tromey.com>
5910 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5911 * ui-out.h (ui_out::is_mi_like_p): Now const.
5912 (ui_out::do_is_mi_like_p): Now const.
5913 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5915 2018-04-30 Tom Tromey <tom@tromey.com>
5917 * varobj.c (varobj_set_visualizer): Use new_reference.
5918 * python/python.c (gdbpy_decode_line): Use new_reference.
5919 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5922 2018-04-30 Tom Tromey <tom@tromey.com>
5924 * varobj.c (install_new_value): Use new_reference.
5925 * value.h (value_incref): Return void. Swap intro comment with
5927 * value.c (set_value_parent): Use new_reference.
5928 (value_incref): Return void. Update intro comment.
5929 (release_value): Use new_reference.
5930 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5932 2018-04-30 Tom Tromey <tom@tromey.com>
5934 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5935 * gdb_bfd.h (new_bfd_ref): Remove.
5936 (gdb_bfd_open): Update comment.
5937 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5938 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5939 (gdb_bfd_fdopenr): Use new_reference.
5940 * exec.c (exec_file_attach): Use new_reference.
5942 2018-04-30 Tom Tromey <tom@tromey.com>
5944 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5947 2018-04-30 Tom Tromey <tom@tromey.com>
5949 * jit.c (jit_read_code_entry): Use type_align.
5950 * i386-tdep.c (i386_gdbarch_init): Don't call
5951 set_gdbarch_long_long_align_bit.
5952 * gdbarch.sh: Remove long_long_align_bit.
5953 * gdbarch.c, gdbarch.h: Rebuild.
5954 * arc-tdep.c (arc_type_align): New function.
5955 (arc_gdbarch_init): Use arc_type_align. Don't call
5956 set_gdbarch_long_long_align_bit.
5958 2018-04-30 Tom Tromey <tom@tromey.com>
5960 * rust-lang.c (rust_type_alignment): Remove.
5961 (rust_composite_type): Use type_align.
5963 2018-04-30 Tom Tromey <tom@tromey.com>
5965 * NEWS: Mention Type.align.
5966 * python/py-type.c (typy_get_alignof): New function.
5967 (type_object_getset): Add "alignof".
5969 2018-04-30 Tom Tromey <tom@tromey.com>
5973 * std-operator.def (UNOP_ALIGNOF): New operator.
5974 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5976 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5977 * c-lang.c (c_op_print_tab): Add alignof.
5978 * c-exp.y (ALIGNOF): New token.
5979 (exp): Add "ALIGNOF" production.
5980 (ident_tokens): Add _Alignof and alignof.
5982 2018-04-30 Tom Tromey <tom@tromey.com>
5984 * i386-tdep.c (i386_type_align): New function.
5985 (i386_gdbarch_init): Update.
5986 * gdbarch.sh (type_align): New method.
5987 * gdbarch.c, gdbarch.h: Rebuild.
5988 * arch-utils.h (default_type_align): Declare.
5989 * arch-utils.c (default_type_align): New function.
5990 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5991 (struct type) <align_log2>: New field.
5992 <instance_flags>: Now a bitfield.
5993 (TYPE_RAW_ALIGN): New macro.
5994 (type_align, type_raw_align, set_type_align): Declare.
5995 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5997 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5998 (get_alignment, maybe_set_alignment): New functions.
5999 (read_structure_type, read_enumeration_type, read_array_type)
6000 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6001 (read_subrange_type, read_base_type): Set type alignment.
6003 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6005 * dwarf2read.c (read_index_from_section): Use bool.
6007 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6010 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6013 2018-04-29 John Reiser <jreiser@BitWagon.com>
6016 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6017 last step, and do it atomically.
6019 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6021 * compile/compile-c-types.c (convert_int, convert_float):
6024 2018-04-27 Tom Tromey <tom@tromey.com>
6027 * rust-lang.c (rust_inclusive_range_type_p): New function.
6028 (rust_range): Handle inclusive ranges.
6029 (rust_compute_range): Likewise.
6030 * rust-exp.y (struct rust_op) <inclusive>: New field.
6031 (DOTDOTEQ): New constant.
6032 (range_expr): Add "..=" productions.
6033 (operator_tokens): Add "..=" token.
6034 (ast_range): Add "inclusive" parameter.
6035 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6037 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6039 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6040 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6042 * expprint.c (print_subexp_standard): Handle new bounds values.
6043 (dump_subexp_body_standard): Likewise.
6045 2018-04-27 Tom Tromey <tom@tromey.com>
6047 * configure: Rebuild.
6048 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6049 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6051 (class symbol_needs_eval_context): Likewise.
6052 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6053 (mock_mapped_index::symbol_name_at): Use "override". Remove
6055 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6057 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6058 * aarch64-tdep.c (instruction_reader::read): Use "override".
6059 (instruction_reader_test::read): Likewise.
6060 * arm-tdep.c (instruction_reader::read): Use "override".
6061 (instruction_reader_thumb::read): Likewise.
6063 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6066 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6067 instead of remote_send.
6068 (remote_send): Remove.
6070 2018-04-26 Pedro Alves <palves@redhat.com>
6072 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6073 find_function_start_sal instead of find_pc_line.
6075 2018-04-26 Pedro Alves <palves@redhat.com>
6077 * breakpoint.c (set_breakpoint_location_function): Handle
6079 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6080 * elfread.c (elf_symtab_read): Give data symbols with
6081 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6082 (elf_rel_plt_read): Update comment.
6083 * linespec.c (convert_linespec_to_sals): Handle
6085 (minsym_found): Handle mst_data_gnu_ifunc.
6086 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6087 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6088 * parse.c (find_minsym_type_and_address): Handle
6090 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6091 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6092 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6094 <mst_data_gnu_ifunc>: New enumerator.
6096 2018-04-26 Pedro Alves <palves@redhat.com>
6098 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6099 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6100 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6102 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6103 (lookup_minimal_symbol_by_pc): Adjust.
6104 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6105 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6106 * minsyms.h (lookup_msym_prefer): New enum.
6107 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6108 parameter by a lookup_msym_prefer parameter.
6110 2018-04-26 Pedro Alves <palves@redhat.com>
6112 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6113 ends in "@plt" instead of looking at the symbol's section.
6115 2018-04-26 Pedro Alves <palves@redhat.com>
6117 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6119 (find_pc_partial_function_gnu_ifunc): Rename to ...
6120 (find_pc_partial_function): ... this, and remove references to
6122 (find_pc_partial_function): Delete old implementation.
6123 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6125 2018-04-26 Pedro Alves <palves@redhat.com>
6127 * linespec.c (struct bound_minimal_symbol_search_key): New.
6128 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6129 skip first line if we found a GNU ifunc minimal symbol by name.
6130 (compare_msymbols): Change parameters to work with a destructured
6132 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6135 2018-04-26 Pedro Alves <palves@redhat.com>
6137 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6138 ifunc targets here. Instead, if we have an ifunc minsym, use its
6140 (add_location_to_breakpoint): Store the minsym and the objfile in
6141 the breakpoint location.
6142 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6143 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6144 Record the minsym in the sal.
6145 * symtab.h (symtab_and_line) <msymbol>: New field.
6147 2018-04-26 Pedro Alves <palves@redhat.com>
6149 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6150 unless we actually resolved the ifunc.
6152 2018-04-26 Pedro Alves <palves@redhat.com>
6154 * c-exp.y (variable production): Prefer ifunc minsyms over
6155 regular function symbols.
6156 * symtab.c (find_gnu_ifunc): New function.
6157 * minsyms.h (lookup_msym_prefer): New enum.
6158 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6159 parameter by a lookup_msym_prefer parameter.
6160 * symtab.h (find_gnu_ifunc): New declaration.
6162 2018-04-26 Pedro Alves <palves@redhat.com>
6164 * blockframe.c (find_gnu_ifunc_target_type): New function.
6165 (find_function_type): New.
6166 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6167 return a value with a memory address.
6168 (eval_call): For calls to GNU ifunc functions, try to find the
6169 type of the target function from the type that the resolver
6171 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6173 * infcall.c (find_function_return_type): Delete.
6174 (find_function_addr): Add 'function_type' parameter. For calls to
6175 GNU ifunc functions, try to find the type of the target function
6176 from the type that the resolver returns, and return it via
6178 (call_function_by_hand_dummy): Adjust to use the function type
6179 returned by find_function_addr.
6180 (find_function_addr): Add 'function_type' parameter and move
6182 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6185 2018-04-26 Pedro Alves <palves@redhat.com>
6187 * c-exp.y (variable production): Skip finding an alias for ifunc
6190 2018-04-26 Pedro Alves <palves@redhat.com>
6192 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6194 2018-04-25 Pedro Alves <palves@redhat.com>
6196 * infcmd.c (kill_command): Print the pid as string, not the whole
6197 thread's ptid. Add comment. s/has been killed/killed/ in output
6199 * remote.c (remote_detach_1): Print the pid as string, not the
6200 whole thread's ptid.
6202 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6203 Sergio Durigan Junior <sergiodj@redhat.com>
6204 Pedro Alves <palves@redhat.com>
6206 * infcmd.c (kill_command): Print message when inferior has
6208 * inferior.c (print_inferior_events): Remove 'static'. Set as
6210 (add_inferior): Improve message printed when
6211 'print_inferior_events' is on.
6212 (exit_inferior): Remove message printed when
6213 'print_inferior_events' is on.
6214 (detach_inferior): Improve message printed when
6215 'print_inferior_events' is on.
6216 (initialize_inferiors): Use 'add_inferior_silent' to set
6217 'current_inferior_'.
6218 * inferior.h (print_inferior_events): Declare here as
6220 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6221 '[Detaching...]' messages when 'print_inferior_events' is on.
6222 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6223 as prefix/suffix for messages. Remove periods. Fix erroneous
6224 'Detaching after fork from child...', replace it by '... from
6226 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6227 prefix/suffix when printing 'Detaching...' messages. Print
6228 them when 'print_inferior_events' is on.
6229 * remote.c (remote_detach_1): Print message when detaching
6230 from inferior and '!is_fork_parent'.
6232 2018-04-24 Tom Tromey <tom@tromey.com>
6234 * cli-out.h: Reindent.
6236 2018-04-24 Tom Tromey <tom@tromey.com>
6238 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6239 (cli_ui_out::do_field_string): Use fputs_filtered.
6240 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6242 2018-04-23 Tom Tromey <tom@tromey.com>
6244 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6245 gdb::unique_xmalloc_ptr.
6247 2018-04-23 Tom Tromey <tom@tromey.com>
6249 * configure: Rebuild.
6251 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6254 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6255 prepare_for_testing. Set normal_bp to r_debug_state if target
6258 2018-04-21 Pedro Alves <palves@redhat.com>
6259 Rajendra SY <rajendra.sy@gmail.com>
6261 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6262 * remote.c (extended_remote_attach): In all-stop mode, mark the
6263 thread as executing.
6265 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6267 * thread.c (thread_apply_all_command): Fix comment.
6268 (thread_command): Fix comment.
6270 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6272 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6274 * features/aarch64-core.c (create_feature_aarch64_core):
6276 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6278 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6280 * features/i386/32bit-avx512.c
6281 (create_feature_i386_32bit_avx512): Likewise.
6282 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6284 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6286 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6288 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6290 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6292 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6294 * features/i386/64bit-avx512.c
6295 (create_feature_i386_64bit_avx512): Likewise.
6296 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6298 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6300 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6302 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6304 * features/i386/64bit-segments.c
6305 (create_feature_i386_64bit_segments): Likewise.
6306 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6308 * features/i386/x32-core.c
6309 (create_feature_i386_x32_core): Likewise.
6310 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6311 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6312 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6313 * target-descriptions.c: In generated code, don't pass xml
6316 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6318 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6319 (print_xml_feature::visit_post): Likewise.
6320 (print_xml_feature::visit): Likewise.
6321 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6322 (print_xml_feature): Add new class.
6323 * regformats/regdat.sh: Null xmltarget on feature targets.
6324 * target-descriptions.c (struct target_desc): Add xmltarget.
6325 (maintenance_check_tdesc_xml_convert): Add unittest function.
6326 (tdesc_get_features_xml): Add function to get xml.
6327 (maintenance_check_xml_descriptions): Test xml generation.
6328 * xml-tdesc.c (string_read_description_xml): Add function.
6329 * xml-tdesc.h (string_read_description_xml): Add declaration.
6331 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6333 * features/Makefile: Add feature marker to targets with new style
6334 target descriptions.
6335 * regformats/aarch64.dat: Regenerate.
6336 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6337 * regformats/i386/amd64-avx-linux.dat: Likewise.
6338 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6339 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6340 * regformats/i386/amd64-linux.dat: Likewise.
6341 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6342 * regformats/i386/amd64.dat: Likewise.
6343 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6344 * regformats/i386/i386-avx-linux.dat: Likewise.
6345 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6346 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6347 * regformats/i386/i386-linux.dat: Likewise.
6348 * regformats/i386/i386-mmx-linux.dat: Likewise.
6349 * regformats/i386/i386-mpx-linux.dat: Likewise.
6350 * regformats/i386/i386.dat: Likewise.
6351 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6352 * regformats/i386/x32-avx-linux.dat: Likewise.
6353 * regformats/i386/x32-linux.dat: Likewise.
6354 * regformats/tic6x-c62x-linux.dat: Likewise.
6355 * regformats/tic6x-c64x-linux.dat: Likewise.
6356 * regformats/tic6x-c64xp-linux.dat: Likewise.
6357 * regformats/regdat.sh: Parse feature marker.
6359 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6361 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6362 (tdesc_osabi_name): Likewise.
6363 * target-descriptions.c (tdesc_architecture_name): Add new
6365 (tdesc_osabi_name): Likewise.
6367 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6369 * common/tdesc.c (tdesc_predefined_type): Move to here.
6370 (tdesc_named_type): Likewise.
6371 (tdesc_create_vector): Likewise.
6372 (tdesc_create_struct): Likewise.
6373 (tdesc_set_struct_size): Likewise.
6374 (tdesc_create_union): Likewise.
6375 (tdesc_create_flags): Likewise.
6376 (tdesc_create_enum): Likewise.
6377 (tdesc_add_field): Likewise.
6378 (tdesc_add_typed_bitfield): Likewise.
6379 (tdesc_add_bitfield): Likewise.
6380 (tdesc_add_flag): Likewise.
6381 (tdesc_add_enum_value): Likewise.
6382 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6383 (struct tdesc_type_vector): Likewise.
6384 (struct tdesc_type_field): Likewise.
6385 (struct tdesc_type_with_fields): Likewise.
6386 (tdesc_create_enum): Add declaration.
6387 (tdesc_add_typed_bitfield): Likewise.
6388 (tdesc_add_enum_value): Likewise.
6389 * target-descriptions.c (tdesc_type_field): Move from here.
6390 (tdesc_type_builtin): Likewise.
6391 (tdesc_type_vector): Likewise.
6392 (tdesc_type_with_fields): Likewise.
6393 (tdesc_predefined_types): Likewise.
6394 (tdesc_named_type): Likewise.
6395 (tdesc_create_vector): Likewise.
6396 (tdesc_create_struct): Likewise.
6397 (tdesc_set_struct_size): Likewise.
6398 (tdesc_create_union): Likewise.
6399 (tdesc_create_flags): Likewise.
6400 (tdesc_create_enum): Likewise.
6401 (tdesc_add_field): Likewise.
6402 (tdesc_add_typed_bitfield): Likewise.
6403 (tdesc_add_bitfield): Likewise.
6404 (tdesc_add_flag): Likewise.
6405 (tdesc_add_enum_value): Likewise.
6406 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6407 (tdesc_add_typed_bitfield): Likewise.
6408 (tdesc_add_enum_value): Likewise.
6410 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6412 * common/tdesc.c (tdesc_feature::accept): Move to here.
6413 (tdesc_feature::operator==): Likewise.
6414 (tdesc_create_reg): Likewise.
6415 * common/tdesc.h (tdesc_type_kind): Likewise.
6416 (struct tdesc_type): Likewise.
6417 (struct tdesc_feature): Likewise.
6418 * regformats/regdat.sh: Create a feature.
6419 * target-descriptions.c (tdesc_type_kind): Move from here.
6420 (tdesc_type): Likewise.
6421 (tdesc_type_up): Likewise.
6422 (tdesc_feature): Likewise.
6423 (tdesc_create_reg): Likewise.
6425 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6427 * Makefile.in: Add arch/tdesc.c
6428 * common/tdesc.c: New file.
6429 * common/tdesc.h (tdesc_element_visitor): Move to here.
6430 (tdesc_element): Likewise.
6431 (tdesc_reg): Likewise.
6432 (tdesc_reg_up): Likewise.
6433 * regformats/regdef.h (reg): Add offset to constructors.
6434 * target-descriptions.c (tdesc_element_visitor): Move from here.
6435 (tdesc_element): Likewise.
6436 (tdesc_reg): Likewise.
6437 (tdesc_reg_up): Likewise.
6439 2018-04-17 Tom Tromey <tom@tromey.com>
6441 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6444 2018-04-17 Tom Tromey <tom@tromey.com>
6446 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6448 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6450 * symtab.c (print_symbol_info): Skip printing filename and line
6451 number when `last' is NULL.
6452 (symtab_symbol_info): Use empty string instead of NULL for first
6453 invocation of print_symbol_info.
6454 (rbreak_command): Pass NULL to `last' parameter of
6457 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6459 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6462 2018-04-16 Pedro Alves <palves@redhat.com>
6464 * MAINTAINERS (sh): Remove.
6465 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6466 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6467 (ALLDEPFILES): Remove sh64-tdep.c.
6468 * NEWS: Mentions that support for SH-5/SH64 is removed.
6469 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6470 (sh*-*-openbsd*): Ditto.
6471 (sh64-*-elf*): Remove.
6473 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6474 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6475 * sh-tdep.c: No longer include "sh64-tdep.h".
6476 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6477 * sh64-tdep.c, sh64-tdep.h: Remove files.
6479 2018-04-16 Pedro Alves <palves@redhat.com>
6481 * MAINTAINERS: Remove m88k.
6482 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6483 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6484 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6485 * NEWS: Mention that support for m88k was removed.
6486 * configure.host (m88*-*-*): Remove support.
6487 * configure.nat (m88k-*-*): Remove support.
6488 * configure.tgt (m88*-*-openbsd*): Remove.
6489 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6491 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6493 * configure.tgt (x86_tobjs): New variable.
6494 (amd64_tobjs, i386_tobjs): Use it.
6496 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6498 * symtab.c (print_symbol_info): Precede the symbol definition by
6499 the line number when available.
6500 * NEWS: Advertise this enhancement.
6502 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6504 * NEWS (New options): announce set/show record btrace cpu.
6505 * btrace.c: Include record-btrace.h.
6506 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6507 the vendor is unknown.
6508 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6509 Maybe overwrite the btrace configuration's cpu.
6510 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6511 (btrace_fetch): Add cpu parameter. Update callers.
6512 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6513 Maybe overwrite the btrace configuration's cpu. Skip enabling
6514 errata workarounds if the vendor is unknown.
6515 * python/py-record-btrace.c: Include record-btrace.h.
6516 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6517 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6518 * record-btrace.c (record_btrace_cpu_state_kind): New.
6519 (record_btrace_cpu): New.
6520 (set_record_btrace_cpu_cmdlist): New.
6521 (record_btrace_get_cpu): New.
6522 (require_btrace_thread, record_btrace_info)
6523 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6524 (cmd_set_record_btrace_cpu_none): New.
6525 (cmd_set_record_btrace_cpu_auto): New.
6526 (cmd_set_record_btrace_cpu): New.
6527 (cmd_show_record_btrace_cpu): New.
6528 (_initialize_record_btrace): Initialize set/show record btrace cpu
6530 * record-btrace.h (record_btrace_get_cpu): New.
6532 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6534 * record.c (set_record_command): Fix typo in message.
6536 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6538 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6540 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6542 * infrun.c (process_event_stop_test): Call
6543 gdbarch_in_indirect_branch_thunk.
6544 * gdbarch.sh (in_indirect_branch_thunk): New.
6545 * gdbarch.c: Regenerated.
6546 * gdbarch.h: Regenerated.
6549 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6550 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6551 (ALLDEPFILES): Add x86-tdep.c.
6552 * arch-utils.h (default_in_indirect_branch_thunk): New.
6553 * arch-utils.c (default_in_indirect_branch_thunk): New.
6554 * i386-tdep: Include x86-tdep.h.
6555 (i386_in_indirect_branch_thunk): New.
6556 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6558 * amd64-tdep: Include x86-tdep.h.
6559 (amd64_in_indirect_branch_thunk): New.
6560 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6562 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6565 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6566 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6567 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6570 2018-04-12 Tom Tromey <tom@tromey.com>
6572 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6573 (rust_evaluate_subexp): Likewise.
6575 2018-04-12 Pedro Alves <palves@redhat.com>
6577 * procfs.c (procfs_detach): Make forward declaration's prototype
6578 match definition's protototype.
6579 (proc_get_LDT_entry): Remove stale do_cleanups call.
6581 2018-04-12 Pedro Alves <palves@redhat.com>
6583 * target.h (target_ops::to_has_exited): Delete.
6584 (target_has_exited): Delete.
6585 * target-delegates.c: Regenerate.
6587 2018-04-11 Pedro Alves <palves@redhat.com>
6589 * target.c (fileio_fh_t::t): Add comment.
6590 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6591 (target_fileio_close): Handle a NULL target.
6592 (invalidate_fileio_fh): New.
6593 (target_close): Call it.
6594 * remote.c (remote_hostio_send_command): No longer check whether
6595 remote_desc is open.
6597 2018-04-11 Pedro Alves <palves@redhat.com>
6599 * target.c (fileio_fh_t): Make it a named struct instead of a
6601 (fileio_fh_t::is_closed): New method.
6602 (DEF_VEC_O (fileio_fh_t)): Remove.
6603 (fileio_fhandles): Now a std::vector.
6604 (is_closed_fileio_fh): Delete.
6605 (acquire_fileio_fd): Adjust. Rename parameters.
6606 (release_fileio_fd): Adjust.
6607 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6608 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6609 (target_fileio_close): Adjust.
6611 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6613 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6616 2018-04-10 Pedro Alves <palves@redhat.com>
6618 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6619 (scoped_finish_thread_state): New class.
6620 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6622 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6623 (fetch_inferior_event, normal_stop): Likewise.
6624 * thread.c (finish_thread_state_cleanup): Delete.
6626 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6627 Pedro Alves <palves@redhat.com>
6629 * value.c: Include "selftest.h" and "common/array-view.h".
6630 (struct range) <operator ==>: New.
6631 (test_ranges_contain): New.
6632 (check_ranges_vector): New.
6633 (test_insert_into_bit_range_vector): New.
6634 (_initialize_values): Register selftests.
6635 * common/array-view.h (operator==, operator!=): New.
6637 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6639 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6641 * inline-frame.c: Include <algorithm>.
6642 (struct inline_state): Add constructor.
6643 (inline_state_s): Remove.
6644 (DEF_VEC_O(inline_state_s)): Remove.
6645 (inline_states): Change type to std::vector.
6646 (find_inline_frame_state): Adjust to std::vector.
6647 (allocate_inline_frame_state): Remove.
6648 (clear_inline_frame_state): Adjust to std::vector.
6649 (skip_inline_frames): Adjust to std::vector.
6651 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6653 * tracepoint.h (struct trace_state_variable): Add constructor.
6654 <name>: Change type to std::string.
6655 * tracepoint.c (tsv_s): Remove.
6656 (DEF_VEC_O(tsv_s)): Remove.
6657 (tvariables): Change to std::vector.
6658 (create_trace_state_variable): Adjust to std::vector.
6659 (find_trace_state_variable): Likewise.
6660 (find_trace_state_variable_by_number): Likewise.
6661 (delete_trace_state_variable): Likewise.
6662 (trace_variable_command): Adjust to std::string.
6663 (delete_trace_variable_command): Likewise.
6664 (tvariables_info_1): Adjust to std::vector.
6665 (save_trace_state_variables): Likewise.
6666 (start_tracing): Likewise.
6667 (merge_uploaded_trace_state_variables): Adjust to std::vector
6669 * target.h (struct target_ops)
6670 <to_download_trace_state_variable>: Pass reference to
6671 trace_state_variable.
6672 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6673 * target-delegates.c: Re-generate.
6674 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6675 (mi_tsv_deleted): Likewise.
6676 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6677 * remote.c (remote_download_trace_state_variable): Change
6678 pointer to reference and adjust.
6679 * make-target-delegates (parse_argtypes): Handle references.
6680 (write_function_header): Likewise.
6681 (munge_type): Likewise.
6683 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6685 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6686 string_view-selftests.c.
6687 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6689 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6690 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6691 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6692 * unittests/basic_string_view/element_access/char/1.cc:
6694 * unittests/basic_string_view/element_access/char/empty.cc:
6696 * unittests/basic_string_view/element_access/char/front_back.cc:
6698 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6699 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6701 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6703 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6705 * unittests/basic_string_view/operations/compare/char/1.cc:
6707 * unittests/basic_string_view/operations/compare/char/13650.cc:
6709 * unittests/basic_string_view/operations/copy/char/1.cc:
6711 * unittests/basic_string_view/operations/data/char/1.cc:
6713 * unittests/basic_string_view/operations/find/char/1.cc:
6715 * unittests/basic_string_view/operations/find/char/2.cc:
6717 * unittests/basic_string_view/operations/find/char/3.cc:
6719 * unittests/basic_string_view/operations/find/char/4.cc:
6721 * unittests/basic_string_view/operations/rfind/char/1.cc:
6723 * unittests/basic_string_view/operations/rfind/char/2.cc:
6725 * unittests/basic_string_view/operations/rfind/char/3.cc:
6727 * unittests/basic_string_view/operations/substr/char/1.cc:
6729 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6730 * unittests/string_view-selftests.c: New file.
6732 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6734 * unittests/basic_string_view/capacity/1.cc: New file.
6735 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6736 * unittests/basic_string_view/cons/char/1.cc: New file.
6737 * unittests/basic_string_view/cons/char/2.cc: New file.
6738 * unittests/basic_string_view/cons/char/3.cc: New file.
6739 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6740 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6741 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6742 * unittests/basic_string_view/element_access/char/1.cc: New file.
6743 * unittests/basic_string_view/element_access/char/2.cc: New file.
6744 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6745 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6746 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6747 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6748 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6749 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6750 * unittests/basic_string_view/include.cc: New file.
6751 * unittests/basic_string_view/inserters/char/1.cc: New file.
6752 * unittests/basic_string_view/inserters/char/2.cc: New file.
6753 * unittests/basic_string_view/inserters/char/3.cc: New file.
6754 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6755 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6756 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6757 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6758 * unittests/basic_string_view/literals/types.cc: New file.
6759 * unittests/basic_string_view/literals/values.cc: New file.
6760 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6761 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6762 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6763 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6764 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6765 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6766 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6767 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6768 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6769 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6770 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6771 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6772 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6773 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6774 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6775 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6776 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6777 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6778 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6779 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6780 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6781 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6782 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6783 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6784 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6785 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6786 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6787 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6788 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6789 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6790 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6791 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6792 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6793 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6794 * unittests/basic_string_view/operators/char/2.cc: New file.
6795 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6796 * unittests/basic_string_view/range_access/char/1.cc: New file.
6797 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6798 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6799 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6800 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6801 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6802 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6803 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6804 * unittests/basic_string_view/typedefs.cc: New file.
6805 * unittests/basic_string_view/types/1.cc: New file.
6807 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6809 * common/gdb_string_view.h: Remove libstdc++ implementation
6810 details, adjust to gdb reality.
6811 * common/gdb_string_view.tcc: Likewise.
6812 * cli/cli-script.c (struct string_view): Remove.
6813 (user_args) <m_args>: Change element type to gdb::string_view.
6814 (user_args::insert_args): Adjust.
6816 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6818 * common/gdb_string_view.h: New file.
6819 * common/gdb_string_view.tcc: New file.
6821 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6823 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6824 * configure: Re-generate.
6826 2018-04-09 Pedro Alves <palves@redhat.com>
6828 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6829 (set_target_gdbarch): Call
6830 gdb::observers::architecture_changed.notify instead of
6831 observer_notify_architecture_changed.
6833 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6835 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6836 (do_restore_current_traceframe_cleanup): Remove.
6837 (restore_current_traceframe_cleanup_dtor): Remove.
6838 (make_cleanup_restore_current_traceframe): Remove.
6839 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6841 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6842 * infrun.c (fetch_inferior_event): Use
6843 scoped_restore_current_traceframe.
6845 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6847 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6849 <n_allocated_type_units>: Remove.
6850 <all_type_units>: Change to std::vector.
6851 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6852 to std::vector change.
6853 (dwarf2_per_objfile::get_cutu): Likewise.
6854 (dwarf2_per_objfile::get_tu): Likewise.
6855 (create_signatured_type_table_from_index): Likewise.
6856 (create_signatured_type_table_from_debug_names): Likewise.
6857 (dw2_symtab_iter_next): Likewise.
6858 (dw2_print_stats): Likewise.
6859 (dw2_expand_all_symtabs): Likewise.
6860 (dw2_expand_marked_cus): Likewise.
6861 (dw2_debug_names_iterator::next): Likewise.
6862 (dwarf2_initialize_objfile): Likewise.
6863 (add_signatured_type_cu_to_table): Likewise.
6864 (create_all_type_units): Likewise.
6865 (add_type_unit): Likewise.
6866 (struct tu_abbrev_offset): Add constructor.
6867 (build_type_psymtabs_1): Adjust to std::vector change.
6868 (print_tu_stats): Likewise.
6869 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6870 (write_debug_names): Likewise.
6872 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6874 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6875 Make an std::vector.
6876 <n_comp_units>: Remove.
6877 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6878 to std::vector change.
6879 (dwarf2_per_objfile::get_cutu): Likewise.
6880 (dwarf2_per_objfile::get_cu): Likewise.
6881 (create_cus_from_index): Likewise.
6882 (create_addrmap_from_index): Likewise.
6883 (create_addrmap_from_aranges): Likewise.
6884 (dwarf2_read_index): Likewise.
6885 (dw2_find_last_source_symtab): Likewise.
6886 (dw2_map_symtabs_matching_filename): Likewise.
6887 (dw2_symtab_iter_next): Likewise.
6888 (dw2_print_stats): Likewise.
6889 (dw2_expand_all_symtabs): Likewise.
6890 (dw2_expand_symtabs_with_fullname): Likewise.
6891 (dw2_expand_marked_cus): Likewise.
6892 (dw2_map_symbol_filenames): Likewise.
6893 (create_cus_from_debug_names): Likewise.
6894 (dwarf2_read_debug_names): Likewise.
6895 (dw2_debug_names_iterator::next): Likewise.
6896 (dwarf2_initialize_objfile): Likewise.
6897 (set_partial_user): Likewise.
6898 (dwarf2_build_psymtabs_hard): Likewise.
6899 (read_comp_units_from_section): Remove arguments, adjust to
6901 (create_all_comp_units): Adjust to std::vector and
6902 read_comp_units_from_section changes.
6903 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6905 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6906 (psyms_seen_size): Likewise.
6907 (write_gdbindex): Likewise.
6908 (write_debug_names): Likewise.
6910 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6912 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6913 with dwarf2_per_objfile.
6914 (create_cus_from_index): Likewise.
6915 (create_signatured_type_table_from_index): Likewise.
6916 (dwarf2_read_index): Likewise.
6917 (dwarf2_initialize_objfile): Likewise.
6918 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6919 per_cu rather than get_dwarf2_per_objfile.
6921 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6923 * dwarf2read.h (struct signatured_type): Forward declare.
6924 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6926 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6927 (dw2_get_cutu): ...this.
6928 (dwarf2_per_objfile::get_cu): Rename from...
6929 (dw2_get_cu): ...this.
6930 (dwarf2_per_objfile::get_tu): New.
6931 (create_addrmap_from_index): Adjust.
6932 (create_addrmap_from_aranges): Adjust.
6933 (dw2_find_last_source_symtab): Adjust.
6934 (dw2_map_symtabs_matching_filename): Adjust.
6935 (dw2_symtab_iter_next): Adjust.
6936 (dw2_print_stats): Adjust.
6937 (dw2_expand_all_symtabs): Adjust.
6938 (dw2_expand_symtabs_with_fullname): Adjust.
6939 (dw2_expand_marked_cus): Adjust.
6940 (dw_expand_symtabs_matching_file_matcher): Adjust.
6941 (dw2_map_symbol_filenames): Adjust.
6942 (dw2_debug_names_iterator::next): Adjust.
6943 (dwarf2_initialize_objfile): Adjust.
6944 (set_partial_user): Adjust.
6945 (dwarf2_build_psymtabs_hard): Adjust.
6947 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6949 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6950 Remove unused variables.
6951 (dw2_map_symtabs_matching_filename): Likewise.
6952 (dwarf2_record_block_ranges): Likewise.
6953 (dwarf2_read_addr_index): Likewise.
6954 (follow_die_offset): Likewise.
6956 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6958 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6959 to symbol_file_add_main.
6961 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6964 * mi/mi-console.c (do_fputc_async_safe): New.
6965 (mi_console_file::write_async_safe): New.
6966 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6967 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6969 * ui-file.c (ui_file::putstrn): Adjust call to
6970 fputstrn_unfiltered.
6971 * utils.c (printchar): Replace do_fputs and do_fprintf
6972 parameters by do_fputc.
6973 (fputstr_filtered): Adjust call to printchar.
6974 (fputstr_unfiltered): Likewise.
6975 (fputstrn_filtered): Likewise.
6976 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6978 * utils.h (do_fputc_ftype): New typedef.
6979 (fputstrn_unfiltered): Add do_fputc parameter.
6981 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6983 * regformats/i386/i386-avx.dat: Remove.
6985 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6988 * amd64-tdep.c (amd64_none_init_abi): New function.
6989 (amd64_x32_none_init_abi): New function.
6990 (_initialize_amd64_tdep): Register handlers for x86-64 and
6991 x64_32 with GDB_OSABI_NONE.
6992 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6993 GDB_OSABI_NONE osabi.
6995 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6998 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7000 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7001 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7003 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7005 * common/byte-vector.h (char_vector): New type.
7006 * target.h (target_read_alloc): Return
7007 gdb::optional<byte_vector>.
7008 (target_read_stralloc): Return gdb::optional<char_vector>.
7009 (target_get_osdata): Return gdb::optional<char_vector>.
7010 * target.c (target_read_alloc_1): Templatize. Replacement
7011 manual memory management with vector.
7012 (target_read_alloc): Change return type, adjust.
7013 (target_read_stralloc): Change return type, adjust.
7014 (target_get_osdata): Change return type, adjust.
7015 * auxv.c (struct auxv_info) <length>: Remove.
7016 <data>: Change type to gdb::optional<byte_vector>.
7017 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7018 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7019 (target_auxv_search): Adjust.
7020 (fprint_target_auxv): Adjust.
7021 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7022 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7023 (linux_make_corefile_notes): Adjust.
7024 * osdata.c (get_osdata): Adjust.
7025 * remote.c (remote_get_threads_with_qxfer): Adjust.
7026 (remote_memory_map): Adjust.
7027 (remote_traceframe_info): Adjust.
7028 (btrace_read_config): Adjust.
7029 (remote_read_btrace): Adjust.
7030 (remote_pid_to_exec_file): Adjust.
7031 * solib-aix.c (solib_aix_get_library_list): Adjust.
7032 * solib-dsbt.c (decode_loadmap): Don't free buf.
7033 (dsbt_get_initial_loadmaps): Adjust.
7034 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7035 * solib-target.c (solib_target_current_sos): Adjust.
7036 * tracepoint.c (sdata_make_value): Adjust.
7037 * xml-support.c (xinclude_start_include): Adjust.
7038 (xml_fetch_content_from_file): Adjust.
7039 * xml-support.h (xml_fetch_another): Change return type.
7040 (xml_fetch_content_from_file): Change return type.
7041 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7042 * xml-tdesc.c (file_read_description_xml): Adjust.
7043 (fetch_available_features_from_target): Change return type.
7044 (target_fetch_description_xml): Adjust.
7045 (target_read_description_xml): Adjust.
7047 2018-04-06 Tom Tromey <tom@tromey.com>
7049 * value.c (~value): Update.
7050 (struct value) <contents>: Now unique_xmalloc_ptr.
7051 (value_contents_bits_eq, allocate_value_contents)
7052 (value_contents_raw, value_contents_all_raw)
7053 (value_contents_for_printing, value_contents_for_printing_const)
7054 (set_value_enclosing_type): Update.
7056 2018-04-06 Tom Tromey <tom@tromey.com>
7058 * value.c (range_s): Remove typedef, VEC.
7059 (struct range): Add operator<.
7060 (range_lessthan): Remove.
7061 (ranges_contain): Change type.
7063 (struct value) <unavailable, optimized_out>: Now std::vector.
7064 (value_entirely_available)
7065 (value_entirely_covered_by_range_vector)
7066 (value_entirely_unavailable, value_entirely_optimized_out):
7068 (insert_into_bit_range_vector): Change argument type.
7069 (find_first_range_overlap): Likewise.
7070 (struct ranges_and_idx, value_contents_bits_eq)
7071 (require_not_optimized_out, require_available): Update.
7072 (ranges_copy_adjusted): Change argument types.
7073 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7075 2018-04-06 Tom Tromey <tom@tromey.com>
7077 * value.c (~value): Update.
7078 (struct value) <parent>: Now a value_ref_ptr.
7079 (value_parent, set_value_parent, value_address, value_copy):
7082 2018-04-06 Tom Tromey <tom@tromey.com>
7084 * value.c (struct value): Add constructor, destructor, and member
7086 (allocate_value_lazy, value_decref): Update.
7088 2018-04-06 Tom Tromey <tom@tromey.com>
7090 * value.c (struct value) <released, next>: Remove.
7091 (all_values): Now a std::vector.
7092 (allocate_value_lazy): Update.
7093 (value_next): Remove.
7094 (value_mark, value_free_to_mark, release_value)
7095 (value_release_to_mark): Update.
7097 2018-04-06 Tom Tromey <tom@tromey.com>
7099 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7100 (free_value_chain): Remove.
7101 * value.c (free_value_chain): Remove.
7102 (value_release_to_mark): Return a std::vector.
7103 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7105 (check_condition): Update.
7106 * eval.c (fetch_subexp_value): Change "val_chain" to a
7108 * breakpoint.c (update_watchpoint): Update.
7109 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7111 2018-04-06 Tom Tromey <tom@tromey.com>
7113 * value.h (free_all_values): Remove.
7114 * value.c (free_all_values): Remove.
7116 2018-04-06 Tom Tromey <tom@tromey.com>
7118 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7119 (value_history_chain, value_history_count): Remove.
7120 (value_history): New global.
7121 (record_latest_value, access_value_history, show_values)
7122 (preserve_values): Update.
7124 2018-04-06 Tom Tromey <tom@tromey.com>
7126 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7127 * varobj.c (varobj_set_display_format, varobj_set_value)
7128 (install_default_visualizer, construct_visualizer)
7129 (install_new_value, ~varobj, varobj_get_value_type)
7130 (my_value_of_variable, varobj_editable_p): Update.
7131 * c-varobj.c (c_describe_child, c_value_of_variable)
7132 (cplus_number_of_children, cplus_describe_child): Update.
7133 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7134 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7135 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7137 2018-04-06 Tom Tromey <tom@tromey.com>
7139 * printcmd.c (last_examine_address): Change type to
7141 (do_examine, x_command): Update.
7143 2018-04-06 Tom Tromey <tom@tromey.com>
7145 * value.c (release_value): Update.
7146 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7147 (struct bpstats) <val>: Now a value_ref_ptr.
7148 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7149 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7150 (~watchpoint, print_it_watchpoint, watch_command_1)
7151 (invalidate_bp_value_on_memory_change): Update.
7153 2018-04-06 Tom Tromey <tom@tromey.com>
7155 * varobj.c (varobj_clear_saved_item)
7156 (update_dynamic_varobj_children, install_new_value, ~varobj):
7158 * value.h (value_incref): Move declaration earlier.
7159 (value_decref): Rename from value_free.
7160 (struct value_ref_policy): New.
7161 (value_ref_ptr): New typedef.
7162 (struct value_deleter): Remove.
7163 (gdb_value_up): Remove typedef.
7164 (release_value): Change return type.
7165 (release_value_or_incref): Remove.
7166 * value.c (set_value_parent): Update.
7167 (value_incref): Change return type.
7168 (value_decref): Rename from value_free.
7169 (value_free_to_mark, free_all_values, free_value_chain): Update.
7170 (release_value): Return value_ref_ptr.
7171 (release_value_or_incref): Remove.
7172 (record_latest_value, set_internalvar, clear_internalvar):
7174 * stack.c (info_frame_command): Don't call value_free.
7175 * python/py-value.c (valpy_dealloc, valpy_new)
7176 (value_to_value_object): Update.
7177 * printcmd.c (do_examine): Update.
7178 * opencl-lang.c (lval_func_free_closure): Update.
7179 * mi/mi-main.c (register_changed_p): Don't call value_free.
7180 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7181 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7182 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7184 * guile/scm-value.c (vlscm_free_value_smob)
7185 (vlscm_scm_from_value): Update.
7186 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7187 (frame_unwind_register_unsigned, get_frame_register_bytes)
7188 (put_frame_register_bytes): Don't call value_free.
7189 * findvar.c (address_from_register): Don't call value_free.
7190 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7191 * dwarf2loc.c (entry_data_value_free_closure)
7192 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7193 (dwarf2_evaluate_loc_desc_full): Update.
7194 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7195 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7196 (~watchpoint, watch_command_1)
7197 (invalidate_bp_value_on_memory_change): Update.
7198 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7200 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7203 * warning.m4: Add -Wno-error=deprecated-register.
7204 * configure: Re-generate.
7206 2018-04-05 Tom Tromey <tom@tromey.com>
7208 * linespec.h: Remove include of "vec.h".
7210 2018-04-05 Tom Tromey <tom@tromey.com>
7212 * linespec.c (typep): Remove typedef.
7213 (find_methods, find_superclass_methods): Take a std::vector.
7214 (find_method): Use std::vector.
7216 2018-04-05 Tom Tromey <tom@tromey.com>
7218 * utils.c (compare_strings): Remove.
7219 * utils.h (compare_strings): Remove.
7220 * objc-lang.h (find_imps): Update.
7221 * objc-lang.c (find_methods): Take a std::vector.
7222 (uniquify_strings, find_imps): Likewise.
7223 * linespec.c (find_methods): Take a std::vector.
7224 (decode_objc): Use std::vector.
7225 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7227 (find_method, find_function_symbols): Use std::vector.
7229 2018-04-05 Tom Tromey <tom@tromey.com>
7231 * completer.c (completion_tracker::completion_tracker): Remove
7233 (completion_tracker::discard_completions): Likewise.
7234 * breakpoint.c (ambiguous_names_p): Remove cast.
7235 * ada-lang.c (_initialize_ada_language): Remove cast.
7236 * utils.h (streq): Update.
7237 (streq_hash): Add new declaration.
7238 * utils.c (streq): Return bool.
7239 (streq_hash): New function.
7241 2018-04-05 Tom Tromey <tom@tromey.com>
7243 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7244 Remove a string copy.
7246 2018-04-05 Tom Tromey <tom@tromey.com>
7248 * linespec.c (filter_results): Use std::vector.
7249 (decode_line_2, decode_line_full): Update.
7251 2018-04-05 Tom Tromey <tom@tromey.com>
7253 * linespec.c (canonical_to_fullform): Return std::string.
7254 (filter_results): Update.
7255 (struct decode_line_2_item): Add constructor.
7256 <fullform, displayform>: Now std::string.
7257 (decode_line_2_compare_items): Now a std::sort comparator.
7258 (decode_line_2): Update.
7260 2018-04-05 Tom Tromey <tom@tromey.com>
7262 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7263 (unexpected_linespec_error): Update.
7264 (linespec_parse_basic, parse_linespec): Update.
7266 2018-04-05 Tom Tromey <tom@tromey.com>
7268 * linespec.c (linespec_parse_basic): Reindent.
7270 2018-04-05 Tom Tromey <tom@tromey.com>
7272 * minsyms.h (iterate_over_minimal_symbols): Update.
7273 * minsyms.c (iterate_over_minimal_symbols): Take a
7275 * linespec.c (struct collect_minsyms): Remove.
7276 (compare_msyms): Now a std::sort comparator.
7277 (add_minsym): Add parameters.
7278 (search_minsyms_for_name): Update. Use std::vector.
7280 2018-04-03 Tom Tromey <tom@tromey.com>
7282 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7285 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7287 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7289 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7292 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7293 printing static type.
7295 2018-04-01 Tom Tromey <tom@tromey.com>
7297 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7298 (rs6000_xfer_shared_libraries): Update.
7300 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7302 * common/gdb_vecs.h (char_ptr): Remove.
7303 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7305 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7307 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7309 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7311 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7313 * tracepoint.h (struct uploaded_tp): Initialize fields.
7314 <actions, step_actions, cmd_strings>: Change type to
7315 std::vector<char *>.
7316 * tracepoint.c (get_uploaded_tp): Allocate with new.
7317 (free_uploaded_tps): Free with delete.
7318 (parse_tracepoint_definition): Adjust to std::vector change.
7319 * breakpoint.c (read_uploaded_action): Likewise.
7320 (create_tracepoint_from_upload): Likewise.
7321 * ctf.c (ctf_write_uploaded_tp): Likewise.
7322 (SET_ARRAY_FIELD): Likewise.
7323 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7325 2018-03-30 Tom Tromey <tom@tromey.com>
7327 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7329 (svr4_keep_data_in_core): Update.
7330 (svr4_read_so_list): Update.
7332 2018-03-30 Tom Tromey <tom@tromey.com>
7334 * windows-nat.c (handle_output_debug_string, handle_exception):
7336 * target.h (target_read_string): Update.
7337 * target.c (target_read_string): Change "string" to
7339 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7341 * solib-frv.c (frv_current_sos): Update.
7342 * solib-dsbt.c (dsbt_current_sos): Update.
7343 * solib-darwin.c (darwin_current_sos): Update.
7344 * linux-thread-db.c (inferior_has_bug): Update.
7345 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7346 Update. Remove alloca.
7347 * ada-lang.c (ada_main_name): Update.
7349 2018-03-30 Tom Tromey <tom@tromey.com>
7351 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7352 (struct dwo_file_deleter): New.
7353 (dwo_file_up): New typedef.
7354 (open_and_init_dwo_file): Use dwo_file_up.
7355 (free_dwo_file_cleanup): Remove.
7357 2018-03-30 Tom Tromey <tom@tromey.com>
7359 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7360 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7362 2018-03-30 Tom Tromey <tom@tromey.com>
7364 * dwarf2read.c (class free_cached_comp_units): New class.
7365 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7366 (free_cached_comp_units): Remove function.
7368 2018-03-30 Tom Tromey <tom@tromey.com>
7370 * utils.h (make_cleanup_unpush_target): Remove.
7371 * inf-ptrace.c (struct target_unpusher): New.
7372 (target_unpush_up) New typedef.
7373 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7375 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7377 2018-03-27 Tom Tromey <tom@tromey.com>
7379 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7381 2018-03-27 Pedro Alves <palves@redhat.com>
7382 Tom Tromey <tom@tromey.com>
7384 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7385 destructor. Now a class.
7386 (gdb_readline_wrapper_cleanup): Remove function.
7387 (gdb_readline_wrapper): Remove cleanups.
7389 2018-03-27 Tom Tromey <tom@tromey.com>
7391 * typeprint.h (struct type_print_options) <local_typedefs,
7392 global_typedefs>: Remove "struct" keyword.
7393 (class typedef_hash_table): New class.
7394 (recursively_update_typedef_hash, add_template_parameters)
7395 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7396 (find_typedef_in_hash): Don't declare.
7397 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7398 (typedef_hash_table::recursively_update): Rename from
7399 recursively_update_typedef_hash. Now a member.
7400 (typedef_hash_table::add_template_parameters): Rename from
7401 add_template_parameters. Now a member.
7402 (typedef_hash_table::typedef_hash_table): Now a constructor;
7403 rename from create_typedef_hash.
7404 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7405 rename from free_typedef_hash.
7406 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7407 (do_free_global_table): Remove.
7408 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7409 from copy_type_recursive.
7410 (create_global_typedef_table): Remove.
7411 (typedef_hash_table::find_global_typedef): Now a member of
7413 (typedef_hash_table::find_typedef): Rename from
7414 find_typedef_in_hash; now a member.
7415 (whatis_exp): Update.
7416 * extension.h (struct ext_lang_type_printers): Add constructor and
7418 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7420 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7421 Now a constructor; rename from start_ext_lang_type_printers.
7422 (ext_lang_type_printers): Now a destructor; rename from
7423 free_ext_lang_type_printers.
7424 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7426 (c_type_print_base_struct_union): Update. Remove cleanups.
7428 2018-03-27 Tom Tromey <tom@tromey.com>
7430 * dwarf-index-write.c: Include <cmath>.
7432 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7434 * NEWS: Add entry describing new "set|show varsize-limit" command.
7435 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7437 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7440 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7442 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7444 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7445 * dwarf-index-common.c: New file.
7446 * dwarf-index-common.h: New file.
7447 * dwarf-index-write.c: New file.
7448 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7449 (struct dwarf2_section_info): Move from here.
7450 (dwarf2_section_info_def): Likewise.
7451 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7452 (offset_type): Likewise.
7453 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7454 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7455 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7456 (byte_swap): Likewise.
7457 (MAYBE_SWAP): Likewise.
7458 (dwarf2_per_cu_ptr): Likewise.
7459 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7460 (struct tu_stats): Likewise.
7461 (struct dwarf2_per_objfile): Likewise.
7462 (struct dwarf2_per_cu_data): Likewise.
7463 (struct signatured_type): Likewise.
7464 (sig_type_ptr): Likewise.
7465 (DEF_VEC_P (sig_type_ptr)): Likewise.
7466 (INDEX4_SUFFIX): Likewise.
7467 (INDEX5_SUFFIX): Likewise.
7468 (DEBUG_STR_SUFFIX): Likewise.
7469 (dwarf2_read_section): Make non-static.
7470 (mapped_index_string_hash): Move from here.
7471 (dwarf5_djb_hash): Likewise.
7472 (file_write): Likewise.
7473 (class data_buf): Likewise.
7474 (struct symtab_index_entry): Likewise.
7475 (struct mapped_symtab): Likewise.
7476 (find_slot): Likewise.
7477 (hash_expand): Likewise.
7478 (add_index_entry): Likewise.
7479 (uniquify_cu_indices): Likewise.
7480 (class c_str_view): Likewise.
7481 (class c_str_view_hasher): Likewise.
7482 (class vector_hasher): Likewise.
7483 (write_hash_table): Likewise.
7484 (psym_index_map): Likewise.
7485 (struct addrmap_index_data): Likewise.
7486 (add_address_entry): Likewise.
7487 (add_address_entry_worker): Likewise.
7488 (write_address_map): Likewise.
7489 (symbol_kind): Likewise.
7490 (write_psymbols): Likewise.
7491 (struct signatured_type_index_data): Likewise.
7492 (write_one_signatured_type): Likewise.
7493 (recursively_count_psymbols): Likewise.
7494 (recursively_write_psymbols): Likewise.
7495 (class debug_names): Likewise.
7496 (check_dwarf64_offsets): Likewise.
7497 (psyms_seen_size): Likewise.
7498 (write_gdbindex): Likewise.
7499 (write_debug_names): Likewise.
7500 (assert_file_size): Likewise.
7501 (write_psymtabs_to_index): Likewise.
7502 (save_gdb_index_command): Likewise.
7503 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7505 * dwarf2read.h: New file.
7507 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7510 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7511 symbol name if the CU's language stores symbol names in linkage
7513 * language.h (struct language_defn)
7514 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7515 all instances of this struct.
7517 2018-03-26 Tom Tromey <tom@tromey.com>
7519 * stack.c (backtrace_command_1): Remove verbose code.
7521 2018-03-26 Tom Tromey <tom@tromey.com>
7523 * python/py-framefilter.c (py_print_type): Don't catch
7524 exceptions. Return void.
7525 (py_print_value): Likewise.
7526 (py_print_single_arg): Likewise.
7527 (enumerate_args): Don't catch exceptions.
7528 (py_print_args): Likewise.
7529 (py_print_frame): Likewise.
7530 (gdbpy_apply_frame_filter): Catch exceptions here.
7532 2018-03-26 Tom Tromey <tom@tromey.com>
7534 * stack.c (_initialize_stack): Remove trailing newlines from help
7535 text. Add "Usage" line to "backtrace" help.
7537 2018-03-26 Tom Tromey <tom@tromey.com>
7540 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7542 2018-03-26 Tom Tromey <tom@tromey.com>
7544 * python/py-framefilter.c (py_print_single_arg): Return
7545 EXT_LANG_BT_ERROR from catch.
7547 2018-03-26 Tom Tromey <tom@tromey.com>
7550 * stack.c (backtrace_command_1): Move some code into no-filters
7553 2018-03-26 Tom Tromey <tom@tromey.com>
7555 * python/py-framefilter.c (throw_quit_or_print_exception): New
7557 (gdbpy_apply_frame_filter): Use it.
7559 2018-03-26 Tom Tromey <tom@tromey.com>
7562 * python/py-framefilter.c (py_print_type, py_print_value)
7563 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7566 2018-03-26 Tom Tromey <tom@tromey.com>
7568 * python/py-framefilter.c (enumerate_args): Use
7569 gdb::unique_xmalloc_ptr.
7571 2018-03-26 Tom Tromey <tom@tromey.com>
7573 * python/py-framefilter.c (py_print_frame): Return
7575 (gdbpy_apply_frame_filter): Update comment.
7576 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7578 <EXT_LANG_BT_NO_FILTERS>: Change value.
7580 2018-03-26 Tom Tromey <tom@tromey.com>
7583 * stack.c (backtrace_command): Parse "hide" argument.
7584 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7585 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7588 2018-03-26 Tom Tromey <tom@tromey.com>
7590 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7592 (backtrace_command): Remove "fulltrace", add "flags".
7594 2018-03-26 Tom Tromey <tom@tromey.com>
7596 * stack.c (backtrace_command): Rewrite command line parsing.
7598 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7600 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7602 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7604 * filename-seen-cache.h: Add include guard.
7606 2018-03-26 Keith Seitz <keiths@redhat.com>
7608 * symfile.c (place_section): Remove "struct" from section_addr_info
7610 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7611 "struct" keyword from section_addr_info.
7613 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7615 * regformats/regdef.h (reg): Add constructors.
7617 2018-03-25 Pedro Alves <palves@redhat.com>
7619 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7620 if then/else bodies in var_func_name extraction.
7622 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7624 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7625 lookup_minimal_symbol() to find symbol entry.
7626 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7628 2018-03-23 Keith Seitz <keiths@redhat.com>
7631 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7632 nested type definitions for C++, too.
7634 2018-03-23 Tom Tromey <tom@tromey.com>
7636 * machoread.c (struct oso_el): Add a constructor. Don't define as
7638 (macho_register_oso): Remove.
7639 (macho_symtab_read): Take a std::vector.
7640 (oso_el_compare_name): Now a std::sort comparator.
7641 (macho_symfile_read_all_oso): Take a std::vector.
7642 (macho_symfile_read): Use std::vector. Remove cleanups.
7644 2018-03-22 Tom Tromey <tom@tromey.com>
7646 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7647 (record_full_goto_bookmark): Use std::string.
7649 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7652 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7655 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7657 * rs6000-tdep.c (store_insn_p): New function.
7658 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7659 and cr_reg to their unshifted values. Use store_insn_p to
7660 match LR saves using either R1 or fdata->alloca_reg. Use
7661 store_insn_p to match CR saves. Set alloca_reg_offset
7662 when alloca_reg and framep are set. Remove lr_reg shift
7663 when assigning to fdata->lr_register.
7665 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7667 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7668 command line args instead of emitting a warning.
7670 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7672 * tracepoint.h (struct static_tracepoint_marker): Initialize
7673 fields, define default constructor, move constructor and move
7674 assignment, disable the rest.
7675 <str_id, extra>: Make std::string.
7676 (release_static_tracepoint_marker): Remove.
7677 (free_current_marker): Remove.
7678 * tracepoint.c (free_current_marker): Remove.
7679 (parse_static_tracepoint_marker_definition): Adjust to
7680 std::string, use new hex2str overload.
7681 (release_static_tracepoint_marker): Remove.
7682 (print_one_static_tracepoint_marker): Get marker by reference
7683 and adjust to std::string.
7684 (info_static_tracepoint_markers_command): Adjust to std::vector
7686 * target.h (static_tracepoint_marker_p): Remove typedef.
7687 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7688 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7690 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7692 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7693 (target_debug_print_std_vector_static_tracepoint_marker): New.
7694 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7696 (target_debug_print_static_tracepoint_marker_p): ... this.
7697 * target-delegates.c: Re-generate.
7698 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7700 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7701 (decode_static_tracepoint_spec): Adjust to std::vector.
7702 (tracepoint_print_one_detail): Adjust to std::string.
7703 (strace_marker_decode_location): Adjust to std::string.
7704 (update_static_tracepoint): Adjust to std::string, remove call
7705 to release_static_tracepoint_marker.
7706 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7707 Adjust to std::vector.
7708 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7709 (remote_static_tracepoint_markers_by_strid): Adjust to
7711 * common/rsp-low.h (hex2str): New overload with explicit count
7713 * common/rsp-low.c (hex2str): New overload with explicit count
7715 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7716 (_initialize_rsp_low_selftests): Add test_hex2str test.
7717 * unittests/tracepoint-selftests.c
7718 (test_parse_static_tracepoint_marker_definition): Adjust to
7721 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7723 * tracepoint.c (parse_static_tracepoint_marker_definition):
7724 Consider case where the definition is followed by more
7726 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7727 tracepoint-selftests.c.
7728 * unittests/tracepoint-selftests.c: New.
7730 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7732 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7735 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7737 * symtab.c (find_pc_sect_line): fixed indentation.
7739 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7741 * symtab.c (find_pc_sect_line): now uses binary search.
7743 2018-03-19 Tom Tromey <tom@tromey.com>
7745 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7748 2018-03-19 Pedro Alves <palves@redhat.com>
7749 Tom Tromey <tom@tromey.com>
7751 * unittests/observable-selftests.c: New file.
7752 * common/observable.h: New file.
7753 * observable.h: New file.
7754 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7755 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7756 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7757 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7758 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7759 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7760 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7761 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7762 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7763 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7764 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7765 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7766 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7767 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7768 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7769 tui/tui-interp.c, valops.c: Update all users.
7770 * tui/tui-hooks.c (tui_bp_created_observer)
7771 (tui_bp_deleted_observer, tui_bp_modified_observer)
7772 (tui_inferior_exit_observer, tui_before_prompt_observer)
7773 (tui_normal_stop_observer, tui_register_changed_observer):
7775 (tui_observers_token): New global.
7776 (attach_or_detach, tui_attach_detach_observers): New functions.
7777 (tui_install_hooks, tui_remove_hooks): Use
7778 tui_attach_detach_observers.
7779 * record-btrace.c (record_btrace_thread_observer): Remove.
7780 (record_btrace_thread_observer_token): New global.
7781 * observer.sh: Remove.
7782 * observer.c: Rename to observable.c.
7783 * observable.c (namespace gdb_observers): Define new objects.
7784 (observer_debug): Move into gdb_observers namespace.
7785 (struct observer, struct observer_list, xalloc_observer_list_node)
7786 (xfree_observer_list_node, generic_observer_attach)
7787 (generic_observer_detach, generic_observer_notify): Remove.
7788 (_initialize_observer): Update.
7789 Don't include observer.inc.
7790 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7791 (clean mostlyclean): Likewise.
7792 (observer.h, observer.inc): Remove targets.
7793 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7794 (COMMON_SFILES): Use observable.c, not observer.c.
7795 * .gitignore: Remove observer.h.
7797 2018-03-18 Tom Tromey <tom@tromey.com>
7799 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7801 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7803 2018-03-17 Tom Tromey <tom@tromey.com>
7805 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7807 2018-03-17 Tom Tromey <tom@tromey.com>
7809 * target.c (class scoped_target_fd): New.
7810 (target_fileio_close_cleanup): Remove.
7811 (target_fileio_read_alloc_1): Use scoped_target_fd.
7813 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7815 * silent-rules.mk: New.
7816 * Makefile.in: Include silent-rules.mk
7817 (srcdir, VPATH, top_srcdir): Move up.
7818 (COMPILE): Add ECHO_CXX.
7819 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7820 (init.c): Add ECHO_INIT_C.
7821 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7822 (version.c): Add ECHO_GEN.
7823 (printcmd.o): Add ECHO_CXX.
7824 (target-float.o): Add ECHO_CXX.
7825 (ada-exp.o): Add ECHO_CXX.
7826 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7827 (insight$(EXEEXT)): Add ECHO_CXXLD.
7828 * gnulib/configure.ac: Add AM_SILENT_RULES.
7829 * gnulib/aclocal.m4: Re-generate.
7830 * gnulib/configure: Re-generate.
7831 * gnulib/import/Makefile.in: Re-generate.
7833 2018-03-16 Tom Tromey <tom@tromey.com>
7835 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7836 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7837 * utils.c (do_free_section_addr_info)
7838 (make_cleanup_free_section_addr_info): Remove.
7839 * symfile.h (struct other_sections): Add constructor.
7840 (struct section_addr_info): Remove.
7841 (section_addr_info): New typedef.
7842 (struct sym_fns) <sym_offsets>: Change type of parameter.
7843 (build_section_addr_info_from_objfile)
7844 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7845 (default_symfile_offsets, symbol_file_add)
7846 (symbol_file_add_from_bfd)
7847 (build_section_addr_info_from_section_table): Update.
7848 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7849 * symfile.c (alloc_section_addr_info): Remove.
7850 (build_section_addr_info_from_section_table): Change return type.
7852 (build_section_addr_info_from_bfd)
7853 (build_section_addr_info_from_objfile): Likewise.
7854 (free_section_addr_info): Remove.
7855 (relative_addr_info_to_section_offsets): Change type of "addrs".
7856 (addrs_section_compar): Now a std::sort comparator.
7857 (addrs_section_sort): Change return type.
7858 (addr_info_make_relative): Change type of "addrs". Update.
7859 (default_symfile_offsets, syms_from_objfile_1)
7860 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7861 (symbol_file_add_separate): Update.
7862 (symbol_file_add): Change type of "addrs". Update.
7863 (add_symbol_file_command): Update. Remove cleanups.
7864 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7866 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7867 * solib.c (solib_read_symbols): Update.
7868 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7869 * machoread.c (macho_symfile_offsets): Update.
7870 * jit.c (jit_bfd_try_read_symtab): Update.
7872 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7874 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7875 unittests/utils-selftests.c.
7876 * unittests/utils-selftests.c: New file.
7878 2018-03-14 Tom Tromey <tom@tromey.com>
7881 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7884 2018-03-14 Tom Tromey <tom@tromey.com>
7887 * printcmd.c (printf_pointer): Allow "-" in format.
7889 2018-03-14 Tom Tromey <tom@tromey.com>
7891 * printcmd.c (_initialize_printcmd): Add usage to printf.
7893 2018-03-14 Yao Qi <qiyao@sourceware.org>
7895 * MAINTAINERS: Update my email address.
7897 2018-03-13 Tom Tromey <tom@tromey.com>
7899 * machoread.c (macho_check_dsym): Change filenamep to a
7901 (macho_symfile_read): Update.
7902 * symfile.c (load_command): Use std::string.
7904 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7906 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7907 to error message string.
7908 (riscv_register_name): Use xsnprintf instead of sprintf.
7909 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7911 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7913 (riscv_push_dummy_call): Likewise.
7915 2018-03-12 Tom Tromey <tom@tromey.com>
7917 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7918 Use gdb::byte_vector.
7919 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7921 2018-03-12 Yao Qi <yao.qi@linaro.org>
7923 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7924 parameter type to readable_regcache.
7925 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7928 2018-03-11 Tom Tromey <tom@tromey.com>
7930 * dwarf2read.c (struct nextfield): Add initializers.
7931 (struct nextfnfield): Remove.
7932 (struct fnfieldlist): Add initializers. Remove "length" and
7933 "head", use std::vector.
7934 (struct decl_field_list): Remove.
7935 (struct field_info): Add initializers.
7936 <fields, baseclasses>: Now std::vector.
7937 <nbaseclasses, nfnfields, typedef_field_list_count,
7938 nested_types_list_count>: Remove.
7939 (dwarf2_add_field, dwarf2_add_type_defn)
7940 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7941 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7942 (process_structure_scope): Update.
7944 2018-03-11 Tom Tromey <tom@tromey.com>
7946 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7947 for use by std::sort.
7948 (build_type_psymtabs_1): Use std::vector.
7950 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7952 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7953 and LIBMPFR in the printed configuration.
7955 2018-03-08 Tom Tromey <tom@tromey.com>
7957 * source.c (get_filename_and_charpos): Use scoped_fd.
7958 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7959 (procfs_pidlist): Likewise.
7960 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7961 (iterate_over_mappings): Likewise.
7963 2018-03-08 Tom Tromey <tom@tromey.com>
7965 * infcall.c (struct call_return_meta_info)
7966 <stack_temporaries_enabled>: Remove.
7967 (get_call_return_value, call_function_by_hand_dummy): Update.
7968 * thread.c (disable_thread_stack_temporaries): Remove.
7969 (enable_thread_stack_temporaries): Remove.
7970 (thread_stack_temporaries_enabled_p): Return bool.
7971 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7972 (get_last_thread_stack_temporary): Update.
7973 * eval.c (evaluate_subexp): Update.
7974 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7975 class, not a function.
7976 (value_ptr, value_vec): Remove typedefs.
7977 (class thread_info) <stack_temporaries_enabled>: Now bool.
7978 <stack_temporaries>: Now a std::vector.
7979 (thread_stack_temporaries_enabled_p)
7980 (value_in_thread_stack_temporaries): Return bool.
7982 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7984 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7985 (getpkt_or_notif_sane_1): Likewise.
7987 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7989 * build-id.c (build_id_to_debug_bfd): Use std::string.
7991 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7993 * build-id.c (find_separate_debug_file_by_buildid): Return
7995 * build-id.h (find_separate_debug_file_by_buildid): Return
7997 * coffread.c (coff_symfile_read): Adjust to std::string.
7998 * elfread.c (elf_symfile_read): Adjust to std::string.
7999 * symfile.c (separate_debug_file_exists): Change parameter to
8001 (find_separate_debug_file): Return std::string.
8002 (find_separate_debug_file_by_debuglink): Return std::string.
8003 * symfile.h (find_separate_debug_file_by_debuglink): Return
8006 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8008 * common/xml-utils.c (xml_escape_text): Move code to...
8009 (xml_escape_text_append): ... this new function.
8010 * common/xml-utils.h (xml_escape_text_append): New declaration.
8011 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8013 (_initialize_xml_utils): register test_xml_escape_text_append as
8016 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8018 * defs.h: Remove MAX_REGISTER_SIZE.
8019 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8021 * python/py-unwind.c (pyuw_sniffer): Likewise.
8023 2018-03-07 Tom Tromey <tom@tromey.com>
8025 * linux-tdep.c (linux_info_proc): Update.
8026 * target.h (struct target_ops) <to_fileio_readlink>: Return
8028 (target_fileio_readlink): Return optional<string>.
8029 * remote.c (remote_hostio_readlink): Return optional<string>.
8030 * inf-child.c (inf_child_fileio_readlink): Return
8032 * target.c (target_fileio_readlink): Return optional<string>.
8034 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8036 * regcache.c (cooked_read_test): Add riscv to the list of
8037 architectures that have a save_reggroup.
8039 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8041 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8042 value is not a dynamic class object.
8044 2018-03-06 Tom Tromey <tom@tromey.com>
8046 * rust-exp.y: Formatting fixes.
8048 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8050 * riscv-tdep.c (riscv_register_name): Remove target description
8052 (riscv_gdbarch_init): Remove target description check.
8054 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8056 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8058 * riscv-tdep.h: Likewise.
8060 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8062 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8063 (riscv_pseudo_register_write): Delete.
8064 (riscv_gdbarch_init): Remove all use of pseudo registers.
8066 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8068 * record-btrace.c (btrace_print_lines): Replace cleanup
8069 parameter with RAII equivalents.
8070 (btrace_insn_history): Replace cleanup with RAII equivalents.
8071 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8072 make_cleanup_ui_out_tuple_begin_end): Remove.
8073 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8074 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8075 make_cleanup_ui_out_list_begin_end): Remove.
8077 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8079 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8080 parameter types to std::vector. Use bool.
8081 (record_btrace_wait): Replace VEC(tp_t) with
8082 std::vector<thread_info *>.
8083 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8085 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8087 * record-btrace.c (record_btrace_disable_callback): Remove.
8088 (struct scoped_btrace_disable): New.
8089 (record_btrace_open): Use scoped_btrace_disable.
8091 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8093 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8094 reading values from registers.
8096 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8098 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8101 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8103 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8104 change parameter type. Use GDB's print functions, and use
8105 core_addr_to_string where appropriate.
8106 (riscv_push_dummy_call): Use core_addr_to_string where
8107 appropriate, update call to riscv_print_arg_location, and reindent
8109 (riscv_return_value): Update call to riscv_print_arg_location.
8111 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8112 Tim Newsome <tim@sifive.com>
8113 Albert Ou <a0u@eecs.berkeley.edu>
8114 Darius Rad <darius@bluespec.com>
8116 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8117 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8118 (ALLDEPFILES): Add riscv-tdep.c
8119 * configure.tgt: Add riscv support.
8120 * riscv-tdep.c: New file.
8121 * riscv-tdep.h: New file.
8122 * NEWS: Mention new target.
8123 * MAINTAINERS: Add entry for riscv.
8125 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8127 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8128 fields within aggregates.
8130 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8132 * record-btrace.c (btrace_print_lines): Change type of flags to
8133 gdb_disassembly_flags.
8135 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8137 * fbsd-nat.c: Include "inf-ptrace.h".
8138 (USE_SIGTRAP_SIGINFO): Conditionally define.
8139 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8140 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8141 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8143 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8145 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8147 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8148 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8149 "supports_stopped_by_hw_breakpoint" target methods.
8151 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8153 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8154 * fbsd-nat.c (debug_fbsd_nat): New variable.
8155 (show_fbsd_nat_debug): New function.
8156 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8157 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8159 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8161 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8162 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8164 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8165 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8168 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8170 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8171 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8173 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8175 * charset.c (struct charset_vector): New.
8176 (charsets): Change type to charset_vector.
8177 (find_charset_names): Adjust.
8179 (_initialize_charset): Adjust.
8181 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8183 * progspace.h (struct program_space) <deleted_solibs>: Change
8184 type to std::vector<std::string>.
8185 * progspace.c (clear_program_space_solib_cache): Adjust.
8186 * breakpoint.c (print_solib_event): Adjust.
8187 (check_status_catch_solib): Adjust.
8188 * solib.c (update_solib_list): Adjust.
8189 * ui-out.h (class ui_out) <field_string>: New overload.
8190 * ui-out.c (ui_out::field_string): New overload.
8192 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8194 * progspace.h (struct program_space): Add constructor and
8195 destructor, initialize fields.
8196 (add_program_space): Remove.
8197 * progspace.c (add_program_space): Rename to...
8198 (program_space::program_space): ... this.
8199 (release_program_space): Rename to...
8200 (program_space::~program_space): ... this.
8201 (delete_program_space): Use delete to delete program_space.
8202 (initialize_progspace): Use new to allocate program_space.
8203 * inferior.c (add_inferior_with_spaces): Likewise.
8204 (clone_inferior_command): Likewise.
8205 * infrun.c (follow_fork_inferior): Likewise.
8206 (handle_vfork_child_exec_or_exit): Likewise.
8208 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8210 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8211 (delim_string_to_char_ptr_vec): Return std::vector of
8212 gdb::unique_xmalloc_ptr.
8213 (dirnames_to_char_ptr_vec_append): Take std::vector of
8214 gdb::unique_xmalloc_ptr.
8215 (dirnames_to_char_ptr_vec): Return std::vector of
8216 gdb::unique_xmalloc_ptr.
8217 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8218 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8219 (delim_string_to_char_ptr_vec): Return an std::vector of
8220 gdb::unique_xmalloc_ptr, adjust the code.
8221 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8222 gdb::unique_xmalloc_ptr, adjust the code.
8223 (dirnames_to_char_ptr_vec): Return an std::vector of
8224 gdb::unique_xmalloc_ptr, adjust the code.
8225 * auto-load.c (auto_load_safe_path_vec): Change type to
8226 std::vector of gdb::unique_xmalloc_ptr.
8227 (auto_load_expand_dir_vars): Return an std::vector of
8228 gdb::unique_xmalloc_ptr, adjust the code.
8229 (auto_load_safe_path_vec_update): Adjust.
8230 (filename_is_in_auto_load_safe_path_vec): Adjust.
8231 (auto_load_objfile_script_1): Adjust.
8232 * build-id.c (build_id_to_debug_bfd): Adjust.
8233 * linux-thread-db.c (thread_db_load_search): Adjust.
8234 * source.c (add_path): Adjust.
8236 * symfile.c (find_separate_debug_file): Adjust.
8237 * utils.c (do_free_char_ptr_vec): Remove.
8238 (make_cleanup_free_char_ptr_vec): Remove.
8240 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8243 * common/pathstuff.c: Conditionally include "<windows.h>".
8245 2018-03-01 Georg Sauthoff <mail@georg.so>
8248 * gcore.in: Quote variables and switch interpreter to bash.
8250 2018-03-01 Tom Tromey <tom@tromey.com>
8252 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8253 assertion. Add assertion for discriminant_index.
8254 (quirk_rust_enum): Use correct base type name in univariant case.
8256 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8258 * record.c (get_call_history_modifiers): Return a
8260 (cmd_record_call_history): Adjust.
8261 * record-btrace.c (record_btrace_call_history): Adjust.
8262 (record_btrace_call_history_range): Adjust.
8263 (record_btrace_call_history_from): Adjust.
8264 * target-debug.h (target_debug_print_record_print_flags): New.
8265 * target-delegates.c: Re-generate.
8266 * target.c (target_call_history): Change flags type.
8267 (target_call_history_from): Likewise.
8268 (target_call_history_range): Likewise.
8269 * target.h (struct target_ops) <target_call_history>: Likewise.
8270 (target_call_history_from): Likewise.
8271 (target_call_history_range): Likewise.
8273 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8274 Simon Marchi <simon.marchi@polymtl.ca>
8276 * common/common-utils.c: Include "sys/stat.h".
8277 (is_regular_file): Move here from "source.c"; change return
8279 * common/common-utils.h (is_regular_file): New prototype.
8280 * common/pathstuff.c (contains_dir_separator): New function.
8281 * common/pathstuff.h (contains_dir_separator): New prototype.
8282 * source.c: Don't include "sys/stat.h".
8283 (is_regular_file): Move to "common/common-utils.c".
8285 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8287 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8288 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8289 * auto-load.c: Include "common/pathstuff.h".
8290 * common/common-def.h (current_directory): Move here.
8291 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8293 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8295 * common/pathstuff.c: New file.
8296 * common/pathstuff.h: New file.
8297 * compile/compile.c: Include "common/pathstuff.h".
8298 * defs.h (current_directory): Move to "common/common-defs.h".
8299 * dwarf2read.c: Include "common/pathstuff.h".
8301 * guile/scm-safe-call.c: Likewise.
8302 * linux-thread-db.c: Likewise.
8304 * nto-tdep.c: Likewise.
8305 * objfiles.c: Likewise.
8306 * source.c: Likewise.
8307 * symtab.c: Likewise.
8308 * utils.c: Include "common/pathstuff.h".
8309 (gdb_realpath): Move to "common/pathstuff.c".
8310 (gdb_realpath_keepfile): Likewise.
8311 (gdb_abspath): Likewise.
8312 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8313 (gdb_realpath_keepfile): Likewise.
8314 (gdb_abspath): Likewise.
8316 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8318 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8319 wildcard process pid for super_resume for kernels with a
8322 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8324 * compile/compile.c (get_args): Add additional comments
8325 explaining function.
8327 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8328 Tom Tromey <tom@tromey.com>
8330 * target.h (memory_write_request_s): Remove typedef. Don't define
8332 (target_write_memory_blocks): Change argument to std::vector.
8333 (struct memory_write_request): Add constructor.
8334 * target-memory.c (compare_block_starting_address): Return bool.
8335 Change argument types.
8336 (claim_memory): Change arguments to use std::vector.
8337 (split_regular_and_flash_blocks, blocks_to_erase)
8338 (compute_garbled_blocks): Likewise.
8339 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8340 (target_write_memory_blocks): Change argument to std::vector.
8341 * symfile.c (struct load_section_data): Add constructor and
8342 destructor. Use std::vector for "requests".
8343 (struct load_progress_data): Add initializers.
8344 (load_section_callback): Update. Use "new".
8345 (clear_memory_write_data): Remove.
8346 (generic_load): Update.
8348 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8350 * arch/aarch64.h: Use common/tdesc.h.
8352 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8354 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8355 architecture with a 64-bit ABI.
8357 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8359 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8360 ahead of target description loading.
8362 2018-02-26 Tom Tromey <tom@tromey.com>
8364 * stack.c (backtrace_command_1): Update.
8365 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8367 * python/py-framefilter.c (py_print_frame)
8368 (gdbpy_apply_frame_filter): Change type of "flags".
8369 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8371 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8372 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8373 * extension.h (enum frame_filter_flag): Rename from
8375 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8376 (apply_ext_lang_frame_filter): Change type of "flags".
8377 * extension.c (apply_ext_lang_frame_filter): Change type of
8379 * extension-priv.h (struct extension_language_ops)
8380 <apply_frame_filter>: Change type of "flags".
8382 2018-02-26 Tom Tromey <tom@tromey.com>
8385 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8386 off-by-one in py_end computation.
8387 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8389 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8392 2018-02-26 Tom Tromey <tom@tromey.com>
8394 * dwarf2read.c (struct variant_field): New.
8395 (struct nextfield) <variant>: New field.
8396 (dwarf2_add_field): Handle DW_TAG_variant_part.
8397 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8398 discriminated union.
8399 (read_structure_type): Handle DW_TAG_variant_part.
8400 (handle_struct_member_die): New function, extracted from
8401 process_structure_scope. Handle DW_TAG_variant.
8402 (process_structure_scope): Handle discriminated unions. Call
8403 handle_struct_member_die.
8405 2018-02-26 Tom Tromey <tom@tromey.com>
8407 * rust-lang.h (rust_last_path_segment): Declare.
8408 * rust-lang.c (rust_last_path_segment): Now public. Change
8410 (struct disr_info): Remove.
8411 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8412 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8413 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8414 (rust_enum_p, rust_enum_variant): New function.
8415 (rust_underscore_fields): Remove "offset" parameter.
8416 (rust_print_enum): New function.
8417 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8418 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8419 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8421 (rust_internal_print_type): New function, from rust_print_type.
8423 (rust_print_type): Call rust_internal_print_type.
8424 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8425 Update enum handling.
8426 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8427 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8428 (rust_union_quirks): New functions.
8429 (process_full_comp_unit, process_full_type_unit): Call
8431 (process_structure_scope): Update rust_unions if necessary.
8433 2018-02-26 Tom Tromey <tom@tromey.com>
8435 * value.h (value_union_variant): Declare.
8436 * valops.c (value_union_variant): New function.
8437 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8438 (struct discriminant_info): New.
8439 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8441 (struct main_type) <flag_discriminated_union>: New field.
8443 2018-02-26 Tom Tromey <tom@tromey.com>
8445 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8446 unittests/unpack-selftests.c.
8447 * unittests/unpack-selftests.c: New file.
8448 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8450 2018-02-26 Yao Qi <yao.qi@linaro.org>
8452 * dwarf2read.c (struct partial_die_info) <read>: New method.
8453 (read_partial_die): Remove the declaration.
8454 (load_partial_dies): Update.
8455 (partial_die_info::partial_die_info):
8456 (read_partial_die): Change it to partial_die_info::read.
8458 2018-02-26 Yao Qi <yao.qi@linaro.org>
8460 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8461 (fixup_partial_die): Remove declaration.
8462 (scan_partial_symbols): Update.
8463 (partial_die_parent_scope): Likewise.
8464 (partial_die_full_name): Likewise.
8465 (fixup_partial_die): Change it to partial_die_info::fixup.
8467 2018-02-26 Yao Qi <yao.qi@linaro.org>
8469 * dwarf2read.c (read_partial_die): Update the declaration.
8470 (load_partial_dies): Caller update.
8471 (read_partial_die): Remove one argument abbrev_len.
8473 2018-02-26 Yao Qi <yao.qi@linaro.org>
8475 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8476 assignment operator.
8477 (load_partial_dies): Use ctor and copy ctor.
8478 (read_partial_die): Update.
8479 (dwarf2_cu::find_partial_die): Use ctor.
8481 2018-02-26 Yao Qi <yao.qi@linaro.org>
8483 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8484 (find_partial_die_in_comp_unit): Change it to
8485 dwarf2_cu::find_partial_die.
8486 (find_partial_die): Update.
8488 2018-02-26 Yao Qi <yao.qi@linaro.org>
8490 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8493 2018-02-26 Yao Qi <yao.qi@linaro.org>
8495 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8497 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8499 * arch/amd64.h: Use common/tdesc.h.
8500 * arch/i386.c: Likewise.
8501 * arch/i386.h: Likewise.
8502 * arch/tic6x.c: Likewise.
8503 * arch/tdesc.h: Move file from here...
8504 * common/tdesc.h: ...to here.
8505 * features/aarch64-core.c: Regenerate.
8506 * features/aarch64-fpu.c: Regenerate.
8507 * features/i386/32bit-avx.c: Regenerate.
8508 * features/i386/32bit-avx512.c: Regenerate.
8509 * features/i386/32bit-core.c: Regenerate.
8510 * features/i386/32bit-linux.c: Regenerate.
8511 * features/i386/32bit-mpx.c: Regenerate.
8512 * features/i386/32bit-pkeys.c: Regenerate.
8513 * features/i386/32bit-sse.c: Regenerate.
8514 * features/i386/64bit-avx.c: Regenerate.
8515 * features/i386/64bit-avx512.c: Regenerate.
8516 * features/i386/64bit-core.c: Regenerate.
8517 * features/i386/64bit-linux.c: Regenerate.
8518 * features/i386/64bit-mpx.c: Regenerate.
8519 * features/i386/64bit-pkeys.c: Regenerate.
8520 * features/i386/64bit-segments.c: Regenerate.
8521 * features/i386/64bit-sse.c: Regenerate.
8522 * features/i386/x32-core.c: Regenerate.
8523 * features/tic6x-c6xp.c: Regenerate.
8524 * features/tic6x-core.c: Regenerate.
8525 * features/tic6x-gp.c: Regenerate.
8526 * target-descriptions.c: Use common/tdesc.h.
8527 * target-descriptions.h: Likewise.
8529 2018-02-24 Tom Tromey <tom@tromey.com>
8531 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8532 (try_thread_db_load_from_dir, thread_db_load_search): Use
8534 (info_auto_load_libthread_db_compare): Return bool. Change
8536 (info_auto_load_libthread_db): Use std::vector, std::string.
8539 2018-02-24 Tom Tromey <tom@tromey.com>
8541 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8543 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8545 * gdbarch.c: Rebuild.
8546 * gdbarch.h: Rebuild.
8547 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8548 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8549 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8552 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8554 * gdbtypes.h (sect_offset): Change type to uint64_t.
8555 (sect_offset_str): New function.
8556 * dwarf2read.c (create_addrmap_from_aranges): Use
8558 (error_check_comp_unit_head): Likewise.
8559 (create_debug_type_hash_table): Likewise.
8560 (read_cutu_die_from_dwo): Likewise.
8561 (init_cutu_and_read_dies): Likewise.
8562 (init_cutu_and_read_dies_no_follow): Likewise.
8563 (process_psymtab_comp_unit_reader): Likewise.
8564 (partial_die_parent_scope): Likewise.
8565 (peek_die_abbrev): Likewise.
8566 (process_queue): Likewise.
8567 (dwarf2_physname): Likewise.
8568 (read_namespace_alias): Likewise.
8569 (read_import_statement): Likewise.
8570 (create_dwo_cu_reader): Likewise.
8571 (create_cus_hash_table): Likewise.
8572 (lookup_dwo_cutu): Likewise.
8573 (inherit_abstract_dies): Likewise.
8574 (read_func_scope): Likewise.
8575 (read_call_site_scope): Likewise.
8576 (dwarf2_add_member_fn): Likewise.
8577 (read_common_block): Likewise.
8578 (read_module_type): Likewise.
8579 (read_typedef): Likewise.
8580 (read_subrange_type): Likewise.
8581 (load_partial_dies): Likewise.
8582 (read_partial_die): Likewise.
8583 (find_partial_die): Likewise.
8584 (read_str_index): Likewise.
8585 (dwarf2_string_attr): Likewise.
8586 (build_error_marker_type): Likewise.
8587 (lookup_die_type): Likewise.
8588 (dump_die_shallow): Likewise.
8589 (follow_die_ref): Likewise.
8590 (dwarf2_fetch_die_loc_sect_off): Likewise.
8591 (dwarf2_fetch_constant_bytes): Likewise.
8592 (follow_die_sig): Likewise.
8593 (get_signatured_type): Likewise.
8594 (get_DW_AT_signature_type): Likewise.
8595 (dwarf2_find_containing_comp_unit): Likewise.
8596 (set_die_type): Likewise.
8598 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8600 * arch/aarch64.c: Include "common-defs.h".
8601 * arch/amd64.c: Likewise.
8602 * arch/i386.c: Likewise.
8604 2018-02-21 Tom Tromey <tom@tromey.com>
8606 * value.h: (extract_field_op): Update.
8607 * eval.c (extract_field_op): Return a const char *.
8608 * expression.h (parse_expression_for_completion): Update.
8609 * completer.c (complete_expression): Update.
8610 (add_struct_fields): Make fieldname const.
8611 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8612 (mark_completion_tag, parse_exp_in_context_1): Update.
8613 (parse_expression_for_completion): Change "name" to
8614 unique_xmalloc_ptr*.
8616 2018-02-21 Tom Tromey <tom@tromey.com>
8618 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8620 2018-02-21 Yao Qi <yao.qi@linaro.org>
8622 * avr-tdep.c (avr_read_pc): Change parameter type to
8624 * gdbarch.sh (read_pc): Likewise.
8625 * gdbarch.c: Re-generated.
8626 * gdbarch.h: Re-generated.
8627 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8629 * ia64-tdep.c (ia64_read_pc): Likewise.
8630 * mips-tdep.c (mips_read_pc): Likewise.
8631 * spu-tdep.c (spu_read_pc): Likewise.
8633 2018-02-21 Yao Qi <yao.qi@linaro.org>
8635 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8636 * regcache-dump.c: New file.
8637 * regcache.c: Move register_dump to regcache-dump.c.
8638 (maintenance_print_registers): Likewise.
8639 (maintenance_print_raw_registers): Likewise.
8640 (maintenance_print_cooked_registers): Likewise.
8641 (maintenance_print_register_groups): Likewise.
8642 (maintenance_print_remote_registers): Likewise.
8643 (_initialize_regcache): Likewise.
8644 * regcache.h (register_dump): Moved from regcache.c.
8646 2018-02-21 Yao Qi <yao.qi@linaro.org>
8648 * regcache.c (regcache::regcache): Update.
8649 (regcache::invalidate): Move it to detached_regcache::invalidate.
8650 (get_thread_arch_aspace_regcache): Update.
8651 (regcache::raw_update): Update.
8652 (regcache::cooked_read): Remove some code.
8653 (regcache::cooked_read_value): Likewise.
8654 (regcache::raw_write): Remove assert on m_readonly_p.
8655 (regcache::raw_supply_integer): Move it to
8656 detached_regcache::raw_supply_integer.
8657 (regcache::raw_supply_zeroed): Likewise.
8658 * regcache.h (detached_regcache) <raw_supply_integer>: New
8660 <raw_supply_zeroed, invalidate>: Likewise.
8661 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8662 <invalidate>: Likewise.
8663 <m_readonly_p>: Removed.
8665 2018-02-21 Yao Qi <yao.qi@linaro.org>
8667 * infcmd.c (get_return_value): Let stop_regs point to
8668 get_current_regcache.
8669 * regcache.c (regcache::regcache): Remove.
8670 (register_dump_reg_buffer): New class.
8671 (regcache_print): Adjust.
8672 * regcache.h (regcache): Remove constructors.
8674 2018-02-21 Yao Qi <yao.qi@linaro.org>
8676 * regcache.c (class register_dump): New class.
8677 (register_dump_regcache, register_dump_none): New class.
8678 (register_dump_remote, register_dump_groups): New class.
8679 (regcache_print): Update.
8680 * regcache.h (regcache_dump_what): Move it to regcache.c.
8681 (regcache) <dump>: Remove.
8683 2018-02-21 Yao Qi <yao.qi@linaro.org>
8685 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8687 (jit_unwind_reg_set_impl): Call raw_supply.
8688 (jit_frame_sniffer): Use reg_buffer_rw.
8689 * record-full.c (record_full_core_regbuf): Change its type.
8690 (record_full_core_open_1): Use reg_buffer_rw.
8691 (record_full_close): Likewise.
8692 (record_full_core_fetch_registers): Use regcache->raw_supply.
8693 (record_full_core_store_registers): Likewise.
8694 * regcache.c (regcache::get_register_status): Move it to
8696 (regcache_raw_set_cached_value): Remove.
8697 (regcache::raw_set_cached_value): Remove.
8698 (regcache::raw_write): Call raw_supply.
8699 (regcache::raw_supply): Move it to reg_buffer_rw.
8700 * regcache.h (regcache_raw_set_cached_value): Remove.
8701 (reg_buffer_rw): New class.
8703 2018-02-21 Yao Qi <yao.qi@linaro.org>
8705 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8706 readonly_detached_regcache.
8707 (dummy_frame_prev_register): Use regcache->cooked_read.
8708 * frame.c (frame_save_as_regcache): Change return type.
8709 (frame_pop): Update.
8710 * frame.h (frame_save_as_regcache): Update declaration.
8711 * inferior.h (get_infcall_suspend_state_regcache): Update
8713 * infrun.c (infcall_suspend_state) <registers>: use
8714 readonly_detached_regcache.
8715 (save_infcall_suspend_state): Don't use regcache_dup.
8716 (get_infcall_suspend_state_regcache): Change return type.
8717 * linux-fork.c (struct fork_info) <savedregs>: Change to
8718 readonly_detached_regcache.
8720 (fork_save_infrun_state): Don't use regcache_dup.
8721 (info_checkpoints_command): Adjust.
8722 * mi/mi-main.c (register_changed_p): Update declaration.
8723 (mi_cmd_data_list_changed_registers): Use
8724 readonly_detached_regcache.
8725 (register_changed_p): Change parameter type to
8726 readonly_detached_regcache.
8727 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8728 readonly_detached_regcache.
8729 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8730 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8732 (regcache::save): Move it to reg_buffer.
8733 (regcache::restore): Change parameter type.
8734 (regcache_dup): Remove.
8735 * regcache.h (reg_buffer) <save>: New method.
8736 (readonly_detached_regcache): New class.
8737 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8738 readonly_detached_regcache.
8739 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8741 2018-02-21 Yao Qi <yao.qi@linaro.org>
8743 * frame.c (frame_save_as_regcache): Use regcache method save.
8744 (frame_pop): Use regcache method restore.
8745 * infrun.c (restore_infcall_suspend_state): Likewise.
8746 * linux-fork.c (fork_load_infrun_state): Likewise.
8747 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8749 * regcache.c (regcache_save): Remove.
8750 (regcache::restore): More asserts.
8751 (regcache_cpy): Remove.
8752 * regcache.h (regcache_save): Remove the declaration.
8753 (regcache::restore): Move from private to public.
8754 Remove the friend declaration of regcache_cpy.
8755 (regcache_cpy): Remove declaration.
8757 2018-02-21 Yao Qi <yao.qi@linaro.org>
8759 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8760 parameter type to 'readable_regcache *'.
8761 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8762 * arm-tdep.c (arm_neon_quad_read): Likewise.
8763 (arm_pseudo_read): Likewise.
8764 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8765 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8766 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8767 * gdbarch.c: Re-generated.
8768 * gdbarch.h: Re-generated.
8769 * gdbarch.sh (pseudo_register_read): Change parameter type to
8770 'readable_regcache *'.
8771 (pseudo_register_read_value): Likewise.
8772 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8773 (h8300_pseudo_register_read): Likewise.
8774 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8775 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8776 (i386_pseudo_register_read_into_value): Likewise.
8777 (i386_pseudo_register_read_value): Likewise.
8778 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8780 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8781 * m32c-tdep.c (m32c_raw_read): Likewise.
8782 (m32c_read_flg): Likewise.
8783 (m32c_banked_register): Likewise.
8784 (m32c_banked_read): Likewise.
8785 (m32c_sb_read): Likewise.
8786 (m32c_part_read): Likewise.
8787 (m32c_cat_read): Likewise.
8788 (m32c_r3r2r1r0_read): Likewise.
8789 (m32c_pseudo_register_read): Likewise.
8790 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8791 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8792 (mep_pseudo_cr64_read): Likewise.
8793 (mep_pseudo_register_read): Likewise.
8794 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8795 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8796 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8797 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8798 (regcache::cooked_read): Likewise.
8799 (regcache::cooked_read_value): Likewise.
8800 (regcache_cooked_read_signed):
8801 (regcache::cooked_read): Likewise.
8802 * regcache.h (readable_regcache): New class.
8803 (regcache): Inherit readable_regcache. Move some methods to
8805 * rl78-tdep.c (rl78_pseudo_register_read): Change
8806 parameter type to 'readable_regcache *'.
8807 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8808 (e500_pseudo_register_read): Change parameter type to
8809 'readable_regcache *'.
8810 (dfp_pseudo_register_read): Likewise.
8811 (vsx_pseudo_register_read): Likewise.
8812 (efpr_pseudo_register_read): Likewise.
8813 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8814 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8815 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8816 (sh64_pseudo_register_read): Likewise.
8817 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8818 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8819 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8820 (spu_pseudo_register_read): Likewise.
8821 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8822 (xtensa_pseudo_register_read): Likewise.
8824 2018-02-21 Yao Qi <yao.qi@linaro.org>
8826 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8827 (regcache::arch): Move it to reg_buffer::arch.
8828 (regcache::register_buffer): Likewise.
8829 (regcache::assert_regnum): Likewise.
8830 (regcache::num_raw_registers): Likewise.
8831 * regcache.h (reg_buffer): New class.
8832 (regcache): Inherit reg_buffer.
8834 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8836 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8837 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8839 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8841 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8843 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8845 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8846 (SFILES): Remove common/*.c files.
8847 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8848 * common/common.host: Add common reference.
8849 * configure.ac: Likewise.
8850 * configure: Regenerate.
8852 2018-02-16 Yao Qi <yao.qi@linaro.org>
8854 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8855 (block_initialize_namespace): Use new.
8856 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8857 (dwarf2_free_objfile): Use delete.
8858 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8859 (copy_type_recursive): Use new.
8860 * gdb_obstack.h (allocate_on_obstack): New.
8862 2018-02-15 Yao Qi <yao.qi@linaro.org>
8865 * inferior.c (exit_inferior_1): Reset inf->control.
8867 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8869 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8872 2018-02-14 Pedro Alves <palves@redhat.com>
8874 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8875 frame_cleanup_after_sniffer on exception.
8877 2018-02-14 Tom Tromey <tom@tromey.com>
8879 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8881 (solib_bfd_open): Make pathname const.
8882 * solib.c (solib_bfd_open): Make pathname const.
8883 * solib-spu.c (spu_bfd_fopen): Make name const.
8884 (spu_bfd_open): Make pathname const.
8885 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8886 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8888 2018-02-14 Tom Tromey <tom@tromey.com>
8890 * symfile.c (symfile_bfd_open): Update.
8891 * source.h (openp, source_full_path_of, find_and_open_source):
8892 Change argument type to unique_xmalloc_ptr.
8893 * source.c (openp): Take a unique_xmalloc_ptr.
8894 (source_full_path_of, find_and_open_source): Likewise.
8895 (open_source_file, symtab_to_fullname): Update.
8896 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8898 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8899 (exec_file_find): Update.
8900 * psymtab.c (psymtab_to_fullname): Update.
8901 * nto-tdep.h (nto_find_and_open_solib): Update.
8902 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8904 * exec.c (exec_file_attach): Update.
8905 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8906 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8908 2018-02-14 Tom Tromey <tom@tromey.com>
8910 * solib.c: Include source.h.
8911 * nto-tdep.c: Include source.h.
8912 * mi/mi-cmd-env.c: Include source.h.
8913 * infcmd.c: Include source.h.
8914 * exec.c: Include source.h.
8915 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8916 (add_path, directory_switch, source_path, init_source_path): Move
8918 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8919 (add_path, directory_switch, source_path, init_source_path):
8922 2018-02-14 Tom Tromey <tom@tromey.com>
8924 * solist.h (exec_file_find, solib_find): Return
8926 (solib_bfd_fopen): Take a const char *.
8927 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8928 (exec_file_find, solib_find): Likewise.
8929 (solib_bfd_fopen): Do not take ownership of "pathname".
8930 (solib_bfd_open): Use unique_xmalloc_ptr.
8931 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8932 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8933 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8934 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8936 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8938 * ada-lang.c (name_match_type_from_name): Remove reference to
8939 ada_name_for_lookup in function's documentation.
8940 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8942 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8944 * defs.h (enum openp_flags): New enum.
8945 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8946 Move to enum openp_flags.
8947 (openp_flags): New enum flags.
8948 (openp): Change parameter type to openp_flags.
8949 * source.c (openp): Change parameter type to openp_flags.
8950 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8951 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8953 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8955 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8958 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8960 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8962 (class dwarf2_queue_guard): ...the destructor of this new class.
8963 (dw2_do_instantiate_symtab): Create instance of the new class
8964 dwarf2_queue_guard, remove cleanup.
8966 2018-02-09 Tom Tromey <tom@tromey.com>
8968 * source.c (find_source_lines): Don't reference past the end of
8971 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8973 * remote.c (remote_btrace_maybe_reopen): Change error message.
8974 * btrace.c (btrace_enable): Likewise.
8975 (parse_xml_btrace): Likewise.
8976 (parse_xml_btrace_conf): Likewise.
8978 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8980 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8981 (linux_enable_pt, linux_enable_bts): Call
8982 diagnose_perf_event_open_fail.
8984 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8986 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8987 Remove parameter and change return type. Update callers. Move it.
8988 (linux_enable_bts, linux_enable_pt): Improve error message.
8989 (linux_enable_pt): Remove zero buffer size check.
8990 (linux_enable_btrace): Improve error messages. Remove NULL return
8993 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8995 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8996 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8997 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8998 (linux_supports_pt, linux_supports_btrace): Remove.
8999 (linux_enable_bts): Call cpu_supports_bts.
9000 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9001 * remote.c (remote_supports_btrace): Remove.
9002 (init_remote_ops): Remove remote_supports_btrace.
9003 * target-delegates.c: Regenerated.
9004 * target.c (target_supports_btrace): Remove.
9005 * target.h (target_ops) <to_supports_btrace>: Remove
9006 (target_supports_btrace): Remove.
9007 * x86-linux-nat.c (x86_linux_create_target): Remove
9008 linux_supports_btrace.
9010 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9012 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9014 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9015 exception and use message in own exception.
9017 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9019 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9020 (perf_event_pt_event_type): Use gdb_file_up.
9021 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9022 scoped_fd, and scoped_mmap.
9024 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9026 * common/scoped_mmap.h: New.
9027 * unittests/scoped_mmap-selftest.c: New.
9028 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9029 unittests/scoped_mmap-selftest.c.
9031 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9033 * common/scoped_fd.h: New.
9034 * unittests/scoped_fd-selftest.c: New.
9035 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9036 unittests/scoped_fd-selftest.c.
9038 2018-02-09 Tom Tromey <tom@tromey.com>
9040 * auto-load.c (auto_load_section_scripts): Use
9041 gdb::unique_xmalloc_ptr.
9043 2018-02-09 Tom Tromey <tom@tromey.com>
9045 * auto-load.c (execute_script_contents): Use std::string.
9047 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9049 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9050 Python function, rather than a new command.
9052 2018-02-08 Tom Tromey <tom@tromey.com>
9054 * solib.c (solib_find_1): Use std::string.
9055 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9057 2018-02-08 Tom Tromey <tom@tromey.com>
9059 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9061 2018-02-08 Tom Tromey <tom@tromey.com>
9063 * source.c (find_source_lines): Use gdb::def_vector.
9065 2018-02-08 Tom Tromey <tom@tromey.com>
9067 * macrocmd.c (struct temporary_macro_definition): New.
9068 (macro_define_command): Use temporary_macro_definition. Remove
9070 (free_macro_definition_ptr): Remove.
9072 2018-02-08 Tom Tromey <tom@tromey.com>
9074 * macroexp.c (maybe_expand): Use std::string.
9076 2018-02-08 Tom Tromey <tom@tromey.com>
9078 * macroexp.c (struct macro_buffer): Add initializers for some
9080 (init_buffer, init_shared_buffer, free_buffer)
9081 (free_buffer_return_text): Remove.
9082 (macro_buffer): New constructors.
9083 (~macro_buffer): New destructor.
9084 (macro_buffer::set_shared): New method.
9085 (macro_buffer::resize_buffer, macro_buffer::appendc)
9086 (macro_buffer::appendmem): Now methods, not free functions.
9087 (set_token, append_tokens_without_splicing, stringify)
9088 (macro_stringify): Update.
9089 (gather_arguments): Change return type. Remove argc_p argument,
9090 add args_ptr argument. Use std::vector.
9091 (substitute_args): Remove argc argument. Accept std::vector.
9092 (expand): Update. Use std::vector.
9093 (scan, macro_expand, macro_expand_next): Update.
9095 2018-02-08 Tom Tromey <tom@tromey.com>
9097 * symtab.c (default_collect_symbol_completion_matches_break_on):
9098 Use unique_xmalloc_ptr.
9099 * macroscope.h: (sal_macro_scope, user_macro_scope)
9100 (default_macro_scope): Return unique_xmalloc_ptr.
9101 * macroscope.c (sal_macro_scope, user_macro_scope)
9102 (default_macro_scope): Return unique_xmalloc_ptr.
9103 * macroexp.h (macro_expand, macro_expand_once): Return
9105 * macroexp.c (macro_expand, macro_expand_once): Return
9107 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9108 (info_macro_command, info_macros_command): Use
9110 * compile/compile-c-support.c (write_macro_definitions): Use
9112 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9114 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9116 * value.c (value_static_field): Assign field type instead of
9117 containing type when returning an optimized out value.
9119 2018-02-06 Yao Qi <yao.qi@linaro.org>
9121 * ft32-tdep.c (ft32_read_pc): Remove.
9122 (ft32_write_pc): Remove.
9123 (ft32_gdbarch_init): Update.
9124 * m32r-tdep.c (m32r_read_pc): Remove.
9125 (m32r_gdbarch_init): Update.
9126 * mep-tdep.c (mep_read_pc): Remove.
9127 (mep_gdbarch_init): Update.
9128 * microblaze-tdep.c (microblaze_write_pc): Remove.
9129 (microblaze_gdbarch_init): Update.
9130 * mn10300-tdep.c (mn10300_read_pc): Remove.
9131 (mn10300_write_pc): Remove.
9132 (mn10300_gdbarch_init): Update.
9133 * moxie-tdep.c (moxie_read_pc): Remove.
9134 (moxie_write_pc): Remove.
9135 (moxie_gdbarch_init): Update.
9137 2018-02-06 Yao Qi <yao.qi@linaro.org>
9139 * expprint.c (print_subexp_standard): Handle
9140 OP_F77_UNDETERMINED_ARGLIST.
9141 (dump_subexp_body_standard): Likewise.
9143 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9145 * target-descriptions.c (tdesc_element_visitor) Add empty
9147 (tdesc_type): Move make_gdb_type from here.
9148 (tdesc_type_builtin): Likewise.
9149 (tdesc_type_vector): Likewise.
9150 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9151 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9152 (make_gdb_type_union): Likewise.
9153 (make_gdb_type_flags): Likewise.
9154 (make_gdb_type_enum): Likewise.
9155 (make_gdb_type): New function.
9156 (tdesc_register_type): Use static make_gdb_type.
9158 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9160 * infcmd.c (default_print_one_register_info): Align natural-format
9161 column values consistently one under another.
9162 (pad_to_column): New function.
9164 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9166 * dwarf2read.c (dwarf2_physname): Move commment.
9168 2018-02-01 Leszek Swirski <leszeks@google.com>
9170 * varobj.c (varobj_formatted_print_options): Allow recursive
9171 pretty printing if pretty printing is enabled.
9173 2018-02-01 Leszek Swirski <leszeks@google.com>
9175 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9176 names after a structop as a filename.
9178 2018-02-01 Yao Qi <yao.qi@linaro.org>
9180 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9181 (arm_record_coproc_data_proc): Likewise.
9183 2018-02-01 Yao Qi <yao.qi@linaro.org>
9185 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9187 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9189 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9190 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9192 2018-01-31 Pedro Alves <palves@redhat.com>
9194 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9195 * inflow.c (child_terminal_save_inferior): Wrap reference to
9196 tcgetpgrp in HAVE_TERMIOS_H.
9197 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9199 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9200 always iterate over all inferiors.
9201 (gdbsim_cntrl_c): Adjust.
9202 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9204 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9206 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9207 index type is objfile-owned if the element type is as well.
9209 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9213 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9215 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9216 "features/s390x-linux64.c".
9217 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9218 s390_linux32 and s390x_linux64.
9219 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9221 * s390-tdep.c: Include "features/s390-linux32.c" and
9222 "features/s390x-linux64.c".
9223 (s390_tdesc_valid): Add check for tdesc_has_registers.
9224 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9225 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9226 tdesc_s390x_linux64.
9227 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9228 tdesc_s390x_linux64 to...
9229 * s390-tdep.h: ...here.
9231 2018-01-30 Pedro Alves <palves@redhat.com>
9234 * config.in, configure: Regenerate.
9235 * configure.ac: Check for getpgid.
9236 * go32-nat.c (go32_pass_ctrlc): New.
9237 (go32_target): Install it.
9238 * inf-child.c (inf_child_target): Install
9239 child_terminal_save_inferior, child_pass_ctrlc and
9241 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9242 (inf_ptrace_target): No longer install it.
9243 * infcmd.c (interrupt_target_1): Adjust.
9244 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9245 (child_interrupt): Declare.
9246 (inferior::terminal_state): New.
9247 * inflow.c (struct terminal_info): Update comments.
9248 (inferior_process_group): Delete.
9249 (terminal_is_ours): Delete.
9250 (gdb_tty_state): New.
9251 (child_terminal_init): Adjust.
9252 (is_gdb_terminal, sharing_input_terminal_1)
9253 (sharing_input_terminal): New functions.
9254 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9255 Set the process's actual process group in the foreground if
9256 possible. Handle is_ours_for_output/is_ours distinction. Don't
9257 mark terminal as the inferior's if not sharing GDB's terminal.
9258 Don't check attach_flag.
9259 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9260 pass down a target_terminal_state.
9261 (child_terminal_save_inferior): New, factored out from ...
9262 (child_terminal_ours_1): ... this. Handle
9263 target_terminal_state::is_ours_for_output.
9264 (child_interrupt, child_pass_ctrlc): New.
9265 (inflow_inferior_exit): Clear the inferior's terminal_state.
9266 (copy_terminal_info): Copy the inferior's terminal state.
9267 (_initialize_inflow): Remove reference to terminal_is_ours.
9268 * inflow.h (inferior_process_group): Delete.
9269 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9270 * procfs.c (procfs_target): Don't install procfs_interrupt.
9271 (procfs_interrupt): Delete.
9272 * remote.c (remote_serial_quit_handler): Adjust.
9273 (remote_interrupt): Remove ptid parameter. Adjust.
9274 * target-delegates.c: Regenerate.
9275 * target.c: Include "terminal.h".
9276 (target_terminal::terminal_state): Rename to ...
9277 (target_terminal::m_terminal_state): ... this.
9278 (target_terminal::init): Adjust.
9279 (target_terminal::inferior): Adjust to per-inferior
9281 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9282 (target_terminal::ours, target_terminal::ours_for_output): Use
9283 target_terminal_is_ours_kind.
9284 (target_interrupt): Remove ptid parameter. Adjust.
9285 (default_target_pass_ctrlc): Adjust.
9286 * target.h (target_ops::to_terminal_save_inferior): New field.
9287 (target_ops::to_interrupt): Remove ptid_t parameter.
9288 (target_interrupt): Remove ptid_t parameter. Update comment.
9289 (target_pass_ctrlc): Update comment.
9290 * target/target.h (target_terminal_state): New scoped enum,
9292 (target_terminal::terminal_state): ... here.
9293 (target_terminal::inferior): Update comments.
9294 (target_terminal::restore_inferior): New.
9295 (target_terminal::is_inferior, target_terminal::is_ours)
9296 (target_terminal::is_ours_for_output): Adjust.
9297 (target_terminal::scoped_restore_terminal_state): Adjust to
9298 rename, and call restore_inferior() instead of inferior().
9299 (target_terminal::scoped_restore_terminal_state::m_state): Change
9301 (target_terminal::terminal_state): Rename to ...
9302 (target_terminal::m_terminal_state): ... this and change type.
9304 2018-01-30 Pedro Alves <palves@redhat.com>
9306 * linux-nat.c (wait_for_signal): New function.
9307 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9309 (async_terminal_is_ours)
9310 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9311 (linux_nat_add_target): Don't override
9312 to_terminal_inferior/to_terminal_ours.
9314 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9316 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9318 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9320 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9321 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9322 dwarf2_per_objfile_free here.
9323 (dwarf2_per_objfile_free): Remove.
9324 (_initialize_dwarf2_read): Don't register
9325 dwarf2_per_objfile_free as a registry cleanup.
9327 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9329 Avoid compilation errors in MinGW native builds
9331 The error is triggered by including python-internal.h, and the
9334 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9335 from build-gnulib/import/math.h:27,
9336 from d:/usr/Python26/include/pyport.h:235,
9337 from d:/usr/Python26/include/Python.h:58,
9338 from python/python-internal.h:94,
9339 from python/py-arch.c:24:
9340 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9344 This happens because Python headers define 'hypot' to expand t
9345 '_hypot' in the Windows builds.
9346 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9347 'hypoth'. This avoids a compilation error.
9349 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9351 * MAINTAINERS (Write After Approval): Fix ordering.
9353 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9355 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9357 2018-01-26 Alan Modra <amodra@gmail.com>
9359 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9360 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9361 Remove nop. Make const. Comment.
9362 (powerpc32_plt_stub_so_2): New.
9363 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9364 Correct count. Update uses.
9365 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9366 Move common code reading PLT entry word. Correct
9367 powerpc32_plt_stub PLT address calculation.
9368 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9369 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9370 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9371 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9372 (ppc64_standard_linkage8): Likewise.
9373 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9374 Correct insns description.
9375 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9377 2018-01-24 Pedro Alves <palves@redhat.com>
9379 GCC PR libstdc++/83906
9380 * gdbtypes.c (operator==(const dynamic_prop &,
9381 const dynamic_prop &)): New.
9382 (operator==(const range_bounds &, const range_bounds &)): New.
9383 (check_types_equal): Use them instead of memcmp.
9384 * gdbtypes.h (operator==(const dynamic_prop &,
9385 const dynamic_prop &)): Declare.
9386 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9387 (operator==(const range_bounds &, const range_bounds &)): Declare.
9388 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9390 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9392 * s390-linux-tdep.c (s390_record_address_mask)
9393 (s390_record_calc_disp_common, s390_record_calc_disp)
9394 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9395 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9396 (s390_process_record): Move to s390-tdep.c.
9397 (s390_linux_init_abi_any): Adjust.
9398 * s390-tdep.c (s390_record_address_mask)
9399 (s390_record_calc_disp_common, s390_record_calc_disp)
9400 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9401 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9402 (s390_process_record): Moved from s390-linux-tdep.c
9403 (s390_gdbarch_init): Adjust.
9405 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9407 * s390-linux-nat.c (s390-tdep.h): New include.
9408 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9409 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9410 (ALLDEPFILES): Add s390-tdep.c.
9411 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9412 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9413 * s390-tdep.h: ...this. New file.
9414 * s390-linux-tdep.c (s390-tdep.h): New include.
9415 (_initialize_s390_tdep): Rename to...
9416 (_initialize_s390_linux_tdep): ...this and adjust.
9417 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9418 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9420 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9421 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9422 (s390_is_partial_instruction, s390_software_single_step)
9423 (is_non_branch_ril, s390_displaced_step_copy_insn)
9424 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9425 (s390_prologue_data, s390_addr, s390_store, s390_load)
9426 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9427 (s390_register_call_saved, s390_guess_tracepoint_registers)
9428 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9429 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9430 (s390_pseudo_register_name, s390_pseudo_register_type)
9431 (s390_pseudo_register_read, s390_pseudo_register_write)
9432 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9433 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9434 (s390_addr_bits_remove, s390_address_class_type_flags)
9435 (s390_address_class_type_flags_to_name)
9436 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9437 (s390_function_arg_float, s390_function_arg_vector)
9438 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9439 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9440 (s390_frame_align, s390_register_return_value, s390_return_value)
9441 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9442 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9443 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9444 (s390_trad_frame_prev_register, s390_unwind_cache)
9445 (s390_prologue_frame_unwind_cache)
9446 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9447 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9448 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9449 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9450 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9451 (s390_frame_base_address, s390_local_base_address)
9452 (s390_frame_base, s390_gcc_target_options)
9453 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9454 (s390_validate_reg_range, s390_tdesc_valid)
9455 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9456 * s390-tdep.c: ...this. New file.
9458 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9460 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9461 (s390_process_record, s390_gdbarch_tdep_alloc)
9462 (s390_linux_init_abi_any): Use/set new hook.
9464 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9466 * s390-linux-tdep.c (osabi.h): New include.
9467 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9468 (s390_linux_init_abi_any): New functions.
9469 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9471 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9473 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9474 tdesc_has_registers check
9476 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9478 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9479 (s390_validate_reg_range): New macro.
9480 (s390_gdbarch_init): Adjust.
9482 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9484 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9485 (s390_gdbarch_tdep_alloc): Adjust.
9486 (s390_gdbarch_init): Adjust.
9488 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9490 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9491 <have_tdb>: Change type to bool.
9492 (s390_gdbarch_tdep_alloc): Adjust.
9493 (s390_gdbarch_init): Adjust.
9495 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9497 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9498 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9499 (s390_gdbarch_tdep_alloc): New function.
9500 (s390_gdbarch_init): Allocate tdep at start and use its fields
9501 instead of separate variables.
9503 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9505 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9506 when looking for cached gdbarch and add comment for remaining.
9508 2018-01-22 Pedro Alves <palves@redhat.com>
9509 Sergio Durigan Junior <sergiodj@redhat.com>
9511 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9514 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9516 * MAINTAINERS: Update my company e-mail address.
9518 2018-01-22 Yao Qi <yao.qi@linaro.org>
9520 * regcache.c (cooked_write_test): New function.
9521 (_initialize_regcache): Register the test.
9523 2018-01-22 Yao Qi <yao.qi@linaro.org>
9525 * ia64-tdep.c (ia64_pseudo_register_read): Call
9526 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9527 * m32c-tdep.c (m32c_cat_read): Likewise.
9528 (m32c_r3r2r1r0_read): Likewise.
9529 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9530 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9532 2018-01-22 Yao Qi <yao.qi@linaro.org>
9534 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9535 method raw_read instead of regcache_raw_read.
9536 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9537 * arm-tdep.c (arm_neon_quad_read): Likewise.
9538 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9539 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9540 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9541 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9542 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9543 (i386_pseudo_register_read_into_value): Likewise.
9544 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9545 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9546 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9547 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9548 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9549 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9550 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9551 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9552 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9554 2018-01-22 Yao Qi <yao.qi@linaro.org>
9556 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9557 * configure.tgt: Remove target mt.
9558 * mt-tdep.c: Remove.
9559 * regcache.c (cooked_read_test): Remove the check for mt.
9561 2018-01-22 Yao Qi <yao.qi@linaro.org>
9563 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9564 instead of gdbarch_pseudo_register_read_value.
9566 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9568 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9571 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9573 * linespec.c (create_sals_line_offset): Remove code that preserved
9574 the symtab_and_line's line number.
9576 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9578 * varobj.c (varobj_create): Don't set valid_block when creating a
9581 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9583 * varobj.c (varobj_create): Remove out of date comment.
9585 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9588 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9589 updating innermost block.
9590 * parse.c (innermost_block_tracker::update): Take extra type
9591 parameter, and check types match before updating innermost block.
9592 (write_dollar_variable): Update innermost block for registers.
9593 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9594 (innermost_block_tracker::innermost_block_tracker): Initialise
9596 (innermost_block_tracker::reset): Take type parameter.
9597 (innermost_block_tracker::update): Take type parameter, and pass
9598 type through as needed.
9599 (innermost_block_tracker::m_types): New member.
9600 * varobj.c (varobj_create): Pass type when reseting innermost
9603 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9605 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9606 * ada-lang.c (resolve_subexp): Likewise.
9607 * breakpoint.c (set_breakpoint_condition) Likewise.
9608 (watch_command_1) Likewise.
9609 * c-exp.y (variable): Likewise.
9610 * d-exp.y (PrimaryExpression): Likewise.
9611 * f-exp.y (variable): Likewise.
9612 * go-exp.y (variable): Likewise.
9613 * m2-exp.y (variable): Likewise.
9614 * objfiles.c (objfile::~objfile): Likewise.
9615 * p-exp.y (variable): Likewise.
9616 * parse.c (innermost_block): Change type.
9617 * parser-defs.h (class innermost_block_tracker): New.
9618 (innermost_block): Change to innermost_block_tracker.
9619 * printcmd.c (display_command): Switch to innermost_block API.
9620 (do_one_display): Likewise.
9621 * rust-exp.y (do_one_display): Likewise.
9622 * symfile.c (clear_symtab_users): Likewise.
9623 * varobj.c (varobj_create): Switch to innermost_block API, replace
9624 use of innermost_block with block stored on varobj object.
9626 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9628 * expression.h (innermost_block): Remove declaration.
9629 * varobj.c: Add 'parser-defs.h' include.
9631 2018-01-19 Tom Tromey <tom@tromey.com>
9633 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9634 symbols in the static and global blocks.
9636 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9638 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9639 gdb_ptrace.h, and move including gdb_wait.h ...
9640 * nat/linux-ptrace.h: ... to here.
9642 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9644 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9645 inf_ptrace_detach_success.
9646 (inf_ptrace_detach_success): Add inferior parameter, use it
9647 instead of inferior_ptid, pass it to detach_inferior.
9648 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9650 * inferior.c (detach_inferior): Add overload that takes an
9652 * inferior.h (detach_inferior): Likewise.
9653 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9654 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9655 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9657 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9659 * target.h (struct target_ops) <to_detach>: Add inferior
9661 (target_detach): Likewise.
9662 * target.c (dispose_inferior): Pass inferior down.
9663 (target_detach): Pass inferior down. Assert that it is equal to
9664 the current inferior.
9665 * aix-thread.c (aix_thread_detach): Pass inferior down.
9666 * corefile.c (core_file_command): Pass current_inferior() down.
9667 * corelow.c (core_detach): Add inferior parameter.
9668 * darwin-nat.c (darwin_detach): Likewise.
9669 * gnu-nat.c (gnu_detach): Likewise.
9670 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9671 * infcmd.c (detach_command): Pass current_inferior() down to
9673 * infrun.c (follow_fork_inferior): Pass parent_inf to
9675 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9677 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9678 * linux-thread-db.c (thread_db_detach): Likewise.
9679 * nto-procfs.c (procfs_detach): Likewise.
9680 * procfs.c (procfs_detach): Likewise.
9681 * record.c (record_detach): Likewise.
9682 * record.h (struct inferior): Forward-declare.
9683 (record_detach): Add inferior parameter.
9684 * remote-sim.c (gdbsim_detach): Likewise.
9685 * remote.c (remote_detach_1): Likewise.
9686 (remote_detach): Likewise.
9687 (extended_remote_detach): Likewise.
9688 * sol-thread.c (sol_thread_detach): Likewise.
9689 * target-debug.h (target_debug_print_inferior_p): New macro.
9690 * target-delegates.c: Re-generate.
9691 * top.c (kill_or_detach): Pass inferior down to target_detach.
9692 * windows-nat.c (windows_detach): Add inferior parameter.
9694 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9696 * target.h (struct target_ops) <to_detach>: Remove args
9698 (target_detach): Likewise.
9699 * target.c (dispose_inferior): Adjust.
9700 (target_detach): Remove args parameter, adjust.
9701 * aix-thread.c (aix_thread_detach): Adjust.
9702 * corefile.c (core_file_command): Adjust.
9703 * corelow.c (core_detach): Adjust.
9704 * darwin-nat.c (darwin_detach): Adjust.
9705 * gnu-nat.c (gnu_detach): Adjust.
9706 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9707 * infcmd.c (detach_command): Adjust
9708 * infrun.c (follow_fork_inferior): Adjust.
9709 (handle_vfork_child_exec_or_exit): Adjust.
9710 * linux-fork.c (linux_fork_detach): Remove args parameter.
9711 * linux-fork.h (linux_fork_detach): Likewise.
9712 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9713 * linux-thread-db.c (thread_db_detach): Likewise.
9714 * nto-procfs.c (procfs_detach): Likewise.
9715 * procfs.c (procfs_detach): Likewise.
9716 (do_detach): Remove signo parameter.
9717 * record.c (record_detach): Remove args parameter.
9718 * record.h (record_detach): Likewise.
9719 * remote-sim.c (gdbsim_detach): Likewise.
9720 * remote.c (remote_detach_1): Likewise.
9721 (remote_detach): Likewise.
9722 (extended_remote_detach): Likewise.
9723 * sol-thread.c (sol_thread_detach): Likewise.
9724 * target-delegates.c: Re-generate.
9725 * top.c (struct qt_args) <args>: Remove field.
9726 (kill_or_detach): Don't pass args.
9727 (quit_force): Don't set args.
9728 * windows-nat.c (windows_detach): Remove args parameter.
9730 2018-01-19 Yao Qi <yao.qi@linaro.org>
9732 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9733 (arm_linux_init_abi): Install it.
9735 2018-01-19 Yao Qi <yao.qi@linaro.org>
9737 * osabi.c (gdb_osabi_names): Extend the regexp for
9738 arm-linux-gnueabihf.
9740 2018-01-18 Yao Qi <yao.qi@linaro.org>
9742 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9744 (abbrev_table::add_abbrev): Update.
9745 (abbrev_table::lookup_abbrev): Update.
9747 2018-01-18 Yao Qi <yao.qi@linaro.org>
9749 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9751 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9753 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9756 2018-01-17 Tom Tromey <tom@tromey.com>
9758 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9760 2018-01-17 Tom Tromey <tom@tromey.com>
9762 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9763 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9764 (create_array_type_with_stride): Update.
9765 * dwarf2read.c (set_die_type): Update.
9767 2018-01-17 Tom Tromey <tom@tromey.com>
9769 * dwarf2read.c (delayed_method_info): Remove typedef.
9770 (dwarf2_cu::method_info): Now a std::vector.
9771 (add_to_method_list): Update.
9772 (free_delayed_list): Remove.
9773 (compute_delayed_physnames): Update.
9774 (process_full_comp_unit, process_full_type_unit): Clear the method
9775 list. Remove cleanups.
9776 (psymtab_include_file_name): Add name_holder parameter. Use
9778 (dwarf_decode_lines): Update.
9780 2018-01-17 Tom Tromey <tom@tromey.com>
9781 Simon Marchi <simon.marchi@ericsson.com>
9783 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9784 (dwarf2_per_objfile::free_cached_comp_units)
9785 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9786 (init_cutu_and_read_dies_no_follow): Update.
9787 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9788 (dwarf2_cu::~dwarf2_cu): New.
9789 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9790 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9792 2018-01-17 Tom Tromey <tom@tromey.com>
9793 Simon Marchi <simon.marchi@ericsson.com>
9795 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9796 (struct die_reader_specs) <abbrev_table>: New member.
9797 (struct abbrev_table): Add constructor.
9798 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9799 <abbrev_obstack>: Now an auto_obstack.
9800 (abbrev_table_up): New typedef.
9801 (init_cu_die_reader): Add abbrev_table parameter.
9802 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9803 Add result_dwo_abbrev_table.
9804 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9805 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9807 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9809 (skip_children): Update.
9810 (abbrev_table::alloc_abbrev): Rename from
9811 abbrev_table_alloc_abbrev.
9812 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9813 (abbrev_table::lookup_abbrev): Rename from
9814 abbrev_table_lookup_abbrev.
9815 (abbrev_table_read_table): Return abbrev_table_up.
9816 (abbrev_table_free, abbrev_table_free_cleanup)
9817 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9818 (load_partial_dies): Update.
9820 2018-01-17 Tom Tromey <tom@tromey.com>
9822 * dwarf2read.c (dwarf2_compute_name): Update comment.
9823 (read_func_scope, read_variable): Update.
9824 (new_symbol): Remove.
9825 (new_symbol_full): Rename to new_symbol.
9827 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9830 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9831 a warning instead of throwing an error, set section size to 0 and return
9833 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9835 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9837 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9839 (linux_ptrace_attach_fail_reason_string): Likewise.
9840 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9842 (linux_ptrace_attach_fail_reason_string): Likewise.
9843 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9845 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9847 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9849 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9852 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9853 checking for fs_base/gs_base fields in struct user_regs_struct.
9854 * configure: Regenerate.
9856 2018-01-17 Yao Qi <yao.qi@linaro.org>
9858 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9860 (aarch64_linux_init_abi): Install it to gdbarch hook
9863 2018-01-15 Pedro Alves <palves@redhat.com>
9865 * common/signals-state-save-restore.c
9866 (save_original_signals_state): Fix typos.
9868 2017-01-12 Tom Tromey <tom@tromey.com>
9869 Sergio Durigan Junior <sergiodj@redhat.com>
9871 * Makefile.in (install-only): Install gdb-add-index.
9873 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9875 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9877 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9879 * infrun.c (keep_going_pass_signal): Clear step-over info when
9880 insert_breakpoints fails.
9882 2018-01-11 Pedro Alves <palves@redhat.com>
9885 * infrun.c (resume): Rename to ...
9886 (resume_1): ... this.
9887 (resume): Reimplement as wrapper around resume_1.
9889 2018-01-11 Pedro Alves <palves@redhat.com>
9892 * remote.c (remote_parse_stop_reply): Default to the last-set
9893 general thread instead of to 'magic_null_ptid'.
9895 2018-01-10 Pedro Alves <palves@redhat.com>
9897 * language.h (language_get_symbol_name_matcher): Rename ...
9898 (get_symbol_name_matcher): ... this.
9899 * language.c (language_get_symbol_name_matcher): Ditto.
9900 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9903 2018-01-10 Pedro Alves <palves@redhat.com>
9907 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9908 Adjust to use language_get_symbol_name_matcher instead of
9909 language_defn::la_get_symbol_name_matcher.
9910 * language.c (language_get_symbol_name_matcher): If in Ada mode
9911 and the lookup name is a verbatim match, return Ada's matcher.
9912 * language.h (language_get_symbol_name_matcher): Adjust comment.
9913 (ada_lookup_name_info::verbatim_p):: New method.
9915 2018-01-10 Pedro Alves <palves@redhat.com>
9918 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9919 minsym's language is language_auto or language_cplus, pass down
9920 language_ada instead.
9921 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9923 2018-01-10 Pedro Alves <palves@redhat.com>
9926 * minsyms.c (linkage_name_str): New function.
9927 (iterate_over_minimal_symbols): Use it.
9929 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9931 * NEWS: Document that 'info proc' now works on FreeBSD.
9933 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9935 * configure.ac: Check for kinfo_getfile in libutil.
9936 * configure: Regenerate.
9937 * config.in: Regenerate.
9938 * fbsd-nat.c: Include "fbsd-tdep.h".
9939 (fbsd_fetch_cmdline): New.
9940 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9941 rather than calling error.
9942 (fbsd_info_proc): New.
9943 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9944 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9945 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9947 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9949 * fbsd-nat.c (struct free_deleter): Remove.
9950 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9952 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9954 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9955 NULL for an empty pathname.
9957 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9959 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9960 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9961 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9962 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9963 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9964 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9965 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9966 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9967 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9968 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9969 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9970 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9971 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9972 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9973 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9975 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9977 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9978 (gnu_xfer_auxv): New function.
9979 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9982 2018-01-08 Yao Qi <yao.qi@linaro.org>
9983 Simon Marchi <simon.marchi@ericsson.com>
9985 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9987 (COMMON_OBS): Remove selftest.o.
9988 * configure.ac: Append selftest-arch.c and common/selftest.c to
9989 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9990 * configure: Re-generated.
9991 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9993 (maintenance_info_selftests): Likewise.
9995 2018-01-08 Xavier Roirand <roirand@adacore.com>
9997 * ada-valprint.c (val_print_packed_array_elements): Use
9998 proper number of elements when printing an array indexed
9999 by an enumeration type.
10001 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10003 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10004 (dw2_get_file_names_reader): Adjust.
10005 (lookup_dwo_signatured_type): Adjust.
10006 (lookup_dwp_signatured_type): Adjust.
10007 (lookup_signatured_type): Adjust.
10008 (create_type_unit_group): Adjust.
10009 (get_type_unit_group): Adjust.
10010 (process_psymtab_comp_unit_reader): Adjust.
10011 (build_type_psymtabs_reader): Adjust.
10012 (scan_partial_symbols): Adjust.
10013 (add_partial_symbol): Adjust.
10014 (add_partial_subprogram): Adjust.
10015 (peek_die_abbrev): Adjust.
10016 (fixup_go_packaging): Adjust.
10017 (process_imported_unit_die): Adjust.
10018 (dwarf2_compute_name): Adjust.
10019 (dwarf2_physname): Adjust.
10020 (read_import_statement): Adjust.
10021 (handle_DW_AT_stmt_list): Adjust.
10022 (read_file_scope): Adjust.
10023 (read_func_scope): Adjust.
10024 (read_lexical_block_scope): Adjust.
10025 (read_call_site_scope): Adjust.
10026 (read_variable): Adjust.
10027 (dwarf2_rnglists_process): Adjust.
10028 (dwarf2_ranges_process): Adjust.
10029 (dwarf2_ranges_read): Adjust.
10030 (dwarf2_get_pc_bounds): Adjust.
10031 (dwarf2_record_block_ranges): Adjust.
10032 (dwarf2_add_field): Adjust.
10033 (dwarf2_add_member_fn): Adjust.
10034 (read_structure_type): Adjust.
10035 (process_structure_scope): Adjust.
10036 (read_enumeration_type): Adjust.
10037 (read_array_type): Adjust.
10038 (mark_common_block_symbol_computed): Adjust.
10039 (read_common_block): Adjust.
10040 (read_namespace_type): Adjust.
10041 (read_namespace): Adjust.
10042 (read_module_type): Adjust.
10043 (read_tag_pointer_type): Adjust.
10044 (read_tag_ptr_to_member_type): Adjust.
10045 (read_tag_string_type): Adjust.
10046 (read_subroutine_type): Adjust.
10047 (read_typedef): Adjust.
10048 (read_base_type): Adjust.
10049 (attr_to_dynamic_prop): Adjust.
10050 (read_subrange_type): Adjust.
10051 (read_unspecified_type): Adjust.
10052 (dwarf2_read_abbrevs): Adjust.
10053 (load_partial_dies): Adjust.
10054 (read_partial_die): Adjust.
10055 (find_partial_die): Adjust.
10056 (guess_partial_die_structure_name): Adjust.
10057 (fixup_partial_die): Adjust.
10058 (read_attribute_value): Adjust.
10059 (read_addr_index): Adjust.
10060 (read_addr_index_from_leb128): Adjust.
10061 (read_str_index): Adjust.
10062 (dwarf2_string_attr): Adjust.
10063 (get_debug_line_section): Adjust.
10064 (dwarf_decode_line_header): Adjust.
10065 (lnp_state_machine::check_line_address): Adjust.
10066 (dwarf_decode_lines_1): Adjust.
10067 (dwarf_decode_lines): Adjust.
10068 (dwarf2_start_symtab): Adjust.
10069 (var_decode_location): Adjust.
10070 (new_symbol_full): Adjust.
10071 (dwarf2_const_value_data): Adjust.
10072 (dwarf2_const_value_attr): Adjust.
10073 (dwarf2_const_value): Adjust.
10074 (die_type): Adjust.
10075 (die_containing_type): Adjust.
10076 (build_error_marker_type): Adjust.
10077 (lookup_die_type): Adjust.
10078 (guess_full_die_structure_name): Adjust.
10079 (anonymous_struct_prefix): Adjust.
10080 (determine_prefix): Adjust.
10081 (dwarf2_name): Adjust.
10082 (follow_die_ref_or_sig): Adjust.
10083 (follow_die_offset): Adjust.
10084 (follow_die_ref): Adjust.
10085 (follow_die_sig_1): Adjust.
10086 (follow_die_sig): Adjust.
10087 (get_signatured_type): Adjust.
10088 (get_DW_AT_signature_type): Adjust.
10089 (decode_locdesc): Adjust.
10090 (dwarf_decode_macros): Adjust.
10091 (cu_debug_loc_section): Adjust.
10092 (fill_in_loclist_baton): Adjust.
10093 (dwarf2_symbol_mark_computed): Adjust.
10094 (init_one_comp_unit): Don't assign
10095 dwarf2_cu::dwarf2_per_objfile.
10096 (set_die_type): Adjust.
10098 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10100 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10101 <dwarf2_per_objfile>: New field.
10102 (dwarf2_per_objfile): Remove global.
10103 (get_dwarf2_per_objfile): New function.
10104 (set_dwarf2_per_objfile): New function.
10105 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10106 dwarf2_per_objfile.
10107 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10108 (read_abbrev_offset): Likewise.
10109 (read_indirect_string): Likewise.
10110 (read_indirect_line_string): Likewise.
10111 (read_indirect_string_at_offset): Likewise.
10112 (read_indirect_string_from_dwz): Likewise.
10113 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10114 dwarf2_per_objfile.
10115 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10116 (create_all_comp_units): Change objfile parameter to
10117 dwarf2_per_objfile.
10118 (create_all_type_units): Likewise.
10119 (process_queue): Add dwarf2_per_objfile parameter.
10120 (read_and_check_comp_unit_head): Likewise.
10121 (lookup_dwo_unit_in_dwp): Likewise.
10122 (get_dwp_file): Likewise.
10123 (process_cu_includes): Likewise.
10124 (struct free_dwo_file_cleanup_data): New struct.
10125 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10126 set_dwarf2_per_objfile.
10127 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10128 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10129 context, adjust calls.
10130 (dw2_instantiate_symtab): Likewise.
10131 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10132 (dw2_get_cu): Likewise.
10133 (create_cu_from_index_list): Change objfile parameter to
10134 dwarf2_per_objfile.
10135 (create_cus_from_index_list): Get dwarf2_per_objfile from
10136 context, adjust calls.
10137 (create_cus_from_index): Likewise.
10138 (create_signatured_type_table_from_index): Change objfile
10139 parameter to dwarf2_per_objfile.
10140 (create_signatured_type_table_from_debug_names): Change objfile
10141 parameter to dwarf2_per_objfile.
10142 (create_addrmap_from_index): Likewise.
10143 (create_addrmap_from_aranges): Likewise.
10144 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10145 (dw2_setup): Remove.
10146 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10148 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10149 get_dwarf2_per_objfile.
10150 (dw2_forget_cached_source_info): Likewise.
10151 (dw2_map_symtabs_matching_filename): Likewise.
10152 (struct dw2_symtab_iterator) <index>: Remove.
10153 <dwarf2_per_objfile>: New field.
10154 (dw2_symtab_iter_init): Replace index parameter with
10155 dwarf2_per_objfile.
10156 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10157 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10158 (dw2_print_stats): Likewise.
10159 (dw2_dump): Likewise.
10160 (dw2_expand_symtabs_for_function): Likewise.
10161 (dw2_expand_all_symtabs): Likewise.
10162 (dw2_expand_symtabs_with_fullname): Likewise.
10163 (dw2_expand_marked_cus): Replace index and objfile parameters
10164 with dwarf2_per_objfile.
10165 (dw_expand_symtabs_matching_file_matcher): Add
10166 dwarf2_per_objfile parameter and adjust calls.
10167 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10169 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10170 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10172 (create_cus_from_debug_names_list): Replace objfile parameter
10173 with dwarf2_per_objfile and adjust calls.
10174 (create_cus_from_debug_names): Likewise.
10175 (dwarf2_read_debug_names): Likewise.
10176 (mapped_debug_names::namei_to_name): Adjust call.
10177 (dw2_debug_names_iterator::next): Likewise.
10178 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10179 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10180 (dw2_debug_names_dump): Likewise.
10181 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10182 (dw2_debug_names_expand_symtabs_matching): Likewise.
10183 (dwarf2_initialize_objfile): Likewise.
10184 (dwarf2_build_psymtabs): Likewise.
10185 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10187 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10188 (read_and_check_comp_unit_head): Likewise.
10189 (read_abbrev_offset): Likewise.
10190 (create_debug_type_hash_table): Likewise.
10191 (create_debug_types_hash_table): Likewise.
10192 (create_all_type_units): Replace objfile parameter with
10193 dwarf2_per_objfile.
10194 (add_type_unit): Add dwarf2_per_objfile parameter.
10195 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10196 with dwarf2_per_objfile.
10197 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10198 (lookup_dwp_signatured_type): Likewise.
10199 (lookup_signatured_type): Likewise.
10200 (read_cutu_die_from_dwo): Likewise.
10201 (init_tu_and_read_dwo_dies): Likewise.
10202 (init_cutu_and_read_dies): Likewise.
10203 (init_cutu_and_read_dies_no_follow): Likewise.
10204 (allocate_type_unit_groups_table): Add objfile parameter.
10205 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10206 (get_type_unit_group): Likewise.
10207 (process_psymtab_comp_unit): Update call.
10208 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10209 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10210 (print_tu_stats): Likewise.
10211 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10212 in void* parameter.
10213 (build_type_psymtabs): Change objfile parameter to
10214 dwarf2_per_objfile.
10215 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10216 passed in void* parameter.
10217 (process_skeletonless_type_units): Change objfile parameter to
10218 dwarf2_per_objfile.
10219 (set_partial_user): Likewise.
10220 (dwarf2_build_psymtabs_hard): Likewise.
10221 (read_comp_units_from_section): Likewise.
10222 (create_all_comp_units): Likewise.
10223 (scan_partial_symbols): Update calls.
10224 (add_partial_symbol): Likewise.
10225 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10226 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10227 (process_queue): Add dwarf2_per_objfile parameter.
10228 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10229 (compute_compunit_symtab_includes): Likewise.
10230 (process_cu_includes): Add dwarf2_per_objfile parameter.
10231 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10232 (process_full_type_unit): Likewise.
10233 (process_imported_unit_die): Update call.
10234 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10235 (read_file_scope): Likewise.
10236 (allocate_dwo_file_hash_table): Add objfile parameter.
10237 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10238 (create_cus_hash_table): Likewise.
10239 (create_dwp_hash_table): Likewise.
10240 (create_dwo_unit_in_dwp_v1): Likewise.
10241 (create_dwp_v2_section): Likewise.
10242 (create_dwo_unit_in_dwp_v2): Likewise.
10243 (lookup_dwo_unit_in_dwp): Likewise.
10244 (try_open_dwop_file): Likewise.
10245 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10246 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10247 cleanup to include a reference to dwarf2_per_objfile.
10248 (open_dwp_file): Add dwarf2_per_objfile parameter.
10249 (open_and_init_dwp_file): Likewise.
10250 (get_dwp_file): Likewise.
10251 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10252 (queue_and_load_all_dwo_tus): Update call.
10253 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10255 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10256 (dwarf2_ranges_process): Likewise.
10257 (dwarf2_get_pc_bounds): Likewise.
10258 (mark_common_block_symbol_computed): Likewise.
10259 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10260 (dwarf2_read_abbrevs): Update call.
10261 (read_partial_die): Use dwarf2_per_objfile from cu.
10262 (find_partial_die): Likewise.
10263 (fixup_partial_die): Likewise.
10264 (read_attribute_value): Likewise.
10265 (read_indirect_string_at_offset_from): Add objfile parameter.
10266 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10268 (read_indirect_string_from_dwz): Add objfile parameter.
10269 (read_indirect_string): Add objfile parameter.
10270 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10271 (read_addr_index): Use dwarf2_per_objfile from cu.
10272 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10274 (read_str_index): Use dwarf2_per_objfile from cu.
10275 (get_debug_line_section): Likewise.
10276 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10277 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10278 (new_symbol_full): Use dwarf2_per_objfile from cu.
10279 (build_error_marker_type): Likewise.
10280 (lookup_die_type): Likewise.
10281 (determine_prefix): Likewise.
10282 (follow_die_offset): Likewise.
10283 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10284 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10285 (dwarf2_fetch_die_type_sect_off): Likewise.
10286 (dwarf2_get_die_type): Likewise.
10287 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10288 (get_signatured_type): Likewise.
10289 (get_DW_AT_signature_type): Likewise.
10290 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10291 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10292 (cu_debug_loc_section): Likewise.
10293 (fill_in_loclist_baton): Likewise.
10294 (dwarf2_symbol_mark_computed): Likewise.
10295 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10296 dwarf2_per_objfile.
10297 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10299 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10300 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10301 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10302 (set_die_type): Use dwarf2_free_objfile from cu.
10303 (get_die_type_at_offset): Likewise.
10304 (dwarf2_per_objfile_free): Don't assign global variable.
10305 (debug_names) <constructor>: Add dwarf2_per_objfile
10306 parameter, update m_debugstrlookup construction.
10307 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10309 <m_dwarf2_per_objfile>: New field.
10310 <lookup>: Use m_dwarf2_per_objfile.
10311 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10312 (psyms_seen_size): Likewise.
10313 (write_gdbindex): Replace objfile parameter with
10314 dwarf2_per_objfile.
10315 (write_debug_names): Likewise.
10316 (write_psymtabs_to_index): Likewise.
10317 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10320 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10322 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10323 <dwarf2_per_objfile>: New field.
10324 (struct dwarf2_per_cu_data) <objfile>: Remove.
10325 <dwarf2_per_objfile>: New field.
10326 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10328 (create_signatured_type_table_from_index): Likewise.
10329 (create_debug_type_hash_table): Likewise.
10330 (fill_in_sig_entry_from_dwo_entry): Likewise.
10331 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10332 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10334 (create_partial_symtab): Access objfile through
10335 dwarf2_per_objfile.
10336 (process_psymtab_comp_unit_reader): Likewise.
10337 (read_comp_units_from_section): Likewise.
10338 (scan_partial_symbols): Likewise.
10339 (add_partial_symbol): Likewise.
10340 (add_partial_subprogram): Likewise.
10341 (peek_die_abbrev): Likewise.
10342 (fixup_go_packaging): Likewise.
10343 (process_full_comp_unit): Likewise.
10344 (process_full_type_unit): Likewise.
10345 (process_imported_unit_die): Likewise.
10346 (dwarf2_compute_name): Likewise.
10347 (dwarf2_physname): Likewise.
10348 (read_import_statement): Likewise.
10349 (create_cus_hash_table): Assign dwarf2_physname instead of
10351 (read_func_scope): Access objfile through dwarf2_per_objfile.
10352 (read_lexical_block_scope): Likewise.
10353 (read_call_site_scope): Likewise.
10354 (read_variable): Likewise.
10355 (dwarf2_rnglists_process): Likewise.
10356 (dwarf2_ranges_process): Likewise.
10357 (dwarf2_ranges_read): Likewise.
10358 (dwarf2_record_block_ranges): Likewise.
10359 (dwarf2_add_field): Likewise.
10360 (dwarf2_add_member_fn): Likewise.
10361 (read_structure_type): Likewise.
10362 (process_structure_scope): Likewise.
10363 (read_enumeration_type): Likewise.
10364 (read_array_type): Likewise.
10365 (read_common_block): Likewise.
10366 (read_namespace_type): Likewise.
10367 (read_namespace): Likewise.
10368 (read_module_type): Likewise.
10369 (read_tag_pointer_type): Likewise.
10370 (read_tag_ptr_to_member_type): Likewise.
10371 (read_tag_string_type): Likewise.
10372 (read_subroutine_type): Likewise.
10373 (read_typedef): Likewise.
10374 (read_base_type): Likewise.
10375 (attr_to_dynamic_prop): Likewise.
10376 (read_subrange_type): Likewise.
10377 (read_unspecified_type): Likewise.
10378 (load_partial_dies): Likewise.
10379 (read_partial_die): Likewise.
10380 (find_partial_die): Likewise.
10381 (guess_partial_die_structure_name): Likewise.
10382 (fixup_partial_die): Likewise.
10383 (read_attribute_value): Likewise.
10384 (read_addr_index_from_leb128): Likewise.
10385 (dwarf2_read_addr_index): Likewise.
10386 (dwarf2_string_attr): Likewise.
10387 (lnp_state_machine::check_line_address): Likewise.
10388 (dwarf_decode_lines_1): Likewise.
10389 (dwarf_decode_lines): Likewise.
10390 (dwarf2_start_symtab): Likewise.
10391 (var_decode_location): Likewise.
10392 (new_symbol_full): Likewise.
10393 (dwarf2_const_value_data): Likewise.
10394 (dwarf2_const_value_attr): Likewise.
10395 (dwarf2_const_value): Likewise.
10396 (die_type): Likewise.
10397 (die_containing_type): Likewise.
10398 (lookup_die_type): Likewise.
10399 (guess_full_die_structure_name): Likewise.
10400 (anonymous_struct_prefix): Likewise.
10401 (dwarf2_name): Likewise.
10402 (follow_die_ref_or_sig): Likewise.
10403 (follow_die_offset): Likewise.
10404 (follow_die_ref): Likewise.
10405 (dwarf2_fetch_die_loc_sect_off): Likewise.
10406 (dwarf2_fetch_constant_bytes): Likewise.
10407 (dwarf2_fetch_die_type_sect_off): Likewise.
10408 (dwarf2_get_die_type): Likewise.
10409 (follow_die_sig): Likewise.
10410 (decode_locdesc): Likewise.
10411 (dwarf2_per_cu_objfile): Likewise.
10412 (dwarf2_per_cu_text_offset): Likewise.
10413 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10415 (set_die_type): Access objfile through
10416 dwarf2_per_objfile.
10418 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10420 * valprint.c (converted_character_d): Remove typedef.
10421 (DEF_VEC_O (converted_character_d)): Remove.
10422 (count_next_character): Use std::vector.
10423 (print_converted_chars_to_obstack): Likewise.
10424 (generic_printstr): Likewise.
10426 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10428 * xml-support.h (struct gdb_xml_value): Add constructor.
10429 <value>: Change type to unique_xmalloc_ptr.
10430 (gdb_xml_value_s): Remove typedef.
10431 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10432 (gdb_xml_element_start_handler): Change parameter type to
10434 (xml_find_attribute): Likewise.
10435 * xml-support.c (xml_find_attribute): Change parameter type to
10436 std::vector and adjust.
10437 (gdb_xml_values_cleanup): Remove.
10438 (gdb_xml_parser::start_element): Adjust to std::vector.
10439 (xinclude_start_include): Change paraeter type to std::vector
10441 * btrace.c (check_xml_btrace_version): Likewise.
10442 (parse_xml_btrace_block): Likewise.
10443 (parse_xml_btrace_pt_config_cpu): Likewise.
10444 (parse_xml_btrace_pt): Likewise.
10445 (parse_xml_btrace_conf_bts): Likewise.
10446 (parse_xml_btrace_conf_pt): Likewise.
10447 * memory-map.c (memory_map_start_memory): Likewise.
10448 (memory_map_start_property): Likewise.
10449 * osdata.c (osdata_start_osdata): Likewise.
10450 (osdata_start_item): Likewise.
10451 (osdata_start_column): Likewise.
10452 * remote.c (start_thread): Likewise.
10453 * solib-aix.c (library_list_start_library): Likewise.
10454 (library_list_start_list): Likewise.
10455 * solib-svr4.c (library_list_start_library): Likewise.
10456 (svr4_library_list_start_list): Likewise.
10457 * solib-target.c (library_list_start_segment): Likewise.
10458 (library_list_start_section): Likewise.
10459 (library_list_start_library): Likewise.
10460 (library_list_start_list): Likewise.
10461 * tracepoint.c (traceframe_info_start_memory): Likewise.
10462 (traceframe_info_start_tvar): Likewise.
10463 * xml-syscall.c (syscall_start_syscall): Likewise.
10464 * xml-tdesc.c (tdesc_start_target): Likewise.
10465 (tdesc_start_feature): Likewise.
10466 (tdesc_start_reg): Likewise.
10467 (tdesc_start_union): Likewise.
10468 (tdesc_start_struct): Likewise.
10469 (tdesc_start_flags): Likewise.
10470 (tdesc_start_enum): Likewise.
10471 (tdesc_start_field): Likewise.
10472 (tdesc_start_enum_value): Likewise.
10473 (tdesc_start_vector): Likewise.
10475 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10477 * extension.h (struct xmethod_worker) <clone>: Remove.
10478 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10480 (python_xmethod_worker::clone): Remove.
10481 * valops.c (find_overload_match): Use std::move instead of
10484 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10486 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10487 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10488 <free_xmethod_worker_data>: Remove.
10489 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10490 <get_xmethod_arg_types>: Remove.
10491 <get_xmethod_result_type>: Remove.
10492 <invoke_xmethod>: Remove.
10493 * extension.c (new_xmethod_worker): Remove.
10494 (clone_xmethod_worker): Remove.
10495 (get_matching_xmethod_workers): Return void, pass std::vector by
10497 (get_xmethod_arg_types): Rename to...
10498 (xmethod_worker::get_arg_types): ... this, and adjust.
10499 (get_xmethod_result_type): Rename to...
10500 (xmethod_worker::get_result_type): ... this, and adjust.
10501 (invoke_xmethod): Remove.
10502 (free_xmethod_worker): Remove.
10503 (free_xmethod_worker_vec): Remove.
10504 * extension.h (enum ext_lang_rc): Move here from
10506 (struct xmethod_worker): Add constructor and destructor.
10509 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10510 virtual pure methods.
10511 <get_arg_types, get_result_type>: New methods.
10512 (xmethod_worker_ptr): Remove typedef.
10513 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10514 (xmethod_worker_vec): Remove typedef.
10515 (xmethod_worker_up): New typedef.
10516 (invoke_xmethod): Remove.
10517 (clone_xmethod_worker): Remove.
10518 (free_xmethod_worker): Remove.
10519 (free_xmethod_worker_vec): Remove.
10520 (get_xmethod_arg_types): Remove.
10521 (get_xmethod_result_type): Remove.
10522 * valops.c (find_method_list): Use std::vector, don't use
10523 intermediate vector.
10524 (value_find_oload_method_list): Use std::vector.
10525 (find_overload_match): Use std::vector.
10526 (find_oload_champ): Use std::vector.
10527 * value.c (value_free): Use operator delete.
10528 (value_of_xmethod): Rename to...
10529 (value_from_xmethod): ... this. Don't assign
10530 xmethod_worker::value, take rvalue-reference.
10531 (result_type_of_xmethod): Adjust.
10532 (call_xmethod): Adjust.
10533 * value.h: Include extension.h.
10534 (struct xmethod_worker): Don't forward-declare.
10535 (value_of_xmethod): Rename to...
10536 (value_from_xmethod): ... this, take rvalue-reference.
10537 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10538 (struct python_xmethod_worker): ... this, add constructor and
10540 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10541 (gdbpy_free_xmethod_worker_data): Rename to...
10542 (python_xmethod_worker::~python_xmethod_worker): ... this and
10544 (gdbpy_clone_xmethod_worker_data): Rename to...
10545 (python_xmethod_worker::clone): ... this and adjust.
10546 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10548 (gdbpy_get_xmethod_arg_types): Rename to...
10549 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10550 (gdbpy_get_xmethod_result_type): Rename to...
10551 (python_xmethod_worker::do_get_result_type): ... this and
10553 (gdbpy_invoke_xmethod): Rename to...
10554 (python_xmethod_worker::invoke): ... this and adjust.
10555 (new_python_xmethod_worker): Rename to...
10556 (python_xmethod_worker::python_xmethod_worker): ... this and
10558 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10560 (gdbpy_free_xmethod_worker_data): Remove.
10561 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10562 (gdbpy_get_xmethod_arg_types): Remove.
10563 (gdbpy_get_xmethod_result_type): Remove.
10564 (gdbpy_invoke_xmethod): Remove.
10565 * python/python.c (python_extension_ops): Remove obsolete
10568 2018-01-05 Pedro Alves <palves@redhat.com>
10571 * common/signals-state-save-restore.c
10572 (save_original_signals_state): New parameter 'quiet'. Warn if we
10573 find a custom handler preinstalled, instead of internal erroring.
10574 But only warn if !quiet.
10575 * common/signals-state-save-restore.h
10576 (save_original_signals_state): New parameter 'quiet'.
10577 * main.c (captured_main_1): Move save_original_signals_state call
10578 after option handling, and pass QUIET.
10580 2018-01-05 Pedro Alves <palves@redhat.com>
10582 * spu-tdep.c (spu_catch_start): Pass
10583 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10585 2018-01-05 Pedro Alves <palves@redhat.com>
10588 * ada-lang.c (literal_symbol_name_matcher): New function.
10589 (ada_get_symbol_name_matcher): Use it for
10590 symbol_name_match_type::SEARCH_NAME.
10591 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10592 it down instead of assuming symbol_name_match_type::FULL.
10593 * block.h (block_lookup_symbol): New parameter 'match_type'.
10594 * c-valprint.c (print_unpacked_pointer): Use
10595 lookup_symbol_search_name instead of lookup_symbol.
10596 * compile/compile-object-load.c (get_out_value_type): Pass down
10597 symbol_name_match_type::SEARCH_NAME.
10598 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10599 symbol_name_match_type::FULL.
10600 * cp-support.c (cp_get_symbol_name_matcher): Handle
10601 symbol_name_match_type::SEARCH_NAME.
10602 * infrun.c (insert_exception_resume_breakpoint): Use
10603 lookup_symbol_search_name.
10604 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10605 * psymtab.c (maintenance_check_psymtabs): Use
10606 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10607 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10608 SYMBOL_SEARCH_NAME.
10609 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10610 if symbol_name_match_type::SEARCH_NAME.
10611 (lookup_symbol_in_language): Pass down
10612 symbol_name_match_type::FULL.
10613 (lookup_symbol_search_name): New.
10614 (lookup_language_this): Pass down
10615 symbol_name_match_type::SEARCH_NAME.
10616 (lookup_symbol_aux, lookup_local_symbol): New parameter
10617 'match_type'. Pass it down.
10618 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10619 (lookup_symbol_search_name): New declaration.
10620 (lookup_symbol_in_block): New 'match_type' parameter.
10622 2018-01-05 Pedro Alves <palves@redhat.com>
10625 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10627 (ada_lookup_symbol): Reimplement in terms of
10628 ada_lookup_symbol_list, bits factored out from
10629 ada_lookup_encoded_symbol.
10631 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10633 * ada-exp.y (write_object_renaming): When subscripting an array
10634 using a symbol as the index, pass the block in call to
10635 ada_lookup_encoded_symbol when looking that symbol up.
10637 2018-01-05 Jerome Guitton <guitton@adacore.com>
10639 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10642 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10644 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10645 the case where VALUE_LVAL (val0) is not lval_memory.
10647 2018-01-05 Xavier Roirand <roirand@adacore.com>
10649 * ada-valprint.c (print_optional_low_bound): Handle
10650 character-indexed array printing like boolean-indexed array
10653 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10655 * NEWS: Create a new section for the next release branch.
10656 Rename the section of the current branch, now that it has
10659 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10661 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10662 * version.in: Bump version to 8.1.50.DATE-git.
10664 2018-01-03 Xavier Roirand <roirand@adacore.com>
10666 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10668 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10670 (default_exception_support_info) <catch_handlers_sym>: Add field.
10671 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10672 (ada_exception_name_addr_1): Add "catch handlers" handling.
10673 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10674 Update all callers.
10675 (create_excep_cond_exprs) <ex>: Add parameter.
10676 (re_set_exception): Update create_excep_cond_exprs call.
10677 (print_it_exception, print_one_exception, print_mention_exception)
10678 (print_recreate_exception): Add "catch handler" handling.
10679 (allocate_location_catch_handlers, re_set_catch_handlers)
10680 (check_status_catch_handlers, print_it_catch_handlers)
10681 (print_one_catch_handlers, print_mention_catch_handlers)
10682 (print_recreate_catch_handlers): New function.
10683 (catch_handlers_breakpoint_ops): New variable.
10684 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10685 Add parameter. Add "catch handler" handling.
10686 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10687 Add "catch handler" handling.
10688 (ada_exception_catchpoint_cond_string): Add "catch handler"
10690 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10692 (catch_ada_handlers_command): New function.
10693 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10694 operations structure.
10695 (_initialize_ada_language): Add "catch handlers" command entry.
10696 * NEWS: Document "catch handlers" feature.
10698 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10700 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10701 account when creating the array type of the slice.
10702 (ada_value_slice): Likewise.
10704 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10706 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10708 (create_array_type_with_stride): Add byte_stride_prop parameter.
10709 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10710 New parameter. Update all callers in this file.
10711 (array_type_has_dynamic_stride): New function.
10712 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10713 of arrays with dynamic byte strides.
10714 * dwarf2read.c (read_array_type): Add support for dynamic
10715 DW_AT_byte_stride attributes.
10717 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10719 * dwarf2read.c (read_unspecified_type): Treat
10720 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10722 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10724 Update copyright year range in all GDB files.
10726 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10728 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10729 and gdb/testsuite/gdb.base/step-line.c.
10731 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10733 * copyright.py (main): Dump the contents of
10734 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10735 even if BY_HAND is empty.
10737 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10739 * top.c (print_gdb_version): Update Copyright year in version
10742 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10744 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10746 For older changes see ChangeLog-2017.
10752 version-control: never