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