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