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