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