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