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