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