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