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