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