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