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