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